(Setting Process Marks): Addition.
[gnus] / texi / gnus.texi
1 \input texinfo
2
3 @setfilename gnus
4 @settitle Gnus Manual
5 @synindex fn cp
6 @synindex vr cp
7 @synindex pg cp
8 @dircategory Emacs
9 @direntry
10 * Gnus: (gnus).         The newsreader Gnus.
11 @end direntry
12 @iftex
13 @finalout
14 @end iftex
15 @setchapternewpage odd
16
17 @iftex
18 @iflatex
19 \documentclass[twoside,a4paper,openright,11pt]{book}
20 \usepackage[latin1]{inputenc}
21 \usepackage{pagestyle}
22 \usepackage{epsfig}
23 \usepackage{pixidx}
24 \input{gnusconfig.tex}
25
26 \ifx\pdfoutput\undefined
27 \else
28 \usepackage[pdftex,bookmarks,colorlinks=true]{hyperref}
29 \usepackage{thumbpdf}
30 \pdfcompresslevel=9
31 \fi
32
33 \makeindex
34 \begin{document}
35
36 \newcommand{\gnusversionname}{Oort Gnus v0.10}
37 \newcommand{\gnuschaptername}{}
38 \newcommand{\gnussectionname}{}
39
40 \newcommand{\gnusbackslash}{/}
41
42 \newcommand{\gnusref}[1]{``#1'' on page \pageref{#1}}
43 \ifx\pdfoutput\undefined
44 \newcommand{\gnusuref}[1]{\gnustt{#1}}
45 \else
46 \newcommand{\gnusuref}[1]{\href{#1}{\gnustt{#1}}}
47 \fi
48 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
49 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
50
51 \newcommand{\gnuskindex}[1]{\index{#1}}
52 \newcommand{\gnusindex}[1]{\index{#1}}
53
54 \newcommand{\gnustt}[1]{{\gnusselectttfont{}#1}}
55 \newcommand{\gnuscode}[1]{\gnustt{#1}}
56 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
57 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
58 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
59 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
60 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
61 \newcommand{\gnusdfn}[1]{\textit{#1}}
62 \newcommand{\gnusi}[1]{\textit{#1}}
63 \newcommand{\gnusstrong}[1]{\textbf{#1}}
64 \newcommand{\gnusemph}[1]{\textit{#1}}
65 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
66 \newcommand{\gnussc}[1]{\textsc{#1}}
67 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
68 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
69 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
70 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
71
72 \newcommand{\gnusbullet}{{${\bullet}$}}
73 \newcommand{\gnusdollar}{\$}
74 \newcommand{\gnusampersand}{\&}
75 \newcommand{\gnuspercent}{\%}
76 \newcommand{\gnushash}{\#}
77 \newcommand{\gnushat}{\symbol{"5E}}
78 \newcommand{\gnusunderline}{\symbol{"5F}}
79 \newcommand{\gnusnot}{$\neg$}
80 \newcommand{\gnustilde}{\symbol{"7E}}
81 \newcommand{\gnusless}{{$<$}}
82 \newcommand{\gnusgreater}{{$>$}}
83 \newcommand{\gnusbraceleft}{{$>$}}
84 \newcommand{\gnusbraceright}{{$>$}}
85
86 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
87 \newcommand{\gnusinteresting}{
88 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
89 }
90
91 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
92
93 \newcommand{\gnuspagechapter}[1]{
94 {\mbox{}}
95 }
96
97 \newdimen{\gnusdimen}
98 \gnusdimen 0pt
99
100 \newcommand{\gnuschapter}[2]{
101 \gnuscleardoublepage
102 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
103 \chapter{#2}
104 \renewcommand{\gnussectionname}{}
105 \renewcommand{\gnuschaptername}{#2}
106 \thispagestyle{empty}
107 \hspace*{-2cm}
108 \begin{picture}(500,500)(0,0)
109 \put(480,350){\makebox(0,0)[tr]{#1}}
110 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
111 \end{picture}
112 \clearpage
113 }
114
115 \newcommand{\gnusfigure}[3]{
116 \begin{figure}
117 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
118 #3
119 \end{picture}
120 \caption{#1}
121 \end{figure}
122 }
123
124 \newcommand{\gnusicon}[1]{
125 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
126 }
127
128 \newcommand{\gnuspicon}[1]{
129 \margindex{\epsfig{figure=#1,width=2cm}}
130 }
131
132 \newcommand{\gnusxface}[2]{
133 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
134 }
135
136 \newcommand{\gnussmiley}[2]{
137 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
138 }
139
140 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
141
142 \newcommand{\gnussection}[1]{
143 \renewcommand{\gnussectionname}{#1}
144 \section{#1}
145 }
146
147 \newenvironment{codelist}%
148 {\begin{list}{}{
149 }
150 }{\end{list}}
151
152 \newenvironment{kbdlist}%
153 {\begin{list}{}{
154 \labelwidth=0cm
155 }
156 }{\end{list}}
157
158 \newenvironment{dfnlist}%
159 {\begin{list}{}{
160 }
161 }{\end{list}}
162
163 \newenvironment{stronglist}%
164 {\begin{list}{}{
165 }
166 }{\end{list}}
167
168 \newenvironment{samplist}%
169 {\begin{list}{}{
170 }
171 }{\end{list}}
172
173 \newenvironment{varlist}%
174 {\begin{list}{}{
175 }
176 }{\end{list}}
177
178 \newenvironment{emphlist}%
179 {\begin{list}{}{
180 }
181 }{\end{list}}
182
183 \newlength\gnusheadtextwidth
184 \setlength{\gnusheadtextwidth}{\headtextwidth}
185 \addtolength{\gnusheadtextwidth}{1cm}
186
187 \newpagestyle{gnuspreamble}%
188 {
189 {
190 \ifodd\count0
191 {
192 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
193 }
194 \else
195 {
196 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
197 }
198 }
199 \fi
200 }
201 }
202 {
203 \ifodd\count0
204 \mbox{} \hfill
205 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
206 \else
207 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
208 \hfill \mbox{}
209 \fi
210 }
211
212 \newpagestyle{gnusindex}%
213 {
214 {
215 \ifodd\count0
216 {
217 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
218 }
219 \else
220 {
221 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
222 }
223 \fi
224 }
225 }
226 {
227 \ifodd\count0
228 \mbox{} \hfill
229 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
230 \else
231 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
232 \hfill \mbox{}
233 \fi
234 }
235
236 \newpagestyle{gnus}%
237 {
238 {
239 \ifodd\count0
240 {
241 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
242 }
243 \else
244 {
245 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
246 }
247 \fi
248 }
249 }
250 {
251 \ifodd\count0
252 \mbox{} \hfill
253 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
254 \else
255 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
256 \hfill \mbox{}
257 \fi
258 }
259
260 \pagenumbering{roman}
261 \pagestyle{gnuspreamble}
262
263 @end iflatex
264 @end iftex
265
266 @iftex
267 @iflatex
268 \begin{titlepage}
269 {
270
271 %\addtolength{\oddsidemargin}{-5cm}
272 %\addtolength{\evensidemargin}{-5cm}
273 \parindent=0cm
274 \addtolength{\textheight}{2cm}
275
276 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
277 \rule{15cm}{1mm}\\
278 \vfill
279 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
280 \vfill
281 \rule{15cm}{1mm}\\
282 \gnusauthor{by Lars Magne Ingebrigtsen}
283 \newpage
284 }
285
286 \mbox{}
287 \vfill
288
289 \thispagestyle{empty}
290
291 Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
292 Free Software Foundation, Inc.
293
294
295 Permission is granted to copy, distribute and/or modify this document
296 under the terms of the GNU Free Documentation License, Version 1.1 or
297 any later version published by the Free Software Foundation; with no
298 Invariant Sections, with the Front-Cover texts being ``A GNU
299 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
300 license is included in the section entitled ``GNU Free Documentation
301 License'' in the Emacs manual.
302
303 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
304 this GNU Manual, like GNU software.  Copies published by the Free
305 Software Foundation raise funds for GNU development.''
306
307 This document is part of a collection distributed under the GNU Free
308 Documentation License.  If you want to distribute this document
309 separately from the collection, you can do so by adding a copy of the
310 license to the document, as described in section 6 of the license.
311 \newpage
312 \end{titlepage}
313 @end iflatex
314 @end iftex
315
316 @ifnottex
317
318 This file documents Gnus, the GNU Emacs newsreader.
319
320 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
321         Free Software Foundation, Inc.
322
323 Permission is granted to copy, distribute and/or modify this document
324 under the terms of the GNU Free Documentation License, Version 1.1 or
325 any later version published by the Free Software Foundation; with the
326 Invariant Sections being none, with the Front-Cover texts being ``A GNU
327 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
328 license is included in the section entitled ``GNU Free Documentation
329 License'' in the Emacs manual.
330
331 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
332 this GNU Manual, like GNU software.  Copies published by the Free
333 Software Foundation raise funds for GNU development.''
334
335 This document is part of a collection distributed under the GNU Free
336 Documentation License.  If you want to distribute this document
337 separately from the collection, you can do so by adding a copy of the
338 license to the document, as described in section 6 of the license.
339 @end ifnottex
340
341 @tex
342
343 @titlepage
344 @title Gnus Manual
345
346 @author by Lars Magne Ingebrigtsen
347 @page
348
349 @vskip 0pt plus 1filll
350 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
351         Free Software Foundation, Inc.
352
353 Permission is granted to copy, distribute and/or modify this document
354 under the terms of the GNU Free Documentation License, Version 1.1 or
355 any later version published by the Free Software Foundation; with no
356 Invariant Sections, with the Front-Cover texts being ``A GNU
357 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
358 license is included in the section entitled ``GNU Free Documentation
359 License'' in the Emacs manual.
360
361 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
362 this GNU Manual, like GNU software.  Copies published by the Free
363 Software Foundation raise funds for GNU development.''
364
365 This document is part of a collection distributed under the GNU Free
366 Documentation License.  If you want to distribute this document
367 separately from the collection, you can do so by adding a copy of the
368 license to the document, as described in section 6 of the license.
369
370 @end titlepage
371 @page
372
373 @end tex
374
375
376 @node Top
377 @top The Gnus Newsreader
378
379 @ifinfo
380
381 You can read news (and mail) from within Emacs by using Gnus.  The news
382 can be gotten by any nefarious means you can think of---@sc{nntp}, local
383 spool or your mbox file.  All at the same time, if you want to push your
384 luck.
385
386 This manual corresponds to Oort Gnus v0.10.
387
388 @end ifinfo
389
390 @iftex
391
392 @iflatex
393 \tableofcontents
394 \gnuscleardoublepage
395 @end iflatex
396
397 Gnus is the advanced, self-documenting, customizable, extensible
398 unreal-time newsreader for GNU Emacs.
399
400 Oops.  That sounds oddly familiar, so let's start over again to avoid
401 being accused of plagiarism:
402
403 Gnus is a message-reading laboratory.  It will let you look at just
404 about anything as if it were a newsgroup.  You can read mail with it,
405 you can browse directories with it, you can @code{ftp} with it---you
406 can even read news with it!
407
408 Gnus tries to empower people who read news the same way Emacs empowers
409 people who edit text.  Gnus sets no limits to what the user should be
410 allowed to do.  Users are encouraged to extend Gnus to make it behave
411 like they want it to behave.  A program should not control people;
412 people should be empowered to do what they want by using (or abusing)
413 the program.
414
415 @end iftex
416
417 @menu
418 * Starting Up::                 Finding news can be a pain.
419 * Group Buffer::                Selecting, subscribing and killing groups.
420 * Summary Buffer::              Reading, saving and posting articles.
421 * Article Buffer::              Displaying and handling articles.
422 * Composing Messages::          Information on sending mail and news.
423 * Select Methods::              Gnus reads all messages from various select methods.
424 * Scoring::                     Assigning values to articles.
425 * Various::                     General purpose settings.
426 * The End::                     Farewell and goodbye.
427 * Appendices::                  Terminology, Emacs intro, FAQ, History, Internals.
428 * Index::                       Variable, function and concept index.
429 * Key Index::                   Key Index.
430
431 Other related manuals
432
433 * Message:(message).            Composing messages.
434 * Emacs-MIME:(emacs-mime).      Composing messages; MIME-specific parts.
435 * Sieve:(sieve).                Managing Sieve scripts in Emacs.
436 * PGG:(pgg).                    PGP/MIME with Gnus.
437
438 @detailmenu
439  --- The Detailed Node Listing ---
440
441 Starting Gnus
442
443 * Finding the News::            Choosing a method for getting news.
444 * The First Time::              What does Gnus do the first time you start it?
445 * The Server is Down::          How can I read my mail then?
446 * Slave Gnusae::                You can have more than one Gnus active at a time.
447 * Fetching a Group::            Starting Gnus just to read a group.
448 * New Groups::                  What is Gnus supposed to do with new groups?
449 * Changing Servers::            You may want to move from one server to another.
450 * Startup Files::               Those pesky startup files---@file{.newsrc}.
451 * Auto Save::                   Recovering from a crash.
452 * The Active File::             Reading the active file over a slow line Takes Time.
453 * Startup Variables::           Other variables you might change.
454
455 New Groups
456
457 * Checking New Groups::         Determining what groups are new.
458 * Subscription Methods::        What Gnus should do with new groups.
459 * Filtering New Groups::        Making Gnus ignore certain new groups.
460
461 Group Buffer
462
463 * Group Buffer Format::         Information listed and how you can change it.
464 * Group Maneuvering::           Commands for moving in the group buffer.
465 * Selecting a Group::           Actually reading news.
466 * Subscription Commands::       Unsubscribing, killing, subscribing.
467 * Group Data::                  Changing the info for a group.
468 * Group Levels::                Levels? What are those, then?
469 * Group Score::                 A mechanism for finding out what groups you like.
470 * Marking Groups::              You can mark groups for later processing.
471 * Foreign Groups::              Creating and editing groups.
472 * Group Parameters::            Each group may have different parameters set.
473 * Listing Groups::              Gnus can list various subsets of the groups.
474 * Sorting Groups::              Re-arrange the group order.
475 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
476 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
477 * Exiting Gnus::                Stop reading news and get some work done.
478 * Group Topics::                A folding group mode divided into topics.
479 * Misc Group Stuff::            Other stuff that you can to do.
480
481 Group Buffer Format
482
483 * Group Line Specification::    Deciding how the group buffer is to look.
484 * Group Modeline Specification::  The group buffer modeline.
485 * Group Highlighting::          Having nice colors in the group buffer.
486
487 Group Topics
488
489 * Topic Commands::              Interactive E-Z commands.
490 * Topic Variables::             How to customize the topics the Lisp Way.
491 * Topic Sorting::               Sorting each topic individually.
492 * Topic Topology::              A map of the world.
493 * Topic Parameters::            Parameters that apply to all groups in a topic.
494
495 Misc Group Stuff
496
497 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
498 * Group Information::           Information and help on groups and Gnus.
499 * Group Timestamp::             Making Gnus keep track of when you last read a group.
500 * File Commands::               Reading and writing the Gnus files.
501 * Sieve Commands::              Managing Sieve scripts.
502
503 Summary Buffer
504
505 * Summary Buffer Format::       Deciding how the summary buffer is to look.
506 * Summary Maneuvering::         Moving around the summary buffer.
507 * Choosing Articles::           Reading articles.
508 * Paging the Article::          Scrolling the current article.
509 * Reply Followup and Post::     Posting articles.
510 * Delayed Articles::            Send articles at a later time.
511 * Marking Articles::            Marking articles as read, expirable, etc.
512 * Limiting::                    You can limit the summary buffer.
513 * Threading::                   How threads are made.
514 * Sorting the Summary Buffer::  How articles and threads are sorted.
515 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
516 * Article Caching::             You may store articles in a cache.
517 * Persistent Articles::         Making articles expiry-resistant.
518 * Article Backlog::             Having already read articles hang around.
519 * Saving Articles::             Ways of customizing article saving.
520 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
521 * Article Treatment::           The article buffer can be mangled at will.
522 * MIME Commands::               Doing MIMEy things with the articles.
523 * Charsets::                    Character set issues.
524 * Article Commands::            Doing various things with the article buffer.
525 * Summary Sorting::             Sorting the summary buffer in various ways.
526 * Finding the Parent::          No child support? Get the parent.
527 * Alternative Approaches::      Reading using non-default summaries.
528 * Tree Display::                A more visual display of threads.
529 * Mail Group Commands::         Some commands can only be used in mail groups.
530 * Various Summary Stuff::       What didn't fit anywhere else.
531 * Exiting the Summary Buffer::  Returning to the Group buffer,
532                                 or reselecting the current group.
533 * Crosspost Handling::          How crossposted articles are dealt with.
534 * Duplicate Suppression::       An alternative when crosspost handling fails.
535 * Security::                    Decrypt and Verify.
536 * Mailing List::                Mailing list minor mode.
537
538 Summary Buffer Format
539
540 * Summary Buffer Lines::        You can specify how summary lines should look.
541 * To From Newsgroups::          How to not display your own name.
542 * Summary Buffer Mode Line::    You can say how the mode line should look.
543 * Summary Highlighting::        Making the summary buffer all pretty and nice.
544
545 Choosing Articles
546
547 * Choosing Commands::           Commands for choosing articles.
548 * Choosing Variables::          Variables that influence these commands.
549
550 Reply, Followup and Post
551
552 * Summary Mail Commands::       Sending mail.
553 * Summary Post Commands::       Sending news.
554 * Summary Message Commands::    Other Message-related commands.
555 * Canceling and Superseding::   
556
557 Marking Articles
558
559 * Unread Articles::             Marks for unread articles.
560 * Read Articles::               Marks for read articles.
561 * Other Marks::                 Marks that do not affect readedness.
562 * Setting Marks::               
563 * Generic Marking Commands::    
564 * Setting Process Marks::       
565
566 Marking Articles
567
568 * Setting Marks::             How to set and remove marks.
569 * Generic Marking Commands::  How to customize the marking.
570 * Setting Process Marks::     How to mark articles for later processing.
571
572 Threading
573
574 * Customizing Threading::       Variables you can change to affect the threading.
575 * Thread Commands::             Thread based commands in the summary buffer.
576
577 Customizing Threading
578
579 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
580 * Filling In Threads::          Making the threads displayed look fuller.
581 * More Threading::              Even more variables for fiddling with threads.
582 * Low-Level Threading::         You thought it was over... but you were wrong!
583
584 Decoding Articles
585
586 * Uuencoded Articles::          Uudecode articles.
587 * Shell Archives::              Unshar articles.
588 * PostScript Files::            Split PostScript.
589 * Other Files::                 Plain save and binhex.
590 * Decoding Variables::          Variables for a happy decoding.
591 * Viewing Files::               You want to look at the result of the decoding?
592
593 Decoding Variables
594
595 * Rule Variables::              Variables that say how a file is to be viewed.
596 * Other Decode Variables::      Other decode variables.
597 * Uuencoding and Posting::      Variables for customizing uuencoding.
598
599 Article Treatment
600
601 * Article Highlighting::        You want to make the article look like fruit salad.
602 * Article Fontisizing::         Making emphasized text look nice.
603 * Article Hiding::              You also want to make certain info go away.
604 * Article Washing::             Lots of way-neat functions to make life better.
605 * Article Header::              Doing various header transformations.
606 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
607 * Article Date::                Grumble, UT!
608 * Article Display::             Display various stuff---X-Face, Picons, Smileys
609 * Article Signature::           What is a signature?
610 * Article Miscellania::         Various other stuff.
611
612 Alternative Approaches
613
614 * Pick and Read::               First mark articles and then read them.
615 * Binary Groups::               Auto-decode all articles.
616
617 Various Summary Stuff
618
619 * Summary Group Information::   Information oriented commands.
620 * Searching for Articles::      Multiple article commands.
621 * Summary Generation Commands::  
622 * Really Various Summary Commands::  Those pesky non-conformant commands.
623
624 Article Buffer
625
626 * Hiding Headers::              Deciding what headers should be displayed.
627 * Using MIME::                  Pushing articles through @sc{mime} before reading them.
628 * Customizing Articles::        Tailoring the look of the articles.
629 * Article Keymap::              Keystrokes available in the article buffer.
630 * Misc Article::                Other stuff.
631
632 Composing Messages
633
634 * Mail::                        Mailing and replying.
635 * Posting Server::              What server should you post and mail via?
636 * Mail and Post::               Mailing and posting at the same time.
637 * Archived Messages::           Where Gnus stores the messages you've sent.
638 * Posting Styles::              An easier way to specify who you are.
639 * Drafts::                      Postponing messages and rejected messages.
640 * Rejected Articles::           What happens if the server doesn't like your article?
641 * Signing and encrypting::      How to compose secure messages.
642
643 Select Methods
644
645 * Server Buffer::               Making and editing virtual servers.
646 * Getting News::                Reading USENET news with Gnus.
647 * Getting Mail::                Reading your personal mail with Gnus.
648 * Browsing the Web::            Getting messages from a plethora of Web sources.
649 * IMAP::                        Using Gnus as a @sc{imap} client.
650 * Other Sources::               Reading directories, files, SOUP packets.
651 * Combined Groups::             Combining groups into one group.
652 * Gnus Unplugged::              Reading news and mail offline.
653
654 Server Buffer
655
656 * Server Buffer Format::        You can customize the look of this buffer.
657 * Server Commands::             Commands to manipulate servers.
658 * Example Methods::             Examples server specifications.
659 * Creating a Virtual Server::   An example session.
660 * Server Variables::            Which variables to set.
661 * Servers and Methods::         You can use server names as select methods.
662 * Unavailable Servers::         Some servers you try to contact may be down.
663
664 Getting News
665
666 * NNTP::                        Reading news from an @sc{nntp} server.
667 * News Spool::                  Reading news from the local spool.
668
669 @sc{nntp}
670
671 * Direct Functions::            Connecting directly to the server.
672 * Indirect Functions::          Connecting indirectly to the server.
673 * Common Variables::            Understood by several connection functions.
674
675 Getting Mail
676
677 * Mail in a Newsreader::        Important introductory notes.
678 * Getting Started Reading Mail::  A simple cookbook example.
679 * Splitting Mail::              How to create mail groups.
680 * Mail Sources::                How to tell Gnus where to get mail from.
681 * Mail Back End Variables::     Variables for customizing mail handling.
682 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
683 * Group Mail Splitting::        Use group customize to drive mail splitting.
684 * Incorporating Old Mail::      What about the old mail you have?
685 * Expiring Mail::               Getting rid of unwanted mail.
686 * Washing Mail::                Removing gruft from the mail you get.
687 * Duplicates::                  Dealing with duplicated mail.
688 * Not Reading Mail::            Using mail back ends for reading other files.
689 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
690
691 Mail Sources
692
693 * Mail Source Specifiers::      How to specify what a mail source is.
694 * Mail Source Customization::   Some variables that influence things.
695 * Fetching Mail::               Using the mail source specifiers.
696
697 Choosing a Mail Back End
698
699 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
700 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
701 * Mail Spool::                  Store your mail in a private spool?
702 * MH Spool::                    An mhspool-like back end.
703 * Mail Folders::                Having one file for each group.
704 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
705
706 Browsing the Web
707
708 * Archiving Mail::              
709 * Web Searches::                Creating groups from articles that match a string.
710 * Slashdot::                    Reading the Slashdot comments.
711 * Ultimate::                    The Ultimate Bulletin Board systems.
712 * Web Archive::                 Reading mailing list archived on web.
713 * RSS::                         Reading RDF site summary.
714 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
715
716 @sc{imap}
717
718 * Splitting in IMAP::           Splitting mail with nnimap.
719 * Expiring in IMAP::            Expiring mail with nnimap.
720 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
721 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
722 * A note on namespaces::        How to (not) use IMAP namespace in Gnus.
723
724 Other Sources
725
726 * Directory Groups::            You can read a directory as if it was a newsgroup.
727 * Anything Groups::             Dired?  Who needs dired?
728 * Document Groups::             Single files can be the basis of a group.
729 * SOUP::                        Reading @sc{soup} packets ``offline''.
730 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
731
732 Document Groups
733
734 * Document Server Internals::   How to add your own document types.
735
736 SOUP
737
738 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
739 * SOUP Groups::                 A back end for reading @sc{soup} packets.
740 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
741
742 Combined Groups
743
744 * Virtual Groups::              Combining articles from many groups.
745 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
746
747 Gnus Unplugged
748
749 * Agent Basics::                How it all is supposed to work.
750 * Agent Categories::            How to tell the Gnus Agent what to download.
751 * Agent Commands::              New commands for all the buffers.
752 * Agent as Cache::              The Agent is a big cache too.
753 * Agent Expiry::                How to make old articles go away.
754 * Agent and IMAP::              How to use the Agent with IMAP.
755 * Outgoing Messages::           What happens when you post/mail something?
756 * Agent Variables::             Customizing is fun.
757 * Example Setup::               An example @file{.gnus.el} file for offline people.
758 * Batching Agents::             How to fetch news from a @code{cron} job.
759 * Agent Caveats::               What you think it'll do and what it does.
760
761 Agent Categories
762
763 * Category Syntax::             What a category looks like.
764 * Category Buffer::             A buffer for maintaining categories.
765 * Category Variables::          Customize'r'Us.
766
767 Agent Commands
768
769 * Group Agent Commands::        
770 * Summary Agent Commands::      
771 * Server Agent Commands::       
772
773 Scoring
774
775 * Summary Score Commands::      Adding score entries for the current group.
776 * Group Score Commands::        General score commands.
777 * Score Variables::             Customize your scoring.  (My, what terminology).
778 * Score File Format::           What a score file may contain.
779 * Score File Editing::          You can edit score files by hand as well.
780 * Adaptive Scoring::            Big Sister Gnus knows what you read.
781 * Home Score File::             How to say where new score entries are to go.
782 * Followups To Yourself::       Having Gnus notice when people answer you.
783 * Scoring On Other Headers::    Scoring on non-standard headers.
784 * Scoring Tips::                How to score effectively.
785 * Reverse Scoring::             That problem child of old is not problem.
786 * Global Score Files::          Earth-spanning, ear-splitting score files.
787 * Kill Files::                  They are still here, but they can be ignored.
788 * Converting Kill Files::       Translating kill files to score files.
789 * GroupLens::                   Getting predictions on what you like to read.
790 * Advanced Scoring::            Using logical expressions to build score rules.
791 * Score Decays::                It can be useful to let scores wither away.
792
793 GroupLens
794
795 * Using GroupLens::             How to make Gnus use GroupLens.
796 * Rating Articles::             Letting GroupLens know how you rate articles.
797 * Displaying Predictions::      Displaying predictions given by GroupLens.
798 * GroupLens Variables::         Customizing GroupLens.
799
800 Advanced Scoring
801
802 * Advanced Scoring Syntax::     A definition.
803 * Advanced Scoring Examples::   What they look like.
804 * Advanced Scoring Tips::       Getting the most out of it.
805
806 Various
807
808 * Process/Prefix::              A convention used by many treatment commands.
809 * Interactive::                 Making Gnus ask you many questions.
810 * Symbolic Prefixes::           How to supply some Gnus functions with options.
811 * Formatting Variables::        You can specify what buffers should look like.
812 * Window Layout::               Configuring the Gnus buffer windows.
813 * Faces and Fonts::             How to change how faces look.
814 * Compilation::                 How to speed Gnus up.
815 * Mode Lines::                  Displaying information in the mode lines.
816 * Highlighting and Menus::      Making buffers look all nice and cozy.
817 * Buttons::                     Get tendinitis in ten easy steps!
818 * Daemons::                     Gnus can do things behind your back.
819 * NoCeM::                       How to avoid spam and other fatty foods.
820 * Undo::                        Some actions can be undone.
821 * Predicate Specifiers::        Specifying predicates.
822 * Moderation::                  What to do if you're a moderator.
823 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
824 * Fuzzy Matching::              What's the big fuzz?
825 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
826 * Various Various::             Things that are really various.
827
828 Formatting Variables
829
830 * Formatting Basics::           A formatting variable is basically a format string.
831 * Mode Line Formatting::        Some rules about mode line formatting variables.
832 * Advanced Formatting::         Modifying output in various ways.
833 * User-Defined Specs::          Having Gnus call your own functions.
834 * Formatting Fonts::            Making the formatting look colorful and nice.
835 * Positioning Point::           Moving point to a position after an operation.
836 * Tabulation::                  Tabulating your output.
837 * Wide Characters::             Dealing with wide characters.
838
839 Image Enhancements
840
841 * Picons::                      How to display pictures of what you're reading.
842 * Smileys::                     Show all those happy faces the way they were meant to be shown.
843 * X-Face::                      Display a funky, teensy black-and-white image.
844 * Toolbar::                     Click'n'drool.
845 * XVarious::                    Other XEmacsy Gnusey variables.
846
847 Picons
848
849 * Picon Basics::                What are picons and How do I get them.
850 * Picon Requirements::          Don't go further if you aren't using XEmacs.
851 * Easy Picons::                 Displaying Picons---the easy way.
852 * Hard Picons::                 The way you should do it.  You'll learn something.
853 * Picon Useless Configuration::  Other variables you can trash/tweak/munge/play with.
854
855 Thwarting Email Spam
856
857 * The problem of spam::         Some background, and some solutions
858 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
859 * SpamAssassin::                How to use external anti-spam tools.
860 * Hashcash::                    Reduce spam by burning CPU time.
861 * Filtering Spam Using spam.el::  
862 * Filtering Spam Using Statistics (spam-stat.el)::  
863
864 Appendices
865
866 * XEmacs::                      Requirements for installing under XEmacs.
867 * History::                     How Gnus got where it is today.
868 * On Writing Manuals::          Why this is not a beginner's guide.
869 * Terminology::                 We use really difficult, like, words here.
870 * Customization::               Tailoring Gnus to your needs.
871 * Troubleshooting::             What you might try if things do not work.
872 * Gnus Reference Guide::        Rilly, rilly technical stuff.
873 * Emacs for Heathens::          A short introduction to Emacsian terms.
874 * Frequently Asked Questions::
875
876 History
877
878 * Gnus Versions::               What Gnus versions have been released.
879 * Other Gnus Versions::         Other Gnus versions that also have been released.
880 * Why?::                        What's the point of Gnus?
881 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
882 * Conformity::                  Gnus tries to conform to all standards.
883 * Emacsen::                     Gnus can be run on a few modern Emacsen.
884 * Gnus Development::            How Gnus is developed.
885 * Contributors::                Oodles of people.
886 * New Features::                Pointers to some of the new stuff in Gnus.
887
888 New Features
889
890 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
891 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
892 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
893 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
894 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
895
896 Customization
897
898 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
899 * Slow Terminal Connection::    You run a remote Emacs.
900 * Little Disk Space::           You feel that having large setup files is icky.
901 * Slow Machine::                You feel like buying a faster machine.
902
903 Gnus Reference Guide
904
905 * Gnus Utility Functions::      Common functions and variable to use.
906 * Back End Interface::          How Gnus communicates with the servers.
907 * Score File Syntax::           A BNF definition of the score file standard.
908 * Headers::                     How Gnus stores headers internally.
909 * Ranges::                      A handy format for storing mucho numbers.
910 * Group Info::                  The group info format.
911 * Extended Interactive::        Symbolic prefixes and stuff.
912 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
913 * Various File Formats::        Formats of files that Gnus use.
914
915 Back End Interface
916
917 * Required Back End Functions::  Functions that must be implemented.
918 * Optional Back End Functions::  Functions that need not be implemented.
919 * Error Messaging::             How to get messages and report errors.
920 * Writing New Back Ends::       Extending old back ends.
921 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
922 * Mail-like Back Ends::         Some tips on mail back ends.
923
924 Various File Formats
925
926 * Active File Format::          Information on articles and groups available.
927 * Newsgroups File Format::      Group descriptions.
928
929 Emacs for Heathens
930
931 * Keystrokes::                  Entering text and executing commands.
932 * Emacs Lisp::                  The built-in Emacs programming language.
933
934 @end detailmenu
935 @end menu
936
937 @node Starting Up
938 @chapter Starting Gnus
939 @cindex starting up
940
941 @kindex M-x gnus
942 @findex gnus
943 If your system administrator has set things up properly, starting Gnus
944 and reading news is extremely easy---you just type @kbd{M-x gnus} in
945 your Emacs.
946
947 @findex gnus-other-frame
948 @kindex M-x gnus-other-frame
949 If you want to start Gnus in a different frame, you can use the command
950 @kbd{M-x gnus-other-frame} instead.
951
952 If things do not go smoothly at startup, you have to twiddle some
953 variables in your @file{~/.gnus} file.  This file is similar to
954 @file{~/.emacs}, but is read when gnus starts.
955
956 If you puzzle at any terms used in this manual, please refer to the
957 terminology section (@pxref{Terminology}).
958
959 @menu
960 * Finding the News::            Choosing a method for getting news.
961 * The First Time::              What does Gnus do the first time you start it?
962 * The Server is Down::          How can I read my mail then?
963 * Slave Gnusae::                You can have more than one Gnus active at a time.
964 * Fetching a Group::            Starting Gnus just to read a group.
965 * New Groups::                  What is Gnus supposed to do with new groups?
966 * Changing Servers::            You may want to move from one server to another.
967 * Startup Files::               Those pesky startup files---@file{.newsrc}.
968 * Auto Save::                   Recovering from a crash.
969 * The Active File::             Reading the active file over a slow line Takes Time.
970 * Startup Variables::           Other variables you might change.
971 @end menu
972
973
974 @node Finding the News
975 @section Finding the News
976 @cindex finding news
977
978 @vindex gnus-select-method
979 @c @head
980 The @code{gnus-select-method} variable says where Gnus should look for
981 news.  This variable should be a list where the first element says
982 @dfn{how} and the second element says @dfn{where}.  This method is your
983 native method.  All groups not fetched with this method are
984 foreign groups.
985
986 For instance, if the @samp{news.somewhere.edu} @sc{nntp} server is where
987 you want to get your daily dosage of news from, you'd say:
988
989 @lisp
990 (setq gnus-select-method '(nntp "news.somewhere.edu"))
991 @end lisp
992
993 If you want to read directly from the local spool, say:
994
995 @lisp
996 (setq gnus-select-method '(nnspool ""))
997 @end lisp
998
999 If you can use a local spool, you probably should, as it will almost
1000 certainly be much faster.  But do not use the local spool if your
1001 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1002
1003 @vindex gnus-nntpserver-file
1004 @cindex NNTPSERVER
1005 @cindex @sc{nntp} server
1006 If this variable is not set, Gnus will take a look at the
1007 @code{NNTPSERVER} environment variable.  If that variable isn't set,
1008 Gnus will see whether @code{gnus-nntpserver-file}
1009 (@file{/etc/nntpserver} by default) has any opinions on the matter.  If
1010 that fails as well, Gnus will try to use the machine running Emacs as an @sc{nntp} server.  That's a long shot, though.
1011
1012 @vindex gnus-nntp-server
1013 If @code{gnus-nntp-server} is set, this variable will override
1014 @code{gnus-select-method}.  You should therefore set
1015 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1016
1017 @vindex gnus-secondary-servers
1018 @vindex gnus-nntp-server
1019 You can also make Gnus prompt you interactively for the name of an
1020 @sc{nntp} server.  If you give a non-numerical prefix to @code{gnus}
1021 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1022 in the @code{gnus-secondary-servers} list (if any).  You can also just
1023 type in the name of any server you feel like visiting.  (Note that this
1024 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1025 gnus} later in the same Emacs session, Gnus will contact the same
1026 server.)
1027
1028 @findex gnus-group-browse-foreign-server
1029 @kindex B (Group)
1030 However, if you use one @sc{nntp} server regularly and are just
1031 interested in a couple of groups from a different server, you would be
1032 better served by using the @kbd{B} command in the group buffer.  It will
1033 let you have a look at what groups are available, and you can subscribe
1034 to any of the groups you want to.  This also makes @file{.newsrc}
1035 maintenance much tidier.  @xref{Foreign Groups}.
1036
1037 @vindex gnus-secondary-select-methods
1038 @c @head
1039 A slightly different approach to foreign groups is to set the
1040 @code{gnus-secondary-select-methods} variable.  The select methods
1041 listed in this variable are in many ways just as native as the
1042 @code{gnus-select-method} server.  They will also be queried for active
1043 files during startup (if that's required), and new newsgroups that
1044 appear on these servers will be subscribed (or not) just as native
1045 groups are.
1046
1047 For instance, if you use the @code{nnmbox} back end to read your mail,
1048 you would typically set this variable to
1049
1050 @lisp
1051 (setq gnus-secondary-select-methods '((nnmbox "")))
1052 @end lisp
1053
1054
1055 @node The First Time
1056 @section The First Time
1057 @cindex first time usage
1058
1059 If no startup files exist, Gnus will try to determine what groups should
1060 be subscribed by default.
1061
1062 @vindex gnus-default-subscribed-newsgroups
1063 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1064 will subscribe you to just those groups in that list, leaving the rest
1065 killed.  Your system administrator should have set this variable to
1066 something useful.
1067
1068 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1069 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1070 here as @dfn{whatever Lars thinks you should read}.)
1071
1072 You'll also be subscribed to the Gnus documentation group, which should
1073 help you with most common problems.
1074
1075 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1076 use the normal functions for handling new groups, and not do anything
1077 special.
1078
1079
1080 @node The Server is Down
1081 @section The Server is Down
1082 @cindex server errors
1083
1084 If the default server is down, Gnus will understandably have some
1085 problems starting.  However, if you have some mail groups in addition to
1086 the news groups, you may want to start Gnus anyway.
1087
1088 Gnus, being the trusting sort of program, will ask whether to proceed
1089 without a native select method if that server can't be contacted.  This
1090 will happen whether the server doesn't actually exist (i.e., you have
1091 given the wrong address) or the server has just momentarily taken ill
1092 for some reason or other.  If you decide to continue and have no foreign
1093 groups, you'll find it difficult to actually do anything in the group
1094 buffer.  But, hey, that's your problem.  Blllrph!
1095
1096 @findex gnus-no-server
1097 @kindex M-x gnus-no-server
1098 @c @head
1099 If you know that the server is definitely down, or you just want to read
1100 your mail without bothering with the server at all, you can use the
1101 @code{gnus-no-server} command to start Gnus.  That might come in handy
1102 if you're in a hurry as well.  This command will not attempt to contact
1103 your primary server---instead, it will just activate all groups on level
1104 1 and 2.  (You should preferably keep no native groups on those two
1105 levels.) Also @pxref{Group Levels}.
1106
1107
1108 @node Slave Gnusae
1109 @section Slave Gnusae
1110 @cindex slave
1111
1112 You might want to run more than one Emacs with more than one Gnus at the
1113 same time.  If you are using different @file{.newsrc} files (e.g., if you
1114 are using the two different Gnusae to read from two different servers),
1115 that is no problem whatsoever.  You just do it.
1116
1117 The problem appears when you want to run two Gnusae that use the same
1118 @code{.newsrc} file.
1119
1120 To work around that problem some, we here at the Think-Tank at the Gnus
1121 Towers have come up with a new concept: @dfn{Masters} and
1122 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1123 taken out a copyright on those words.  If you wish to use those words in
1124 conjunction with each other, you have to send $1 per usage instance to
1125 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1126 Applications}) will be much more expensive, of course.)
1127
1128 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1129 however you do it).  Each subsequent slave Gnusae should be started with
1130 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1131 files, but instead save @dfn{slave files} that contain information only
1132 on what groups have been read in the slave session.  When a master Gnus
1133 starts, it will read (and delete) these slave files, incorporating all
1134 information from them.  (The slave files will be read in the sequence
1135 they were created, so the latest changes will have precedence.)
1136
1137 Information from the slave files has, of course, precedence over the
1138 information in the normal (i.e., master) @code{.newsrc} file.
1139
1140 If the @code{.newsrc*} files have not been saved in the master when the
1141 slave starts, you may be prompted as to whether to read an auto-save
1142 file.  If you answer "yes", the unsaved changes to the master will be
1143 incorporated into the slave.  If you answer "no", the slave may see some
1144 messages as unread that have been read in the master.
1145
1146 @node Fetching a Group
1147 @section Fetching a Group
1148 @cindex fetching a group
1149
1150 @findex gnus-fetch-group
1151 It is sometimes convenient to be able to just say ``I want to read this
1152 group and I don't care whether Gnus has been started or not''.  This is
1153 perhaps more useful for people who write code than for users, but the
1154 command @code{gnus-fetch-group} provides this functionality in any case.
1155 It takes the group name as a parameter.
1156
1157
1158 @node New Groups
1159 @section New Groups
1160 @cindex new groups
1161 @cindex subscription
1162
1163 @vindex gnus-check-new-newsgroups
1164 If you are satisfied that you really never want to see any new groups,
1165 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1166 also save you some time at startup.  Even if this variable is
1167 @code{nil}, you can always subscribe to the new groups just by pressing
1168 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1169 is @code{ask-server} by default.  If you set this variable to
1170 @code{always}, then Gnus will query the back ends for new groups even
1171 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1172
1173 @menu
1174 * Checking New Groups::         Determining what groups are new.
1175 * Subscription Methods::        What Gnus should do with new groups.
1176 * Filtering New Groups::        Making Gnus ignore certain new groups.
1177 @end menu
1178
1179
1180 @node Checking New Groups
1181 @subsection Checking New Groups
1182
1183 Gnus normally determines whether a group is new or not by comparing the
1184 list of groups from the active file(s) with the lists of subscribed and
1185 dead groups.  This isn't a particularly fast method.  If
1186 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1187 server for new groups since the last time.  This is both faster and
1188 cheaper.  This also means that you can get rid of the list of killed
1189 groups altogether, so you may set @code{gnus-save-killed-list} to
1190 @code{nil}, which will save time both at startup, at exit, and all over.
1191 Saves disk space, too.  Why isn't this the default, then?
1192 Unfortunately, not all servers support this command.
1193
1194 I bet I know what you're thinking now: How do I find out whether my
1195 server supports @code{ask-server}?  No?  Good, because I don't have a
1196 fail-safe answer.  I would suggest just setting this variable to
1197 @code{ask-server} and see whether any new groups appear within the next
1198 few days.  If any do, then it works.  If none do, then it doesn't
1199 work.  I could write a function to make Gnus guess whether the server
1200 supports @code{ask-server}, but it would just be a guess.  So I won't.
1201 You could @code{telnet} to the server and say @code{HELP} and see
1202 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1203 it does, then it might work.  (But there are servers that lists
1204 @samp{NEWGROUPS} without supporting the function properly.)
1205
1206 This variable can also be a list of select methods.  If so, Gnus will
1207 issue an @code{ask-server} command to each of the select methods, and
1208 subscribe them (or not) using the normal methods.  This might be handy
1209 if you are monitoring a few servers for new groups.  A side effect is
1210 that startup will take much longer, so you can meditate while waiting.
1211 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1212
1213
1214 @node Subscription Methods
1215 @subsection Subscription Methods
1216
1217 @vindex gnus-subscribe-newsgroup-method
1218 What Gnus does when it encounters a new group is determined by the
1219 @code{gnus-subscribe-newsgroup-method} variable.
1220
1221 This variable should contain a function.  This function will be called
1222 with the name of the new group as the only parameter.
1223
1224 Some handy pre-fab functions are:
1225
1226 @table @code
1227
1228 @item gnus-subscribe-zombies
1229 @vindex gnus-subscribe-zombies
1230 Make all new groups zombies.  This is the default.  You can browse the
1231 zombies later (with @kbd{A z}) and either kill them all off properly
1232 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1233
1234 @item gnus-subscribe-randomly
1235 @vindex gnus-subscribe-randomly
1236 Subscribe all new groups in arbitrary order.  This really means that all
1237 new groups will be added at ``the top'' of the group buffer.
1238
1239 @item gnus-subscribe-alphabetically
1240 @vindex gnus-subscribe-alphabetically
1241 Subscribe all new groups in alphabetical order.
1242
1243 @item gnus-subscribe-hierarchically
1244 @vindex gnus-subscribe-hierarchically
1245 Subscribe all new groups hierarchically.  The difference between this
1246 function and @code{gnus-subscribe-alphabetically} is slight.
1247 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1248 alphabetical fashion, while this function will enter groups into its
1249 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1250 @samp{comp} hierarchy, this function will not mess that configuration
1251 up.  Or something like that.
1252
1253 @item gnus-subscribe-interactively
1254 @vindex gnus-subscribe-interactively
1255 Subscribe new groups interactively.  This means that Gnus will ask
1256 you about @strong{all} new groups.  The groups you choose to subscribe
1257 to will be subscribed hierarchically.
1258
1259 @item gnus-subscribe-killed
1260 @vindex gnus-subscribe-killed
1261 Kill all new groups.
1262
1263 @item gnus-subscribe-topics
1264 @vindex gnus-subscribe-topics
1265 Put the groups into the topic that has a matching @code{subscribe} topic
1266 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1267 topic parameter that looks like
1268
1269 @example
1270 "nnslashdot"
1271 @end example
1272
1273 will mean that all groups that match that regex will be subscribed under
1274 that topic.
1275
1276 If no topics match the groups, the groups will be subscribed in the
1277 top-level topic.
1278
1279 @end table
1280
1281 @vindex gnus-subscribe-hierarchical-interactive
1282 A closely related variable is
1283 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1284 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1285 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1286 will ask you for each sub-hierarchy whether you want to descend the
1287 hierarchy or not.
1288
1289 One common mistake is to set the variable a few paragraphs above
1290 (@code{gnus-subscribe-newsgroup-method}) to
1291 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1292 will not work.  This is ga-ga.  So don't do it.
1293
1294
1295 @node Filtering New Groups
1296 @subsection Filtering New Groups
1297
1298 A nice and portable way to control which new newsgroups should be
1299 subscribed (or ignored) is to put an @dfn{options} line at the start of
1300 the @file{.newsrc} file.  Here's an example:
1301
1302 @example
1303 options -n !alt.all !rec.all sci.all
1304 @end example
1305
1306 @vindex gnus-subscribe-options-newsgroup-method
1307 This line obviously belongs to a serious-minded intellectual scientific
1308 person (or she may just be plain old boring), because it says that all
1309 groups that have names beginning with @samp{alt} and @samp{rec} should
1310 be ignored, and all groups with names beginning with @samp{sci} should
1311 be subscribed.  Gnus will not use the normal subscription method for
1312 subscribing these groups.
1313 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1314 variable defaults to @code{gnus-subscribe-alphabetically}.
1315
1316 @vindex gnus-options-not-subscribe
1317 @vindex gnus-options-subscribe
1318 If you don't want to mess with your @file{.newsrc} file, you can just
1319 set the two variables @code{gnus-options-subscribe} and
1320 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1321 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1322 and if the new group matches the former, it will be unconditionally
1323 subscribed, and if it matches the latter, it will be ignored.
1324
1325 @vindex gnus-auto-subscribed-groups
1326 Yet another variable that meddles here is
1327 @code{gnus-auto-subscribed-groups}.  It works exactly like
1328 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1329 thought it would be nice to have two of these.  This variable is more
1330 meant for setting some ground rules, while the other variable is used
1331 more for user fiddling.  By default this variable makes all new groups
1332 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1333 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1334 subscribed.  If you don't like that, just set this variable to
1335 @code{nil}.
1336
1337 New groups that match this regexp are subscribed using
1338 @code{gnus-subscribe-options-newsgroup-method}.
1339
1340
1341 @node Changing Servers
1342 @section Changing Servers
1343 @cindex changing servers
1344
1345 Sometimes it is necessary to move from one @sc{nntp} server to another.
1346 This happens very rarely, but perhaps you change jobs, or one server is
1347 very flaky and you want to use another.
1348
1349 Changing the server is pretty easy, right?  You just change
1350 @code{gnus-select-method} to point to the new server?
1351
1352 @emph{Wrong!}
1353
1354 Article numbers are not (in any way) kept synchronized between different
1355 @sc{nntp} servers, and the only way Gnus keeps track of what articles
1356 you have read is by keeping track of article numbers.  So when you
1357 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1358 worthless.
1359
1360 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1361 file from one server to another.  They all have one thing in
1362 common---they take a looong time to run.  You don't want to use these
1363 functions more than absolutely necessary.
1364
1365 @kindex M-x gnus-change-server
1366 @findex gnus-change-server
1367 If you have access to both servers, Gnus can request the headers for all
1368 the articles you have read and compare @code{Message-ID}s and map the
1369 article numbers of the read articles and article marks.  The @kbd{M-x
1370 gnus-change-server} command will do this for all your native groups.  It
1371 will prompt for the method you want to move to.
1372
1373 @kindex M-x gnus-group-move-group-to-server
1374 @findex gnus-group-move-group-to-server
1375 You can also move individual groups with the @kbd{M-x
1376 gnus-group-move-group-to-server} command.  This is useful if you want to
1377 move a (foreign) group from one server to another.
1378
1379 @kindex M-x gnus-group-clear-data-on-native-groups
1380 @findex gnus-group-clear-data-on-native-groups
1381 If you don't have access to both the old and new server, all your marks
1382 and read ranges have become worthless.  You can use the @kbd{M-x
1383 gnus-group-clear-data-on-native-groups} command to clear out all data
1384 that you have on your native groups.  Use with caution.
1385
1386 @kindex M-x gnus-group-clear-data
1387 @findex gnus-group-clear-data
1388 Clear the data from the current group only---nix out marks and the
1389 list of read articles (@code{gnus-group-clear-data}).
1390
1391 After changing servers, you @strong{must} move the cache hierarchy away,
1392 since the cached articles will have wrong article numbers, which will
1393 affect which articles Gnus thinks are read.
1394 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1395 to have it done automatically; for @code{gnus-group-clear-data}, you
1396 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1397 cache for all groups).
1398
1399
1400 @node Startup Files
1401 @section Startup Files
1402 @cindex startup files
1403 @cindex .newsrc
1404 @cindex .newsrc.el
1405 @cindex .newsrc.eld
1406
1407 Now, you all know about the @file{.newsrc} file.  All subscription
1408 information is traditionally stored in this file.
1409
1410 Things got a bit more complicated with @sc{gnus}.  In addition to
1411 keeping the @file{.newsrc} file updated, it also used a file called
1412 @file{.newsrc.el} for storing all the information that didn't fit into
1413 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1414 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1415 files was the most recently saved, which enabled people to swap between
1416 @sc{gnus} and other newsreaders.
1417
1418 That was kinda silly, so Gnus went one better: In addition to the
1419 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1420 @file{.newsrc.eld}.  It will read whichever of these files that are most
1421 recent, but it will never write a @file{.newsrc.el} file.  You should
1422 never delete the @file{.newsrc.eld} file---it contains much information
1423 not stored in the @file{.newsrc} file.
1424
1425 @vindex gnus-save-newsrc-file
1426 @vindex gnus-read-newsrc-file
1427 You can turn off writing the @file{.newsrc} file by setting
1428 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1429 the file and save some space, as well as exiting from Gnus faster.
1430 However, this will make it impossible to use other newsreaders than
1431 Gnus.  But hey, who would want to, right?  Similarly, setting
1432 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1433 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1434 convenient if you have a tendency to use Netscape once in a while.
1435
1436 @vindex gnus-save-killed-list
1437 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1438 will not save the list of killed groups to the startup file.  This will
1439 save both time (when starting and quitting) and space (on disk).  It
1440 will also mean that Gnus has no record of what groups are new or old,
1441 so the automatic new groups subscription methods become meaningless.
1442 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1443 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1444 Groups}).  This variable can also be a regular expression.  If that's
1445 the case, remove all groups that do not match this regexp before
1446 saving.  This can be useful in certain obscure situations that involve
1447 several servers where not all servers support @code{ask-server}.
1448
1449 @vindex gnus-startup-file
1450 The @code{gnus-startup-file} variable says where the startup files are.
1451 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1452 file being whatever that one is, with a @samp{.eld} appended.
1453
1454 @vindex gnus-save-newsrc-hook
1455 @vindex gnus-save-quick-newsrc-hook
1456 @vindex gnus-save-standard-newsrc-hook
1457 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1458 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1459 saving the @file{.newsrc.eld} file, and
1460 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1461 @file{.newsrc} file.  The latter two are commonly used to turn version
1462 control on or off.  Version control is on by default when saving the
1463 startup files.  If you want to turn backup creation off, say something like:
1464
1465 @lisp
1466 (defun turn-off-backup ()
1467   (set (make-local-variable 'backup-inhibited) t))
1468
1469 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1470 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1471 @end lisp
1472
1473 @vindex gnus-init-file
1474 When Gnus starts, it will read the @code{gnus-site-init-file}
1475 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1476 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1477 and can be used to avoid cluttering your @file{~/.emacs} and
1478 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1479 with the same names as these, but with @file{.elc} and @file{.el}
1480 suffixes.  In other words, if you have set @code{gnus-init-file} to
1481 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1482 and finally @file{~/.gnus} (in this order).
1483
1484
1485
1486 @node Auto Save
1487 @section Auto Save
1488 @cindex dribble file
1489 @cindex auto-save
1490
1491 Whenever you do something that changes the Gnus data (reading articles,
1492 catching up, killing/subscribing groups), the change is added to a
1493 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1494 Emacs way.  If your Emacs should crash before you have saved the
1495 @file{.newsrc} files, all changes you have made can be recovered from
1496 this file.
1497
1498 If Gnus detects this file at startup, it will ask the user whether to
1499 read it.  The auto save file is deleted whenever the real startup file is
1500 saved.
1501
1502 @vindex gnus-use-dribble-file
1503 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1504 maintain a dribble buffer.  The default is @code{t}.
1505
1506 @vindex gnus-dribble-directory
1507 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1508 this variable is @code{nil}, which it is by default, Gnus will dribble
1509 into the directory where the @file{.newsrc} file is located.  (This is
1510 normally the user's home directory.)  The dribble file will get the same
1511 file permissions as the @code{.newsrc} file.
1512
1513 @vindex gnus-always-read-dribble-file
1514 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1515 read the dribble file on startup without querying the user.
1516
1517
1518 @node The Active File
1519 @section The Active File
1520 @cindex active file
1521 @cindex ignored groups
1522
1523 When Gnus starts, or indeed whenever it tries to determine whether new
1524 articles have arrived, it reads the active file.  This is a very large
1525 file that lists all the active groups and articles on the server.
1526
1527 @vindex gnus-ignored-newsgroups
1528 Before examining the active file, Gnus deletes all lines that match the
1529 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1530 any groups with bogus names, but you can use this variable to make Gnus
1531 ignore hierarchies you aren't ever interested in.  However, this is not
1532 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1533 Groups} for an overview of other variables that can be used instead.
1534
1535 @c This variable is
1536 @c @code{nil} by default, and will slow down active file handling somewhat
1537 @c if you set it to anything else.
1538
1539 @vindex gnus-read-active-file
1540 @c @head
1541 The active file can be rather Huge, so if you have a slow network, you
1542 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1543 reading the active file.  This variable is @code{some} by default.
1544
1545 Gnus will try to make do by getting information just on the groups that
1546 you actually subscribe to.
1547
1548 Note that if you subscribe to lots and lots of groups, setting this
1549 variable to @code{nil} will probably make Gnus slower, not faster.  At
1550 present, having this variable @code{nil} will slow Gnus down
1551 considerably, unless you read news over a 2400 baud modem.
1552
1553 This variable can also have the value @code{some}.  Gnus will then
1554 attempt to read active info only on the subscribed groups.  On some
1555 servers this is quite fast (on sparkling, brand new INN servers that
1556 support the @code{LIST ACTIVE group} command), on others this isn't fast
1557 at all.  In any case, @code{some} should be faster than @code{nil}, and
1558 is certainly faster than @code{t} over slow lines.
1559
1560 Some news servers (old versions of Leafnode and old versions of INN, for
1561 instance) do not support the @code{LIST ACTIVE group}.  For these
1562 servers, @code{nil} is probably the most efficient value for this
1563 variable.
1564
1565 If this variable is @code{nil}, Gnus will ask for group info in total
1566 lock-step, which isn't very fast.  If it is @code{some} and you use an
1567 @sc{nntp} server, Gnus will pump out commands as fast as it can, and
1568 read all the replies in one swoop.  This will normally result in better
1569 performance, but if the server does not support the aforementioned
1570 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1571
1572 If you think that starting up Gnus takes too long, try all the three
1573 different values for this variable and see what works best for you.
1574
1575 In any case, if you use @code{some} or @code{nil}, you should definitely
1576 kill all groups that you aren't interested in to speed things up.
1577
1578 Note that this variable also affects active file retrieval from
1579 secondary select methods.
1580
1581
1582 @node Startup Variables
1583 @section Startup Variables
1584
1585 @table @code
1586
1587 @item gnus-load-hook
1588 @vindex gnus-load-hook
1589 A hook run while Gnus is being loaded.  Note that this hook will
1590 normally be run just once in each Emacs session, no matter how many
1591 times you start Gnus.
1592
1593 @item gnus-before-startup-hook
1594 @vindex gnus-before-startup-hook
1595 A hook run after starting up Gnus successfully.
1596
1597 @item gnus-startup-hook
1598 @vindex gnus-startup-hook
1599 A hook run as the very last thing after starting up Gnus
1600
1601 @item gnus-started-hook
1602 @vindex gnus-started-hook
1603 A hook that is run as the very last thing after starting up Gnus
1604 successfully.
1605
1606 @item gnus-setup-news-hook
1607 @vindex gnus-setup-news-hook
1608 A hook that is run after reading the @file{.newsrc} file(s), but before
1609 generating the group buffer.
1610
1611 @item gnus-check-bogus-newsgroups
1612 @vindex gnus-check-bogus-newsgroups
1613 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1614 startup.  A @dfn{bogus group} is a group that you have in your
1615 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1616 bogus groups can take quite a while, so to save time and resources it's
1617 best to leave this option off, and do the checking for bogus groups once
1618 in a while from the group buffer instead (@pxref{Group Maintenance}).
1619
1620 @item gnus-inhibit-startup-message
1621 @vindex gnus-inhibit-startup-message
1622 If non-@code{nil}, the startup message won't be displayed.  That way,
1623 your boss might not notice as easily that you are reading news instead
1624 of doing your job.  Note that this variable is used before
1625 @file{.gnus.el} is loaded, so it should be set in @code{.emacs} instead.
1626
1627 @item gnus-no-groups-message
1628 @vindex gnus-no-groups-message
1629 Message displayed by Gnus when no groups are available.
1630
1631 @item gnus-play-startup-jingle
1632 @vindex gnus-play-startup-jingle
1633 If non-@code{nil}, play the Gnus jingle at startup.
1634
1635 @item gnus-startup-jingle
1636 @vindex gnus-startup-jingle
1637 Jingle to be played if the above variable is non-@code{nil}.  The
1638 default is @samp{Tuxedomoon.Jingle4.au}.
1639
1640 @end table
1641
1642
1643 @node Group Buffer
1644 @chapter Group Buffer
1645 @cindex group buffer
1646
1647 @c Alex Schroeder suggests to rearrange this as follows:
1648 @c
1649 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1650 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1651 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1652 @c   7. Group Score, 8. Group Buffer Format
1653 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1654 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1655 @c <kensanata> First, "Gnus considers groups... (default 9)."
1656 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1657 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1658 @c <kensanata> Then expand the next paragraph or add some more to it.
1659 @c    This short one sentence explains levels 1 and 2, therefore I understand
1660 @c    that I should keep important news at 3 and boring news at 4.
1661 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1662 @c    Maybe keep those that you don't want to read temporarily at 6,
1663 @c    those that you never want to read at 8, those that offend your
1664 @c    human rights at 9...
1665
1666
1667 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1668 is the first buffer shown when Gnus starts, and will never be killed as
1669 long as Gnus is active.
1670
1671 @iftex
1672 @iflatex
1673 \gnusfigure{The Group Buffer}{320}{
1674 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1675 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1676 \put(120,38){\vector(1,2){10}}
1677 \put(40,60){\makebox(0,0)[r]{Mode line}}
1678 \put(40,58){\vector(1,0){30}}
1679 \put(200,28){\makebox(0,0)[t]{Native select method}}
1680 \put(200,26){\vector(-1,2){15}}
1681 }
1682 @end iflatex
1683 @end iftex
1684
1685 @menu
1686 * Group Buffer Format::         Information listed and how you can change it.
1687 * Group Maneuvering::           Commands for moving in the group buffer.
1688 * Selecting a Group::           Actually reading news.
1689 * Subscription Commands::       Unsubscribing, killing, subscribing.
1690 * Group Data::                  Changing the info for a group.
1691 * Group Levels::                Levels? What are those, then?
1692 * Group Score::                 A mechanism for finding out what groups you like.
1693 * Marking Groups::              You can mark groups for later processing.
1694 * Foreign Groups::              Creating and editing groups.
1695 * Group Parameters::            Each group may have different parameters set.
1696 * Listing Groups::              Gnus can list various subsets of the groups.
1697 * Sorting Groups::              Re-arrange the group order.
1698 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1699 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1700 * Exiting Gnus::                Stop reading news and get some work done.
1701 * Group Topics::                A folding group mode divided into topics.
1702 * Misc Group Stuff::            Other stuff that you can to do.
1703 @end menu
1704
1705
1706 @node Group Buffer Format
1707 @section Group Buffer Format
1708
1709 @menu
1710 * Group Line Specification::    Deciding how the group buffer is to look.
1711 * Group Modeline Specification::  The group buffer modeline.
1712 * Group Highlighting::          Having nice colors in the group buffer.
1713 @end menu
1714
1715
1716 @node Group Line Specification
1717 @subsection Group Line Specification
1718 @cindex group buffer format
1719
1720 The default format of the group buffer is nice and dull, but you can
1721 make it as exciting and ugly as you feel like.
1722
1723 Here's a couple of example group lines:
1724
1725 @example
1726      25: news.announce.newusers
1727  *    0: alt.fan.andrea-dworkin
1728 @end example
1729
1730 Quite simple, huh?
1731
1732 You can see that there are 25 unread articles in
1733 @samp{news.announce.newusers}.  There are no unread articles, but some
1734 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1735 asterisk at the beginning of the line?).
1736
1737 @vindex gnus-group-line-format
1738 You can change that format to whatever you want by fiddling with the
1739 @code{gnus-group-line-format} variable.  This variable works along the
1740 lines of a @code{format} specification, which is pretty much the same as
1741 a @code{printf} specifications, for those of you who use (feh!) C.
1742 @xref{Formatting Variables}.
1743
1744 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1745
1746 There should always be a colon on the line; the cursor always moves to
1747 the colon after performing an operation.  @xref{Positioning
1748 Point}. Nothing else is required---not even the group name.  All
1749 displayed text is just window dressing, and is never examined by Gnus.
1750 Gnus stores all real information it needs using text properties.
1751
1752 (Note that if you make a really strange, wonderful, spreadsheet-like
1753 layout, everybody will believe you are hard at work with the accounting
1754 instead of wasting time reading news.)
1755
1756 Here's a list of all available format characters:
1757
1758 @table @samp
1759
1760 @item M
1761 An asterisk if the group only has marked articles.
1762
1763 @item S
1764 Whether the group is subscribed.
1765
1766 @item L
1767 Level of subscribedness.
1768
1769 @item N
1770 Number of unread articles.
1771
1772 @item I
1773 Number of dormant articles.
1774
1775 @item T
1776 Number of ticked articles.
1777
1778 @item R
1779 Number of read articles.
1780
1781 @item t
1782 Estimated total number of articles.  (This is really @var{max-number}
1783 minus @var{min-number} plus 1.)
1784
1785 Gnus uses this estimation because the @sc{nntp} protocol provides
1786 efficient access to @var{max-number} and @var{min-number} but getting
1787 the true unread message count is not possible efficiently.  For
1788 hysterical raisins, even the mail back ends, where the true number of
1789 unread messages might be available efficiently, use the same limited
1790 interface.  To remove this restriction from Gnus means that the back
1791 end interface has to be changed, which is not an easy job.  If you
1792 want to work on this, please contact the Gnus mailing list.
1793
1794 @item y
1795 Number of unread, unticked, non-dormant articles.
1796
1797 @item i
1798 Number of ticked and dormant articles.
1799
1800 @item g
1801 Full group name.
1802
1803 @item G
1804 Group name.
1805
1806 @item C
1807 Group comment (@pxref{Group Parameters}) or group name if there is no
1808 comment element in the group parameters.
1809
1810 @item D
1811 Newsgroup description.
1812
1813 @item o
1814 @samp{m} if moderated.
1815
1816 @item O
1817 @samp{(m)} if moderated.
1818
1819 @item s
1820 Select method.
1821
1822 @item B
1823 If the summary buffer for the group is open or not.
1824
1825 @item n
1826 Select from where.
1827
1828 @item z
1829 A string that looks like @samp{<%s:%n>} if a foreign select method is
1830 used.
1831
1832 @item P
1833 Indentation based on the level of the topic (@pxref{Group Topics}).
1834
1835 @item c
1836 @vindex gnus-group-uncollapsed-levels
1837 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1838 variable says how many levels to leave at the end of the group name.
1839 The default is 1---this will mean that group names like
1840 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1841
1842 @item m
1843 @vindex gnus-new-mail-mark
1844 @cindex %
1845 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1846 the group lately.
1847
1848 @item p
1849 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1850
1851 @item d
1852 A string that says when you last read the group (@pxref{Group
1853 Timestamp}).
1854
1855 @item u
1856 User defined specifier.  The next character in the format string should
1857 be a letter.  Gnus will call the function
1858 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1859 following @samp{%u}.  The function will be passed a single dummy
1860 parameter as argument.  The function should return a string, which will
1861 be inserted into the buffer just like information from any other
1862 specifier.
1863 @end table
1864
1865 @cindex *
1866 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1867 if no info is available---for instance, if it is a non-activated foreign
1868 group, or a bogus native group.
1869
1870
1871 @node Group Modeline Specification
1872 @subsection Group Modeline Specification
1873 @cindex group modeline
1874
1875 @vindex gnus-group-mode-line-format
1876 The mode line can be changed by setting
1877 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1878 doesn't understand that many format specifiers:
1879
1880 @table @samp
1881 @item S
1882 The native news server.
1883 @item M
1884 The native select method.
1885 @end table
1886
1887
1888 @node Group Highlighting
1889 @subsection Group Highlighting
1890 @cindex highlighting
1891 @cindex group highlighting
1892
1893 @vindex gnus-group-highlight
1894 Highlighting in the group buffer is controlled by the
1895 @code{gnus-group-highlight} variable.  This is an alist with elements
1896 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1897 something non-@code{nil}, the @var{face} will be used on the line.
1898
1899 Here's an example value for this variable that might look nice if the
1900 background is dark:
1901
1902 @lisp
1903 (cond (window-system
1904        (setq custom-background-mode 'light)
1905        (defface my-group-face-1
1906          '((t (:foreground "Red" :bold t))) "First group face")
1907        (defface my-group-face-2
1908          '((t (:foreground "DarkSeaGreen4" :bold t))) "Second group face")
1909        (defface my-group-face-3
1910          '((t (:foreground "Green4" :bold t))) "Third group face")
1911        (defface my-group-face-4
1912          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1913        (defface my-group-face-5
1914          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1915
1916 (setq gnus-group-highlight
1917       '(((> unread 200) . my-group-face-1)
1918         ((and (< level 3) (zerop unread)) . my-group-face-2)
1919         ((< level 3) . my-group-face-3)
1920         ((zerop unread) . my-group-face-4)
1921         (t . my-group-face-5)))
1922 @end lisp
1923
1924 Also @pxref{Faces and Fonts}.
1925
1926 Variables that are dynamically bound when the forms are evaluated
1927 include:
1928
1929 @table @code
1930 @item group
1931 The group name.
1932 @item unread
1933 The number of unread articles in the group.
1934 @item method
1935 The select method.
1936 @item mailp
1937 Whether the group is a mail group.
1938 @item level
1939 The level of the group.
1940 @item score
1941 The score of the group.
1942 @item ticked
1943 The number of ticked articles in the group.
1944 @item total
1945 The total number of articles in the group.  Or rather, MAX-NUMBER minus
1946 MIN-NUMBER plus one.
1947 @item topic
1948 When using the topic minor mode, this variable is bound to the current
1949 topic being inserted.
1950 @end table
1951
1952 When the forms are @code{eval}ed, point is at the beginning of the line
1953 of the group in question, so you can use many of the normal Gnus
1954 functions for snarfing info on the group.
1955
1956 @vindex gnus-group-update-hook
1957 @findex gnus-group-highlight-line
1958 @code{gnus-group-update-hook} is called when a group line is changed.
1959 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1960 calls @code{gnus-group-highlight-line} by default.
1961
1962
1963 @node Group Maneuvering
1964 @section Group Maneuvering
1965 @cindex group movement
1966
1967 All movement commands understand the numeric prefix and will behave as
1968 expected, hopefully.
1969
1970 @table @kbd
1971
1972 @item n
1973 @kindex n (Group)
1974 @findex gnus-group-next-unread-group
1975 Go to the next group that has unread articles
1976 (@code{gnus-group-next-unread-group}).
1977
1978 @item p
1979 @itemx DEL
1980 @kindex DEL (Group)
1981 @kindex p (Group)
1982 @findex gnus-group-prev-unread-group
1983 Go to the previous group that has unread articles
1984 (@code{gnus-group-prev-unread-group}).
1985
1986 @item N
1987 @kindex N (Group)
1988 @findex gnus-group-next-group
1989 Go to the next group (@code{gnus-group-next-group}).
1990
1991 @item P
1992 @kindex P (Group)
1993 @findex gnus-group-prev-group
1994 Go to the previous group (@code{gnus-group-prev-group}).
1995
1996 @item M-n
1997 @kindex M-n (Group)
1998 @findex gnus-group-next-unread-group-same-level
1999 Go to the next unread group on the same (or lower) level
2000 (@code{gnus-group-next-unread-group-same-level}).
2001
2002 @item M-p
2003 @kindex M-p (Group)
2004 @findex gnus-group-prev-unread-group-same-level
2005 Go to the previous unread group on the same (or lower) level
2006 (@code{gnus-group-prev-unread-group-same-level}).
2007 @end table
2008
2009 Three commands for jumping to groups:
2010
2011 @table @kbd
2012
2013 @item j
2014 @kindex j (Group)
2015 @findex gnus-group-jump-to-group
2016 Jump to a group (and make it visible if it isn't already)
2017 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2018 like living groups.
2019
2020 @item ,
2021 @kindex , (Group)
2022 @findex gnus-group-best-unread-group
2023 Jump to the unread group with the lowest level
2024 (@code{gnus-group-best-unread-group}).
2025
2026 @item .
2027 @kindex . (Group)
2028 @findex gnus-group-first-unread-group
2029 Jump to the first group with unread articles
2030 (@code{gnus-group-first-unread-group}).
2031 @end table
2032
2033 @vindex gnus-group-goto-unread
2034 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2035 commands will move to the next group, not the next unread group.  Even
2036 the commands that say they move to the next unread group.  The default
2037 is @code{t}.
2038
2039
2040 @node Selecting a Group
2041 @section Selecting a Group
2042 @cindex group selection
2043
2044 @table @kbd
2045
2046 @item SPACE
2047 @kindex SPACE (Group)
2048 @findex gnus-group-read-group
2049 Select the current group, switch to the summary buffer and display the
2050 first unread article (@code{gnus-group-read-group}).  If there are no
2051 unread articles in the group, or if you give a non-numerical prefix to
2052 this command, Gnus will offer to fetch all the old articles in this
2053 group from the server.  If you give a numerical prefix @var{N}, @var{N}
2054 determines the number of articles Gnus will fetch.  If @var{N} is
2055 positive, Gnus fetches the @var{N} newest articles, if @var{N} is
2056 negative, Gnus fetches the @code{abs(@var{N})} oldest articles.
2057
2058 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2059 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2060 - 4 2 SPC} fetches the 42 oldest ones.
2061
2062 When you are in the group (in the Summary buffer), you can type
2063 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2064 ones.
2065
2066 @item RET
2067 @kindex RET (Group)
2068 @findex gnus-group-select-group
2069 Select the current group and switch to the summary buffer
2070 (@code{gnus-group-select-group}).  Takes the same arguments as
2071 @code{gnus-group-read-group}---the only difference is that this command
2072 does not display the first unread article automatically upon group
2073 entry.
2074
2075 @item M-RET
2076 @kindex M-RET (Group)
2077 @findex gnus-group-quick-select-group
2078 This does the same as the command above, but tries to do it with the
2079 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2080 scoring/killing will be performed, there will be no highlights and no
2081 expunging.  This might be useful if you're in a real hurry and have to
2082 enter some humongous group.  If you give a 0 prefix to this command
2083 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2084 which is useful if you want to toggle threading before generating the
2085 summary buffer (@pxref{Summary Generation Commands}).
2086
2087 @item M-SPACE
2088 @kindex M-SPACE (Group)
2089 @findex gnus-group-visible-select-group
2090 This is yet one more command that does the same as the @kbd{RET}
2091 command, but this one does it without expunging and hiding dormants
2092 (@code{gnus-group-visible-select-group}).
2093
2094 @item C-M-RET
2095 @kindex C-M-RET (Group)
2096 @findex gnus-group-select-group-ephemerally
2097 Finally, this command selects the current group ephemerally without
2098 doing any processing of its contents
2099 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2100 turned off.  Everything you do in the group after selecting it in this
2101 manner will have no permanent effects.
2102
2103 @end table
2104
2105 @vindex gnus-large-newsgroup
2106 The @code{gnus-large-newsgroup} variable says what Gnus should consider
2107 to be a big group.  This is 200 by default.  If the group has more
2108 (unread and/or ticked) articles than this, Gnus will query the user
2109 before entering the group.  The user can then specify how many articles
2110 should be fetched from the server.  If the user specifies a negative
2111 number (@code{-n}), the @code{n} oldest articles will be fetched.  If it
2112 is positive, the @code{n} articles that have arrived most recently will
2113 be fetched.
2114
2115 @vindex gnus-select-group-hook
2116 @vindex gnus-auto-select-first
2117 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2118 automatically when entering a group with the @kbd{SPACE} command.
2119 Which article this is is controlled by the
2120 @code{gnus-auto-select-subject} variable.  Valid values for this
2121 variable is:
2122
2123 @table @code
2124
2125 @item unread
2126 Place point on the subject line of the first unread article.
2127
2128 @item first
2129 Place point on the subject line of the first article.
2130
2131 @item unseen
2132 Place point on the subject line of the first unseen article.
2133
2134 @item unseen-or-unread
2135 Place point on the subject line of the first unseen article, and if
2136 there is no such article, place point on the subject line of the first
2137 unread article.
2138
2139 @item best
2140 Place point on the subject line of the highest-scored unread article.
2141
2142 @end table
2143
2144 This variable can also be a function.  In that case, that function
2145 will be called to place point on a subject line.
2146
2147 If you want to prevent automatic selection in some group (say, in a
2148 binary group with Huge articles) you can set the
2149 @code{gnus-auto-select-first} variable to @code{nil} in
2150 @code{gnus-select-group-hook}, which is called when a group is
2151 selected.
2152
2153
2154 @node Subscription Commands
2155 @section Subscription Commands
2156 @cindex subscription
2157
2158 @table @kbd
2159
2160 @item S t
2161 @itemx u
2162 @kindex S t (Group)
2163 @kindex u (Group)
2164 @findex gnus-group-unsubscribe-current-group
2165 @c @icon{gnus-group-unsubscribe}
2166 Toggle subscription to the current group
2167 (@code{gnus-group-unsubscribe-current-group}).
2168
2169 @item S s
2170 @itemx U
2171 @kindex S s (Group)
2172 @kindex U (Group)
2173 @findex gnus-group-unsubscribe-group
2174 Prompt for a group to subscribe, and then subscribe it.  If it was
2175 subscribed already, unsubscribe it instead
2176 (@code{gnus-group-unsubscribe-group}).
2177
2178 @item S k
2179 @itemx C-k
2180 @kindex S k (Group)
2181 @kindex C-k (Group)
2182 @findex gnus-group-kill-group
2183 @c @icon{gnus-group-kill-group}
2184 Kill the current group (@code{gnus-group-kill-group}).
2185
2186 @item S y
2187 @itemx C-y
2188 @kindex S y (Group)
2189 @kindex C-y (Group)
2190 @findex gnus-group-yank-group
2191 Yank the last killed group (@code{gnus-group-yank-group}).
2192
2193 @item C-x C-t
2194 @kindex C-x C-t (Group)
2195 @findex gnus-group-transpose-groups
2196 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2197 really a subscription command, but you can use it instead of a
2198 kill-and-yank sequence sometimes.
2199
2200 @item S w
2201 @itemx C-w
2202 @kindex S w (Group)
2203 @kindex C-w (Group)
2204 @findex gnus-group-kill-region
2205 Kill all groups in the region (@code{gnus-group-kill-region}).
2206
2207 @item S z
2208 @kindex S z (Group)
2209 @findex gnus-group-kill-all-zombies
2210 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2211
2212 @item S C-k
2213 @kindex S C-k (Group)
2214 @findex gnus-group-kill-level
2215 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2216 These groups can't be yanked back after killing, so this command should
2217 be used with some caution.  The only time where this command comes in
2218 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2219 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2220 kill off all unsubscribed groups that do not have message numbers in the
2221 @file{.newsrc} file.
2222
2223 @end table
2224
2225 Also @pxref{Group Levels}.
2226
2227
2228 @node Group Data
2229 @section Group Data
2230
2231 @table @kbd
2232
2233 @item c
2234 @kindex c (Group)
2235 @findex gnus-group-catchup-current
2236 @vindex gnus-group-catchup-group-hook
2237 @c @icon{gnus-group-catchup-current}
2238 Mark all unticked articles in this group as read
2239 (@code{gnus-group-catchup-current}).
2240 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2241 the group buffer.
2242
2243 @item C
2244 @kindex C (Group)
2245 @findex gnus-group-catchup-current-all
2246 Mark all articles in this group, even the ticked ones, as read
2247 (@code{gnus-group-catchup-current-all}).
2248
2249 @item M-c
2250 @kindex M-c (Group)
2251 @findex gnus-group-clear-data
2252 Clear the data from the current group---nix out marks and the list of
2253 read articles (@code{gnus-group-clear-data}).
2254
2255 @item M-x gnus-group-clear-data-on-native-groups
2256 @kindex M-x gnus-group-clear-data-on-native-groups
2257 @findex gnus-group-clear-data-on-native-groups
2258 If you have switched from one @sc{nntp} server to another, all your marks
2259 and read ranges have become worthless.  You can use this command to
2260 clear out all data that you have on your native groups.  Use with
2261 caution.
2262
2263 @end table
2264
2265
2266 @node Group Levels
2267 @section Group Levels
2268 @cindex group level
2269 @cindex level
2270
2271 All groups have a level of @dfn{subscribedness}.  For instance, if a
2272 group is on level 2, it is more subscribed than a group on level 5.  You
2273 can ask Gnus to just list groups on a given level or lower
2274 (@pxref{Listing Groups}), or to just check for new articles in groups on
2275 a given level or lower (@pxref{Scanning New Messages}).
2276
2277 Remember:  The higher the level of the group, the less important it is.
2278
2279 @table @kbd
2280
2281 @item S l
2282 @kindex S l (Group)
2283 @findex gnus-group-set-current-level
2284 Set the level of the current group.  If a numeric prefix is given, the
2285 next @var{n} groups will have their levels set.  The user will be
2286 prompted for a level.
2287 @end table
2288
2289 @vindex gnus-level-killed
2290 @vindex gnus-level-zombie
2291 @vindex gnus-level-unsubscribed
2292 @vindex gnus-level-subscribed
2293 Gnus considers groups from levels 1 to
2294 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2295 @code{gnus-level-subscribed} (exclusive) and
2296 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2297 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2298 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2299 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2300 same, but zombie and killed groups have no information on what articles
2301 you have read, etc, stored.  This distinction between dead and living
2302 groups isn't done because it is nice or clever, it is done purely for
2303 reasons of efficiency.
2304
2305 It is recommended that you keep all your mail groups (if any) on quite
2306 low levels (e.g. 1 or 2).
2307
2308 Maybe the following description of the default behavior of Gnus helps to
2309 understand what these levels are all about.  By default, Gnus shows you
2310 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2311 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2312 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2313 groups are hidden, in a way.
2314
2315 Zombie and killed groups are similar to unsubscribed groups in that they
2316 are hidden by default.  But they are different from subscribed and
2317 unsubscribed groups in that Gnus doesn't ask the news server for
2318 information (number of messages, number of unread messages) on zombie
2319 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2320 aren't interested in.  If most groups are killed, Gnus is faster.
2321
2322 Why does Gnus distinguish between zombie and killed groups?  Well, when
2323 a new group arrives on the server, Gnus by default makes it a zombie
2324 group.  This means that you are normally not bothered with new groups,
2325 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2326 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2327 list of killed groups.)
2328
2329 If you want to play with the level variables, you should show some care.
2330 Set them once, and don't touch them ever again.  Better yet, don't touch
2331 them at all unless you know exactly what you're doing.
2332
2333 @vindex gnus-level-default-unsubscribed
2334 @vindex gnus-level-default-subscribed
2335 Two closely related variables are @code{gnus-level-default-subscribed}
2336 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2337 which are the levels that new groups will be put on if they are
2338 (un)subscribed.  These two variables should, of course, be inside the
2339 relevant valid ranges.
2340
2341 @vindex gnus-keep-same-level
2342 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2343 will only move to groups of the same level (or lower).  In
2344 particular, going from the last article in one group to the next group
2345 will go to the next group of the same level (or lower).  This might be
2346 handy if you want to read the most important groups before you read the
2347 rest.
2348
2349 If this variable is @code{best}, Gnus will make the next newsgroup the
2350 one with the best level.
2351
2352 @vindex gnus-group-default-list-level
2353 All groups with a level less than or equal to
2354 @code{gnus-group-default-list-level} will be listed in the group buffer
2355 by default.
2356
2357 @vindex gnus-group-list-inactive-groups
2358 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2359 groups will be listed along with the unread groups.  This variable is
2360 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2361 listed.
2362
2363 @vindex gnus-group-use-permanent-levels
2364 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2365 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2366 use this level as the ``work'' level.
2367
2368 @vindex gnus-activate-level
2369 Gnus will normally just activate (i. e., query the server about) groups
2370 on level @code{gnus-activate-level} or less.  If you don't want to
2371 activate unsubscribed groups, for instance, you might set this variable
2372 to 5.  The default is 6.
2373
2374
2375 @node Group Score
2376 @section Group Score
2377 @cindex group score
2378 @cindex group rank
2379 @cindex rank
2380
2381 You would normally keep important groups on high levels, but that scheme
2382 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2383 group buffer according to how often you read groups, perhaps?  Within
2384 reason?
2385
2386 This is what @dfn{group score} is for.  You can have Gnus assign a score
2387 to each group through the mechanism described below.  You can then sort
2388 the group buffer based on this score.  Alternatively, you can sort on
2389 score and then level.  (Taken together, the level and the score is
2390 called the @dfn{rank} of the group.  A group that is on level 4 and has
2391 a score of 1 has a higher rank than a group on level 5 that has a score
2392 of 300.  (The level is the most significant part and the score is the
2393 least significant part.))
2394
2395 @findex gnus-summary-bubble-group
2396 If you want groups you read often to get higher scores than groups you
2397 read seldom you can add the @code{gnus-summary-bubble-group} function to
2398 the @code{gnus-summary-exit-hook} hook.  This will result (after
2399 sorting) in a bubbling sort of action.  If you want to see that in
2400 action after each summary exit, you can add
2401 @code{gnus-group-sort-groups-by-rank} or
2402 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2403 slow things down somewhat.
2404
2405
2406 @node Marking Groups
2407 @section Marking Groups
2408 @cindex marking groups
2409
2410 If you want to perform some command on several groups, and they appear
2411 subsequently in the group buffer, you would normally just give a
2412 numerical prefix to the command.  Most group commands will then do your
2413 bidding on those groups.
2414
2415 However, if the groups are not in sequential order, you can still
2416 perform a command on several groups.  You simply mark the groups first
2417 with the process mark and then execute the command.
2418
2419 @table @kbd
2420
2421 @item #
2422 @kindex # (Group)
2423 @itemx M m
2424 @kindex M m (Group)
2425 @findex gnus-group-mark-group
2426 Set the mark on the current group (@code{gnus-group-mark-group}).
2427
2428 @item M-#
2429 @kindex M-# (Group)
2430 @itemx M u
2431 @kindex M u (Group)
2432 @findex gnus-group-unmark-group
2433 Remove the mark from the current group
2434 (@code{gnus-group-unmark-group}).
2435
2436 @item M U
2437 @kindex M U (Group)
2438 @findex gnus-group-unmark-all-groups
2439 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2440
2441 @item M w
2442 @kindex M w (Group)
2443 @findex gnus-group-mark-region
2444 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2445
2446 @item M b
2447 @kindex M b (Group)
2448 @findex gnus-group-mark-buffer
2449 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2450
2451 @item M r
2452 @kindex M r (Group)
2453 @findex gnus-group-mark-regexp
2454 Mark all groups that match some regular expression
2455 (@code{gnus-group-mark-regexp}).
2456 @end table
2457
2458 Also @pxref{Process/Prefix}.
2459
2460 @findex gnus-group-universal-argument
2461 If you want to execute some command on all groups that have been marked
2462 with the process mark, you can use the @kbd{M-&}
2463 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2464 the command to be executed.
2465
2466
2467 @node Foreign Groups
2468 @section Foreign Groups
2469 @cindex foreign groups
2470
2471 Below are some group mode commands for making and editing general foreign
2472 groups, as well as commands to ease the creation of a few
2473 special-purpose groups.  All these commands insert the newly created
2474 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2475 consulted.
2476
2477 @table @kbd
2478
2479 @item G m
2480 @kindex G m (Group)
2481 @findex gnus-group-make-group
2482 @cindex making groups
2483 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2484 for a name, a method and possibly an @dfn{address}.  For an easier way
2485 to subscribe to @sc{nntp} groups, @pxref{Browse Foreign Server}.
2486
2487 @item G r
2488 @kindex G r (Group)
2489 @findex gnus-group-rename-group
2490 @cindex renaming groups
2491 Rename the current group to something else
2492 (@code{gnus-group-rename-group}).  This is valid only on some
2493 groups---mail groups mostly.  This command might very well be quite slow
2494 on some back ends.
2495
2496 @item G c
2497 @kindex G c (Group)
2498 @cindex customizing
2499 @findex gnus-group-customize
2500 Customize the group parameters (@code{gnus-group-customize}).
2501
2502 @item G e
2503 @kindex G e (Group)
2504 @findex gnus-group-edit-group-method
2505 @cindex renaming groups
2506 Enter a buffer where you can edit the select method of the current
2507 group (@code{gnus-group-edit-group-method}).
2508
2509 @item G p
2510 @kindex G p (Group)
2511 @findex gnus-group-edit-group-parameters
2512 Enter a buffer where you can edit the group parameters
2513 (@code{gnus-group-edit-group-parameters}).
2514
2515 @item G E
2516 @kindex G E (Group)
2517 @findex gnus-group-edit-group
2518 Enter a buffer where you can edit the group info
2519 (@code{gnus-group-edit-group}).
2520
2521 @item G d
2522 @kindex G d (Group)
2523 @findex gnus-group-make-directory-group
2524 @cindex nndir
2525 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2526 for a directory name (@code{gnus-group-make-directory-group}).
2527
2528 @item G h
2529 @kindex G h (Group)
2530 @cindex help group
2531 @findex gnus-group-make-help-group
2532 Make the Gnus help group (@code{gnus-group-make-help-group}).
2533
2534 @item G a
2535 @kindex G a (Group)
2536 @cindex (ding) archive
2537 @cindex archive group
2538 @findex gnus-group-make-archive-group
2539 @vindex gnus-group-archive-directory
2540 @vindex gnus-group-recent-archive-directory
2541 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2542 default a group pointing to the most recent articles will be created
2543 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2544 group will be created from @code{gnus-group-archive-directory}.
2545
2546 @item G k
2547 @kindex G k (Group)
2548 @findex gnus-group-make-kiboze-group
2549 @cindex nnkiboze
2550 Make a kiboze group.  You will be prompted for a name, for a regexp to
2551 match groups to be ``included'' in the kiboze group, and a series of
2552 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2553 @xref{Kibozed Groups}.
2554
2555 @item G D
2556 @kindex G D (Group)
2557 @findex gnus-group-enter-directory
2558 @cindex nneething
2559 Read an arbitrary directory as if it were a newsgroup with the
2560 @code{nneething} back end (@code{gnus-group-enter-directory}).
2561 @xref{Anything Groups}.
2562
2563 @item G f
2564 @kindex G f (Group)
2565 @findex gnus-group-make-doc-group
2566 @cindex ClariNet Briefs
2567 @cindex nndoc
2568 Make a group based on some file or other
2569 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2570 command, you will be prompted for a file name and a file type.
2571 Currently supported types are @code{mbox}, @code{babyl},
2572 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2573 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2574 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2575 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2576 you run this command without a prefix, Gnus will guess at the file
2577 type.  @xref{Document Groups}.
2578
2579 @item G u
2580 @kindex G u (Group)
2581 @vindex gnus-useful-groups
2582 @findex gnus-group-make-useful-group
2583 Create one of the groups mentioned in @code{gnus-useful-groups}
2584 (@code{gnus-group-make-useful-group}).
2585
2586 @item G w
2587 @kindex G w (Group)
2588 @findex gnus-group-make-web-group
2589 @cindex Google
2590 @cindex nnweb
2591 @cindex gmane
2592 Make an ephemeral group based on a web search
2593 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2594 command, make a solid group instead.  You will be prompted for the
2595 search engine type and the search string.  Valid search engine types
2596 include @code{google}, @code{dejanews}, and @code{gmane}.
2597 @xref{Web Searches}.
2598
2599 If you use the @code{google} search engine, you can limit the search
2600 to a particular group by using a match string like
2601 @samp{shaving group:alt.sysadmin.recovery}.
2602
2603 @item G DEL
2604 @kindex G DEL (Group)
2605 @findex gnus-group-delete-group
2606 This function will delete the current group
2607 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2608 actually delete all the articles in the group, and forcibly remove the
2609 group itself from the face of the Earth.  Use a prefix only if you are
2610 absolutely sure of what you are doing.  This command can't be used on
2611 read-only groups (like @code{nntp} group), though.
2612
2613 @item G V
2614 @kindex G V (Group)
2615 @findex gnus-group-make-empty-virtual
2616 Make a new, fresh, empty @code{nnvirtual} group
2617 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2618
2619 @item G v
2620 @kindex G v (Group)
2621 @findex gnus-group-add-to-virtual
2622 Add the current group to an @code{nnvirtual} group
2623 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2624 @end table
2625
2626 @xref{Select Methods}, for more information on the various select
2627 methods.
2628
2629 @vindex gnus-activate-foreign-newsgroups
2630 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2631 Gnus will check all foreign groups with this level or lower at startup.
2632 This might take quite a while, especially if you subscribe to lots of
2633 groups from different @sc{nntp} servers.  Also @pxref{Group Levels};
2634 @code{gnus-activate-level} also affects activation of foreign
2635 newsgroups.
2636
2637
2638 @node Group Parameters
2639 @section Group Parameters
2640 @cindex group parameters
2641
2642 The group parameters store information local to a particular group.
2643 Here's an example group parameter list:
2644
2645 @example
2646 ((to-address . "ding@@gnus.org")
2647  (auto-expire . t))
2648 @end example
2649
2650 We see that each element consists of a "dotted pair"---the thing before
2651 the dot is the key, while the thing after the dot is the value.  All the
2652 parameters have this form @emph{except} local variable specs, which are
2653 not dotted pairs, but proper lists.
2654
2655 Some parameters have correspondant customizable variables, each of which
2656 is an alist of regexps and values.
2657
2658 The following group parameters can be used:
2659
2660 @table @code
2661 @item to-address
2662 @cindex to-address
2663 Address used by when doing followups and new posts.
2664
2665 @example
2666 (to-address . "some@@where.com")
2667 @end example
2668
2669 This is primarily useful in mail groups that represent closed mailing
2670 lists---mailing lists where it's expected that everybody that writes to
2671 the mailing list is subscribed to it.  Since using this parameter
2672 ensures that the mail only goes to the mailing list itself, it means
2673 that members won't receive two copies of your followups.
2674
2675 Using @code{to-address} will actually work whether the group is foreign
2676 or not.  Let's say there's a group on the server that is called
2677 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2678 the articles from a mail-to-news gateway.  Posting directly to this
2679 group is therefore impossible---you have to send mail to the mailing
2680 list address instead.
2681
2682 See also @code{gnus-parameter-to-address-alist}.
2683
2684 @item to-list
2685 @cindex to-list
2686 Address used when doing @kbd{a} in that group.
2687
2688 @example
2689 (to-list . "some@@where.com")
2690 @end example
2691
2692 It is totally ignored
2693 when doing a followup---except that if it is present in a news group,
2694 you'll get mail group semantics when doing @kbd{f}.
2695
2696 If you do an @kbd{a} command in a mail group and you have neither a
2697 @code{to-list} group parameter nor a @code{to-address} group parameter,
2698 then a @code{to-list} group parameter will be added automatically upon
2699 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2700 @vindex gnus-add-to-list
2701
2702 If you do an @kbd{a} command in a mail group and you don't have a
2703 @code{to-list} group parameter, one will be added automatically upon
2704 sending the message.
2705
2706 @findex gnus-mailing-list-mode
2707 @cindex Mail List Groups
2708 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2709 entering summary buffer.
2710
2711 See also @code{gnus-parameter-to-list-alist}.
2712
2713 @anchor{subscribed}
2714 @item subscribed
2715 @cindex subscribed
2716 If this parameter is set to @code{t}, Gnus will consider the
2717 to-address and to-list parameters for this group as addresses of
2718 mailing lists you are subscribed to.  Giving Gnus this information is
2719 (only) a first step in getting it to generate correct Mail-Followup-To
2720 headers for your posts to these lists.  Look here @pxref{(message)Mailing
2721 Lists} for a complete treatment of available MFT support.
2722
2723 See also @code{gnus-find-subscribed-addresses}, the function that
2724 directly uses this group parameter.
2725
2726 @item visible
2727 @cindex visible
2728 If the group parameter list has the element @code{(visible . t)},
2729 that group will always be visible in the Group buffer, regardless
2730 of whether it has any unread articles.
2731
2732 @item broken-reply-to
2733 @cindex broken-reply-to
2734 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2735 headers in this group are to be ignored.  This can be useful if you're
2736 reading a mailing list group where the listserv has inserted
2737 @code{Reply-To} headers that point back to the listserv itself.  This is
2738 broken behavior.  So there!
2739
2740 @item to-group
2741 @cindex to-group
2742 Elements like @code{(to-group . "some.group.name")} means that all
2743 posts in that group will be sent to @code{some.group.name}.
2744
2745 @item newsgroup
2746 @cindex newsgroup
2747 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2748 will treat all responses as if they were responses to news articles.
2749 This can be useful if you have a mail group that's really a mirror of a
2750 news group.
2751
2752 @item gcc-self
2753 @cindex gcc-self
2754 If @code{(gcc-self . t)} is present in the group parameter list, newly
2755 composed messages will be @code{Gcc}'d to the current group.  If
2756 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2757 generated, if @code{(gcc-self . "string")} is present, this string will
2758 be inserted literally as a @code{gcc} header.  This parameter takes
2759 precedence over any default @code{Gcc} rules as described later
2760 (@pxref{Archived Messages}).  CAVEAT:: It yields an error putting
2761 @code{(gcc-self . t)} in groups of a @code{nntp} server or so, because
2762 a @code{nntp} server doesn't accept articles.
2763
2764 @item auto-expire
2765 @cindex auto-expire
2766 If the group parameter has an element that looks like @code{(auto-expire
2767 . t)}, all articles read will be marked as expirable.  For an
2768 alternative approach, @pxref{Expiring Mail}.
2769
2770 See also @code{gnus-auto-expirable-newsgroups}.
2771
2772 @item total-expire
2773 @cindex total-expire
2774 If the group parameter has an element that looks like
2775 @code{(total-expire . t)}, all read articles will be put through the
2776 expiry process, even if they are not marked as expirable.  Use with
2777 caution.  Unread, ticked and dormant articles are not eligible for
2778 expiry.
2779
2780 See also @code{gnus-total-expirable-newsgroups}.
2781
2782 @item expiry-wait
2783 @cindex expiry-wait
2784 @vindex nnmail-expiry-wait-function
2785 If the group parameter has an element that looks like
2786 @code{(expiry-wait . 10)}, this value will override any
2787 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2788 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2789 can either be a number of days (not necessarily an integer) or the
2790 symbols @code{never} or @code{immediate}.
2791
2792 @item score-file
2793 @cindex score file group parameter
2794 Elements that look like @code{(score-file . "file")} will make
2795 @file{file} into the current score file for the group in question.  All
2796 interactive score entries will be put into this file.
2797
2798 @item adapt-file
2799 @cindex adapt file group parameter
2800 Elements that look like @code{(adapt-file . "file")} will make
2801 @file{file} into the current adaptive file for the group in question.
2802 All adaptive score entries will be put into this file.
2803
2804 @item admin-address
2805 @cindex admin-address
2806 When unsubscribing from a mailing list you should never send the
2807 unsubscription notice to the mailing list itself.  Instead, you'd send
2808 messages to the administrative address.  This parameter allows you to
2809 put the admin address somewhere convenient.
2810
2811 @item display
2812 @cindex display
2813 Elements that look like @code{(display . MODE)} say which articles to
2814 display on entering the group.  Valid values are:
2815
2816 @table @code
2817 @item all
2818 Display all articles, both read and unread.
2819
2820 @item an integer
2821 Display the last INTEGER articles in the group.  This is the same as
2822 entering the group with C-u INTEGER.
2823
2824 @item default
2825 Display the default visible articles, which normally includes unread and
2826 ticked articles.
2827
2828 @item an array
2829 Display articles that satisfy a predicate.
2830
2831 Here are some examples:
2832
2833 @table @code
2834 @item [unread]
2835 Display only unread articles.
2836
2837 @item [not expire]
2838 Display everything except expirable articles.
2839
2840 @item [and (not reply) (not expire)]
2841 Display everything except expirable and articles you've already
2842 responded to.
2843 @end table
2844
2845 The available operators are @code{not}, @code{and} and @code{or}.
2846 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2847 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2848 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2849 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2850
2851 @end table
2852
2853 The @code{display} parameter works by limiting the summary buffer to
2854 the subset specified.  You can pop the limit by using the @kbd{/ w}
2855 command (@pxref{Limiting}).
2856
2857 @item comment
2858 @cindex comment
2859 Elements that look like @code{(comment . "This is a comment")} are
2860 arbitrary comments on the group.  You can display comments in the
2861 group line (@pxref{Group Line Specification}).
2862
2863 @item charset
2864 @cindex charset
2865 Elements that look like @code{(charset . iso-8859-1)} will make
2866 @code{iso-8859-1} the default charset; that is, the charset that will be
2867 used for all articles that do not specify a charset.
2868
2869 See also @code{gnus-group-charset-alist}.
2870
2871 @item ignored-charsets
2872 @cindex ignored-charset
2873 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2874 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2875 default charset will be used for decoding articles.
2876
2877 See also @code{gnus-group-ignored-charsets-alist}.
2878
2879 @item posting-style
2880 @cindex posting-style
2881 You can store additional posting style information for this group only
2882 here (@pxref{Posting Styles}).  The format is that of an entry in the
2883 @code{gnus-posting-styles} alist, except that there's no regexp matching
2884 the group name (of course).  Style elements in this group parameter will
2885 take precedence over the ones found in @code{gnus-posting-styles}.
2886
2887 For instance, if you want a funky name and signature in this group only,
2888 instead of hacking @code{gnus-posting-styles}, you could put something
2889 like this in the group parameters:
2890
2891 @example
2892 (posting-style
2893   (name "Funky Name")
2894   (signature "Funky Signature"))
2895 @end example
2896
2897 @item post-method
2898 @cindex post-method
2899 If it is set, the value is used as the method for posting message
2900 instead of @code{gnus-post-method}.
2901
2902 @item banner
2903 @cindex banner
2904 An item like @code{(banner . "regex")} causes any part of an article
2905 that matches the regular expression "regex" to be stripped. Instead of
2906 "regex", you can also use the symbol @code{signature} which strips the
2907 last signature or any of the elements of the alist
2908 @code{gnus-article-banner-alist}.
2909
2910 @item sieve
2911 @cindex sieve
2912 This parameter contains a Sieve test that should match incoming mail
2913 that should be placed in this group.  From this group parameter, a
2914 Sieve @samp{IF} control structure is generated, having the test as the
2915 condition and @samp{fileinto "group.name";} as the body.
2916
2917 For example, if the INBOX.list.sieve group has the @code{(sieve
2918 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2919 translating the group parameter into a Sieve script (@pxref{Sieve
2920 Commands}) the following Sieve code is generated:
2921
2922 @example
2923 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2924         fileinto \"INBOX.list.sieve\";
2925 @}
2926 @end example
2927
2928 The Sieve language is described in RFC 3028.  @xref{Top, , Top, sieve,
2929 Emacs Sieve}.
2930
2931 @item (@var{variable} @var{form})
2932 You can use the group parameters to set variables local to the group you
2933 are entering.  If you want to turn threading off in @samp{news.answers},
2934 you could put @code{(gnus-show-threads nil)} in the group parameters of
2935 that group.  @code{gnus-show-threads} will be made into a local variable
2936 in the summary buffer you enter, and the form @code{nil} will be
2937 @code{eval}ed there.
2938
2939 @vindex gnus-list-identifiers
2940 A use for this feature, is to remove a mailing list identifier tag in
2941 the subject fields of articles.   E.g. if the news group
2942 @samp{nntp+news.gnus.org:gmane.text.docbook.apps} has the tag
2943 @samp{DOC-BOOK-APPS:} in the subject of all articles, this tag can be
2944 removed from the article subjects in the summary buffer for the group by
2945 putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")} into the group
2946 parameters for the group.
2947
2948
2949 This can also be used as a group-specific hook function, if you'd like.
2950 If you want to hear a beep when you enter a group, you could put
2951 something like @code{(dummy-variable (ding))} in the parameters of that
2952 group.  @code{dummy-variable} will be set to the result of the
2953 @code{(ding)} form, but who cares?
2954
2955 @end table
2956
2957 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2958 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2959 presents you with a Customize-like interface.  The latter helps avoid
2960 silly Lisp errors.)  You might also be interested in reading about topic
2961 parameters (@pxref{Topic Parameters}).
2962
2963 Group parameters can be set via the @code{gnus-parameters} variable too.
2964 But some variables, such as @code{visible}, have no effect.  For
2965 example:
2966
2967 @example
2968 (setq gnus-parameters
2969       '(("mail\\..*"
2970          (gnus-show-threads nil)
2971          (gnus-use-scoring nil)
2972          (gnus-summary-line-format
2973           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
2974          (gcc-self . t)
2975          (display . all))
2976
2977         ("^nnimap:\\(foo.bar\\)$"
2978          (to-group . "\\1"))
2979
2980         ("mail\\.me"
2981          (gnus-use-scoring  t))
2982
2983         ("list\\..*"
2984          (total-expire . t)
2985          (broken-reply-to . t))))
2986 @end example
2987
2988 String value of parameters will be subjected to regexp substitution, as
2989 the @code{to-group} example shows.
2990
2991
2992 @node Listing Groups
2993 @section Listing Groups
2994 @cindex group listing
2995
2996 These commands all list various slices of the groups available.
2997
2998 @table @kbd
2999
3000 @item l
3001 @itemx A s
3002 @kindex A s (Group)
3003 @kindex l (Group)
3004 @findex gnus-group-list-groups
3005 List all groups that have unread articles
3006 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3007 command will list only groups of level ARG and lower.  By default, it
3008 only lists groups of level five (i. e.,
3009 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3010 groups).
3011
3012 @item L
3013 @itemx A u
3014 @kindex A u (Group)
3015 @kindex L (Group)
3016 @findex gnus-group-list-all-groups
3017 List all groups, whether they have unread articles or not
3018 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3019 this command will list only groups of level ARG and lower.  By default,
3020 it lists groups of level seven or lower (i.e., just subscribed and
3021 unsubscribed groups).
3022
3023 @item A l
3024 @kindex A l (Group)
3025 @findex gnus-group-list-level
3026 List all unread groups on a specific level
3027 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3028 with no unread articles.
3029
3030 @item A k
3031 @kindex A k (Group)
3032 @findex gnus-group-list-killed
3033 List all killed groups (@code{gnus-group-list-killed}).  If given a
3034 prefix argument, really list all groups that are available, but aren't
3035 currently (un)subscribed.  This could entail reading the active file
3036 from the server.
3037
3038 @item A z
3039 @kindex A z (Group)
3040 @findex gnus-group-list-zombies
3041 List all zombie groups (@code{gnus-group-list-zombies}).
3042
3043 @item A m
3044 @kindex A m (Group)
3045 @findex gnus-group-list-matching
3046 List all unread, subscribed groups with names that match a regexp
3047 (@code{gnus-group-list-matching}).
3048
3049 @item A M
3050 @kindex A M (Group)
3051 @findex gnus-group-list-all-matching
3052 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3053
3054 @item A A
3055 @kindex A A (Group)
3056 @findex gnus-group-list-active
3057 List absolutely all groups in the active file(s) of the
3058 server(s) you are connected to (@code{gnus-group-list-active}).  This
3059 might very well take quite a while.  It might actually be a better idea
3060 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3061 thing to match on.  Also note that this command may list groups that
3062 don't exist (yet)---these will be listed as if they were killed groups.
3063 Take the output with some grains of salt.
3064
3065 @item A a
3066 @kindex A a (Group)
3067 @findex gnus-group-apropos
3068 List all groups that have names that match a regexp
3069 (@code{gnus-group-apropos}).
3070
3071 @item A d
3072 @kindex A d (Group)
3073 @findex gnus-group-description-apropos
3074 List all groups that have names or descriptions that match a regexp
3075 (@code{gnus-group-description-apropos}).
3076
3077 @item A c
3078 @kindex A c (Group)
3079 @findex gnus-group-list-cached
3080 List all groups with cached articles (@code{gnus-group-list-cached}).
3081
3082 @item A ?
3083 @kindex A ? (Group)
3084 @findex gnus-group-list-dormant
3085 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3086
3087 @item A /
3088 @kindex A / (Group)
3089 @findex gnus-group-list-limit
3090 List groups limited within the current selection
3091 (@code{gnus-group-list-limit}).
3092
3093 @item A f
3094 @kindex A f (Group)
3095 @findex gnus-group-list-flush
3096 Flush groups from the current selection (@code{gnus-group-list-flush}).
3097
3098 @item A p
3099 @kindex A p (Group)
3100 @findex gnus-group-list-plus
3101 List groups plus the current selection (@code{gnus-group-list-plus}).
3102
3103 @end table
3104
3105 @vindex gnus-permanently-visible-groups
3106 @cindex visible group parameter
3107 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3108 always be shown, whether they have unread articles or not.  You can also
3109 add the @code{visible} element to the group parameters in question to
3110 get the same effect.
3111
3112 @vindex gnus-list-groups-with-ticked-articles
3113 Groups that have just ticked articles in it are normally listed in the
3114 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3115 @code{nil}, these groups will be treated just like totally empty
3116 groups.  It is @code{t} by default.
3117
3118
3119 @node Sorting Groups
3120 @section Sorting Groups
3121 @cindex sorting groups
3122
3123 @kindex C-c C-s (Group)
3124 @findex gnus-group-sort-groups
3125 @vindex gnus-group-sort-function
3126 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3127 group buffer according to the function(s) given by the
3128 @code{gnus-group-sort-function} variable.  Available sorting functions
3129 include:
3130
3131 @table @code
3132
3133 @item gnus-group-sort-by-alphabet
3134 @findex gnus-group-sort-by-alphabet
3135 Sort the group names alphabetically.  This is the default.
3136
3137 @item gnus-group-sort-by-real-name
3138 @findex gnus-group-sort-by-real-name
3139 Sort the group alphabetically on the real (unprefixed) group names.
3140
3141 @item gnus-group-sort-by-level
3142 @findex gnus-group-sort-by-level
3143 Sort by group level.
3144
3145 @item gnus-group-sort-by-score
3146 @findex gnus-group-sort-by-score
3147 Sort by group score.  @xref{Group Score}.
3148
3149 @item gnus-group-sort-by-rank
3150 @findex gnus-group-sort-by-rank
3151 Sort by group score and then the group level.  The level and the score
3152 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3153
3154 @item gnus-group-sort-by-unread
3155 @findex gnus-group-sort-by-unread
3156 Sort by number of unread articles.
3157
3158 @item gnus-group-sort-by-method
3159 @findex gnus-group-sort-by-method
3160 Sort alphabetically on the select method.
3161
3162 @item gnus-group-sort-by-server
3163 @findex gnus-group-sort-by-server
3164 Sort alphabetically on the Gnus server name.
3165
3166
3167 @end table
3168
3169 @code{gnus-group-sort-function} can also be a list of sorting
3170 functions.  In that case, the most significant sort key function must be
3171 the last one.
3172
3173
3174 There are also a number of commands for sorting directly according to
3175 some sorting criteria:
3176
3177 @table @kbd
3178 @item G S a
3179 @kindex G S a (Group)
3180 @findex gnus-group-sort-groups-by-alphabet
3181 Sort the group buffer alphabetically by group name
3182 (@code{gnus-group-sort-groups-by-alphabet}).
3183
3184 @item G S u
3185 @kindex G S u (Group)
3186 @findex gnus-group-sort-groups-by-unread
3187 Sort the group buffer by the number of unread articles
3188 (@code{gnus-group-sort-groups-by-unread}).
3189
3190 @item G S l
3191 @kindex G S l (Group)
3192 @findex gnus-group-sort-groups-by-level
3193 Sort the group buffer by group level
3194 (@code{gnus-group-sort-groups-by-level}).
3195
3196 @item G S v
3197 @kindex G S v (Group)
3198 @findex gnus-group-sort-groups-by-score
3199 Sort the group buffer by group score
3200 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3201
3202 @item G S r
3203 @kindex G S r (Group)
3204 @findex gnus-group-sort-groups-by-rank
3205 Sort the group buffer by group rank
3206 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3207
3208 @item G S m
3209 @kindex G S m (Group)
3210 @findex gnus-group-sort-groups-by-method
3211 Sort the group buffer alphabetically by back end name
3212 (@code{gnus-group-sort-groups-by-method}).
3213
3214 @item G S n
3215 @kindex G S n (Group)
3216 @findex gnus-group-sort-groups-by-real-name
3217 Sort the group buffer alphabetically by real (unprefixed) group name
3218 (@code{gnus-group-sort-groups-by-real-name}).
3219
3220 @end table
3221
3222 All the commands below obey the process/prefix convention
3223 (@pxref{Process/Prefix}).
3224
3225 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3226 commands will sort in reverse order.
3227
3228 You can also sort a subset of the groups:
3229
3230 @table @kbd
3231 @item G P a
3232 @kindex G P a (Group)
3233 @findex gnus-group-sort-selected-groups-by-alphabet
3234 Sort the groups alphabetically by group name
3235 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3236
3237 @item G P u
3238 @kindex G P u (Group)
3239 @findex gnus-group-sort-selected-groups-by-unread
3240 Sort the groups by the number of unread articles
3241 (@code{gnus-group-sort-selected-groups-by-unread}).
3242
3243 @item G P l
3244 @kindex G P l (Group)
3245 @findex gnus-group-sort-selected-groups-by-level
3246 Sort the groups by group level
3247 (@code{gnus-group-sort-selected-groups-by-level}).
3248
3249 @item G P v
3250 @kindex G P v (Group)
3251 @findex gnus-group-sort-selected-groups-by-score
3252 Sort the groups by group score
3253 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3254
3255 @item G P r
3256 @kindex G P r (Group)
3257 @findex gnus-group-sort-selected-groups-by-rank
3258 Sort the groups by group rank
3259 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3260
3261 @item G P m
3262 @kindex G P m (Group)
3263 @findex gnus-group-sort-selected-groups-by-method
3264 Sort the groups alphabetically by back end name
3265 (@code{gnus-group-sort-selected-groups-by-method}).
3266
3267 @item G P n
3268 @kindex G P n (Group)
3269 @findex gnus-group-sort-selected-groups-by-real-name
3270 Sort the groups alphabetically by real (unprefixed) group name
3271 (@code{gnus-group-sort-selected-groups-by-real-name}).
3272
3273 @item G P s
3274 @kindex G P s (Group)
3275 @findex gnus-group-sort-selected-groups
3276 Sort the groups according to @code{gnus-group-sort-function}.
3277
3278 @end table
3279
3280 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3281 move groups around.
3282
3283
3284 @node Group Maintenance
3285 @section Group Maintenance
3286 @cindex bogus groups
3287
3288 @table @kbd
3289 @item b
3290 @kindex b (Group)
3291 @findex gnus-group-check-bogus-groups
3292 Find bogus groups and delete them
3293 (@code{gnus-group-check-bogus-groups}).
3294
3295 @item F
3296 @kindex F (Group)
3297 @findex gnus-group-find-new-groups
3298 Find new groups and process them (@code{gnus-group-find-new-groups}).
3299 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3300 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3301 to query the server for new groups, and subscribe the new groups as
3302 zombies.
3303
3304 @item C-c C-x
3305 @kindex C-c C-x (Group)
3306 @findex gnus-group-expire-articles
3307 Run all expirable articles in the current group through the expiry
3308 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3309 all expirable articles in the group that have been around for a while.
3310 (@pxref{Expiring Mail}).
3311
3312 @item C-c C-M-x
3313 @kindex C-c C-M-x (Group)
3314 @findex gnus-group-expire-all-groups
3315 Run all expirable articles in all groups through the expiry process
3316 (@code{gnus-group-expire-all-groups}).
3317
3318 @end table
3319
3320
3321 @node Browse Foreign Server
3322 @section Browse Foreign Server
3323 @cindex foreign servers
3324 @cindex browsing servers
3325
3326 @table @kbd
3327 @item B
3328 @kindex B (Group)
3329 @findex gnus-group-browse-foreign-server
3330 You will be queried for a select method and a server name.  Gnus will
3331 then attempt to contact this server and let you browse the groups there
3332 (@code{gnus-group-browse-foreign-server}).
3333 @end table
3334
3335 @findex gnus-browse-mode
3336 A new buffer with a list of available groups will appear.  This buffer
3337 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3338 a lot) like a normal group buffer.
3339
3340 Here's a list of keystrokes available in the browse mode:
3341
3342 @table @kbd
3343 @item n
3344 @kindex n (Browse)
3345 @findex gnus-group-next-group
3346 Go to the next group (@code{gnus-group-next-group}).
3347
3348 @item p
3349 @kindex p (Browse)
3350 @findex gnus-group-prev-group
3351 Go to the previous group (@code{gnus-group-prev-group}).
3352
3353 @item SPACE
3354 @kindex SPACE (Browse)
3355 @findex gnus-browse-read-group
3356 Enter the current group and display the first article
3357 (@code{gnus-browse-read-group}).
3358
3359 @item RET
3360 @kindex RET (Browse)
3361 @findex gnus-browse-select-group
3362 Enter the current group (@code{gnus-browse-select-group}).
3363
3364 @item u
3365 @kindex u (Browse)
3366 @findex gnus-browse-unsubscribe-current-group
3367 Unsubscribe to the current group, or, as will be the case here,
3368 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3369
3370 @item l
3371 @itemx q
3372 @kindex q (Browse)
3373 @kindex l (Browse)
3374 @findex gnus-browse-exit
3375 Exit browse mode (@code{gnus-browse-exit}).
3376
3377 @item d
3378 @kindex d (Browse)
3379 @findex gnus-browse-describe-group
3380 Describe the current group (@code{gnus-browse-describe-group}).
3381
3382 @item ?
3383 @kindex ? (Browse)
3384 @findex gnus-browse-describe-briefly
3385 Describe browse mode briefly (well, there's not much to describe, is
3386 there) (@code{gnus-browse-describe-briefly}).
3387 @end table
3388
3389
3390 @node Exiting Gnus
3391 @section Exiting Gnus
3392 @cindex exiting Gnus
3393
3394 Yes, Gnus is ex(c)iting.
3395
3396 @table @kbd
3397 @item z
3398 @kindex z (Group)
3399 @findex gnus-group-suspend
3400 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3401 but it kills all buffers except the Group buffer.  I'm not sure why this
3402 is a gain, but then who am I to judge?
3403
3404 @item q
3405 @kindex q (Group)
3406 @findex gnus-group-exit
3407 @c @icon{gnus-group-exit}
3408 Quit Gnus (@code{gnus-group-exit}).
3409
3410 @item Q
3411 @kindex Q (Group)
3412 @findex gnus-group-quit
3413 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3414 The dribble file will be saved, though (@pxref{Auto Save}).
3415 @end table
3416
3417 @vindex gnus-exit-gnus-hook
3418 @vindex gnus-suspend-gnus-hook
3419 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3420 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3421 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3422 exiting Gnus.
3423
3424 @findex gnus-unload
3425 @cindex unloading
3426 If you wish to completely unload Gnus and all its adherents, you can use
3427 the @code{gnus-unload} command.  This command is also very handy when
3428 trying to customize meta-variables.
3429
3430 Note:
3431
3432 @quotation
3433 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3434 numbly heavy and herself fall into a hazy trance as the boy sitting
3435 behind her drew repeated lines with his pencil across the back of her
3436 plastic chair.
3437 @end quotation
3438
3439
3440 @node Group Topics
3441 @section Group Topics
3442 @cindex topics
3443
3444 If you read lots and lots of groups, it might be convenient to group
3445 them hierarchically according to topics.  You put your Emacs groups over
3446 here, your sex groups over there, and the rest (what, two groups or so?)
3447 you put in some misc section that you never bother with anyway.  You can
3448 even group the Emacs sex groups as a sub-topic to either the Emacs
3449 groups or the sex groups---or both!  Go wild!
3450
3451 @iftex
3452 @iflatex
3453 \gnusfigure{Group Topics}{400}{
3454 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3455 }
3456 @end iflatex
3457 @end iftex
3458
3459 Here's an example:
3460
3461 @example
3462 Gnus
3463   Emacs -- I wuw it!
3464      3: comp.emacs
3465      2: alt.religion.emacs
3466     Naughty Emacs
3467      452: alt.sex.emacs
3468        0: comp.talk.emacs.recovery
3469   Misc
3470      8: comp.binaries.fractals
3471     13: comp.sources.unix
3472 @end example
3473
3474 @findex gnus-topic-mode
3475 @kindex t (Group)
3476 To get this @emph{fab} functionality you simply turn on (ooh!) the
3477 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3478 is a toggling command.)
3479
3480 Go ahead, just try it.  I'll still be here when you get back.  La de
3481 dum...  Nice tune, that...  la la la...  What, you're back?  Yes, and
3482 now press @kbd{l}.  There.  All your groups are now listed under
3483 @samp{misc}.  Doesn't that make you feel all warm and fuzzy?  Hot and
3484 bothered?
3485
3486 If you want this permanently enabled, you should add that minor mode to
3487 the hook for the group mode.  Put the following line in your
3488 @file{~/.gnus} file:
3489
3490 @lisp
3491 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3492 @end lisp
3493
3494 @menu
3495 * Topic Commands::              Interactive E-Z commands.
3496 * Topic Variables::             How to customize the topics the Lisp Way.
3497 * Topic Sorting::               Sorting each topic individually.
3498 * Topic Topology::              A map of the world.
3499 * Topic Parameters::            Parameters that apply to all groups in a topic.
3500 @end menu
3501
3502
3503 @node Topic Commands
3504 @subsection Topic Commands
3505 @cindex topic commands
3506
3507 When the topic minor mode is turned on, a new @kbd{T} submap will be
3508 available.  In addition, a few of the standard keys change their
3509 definitions slightly.
3510
3511 In general, the following kinds of operations are possible on topics.
3512 First of all, you want to create topics.  Secondly, you want to put
3513 groups in topics and to move them around until you have an order you
3514 like.  The third kind of operation is to show/hide parts of the whole
3515 shebang.  You might want to hide a topic including its subtopics and
3516 groups, to get a better overview of the other groups.
3517
3518 Here is a list of the basic keys that you might need to set up topics
3519 the way you like.
3520
3521 @table @kbd
3522
3523 @item T n
3524 @kindex T n (Topic)
3525 @findex gnus-topic-create-topic
3526 Prompt for a new topic name and create it
3527 (@code{gnus-topic-create-topic}).
3528
3529 @item T TAB
3530 @itemx TAB
3531 @kindex T TAB (Topic)
3532 @kindex TAB (Topic)
3533 @findex gnus-topic-indent
3534 ``Indent'' the current topic so that it becomes a sub-topic of the
3535 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3536 ``un-indent'' the topic instead.
3537
3538 @item M-TAB
3539 @kindex M-TAB (Topic)
3540 @findex gnus-topic-unindent
3541 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3542 parent of its current parent (@code{gnus-topic-unindent}).
3543
3544 @end table
3545
3546 The following two keys can be used to move groups and topics around.
3547 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3548 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3549 kill and yank rather than cut and paste.
3550
3551 @table @kbd
3552
3553 @item C-k
3554 @kindex C-k (Topic)
3555 @findex gnus-topic-kill-group
3556 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3557 topic will be removed along with the topic.
3558
3559 @item C-y
3560 @kindex C-y (Topic)
3561 @findex gnus-topic-yank-group
3562 Yank the previously killed group or topic
3563 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3564 before all groups.
3565
3566 So, to move a topic to the beginning of the list of topics, just hit
3567 @kbd{C-k} on it.  This is like the `cut' part of cut and paste.  Then,
3568 move the cursor to the beginning of the buffer (just below the `Gnus'
3569 topic) and hit @kbd{C-y}.  This is like the `paste' part of cut and
3570 paste.  Like I said -- E-Z.
3571
3572 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3573 you can move topics around as well as groups.
3574
3575 @end table
3576
3577 After setting up the topics the way you like them, you might wish to
3578 hide a topic, or to show it again.  That's why we have the following
3579 key.
3580
3581 @table @kbd
3582
3583 @item RET
3584 @kindex RET (Topic)
3585 @findex gnus-topic-select-group
3586 @itemx SPACE
3587 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3588 When you perform this command on a group, you'll enter the group, as
3589 usual.  When done on a topic line, the topic will be folded (if it was
3590 visible) or unfolded (if it was folded already).  So it's basically a
3591 toggling command on topics.  In addition, if you give a numerical
3592 prefix, group on that level (and lower) will be displayed.
3593
3594 @end table
3595
3596 Now for a list of other commands, in no particular order.
3597
3598 @table @kbd
3599
3600 @item T m
3601 @kindex T m (Topic)
3602 @findex gnus-topic-move-group
3603 Move the current group to some other topic
3604 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3605 convention (@pxref{Process/Prefix}).
3606
3607 @item T j
3608 @kindex T j (Topic)
3609 @findex gnus-topic-jump-to-topic
3610 Go to a topic (@code{gnus-topic-jump-to-topic}).
3611
3612 @item T c
3613 @kindex T c (Topic)
3614 @findex gnus-topic-copy-group
3615 Copy the current group to some other topic
3616 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3617 convention (@pxref{Process/Prefix}).
3618
3619 @item T h
3620 @kindex T h (Topic)
3621 @findex gnus-topic-hide-topic
3622 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3623 a prefix, hide the topic permanently.
3624
3625 @item T s
3626 @kindex T s (Topic)
3627 @findex gnus-topic-show-topic
3628 Show the current topic (@code{gnus-topic-show-topic}).  If given
3629 a prefix, show the topic permanently.
3630
3631 @item T D
3632 @kindex T D (Topic)
3633 @findex gnus-topic-remove-group
3634 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3635 This command is mainly useful if you have the same group in several
3636 topics and wish to remove it from one of the topics.  You may also
3637 remove a group from all topics, but in that case, Gnus will add it to
3638 the root topic the next time you start Gnus.  In fact, all new groups
3639 (which, naturally, don't belong to any topic) will show up in the root
3640 topic.
3641
3642 This command uses the process/prefix convention
3643 (@pxref{Process/Prefix}).
3644
3645 @item T M
3646 @kindex T M (Topic)
3647 @findex gnus-topic-move-matching
3648 Move all groups that match some regular expression to a topic
3649 (@code{gnus-topic-move-matching}).
3650
3651 @item T C
3652 @kindex T C (Topic)
3653 @findex gnus-topic-copy-matching
3654 Copy all groups that match some regular expression to a topic
3655 (@code{gnus-topic-copy-matching}).
3656
3657 @item T H
3658 @kindex T H (Topic)
3659 @findex gnus-topic-toggle-display-empty-topics
3660 Toggle hiding empty topics
3661 (@code{gnus-topic-toggle-display-empty-topics}).
3662
3663 @item T #
3664 @kindex T # (Topic)
3665 @findex gnus-topic-mark-topic
3666 Mark all groups in the current topic with the process mark
3667 (@code{gnus-topic-mark-topic}).
3668
3669 @item T M-#
3670 @kindex T M-# (Topic)
3671 @findex gnus-topic-unmark-topic
3672 Remove the process mark from all groups in the current topic
3673 (@code{gnus-topic-unmark-topic}).
3674
3675 @item C-c C-x
3676 @kindex C-c C-x (Topic)
3677 @findex gnus-topic-expire-articles
3678 Run all expirable articles in the current group or topic through the
3679 expiry process (if any)
3680 (@code{gnus-topic-expire-articles}). (@pxref{Expiring Mail}).
3681
3682 @item T r
3683 @kindex T r (Topic)
3684 @findex gnus-topic-rename
3685 Rename a topic (@code{gnus-topic-rename}).
3686
3687 @item T DEL
3688 @kindex T DEL (Topic)
3689 @findex gnus-topic-delete
3690 Delete an empty topic (@code{gnus-topic-delete}).
3691
3692 @item A T
3693 @kindex A T (Topic)
3694 @findex gnus-topic-list-active
3695 List all groups that Gnus knows about in a topics-ified way
3696 (@code{gnus-topic-list-active}).
3697
3698 @item T M-n
3699 @kindex T M-n (Topic)
3700 @findex gnus-topic-goto-next-topic
3701 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3702
3703 @item T M-p
3704 @kindex T M-p (Topic)
3705 @findex gnus-topic-goto-previous-topic
3706 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3707
3708 @item G p
3709 @kindex G p (Topic)
3710 @findex gnus-topic-edit-parameters
3711 @cindex group parameters
3712 @cindex topic parameters
3713 @cindex parameters
3714 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3715 @xref{Topic Parameters}.
3716
3717 @end table
3718
3719
3720 @node Topic Variables
3721 @subsection Topic Variables
3722 @cindex topic variables
3723
3724 The previous section told you how to tell Gnus which topics to display.
3725 This section explains how to tell Gnus what to display about each topic.
3726
3727 @vindex gnus-topic-line-format
3728 The topic lines themselves are created according to the
3729 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3730 Valid elements are:
3731
3732 @table @samp
3733 @item i
3734 Indentation.
3735 @item n
3736 Topic name.
3737 @item v
3738 Visibility.
3739 @item l
3740 Level.
3741 @item g
3742 Number of groups in the topic.
3743 @item a
3744 Number of unread articles in the topic.
3745 @item A
3746 Number of unread articles in the topic and all its subtopics.
3747 @end table
3748
3749 @vindex gnus-topic-indent-level
3750 Each sub-topic (and the groups in the sub-topics) will be indented with
3751 @code{gnus-topic-indent-level} times the topic level number of spaces.
3752 The default is 2.
3753
3754 @vindex gnus-topic-mode-hook
3755 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3756
3757 @vindex gnus-topic-display-empty-topics
3758 The @code{gnus-topic-display-empty-topics} says whether to display even
3759 topics that have no unread articles in them.  The default is @code{t}.
3760
3761
3762 @node Topic Sorting
3763 @subsection Topic Sorting
3764 @cindex topic sorting
3765
3766 You can sort the groups in each topic individually with the following
3767 commands:
3768
3769
3770 @table @kbd
3771 @item T S a
3772 @kindex T S a (Topic)
3773 @findex gnus-topic-sort-groups-by-alphabet
3774 Sort the current topic alphabetically by group name
3775 (@code{gnus-topic-sort-groups-by-alphabet}).
3776
3777 @item T S u
3778 @kindex T S u (Topic)
3779 @findex gnus-topic-sort-groups-by-unread
3780 Sort the current topic by the number of unread articles
3781 (@code{gnus-topic-sort-groups-by-unread}).
3782
3783 @item T S l
3784 @kindex T S l (Topic)
3785 @findex gnus-topic-sort-groups-by-level
3786 Sort the current topic by group level
3787 (@code{gnus-topic-sort-groups-by-level}).
3788
3789 @item T S v
3790 @kindex T S v (Topic)
3791 @findex gnus-topic-sort-groups-by-score
3792 Sort the current topic by group score
3793 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3794
3795 @item T S r
3796 @kindex T S r (Topic)
3797 @findex gnus-topic-sort-groups-by-rank
3798 Sort the current topic by group rank
3799 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3800
3801 @item T S m
3802 @kindex T S m (Topic)
3803 @findex gnus-topic-sort-groups-by-method
3804 Sort the current topic alphabetically by back end name
3805 (@code{gnus-topic-sort-groups-by-method}).
3806
3807 @item T S e
3808 @kindex T S e (Topic)
3809 @findex gnus-topic-sort-groups-by-server
3810 Sort the current topic alphabetically by server name
3811 (@code{gnus-topic-sort-groups-by-server}).
3812
3813 @item T S s
3814 @kindex T S s
3815 @findex gnus-topic-sort-groups
3816 Sort the current topic according to the function(s) given by the
3817 @code{gnus-group-sort-function} variable
3818 (@code{gnus-topic-sort-groups}).
3819
3820 @end table
3821
3822 When given a prefix argument, all these commands will sort in reverse
3823 order.  @xref{Sorting Groups}, for more information about group
3824 sorting.
3825
3826
3827 @node Topic Topology
3828 @subsection Topic Topology
3829 @cindex topic topology
3830 @cindex topology
3831
3832 So, let's have a look at an example group buffer:
3833
3834 @example
3835 Gnus
3836   Emacs -- I wuw it!
3837      3: comp.emacs
3838      2: alt.religion.emacs
3839     Naughty Emacs
3840      452: alt.sex.emacs
3841        0: comp.talk.emacs.recovery
3842   Misc
3843      8: comp.binaries.fractals
3844     13: comp.sources.unix
3845 @end example
3846
3847 So, here we have one top-level topic (@samp{Gnus}), two topics under
3848 that, and one sub-topic under one of the sub-topics.  (There is always
3849 just one (1) top-level topic).  This topology can be expressed as
3850 follows:
3851
3852 @lisp
3853 (("Gnus" visible)
3854  (("Emacs -- I wuw it!" visible)
3855   (("Naughty Emacs" visible)))
3856  (("Misc" visible)))
3857 @end lisp
3858
3859 @vindex gnus-topic-topology
3860 This is in fact how the variable @code{gnus-topic-topology} would look
3861 for the display above.  That variable is saved in the @file{.newsrc.eld}
3862 file, and shouldn't be messed with manually---unless you really want
3863 to.  Since this variable is read from the @file{.newsrc.eld} file,
3864 setting it in any other startup files will have no effect.
3865
3866 This topology shows what topics are sub-topics of what topics (right),
3867 and which topics are visible.  Two settings are currently
3868 allowed---@code{visible} and @code{invisible}.
3869
3870
3871 @node Topic Parameters
3872 @subsection Topic Parameters
3873 @cindex topic parameters
3874
3875 All groups in a topic will inherit group parameters from the parent (and
3876 ancestor) topic parameters.  All valid group parameters are valid topic
3877 parameters (@pxref{Group Parameters}).
3878
3879 In addition, the following parameters are only valid as topic
3880 parameters:
3881
3882 @table @code
3883 @item subscribe
3884 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3885 @code{subscribe} topic parameter says what groups go in what topic.  Its
3886 value should be a regexp to match the groups that should go in that
3887 topic.
3888
3889 @item subscribe-level
3890 When subscribing new groups by topic (see the @code{subscribe} parameter),
3891 the group will be subscribed with the level specified in the
3892 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3893
3894 @end table
3895
3896 Group parameters (of course) override topic parameters, and topic
3897 parameters in sub-topics override topic parameters in super-topics.  You
3898 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3899 verb, although you may feel free to disagree with me here.)
3900
3901 @example
3902 Gnus
3903   Emacs
3904      3: comp.emacs
3905      2: alt.religion.emacs
3906    452: alt.sex.emacs
3907     Relief
3908      452: alt.sex.emacs
3909        0: comp.talk.emacs.recovery
3910   Misc
3911      8: comp.binaries.fractals
3912     13: comp.sources.unix
3913    452: alt.sex.emacs
3914 @end example
3915
3916 The @samp{Emacs} topic has the topic parameter @code{(score-file
3917 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3918 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3919 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3920 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3921 . "religion.SCORE")}.
3922
3923 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
3924 will get the @file{relief.SCORE} home score file.  If you enter the same
3925 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
3926 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
3927 get the @file{religion.SCORE} home score file.
3928
3929 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
3930 there are some problems, especially with the @code{total-expiry}
3931 parameter.  Say you have a mail group in two topics; one with
3932 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
3933 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
3934 of these topics you mean to expire articles from, so anything may
3935 happen.  In fact, I hereby declare that it is @dfn{undefined} what
3936 happens.  You just have to be careful if you do stuff like that.
3937
3938
3939 @node Misc Group Stuff
3940 @section Misc Group Stuff
3941
3942 @menu
3943 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
3944 * Group Information::           Information and help on groups and Gnus.
3945 * Group Timestamp::             Making Gnus keep track of when you last read a group.
3946 * File Commands::               Reading and writing the Gnus files.
3947 * Sieve Commands::              Managing Sieve scripts.
3948 @end menu
3949
3950 @table @kbd
3951
3952 @item ^
3953 @kindex ^ (Group)
3954 @findex gnus-group-enter-server-mode
3955 Enter the server buffer (@code{gnus-group-enter-server-mode}).
3956 @xref{Server Buffer}.
3957
3958 @item a
3959 @kindex a (Group)
3960 @findex gnus-group-post-news
3961 Start composing a message (a news by default)
3962 (@code{gnus-group-post-news}).  If given a prefix, post to the group
3963 under the point.  If the prefix is 1, prompt for a group to post to.
3964 Contrary to what the name of this function suggests, the prepared
3965 article might be a mail instead of a news, if a mail group is specified
3966 with the prefix argument.  @xref{Composing Messages}.
3967
3968 @item m
3969 @kindex m (Group)
3970 @findex gnus-group-mail
3971 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
3972 use the posting style of the group under the point.  If the prefix is 1,
3973 prompt for a group name to find the posting style.
3974 @xref{Composing Messages}.
3975
3976 @item i
3977 @kindex i (Group)
3978 @findex gnus-group-news
3979 Start composing a news (@code{gnus-group-news}).  If given a prefix,
3980 post to the group under the point.  If the prefix is 1, prompt
3981 for group to post to.  @xref{Composing Messages}.
3982
3983 This function actually prepares a news even when using mail groups.
3984 This is useful for "posting" messages to mail groups without actually
3985 sending them over the network: they're just saved directly to the group
3986 in question.  The corresponding back end must have a request-post method
3987 for this to work though.
3988
3989 @end table
3990
3991 Variables for the group buffer:
3992
3993 @table @code
3994
3995 @item gnus-group-mode-hook
3996 @vindex gnus-group-mode-hook
3997 is called after the group buffer has been
3998 created.
3999
4000 @item gnus-group-prepare-hook
4001 @vindex gnus-group-prepare-hook
4002 is called after the group buffer is
4003 generated.  It may be used to modify the buffer in some strange,
4004 unnatural way.
4005
4006 @item gnus-group-prepared-hook
4007 @vindex gnus-group-prepare-hook
4008 is called as the very last thing after the group buffer has been
4009 generated.  It may be used to move point around, for instance.
4010
4011 @item gnus-permanently-visible-groups
4012 @vindex gnus-permanently-visible-groups
4013 Groups matching this regexp will always be listed in the group buffer,
4014 whether they are empty or not.
4015
4016 @item gnus-group-name-charset-method-alist
4017 @vindex gnus-group-name-charset-method-alist
4018 An alist of method and the charset for group names. It is used to show
4019 non-ASCII group names.
4020
4021 For example:
4022 @lisp
4023 (setq gnus-group-name-charset-method-alist
4024     '(((nntp "news.com.cn") . cn-gb-2312)))
4025 @end lisp
4026
4027 @item gnus-group-name-charset-group-alist
4028 @cindex UTF-8 group names
4029 @vindex gnus-group-name-charset-group-alist
4030 An alist of regexp of group name and the charset for group names.  It
4031 is used to show non-ASCII group names.  @code{((".*" utf-8))} is the
4032 default value if UTF-8 is supported, otherwise the default is nil.
4033
4034 For example:
4035 @lisp
4036 (setq gnus-group-name-charset-group-alist
4037     '(("\\.com\\.cn:" . cn-gb-2312)))
4038 @end lisp
4039
4040 @end table
4041
4042 @node Scanning New Messages
4043 @subsection Scanning New Messages
4044 @cindex new messages
4045 @cindex scanning new news
4046
4047 @table @kbd
4048
4049 @item g
4050 @kindex g (Group)
4051 @findex gnus-group-get-new-news
4052 @c @icon{gnus-group-get-new-news}
4053 Check the server(s) for new articles.  If the numerical prefix is used,
4054 this command will check only groups of level @var{arg} and lower
4055 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4056 command will force a total re-reading of the active file(s) from the
4057 back end(s).
4058
4059 @item M-g
4060 @kindex M-g (Group)
4061 @findex gnus-group-get-new-news-this-group
4062 @vindex gnus-goto-next-group-when-activating
4063 @c @icon{gnus-group-get-new-news-this-group}
4064 Check whether new articles have arrived in the current group
4065 (@code{gnus-group-get-new-news-this-group}).
4066 @code{gnus-goto-next-group-when-activating} says whether this command is
4067 to move point to the next group or not.  It is @code{t} by default.
4068
4069 @findex gnus-activate-all-groups
4070 @cindex activating groups
4071 @item C-c M-g
4072 @kindex C-c M-g (Group)
4073 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4074
4075 @item R
4076 @kindex R (Group)
4077 @cindex restarting
4078 @findex gnus-group-restart
4079 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4080 file(s), closes the connection to all servers, clears up all run-time
4081 Gnus variables, and then starts Gnus all over again.
4082
4083 @end table
4084
4085 @vindex gnus-get-new-news-hook
4086 @code{gnus-get-new-news-hook} is run just before checking for new news.
4087
4088 @vindex gnus-after-getting-new-news-hook
4089 @code{gnus-after-getting-new-news-hook} is run after checking for new
4090 news.
4091
4092
4093 @node Group Information
4094 @subsection Group Information
4095 @cindex group information
4096 @cindex information on groups
4097
4098 @table @kbd
4099
4100
4101 @item H f
4102 @kindex H f (Group)
4103 @findex gnus-group-fetch-faq
4104 @vindex gnus-group-faq-directory
4105 @cindex FAQ
4106 @cindex ange-ftp
4107 Try to fetch the FAQ for the current group
4108 (@code{gnus-group-fetch-faq}).  Gnus will try to get the FAQ from
4109 @code{gnus-group-faq-directory}, which is usually a directory on a
4110 remote machine.  This variable can also be a list of directories.  In
4111 that case, giving a prefix to this command will allow you to choose
4112 between the various sites.  @code{ange-ftp} (or @code{efs}) will be used
4113 for fetching the file.
4114
4115 If fetching from the first site is unsuccessful, Gnus will attempt to go
4116 through @code{gnus-group-faq-directory} and try to open them one by one.
4117
4118 @item H c
4119 @kindex H c (Group)
4120 @findex gnus-group-fetch-charter
4121 @vindex gnus-group-charter-alist
4122 @cindex charter
4123 Try to open the charter for the current group in a web browser
4124 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4125 prefix argument.
4126
4127 Gnus will use @code{gnus-group-charter-alist} to find the location of
4128 the charter.  If no location is known, Gnus will fetch the control
4129 messages for the group, which in some cases includes the charter.
4130
4131 @item H C
4132 @kindex H C (Group)
4133 @findex gnus-group-fetch-control
4134 @vindex gnus-group-fetch-control-use-browse-url
4135 @cindex control message
4136 Fetch the control messages for the group from the archive at
4137 @code{ftp.isc.org} (@code{gnus-group-fetch-control}). Query for a
4138 group if given a prefix argument.
4139
4140 If @code{gnus-group-fetch-control-use-browse-url} is non-nil, Gnus
4141 will open the control messages in a browser using @code{browse-url}.
4142 Otherwise they are fetched using @code{ange-ftp} and displayed in an
4143 ephemeral group.
4144
4145 Note that the control messages are compressed.  To use this command
4146 you need to turn on @code{auto-compression-mode}
4147 (@pxref{(emacs)Compressed Files}).
4148
4149 @item H d
4150 @itemx C-c C-d
4151 @c @icon{gnus-group-describe-group}
4152 @kindex H d (Group)
4153 @kindex C-c C-d (Group)
4154 @cindex describing groups
4155 @cindex group description
4156 @findex gnus-group-describe-group
4157 Describe the current group (@code{gnus-group-describe-group}).  If given
4158 a prefix, force Gnus to re-read the description from the server.
4159
4160 @item M-d
4161 @kindex M-d (Group)
4162 @findex gnus-group-describe-all-groups
4163 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4164 prefix, force Gnus to re-read the description file from the server.
4165
4166 @item H v
4167 @itemx V
4168 @kindex V (Group)
4169 @kindex H v (Group)
4170 @cindex version
4171 @findex gnus-version
4172 Display current Gnus version numbers (@code{gnus-version}).
4173
4174 @item ?
4175 @kindex ? (Group)
4176 @findex gnus-group-describe-briefly
4177 Give a very short help message (@code{gnus-group-describe-briefly}).
4178
4179 @item C-c C-i
4180 @kindex C-c C-i (Group)
4181 @cindex info
4182 @cindex manual
4183 @findex gnus-info-find-node
4184 Go to the Gnus info node (@code{gnus-info-find-node}).
4185 @end table
4186
4187
4188 @node Group Timestamp
4189 @subsection Group Timestamp
4190 @cindex timestamps
4191 @cindex group timestamps
4192
4193 It can be convenient to let Gnus keep track of when you last read a
4194 group.  To set the ball rolling, you should add
4195 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4196
4197 @lisp
4198 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4199 @end lisp
4200
4201 After doing this, each time you enter a group, it'll be recorded.
4202
4203 This information can be displayed in various ways---the easiest is to
4204 use the @samp{%d} spec in the group line format:
4205
4206 @lisp
4207 (setq gnus-group-line-format
4208       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4209 @end lisp
4210
4211 This will result in lines looking like:
4212
4213 @example
4214 *        0: mail.ding                                19961002T012943
4215          0: custom                                   19961002T012713
4216 @end example
4217
4218 As you can see, the date is displayed in compact ISO 8601 format.  This
4219 may be a bit too much, so to just display the date, you could say
4220 something like:
4221
4222 @lisp
4223 (setq gnus-group-line-format
4224       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4225 @end lisp
4226
4227 If you would like greater control of the time format, you can use a
4228 user-defined format spec.  Something like the following should do the
4229 trick:
4230
4231 @lisp
4232 (setq gnus-group-line-format
4233       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4234 (defun gnus-user-format-function-d (headers)
4235   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4236     (if time
4237         (format-time-string "%b %d  %H:%M" time)
4238       "")))
4239 @end lisp
4240
4241
4242 @node File Commands
4243 @subsection File Commands
4244 @cindex file commands
4245
4246 @table @kbd
4247
4248 @item r
4249 @kindex r (Group)
4250 @findex gnus-group-read-init-file
4251 @vindex gnus-init-file
4252 @cindex reading init file
4253 Re-read the init file (@code{gnus-init-file}, which defaults to
4254 @file{~/.gnus}) (@code{gnus-group-read-init-file}).
4255
4256 @item s
4257 @kindex s (Group)
4258 @findex gnus-group-save-newsrc
4259 @cindex saving .newsrc
4260 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4261 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4262 file(s) whether Gnus thinks it is necessary or not.
4263
4264 @c @item Z
4265 @c @kindex Z (Group)
4266 @c @findex gnus-group-clear-dribble
4267 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4268
4269 @end table
4270
4271
4272 @node Sieve Commands
4273 @subsection Sieve Commands
4274 @cindex group sieve commands
4275
4276 Sieve is a server-side mail filtering language.  In Gnus you can use
4277 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4278 sieve rules that should apply to each group.  Gnus provides two
4279 commands to translate all these group parameters into a proper Sieve
4280 script that can be transfered to the server somehow.
4281
4282 @vindex gnus-sieve-file
4283 @vindex gnus-sieve-region-start
4284 @vindex gnus-sieve-region-end
4285 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4286 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4287 between two delimiters, @code{gnus-sieve-region-start} and
4288 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4289 outside these delimiters that will not be removed the next time you
4290 regenerate the Sieve script.
4291
4292 @vindex gnus-sieve-crosspost
4293 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4294 is generated.  If it is non-nil (the default) articles is placed in
4295 all groups that have matching rules, otherwise the article is only
4296 placed in the group with the first matching rule.  For example, the
4297 group parameter @samp{(sieve address "sender"
4298 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4299 code if @code{gnus-sieve-crosspost} is nil. (When
4300 @code{gnus-sieve-crosspost} is non-nil, it looks the same except that
4301 the line containing the call to @code{stop} is removed.)
4302
4303 @example
4304 if address "sender" "owner-ding@@hpc.uh.edu" @{
4305         fileinto "INBOX.ding";
4306         stop;
4307 @}
4308 @end example
4309
4310 @xref{Top, ,Top, sieve, Emacs Sieve}.
4311
4312 @table @kbd
4313
4314 @item D g
4315 @kindex D g (Group)
4316 @findex gnus-sieve-generate
4317 @vindex gnus-sieve-file
4318 @cindex generating sieve script
4319 Regenerate a Sieve script from the @code{sieve} group parameters and
4320 put you into the @code{gnus-sieve-file} without saving it.
4321
4322 @item D u
4323 @kindex D u (Group)
4324 @findex gnus-sieve-update
4325 @vindex gnus-sieve-file
4326 @cindex updating sieve script
4327 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4328 @code{sieve} group parameters, save the file and upload it to the
4329 server using the @code{sieveshell} program.
4330
4331 @end table
4332
4333
4334 @node Summary Buffer
4335 @chapter Summary Buffer
4336 @cindex summary buffer
4337
4338 A line for each article is displayed in the summary buffer.  You can
4339 move around, read articles, post articles and reply to articles.
4340
4341 The most common way to a summary buffer is to select a group from the
4342 group buffer (@pxref{Selecting a Group}).
4343
4344 You can have as many summary buffers open as you wish.
4345
4346 @menu
4347 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4348 * Summary Maneuvering::         Moving around the summary buffer.
4349 * Choosing Articles::           Reading articles.
4350 * Paging the Article::          Scrolling the current article.
4351 * Reply Followup and Post::     Posting articles.
4352 * Delayed Articles::            Send articles at a later time.
4353 * Marking Articles::            Marking articles as read, expirable, etc.
4354 * Limiting::                    You can limit the summary buffer.
4355 * Threading::                   How threads are made.
4356 * Sorting the Summary Buffer::  How articles and threads are sorted.
4357 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4358 * Article Caching::             You may store articles in a cache.
4359 * Persistent Articles::         Making articles expiry-resistant.
4360 * Article Backlog::             Having already read articles hang around.
4361 * Saving Articles::             Ways of customizing article saving.
4362 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4363 * Article Treatment::           The article buffer can be mangled at will.
4364 * MIME Commands::               Doing MIMEy things with the articles.
4365 * Charsets::                    Character set issues.
4366 * Article Commands::            Doing various things with the article buffer.
4367 * Summary Sorting::             Sorting the summary buffer in various ways.
4368 * Finding the Parent::          No child support? Get the parent.
4369 * Alternative Approaches::      Reading using non-default summaries.
4370 * Tree Display::                A more visual display of threads.
4371 * Mail Group Commands::         Some commands can only be used in mail groups.
4372 * Various Summary Stuff::       What didn't fit anywhere else.
4373 * Exiting the Summary Buffer::  Returning to the Group buffer,
4374                                 or reselecting the current group.
4375 * Crosspost Handling::          How crossposted articles are dealt with.
4376 * Duplicate Suppression::       An alternative when crosspost handling fails.
4377 * Security::                    Decrypt and Verify.
4378 * Mailing List::                Mailing list minor mode.
4379 @end menu
4380
4381
4382 @node Summary Buffer Format
4383 @section Summary Buffer Format
4384 @cindex summary buffer format
4385
4386 @iftex
4387 @iflatex
4388 \gnusfigure{The Summary Buffer}{180}{
4389 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4390 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4391 }
4392 @end iflatex
4393 @end iftex
4394
4395 @menu
4396 * Summary Buffer Lines::        You can specify how summary lines should look.
4397 * To From Newsgroups::          How to not display your own name.
4398 * Summary Buffer Mode Line::    You can say how the mode line should look.
4399 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4400 @end menu
4401
4402 @findex mail-extract-address-components
4403 @findex gnus-extract-address-components
4404 @vindex gnus-extract-address-components
4405 Gnus will use the value of the @code{gnus-extract-address-components}
4406 variable as a function for getting the name and address parts of a
4407 @code{From} header.  Two pre-defined functions exist:
4408 @code{gnus-extract-address-components}, which is the default, quite
4409 fast, and too simplistic solution; and
4410 @code{mail-extract-address-components}, which works very nicely, but is
4411 slower.  The default function will return the wrong answer in 5% of the
4412 cases.  If this is unacceptable to you, use the other function instead:
4413
4414 @lisp
4415 (setq gnus-extract-address-components
4416       'mail-extract-address-components)
4417 @end lisp
4418
4419 @vindex gnus-summary-same-subject
4420 @code{gnus-summary-same-subject} is a string indicating that the current
4421 article has the same subject as the previous.  This string will be used
4422 with those specs that require it.  The default is @code{""}.
4423
4424
4425 @node Summary Buffer Lines
4426 @subsection Summary Buffer Lines
4427
4428 @vindex gnus-summary-line-format
4429 You can change the format of the lines in the summary buffer by changing
4430 the @code{gnus-summary-line-format} variable.  It works along the same
4431 lines as a normal @code{format} string, with some extensions
4432 (@pxref{Formatting Variables}).
4433
4434 There should always be a colon or a point position marker on the line;
4435 the cursor always moves to the point position marker or the colon after
4436 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4437 possible to change this.  Just write a new function
4438 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4439 @xref{Positioning Point}.
4440
4441 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4442
4443 The following format specification characters and extended format
4444 specification(s) are understood:
4445
4446 @table @samp
4447 @item N
4448 Article number.
4449 @item S
4450 Subject string.  List identifiers stripped,
4451 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4452 @item s
4453 Subject if the article is the root of the thread or the previous article
4454 had a different subject, @code{gnus-summary-same-subject} otherwise.
4455 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4456 @item F
4457 Full @code{From} header.
4458 @item n
4459 The name (from the @code{From} header).
4460 @item f
4461 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4462 From Newsgroups}).
4463 @item a
4464 The name (from the @code{From} header).  This differs from the @code{n}
4465 spec in that it uses the function designated by the
4466 @code{gnus-extract-address-components} variable, which is slower, but
4467 may be more thorough.
4468 @item A
4469 The address (from the @code{From} header).  This works the same way as
4470 the @code{a} spec.
4471 @item L
4472 Number of lines in the article.
4473 @item c
4474 Number of characters in the article. This specifier is not supported
4475 in some methods (like nnfolder).
4476 @item k
4477 Pretty-printed version of the number of characters in the article;
4478 for example, @samp{1.2k} or @samp{0.4M}.
4479 @item I
4480 Indentation based on thread level (@pxref{Customizing Threading}).
4481 @item B
4482 A complex trn-style thread tree, showing response-connecting trace
4483 lines.
4484 @item T
4485 Nothing if the article is a root and lots of spaces if it isn't (it
4486 pushes everything after it off the screen).
4487 @item [
4488 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4489 for adopted articles (@pxref{Customizing Threading}).
4490 @item ]
4491 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4492 for adopted articles.
4493 @item >
4494 One space for each thread level.
4495 @item <
4496 Twenty minus thread level spaces.
4497 @item U
4498 Unread. @xref{Read Articles}.
4499
4500 @item R
4501 This misleadingly named specifier is the @dfn{secondary mark}.  This
4502 mark will say whether the article has been replied to, has been cached,
4503 or has been saved.  @xref{Other Marks}.
4504
4505 @item i
4506 Score as a number (@pxref{Scoring}).
4507 @item z
4508 @vindex gnus-summary-zcore-fuzz
4509 Zcore, @samp{+} if above the default level and @samp{-} if below the
4510 default level.  If the difference between
4511 @code{gnus-summary-default-score} and the score is less than
4512 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4513 @item V
4514 Total thread score.
4515 @item x
4516 @code{Xref}.
4517 @item D
4518 @code{Date}.
4519 @item d
4520 The @code{Date} in @code{DD-MMM} format.
4521 @item o
4522 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4523 @item M
4524 @code{Message-ID}.
4525 @item r
4526 @code{References}.
4527 @item t
4528 Number of articles in the current sub-thread.  Using this spec will slow
4529 down summary buffer generation somewhat.
4530 @item e
4531 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4532 article has any children.
4533 @item P
4534 The line number.
4535 @item O
4536 Download mark.
4537 @item &user-date;
4538 Age sensitive date format.  Various date format is defined in
4539 @code{gnus-user-date-format-alist}.
4540 @item u
4541 User defined specifier.  The next character in the format string should
4542 be a letter.  Gnus will call the function
4543 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
4544 following @samp{%u}.  The function will be passed the current header as
4545 argument.  The function should return a string, which will be inserted
4546 into the summary just like information from any other summary specifier.
4547 @end table
4548
4549 Text between @samp{%(} and @samp{%)} will be highlighted with
4550 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4551 There can only be one such area.
4552
4553 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4554 have to be handled with care.  For reasons of efficiency, Gnus will
4555 compute what column these characters will end up in, and ``hard-code''
4556 that.  This means that it is invalid to have these specs after a
4557 variable-length spec.  Well, you might not be arrested, but your summary
4558 buffer will look strange, which is bad enough.
4559
4560 The smart choice is to have these specs as far to the left as possible.
4561 (Isn't that the case with everything, though?  But I digress.)
4562
4563 This restriction may disappear in later versions of Gnus.
4564
4565
4566 @node To From Newsgroups
4567 @subsection To From Newsgroups
4568 @cindex To
4569 @cindex Newsgroups
4570
4571 In some groups (particularly in archive groups), the @code{From} header
4572 isn't very interesting, since all the articles there are written by
4573 you.  To display the information in the @code{To} or @code{Newsgroups}
4574 headers instead, you need to decide three things: What information to
4575 gather; where to display it; and when to display it.
4576
4577 @enumerate
4578 @item
4579 @vindex gnus-extra-headers
4580 The reading of extra header information is controlled by the
4581 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4582 instance:
4583
4584 @lisp
4585 (setq gnus-extra-headers
4586       '(To Newsgroups X-Newsreader))
4587 @end lisp
4588
4589 This will result in Gnus trying to obtain these three headers, and
4590 storing it in header structures for later easy retrieval.
4591
4592 @item
4593 @findex gnus-extra-header
4594 The value of these extra headers can be accessed via the
4595 @code{gnus-extra-header} function.  Here's a format line spec that will
4596 access the @code{X-Newsreader} header:
4597
4598 @example
4599 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4600 @end example
4601
4602 @item
4603 @vindex gnus-ignored-from-addresses
4604 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4605 summary line spec returns the @code{To}, @code{Newsreader} or
4606 @code{From} header.  If this regexp matches the contents of the
4607 @code{From} header, the value of the @code{To} or @code{Newsreader}
4608 headers are used instead.
4609
4610 @end enumerate
4611
4612 @vindex nnmail-extra-headers
4613 A related variable is @code{nnmail-extra-headers}, which controls when
4614 to include extra headers when generating overview (@sc{nov}) files.  If
4615 you have old overview files, you should regenerate them after changing
4616 this variable, by entering the server buffer using `^', and then `g' on
4617 the appropriate mail server (e.g. nnml) to cause regeneration.
4618
4619 @vindex gnus-summary-line-format
4620 You also have to instruct Gnus to display the data by changing the
4621 @code{%n} spec to the @code{%f} spec in the
4622 @code{gnus-summary-line-format} variable.
4623
4624 In summary, you'd typically put something like the following in
4625 @file{~/.gnus}:
4626
4627 @lisp
4628 (setq gnus-extra-headers
4629       '(To Newsgroups))
4630 (setq nnmail-extra-headers gnus-extra-headers)
4631 (setq gnus-summary-line-format
4632       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4633 (setq gnus-ignored-from-addresses
4634       "Your Name Here")
4635 @end lisp
4636
4637 (The values listed above are the default values in Gnus.  Alter them
4638 to fit your needs.)
4639
4640 A note for news server administrators, or for users who wish to try to
4641 convince their news server administrator to provide some additional
4642 support:
4643
4644 The above is mostly useful for mail groups, where you have control over
4645 the @sc{nov} files that are created.  However, if you can persuade your
4646 nntp admin to add (in the usual implementation, notably INN):
4647
4648 @example
4649 Newsgroups:full
4650 @end example
4651
4652 to the end of her @file{overview.fmt} file, then you can use that just
4653 as you would the extra headers from the mail groups.
4654
4655
4656 @node Summary Buffer Mode Line
4657 @subsection Summary Buffer Mode Line
4658
4659 @vindex gnus-summary-mode-line-format
4660 You can also change the format of the summary mode bar (@pxref{Mode Line
4661 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4662 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4663
4664 Here are the elements you can play with:
4665
4666 @table @samp
4667 @item G
4668 Group name.
4669 @item p
4670 Unprefixed group name.
4671 @item A
4672 Current article number.
4673 @item z
4674 Current article score.
4675 @item V
4676 Gnus version.
4677 @item U
4678 Number of unread articles in this group.
4679 @item e
4680 Number of unread articles in this group that aren't displayed in the
4681 summary buffer.
4682 @item Z
4683 A string with the number of unread and unselected articles represented
4684 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4685 articles, and just as @samp{<%U more>} if there are just unread articles
4686 and no unselected ones.
4687 @item g
4688 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4689 shortened to @samp{r.a.anime}.
4690 @item S
4691 Subject of the current article.
4692 @item u
4693 User-defined spec (@pxref{User-Defined Specs}).
4694 @item s
4695 Name of the current score file (@pxref{Scoring}).
4696 @item d
4697 Number of dormant articles (@pxref{Unread Articles}).
4698 @item t
4699 Number of ticked articles (@pxref{Unread Articles}).
4700 @item r
4701 Number of articles that have been marked as read in this session.
4702 @item E
4703 Number of articles expunged by the score files.
4704 @end table
4705
4706
4707 @node Summary Highlighting
4708 @subsection Summary Highlighting
4709
4710 @table @code
4711
4712 @item gnus-visual-mark-article-hook
4713 @vindex gnus-visual-mark-article-hook
4714 This hook is run after selecting an article.  It is meant to be used for
4715 highlighting the article in some way.  It is not run if
4716 @code{gnus-visual} is @code{nil}.
4717
4718 @item gnus-summary-update-hook
4719 @vindex gnus-summary-update-hook
4720 This hook is called when a summary line is changed.  It is not run if
4721 @code{gnus-visual} is @code{nil}.
4722
4723 @item gnus-summary-selected-face
4724 @vindex gnus-summary-selected-face
4725 This is the face (or @dfn{font} as some people call it) used to
4726 highlight the current article in the summary buffer.
4727
4728 @item gnus-summary-highlight
4729 @vindex gnus-summary-highlight
4730 Summary lines are highlighted according to this variable, which is a
4731 list where the elements are of the format @code{(@var{form}
4732 . @var{face})}.  If you would, for instance, like ticked articles to be
4733 italic and high-scored articles to be bold, you could set this variable
4734 to something like
4735 @lisp
4736 (((eq mark gnus-ticked-mark) . italic)
4737  ((> score default) . bold))
4738 @end lisp
4739 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4740 @var{face} will be applied to the line.
4741 @end table
4742
4743
4744 @node Summary Maneuvering
4745 @section Summary Maneuvering
4746 @cindex summary movement
4747
4748 All the straight movement commands understand the numeric prefix and
4749 behave pretty much as you'd expect.
4750
4751 None of these commands select articles.
4752
4753 @table @kbd
4754 @item G M-n
4755 @itemx M-n
4756 @kindex M-n (Summary)
4757 @kindex G M-n (Summary)
4758 @findex gnus-summary-next-unread-subject
4759 Go to the next summary line of an unread article
4760 (@code{gnus-summary-next-unread-subject}).
4761
4762 @item G M-p
4763 @itemx M-p
4764 @kindex M-p (Summary)
4765 @kindex G M-p (Summary)
4766 @findex gnus-summary-prev-unread-subject
4767 Go to the previous summary line of an unread article
4768 (@code{gnus-summary-prev-unread-subject}).
4769
4770 @item G g
4771 @kindex G g (Summary)
4772 @findex gnus-summary-goto-subject
4773 Ask for an article number and then go to the summary line of that article
4774 without displaying the article (@code{gnus-summary-goto-subject}).
4775 @end table
4776
4777 If Gnus asks you to press a key to confirm going to the next group, you
4778 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4779 buffer, searching for the next group to read without actually returning
4780 to the group buffer.
4781
4782 Variables related to summary movement:
4783
4784 @table @code
4785
4786 @vindex gnus-auto-select-next
4787 @item gnus-auto-select-next
4788 If you issue one of the movement commands (like @kbd{n}) and there are
4789 no more unread articles after the current one, Gnus will offer to go to
4790 the next group.  If this variable is @code{t} and the next group is
4791 empty, Gnus will exit summary mode and return to the group buffer.  If
4792 this variable is neither @code{t} nor @code{nil}, Gnus will select the
4793 next group with unread articles.  As a special case, if this variable
4794 is @code{quietly}, Gnus will select the next group without asking for
4795 confirmation.  If this variable is @code{almost-quietly}, the same
4796 will happen only if you are located on the last article in the group.
4797 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4798 command will go to the next group without confirmation.  Also
4799 @pxref{Group Levels}.
4800
4801 @item gnus-auto-select-same
4802 @vindex gnus-auto-select-same
4803 If non-@code{nil}, all the movement commands will try to go to the next
4804 article with the same subject as the current.  (@dfn{Same} here might
4805 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4806 for details (@pxref{Customizing Threading}).)  If there are no more
4807 articles with the same subject, go to the first unread article.
4808
4809 This variable is not particularly useful if you use a threaded display.
4810
4811 @item gnus-summary-check-current
4812 @vindex gnus-summary-check-current
4813 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4814 to the next (or previous) article if the current article is unread.
4815 Instead, they will choose the current article.
4816
4817 @item gnus-auto-center-summary
4818 @vindex gnus-auto-center-summary
4819 If non-@code{nil}, Gnus will keep the point in the summary buffer
4820 centered at all times.  This makes things quite tidy, but if you have a
4821 slow network connection, or simply do not like this un-Emacsism, you can
4822 set this variable to @code{nil} to get the normal Emacs scrolling
4823 action.  This will also inhibit horizontal re-centering of the summary
4824 buffer, which might make it more inconvenient to read extremely long
4825 threads.
4826
4827 This variable can also be a number.  In that case, center the window at
4828 the given number of lines from the top.
4829
4830 @end table
4831
4832
4833 @node Choosing Articles
4834 @section Choosing Articles
4835 @cindex selecting articles
4836
4837 @menu
4838 * Choosing Commands::           Commands for choosing articles.
4839 * Choosing Variables::          Variables that influence these commands.
4840 @end menu
4841
4842
4843 @node Choosing Commands
4844 @subsection Choosing Commands
4845
4846 None of the following movement commands understand the numeric prefix,
4847 and they all select and display an article.
4848
4849 If you want to fetch new articles or redisplay the group, see
4850 @ref{Exiting the Summary Buffer}.
4851
4852 @table @kbd
4853 @item SPACE
4854 @kindex SPACE (Summary)
4855 @findex gnus-summary-next-page
4856 Select the current article, or, if that one's read already, the next
4857 unread article (@code{gnus-summary-next-page}).
4858
4859 @item G n
4860 @itemx n
4861 @kindex n (Summary)
4862 @kindex G n (Summary)
4863 @findex gnus-summary-next-unread-article
4864 @c @icon{gnus-summary-next-unread}
4865 Go to next unread article (@code{gnus-summary-next-unread-article}).
4866
4867 @item G p
4868 @itemx p
4869 @kindex p (Summary)
4870 @findex gnus-summary-prev-unread-article
4871 @c @icon{gnus-summary-prev-unread}
4872 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
4873
4874 @item G N
4875 @itemx N
4876 @kindex N (Summary)
4877 @kindex G N (Summary)
4878 @findex gnus-summary-next-article
4879 Go to the next article (@code{gnus-summary-next-article}).
4880
4881 @item G P
4882 @itemx P
4883 @kindex P (Summary)
4884 @kindex G P (Summary)
4885 @findex gnus-summary-prev-article
4886 Go to the previous article (@code{gnus-summary-prev-article}).
4887
4888 @item G C-n
4889 @kindex G C-n (Summary)
4890 @findex gnus-summary-next-same-subject
4891 Go to the next article with the same subject
4892 (@code{gnus-summary-next-same-subject}).
4893
4894 @item G C-p
4895 @kindex G C-p (Summary)
4896 @findex gnus-summary-prev-same-subject
4897 Go to the previous article with the same subject
4898 (@code{gnus-summary-prev-same-subject}).
4899
4900 @item G f
4901 @itemx .
4902 @kindex G f  (Summary)
4903 @kindex .  (Summary)
4904 @findex gnus-summary-first-unread-article
4905 Go to the first unread article
4906 (@code{gnus-summary-first-unread-article}).
4907
4908 @item G b
4909 @itemx ,
4910 @kindex G b (Summary)
4911 @kindex , (Summary)
4912 @findex gnus-summary-best-unread-article
4913 Go to the unread article with the highest score
4914 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
4915 go to the first unread article that has a score over the default score.
4916
4917 @item G l
4918 @itemx l
4919 @kindex l (Summary)
4920 @kindex G l (Summary)
4921 @findex gnus-summary-goto-last-article
4922 Go to the previous article read (@code{gnus-summary-goto-last-article}).
4923
4924 @item G o
4925 @kindex G o (Summary)
4926 @findex gnus-summary-pop-article
4927 @cindex history
4928 @cindex article history
4929 Pop an article off the summary history and go to this article
4930 (@code{gnus-summary-pop-article}).  This command differs from the
4931 command above in that you can pop as many previous articles off the
4932 history as you like, while @kbd{l} toggles the two last read articles.
4933 For a somewhat related issue (if you use these commands a lot),
4934 @pxref{Article Backlog}.
4935
4936 @item G j
4937 @itemx j
4938 @kindex j (Summary)
4939 @kindex G j (Summary)
4940 @findex gnus-summary-goto-article
4941 Ask for an article number or @code{Message-ID}, and then go to that
4942 article (@code{gnus-summary-goto-article}).
4943
4944 @end table
4945
4946
4947 @node Choosing Variables
4948 @subsection Choosing Variables
4949
4950 Some variables relevant for moving and selecting articles:
4951
4952 @table @code
4953 @item gnus-auto-extend-newsgroup
4954 @vindex gnus-auto-extend-newsgroup
4955 All the movement commands will try to go to the previous (or next)
4956 article, even if that article isn't displayed in the Summary buffer if
4957 this variable is non-@code{nil}.  Gnus will then fetch the article from
4958 the server and display it in the article buffer.
4959
4960 @item gnus-select-article-hook
4961 @vindex gnus-select-article-hook
4962 This hook is called whenever an article is selected.  By default it
4963 exposes any threads hidden under the selected article.
4964
4965 @item gnus-mark-article-hook
4966 @vindex gnus-mark-article-hook
4967 @findex gnus-summary-mark-unread-as-read
4968 @findex gnus-summary-mark-read-and-unread-as-read
4969 @findex gnus-unread-mark
4970 This hook is called whenever an article is selected.  It is intended to
4971 be used for marking articles as read.  The default value is
4972 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
4973 mark of almost any article you read to @code{gnus-unread-mark}.  The
4974 only articles not affected by this function are ticked, dormant, and
4975 expirable articles.  If you'd instead like to just have unread articles
4976 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
4977 instead.  It will leave marks like @code{gnus-low-score-mark},
4978 @code{gnus-del-mark} (and so on) alone.
4979
4980 @end table
4981
4982
4983 @node Paging the Article
4984 @section Scrolling the Article
4985 @cindex article scrolling
4986
4987 @table @kbd
4988
4989 @item SPACE
4990 @kindex SPACE (Summary)
4991 @findex gnus-summary-next-page
4992 Pressing @kbd{SPACE} will scroll the current article forward one page,
4993 or, if you have come to the end of the current article, will choose the
4994 next article (@code{gnus-summary-next-page}).
4995
4996 @item DEL
4997 @kindex DEL (Summary)
4998 @findex gnus-summary-prev-page
4999 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5000
5001 @item RET
5002 @kindex RET (Summary)
5003 @findex gnus-summary-scroll-up
5004 Scroll the current article one line forward
5005 (@code{gnus-summary-scroll-up}).
5006
5007 @item M-RET
5008 @kindex M-RET (Summary)
5009 @findex gnus-summary-scroll-down
5010 Scroll the current article one line backward
5011 (@code{gnus-summary-scroll-down}).
5012
5013 @item A g
5014 @itemx g
5015 @kindex A g (Summary)
5016 @kindex g (Summary)
5017 @findex gnus-summary-show-article
5018 @vindex gnus-summary-show-article-charset-alist
5019 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5020 given a prefix, fetch the current article, but don't run any of the
5021 article treatment functions.  This will give you a ``raw'' article, just
5022 the way it came from the server.
5023
5024 If given a numerical prefix, you can do semi-manual charset stuff.
5025 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5026 encoded in the @code{cn-gb-2312} charset.  If you have
5027
5028 @lisp
5029 (setq gnus-summary-show-article-charset-alist
5030       '((1 . cn-gb-2312)
5031         (2 . big5)))
5032 @end lisp
5033
5034 then you can say @kbd{C-u 1 g} to get the same effect.
5035
5036 @item A <
5037 @itemx <
5038 @kindex < (Summary)
5039 @kindex A < (Summary)
5040 @findex gnus-summary-beginning-of-article
5041 Scroll to the beginning of the article
5042 (@code{gnus-summary-beginning-of-article}).
5043
5044 @item A >
5045 @itemx >
5046 @kindex > (Summary)
5047 @kindex A > (Summary)
5048 @findex gnus-summary-end-of-article
5049 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5050
5051 @item A s
5052 @itemx s
5053 @kindex A s (Summary)
5054 @kindex s (Summary)
5055 @findex gnus-summary-isearch-article
5056 Perform an isearch in the article buffer
5057 (@code{gnus-summary-isearch-article}).
5058
5059 @item h
5060 @kindex h (Summary)
5061 @findex gnus-summary-select-article-buffer
5062 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5063
5064 @end table
5065
5066
5067 @node Reply Followup and Post
5068 @section Reply, Followup and Post
5069
5070 @menu
5071 * Summary Mail Commands::       Sending mail.
5072 * Summary Post Commands::       Sending news.
5073 * Summary Message Commands::    Other Message-related commands.
5074 * Canceling and Superseding::   
5075 @end menu
5076
5077
5078 @node Summary Mail Commands
5079 @subsection Summary Mail Commands
5080 @cindex mail
5081 @cindex composing mail
5082
5083 Commands for composing a mail message:
5084
5085 @table @kbd
5086
5087 @item S r
5088 @itemx r
5089 @kindex S r (Summary)
5090 @kindex r (Summary)
5091 @findex gnus-summary-reply
5092 @c @icon{gnus-summary-mail-reply}
5093 @c @icon{gnus-summary-reply}
5094 Mail a reply to the author of the current article
5095 (@code{gnus-summary-reply}).
5096
5097 @item S R
5098 @itemx R
5099 @kindex R (Summary)
5100 @kindex S R (Summary)
5101 @findex gnus-summary-reply-with-original
5102 @c @icon{gnus-summary-reply-with-original}
5103 Mail a reply to the author of the current article and include the
5104 original message (@code{gnus-summary-reply-with-original}).  This
5105 command uses the process/prefix convention.
5106
5107 @item S w
5108 @kindex S w (Summary)
5109 @findex gnus-summary-wide-reply
5110 Mail a wide reply to the author of the current article
5111 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5112 goes out to all people listed in the @code{To}, @code{From} (or
5113 @code{Reply-to}) and @code{Cc} headers.
5114
5115 @item S W
5116 @kindex S W (Summary)
5117 @findex gnus-summary-wide-reply-with-original
5118 Mail a wide reply to the current article and include the original
5119 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5120 the process/prefix convention.
5121
5122 @item S v
5123 @kindex S v (Summary)
5124 @findex gnus-summary-very-wide-reply
5125 Mail a very wide reply to the author of the current article
5126 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5127 that goes out to all people listed in the @code{To}, @code{From} (or
5128 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5129 articles.  This command uses the process/prefix convention.
5130
5131 @item S V
5132 @kindex S V (Summary)
5133 @findex gnus-summary-very-wide-reply-with-original
5134 Mail a very wide reply to the author of the current article and include the
5135 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5136 command uses the process/prefix convention.
5137
5138 @item S B r
5139 @kindex S B r (Summary)
5140 @findex gnus-summary-reply-broken-reply-to
5141 Mail a reply to the author of the current article but ignore the
5142 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5143
5144 @item S B R
5145 @kindex S B R (Summary)
5146 @findex gnus-summary-reply-broken-reply-to-with-original
5147 Mail a reply to the author of the current article and include the
5148 original message but ignore the @code{Reply-To} field
5149 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5150
5151 @item S o m
5152 @itemx C-c C-f
5153 @kindex S o m (Summary)
5154 @kindex C-c C-f (Summary)
5155 @findex gnus-summary-mail-forward
5156 @c @icon{gnus-summary-mail-forward}
5157 Forward the current article to some other person
5158 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
5159 is forwarded according to the value of (@code{message-forward-as-mime})
5160 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
5161 message and forward directly inline; if the prefix is 2, forward message
5162 as an rfc822 @sc{mime} section; if the prefix is 3, decode message and
5163 forward as an rfc822 @sc{mime} section; if the prefix is 4, forward message
5164 directly inline; otherwise, the message is forwarded as no prefix given
5165 but use the flipped value of (@code{message-forward-as-mime}).  By
5166 default, the message is decoded and forwarded as an rfc822 @sc{mime}
5167 section.
5168
5169 @item S m
5170 @itemx m
5171 @kindex m (Summary)
5172 @kindex S m (Summary)
5173 @findex gnus-summary-mail-other-window
5174 @c @icon{gnus-summary-mail-originate}
5175 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5176 the posting style of the current group.  If given a prefix, disable that.
5177 If the prefix is 1, prompt for a group name to find the posting style.
5178
5179 @item S i
5180 @itemx i
5181 @kindex i (Summary)
5182 @kindex S i (Summary)
5183 @findex gnus-summary-news-other-window
5184 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5185 post to the current group.  If given a prefix, disable that.  If the
5186 prefix is 1, prompt for a group to post to.
5187
5188 This function actually prepares a news even when using mail groups.
5189 This is useful for "posting" messages to mail groups without actually
5190 sending them over the network: they're just saved directly to the group
5191 in question.  The corresponding back end must have a request-post method
5192 for this to work though.
5193
5194 @item S D b
5195 @kindex S D b (Summary)
5196 @findex gnus-summary-resend-bounced-mail
5197 @cindex bouncing mail
5198 If you have sent a mail, but the mail was bounced back to you for some
5199 reason (wrong address, transient failure), you can use this command to
5200 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5201 will be popped into a mail buffer where you can edit the headers before
5202 sending the mail off again.  If you give a prefix to this command, and
5203 the bounced mail is a reply to some other mail, Gnus will try to fetch
5204 that mail and display it for easy perusal of its headers.  This might
5205 very well fail, though.
5206
5207 @item S D r
5208 @kindex S D r (Summary)
5209 @findex gnus-summary-resend-message
5210 Not to be confused with the previous command,
5211 @code{gnus-summary-resend-message} will prompt you for an address to
5212 send the current message off to, and then send it to that place.  The
5213 headers of the message won't be altered---but lots of headers that say
5214 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5215 means that you actually send a mail to someone that has a @code{To}
5216 header that (probably) points to yourself.  This will confuse people.
5217 So, natcherly you'll only do that if you're really eVIl.
5218
5219 This command is mainly used if you have several accounts and want to
5220 ship a mail to a different account of yours.  (If you're both
5221 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5222 to the @code{root} account, you may want to resend it to
5223 @code{postmaster}.  Ordnung muss sein!
5224
5225 This command understands the process/prefix convention
5226 (@pxref{Process/Prefix}).
5227
5228 @item S O m
5229 @kindex S O m (Summary)
5230 @findex gnus-uu-digest-mail-forward
5231 Digest the current series (@pxref{Decoding Articles}) and forward the
5232 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
5233 uses the process/prefix convention (@pxref{Process/Prefix}).
5234
5235 @item S M-c
5236 @kindex S M-c (Summary)
5237 @findex gnus-summary-mail-crosspost-complaint
5238 @cindex crossposting
5239 @cindex excessive crossposting
5240 Send a complaint about excessive crossposting to the author of the
5241 current article (@code{gnus-summary-mail-crosspost-complaint}).
5242
5243 @findex gnus-crosspost-complaint
5244 This command is provided as a way to fight back against the current
5245 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5246 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5247 command understands the process/prefix convention
5248 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5249
5250 @end table
5251
5252 Also @xref{Header Commands, ,Header Commands, message, The Message
5253 Manual}, for more information.
5254
5255
5256 @node Summary Post Commands
5257 @subsection Summary Post Commands
5258 @cindex post
5259 @cindex composing news
5260
5261 Commands for posting a news article:
5262
5263 @table @kbd
5264 @item S p
5265 @itemx a
5266 @kindex a (Summary)
5267 @kindex S p (Summary)
5268 @findex gnus-summary-post-news
5269 @c @icon{gnus-summary-post-news}
5270 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5271 default, post to the current group.  If given a prefix, disable that.
5272 If the prefix is 1, prompt for another group instead.
5273
5274 @item S f
5275 @itemx f
5276 @kindex f (Summary)
5277 @kindex S f (Summary)
5278 @findex gnus-summary-followup
5279 @c @icon{gnus-summary-followup}
5280 Post a followup to the current article (@code{gnus-summary-followup}).
5281
5282 @item S F
5283 @itemx F
5284 @kindex S F (Summary)
5285 @kindex F (Summary)
5286 @c @icon{gnus-summary-followup-with-original}
5287 @findex gnus-summary-followup-with-original
5288 Post a followup to the current article and include the original message
5289 (@code{gnus-summary-followup-with-original}).   This command uses the
5290 process/prefix convention.
5291
5292 @item S n
5293 @kindex S n (Summary)
5294 @findex gnus-summary-followup-to-mail
5295 Post a followup to the current article via news, even if you got the
5296 message through mail (@code{gnus-summary-followup-to-mail}).
5297
5298 @item S N
5299 @kindex S N (Summary)
5300 @findex gnus-summary-followup-to-mail-with-original
5301 Post a followup to the current article via news, even if you got the
5302 message through mail and include the original message
5303 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5304 the process/prefix convention.
5305
5306 @item S o p
5307 @kindex S o p (Summary)
5308 @findex gnus-summary-post-forward
5309 Forward the current article to a newsgroup
5310 (@code{gnus-summary-post-forward}).
5311  If no prefix is given, the message is forwarded according to the value
5312 of (@code{message-forward-as-mime}) and
5313 (@code{message-forward-show-mml}); if the prefix is 1, decode the
5314 message and forward directly inline; if the prefix is 2, forward message
5315 as an rfc822 @sc{mime} section; if the prefix is 3, decode message and
5316 forward as an rfc822 @sc{mime} section; if the prefix is 4, forward message
5317 directly inline; otherwise, the message is forwarded as no prefix given
5318 but use the flipped value of (@code{message-forward-as-mime}).  By
5319 default, the message is decoded and forwarded as an rfc822 @sc{mime} section.
5320
5321 @item S O p
5322 @kindex S O p (Summary)
5323 @findex gnus-uu-digest-post-forward
5324 @cindex digests
5325 @cindex making digests
5326 Digest the current series and forward the result to a newsgroup
5327 (@code{gnus-uu-digest-mail-forward}).  This command uses the
5328 process/prefix convention.
5329
5330 @item S u
5331 @kindex S u (Summary)
5332 @findex gnus-uu-post-news
5333 @c @icon{gnus-uu-post-news}
5334 Uuencode a file, split it into parts, and post it as a series
5335 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5336 @end table
5337
5338 Also @xref{Header Commands, ,Header Commands, message, The Message
5339 Manual}, for more information.
5340
5341
5342 @node Summary Message Commands
5343 @subsection Summary Message Commands
5344
5345 @table @kbd
5346 @item S y
5347 @kindex S y (Summary)
5348 @findex gnus-summary-yank-message
5349 Yank the current article into an already existing Message composition
5350 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5351 what message buffer you want to yank into, and understands the
5352 process/prefix convention (@pxref{Process/Prefix}).
5353
5354 @end table
5355
5356
5357 @node Canceling and Superseding
5358 @subsection Canceling Articles
5359 @cindex canceling articles
5360 @cindex superseding articles
5361
5362 Have you ever written something, and then decided that you really,
5363 really, really wish you hadn't posted that?
5364
5365 Well, you can't cancel mail, but you can cancel posts.
5366
5367 @findex gnus-summary-cancel-article
5368 @kindex C (Summary)
5369 @c @icon{gnus-summary-cancel-article}
5370 Find the article you wish to cancel (you can only cancel your own
5371 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5372 c} (@code{gnus-summary-cancel-article}).  Your article will be
5373 canceled---machines all over the world will be deleting your article.
5374 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5375
5376 Be aware, however, that not all sites honor cancels, so your article may
5377 live on here and there, while most sites will delete the article in
5378 question.
5379
5380 Gnus will use the ``current'' select method when canceling.  If you
5381 want to use the standard posting method, use the @samp{a} symbolic
5382 prefix (@pxref{Symbolic Prefixes}).
5383
5384 If you discover that you have made some mistakes and want to do some
5385 corrections, you can post a @dfn{superseding} article that will replace
5386 your original article.
5387
5388 @findex gnus-summary-supersede-article
5389 @kindex S (Summary)
5390 Go to the original article and press @kbd{S s}
5391 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5392 where you can edit the article all you want before sending it off the
5393 usual way.
5394
5395 The same goes for superseding as for canceling, only more so: Some
5396 sites do not honor superseding.  On those sites, it will appear that you
5397 have posted almost the same article twice.
5398
5399 If you have just posted the article, and change your mind right away,
5400 there is a trick you can use to cancel/supersede the article without
5401 waiting for the article to appear on your site first.  You simply return
5402 to the post buffer (which is called @code{*sent ...*}).  There you will
5403 find the article you just posted, with all the headers intact.  Change
5404 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5405 header by substituting one of those words for the word
5406 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5407 you would do normally.  The previous article will be
5408 canceled/superseded.
5409
5410 Just remember, kids: There is no 'c' in 'supersede'.
5411
5412 @node Delayed Articles
5413 @section Delayed Articles
5414 @cindex delayed sending
5415 @cindex send delayed
5416
5417 Sometimes, you might wish to delay the sending of a message.  For
5418 example, you might wish to arrange for a message to turn up just in time
5419 to remind your about the birthday of your Significant Other.  For this,
5420 there is the @code{gnus-delay} package.  Setup is simple:
5421
5422 @lisp
5423 (gnus-delay-initialize)
5424 @end lisp
5425
5426 @findex gnus-delay-article
5427 Normally, to send a message you use the @kbd{C-c C-c} command from
5428 Message mode.  To delay a message, use @kbd{C-c C-j}
5429 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5430 message should be delayed.  Possible answers are:
5431
5432 @itemize @bullet
5433 @item
5434 A time span.  Consists of an integer and a letter.  For example,
5435 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5436 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5437 (months) and @code{Y} (years).
5438
5439 @item
5440 A specific date.  Looks like @code{YYYYY-MM-DD}.  The message will be
5441 delayed until that day, at a specific time (eight o'clock by default).
5442 See also @code{gnus-delay-default-hour}.
5443
5444 @item
5445 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5446 stuff.  The deadline will be at that time today, except if that time has
5447 already passed, then it's at the given time tomorrow.  So if it's ten
5448 o'clock in the morning and you specify @code{11:15}, then the deadline
5449 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5450 that means a time tomorrow.
5451 @end itemize
5452
5453 The action of the @code{gnus-delay-article} command is influenced by a
5454 couple of variables:
5455
5456 @table @code
5457 @item gnus-delay-default-hour
5458 @vindex gnus-delay-default-hour
5459 When you specify a specific date, the message will be due on that hour
5460 on the given date.  Possible values are integers 0 through 23.
5461
5462 @item gnus-delay-default-delay
5463 @vindex gnus-delay-default-delay
5464 This is a string and gives the default delay.  It can be of any of the
5465 formats described above.
5466
5467 @item gnus-delay-group
5468 @vindex gnus-delay-group
5469 Delayed articles will be kept in this group on the drafts server until
5470 they are due.  You probably don't need to change this.  The default
5471 value is @code{"delayed"}.
5472
5473 @item gnus-delay-header
5474 @vindex gnus-delay-header
5475 The deadline for each article will be stored in a header.  This variable
5476 is a string and gives the header name.  You probably don't need to
5477 change this.  The default value is @code{"X-Gnus-Delayed"}.
5478 @end table
5479
5480 The way delaying works is like this: when you use the
5481 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5482 calculates the deadline of the message and stores it in the
5483 @code{X-Gnus-Delayed} header and puts the message in the
5484 @code{nndraft:delayed} group.
5485
5486 And whenever you get new news, Gnus looks through the group for articles
5487 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5488 function for this.  By default, this function is added to the hook
5489 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5490 Maybe you want to use the demon to send drafts?  Just tell the demon to
5491 execute the @code{gnus-delay-send-queue} function.
5492
5493 @table @code
5494 @item gnus-delay-initialize
5495 @findex gnus-delay-initialize
5496 By default, this function installs @code{gnus-delay-send-queue} in
5497 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5498 argument @code{no-check}.  If it is non-nil,
5499 @code{gnus-get-new-news-hook} is not changed.  The optional first
5500 argument is ignored.
5501
5502 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5503 Presumably, you want to use the demon for sending due delayed articles.
5504 Just don't forget to set that up :-)
5505 @end table
5506
5507
5508 @node Marking Articles
5509 @section Marking Articles
5510 @cindex article marking
5511 @cindex article ticking
5512 @cindex marks
5513
5514 There are several marks you can set on an article.
5515
5516 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5517 neologism ohoy!) of the article.  Alphabetic marks generally mean
5518 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5519
5520 In addition, you also have marks that do not affect readedness.
5521
5522 @menu
5523 * Unread Articles::             Marks for unread articles.
5524 * Read Articles::               Marks for read articles.
5525 * Other Marks::                 Marks that do not affect readedness.
5526 @end menu
5527
5528 @ifinfo
5529 There's a plethora of commands for manipulating these marks:
5530 @end ifinfo
5531
5532 @menu
5533 * Setting Marks::             How to set and remove marks.
5534 * Generic Marking Commands::  How to customize the marking.
5535 * Setting Process Marks::     How to mark articles for later processing.
5536 @end menu
5537
5538
5539 @node Unread Articles
5540 @subsection Unread Articles
5541
5542 The following marks mark articles as (kinda) unread, in one form or
5543 other.
5544
5545 @table @samp
5546 @item !
5547 @vindex gnus-ticked-mark
5548 Marked as ticked (@code{gnus-ticked-mark}).
5549
5550 @dfn{Ticked articles} are articles that will remain visible always.  If
5551 you see an article that you find interesting, or you want to put off
5552 reading it, or replying to it, until sometime later, you'd typically
5553 tick it.  However, articles can be expired (from news servers by the
5554 news server software, Gnus itself never expires ticked messages), so if
5555 you want to keep an article forever, you'll have to make it persistent
5556 (@pxref{Persistent Articles}).
5557
5558 @item ?
5559 @vindex gnus-dormant-mark
5560 Marked as dormant (@code{gnus-dormant-mark}).
5561
5562 @dfn{Dormant articles} will only appear in the summary buffer if there
5563 are followups to it.  If you want to see them even if they don't have
5564 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5565 Otherwise (except for the visibility issue), they are just like ticked
5566 messages.
5567
5568 @item SPACE
5569 @vindex gnus-unread-mark
5570 Marked as unread (@code{gnus-unread-mark}).
5571
5572 @dfn{Unread articles} are articles that haven't been read at all yet.
5573 @end table
5574
5575
5576 @node Read Articles
5577 @subsection Read Articles
5578 @cindex expirable mark
5579
5580 All the following marks mark articles as read.
5581
5582 @table @samp
5583
5584 @item r
5585 @vindex gnus-del-mark
5586 These are articles that the user has marked as read with the @kbd{d}
5587 command manually, more or less (@code{gnus-del-mark}).
5588
5589 @item R
5590 @vindex gnus-read-mark
5591 Articles that have actually been read (@code{gnus-read-mark}).
5592
5593 @item O
5594 @vindex gnus-ancient-mark
5595 Articles that were marked as read in previous sessions and are now
5596 @dfn{old} (@code{gnus-ancient-mark}).
5597
5598 @item K
5599 @vindex gnus-killed-mark
5600 Marked as killed (@code{gnus-killed-mark}).
5601
5602 @item X
5603 @vindex gnus-kill-file-mark
5604 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5605
5606 @item Y
5607 @vindex gnus-low-score-mark
5608 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5609
5610 @item C
5611 @vindex gnus-catchup-mark
5612 Marked as read by a catchup (@code{gnus-catchup-mark}).
5613
5614 @item G
5615 @vindex gnus-canceled-mark
5616 Canceled article (@code{gnus-canceled-mark})
5617
5618 @item F
5619 @vindex gnus-souped-mark
5620 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5621
5622 @item Q
5623 @vindex gnus-sparse-mark
5624 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5625 Threading}.
5626
5627 @item M
5628 @vindex gnus-duplicate-mark
5629 Article marked as read by duplicate suppression
5630 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5631
5632 @end table
5633
5634 All these marks just mean that the article is marked as read, really.
5635 They are interpreted differently when doing adaptive scoring, though.
5636
5637 One more special mark, though:
5638
5639 @table @samp
5640 @item E
5641 @vindex gnus-expirable-mark
5642 Marked as expirable (@code{gnus-expirable-mark}).
5643
5644 Marking articles as @dfn{expirable} (or have them marked as such
5645 automatically) doesn't make much sense in normal groups---a user doesn't
5646 control expiring of news articles, but in mail groups, for instance,
5647 articles marked as @dfn{expirable} can be deleted by Gnus at
5648 any time.
5649 @end table
5650
5651
5652 @node Other Marks
5653 @subsection Other Marks
5654 @cindex process mark
5655 @cindex bookmarks
5656
5657 There are some marks that have nothing to do with whether the article is
5658 read or not.
5659
5660 @itemize @bullet
5661
5662 @item
5663 You can set a bookmark in the current article.  Say you are reading a
5664 long thesis on cats' urinary tracts, and have to go home for dinner
5665 before you've finished reading the thesis.  You can then set a bookmark
5666 in the article, and Gnus will jump to this bookmark the next time it
5667 encounters the article.  @xref{Setting Marks}.
5668
5669 @item
5670 @vindex gnus-replied-mark
5671 All articles that you have replied to or made a followup to (i.e., have
5672 answered) will be marked with an @samp{A} in the second column
5673 (@code{gnus-replied-mark}).
5674
5675 @item
5676 @vindex gnus-forwarded-mark
5677 All articles that you have forwarded will be marked with an @samp{F} in
5678 the second column (@code{gnus-forwarded-mark}).
5679
5680 @item
5681 @vindex gnus-cached-mark
5682 Articles stored in the article cache will be marked with an @samp{*} in
5683 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5684
5685 @item
5686 @vindex gnus-saved-mark
5687 Articles ``saved'' (in some manner or other; not necessarily
5688 religiously) are marked with an @samp{S} in the second column
5689 (@code{gnus-saved-mark}).
5690
5691 @item
5692 @vindex gnus-recent-mark
5693 Articles that according to the server haven't been shown to the user
5694 before are marked with a @samp{N} in the second column
5695 (@code{gnus-recent-mark}).  Note that not all servers support this
5696 mark, in which case it simply never appears. Compare with
5697 @code{gnus-unseen-mark}.
5698
5699 @item
5700 @vindex gnus-unseen-mark
5701 Articles that haven't been seen before in Gnus by the user are marked
5702 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5703 Compare with @code{gnus-recent-mark}.
5704
5705 @item
5706 @vindex gnus-undownloaded-mark
5707 When using the Gnus agent @pxref{Agent Basics}, some articles might not
5708 have been downloaded.  Such articles cannot be viewed while you are
5709 offline (unplugged).  These articles get the @samp{@@} mark in the
5710 first column.  (The variable @code{gnus-undownloaded-mark} controls
5711 which character to use.)
5712
5713 @item
5714 @vindex gnus-downloadable-mark
5715 The Gnus agent @pxref{Agent Basics} downloads some articles
5716 automatically, but it is also possible to explicitly mark articles for
5717 download, even if they would not be downloaded automatically.  Such
5718 explicitly-marked articles get the @samp{%} mark in the first column.
5719 (The variable @code{gnus-downloadable-mark} controls which character to
5720 use.)
5721
5722 @item
5723 @vindex gnus-not-empty-thread-mark
5724 @vindex gnus-empty-thread-mark
5725 If the @samp{%e} spec is used, the presence of threads or not will be
5726 marked with @code{gnus-not-empty-thread-mark} and
5727 @code{gnus-empty-thread-mark} in the third column, respectively.
5728
5729 @item
5730 @vindex gnus-process-mark
5731 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5732 variety of commands react to the presence of the process mark.  For
5733 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5734 all articles that have been marked with the process mark.  Articles
5735 marked with the process mark have a @samp{#} in the second column.
5736
5737 @end itemize
5738
5739 You might have noticed that most of these ``non-readedness'' marks
5740 appear in the second column by default.  So if you have a cached, saved,
5741 replied article that you have process-marked, what will that look like?
5742
5743 Nothing much.  The precedence rules go as follows: process -> cache ->
5744 replied -> saved.  So if the article is in the cache and is replied,
5745 you'll only see the cache mark and not the replied mark.
5746
5747
5748 @node Setting Marks
5749 @subsection Setting Marks
5750 @cindex setting marks
5751
5752 All the marking commands understand the numeric prefix.
5753
5754 @table @kbd
5755 @item M c
5756 @itemx M-u
5757 @kindex M c (Summary)
5758 @kindex M-u (Summary)
5759 @findex gnus-summary-clear-mark-forward
5760 @cindex mark as unread
5761 Clear all readedness-marks from the current article
5762 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5763 article as unread.
5764
5765 @item M t
5766 @itemx !
5767 @kindex ! (Summary)
5768 @kindex M t (Summary)
5769 @findex gnus-summary-tick-article-forward
5770 Tick the current article (@code{gnus-summary-tick-article-forward}).
5771 @xref{Article Caching}.
5772
5773 @item M ?
5774 @itemx ?
5775 @kindex ? (Summary)
5776 @kindex M ? (Summary)
5777 @findex gnus-summary-mark-as-dormant
5778 Mark the current article as dormant
5779 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5780
5781 @item M d
5782 @itemx d
5783 @kindex M d (Summary)
5784 @kindex d (Summary)
5785 @findex gnus-summary-mark-as-read-forward
5786 Mark the current article as read
5787 (@code{gnus-summary-mark-as-read-forward}).
5788
5789 @item D
5790 @kindex D (Summary)
5791 @findex gnus-summary-mark-as-read-backward
5792 Mark the current article as read and move point to the previous line
5793 (@code{gnus-summary-mark-as-read-backward}).
5794
5795 @item M k
5796 @itemx k
5797 @kindex k (Summary)
5798 @kindex M k (Summary)
5799 @findex gnus-summary-kill-same-subject-and-select
5800 Mark all articles that have the same subject as the current one as read,
5801 and then select the next unread article
5802 (@code{gnus-summary-kill-same-subject-and-select}).
5803
5804 @item M K
5805 @itemx C-k
5806 @kindex M K (Summary)
5807 @kindex C-k (Summary)
5808 @findex gnus-summary-kill-same-subject
5809 Mark all articles that have the same subject as the current one as read
5810 (@code{gnus-summary-kill-same-subject}).
5811
5812 @item M C
5813 @kindex M C (Summary)
5814 @findex gnus-summary-catchup
5815 @c @icon{gnus-summary-catchup}
5816 Mark all unread articles as read (@code{gnus-summary-catchup}).
5817
5818 @item M C-c
5819 @kindex M C-c (Summary)
5820 @findex gnus-summary-catchup-all
5821 Mark all articles in the group as read---even the ticked and dormant
5822 articles (@code{gnus-summary-catchup-all}).
5823
5824 @item M H
5825 @kindex M H (Summary)
5826 @findex gnus-summary-catchup-to-here
5827 Catchup the current group to point (before the point)
5828 (@code{gnus-summary-catchup-to-here}).
5829
5830 @item M h
5831 @kindex M h (Summary)
5832 @findex gnus-summary-catchup-from-here
5833 Catchup the current group from point (after the point)
5834 (@code{gnus-summary-catchup-from-here}).
5835
5836 @item C-w
5837 @kindex C-w (Summary)
5838 @findex gnus-summary-mark-region-as-read
5839 Mark all articles between point and mark as read
5840 (@code{gnus-summary-mark-region-as-read}).
5841
5842 @item M V k
5843 @kindex M V k (Summary)
5844 @findex gnus-summary-kill-below
5845 Kill all articles with scores below the default score (or below the
5846 numeric prefix) (@code{gnus-summary-kill-below}).
5847
5848 @item M e
5849 @itemx E
5850 @kindex M e (Summary)
5851 @kindex E (Summary)
5852 @findex gnus-summary-mark-as-expirable
5853 Mark the current article as expirable
5854 (@code{gnus-summary-mark-as-expirable}).
5855
5856 @item M b
5857 @kindex M b (Summary)
5858 @findex gnus-summary-set-bookmark
5859 Set a bookmark in the current article
5860 (@code{gnus-summary-set-bookmark}).
5861
5862 @item M B
5863 @kindex M B (Summary)
5864 @findex gnus-summary-remove-bookmark
5865 Remove the bookmark from the current article
5866 (@code{gnus-summary-remove-bookmark}).
5867
5868 @item M V c
5869 @kindex M V c (Summary)
5870 @findex gnus-summary-clear-above
5871 Clear all marks from articles with scores over the default score (or
5872 over the numeric prefix) (@code{gnus-summary-clear-above}).
5873
5874 @item M V u
5875 @kindex M V u (Summary)
5876 @findex gnus-summary-tick-above
5877 Tick all articles with scores over the default score (or over the
5878 numeric prefix) (@code{gnus-summary-tick-above}).
5879
5880 @item M V m
5881 @kindex M V m (Summary)
5882 @findex gnus-summary-mark-above
5883 Prompt for a mark, and mark all articles with scores over the default
5884 score (or over the numeric prefix) with this mark
5885 (@code{gnus-summary-clear-above}).
5886 @end table
5887
5888 @vindex gnus-summary-goto-unread
5889 The @code{gnus-summary-goto-unread} variable controls what action should
5890 be taken after setting a mark.  If non-@code{nil}, point will move to
5891 the next/previous unread article.  If @code{nil}, point will just move
5892 one line up or down.  As a special case, if this variable is
5893 @code{never}, all the marking commands as well as other commands (like
5894 @kbd{SPACE}) will move to the next article, whether it is unread or not.
5895 The default is @code{t}.
5896
5897
5898 @node Generic Marking Commands
5899 @subsection Generic Marking Commands
5900
5901 Some people would like the command that ticks an article (@kbd{!}) go to
5902 the next article.  Others would like it to go to the next unread
5903 article.  Yet others would like it to stay on the current article.  And
5904 even though I haven't heard of anybody wanting it to go to the
5905 previous (unread) article, I'm sure there are people that want that as
5906 well.
5907
5908 Multiply these five behaviors with five different marking commands, and
5909 you get a potentially complex set of variable to control what each
5910 command should do.
5911
5912 To sidestep that mess, Gnus provides commands that do all these
5913 different things.  They can be found on the @kbd{M M} map in the summary
5914 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
5915 to list in this manual.
5916
5917 While you can use these commands directly, most users would prefer
5918 altering the summary mode keymap.  For instance, if you would like the
5919 @kbd{!} command to go to the next article instead of the next unread
5920 article, you could say something like:
5921
5922 @lisp
5923 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
5924 (defun my-alter-summary-map ()
5925   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
5926 @end lisp
5927
5928 or
5929
5930 @lisp
5931 (defun my-alter-summary-map ()
5932   (local-set-key "!" "MM!n"))
5933 @end lisp
5934
5935
5936 @node Setting Process Marks
5937 @subsection Setting Process Marks
5938 @cindex setting process marks
5939
5940 Process marks are displayed as @code{#} in the summary buffer, and are
5941 used for marking articles in such a way that other commands will
5942 process these articles.  For instance, if you process mark four
5943 articles and then use the @kbd{*} command, Gnus will enter these four
5944 commands into the cache.  For more information,
5945 @pxref{Process/Prefix}.
5946
5947 @table @kbd
5948
5949 @item M P p
5950 @itemx #
5951 @kindex # (Summary)
5952 @kindex M P p (Summary)
5953 @findex gnus-summary-mark-as-processable
5954 Mark the current article with the process mark
5955 (@code{gnus-summary-mark-as-processable}).
5956 @findex gnus-summary-unmark-as-processable
5957
5958 @item M P u
5959 @itemx M-#
5960 @kindex M P u (Summary)
5961 @kindex M-# (Summary)
5962 Remove the process mark, if any, from the current article
5963 (@code{gnus-summary-unmark-as-processable}).
5964
5965 @item M P U
5966 @kindex M P U (Summary)
5967 @findex gnus-summary-unmark-all-processable
5968 Remove the process mark from all articles
5969 (@code{gnus-summary-unmark-all-processable}).
5970
5971 @item M P i
5972 @kindex M P i (Summary)
5973 @findex gnus-uu-invert-processable
5974 Invert the list of process marked articles
5975 (@code{gnus-uu-invert-processable}).
5976
5977 @item M P R
5978 @kindex M P R (Summary)
5979 @findex gnus-uu-mark-by-regexp
5980 Mark articles that have a @code{Subject} header that matches a regular
5981 expression (@code{gnus-uu-mark-by-regexp}).
5982
5983 @item M P G
5984 @kindex M P G (Summary)
5985 @findex gnus-uu-unmark-by-regexp
5986 Unmark articles that have a @code{Subject} header that matches a regular
5987 expression (@code{gnus-uu-unmark-by-regexp}).
5988
5989 @item M P r
5990 @kindex M P r (Summary)
5991 @findex gnus-uu-mark-region
5992 Mark articles in region (@code{gnus-uu-mark-region}).
5993
5994 @item M P g
5995 @kindex M P g
5996 @findex gnus-uu-unmark-region
5997 Unmark articles in region (@code{gnus-uu-unmark-region}).
5998
5999 @item M P t
6000 @kindex M P t (Summary)
6001 @findex gnus-uu-mark-thread
6002 Mark all articles in the current (sub)thread
6003 (@code{gnus-uu-mark-thread}).
6004
6005 @item M P T
6006 @kindex M P T (Summary)
6007 @findex gnus-uu-unmark-thread
6008 Unmark all articles in the current (sub)thread
6009 (@code{gnus-uu-unmark-thread}).
6010
6011 @item M P v
6012 @kindex M P v (Summary)
6013 @findex gnus-uu-mark-over
6014 Mark all articles that have a score above the prefix argument
6015 (@code{gnus-uu-mark-over}).
6016
6017 @item M P s
6018 @kindex M P s (Summary)
6019 @findex gnus-uu-mark-series
6020 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6021
6022 @item M P S
6023 @kindex M P S (Summary)
6024 @findex gnus-uu-mark-sparse
6025 Mark all series that have already had some articles marked
6026 (@code{gnus-uu-mark-sparse}).
6027
6028 @item M P a
6029 @kindex M P a (Summary)
6030 @findex gnus-uu-mark-all
6031 Mark all articles in series order (@code{gnus-uu-mark-series}).
6032
6033 @item M P b
6034 @kindex M P b (Summary)
6035 @findex gnus-uu-mark-buffer
6036 Mark all articles in the buffer in the order they appear
6037 (@code{gnus-uu-mark-buffer}).
6038
6039 @item M P k
6040 @kindex M P k (Summary)
6041 @findex gnus-summary-kill-process-mark
6042 Push the current process mark set onto the stack and unmark all articles
6043 (@code{gnus-summary-kill-process-mark}).
6044
6045 @item M P y
6046 @kindex M P y (Summary)
6047 @findex gnus-summary-yank-process-mark
6048 Pop the previous process mark set from the stack and restore it
6049 (@code{gnus-summary-yank-process-mark}).
6050
6051 @item M P w
6052 @kindex M P w (Summary)
6053 @findex gnus-summary-save-process-mark
6054 Push the current process mark set onto the stack
6055 (@code{gnus-summary-save-process-mark}).
6056
6057 @end table
6058
6059 Also see the @kbd{&} command in @pxref{Searching for Articles} for how to
6060 set process marks based on article body contents.
6061
6062
6063 @node Limiting
6064 @section Limiting
6065 @cindex limiting
6066
6067 It can be convenient to limit the summary buffer to just show some
6068 subset of the articles currently in the group.  The effect most limit
6069 commands have is to remove a few (or many) articles from the summary
6070 buffer.
6071
6072 All limiting commands work on subsets of the articles already fetched
6073 from the servers.  None of these commands query the server for
6074 additional articles.
6075
6076 @table @kbd
6077
6078 @item / /
6079 @itemx / s
6080 @kindex / / (Summary)
6081 @findex gnus-summary-limit-to-subject
6082 Limit the summary buffer to articles that match some subject
6083 (@code{gnus-summary-limit-to-subject}). If given a prefix, exclude
6084 matching articles.
6085
6086 @item / a
6087 @kindex / a (Summary)
6088 @findex gnus-summary-limit-to-author
6089 Limit the summary buffer to articles that match some author
6090 (@code{gnus-summary-limit-to-author}). If given a prefix, exclude
6091 matching articles.
6092
6093 @item / x
6094 @kindex / x (Summary)
6095 @findex gnus-summary-limit-to-extra
6096 Limit the summary buffer to articles that match one of the ``extra''
6097 headers (@pxref{To From Newsgroups})
6098 (@code{gnus-summary-limit-to-extra}). If given a prefix, exclude
6099 matching articles.
6100
6101 @item / u
6102 @itemx x
6103 @kindex / u (Summary)
6104 @kindex x (Summary)
6105 @findex gnus-summary-limit-to-unread
6106 Limit the summary buffer to articles not marked as read
6107 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6108 buffer to articles strictly unread.  This means that ticked and
6109 dormant articles will also be excluded.
6110
6111 @item / m
6112 @kindex / m (Summary)
6113 @findex gnus-summary-limit-to-marks
6114 Ask for a mark and then limit to all articles that have been marked
6115 with that mark (@code{gnus-summary-limit-to-marks}).
6116
6117 @item / t
6118 @kindex / t (Summary)
6119 @findex gnus-summary-limit-to-age
6120 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6121 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6122 articles younger than that number of days.
6123
6124 @item / n
6125 @kindex / n (Summary)
6126 @findex gnus-summary-limit-to-articles
6127 Limit the summary buffer to the current article
6128 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6129 convention (@pxref{Process/Prefix}).
6130
6131 @item / w
6132 @kindex / w (Summary)
6133 @findex gnus-summary-pop-limit
6134 Pop the previous limit off the stack and restore it
6135 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6136 the stack.
6137
6138 @item / .
6139 @kindex / . (Summary)
6140 @findex gnus-summary-limit-to-unseen
6141 Limit the summary buffer to the unseen articles
6142 (@code{gnus-summary-limit-to-unseen}).
6143
6144 @item / v
6145 @kindex / v (Summary)
6146 @findex gnus-summary-limit-to-score
6147 Limit the summary buffer to articles that have a score at or above some
6148 score (@code{gnus-summary-limit-to-score}).
6149
6150 @item / p
6151 @kindex / p (Summary)
6152 @findex gnus-summary-limit-to-display-predicate
6153 Limit the summary buffer to articles that satisfy the @code{display}
6154 group parameter predicate
6155 (@code{gnus-summary-limit-to-display-predicate}).  See @pxref{Group
6156 Parameters} for more on this predicate.
6157
6158 @item / E
6159 @itemx M S
6160 @kindex M S (Summary)
6161 @kindex / E (Summary)
6162 @findex gnus-summary-limit-include-expunged
6163 Include all expunged articles in the limit
6164 (@code{gnus-summary-limit-include-expunged}).
6165
6166 @item / D
6167 @kindex / D (Summary)
6168 @findex gnus-summary-limit-include-dormant
6169 Include all dormant articles in the limit
6170 (@code{gnus-summary-limit-include-dormant}).
6171
6172 @item / *
6173 @kindex / * (Summary)
6174 @findex gnus-summary-limit-include-cached
6175 Include all cached articles in the limit
6176 (@code{gnus-summary-limit-include-cached}).
6177
6178 @item / d
6179 @kindex / d (Summary)
6180 @findex gnus-summary-limit-exclude-dormant
6181 Exclude all dormant articles from the limit
6182 (@code{gnus-summary-limit-exclude-dormant}).
6183
6184 @item / M
6185 @kindex / M (Summary)
6186 @findex gnus-summary-limit-exclude-marks
6187 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6188
6189 @item / T
6190 @kindex / T (Summary)
6191 @findex gnus-summary-limit-include-thread
6192 Include all the articles in the current thread in the limit.
6193
6194 @item / c
6195 @kindex / c (Summary)
6196 @findex gnus-summary-limit-exclude-childless-dormant
6197 Exclude all dormant articles that have no children from the limit
6198 (@code{gnus-summary-limit-exclude-childless-dormant}).
6199
6200 @item / C
6201 @kindex / C (Summary)
6202 @findex gnus-summary-limit-mark-excluded-as-read
6203 Mark all excluded unread articles as read
6204 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
6205 also mark excluded ticked and dormant articles as read.
6206
6207 @item / N
6208 @kindex / N (Summary)
6209 @findex gnus-summary-insert-new-articles
6210 Insert all new articles in the summary buffer. It scans for new emails
6211 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6212
6213 @item / o
6214 @kindex / o (Summary)
6215 @findex gnus-summary-insert-old-articles
6216 Insert all old articles in the summary buffer. If given a numbered
6217 prefix, fetch this number of articles.
6218
6219 @end table
6220
6221
6222 @node Threading
6223 @section Threading
6224 @cindex threading
6225 @cindex article threading
6226
6227 Gnus threads articles by default.  @dfn{To thread} is to put responses
6228 to articles directly after the articles they respond to---in a
6229 hierarchical fashion.
6230
6231 Threading is done by looking at the @code{References} headers of the
6232 articles.  In a perfect world, this would be enough to build pretty
6233 trees, but unfortunately, the @code{References} header is often broken
6234 or simply missing.  Weird news propagation exacerbates the problem,
6235 so one has to employ other heuristics to get pleasing results.  A
6236 plethora of approaches exists, as detailed in horrible detail in
6237 @pxref{Customizing Threading}.
6238
6239 First, a quick overview of the concepts:
6240
6241 @table @dfn
6242 @item root
6243 The top-most article in a thread; the first article in the thread.
6244
6245 @item thread
6246 A tree-like article structure.
6247
6248 @item sub-thread
6249 A small(er) section of this tree-like structure.
6250
6251 @item loose threads
6252 Threads often lose their roots due to article expiry, or due to the root
6253 already having been read in a previous session, and not displayed in the
6254 summary buffer.  We then typically have many sub-threads that really
6255 belong to one thread, but are without connecting roots.  These are
6256 called loose threads.
6257
6258 @item thread gathering
6259 An attempt to gather loose threads into bigger threads.
6260
6261 @item sparse threads
6262 A thread where the missing articles have been ``guessed'' at, and are
6263 displayed as empty lines in the summary buffer.
6264
6265 @end table
6266
6267
6268 @menu
6269 * Customizing Threading::       Variables you can change to affect the threading.
6270 * Thread Commands::             Thread based commands in the summary buffer.
6271 @end menu
6272
6273
6274 @node Customizing Threading
6275 @subsection Customizing Threading
6276 @cindex customizing threading
6277
6278 @menu
6279 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6280 * Filling In Threads::          Making the threads displayed look fuller.
6281 * More Threading::              Even more variables for fiddling with threads.
6282 * Low-Level Threading::         You thought it was over... but you were wrong!
6283 @end menu
6284
6285
6286 @node Loose Threads
6287 @subsubsection Loose Threads
6288 @cindex <
6289 @cindex >
6290 @cindex loose threads
6291
6292 @table @code
6293 @item gnus-summary-make-false-root
6294 @vindex gnus-summary-make-false-root
6295 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
6296 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6297 Yup.)  Loose subtrees occur when the real root has expired, or you've
6298 read or killed the root in a previous session.
6299
6300 When there is no real root of a thread, Gnus will have to fudge
6301 something.  This variable says what fudging method Gnus should use.
6302 There are four possible values:
6303
6304 @iftex
6305 @iflatex
6306 \gnusfigure{The Summary Buffer}{390}{
6307 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6308 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6309 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6310 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6311 }
6312 @end iflatex
6313 @end iftex
6314
6315 @cindex adopting articles
6316
6317 @table @code
6318
6319 @item adopt
6320 Gnus will make the first of the orphaned articles the parent.  This
6321 parent will adopt all the other articles.  The adopted articles will be
6322 marked as such by pointy brackets (@samp{<>}) instead of the standard
6323 square brackets (@samp{[]}).  This is the default method.
6324
6325 @item dummy
6326 @vindex gnus-summary-dummy-line-format
6327 @vindex gnus-summary-make-false-root-always
6328 Gnus will create a dummy summary line that will pretend to be the
6329 parent.  This dummy line does not correspond to any real article, so
6330 selecting it will just select the first real article after the dummy
6331 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6332 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6333 which is the subject of the article.  @xref{Formatting Variables}.
6334 If you want all threads to have a dummy root, even the non-gathered
6335 ones, set @code{gnus-summary-make-false-root-always} to t.
6336
6337 @item empty
6338 Gnus won't actually make any article the parent, but simply leave the
6339 subject field of all orphans except the first empty.  (Actually, it will
6340 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6341 Buffer Format}).)
6342
6343 @item none
6344 Don't make any article parent at all.  Just gather the threads and
6345 display them after one another.
6346
6347 @item nil
6348 Don't gather loose threads.
6349 @end table
6350
6351 @item gnus-summary-gather-subject-limit
6352 @vindex gnus-summary-gather-subject-limit
6353 Loose threads are gathered by comparing subjects of articles.  If this
6354 variable is @code{nil}, Gnus requires an exact match between the
6355 subjects of the loose threads before gathering them into one big
6356 super-thread.  This might be too strict a requirement, what with the
6357 presence of stupid newsreaders that chop off long subject lines.  If
6358 you think so, set this variable to, say, 20 to require that only the
6359 first 20 characters of the subjects have to match.  If you set this
6360 variable to a really low number, you'll find that Gnus will gather
6361 everything in sight into one thread, which isn't very helpful.
6362
6363 @cindex fuzzy article gathering
6364 If you set this variable to the special value @code{fuzzy}, Gnus will
6365 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6366 Matching}).
6367
6368 @item gnus-simplify-subject-fuzzy-regexp
6369 @vindex gnus-simplify-subject-fuzzy-regexp
6370 This can either be a regular expression or list of regular expressions
6371 that match strings that will be removed from subjects if fuzzy subject
6372 simplification is used.
6373
6374 @item gnus-simplify-ignored-prefixes
6375 @vindex gnus-simplify-ignored-prefixes
6376 If you set @code{gnus-summary-gather-subject-limit} to something as low
6377 as 10, you might consider setting this variable to something sensible:
6378
6379 @c Written by Michael Ernst <mernst@cs.rice.edu>
6380 @lisp
6381 (setq gnus-simplify-ignored-prefixes
6382       (concat
6383        "\\`\\[?\\("
6384        (mapconcat
6385         'identity
6386         '("looking"
6387           "wanted" "followup" "summary\\( of\\)?"
6388           "help" "query" "problem" "question"
6389           "answer" "reference" "announce"
6390           "How can I" "How to" "Comparison of"
6391           ;; ...
6392           )
6393         "\\|")
6394        "\\)\\s *\\("
6395        (mapconcat 'identity
6396                   '("for" "for reference" "with" "about")
6397                   "\\|")
6398        "\\)?\\]?:?[ \t]*"))
6399 @end lisp
6400
6401 All words that match this regexp will be removed before comparing two
6402 subjects.
6403
6404 @item gnus-simplify-subject-functions
6405 @vindex gnus-simplify-subject-functions
6406 If non-@code{nil}, this variable overrides
6407 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6408 list of functions to apply to the @code{Subject} string iteratively to
6409 arrive at the simplified version of the string.
6410
6411 Useful functions to put in this list include:
6412
6413 @table @code
6414 @item gnus-simplify-subject-re
6415 @findex gnus-simplify-subject-re
6416 Strip the leading @samp{Re:}.
6417
6418 @item gnus-simplify-subject-fuzzy
6419 @findex gnus-simplify-subject-fuzzy
6420 Simplify fuzzily.
6421
6422 @item gnus-simplify-whitespace
6423 @findex gnus-simplify-whitespace
6424 Remove excessive whitespace.
6425
6426 @item gnus-simplify-all-whitespace
6427 @findex gnus-simplify-all-whitespace
6428 Remove all whitespace.
6429 @end table
6430
6431 You may also write your own functions, of course.
6432
6433
6434 @item gnus-summary-gather-exclude-subject
6435 @vindex gnus-summary-gather-exclude-subject
6436 Since loose thread gathering is done on subjects only, that might lead
6437 to many false hits, especially with certain common subjects like
6438 @samp{} and @samp{(none)}.  To make the situation slightly better,
6439 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6440 what subjects should be excluded from the gathering process.@*
6441 The default is @samp{^ *$\\|^(none)$}.
6442
6443 @item gnus-summary-thread-gathering-function
6444 @vindex gnus-summary-thread-gathering-function
6445 Gnus gathers threads by looking at @code{Subject} headers.  This means
6446 that totally unrelated articles may end up in the same ``thread'', which
6447 is confusing.  An alternate approach is to look at all the
6448 @code{Message-ID}s in all the @code{References} headers to find matches.
6449 This will ensure that no gathered threads ever include unrelated
6450 articles, but it also means that people who have posted with broken
6451 newsreaders won't be gathered properly.  The choice is yours---plague or
6452 cholera:
6453
6454 @table @code
6455 @item gnus-gather-threads-by-subject
6456 @findex gnus-gather-threads-by-subject
6457 This function is the default gathering function and looks at
6458 @code{Subject}s exclusively.
6459
6460 @item gnus-gather-threads-by-references
6461 @findex gnus-gather-threads-by-references
6462 This function looks at @code{References} headers exclusively.
6463 @end table
6464
6465 If you want to test gathering by @code{References}, you could say
6466 something like:
6467
6468 @lisp
6469 (setq gnus-summary-thread-gathering-function
6470       'gnus-gather-threads-by-references)
6471 @end lisp
6472
6473 @end table
6474
6475
6476 @node Filling In Threads
6477 @subsubsection Filling In Threads
6478
6479 @table @code
6480 @item gnus-fetch-old-headers
6481 @vindex gnus-fetch-old-headers
6482 If non-@code{nil}, Gnus will attempt to build old threads by fetching
6483 more old headers---headers to articles marked as read.  If you
6484 would like to display as few summary lines as possible, but still
6485 connect as many loose threads as possible, you should set this variable
6486 to @code{some} or a number.  If you set it to a number, no more than
6487 that number of extra old headers will be fetched.  In either case,
6488 fetching old headers only works if the back end you are using carries
6489 overview files---this would normally be @code{nntp}, @code{nnspool},
6490 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6491 the thread has been expired by the server, there's not much Gnus can do
6492 about that.
6493
6494 This variable can also be set to @code{invisible}.  This won't have any
6495 visible effects, but is useful if you use the @kbd{A T} command a lot
6496 (@pxref{Finding the Parent}).
6497
6498 @item gnus-build-sparse-threads
6499 @vindex gnus-build-sparse-threads
6500 Fetching old headers can be slow.  A low-rent similar effect can be
6501 gotten by setting this variable to @code{some}.  Gnus will then look at
6502 the complete @code{References} headers of all articles and try to string
6503 together articles that belong in the same thread.  This will leave
6504 @dfn{gaps} in the threading display where Gnus guesses that an article
6505 is missing from the thread.  (These gaps appear like normal summary
6506 lines.  If you select a gap, Gnus will try to fetch the article in
6507 question.)  If this variable is @code{t}, Gnus will display all these
6508 ``gaps'' without regard for whether they are useful for completing the
6509 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
6510 off sparse leaf nodes that don't lead anywhere.  This variable is
6511 @code{nil} by default.
6512
6513 @item gnus-read-all-available-headers
6514 @vindex gnus-read-all-available-headers
6515 This is a rather obscure variable that few will find useful.  It's
6516 intended for those non-news newsgroups where the back end has to fetch
6517 quite a lot to present the summary buffer, and where it's impossible to
6518 go back to parents of articles.  This is mostly the case in the
6519 web-based groups, like the @code{nnultimate} groups.
6520
6521 If you don't use those, then it's safe to leave this as the default
6522 @code{nil}.  If you want to use this variable, it should be a regexp
6523 that matches the group name, or @code{t} for all groups.
6524
6525 @end table
6526
6527
6528 @node More Threading
6529 @subsubsection More Threading
6530
6531 @table @code
6532 @item gnus-show-threads
6533 @vindex gnus-show-threads
6534 If this variable is @code{nil}, no threading will be done, and all of
6535 the rest of the variables here will have no effect.  Turning threading
6536 off will speed group selection up a bit, but it is sure to make reading
6537 slower and more awkward.
6538
6539 @item gnus-thread-hide-subtree
6540 @vindex gnus-thread-hide-subtree
6541 If non-@code{nil}, all threads will be hidden when the summary buffer is
6542 generated.
6543
6544 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6545 Available predicates are @code{gnus-article-unread-p} and
6546 @code{gnus-article-unseen-p}).
6547
6548 Here's an example:
6549
6550 @lisp
6551 (setq gnus-thread-hide-subtree
6552       '(or gnus-article-unread-p
6553            gnus-article-unseen-p))
6554 @end lisp
6555
6556 (It's a pretty nonsensical example, since all unseen articles are also
6557 unread, but you get my drift.)
6558
6559
6560 @item gnus-thread-expunge-below
6561 @vindex gnus-thread-expunge-below
6562 All threads that have a total score (as defined by
6563 @code{gnus-thread-score-function}) less than this number will be
6564 expunged.  This variable is @code{nil} by default, which means that no
6565 threads are expunged.
6566
6567 @item gnus-thread-hide-killed
6568 @vindex gnus-thread-hide-killed
6569 if you kill a thread and this variable is non-@code{nil}, the subtree
6570 will be hidden.
6571
6572 @item gnus-thread-ignore-subject
6573 @vindex gnus-thread-ignore-subject
6574 Sometimes somebody changes the subject in the middle of a thread.  If
6575 this variable is non-@code{nil}, which is the default, the subject
6576 change is ignored.  If it is @code{nil}, a change in the subject will
6577 result in a new thread.
6578
6579 @item gnus-thread-indent-level
6580 @vindex gnus-thread-indent-level
6581 This is a number that says how much each sub-thread should be indented.
6582 The default is 4.
6583
6584 @item gnus-sort-gathered-threads-function
6585 @vindex gnus-sort-gathered-threads-function
6586 Sometimes, particularly with mailing lists, the order in which mails
6587 arrive locally is not necessarily the same as the order in which they
6588 arrived on the mailing list.  Consequently, when sorting sub-threads
6589 using the default @code{gnus-thread-sort-by-number}, responses can end
6590 up appearing before the article to which they are responding to.
6591 Setting this variable to an alternate value
6592 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6593 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6594 more logical sub-thread ordering in such instances.
6595
6596 @end table
6597
6598
6599 @node Low-Level Threading
6600 @subsubsection Low-Level Threading
6601
6602 @table @code
6603
6604 @item gnus-parse-headers-hook
6605 @vindex gnus-parse-headers-hook
6606 Hook run before parsing any headers.
6607
6608 @item gnus-alter-header-function
6609 @vindex gnus-alter-header-function
6610 If non-@code{nil}, this function will be called to allow alteration of
6611 article header structures.  The function is called with one parameter,
6612 the article header vector, which it may alter in any way.  For instance,
6613 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6614 in systematic ways (by adding prefixes and such), you can use this
6615 variable to un-scramble the @code{Message-ID}s so that they are more
6616 meaningful.  Here's one example:
6617
6618 @lisp
6619 (setq gnus-alter-header-function 'my-alter-message-id)
6620
6621 (defun my-alter-message-id (header)
6622   (let ((id (mail-header-id header)))
6623     (when (string-match
6624            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6625       (mail-header-set-id
6626        (concat (match-string 1 id) "@@" (match-string 2 id))
6627        header))))
6628 @end lisp
6629
6630 @end table
6631
6632
6633 @node Thread Commands
6634 @subsection Thread Commands
6635 @cindex thread commands
6636
6637 @table @kbd
6638
6639 @item T k
6640 @itemx C-M-k
6641 @kindex T k (Summary)
6642 @kindex C-M-k (Summary)
6643 @findex gnus-summary-kill-thread
6644 Mark all articles in the current (sub-)thread as read
6645 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6646 remove all marks instead.  If the prefix argument is negative, tick
6647 articles instead.
6648
6649 @item T l
6650 @itemx C-M-l
6651 @kindex T l (Summary)
6652 @kindex C-M-l (Summary)
6653 @findex gnus-summary-lower-thread
6654 Lower the score of the current (sub-)thread
6655 (@code{gnus-summary-lower-thread}).
6656
6657 @item T i
6658 @kindex T i (Summary)
6659 @findex gnus-summary-raise-thread
6660 Increase the score of the current (sub-)thread
6661 (@code{gnus-summary-raise-thread}).
6662
6663 @item T #
6664 @kindex T # (Summary)
6665 @findex gnus-uu-mark-thread
6666 Set the process mark on the current (sub-)thread
6667 (@code{gnus-uu-mark-thread}).
6668
6669 @item T M-#
6670 @kindex T M-# (Summary)
6671 @findex gnus-uu-unmark-thread
6672 Remove the process mark from the current (sub-)thread
6673 (@code{gnus-uu-unmark-thread}).
6674
6675 @item T T
6676 @kindex T T (Summary)
6677 @findex gnus-summary-toggle-threads
6678 Toggle threading (@code{gnus-summary-toggle-threads}).
6679
6680 @item T s
6681 @kindex T s (Summary)
6682 @findex gnus-summary-show-thread
6683 Expose the (sub-)thread hidden under the current article, if any
6684 (@code{gnus-summary-show-thread}).
6685
6686 @item T h
6687 @kindex T h (Summary)
6688 @findex gnus-summary-hide-thread
6689 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6690
6691 @item T S
6692 @kindex T S (Summary)
6693 @findex gnus-summary-show-all-threads
6694 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6695
6696 @item T H
6697 @kindex T H (Summary)
6698 @findex gnus-summary-hide-all-threads
6699 Hide all threads (@code{gnus-summary-hide-all-threads}).
6700
6701 @item T t
6702 @kindex T t (Summary)
6703 @findex gnus-summary-rethread-current
6704 Re-thread the current article's thread
6705 (@code{gnus-summary-rethread-current}).  This works even when the
6706 summary buffer is otherwise unthreaded.
6707
6708 @item T ^
6709 @kindex T ^ (Summary)
6710 @findex gnus-summary-reparent-thread
6711 Make the current article the child of the marked (or previous) article
6712 (@code{gnus-summary-reparent-thread}).
6713
6714 @end table
6715
6716 The following commands are thread movement commands.  They all
6717 understand the numeric prefix.
6718
6719 @table @kbd
6720
6721 @item T n
6722 @kindex T n (Summary)
6723 @itemx C-M-f
6724 @kindex C-M-n (Summary)
6725 @itemx M-down
6726 @kindex M-down (Summary)
6727 @findex gnus-summary-next-thread
6728 Go to the next thread (@code{gnus-summary-next-thread}).
6729
6730 @item T p
6731 @kindex T p (Summary)
6732 @itemx C-M-b
6733 @kindex C-M-p (Summary)
6734 @itemx M-up
6735 @kindex M-up (Summary)
6736 @findex gnus-summary-prev-thread
6737 Go to the previous thread (@code{gnus-summary-prev-thread}).
6738
6739 @item T d
6740 @kindex T d (Summary)
6741 @findex gnus-summary-down-thread
6742 Descend the thread (@code{gnus-summary-down-thread}).
6743
6744 @item T u
6745 @kindex T u (Summary)
6746 @findex gnus-summary-up-thread
6747 Ascend the thread (@code{gnus-summary-up-thread}).
6748
6749 @item T o
6750 @kindex T o (Summary)
6751 @findex gnus-summary-top-thread
6752 Go to the top of the thread (@code{gnus-summary-top-thread}).
6753 @end table
6754
6755 @vindex gnus-thread-operation-ignore-subject
6756 If you ignore subject while threading, you'll naturally end up with
6757 threads that have several different subjects in them.  If you then issue
6758 a command like `T k' (@code{gnus-summary-kill-thread}) you might not
6759 wish to kill the entire thread, but just those parts of the thread that
6760 have the same subject as the current article.  If you like this idea,
6761 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6762 is non-@code{nil} (which it is by default), subjects will be ignored
6763 when doing thread commands.  If this variable is @code{nil}, articles in
6764 the same thread with different subjects will not be included in the
6765 operation in question.  If this variable is @code{fuzzy}, only articles
6766 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6767 Matching}).
6768
6769
6770 @node Sorting the Summary Buffer
6771 @section Sorting the Summary Buffer
6772
6773 @findex gnus-thread-sort-by-total-score
6774 @findex gnus-thread-sort-by-date
6775 @findex gnus-thread-sort-by-score
6776 @findex gnus-thread-sort-by-subject
6777 @findex gnus-thread-sort-by-author
6778 @findex gnus-thread-sort-by-number
6779 @findex gnus-thread-sort-by-random
6780 @vindex gnus-thread-sort-functions
6781 @findex gnus-thread-sort-by-most-recent-thread
6782 If you are using a threaded summary display, you can sort the threads by
6783 setting @code{gnus-thread-sort-functions}, which can be either a single
6784 function, a list of functions, or a list containing functions and
6785 @code{(not some-function)} elements.
6786
6787 By default, sorting is done on article numbers.  Ready-made sorting
6788 predicate functions include @code{gnus-thread-sort-by-number},
6789 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6790 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6791 @code{gnus-thread-sort-by-most-recent-number},
6792 @code{gnus-thread-sort-by-most-recent-date},
6793 @code{gnus-thread-sort-by-random} and
6794 @code{gnus-thread-sort-by-total-score}.
6795
6796 Each function takes two threads and returns non-@code{nil} if the first
6797 thread should be sorted before the other.  Note that sorting really is
6798 normally done by looking only at the roots of each thread.
6799
6800 If you use more than one function, the primary sort key should be the
6801 last function in the list.  You should probably always include
6802 @code{gnus-thread-sort-by-number} in the list of sorting
6803 functions---preferably first.  This will ensure that threads that are
6804 equal with respect to the other sort criteria will be displayed in
6805 ascending article order.
6806
6807 If you would like to sort by reverse score, then by subject, and finally
6808 by number, you could do something like:
6809
6810 @lisp
6811 (setq gnus-thread-sort-functions
6812       '(gnus-thread-sort-by-number
6813         gnus-thread-sort-by-subject
6814         (not gnus-thread-sort-by-total-score)))
6815 @end lisp
6816
6817 The threads that have highest score will be displayed first in the
6818 summary buffer.  When threads have the same score, they will be sorted
6819 alphabetically.  The threads that have the same score and the same
6820 subject will be sorted by number, which is (normally) the sequence in
6821 which the articles arrived.
6822
6823 If you want to sort by score and then reverse arrival order, you could
6824 say something like:
6825
6826 @lisp
6827 (setq gnus-thread-sort-functions
6828       '((lambda (t1 t2)
6829           (not (gnus-thread-sort-by-number t1 t2)))
6830         gnus-thread-sort-by-score))
6831 @end lisp
6832
6833 @vindex gnus-thread-score-function
6834 The function in the @code{gnus-thread-score-function} variable (default
6835 @code{+}) is used for calculating the total score of a thread.  Useful
6836 functions might be @code{max}, @code{min}, or squared means, or whatever
6837 tickles your fancy.
6838
6839 @findex gnus-article-sort-functions
6840 @findex gnus-article-sort-by-date
6841 @findex gnus-article-sort-by-score
6842 @findex gnus-article-sort-by-subject
6843 @findex gnus-article-sort-by-author
6844 @findex gnus-article-sort-by-random
6845 @findex gnus-article-sort-by-number
6846 If you are using an unthreaded display for some strange reason or
6847 other, you have to fiddle with the @code{gnus-article-sort-functions}
6848 variable.  It is very similar to the
6849 @code{gnus-thread-sort-functions}, except that it uses slightly
6850 different functions for article comparison.  Available sorting
6851 predicate functions are @code{gnus-article-sort-by-number},
6852 @code{gnus-article-sort-by-author},
6853 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
6854 @code{gnus-article-sort-by-random}, and
6855 @code{gnus-article-sort-by-score}.
6856
6857 If you want to sort an unthreaded summary display by subject, you could
6858 say something like:
6859
6860 @lisp
6861 (setq gnus-article-sort-functions
6862       '(gnus-article-sort-by-number
6863         gnus-article-sort-by-subject))
6864 @end lisp
6865
6866
6867
6868 @node Asynchronous Fetching
6869 @section Asynchronous Article Fetching
6870 @cindex asynchronous article fetching
6871 @cindex article pre-fetch
6872 @cindex pre-fetch
6873
6874 If you read your news from an @sc{nntp} server that's far away, the
6875 network latencies may make reading articles a chore.  You have to wait
6876 for a while after pressing @kbd{n} to go to the next article before the
6877 article appears.  Why can't Gnus just go ahead and fetch the article
6878 while you are reading the previous one?  Why not, indeed.
6879
6880 First, some caveats.  There are some pitfalls to using asynchronous
6881 article fetching, especially the way Gnus does it.
6882
6883 Let's say you are reading article 1, which is short, and article 2 is
6884 quite long, and you are not interested in reading that.  Gnus does not
6885 know this, so it goes ahead and fetches article 2.  You decide to read
6886 article 3, but since Gnus is in the process of fetching article 2, the
6887 connection is blocked.
6888
6889 To avoid these situations, Gnus will open two (count 'em two)
6890 connections to the server.  Some people may think this isn't a very nice
6891 thing to do, but I don't see any real alternatives.  Setting up that
6892 extra connection takes some time, so Gnus startup will be slower.
6893
6894 Gnus will fetch more articles than you will read.  This will mean that
6895 the link between your machine and the @sc{nntp} server will become more
6896 loaded than if you didn't use article pre-fetch.  The server itself will
6897 also become more loaded---both with the extra article requests, and the
6898 extra connection.
6899
6900 Ok, so now you know that you shouldn't really use this thing...  unless
6901 you really want to.
6902
6903 @vindex gnus-asynchronous
6904 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
6905 happen automatically.
6906
6907 @vindex gnus-use-article-prefetch
6908 You can control how many articles are to be pre-fetched by setting
6909 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
6910 that when you read an article in the group, the back end will pre-fetch
6911 the next 30 articles.  If this variable is @code{t}, the back end will
6912 pre-fetch all the articles it can without bound.  If it is
6913 @code{nil}, no pre-fetching will be done.
6914
6915 @vindex gnus-async-prefetch-article-p
6916 @findex gnus-async-read-p
6917 There are probably some articles that you don't want to pre-fetch---read
6918 articles, for instance.  The @code{gnus-async-prefetch-article-p} variable controls whether an article is to be pre-fetched.  This function should
6919 return non-@code{nil} when the article in question is to be
6920 pre-fetched.  The default is @code{gnus-async-read-p}, which returns
6921 @code{nil} on read articles.  The function is called with an article
6922 data structure as the only parameter.
6923
6924 If, for instance, you wish to pre-fetch only unread articles shorter than 100 lines, you could say something like:
6925
6926 @lisp
6927 (defun my-async-short-unread-p (data)
6928   "Return non-nil for short, unread articles."
6929   (and (gnus-data-unread-p data)
6930        (< (mail-header-lines (gnus-data-header data))
6931           100)))
6932
6933 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
6934 @end lisp
6935
6936 These functions will be called many, many times, so they should
6937 preferably be short and sweet to avoid slowing down Gnus too much.
6938 It's probably a good idea to byte-compile things like this.
6939
6940 @vindex gnus-prefetched-article-deletion-strategy
6941 Articles have to be removed from the asynch buffer sooner or later.  The
6942 @code{gnus-prefetched-article-deletion-strategy} says when to remove
6943 articles.  This is a list that may contain the following elements:
6944
6945 @table @code
6946 @item read
6947 Remove articles when they are read.
6948
6949 @item exit
6950 Remove articles when exiting the group.
6951 @end table
6952
6953 The default value is @code{(read exit)}.
6954
6955 @c @vindex gnus-use-header-prefetch
6956 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
6957 @c from the next group.
6958
6959
6960 @node Article Caching
6961 @section Article Caching
6962 @cindex article caching
6963 @cindex caching
6964
6965 If you have an @emph{extremely} slow @sc{nntp} connection, you may
6966 consider turning article caching on.  Each article will then be stored
6967 locally under your home directory.  As you may surmise, this could
6968 potentially use @emph{huge} amounts of disk space, as well as eat up all
6969 your inodes so fast it will make your head swim.  In vodka.
6970
6971 Used carefully, though, it could be just an easier way to save articles.
6972
6973 @vindex gnus-use-long-file-name
6974 @vindex gnus-cache-directory
6975 @vindex gnus-use-cache
6976 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
6977 all articles ticked or marked as dormant will then be copied
6978 over to your local cache (@code{gnus-cache-directory}).  Whether this
6979 cache is flat or hierarchical is controlled by the
6980 @code{gnus-use-long-file-name} variable, as usual.
6981
6982 When re-selecting a ticked or dormant article, it will be fetched from the
6983 cache instead of from the server.  As articles in your cache will never
6984 expire, this might serve as a method of saving articles while still
6985 keeping them where they belong.  Just mark all articles you want to save
6986 as dormant, and don't worry.
6987
6988 When an article is marked as read, is it removed from the cache.
6989
6990 @vindex gnus-cache-remove-articles
6991 @vindex gnus-cache-enter-articles
6992 The entering/removal of articles from the cache is controlled by the
6993 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
6994 variables.  Both are lists of symbols.  The first is @code{(ticked
6995 dormant)} by default, meaning that ticked and dormant articles will be
6996 put in the cache.  The latter is @code{(read)} by default, meaning that
6997 articles marked as read are removed from the cache.  Possibly
6998 symbols in these two lists are @code{ticked}, @code{dormant},
6999 @code{unread} and @code{read}.
7000
7001 @findex gnus-jog-cache
7002 So where does the massive article-fetching and storing come into the
7003 picture?  The @code{gnus-jog-cache} command will go through all
7004 subscribed newsgroups, request all unread articles, score them, and
7005 store them in the cache.  You should only ever, ever ever ever, use this
7006 command if 1) your connection to the @sc{nntp} server is really, really,
7007 really slow and 2) you have a really, really, really huge disk.
7008 Seriously.  One way to cut down on the number of articles downloaded is
7009 to score unwanted articles down and have them marked as read.  They will
7010 not then be downloaded by this command.
7011
7012 @vindex gnus-uncacheable-groups
7013 @vindex gnus-cacheable-groups
7014 It is likely that you do not want caching on all groups.  For instance,
7015 if your @code{nnml} mail is located under your home directory, it makes no
7016 sense to cache it somewhere else under your home directory.  Unless you
7017 feel that it's neat to use twice as much space.
7018
7019 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7020 regexp of groups to cache, @samp{^nntp} for instance, or set the
7021 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7022 Both variables are @code{nil} by default.  If a group matches both
7023 variables, the group is not cached.
7024
7025 @findex gnus-cache-generate-nov-databases
7026 @findex gnus-cache-generate-active
7027 @vindex gnus-cache-active-file
7028 The cache stores information on what articles it contains in its active
7029 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7030 of the cache) becomes all messed up for some reason or other, Gnus
7031 offers two functions that will try to set things right.  @kbd{M-x
7032 gnus-cache-generate-nov-databases} will (re)build all the @sc{nov}
7033 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7034 file.
7035
7036 @findex gnus-cache-move-cache
7037 @code{gnus-cache-move-cache} will move your whole
7038 @code{gnus-cache-directory} to some other location. You get asked to
7039 where, isn't that cool?
7040
7041 @node Persistent Articles
7042 @section Persistent Articles
7043 @cindex persistent articles
7044
7045 Closely related to article caching, we have @dfn{persistent articles}.
7046 In fact, it's just a different way of looking at caching, and much more
7047 useful in my opinion.
7048
7049 Say you're reading a newsgroup, and you happen on to some valuable gem
7050 that you want to keep and treasure forever.  You'd normally just save it
7051 (using one of the many saving commands) in some file.  The problem with
7052 that is that it's just, well, yucky.  Ideally you'd prefer just having
7053 the article remain in the group where you found it forever; untouched by
7054 the expiry going on at the news server.
7055
7056 This is what a @dfn{persistent article} is---an article that just won't
7057 be deleted.  It's implemented using the normal cache functions, but
7058 you use two explicit commands for managing persistent articles:
7059
7060 @table @kbd
7061
7062 @item *
7063 @kindex * (Summary)
7064 @findex gnus-cache-enter-article
7065 Make the current article persistent (@code{gnus-cache-enter-article}).
7066
7067 @item M-*
7068 @kindex M-* (Summary)
7069 @findex gnus-cache-remove-article
7070 Remove the current article from the persistent articles
7071 (@code{gnus-cache-remove-article}).  This will normally delete the
7072 article.
7073 @end table
7074
7075 Both these commands understand the process/prefix convention.
7076
7077 To avoid having all ticked articles (and stuff) entered into the cache,
7078 you should set @code{gnus-use-cache} to @code{passive} if you're just
7079 interested in persistent articles:
7080
7081 @lisp
7082 (setq gnus-use-cache 'passive)
7083 @end lisp
7084
7085
7086 @node Article Backlog
7087 @section Article Backlog
7088 @cindex backlog
7089 @cindex article backlog
7090
7091 If you have a slow connection, but the idea of using caching seems
7092 unappealing to you (and it is, really), you can help the situation some
7093 by switching on the @dfn{backlog}.  This is where Gnus will buffer
7094 already read articles so that it doesn't have to re-fetch articles
7095 you've already read.  This only helps if you are in the habit of
7096 re-selecting articles you've recently read, of course.  If you never do
7097 that, turning the backlog on will slow Gnus down a little bit, and
7098 increase memory usage some.
7099
7100 @vindex gnus-keep-backlog
7101 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
7102 at most @var{n} old articles in a buffer for later re-fetching.  If this
7103 variable is non-@code{nil} and is not a number, Gnus will store
7104 @emph{all} read articles, which means that your Emacs will grow without
7105 bound before exploding and taking your machine down with you.  I put
7106 that in there just to keep y'all on your toes.
7107
7108 This variable is @code{nil} by default.
7109
7110
7111 @node Saving Articles
7112 @section Saving Articles
7113 @cindex saving articles
7114
7115 Gnus can save articles in a number of ways.  Below is the documentation
7116 for saving articles in a fairly straight-forward fashion (i.e., little
7117 processing of the article is done before it is saved).  For a different
7118 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7119 (@pxref{Decoding Articles}).
7120
7121 For the commands listed here, the target is a file.  If you want to
7122 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7123 command (@pxref{Mail Group Commands}).
7124
7125 @vindex gnus-save-all-headers
7126 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
7127 unwanted headers before saving the article.
7128
7129 @vindex gnus-saved-headers
7130 If the preceding variable is @code{nil}, all headers that match the
7131 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7132 deleted before saving.
7133
7134 @table @kbd
7135
7136 @item O o
7137 @itemx o
7138 @kindex O o (Summary)
7139 @kindex o (Summary)
7140 @findex gnus-summary-save-article
7141 @c @icon{gnus-summary-save-article}
7142 Save the current article using the default article saver
7143 (@code{gnus-summary-save-article}).
7144
7145 @item O m
7146 @kindex O m (Summary)
7147 @findex gnus-summary-save-article-mail
7148 Save the current article in mail format
7149 (@code{gnus-summary-save-article-mail}).
7150
7151 @item O r
7152 @kindex O r (Summary)
7153 @findex gnus-summary-save-article-rmail
7154 Save the current article in rmail format
7155 (@code{gnus-summary-save-article-rmail}).
7156
7157 @item O f
7158 @kindex O f (Summary)
7159 @findex gnus-summary-save-article-file
7160 @c @icon{gnus-summary-save-article-file}
7161 Save the current article in plain file format
7162 (@code{gnus-summary-save-article-file}).
7163
7164 @item O F
7165 @kindex O F (Summary)
7166 @findex gnus-summary-write-article-file
7167 Write the current article in plain file format, overwriting any previous
7168 file contents (@code{gnus-summary-write-article-file}).
7169
7170 @item O b
7171 @kindex O b (Summary)
7172 @findex gnus-summary-save-article-body-file
7173 Save the current article body in plain file format
7174 (@code{gnus-summary-save-article-body-file}).
7175
7176 @item O h
7177 @kindex O h (Summary)
7178 @findex gnus-summary-save-article-folder
7179 Save the current article in mh folder format
7180 (@code{gnus-summary-save-article-folder}).
7181
7182 @item O v
7183 @kindex O v (Summary)
7184 @findex gnus-summary-save-article-vm
7185 Save the current article in a VM folder
7186 (@code{gnus-summary-save-article-vm}).
7187
7188 @item O p
7189 @itemx |
7190 @kindex O p (Summary)
7191 @kindex | (Summary)
7192 @findex gnus-summary-pipe-output
7193 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7194 the current article to a process (@code{gnus-summary-pipe-output}).
7195 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7196 complete headers in the piped output.
7197
7198 @item O P
7199 @kindex O P (Summary)
7200 @findex gnus-summary-muttprint
7201 @vindex gnus-summary-muttprint-program
7202 Save the current article into muttprint. That is, print it using the
7203 external program Muttprint (see
7204 @uref{http://muttprint.sourceforge.net/}). The program name and
7205 options to use is controlled by the variable
7206 @code{gnus-summary-muttprint-program}. (@code{gnus-summary-muttprint}).
7207
7208 @end table
7209
7210 @vindex gnus-prompt-before-saving
7211 All these commands use the process/prefix convention
7212 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7213 functions, you might get tired of being prompted for files to save each
7214 and every article in.  The prompting action is controlled by
7215 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7216 default, giving you that excessive prompting action you know and
7217 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7218 just once for each series of articles you save.  If you like to really
7219 have Gnus do all your thinking for you, you can even set this variable
7220 to @code{nil}, which means that you will never be prompted for files to
7221 save articles in.  Gnus will simply save all the articles in the default
7222 files.
7223
7224
7225 @vindex gnus-default-article-saver
7226 You can customize the @code{gnus-default-article-saver} variable to make
7227 Gnus do what you want it to.  You can use any of the six ready-made
7228 functions below, or you can create your own.
7229
7230 @table @code
7231
7232 @item gnus-summary-save-in-rmail
7233 @findex gnus-summary-save-in-rmail
7234 @vindex gnus-rmail-save-name
7235 @findex gnus-plain-save-name
7236 This is the default format, @dfn{babyl}.  Uses the function in the
7237 @code{gnus-rmail-save-name} variable to get a file name to save the
7238 article in.  The default is @code{gnus-plain-save-name}.
7239
7240 @item gnus-summary-save-in-mail
7241 @findex gnus-summary-save-in-mail
7242 @vindex gnus-mail-save-name
7243 Save in a Unix mail (mbox) file.  Uses the function in the
7244 @code{gnus-mail-save-name} variable to get a file name to save the
7245 article in.  The default is @code{gnus-plain-save-name}.
7246
7247 @item gnus-summary-save-in-file
7248 @findex gnus-summary-save-in-file
7249 @vindex gnus-file-save-name
7250 @findex gnus-numeric-save-name
7251 Append the article straight to an ordinary file.  Uses the function in
7252 the @code{gnus-file-save-name} variable to get a file name to save the
7253 article in.  The default is @code{gnus-numeric-save-name}.
7254
7255 @item gnus-summary-write-to-file
7256 @findex gnus-summary-write-to-file
7257 Write the article straight to an ordinary file.  The file is
7258 overwritten if it exists.  Uses the function in the
7259 @code{gnus-file-save-name} variable to get a file name to save the
7260 article in.  The default is @code{gnus-numeric-save-name}.
7261
7262 @item gnus-summary-save-body-in-file
7263 @findex gnus-summary-save-body-in-file
7264 Append the article body to an ordinary file.  Uses the function in the
7265 @code{gnus-file-save-name} variable to get a file name to save the
7266 article in.  The default is @code{gnus-numeric-save-name}.
7267
7268 @item gnus-summary-save-in-folder
7269 @findex gnus-summary-save-in-folder
7270 @findex gnus-folder-save-name
7271 @findex gnus-Folder-save-name
7272 @vindex gnus-folder-save-name
7273 @cindex rcvstore
7274 @cindex MH folders
7275 Save the article to an MH folder using @code{rcvstore} from the MH
7276 library.  Uses the function in the @code{gnus-folder-save-name} variable
7277 to get a file name to save the article in.  The default is
7278 @code{gnus-folder-save-name}, but you can also use
7279 @code{gnus-Folder-save-name}, which creates capitalized names.
7280
7281 @item gnus-summary-save-in-vm
7282 @findex gnus-summary-save-in-vm
7283 Save the article in a VM folder.  You have to have the VM mail
7284 reader to use this setting.
7285 @end table
7286
7287 @vindex gnus-article-save-directory
7288 All of these functions, except for the last one, will save the article
7289 in the @code{gnus-article-save-directory}, which is initialized from the
7290 @code{SAVEDIR} environment variable.  This is @file{~/News/} by
7291 default.
7292
7293 As you can see above, the functions use different functions to find a
7294 suitable name of a file to save the article in.  Below is a list of
7295 available functions that generate names:
7296
7297 @table @code
7298
7299 @item gnus-Numeric-save-name
7300 @findex gnus-Numeric-save-name
7301 File names like @file{~/News/Alt.andrea-dworkin/45}.
7302
7303 @item gnus-numeric-save-name
7304 @findex gnus-numeric-save-name
7305 File names like @file{~/News/alt.andrea-dworkin/45}.
7306
7307 @item gnus-Plain-save-name
7308 @findex gnus-Plain-save-name
7309 File names like @file{~/News/Alt.andrea-dworkin}.
7310
7311 @item gnus-plain-save-name
7312 @findex gnus-plain-save-name
7313 File names like @file{~/News/alt.andrea-dworkin}.
7314
7315 @item gnus-sender-save-name
7316 @findex gnus-sender-save-name
7317 File names like @file{~/News/larsi}.
7318 @end table
7319
7320 @vindex gnus-split-methods
7321 You can have Gnus suggest where to save articles by plonking a regexp into
7322 the @code{gnus-split-methods} alist.  For instance, if you would like to
7323 save articles related to Gnus in the file @file{gnus-stuff}, and articles
7324 related to VM in @code{vm-stuff}, you could set this variable to something
7325 like:
7326
7327 @lisp
7328 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7329  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7330  (my-choosing-function "../other-dir/my-stuff")
7331  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7332 @end lisp
7333
7334 We see that this is a list where each element is a list that has two
7335 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7336 a string (in which case it is used as a regexp to match on the article
7337 head); it can be a symbol (which will be called as a function with the
7338 group name as a parameter); or it can be a list (which will be
7339 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7340 the @dfn{file} will be used as a default prompt.  In addition, the
7341 result of the operation itself will be used if the function or form
7342 called returns a string or a list of strings.
7343
7344 You basically end up with a list of file names that might be used when
7345 saving the current article.  (All ``matches'' will be used.)  You will
7346 then be prompted for what you really want to use as a name, with file
7347 name completion over the results from applying this variable.
7348
7349 This variable is @code{((gnus-article-archive-name))} by default, which
7350 means that Gnus will look at the articles it saves for an
7351 @code{Archive-name} line and use that as a suggestion for the file
7352 name.
7353
7354 Here's an example function to clean up file names somewhat.  If you have
7355 lots of mail groups called things like
7356 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7357 these group names before creating the file name to save to.  The
7358 following will do just that:
7359
7360 @lisp
7361 (defun my-save-name (group)
7362   (when (string-match "^nnml:mail." group)
7363     (substring group (match-end 0))))
7364
7365 (setq gnus-split-methods
7366       '((gnus-article-archive-name)
7367         (my-save-name)))
7368 @end lisp
7369
7370
7371 @vindex gnus-use-long-file-name
7372 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7373 @code{nil}, all the preceding functions will replace all periods
7374 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7375 the functions will generate hierarchies of directories instead of having
7376 all the files in the top level directory
7377 (@file{~/News/alt/andrea-dworkin} instead of
7378 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7379 on most systems.  However, for historical reasons, this is @code{nil} on
7380 Xenix and usg-unix-v machines by default.
7381
7382 This function also affects kill and score file names.  If this variable
7383 is a list, and the list contains the element @code{not-score}, long file
7384 names will not be used for score files, if it contains the element
7385 @code{not-save}, long file names will not be used for saving, and if it
7386 contains the element @code{not-kill}, long file names will not be used
7387 for kill files.
7388
7389 If you'd like to save articles in a hierarchy that looks something like
7390 a spool, you could
7391
7392 @lisp
7393 (setq gnus-use-long-file-name '(not-save)) ; to get a hierarchy
7394 (setq gnus-default-article-saver
7395       'gnus-summary-save-in-file) ; no encoding
7396 @end lisp
7397
7398 Then just save with @kbd{o}.  You'd then read this hierarchy with
7399 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7400 the top level directory as the argument (@file{~/News/}).  Then just walk
7401 around to the groups/directories with @code{nneething}.
7402
7403
7404 @node Decoding Articles
7405 @section Decoding Articles
7406 @cindex decoding articles
7407
7408 Sometime users post articles (or series of articles) that have been
7409 encoded in some way or other.  Gnus can decode them for you.
7410
7411 @menu
7412 * Uuencoded Articles::          Uudecode articles.
7413 * Shell Archives::              Unshar articles.
7414 * PostScript Files::            Split PostScript.
7415 * Other Files::                 Plain save and binhex.
7416 * Decoding Variables::          Variables for a happy decoding.
7417 * Viewing Files::               You want to look at the result of the decoding?
7418 @end menu
7419
7420 @cindex series
7421 @cindex article series
7422 All these functions use the process/prefix convention
7423 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7424 the extension that a ``single article'' means ``a single series''.  Gnus
7425 can find out by itself what articles belong to a series, decode all the
7426 articles and unpack/view/save the resulting file(s).
7427
7428 Gnus guesses what articles are in the series according to the following
7429 simplish rule: The subjects must be (nearly) identical, except for the
7430 last two numbers of the line.  (Spaces are largely ignored, however.)
7431
7432 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
7433 will find all the articles that match the regexp @samp{^cat.gif
7434 ([0-9]+/[0-9]+).*$}.
7435
7436 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7437 series}, will not be properly recognized by any of the automatic viewing
7438 commands, and you have to mark the articles manually with @kbd{#}.
7439
7440
7441 @node Uuencoded Articles
7442 @subsection Uuencoded Articles
7443 @cindex uudecode
7444 @cindex uuencoded articles
7445
7446 @table @kbd
7447
7448 @item X u
7449 @kindex X u (Summary)
7450 @findex gnus-uu-decode-uu
7451 @c @icon{gnus-uu-decode-uu}
7452 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7453
7454 @item X U
7455 @kindex X U (Summary)
7456 @findex gnus-uu-decode-uu-and-save
7457 Uudecodes and saves the current series
7458 (@code{gnus-uu-decode-uu-and-save}).
7459
7460 @item X v u
7461 @kindex X v u (Summary)
7462 @findex gnus-uu-decode-uu-view
7463 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7464
7465 @item X v U
7466 @kindex X v U (Summary)
7467 @findex gnus-uu-decode-uu-and-save-view
7468 Uudecodes, views and saves the current series
7469 (@code{gnus-uu-decode-uu-and-save-view}).
7470
7471 @end table
7472
7473 Remember that these all react to the presence of articles marked with
7474 the process mark.  If, for instance, you'd like to decode and save an
7475 entire newsgroup, you'd typically do @kbd{M P a}
7476 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7477 (@code{gnus-uu-decode-uu-and-save}).
7478
7479 All this is very much different from how @code{gnus-uu} worked with
7480 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7481 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7482 articles in some way (@pxref{Setting Process Marks}) and then press
7483 @kbd{X u}.
7484
7485 @vindex gnus-uu-notify-files
7486 Note: When trying to decode articles that have names matching
7487 @code{gnus-uu-notify-files}, which is hard-coded to
7488 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7489 automatically post an article on @samp{comp.unix.wizards} saying that
7490 you have just viewed the file in question.  This feature can't be turned
7491 off.
7492
7493
7494 @node Shell Archives
7495 @subsection Shell Archives
7496 @cindex unshar
7497 @cindex shell archives
7498 @cindex shared articles
7499
7500 Shell archives (``shar files'') used to be a popular way to distribute
7501 sources, but it isn't used all that much today.  In any case, we have
7502 some commands to deal with these:
7503
7504 @table @kbd
7505
7506 @item X s
7507 @kindex X s (Summary)
7508 @findex gnus-uu-decode-unshar
7509 Unshars the current series (@code{gnus-uu-decode-unshar}).
7510
7511 @item X S
7512 @kindex X S (Summary)
7513 @findex gnus-uu-decode-unshar-and-save
7514 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7515
7516 @item X v s
7517 @kindex X v s (Summary)
7518 @findex gnus-uu-decode-unshar-view
7519 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7520
7521 @item X v S
7522 @kindex X v S (Summary)
7523 @findex gnus-uu-decode-unshar-and-save-view
7524 Unshars, views and saves the current series
7525 (@code{gnus-uu-decode-unshar-and-save-view}).
7526 @end table
7527
7528
7529 @node PostScript Files
7530 @subsection PostScript Files
7531 @cindex PostScript
7532
7533 @table @kbd
7534
7535 @item X p
7536 @kindex X p (Summary)
7537 @findex gnus-uu-decode-postscript
7538 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7539
7540 @item X P
7541 @kindex X P (Summary)
7542 @findex gnus-uu-decode-postscript-and-save
7543 Unpack and save the current PostScript series
7544 (@code{gnus-uu-decode-postscript-and-save}).
7545
7546 @item X v p
7547 @kindex X v p (Summary)
7548 @findex gnus-uu-decode-postscript-view
7549 View the current PostScript series
7550 (@code{gnus-uu-decode-postscript-view}).
7551
7552 @item X v P
7553 @kindex X v P (Summary)
7554 @findex gnus-uu-decode-postscript-and-save-view
7555 View and save the current PostScript series
7556 (@code{gnus-uu-decode-postscript-and-save-view}).
7557 @end table
7558
7559
7560 @node Other Files
7561 @subsection Other Files
7562
7563 @table @kbd
7564 @item X o
7565 @kindex X o (Summary)
7566 @findex gnus-uu-decode-save
7567 Save the current series
7568 (@code{gnus-uu-decode-save}).
7569
7570 @item X b
7571 @kindex X b (Summary)
7572 @findex gnus-uu-decode-binhex
7573 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7574 doesn't really work yet.
7575 @end table
7576
7577
7578 @node Decoding Variables
7579 @subsection Decoding Variables
7580
7581 Adjective, not verb.
7582
7583 @menu
7584 * Rule Variables::              Variables that say how a file is to be viewed.
7585 * Other Decode Variables::      Other decode variables.
7586 * Uuencoding and Posting::      Variables for customizing uuencoding.
7587 @end menu
7588
7589
7590 @node Rule Variables
7591 @subsubsection Rule Variables
7592 @cindex rule variables
7593
7594 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7595 variables are of the form
7596
7597 @lisp
7598       (list '(regexp1 command2)
7599             '(regexp2 command2)
7600             ...)
7601 @end lisp
7602
7603 @table @code
7604
7605 @item gnus-uu-user-view-rules
7606 @vindex gnus-uu-user-view-rules
7607 @cindex sox
7608 This variable is consulted first when viewing files.  If you wish to use,
7609 for instance, @code{sox} to convert an @samp{.au} sound file, you could
7610 say something like:
7611 @lisp
7612 (setq gnus-uu-user-view-rules
7613       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7614 @end lisp
7615
7616 @item gnus-uu-user-view-rules-end
7617 @vindex gnus-uu-user-view-rules-end
7618 This variable is consulted if Gnus couldn't make any matches from the
7619 user and default view rules.
7620
7621 @item gnus-uu-user-archive-rules
7622 @vindex gnus-uu-user-archive-rules
7623 This variable can be used to say what commands should be used to unpack
7624 archives.
7625 @end table
7626
7627
7628 @node Other Decode Variables
7629 @subsubsection Other Decode Variables
7630
7631 @table @code
7632 @vindex gnus-uu-grabbed-file-functions
7633
7634 @item gnus-uu-grabbed-file-functions
7635 All functions in this list will be called right after each file has been
7636 successfully decoded---so that you can move or view files right away,
7637 and don't have to wait for all files to be decoded before you can do
7638 anything.  Ready-made functions you can put in this list are:
7639
7640 @table @code
7641
7642 @item gnus-uu-grab-view
7643 @findex gnus-uu-grab-view
7644 View the file.
7645
7646 @item gnus-uu-grab-move
7647 @findex gnus-uu-grab-move
7648 Move the file (if you're using a saving function.)
7649 @end table
7650
7651 @item gnus-uu-be-dangerous
7652 @vindex gnus-uu-be-dangerous
7653 Specifies what to do if unusual situations arise during decoding.  If
7654 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7655 that didn't work, and overwrite existing files.  Otherwise, ask each
7656 time.
7657
7658 @item gnus-uu-ignore-files-by-name
7659 @vindex gnus-uu-ignore-files-by-name
7660 Files with name matching this regular expression won't be viewed.
7661
7662 @item gnus-uu-ignore-files-by-type
7663 @vindex gnus-uu-ignore-files-by-type
7664 Files with a @sc{mime} type matching this variable won't be viewed.
7665 Note that Gnus tries to guess what type the file is based on the name.
7666 @code{gnus-uu} is not a @sc{mime} package (yet), so this is slightly
7667 kludgey.
7668
7669 @item gnus-uu-tmp-dir
7670 @vindex gnus-uu-tmp-dir
7671 Where @code{gnus-uu} does its work.
7672
7673 @item gnus-uu-do-not-unpack-archives
7674 @vindex gnus-uu-do-not-unpack-archives
7675 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7676 looking for files to display.
7677
7678 @item gnus-uu-view-and-save
7679 @vindex gnus-uu-view-and-save
7680 Non-@code{nil} means that the user will always be asked to save a file
7681 after viewing it.
7682
7683 @item gnus-uu-ignore-default-view-rules
7684 @vindex gnus-uu-ignore-default-view-rules
7685 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7686 rules.
7687
7688 @item gnus-uu-ignore-default-archive-rules
7689 @vindex gnus-uu-ignore-default-archive-rules
7690 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7691 unpacking commands.
7692
7693 @item gnus-uu-kill-carriage-return
7694 @vindex gnus-uu-kill-carriage-return
7695 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7696 from articles.
7697
7698 @item gnus-uu-unmark-articles-not-decoded
7699 @vindex gnus-uu-unmark-articles-not-decoded
7700 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7701 decoded articles as unread.
7702
7703 @item gnus-uu-correct-stripped-uucode
7704 @vindex gnus-uu-correct-stripped-uucode
7705 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7706 uuencoded files that have had trailing spaces deleted.
7707
7708 @item gnus-uu-pre-uudecode-hook
7709 @vindex gnus-uu-pre-uudecode-hook
7710 Hook run before sending a message to @code{uudecode}.
7711
7712 @item gnus-uu-view-with-metamail
7713 @vindex gnus-uu-view-with-metamail
7714 @cindex metamail
7715 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7716 commands defined by the rule variables and just fudge a @sc{mime}
7717 content type based on the file name.  The result will be fed to
7718 @code{metamail} for viewing.
7719
7720 @item gnus-uu-save-in-digest
7721 @vindex gnus-uu-save-in-digest
7722 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7723 decoding, will save in digests.  If this variable is @code{nil},
7724 @code{gnus-uu} will just save everything in a file without any
7725 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7726 to specify any meaningful volume and issue numbers were found, so I
7727 simply dropped them.
7728
7729 @end table
7730
7731
7732 @node Uuencoding and Posting
7733 @subsubsection Uuencoding and Posting
7734
7735 @table @code
7736
7737 @item gnus-uu-post-include-before-composing
7738 @vindex gnus-uu-post-include-before-composing
7739 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7740 before you compose the article.  If this variable is @code{t}, you can
7741 either include an encoded file with @kbd{C-c C-i} or have one included
7742 for you when you post the article.
7743
7744 @item gnus-uu-post-length
7745 @vindex gnus-uu-post-length
7746 Maximum length of an article.  The encoded file will be split into how
7747 many articles it takes to post the entire file.
7748
7749 @item gnus-uu-post-threaded
7750 @vindex gnus-uu-post-threaded
7751 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7752 thread.  This may not be smart, as no other decoder I have seen is able
7753 to follow threads when collecting uuencoded articles.  (Well, I have
7754 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7755 think that counts...) Default is @code{nil}.
7756
7757 @item gnus-uu-post-separate-description
7758 @vindex gnus-uu-post-separate-description
7759 Non-@code{nil} means that the description will be posted in a separate
7760 article.  The first article will typically be numbered (0/x).  If this
7761 variable is @code{nil}, the description the user enters will be included
7762 at the beginning of the first article, which will be numbered (1/x).
7763 Default is @code{t}.
7764
7765 @end table
7766
7767
7768 @node Viewing Files
7769 @subsection Viewing Files
7770 @cindex viewing files
7771 @cindex pseudo-articles
7772
7773 After decoding, if the file is some sort of archive, Gnus will attempt
7774 to unpack the archive and see if any of the files in the archive can be
7775 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7776 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
7777 uncompress and de-tar the main file, and then view the two pictures.
7778 This unpacking process is recursive, so if the archive contains archives
7779 of archives, it'll all be unpacked.
7780
7781 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
7782 extracted file into the summary buffer.  If you go to these
7783 ``articles'', you will be prompted for a command to run (usually Gnus
7784 will make a suggestion), and then the command will be run.
7785
7786 @vindex gnus-view-pseudo-asynchronously
7787 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7788 until the viewing is done before proceeding.
7789
7790 @vindex gnus-view-pseudos
7791 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7792 the pseudo-articles into the summary buffer, but view them
7793 immediately.  If this variable is @code{not-confirm}, the user won't even
7794 be asked for a confirmation before viewing is done.
7795
7796 @vindex gnus-view-pseudos-separately
7797 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7798 pseudo-article will be created for each file to be viewed.  If
7799 @code{nil}, all files that use the same viewing command will be given as
7800 a list of parameters to that command.
7801
7802 @vindex gnus-insert-pseudo-articles
7803 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7804 pseudo-articles when decoding.  It is @code{t} by default.
7805
7806 So; there you are, reading your @emph{pseudo-articles} in your
7807 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7808 Why isn't anything real anymore? How did we get here?
7809
7810
7811 @node Article Treatment
7812 @section Article Treatment
7813
7814 Reading through this huge manual, you may have quite forgotten that the
7815 object of newsreaders is to actually, like, read what people have
7816 written.  Reading articles.  Unfortunately, people are quite bad at
7817 writing, so there are tons of functions and variables to make reading
7818 these articles easier.
7819
7820 @menu
7821 * Article Highlighting::        You want to make the article look like fruit salad.
7822 * Article Fontisizing::         Making emphasized text look nice.
7823 * Article Hiding::              You also want to make certain info go away.
7824 * Article Washing::             Lots of way-neat functions to make life better.
7825 * Article Header::              Doing various header transformations.
7826 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7827 * Article Date::                Grumble, UT!
7828 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7829 * Article Signature::           What is a signature?
7830 * Article Miscellania::         Various other stuff.
7831 @end menu
7832
7833
7834 @node Article Highlighting
7835 @subsection Article Highlighting
7836 @cindex highlighting
7837
7838 Not only do you want your article buffer to look like fruit salad, but
7839 you want it to look like technicolor fruit salad.
7840
7841 @table @kbd
7842
7843 @item W H a
7844 @kindex W H a (Summary)
7845 @findex gnus-article-highlight
7846 @findex gnus-article-maybe-highlight
7847 Do much highlighting of the current article
7848 (@code{gnus-article-highlight}).  This function highlights header, cited
7849 text, the signature, and adds buttons to the body and the head.
7850
7851 @item W H h
7852 @kindex W H h (Summary)
7853 @findex gnus-article-highlight-headers
7854 @vindex gnus-header-face-alist
7855 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7856 highlighting will be done according to the @code{gnus-header-face-alist}
7857 variable, which is a list where each element has the form
7858 @code{(@var{regexp} @var{name} @var{content})}.
7859 @var{regexp} is a regular expression for matching the
7860 header, @var{name} is the face used for highlighting the header name
7861 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7862 the header value.  The first match made will be used.  Note that
7863 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7864
7865 @item W H c
7866 @kindex W H c (Summary)
7867 @findex gnus-article-highlight-citation
7868 Highlight cited text (@code{gnus-article-highlight-citation}).
7869
7870 Some variables to customize the citation highlights:
7871
7872 @table @code
7873 @vindex gnus-cite-parse-max-size
7874
7875 @item gnus-cite-parse-max-size
7876 If the article size if bigger than this variable (which is 25000 by
7877 default), no citation highlighting will be performed.
7878
7879 @item gnus-cite-max-prefix
7880 @vindex gnus-cite-max-prefix
7881 Maximum possible length for a citation prefix (default 20).
7882
7883 @item gnus-cite-face-list
7884 @vindex gnus-cite-face-list
7885 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
7886 When there are citations from multiple articles in the same message,
7887 Gnus will try to give each citation from each article its own face.
7888 This should make it easier to see who wrote what.
7889
7890 @item gnus-supercite-regexp
7891 @vindex gnus-supercite-regexp
7892 Regexp matching normal Supercite attribution lines.
7893
7894 @item gnus-supercite-secondary-regexp
7895 @vindex gnus-supercite-secondary-regexp
7896 Regexp matching mangled Supercite attribution lines.
7897
7898 @item gnus-cite-minimum-match-count
7899 @vindex gnus-cite-minimum-match-count
7900 Minimum number of identical prefixes we have to see before we believe
7901 that it's a citation.
7902
7903 @item gnus-cite-attribution-prefix
7904 @vindex gnus-cite-attribution-prefix
7905 Regexp matching the beginning of an attribution line.
7906
7907 @item gnus-cite-attribution-suffix
7908 @vindex gnus-cite-attribution-suffix
7909 Regexp matching the end of an attribution line.
7910
7911 @item gnus-cite-attribution-face
7912 @vindex gnus-cite-attribution-face
7913 Face used for attribution lines.  It is merged with the face for the
7914 cited text belonging to the attribution.
7915
7916 @end table
7917
7918
7919 @item W H s
7920 @kindex W H s (Summary)
7921 @vindex gnus-signature-separator
7922 @vindex gnus-signature-face
7923 @findex gnus-article-highlight-signature
7924 Highlight the signature (@code{gnus-article-highlight-signature}).
7925 Everything after @code{gnus-signature-separator} (@pxref{Article
7926 Signature}) in an article will be considered a signature and will be
7927 highlighted with @code{gnus-signature-face}, which is @code{italic} by
7928 default.
7929
7930 @end table
7931
7932 @xref{Customizing Articles}, for how to highlight articles automatically.
7933
7934
7935 @node Article Fontisizing
7936 @subsection Article Fontisizing
7937 @cindex emphasis
7938 @cindex article emphasis
7939
7940 @findex gnus-article-emphasize
7941 @kindex W e (Summary)
7942 People commonly add emphasis to words in news articles by writing things
7943 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
7944 this look nicer by running the article through the @kbd{W e}
7945 (@code{gnus-article-emphasize}) command.
7946
7947 @vindex gnus-emphasis-alist
7948 How the emphasis is computed is controlled by the
7949 @code{gnus-emphasis-alist} variable.  This is an alist where the first
7950 element is a regular expression to be matched.  The second is a number
7951 that says what regular expression grouping is used to find the entire
7952 emphasized word.  The third is a number that says what regexp grouping
7953 should be displayed and highlighted.  (The text between these two
7954 groupings will be hidden.)  The fourth is the face used for
7955 highlighting.
7956
7957 @lisp
7958 (setq gnus-emphasis-alist
7959       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
7960         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
7961 @end lisp
7962
7963 @cindex slash
7964 @cindex asterisk
7965 @cindex underline
7966 @cindex /
7967 @cindex *
7968
7969 @vindex gnus-emphasis-underline
7970 @vindex gnus-emphasis-bold
7971 @vindex gnus-emphasis-italic
7972 @vindex gnus-emphasis-underline-bold
7973 @vindex gnus-emphasis-underline-italic
7974 @vindex gnus-emphasis-bold-italic
7975 @vindex gnus-emphasis-underline-bold-italic
7976 By default, there are seven rules, and they use the following faces:
7977 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
7978 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
7979 @code{gnus-emphasis-underline-italic},
7980 @code{gnus-emphasis-underline-bold}, and
7981 @code{gnus-emphasis-underline-bold-italic}.
7982
7983 If you want to change these faces, you can either use @kbd{M-x
7984 customize}, or you can use @code{copy-face}.  For instance, if you want
7985 to make @code{gnus-emphasis-italic} use a red face instead, you could
7986 say something like:
7987
7988 @lisp
7989 (copy-face 'red 'gnus-emphasis-italic)
7990 @end lisp
7991
7992 @vindex gnus-group-highlight-words-alist
7993
7994 If you want to highlight arbitrary words, you can use the
7995 @code{gnus-group-highlight-words-alist} variable, which uses the same
7996 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
7997 parameter (@pxref{Group Parameters}) can also be used.
7998
7999 @xref{Customizing Articles}, for how to fontize articles automatically.
8000
8001
8002 @node Article Hiding
8003 @subsection Article Hiding
8004 @cindex article hiding
8005
8006 Or rather, hiding certain things in each article.  There usually is much
8007 too much cruft in most articles.
8008
8009 @table @kbd
8010
8011 @item W W a
8012 @kindex W W a (Summary)
8013 @findex gnus-article-hide
8014 Do quite a lot of hiding on the article buffer
8015 (@kbd{gnus-article-hide}).  In particular, this function will hide
8016 headers, PGP, cited text and the signature.
8017
8018 @item W W h
8019 @kindex W W h (Summary)
8020 @findex gnus-article-hide-headers
8021 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8022 Headers}.
8023
8024 @item W W b
8025 @kindex W W b (Summary)
8026 @findex gnus-article-hide-boring-headers
8027 Hide headers that aren't particularly interesting
8028 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8029
8030 @item W W s
8031 @kindex W W s (Summary)
8032 @findex gnus-article-hide-signature
8033 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8034 Signature}.
8035
8036 @item W W l
8037 @kindex W W l (Summary)
8038 @findex gnus-article-hide-list-identifiers
8039 @vindex gnus-list-identifiers
8040 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8041 are strings some mailing list servers add to the beginning of all
8042 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8043 @samp{Re: } is skipped before stripping. @code{gnus-list-identifiers}
8044 may not contain @code{\\(..\\)}.
8045
8046 @table @code
8047
8048 @item gnus-list-identifiers
8049 @vindex gnus-list-identifiers
8050 A regular expression that matches list identifiers to be removed from
8051 subject.  This can also be a list of regular expressions.
8052
8053 @end table
8054
8055 @item W W p
8056 @kindex W W p (Summary)
8057 @findex gnus-article-hide-pgp
8058 @vindex gnus-article-hide-pgp-hook
8059 Hide @sc{pgp} signatures (@code{gnus-article-hide-pgp}).  The
8060 @code{gnus-article-hide-pgp-hook} hook will be run after a @sc{pgp}
8061 signature has been hidden.  For example, to automatically verify
8062 articles that have signatures in them do:
8063 @lisp
8064 ;;; Hide pgp cruft if any.
8065
8066 (setq gnus-treat-strip-pgp t)
8067
8068 ;;; After hiding pgp, verify the message;
8069 ;;; only happens if pgp signature is found.
8070
8071 (add-hook 'gnus-article-hide-pgp-hook
8072           (lambda ()
8073             (save-excursion
8074               (set-buffer gnus-original-article-buffer)
8075               (mc-verify))))
8076 @end lisp
8077
8078 @item W W P
8079 @kindex W W P (Summary)
8080 @findex gnus-article-hide-pem
8081 Hide @sc{pem} (privacy enhanced messages) cruft
8082 (@code{gnus-article-hide-pem}).
8083
8084 @item W W B
8085 @kindex W W B (Summary)
8086 @findex gnus-article-strip-banner
8087 @vindex gnus-article-banner-alist
8088 @vindex gnus-article-address-banner-alist
8089 @cindex banner
8090 @cindex OneList
8091 @cindex stripping advertisements
8092 @cindex advertisements
8093 Strip the banner specified by the @code{banner} group parameter
8094 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8095 annoying banners and/or signatures that some mailing lists and moderated
8096 groups adds to all the messages.  The way to use this function is to add
8097 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8098 group you want banners stripped from.  The parameter either be a string,
8099 which will be interpreted as a regular expression matching text to be
8100 removed, or the symbol @code{signature}, meaning that the (last)
8101 signature should be removed, or other symbol, meaning that the
8102 corresponding regular expression in @code{gnus-article-banner-alist} is
8103 used.
8104
8105 Regardless of a group, you can hide things like advertisements only when
8106 the sender of an article has a certain mail address specified in
8107 @code{gnus-article-address-banner-alist}.
8108
8109 @table @code
8110
8111 @item gnus-article-address-banner-alist
8112 @vindex gnus-article-address-banner-alist
8113 Alist of mail addresses and banners.  Each element has the form
8114 @code{(ADDRESS . BANNER)}, where ADDRESS is a regexp matching a mail
8115 address in the From header, BANNER is one of a symbol @code{signature},
8116 an item in @code{gnus-article-banner-alist}, a regexp and @code{nil}.
8117 If ADDRESS matches author's mail address, it will remove things like
8118 advertisements.  For example, if a sender has the mail address
8119 @samp{hail@@yoo-hoo.co.jp} and there is a banner something like
8120 @samp{Do You Yoo-hoo!?} in all articles he sends, you can use the
8121 following element to remove them:
8122
8123 @lisp
8124 ("@@yoo-hoo\\.co\\.jp\\'" . "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8125 @end lisp
8126
8127 @end table
8128
8129 @item W W c
8130 @kindex W W c (Summary)
8131 @findex gnus-article-hide-citation
8132 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8133 customizing the hiding:
8134
8135 @table @code
8136
8137 @item gnus-cited-opened-text-button-line-format
8138 @itemx gnus-cited-closed-text-button-line-format
8139 @vindex gnus-cited-closed-text-button-line-format
8140 @vindex gnus-cited-opened-text-button-line-format
8141 Gnus adds buttons to show where the cited text has been hidden, and to
8142 allow toggle hiding the text.  The format of the variable is specified
8143 by these format-like variable (@pxref{Formatting Variables}).  These
8144 specs are valid:
8145
8146 @table @samp
8147 @item b
8148 Starting point of the hidden text.
8149 @item e
8150 Ending point of the hidden text.
8151 @item l
8152 Number of characters in the hidden region.
8153 @item n
8154 Number of lines of hidden text.
8155 @end table
8156
8157 @item gnus-cited-lines-visible
8158 @vindex gnus-cited-lines-visible
8159 The number of lines at the beginning of the cited text to leave
8160 shown. This can also be a cons cell with the number of lines at the top
8161 and bottom of the text, respectively, to remain visible.
8162
8163 @end table
8164
8165 @item W W C-c
8166 @kindex W W C-c (Summary)
8167 @findex gnus-article-hide-citation-maybe
8168
8169 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8170 following two variables:
8171
8172 @table @code
8173 @item gnus-cite-hide-percentage
8174 @vindex gnus-cite-hide-percentage
8175 If the cited text is of a bigger percentage than this variable (default
8176 50), hide the cited text.
8177
8178 @item gnus-cite-hide-absolute
8179 @vindex gnus-cite-hide-absolute
8180 The cited text must have at least this length (default 10) before it
8181 is hidden.
8182 @end table
8183
8184 @item W W C
8185 @kindex W W C (Summary)
8186 @findex gnus-article-hide-citation-in-followups
8187 Hide cited text in articles that aren't roots
8188 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8189 useful as an interactive command, but might be a handy function to stick
8190 have happen automatically (@pxref{Customizing Articles}).
8191
8192 @end table
8193
8194 All these ``hiding'' commands are toggles, but if you give a negative
8195 prefix to these commands, they will show what they have previously
8196 hidden.  If you give a positive prefix, they will always hide.
8197
8198 Also @pxref{Article Highlighting} for further variables for
8199 citation customization.
8200
8201 @xref{Customizing Articles}, for how to hide article elements
8202 automatically.
8203
8204
8205 @node Article Washing
8206 @subsection Article Washing
8207 @cindex washing
8208 @cindex article washing
8209
8210 We call this ``article washing'' for a really good reason.  Namely, the
8211 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8212
8213 @dfn{Washing} is defined by us as ``changing something from something to
8214 something else'', but normally results in something looking better.
8215 Cleaner, perhaps.
8216
8217 @xref{Customizing Articles}, if you want to change how Gnus displays
8218 articles by default.
8219
8220 @table @kbd
8221
8222 @item C-u g
8223 This is not really washing, it's sort of the opposite of washing.  If
8224 you type this, you see the article exactly as it exists on disk or on
8225 the server.
8226
8227 @item W l
8228 @kindex W l (Summary)
8229 @findex gnus-summary-stop-page-breaking
8230 Remove page breaks from the current article
8231 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8232 delimiters.
8233
8234 @item W r
8235 @kindex W r (Summary)
8236 @findex gnus-summary-caesar-message
8237 @c @icon{gnus-summary-caesar-message}
8238 Do a Caesar rotate (rot13) on the article buffer
8239 (@code{gnus-summary-caesar-message}).
8240 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8241 (Typically offensive jokes and such.)
8242
8243 It's commonly called ``rot13'' because each letter is rotated 13
8244 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8245 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8246 is rumored to have employed this form of, uh, somewhat weak encryption.
8247
8248 @item W m
8249 @kindex W m (Summary)
8250 @findex gnus-summary-morse-message
8251 @c @icon{gnus-summary-morse-message}
8252 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8253
8254 @item W t
8255 @item t
8256 @kindex W t (Summary)
8257 @kindex t (Summary)
8258 @findex gnus-summary-toggle-header
8259 Toggle whether to display all headers in the article buffer
8260 (@code{gnus-summary-toggle-header}).
8261
8262 @item W v
8263 @kindex W v (Summary)
8264 @findex gnus-summary-verbose-headers
8265 Toggle whether to display all headers in the article buffer permanently
8266 (@code{gnus-summary-verbose-headers}).
8267
8268 @item W o
8269 @kindex W o (Summary)
8270 @findex gnus-article-treat-overstrike
8271 Treat overstrike (@code{gnus-article-treat-overstrike}).
8272
8273 @item W d
8274 @kindex W d (Summary)
8275 @findex gnus-article-treat-dumbquotes
8276 @vindex gnus-article-dumbquotes-map
8277 @cindex Smartquotes
8278 @cindex M****s*** sm*rtq**t*s
8279 @cindex Latin 1
8280 Treat M****s*** sm*rtq**t*s according to
8281 @code{gnus-article-dumbquotes-map}
8282 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8283 whether a character is a sm*rtq**t* or not, so it should only be used
8284 interactively.
8285
8286 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8287 an attempt to provide more quoting characters.  If you see something
8288 like @code{\222} or @code{\264} where you're expecting some kind of
8289 apostrophe or quotation mark, then try this wash.
8290
8291 @item W k
8292 @kindex W k (Summary)
8293 @findex gnus-article-outlook-deuglify-article
8294 @cindex Outlook Express
8295 Deuglify broken Outlook (Express) articles and redisplay
8296 (@code{gnus-article-outlook-deuglify-article}).
8297
8298 @item W w
8299 @kindex W w (Summary)
8300 @findex gnus-article-fill-cited-article
8301 Do word wrap (@code{gnus-article-fill-cited-article}).
8302
8303 You can give the command a numerical prefix to specify the width to use
8304 when filling.
8305
8306 @item W Q
8307 @kindex W Q (Summary)
8308 @findex gnus-article-fill-long-lines
8309 Fill long lines (@code{gnus-article-fill-long-lines}).
8310
8311 @item W C
8312 @kindex W C (Summary)
8313 @findex gnus-article-capitalize-sentences
8314 Capitalize the first word in each sentence
8315 (@code{gnus-article-capitalize-sentences}).
8316
8317 @item W c
8318 @kindex W c (Summary)
8319 @findex gnus-article-remove-cr
8320 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8321 (this takes care of DOS line endings), and then translate any remaining
8322 CRs into LF (this takes care of Mac line endings)
8323 (@code{gnus-article-remove-cr}).
8324
8325 @item W q
8326 @kindex W q (Summary)
8327 @findex gnus-article-de-quoted-unreadable
8328 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8329 Quoted-Printable is one common @sc{mime} encoding employed when sending
8330 non-ASCII (i. e., 8-bit) articles.  It typically makes strings like
8331 @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which doesn't look very
8332 readable to me.  Note that this is usually done automatically by
8333 Gnus if the message in question has a @code{Content-Transfer-Encoding}
8334 header that says that this encoding has been done.
8335 If a prefix is given, a charset will be asked for.
8336
8337 @item W 6
8338 @kindex W 6 (Summary)
8339 @findex gnus-article-de-base64-unreadable
8340 Treat base64 (@code{gnus-article-de-base64-unreadable}).
8341 Base64 is one common @sc{mime} encoding employed when sending non-ASCII
8342 (i. e., 8-bit) articles.  Note that this is usually done
8343 automatically by Gnus if the message in question has a
8344 @code{Content-Transfer-Encoding} header that says that this encoding has
8345 been done.
8346 If a prefix is given, a charset will be asked for.
8347
8348 @item W Z
8349 @kindex W Z (Summary)
8350 @findex gnus-article-decode-HZ
8351 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8352 common encoding employed when sending Chinese articles.  It typically
8353 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8354
8355 @item W u
8356 @kindex W u (Summary)
8357 @findex gnus-article-unsplit-urls
8358 Remove newlines from within URLs.  Some mailers insert newlines into
8359 outgoing email messages to keep lines short.  This reformatting can
8360 split long URLs onto multiple lines.  Repair those URLs by removing
8361 the newlines (@code{gnus-article-unsplit-urls}).
8362
8363 @item W h
8364 @kindex W h (Summary)
8365 @findex gnus-article-wash-html
8366 Treat @sc{html} (@code{gnus-article-wash-html}).  Note that this is
8367 usually done automatically by Gnus if the message in question has a
8368 @code{Content-Type} header that says that the message is @sc{html}.
8369
8370 If a prefix is given, a charset will be asked for.
8371
8372 @vindex gnus-article-wash-function
8373 The default is to use the function specified by
8374 @code{mm-inline-text-html-renderer} (@pxref{Customization, , , emacs-mime})
8375 to convert the @sc{html}, but this is controlled by the
8376 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8377 can use include:
8378
8379 @table @code
8380 @item w3
8381 Use Emacs/w3.
8382
8383 @item w3m
8384 Use emacs-w3m (see @uref{http://emacs-w3m.namazu.org/} for more
8385 information).
8386
8387 @item links
8388 Use Links (see @uref{http://artax.karlin.mff.cuni.cz/~mikulas/links/}).
8389
8390 @item lynx
8391 Use Lynx (see @uref{http://lynx.browser.org/}).
8392
8393 @item html2text
8394 Use html2text -- a simple @sc{html} converter included with Gnus.
8395
8396 @end table
8397
8398 @item W b
8399 @kindex W b (Summary)
8400 @findex gnus-article-add-buttons
8401 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8402 @xref{Article Buttons}.
8403
8404 @item W B
8405 @kindex W B (Summary)
8406 @findex gnus-article-add-buttons-to-head
8407 Add clickable buttons to the article headers
8408 (@code{gnus-article-add-buttons-to-head}).
8409
8410 @item W p
8411 @kindex W p (Summary)
8412 @findex gnus-article-verify-x-pgp-sig
8413 Verify a signed control message (@code{gnus-article-verify-x-pgp-sig}).
8414 Control messages such as @code{newgroup} and @code{checkgroups} are
8415 usually signed by the hierarchy maintainer.  You need to add the PGP
8416 public key of the maintainer to your keyring to verify the
8417 message.@footnote{PGP keys for many hierarchies are available at
8418 @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8419
8420 @item W s
8421 @kindex W s (Summary)
8422 @findex gnus-summary-force-verify-and-decrypt
8423 Verify a signed (PGP, @sc{pgp/mime} or @sc{s/mime}) message
8424 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8425
8426 @item W a
8427 @kindex W a (Summary)
8428 @findex gnus-article-strip-headers-in-body
8429 Strip headers like the @code{X-No-Archive} header from the beginning of
8430 article bodies (@code{gnus-article-strip-headers-in-body}).
8431
8432 @item W E l
8433 @kindex W E l (Summary)
8434 @findex gnus-article-strip-leading-blank-lines
8435 Remove all blank lines from the beginning of the article
8436 (@code{gnus-article-strip-leading-blank-lines}).
8437
8438 @item W E m
8439 @kindex W E m (Summary)
8440 @findex gnus-article-strip-multiple-blank-lines
8441 Replace all blank lines with empty lines and then all multiple empty
8442 lines with a single empty line.
8443 (@code{gnus-article-strip-multiple-blank-lines}).
8444
8445 @item W E t
8446 @kindex W E t (Summary)
8447 @findex gnus-article-remove-trailing-blank-lines
8448 Remove all blank lines at the end of the article
8449 (@code{gnus-article-remove-trailing-blank-lines}).
8450
8451 @item W E a
8452 @kindex W E a (Summary)
8453 @findex gnus-article-strip-blank-lines
8454 Do all the three commands above
8455 (@code{gnus-article-strip-blank-lines}).
8456
8457 @item W E A
8458 @kindex W E A (Summary)
8459 @findex gnus-article-strip-all-blank-lines
8460 Remove all blank lines
8461 (@code{gnus-article-strip-all-blank-lines}).
8462
8463 @item W E s
8464 @kindex W E s (Summary)
8465 @findex gnus-article-strip-leading-space
8466 Remove all white space from the beginning of all lines of the article
8467 body (@code{gnus-article-strip-leading-space}).
8468
8469 @item W E e
8470 @kindex W E e (Summary)
8471 @findex gnus-article-strip-trailing-space
8472 Remove all white space from the end of all lines of the article
8473 body (@code{gnus-article-strip-trailing-space}).
8474
8475 @end table
8476
8477 @xref{Customizing Articles}, for how to wash articles automatically.
8478
8479
8480 @node Article Header
8481 @subsection Article Header
8482
8483 These commands perform various transformations of article header.
8484
8485 @table @kbd
8486
8487 @item W G u
8488 @kindex W G u (Summary)
8489 @findex gnus-article-treat-unfold-headers
8490 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8491
8492 @item W G n
8493 @kindex W G n (Summary)
8494 @findex gnus-article-treat-fold-newsgroups
8495 Fold the @code{Newsgroups} and @code{Followup-To} headers
8496 (@code{gnus-article-treat-fold-newsgroups}).
8497
8498 @item W G f
8499 @kindex W G f (Summary)
8500 @findex gnus-article-treat-fold-headers
8501 Fold all the message headers
8502 (@code{gnus-article-treat-fold-headers}).
8503
8504 @item W E w
8505 @kindex W E w
8506 @findex gnus-article-remove-leading-whitespace
8507 Remove excessive whitespace from all headers
8508 (@code{gnus-article-remove-leading-whitespace}).
8509
8510 @end table
8511
8512
8513 @node Article Buttons
8514 @subsection Article Buttons
8515 @cindex buttons
8516
8517 People often include references to other stuff in articles, and it would
8518 be nice if Gnus could just fetch whatever it is that people talk about
8519 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8520 button on these references.
8521
8522 @vindex gnus-button-man-handler
8523 Gnus adds @dfn{buttons} to certain standard references by default:
8524 Well-formed URLs, mail addresses, Message-IDs, Info links and man pages.
8525 This is controlled by two variables, one that handles article bodies and
8526 one that handles article heads:
8527
8528 @table @code
8529
8530 @item gnus-button-alist
8531 @vindex gnus-button-alist
8532 This is an alist where each entry has this form:
8533
8534 @lisp
8535 (REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
8536 @end lisp
8537
8538 @table @var
8539
8540 @item regexp
8541 All text that match this regular expression (case insensitive) will be
8542 considered an external reference.  Here's a typical regexp that matches
8543 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8544 variable containing a regexp, useful variables to use include
8545 @code{gnus-button-url-regexp}.
8546
8547 @item button-par
8548 Gnus has to know which parts of the matches is to be highlighted.  This
8549 is a number that says what sub-expression of the regexp is to be
8550 highlighted.  If you want it all highlighted, you use 0 here.
8551
8552 @item use-p
8553 This form will be @code{eval}ed, and if the result is non-@code{nil},
8554 this is considered a match.  This is useful if you want extra sifting to
8555 avoid false matches.
8556
8557 @item function
8558 This function will be called when you click on this button.
8559
8560 @item data-par
8561 As with @var{button-par}, this is a sub-expression number, but this one
8562 says which part of the match is to be sent as data to @var{function}.
8563
8564 @end table
8565
8566 So the full entry for buttonizing URLs is then
8567
8568 @lisp
8569 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8570 @end lisp
8571
8572 @item gnus-header-button-alist
8573 @vindex gnus-header-button-alist
8574 This is just like the other alist, except that it is applied to the
8575 article head only, and that each entry has an additional element that is
8576 used to say what headers to apply the buttonize coding to:
8577
8578 @lisp
8579 (HEADER REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
8580 @end lisp
8581
8582 @var{header} is a regular expression.
8583
8584 @item gnus-button-url-regexp
8585 @vindex gnus-button-url-regexp
8586 A regular expression that matches embedded URLs.  It is used in the
8587 default values of the variables above.
8588
8589 @item gnus-article-button-face
8590 @vindex gnus-article-button-face
8591 Face used on buttons.
8592
8593 @item gnus-article-mouse-face
8594 @vindex gnus-article-mouse-face
8595 Face used when the mouse cursor is over a button.
8596
8597 @end table
8598
8599 @xref{Customizing Articles}, for how to buttonize articles automatically.
8600
8601
8602 @node Article Date
8603 @subsection Article Date
8604
8605 The date is most likely generated in some obscure timezone you've never
8606 heard of, so it's quite nice to be able to find out what the time was
8607 when the article was sent.
8608
8609 @table @kbd
8610
8611 @item W T u
8612 @kindex W T u (Summary)
8613 @findex gnus-article-date-ut
8614 Display the date in UT (aka. GMT, aka ZULU)
8615 (@code{gnus-article-date-ut}).
8616
8617 @item W T i
8618 @kindex W T i (Summary)
8619 @findex gnus-article-date-iso8601
8620 @cindex ISO 8601
8621 Display the date in international format, aka. ISO 8601
8622 (@code{gnus-article-date-iso8601}).
8623
8624 @item W T l
8625 @kindex W T l (Summary)
8626 @findex gnus-article-date-local
8627 Display the date in the local timezone (@code{gnus-article-date-local}).
8628
8629 @item W T p
8630 @kindex W T p (Summary)
8631 @findex gnus-article-date-english
8632 Display the date in a format that's easily pronounceable in English
8633 (@code{gnus-article-date-english}).
8634
8635 @item W T s
8636 @kindex W T s (Summary)
8637 @vindex gnus-article-time-format
8638 @findex gnus-article-date-user
8639 @findex format-time-string
8640 Display the date using a user-defined format
8641 (@code{gnus-article-date-user}).  The format is specified by the
8642 @code{gnus-article-time-format} variable, and is a string that's passed
8643 to @code{format-time-string}.  See the documentation of that variable
8644 for a list of possible format specs.
8645
8646 @item W T e
8647 @kindex W T e (Summary)
8648 @findex gnus-article-date-lapsed
8649 @findex gnus-start-date-timer
8650 @findex gnus-stop-date-timer
8651 Say how much time has elapsed between the article was posted and now
8652 (@code{gnus-article-date-lapsed}).  It looks something like:
8653
8654 @example
8655 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8656 @end example
8657
8658 The value of @code{gnus-article-date-lapsed-new-header} determines
8659 whether this header will just be added below the old Date one, or will
8660 replace it.
8661
8662 An advantage of using Gnus to read mail is that it converts simple bugs
8663 into wonderful absurdities.
8664
8665 If you want to have this line updated continually, you can put
8666
8667 @lisp
8668 (gnus-start-date-timer)
8669 @end lisp
8670
8671 in your @file{.gnus.el} file, or you can run it off of some hook.  If
8672 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8673 command.
8674
8675 @item W T o
8676 @kindex W T o (Summary)
8677 @findex gnus-article-date-original
8678 Display the original date (@code{gnus-article-date-original}).  This can
8679 be useful if you normally use some other conversion function and are
8680 worried that it might be doing something totally wrong.  Say, claiming
8681 that the article was posted in 1854.  Although something like that is
8682 @emph{totally} impossible.  Don't you trust me? *titter*
8683
8684 @end table
8685
8686 @xref{Customizing Articles}, for how to display the date in your
8687 preferred format automatically.
8688
8689
8690 @node Article Display
8691 @subsection Article Display
8692 @cindex picons
8693 @cindex x-face
8694 @cindex smileys
8695
8696 These commands add various frivolous display gimmicks to the article
8697 buffer in Emacs versions that support them.
8698
8699 @code{X-Face} headers are small black-and-white images supplied by the
8700 message headers (@pxref{X-Face}).
8701
8702 Picons, on the other hand, reside on your own system, and Gnus will
8703 try to match the headers to what you have (@pxref{Picons}).
8704
8705 Smileys are those little @samp{:-)} symbols that people like to litter
8706 their messages with (@pxref{Smileys}).
8707
8708 All these functions are toggles--if the elements already exist,
8709 they'll be removed.
8710
8711 @table @kbd
8712 @item W D x
8713 @kindex W D x (Summary)
8714 @findex gnus-article-display-x-face
8715 Display an @code{X-Face} in the @code{From} header.
8716 (@code{gnus-article-display-x-face}).
8717
8718 @item W D s
8719 @kindex W D s (Summary)
8720 @findex gnus-treat-smiley
8721 Display smileys (@code{gnus-treat-smiley}).
8722
8723 @item W D f
8724 @kindex W D f (Summary)
8725 @findex gnus-treat-from-picon
8726 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
8727
8728 @item W D m
8729 @kindex W D m (Summary)
8730 @findex gnus-treat-mail-picon
8731 Piconify all mail headers (i. e., @code{Cc}, @code{To})
8732 (@code{gnus-treat-mail-picon}).
8733
8734 @item W D n
8735 @kindex W D n (Summary)
8736 @findex gnus-treat-newsgroups-picon
8737 Piconify all news headers (i. e., @code{Newsgroups} and
8738 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
8739
8740 @item W D D
8741 @kindex W D D (Summary)
8742 @findex gnus-article-remove-images
8743 Remove all images from the article buffer
8744 (@code{gnus-article-remove-images}).
8745
8746 @end table
8747
8748
8749
8750 @node Article Signature
8751 @subsection Article Signature
8752 @cindex signatures
8753 @cindex article signature
8754
8755 @vindex gnus-signature-separator
8756 Each article is divided into two parts---the head and the body.  The
8757 body can be divided into a signature part and a text part.  The variable
8758 that says what is to be considered a signature is
8759 @code{gnus-signature-separator}.  This is normally the standard
8760 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
8761 non-standard signature separators, so this variable can also be a list
8762 of regular expressions to be tested, one by one.  (Searches are done
8763 from the end of the body towards the beginning.)  One likely value is:
8764
8765 @lisp
8766 (setq gnus-signature-separator
8767       '("^-- $"         ; The standard
8768         "^-- *$"        ; A common mangling
8769         "^-------*$"    ; Many people just use a looong
8770                         ; line of dashes.  Shame!
8771         "^ *--------*$" ; Double-shame!
8772         "^________*$"   ; Underscores are also popular
8773         "^========*$")) ; Pervert!
8774 @end lisp
8775
8776 The more permissive you are, the more likely it is that you'll get false
8777 positives.
8778
8779 @vindex gnus-signature-limit
8780 @code{gnus-signature-limit} provides a limit to what is considered a
8781 signature when displaying articles.
8782
8783 @enumerate
8784 @item
8785 If it is an integer, no signature may be longer (in characters) than
8786 that integer.
8787 @item
8788 If it is a floating point number, no signature may be longer (in lines)
8789 than that number.
8790 @item
8791 If it is a function, the function will be called without any parameters,
8792 and if it returns @code{nil}, there is no signature in the buffer.
8793 @item
8794 If it is a string, it will be used as a regexp.  If it matches, the text
8795 in question is not a signature.
8796 @end enumerate
8797
8798 This variable can also be a list where the elements may be of the types
8799 listed above.  Here's an example:
8800
8801 @lisp
8802 (setq gnus-signature-limit
8803       '(200.0 "^---*Forwarded article"))
8804 @end lisp
8805
8806 This means that if there are more than 200 lines after the signature
8807 separator, or the text after the signature separator is matched by
8808 the regular expression @samp{^---*Forwarded article}, then it isn't a
8809 signature after all.
8810
8811
8812 @node Article Miscellania
8813 @subsection Article Miscellania
8814
8815 @table @kbd
8816 @item A t
8817 @kindex A t (Summary)
8818 @findex gnus-article-babel
8819 Translate the article from one language to another
8820 (@code{gnus-article-babel}).
8821
8822 @end table
8823
8824
8825 @node MIME Commands
8826 @section MIME Commands
8827 @cindex MIME decoding
8828 @cindex attachments
8829 @cindex viewing attachments
8830
8831 The following commands all understand the numerical prefix.  For
8832 instance, @kbd{3 b} means ``view the third @sc{mime} part''.
8833
8834 @table @kbd
8835 @item b
8836 @itemx K v
8837 @kindex b (Summary)
8838 @kindex K v (Summary)
8839 View the @sc{mime} part.
8840
8841 @item K o
8842 @kindex K o (Summary)
8843 Save the @sc{mime} part.
8844
8845 @item K c
8846 @kindex K c (Summary)
8847 Copy the @sc{mime} part.
8848
8849 @item K e
8850 @kindex K e (Summary)
8851 View the @sc{mime} part externally.
8852
8853 @item K i
8854 @kindex K i (Summary)
8855 View the @sc{mime} part internally.
8856
8857 @item K |
8858 @kindex K | (Summary)
8859 Pipe the @sc{mime} part to an external command.
8860 @end table
8861
8862 The rest of these @sc{mime} commands do not use the numerical prefix in
8863 the same manner:
8864
8865 @table @kbd
8866 @item K b
8867 @kindex K b (Summary)
8868 Make all the @sc{mime} parts have buttons in front of them.  This is
8869 mostly useful if you wish to save (or perform other actions) on inlined
8870 parts.
8871
8872 @item K m
8873 @kindex K m (Summary)
8874 @findex gnus-summary-repair-multipart
8875 Some multipart messages are transmitted with missing or faulty headers.
8876 This command will attempt to ``repair'' these messages so that they can
8877 be viewed in a more pleasant manner
8878 (@code{gnus-summary-repair-multipart}).
8879
8880 @item X m
8881 @kindex X m (Summary)
8882 @findex gnus-summary-save-parts
8883 Save all parts matching a @sc{mime} type to a directory
8884 (@code{gnus-summary-save-parts}).  Understands the process/prefix
8885 convention (@pxref{Process/Prefix}).
8886
8887 @item M-t
8888 @kindex M-t (Summary)
8889 @findex gnus-summary-toggle-display-buttonized
8890 Toggle the buttonized display of the article buffer
8891 (@code{gnus-summary-toggle-display-buttonized}).
8892
8893 @item W M w
8894 @kindex W M w (Summary)
8895 @findex gnus-article-decode-mime-words
8896 Decode RFC 2047-encoded words in the article headers
8897 (@code{gnus-article-decode-mime-words}).
8898
8899 @item W M c
8900 @kindex W M c (Summary)
8901 @findex gnus-article-decode-charset
8902 Decode encoded article bodies as well as charsets
8903 (@code{gnus-article-decode-charset}).
8904
8905 This command looks in the @code{Content-Type} header to determine the
8906 charset.  If there is no such header in the article, you can give it a
8907 prefix, which will prompt for the charset to decode as.  In regional
8908 groups where people post using some common encoding (but do not
8909 include @sc{mime} headers), you can set the @code{charset} group/topic
8910 parameter to the required charset (@pxref{Group Parameters}).
8911
8912 @item W M v
8913 @kindex W M v (Summary)
8914 @findex gnus-mime-view-all-parts
8915 View all the @sc{mime} parts in the current article
8916 (@code{gnus-mime-view-all-parts}).
8917
8918 @end table
8919
8920 Relevant variables:
8921
8922 @table @code
8923 @item gnus-ignored-mime-types
8924 @vindex gnus-ignored-mime-types
8925 This is a list of regexps.  @sc{mime} types that match a regexp from
8926 this list will be completely ignored by Gnus.  The default value is
8927 @code{nil}.
8928
8929 To have all Vcards be ignored, you'd say something like this:
8930
8931 @lisp
8932 (setq gnus-ignored-mime-types
8933       '("text/x-vcard"))
8934 @end lisp
8935
8936 @item gnus-unbuttonized-mime-types
8937 @vindex gnus-unbuttonized-mime-types
8938 This is a list of regexps.  @sc{mime} types that match a regexp from
8939 this list won't have @sc{mime} buttons inserted unless they aren't
8940 displayed or this variable is overridden by
8941 @code{gnus-buttonized-mime-types}.  The default value is
8942 @code{(".*/.*")}.
8943
8944 @item gnus-buttonized-mime-types
8945 @vindex gnus-buttonized-mime-types
8946 This is a list of regexps.  @sc{mime} types that match a regexp from
8947 this list will have @sc{mime} buttons inserted unless they aren't
8948 displayed.  This variable overrides
8949 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
8950
8951 To see e.g. security buttons but no other buttons, you could set this
8952 variable to @code{("multipart/signed")} and leave
8953 @code{gnus-unbuttonized-mime-types} at the default value.
8954
8955 @item gnus-inhibit-mime-unbuttonizing
8956 @vindex gnus-inhibit-mime-unbuttonizing
8957 If this is non-nil, then all @sc{mime} parts get buttons.  The default
8958 value is @code{nil}.
8959
8960 @item gnus-article-mime-part-function
8961 @vindex gnus-article-mime-part-function
8962 For each @sc{mime} part, this function will be called with the @sc{mime}
8963 handle as the parameter.  The function is meant to be used to allow
8964 users to gather information from the article (e. g., add Vcard info to
8965 the bbdb database) or to do actions based on parts (e. g., automatically
8966 save all jpegs into some directory).
8967
8968 Here's an example function the does the latter:
8969
8970 @lisp
8971 (defun my-save-all-jpeg-parts (handle)
8972   (when (equal (car (mm-handle-type handle)) "image/jpeg")
8973     (with-temp-buffer
8974       (insert (mm-get-part handle))
8975       (write-region (point-min) (point-max)
8976                     (read-file-name "Save jpeg to: ")))))
8977 (setq gnus-article-mime-part-function
8978       'my-save-all-jpeg-parts)
8979 @end lisp
8980
8981 @vindex gnus-mime-multipart-functions
8982 @item gnus-mime-multipart-functions
8983 Alist of @sc{mime} multipart types and functions to handle them.
8984
8985 @vindex mm-file-name-rewrite-functions
8986 @item mm-file-name-rewrite-functions
8987 List of functions used for rewriting file names of @sc{mime} parts.
8988 Each function takes a file name as input and returns a file name.
8989
8990 Ready-made functions include@*
8991 @code{mm-file-name-delete-whitespace},
8992 @code{mm-file-name-trim-whitespace},
8993 @code{mm-file-name-collapse-whitespace}, and
8994 @code{mm-file-name-replace-whitespace}.  The later uses the value of
8995 the variable @code{mm-file-name-replace-whitespace} to replace each
8996 whitespace character in a file name with that string; default value
8997 is @code{"_"} (a single underscore).
8998 @findex mm-file-name-delete-whitespace
8999 @findex mm-file-name-trim-whitespace
9000 @findex mm-file-name-collapse-whitespace
9001 @findex mm-file-name-replace-whitespace
9002 @vindex mm-file-name-replace-whitespace
9003
9004 The standard functions @code{capitalize}, @code{downcase},
9005 @code{upcase}, and @code{upcase-initials} may be useful, too.
9006
9007 Everybody knows that whitespace characters in file names are evil,
9008 except those who don't know.  If you receive lots of attachments from
9009 such unenlightened users, you can make live easier by adding
9010
9011 @lisp
9012 (setq mm-file-name-rewrite-functions
9013       '(mm-file-name-trim-whitespace
9014         mm-file-name-collapse-whitespace
9015         mm-file-name-replace-whitespace))
9016 @end lisp
9017
9018 @noindent
9019 to your @file{.gnus} file.
9020
9021 @end table
9022
9023
9024 @node Charsets
9025 @section Charsets
9026 @cindex charsets
9027
9028 People use different charsets, and we have @sc{mime} to let us know what
9029 charsets they use.  Or rather, we wish we had.  Many people use
9030 newsreaders and mailers that do not understand or use @sc{mime}, and
9031 just send out messages without saying what character sets they use.  To
9032 help a bit with this, some local news hierarchies have policies that say
9033 what character set is the default.  For instance, the @samp{fj}
9034 hierarchy uses @code{iso-2022-jp-2}.
9035
9036 @vindex gnus-group-charset-alist
9037 This knowledge is encoded in the @code{gnus-group-charset-alist}
9038 variable, which is an alist of regexps (use the first item to match full
9039 group names) and default charsets to be used when reading these groups.
9040
9041 In addition, some people do use soi-disant @sc{mime}-aware agents that
9042 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9043 even if they really are in @code{koi-8}.  To help here, the
9044 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9045 charsets that are listed here will be ignored.  The variable can be
9046 set on a group-by-group basis using the group parameters (@pxref{Group
9047 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9048 which includes values some agents insist on having in there.
9049
9050 @vindex gnus-group-posting-charset-alist
9051 When posting, @code{gnus-group-posting-charset-alist} is used to
9052 determine which charsets should not be encoded using the @sc{mime}
9053 encodings.  For instance, some hierarchies discourage using
9054 quoted-printable header encoding.
9055
9056 This variable is an alist of regexps and permitted unencoded charsets
9057 for posting.  Each element of the alist has the form @code{(}@var{test
9058 header body-list}@code{)}, where:
9059
9060 @table @var
9061 @item test
9062 is either a regular expression matching the newsgroup header or a
9063 variable to query,
9064 @item header
9065 is the charset which may be left unencoded in the header (@code{nil}
9066 means encode all charsets),
9067 @item body-list
9068 is a list of charsets which may be encoded using 8bit content-transfer
9069 encoding in the body, or one of the special values @code{nil} (always
9070 encode using quoted-printable) or @code{t} (always use 8bit).
9071 @end table
9072
9073 @cindex Russian
9074 @cindex koi8-r
9075 @cindex koi8-u
9076 @cindex iso-8859-5
9077 @cindex coding system aliases
9078 @cindex preferred charset
9079
9080 Other charset tricks that may be useful, although not Gnus-specific:
9081
9082 If there are several @sc{mime} charsets that encode the same Emacs
9083 charset, you can choose what charset to use by saying the following:
9084
9085 @lisp
9086 (put-charset-property 'cyrillic-iso8859-5
9087                       'preferred-coding-system 'koi8-r)
9088 @end lisp
9089
9090 This means that Russian will be encoded using @code{koi8-r} instead of
9091 the default @code{iso-8859-5} @sc{mime} charset.
9092
9093 If you want to read messages in @code{koi8-u}, you can cheat and say
9094
9095 @lisp
9096 (define-coding-system-alias 'koi8-u 'koi8-r)
9097 @end lisp
9098
9099 This will almost do the right thing.
9100
9101 And finally, to read charsets like @code{windows-1251}, you can say
9102 something like
9103
9104 @lisp
9105 (codepage-setup 1251)
9106 (define-coding-system-alias 'windows-1251 'cp1251)
9107 @end lisp
9108
9109
9110 @node Article Commands
9111 @section Article Commands
9112
9113 @table @kbd
9114
9115 @item A P
9116 @cindex PostScript
9117 @cindex printing
9118 @kindex A P (Summary)
9119 @vindex gnus-ps-print-hook
9120 @findex gnus-summary-print-article
9121 Generate and print a PostScript image of the article buffer
9122 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9123 be run just before printing the buffer.  An alternative way to print
9124 article is to use Muttprint (@pxref{Saving Articles}).
9125
9126 @end table
9127
9128
9129 @node Summary Sorting
9130 @section Summary Sorting
9131 @cindex summary sorting
9132
9133 You can have the summary buffer sorted in various ways, even though I
9134 can't really see why you'd want that.
9135
9136 @table @kbd
9137
9138 @item C-c C-s C-n
9139 @kindex C-c C-s C-n (Summary)
9140 @findex gnus-summary-sort-by-number
9141 Sort by article number (@code{gnus-summary-sort-by-number}).
9142
9143 @item C-c C-s C-a
9144 @kindex C-c C-s C-a (Summary)
9145 @findex gnus-summary-sort-by-author
9146 Sort by author (@code{gnus-summary-sort-by-author}).
9147
9148 @item C-c C-s C-s
9149 @kindex C-c C-s C-s (Summary)
9150 @findex gnus-summary-sort-by-subject
9151 Sort by subject (@code{gnus-summary-sort-by-subject}).
9152
9153 @item C-c C-s C-d
9154 @kindex C-c C-s C-d (Summary)
9155 @findex gnus-summary-sort-by-date
9156 Sort by date (@code{gnus-summary-sort-by-date}).
9157
9158 @item C-c C-s C-l
9159 @kindex C-c C-s C-l (Summary)
9160 @findex gnus-summary-sort-by-lines
9161 Sort by lines (@code{gnus-summary-sort-by-lines}).
9162
9163 @item C-c C-s C-c
9164 @kindex C-c C-s C-c (Summary)
9165 @findex gnus-summary-sort-by-chars
9166 Sort by article length (@code{gnus-summary-sort-by-chars}).
9167
9168 @item C-c C-s C-i
9169 @kindex C-c C-s C-i (Summary)
9170 @findex gnus-summary-sort-by-score
9171 Sort by score (@code{gnus-summary-sort-by-score}).
9172
9173 @item C-c C-s C-r
9174 @kindex C-c C-s C-r (Summary)
9175 @findex gnus-summary-sort-by-random
9176 Randomize (@code{gnus-summary-sort-by-random}).
9177
9178 @item C-c C-s C-o
9179 @kindex C-c C-s C-o (Summary)
9180 @findex gnus-summary-sort-by-original
9181 Sort using the default sorting method
9182 (@code{gnus-summary-sort-by-original}).
9183 @end table
9184
9185 These functions will work both when you use threading and when you don't
9186 use threading.  In the latter case, all summary lines will be sorted,
9187 line by line.  In the former case, sorting will be done on a
9188 root-by-root basis, which might not be what you were looking for.  To
9189 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9190 Commands}).
9191
9192
9193 @node Finding the Parent
9194 @section Finding the Parent
9195 @cindex parent articles
9196 @cindex referring articles
9197
9198 @table @kbd
9199 @item ^
9200 @kindex ^ (Summary)
9201 @findex gnus-summary-refer-parent-article
9202 If you'd like to read the parent of the current article, and it is not
9203 displayed in the summary buffer, you might still be able to.  That is,
9204 if the current group is fetched by @sc{nntp}, the parent hasn't expired
9205 and the @code{References} in the current article are not mangled, you
9206 can just press @kbd{^} or @kbd{A r}
9207 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9208 you'll get the parent.  If the parent is already displayed in the
9209 summary buffer, point will just move to this article.
9210
9211 If given a positive numerical prefix, fetch that many articles back into
9212 the ancestry.  If given a negative numerical prefix, fetch just that
9213 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
9214 grandparent and the grandgrandparent of the current article.  If you say
9215 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
9216 article.
9217
9218 @item A R (Summary)
9219 @findex gnus-summary-refer-references
9220 @kindex A R (Summary)
9221 Fetch all articles mentioned in the @code{References} header of the
9222 article (@code{gnus-summary-refer-references}).
9223
9224 @item A T (Summary)
9225 @findex gnus-summary-refer-thread
9226 @kindex A T (Summary)
9227 Display the full thread where the current article appears
9228 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9229 headers in the current group to work, so it usually takes a while.  If
9230 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9231 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9232 visible effects normally, but it'll make this command work a whole lot
9233 faster.  Of course, it'll make group entry somewhat slow.
9234
9235 @vindex gnus-refer-thread-limit
9236 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9237 articles before the first displayed in the current group) headers to
9238 fetch when doing this command.  The default is 200.  If @code{t}, all
9239 the available headers will be fetched.  This variable can be overridden
9240 by giving the @kbd{A T} command a numerical prefix.
9241
9242 @item M-^ (Summary)
9243 @findex gnus-summary-refer-article
9244 @kindex M-^ (Summary)
9245 @cindex Message-ID
9246 @cindex fetching by Message-ID
9247 You can also ask the @sc{nntp} server for an arbitrary article, no
9248 matter what group it belongs to.  @kbd{M-^}
9249 (@code{gnus-summary-refer-article}) will ask you for a
9250 @code{Message-ID}, which is one of those long, hard-to-read thingies
9251 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9252 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9253 @end table
9254
9255 The current select method will be used when fetching by
9256 @code{Message-ID} from non-news select method, but you can override this
9257 by giving this command a prefix.
9258
9259 @vindex gnus-refer-article-method
9260 If the group you are reading is located on a back end that does not
9261 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9262 you can set @code{gnus-refer-article-method} to an @sc{nntp} method.  It
9263 would, perhaps, be best if the @sc{nntp} server you consult is the one
9264 updating the spool you are reading from, but that's not really
9265 necessary.
9266
9267 It can also be a list of select methods, as well as the special symbol
9268 @code{current}, which means to use the current select method.  If it
9269 is a list, Gnus will try all the methods in the list until it finds a
9270 match.
9271
9272 Here's an example setting that will first try the current method, and
9273 then ask Google if that fails:
9274
9275 @lisp
9276 (setq gnus-refer-article-method
9277       '(current
9278         (nnweb "google" (nnweb-type google))))
9279 @end lisp
9280
9281 Most of the mail back ends support fetching by @code{Message-ID}, but
9282 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9283 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9284 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9285 only able to locate articles that have been posted to the current group.
9286 (Anything else would be too time consuming.)  @code{nnmh} does not
9287 support this at all.
9288
9289
9290 @node Alternative Approaches
9291 @section Alternative Approaches
9292
9293 Different people like to read news using different methods.  This being
9294 Gnus, we offer a small selection of minor modes for the summary buffers.
9295
9296 @menu
9297 * Pick and Read::               First mark articles and then read them.
9298 * Binary Groups::               Auto-decode all articles.
9299 @end menu
9300
9301
9302 @node Pick and Read
9303 @subsection Pick and Read
9304 @cindex pick and read
9305
9306 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9307 a two-phased reading interface.  The user first marks in a summary
9308 buffer the articles she wants to read.  Then she starts reading the
9309 articles with just an article buffer displayed.
9310
9311 @findex gnus-pick-mode
9312 @kindex M-x gnus-pick-mode
9313 Gnus provides a summary buffer minor mode that allows
9314 this---@code{gnus-pick-mode}.  This basically means that a few process
9315 mark commands become one-keystroke commands to allow easy marking, and
9316 it provides one additional command for switching to the summary buffer.
9317
9318 Here are the available keystrokes when using pick mode:
9319
9320 @table @kbd
9321 @item .
9322 @kindex . (Pick)
9323 @findex gnus-pick-article-or-thread
9324 Pick the article or thread on the current line
9325 (@code{gnus-pick-article-or-thread}).  If the variable
9326 @code{gnus-thread-hide-subtree} is true, then this key selects the
9327 entire thread when used at the first article of the thread.  Otherwise,
9328 it selects just the article.  If given a numerical prefix, go to that
9329 thread or article and pick it.  (The line number is normally displayed
9330 at the beginning of the summary pick lines.)
9331
9332 @item SPACE
9333 @kindex SPACE (Pick)
9334 @findex gnus-pick-next-page
9335 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9336 at the end of the buffer, start reading the picked articles.
9337
9338 @item u
9339 @kindex u (Pick)
9340 @findex gnus-pick-unmark-article-or-thread.
9341 Unpick the thread or article
9342 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9343 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9344 thread if used at the first article of the thread.  Otherwise it unpicks
9345 just the article.  You can give this key a numerical prefix to unpick
9346 the thread or article at that line.
9347
9348 @item RET
9349 @kindex RET (Pick)
9350 @findex gnus-pick-start-reading
9351 @vindex gnus-pick-display-summary
9352 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9353 given a prefix, mark all unpicked articles as read first.  If
9354 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9355 will still be visible when you are reading.
9356
9357 @end table
9358
9359 All the normal summary mode commands are still available in the
9360 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9361 which is mapped to the same function
9362 @code{gnus-summary-tick-article-forward}.
9363
9364 If this sounds like a good idea to you, you could say:
9365
9366 @lisp
9367 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9368 @end lisp
9369
9370 @vindex gnus-pick-mode-hook
9371 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9372
9373 @vindex gnus-mark-unpicked-articles-as-read
9374 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9375 all unpicked articles as read.  The default is @code{nil}.
9376
9377 @vindex gnus-summary-pick-line-format
9378 The summary line format in pick mode is slightly different from the
9379 standard format.  At the beginning of each line the line number is
9380 displayed.  The pick mode line format is controlled by the
9381 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9382 Variables}).  It accepts the same format specs that
9383 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9384
9385
9386 @node Binary Groups
9387 @subsection Binary Groups
9388 @cindex binary groups
9389
9390 @findex gnus-binary-mode
9391 @kindex M-x gnus-binary-mode
9392 If you spend much time in binary groups, you may grow tired of hitting
9393 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9394 is a minor mode for summary buffers that makes all ordinary Gnus article
9395 selection functions uudecode series of articles and display the result
9396 instead of just displaying the articles the normal way.
9397
9398 @kindex g (Binary)
9399 @findex gnus-binary-show-article
9400 The only way, in fact, to see the actual articles is the @kbd{g}
9401 command, when you have turned on this mode
9402 (@code{gnus-binary-show-article}).
9403
9404 @vindex gnus-binary-mode-hook
9405 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9406
9407
9408 @node Tree Display
9409 @section Tree Display
9410 @cindex trees
9411
9412 @vindex gnus-use-trees
9413 If you don't like the normal Gnus summary display, you might try setting
9414 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9415 additional @dfn{tree buffer}.  You can execute all summary mode commands
9416 in the tree buffer.
9417
9418 There are a few variables to customize the tree display, of course:
9419
9420 @table @code
9421 @item gnus-tree-mode-hook
9422 @vindex gnus-tree-mode-hook
9423 A hook called in all tree mode buffers.
9424
9425 @item gnus-tree-mode-line-format
9426 @vindex gnus-tree-mode-line-format
9427 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9428 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9429 of valid specs, @pxref{Summary Buffer Mode Line}.
9430
9431 @item gnus-selected-tree-face
9432 @vindex gnus-selected-tree-face
9433 Face used for highlighting the selected article in the tree buffer.  The
9434 default is @code{modeline}.
9435
9436 @item gnus-tree-line-format
9437 @vindex gnus-tree-line-format
9438 A format string for the tree nodes.  The name is a bit of a misnomer,
9439 though---it doesn't define a line, but just the node.  The default value
9440 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9441 the name of the poster.  It is vital that all nodes are of the same
9442 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9443
9444 Valid specs are:
9445
9446 @table @samp
9447 @item n
9448 The name of the poster.
9449 @item f
9450 The @code{From} header.
9451 @item N
9452 The number of the article.
9453 @item [
9454 The opening bracket.
9455 @item ]
9456 The closing bracket.
9457 @item s
9458 The subject.
9459 @end table
9460
9461 @xref{Formatting Variables}.
9462
9463 Variables related to the display are:
9464
9465 @table @code
9466 @item gnus-tree-brackets
9467 @vindex gnus-tree-brackets
9468 This is used for differentiating between ``real'' articles and
9469 ``sparse'' articles.  The format is @code{((@var{real-open} . @var{real-close})
9470 (@var{sparse-open} . @var{sparse-close}) (@var{dummy-open} . @var{dummy-close}))}, and the
9471 default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9472
9473 @item gnus-tree-parent-child-edges
9474 @vindex gnus-tree-parent-child-edges
9475 This is a list that contains the characters used for connecting parent
9476 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9477
9478 @end table
9479
9480 @item gnus-tree-minimize-window
9481 @vindex gnus-tree-minimize-window
9482 If this variable is non-@code{nil}, Gnus will try to keep the tree
9483 buffer as small as possible to allow more room for the other Gnus
9484 windows.  If this variable is a number, the tree buffer will never be
9485 higher than that number.  The default is @code{t}.  Note that if you
9486 have several windows displayed side-by-side in a frame and the tree
9487 buffer is one of these, minimizing the tree window will also resize all
9488 other windows displayed next to it.
9489
9490 You may also wish to add the following hook to keep the window minimized
9491 at all times:
9492
9493 @lisp
9494 (add-hook 'gnus-configure-windows-hook
9495           'gnus-tree-perhaps-minimize)
9496 @end lisp
9497
9498 @item gnus-generate-tree-function
9499 @vindex gnus-generate-tree-function
9500 @findex gnus-generate-horizontal-tree
9501 @findex gnus-generate-vertical-tree
9502 The function that actually generates the thread tree.  Two predefined
9503 functions are available: @code{gnus-generate-horizontal-tree} and
9504 @code{gnus-generate-vertical-tree} (which is the default).
9505
9506 @end table
9507
9508 Here's an example from a horizontal tree buffer:
9509
9510 @example
9511 @{***@}-(***)-[odd]-[Gun]
9512      |      \[Jan]
9513      |      \[odd]-[Eri]
9514      |      \(***)-[Eri]
9515      |            \[odd]-[Paa]
9516      \[Bjo]
9517      \[Gun]
9518      \[Gun]-[Jor]
9519 @end example
9520
9521 Here's the same thread displayed in a vertical tree buffer:
9522
9523 @example
9524 @{***@}
9525   |--------------------------\-----\-----\
9526 (***)                         [Bjo] [Gun] [Gun]
9527   |--\-----\-----\                          |
9528 [odd] [Jan] [odd] (***)                   [Jor]
9529   |           |     |--\
9530 [Gun]       [Eri] [Eri] [odd]
9531                           |
9532                         [Paa]
9533 @end example
9534
9535 If you're using horizontal trees, it might be nice to display the trees
9536 side-by-side with the summary buffer.  You could add something like the
9537 following to your @file{.gnus.el} file:
9538
9539 @lisp
9540 (setq gnus-use-trees t
9541       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9542       gnus-tree-minimize-window nil)
9543 (gnus-add-configuration
9544  '(article
9545    (vertical 1.0
9546              (horizontal 0.25
9547                          (summary 0.75 point)
9548                          (tree 1.0))
9549              (article 1.0))))
9550 @end lisp
9551
9552 @xref{Window Layout}.
9553
9554
9555 @node Mail Group Commands
9556 @section Mail Group Commands
9557 @cindex mail group commands
9558
9559 Some commands only make sense in mail groups.  If these commands are
9560 invalid in the current group, they will raise a hell and let you know.
9561
9562 All these commands (except the expiry and edit commands) use the
9563 process/prefix convention (@pxref{Process/Prefix}).
9564
9565 @table @kbd
9566
9567 @item B e
9568 @kindex B e (Summary)
9569 @findex gnus-summary-expire-articles
9570 Run all expirable articles in the current group through the expiry
9571 process (@code{gnus-summary-expire-articles}).  That is, delete all
9572 expirable articles in the group that have been around for a while.
9573 (@pxref{Expiring Mail}).
9574
9575 @item B C-M-e
9576 @kindex B C-M-e (Summary)
9577 @findex gnus-summary-expire-articles-now
9578 Delete all the expirable articles in the group
9579 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9580 articles eligible for expiry in the current group will
9581 disappear forever into that big @file{/dev/null} in the sky.
9582
9583 @item B DEL
9584 @kindex B DEL (Summary)
9585 @findex gnus-summary-delete-article
9586 @c @icon{gnus-summary-mail-delete}
9587 Delete the mail article.  This is ``delete'' as in ``delete it from your
9588 disk forever and ever, never to return again.'' Use with caution.
9589 (@code{gnus-summary-delete-article}).
9590
9591 @item B m
9592 @kindex B m (Summary)
9593 @cindex move mail
9594 @findex gnus-summary-move-article
9595 @vindex gnus-preserve-marks
9596 Move the article from one mail group to another
9597 (@code{gnus-summary-move-article}).  Marks will be preserved if
9598 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9599
9600 @item B c
9601 @kindex B c (Summary)
9602 @cindex copy mail
9603 @findex gnus-summary-copy-article
9604 @c @icon{gnus-summary-mail-copy}
9605 Copy the article from one group (mail group or not) to a mail group
9606 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9607 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9608
9609 @item B B
9610 @kindex B B (Summary)
9611 @cindex crosspost mail
9612 @findex gnus-summary-crosspost-article
9613 Crosspost the current article to some other group
9614 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9615 the article in the other group, and the Xref headers of the article will
9616 be properly updated.
9617
9618 @item B i
9619 @kindex B i (Summary)
9620 @findex gnus-summary-import-article
9621 Import an arbitrary file into the current mail newsgroup
9622 (@code{gnus-summary-import-article}).  You will be prompted for a file
9623 name, a @code{From} header and a @code{Subject} header.
9624
9625 @item B I
9626 @kindex B I (Summary)
9627 @findex gnus-summary-create-article
9628 Create an empty article in the current mail newsgroups
9629 (@code{gnus-summary-create-article}).  You will be prompted for a
9630 @code{From} header and a @code{Subject} header.
9631
9632 @item B r
9633 @kindex B r (Summary)
9634 @findex gnus-summary-respool-article
9635 Respool the mail article (@code{gnus-summary-respool-article}).
9636 @code{gnus-summary-respool-default-method} will be used as the default
9637 select method when respooling.  This variable is @code{nil} by default,
9638 which means that the current group select method will be used instead.
9639 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9640 (which is the default).
9641
9642 @item B w
9643 @itemx e
9644 @kindex B w (Summary)
9645 @kindex e (Summary)
9646 @findex gnus-summary-edit-article
9647 @kindex C-c C-c (Article)
9648 @findex gnus-summary-edit-article-done
9649 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9650 editing and make the changes permanent, type @kbd{C-c C-c}
9651 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9652 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
9653
9654 @item B q
9655 @kindex B q (Summary)
9656 @findex gnus-summary-respool-query
9657 If you want to re-spool an article, you might be curious as to what group
9658 the article will end up in before you do the re-spooling.  This command
9659 will tell you (@code{gnus-summary-respool-query}).
9660
9661 @item B t
9662 @kindex B t (Summary)
9663 @findex gnus-summary-respool-trace
9664 Similarly, this command will display all fancy splitting patterns used
9665 when repooling, if any (@code{gnus-summary-respool-trace}).
9666
9667 @item B p
9668 @kindex B p (Summary)
9669 @findex gnus-summary-article-posted-p
9670 Some people have a tendency to send you "courtesy" copies when they
9671 follow up to articles you have posted.  These usually have a
9672 @code{Newsgroups} header in them, but not always.  This command
9673 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9674 article from your news server (or rather, from
9675 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9676 report back whether it found the article or not.  Even if it says that
9677 it didn't find the article, it may have been posted anyway---mail
9678 propagation is much faster than news propagation, and the news copy may
9679 just not have arrived yet.
9680
9681 @item K E
9682 @kindex K E (Summary)
9683 @findex gnus-article-encrypt-body
9684 @vindex gnus-article-encrypt-protocol
9685 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
9686 The body is encrypted with the encryption protocol specified by the
9687 variable @code{gnus-article-encrypt-protocol}.
9688
9689 @end table
9690
9691 @vindex gnus-move-split-methods
9692 @cindex moving articles
9693 If you move (or copy) articles regularly, you might wish to have Gnus
9694 suggest where to put the articles.  @code{gnus-move-split-methods} is a
9695 variable that uses the same syntax as @code{gnus-split-methods}
9696 (@pxref{Saving Articles}).  You may customize that variable to create
9697 suggestions you find reasonable.  (Note that
9698 @code{gnus-move-split-methods} uses group names where
9699 @code{gnus-split-methods} uses file names.)
9700
9701 @lisp
9702 (setq gnus-move-split-methods
9703       '(("^From:.*Lars Magne" "nnml:junk")
9704         ("^Subject:.*gnus" "nnfolder:important")
9705         (".*" "nnml:misc")))
9706 @end lisp
9707
9708
9709 @node Various Summary Stuff
9710 @section Various Summary Stuff
9711
9712 @menu
9713 * Summary Group Information::   Information oriented commands.
9714 * Searching for Articles::      Multiple article commands.
9715 * Summary Generation Commands::  
9716 * Really Various Summary Commands::  Those pesky non-conformant commands.
9717 @end menu
9718
9719 @table @code
9720 @vindex gnus-summary-mode-hook
9721 @item gnus-summary-mode-hook
9722 This hook is called when creating a summary mode buffer.
9723
9724 @vindex gnus-summary-generate-hook
9725 @item gnus-summary-generate-hook
9726 This is called as the last thing before doing the threading and the
9727 generation of the summary buffer.  It's quite convenient for customizing
9728 the threading variables based on what data the newsgroup has.  This hook
9729 is called from the summary buffer after most summary buffer variables
9730 have been set.
9731
9732 @vindex gnus-summary-prepare-hook
9733 @item gnus-summary-prepare-hook
9734 It is called after the summary buffer has been generated.  You might use
9735 it to, for instance, highlight lines or modify the look of the buffer in
9736 some other ungodly manner.  I don't care.
9737
9738 @vindex gnus-summary-prepared-hook
9739 @item gnus-summary-prepared-hook
9740 A hook called as the very last thing after the summary buffer has been
9741 generated.
9742
9743 @vindex gnus-summary-ignore-duplicates
9744 @item gnus-summary-ignore-duplicates
9745 When Gnus discovers two articles that have the same @code{Message-ID},
9746 it has to do something drastic.  No articles are allowed to have the
9747 same @code{Message-ID}, but this may happen when reading mail from some
9748 sources.  Gnus allows you to customize what happens with this variable.
9749 If it is @code{nil} (which is the default), Gnus will rename the
9750 @code{Message-ID} (for display purposes only) and display the article as
9751 any other article.  If this variable is @code{t}, it won't display the
9752 article---it'll be as if it never existed.
9753
9754 @vindex gnus-alter-articles-to-read-function
9755 @item gnus-alter-articles-to-read-function
9756 This function, which takes two parameters (the group name and the list
9757 of articles to be selected), is called to allow the user to alter the
9758 list of articles to be selected.
9759
9760 For instance, the following function adds the list of cached articles to
9761 the list in one particular group:
9762
9763 @lisp
9764 (defun my-add-cached-articles (group articles)
9765   (if (string= group "some.group")
9766       (append gnus-newsgroup-cached articles)
9767     articles))
9768 @end lisp
9769
9770 @vindex gnus-newsgroup-variables
9771 @item gnus-newsgroup-variables
9772 A list of newsgroup (summary buffer) local variables, or cons of
9773 variables and their default values (when the default values are not
9774 nil), that should be made global while the summary buffer is active.
9775 These variables can be used to set variables in the group parameters
9776 while still allowing them to affect operations done in other
9777 buffers. For example:
9778
9779 @lisp
9780 (setq gnus-newsgroup-variables
9781      '(message-use-followup-to
9782        (gnus-visible-headers .
9783          "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
9784 @end lisp
9785
9786 @end table
9787
9788
9789 @node Summary Group Information
9790 @subsection Summary Group Information
9791
9792 @table @kbd
9793
9794 @item H f
9795 @kindex H f (Summary)
9796 @findex gnus-summary-fetch-faq
9797 @vindex gnus-group-faq-directory
9798 Try to fetch the FAQ (list of frequently asked questions) for the
9799 current group (@code{gnus-summary-fetch-faq}).  Gnus will try to get the
9800 FAQ from @code{gnus-group-faq-directory}, which is usually a directory
9801 on a remote machine.  This variable can also be a list of directories.
9802 In that case, giving a prefix to this command will allow you to choose
9803 between the various sites.  @code{ange-ftp} or @code{efs} will probably
9804 be used for fetching the file.
9805
9806 @item H d
9807 @kindex H d (Summary)
9808 @findex gnus-summary-describe-group
9809 Give a brief description of the current group
9810 (@code{gnus-summary-describe-group}).  If given a prefix, force
9811 rereading the description from the server.
9812
9813 @item H h
9814 @kindex H h (Summary)
9815 @findex gnus-summary-describe-briefly
9816 Give an extremely brief description of the most important summary
9817 keystrokes (@code{gnus-summary-describe-briefly}).
9818
9819 @item H i
9820 @kindex H i (Summary)
9821 @findex gnus-info-find-node
9822 Go to the Gnus info node (@code{gnus-info-find-node}).
9823 @end table
9824
9825
9826 @node Searching for Articles
9827 @subsection Searching for Articles
9828
9829 @table @kbd
9830
9831 @item M-s
9832 @kindex M-s (Summary)
9833 @findex gnus-summary-search-article-forward
9834 Search through all subsequent (raw) articles for a regexp
9835 (@code{gnus-summary-search-article-forward}).
9836
9837 @item M-r
9838 @kindex M-r (Summary)
9839 @findex gnus-summary-search-article-backward
9840 Search through all previous (raw) articles for a regexp
9841 (@code{gnus-summary-search-article-backward}).
9842
9843 @item &
9844 @kindex & (Summary)
9845 @findex gnus-summary-execute-command
9846 This command will prompt you for a header, a regular expression to match
9847 on this field, and a command to be executed if the match is made
9848 (@code{gnus-summary-execute-command}).  If the header is an empty
9849 string, the match is done on the entire article.  If given a prefix,
9850 search backward instead.
9851
9852 For instance, @kbd{& RET some.*string #} will put the process mark on
9853 all articles that have heads or bodies that match @samp{some.*string}.
9854
9855 @item M-&
9856 @kindex M-& (Summary)
9857 @findex gnus-summary-universal-argument
9858 Perform any operation on all articles that have been marked with
9859 the process mark (@code{gnus-summary-universal-argument}).
9860 @end table
9861
9862 @node Summary Generation Commands
9863 @subsection Summary Generation Commands
9864
9865 @table @kbd
9866
9867 @item Y g
9868 @kindex Y g (Summary)
9869 @findex gnus-summary-prepare
9870 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
9871
9872 @item Y c
9873 @kindex Y c (Summary)
9874 @findex gnus-summary-insert-cached-articles
9875 Pull all cached articles (for the current group) into the summary buffer
9876 (@code{gnus-summary-insert-cached-articles}).
9877
9878 @item Y d
9879 @kindex Y d (Summary)
9880 @findex gnus-summary-insert-dormant-articles
9881 Pull all dormant articles (for the current group) into the summary buffer
9882 (@code{gnus-summary-insert-dormant-articles}).
9883
9884 @end table
9885
9886
9887 @node Really Various Summary Commands
9888 @subsection Really Various Summary Commands
9889
9890 @table @kbd
9891
9892 @item A D
9893 @itemx C-d
9894 @kindex C-d (Summary)
9895 @kindex A D (Summary)
9896 @findex gnus-summary-enter-digest-group
9897 If the current article is a collection of other articles (for instance,
9898 a digest), you might use this command to enter a group based on the that
9899 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
9900 guess what article type is currently displayed unless you give a prefix
9901 to this command, which forces a ``digest'' interpretation.  Basically,
9902 whenever you see a message that is a collection of other messages of
9903 some format, you @kbd{C-d} and read these messages in a more convenient
9904 fashion.
9905
9906 @item C-M-d
9907 @kindex C-M-d (Summary)
9908 @findex gnus-summary-read-document
9909 This command is very similar to the one above, but lets you gather
9910 several documents into one biiig group
9911 (@code{gnus-summary-read-document}).  It does this by opening several
9912 @code{nndoc} groups for each document, and then opening an
9913 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
9914 command understands the process/prefix convention
9915 (@pxref{Process/Prefix}).
9916
9917 @item C-t
9918 @kindex C-t (Summary)
9919 @findex gnus-summary-toggle-truncation
9920 Toggle truncation of summary lines
9921 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
9922 line centering function in the summary buffer, so it's not a good idea
9923 to have truncation switched off while reading articles.
9924
9925 @item =
9926 @kindex = (Summary)
9927 @findex gnus-summary-expand-window
9928 Expand the summary buffer window (@code{gnus-summary-expand-window}).
9929 If given a prefix, force an @code{article} window configuration.
9930
9931 @item C-M-e
9932 @kindex C-M-e (Summary)
9933 @findex gnus-summary-edit-parameters
9934 Edit the group parameters (@pxref{Group Parameters}) of the current
9935 group (@code{gnus-summary-edit-parameters}).
9936
9937 @item C-M-a
9938 @kindex C-M-a (Summary)
9939 @findex gnus-summary-customize-parameters
9940 Customize the group parameters (@pxref{Group Parameters}) of the current
9941 group (@code{gnus-summary-customize-parameters}).
9942
9943 @end table
9944
9945
9946 @node Exiting the Summary Buffer
9947 @section Exiting the Summary Buffer
9948 @cindex summary exit
9949 @cindex exiting groups
9950
9951 Exiting from the summary buffer will normally update all info on the
9952 group and return you to the group buffer.
9953
9954 @table @kbd
9955
9956 @item Z Z
9957 @itemx q
9958 @kindex Z Z (Summary)
9959 @kindex q (Summary)
9960 @findex gnus-summary-exit
9961 @vindex gnus-summary-exit-hook
9962 @vindex gnus-summary-prepare-exit-hook
9963 @c @icon{gnus-summary-exit}
9964 Exit the current group and update all information on the group
9965 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
9966 called before doing much of the exiting, which calls
9967 @code{gnus-summary-expire-articles} by default.
9968 @code{gnus-summary-exit-hook} is called after finishing the exit
9969 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
9970 group mode having no more (unread) groups.
9971
9972 @item Z E
9973 @itemx Q
9974 @kindex Z E (Summary)
9975 @kindex Q (Summary)
9976 @findex gnus-summary-exit-no-update
9977 Exit the current group without updating any information on the group
9978 (@code{gnus-summary-exit-no-update}).
9979
9980 @item Z c
9981 @itemx c
9982 @kindex Z c (Summary)
9983 @kindex c (Summary)
9984 @findex gnus-summary-catchup-and-exit
9985 @c @icon{gnus-summary-catchup-and-exit}
9986 Mark all unticked articles in the group as read and then exit
9987 (@code{gnus-summary-catchup-and-exit}).
9988
9989 @item Z C
9990 @kindex Z C (Summary)
9991 @findex gnus-summary-catchup-all-and-exit
9992 Mark all articles, even the ticked ones, as read and then exit
9993 (@code{gnus-summary-catchup-all-and-exit}).
9994
9995 @item Z n
9996 @kindex Z n (Summary)
9997 @findex gnus-summary-catchup-and-goto-next-group
9998 Mark all articles as read and go to the next group
9999 (@code{gnus-summary-catchup-and-goto-next-group}).
10000
10001 @item Z R
10002 @kindex Z R (Summary)
10003 @findex gnus-summary-reselect-current-group
10004 Exit this group, and then enter it again
10005 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10006 all articles, both read and unread.
10007
10008 @item Z G
10009 @itemx M-g
10010 @kindex Z G (Summary)
10011 @kindex M-g (Summary)
10012 @findex gnus-summary-rescan-group
10013 @c @icon{gnus-summary-mail-get}
10014 Exit the group, check for new articles in the group, and select the
10015 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10016 articles, both read and unread.
10017
10018 @item Z N
10019 @kindex Z N (Summary)
10020 @findex gnus-summary-next-group
10021 Exit the group and go to the next group
10022 (@code{gnus-summary-next-group}).
10023
10024 @item Z P
10025 @kindex Z P (Summary)
10026 @findex gnus-summary-prev-group
10027 Exit the group and go to the previous group
10028 (@code{gnus-summary-prev-group}).
10029
10030 @item Z s
10031 @kindex Z s (Summary)
10032 @findex gnus-summary-save-newsrc
10033 Save the current number of read/marked articles in the dribble buffer
10034 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10035 given a prefix, also save the @file{.newsrc} file(s).  Using this
10036 command will make exit without updating (the @kbd{Q} command) worthless.
10037 @end table
10038
10039 @vindex gnus-exit-group-hook
10040 @code{gnus-exit-group-hook} is called when you exit the current group
10041 with an ``updating'' exit.  For instance @kbd{Q}
10042 (@code{gnus-summary-exit-no-update}) does not call this hook.
10043
10044 @findex gnus-summary-wake-up-the-dead
10045 @findex gnus-dead-summary-mode
10046 @vindex gnus-kill-summary-on-exit
10047 If you're in the habit of exiting groups, and then changing your mind
10048 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10049 If you do that, Gnus won't kill the summary buffer when you exit it.
10050 (Quelle surprise!)  Instead it will change the name of the buffer to
10051 something like @samp{*Dead Summary ... *} and install a minor mode
10052 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10053 buffer, you'll find that all keys are mapped to a function called
10054 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10055 summary buffer will result in a live, normal summary buffer.
10056
10057 There will never be more than one dead summary buffer at any one time.
10058
10059 @vindex gnus-use-cross-reference
10060 The data on the current group will be updated (which articles you have
10061 read, which articles you have replied to, etc.) when you exit the
10062 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10063 @code{t} (which is the default), articles that are cross-referenced to
10064 this group and are marked as read, will also be marked as read in the
10065 other subscribed groups they were cross-posted to.  If this variable is
10066 neither @code{nil} nor @code{t}, the article will be marked as read in
10067 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10068
10069
10070 @node Crosspost Handling
10071 @section Crosspost Handling
10072
10073 @cindex velveeta
10074 @cindex spamming
10075 Marking cross-posted articles as read ensures that you'll never have to
10076 read the same article more than once.  Unless, of course, somebody has
10077 posted it to several groups separately.  Posting the same article to
10078 several groups (not cross-posting) is called @dfn{spamming}, and you are
10079 by law required to send nasty-grams to anyone who perpetrates such a
10080 heinous crime.  You may want to try NoCeM handling to filter out spam
10081 (@pxref{NoCeM}).
10082
10083 Remember: Cross-posting is kinda ok, but posting the same article
10084 separately to several groups is not.  Massive cross-posting (aka.
10085 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10086 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10087 excessive crossposting (@pxref{Summary Mail Commands}).
10088
10089 @cindex cross-posting
10090 @cindex Xref
10091 @cindex @sc{nov}
10092 One thing that may cause Gnus to not do the cross-posting thing
10093 correctly is if you use an @sc{nntp} server that supports @sc{xover}
10094 (which is very nice, because it speeds things up considerably) which
10095 does not include the @code{Xref} header in its @sc{nov} lines.  This is
10096 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10097 even with @sc{xover} by registering the @code{Xref} lines of all
10098 articles you actually read, but if you kill the articles, or just mark
10099 them as read without reading them, Gnus will not get a chance to snoop
10100 the @code{Xref} lines out of these articles, and will be unable to use
10101 the cross reference mechanism.
10102
10103 @cindex LIST overview.fmt
10104 @cindex overview.fmt
10105 To check whether your @sc{nntp} server includes the @code{Xref} header
10106 in its overview files, try @samp{telnet your.nntp.server nntp},
10107 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10108 overview.fmt}.  This may not work, but if it does, and the last line you
10109 get does not read @samp{Xref:full}, then you should shout and whine at
10110 your news admin until she includes the @code{Xref} header in the
10111 overview files.
10112
10113 @vindex gnus-nov-is-evil
10114 If you want Gnus to get the @code{Xref}s right all the time, you have to
10115 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10116 considerably.
10117
10118 C'est la vie.
10119
10120 For an alternative approach, @pxref{Duplicate Suppression}.
10121
10122
10123 @node Duplicate Suppression
10124 @section Duplicate Suppression
10125
10126 By default, Gnus tries to make sure that you don't have to read the same
10127 article more than once by utilizing the crossposting mechanism
10128 (@pxref{Crosspost Handling}).  However, that simple and efficient
10129 approach may not work satisfactory for some users for various
10130 reasons.
10131
10132 @enumerate
10133 @item
10134 The @sc{nntp} server may fail to generate the @code{Xref} header.  This
10135 is evil and not very common.
10136
10137 @item
10138 The @sc{nntp} server may fail to include the @code{Xref} header in the
10139 @file{.overview} data bases.  This is evil and all too common, alas.
10140
10141 @item
10142 You may be reading the same group (or several related groups) from
10143 different @sc{nntp} servers.
10144
10145 @item
10146 You may be getting mail that duplicates articles posted to groups.
10147 @end enumerate
10148
10149 I'm sure there are other situations where @code{Xref} handling fails as
10150 well, but these four are the most common situations.
10151
10152 If, and only if, @code{Xref} handling fails for you, then you may
10153 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10154 will remember the @code{Message-ID}s of all articles you have read or
10155 otherwise marked as read, and then, as if by magic, mark them as read
10156 all subsequent times you see them---in @emph{all} groups.  Using this
10157 mechanism is quite likely to be somewhat inefficient, but not overly
10158 so.  It's certainly preferable to reading the same articles more than
10159 once.
10160
10161 Duplicate suppression is not a very subtle instrument.  It's more like a
10162 sledge hammer than anything else.  It works in a very simple
10163 fashion---if you have marked an article as read, it adds this Message-ID
10164 to a cache.  The next time it sees this Message-ID, it will mark the
10165 article as read with the @samp{M} mark.  It doesn't care what group it
10166 saw the article in.
10167
10168 @table @code
10169 @item gnus-suppress-duplicates
10170 @vindex gnus-suppress-duplicates
10171 If non-@code{nil}, suppress duplicates.
10172
10173 @item gnus-save-duplicate-list
10174 @vindex gnus-save-duplicate-list
10175 If non-@code{nil}, save the list of duplicates to a file.  This will
10176 make startup and shutdown take longer, so the default is @code{nil}.
10177 However, this means that only duplicate articles read in a single Gnus
10178 session are suppressed.
10179
10180 @item gnus-duplicate-list-length
10181 @vindex gnus-duplicate-list-length
10182 This variable says how many @code{Message-ID}s to keep in the duplicate
10183 suppression list.  The default is 10000.
10184
10185 @item gnus-duplicate-file
10186 @vindex gnus-duplicate-file
10187 The name of the file to store the duplicate suppression list in.  The
10188 default is @file{~/News/suppression}.
10189 @end table
10190
10191 If you have a tendency to stop and start Gnus often, setting
10192 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10193 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
10194 the other hand, saving the list makes startup and shutdown much slower,
10195 so that means that if you stop and start Gnus often, you should set
10196 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10197 to you to figure out, I think.
10198
10199 @node Security
10200 @section Security
10201
10202 Gnus is able to verify signed messages or decrypt encrypted messages.
10203 The formats that are supported are PGP, @sc{pgp/mime} and @sc{s/mime},
10204 however you need some external programs to get things to work:
10205
10206 @enumerate
10207 @item
10208 To handle PGP messages, you have to install mailcrypt or gpg.el as
10209 well as a OpenPGP implementation (such as GnuPG).
10210
10211 @item
10212 To handle @sc{s/mime} message, you need to install OpenSSL.  OpenSSL 0.9.6
10213 or newer is recommended.
10214
10215 @end enumerate
10216
10217 More information on how to set things up can be found in the message
10218 manual (@pxref{Security, ,Security, message, Message Manual}).
10219
10220 @table @code
10221 @item mm-verify-option
10222 @vindex mm-verify-option
10223 Option of verifying signed parts.  @code{never}, not verify;
10224 @code{always}, always verify; @code{known}, only verify known
10225 protocols. Otherwise, ask user.
10226
10227 @item mm-decrypt-option
10228 @vindex mm-decrypt-option
10229 Option of decrypting encrypted parts.  @code{never}, no decryption;
10230 @code{always}, always decrypt; @code{known}, only decrypt known
10231 protocols. Otherwise, ask user.
10232
10233 @end table
10234
10235 @node Mailing List
10236 @section Mailing List
10237
10238 @kindex A M (summary)
10239 @findex gnus-mailing-list-insinuate
10240 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10241 either add a `to-list' group parameter (@pxref{Group Parameters}),
10242 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10243 summary buffer, or say:
10244
10245 @lisp
10246 (add-hook 'gnus-summary-mode-hook 'turn-on-gnus-mailing-list-mode)
10247 @end lisp
10248
10249 That enables the following commands to the summary buffer:
10250
10251 @table @kbd
10252
10253 @item C-c C-n h
10254 @kindex C-c C-n h (Summary)
10255 @findex gnus-mailing-list-help
10256 Send a message to fetch mailing list help, if List-Help field exists.
10257
10258 @item C-c C-n s
10259 @kindex C-c C-n s (Summary)
10260 @findex gnus-mailing-list-subscribe
10261 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10262
10263 @item C-c C-n u
10264 @kindex C-c C-n u (Summary)
10265 @findex gnus-mailing-list-unsubscribe
10266 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10267 field exists.
10268
10269 @item C-c C-n p
10270 @kindex C-c C-n p (Summary)
10271 @findex gnus-mailing-list-post
10272 Post to the mailing list, if List-Post field exists.
10273
10274 @item C-c C-n o
10275 @kindex C-c C-n o (Summary)
10276 @findex gnus-mailing-list-owner
10277 Send a message to the mailing list owner, if List-Owner field exists.
10278
10279 @item C-c C-n a
10280 @kindex C-c C-n a (Summary)
10281 @findex gnus-mailing-list-owner
10282 Browse the mailing list archive, if List-Archive field exists.
10283
10284 @end table
10285
10286 @node Article Buffer
10287 @chapter Article Buffer
10288 @cindex article buffer
10289
10290 The articles are displayed in the article buffer, of which there is only
10291 one.  All the summary buffers share the same article buffer unless you
10292 tell Gnus otherwise.
10293
10294 @menu
10295 * Hiding Headers::              Deciding what headers should be displayed.
10296 * Using MIME::                  Pushing articles through @sc{mime} before reading them.
10297 * Customizing Articles::        Tailoring the look of the articles.
10298 * Article Keymap::              Keystrokes available in the article buffer.
10299 * Misc Article::                Other stuff.
10300 @end menu
10301
10302
10303 @node Hiding Headers
10304 @section Hiding Headers
10305 @cindex hiding headers
10306 @cindex deleting headers
10307
10308 The top section of each article is the @dfn{head}.  (The rest is the
10309 @dfn{body}, but you may have guessed that already.)
10310
10311 @vindex gnus-show-all-headers
10312 There is a lot of useful information in the head: the name of the person
10313 who wrote the article, the date it was written and the subject of the
10314 article.  That's well and nice, but there's also lots of information
10315 most people do not want to see---what systems the article has passed
10316 through before reaching you, the @code{Message-ID}, the
10317 @code{References}, etc. ad nauseum---and you'll probably want to get rid
10318 of some of those lines.  If you want to keep all those lines in the
10319 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10320
10321 Gnus provides you with two variables for sifting headers:
10322
10323 @table @code
10324
10325 @item gnus-visible-headers
10326 @vindex gnus-visible-headers
10327 If this variable is non-@code{nil}, it should be a regular expression
10328 that says what headers you wish to keep in the article buffer.  All
10329 headers that do not match this variable will be hidden.
10330
10331 For instance, if you only want to see the name of the person who wrote
10332 the article and the subject, you'd say:
10333
10334 @lisp
10335 (setq gnus-visible-headers "^From:\\|^Subject:")
10336 @end lisp
10337
10338 This variable can also be a list of regexps to match headers to
10339 remain visible.
10340
10341 @item gnus-ignored-headers
10342 @vindex gnus-ignored-headers
10343 This variable is the reverse of @code{gnus-visible-headers}.  If this
10344 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10345 should be a regular expression that matches all lines that you want to
10346 hide.  All lines that do not match this variable will remain visible.
10347
10348 For instance, if you just want to get rid of the @code{References} line
10349 and the @code{Xref} line, you might say:
10350
10351 @lisp
10352 (setq gnus-ignored-headers "^References:\\|^Xref:")
10353 @end lisp
10354
10355 This variable can also be a list of regexps to match headers to
10356 be removed.
10357
10358 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10359 variable will have no effect.
10360
10361 @end table
10362
10363 @vindex gnus-sorted-header-list
10364 Gnus can also sort the headers for you.  (It does this by default.)  You
10365 can control the sorting by setting the @code{gnus-sorted-header-list}
10366 variable.  It is a list of regular expressions that says in what order
10367 the headers are to be displayed.
10368
10369 For instance, if you want the name of the author of the article first,
10370 and then the subject, you might say something like:
10371
10372 @lisp
10373 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10374 @end lisp
10375
10376 Any headers that are to remain visible, but are not listed in this
10377 variable, will be displayed in random order after all the headers listed in this variable.
10378
10379 @findex gnus-article-hide-boring-headers
10380 @vindex gnus-boring-article-headers
10381 You can hide further boring headers by setting
10382 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10383 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10384 list, but this list doesn't actually contain header names.  Instead is
10385 lists various @dfn{boring conditions} that Gnus can check and remove
10386 from sight.
10387
10388 These conditions are:
10389 @table @code
10390 @item empty
10391 Remove all empty headers.
10392 @item followup-to
10393 Remove the @code{Followup-To} header if it is identical to the
10394 @code{Newsgroups} header.
10395 @item reply-to
10396 Remove the @code{Reply-To} header if it lists the same address as the
10397 @code{From} header.
10398 @item newsgroups
10399 Remove the @code{Newsgroups} header if it only contains the current group
10400 name.
10401 @item to-address
10402 Remove the @code{To} header if it only contains the address identical to
10403 the current groups's @code{to-address} parameter.
10404 @item date
10405 Remove the @code{Date} header if the article is less than three days
10406 old.
10407 @item long-to
10408 Remove the @code{To} header if it is very long.
10409 @item many-to
10410 Remove all @code{To} headers if there are more than one.
10411 @end table
10412
10413 To include these three elements, you could say something like:
10414
10415 @lisp
10416 (setq gnus-boring-article-headers
10417       '(empty followup-to reply-to))
10418 @end lisp
10419
10420 This is also the default value for this variable.
10421
10422
10423 @node Using MIME
10424 @section Using MIME
10425 @cindex @sc{mime}
10426
10427 Mime is a standard for waving your hands through the air, aimlessly,
10428 while people stand around yawning.
10429
10430 @sc{mime}, however, is a standard for encoding your articles, aimlessly,
10431 while all newsreaders die of fear.
10432
10433 @sc{mime} may specify what character set the article uses, the encoding
10434 of the characters, and it also makes it possible to embed pictures and
10435 other naughty stuff in innocent-looking articles.
10436
10437 @vindex gnus-display-mime-function
10438 @findex gnus-display-mime
10439 Gnus pushes @sc{mime} articles through @code{gnus-display-mime-function}
10440 to display the @sc{mime} parts.  This is @code{gnus-display-mime} by
10441 default, which creates a bundle of clickable buttons that can be used to
10442 display, save and manipulate the @sc{mime} objects.
10443
10444 The following commands are available when you have placed point over a
10445 @sc{mime} button:
10446
10447 @table @kbd
10448 @findex gnus-article-press-button
10449 @item RET (Article)
10450 @kindex RET (Article)
10451 @itemx BUTTON-2 (Article)
10452 Toggle displaying of the @sc{mime} object
10453 (@code{gnus-article-press-button}). If builtin viewers can not display
10454 the object, Gnus resorts to external viewers in the @file{mailcap}
10455 files.  If a viewer has the @samp{copiousoutput} specification, the
10456 object is displayed inline.
10457
10458 @findex gnus-mime-view-part
10459 @item M-RET (Article)
10460 @kindex M-RET (Article)
10461 @itemx v (Article)
10462 Prompt for a method, and then view the @sc{mime} object using this
10463 method (@code{gnus-mime-view-part}).
10464
10465 @findex gnus-mime-view-part-as-type
10466 @item t (Article)
10467 @kindex t (Article)
10468 View the @sc{mime} object as if it were a different @sc{mime} media type
10469 (@code{gnus-mime-view-part-as-type}).
10470
10471 @findex gnus-mime-view-part-as-charset
10472 @item C (Article)
10473 @kindex C (Article)
10474 Prompt for a charset, and then view the @sc{mime} object using this
10475 charset (@code{gnus-mime-view-part-as-charset}).
10476
10477 @findex gnus-mime-save-part
10478 @item o (Article)
10479 @kindex o (Article)
10480 Prompt for a file name, and then save the @sc{mime} object
10481 (@code{gnus-mime-save-part}).
10482
10483 @findex gnus-mime-save-part-and-strip
10484 @item C-o (Article)
10485 @kindex C-o (Article)
10486 Prompt for a file name, then save the @sc{mime} object and strip it from
10487 the article.  Then proceed to article editing, where a reasonable
10488 suggestion is being made on how the altered article should look
10489 like. The stripped @sc{mime} object will be referred via the
10490 message/external-body @sc{mime} type.
10491 (@code{gnus-mime-save-part-and-strip}).
10492
10493 @findex gnus-mime-copy-part
10494 @item c (Article)
10495 @kindex c (Article)
10496 Copy the @sc{mime} object to a fresh buffer and display this buffer
10497 (@code{gnus-mime-copy-part}).
10498
10499 @findex gnus-mime-print-part
10500 @item p (Article)
10501 @kindex p (Article)
10502 Print the @sc{mime} object (@code{gnus-mime-print-part}).  This
10503 command respects the @samp{print=} specifications in the
10504 @file{.mailcap} file.
10505
10506 @findex gnus-mime-inline-part
10507 @item i (Article)
10508 @kindex i (Article)
10509 Insert the contents of the @sc{mime} object into the buffer
10510 (@code{gnus-mime-inline-part}) as text/plain.  If given a prefix, insert
10511 the raw contents without decoding.  If given a numerical prefix, you can
10512 do semi-manual charset stuff (see
10513 @code{gnus-summary-show-article-charset-alist} in @pxref{Paging the
10514 Article}).
10515
10516 @findex gnus-mime-view-part-internally
10517 @item E (Article)
10518 @kindex E (Article)
10519 View the @sc{mime} object with an internal viewer.  If no internal
10520 viewer is available, use an external viewer
10521 (@code{gnus-mime-view-part-internally}).
10522
10523 @findex gnus-mime-view-part-externally
10524 @item e (Article)
10525 @kindex e (Article)
10526 View the @sc{mime} object with an external viewer.
10527 (@code{gnus-mime-view-part-externally}).
10528
10529 @findex gnus-mime-pipe-part
10530 @item | (Article)
10531 @kindex | (Article)
10532 Output the @sc{mime} object to a process (@code{gnus-mime-pipe-part}).
10533
10534 @findex gnus-mime-action-on-part
10535 @item . (Article)
10536 @kindex . (Article)
10537 Interactively run an action on the @sc{mime} object
10538 (@code{gnus-mime-action-on-part}).
10539
10540 @end table
10541
10542 Gnus will display some @sc{mime} objects automatically.  The way Gnus
10543 determines which parts to do this with is described in the Emacs
10544 @sc{mime} manual.
10545
10546 It might be best to just use the toggling functions from the article
10547 buffer to avoid getting nasty surprises.  (For instance, you enter the
10548 group @samp{alt.sing-a-long} and, before you know it, @sc{mime} has
10549 decoded the sound file in the article and some horrible sing-a-long song
10550 comes screaming out your speakers, and you can't find the volume button,
10551 because there isn't one, and people are starting to look at you, and you
10552 try to stop the program, but you can't, and you can't find the program
10553 to control the volume, and everybody else in the room suddenly decides
10554 to look at you disdainfully, and you'll feel rather stupid.)
10555
10556 Any similarity to real events and people is purely coincidental.  Ahem.
10557
10558 Also see @pxref{MIME Commands}.
10559
10560
10561 @node Customizing Articles
10562 @section Customizing Articles
10563 @cindex article customization
10564
10565 A slew of functions for customizing how the articles are to look like
10566 exist.  You can call these functions interactively, or you can have them
10567 called automatically when you select the articles.
10568
10569 To have them called automatically, you should set the corresponding
10570 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10571 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10572 be set, but first we discuss the values these variables can have.
10573
10574 Note: Some values, while valid, make little sense.  Check the list below
10575 for sensible values.
10576
10577 @enumerate
10578 @item
10579 @code{nil}: Don't do this treatment.
10580
10581 @item
10582 @code{t}: Do this treatment on all body parts.
10583
10584 @item
10585 @code{head}: Do the treatment on the headers.
10586
10587 @item
10588 @code{last}: Do this treatment on the last part.
10589
10590 @item
10591 An integer: Do this treatment on all body parts that have a length less
10592 than this number.
10593
10594 @item
10595 A list of strings: Do this treatment on all body parts that are in
10596 articles that are read in groups that have names that match one of the
10597 regexps in the list.
10598
10599 @item
10600 A list where the first element is not a string:
10601
10602 The list is evaluated recursively.  The first element of the list is a
10603 predicate.  The following predicates are recognized: @code{or},
10604 @code{and}, @code{not} and @code{typep}.  Here's an example:
10605
10606 @lisp
10607 (or last
10608     (typep "text/x-vcard"))
10609 @end lisp
10610
10611 @end enumerate
10612
10613 You may have noticed that the word @dfn{part} is used here.  This refers
10614 to the fact that some messages are @sc{mime} multipart articles that may
10615 be divided into several parts.  Articles that are not multiparts are
10616 considered to contain just a single part.
10617
10618 @vindex gnus-article-treat-types
10619 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10620 want to, but by default, only @samp{text/plain} parts are given the
10621 treatment.  This is controlled by the @code{gnus-article-treat-types}
10622 variable, which is a list of regular expressions that are matched to the
10623 type of the part.  This variable is ignored if the value of the
10624 controlling variable is a predicate list, as described above.
10625
10626 The following treatment options are available.  The easiest way to
10627 customize this is to examine the @code{gnus-article-treat} customization
10628 group.  Values in parenthesis are suggested sensible values.  Others are
10629 possible but those listed are probably sufficient for most people.
10630
10631 @table @code
10632 @item gnus-treat-buttonize (t, integer)
10633 @item gnus-treat-buttonize-head (head)
10634
10635 @xref{Article Buttons}.
10636
10637 @item gnus-treat-capitalize-sentences (t, integer)
10638 @item gnus-treat-overstrike (t, integer)
10639 @item gnus-treat-strip-cr (t, integer)
10640 @item gnus-treat-strip-headers-in-body (t, integer)
10641 @item gnus-treat-strip-leading-blank-lines (t, integer)
10642 @item gnus-treat-strip-multiple-blank-lines (t, integer)
10643 @item gnus-treat-strip-pem (t, last, integer)
10644 @item gnus-treat-strip-pgp (t, last, integer)
10645 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
10646 @item gnus-treat-unsplit-urls (t, integer)
10647 @item gnus-treat-wash-html (t, integer)
10648
10649 @xref{Article Washing}.
10650
10651 @item gnus-treat-date-english (head)
10652 @item gnus-treat-date-iso8601 (head)
10653 @item gnus-treat-date-lapsed (head)
10654 @item gnus-treat-date-local (head)
10655 @item gnus-treat-date-original (head)
10656 @item gnus-treat-date-user-defined (head)
10657 @item gnus-treat-date-ut (head)
10658
10659 @xref{Article Date}.
10660
10661 @item gnus-treat-from-picon (head)
10662 @item gnus-treat-mail-picon (head)
10663 @item gnus-treat-newsgroups-picon (head)
10664
10665 @xref{Picons}.
10666
10667 @item gnus-treat-display-smileys (t, integer)
10668
10669 @item gnus-treat-body-boundary (head)
10670
10671 @vindex gnus-body-boundary-delimiter
10672 Adds a delimiter between header and body, the string used as delimiter
10673 is controlled by @code{gnus-body-boundary-delimiter}.
10674
10675 @xref{Smileys}.
10676
10677 @item gnus-treat-display-xface (head)
10678
10679 @xref{X-Face}.
10680
10681 @item gnus-treat-emphasize (t, head, integer)
10682 @item gnus-treat-fill-article (t, integer)
10683 @item gnus-treat-fill-long-lines (t, integer)
10684 @item gnus-treat-hide-boring-headers (head)
10685 @item gnus-treat-hide-citation (t, integer)
10686 @item gnus-treat-hide-citation-maybe (t, integer)
10687 @item gnus-treat-hide-headers (head)
10688 @item gnus-treat-hide-signature (t, last)
10689
10690 @xref{Article Hiding}.
10691
10692 @item gnus-treat-highlight-citation (t, integer)
10693 @item gnus-treat-highlight-headers (head)
10694 @item gnus-treat-highlight-signature (t, last, integer)
10695
10696 @xref{Article Highlighting}.
10697
10698 @item gnus-treat-play-sounds
10699 @item gnus-treat-translate
10700 @item gnus-treat-x-pgp-sig (head)
10701
10702 @item gnus-treat-unfold-headers (head)
10703 @item gnus-treat-fold-headers (head)
10704 @item gnus-treat-fold-newsgroups (head)
10705 @item gnus-treat-leading-whitespace (head)
10706
10707 @xref{Article Header}.
10708
10709
10710 @end table
10711
10712 @vindex gnus-part-display-hook
10713 You can, of course, write your own functions to be called from
10714 @code{gnus-part-display-hook}.  The functions are called narrowed to the
10715 part, and you can do anything you like, pretty much.  There is no
10716 information that you have to keep in the buffer---you can change
10717 everything.
10718
10719
10720 @node Article Keymap
10721 @section Article Keymap
10722
10723 Most of the keystrokes in the summary buffer can also be used in the
10724 article buffer.  They should behave as if you typed them in the summary
10725 buffer, which means that you don't actually have to have a summary
10726 buffer displayed while reading.  You can do it all from the article
10727 buffer.
10728
10729 A few additional keystrokes are available:
10730
10731 @table @kbd
10732
10733 @item SPACE
10734 @kindex SPACE (Article)
10735 @findex gnus-article-next-page
10736 Scroll forwards one page (@code{gnus-article-next-page}).
10737
10738 @item DEL
10739 @kindex DEL (Article)
10740 @findex gnus-article-prev-page
10741 Scroll backwards one page (@code{gnus-article-prev-page}).
10742
10743 @item C-c ^
10744 @kindex C-c ^ (Article)
10745 @findex gnus-article-refer-article
10746 If point is in the neighborhood of a @code{Message-ID} and you press
10747 @kbd{C-c ^}, Gnus will try to get that article from the server
10748 (@code{gnus-article-refer-article}).
10749
10750 @item C-c C-m
10751 @kindex C-c C-m (Article)
10752 @findex gnus-article-mail
10753 Send a reply to the address near point (@code{gnus-article-mail}).  If
10754 given a prefix, include the mail.
10755
10756 @item s
10757 @kindex s (Article)
10758 @findex gnus-article-show-summary
10759 Reconfigure the buffers so that the summary buffer becomes visible
10760 (@code{gnus-article-show-summary}).
10761
10762 @item ?
10763 @kindex ? (Article)
10764 @findex gnus-article-describe-briefly
10765 Give a very brief description of the available keystrokes
10766 (@code{gnus-article-describe-briefly}).
10767
10768 @item TAB
10769 @kindex TAB (Article)
10770 @findex gnus-article-next-button
10771 Go to the next button, if any (@code{gnus-article-next-button}).  This
10772 only makes sense if you have buttonizing turned on.
10773
10774 @item M-TAB
10775 @kindex M-TAB (Article)
10776 @findex gnus-article-prev-button
10777 Go to the previous button, if any (@code{gnus-article-prev-button}).
10778
10779 @item R
10780 @kindex R (Article)
10781 @findex gnus-article-reply-with-original
10782 Send a reply to the current article and yank the current article
10783 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
10784 wide reply.  If the region is active, only yank the text in the
10785 region.
10786
10787 @item F
10788 @kindex F (Article)
10789 @findex gnus-article-followup-with-original
10790 Send a followup to the current article and yank the current article
10791 (@code{gnus-article-followup-with-original}).  If given a prefix, make
10792 a wide reply.  If the region is active, only yank the text in the
10793 region.
10794
10795
10796 @end table
10797
10798
10799 @node Misc Article
10800 @section Misc Article
10801
10802 @table @code
10803
10804 @item gnus-single-article-buffer
10805 @vindex gnus-single-article-buffer
10806 If non-@code{nil}, use the same article buffer for all the groups.
10807 (This is the default.)  If @code{nil}, each group will have its own
10808 article buffer.
10809
10810 @vindex gnus-article-decode-hook
10811 @item gnus-article-decode-hook
10812 @cindex MIME
10813 Hook used to decode @sc{mime} articles.  The default value is
10814 @code{(article-decode-charset article-decode-encoded-words)}
10815
10816 @vindex gnus-article-prepare-hook
10817 @item gnus-article-prepare-hook
10818 This hook is called right after the article has been inserted into the
10819 article buffer.  It is mainly intended for functions that do something
10820 depending on the contents; it should probably not be used for changing
10821 the contents of the article buffer.
10822
10823 @item gnus-article-mode-hook
10824 @vindex gnus-article-mode-hook
10825 Hook called in article mode buffers.
10826
10827 @item gnus-article-mode-syntax-table
10828 @vindex gnus-article-mode-syntax-table
10829 Syntax table used in article buffers.  It is initialized from
10830 @code{text-mode-syntax-table}.
10831
10832 @vindex gnus-article-mode-line-format
10833 @item gnus-article-mode-line-format
10834 This variable is a format string along the same lines as
10835 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
10836 accepts the same format specifications as that variable, with two
10837 extensions:
10838
10839 @table @samp
10840
10841 @item w
10842 The @dfn{wash status} of the article.  This is a short string with one
10843 character for each possible article wash operation that may have been
10844 performed.  The characters and their meaning:
10845
10846 @table @samp
10847
10848 @item c
10849 Displayed when cited text may be hidden in the article buffer.
10850
10851 @item h
10852 Displayed when headers are hidden in the article buffer.
10853
10854 @item p
10855 Displayed when article is digitally signed or encrypted, and Gnus has
10856 hidden the security headers.  (N.B. does not tell anything about
10857 security status, i.e. good or bad signature.)
10858
10859 @item s
10860 Displayed when the signature has been hidden in the Article buffer.
10861
10862 @item o
10863 Displayed when Gnus has treated overstrike characters in the article buffer.
10864
10865 @item e
10866 Displayed when Gnus has treated emphasised strings in the article buffer.
10867
10868 @end table
10869
10870 @item m
10871 The number of @sc{mime} parts in the article.
10872
10873 @end table
10874
10875 @vindex gnus-break-pages
10876
10877 @item gnus-break-pages
10878 Controls whether @dfn{page breaking} is to take place.  If this variable
10879 is non-@code{nil}, the articles will be divided into pages whenever a
10880 page delimiter appears in the article.  If this variable is @code{nil},
10881 paging will not be done.
10882
10883 @item gnus-page-delimiter
10884 @vindex gnus-page-delimiter
10885 This is the delimiter mentioned above.  By default, it is @samp{^L}
10886 (formfeed).
10887 @end table
10888
10889
10890 @node Composing Messages
10891 @chapter Composing Messages
10892 @cindex composing messages
10893 @cindex messages
10894 @cindex mail
10895 @cindex sending mail
10896 @cindex reply
10897 @cindex followup
10898 @cindex post
10899 @cindex using gpg
10900 @cindex using s/mime
10901 @cindex using smime
10902
10903 @kindex C-c C-c (Post)
10904 All commands for posting and mailing will put you in a message buffer
10905 where you can edit the article all you like, before you send the
10906 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
10907 Message Manual}.  Where the message will be posted/mailed to depends
10908 on your setup (@pxref{Posting Server}).
10909
10910 @menu
10911 * Mail::                        Mailing and replying.
10912 * Posting Server::              What server should you post and mail via?
10913 * Mail and Post::               Mailing and posting at the same time.
10914 * Archived Messages::           Where Gnus stores the messages you've sent.
10915 * Posting Styles::              An easier way to specify who you are.
10916 * Drafts::                      Postponing messages and rejected messages.
10917 * Rejected Articles::           What happens if the server doesn't like your article?
10918 * Signing and encrypting::      How to compose secure messages.
10919 @end menu
10920
10921 Also see @pxref{Canceling and Superseding} for information on how to
10922 remove articles you shouldn't have posted.
10923
10924
10925 @node Mail
10926 @section Mail
10927
10928 Variables for customizing outgoing mail:
10929
10930 @table @code
10931 @item gnus-uu-digest-headers
10932 @vindex gnus-uu-digest-headers
10933 List of regexps to match headers included in digested messages.  The
10934 headers will be included in the sequence they are matched.  If
10935 @code{nil} include all headers.
10936
10937 @item gnus-add-to-list
10938 @vindex gnus-add-to-list
10939 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
10940 that have none when you do a @kbd{a}.
10941
10942 @item gnus-confirm-mail-reply-to-news
10943 @vindex gnus-confirm-mail-reply-to-news
10944 If non-@code{nil}, Gnus requests confirmation when replying to news.
10945 If you find yourself never wanting to reply to mail, but occasionally
10946 press R anyway, this variable might be for you.
10947
10948 @end table
10949
10950
10951 @node Posting Server
10952 @section Posting Server
10953
10954 When you press those magical @kbd{C-c C-c} keys to ship off your latest
10955 (extremely intelligent, of course) article, where does it go?
10956
10957 Thank you for asking.  I hate you.
10958
10959 It can be quite complicated.
10960
10961 @vindex gnus-post-method
10962 When posting news, Message usually invokes @code{message-send-news}
10963 (@pxref{News Variables, , News Variables, message, Message Manual}).
10964 Normally, Gnus will post using the same select method as you're
10965 reading from (which might be convenient if you're reading lots of
10966 groups from different private servers).  However.  If the server
10967 you're reading from doesn't allow posting, just reading, you probably
10968 want to use some other server to post your (extremely intelligent and
10969 fabulously interesting) articles.  You can then set the
10970 @code{gnus-post-method} to some other method:
10971
10972 @lisp
10973 (setq gnus-post-method '(nnspool ""))
10974 @end lisp
10975
10976 Now, if you've done this, and then this server rejects your article, or
10977 this server is down, what do you do then?  To override this variable you
10978 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
10979 the ``current'' server, to get back the default behavior, for posting.
10980
10981 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
10982 Gnus will prompt you for what method to use for posting.
10983
10984 You can also set @code{gnus-post-method} to a list of select methods.
10985 If that's the case, Gnus will always prompt you for what method to use
10986 for posting.
10987
10988 Finally, if you want to always post using the native select method,
10989 you can set this variable to @code{native}.
10990
10991 When sending mail, Message invokes @code{message-send-mail-function}.
10992 The default function, @code{message-send-mail-with-sendmail}, pipes
10993 your article to the @code{sendmail} binary for further queuing and
10994 sending.  When your local system is not configured for sending mail
10995 using @code{sendmail}, and you have access to a remote @sc{smtp}
10996 server, you can set @code{message-send-mail-function} to
10997 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
10998 package correctly.  An example:
10999
11000 @lisp
11001 (setq message-send-mail-function 'smtpmail-send-it
11002       smtpmail-default-smtp-server "YOUR SMTP HOST")
11003 @end lisp
11004
11005 To the thing similar to this, there is @code{message-smtpmail-send-it}.
11006 It is useful if your ISP requires the POP-before-SMTP authentication.
11007 See the documentation for the function @code{mail-source-touch-pop}.
11008
11009 Other possible choices for @code{message-send-mail-function} includes
11010 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11011 and @code{feedmail-send-it}.
11012
11013 @node Mail and Post
11014 @section Mail and Post
11015
11016 Here's a list of variables relevant to both mailing and
11017 posting:
11018
11019 @table @code
11020 @item gnus-mailing-list-groups
11021 @findex gnus-mailing-list-groups
11022 @cindex mailing lists
11023
11024 If your news server offers groups that are really mailing lists
11025 gatewayed to the @sc{nntp} server, you can read those groups without
11026 problems, but you can't post/followup to them without some difficulty.
11027 One solution is to add a @code{to-address} to the group parameters
11028 (@pxref{Group Parameters}).  An easier thing to do is set the
11029 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11030 really are mailing lists.  Then, at least, followups to the mailing
11031 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11032 still a pain, though.
11033
11034 @end table
11035
11036 You may want to do spell-checking on messages that you send out.  Or, if
11037 you don't want to spell-check by hand, you could add automatic
11038 spell-checking via the @code{ispell} package:
11039
11040 @cindex ispell
11041 @findex ispell-message
11042 @lisp
11043 (add-hook 'message-send-hook 'ispell-message)
11044 @end lisp
11045
11046 If you want to change the @code{ispell} dictionary based on what group
11047 you're in, you could say something like the following:
11048
11049 @lisp
11050 (add-hook 'gnus-select-group-hook
11051           (lambda ()
11052             (cond
11053              ((string-match
11054                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11055               (ispell-change-dictionary "deutsch"))
11056              (t
11057               (ispell-change-dictionary "english")))))
11058 @end lisp
11059
11060 Modify to suit your needs.
11061
11062
11063 @node Archived Messages
11064 @section Archived Messages
11065 @cindex archived messages
11066 @cindex sent messages
11067
11068 Gnus provides a few different methods for storing the mail and news you
11069 send.  The default method is to use the @dfn{archive virtual server} to
11070 store the messages.  If you want to disable this completely, the
11071 @code{gnus-message-archive-group} variable should be @code{nil}, which
11072 is the default.
11073
11074 For archiving interesting messages in a group you read, see the
11075 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11076 Group Commands}).
11077
11078 @vindex gnus-message-archive-method
11079 @code{gnus-message-archive-method} says what virtual server Gnus is to
11080 use to store sent messages.  The default is:
11081
11082 @lisp
11083 (nnfolder "archive"
11084           (nnfolder-directory   "~/Mail/archive")
11085           (nnfolder-active-file "~/Mail/archive/active")
11086           (nnfolder-get-new-mail nil)
11087           (nnfolder-inhibit-expiry t))
11088 @end lisp
11089
11090 You can, however, use any mail select method (@code{nnml},
11091 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11092 for doing this sort of thing, though.  If you don't like the default
11093 directory chosen, you could say something like:
11094
11095 @lisp
11096 (setq gnus-message-archive-method
11097       '(nnfolder "archive"
11098                  (nnfolder-inhibit-expiry t)
11099                  (nnfolder-active-file "~/News/sent-mail/active")
11100                  (nnfolder-directory "~/News/sent-mail/")))
11101 @end lisp
11102
11103 @vindex gnus-message-archive-group
11104 @cindex Gcc
11105 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11106 to one or more group(s) on that server.  Which group to use is
11107 determined by the @code{gnus-message-archive-group} variable.
11108
11109 This variable can be used to do the following:
11110
11111 @itemize @bullet
11112 @item
11113 a string
11114 Messages will be saved in that group.
11115
11116 Note that you can include a select method in the group name, then the
11117 message will not be stored in the select method given by
11118 @code{gnus-message-archive-method}, but in the select method specified
11119 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11120 has the default value shown above.  Then setting
11121 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11122 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11123 value @code{"nnml:foo"}, then outgoing messages will be stored in
11124 @samp{nnml:foo}.
11125 @item
11126 a list of strings
11127 Messages will be saved in all those groups.
11128 @item
11129 an alist of regexps, functions and forms
11130 When a key ``matches'', the result is used.
11131 @item
11132 @code{nil}
11133 No message archiving will take place.  This is the default.
11134 @end itemize
11135
11136 Let's illustrate:
11137
11138 Just saving to a single group called @samp{MisK}:
11139 @lisp
11140 (setq gnus-message-archive-group "MisK")
11141 @end lisp
11142
11143 Saving to two groups, @samp{MisK} and @samp{safe}:
11144 @lisp
11145 (setq gnus-message-archive-group '("MisK" "safe"))
11146 @end lisp
11147
11148 Save to different groups based on what group you are in:
11149 @lisp
11150 (setq gnus-message-archive-group
11151       '(("^alt" "sent-to-alt")
11152         ("mail" "sent-to-mail")
11153         (".*" "sent-to-misc")))
11154 @end lisp
11155
11156 More complex stuff:
11157 @lisp
11158 (setq gnus-message-archive-group
11159       '((if (message-news-p)
11160             "misc-news"
11161           "misc-mail")))
11162 @end lisp
11163
11164 How about storing all news messages in one file, but storing all mail
11165 messages in one file per month:
11166
11167 @lisp
11168 (setq gnus-message-archive-group
11169       '((if (message-news-p)
11170             "misc-news"
11171           (concat "mail." (format-time-string "%Y-%m")))))
11172 @end lisp
11173
11174 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11175 @c use a different value for @code{gnus-message-archive-group} there.)
11176
11177 Now, when you send a message off, it will be stored in the appropriate
11178 group.  (If you want to disable storing for just one particular message,
11179 you can just remove the @code{Gcc} header that has been inserted.)  The
11180 archive group will appear in the group buffer the next time you start
11181 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
11182 enter it and read the articles in it just like you'd read any other
11183 group.  If the group gets really big and annoying, you can simply rename
11184 if (using @kbd{G r} in the group buffer) to something
11185 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11186 continue to be stored in the old (now empty) group.
11187
11188 That's the default method of archiving sent messages.  Gnus offers a
11189 different way for the people who don't like the default method.  In that
11190 case you should set @code{gnus-message-archive-group} to @code{nil};
11191 this will disable archiving.
11192
11193 @table @code
11194 @item gnus-outgoing-message-group
11195 @vindex gnus-outgoing-message-group
11196 All outgoing messages will be put in this group.  If you want to store
11197 all your outgoing mail and articles in the group @samp{nnml:archive},
11198 you set this variable to that value.  This variable can also be a list of
11199 group names.
11200
11201 If you want to have greater control over what group to put each
11202 message in, you can set this variable to a function that checks the
11203 current newsgroup name and then returns a suitable group name (or list
11204 of names).
11205
11206 This variable can be used instead of @code{gnus-message-archive-group},
11207 but the latter is the preferred method.
11208
11209 @item gnus-gcc-mark-as-read
11210 @vindex gnus-gcc-mark-as-read
11211 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11212
11213 @item gnus-gcc-externalize-attachments
11214 @vindex gnus-gcc-externalize-attachments
11215 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11216 and matches the Gcc group name, attach files as external parts; if it is
11217 @code{all}, attach local files as external parts; if it is other
11218 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11219 changed in the future.
11220
11221 @end table
11222
11223
11224 @node Posting Styles
11225 @section Posting Styles
11226 @cindex posting styles
11227 @cindex styles
11228
11229 All them variables, they make my head swim.
11230
11231 So what if you want a different @code{Organization} and signature based
11232 on what groups you post to?  And you post both from your home machine
11233 and your work machine, and you want different @code{From} lines, and so
11234 on?
11235
11236 @vindex gnus-posting-styles
11237 One way to do stuff like that is to write clever hooks that change the
11238 variables you need to have changed.  That's a bit boring, so somebody
11239 came up with the bright idea of letting the user specify these things in
11240 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11241 variable:
11242
11243 @lisp
11244 ((".*"
11245   (signature "Peace and happiness")
11246   (organization "What me?"))
11247  ("^comp"
11248   (signature "Death to everybody"))
11249  ("comp.emacs.i-love-it"
11250   (organization "Emacs is it")))
11251 @end lisp
11252
11253 As you might surmise from this example, this alist consists of several
11254 @dfn{styles}.  Each style will be applicable if the first element
11255 ``matches'', in some form or other.  The entire alist will be iterated
11256 over, from the beginning towards the end, and each match will be
11257 applied, which means that attributes in later styles that match override
11258 the same attributes in earlier matching styles.  So
11259 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11260 signature and the @samp{What me?} @code{Organization} header.
11261
11262 The first element in each style is called the @code{match}.  If it's a
11263 string, then Gnus will try to regexp match it against the group name.
11264 If it is the form @code{(header MATCH REGEXP)}, then Gnus will look in
11265 the original article for a header whose name is MATCH and compare that
11266 REGEXP.  MATCH and REGEXP are strings.  (There original article is the
11267 one you are replying or following up to.  If you are not composing a
11268 reply or a followup, then there is nothing to match against.)  If the
11269 @code{match} is a function symbol, that function will be called with no
11270 arguments.  If it's a variable symbol, then the variable will be
11271 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11272 any case, if this returns a non-@code{nil} value, then the style is said
11273 to @dfn{match}.
11274
11275 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11276 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11277 attribute name can be one of @code{signature}, @code{signature-file},
11278 @code{x-face-file}, @code{address} (overriding
11279 @code{user-mail-address}), @code{name} (overriding
11280 @code{(user-full-name)}) or @code{body}.  The attribute name can also
11281 be a string or a symbol.  In that case, this will be used as a header
11282 name, and the value will be inserted in the headers of the article; if
11283 the value is @code{nil}, the header name will be removed.  If the
11284 attribute name is @code{eval}, the form is evaluated, and the result
11285 is thrown away.
11286
11287 The attribute value can be a string (used verbatim), a function with
11288 zero arguments (the return value will be used), a variable (its value
11289 will be used) or a list (it will be @code{eval}ed and the return value
11290 will be used).  The functions and sexps are called/@code{eval}ed in the
11291 message buffer that is being set up.  The headers of the current article
11292 are available through the @code{message-reply-headers} variable, which
11293 is a vector of the following headers: number subject from date id
11294 references chars lines xref extra.
11295
11296 @vindex message-reply-headers
11297
11298 If you wish to check whether the message you are about to compose is
11299 meant to be a news article or a mail message, you can check the values
11300 of the @code{message-news-p} and @code{message-mail-p} functions.
11301
11302 @findex message-mail-p
11303 @findex message-news-p
11304
11305 So here's a new example:
11306
11307 @lisp
11308 (setq gnus-posting-styles
11309       '((".*"
11310          (signature-file "~/.signature")
11311          (name "User Name")
11312          ("X-Home-Page" (getenv "WWW_HOME"))
11313          (organization "People's Front Against MWM"))
11314         ("^rec.humor"
11315          (signature my-funny-signature-randomizer))
11316         ((equal (system-name) "gnarly")  ;; A form
11317          (signature my-quote-randomizer))
11318         (message-news-p        ;; A function symbol
11319          (signature my-news-signature))
11320         (window-system         ;; A value symbol
11321          ("X-Window-System" (format "%s" window-system)))
11322         ;; If I'm replying to Larsi, set the Organization header.
11323         ((header "from" "larsi.*org")
11324          (Organization "Somewhere, Inc."))
11325         ((posting-from-work-p) ;; A user defined function
11326          (signature-file "~/.work-signature")
11327          (address "user@@bar.foo")
11328          (body "You are fired.\n\nSincerely, your boss.")
11329          (organization "Important Work, Inc"))
11330         ("nnml:.*"
11331          (From (save-excursion
11332                  (set-buffer gnus-article-buffer)
11333                  (message-fetch-field "to"))))
11334         ("^nn.+:"
11335          (signature-file "~/.mail-signature"))))
11336 @end lisp
11337
11338 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11339 @code{From} address in all your outgoing replies, which might be handy
11340 if you fill many roles.
11341
11342
11343 @node Drafts
11344 @section Drafts
11345 @cindex drafts
11346
11347 If you are writing a message (mail or news) and suddenly remember that
11348 you have a steak in the oven (or some pesto in the food processor, you
11349 craaazy vegetarians), you'll probably wish there was a method to save
11350 the message you are writing so that you can continue editing it some
11351 other day, and send it when you feel its finished.
11352
11353 Well, don't worry about it.  Whenever you start composing a message of
11354 some sort using the Gnus mail and post commands, the buffer you get will
11355 automatically associate to an article in a special @dfn{draft} group.
11356 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11357 article will be saved there.  (Auto-save files also go to the draft
11358 group.)
11359
11360 @cindex nndraft
11361 @vindex nndraft-directory
11362 The draft group is a special group (which is implemented as an
11363 @code{nndraft} group, if you absolutely have to know) called
11364 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11365 @code{nndraft} is to store its files.  What makes this group special is
11366 that you can't tick any articles in it or mark any articles as
11367 read---all articles in the group are permanently unread.
11368
11369 If the group doesn't exist, it will be created and you'll be subscribed
11370 to it.  The only way to make it disappear from the Group buffer is to
11371 unsubscribe it.
11372
11373 @c @findex gnus-dissociate-buffer-from-draft
11374 @c @kindex C-c M-d (Mail)
11375 @c @kindex C-c M-d (Post)
11376 @c @findex gnus-associate-buffer-with-draft
11377 @c @kindex C-c C-d (Mail)
11378 @c @kindex C-c C-d (Post)
11379 @c If you're writing some super-secret message that you later want to
11380 @c encode with PGP before sending, you may wish to turn the auto-saving
11381 @c (and association with the draft group) off.  You never know who might be
11382 @c interested in reading all your extremely valuable and terribly horrible
11383 @c and interesting secrets.  The @kbd{C-c M-d}
11384 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11385 @c If you change your mind and want to turn the auto-saving back on again,
11386 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11387 @c
11388 @c @vindex gnus-use-draft
11389 @c To leave association with the draft group off by default, set
11390 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11391
11392 @findex gnus-draft-edit-message
11393 @kindex D e (Draft)
11394 When you want to continue editing the article, you simply enter the
11395 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11396 that.  You will be placed in a buffer where you left off.
11397
11398 Rejected articles will also be put in this draft group (@pxref{Rejected
11399 Articles}).
11400
11401 @findex gnus-draft-send-all-messages
11402 @findex gnus-draft-send-message
11403 If you have lots of rejected messages you want to post (or mail) without
11404 doing further editing, you can use the @kbd{D s} command
11405 (@code{gnus-draft-send-message}).  This command understands the
11406 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11407 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11408 in the buffer.
11409
11410 If you have some messages that you wish not to send, you can use the
11411 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11412 as unsendable.  This is a toggling command.
11413
11414
11415 @node Rejected Articles
11416 @section Rejected Articles
11417 @cindex rejected articles
11418
11419 Sometimes a news server will reject an article.  Perhaps the server
11420 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11421 @emph{there be demons}.  Perhaps you have included too much cited text.
11422 Perhaps the disk is full.  Perhaps the server is down.
11423
11424 These situations are, of course, totally beyond the control of Gnus.
11425 (Gnus, of course, loves the way you look, always feels great, has angels
11426 fluttering around inside of it, doesn't care about how much cited text
11427 you include, never runs full and never goes down.)  So Gnus saves these
11428 articles until some later time when the server feels better.
11429
11430 The rejected articles will automatically be put in a special draft group
11431 (@pxref{Drafts}).  When the server comes back up again, you'd then
11432 typically enter that group and send all the articles off.
11433
11434 @node Signing and encrypting
11435 @section Signing and encrypting
11436 @cindex using gpg
11437 @cindex using s/mime
11438 @cindex using smime
11439
11440 Gnus can digitally sign and encrypt your messages, using vanilla PGP
11441 format or @sc{pgp/mime} or @sc{s/mime}.  For decoding such messages,
11442 see the @code{mm-verify-option} and @code{mm-decrypt-option} options
11443 (@pxref{Security}).
11444
11445 For PGP, Gnus supports two external libraries, @sc{gpg.el} and
11446 @sc{Mailcrypt}, you need to install at least one of them.  The
11447 @sc{s/mime} support in Gnus requires the external program OpenSSL.
11448
11449 Often, you would like to sign replies to people who send you signed
11450 messages.  Even more often, you might want to encrypt messages which
11451 are in reply to encrypted messages.  Gnus offers
11452 @code{gnus-message-replysign} to enable the former, and
11453 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11454 @code{gnus-message-replysignencrypted} (on by default) will sign
11455 automatically encrypted messages.
11456
11457 Instructing MML to perform security operations on a @sc{mime} part is
11458 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11459 C-m c} key map for encryption, as follows.
11460
11461 @table @kbd
11462
11463 @item C-c C-m s s
11464 @kindex C-c C-m s s
11465 @findex mml-secure-message-sign-smime
11466
11467 Digitally sign current message using @sc{s/mime}.
11468
11469 @item C-c C-m s o
11470 @kindex C-c C-m s o
11471 @findex mml-secure-message-sign-pgp
11472
11473 Digitally sign current message using PGP.
11474
11475 @item C-c C-m s p
11476 @kindex C-c C-m s p
11477 @findex mml-secure-message-sign-pgp
11478
11479 Digitally sign current message using @sc{pgp/mime}.
11480
11481 @item C-c C-m c s
11482 @kindex C-c C-m c s
11483 @findex mml-secure-message-encrypt-smime
11484
11485 Digitally encrypt current message using @sc{s/mime}.
11486
11487 @item C-c C-m c o
11488 @kindex C-c C-m c o
11489 @findex mml-secure-message-encrypt-pgp
11490
11491 Digitally encrypt current message using PGP.
11492
11493 @item C-c C-m c p
11494 @kindex C-c C-m c p
11495 @findex mml-secure-message-encrypt-pgpmime
11496
11497 Digitally encrypt current message using @sc{pgp/mime}.
11498
11499 @item C-c C-m C-n
11500 @kindex C-c C-m C-n
11501 @findex mml-unsecure-message
11502 Remove security related MML tags from message.
11503
11504 @end table
11505
11506 Also @xref{Security, ,Security, message, Message Manual}.
11507
11508 @node Select Methods
11509 @chapter Select Methods
11510 @cindex foreign groups
11511 @cindex select methods
11512
11513 A @dfn{foreign group} is a group not read by the usual (or
11514 default) means.  It could be, for instance, a group from a different
11515 @sc{nntp} server, it could be a virtual group, or it could be your own
11516 personal mail group.
11517
11518 A foreign group (or any group, really) is specified by a @dfn{name} and
11519 a @dfn{select method}.  To take the latter first, a select method is a
11520 list where the first element says what back end to use (e.g. @code{nntp},
11521 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11522 name}.  There may be additional elements in the select method, where the
11523 value may have special meaning for the back end in question.
11524
11525 One could say that a select method defines a @dfn{virtual server}---so
11526 we do just that (@pxref{Server Buffer}).
11527
11528 The @dfn{name} of the group is the name the back end will recognize the
11529 group as.
11530
11531 For instance, the group @samp{soc.motss} on the @sc{nntp} server
11532 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11533 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11534 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11535 back end just knows this group as @samp{soc.motss}.
11536
11537 The different methods all have their peculiarities, of course.
11538
11539 @menu
11540 * Server Buffer::               Making and editing virtual servers.
11541 * Getting News::                Reading USENET news with Gnus.
11542 * Getting Mail::                Reading your personal mail with Gnus.
11543 * Browsing the Web::            Getting messages from a plethora of Web sources.
11544 * IMAP::                        Using Gnus as a @sc{imap} client.
11545 * Other Sources::               Reading directories, files, SOUP packets.
11546 * Combined Groups::             Combining groups into one group.
11547 * Gnus Unplugged::              Reading news and mail offline.
11548 @end menu
11549
11550
11551 @node Server Buffer
11552 @section Server Buffer
11553
11554 Traditionally, a @dfn{server} is a machine or a piece of software that
11555 one connects to, and then requests information from.  Gnus does not
11556 connect directly to any real servers, but does all transactions through
11557 one back end or other.  But that's just putting one layer more between
11558 the actual media and Gnus, so we might just as well say that each
11559 back end represents a virtual server.
11560
11561 For instance, the @code{nntp} back end may be used to connect to several
11562 different actual @sc{nntp} servers, or, perhaps, to many different ports
11563 on the same actual @sc{nntp} server.  You tell Gnus which back end to
11564 use, and what parameters to set by specifying a @dfn{select method}.
11565
11566 These select method specifications can sometimes become quite
11567 complicated---say, for instance, that you want to read from the
11568 @sc{nntp} server @samp{news.funet.fi} on port number 13, which
11569 hangs if queried for @sc{nov} headers and has a buggy select.  Ahem.
11570 Anyway, if you had to specify that for each group that used this
11571 server, that would be too much work, so Gnus offers a way of naming
11572 select methods, which is what you do in the server buffer.
11573
11574 To enter the server buffer, use the @kbd{^}
11575 (@code{gnus-group-enter-server-mode}) command in the group buffer.
11576
11577 @menu
11578 * Server Buffer Format::        You can customize the look of this buffer.
11579 * Server Commands::             Commands to manipulate servers.
11580 * Example Methods::             Examples server specifications.
11581 * Creating a Virtual Server::   An example session.
11582 * Server Variables::            Which variables to set.
11583 * Servers and Methods::         You can use server names as select methods.
11584 * Unavailable Servers::         Some servers you try to contact may be down.
11585 @end menu
11586
11587 @vindex gnus-server-mode-hook
11588 @code{gnus-server-mode-hook} is run when creating the server buffer.
11589
11590
11591 @node Server Buffer Format
11592 @subsection Server Buffer Format
11593 @cindex server buffer format
11594
11595 @vindex gnus-server-line-format
11596 You can change the look of the server buffer lines by changing the
11597 @code{gnus-server-line-format} variable.  This is a @code{format}-like
11598 variable, with some simple extensions:
11599
11600 @table @samp
11601
11602 @item h
11603 How the news is fetched---the back end name.
11604
11605 @item n
11606 The name of this server.
11607
11608 @item w
11609 Where the news is to be fetched from---the address.
11610
11611 @item s
11612 The opened/closed/denied status of the server.
11613 @end table
11614
11615 @vindex gnus-server-mode-line-format
11616 The mode line can also be customized by using the
11617 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
11618 Formatting}).  The following specs are understood:
11619
11620 @table @samp
11621 @item S
11622 Server name.
11623
11624 @item M
11625 Server method.
11626 @end table
11627
11628 Also @pxref{Formatting Variables}.
11629
11630
11631 @node Server Commands
11632 @subsection Server Commands
11633 @cindex server commands
11634
11635 @table @kbd
11636
11637 @item a
11638 @kindex a (Server)
11639 @findex gnus-server-add-server
11640 Add a new server (@code{gnus-server-add-server}).
11641
11642 @item e
11643 @kindex e (Server)
11644 @findex gnus-server-edit-server
11645 Edit a server (@code{gnus-server-edit-server}).
11646
11647 @item SPACE
11648 @kindex SPACE (Server)
11649 @findex gnus-server-read-server
11650 Browse the current server (@code{gnus-server-read-server}).
11651
11652 @item q
11653 @kindex q (Server)
11654 @findex gnus-server-exit
11655 Return to the group buffer (@code{gnus-server-exit}).
11656
11657 @item k
11658 @kindex k (Server)
11659 @findex gnus-server-kill-server
11660 Kill the current server (@code{gnus-server-kill-server}).
11661
11662 @item y
11663 @kindex y (Server)
11664 @findex gnus-server-yank-server
11665 Yank the previously killed server (@code{gnus-server-yank-server}).
11666
11667 @item c
11668 @kindex c (Server)
11669 @findex gnus-server-copy-server
11670 Copy the current server (@code{gnus-server-copy-server}).
11671
11672 @item l
11673 @kindex l (Server)
11674 @findex gnus-server-list-servers
11675 List all servers (@code{gnus-server-list-servers}).
11676
11677 @item s
11678 @kindex s (Server)
11679 @findex gnus-server-scan-server
11680 Request that the server scan its sources for new articles
11681 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
11682 servers.
11683
11684 @item g
11685 @kindex g (Server)
11686 @findex gnus-server-regenerate-server
11687 Request that the server regenerate all its data structures
11688 (@code{gnus-server-regenerate-server}).  This can be useful if you have
11689 a mail back end that has gotten out of sync.
11690
11691 @end table
11692
11693
11694 @node Example Methods
11695 @subsection Example Methods
11696
11697 Most select methods are pretty simple and self-explanatory:
11698
11699 @lisp
11700 (nntp "news.funet.fi")
11701 @end lisp
11702
11703 Reading directly from the spool is even simpler:
11704
11705 @lisp
11706 (nnspool "")
11707 @end lisp
11708
11709 As you can see, the first element in a select method is the name of the
11710 back end, and the second is the @dfn{address}, or @dfn{name}, if you
11711 will.
11712
11713 After these two elements, there may be an arbitrary number of
11714 @code{(@var{variable} @var{form})} pairs.
11715
11716 To go back to the first example---imagine that you want to read from
11717 port 15 on that machine.  This is what the select method should
11718 look like then:
11719
11720 @lisp
11721 (nntp "news.funet.fi" (nntp-port-number 15))
11722 @end lisp
11723
11724 You should read the documentation to each back end to find out what
11725 variables are relevant, but here's an @code{nnmh} example:
11726
11727 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
11728 you have two structures that you wish to access: One is your private
11729 mail spool, and the other is a public one.  Here's the possible spec for
11730 your private mail:
11731
11732 @lisp
11733 (nnmh "private" (nnmh-directory "~/private/mail/"))
11734 @end lisp
11735
11736 (This server is then called @samp{private}, but you may have guessed
11737 that.)
11738
11739 Here's the method for a public spool:
11740
11741 @lisp
11742 (nnmh "public"
11743       (nnmh-directory "/usr/information/spool/")
11744       (nnmh-get-new-mail nil))
11745 @end lisp
11746
11747 @cindex proxy
11748 @cindex firewall
11749
11750 If you are behind a firewall and only have access to the @sc{nntp}
11751 server from the firewall machine, you can instruct Gnus to @code{rlogin}
11752 on the firewall machine and telnet from there to the @sc{nntp} server.
11753 Doing this can be rather fiddly, but your virtual server definition
11754 should probably look something like this:
11755
11756 @lisp
11757 (nntp "firewall"
11758       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
11759       (nntp-via-address "the.firewall.machine")
11760       (nntp-address "the.real.nntp.host")
11761       (nntp-end-of-line "\n"))
11762 @end lisp
11763
11764 If you want to use the wonderful @code{ssh} program to provide a
11765 compressed connection over the modem line, you could add the following
11766 configuration to the example above:
11767
11768 @lisp
11769       (nntp-via-rlogin-command "ssh")
11770 @end lisp
11771
11772 See also @code{nntp-via-rlogin-command-switches}.
11773
11774 If you're behind a firewall, but have direct access to the outside world
11775 through a wrapper command like "runsocks", you could open a socksified
11776 telnet connection to the news server as follows:
11777
11778 @lisp
11779 (nntp "outside"
11780       (nntp-pre-command "runsocks")
11781       (nntp-open-connection-function nntp-open-via-telnet)
11782       (nntp-address "the.news.server")
11783       (nntp-end-of-line "\n"))
11784 @end lisp
11785
11786 This means that you have to have set up @code{ssh-agent} correctly to
11787 provide automatic authorization, of course.  And to get a compressed
11788 connection, you have to have the @samp{Compression} option in the
11789 @code{ssh} @file{config} file.
11790
11791
11792 @node Creating a Virtual Server
11793 @subsection Creating a Virtual Server
11794
11795 If you're saving lots of articles in the cache by using persistent
11796 articles, you may want to create a virtual server to read the cache.
11797
11798 First you need to add a new server.  The @kbd{a} command does that.  It
11799 would probably be best to use @code{nnspool} to read the cache.  You
11800 could also use @code{nnml} or @code{nnmh}, though.
11801
11802 Type @kbd{a nnspool RET cache RET}.
11803
11804 You should now have a brand new @code{nnspool} virtual server called
11805 @samp{cache}.  You now need to edit it to have the right definitions.
11806 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
11807 will contain the following:
11808
11809 @lisp
11810 (nnspool "cache")
11811 @end lisp
11812
11813 Change that to:
11814
11815 @lisp
11816 (nnspool "cache"
11817          (nnspool-spool-directory "~/News/cache/")
11818          (nnspool-nov-directory "~/News/cache/")
11819          (nnspool-active-file "~/News/cache/active"))
11820 @end lisp
11821
11822 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
11823 @kbd{RET} over this virtual server, you should be entered into a browse
11824 buffer, and you should be able to enter any of the groups displayed.
11825
11826
11827 @node Server Variables
11828 @subsection Server Variables
11829
11830 One sticky point when defining variables (both on back ends and in Emacs
11831 in general) is that some variables are typically initialized from other
11832 variables when the definition of the variables is being loaded.  If you
11833 change the "base" variable after the variables have been loaded, you
11834 won't change the "derived" variables.
11835
11836 This typically affects directory and file variables.  For instance,
11837 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
11838 directory variables are initialized from that variable, so
11839 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
11840 new virtual @code{nnml} server, it will @emph{not} suffice to set just
11841 @code{nnml-directory}---you have to explicitly set all the file
11842 variables to be what you want them to be.  For a complete list of
11843 variables for each back end, see each back end's section later in this
11844 manual, but here's an example @code{nnml} definition:
11845
11846 @lisp
11847 (nnml "public"
11848       (nnml-directory "~/my-mail/")
11849       (nnml-active-file "~/my-mail/active")
11850       (nnml-newsgroups-file "~/my-mail/newsgroups"))
11851 @end lisp
11852
11853
11854 @node Servers and Methods
11855 @subsection Servers and Methods
11856
11857 Wherever you would normally use a select method
11858 (e.g. @code{gnus-secondary-select-method}, in the group select method,
11859 when browsing a foreign server) you can use a virtual server name
11860 instead.  This could potentially save lots of typing.  And it's nice all
11861 over.
11862
11863
11864 @node Unavailable Servers
11865 @subsection Unavailable Servers
11866
11867 If a server seems to be unreachable, Gnus will mark that server as
11868 @code{denied}.  That means that any subsequent attempt to make contact
11869 with that server will just be ignored.  ``It can't be opened,'' Gnus
11870 will tell you, without making the least effort to see whether that is
11871 actually the case or not.
11872
11873 That might seem quite naughty, but it does make sense most of the time.
11874 Let's say you have 10 groups subscribed to on server
11875 @samp{nephelococcygia.com}.  This server is located somewhere quite far
11876 away from you and the machine is quite slow, so it takes 1 minute just
11877 to find out that it refuses connection to you today.  If Gnus were to
11878 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
11879 attempt to do that.  Once it has gotten a single ``connection refused'',
11880 it will regard that server as ``down''.
11881
11882 So, what happens if the machine was only feeling unwell temporarily?
11883 How do you test to see whether the machine has come up again?
11884
11885 You jump to the server buffer (@pxref{Server Buffer}) and poke it
11886 with the following commands:
11887
11888 @table @kbd
11889
11890 @item O
11891 @kindex O (Server)
11892 @findex gnus-server-open-server
11893 Try to establish connection to the server on the current line
11894 (@code{gnus-server-open-server}).
11895
11896 @item C
11897 @kindex C (Server)
11898 @findex gnus-server-close-server
11899 Close the connection (if any) to the server
11900 (@code{gnus-server-close-server}).
11901
11902 @item D
11903 @kindex D (Server)
11904 @findex gnus-server-deny-server
11905 Mark the current server as unreachable
11906 (@code{gnus-server-deny-server}).
11907
11908 @item M-o
11909 @kindex M-o (Server)
11910 @findex gnus-server-open-all-servers
11911 Open the connections to all servers in the buffer
11912 (@code{gnus-server-open-all-servers}).
11913
11914 @item M-c
11915 @kindex M-c (Server)
11916 @findex gnus-server-close-all-servers
11917 Close the connections to all servers in the buffer
11918 (@code{gnus-server-close-all-servers}).
11919
11920 @item R
11921 @kindex R (Server)
11922 @findex gnus-server-remove-denials
11923 Remove all marks to whether Gnus was denied connection from any servers
11924 (@code{gnus-server-remove-denials}).
11925
11926 @item L
11927 @kindex L (Server)
11928 @findex gnus-server-offline-server
11929 Set server status to offline (@code{gnus-server-offline-server}).
11930
11931 @end table
11932
11933
11934 @node Getting News
11935 @section Getting News
11936 @cindex reading news
11937 @cindex news back ends
11938
11939 A newsreader is normally used for reading news.  Gnus currently provides
11940 only two methods of getting news---it can read from an @sc{nntp} server,
11941 or it can read from a local spool.
11942
11943 @menu
11944 * NNTP::                        Reading news from an @sc{nntp} server.
11945 * News Spool::                  Reading news from the local spool.
11946 @end menu
11947
11948
11949 @node NNTP
11950 @subsection NNTP
11951 @cindex nntp
11952
11953 Subscribing to a foreign group from an @sc{nntp} server is rather easy.
11954 You just specify @code{nntp} as method and the address of the @sc{nntp}
11955 server as the, uhm, address.
11956
11957 If the @sc{nntp} server is located at a non-standard port, setting the
11958 third element of the select method to this port number should allow you
11959 to connect to the right port.  You'll have to edit the group info for
11960 that (@pxref{Foreign Groups}).
11961
11962 The name of the foreign group can be the same as a native group.  In
11963 fact, you can subscribe to the same group from as many different servers
11964 you feel like.  There will be no name collisions.
11965
11966 The following variables can be used to create a virtual @code{nntp}
11967 server:
11968
11969 @table @code
11970
11971 @item nntp-server-opened-hook
11972 @vindex nntp-server-opened-hook
11973 @cindex @sc{mode reader}
11974 @cindex authinfo
11975 @cindex authentification
11976 @cindex nntp authentification
11977 @findex nntp-send-authinfo
11978 @findex nntp-send-mode-reader
11979 is run after a connection has been made.  It can be used to send
11980 commands to the @sc{nntp} server after it has been contacted.  By
11981 default it sends the command @code{MODE READER} to the server with the
11982 @code{nntp-send-mode-reader} function.  This function should always be
11983 present in this hook.
11984
11985 @item nntp-authinfo-function
11986 @vindex nntp-authinfo-function
11987 @findex nntp-send-authinfo
11988 @vindex nntp-authinfo-file
11989 This function will be used to send @samp{AUTHINFO} to the @sc{nntp}
11990 server.  The default function is @code{nntp-send-authinfo}, which looks
11991 through your @file{~/.authinfo} (or whatever you've set the
11992 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
11993 are found, it will prompt you for a login name and a password.  The
11994 format of the @file{~/.authinfo} file is (almost) the same as the
11995 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
11996 manual page, but here are the salient facts:
11997
11998 @enumerate
11999 @item
12000 The file contains one or more line, each of which define one server.
12001
12002 @item
12003 Each line may contain an arbitrary number of token/value pairs.
12004
12005 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12006 @samp{default}.  In addition Gnus introduces two new tokens, not present
12007 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12008 @samp{force}.  (This is the only way the @file{.authinfo} file format
12009 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12010 indicate what port on the server the credentials apply to and
12011 @samp{force} is explained below.
12012
12013 @end enumerate
12014
12015 Here's an example file:
12016
12017 @example
12018 machine news.uio.no login larsi password geheimnis
12019 machine nntp.ifi.uio.no login larsi force yes
12020 @end example
12021
12022 The token/value pairs may appear in any order; @samp{machine} doesn't
12023 have to be first, for instance.
12024
12025 In this example, both login name and password have been supplied for the
12026 former server, while the latter has only the login name listed, and the
12027 user will be prompted for the password.  The latter also has the
12028 @samp{force} tag, which means that the authinfo will be sent to the
12029 @var{nntp} server upon connection; the default (i.e., when there is not
12030 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12031 until the @var{nntp} server asks for it.
12032
12033 You can also add @samp{default} lines that will apply to all servers
12034 that don't have matching @samp{machine} lines.
12035
12036 @example
12037 default force yes
12038 @end example
12039
12040 This will force sending @samp{AUTHINFO} commands to all servers not
12041 previously mentioned.
12042
12043 Remember to not leave the @file{~/.authinfo} file world-readable.
12044
12045 @item nntp-server-action-alist
12046 @vindex nntp-server-action-alist
12047 This is a list of regexps to match on server types and actions to be
12048 taken when matches are made.  For instance, if you want Gnus to beep
12049 every time you connect to innd, you could say something like:
12050
12051 @lisp
12052 (setq nntp-server-action-alist
12053       '(("innd" (ding))))
12054 @end lisp
12055
12056 You probably don't want to do that, though.
12057
12058 The default value is
12059
12060 @lisp
12061 '(("nntpd 1\\.5\\.11t"
12062    (remove-hook 'nntp-server-opened-hook
12063                 'nntp-send-mode-reader)))
12064 @end lisp
12065
12066 This ensures that Gnus doesn't send the @code{MODE READER} command to
12067 nntpd 1.5.11t, since that command chokes that server, I've been told.
12068
12069 @item nntp-maximum-request
12070 @vindex nntp-maximum-request
12071 If the @sc{nntp} server doesn't support @sc{nov} headers, this back end
12072 will collect headers by sending a series of @code{head} commands.  To
12073 speed things up, the back end sends lots of these commands without
12074 waiting for reply, and then reads all the replies.  This is controlled
12075 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12076 your network is buggy, you should set this to 1.
12077
12078 @item nntp-connection-timeout
12079 @vindex nntp-connection-timeout
12080 If you have lots of foreign @code{nntp} groups that you connect to
12081 regularly, you're sure to have problems with @sc{nntp} servers not
12082 responding properly, or being too loaded to reply within reasonable
12083 time.  This is can lead to awkward problems, which can be helped
12084 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12085 that says how many seconds the @code{nntp} back end should wait for a
12086 connection before giving up.  If it is @code{nil}, which is the default,
12087 no timeouts are done.
12088
12089 @c @item nntp-command-timeout
12090 @c @vindex nntp-command-timeout
12091 @c @cindex PPP connections
12092 @c @cindex dynamic IP addresses
12093 @c If you're running Gnus on a machine that has a dynamically assigned
12094 @c address, Gnus may become confused.  If the address of your machine
12095 @c changes after connecting to the @sc{nntp} server, Gnus will simply sit
12096 @c waiting forever for replies from the server.  To help with this
12097 @c unfortunate problem, you can set this command to a number.  Gnus will
12098 @c then, if it sits waiting for a reply from the server longer than that
12099 @c number of seconds, shut down the connection, start a new one, and resend
12100 @c the command.  This should hopefully be transparent to the user.  A
12101 @c likely number is 30 seconds.
12102 @c
12103 @c @item nntp-retry-on-break
12104 @c @vindex nntp-retry-on-break
12105 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12106 @c hangs.  This will have much the same effect as the command timeout
12107 @c described above.
12108
12109 @item nntp-server-hook
12110 @vindex nntp-server-hook
12111 This hook is run as the last step when connecting to an @sc{nntp}
12112 server.
12113
12114 @item nntp-buggy-select
12115 @vindex nntp-buggy-select
12116 Set this to non-@code{nil} if your select routine is buggy.
12117
12118 @item nntp-nov-is-evil
12119 @vindex nntp-nov-is-evil
12120 If the @sc{nntp} server does not support @sc{nov}, you could set this
12121 variable to @code{t}, but @code{nntp} usually checks automatically whether @sc{nov}
12122 can be used.
12123
12124 @item nntp-xover-commands
12125 @vindex nntp-xover-commands
12126 @cindex nov
12127 @cindex XOVER
12128 List of strings used as commands to fetch @sc{nov} lines from a
12129 server.  The default value of this variable is @code{("XOVER"
12130 "XOVERVIEW")}.
12131
12132 @item nntp-nov-gap
12133 @vindex nntp-nov-gap
12134 @code{nntp} normally sends just one big request for @sc{nov} lines to
12135 the server.  The server responds with one huge list of lines.  However,
12136 if you have read articles 2-5000 in the group, and only want to read
12137 article 1 and 5001, that means that @code{nntp} will fetch 4999 @sc{nov}
12138 lines that you will not need.  This variable says how
12139 big a gap between two consecutive articles is allowed to be before the
12140 @code{XOVER} request is split into several request.  Note that if your
12141 network is fast, setting this variable to a really small number means
12142 that fetching will probably be slower.  If this variable is @code{nil},
12143 @code{nntp} will never split requests.  The default is 5.
12144
12145 @item nntp-prepare-server-hook
12146 @vindex nntp-prepare-server-hook
12147 A hook run before attempting to connect to an @sc{nntp} server.
12148
12149 @item nntp-warn-about-losing-connection
12150 @vindex nntp-warn-about-losing-connection
12151 If this variable is non-@code{nil}, some noise will be made when a
12152 server closes connection.
12153
12154 @item nntp-record-commands
12155 @vindex nntp-record-commands
12156 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12157 @sc{nntp} server (along with a timestamp) in the @samp{*nntp-log*}
12158 buffer.  This is useful if you are debugging a Gnus/@sc{nntp} connection
12159 that doesn't seem to work.
12160
12161 @item nntp-open-connection-function
12162 @vindex nntp-open-connection-function
12163 It is possible to customize how the connection to the nntp server will
12164 be opened.  If you specify an @code{nntp-open-connection-function}
12165 parameter, Gnus will use that function to establish the connection.
12166 Five pre-made functions are supplied.  These functions can be grouped in
12167 two categories: direct connection functions (three pre-made), and
12168 indirect ones (two pre-made).
12169
12170 @item nntp-prepare-post-hook
12171 @vindex nntp-prepare-post-hook
12172 A hook run just before posting an article.  If there is no
12173 @code{Message-ID} header in the article and the news server provides the
12174 recommended ID, it will be added to the article before running this
12175 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12176 inhibit Gnus to add a @code{Message-ID} header, you could say:
12177
12178 @lisp
12179 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12180 @end lisp
12181
12182 Note that not all servers support the recommended ID.  This works for
12183 INN versions 2.3.0 and later, for instance.
12184 @end table
12185
12186 @menu
12187 * Direct Functions::            Connecting directly to the server.
12188 * Indirect Functions::          Connecting indirectly to the server.
12189 * Common Variables::            Understood by several connection functions.
12190 @end menu
12191
12192
12193 @node Direct Functions
12194 @subsubsection Direct Functions
12195 @cindex direct connection functions
12196
12197 These functions are called direct because they open a direct connection
12198 between your machine and the @sc{nntp} server.  The behavior of these
12199 functions is also affected by commonly understood variables
12200 (@pxref{Common Variables}).
12201
12202 @table @code
12203 @findex nntp-open-network-stream
12204 @item nntp-open-network-stream
12205 This is the default, and simply connects to some port or other on the
12206 remote system.
12207
12208 @findex nntp-open-ssl-stream
12209 @item nntp-open-ssl-stream
12210 Opens a connection to a server over a @dfn{secure} channel.  To use
12211 this you must have OpenSSL (@uref{http://www.openssl.org}) or SSLeay
12212 installed (@uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL}, and you also
12213 need @file{ssl.el} (from the W3 distribution, for instance).  You then
12214 define a server as follows:
12215
12216 @lisp
12217 ;; Type `C-c C-c' after you've finished editing.
12218 ;;
12219 ;; "snews" is port 563 and is predefined in our /etc/services
12220 ;; however, openssl s_client -port doesn't like named ports
12221 ;;
12222 (nntp "snews.bar.com"
12223       (nntp-open-connection-function nntp-open-ssl-stream)
12224       (nntp-port-number 563)
12225       (nntp-address "snews.bar.com"))
12226 @end lisp
12227
12228 @findex nntp-open-telnet-stream
12229 @item nntp-open-telnet-stream
12230 Opens a connection to an @sc{nntp} server by simply @samp{telnet}'ing
12231 it.  You might wonder why this function exists, since we have the
12232 default @code{nntp-open-network-stream} which would do the job.  (One
12233 of) the reason(s) is that if you are behind a firewall but have direct
12234 connections to the outside world thanks to a command wrapper like
12235 @code{runsocks}, you can use it like this:
12236
12237 @lisp
12238 (nntp "socksified"
12239       (nntp-pre-command "runsocks")
12240       (nntp-open-connection-function nntp-open-telnet-stream)
12241       (nntp-address "the.news.server"))
12242 @end lisp
12243
12244 With the default method, you would need to wrap your whole Emacs
12245 session, which is not a good idea.
12246 @end table
12247
12248
12249 @node Indirect Functions
12250 @subsubsection Indirect Functions
12251 @cindex indirect connection functions
12252
12253 These functions are called indirect because they connect to an
12254 intermediate host before actually connecting to the @sc{nntp} server.
12255 All of these functions and related variables are also said to belong to
12256 the "via" family of connection: they're all prefixed with "via" to make
12257 things cleaner.  The behavior of these functions is also affected by
12258 commonly understood variables (@pxref{Common Variables}).
12259
12260 @table @code
12261 @item nntp-open-via-rlogin-and-telnet
12262 @findex nntp-open-via-rlogin-and-telnet
12263 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12264 to the real @sc{nntp} server from there.  This is useful for instance if
12265 you need to connect to a firewall machine first.
12266
12267 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12268
12269 @table @code
12270 @item nntp-via-rlogin-command
12271 @vindex nntp-via-rlogin-command
12272 Command used to log in on the intermediate host.  The default is
12273 @samp{rsh}, but @samp{ssh} is a popular alternative.
12274
12275 @item nntp-via-rlogin-command-switches
12276 @vindex nntp-via-rlogin-command-switches
12277 List of strings to be used as the switches to
12278 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12279 @samp{ssh} for `nntp-via-rlogin-command', you may set this to
12280 @samp{("-C")} in order to compress all data connections, otherwise set
12281 this to @samp{("-t")} or @samp{("-C" "-t")} if the telnet command
12282 requires a pseudo-tty allocation on an intermediate host.
12283 @end table
12284
12285 @item nntp-open-via-telnet-and-telnet
12286 @findex nntp-open-via-telnet-and-telnet
12287 Does essentially the same, but uses @samp{telnet} instead of
12288 @samp{rlogin} to connect to the intermediate host.
12289
12290 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12291
12292 @table @code
12293 @item nntp-via-telnet-command
12294 @vindex nntp-via-telnet-command
12295 Command used to @code{telnet} the intermediate host.  The default is
12296 @samp{telnet}.
12297
12298 @item nntp-via-telnet-switches
12299 @vindex nntp-via-telnet-switches
12300 List of strings to be used as the switches to the
12301 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12302
12303 @item nntp-via-user-password
12304 @vindex nntp-via-user-password
12305 Password to use when logging in on the intermediate host.
12306
12307 @item nntp-via-envuser
12308 @vindex nntp-via-envuser
12309 If non-@code{nil}, the intermediate @code{telnet} session (client and
12310 server both) will support the @code{ENVIRON} option and not prompt for
12311 login name. This works for Solaris @code{telnet}, for instance.
12312
12313 @item nntp-via-shell-prompt
12314 @vindex nntp-via-shell-prompt
12315 Regexp matching the shell prompt on the intermediate host.  The default
12316 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12317
12318 @end table
12319
12320 @end table
12321
12322
12323 Here are some additional variables that are understood by all the above
12324 functions:
12325
12326 @table @code
12327
12328 @item nntp-via-user-name
12329 @vindex nntp-via-user-name
12330 User name to use when connecting to the intermediate host.
12331
12332 @item nntp-via-address
12333 @vindex nntp-via-address
12334 Address of the intermediate host to connect to.
12335
12336 @end table
12337
12338
12339 @node Common Variables
12340 @subsubsection Common Variables
12341
12342 The following variables affect the behavior of all, or several of the
12343 pre-made connection functions. When not specified, all functions are
12344 affected.
12345
12346 @table @code
12347
12348 @item nntp-pre-command
12349 @vindex nntp-pre-command
12350 A command wrapper to use when connecting through a non native connection
12351 function (all except @code{nntp-open-network-stream} and
12352 @code{nntp-open-ssl-stream}.  This is where you would put a @samp{SOCKS}
12353 wrapper for instance.
12354
12355 @item nntp-address
12356 @vindex nntp-address
12357 The address of the @sc{nntp} server.
12358
12359 @item nntp-port-number
12360 @vindex nntp-port-number
12361 Port number to connect to the @sc{nntp} server.  The default is @samp{nntp}.
12362 If you use @sc{nntp} over @sc{ssl}, you may want to use integer ports rather
12363 than named ports (i.e, use @samp{563} instead of @samp{snews}), because
12364 external SSL tools may not work with named ports.
12365
12366 @item nntp-end-of-line
12367 @vindex nntp-end-of-line
12368 String to use as end-of-line marker when talking to the @sc{nntp}
12369 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12370 using a non native connection function.
12371
12372 @item nntp-telnet-command
12373 @vindex nntp-telnet-command
12374 Command to use when connecting to the @sc{nntp} server through
12375 @samp{telnet}.  This is NOT for an intermediate host.  This is just for
12376 the real @sc{nntp} server.  The default is @samp{telnet}.
12377
12378 @item nntp-telnet-switches
12379 @vindex nntp-telnet-switches
12380 A list of switches to pass to @code{nntp-telnet-command}.  The default
12381 is @samp{("-8")}.
12382
12383 @end table
12384
12385
12386 @node News Spool
12387 @subsection News Spool
12388 @cindex nnspool
12389 @cindex news spool
12390
12391 Subscribing to a foreign group from the local spool is extremely easy,
12392 and might be useful, for instance, to speed up reading groups that
12393 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12394 instance.
12395
12396 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12397 anything else) as the address.
12398
12399 If you have access to a local spool, you should probably use that as the
12400 native select method (@pxref{Finding the News}).  It is normally faster
12401 than using an @code{nntp} select method, but might not be.  It depends.
12402 You just have to try to find out what's best at your site.
12403
12404 @table @code
12405
12406 @item nnspool-inews-program
12407 @vindex nnspool-inews-program
12408 Program used to post an article.
12409
12410 @item nnspool-inews-switches
12411 @vindex nnspool-inews-switches
12412 Parameters given to the inews program when posting an article.
12413
12414 @item nnspool-spool-directory
12415 @vindex nnspool-spool-directory
12416 Where @code{nnspool} looks for the articles.  This is normally
12417 @file{/usr/spool/news/}.
12418
12419 @item nnspool-nov-directory
12420 @vindex nnspool-nov-directory
12421 Where @code{nnspool} will look for @sc{nov} files.  This is normally
12422 @file{/usr/spool/news/over.view/}.
12423
12424 @item nnspool-lib-dir
12425 @vindex nnspool-lib-dir
12426 Where the news lib dir is (@file{/usr/lib/news/} by default).
12427
12428 @item nnspool-active-file
12429 @vindex nnspool-active-file
12430 The path to the active file.
12431
12432 @item nnspool-newsgroups-file
12433 @vindex nnspool-newsgroups-file
12434 The path to the group descriptions file.
12435
12436 @item nnspool-history-file
12437 @vindex nnspool-history-file
12438 The path to the news history file.
12439
12440 @item nnspool-active-times-file
12441 @vindex nnspool-active-times-file
12442 The path to the active date file.
12443
12444 @item nnspool-nov-is-evil
12445 @vindex nnspool-nov-is-evil
12446 If non-@code{nil}, @code{nnspool} won't try to use any @sc{nov} files
12447 that it finds.
12448
12449 @item nnspool-sift-nov-with-sed
12450 @vindex nnspool-sift-nov-with-sed
12451 @cindex sed
12452 If non-@code{nil}, which is the default, use @code{sed} to get the
12453 relevant portion from the overview file.  If nil, @code{nnspool} will
12454 load the entire file into a buffer and process it there.
12455
12456 @end table
12457
12458
12459 @node Getting Mail
12460 @section Getting Mail
12461 @cindex reading mail
12462 @cindex mail
12463
12464 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12465 course.
12466
12467 @menu
12468 * Mail in a Newsreader::        Important introductory notes.
12469 * Getting Started Reading Mail::  A simple cookbook example.
12470 * Splitting Mail::              How to create mail groups.
12471 * Mail Sources::                How to tell Gnus where to get mail from.
12472 * Mail Back End Variables::     Variables for customizing mail handling.
12473 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12474 * Group Mail Splitting::        Use group customize to drive mail splitting.
12475 * Incorporating Old Mail::      What about the old mail you have?
12476 * Expiring Mail::               Getting rid of unwanted mail.
12477 * Washing Mail::                Removing gruft from the mail you get.
12478 * Duplicates::                  Dealing with duplicated mail.
12479 * Not Reading Mail::            Using mail back ends for reading other files.
12480 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12481 @end menu
12482
12483
12484 @node Mail in a Newsreader
12485 @subsection Mail in a Newsreader
12486
12487 If you are used to traditional mail readers, but have decided to switch
12488 to reading mail with Gnus, you may find yourself experiencing something
12489 of a culture shock.
12490
12491 Gnus does not behave like traditional mail readers.  If you want to make
12492 it behave that way, you can, but it's an uphill battle.
12493
12494 Gnus, by default, handles all its groups using the same approach.  This
12495 approach is very newsreaderly---you enter a group, see the new/unread
12496 messages, and when you read the messages, they get marked as read, and
12497 you don't see them any more.  (Unless you explicitly ask for them.)
12498
12499 In particular, you do not do anything explicitly to delete messages.
12500
12501 Does this mean that all the messages that have been marked as read are
12502 deleted?  How awful!
12503
12504 But, no, it means that old messages are @dfn{expired} according to some
12505 scheme or other.  For news messages, the expire process is controlled by
12506 the news administrator; for mail, the expire process is controlled by
12507 you.  The expire process for mail is covered in depth in @pxref{Expiring
12508 Mail}.
12509
12510 What many Gnus users find, after using it a while for both news and
12511 mail, is that the transport mechanism has very little to do with how
12512 they want to treat a message.
12513
12514 Many people subscribe to several mailing lists.  These are transported
12515 via @sc{smtp}, and are therefore mail.  But we might go for weeks without
12516 answering, or even reading these messages very carefully.  We may not
12517 need to save them because if we should need to read one again, they are
12518 archived somewhere else.
12519
12520 Some people have local news groups which have only a handful of readers.
12521 These are transported via @sc{nntp}, and are therefore news.  But we may need
12522 to read and answer a large fraction of the messages very carefully in
12523 order to do our work.  And there may not be an archive, so we may need
12524 to save the interesting messages the same way we would personal mail.
12525
12526 The important distinction turns out to be not the transport mechanism,
12527 but other factors such as how interested we are in the subject matter,
12528 or how easy it is to retrieve the message if we need to read it again.
12529
12530 Gnus provides many options for sorting mail into ``groups'' which behave
12531 like newsgroups, and for treating each group (whether mail or news)
12532 differently.
12533
12534 Some users never get comfortable using the Gnus (ahem) paradigm and wish
12535 that Gnus should grow up and be a male, er, mail reader.  It is possible
12536 to whip Gnus into a more mailreaderly being, but, as said before, it's
12537 not easy.  People who prefer proper mail readers should try @sc{vm}
12538 instead, which is an excellent, and proper, mail reader.
12539
12540 I don't mean to scare anybody off, but I want to make it clear that you
12541 may be required to learn a new way of thinking about messages.  After
12542 you've been subjected to The Gnus Way, you will come to love it.  I can
12543 guarantee it.  (At least the guy who sold me the Emacs Subliminal
12544 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
12545 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
12546 You Do.)
12547
12548
12549 @node Getting Started Reading Mail
12550 @subsection Getting Started Reading Mail
12551
12552 It's quite easy to use Gnus to read your new mail.  You just plonk the
12553 mail back end of your choice into @code{gnus-secondary-select-methods},
12554 and things will happen automatically.
12555
12556 For instance, if you want to use @code{nnml} (which is a "one file per
12557 mail" back end), you could put the following in your @file{.gnus} file:
12558
12559 @lisp
12560 (setq gnus-secondary-select-methods '((nnml "")))
12561 @end lisp
12562
12563 Now, the next time you start Gnus, this back end will be queried for new
12564 articles, and it will move all the messages in your spool file to its
12565 directory, which is @code{~/Mail/} by default.  The new group that will
12566 be created (@samp{mail.misc}) will be subscribed, and you can read it
12567 like any other group.
12568
12569 You will probably want to split the mail into several groups, though:
12570
12571 @lisp
12572 (setq nnmail-split-methods
12573       '(("junk" "^From:.*Lars Ingebrigtsen")
12574         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
12575         ("other" "")))
12576 @end lisp
12577
12578 This will result in three new @code{nnml} mail groups being created:
12579 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
12580 mail that doesn't fit into the first two groups will be placed in the
12581 last group.
12582
12583 This should be sufficient for reading mail with Gnus.  You might want to
12584 give the other sections in this part of the manual a perusal, though.
12585 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
12586
12587
12588 @node Splitting Mail
12589 @subsection Splitting Mail
12590 @cindex splitting mail
12591 @cindex mail splitting
12592
12593 @vindex nnmail-split-methods
12594 The @code{nnmail-split-methods} variable says how the incoming mail is
12595 to be split into groups.
12596
12597 @lisp
12598 (setq nnmail-split-methods
12599   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
12600     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
12601     ("mail.other" "")))
12602 @end lisp
12603
12604 This variable is a list of lists, where the first element of each of
12605 these lists is the name of the mail group (they do not have to be called
12606 something beginning with @samp{mail}, by the way), and the second
12607 element is a regular expression used on the header of each mail to
12608 determine if it belongs in this mail group.  The first string may
12609 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
12610 insert sub-expressions from the matched text.  For instance:
12611
12612 @lisp
12613 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
12614 @end lisp
12615
12616 The second element can also be a function.  In that case, it will be
12617 called narrowed to the headers with the first element of the rule as the
12618 argument.  It should return a non-@code{nil} value if it thinks that the
12619 mail belongs in that group.
12620
12621 The last of these groups should always be a general one, and the regular
12622 expression should @emph{always} be @samp{} so that it matches any mails
12623 that haven't been matched by any of the other regexps.  (These rules are
12624 processed from the beginning of the alist toward the end.  The first
12625 rule to make a match will "win", unless you have crossposting enabled.
12626 In that case, all matching rules will "win".)
12627
12628 If you like to tinker with this yourself, you can set this variable to a
12629 function of your choice.  This function will be called without any
12630 arguments in a buffer narrowed to the headers of an incoming mail
12631 message.  The function should return a list of group names that it
12632 thinks should carry this mail message.
12633
12634 Note that the mail back ends are free to maul the poor, innocent,
12635 incoming headers all they want to.  They all add @code{Lines} headers;
12636 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
12637 @code{From<SPACE>} line to something else.
12638
12639 @vindex nnmail-crosspost
12640 The mail back ends all support cross-posting.  If several regexps match,
12641 the mail will be ``cross-posted'' to all those groups.
12642 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
12643 that no articles are crossposted to the general (@samp{}) group.
12644
12645 @vindex nnmail-crosspost-link-function
12646 @cindex crosspost
12647 @cindex links
12648 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
12649 the crossposted articles.  However, not all file systems support hard
12650 links.  If that's the case for you, set
12651 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
12652 variable is @code{add-name-to-file} by default.)
12653
12654 @kindex M-x nnmail-split-history
12655 @kindex nnmail-split-history
12656 If you wish to see where the previous mail split put the messages, you
12657 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
12658 where re-spooling messages would put the messages, you can use
12659 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
12660 Group Commands}).
12661
12662 @vindex nnmail-split-header-length-limit
12663 Header lines longer than the value of
12664 @code{nnmail-split-header-length-limit} are excluded from the split
12665 function.
12666
12667 @vindex nnmail-mail-splitting-charset
12668 @vindex nnmail-mail-splitting-decodes
12669 By default the splitting codes MIME decodes headers so you can match
12670 on non-ASCII strings.  The @code{nnmail-mail-splitting-charset}
12671 variable specifies the default charset for decoding.  The behaviour
12672 can be turned off completely by binding
12673 @code{nnmail-mail-splitting-decodes} to nil, which is useful if you
12674 want to match articles based on the raw header data.
12675
12676 @vindex nnmail-resplit-incoming
12677 By default, splitting is performed on all incoming messages.  If
12678 you specify a @code{directory} entry for the variable
12679 @code{mail-sources} @pxref{Mail Source Specifiers}, however, then
12680 splitting does @emph{not} happen by default.  You can set the variable
12681 @code{nnmail-resplit-incoming} to a non-nil value to make splitting
12682 happen even in this case.  (This variable has no effect on other kinds
12683 of entries.)
12684
12685 Gnus gives you all the opportunity you could possibly want for shooting
12686 yourself in the foot.  Let's say you create a group that will contain
12687 all the mail you get from your boss.  And then you accidentally
12688 unsubscribe from the group.  Gnus will still put all the mail from your
12689 boss in the unsubscribed group, and so, when your boss mails you ``Have
12690 that report ready by Monday or you're fired!'', you'll never see it and,
12691 come Tuesday, you'll still believe that you're gainfully employed while
12692 you really should be out collecting empty bottles to save up for next
12693 month's rent money.
12694
12695
12696 @node Mail Sources
12697 @subsection Mail Sources
12698
12699 Mail can be gotten from many different sources---the mail spool, from a
12700 POP mail server, from a procmail directory, or from a maildir, for
12701 instance.
12702
12703 @menu
12704 * Mail Source Specifiers::      How to specify what a mail source is.
12705 * Mail Source Customization::   Some variables that influence things.
12706 * Fetching Mail::               Using the mail source specifiers.
12707 @end menu
12708
12709
12710 @node Mail Source Specifiers
12711 @subsubsection Mail Source Specifiers
12712 @cindex POP
12713 @cindex mail server
12714 @cindex procmail
12715 @cindex mail spool
12716 @cindex mail source
12717
12718 You tell Gnus how to fetch mail by setting @code{mail-sources}
12719 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
12720
12721 Here's an example:
12722
12723 @lisp
12724 (pop :server "pop3.mailserver.com" :user "myname")
12725 @end lisp
12726
12727 As can be observed, a mail source specifier is a list where the first
12728 element is a @dfn{mail source type}, followed by an arbitrary number of
12729 @dfn{keywords}.  Keywords that are not explicitly specified are given
12730 default values.
12731
12732 The following mail source types are available:
12733
12734 @table @code
12735 @item file
12736 Get mail from a single file; typically from the mail spool.
12737
12738 Keywords:
12739
12740 @table @code
12741 @item :path
12742 The path of the file.  Defaults to the value of the @code{MAIL}
12743 environment variable or the value of @code{rmail-spool-directory}
12744 (usually something like @file{/usr/mail/spool/user-name}).
12745 @end table
12746
12747 An example file mail source:
12748
12749 @lisp
12750 (file :path "/usr/spool/mail/user-name")
12751 @end lisp
12752
12753 Or using the default path:
12754
12755 @lisp
12756 (file)
12757 @end lisp
12758
12759 If the mail spool file is not located on the local machine, it's best to
12760 use POP or @sc{imap} or the like to fetch the mail.  You can not use ange-ftp
12761 file names here---it has no way to lock the mail spool while moving the
12762 mail.
12763
12764 If it's impossible to set up a proper server, you can use ssh instead.
12765
12766 @lisp
12767 (setq mail-sources
12768       '((file :prescript "ssh host bin/getmail >%t")))
12769 @end lisp
12770
12771 The @samp{getmail} script would look something like the following:
12772
12773 @example
12774 #!/bin/sh
12775 #  getmail - move mail from spool to stdout
12776 #  flu@@iki.fi
12777
12778 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
12779 TMP=$HOME/Mail/tmp
12780 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
12781 @end example
12782
12783 Alter this script to fit find the @samp{movemail} you want to use.
12784
12785
12786 @item directory
12787 @vindex nnmail-scan-directory-mail-source-once
12788 Get mail from several files in a directory.  This is typically used when
12789 you have procmail split the incoming mail into several files.  That is,
12790 there is a one-to-one correspondence between files in that directory and
12791 groups, so that mail from the file @file{foo.bar.spool} will be put in
12792 the group @code{foo.bar}.  (You can change the suffix to be used instead
12793 of @code{.spool}.)  Setting
12794 @code{nnmail-scan-directory-mail-source-once} to non-nil forces Gnus to
12795 scan the mail source only once.  This is particularly useful if you want
12796 to scan mail groups at a specified level.
12797
12798 @vindex nnmail-resplit-incoming
12799 There is also the variable @code{nnmail-resplit-incoming}, if you set
12800 that to a non-nil value, then the normal splitting process is applied
12801 to all the files from the directory, @ref{Splitting Mail}.
12802
12803 Keywords:
12804
12805 @table @code
12806 @item :path
12807 The path of the directory where the files are.  There is no default
12808 value.
12809
12810 @item :suffix
12811 Only files ending with this suffix are used.  The default is
12812 @samp{.spool}.
12813
12814 @item :predicate
12815 Only files that have this predicate return non-@code{nil} are returned.
12816 The default is @code{identity}.  This is used as an additional
12817 filter---only files that have the right suffix @emph{and} satisfy this
12818 predicate are considered.
12819
12820 @item :prescript
12821 @itemx :postscript
12822 Script run before/after fetching mail.
12823
12824 @end table
12825
12826 An example directory mail source:
12827
12828 @lisp
12829 (directory :path "/home/user-name/procmail-dir/"
12830            :suffix ".prcml")
12831 @end lisp
12832
12833 @item pop
12834 Get mail from a POP server.
12835
12836 Keywords:
12837
12838 @table @code
12839 @item :server
12840 The name of the POP server.  The default is taken from the
12841 @code{MAILHOST} environment variable.
12842
12843 @item :port
12844 The port number of the POP server.  This can be a number (eg,
12845 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
12846 string, it should be a service name as listed in @file{/etc/services} on
12847 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
12848 need to specify it as @samp{"pop-3"} instead.
12849
12850 @item :user
12851 The user name to give to the POP server.  The default is the login
12852 name.
12853
12854 @item :password
12855 The password to give to the POP server.  If not specified, the user is
12856 prompted.
12857
12858 @item :program
12859 The program to use to fetch mail from the POP server.  This should be
12860 a @code{format}-like string.  Here's an example:
12861
12862 @example
12863 fetchmail %u@@%s -P %p %t
12864 @end example
12865
12866 The valid format specifier characters are:
12867
12868 @table @samp
12869 @item t
12870 The name of the file the mail is to be moved to.  This must always be
12871 included in this string.
12872
12873 @item s
12874 The name of the server.
12875
12876 @item P
12877 The port number of the server.
12878
12879 @item u
12880 The user name to use.
12881
12882 @item p
12883 The password to use.
12884 @end table
12885
12886 The values used for these specs are taken from the values you give the
12887 corresponding keywords.
12888
12889 @item :prescript
12890 A script to be run before fetching the mail.  The syntax is the same as
12891 the @code{:program} keyword.  This can also be a function to be run.
12892
12893 @item :postscript
12894 A script to be run after fetching the mail.  The syntax is the same as
12895 the @code{:program} keyword.  This can also be a function to be run.
12896
12897 @item :function
12898 The function to use to fetch mail from the POP server.  The function is
12899 called with one parameter---the name of the file where the mail should
12900 be moved to.
12901
12902 @item :authentication
12903 This can be either the symbol @code{password} or the symbol @code{apop}
12904 and says what authentication scheme to use.  The default is
12905 @code{password}.
12906
12907 @end table
12908
12909 If the @code{:program} and @code{:function} keywords aren't specified,
12910 @code{pop3-movemail} will be used.
12911
12912 Here are some examples.  Fetch from the default POP server, using the
12913 default user name, and default fetcher:
12914
12915 @lisp
12916 (pop)
12917 @end lisp
12918
12919 Fetch from a named server with a named user and password:
12920
12921 @lisp
12922 (pop :server "my.pop.server"
12923      :user "user-name" :password "secret")
12924 @end lisp
12925
12926 Use @samp{movemail} to move the mail:
12927
12928 @lisp
12929 (pop :program "movemail po:%u %t %p")
12930 @end lisp
12931
12932 @item maildir
12933 Get mail from a maildir.  This is a type of mailbox that is supported by
12934 at least qmail and postfix, where each file in a special directory
12935 contains exactly one mail.
12936
12937 Keywords:
12938
12939 @table @code
12940 @item :path
12941 The path of the directory where the mails are stored.  The default is
12942 taken from the @code{MAILDIR} environment variable or
12943 @samp{~/Maildir/}.
12944 @item :subdirs
12945 The subdirectories of the Maildir.  The default is
12946 @samp{("new" "cur")}.
12947
12948 @c If you sometimes look at your mail through a pop3 daemon before fetching
12949 @c them with Gnus, you may also have to fetch your mails from the
12950 @c @code{cur} directory inside the maildir, like in the first example
12951 @c below.
12952
12953 You can also get mails from remote hosts (because maildirs don't suffer
12954 from locking problems).
12955
12956 @end table
12957
12958 Two example maildir mail sources:
12959
12960 @lisp
12961 (maildir :path "/home/user-name/Maildir/"
12962          :subdirs ("cur" "new"))
12963 @end lisp
12964
12965 @lisp
12966 (maildir :path "/user@@remotehost.org:~/Maildir/"
12967          :subdirs ("new"))
12968 @end lisp
12969
12970 @item imap
12971 Get mail from a @sc{imap} server.  If you don't want to use @sc{imap}
12972 as intended, as a network mail reading protocol (ie with nnimap), for
12973 some reason or other, Gnus let you treat it similar to a POP server
12974 and fetches articles from a given @sc{imap} mailbox.  @xref{IMAP}, for
12975 more information.
12976
12977 Note that for the Kerberos, GSSAPI, SSL/TLS and STARTTLS support you
12978 may need external programs and libraries, @xref{IMAP}.
12979
12980 Keywords:
12981
12982 @table @code
12983 @item :server
12984 The name of the @sc{imap} server.  The default is taken from the
12985 @code{MAILHOST} environment variable.
12986
12987 @item :port
12988 The port number of the @sc{imap} server.  The default is @samp{143}, or
12989 @samp{993} for SSL/TLS connections.
12990
12991 @item :user
12992 The user name to give to the @sc{imap} server.  The default is the login
12993 name.
12994
12995 @item :password
12996 The password to give to the @sc{imap} server.  If not specified, the user is
12997 prompted.
12998
12999 @item :stream
13000 What stream to use for connecting to the server, this is one of the
13001 symbols in @code{imap-stream-alist}.  Right now, this means
13002 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{ssl},
13003 @samp{shell} or the default @samp{network}.
13004
13005 @item :authentication
13006 Which authenticator to use for authenticating to the server, this is
13007 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13008 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13009 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13010
13011 @item :program
13012 When using the `shell' :stream, the contents of this variable is
13013 mapped into the `imap-shell-program' variable.  This should be a
13014 @code{format}-like string (or list of strings).  Here's an example:
13015
13016 @example
13017 ssh %s imapd
13018 @end example
13019
13020 The valid format specifier characters are:
13021
13022 @table @samp
13023 @item s
13024 The name of the server.
13025
13026 @item l
13027 User name from `imap-default-user'.
13028
13029 @item p
13030 The port number of the server.
13031 @end table
13032
13033 The values used for these specs are taken from the values you give the
13034 corresponding keywords.
13035
13036 @item :mailbox
13037 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13038 which normally is the mailbox which receive incoming mail.
13039
13040 @item :predicate
13041 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13042 UNDELETED}, is probably the best choice for most people, but if you
13043 sometimes peek in your mailbox with a @sc{imap} client and mark some
13044 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13045 Then all articles in the mailbox is fetched, no matter what.  For a
13046 complete list of predicates, see RFC 2060 section 6.4.4.
13047
13048 @item :fetchflag
13049 How to flag fetched articles on the server, the default @samp{\Deleted}
13050 will mark them as deleted, an alternative would be @samp{\Seen} which
13051 would simply mark them as read.  These are the two most likely choices,
13052 but more flags are defined in RFC 2060 section 2.3.2.
13053
13054 @item :dontexpunge
13055 If non-nil, don't remove all articles marked as deleted in the mailbox
13056 after finishing the fetch.
13057
13058 @end table
13059
13060 An example @sc{imap} mail source:
13061
13062 @lisp
13063 (imap :server "mail.mycorp.com"
13064       :stream kerberos4
13065       :fetchflag "\\Seen")
13066 @end lisp
13067
13068 @item webmail
13069 Get mail from a webmail server, such as @uref{www.hotmail.com},
13070 @uref{webmail.netscape.com}, @uref{www.netaddress.com},
13071 @uref{mail.yahoo..com}.
13072
13073 NOTE: Webmail largely depends cookies. A "one-line-cookie" patch is
13074 required for url "4.0pre.46".
13075
13076 WARNING: Mails may be lost.  NO WARRANTY.
13077
13078 Keywords:
13079
13080 @table @code
13081 @item :subtype
13082 The type of the webmail server.  The default is @code{hotmail}.  The
13083 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13084
13085 @item :user
13086 The user name to give to the webmail server.  The default is the login
13087 name.
13088
13089 @item :password
13090 The password to give to the webmail server.  If not specified, the user is
13091 prompted.
13092
13093 @item :dontexpunge
13094 If non-nil, only fetch unread articles and don't move them to trash
13095 folder after finishing the fetch.
13096
13097 @end table
13098
13099 An example webmail source:
13100
13101 @lisp
13102 (webmail :subtype 'hotmail
13103          :user "user-name"
13104          :password "secret")
13105 @end lisp
13106 @end table
13107
13108 @table @dfn
13109 @item Common Keywords
13110 Common keywords can be used in any type of mail source.
13111
13112 Keywords:
13113
13114 @table @code
13115 @item :plugged
13116 If non-nil, fetch the mail even when Gnus is unplugged.  If you use
13117 directory source to get mail, you can specify it as in this example:
13118
13119 @lisp
13120 (setq mail-sources
13121       '((directory :path "/home/pavel/.Spool/"
13122                    :suffix ""
13123                    :plugged t)))
13124 @end lisp
13125
13126 Gnus will then fetch your mail even when you are unplugged.  This is
13127 useful when you use local mail and news.
13128
13129 @end table
13130 @end table
13131
13132 @subsubsection Function Interface
13133
13134 Some of the above keywords specify a Lisp function to be executed.
13135 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13136 the value of the keyword while the function is executing.  For example,
13137 consider the following mail-source setting:
13138
13139 @lisp
13140 (setq mail-sources '((pop :user "jrl"
13141                           :server "pophost" :function fetchfunc)))
13142 @end lisp
13143
13144 While the function @code{fetchfunc} is executing, the symbol @code{user}
13145 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13146 @code{"pophost"}.  The symbols @code{port}, @code{password},
13147 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13148 and @code{authentication} are also bound (to their default values).
13149
13150 See above for a list of keywords for each type of mail source.
13151
13152
13153 @node Mail Source Customization
13154 @subsubsection Mail Source Customization
13155
13156 The following is a list of variables that influence how the mail is
13157 fetched.  You would normally not need to set or change any of these
13158 variables.
13159
13160 @table @code
13161 @item mail-source-crash-box
13162 @vindex mail-source-crash-box
13163 File where mail will be stored while processing it.  The default is
13164 @file{~/.emacs-mail-crash-box}.
13165
13166 @item mail-source-delete-incoming
13167 @vindex mail-source-delete-incoming
13168 If non-@code{nil}, delete incoming files after handling them.
13169
13170 @item mail-source-directory
13171 @vindex mail-source-directory
13172 Directory where files (if any) will be stored.  The default is
13173 @file{~/Mail/}.  At present, the only thing this is used for is to say
13174 where the incoming files will be stored if the previous variable is
13175 @code{nil}.
13176
13177 @item mail-source-incoming-file-prefix
13178 @vindex mail-source-incoming-file-prefix
13179 Prefix for file name for storing incoming mail.  The default is
13180 @file{Incoming}, in which case files will end up with names like
13181 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13182 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13183
13184 @item mail-source-default-file-modes
13185 @vindex mail-source-default-file-modes
13186 All new mail files will get this file mode.  The default is 384.
13187
13188 @item mail-source-movemail-program
13189 @vindex mail-source-movemail-program
13190 If non-nil, name of program for fetching new mail.  If nil,
13191 @code{movemail} in @var{exec-directory}.
13192
13193 @end table
13194
13195
13196 @node Fetching Mail
13197 @subsubsection Fetching Mail
13198
13199 @vindex mail-sources
13200 @vindex nnmail-spool-file
13201 The way to actually tell Gnus where to get new mail from is to set
13202 @code{mail-sources} to a list of mail source specifiers
13203 (@pxref{Mail Source Specifiers}).
13204
13205 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13206 @code{nil}, the mail back ends will never attempt to fetch mail by
13207 themselves.
13208
13209 If you want to fetch mail both from your local spool as well as a POP
13210 mail server, you'd say something like:
13211
13212 @lisp
13213 (setq mail-sources
13214       '((file)
13215         (pop :server "pop3.mail.server"
13216              :password "secret")))
13217 @end lisp
13218
13219 Or, if you don't want to use any of the keyword defaults:
13220
13221 @lisp
13222 (setq mail-sources
13223       '((file :path "/var/spool/mail/user-name")
13224         (pop :server "pop3.mail.server"
13225              :user "user-name"
13226              :port "pop3"
13227              :password "secret")))
13228 @end lisp
13229
13230
13231 When you use a mail back end, Gnus will slurp all your mail from your
13232 inbox and plonk it down in your home directory.  Gnus doesn't move any
13233 mail if you're not using a mail back end---you have to do a lot of magic
13234 invocations first.  At the time when you have finished drawing the
13235 pentagram, lightened the candles, and sacrificed the goat, you really
13236 shouldn't be too surprised when Gnus moves your mail.
13237
13238
13239
13240 @node Mail Back End Variables
13241 @subsection Mail Back End Variables
13242
13243 These variables are (for the most part) pertinent to all the various
13244 mail back ends.
13245
13246 @table @code
13247 @vindex nnmail-read-incoming-hook
13248 @item nnmail-read-incoming-hook
13249 The mail back ends all call this hook after reading new mail.  You can
13250 use this hook to notify any mail watch programs, if you want to.
13251
13252 @vindex nnmail-split-hook
13253 @item nnmail-split-hook
13254 @findex article-decode-encoded-words
13255 @findex RFC 1522 decoding
13256 @findex RFC 2047 decoding
13257 Hook run in the buffer where the mail headers of each message is kept
13258 just before the splitting based on these headers is done.  The hook is
13259 free to modify the buffer contents in any way it sees fit---the buffer
13260 is discarded after the splitting has been done, and no changes performed
13261 in the buffer will show up in any files.
13262 @code{gnus-article-decode-encoded-words} is one likely function to add
13263 to this hook.
13264
13265 @vindex nnmail-pre-get-new-mail-hook
13266 @vindex nnmail-post-get-new-mail-hook
13267 @item nnmail-pre-get-new-mail-hook
13268 @itemx nnmail-post-get-new-mail-hook
13269 These are two useful hooks executed when treating new incoming
13270 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13271 starting to handle the new mail) and
13272 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13273 is done).  Here's and example of using these two hooks to change the
13274 default file modes the new mail files get:
13275
13276 @lisp
13277 (add-hook 'nnmail-pre-get-new-mail-hook
13278           (lambda () (set-default-file-modes 511)))
13279
13280 (add-hook 'nnmail-post-get-new-mail-hook
13281           (lambda () (set-default-file-modes 551)))
13282 @end lisp
13283
13284 @item nnmail-use-long-file-names
13285 @vindex nnmail-use-long-file-names
13286 If non-@code{nil}, the mail back ends will use long file and directory
13287 names.  Groups like @samp{mail.misc} will end up in directories
13288 (assuming use of @code{nnml} back end) or files (assuming use of
13289 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13290 the same group will end up in @file{mail/misc}.
13291
13292 @item nnmail-delete-file-function
13293 @vindex nnmail-delete-file-function
13294 @findex delete-file
13295 Function called to delete files.  It is @code{delete-file} by default.
13296
13297 @item nnmail-cache-accepted-message-ids
13298 @vindex nnmail-cache-accepted-message-ids
13299 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13300 the back end (via @code{Gcc}, for instance) into the mail duplication
13301 discovery cache.  The default is @code{nil}.
13302
13303 @item nnmail-cache-ignore-groups
13304 @vindex nnmail-cache-ignore-groups
13305 This can be a regular expression or a list of regular expressions.
13306 Group names that match any of the regular expressions will never be
13307 recorded in the @code{Message-ID} cache.
13308
13309 This can be useful, for example, when using Fancy Splitting
13310 (@pxref{Fancy Mail Splitting}) together with the function
13311 @code{nnmail-split-fancy-with-parent}.
13312
13313 @end table
13314
13315
13316 @node Fancy Mail Splitting
13317 @subsection Fancy Mail Splitting
13318 @cindex mail splitting
13319 @cindex fancy mail splitting
13320
13321 @vindex nnmail-split-fancy
13322 @findex nnmail-split-fancy
13323 If the rather simple, standard method for specifying how to split mail
13324 doesn't allow you to do what you want, you can set
13325 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13326 play with the @code{nnmail-split-fancy} variable.
13327
13328 Let's look at an example value of this variable first:
13329
13330 @lisp
13331 ;; Messages from the mailer daemon are not crossposted to any of
13332 ;; the ordinary groups.  Warnings are put in a separate group
13333 ;; from real errors.
13334 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13335                    "mail.misc"))
13336    ;; Non-error messages are crossposted to all relevant
13337    ;; groups, but we don't crosspost between the group for the
13338    ;; (ding) list and the group for other (ding) related mail.
13339    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13340          ("subject" "ding" "ding.misc"))
13341       ;; Other mailing lists...
13342       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13343       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13344       ;; Both lists below have the same suffix, so prevent
13345       ;; cross-posting to mkpkg.list of messages posted only to
13346       ;; the bugs- list, but allow cross-posting when the
13347       ;; message was really cross-posted.
13348       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13349       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13350       ;; People...
13351       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13352    ;; Unmatched mail goes to the catch all group.
13353    "misc.misc")
13354 @end lisp
13355
13356 This variable has the format of a @dfn{split}.  A split is a (possibly)
13357 recursive structure where each split may contain other splits.  Here are
13358 the five possible split syntaxes:
13359
13360 @enumerate
13361
13362 @item
13363 @samp{group}: If the split is a string, that will be taken as a group
13364 name.  Normal regexp match expansion will be done.  See below for
13365 examples.
13366
13367 @item
13368 @code{(@var{field} @var{value} @code{[-} @var{restrict}
13369 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
13370 first element of which is a string, then store the message as
13371 specified by @var{split}, if header @var{field} (a regexp) contains
13372 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
13373 matches some string after @var{field} and before the end of the
13374 matched @var{value}, the @var{split} is ignored.  If none of the
13375 @var{restrict} clauses match, @var{split} is processed.
13376
13377 @item
13378 @code{(| @var{split}@dots{})}: If the split is a list, and the first
13379 element is @code{|} (vertical bar), then process each @var{split} until
13380 one of them matches.  A @var{split} is said to match if it will cause
13381 the mail message to be stored in one or more groups.
13382
13383 @item
13384 @code{(& @var{split}@dots{})}: If the split is a list, and the first
13385 element is @code{&}, then process all @var{split}s in the list.
13386
13387 @item
13388 @code{junk}: If the split is the symbol @code{junk}, then don't save
13389 (i.e., delete) this message.  Use with extreme caution.
13390
13391 @item
13392 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
13393 a list, and the first element is @code{:}, then the second element will
13394 be called as a function with @var{args} given as arguments.  The
13395 function should return a @var{split}.
13396
13397 @cindex body split
13398 For instance, the following function could be used to split based on the
13399 body of the messages:
13400
13401 @lisp
13402 (defun split-on-body ()
13403   (save-excursion
13404     (set-buffer " *nnmail incoming*")
13405     (goto-char (point-min))
13406     (when (re-search-forward "Some.*string" nil t)
13407       "string.group")))
13408 @end lisp
13409
13410 The @samp{" *nnmail incoming*"} is narrowed to the message in question
13411 when the @code{:} function is run.
13412
13413 @item
13414 @code{(! @var{func} @var{split})}: If the split is a list, and the first
13415 element is @code{!}, then SPLIT will be processed, and FUNC will be
13416 called as a function with the result of SPLIT as argument.  FUNC should
13417 return a split.
13418
13419 @item
13420 @code{nil}: If the split is @code{nil}, it is ignored.
13421
13422 @end enumerate
13423
13424 In these splits, @var{field} must match a complete field name.
13425 @var{value} must match a complete word according to the fundamental mode
13426 syntax table.  You can use @code{.*} in the regexps to match partial
13427 field names or words.  In other words, all @var{value}'s are wrapped in
13428 @samp{\<} and @samp{\>} pairs.
13429
13430 @vindex nnmail-split-abbrev-alist
13431 @var{field} and @var{value} can also be lisp symbols, in that case they
13432 are expanded as specified by the variable
13433 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells, where
13434 the @code{car} of a cell contains the key, and the @code{cdr} contains the associated
13435 value.
13436
13437 @vindex nnmail-split-fancy-syntax-table
13438 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13439 when all this splitting is performed.
13440
13441 If you want to have Gnus create groups dynamically based on some
13442 information in the headers (i.e., do @code{replace-match}-like
13443 substitutions in the group names), you can say things like:
13444
13445 @example
13446 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13447 @end example
13448
13449 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13450 will be filed in @samp{mail.debian.foo}.
13451
13452 If the string contains the element @samp{\&}, then the previously
13453 matched string will be substituted.  Similarly, the elements @samp{\\1}
13454 up to @samp{\\9} will be substituted with the text matched by the
13455 groupings 1 through 9.
13456
13457 @findex nnmail-split-fancy-with-parent
13458 @code{nnmail-split-fancy-with-parent} is a function which allows you to
13459 split followups into the same groups their parents are in.  Sometimes
13460 you can't make splitting rules for all your mail.  For example, your
13461 boss might send you personal mail regarding different projects you are
13462 working on, and as you can't tell your boss to put a distinguishing
13463 string into the subject line, you have to resort to manually moving the
13464 messages into the right group.  With this function, you only have to do
13465 it once per thread.
13466
13467 To use this feature, you have to set @code{nnmail-treat-duplicates} and
13468 @code{nnmail-cache-accepted-message-ids} to a non-nil value.  And then
13469 you can include @code{nnmail-split-fancy-with-parent} using the colon
13470 feature, like so:
13471 @lisp
13472 (setq nnmail-treat-duplicates 'warn     ; or 'delete
13473       nnmail-cache-accepted-message-ids t
13474       nnmail-split-fancy
13475       '(| (: nnmail-split-fancy-with-parent)
13476           ;; other splits go here
13477         ))
13478 @end lisp
13479
13480 This feature works as follows: when @code{nnmail-treat-duplicates} is
13481 non-nil, Gnus records the message id of every message it sees in the
13482 file specified by the variable @code{nnmail-message-id-cache-file},
13483 together with the group it is in (the group is omitted for non-mail
13484 messages).  When mail splitting is invoked, the function
13485 @code{nnmail-split-fancy-with-parent} then looks at the References (and
13486 In-Reply-To) header of each message to split and searches the file
13487 specified by @code{nnmail-message-id-cache-file} for the message ids.
13488 When it has found a parent, it returns the corresponding group name
13489 unless the group name matches the regexp
13490 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is recommended
13491 that you set @code{nnmail-message-id-cache-length} to a somewhat higher
13492 number than the default so that the message ids are still in the cache.
13493 (A value of 5000 appears to create a file some 300 kBytes in size.)
13494 @vindex nnmail-cache-accepted-message-ids
13495 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
13496 also records the message ids of moved articles, so that the followup
13497 messages goes into the new group.
13498
13499 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
13500 want certain groups to be recorded in the cache.  For example, if all
13501 outgoing messages are written to an `outgoing' group, you could set
13502 @code{nnmail-cache-ignore-groups} to match that group name.
13503 Otherwise, answers to all your messages would end up in the
13504 `outgoing' group.
13505
13506
13507 @node Group Mail Splitting
13508 @subsection Group Mail Splitting
13509 @cindex mail splitting
13510 @cindex group mail splitting
13511
13512 @findex gnus-group-split
13513 If you subscribe to dozens of mailing lists but you don't want to
13514 maintain mail splitting rules manually, group mail splitting is for you.
13515 You just have to set @var{to-list} and/or @var{to-address} in group
13516 parameters or group customization and set @code{nnmail-split-methods} to
13517 @code{gnus-group-split}.  This splitting function will scan all groups
13518 for those parameters and split mail accordingly, i.e., messages posted
13519 from or to the addresses specified in the parameters @var{to-list} or
13520 @var{to-address} of a mail group will be stored in that group.
13521
13522 Sometimes, mailing lists have multiple addresses, and you may want mail
13523 splitting to recognize them all: just set the @var{extra-aliases} group
13524 parameter to the list of additional addresses and it's done.  If you'd
13525 rather use a regular expression, set @var{split-regexp}.
13526
13527 All these parameters in a group will be used to create an
13528 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
13529 the @var{value} is a single regular expression that matches
13530 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
13531 matches of @var{split-regexp}, and the @var{split} is the name of the
13532 group.  @var{restrict}s are also supported: just set the
13533 @var{split-exclude} parameter to a list of regular expressions.
13534
13535 If you can't get the right split to be generated using all these
13536 parameters, or you just need something fancier, you can set the
13537 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
13538 this case, all other aforementioned parameters will be ignored by
13539 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
13540 @code{nil}, in which case the group will be ignored by
13541 @code{gnus-group-split}.
13542
13543 @vindex gnus-group-split-default-catch-all-group
13544 @code{gnus-group-split} will do cross-posting on all groups that match,
13545 by defining a single @code{&} fancy split containing one split for each
13546 group.  If a message doesn't match any split, it will be stored in the
13547 group named in @code{gnus-group-split-default-catch-all-group}, unless
13548 some group has @var{split-spec} set to @code{catch-all}, in which case
13549 that group is used as the catch-all group.  Even though this variable is
13550 often used just to name a group, it may also be set to an arbitrarily
13551 complex fancy split (after all, a group name is a fancy split), and this
13552 may be useful to split mail that doesn't go to any mailing list to
13553 personal mail folders.  Note that this fancy split is added as the last
13554 element of a @code{|} split list that also contains a @code{&} split
13555 with the rules extracted from group parameters.
13556
13557 It's time for an example.  Assume the following group parameters have
13558 been defined:
13559
13560 @example
13561 nnml:mail.bar:
13562 ((to-address . "bar@@femail.com")
13563  (split-regexp . ".*@@femail\\.com"))
13564 nnml:mail.foo:
13565 ((to-list . "foo@@nowhere.gov")
13566  (extra-aliases "foo@@localhost" "foo-redist@@home")
13567  (split-exclude "bugs-foo" "rambling-foo")
13568  (admin-address . "foo-request@@nowhere.gov"))
13569 nnml:mail.others:
13570 ((split-spec . catch-all))
13571 @end example
13572
13573 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
13574 behave as if @code{nnmail-split-fancy} had been selected and variable
13575 @code{nnmail-split-fancy} had been set as follows:
13576
13577 @lisp
13578 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
13579       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
13580            - "bugs-foo" - "rambling-foo" "mail.foo"))
13581    "mail.others")
13582 @end lisp
13583
13584 @findex gnus-group-split-fancy
13585 If you'd rather not use group splitting for all your mail groups, you
13586 may use it for only some of them, by using @code{nnmail-split-fancy}
13587 splits like this:
13588
13589 @lisp
13590 (: gnus-group-split-fancy GROUPS NO-CROSSPOST CATCH-ALL)
13591 @end lisp
13592
13593 @var{groups} may be a regular expression or a list of group names whose
13594 parameters will be scanned to generate the output split.
13595 @var{no-crosspost} can be used to disable cross-posting; in this case, a
13596 single @code{|} split will be output.  @var{catch-all} is the fallback
13597 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
13598 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
13599 empty string in any selected group, no catch-all split will be issued.
13600 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
13601 this group will override the value of the @var{catch-all} argument.
13602
13603 @findex gnus-group-split-setup
13604 Unfortunately, scanning all groups and their parameters can be quite
13605 slow, especially considering that it has to be done for every message.
13606 But don't despair!  The function @code{gnus-group-split-setup} can be
13607 used to enable @code{gnus-group-split} in a much more efficient way.  It
13608 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
13609 @code{nnmail-split-fancy} to the split produced by
13610 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
13611 scanned once, no matter how many messages are split.
13612
13613 @findex gnus-group-split-update
13614 However, if you change group parameters, you'd have to update
13615 @code{nnmail-split-fancy} manually.  You can do it by running
13616 @code{gnus-group-split-update}.  If you'd rather have it updated
13617 automatically, just tell @code{gnus-group-split-setup} to do it for
13618 you.  For example, add to your @file{.gnus}:
13619
13620 @lisp
13621 (gnus-group-split-setup AUTO-UPDATE CATCH-ALL)
13622 @end lisp
13623
13624 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
13625 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
13626 have to worry about updating @code{nnmail-split-fancy} again.  If you
13627 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
13628 @code{gnus-group-split-default-catch-all-group} will be set to its
13629 value.
13630
13631 @vindex gnus-group-split-updated-hook
13632 Because you may want to change @code{nnmail-split-fancy} after it is set
13633 by @code{gnus-group-split-update}, this function will run
13634 @code{gnus-group-split-updated-hook} just before finishing.
13635
13636 @node Incorporating Old Mail
13637 @subsection Incorporating Old Mail
13638 @cindex incorporating old mail
13639 @cindex import old mail
13640
13641 Most people have lots of old mail stored in various file formats.  If
13642 you have set up Gnus to read mail using one of the spiffy Gnus mail
13643 back ends, you'll probably wish to have that old mail incorporated into
13644 your mail groups.
13645
13646 Doing so can be quite easy.
13647
13648 To take an example: You're reading mail using @code{nnml}
13649 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
13650 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
13651 file filled with important, but old, mail.  You want to move it into
13652 your @code{nnml} groups.
13653
13654 Here's how:
13655
13656 @enumerate
13657 @item
13658 Go to the group buffer.
13659
13660 @item
13661 Type `G f' and give the path to the mbox file when prompted to create an
13662 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
13663
13664 @item
13665 Type `SPACE' to enter the newly created group.
13666
13667 @item
13668 Type `M P b' to process-mark all articles in this group's buffer
13669 (@pxref{Setting Process Marks}).
13670
13671 @item
13672 Type `B r' to respool all the process-marked articles, and answer
13673 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
13674 @end enumerate
13675
13676 All the mail messages in the mbox file will now also be spread out over
13677 all your @code{nnml} groups.  Try entering them and check whether things
13678 have gone without a glitch.  If things look ok, you may consider
13679 deleting the mbox file, but I wouldn't do that unless I was absolutely
13680 sure that all the mail has ended up where it should be.
13681
13682 Respooling is also a handy thing to do if you're switching from one mail
13683 back end to another.  Just respool all the mail in the old mail groups
13684 using the new mail back end.
13685
13686
13687 @node Expiring Mail
13688 @subsection Expiring Mail
13689 @cindex article expiry
13690
13691 Traditional mail readers have a tendency to remove mail articles when
13692 you mark them as read, in some way.  Gnus takes a fundamentally
13693 different approach to mail reading.
13694
13695 Gnus basically considers mail just to be news that has been received in
13696 a rather peculiar manner.  It does not think that it has the power to
13697 actually change the mail, or delete any mail messages.  If you enter a
13698 mail group, and mark articles as ``read'', or kill them in some other
13699 fashion, the mail articles will still exist on the system.  I repeat:
13700 Gnus will not delete your old, read mail.  Unless you ask it to, of
13701 course.
13702
13703 To make Gnus get rid of your unwanted mail, you have to mark the
13704 articles as @dfn{expirable}.  (With the default keybindings, this means
13705 that you have to type @kbd{E}.)  This does not mean that the articles
13706 will disappear right away, however.  In general, a mail article will be
13707 deleted from your system if, 1) it is marked as expirable, AND 2) it is
13708 more than one week old.  If you do not mark an article as expirable, it
13709 will remain on your system until hell freezes over.  This bears
13710 repeating one more time, with some spurious capitalizations: IF you do
13711 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
13712
13713 You do not have to mark articles as expirable by hand.  Gnus provides
13714 two features, called `auto-expire' and `total-expire', that can help you
13715 with this.  In a nutshell, `auto-expire' means that Gnus hits @kbd{E}
13716 for you when you select an article.  And `total-expire' means that Gnus
13717 considers all articles as expirable that are read.  So, in addition to
13718 the articles marked @samp{E}, also the articles marked @samp{r},
13719 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
13720 expirable.
13721
13722 When should either auto-expire or total-expire be used?  Most people
13723 who are subscribed to mailing lists split each list into its own group
13724 and then turn on auto-expire or total-expire for those groups.
13725 (@xref{Splitting Mail}, for more information on splitting each list
13726 into its own group.)
13727
13728 Which one is better, auto-expire or total-expire?  It's not easy to
13729 answer.  Generally speaking, auto-expire is probably faster.  Another
13730 advantage of auto-expire is that you get more marks to work with: for
13731 the articles that are supposed to stick around, you can still choose
13732 between tick and dormant and read marks.  But with total-expire, you
13733 only have dormant and ticked to choose from.  The advantage of
13734 total-expire is that it works well with adaptive scoring @pxref{Adaptive
13735 Scoring}.  Auto-expire works with normal scoring but not with adaptive
13736 scoring.
13737
13738 @vindex gnus-auto-expirable-newsgroups
13739 Groups that match the regular expression
13740 @code{gnus-auto-expirable-newsgroups} will have all articles that you
13741 read marked as expirable automatically.  All articles marked as
13742 expirable have an @samp{E} in the first column in the summary buffer.
13743
13744 By default, if you have auto expiry switched on, Gnus will mark all the
13745 articles you read as expirable, no matter if they were read or unread
13746 before.  To avoid having articles marked as read marked as expirable
13747 automatically, you can put something like the following in your
13748 @file{.gnus} file:
13749
13750 @vindex gnus-mark-article-hook
13751 @lisp
13752 (remove-hook 'gnus-mark-article-hook
13753              'gnus-summary-mark-read-and-unread-as-read)
13754 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
13755 @end lisp
13756
13757 Note that making a group auto-expirable doesn't mean that all read
13758 articles are expired---only the articles marked as expirable
13759 will be expired.  Also note that using the @kbd{d} command won't make
13760 articles expirable---only semi-automatic marking of articles as read will
13761 mark the articles as expirable in auto-expirable groups.
13762
13763 Let's say you subscribe to a couple of mailing lists, and you want the
13764 articles you have read to disappear after a while:
13765
13766 @lisp
13767 (setq gnus-auto-expirable-newsgroups
13768       "mail.nonsense-list\\|mail.nice-list")
13769 @end lisp
13770
13771 Another way to have auto-expiry happen is to have the element
13772 @code{auto-expire} in the group parameters of the group.
13773
13774 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
13775 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
13776 don't really mix very well.
13777
13778 @vindex nnmail-expiry-wait
13779 The @code{nnmail-expiry-wait} variable supplies the default time an
13780 expirable article has to live.  Gnus starts counting days from when the
13781 message @emph{arrived}, not from when it was sent.  The default is seven
13782 days.
13783
13784 Gnus also supplies a function that lets you fine-tune how long articles
13785 are to live, based on what group they are in.  Let's say you want to
13786 have one month expiry period in the @samp{mail.private} group, a one day
13787 expiry period in the @samp{mail.junk} group, and a six day expiry period
13788 everywhere else:
13789
13790 @vindex nnmail-expiry-wait-function
13791 @lisp
13792 (setq nnmail-expiry-wait-function
13793       (lambda (group)
13794        (cond ((string= group "mail.private")
13795                31)
13796              ((string= group "mail.junk")
13797                1)
13798              ((string= group "important")
13799                'never)
13800              (t
13801                6))))
13802 @end lisp
13803
13804 The group names this function is fed are ``unadorned'' group
13805 names---no @samp{nnml:} prefixes and the like.
13806
13807 The @code{nnmail-expiry-wait} variable and
13808 @code{nnmail-expiry-wait-function} function can either be a number (not
13809 necessarily an integer) or one of the symbols @code{immediate} or
13810 @code{never}.
13811
13812 You can also use the @code{expiry-wait} group parameter to selectively
13813 change the expiry period (@pxref{Group Parameters}).
13814
13815 @vindex nnmail-expiry-target
13816 The normal action taken when expiring articles is to delete them.
13817 However, in some circumstances it might make more sense to move them
13818 to other groups instead of deleting them.  The variable
13819 @code{nnmail-expiry-target} (and the @code{expiry-target} group
13820 parameter) controls this.  The variable supplies a default value for
13821 all groups, which can be overridden for specific groups by the group
13822 parameter.  default value is @code{delete}, but this can also be a
13823 string (which should be the name of the group the message should be
13824 moved to), or a function (which will be called in a buffer narrowed to
13825 the message in question, and with the name of the group being moved
13826 from as its parameter) which should return a target -- either a group
13827 name or @code{delete}.
13828
13829 Here's an example for specifying a group name:
13830 @lisp
13831 (setq nnmail-expiry-target "nnml:expired")
13832 @end lisp
13833
13834 @findex nnmail-fancy-expiry-target
13835 @vindex nnmail-fancy-expiry-targets
13836 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
13837 expire mail to groups according to the variable
13838 @code{nnmail-fancy-expiry-targets}.  Here's an example:
13839
13840 @lisp
13841  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
13842        nnmail-fancy-expiry-targets
13843        '((to-from "boss" "nnfolder:Work")
13844          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
13845          ("from" ".*" "nnfolder:Archive-%Y")))
13846 @end lisp
13847
13848 With this setup, any mail that has @code{IMPORTANT} in its Subject
13849 header and was sent in the year @code{YYYY} and month @code{MMM}, will
13850 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}. If its
13851 From or To header contains the string @code{boss}, it will get expired
13852 to @code{nnfolder:Work}. All other mail will get expired to
13853 @code{nnfolder:Archive-YYYY}.
13854
13855 @vindex nnmail-keep-last-article
13856 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
13857 expire the final article in a mail newsgroup.  This is to make life
13858 easier for procmail users.
13859
13860 @vindex gnus-total-expirable-newsgroups
13861 By the way: That line up there, about Gnus never expiring non-expirable
13862 articles, is a lie.  If you put @code{total-expire} in the group
13863 parameters, articles will not be marked as expirable, but all read
13864 articles will be put through the expiry process.  Use with extreme
13865 caution.  Even more dangerous is the
13866 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
13867 this regexp will have all read articles put through the expiry process,
13868 which means that @emph{all} old mail articles in the groups in question
13869 will be deleted after a while.  Use with extreme caution, and don't come
13870 crying to me when you discover that the regexp you used matched the
13871 wrong group and all your important mail has disappeared.  Be a
13872 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
13873 with!  So there!
13874
13875 Most people make most of their mail groups total-expirable, though.
13876
13877 @vindex gnus-inhibit-user-auto-expire
13878 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
13879 commands will not mark an article as expirable, even if the group has
13880 auto-expire turned on.
13881
13882
13883 @node Washing Mail
13884 @subsection Washing Mail
13885 @cindex mail washing
13886 @cindex list server brain damage
13887 @cindex incoming mail treatment
13888
13889 Mailers and list servers are notorious for doing all sorts of really,
13890 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
13891 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
13892 end of all lines passing through our server, so let's do that!!!!1!''
13893 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
13894 considered to be self-evident were not discussed.  So.  Here we are.
13895
13896 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
13897 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
13898 be shocked and dismayed by this, but I haven't got the energy.  It is to
13899 laugh.
13900
13901 Gnus provides a plethora of functions for washing articles while
13902 displaying them, but it might be nicer to do the filtering before
13903 storing the mail to disk.  For that purpose, we have three hooks and
13904 various functions that can be put in these hooks.
13905
13906 @table @code
13907 @item nnmail-prepare-incoming-hook
13908 @vindex nnmail-prepare-incoming-hook
13909 This hook is called before doing anything with the mail and is meant for
13910 grand, sweeping gestures.  It is called in a buffer that contains all
13911 the new, incoming mail.  Functions to be used include:
13912
13913 @table @code
13914 @item nnheader-ms-strip-cr
13915 @findex nnheader-ms-strip-cr
13916 Remove trailing carriage returns from each line.  This is default on
13917 Emacs running on MS machines.
13918
13919 @end table
13920
13921 @item nnmail-prepare-incoming-header-hook
13922 @vindex nnmail-prepare-incoming-header-hook
13923 This hook is called narrowed to each header.  It can be used when
13924 cleaning up the headers.  Functions that can be used include:
13925
13926 @table @code
13927 @item nnmail-remove-leading-whitespace
13928 @findex nnmail-remove-leading-whitespace
13929 Clear leading white space that ``helpful'' listservs have added to the
13930 headers to make them look nice.  Aaah.
13931
13932 (Note that this function works on both the header on the body of all
13933 messages, so it is a potentially dangerous function to use (if a body
13934 of a message contains something that looks like a header line).  So
13935 rather than fix the bug, it is of course the right solution to make it
13936 into a feature by documenting it.)
13937
13938 @item nnmail-remove-list-identifiers
13939 @findex nnmail-remove-list-identifiers
13940 Some list servers add an identifier---for example, @samp{(idm)}---to the
13941 beginning of all @code{Subject} headers.  I'm sure that's nice for
13942 people who use stone age mail readers.  This function will remove
13943 strings that match the @code{nnmail-list-identifiers} regexp, which can
13944 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
13945 @code{\\(..\\)}.
13946
13947 For instance, if you want to remove the @samp{(idm)} and the
13948 @samp{nagnagnag} identifiers:
13949
13950 @lisp
13951 (setq nnmail-list-identifiers
13952       '("(idm)" "nagnagnag"))
13953 @end lisp
13954
13955 This can also be done non-destructively with
13956 @code{gnus-list-identifiers}, @xref{Article Hiding}.
13957
13958 @item nnmail-remove-tabs
13959 @findex nnmail-remove-tabs
13960 Translate all @samp{TAB} characters into @samp{SPACE} characters.
13961
13962 @item nnmail-fix-eudora-headers
13963 @findex nnmail-fix-eudora-headers
13964 @cindex Eudora
13965 Eudora produces broken @code{References} headers, but OK
13966 @code{In-Reply-To} headers.  This function will get rid of the
13967 @code{References} headers.
13968
13969 @end table
13970
13971 @item nnmail-prepare-incoming-message-hook
13972 @vindex nnmail-prepare-incoming-message-hook
13973 This hook is called narrowed to each message.  Functions to be used
13974 include:
13975
13976 @table @code
13977 @item article-de-quoted-unreadable
13978 @findex article-de-quoted-unreadable
13979 Decode Quoted Readable encoding.
13980
13981 @end table
13982 @end table
13983
13984
13985 @node Duplicates
13986 @subsection Duplicates
13987
13988 @vindex nnmail-treat-duplicates
13989 @vindex nnmail-message-id-cache-length
13990 @vindex nnmail-message-id-cache-file
13991 @cindex duplicate mails
13992 If you are a member of a couple of mailing lists, you will sometimes
13993 receive two copies of the same mail.  This can be quite annoying, so
13994 @code{nnmail} checks for and treats any duplicates it might find.  To do
13995 this, it keeps a cache of old @code{Message-ID}s---
13996 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
13997 default.  The approximate maximum number of @code{Message-ID}s stored
13998 there is controlled by the @code{nnmail-message-id-cache-length}
13999 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14000 stored.) If all this sounds scary to you, you can set
14001 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14002 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14003 will insert a warning into the head of the mail saying that it thinks
14004 that this is a duplicate of a different message.
14005
14006 This variable can also be a function.  If that's the case, the function
14007 will be called from a buffer narrowed to the message in question with
14008 the @code{Message-ID} as a parameter.  The function must return either
14009 @code{nil}, @code{warn}, or @code{delete}.
14010
14011 You can turn this feature off completely by setting the variable to
14012 @code{nil}.
14013
14014 If you want all the duplicate mails to be put into a special
14015 @dfn{duplicates} group, you could do that using the normal mail split
14016 methods:
14017
14018 @lisp
14019 (setq nnmail-split-fancy
14020       '(| ;; Messages duplicates go to a separate group.
14021           ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14022           ;; Message from daemons, postmaster, and the like to another.
14023           (any mail "mail.misc")
14024           ;; Other rules.
14025           [ ... ] ))
14026 @end lisp
14027
14028 Or something like:
14029 @lisp
14030 (setq nnmail-split-methods
14031       '(("duplicates" "^Gnus-Warning:.*duplicate")
14032         ;; Other rules.
14033         [...]))
14034 @end lisp
14035
14036 Here's a neat feature: If you know that the recipient reads her mail
14037 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14038 @code{delete}, you can send her as many insults as you like, just by
14039 using a @code{Message-ID} of a mail that you know that she's already
14040 received.  Think of all the fun!  She'll never see any of it!  Whee!
14041
14042
14043 @node Not Reading Mail
14044 @subsection Not Reading Mail
14045
14046 If you start using any of the mail back ends, they have the annoying
14047 habit of assuming that you want to read mail with them.  This might not
14048 be unreasonable, but it might not be what you want.
14049
14050 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14051 @code{nil}, none of the back ends will ever attempt to read incoming
14052 mail, which should help.
14053
14054 @vindex nnbabyl-get-new-mail
14055 @vindex nnmbox-get-new-mail
14056 @vindex nnml-get-new-mail
14057 @vindex nnmh-get-new-mail
14058 @vindex nnfolder-get-new-mail
14059 This might be too much, if, for instance, you are reading mail quite
14060 happily with @code{nnml} and just want to peek at some old @sc{rmail}
14061 file you have stashed away with @code{nnbabyl}.  All back ends have
14062 variables called back-end-@code{get-new-mail}.  If you want to disable
14063 the @code{nnbabyl} mail reading, you edit the virtual server for the
14064 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14065
14066 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14067 narrowed to the article to be saved before saving it when reading
14068 incoming mail.
14069
14070
14071 @node Choosing a Mail Back End
14072 @subsection Choosing a Mail Back End
14073
14074 Gnus will read the mail spool when you activate a mail group.  The mail
14075 file is first copied to your home directory.  What happens after that
14076 depends on what format you want to store your mail in.
14077
14078 There are six different mail back ends in the standard Gnus, and more
14079 back ends are available separately.  The mail back end most people use
14080 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14081 Spool}).  You might notice that only five back ends are listed below;
14082 @code{nnmaildir}'s documentation has not yet been completely
14083 incorporated into this manual.  Until it is, you can find it at
14084 @uref{http://multivac.cwru.edu./nnmaildir/}.
14085
14086 @menu
14087 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14088 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
14089 * Mail Spool::                  Store your mail in a private spool?
14090 * MH Spool::                    An mhspool-like back end.
14091 * Mail Folders::                Having one file for each group.
14092 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14093 @end menu
14094
14095
14096 @node Unix Mail Box
14097 @subsubsection Unix Mail Box
14098 @cindex nnmbox
14099 @cindex unix mail box
14100
14101 @vindex nnmbox-active-file
14102 @vindex nnmbox-mbox-file
14103 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14104 mail.  @code{nnmbox} will add extra headers to each mail article to say
14105 which group it belongs in.
14106
14107 Virtual server settings:
14108
14109 @table @code
14110 @item nnmbox-mbox-file
14111 @vindex nnmbox-mbox-file
14112 The name of the mail box in the user's home directory.  Default is
14113 @file{~/mbox}.
14114
14115 @item nnmbox-active-file
14116 @vindex nnmbox-active-file
14117 The name of the active file for the mail box.  Default is
14118 @file{~/.mbox-active}.
14119
14120 @item nnmbox-get-new-mail
14121 @vindex nnmbox-get-new-mail
14122 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14123 into groups.  Default is @code{t}.
14124 @end table
14125
14126
14127 @node Rmail Babyl
14128 @subsubsection Rmail Babyl
14129 @cindex nnbabyl
14130 @cindex rmail mbox
14131
14132 @vindex nnbabyl-active-file
14133 @vindex nnbabyl-mbox-file
14134 The @dfn{nnbabyl} back end will use a babyl mail box (aka. @dfn{rmail
14135 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14136 mail article to say which group it belongs in.
14137
14138 Virtual server settings:
14139
14140 @table @code
14141 @item nnbabyl-mbox-file
14142 @vindex nnbabyl-mbox-file
14143 The name of the rmail mbox file.  The default is @file{~/RMAIL}
14144
14145 @item nnbabyl-active-file
14146 @vindex nnbabyl-active-file
14147 The name of the active file for the rmail box.  The default is
14148 @file{~/.rmail-active}
14149
14150 @item nnbabyl-get-new-mail
14151 @vindex nnbabyl-get-new-mail
14152 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14153 @code{t}
14154 @end table
14155
14156
14157 @node Mail Spool
14158 @subsubsection Mail Spool
14159 @cindex nnml
14160 @cindex mail @sc{nov} spool
14161
14162 The @dfn{nnml} spool mail format isn't compatible with any other known
14163 format.  It should be used with some caution.
14164
14165 @vindex nnml-directory
14166 If you use this back end, Gnus will split all incoming mail into files,
14167 one file for each mail, and put the articles into the corresponding
14168 directories under the directory specified by the @code{nnml-directory}
14169 variable.  The default value is @file{~/Mail/}.
14170
14171 You do not have to create any directories beforehand; Gnus will take
14172 care of all that.
14173
14174 If you have a strict limit as to how many files you are allowed to store
14175 in your account, you should not use this back end.  As each mail gets its
14176 own file, you might very well occupy thousands of inodes within a few
14177 weeks.  If this is no problem for you, and it isn't a problem for you
14178 having your friendly systems administrator walking around, madly,
14179 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14180 know that this is probably the fastest format to use.  You do not have
14181 to trudge through a big mbox file just to read your new mail.
14182
14183 @code{nnml} is probably the slowest back end when it comes to article
14184 splitting.  It has to create lots of files, and it also generates
14185 @sc{nov} databases for the incoming mails.  This makes it possibly the
14186 fastest back end when it comes to reading mail.
14187
14188 @cindex self contained nnml servers
14189 @cindex marks
14190 When the marks file is used (which it is by default), @code{nnml}
14191 servers have the property that you may backup them using @code{tar} or
14192 similar, and later be able to restore them into Gnus (by adding the
14193 proper @code{nnml} server) and have all your marks be preserved.  Marks
14194 for a group is usually stored in the @code{.marks} file (but see
14195 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14196 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14197 to restore the group (after restoring the backup into the nnml
14198 directory).
14199
14200 If for some reason you believe your @file{.marks} files are screwed
14201 up, you can just delete them all.  Gnus will then correctly regenerate
14202 them next time it starts.
14203
14204 Virtual server settings:
14205
14206 @table @code
14207 @item nnml-directory
14208 @vindex nnml-directory
14209 All @code{nnml} directories will be placed under this directory.
14210 The default is the value of `message-directory' (whose default value is
14211 @file{~/Mail}).
14212
14213 @item nnml-active-file
14214 @vindex nnml-active-file
14215 The active file for the @code{nnml} server.  The default is
14216 @file{~/Mail/active"}.
14217
14218 @item nnml-newsgroups-file
14219 @vindex nnml-newsgroups-file
14220 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14221 Format}.  The default is @file{~/Mail/newsgroups"}.
14222
14223 @item nnml-get-new-mail
14224 @vindex nnml-get-new-mail
14225 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14226 @code{t}.
14227
14228 @item nnml-nov-is-evil
14229 @vindex nnml-nov-is-evil
14230 If non-@code{nil}, this back end will ignore any @sc{nov} files.  The
14231 default is @code{nil}.
14232
14233 @item nnml-nov-file-name
14234 @vindex nnml-nov-file-name
14235 The name of the @sc{nov} files.  The default is @file{.overview}.
14236
14237 @item nnml-prepare-save-mail-hook
14238 @vindex nnml-prepare-save-mail-hook
14239 Hook run narrowed to an article before saving.
14240
14241 @item nnml-marks-is-evil
14242 @vindex nnml-marks-is-evil
14243 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14244 default is @code{nil}.
14245
14246 @item nnml-marks-file-name
14247 @vindex nnml-marks-file-name
14248 The name of the @dfn{marks} files.  The default is @file{.marks}.
14249
14250 @item nnml-use-compressed-files
14251 @vindex nnml-use-compressed-files
14252 If non-@code{nil}, @code{nnml} will allow using compressed message
14253 files.
14254
14255 @end table
14256
14257 @findex nnml-generate-nov-databases
14258 If your @code{nnml} groups and @sc{nov} files get totally out of whack,
14259 you can do a complete update by typing @kbd{M-x
14260 nnml-generate-nov-databases}.  This command will trawl through the
14261 entire @code{nnml} hierarchy, looking at each and every article, so it
14262 might take a while to complete.  A better interface to this
14263 functionality can be found in the server buffer (@pxref{Server
14264 Commands}).
14265
14266
14267 @node MH Spool
14268 @subsubsection MH Spool
14269 @cindex nnmh
14270 @cindex mh-e mail spool
14271
14272 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14273 @sc{nov} databases and it doesn't keep an active file or marks file.
14274 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
14275 but it also makes it easier to write procmail scripts for.
14276
14277 Virtual server settings:
14278
14279 @table @code
14280 @item nnmh-directory
14281 @vindex nnmh-directory
14282 All @code{nnmh} directories will be located under this directory.  The
14283 default is the value of @code{message-directory} (whose default is
14284 @file{~/Mail})
14285
14286 @item nnmh-get-new-mail
14287 @vindex nnmh-get-new-mail
14288 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14289 @code{t}.
14290
14291 @item nnmh-be-safe
14292 @vindex nnmh-be-safe
14293 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14294 sure that the articles in the folder are actually what Gnus thinks they
14295 are.  It will check date stamps and stat everything in sight, so
14296 setting this to @code{t} will mean a serious slow-down.  If you never
14297 use anything but Gnus to read the @code{nnmh} articles, you do not have
14298 to set this variable to @code{t}.  The default is @code{nil}.
14299 @end table
14300
14301
14302 @node Mail Folders
14303 @subsubsection Mail Folders
14304 @cindex nnfolder
14305 @cindex mbox folders
14306 @cindex mail folders
14307
14308 @code{nnfolder} is a back end for storing each mail group in a separate
14309 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
14310 will add extra headers to keep track of article numbers and arrival
14311 dates.
14312
14313 @cindex self contained nnfolder servers
14314 @cindex marks
14315 When the marks file is used (which it is by default), @code{nnfolder}
14316 servers have the property that you may backup them using @code{tar} or
14317 similar, and later be able to restore them into Gnus (by adding the
14318 proper @code{nnfolder} server) and have all your marks be preserved.
14319 Marks for a group is usually stored in a file named as the mbox file
14320 with @code{.mrk} concatenated to it (but see
14321 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
14322 Individual @code{nnfolder} groups are also possible to backup, use
14323 @kbd{G m} to restore the group (after restoring the backup into the
14324 @code{nnfolder} directory).
14325
14326 Virtual server settings:
14327
14328 @table @code
14329 @item nnfolder-directory
14330 @vindex nnfolder-directory
14331 All the @code{nnfolder} mail boxes will be stored under this directory.
14332 The default is the value of @code{message-directory} (whose default is
14333 @file{~/Mail})
14334
14335 @item nnfolder-active-file
14336 @vindex nnfolder-active-file
14337 The name of the active file.  The default is @file{~/Mail/active}.
14338
14339 @item nnfolder-newsgroups-file
14340 @vindex nnfolder-newsgroups-file
14341 The name of the group descriptions file.  @xref{Newsgroups File
14342 Format}.  The default is @file{~/Mail/newsgroups"}
14343
14344 @item nnfolder-get-new-mail
14345 @vindex nnfolder-get-new-mail
14346 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
14347 is @code{t}
14348
14349 @item nnfolder-save-buffer-hook
14350 @vindex nnfolder-save-buffer-hook
14351 @cindex backup files
14352 Hook run before saving the folders.  Note that Emacs does the normal
14353 backup renaming of files even with the @code{nnfolder} buffers.  If you
14354 wish to switch this off, you could say something like the following in
14355 your @file{.emacs} file:
14356
14357 @lisp
14358 (defun turn-off-backup ()
14359   (set (make-local-variable 'backup-inhibited) t))
14360
14361 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
14362 @end lisp
14363
14364 @item nnfolder-delete-mail-hook
14365 @vindex nnfolder-delete-mail-hook
14366 Hook run in a buffer narrowed to the message that is to be deleted.
14367 This function can be used to copy the message to somewhere else, or to
14368 extract some information from it before removing it.
14369
14370 @item nnfolder-nov-is-evil
14371 @vindex nnfolder-nov-is-evil
14372 If non-@code{nil}, this back end will ignore any @sc{nov} files.  The
14373 default is @code{nil}.
14374
14375 @item nnfolder-nov-file-suffix
14376 @vindex nnfolder-nov-file-suffix
14377 The extension for @sc{nov} files.  The default is @file{.nov}.
14378
14379 @item nnfolder-nov-directory
14380 @vindex nnfolder-nov-directory
14381 The directory where the @sc{nov} files should be stored.  If nil,
14382 @code{nnfolder-directory} is used.
14383
14384 @item nnfolder-marks-is-evil
14385 @vindex nnfolder-marks-is-evil
14386 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14387 default is @code{nil}.
14388
14389 @item nnfolder-marks-file-suffix
14390 @vindex nnfolder-marks-file-suffix
14391 The extension for @sc{marks} files.  The default is @file{.mrk}.
14392
14393 @item nnfolder-marks-directory
14394 @vindex nnfolder-marks-directory
14395 The directory where the @sc{marks} files should be stored.  If nil,
14396 @code{nnfolder-directory} is used.
14397
14398 @end table
14399
14400
14401 @findex nnfolder-generate-active-file
14402 @kindex M-x nnfolder-generate-active-file
14403 If you have lots of @code{nnfolder}-like files you'd like to read with
14404 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
14405 command to make @code{nnfolder} aware of all likely files in
14406 @code{nnfolder-directory}.  This only works if you use long file names,
14407 though.
14408
14409 @node Comparing Mail Back Ends
14410 @subsubsection Comparing Mail Back Ends
14411
14412 First, just for terminology, the @dfn{back end} is the common word for a
14413 low-level access method---a transport, if you will, by which something
14414 is acquired.  The sense is that one's mail has to come from somewhere,
14415 and so selection of a suitable back end is required in order to get that
14416 mail within spitting distance of Gnus.
14417
14418 The same concept exists for Usenet itself: Though access to articles is
14419 typically done by @sc{nntp} these days, once upon a midnight dreary, everyone
14420 in the world got at Usenet by running a reader on the machine where the
14421 articles lay (the machine which today we call an @sc{nntp} server), and
14422 access was by the reader stepping into the articles' directory spool
14423 area directly.  One can still select between either the @code{nntp} or
14424 @code{nnspool} back ends, to select between these methods, if one happens
14425 actually to live on the server (or can see its spool directly, anyway,
14426 via NFS).
14427
14428 The goal in selecting a mail back end is to pick one which
14429 simultaneously represents a suitable way of dealing with the original
14430 format plus leaving mail in a form that is convenient to use in the
14431 future.  Here are some high and low points on each:
14432
14433 @table @code
14434 @item nnmbox
14435
14436 UNIX systems have historically had a single, very common, and well-
14437 defined format.  All messages arrive in a single @dfn{spool file}, and
14438 they are delineated by a line whose regular expression matches
14439 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
14440 to make it clear in this instance that this is not the RFC-specified
14441 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
14442 historically from the Unix environment, it is simplest if one does not
14443 mess a great deal with the original mailbox format, so if one chooses
14444 this back end, Gnus' primary activity in getting mail from the real spool
14445 area to Gnus' preferred directory is simply to copy it, with no
14446 (appreciable) format change in the process.  It is the ``dumbest'' way
14447 to move mail into availability in the Gnus environment.  This makes it
14448 fast to move into place, but slow to parse, when Gnus has to look at
14449 what's where.
14450
14451 @item nnbabyl
14452
14453 Once upon a time, there was the DEC-10 and DEC-20, running operating
14454 systems called TOPS and related things, and the usual (only?) mail
14455 reading environment was a thing called Babyl.  I don't know what format
14456 was used for mail landing on the system, but Babyl had its own internal
14457 format to which mail was converted, primarily involving creating a
14458 spool-file-like entity with a scheme for inserting Babyl-specific
14459 headers and status bits above the top of each message in the file.
14460 RMAIL was Emacs' first mail reader, it was written by Richard Stallman,
14461 and Stallman came out of that TOPS/Babyl environment, so he wrote RMAIL
14462 to understand the mail files folks already had in existence.  Gnus (and
14463 VM, for that matter) continue to support this format because it's
14464 perceived as having some good qualities in those mailer-specific
14465 headers/status bits stuff.  RMAIL itself still exists as well, of
14466 course, and is still maintained by Stallman.
14467
14468 Both of the above forms leave your mail in a single file on your
14469 file system, and they must parse that entire file each time you take a
14470 look at your mail.
14471
14472 @item nnml
14473
14474 @code{nnml} is the back end which smells the most as though you were
14475 actually operating with an @code{nnspool}-accessed Usenet system.  (In
14476 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
14477 lo these years ago.)  One's mail is taken from the original spool file,
14478 and is then cut up into individual message files, 1:1.  It maintains a
14479 Usenet-style active file (analogous to what one finds in an INN- or
14480 CNews-based news system in (for instance) @file{/var/lib/news/active},
14481 or what is returned via the @samp{NNTP LIST} verb) and also creates
14482 @dfn{overview} files for efficient group entry, as has been defined for
14483 @sc{nntp} servers for some years now.  It is slower in mail-splitting,
14484 due to the creation of lots of files, updates to the @code{nnml} active
14485 file, and additions to overview files on a per-message basis, but it is
14486 extremely fast on access because of what amounts to the indexing support
14487 provided by the active file and overviews.
14488
14489 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
14490 resource which defines available places in the file system to put new
14491 files.  Sysadmins take a dim view of heavy inode occupation within
14492 tight, shared file systems.  But if you live on a personal machine where
14493 the file system is your own and space is not at a premium, @code{nnml}
14494 wins big.
14495
14496 It is also problematic using this back end if you are living in a
14497 FAT16-based Windows world, since much space will be wasted on all these
14498 tiny files.
14499
14500 @item nnmh
14501
14502 The Rand MH mail-reading system has been around UNIX systems for a very
14503 long time; it operates by splitting one's spool file of messages into
14504 individual files, but with little or no indexing support -- @code{nnmh}
14505 is considered to be semantically equivalent to ``@code{nnml} without
14506 active file or overviews''.  This is arguably the worst choice, because
14507 one gets the slowness of individual file creation married to the
14508 slowness of access parsing when learning what's new in one's groups.
14509
14510 @item nnfolder
14511
14512 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
14513 method described above) on a per-group basis.  That is, @code{nnmbox}
14514 itself puts *all* one's mail in one file; @code{nnfolder} provides a
14515 little bit of optimization to this so that each of one's mail groups has
14516 a Unix mail box file.  It's faster than @code{nnmbox} because each group
14517 can be parsed separately, and still provides the simple Unix mail box
14518 format requiring minimal effort in moving the mail around.  In addition,
14519 it maintains an ``active'' file making it much faster for Gnus to figure
14520 out how many messages there are in each separate group.
14521
14522 If you have groups that are expected to have a massive amount of
14523 messages, @code{nnfolder} is not the best choice, but if you receive
14524 only a moderate amount of mail, @code{nnfolder} is probably the most
14525 friendly mail back end all over.
14526
14527 @item nnmaildir
14528
14529 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
14530 differences.  Each message is stored in a separate file, but the
14531 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
14532 also stores the equivalent of @code{nnml}'s overview files in one file
14533 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
14534 @code{df -i} to see how plentiful your inode supply is.)  If this slows
14535 you down or takes up very much space, consider switching to ReiserFS
14536 (@uref{http://www.namesys.com/}) or another non-block-structured
14537 file system.
14538
14539 Since maildirs don't require locking for delivery, the maildirs you use
14540 as groups can also be the maildirs your mail is directly delivered to.
14541 This means you can skip Gnus's mail splitting if your mail is already
14542 organized into different mailboxes during delivery.  A @code{directory}
14543 entry in @code{mail-sources} would have a similar effect, but would
14544 require one set of mailboxes for spooling deliveries (in mbox format,
14545 thus damaging message bodies), and another set to be used as groups (in
14546 whatever format you like).  A maildir has a built-in spool, in the
14547 @code{new/} subdirectory.  Beware that currently, mail moved from
14548 @code{new/} to @code{cur/} instead of via mail splitting will undergo
14549 treatment such as duplicate checking.
14550
14551 An article will not necessarily keep the same number across Gnus
14552 sessions; articles are renumbered starting from 1 for each Gnus session
14553 (more precisely, each time you open the @code{nnmaildir} server).  This
14554 way, you don't get gaps in your article number ranges, and when entering
14555 large groups, Gnus is likely to give a more accurate article count.  The
14556 price is that @code{nnmaildir} doesn't work with the cache or agent.
14557 This will probably be changed in the future.
14558
14559 @code{nnmaildir} stores article marks for a given group in the
14560 corresponding maildir, in a way designed so that it's easy to manipulate
14561 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
14562 else, and still have your marks.  @code{nnml} also stores marks, but
14563 it's not as easy to work with them from outside Gnus as with
14564 @code{nnmaildir}.
14565
14566 For configuring expiry and other things, @code{nnmaildir} uses group
14567 parameters slightly different from those of other mail back ends.
14568
14569 @code{nnmaildir} uses a significant amount of memory to speed things up.
14570 (It keeps in memory some of the things that @code{nnml} stores in files
14571 and that @code{nnmh} repeatedly parses out of message files.)  If this
14572 is a problem for you, you can set the @code{nov-cache-size} group
14573 parameter to something small (0 would probably not work, but 1 probably
14574 would) to make it use less memory.
14575
14576 Startup and shutdown are likely to be slower with @code{nnmaildir} than
14577 with other back ends.  Everything in between is likely to be faster,
14578 depending in part on your file system.
14579
14580 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
14581 to write an @code{nnmaildir}-derived back end.
14582
14583 @end table
14584
14585
14586 @node Browsing the Web
14587 @section Browsing the Web
14588 @cindex web
14589 @cindex browsing the web
14590 @cindex www
14591 @cindex http
14592
14593 Web-based discussion forums are getting more and more popular.  On many
14594 subjects, the web-based forums have become the most important forums,
14595 eclipsing the importance of mailing lists and news groups.  The reason
14596 is easy to understand---they are friendly to new users; you just point
14597 and click, and there's the discussion.  With mailing lists, you have to
14598 go through a cumbersome subscription procedure, and most people don't
14599 even know what a news group is.
14600
14601 The problem with this scenario is that web browsers are not very good at
14602 being newsreaders.  They do not keep track of what articles you've read;
14603 they do not allow you to score on subjects you're interested in; they do
14604 not allow off-line browsing; they require you to click around and drive
14605 you mad in the end.
14606
14607 So---if web browsers suck at reading discussion forums, why not use Gnus
14608 to do it instead?
14609
14610 Gnus has been getting a bit of a collection of back ends for providing
14611 interfaces to these sources.
14612
14613 @menu
14614 * Archiving Mail::              
14615 * Web Searches::                Creating groups from articles that match a string.
14616 * Slashdot::                    Reading the Slashdot comments.
14617 * Ultimate::                    The Ultimate Bulletin Board systems.
14618 * Web Archive::                 Reading mailing list archived on web.
14619 * RSS::                         Reading RDF site summary.
14620 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
14621 @end menu
14622
14623 All the web sources require Emacs/w3 and the url library to work.
14624
14625 The main caveat with all these web sources is that they probably won't
14626 work for a very long time.  Gleaning information from the @sc{html} data
14627 is guesswork at best, and when the layout is altered, the Gnus back end
14628 will fail.  If you have reasonably new versions of these back ends,
14629 though, you should be ok.
14630
14631 One thing all these Web methods have in common is that the Web sources
14632 are often down, unavailable or just plain too slow to be fun.  In those
14633 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
14634 Unplugged}) handle downloading articles, and then you can read them at
14635 leisure from your local disk.  No more World Wide Wait for you.
14636
14637 @node Archiving Mail
14638 @subsection Archiving Mail
14639 @cindex archiving mail
14640 @cindex backup of mail
14641
14642 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
14643 @code{nnmaildir}, now actually store the article marks with each group.
14644 For these servers, archiving and restoring a group while preserving
14645 marks is fairly simple.
14646
14647 (Preserving the group level and group parameters as well still
14648 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
14649 though.)
14650
14651 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
14652 server, take a recursive copy of the server directory.  There is no need
14653 to shut down Gnus, so archiving may be invoked by @code{cron} or
14654 similar.  You restore the data by restoring the directory tree, and
14655 adding a server definition pointing to that directory in Gnus. The
14656 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
14657 might interfere with overwriting data, so you may want to shut down Gnus
14658 before you restore the data.
14659
14660 It is also possible to archive individual @code{nnml},
14661 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
14662 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
14663 directory.  For @code{nnfolder} you need to copy both the base folder
14664 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
14665 this example). Restoring the group is done with @kbd{G m} from the Group
14666 buffer.  The last step makes Gnus notice the new directory.
14667 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
14668 is unnecessary in that case.
14669
14670 @node Web Searches
14671 @subsection Web Searches
14672 @cindex nnweb
14673 @cindex Google
14674 @cindex dejanews
14675 @cindex gmane
14676 @cindex Usenet searches
14677 @cindex searching the Usenet
14678
14679 It's, like, too neat to search the Usenet for articles that match a
14680 string, but it, like, totally @emph{sucks}, like, totally, to use one of
14681 those, like, Web browsers, and you, like, have to, rilly, like, look at
14682 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
14683 searches without having to use a browser.
14684
14685 The @code{nnweb} back end allows an easy interface to the mighty search
14686 engine.  You create an @code{nnweb} group, enter a search pattern, and
14687 then enter the group and read the articles like you would any normal
14688 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
14689 Groups}) will do this in an easy-to-use fashion.
14690
14691 @code{nnweb} groups don't really lend themselves to being solid
14692 groups---they have a very fleeting idea of article numbers.  In fact,
14693 each time you enter an @code{nnweb} group (not even changing the search
14694 pattern), you are likely to get the articles ordered in a different
14695 manner.  Not even using duplicate suppression (@pxref{Duplicate
14696 Suppression}) will help, since @code{nnweb} doesn't even know the
14697 @code{Message-ID} of the articles before reading them using some search
14698 engines (Google, for instance).  The only possible way to keep track
14699 of which articles you've read is by scoring on the @code{Date}
14700 header---mark all articles posted before the last date you read the
14701 group as read.
14702
14703 If the search engine changes its output substantially, @code{nnweb}
14704 won't be able to parse it and will fail.  One could hardly fault the Web
14705 providers if they were to do this---their @emph{raison d'être} is to
14706 make money off of advertisements, not to provide services to the
14707 community.  Since @code{nnweb} washes the ads off all the articles, one
14708 might think that the providers might be somewhat miffed.  We'll see.
14709
14710 You must have the @code{url} and @code{w3} package installed to be able
14711 to use @code{nnweb}.
14712
14713 Virtual server variables:
14714
14715 @table @code
14716 @item nnweb-type
14717 @vindex nnweb-type
14718 What search engine type is being used.  The currently supported types
14719 are @code{google}, @code{dejanews}, and @code{gmane}. Note that
14720 @code{dejanews} is an alias to @code{google}.
14721
14722 @item nnweb-search
14723 @vindex nnweb-search
14724 The search string to feed to the search engine.
14725
14726 @item nnweb-max-hits
14727 @vindex nnweb-max-hits
14728 Advisory maximum number of hits per search to display.  The default is
14729 999.
14730
14731 @item nnweb-type-definition
14732 @vindex nnweb-type-definition
14733 Type-to-definition alist.  This alist says what @code{nnweb} should do
14734 with the various search engine types.  The following elements must be
14735 present:
14736
14737 @table @code
14738 @item article
14739 Function to decode the article and provide something that Gnus
14740 understands.
14741
14742 @item map
14743 Function to create an article number to message header and URL alist.
14744
14745 @item search
14746 Function to send the search string to the search engine.
14747
14748 @item address
14749 The address the aforementioned function should send the search string
14750 to.
14751
14752 @item id
14753 Format string URL to fetch an article by @code{Message-ID}.
14754 @end table
14755
14756 @end table
14757
14758
14759 @node Slashdot
14760 @subsection Slashdot
14761 @cindex Slashdot
14762 @cindex nnslashdot
14763
14764 Slashdot (@uref{http://slashdot.org/}) is a popular news site, with
14765 lively discussion following the news articles.  @code{nnslashdot} will
14766 let you read this forum in a convenient manner.
14767
14768 The easiest way to read this source is to put something like the
14769 following in your @file{.gnus.el} file:
14770
14771 @lisp
14772 (setq gnus-secondary-select-methods
14773       '((nnslashdot "")))
14774 @end lisp
14775
14776 This will make Gnus query the @code{nnslashdot} back end for new comments
14777 and groups.  The @kbd{F} command will subscribe each new news article as
14778 a new Gnus group, and you can read the comments by entering these
14779 groups.  (Note that the default subscription method is to subscribe new
14780 groups as zombies.  Other methods are available (@pxref{Subscription
14781 Methods}).
14782
14783 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
14784 command is the most handy tool (@pxref{Foreign Groups}).
14785
14786 When following up to @code{nnslashdot} comments (or posting new
14787 comments), some light @sc{html}izations will be performed.  In
14788 particular, text quoted with @samp{> } will be quoted with
14789 @code{blockquote} instead, and signatures will have @code{br} added to
14790 the end of each line.  Other than that, you can just write @sc{html}
14791 directly into the message buffer.  Note that Slashdot filters out some
14792 @sc{html} forms.
14793
14794 The following variables can be altered to change its behavior:
14795
14796 @table @code
14797 @item nnslashdot-threaded
14798 Whether @code{nnslashdot} should display threaded groups or not.  The
14799 default is @code{t}.  To be able to display threads, @code{nnslashdot}
14800 has to retrieve absolutely all comments in a group upon entry.  If a
14801 threaded display is not required, @code{nnslashdot} will only retrieve
14802 the comments that are actually wanted by the user.  Threading is nicer,
14803 but much, much slower than unthreaded.
14804
14805 @item nnslashdot-login-name
14806 @vindex nnslashdot-login-name
14807 The login name to use when posting.
14808
14809 @item nnslashdot-password
14810 @vindex nnslashdot-password
14811 The password to use when posting.
14812
14813 @item nnslashdot-directory
14814 @vindex nnslashdot-directory
14815 Where @code{nnslashdot} will store its files.  The default is
14816 @samp{~/News/slashdot/}.
14817
14818 @item nnslashdot-active-url
14819 @vindex nnslashdot-active-url
14820 The @sc{url} format string that will be used to fetch the information on
14821 news articles and comments.  The default is
14822 @samp{http://slashdot.org/search.pl?section=&min=%d}.
14823
14824 @item nnslashdot-comments-url
14825 @vindex nnslashdot-comments-url
14826 The @sc{url} format string that will be used to fetch comments.  The
14827 default is
14828 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
14829
14830 @item nnslashdot-article-url
14831 @vindex nnslashdot-article-url
14832 The @sc{url} format string that will be used to fetch the news article.  The
14833 default is
14834 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
14835
14836 @item nnslashdot-threshold
14837 @vindex nnslashdot-threshold
14838 The score threshold.  The default is -1.
14839
14840 @item nnslashdot-group-number
14841 @vindex nnslashdot-group-number
14842 The number of old groups, in addition to the ten latest, to keep
14843 updated.  The default is 0.
14844
14845 @end table
14846
14847
14848
14849 @node Ultimate
14850 @subsection Ultimate
14851 @cindex nnultimate
14852 @cindex Ultimate Bulletin Board
14853
14854 The Ultimate Bulletin Board (@uref{http://www.ultimatebb.com/}) is
14855 probably the most popular Web bulletin board system used.  It has a
14856 quite regular and nice interface, and it's possible to get the
14857 information Gnus needs to keep groups updated.
14858
14859 The easiest way to get started with @code{nnultimate} is to say
14860 something like the following in the group buffer:  @kbd{B nnultimate RET
14861 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
14862 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
14863 you're interested in; there's quite a list of them on the Ultimate web
14864 site.)  Then subscribe to the groups you're interested in from the
14865 server buffer, and read them from the group buffer.
14866
14867 The following @code{nnultimate} variables can be altered:
14868
14869 @table @code
14870 @item nnultimate-directory
14871 @vindex nnultimate-directory
14872 The directory where @code{nnultimate} stores its files.  The default is
14873 @samp{~/News/ultimate/}.
14874 @end table
14875
14876
14877 @node Web Archive
14878 @subsection Web Archive
14879 @cindex nnwarchive
14880 @cindex Web Archive
14881
14882 Some mailing lists only have archives on Web servers, such as
14883 @uref{http://www.egroups.com/} and
14884 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
14885 interface, and it's possible to get the information Gnus needs to keep
14886 groups updated.
14887
14888 The easiest way to get started with @code{nnwarchive} is to say
14889 something like the following in the group buffer: @kbd{M-x
14890 gnus-group-make-warchive-group RET an_egroup RET egroups RET
14891 www.egroups.com RET your@@email.address RET}.  (Substitute the
14892 @sc{an_egroup} with the mailing list you subscribed, the
14893 @sc{your@@email.address} with your email address.), or to browse the
14894 back end by @kbd{B nnwarchive RET mail-archive RET}.
14895
14896 The following @code{nnwarchive} variables can be altered:
14897
14898 @table @code
14899 @item nnwarchive-directory
14900 @vindex nnwarchive-directory
14901 The directory where @code{nnwarchive} stores its files.  The default is
14902 @samp{~/News/warchive/}.
14903
14904 @item nnwarchive-login
14905 @vindex nnwarchive-login
14906 The account name on the web server.
14907
14908 @item nnwarchive-passwd
14909 @vindex nnwarchive-passwd
14910 The password for your account on the web server.
14911 @end table
14912
14913 @node RSS
14914 @subsection RSS
14915 @cindex nnrss
14916 @cindex RSS
14917
14918 Some sites have RDF site summary (RSS)
14919 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
14920 interface, and it's possible to get the information Gnus needs to keep
14921 groups updated.
14922
14923 The easiest way to get started with @code{nnrss} is to say something
14924 like the following in the group buffer: @kbd{B nnrss RET RET}, then
14925 subscribe groups.
14926
14927 The following @code{nnrss} variables can be altered:
14928
14929 @table @code
14930 @item nnrss-directory
14931 @vindex nnrss-directory
14932 The directory where @code{nnrss} stores its files.  The default is
14933 @samp{~/News/rss/}.
14934
14935 @end table
14936
14937 The following code may be helpful, if you want to show the description in
14938 the summary buffer.
14939
14940 @lisp
14941 (add-to-list 'nnmail-extra-headers nnrss-description-field)
14942 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
14943
14944 (defun gnus-user-format-function-X (header)
14945   (let ((descr
14946          (assq nnrss-description-field (mail-header-extra header))))
14947     (if descr (concat "\n\t" (cdr descr)) "")))
14948 @end lisp
14949
14950 The following code may be useful to open an nnrss url directly from the
14951 summary buffer.
14952 @lisp
14953 (require 'browse-url)
14954
14955 (defun browse-nnrss-url( arg )
14956   (interactive "p")
14957   (let ((url (assq nnrss-url-field
14958                    (mail-header-extra
14959                     (gnus-data-header
14960                      (assq (gnus-summary-article-number)
14961                            gnus-newsgroup-data))))))
14962     (if url
14963         (progn
14964           (browse-url (cdr url))
14965           (gnus-summary-mark-as-read-forward 1))
14966       (gnus-summary-scroll-up arg))))
14967
14968 (eval-after-load "gnus"
14969   #'(define-key gnus-summary-mode-map
14970       (kbd "<RET>") 'browse-nnrss-url))
14971 (add-to-list 'nnmail-extra-headers nnrss-url-field)
14972 @end lisp
14973
14974 @node Customizing w3
14975 @subsection Customizing w3
14976 @cindex w3
14977 @cindex html
14978 @cindex url
14979 @cindex Netscape
14980
14981 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
14982 pages.  Emacs/w3 is documented in its own manual, but there are some
14983 things that may be more relevant for Gnus users.
14984
14985 For instance, a common question is how to make Emacs/w3 follow links
14986 using the @code{browse-url} functions (which will call some external web
14987 browser like Netscape).  Here's one way:
14988
14989 @lisp
14990 (eval-after-load "w3"
14991   '(progn
14992     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
14993     (defun w3-fetch (&optional url target)
14994       (interactive (list (w3-read-url-with-default)))
14995       (if (eq major-mode 'gnus-article-mode)
14996           (browse-url url)
14997         (w3-fetch-orig url target)))))
14998 @end lisp
14999
15000 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15001 @sc{html} in the Gnus article buffers will use @code{browse-url} to
15002 follow the link.
15003
15004
15005 @node IMAP
15006 @section IMAP
15007 @cindex nnimap
15008 @cindex @sc{imap}
15009
15010 @sc{imap} is a network protocol for reading mail (or news, or ...),
15011 think of it as a modernized @sc{nntp}.  Connecting to a @sc{imap}
15012 server is much similar to connecting to a news server, you just
15013 specify the network address of the server.
15014
15015 @sc{imap} has two properties.  First, @sc{imap} can do everything that
15016 POP can, it can hence be viewed as a POP++.  Secondly, @sc{imap} is a
15017 mail storage protocol, similar to @sc{nntp} being a news storage
15018 protocol -- however, @sc{imap} offers more features than @sc{nntp}
15019 because news is more or less read-only whereas mail is read-write.
15020
15021 If you want to use @sc{imap} as a POP++, use an imap entry in
15022 @code{mail-sources}.  With this, Gnus will fetch mails from the
15023 @sc{imap} server and store them on the local disk.  This is not the
15024 usage described in this section--@xref{Mail Sources}.
15025
15026 If you want to use @sc{imap} as a mail storage protocol, use an nnimap
15027 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15028 manipulate mails stored on the @sc{imap} server.  This is the kind of
15029 usage explained in this section.
15030
15031 A server configuration in @code{~/.gnus} with a few @sc{imap} servers
15032 might look something like the following. (Note that for SSL/TLS, you
15033 need external programs and libraries, see below.)
15034
15035 @lisp
15036 (setq gnus-secondary-select-methods
15037       '((nnimap "simpleserver") ; no special configuration
15038         ; perhaps a ssh port forwarded server:
15039         (nnimap "dolk"
15040                 (nnimap-address "localhost")
15041                 (nnimap-server-port 1430))
15042         ; a UW server running on localhost
15043         (nnimap "barbar"
15044                 (nnimap-server-port 143)
15045                 (nnimap-address "localhost")
15046                 (nnimap-list-pattern ("INBOX" "mail/*")))
15047         ; anonymous public cyrus server:
15048         (nnimap "cyrus.andrew.cmu.edu"
15049                 (nnimap-authenticator anonymous)
15050                 (nnimap-list-pattern "archive.*")
15051                 (nnimap-stream network))
15052         ; a ssl server on a non-standard port:
15053         (nnimap "vic20"
15054                 (nnimap-address "vic20.somewhere.com")
15055                 (nnimap-server-port 9930)
15056                 (nnimap-stream ssl))))
15057 @end lisp
15058
15059 The following variables can be used to create a virtual @code{nnimap}
15060 server:
15061
15062 @table @code
15063
15064 @item nnimap-address
15065 @vindex nnimap-address
15066
15067 The address of the remote @sc{imap} server.  Defaults to the virtual
15068 server name if not specified.
15069
15070 @item nnimap-server-port
15071 @vindex nnimap-server-port
15072 Port on server to contact.  Defaults to port 143, or 993 for SSL.
15073
15074 Note that this should be an integer, example server specification:
15075
15076 @lisp
15077 (nnimap "mail.server.com"
15078         (nnimap-server-port 4711))
15079 @end lisp
15080
15081 @item nnimap-list-pattern
15082 @vindex nnimap-list-pattern
15083 String or list of strings of mailboxes to limit available groups to.
15084 This is used when the server has very many mailboxes and you're only
15085 interested in a few -- some servers export your home directory via
15086 @sc{imap}, you'll probably want to limit the mailboxes to those in
15087 @file{~/Mail/*} then.
15088
15089 The string can also be a cons of REFERENCE and the string as above, what
15090 REFERENCE is used for is server specific, but on the University of
15091 Washington server it's a directory that will be concatenated with the
15092 mailbox.
15093
15094 Example server specification:
15095
15096 @lisp
15097 (nnimap "mail.server.com"
15098         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15099                                ("~friend/Mail/" . "list/*"))))
15100 @end lisp
15101
15102 @item nnimap-stream
15103 @vindex nnimap-stream
15104 The type of stream used to connect to your server.  By default, nnimap
15105 will detect and automatically use all of the below, with the exception
15106 of SSL/TLS. (@sc{imap} over SSL/TLS is being replaced by STARTTLS, which
15107 can be automatically detected, but it's not widely deployed yet.)
15108
15109 Example server specification:
15110
15111 @lisp
15112 (nnimap "mail.server.com"
15113         (nnimap-stream ssl))
15114 @end lisp
15115
15116 Please note that the value of @code{nnimap-stream} is a symbol!
15117
15118 @itemize @bullet
15119 @item
15120 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5). Requires the
15121 @samp{imtest} program.
15122 @item
15123 @dfn{kerberos4:} Connect with Kerberos 4. Requires the @samp{imtest} program.
15124 @item
15125 @dfn{starttls:} Connect via the STARTTLS extension (similar to
15126 SSL).  Requires the external library @samp{starttls.el} and program
15127 @samp{starttls}.
15128 @item
15129 @dfn{ssl:} Connect through SSL.  Requires OpenSSL (the program
15130 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
15131 library @samp{ssl.el}.
15132 @item
15133 @dfn{shell:} Use a shell command to start @sc{imap} connection.
15134 @item
15135 @dfn{network:} Plain, TCP/IP network connection.
15136 @end itemize
15137
15138 @vindex imap-kerberos4-program
15139 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
15140 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
15141 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
15142 to make @code{imap.el} use a pty instead of a pipe when communicating
15143 with @samp{imtest}.  You will then suffer from a line length
15144 restrictions on @sc{imap} commands, which might make Gnus seem to hang
15145 indefinitely if you have many articles in a mailbox.  The variable
15146 @code{imap-kerberos4-program} contain parameters to pass to the imtest
15147 program.
15148
15149 @vindex imap-ssl-program
15150 For SSL connections, the OpenSSL program is available from
15151 @uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay,
15152 and nnimap support it too - although the most recent versions of
15153 SSLeay, 0.9.x, are known to have serious bugs making it
15154 useless. Earlier versions, especially 0.8.x, of SSLeay are known to
15155 work. The variable @code{imap-ssl-program} contain parameters to pass
15156 to OpenSSL/SSLeay.  You also need @samp{ssl.el} (from the W3
15157 distribution, for instance).
15158
15159 @vindex imap-shell-program
15160 @vindex imap-shell-host
15161 For @sc{imap} connections using the @code{shell} stream, the variable
15162 @code{imap-shell-program} specify what program to call.
15163
15164 @item nnimap-authenticator
15165 @vindex nnimap-authenticator
15166
15167 The authenticator used to connect to the server.  By default, nnimap
15168 will use the most secure authenticator your server is capable of.
15169
15170 Example server specification:
15171
15172 @lisp
15173 (nnimap "mail.server.com"
15174         (nnimap-authenticator anonymous))
15175 @end lisp
15176
15177 Please note that the value of @code{nnimap-authenticator} is a symbol!
15178
15179 @itemize @bullet
15180 @item
15181 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication. Requires
15182 external program @code{imtest}.
15183 @item
15184 @dfn{kerberos4:} Kerberos 4 authentication. Requires external program
15185 @code{imtest}.
15186 @item
15187 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5. Requires
15188 external library @code{digest-md5.el}.
15189 @item
15190 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
15191 @item
15192 @dfn{login:} Plain-text username/password via LOGIN.
15193 @item
15194 @dfn{anonymous:} Login as `anonymous', supplying your email address as password.
15195 @end itemize
15196
15197 @item nnimap-expunge-on-close
15198 @cindex Expunging
15199 @vindex nnimap-expunge-on-close
15200 Unlike Parmenides the @sc{imap} designers has decided that things that
15201 doesn't exist actually does exist.  More specifically, @sc{imap} has
15202 this concept of marking articles @code{Deleted} which doesn't actually
15203 delete them, and this (marking them @code{Deleted}, that is) is what
15204 nnimap does when you delete a article in Gnus (with @kbd{B DEL} or
15205 similar).
15206
15207 Since the articles aren't really removed when we mark them with the
15208 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
15209 running in circles yet?
15210
15211 Traditionally, nnimap has removed all articles marked as @code{Deleted}
15212 when closing a mailbox but this is now configurable by this server
15213 variable.
15214
15215 The possible options are:
15216
15217 @table @code
15218
15219 @item always
15220 The default behavior, delete all articles marked as "Deleted" when
15221 closing a mailbox.
15222 @item never
15223 Never actually delete articles.  Currently there is no way of showing
15224 the articles marked for deletion in nnimap, but other @sc{imap} clients
15225 may allow you to do this.  If you ever want to run the EXPUNGE command
15226 manually, @xref{Expunging mailboxes}.
15227 @item ask
15228 When closing mailboxes, nnimap will ask if you wish to expunge deleted
15229 articles or not.
15230
15231 @end table
15232
15233 @item nnimap-importantize-dormant
15234 @vindex nnimap-importantize-dormant
15235
15236 If non-nil (the default), marks dormant articles as ticked (as well),
15237 for other @sc{imap} clients. Within Gnus, dormant articles will
15238 naturally still (only) be marked as dormant.  This is to make dormant
15239 articles stand out, just like ticked articles, in other @sc{imap}
15240 clients. (In other words, Gnus has two ``Tick'' marks and @sc{imap}
15241 has only one.)
15242
15243 Probably the only reason for frobing this would be if you're trying
15244 enable per-user persistant dormant flags, using something like:
15245
15246 @lisp
15247 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
15248         (format "gnus-dormant-%s" (user-login-name)))
15249 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
15250         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
15251 @end lisp
15252
15253 In this case, you would not want the per-user dormant flag showing up
15254 as ticked for other users.
15255
15256 @item nnimap-expunge-search-string
15257 @cindex Expunging
15258 @vindex nnimap-expunge-search-string
15259
15260 This variable contain the @sc{imap} search command sent to server when
15261 searching for articles eligible for expiring.  The default is
15262 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
15263 UID set and the second @code{%s} is replaced by a date.
15264
15265 Probably the only useful value to change this to is
15266 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
15267 messages instead of the internal article date. See section 6.4.4 of
15268 RFC 2060 for more information on valid strings.
15269
15270 @item nnimap-authinfo-file
15271 @vindex nnimap-authinfo-file
15272
15273 A file containing credentials used to log in on servers.  The format is
15274 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
15275 variable @code{nntp-authinfo-file} for exact syntax; also see
15276 @ref{NNTP}.
15277
15278 @end table
15279
15280 @menu
15281 * Splitting in IMAP::           Splitting mail with nnimap.
15282 * Expiring in IMAP::            Expiring mail with nnimap.
15283 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
15284 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
15285 * A note on namespaces::        How to (not) use IMAP namespace in Gnus.
15286 @end menu
15287
15288
15289
15290 @node Splitting in IMAP
15291 @subsection Splitting in IMAP
15292 @cindex splitting imap mail
15293
15294 Splitting is something Gnus users has loved and used for years, and now
15295 the rest of the world is catching up.  Yeah, dream on, not many
15296 @sc{imap} server has server side splitting and those that have splitting
15297 seem to use some non-standard protocol.  This means that @sc{imap}
15298 support for Gnus has to do it's own splitting.
15299
15300 And it does.
15301
15302 Here are the variables of interest:
15303
15304 @table @code
15305
15306 @item nnimap-split-crosspost
15307 @cindex splitting, crosspost
15308 @cindex crosspost
15309 @vindex nnimap-split-crosspost
15310
15311 If non-nil, do crossposting if several split methods match the mail.  If
15312 nil, the first match in @code{nnimap-split-rule} found will be used.
15313
15314 Nnmail equivalent: @code{nnmail-crosspost}.
15315
15316 @item nnimap-split-inbox
15317 @cindex splitting, inbox
15318 @cindex inbox
15319 @vindex nnimap-split-inbox
15320
15321 A string or a list of strings that gives the name(s) of @sc{imap}
15322 mailboxes to split from.  Defaults to nil, which means that splitting is
15323 disabled!
15324
15325 @lisp
15326 (setq nnimap-split-inbox
15327       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
15328 @end lisp
15329
15330 No nnmail equivalent.
15331
15332 @item nnimap-split-rule
15333 @cindex Splitting, rules
15334 @vindex nnimap-split-rule
15335
15336 New mail found in @code{nnimap-split-inbox} will be split according to
15337 this variable.
15338
15339 This variable contains a list of lists, where the first element in the
15340 sublist gives the name of the @sc{imap} mailbox to move articles
15341 matching the regexp in the second element in the sublist.  Got that?
15342 Neither did I, we need examples.
15343
15344 @lisp
15345 (setq nnimap-split-rule
15346       '(("INBOX.nnimap"
15347          "^Sender: owner-nnimap@@vic20.globalcom.se")
15348         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
15349         ("INBOX.private" "")))
15350 @end lisp
15351
15352 This will put all articles from the nnimap mailing list into mailbox
15353 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
15354 into INBOX.junk and everything else in INBOX.private.
15355
15356 The first string may contain `\\1' forms, like the ones used by
15357 replace-match to insert sub-expressions from the matched text.  For
15358 instance:
15359
15360 @lisp
15361 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
15362 @end lisp
15363
15364 The first element can also be the symbol @code{junk} to indicate that
15365 matching messages should simply be deleted.  Use with care.
15366
15367 The second element can also be a function.  In that case, it will be
15368 called with the first element of the rule as the argument, in a buffer
15369 containing the headers of the article.  It should return a non-nil value
15370 if it thinks that the mail belongs in that group.
15371
15372 Nnmail users might recollect that the last regexp had to be empty to
15373 match all articles (like in the example above).  This is not required in
15374 nnimap.  Articles not matching any of the regexps will not be moved out
15375 of your inbox.  (This might affect performance if you keep lots of
15376 unread articles in your inbox, since the splitting code would go over
15377 them every time you fetch new mail.)
15378
15379 These rules are processed from the beginning of the alist toward the
15380 end.  The first rule to make a match will "win", unless you have
15381 crossposting enabled.  In that case, all matching rules will "win".
15382
15383 This variable can also have a function as its value, the function will
15384 be called with the headers narrowed and should return a group where it
15385 thinks the article should be split to.  See @code{nnimap-split-fancy}.
15386
15387 The splitting code tries to create mailboxes if it needs to.
15388
15389 To allow for different split rules on different virtual servers, and
15390 even different split rules in different inboxes on the same server,
15391 the syntax of this variable have been extended along the lines of:
15392
15393 @lisp
15394 (setq nnimap-split-rule
15395       '(("my1server"    (".*"    (("ding"    "ding@@gnus.org")
15396                                   ("junk"    "From:.*Simon")))
15397         ("my2server"    ("INBOX" nnimap-split-fancy))
15398         ("my[34]server" (".*"    (("private" "To:.*Simon")
15399                                   ("junk"    my-junk-func)))))
15400 @end lisp
15401
15402 The virtual server name is in fact a regexp, so that the same rules
15403 may apply to several servers.  In the example, the servers
15404 @code{my3server} and @code{my4server} both use the same rules.
15405 Similarly, the inbox string is also a regexp.  The actual splitting
15406 rules are as before, either a function, or a list with group/regexp or
15407 group/function elements.
15408
15409 Nnmail equivalent: @code{nnmail-split-methods}.
15410
15411 @item nnimap-split-predicate
15412 @cindex splitting
15413 @vindex nnimap-split-predicate
15414
15415 Mail matching this predicate in @code{nnimap-split-inbox} will be
15416 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
15417
15418 This might be useful if you use another @sc{imap} client to read mail in
15419 your inbox but would like Gnus to split all articles in the inbox
15420 regardless of readedness. Then you might change this to
15421 @samp{UNDELETED}.
15422
15423 @item nnimap-split-fancy
15424 @cindex splitting, fancy
15425 @findex nnimap-split-fancy
15426 @vindex nnimap-split-fancy
15427
15428 It's possible to set @code{nnimap-split-rule} to
15429 @code{nnmail-split-fancy} if you want to use fancy
15430 splitting. @xref{Fancy Mail Splitting}.
15431
15432 However, to be able to have different fancy split rules for nnmail and
15433 nnimap back ends you can set @code{nnimap-split-rule} to
15434 @code{nnimap-split-fancy} and define the nnimap specific fancy split
15435 rule in @code{nnimap-split-fancy}.
15436
15437 Example:
15438
15439 @lisp
15440 (setq nnimap-split-rule 'nnimap-split-fancy
15441       nnimap-split-fancy ...)
15442 @end lisp
15443
15444 Nnmail equivalent: @code{nnmail-split-fancy}.
15445
15446 @end table
15447
15448 @node Expiring in IMAP
15449 @subsection Expiring in IMAP
15450 @cindex expiring imap mail
15451
15452 Even though @sc{nnimap} is not a proper @sc{nnmail} derived back end,
15453 it supports most features in regular expiring (@pxref{Expiring Mail}).
15454 Unlike splitting in IMAP (@pxref{Splitting in IMAP}) it do not clone
15455 the @sc{nnmail} variables (i.e., creating @var{nnimap-expiry-wait})
15456 but reuse the @sc{nnmail} variables.  What follows below are the
15457 variables used by the @sc{nnimap} expiry process.
15458
15459 A note on how the expire mark is stored on the @sc{imap} server is
15460 appropriate here as well.  The expire mark is translated into a
15461 @sc{imap} client specific mark, @code{gnus-expire}, and stored on the
15462 message.  This means that likely only Gnus will understand and treat
15463 the @code{gnus-expire} mark properly, although other clients may allow
15464 you to view client specific flags on the message.  It also means that
15465 your server must support permanent storage of client specific flags on
15466 messages.  Most do, fortunately.
15467
15468 @table @code
15469
15470 @item nnmail-expiry-wait
15471 @item nnmail-expiry-wait-function
15472
15473 These variables are fully supported.  The expire value can be a
15474 number, the symbol @var{immediate} or @var{never}.
15475
15476 @item nnmail-expiry-target
15477
15478 This variable is supported, and internally implemented by calling the
15479 @sc{nnmail} functions that handle this.  It contains an optimization
15480 that if the destination is a IMAP group on the same server, the
15481 article is copied instead of appended (that is, uploaded again).
15482
15483 @end table
15484
15485 @node Editing IMAP ACLs
15486 @subsection Editing IMAP ACLs
15487 @cindex editing imap acls
15488 @cindex Access Control Lists
15489 @cindex Editing @sc{imap} ACLs
15490 @kindex G l
15491 @findex gnus-group-nnimap-edit-acl
15492
15493 ACL stands for Access Control List.  ACLs are used in @sc{imap} for
15494 limiting (or enabling) other users access to your mail boxes.  Not all
15495 @sc{imap} servers support this, this function will give an error if it
15496 doesn't.
15497
15498 To edit a ACL for a mailbox, type @kbd{G l}
15499 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with a ACL
15500 editing window with detailed instructions.
15501
15502 Some possible uses:
15503
15504 @itemize @bullet
15505 @item
15506 Giving "anyone" the "lrs" rights (lookup, read, keep seen/unseen flags)
15507 on your mailing list mailboxes enables other users on the same server to
15508 follow the list without subscribing to it.
15509 @item
15510 At least with the Cyrus server, you are required to give the user
15511 "anyone" posting ("p") capabilities to have "plussing" work (that is,
15512 mail sent to user+mailbox@@domain ending up in the @sc{imap} mailbox
15513 INBOX.mailbox).
15514 @end itemize
15515
15516 @node Expunging mailboxes
15517 @subsection Expunging mailboxes
15518 @cindex expunging
15519
15520 @cindex Expunge
15521 @cindex Manual expunging
15522 @kindex G x
15523 @findex gnus-group-nnimap-expunge
15524
15525 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
15526 you may want the option of expunging all deleted articles in a mailbox
15527 manually.  This is exactly what @kbd{G x} does.
15528
15529 Currently there is no way of showing deleted articles, you can just
15530 delete them.
15531
15532 @node A note on namespaces
15533 @subsection A note on namespaces
15534 @cindex IMAP namespace
15535 @cindex namespaces
15536
15537 The IMAP protocol has a concept called namespaces, described by the
15538 following text in the RFC:
15539
15540 @example
15541 5.1.2.  Mailbox Namespace Naming Convention
15542
15543    By convention, the first hierarchical element of any mailbox name
15544    which begins with "#" identifies the "namespace" of the remainder of
15545    the name.  This makes it possible to disambiguate between different
15546    types of mailbox stores, each of which have their own namespaces.
15547
15548       For example, implementations which offer access to USENET
15549       newsgroups MAY use the "#news" namespace to partition the USENET
15550       newsgroup namespace from that of other mailboxes.  Thus, the
15551       comp.mail.misc newsgroup would have an mailbox name of
15552       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
15553       to a different object (e.g. a user's private mailbox).
15554 @end example
15555
15556 While there is nothing in this text that warrants concern for the IMAP
15557 implementation in Gnus, some servers use namespace prefixes in a way
15558 that does not work with how Gnus uses mailbox names.
15559
15560 Specifically, University of Washington's IMAP server uses mailbox
15561 names like @code{#driver.mbx/read-mail} which are valid only in the
15562 @sc{create} and @sc{append} commands.  After the mailbox is created
15563 (or a messages is appended to a mailbox), it must be accessed without
15564 the namespace prefix, i.e @code{read-mail}.  Since Gnus do not make it
15565 possible for the user to guarantee that user entered mailbox names
15566 will only be used with the CREATE and APPEND commands, you should
15567 simply not use the namespace prefixed mailbox names in Gnus.
15568
15569 See the UoW @sc{imapd} documentation for the @code{#driver.*/} prefix
15570 for more information on how to use the prefixes.  They are a power
15571 tool and should be used only if you are sure what the effects are.
15572
15573 @node Other Sources
15574 @section Other Sources
15575
15576 Gnus can do more than just read news or mail.  The methods described
15577 below allow Gnus to view directories and files as if they were
15578 newsgroups.
15579
15580 @menu
15581 * Directory Groups::            You can read a directory as if it was a newsgroup.
15582 * Anything Groups::             Dired?  Who needs dired?
15583 * Document Groups::             Single files can be the basis of a group.
15584 * SOUP::                        Reading @sc{soup} packets ``offline''.
15585 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
15586 @end menu
15587
15588
15589 @node Directory Groups
15590 @subsection Directory Groups
15591 @cindex nndir
15592 @cindex directory groups
15593
15594 If you have a directory that has lots of articles in separate files in
15595 it, you might treat it as a newsgroup.  The files have to have numerical
15596 names, of course.
15597
15598 This might be an opportune moment to mention @code{ange-ftp} (and its
15599 successor @code{efs}), that most wonderful of all wonderful Emacs
15600 packages.  When I wrote @code{nndir}, I didn't think much about it---a
15601 back end to read directories.  Big deal.
15602
15603 @code{ange-ftp} changes that picture dramatically.  For instance, if you
15604 enter the @code{ange-ftp} file name
15605 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
15606 @code{ange-ftp} or @code{efs} will actually allow you to read this
15607 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
15608
15609 @code{nndir} will use @sc{nov} files if they are present.
15610
15611 @code{nndir} is a ``read-only'' back end---you can't delete or expire
15612 articles with this method.  You can use @code{nnmh} or @code{nnml} for
15613 whatever you use @code{nndir} for, so you could switch to any of those
15614 methods if you feel the need to have a non-read-only @code{nndir}.
15615
15616
15617 @node Anything Groups
15618 @subsection Anything Groups
15619 @cindex nneething
15620
15621 From the @code{nndir} back end (which reads a single spool-like
15622 directory), it's just a hop and a skip to @code{nneething}, which
15623 pretends that any arbitrary directory is a newsgroup.  Strange, but
15624 true.
15625
15626 When @code{nneething} is presented with a directory, it will scan this
15627 directory and assign article numbers to each file.  When you enter such
15628 a group, @code{nneething} must create ``headers'' that Gnus can use.
15629 After all, Gnus is a newsreader, in case you're forgetting.
15630 @code{nneething} does this in a two-step process.  First, it snoops each
15631 file in question.  If the file looks like an article (i.e., the first
15632 few lines look like headers), it will use this as the head.  If this is
15633 just some arbitrary file without a head (e.g. a C source file),
15634 @code{nneething} will cobble up a header out of thin air.  It will use
15635 file ownership, name and date and do whatever it can with these
15636 elements.
15637
15638 All this should happen automatically for you, and you will be presented
15639 with something that looks very much like a newsgroup.  Totally like a
15640 newsgroup, to be precise.  If you select an article, it will be displayed
15641 in the article buffer, just as usual.
15642
15643 If you select a line that represents a directory, Gnus will pop you into
15644 a new summary buffer for this @code{nneething} group.  And so on.  You can
15645 traverse the entire disk this way, if you feel like, but remember that
15646 Gnus is not dired, really, and does not intend to be, either.
15647
15648 There are two overall modes to this action---ephemeral or solid.  When
15649 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
15650 will not store information on what files you have read, and what files
15651 are new, and so on.  If you create a solid @code{nneething} group the
15652 normal way with @kbd{G m}, Gnus will store a mapping table between
15653 article numbers and file names, and you can treat this group like any
15654 other groups.  When you activate a solid @code{nneething} group, you will
15655 be told how many unread articles it contains, etc., etc.
15656
15657 Some variables:
15658
15659 @table @code
15660 @item nneething-map-file-directory
15661 @vindex nneething-map-file-directory
15662 All the mapping files for solid @code{nneething} groups will be stored
15663 in this directory, which defaults to @file{~/.nneething/}.
15664
15665 @item nneething-exclude-files
15666 @vindex nneething-exclude-files
15667 All files that match this regexp will be ignored.  Nice to use to exclude
15668 auto-save files and the like, which is what it does by default.
15669
15670 @item nneething-include-files
15671 @vindex nneething-include-files
15672 Regexp saying what files to include in the group.  If this variable is
15673 non-@code{nil}, only files matching this regexp will be included.
15674
15675 @item nneething-map-file
15676 @vindex nneething-map-file
15677 Name of the map files.
15678 @end table
15679
15680
15681 @node Document Groups
15682 @subsection Document Groups
15683 @cindex nndoc
15684 @cindex documentation group
15685 @cindex help group
15686
15687 @code{nndoc} is a cute little thing that will let you read a single file
15688 as a newsgroup.  Several files types are supported:
15689
15690 @table @code
15691 @cindex babyl
15692 @cindex rmail mbox
15693
15694 @item babyl
15695 The babyl (rmail) mail box.
15696 @cindex mbox
15697 @cindex Unix mbox
15698
15699 @item mbox
15700 The standard Unix mbox file.
15701
15702 @cindex MMDF mail box
15703 @item mmdf
15704 The MMDF mail box format.
15705
15706 @item news
15707 Several news articles appended into a file.
15708
15709 @item rnews
15710 @cindex rnews batch files
15711 The rnews batch transport format.
15712 @cindex forwarded messages
15713
15714 @item forward
15715 Forwarded articles.
15716
15717 @item nsmail
15718 Netscape mail boxes.
15719
15720 @item mime-parts
15721 @sc{mime} multipart messages.
15722
15723 @item standard-digest
15724 The standard (RFC 1153) digest format.
15725
15726 @item mime-digest
15727 A @sc{mime} digest of messages.
15728
15729 @item lanl-gov-announce
15730 Announcement messages from LANL Gov Announce.
15731
15732 @item rfc822-forward
15733 A message forwarded according to RFC822.
15734
15735 @item outlook
15736 The Outlook mail box.
15737
15738 @item oe-dbx
15739 The Outlook Express dbx mail box.
15740
15741 @item exim-bounce
15742 A bounce message from the Exim MTA.
15743
15744 @item forward
15745 A message forwarded according to informal rules.
15746
15747 @item rfc934
15748 An RFC934-forwarded message.
15749
15750 @item mailman
15751 A mailman digest.
15752
15753 @item clari-briefs
15754 A digest of Clarinet brief news items.
15755
15756 @item slack-digest
15757 Non-standard digest format---matches most things, but does it badly.
15758
15759 @item mail-in-mail
15760 The last resort.
15761 @end table
15762
15763 You can also use the special ``file type'' @code{guess}, which means
15764 that @code{nndoc} will try to guess what file type it is looking at.
15765 @code{digest} means that @code{nndoc} should guess what digest type the
15766 file is.
15767
15768 @code{nndoc} will not try to change the file or insert any extra headers into
15769 it---it will simply, like, let you use the file as the basis for a
15770 group.  And that's it.
15771
15772 If you have some old archived articles that you want to insert into your
15773 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
15774 that.  Say you have an old @file{RMAIL} file with mail that you now want
15775 to split into your new @code{nnml} groups.  You look at that file using
15776 @code{nndoc} (using the @kbd{G f} command in the group buffer
15777 (@pxref{Foreign Groups})), set the process mark on all the articles in
15778 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
15779 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
15780 file is now also stored in lots of @code{nnml} directories, and you can
15781 delete that pesky @file{RMAIL} file.  If you have the guts!
15782
15783 Virtual server variables:
15784
15785 @table @code
15786 @item nndoc-article-type
15787 @vindex nndoc-article-type
15788 This should be one of @code{mbox}, @code{babyl}, @code{digest},
15789 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
15790 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
15791 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
15792 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
15793
15794 @item nndoc-post-type
15795 @vindex nndoc-post-type
15796 This variable says whether Gnus is to consider the group a news group or
15797 a mail group.  There are two valid values:  @code{mail} (the default)
15798 and @code{news}.
15799 @end table
15800
15801 @menu
15802 * Document Server Internals::   How to add your own document types.
15803 @end menu
15804
15805
15806 @node Document Server Internals
15807 @subsubsection Document Server Internals
15808
15809 Adding new document types to be recognized by @code{nndoc} isn't
15810 difficult.  You just have to whip up a definition of what the document
15811 looks like, write a predicate function to recognize that document type,
15812 and then hook into @code{nndoc}.
15813
15814 First, here's an example document type definition:
15815
15816 @example
15817 (mmdf
15818  (article-begin .  "^\^A\^A\^A\^A\n")
15819  (body-end .  "^\^A\^A\^A\^A\n"))
15820 @end example
15821
15822 The definition is simply a unique @dfn{name} followed by a series of
15823 regexp pseudo-variable settings.  Below are the possible
15824 variables---don't be daunted by the number of variables; most document
15825 types can be defined with very few settings:
15826
15827 @table @code
15828 @item first-article
15829 If present, @code{nndoc} will skip past all text until it finds
15830 something that match this regexp.  All text before this will be
15831 totally ignored.
15832
15833 @item article-begin
15834 This setting has to be present in all document type definitions.  It
15835 says what the beginning of each article looks like.
15836
15837 @item head-begin-function
15838 If present, this should be a function that moves point to the head of
15839 the article.
15840
15841 @item nndoc-head-begin
15842 If present, this should be a regexp that matches the head of the
15843 article.
15844
15845 @item nndoc-head-end
15846 This should match the end of the head of the article.  It defaults to
15847 @samp{^$}---the empty line.
15848
15849 @item body-begin-function
15850 If present, this function should move point to the beginning of the body
15851 of the article.
15852
15853 @item body-begin
15854 This should match the beginning of the body of the article.  It defaults
15855 to @samp{^\n}.
15856
15857 @item body-end-function
15858 If present, this function should move point to the end of the body of
15859 the article.
15860
15861 @item body-end
15862 If present, this should match the end of the body of the article.
15863
15864 @item file-end
15865 If present, this should match the end of the file.  All text after this
15866 regexp will be totally ignored.
15867
15868 @end table
15869
15870 So, using these variables @code{nndoc} is able to dissect a document
15871 file into a series of articles, each with a head and a body.  However, a
15872 few more variables are needed since not all document types are all that
15873 news-like---variables needed to transform the head or the body into
15874 something that's palatable for Gnus:
15875
15876 @table @code
15877 @item prepare-body-function
15878 If present, this function will be called when requesting an article.  It
15879 will be called with point at the start of the body, and is useful if the
15880 document has encoded some parts of its contents.
15881
15882 @item article-transform-function
15883 If present, this function is called when requesting an article.  It's
15884 meant to be used for more wide-ranging transformation of both head and
15885 body of the article.
15886
15887 @item generate-head-function
15888 If present, this function is called to generate a head that Gnus can
15889 understand.  It is called with the article number as a parameter, and is
15890 expected to generate a nice head for the article in question.  It is
15891 called when requesting the headers of all articles.
15892
15893 @end table
15894
15895 Let's look at the most complicated example I can come up with---standard
15896 digests:
15897
15898 @example
15899 (standard-digest
15900  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
15901  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
15902  (prepare-body-function . nndoc-unquote-dashes)
15903  (body-end-function . nndoc-digest-body-end)
15904  (head-end . "^ ?$")
15905  (body-begin . "^ ?\n")
15906  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
15907  (subtype digest guess))
15908 @end example
15909
15910 We see that all text before a 70-width line of dashes is ignored; all
15911 text after a line that starts with that @samp{^End of} is also ignored;
15912 each article begins with a 30-width line of dashes; the line separating
15913 the head from the body may contain a single space; and that the body is
15914 run through @code{nndoc-unquote-dashes} before being delivered.
15915
15916 To hook your own document definition into @code{nndoc}, use the
15917 @code{nndoc-add-type} function.  It takes two parameters---the first is
15918 the definition itself and the second (optional) parameter says where in
15919 the document type definition alist to put this definition.  The alist is
15920 traversed sequentially, and @code{nndoc-TYPE-type-p} is called for a given type @code{TYPE}.  So @code{nndoc-mmdf-type-p} is called to see whether a document
15921 is of @code{mmdf} type, and so on.  These type predicates should return
15922 @code{nil} if the document is not of the correct type; @code{t} if it is
15923 of the correct type; and a number if the document might be of the
15924 correct type.  A high number means high probability; a low number means
15925 low probability with @samp{0} being the lowest valid number.
15926
15927
15928 @node SOUP
15929 @subsection SOUP
15930 @cindex SOUP
15931 @cindex offline
15932
15933 In the PC world people often talk about ``offline'' newsreaders.  These
15934 are thingies that are combined reader/news transport monstrosities.
15935 With built-in modem programs.  Yecchh!
15936
15937 Of course, us Unix Weenie types of human beans use things like
15938 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
15939 transport things like Ghod intended.  And then we just use normal
15940 newsreaders.
15941
15942 However, it can sometimes be convenient to do something that's a bit
15943 easier on the brain if you have a very slow modem, and you're not really
15944 that interested in doing things properly.
15945
15946 A file format called @sc{soup} has been developed for transporting news
15947 and mail from servers to home machines and back again.  It can be a bit
15948 fiddly.
15949
15950 First some terminology:
15951
15952 @table @dfn
15953
15954 @item server
15955 This is the machine that is connected to the outside world and where you
15956 get news and/or mail from.
15957
15958 @item home machine
15959 This is the machine that you want to do the actual reading and responding
15960 on.  It is typically not connected to the rest of the world in any way.
15961
15962 @item packet
15963 Something that contains messages and/or commands.  There are two kinds
15964 of packets:
15965
15966 @table @dfn
15967 @item message packets
15968 These are packets made at the server, and typically contain lots of
15969 messages for you to read.  These are called @file{SoupoutX.tgz} by
15970 default, where @var{x} is a number.
15971
15972 @item response packets
15973 These are packets made at the home machine, and typically contains
15974 replies that you've written.  These are called @file{SoupinX.tgz} by
15975 default, where @var{x} is a number.
15976
15977 @end table
15978
15979 @end table
15980
15981
15982 @enumerate
15983
15984 @item
15985 You log in on the server and create a @sc{soup} packet.  You can either
15986 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
15987 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
15988 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
15989
15990 @item
15991 You transfer the packet home.  Rail, boat, car or modem will do fine.
15992
15993 @item
15994 You put the packet in your home directory.
15995
15996 @item
15997 You fire up Gnus on your home machine using the @code{nnsoup} back end as
15998 the native or secondary server.
15999
16000 @item
16001 You read articles and mail and answer and followup to the things you
16002 want (@pxref{SOUP Replies}).
16003
16004 @item
16005 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16006 packet.
16007
16008 @item
16009 You transfer this packet to the server.
16010
16011 @item
16012 You use Gnus to mail this packet out with the @kbd{G s s} command.
16013
16014 @item
16015 You then repeat until you die.
16016
16017 @end enumerate
16018
16019 So you basically have a bipartite system---you use @code{nnsoup} for
16020 reading and Gnus for packing/sending these @sc{soup} packets.
16021
16022 @menu
16023 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16024 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16025 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16026 @end menu
16027
16028
16029 @node SOUP Commands
16030 @subsubsection SOUP Commands
16031
16032 These are commands for creating and manipulating @sc{soup} packets.
16033
16034 @table @kbd
16035 @item G s b
16036 @kindex G s b (Group)
16037 @findex gnus-group-brew-soup
16038 Pack all unread articles in the current group
16039 (@code{gnus-group-brew-soup}).  This command understands the
16040 process/prefix convention.
16041
16042 @item G s w
16043 @kindex G s w (Group)
16044 @findex gnus-soup-save-areas
16045 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16046
16047 @item G s s
16048 @kindex G s s (Group)
16049 @findex gnus-soup-send-replies
16050 Send all replies from the replies packet
16051 (@code{gnus-soup-send-replies}).
16052
16053 @item G s p
16054 @kindex G s p (Group)
16055 @findex gnus-soup-pack-packet
16056 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16057
16058 @item G s r
16059 @kindex G s r (Group)
16060 @findex nnsoup-pack-replies
16061 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16062
16063 @item O s
16064 @kindex O s (Summary)
16065 @findex gnus-soup-add-article
16066 This summary-mode command adds the current article to a @sc{soup} packet
16067 (@code{gnus-soup-add-article}).  It understands the process/prefix
16068 convention (@pxref{Process/Prefix}).
16069
16070 @end table
16071
16072
16073 There are a few variables to customize where Gnus will put all these
16074 thingies:
16075
16076 @table @code
16077
16078 @item gnus-soup-directory
16079 @vindex gnus-soup-directory
16080 Directory where Gnus will save intermediate files while composing
16081 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16082
16083 @item gnus-soup-replies-directory
16084 @vindex gnus-soup-replies-directory
16085 This is what Gnus will use as a temporary directory while sending our
16086 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16087
16088 @item gnus-soup-prefix-file
16089 @vindex gnus-soup-prefix-file
16090 Name of the file where Gnus stores the last used prefix.  The default is
16091 @samp{gnus-prefix}.
16092
16093 @item gnus-soup-packer
16094 @vindex gnus-soup-packer
16095 A format string command for packing a @sc{soup} packet.  The default is
16096 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16097
16098 @item gnus-soup-unpacker
16099 @vindex gnus-soup-unpacker
16100 Format string command for unpacking a @sc{soup} packet.  The default is
16101 @samp{gunzip -c %s | tar xvf -}.
16102
16103 @item gnus-soup-packet-directory
16104 @vindex gnus-soup-packet-directory
16105 Where Gnus will look for reply packets.  The default is @file{~/}.
16106
16107 @item gnus-soup-packet-regexp
16108 @vindex gnus-soup-packet-regexp
16109 Regular expression matching @sc{soup} reply packets in
16110 @code{gnus-soup-packet-directory}.
16111
16112 @end table
16113
16114
16115 @node SOUP Groups
16116 @subsubsection SOUP Groups
16117 @cindex nnsoup
16118
16119 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
16120 read incoming packets, unpack them, and put them in a directory where
16121 you can read them at leisure.
16122
16123 These are the variables you can use to customize its behavior:
16124
16125 @table @code
16126
16127 @item nnsoup-tmp-directory
16128 @vindex nnsoup-tmp-directory
16129 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
16130 directory.  (@file{/tmp/} by default.)
16131
16132 @item nnsoup-directory
16133 @vindex nnsoup-directory
16134 @code{nnsoup} then moves each message and index file to this directory.
16135 The default is @file{~/SOUP/}.
16136
16137 @item nnsoup-replies-directory
16138 @vindex nnsoup-replies-directory
16139 All replies will be stored in this directory before being packed into a
16140 reply packet.  The default is @file{~/SOUP/replies/"}.
16141
16142 @item nnsoup-replies-format-type
16143 @vindex nnsoup-replies-format-type
16144 The @sc{soup} format of the replies packets.  The default is @samp{?n}
16145 (rnews), and I don't think you should touch that variable.  I probably
16146 shouldn't even have documented it.  Drats!  Too late!
16147
16148 @item nnsoup-replies-index-type
16149 @vindex nnsoup-replies-index-type
16150 The index type of the replies packet.  The default is @samp{?n}, which
16151 means ``none''.  Don't fiddle with this one either!
16152
16153 @item nnsoup-active-file
16154 @vindex nnsoup-active-file
16155 Where @code{nnsoup} stores lots of information.  This is not an ``active
16156 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
16157 this file or mess it up in any way, you're dead.  The default is
16158 @file{~/SOUP/active}.
16159
16160 @item nnsoup-packer
16161 @vindex nnsoup-packer
16162 Format string command for packing a reply @sc{soup} packet.  The default
16163 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
16164
16165 @item nnsoup-unpacker
16166 @vindex nnsoup-unpacker
16167 Format string command for unpacking incoming @sc{soup} packets.  The
16168 default is @samp{gunzip -c %s | tar xvf -}.
16169
16170 @item nnsoup-packet-directory
16171 @vindex nnsoup-packet-directory
16172 Where @code{nnsoup} will look for incoming packets.  The default is
16173 @file{~/}.
16174
16175 @item nnsoup-packet-regexp
16176 @vindex nnsoup-packet-regexp
16177 Regular expression matching incoming @sc{soup} packets.  The default is
16178 @samp{Soupout}.
16179
16180 @item nnsoup-always-save
16181 @vindex nnsoup-always-save
16182 If non-@code{nil}, save the replies buffer after each posted message.
16183
16184 @end table
16185
16186
16187 @node SOUP Replies
16188 @subsubsection SOUP Replies
16189
16190 Just using @code{nnsoup} won't mean that your postings and mailings end
16191 up in @sc{soup} reply packets automagically.  You have to work a bit
16192 more for that to happen.
16193
16194 @findex nnsoup-set-variables
16195 The @code{nnsoup-set-variables} command will set the appropriate
16196 variables to ensure that all your followups and replies end up in the
16197 @sc{soup} system.
16198
16199 In specific, this is what it does:
16200
16201 @lisp
16202 (setq message-send-news-function 'nnsoup-request-post)
16203 (setq message-send-mail-function 'nnsoup-request-mail)
16204 @end lisp
16205
16206 And that's it, really.  If you only want news to go into the @sc{soup}
16207 system you just use the first line.  If you only want mail to be
16208 @sc{soup}ed you use the second.
16209
16210
16211 @node Mail-To-News Gateways
16212 @subsection Mail-To-News Gateways
16213 @cindex mail-to-news gateways
16214 @cindex gateways
16215
16216 If your local @code{nntp} server doesn't allow posting, for some reason
16217 or other, you can post using one of the numerous mail-to-news gateways.
16218 The @code{nngateway} back end provides the interface.
16219
16220 Note that you can't read anything from this back end---it can only be
16221 used to post with.
16222
16223 Server variables:
16224
16225 @table @code
16226 @item nngateway-address
16227 @vindex nngateway-address
16228 This is the address of the mail-to-news gateway.
16229
16230 @item nngateway-header-transformation
16231 @vindex nngateway-header-transformation
16232 News headers often have to be transformed in some odd way or other
16233 for the mail-to-news gateway to accept it.  This variable says what
16234 transformation should be called, and defaults to
16235 @code{nngateway-simple-header-transformation}.  The function is called
16236 narrowed to the headers to be transformed and with one parameter---the
16237 gateway address.
16238
16239 This default function just inserts a new @code{To} header based on the
16240 @code{Newsgroups} header and the gateway address.
16241 For instance, an article with this @code{Newsgroups} header:
16242
16243 @example
16244 Newsgroups: alt.religion.emacs
16245 @end example
16246
16247 will get this @code{To} header inserted:
16248
16249 @example
16250 To: alt-religion-emacs@@GATEWAY
16251 @end example
16252
16253 The following pre-defined functions exist:
16254
16255 @findex nngateway-simple-header-transformation
16256 @table @code
16257
16258 @item nngateway-simple-header-transformation
16259 Creates a @code{To} header that looks like
16260 @var{newsgroup}@@@code{nngateway-address}.
16261
16262 @findex nngateway-mail2news-header-transformation
16263
16264 @item nngateway-mail2news-header-transformation
16265 Creates a @code{To} header that looks like
16266 @code{nngateway-address}.
16267
16268 Here's an example:
16269
16270 @lisp
16271 (setq gnus-post-method
16272       '(nngateway
16273         "mail2news@@replay.com"
16274         (nngateway-header-transformation
16275          nngateway-mail2news-header-transformation)))
16276 @end lisp
16277
16278 @end table
16279
16280
16281 @end table
16282
16283 So, to use this, simply say something like:
16284
16285 @lisp
16286 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
16287 @end lisp
16288
16289
16290
16291 @node Combined Groups
16292 @section Combined Groups
16293
16294 Gnus allows combining a mixture of all the other group types into bigger
16295 groups.
16296
16297 @menu
16298 * Virtual Groups::              Combining articles from many groups.
16299 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
16300 @end menu
16301
16302
16303 @node Virtual Groups
16304 @subsection Virtual Groups
16305 @cindex nnvirtual
16306 @cindex virtual groups
16307 @cindex merging groups
16308
16309 An @dfn{nnvirtual group} is really nothing more than a collection of
16310 other groups.
16311
16312 For instance, if you are tired of reading many small groups, you can
16313 put them all in one big group, and then grow tired of reading one
16314 big, unwieldy group.  The joys of computing!
16315
16316 You specify @code{nnvirtual} as the method.  The address should be a
16317 regexp to match component groups.
16318
16319 All marks in the virtual group will stick to the articles in the
16320 component groups.  So if you tick an article in a virtual group, the
16321 article will also be ticked in the component group from whence it
16322 came.  (And vice versa---marks from the component groups will also be
16323 shown in the virtual group.). To create an empty virtual group, run
16324 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
16325 and edit the method regexp with @kbd{M-e}
16326 (@code{gnus-group-edit-group-method})
16327
16328 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
16329 newsgroups into one, big, happy newsgroup:
16330
16331 @lisp
16332 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
16333 @end lisp
16334
16335 The component groups can be native or foreign; everything should work
16336 smoothly, but if your computer explodes, it was probably my fault.
16337
16338 Collecting the same group from several servers might actually be a good
16339 idea if users have set the Distribution header to limit distribution.
16340 If you would like to read @samp{soc.motss} both from a server in Japan
16341 and a server in Norway, you could use the following as the group regexp:
16342
16343 @example
16344 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
16345 @end example
16346
16347 (Remember, though, that if you're creating the group with @kbd{G m}, you
16348 shouldn't double the backslashes, and you should leave off the quote
16349 characters at the beginning and the end of the string.)
16350
16351 This should work kinda smoothly---all articles from both groups should
16352 end up in this one, and there should be no duplicates.  Threading (and
16353 the rest) will still work as usual, but there might be problems with the
16354 sequence of articles.  Sorting on date might be an option here
16355 (@pxref{Selecting a Group}).
16356
16357 One limitation, however---all groups included in a virtual
16358 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
16359 zombie groups can't be component groups for @code{nnvirtual} groups.
16360
16361 @vindex nnvirtual-always-rescan
16362 If the @code{nnvirtual-always-rescan} is non-@code{nil},
16363 @code{nnvirtual} will always scan groups for unread articles when
16364 entering a virtual group.  If this variable is @code{nil} (which is the
16365 default) and you read articles in a component group after the virtual
16366 group has been activated, the read articles from the component group
16367 will show up when you enter the virtual group.  You'll also see this
16368 effect if you have two virtual groups that have a component group in
16369 common.  If that's the case, you should set this variable to @code{t}.
16370 Or you can just tap @code{M-g} on the virtual group every time before
16371 you enter it---it'll have much the same effect.
16372
16373 @code{nnvirtual} can have both mail and news groups as component groups.
16374 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
16375 has to ask the back end of the component group the article comes from
16376 whether it is a news or mail back end.  However, when you do a @kbd{^},
16377 there is typically no sure way for the component back end to know this,
16378 and in that case @code{nnvirtual} tells Gnus that the article came from a
16379 not-news back end.  (Just to be on the safe side.)
16380
16381 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
16382 line from the article you respond to in these cases.
16383
16384 @code{nnvirtual} groups do not inherit anything but articles and marks
16385 from component groups---group parameters, for instance, are not
16386 inherited.
16387
16388
16389 @node Kibozed Groups
16390 @subsection Kibozed Groups
16391 @cindex nnkiboze
16392 @cindex kibozing
16393
16394 @dfn{Kibozing} is defined by @sc{oed} as ``grepping through (parts of)
16395 the news feed''.  @code{nnkiboze} is a back end that will do this for
16396 you.  Oh joy!  Now you can grind any @sc{nntp} server down to a halt
16397 with useless requests!  Oh happiness!
16398
16399 @kindex G k (Group)
16400 To create a kibozed group, use the @kbd{G k} command in the group
16401 buffer.
16402
16403 The address field of the @code{nnkiboze} method is, as with
16404 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
16405 @code{nnkiboze} group.  That's where most similarities between @code{nnkiboze}
16406 and @code{nnvirtual} end.
16407
16408 In addition to this regexp detailing component groups, an @code{nnkiboze} group
16409 must have a score file to say what articles are to be included in
16410 the group (@pxref{Scoring}).
16411
16412 @kindex M-x nnkiboze-generate-groups
16413 @findex nnkiboze-generate-groups
16414 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
16415 @code{nnkiboze} groups you want to have.  This command will take time.  Lots of
16416 time.  Oodles and oodles of time.  Gnus has to fetch the headers from
16417 all the articles in all the component groups and run them through the
16418 scoring process to determine if there are any articles in the groups
16419 that are to be part of the @code{nnkiboze} groups.
16420
16421 Please limit the number of component groups by using restrictive
16422 regexps.  Otherwise your sysadmin may become annoyed with you, and the
16423 @sc{nntp} site may throw you off and never let you back in again.
16424 Stranger things have happened.
16425
16426 @code{nnkiboze} component groups do not have to be alive---they can be dead,
16427 and they can be foreign.  No restrictions.
16428
16429 @vindex nnkiboze-directory
16430 The generation of an @code{nnkiboze} group means writing two files in
16431 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
16432 contains the @sc{nov} header lines for all the articles in the group,
16433 and the other is an additional @file{.newsrc} file to store information
16434 on what groups have been searched through to find component articles.
16435
16436 Articles marked as read in the @code{nnkiboze} group will have
16437 their @sc{nov} lines removed from the @sc{nov} file.
16438
16439
16440 @node Gnus Unplugged
16441 @section Gnus Unplugged
16442 @cindex offline
16443 @cindex unplugged
16444 @cindex Agent
16445 @cindex Gnus Agent
16446 @cindex Gnus Unplugged
16447
16448 In olden times (ca. February '88), people used to run their newsreaders
16449 on big machines with permanent connections to the net.  News transport
16450 was dealt with by news servers, and all the newsreaders had to do was to
16451 read news.  Believe it or not.
16452
16453 Nowadays most people read news and mail at home, and use some sort of
16454 modem to connect to the net.  To avoid running up huge phone bills, it
16455 would be nice to have a way to slurp down all the news and mail, hang up
16456 the phone, read for several hours, and then upload any responses you
16457 have to make.  And then you repeat the procedure.
16458
16459 Of course, you can use news servers for doing this as well.  I've used
16460 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
16461 for some years, but doing that's a bore.  Moving the news server
16462 functionality up to the newsreader makes sense if you're the only person
16463 reading news on a machine.
16464
16465 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
16466 fact, you don't even have to configure anything.
16467
16468 Of course, to use it as such, you have to learn a few new commands.
16469
16470 @menu
16471 * Agent Basics::                How it all is supposed to work.
16472 * Agent Categories::            How to tell the Gnus Agent what to download.
16473 * Agent Commands::              New commands for all the buffers.
16474 * Agent as Cache::              The Agent is a big cache too.
16475 * Agent Expiry::                How to make old articles go away.
16476 * Agent and IMAP::              How to use the Agent with IMAP.
16477 * Outgoing Messages::           What happens when you post/mail something?
16478 * Agent Variables::             Customizing is fun.
16479 * Example Setup::               An example @file{.gnus.el} file for offline people.
16480 * Batching Agents::             How to fetch news from a @code{cron} job.
16481 * Agent Caveats::               What you think it'll do and what it does.
16482 @end menu
16483
16484
16485 @node Agent Basics
16486 @subsection Agent Basics
16487
16488 First, let's get some terminology out of the way.
16489
16490 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
16491 connection to the net (and notified the Agent that this is the case).
16492 When the connection to the net is up again (and Gnus knows this), the
16493 Agent is @dfn{plugged}.
16494
16495 The @dfn{local} machine is the one you're running on, and which isn't
16496 connected to the net continuously.
16497
16498 @dfn{Downloading} means fetching things from the net to your local
16499 machine.  @dfn{Uploading} is doing the opposite.
16500
16501 Let's take a typical Gnus session using the Agent.
16502
16503 @itemize @bullet
16504
16505 @item
16506 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
16507 Agent in a disconnected state.  You can read all the news that you have
16508 already fetched while in this mode.
16509
16510 @item
16511 You then decide to see whether any new news has arrived.  You connect
16512 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
16513 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
16514 as usual.  To check for new mail in unplugged mode, see (@pxref{Mail
16515 Source Specifiers}).
16516
16517 @item
16518 You can then read the new news immediately, or you can download the news
16519 onto your local machine.  If you want to do the latter, you press @kbd{g}
16520 to check if there are any new news and then @kbd{J
16521 s} to fetch all the eligible articles in all the groups.  (To let Gnus
16522 know which articles you want to download, @pxref{Agent Categories}.)
16523
16524 @item
16525 After fetching the articles, you press @kbd{J j} to make Gnus become
16526 unplugged again, and you shut down the PPP thing (or whatever).  And
16527 then you read the news offline.
16528
16529 @item
16530 And then you go to step 2.
16531 @end itemize
16532
16533 Here are some things you should do the first time (or so) that you use
16534 the Agent.
16535
16536 @itemize @bullet
16537
16538 @item
16539 Decide which servers should be covered by the Agent.  If you have a mail
16540 back end, it would probably be nonsensical to have it covered by the
16541 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
16542 @kbd{J a} on the server (or servers) that you wish to have covered by the
16543 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
16544 added servers you do not wish to have covered by the Agent.  By default,
16545 all @code{nntp} and @code{nnimap} groups in @code{gnus-select-method} and
16546 @code{gnus-secondary-select-methods} are agentized.
16547
16548 @item
16549 Decide on download policy.  @xref{Agent Categories}.
16550
16551 @item
16552 Uhm... that's it.
16553 @end itemize
16554
16555
16556 @node Agent Categories
16557 @subsection Agent Categories
16558
16559 One of the main reasons to integrate the news transport layer into the
16560 newsreader is to allow greater control over what articles to download.
16561 There's not much point in downloading huge amounts of articles, just to
16562 find out that you're not interested in reading any of them.  It's better
16563 to be somewhat more conservative in choosing what to download, and then
16564 mark the articles for downloading manually if it should turn out that
16565 you're interested in the articles anyway.
16566
16567 The main way to control what is to be downloaded is to create a
16568 @dfn{category} and then assign some (or all) groups to this category.
16569 Groups that do not belong in any other category belong to the
16570 @code{default} category.  Gnus has its own buffer for creating and
16571 managing categories.
16572
16573 @menu
16574 * Category Syntax::             What a category looks like.
16575 * Category Buffer::             A buffer for maintaining categories.
16576 * Category Variables::          Customize'r'Us.
16577 @end menu
16578
16579
16580 @node Category Syntax
16581 @subsubsection Category Syntax
16582
16583 A category consists of two things.
16584
16585 @enumerate
16586 @item
16587 A predicate which (generally) gives a rough outline of which articles
16588 are eligible for downloading; and
16589
16590 @item
16591 a score rule which (generally) gives you a finer granularity when
16592 deciding what articles to download.  (Note that this @dfn{download
16593 score} is not necessarily related to normal scores.)
16594 @end enumerate
16595
16596 A predicate in its simplest form can be a single predicate such as
16597 @code{true} or @code{false}.  These two will download every available
16598 article or nothing respectively.  In the case of these two special
16599 predicates an additional score rule is superfluous.
16600
16601 Predicates of @code{high} or @code{low} download articles in respect of
16602 their scores in relationship to @code{gnus-agent-high-score} and
16603 @code{gnus-agent-low-score} as described below.
16604
16605 To gain even finer control of what is to be regarded eligible for
16606 download a predicate can consist of a number of predicates with logical
16607 operators sprinkled in between.
16608
16609 Perhaps some examples are in order.
16610
16611 Here's a simple predicate.  (It's the default predicate, in fact, used
16612 for all groups that don't belong to any other category.)
16613
16614 @lisp
16615 short
16616 @end lisp
16617
16618 Quite simple, eh?  This predicate is true if and only if the article is
16619 short (for some value of ``short'').
16620
16621 Here's a more complex predicate:
16622
16623 @lisp
16624 (or high
16625     (and
16626      (not low)
16627      (not long)))
16628 @end lisp
16629
16630 This means that an article should be downloaded if it has a high score,
16631 or if the score is not low and the article is not long.  You get the
16632 drift.
16633
16634 The available logical operators are @code{or}, @code{and} and
16635 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
16636 @samp{|}, @code{&} and @code{!} instead.)
16637
16638 The following predicates are pre-defined, but if none of these fit what
16639 you want to do, you can write your own.
16640
16641 @table @code
16642 @item short
16643 True iff the article is shorter than @code{gnus-agent-short-article}
16644 lines; default 100.
16645
16646 @item long
16647 True iff the article is longer than @code{gnus-agent-long-article}
16648 lines; default 200.
16649
16650 @item low
16651 True iff the article has a download score less than
16652 @code{gnus-agent-low-score}; default 0.
16653
16654 @item high
16655 True iff the article has a download score greater than
16656 @code{gnus-agent-high-score}; default 0.
16657
16658 @item spam
16659 True iff the Gnus Agent guesses that the article is spam.  The
16660 heuristics may change over time, but at present it just computes a
16661 checksum and sees whether articles match.
16662
16663 @item true
16664 Always true.
16665
16666 @item false
16667 Always false.
16668 @end table
16669
16670 If you want to create your own predicate function, here's what you have
16671 to know:  The functions are called with no parameters, but the
16672 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
16673 useful values.
16674
16675 For example, you could decide that you don't want to download articles
16676 that were posted more than a certain number of days ago (e.g. posted
16677 more than @code{gnus-agent-expire-days} ago) you might write a function
16678 something along the lines of the following:
16679
16680 @lisp
16681 (defun my-article-old-p ()
16682   "Say whether an article is old."
16683   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
16684      (- (time-to-days (current-time)) gnus-agent-expire-days)))
16685 @end lisp
16686
16687 with the predicate then defined as:
16688
16689 @lisp
16690 (not my-article-old-p)
16691 @end lisp
16692
16693 or you could append your predicate to the predefined
16694 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
16695 wherever.
16696
16697 @lisp
16698 (require 'gnus-agent)
16699 (setq  gnus-category-predicate-alist
16700   (append gnus-category-predicate-alist
16701          '((old . my-article-old-p))))
16702 @end lisp
16703
16704 and simply specify your predicate as:
16705
16706 @lisp
16707 (not old)
16708 @end lisp
16709
16710 If/when using something like the above, be aware that there are many
16711 misconfigured systems/mailers out there and so an article's date is not
16712 always a reliable indication of when it was posted.  Hell, some people
16713 just don't give a damn.
16714
16715 The above predicates apply to *all* the groups which belong to the
16716 category.  However, if you wish to have a specific predicate for an
16717 individual group within a category, or you're just too lazy to set up a
16718 new category, you can enter a group's individual predicate in it's group
16719 parameters like so:
16720
16721 @lisp
16722 (agent-predicate . short)
16723 @end lisp
16724
16725 This is the group parameter equivalent of the agent category default.
16726 Note that when specifying a single word predicate like this, the
16727 @code{agent-predicate} specification must be in dotted pair notation.
16728
16729 The equivalent of the longer example from above would be:
16730
16731 @lisp
16732 (agent-predicate or high (and (not low) (not long)))
16733 @end lisp
16734
16735 The outer parenthesis required in the category specification are not
16736 entered here as, not being in dotted pair notation, the value of the
16737 predicate is assumed to be a list.
16738
16739
16740 Now, the syntax of the download score is the same as the syntax of
16741 normal score files, except that all elements that require actually
16742 seeing the article itself are verboten.  This means that only the
16743 following headers can be scored on: @code{Subject}, @code{From},
16744 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
16745 @code{Lines}, and @code{Xref}.
16746
16747 As with predicates, the specification of the @code{download score rule}
16748 to use in respect of a group can be in either the category definition if
16749 it's to be applicable to all groups in therein, or a group's parameters
16750 if it's to be specific to that group.
16751
16752 In both of these places the @code{download score rule} can take one of
16753 three forms:
16754
16755 @enumerate
16756 @item
16757 Score rule
16758
16759 This has the same syntax as a normal gnus score file except only a
16760 subset of scoring keywords are available as mentioned above.
16761
16762 example:
16763
16764 @itemize @bullet
16765 @item
16766 Category specification
16767
16768 @lisp
16769 (("from"
16770        ("Lars Ingebrigtsen" 1000000 nil s))
16771 ("lines"
16772        (500 -100 nil <)))
16773 @end lisp
16774
16775 @item
16776 Group Parameter specification
16777
16778 @lisp
16779 (agent-score ("from"
16780                    ("Lars Ingebrigtsen" 1000000 nil s))
16781              ("lines"
16782                    (500 -100 nil <)))
16783 @end lisp
16784
16785 Again, note the omission of the outermost parenthesis here.
16786 @end itemize
16787
16788 @item
16789 Agent score file
16790
16791 These score files must *only* contain the permitted scoring keywords
16792 stated above.
16793
16794 example:
16795
16796 @itemize @bullet
16797 @item
16798 Category specification
16799
16800 @lisp
16801 ("~/News/agent.SCORE")
16802 @end lisp
16803
16804 or perhaps
16805
16806 @lisp
16807 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
16808 @end lisp
16809
16810 @item
16811 Group Parameter specification
16812
16813 @lisp
16814 (agent-score "~/News/agent.SCORE")
16815 @end lisp
16816
16817 Additional score files can be specified as above.  Need I say anything
16818 about parenthesis?
16819 @end itemize
16820
16821 @item
16822 Use @code{normal} score files
16823
16824 If you don't want to maintain two sets of scoring rules for a group, and
16825 your desired @code{downloading} criteria for a group are the same as your
16826 @code{reading} criteria then you can tell the agent to refer to your
16827 @code{normal} score files when deciding what to download.
16828
16829 These directives in either the category definition or a group's
16830 parameters will cause the agent to read in all the applicable score
16831 files for a group, *filtering out* those sections that do not
16832 relate to one of the permitted subset of scoring keywords.
16833
16834 @itemize @bullet
16835 @item
16836 Category Specification
16837
16838 @lisp
16839 file
16840 @end lisp
16841
16842 @item
16843 Group Parameter specification
16844
16845 @lisp
16846 (agent-score . file)
16847 @end lisp
16848 @end itemize
16849 @end enumerate
16850
16851 @node Category Buffer
16852 @subsubsection Category Buffer
16853
16854 You'd normally do all category maintenance from the category buffer.
16855 When you enter it for the first time (with the @kbd{J c} command from
16856 the group buffer), you'll only see the @code{default} category.
16857
16858 The following commands are available in this buffer:
16859
16860 @table @kbd
16861 @item q
16862 @kindex q (Category)
16863 @findex gnus-category-exit
16864 Return to the group buffer (@code{gnus-category-exit}).
16865
16866 @item k
16867 @kindex k (Category)
16868 @findex gnus-category-kill
16869 Kill the current category (@code{gnus-category-kill}).
16870
16871 @item c
16872 @kindex c (Category)
16873 @findex gnus-category-copy
16874 Copy the current category (@code{gnus-category-copy}).
16875
16876 @item a
16877 @kindex a (Category)
16878 @findex gnus-category-add
16879 Add a new category (@code{gnus-category-add}).
16880
16881 @item p
16882 @kindex p (Category)
16883 @findex gnus-category-edit-predicate
16884 Edit the predicate of the current category
16885 (@code{gnus-category-edit-predicate}).
16886
16887 @item g
16888 @kindex g (Category)
16889 @findex gnus-category-edit-groups
16890 Edit the list of groups belonging to the current category
16891 (@code{gnus-category-edit-groups}).
16892
16893 @item s
16894 @kindex s (Category)
16895 @findex gnus-category-edit-score
16896 Edit the download score rule of the current category
16897 (@code{gnus-category-edit-score}).
16898
16899 @item l
16900 @kindex l (Category)
16901 @findex gnus-category-list
16902 List all the categories (@code{gnus-category-list}).
16903 @end table
16904
16905
16906 @node Category Variables
16907 @subsubsection Category Variables
16908
16909 @table @code
16910 @item gnus-category-mode-hook
16911 @vindex gnus-category-mode-hook
16912 Hook run in category buffers.
16913
16914 @item gnus-category-line-format
16915 @vindex gnus-category-line-format
16916 Format of the lines in the category buffer (@pxref{Formatting
16917 Variables}).  Valid elements are:
16918
16919 @table @samp
16920 @item c
16921 The name of the category.
16922
16923 @item g
16924 The number of groups in the category.
16925 @end table
16926
16927 @item gnus-category-mode-line-format
16928 @vindex gnus-category-mode-line-format
16929 Format of the category mode line (@pxref{Mode Line Formatting}).
16930
16931 @item gnus-agent-short-article
16932 @vindex gnus-agent-short-article
16933 Articles that have fewer lines than this are short.  Default 100.
16934
16935 @item gnus-agent-long-article
16936 @vindex gnus-agent-long-article
16937 Articles that have more lines than this are long.  Default 200.
16938
16939 @item gnus-agent-low-score
16940 @vindex gnus-agent-low-score
16941 Articles that have a score lower than this have a low score.  Default
16942 0.
16943
16944 @item gnus-agent-high-score
16945 @vindex gnus-agent-high-score
16946 Articles that have a score higher than this have a high score.  Default
16947 0.
16948
16949 @end table
16950
16951
16952 @node Agent Commands
16953 @subsection Agent Commands
16954
16955 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
16956 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
16957 toggles the plugged/unplugged state of the Gnus Agent.
16958
16959
16960 @menu
16961 * Group Agent Commands::        
16962 * Summary Agent Commands::      
16963 * Server Agent Commands::       
16964 @end menu
16965
16966 You can run a complete batch command from the command line with the
16967 following incantation:
16968
16969 @cindex gnus-agent-batch
16970 @example
16971 $ emacs -batch -l ~/.gnus.el -f gnus-agent-batch
16972 @end example
16973
16974
16975
16976 @node Group Agent Commands
16977 @subsubsection Group Agent Commands
16978
16979 @table @kbd
16980 @item J u
16981 @kindex J u (Agent Group)
16982 @findex gnus-agent-fetch-groups
16983 Fetch all eligible articles in the current group
16984 (@code{gnus-agent-fetch-groups}).
16985
16986 @item J c
16987 @kindex J c (Agent Group)
16988 @findex gnus-enter-category-buffer
16989 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
16990
16991 @item J s
16992 @kindex J s (Agent Group)
16993 @findex gnus-agent-fetch-session
16994 Fetch all eligible articles in all groups
16995 (@code{gnus-agent-fetch-session}).
16996
16997 @item J S
16998 @kindex J S (Agent Group)
16999 @findex gnus-group-send-queue
17000 Send all sendable messages in the queue group
17001 (@code{gnus-group-send-queue}).  @xref{Drafts}.
17002
17003 @item J a
17004 @kindex J a (Agent Group)
17005 @findex gnus-agent-add-group
17006 Add the current group to an Agent category
17007 (@code{gnus-agent-add-group}).  This command understands the
17008 process/prefix convention (@pxref{Process/Prefix}).
17009
17010 @item J r
17011 @kindex J r (Agent Group)
17012 @findex gnus-agent-remove-group
17013 Remove the current group from its category, if any
17014 (@code{gnus-agent-remove-group}).  This command understands the
17015 process/prefix convention (@pxref{Process/Prefix}).
17016
17017 @item J Y
17018 @kindex J Y (Agent Group)
17019 @findex gnus-agent-synchronize-flags
17020 Synchronize flags changed while unplugged with remote server, if any.
17021
17022
17023 @end table
17024
17025
17026 @node Summary Agent Commands
17027 @subsubsection Summary Agent Commands
17028
17029 @table @kbd
17030 @item J #
17031 @kindex J # (Agent Summary)
17032 @findex gnus-agent-mark-article
17033 Mark the article for downloading (@code{gnus-agent-mark-article}).
17034
17035 @item J M-#
17036 @kindex J M-# (Agent Summary)
17037 @findex gnus-agent-unmark-article
17038 Remove the downloading mark from the article
17039 (@code{gnus-agent-unmark-article}).
17040
17041 @item @@
17042 @kindex @@ (Agent Summary)
17043 @findex gnus-agent-toggle-mark
17044 Toggle whether to download the article (@code{gnus-agent-toggle-mark}).
17045
17046 @item J c
17047 @kindex J c (Agent Summary)
17048 @findex gnus-agent-catchup
17049 Mark all undownloaded articles as read (@code{gnus-agent-catchup}).
17050
17051 @item J u
17052 @kindex J u (Agent Summary)
17053 @findex gnus-agent-summary-fetch-group
17054 Download all downloadable articles in the current group
17055 (@code{gnus-agent-summary-fetch-group}).
17056
17057 @end table
17058
17059
17060 @node Server Agent Commands
17061 @subsubsection Server Agent Commands
17062
17063 @table @kbd
17064 @item J a
17065 @kindex J a (Agent Server)
17066 @findex gnus-agent-add-server
17067 Add the current server to the list of servers covered by the Gnus Agent
17068 (@code{gnus-agent-add-server}).
17069
17070 @item J r
17071 @kindex J r (Agent Server)
17072 @findex gnus-agent-remove-server
17073 Remove the current server from the list of servers covered by the Gnus
17074 Agent (@code{gnus-agent-remove-server}).
17075
17076 @end table
17077
17078
17079 @node Agent as Cache
17080 @subsection Agent as Cache
17081
17082 When Gnus is plugged, it is not efficient to download headers or
17083 articles from the server again, if they are already stored in the
17084 Agent.  So, Gnus normally only downloads headers once, and stores them
17085 in the Agent.  These headers are later used when generating the summary
17086 buffer, regardless of whether you are plugged or unplugged.  Articles
17087 are not cached in the Agent by default though (that would potentially
17088 consume lots of disk space), but if you have already downloaded an
17089 article into the Agent, Gnus will not download the article from the
17090 server again but use the locally stored copy instead.
17091
17092 This behaviour can be controlled by @code{gnus-agent-cache}
17093 (@pxref{Agent Variables}).
17094
17095 @node Agent Expiry
17096 @subsection Agent Expiry
17097
17098 @vindex gnus-agent-expire-days
17099 @findex gnus-agent-expire
17100 @kindex M-x gnus-agent-expire
17101 @cindex Agent expiry
17102 @cindex Gnus Agent expiry
17103 @cindex expiry
17104
17105 @code{nnagent} doesn't handle expiry.  Instead, there's a special
17106 @code{gnus-agent-expire} command that will expire all read articles that
17107 are older than @code{gnus-agent-expire-days} days.  It can be run
17108 whenever you feel that you're running out of space.  It's not
17109 particularly fast or efficient, and it's not a particularly good idea to
17110 interrupt it (with @kbd{C-g} or anything else) once you've started it.
17111
17112 @code{gnus-agent-expire-days} can also be a list of regexp/day pairs.
17113 The regexps will be matched against group names to allow differing
17114 expiry in different groups.
17115
17116 @lisp
17117 (setq gnus-agent-expire-days
17118       '(("alt\\." 7)
17119         (".*binary" 1)
17120         ("." 21)))
17121 @end lisp
17122
17123 If you use the list form, the last element must always be the default
17124 method---it must always match all groups.
17125
17126 @vindex gnus-agent-expire-all
17127 If @code{gnus-agent-expire-all} is non-@code{nil}, this command will
17128 expire all articles---unread, read, ticked and dormant.  If @code{nil}
17129 (which is the default), only read articles are eligible for expiry, and
17130 unread, ticked and dormant articles will be kept indefinitely.
17131
17132 @findex gnus-agent-regenerate
17133 If you find that some articles eligible for expiry are never expired,
17134 perhaps some Gnus Agent files are corrupted.  There's a special
17135 @code{gnus-agent-regenerate} command to fix possible problems.
17136
17137 @node Agent and IMAP
17138 @subsection Agent and IMAP
17139
17140 The Agent work with any Gnus back end, including nnimap.  However,
17141 since there are some conceptual differences between @sc{nntp} and
17142 @sc{imap}, this section (should) provide you with some information to
17143 make Gnus Agent work smoother as a @sc{imap} Disconnected Mode client.
17144
17145 The first thing to keep in mind is that all flags (read, ticked, etc)
17146 are kept on the @sc{imap} server, rather than in @code{.newsrc} as is the
17147 case for nntp.  Thus Gnus need to remember flag changes when
17148 disconnected, and synchronize these flags when you plug back in.
17149
17150 Gnus keeps track of flag changes when reading nnimap groups under the
17151 Agent.  When you plug back in, Gnus will check if you have any changed
17152 any flags and ask if you wish to synchronize these with the server.
17153 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
17154
17155 @vindex gnus-agent-synchronize-flags
17156 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
17157 never automatically synchronize flags.  If it is @code{ask}, which is
17158 the default, the Agent will check if you made any changes and if so
17159 ask if you wish to synchronize these when you re-connect.  If it has
17160 any other value, all flags will be synchronized automatically.
17161
17162 If you do not wish to synchronize flags automatically when you
17163 re-connect, you can do it manually with the
17164 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
17165 in the group buffer.
17166
17167 Some things are currently not implemented in the Agent that you'd might
17168 expect from a disconnected @sc{imap} client, including:
17169
17170 @itemize @bullet
17171
17172 @item
17173 Copying/moving articles into nnimap groups when unplugged.
17174
17175 @item
17176 Creating/deleting nnimap groups when unplugged.
17177
17178 @end itemize
17179
17180 Technical note: the synchronization algorithm does not work by "pushing"
17181 all local flags to the server, but rather incrementally update the
17182 server view of flags by changing only those flags that were changed by
17183 the user.  Thus, if you set one flag on a article, quit the group and
17184 re-select the group and remove the flag; the flag will be set and
17185 removed from the server when you "synchronize".  The queued flag
17186 operations can be found in the per-server @code{flags} file in the Agent
17187 directory.  It's emptied when you synchronize flags.
17188
17189
17190 @node Outgoing Messages
17191 @subsection Outgoing Messages
17192
17193 When Gnus is unplugged, all outgoing messages (both mail and news) are
17194 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
17195 them there after posting, and edit them at will.
17196
17197 When Gnus is plugged again, you can send the messages either from the
17198 draft group with the special commands available there, or you can use
17199 the @kbd{J S} command in the group buffer to send all the sendable
17200 messages in the draft group.
17201
17202
17203
17204 @node Agent Variables
17205 @subsection Agent Variables
17206
17207 @table @code
17208 @item gnus-agent-directory
17209 @vindex gnus-agent-directory
17210 Where the Gnus Agent will store its files.  The default is
17211 @file{~/News/agent/}.
17212
17213 @item gnus-agent-handle-level
17214 @vindex gnus-agent-handle-level
17215 Groups on levels (@pxref{Group Levels}) higher than this variable will
17216 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
17217 which means that only subscribed group will be considered by the Agent
17218 by default.
17219
17220 @item gnus-agent-plugged-hook
17221 @vindex gnus-agent-plugged-hook
17222 Hook run when connecting to the network.
17223
17224 @item gnus-agent-unplugged-hook
17225 @vindex gnus-agent-unplugged-hook
17226 Hook run when disconnecting from the network.
17227
17228 @item gnus-agent-fetched-hook
17229 @vindex gnus-agent-fetched-hook
17230 Hook run when after finishing fetching articles.
17231
17232 @item gnus-agent-cache
17233 @vindex gnus-agent-cache
17234 Variable to control whether use the locally stored @sc{nov} and
17235 articles when plugged, e.g. essentially using the Agent as a cache.
17236 The default is non-nil, which means to use the Agent as a cache.
17237
17238 @item gnus-agent-go-online
17239 @vindex gnus-agent-go-online
17240 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
17241 automatically switch offline servers into online status.  If it is
17242 @code{ask}, the default, the Agent will ask if you wish to switch
17243 offline servers into online status when you re-connect.  If it has any
17244 other value, all offline servers will be automatically switched into
17245 online status.
17246
17247 @item gnus-server-unopen-status
17248 @vindex gnus-server-unopen-status
17249 Perhaps not a Agent variable, but closely related to the Agent, this
17250 variable says what will happen if Gnus cannot open a server.  If the
17251 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
17252 whether to deny the server or whether to unplug the agent.  If the
17253 Agent is disabled, Gnus always simply deny the server.  Other choices
17254 for this variable include @code{denied} and @code{offline} the latter
17255 is only valid if the Agent is used.
17256
17257 @end table
17258
17259
17260 @node Example Setup
17261 @subsection Example Setup
17262
17263 If you don't want to read this manual, and you have a fairly standard
17264 setup, you may be able to use something like the following as your
17265 @file{.gnus.el} file to get started.
17266
17267 @lisp
17268 ;;; Define how Gnus is to fetch news.  We do this over @sc{nntp}
17269 ;;; from your ISP's server.
17270 (setq gnus-select-method '(nntp "news.your-isp.com"))
17271
17272 ;;; Define how Gnus is to read your mail.  We read mail from
17273 ;;; your ISP's POP server.
17274 (setq mail-sources '((pop :server "pop.your-isp.com")))
17275
17276 ;;; Say how Gnus is to store the mail.  We use nnml groups.
17277 (setq gnus-secondary-select-methods '((nnml "")))
17278
17279 ;;; Make Gnus into an offline newsreader.
17280 ;;; (gnus-agentize) ; The obsolete setting.
17281 ;;; (setq gnus-agent t) ; Now the default.
17282 @end lisp
17283
17284 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
17285 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
17286 gnus}.
17287
17288 If this is the first time you've run Gnus, you will be subscribed
17289 automatically to a few default newsgroups.  You'll probably want to
17290 subscribe to more groups, and to do that, you have to query the
17291 @sc{nntp} server for a complete list of groups with the @kbd{A A}
17292 command.  This usually takes quite a while, but you only have to do it
17293 once.
17294
17295 After reading and parsing a while, you'll be presented with a list of
17296 groups.  Subscribe to the ones you want to read with the @kbd{u}
17297 command.  @kbd{l} to make all the killed groups disappear after you've
17298 subscribe to all the groups you want to read.  (@kbd{A k} will bring
17299 back all the killed groups.)
17300
17301 You can now read the groups at once, or you can download the articles
17302 with the @kbd{J s} command.  And then read the rest of this manual to
17303 find out which of the other gazillion things you want to customize.
17304
17305
17306 @node Batching Agents
17307 @subsection Batching Agents
17308
17309 Having the Gnus Agent fetch articles (and post whatever messages you've
17310 written) is quite easy once you've gotten things set up properly.  The
17311 following shell script will do everything that is necessary:
17312
17313 @example
17314 #!/bin/sh
17315 emacs -batch -l ~/.emacs -f gnus-agent-batch >/dev/null
17316 @end example
17317
17318
17319 @node Agent Caveats
17320 @subsection Agent Caveats
17321
17322 The Gnus Agent doesn't seem to work like most other offline
17323 newsreaders.  Here are some common questions that some imaginary people
17324 may ask:
17325
17326 @table @dfn
17327 @item If I read an article while plugged, do they get entered into the Agent?
17328
17329 @strong{No}.
17330
17331 @item If I read an article while plugged, and the article already exists in the Agent, will it get downloaded once more?
17332
17333 @strong{No}, unless @code{gnus-agent-cache} is `nil'.
17334
17335 @end table
17336
17337 In short, when Gnus is unplugged, it only looks into the locally stored
17338 articles; when it's plugged, it only talks to your ISP and also uses the
17339 locally stored articles.
17340
17341
17342 @node Scoring
17343 @chapter Scoring
17344 @cindex scoring
17345
17346 Other people use @dfn{kill files}, but we here at Gnus Towers like
17347 scoring better than killing, so we'd rather switch than fight.  They do
17348 something completely different as well, so sit up straight and pay
17349 attention!
17350
17351 @vindex gnus-summary-mark-below
17352 All articles have a default score (@code{gnus-summary-default-score}),
17353 which is 0 by default.  This score may be raised or lowered either
17354 interactively or by score files.  Articles that have a score lower than
17355 @code{gnus-summary-mark-below} are marked as read.
17356
17357 Gnus will read any @dfn{score files} that apply to the current group
17358 before generating the summary buffer.
17359
17360 There are several commands in the summary buffer that insert score
17361 entries based on the current article.  You can, for instance, ask Gnus to
17362 lower or increase the score of all articles with a certain subject.
17363
17364 There are two sorts of scoring entries: Permanent and temporary.
17365 Temporary score entries are self-expiring entries.  Any entries that are
17366 temporary and have not been used for, say, a week, will be removed
17367 silently to help keep the sizes of the score files down.
17368
17369 @menu
17370 * Summary Score Commands::      Adding score entries for the current group.
17371 * Group Score Commands::        General score commands.
17372 * Score Variables::             Customize your scoring.  (My, what terminology).
17373 * Score File Format::           What a score file may contain.
17374 * Score File Editing::          You can edit score files by hand as well.
17375 * Adaptive Scoring::            Big Sister Gnus knows what you read.
17376 * Home Score File::             How to say where new score entries are to go.
17377 * Followups To Yourself::       Having Gnus notice when people answer you.
17378 * Scoring On Other Headers::    Scoring on non-standard headers.
17379 * Scoring Tips::                How to score effectively.
17380 * Reverse Scoring::             That problem child of old is not problem.
17381 * Global Score Files::          Earth-spanning, ear-splitting score files.
17382 * Kill Files::                  They are still here, but they can be ignored.
17383 * Converting Kill Files::       Translating kill files to score files.
17384 * GroupLens::                   Getting predictions on what you like to read.
17385 * Advanced Scoring::            Using logical expressions to build score rules.
17386 * Score Decays::                It can be useful to let scores wither away.
17387 @end menu
17388
17389
17390 @node Summary Score Commands
17391 @section Summary Score Commands
17392 @cindex score commands
17393
17394 The score commands that alter score entries do not actually modify real
17395 score files.  That would be too inefficient.  Gnus maintains a cache of
17396 previously loaded score files, one of which is considered the
17397 @dfn{current score file alist}.  The score commands simply insert
17398 entries into this list, and upon group exit, this list is saved.
17399
17400 The current score file is by default the group's local score file, even
17401 if no such score file actually exists.  To insert score commands into
17402 some other score file (e.g. @file{all.SCORE}), you must first make this
17403 score file the current one.
17404
17405 General score commands that don't actually change the score file:
17406
17407 @table @kbd
17408
17409 @item V s
17410 @kindex V s (Summary)
17411 @findex gnus-summary-set-score
17412 Set the score of the current article (@code{gnus-summary-set-score}).
17413
17414 @item V S
17415 @kindex V S (Summary)
17416 @findex gnus-summary-current-score
17417 Display the score of the current article
17418 (@code{gnus-summary-current-score}).
17419
17420 @item V t
17421 @kindex V t (Summary)
17422 @findex gnus-score-find-trace
17423 Display all score rules that have been used on the current article
17424 (@code{gnus-score-find-trace}).
17425
17426 @item V w
17427 @kindex V w (Summary)
17428 @findex gnus-score-find-favourite-words
17429 List words used in scoring (@code{gnus-score-find-favourite-words}).
17430
17431 @item V R
17432 @kindex V R (Summary)
17433 @findex gnus-summary-rescore
17434 Run the current summary through the scoring process
17435 (@code{gnus-summary-rescore}).  This might be useful if you're playing
17436 around with your score files behind Gnus' back and want to see the
17437 effect you're having.
17438
17439 @item V c
17440 @kindex V c (Summary)
17441 @findex gnus-score-change-score-file
17442 Make a different score file the current
17443 (@code{gnus-score-change-score-file}).
17444
17445 @item V e
17446 @kindex V e (Summary)
17447 @findex gnus-score-edit-current-scores
17448 Edit the current score file (@code{gnus-score-edit-current-scores}).
17449 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
17450 File Editing}).
17451
17452 @item V f
17453 @kindex V f (Summary)
17454 @findex gnus-score-edit-file
17455 Edit a score file and make this score file the current one
17456 (@code{gnus-score-edit-file}).
17457
17458 @item V F
17459 @kindex V F (Summary)
17460 @findex gnus-score-flush-cache
17461 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
17462 after editing score files.
17463
17464 @item V C
17465 @kindex V C (Summary)
17466 @findex gnus-score-customize
17467 Customize a score file in a visually pleasing manner
17468 (@code{gnus-score-customize}).
17469
17470 @end table
17471
17472 The rest of these commands modify the local score file.
17473
17474 @table @kbd
17475
17476 @item V m
17477 @kindex V m (Summary)
17478 @findex gnus-score-set-mark-below
17479 Prompt for a score, and mark all articles with a score below this as
17480 read (@code{gnus-score-set-mark-below}).
17481
17482 @item V x
17483 @kindex V x (Summary)
17484 @findex gnus-score-set-expunge-below
17485 Prompt for a score, and add a score rule to the current score file to
17486 expunge all articles below this score
17487 (@code{gnus-score-set-expunge-below}).
17488 @end table
17489
17490 The keystrokes for actually making score entries follow a very regular
17491 pattern, so there's no need to list all the commands.  (Hundreds of
17492 them.)
17493
17494 @findex gnus-summary-increase-score
17495 @findex gnus-summary-lower-score
17496
17497 @enumerate
17498 @item
17499 The first key is either @kbd{I} (upper case i) for increasing the score
17500 or @kbd{L} for lowering the score.
17501 @item
17502 The second key says what header you want to score on.  The following
17503 keys are available:
17504 @table @kbd
17505
17506 @item a
17507 Score on the author name.
17508
17509 @item s
17510 Score on the subject line.
17511
17512 @item x
17513 Score on the @code{Xref} line---i.e., the cross-posting line.
17514
17515 @item r
17516 Score on the @code{References} line.
17517
17518 @item d
17519 Score on the date.
17520
17521 @item l
17522 Score on the number of lines.
17523
17524 @item i
17525 Score on the @code{Message-ID} header.
17526
17527 @item e
17528 Score on an "extra" header, that is, one of those in gnus-extra-headers,
17529 if your @sc{nntp} server tracks additional header data in overviews.
17530
17531 @item f
17532 Score on followups---this matches the author name, and adds scores to
17533 the followups to this author.  (Using this key leads to the creation of
17534 @file{ADAPT} files.)
17535
17536 @item b
17537 Score on the body.
17538
17539 @item h
17540 Score on the head.
17541
17542 @item t
17543 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
17544 files.)
17545
17546 @end table
17547
17548 @item
17549 The third key is the match type.  Which match types are valid depends on
17550 what headers you are scoring on.
17551
17552 @table @code
17553
17554 @item strings
17555
17556 @table @kbd
17557
17558 @item e
17559 Exact matching.
17560
17561 @item s
17562 Substring matching.
17563
17564 @item f
17565 Fuzzy matching (@pxref{Fuzzy Matching}).
17566
17567 @item r
17568 Regexp matching
17569 @end table
17570
17571 @item date
17572 @table @kbd
17573
17574 @item b
17575 Before date.
17576
17577 @item a
17578 After date.
17579
17580 @item n
17581 This date.
17582 @end table
17583
17584 @item number
17585 @table @kbd
17586
17587 @item <
17588 Less than number.
17589
17590 @item =
17591 Equal to number.
17592
17593 @item >
17594 Greater than number.
17595 @end table
17596 @end table
17597
17598 @item
17599 The fourth and usually final key says whether this is a temporary (i.e.,
17600 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
17601 or whether it is to be done immediately, without adding to the score
17602 file.
17603 @table @kbd
17604
17605 @item t
17606 Temporary score entry.
17607
17608 @item p
17609 Permanent score entry.
17610
17611 @item i
17612 Immediately scoring.
17613 @end table
17614
17615 @item
17616 If you are scoring on `e' (extra) headers, you will then be prompted for
17617 the header name on which you wish to score.  This must be a header named
17618 in gnus-extra-headers, and @samp{TAB} completion is available.
17619
17620 @end enumerate
17621
17622 So, let's say you want to increase the score on the current author with
17623 exact matching permanently: @kbd{I a e p}.  If you want to lower the
17624 score based on the subject line, using substring matching, and make a
17625 temporary score entry: @kbd{L s s t}.  Pretty easy.
17626
17627 To make things a bit more complicated, there are shortcuts.  If you use
17628 a capital letter on either the second or third keys, Gnus will use
17629 defaults for the remaining one or two keystrokes.  The defaults are
17630 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
17631 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
17632
17633 These functions take both the numerical prefix and the symbolic prefix
17634 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
17635 (or increase) the score of the article.  A symbolic prefix of @code{a}
17636 says to use the @file{all.SCORE} file for the command instead of the
17637 current score file.
17638
17639 @vindex gnus-score-mimic-keymap
17640 The @code{gnus-score-mimic-keymap} says whether these commands will
17641 pretend they are keymaps or not.
17642
17643
17644 @node Group Score Commands
17645 @section Group Score Commands
17646 @cindex group score commands
17647
17648 There aren't many of these as yet, I'm afraid.
17649
17650 @table @kbd
17651
17652 @item W f
17653 @kindex W f (Group)
17654 @findex gnus-score-flush-cache
17655 Gnus maintains a cache of score alists to avoid having to reload them
17656 all the time.  This command will flush the cache
17657 (@code{gnus-score-flush-cache}).
17658
17659 @end table
17660
17661 You can do scoring from the command line by saying something like:
17662
17663 @findex gnus-batch-score
17664 @cindex batch scoring
17665 @example
17666 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
17667 @end example
17668
17669
17670 @node Score Variables
17671 @section Score Variables
17672 @cindex score variables
17673
17674 @table @code
17675
17676 @item gnus-use-scoring
17677 @vindex gnus-use-scoring
17678 If @code{nil}, Gnus will not check for score files, and will not, in
17679 general, do any score-related work.  This is @code{t} by default.
17680
17681 @item gnus-kill-killed
17682 @vindex gnus-kill-killed
17683 If this variable is @code{nil}, Gnus will never apply score files to
17684 articles that have already been through the kill process.  While this
17685 may save you lots of time, it also means that if you apply a kill file
17686 to a group, and then change the kill file and want to run it over you
17687 group again to kill more articles, it won't work.  You have to set this
17688 variable to @code{t} to do that.  (It is @code{t} by default.)
17689
17690 @item gnus-kill-files-directory
17691 @vindex gnus-kill-files-directory
17692 All kill and score files will be stored in this directory, which is
17693 initialized from the @code{SAVEDIR} environment variable by default.
17694 This is @file{~/News/} by default.
17695
17696 @item gnus-score-file-suffix
17697 @vindex gnus-score-file-suffix
17698 Suffix to add to the group name to arrive at the score file name
17699 (@samp{SCORE} by default.)
17700
17701 @item gnus-score-uncacheable-files
17702 @vindex gnus-score-uncacheable-files
17703 @cindex score cache
17704 All score files are normally cached to avoid excessive re-loading of
17705 score files.  However, if this might make your Emacs grow big and
17706 bloated, so this regexp can be used to weed out score files unlikely to be needed again.  It would be a bad idea to deny caching of
17707 @file{all.SCORE}, while it might be a good idea to not cache
17708 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
17709 variable is @samp{ADAPT$} by default, so no adaptive score files will
17710 be cached.
17711
17712 @item gnus-save-score
17713 @vindex gnus-save-score
17714 If you have really complicated score files, and do lots of batch
17715 scoring, then you might set this variable to @code{t}.  This will make
17716 Gnus save the scores into the @file{.newsrc.eld} file.
17717
17718 If you do not set this to @code{t}, then manual scores (like those set
17719 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
17720 across group visits.
17721
17722 @item gnus-score-interactive-default-score
17723 @vindex gnus-score-interactive-default-score
17724 Score used by all the interactive raise/lower commands to raise/lower
17725 score with.  Default is 1000, which may seem excessive, but this is to
17726 ensure that the adaptive scoring scheme gets enough room to play with.
17727 We don't want the small changes from the adaptive scoring to overwrite
17728 manually entered data.
17729
17730 @item gnus-summary-default-score
17731 @vindex gnus-summary-default-score
17732 Default score of an article, which is 0 by default.
17733
17734 @item gnus-summary-expunge-below
17735 @vindex gnus-summary-expunge-below
17736 Don't display the summary lines of articles that have scores lower than
17737 this variable.  This is @code{nil} by default, which means that no
17738 articles will be hidden.  This variable is local to the summary buffers,
17739 and has to be set from @code{gnus-summary-mode-hook}.
17740
17741 @item gnus-score-over-mark
17742 @vindex gnus-score-over-mark
17743 Mark (in the third column) used for articles with a score over the
17744 default.  Default is @samp{+}.
17745
17746 @item gnus-score-below-mark
17747 @vindex gnus-score-below-mark
17748 Mark (in the third column) used for articles with a score below the
17749 default.  Default is @samp{-}.
17750
17751 @item gnus-score-find-score-files-function
17752 @vindex gnus-score-find-score-files-function
17753 Function used to find score files for the current group.  This function
17754 is called with the name of the group as the argument.
17755
17756 Predefined functions available are:
17757 @table @code
17758
17759 @item gnus-score-find-single
17760 @findex gnus-score-find-single
17761 Only apply the group's own score file.
17762
17763 @item gnus-score-find-bnews
17764 @findex gnus-score-find-bnews
17765 Apply all score files that match, using bnews syntax.  This is the
17766 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
17767 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
17768 @file{gnu.all.SCORE} would all apply.  In short, the instances of
17769 @samp{all} in the score file names are translated into @samp{.*}, and
17770 then a regexp match is done.
17771
17772 This means that if you have some score entries that you want to apply to
17773 all groups, then you put those entries in the @file{all.SCORE} file.
17774
17775 The score files are applied in a semi-random order, although Gnus will
17776 try to apply the more general score files before the more specific score
17777 files.  It does this by looking at the number of elements in the score
17778 file names---discarding the @samp{all} elements.
17779
17780 @item gnus-score-find-hierarchical
17781 @findex gnus-score-find-hierarchical
17782 Apply all score files from all the parent groups.  This means that you
17783 can't have score files like @file{all.SCORE}, but you can have
17784 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
17785 server.
17786
17787 @end table
17788 This variable can also be a list of functions.  In that case, all
17789 these functions will be called with the group name as argument, and
17790 all the returned lists of score files will be applied.  These
17791 functions can also return lists of lists of score alists directly.  In
17792 that case, the functions that return these non-file score alists
17793 should probably be placed before the ``real'' score file functions, to
17794 ensure that the last score file returned is the local score file.
17795 Phu.
17796
17797 For example, to do hierarchical scoring but use a non-server-specific
17798 overall score file, you could use the value
17799 @example
17800 (list (lambda (group) ("all.SCORE"))
17801       'gnus-score-find-hierarchical)
17802 @end example
17803
17804 @item gnus-score-expiry-days
17805 @vindex gnus-score-expiry-days
17806 This variable says how many days should pass before an unused score file
17807 entry is expired.  If this variable is @code{nil}, no score file entries
17808 are expired.  It's 7 by default.
17809
17810 @item gnus-update-score-entry-dates
17811 @vindex gnus-update-score-entry-dates
17812 If this variable is non-@code{nil}, temporary score entries that have
17813 been triggered (matched) will have their dates updated.  (This is how Gnus
17814 controls expiry---all non-matched-entries will become too old while
17815 matched entries will stay fresh and young.)  However, if you set this
17816 variable to @code{nil}, even matched entries will grow old and will
17817 have to face that oh-so grim reaper.
17818
17819 @item gnus-score-after-write-file-function
17820 @vindex gnus-score-after-write-file-function
17821 Function called with the name of the score file just written.
17822
17823 @item gnus-score-thread-simplify
17824 @vindex gnus-score-thread-simplify
17825 If this variable is non-@code{nil}, article subjects will be simplified
17826 for subject scoring purposes in the same manner as with
17827 threading---according to the current value of
17828 gnus-simplify-subject-functions.  If the scoring entry uses
17829 @code{substring} or @code{exact} matching, the match will also be
17830 simplified in this manner.
17831
17832 @end table
17833
17834
17835 @node Score File Format
17836 @section Score File Format
17837 @cindex score file format
17838
17839 A score file is an @code{emacs-lisp} file that normally contains just a
17840 single form.  Casual users are not expected to edit these files;
17841 everything can be changed from the summary buffer.
17842
17843 Anyway, if you'd like to dig into it yourself, here's an example:
17844
17845 @lisp
17846 (("from"
17847   ("Lars Ingebrigtsen" -10000)
17848   ("Per Abrahamsen")
17849   ("larsi\\|lmi" -50000 nil R))
17850  ("subject"
17851   ("Ding is Badd" nil 728373))
17852  ("xref"
17853   ("alt.politics" -1000 728372 s))
17854  ("lines"
17855   (2 -100 nil <))
17856  (mark 0)
17857  (expunge -1000)
17858  (mark-and-expunge -10)
17859  (read-only nil)
17860  (orphan -10)
17861  (adapt t)
17862  (files "/hom/larsi/News/gnu.SCORE")
17863  (exclude-files "all.SCORE")
17864  (local (gnus-newsgroup-auto-expire t)
17865         (gnus-summary-make-false-root empty))
17866  (eval (ding)))
17867 @end lisp
17868
17869 This example demonstrates most score file elements.  For a different
17870 approach, see @pxref{Advanced Scoring}.
17871
17872 Even though this looks much like lisp code, nothing here is actually
17873 @code{eval}ed.  The lisp reader is used to read this form, though, so it
17874 has to be valid syntactically, if not semantically.
17875
17876 Six keys are supported by this alist:
17877
17878 @table @code
17879
17880 @item STRING
17881 If the key is a string, it is the name of the header to perform the
17882 match on.  Scoring can only be performed on these eight headers:
17883 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
17884 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
17885 these headers, there are three strings to tell Gnus to fetch the entire
17886 article and do the match on larger parts of the article: @code{Body}
17887 will perform the match on the body of the article, @code{Head} will
17888 perform the match on the head of the article, and @code{All} will
17889 perform the match on the entire article.  Note that using any of these
17890 last three keys will slow down group entry @emph{considerably}.  The
17891 final ``header'' you can score on is @code{Followup}.  These score
17892 entries will result in new score entries being added for all follow-ups
17893 to articles that matches these score entries.
17894
17895 Following this key is a arbitrary number of score entries, where each
17896 score entry has one to four elements.
17897 @enumerate
17898
17899 @item
17900 The first element is the @dfn{match element}.  On most headers this will
17901 be a string, but on the Lines and Chars headers, this must be an
17902 integer.
17903
17904 @item
17905 If the second element is present, it should be a number---the @dfn{score
17906 element}.  This number should be an integer in the neginf to posinf
17907 interval.  This number is added to the score of the article if the match
17908 is successful.  If this element is not present, the
17909 @code{gnus-score-interactive-default-score} number will be used
17910 instead.  This is 1000 by default.
17911
17912 @item
17913 If the third element is present, it should be a number---the @dfn{date
17914 element}.  This date says when the last time this score entry matched,
17915 which provides a mechanism for expiring the score entries.  It this
17916 element is not present, the score entry is permanent.  The date is
17917 represented by the number of days since December 31, 1 BCE.
17918
17919 @item
17920 If the fourth element is present, it should be a symbol---the @dfn{type
17921 element}.  This element specifies what function should be used to see
17922 whether this score entry matches the article.  What match types that can
17923 be used depends on what header you wish to perform the match on.
17924 @table @dfn
17925
17926 @item From, Subject, References, Xref, Message-ID
17927 For most header types, there are the @code{r} and @code{R} (regexp), as
17928 well as @code{s} and @code{S} (substring) types, and @code{e} and
17929 @code{E} (exact match), and @code{w} (word match) types.  If this
17930 element is not present, Gnus will assume that substring matching should
17931 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
17932 that the matches will be done in a case-sensitive manner.  All these
17933 one-letter types are really just abbreviations for the @code{regexp},
17934 @code{string}, @code{exact}, and @code{word} types, which you can use
17935 instead, if you feel like.
17936
17937 @item Extra
17938 Just as for the standard string overview headers, if you are using
17939 gnus-extra-headers, you can score on these headers' values.  In this
17940 case, there is a 5th element in the score entry, being the name of the
17941 header to be scored.  The following entry is useful in your
17942 @file{all.SCORE} file in case of spam attacks from a single origin host,
17943 if your @sc{nntp} server tracks NNTP-Posting-Host in overviews:
17944
17945 @lisp
17946 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
17947 @end lisp
17948
17949 @item Lines, Chars
17950 These two headers use different match types: @code{<}, @code{>},
17951 @code{=}, @code{>=} and @code{<=}.
17952
17953 These predicates are true if
17954
17955 @example
17956 (PREDICATE HEADER MATCH)
17957 @end example
17958
17959 evaluates to non-@code{nil}.  For instance, the advanced match
17960 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
17961 following form:
17962
17963 @lisp
17964 (< header-value 4)
17965 @end lisp
17966
17967 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
17968 the match, we get the score added if the article has less than 4 lines.
17969 (It's easy to get confused and think it's the other way around.  But
17970 it's not.  I think.)
17971
17972 When matching on @code{Lines}, be careful because some back ends (like
17973 @code{nndir}) do not generate @code{Lines} header, so every article ends
17974 up being marked as having 0 lines.  This can lead to strange results if
17975 you happen to lower score of the articles with few lines.
17976
17977 @item Date
17978 For the Date header we have three kinda silly match types:
17979 @code{before}, @code{at} and @code{after}.  I can't really imagine this
17980 ever being useful, but, like, it would feel kinda silly not to provide
17981 this function.  Just in case.  You never know.  Better safe than sorry.
17982 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
17983 sex on a first date.  (I have been told that at least one person, and I
17984 quote, ``found this function indispensable'', however.)
17985
17986 @cindex ISO8601
17987 @cindex date
17988 A more useful match type is @code{regexp}.  With it, you can match the
17989 date string using a regular expression.  The date is normalized to
17990 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
17991 you want to match all articles that have been posted on April 1st in
17992 every year, you could use @samp{....0401.........} as a match string,
17993 for instance.  (Note that the date is kept in its original time zone, so
17994 this will match articles that were posted when it was April 1st where
17995 the article was posted from.  Time zones are such wholesome fun for the
17996 whole family, eh?)
17997
17998 @item Head, Body, All
17999 These three match keys use the same match types as the @code{From} (etc)
18000 header uses.
18001
18002 @item Followup
18003 This match key is somewhat special, in that it will match the
18004 @code{From} header, and affect the score of not only the matching
18005 articles, but also all followups to the matching articles.  This allows
18006 you e.g. increase the score of followups to your own articles, or
18007 decrease the score of followups to the articles of some known
18008 trouble-maker.  Uses the same match types as the @code{From} header
18009 uses.  (Using this match key will lead to creation of @file{ADAPT}
18010 files.)
18011
18012 @item Thread
18013 This match key works along the same lines as the @code{Followup} match
18014 key.  If you say that you want to score on a (sub-)thread started by an
18015 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
18016 match.  This will add a new @samp{thread} match for each article that
18017 has @var{x} in its @code{References} header.  (These new @samp{thread}
18018 matches will use the @code{Message-ID}s of these matching articles.)
18019 This will ensure that you can raise/lower the score of an entire thread,
18020 even though some articles in the thread may not have complete
18021 @code{References} headers.  Note that using this may lead to
18022 undeterministic scores of the articles in the thread.  (Using this match
18023 key will lead to creation of @file{ADAPT} files.)
18024 @end table
18025 @end enumerate
18026
18027 @cindex Score File Atoms
18028 @item mark
18029 The value of this entry should be a number.  Any articles with a score
18030 lower than this number will be marked as read.
18031
18032 @item expunge
18033 The value of this entry should be a number.  Any articles with a score
18034 lower than this number will be removed from the summary buffer.
18035
18036 @item mark-and-expunge
18037 The value of this entry should be a number.  Any articles with a score
18038 lower than this number will be marked as read and removed from the
18039 summary buffer.
18040
18041 @item thread-mark-and-expunge
18042 The value of this entry should be a number.  All articles that belong to
18043 a thread that has a total score below this number will be marked as read
18044 and removed from the summary buffer.  @code{gnus-thread-score-function}
18045 says how to compute the total score for a thread.
18046
18047 @item files
18048 The value of this entry should be any number of file names.  These files
18049 are assumed to be score files as well, and will be loaded the same way
18050 this one was.
18051
18052 @item exclude-files
18053 The clue of this entry should be any number of files.  These files will
18054 not be loaded, even though they would normally be so, for some reason or
18055 other.
18056
18057 @item eval
18058 The value of this entry will be @code{eval}el.  This element will be
18059 ignored when handling global score files.
18060
18061 @item read-only
18062 Read-only score files will not be updated or saved.  Global score files
18063 should feature this atom (@pxref{Global Score Files}).  (Note:
18064 @dfn{Global} here really means @dfn{global}; not your personal
18065 apply-to-all-groups score files.)
18066
18067 @item orphan
18068 The value of this entry should be a number.  Articles that do not have
18069 parents will get this number added to their scores.  Imagine you follow
18070 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
18071 will only follow a few of the threads, also want to see any new threads.
18072
18073 You can do this with the following two score file entries:
18074
18075 @example
18076         (orphan -500)
18077         (mark-and-expunge -100)
18078 @end example
18079
18080 When you enter the group the first time, you will only see the new
18081 threads.  You then raise the score of the threads that you find
18082 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
18083 rest.  Next time you enter the group, you will see new articles in the
18084 interesting threads, plus any new threads.
18085
18086 I.e.---the orphan score atom is for high-volume groups where a few
18087 interesting threads which can't be found automatically by ordinary
18088 scoring rules exist.
18089
18090 @item adapt
18091 This entry controls the adaptive scoring.  If it is @code{t}, the
18092 default adaptive scoring rules will be used.  If it is @code{ignore}, no
18093 adaptive scoring will be performed on this group.  If it is a list, this
18094 list will be used as the adaptive scoring rules.  If it isn't present,
18095 or is something other than @code{t} or @code{ignore}, the default
18096 adaptive scoring rules will be used.  If you want to use adaptive
18097 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
18098 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
18099 not want adaptive scoring.  If you only want adaptive scoring in a few
18100 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
18101 insert @code{(adapt t)} in the score files of the groups where you want
18102 it.
18103
18104 @item adapt-file
18105 All adaptive score entries will go to the file named by this entry.  It
18106 will also be applied when entering the group.  This atom might be handy
18107 if you want to adapt on several groups at once, using the same adaptive
18108 file for a number of groups.
18109
18110 @item local
18111 @cindex local variables
18112 The value of this entry should be a list of @code{(VAR VALUE)} pairs.
18113 Each @var{var} will be made buffer-local to the current summary buffer,
18114 and set to the value specified.  This is a convenient, if somewhat
18115 strange, way of setting variables in some groups if you don't like hooks
18116 much.  Note that the @var{value} won't be evaluated.
18117 @end table
18118
18119
18120 @node Score File Editing
18121 @section Score File Editing
18122
18123 You normally enter all scoring commands from the summary buffer, but you
18124 might feel the urge to edit them by hand as well, so we've supplied you
18125 with a mode for that.
18126
18127 It's simply a slightly customized @code{emacs-lisp} mode, with these
18128 additional commands:
18129
18130 @table @kbd
18131
18132 @item C-c C-c
18133 @kindex C-c C-c (Score)
18134 @findex gnus-score-edit-done
18135 Save the changes you have made and return to the summary buffer
18136 (@code{gnus-score-edit-done}).
18137
18138 @item C-c C-d
18139 @kindex C-c C-d (Score)
18140 @findex gnus-score-edit-insert-date
18141 Insert the current date in numerical format
18142 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
18143 you were wondering.
18144
18145 @item C-c C-p
18146 @kindex C-c C-p (Score)
18147 @findex gnus-score-pretty-print
18148 The adaptive score files are saved in an unformatted fashion.  If you
18149 intend to read one of these files, you want to @dfn{pretty print} it
18150 first.  This command (@code{gnus-score-pretty-print}) does that for
18151 you.
18152
18153 @end table
18154
18155 Type @kbd{M-x gnus-score-mode} to use this mode.
18156
18157 @vindex gnus-score-mode-hook
18158 @code{gnus-score-menu-hook} is run in score mode buffers.
18159
18160 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
18161 e} to begin editing score files.
18162
18163
18164 @node Adaptive Scoring
18165 @section Adaptive Scoring
18166 @cindex adaptive scoring
18167
18168 If all this scoring is getting you down, Gnus has a way of making it all
18169 happen automatically---as if by magic.  Or rather, as if by artificial
18170 stupidity, to be precise.
18171
18172 @vindex gnus-use-adaptive-scoring
18173 When you read an article, or mark an article as read, or kill an
18174 article, you leave marks behind.  On exit from the group, Gnus can sniff
18175 these marks and add score elements depending on what marks it finds.
18176 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
18177 @code{t} or @code{(line)}.  If you want score adaptively on separate
18178 words appearing in the subjects, you should set this variable to
18179 @code{(word)}.  If you want to use both adaptive methods, set this
18180 variable to @code{(word line)}.
18181
18182 @vindex gnus-default-adaptive-score-alist
18183 To give you complete control over the scoring process, you can customize
18184 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
18185 might look something like this:
18186
18187 @lisp
18188 (setq gnus-default-adaptive-score-alist
18189   '((gnus-unread-mark)
18190     (gnus-ticked-mark (from 4))
18191     (gnus-dormant-mark (from 5))
18192     (gnus-del-mark (from -4) (subject -1))
18193     (gnus-read-mark (from 4) (subject 2))
18194     (gnus-expirable-mark (from -1) (subject -1))
18195     (gnus-killed-mark (from -1) (subject -3))
18196     (gnus-kill-file-mark)
18197     (gnus-ancient-mark)
18198     (gnus-low-score-mark)
18199     (gnus-catchup-mark (from -1) (subject -1))))
18200 @end lisp
18201
18202 As you see, each element in this alist has a mark as a key (either a
18203 variable name or a ``real'' mark---a character).  Following this key is
18204 a arbitrary number of header/score pairs.  If there are no header/score
18205 pairs following the key, no adaptive scoring will be done on articles
18206 that have that key as the article mark.  For instance, articles with
18207 @code{gnus-unread-mark} in the example above will not get adaptive score
18208 entries.
18209
18210 Each article can have only one mark, so just a single of these rules
18211 will be applied to each article.
18212
18213 To take @code{gnus-del-mark} as an example---this alist says that all
18214 articles that have that mark (i.e., are marked with @samp{D}) will have a
18215 score entry added to lower based on the @code{From} header by -4, and
18216 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
18217
18218 If you have marked 10 articles with the same subject with
18219 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
18220 That means that that subject will get a score of ten times -1, which
18221 should be, unless I'm much mistaken, -10.
18222
18223 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
18224 the read articles will be marked with the @samp{E} mark.  This'll
18225 probably make adaptive scoring slightly impossible, so auto-expiring and
18226 adaptive scoring doesn't really mix very well.
18227
18228 The headers you can score on are @code{from}, @code{subject},
18229 @code{message-id}, @code{references}, @code{xref}, @code{lines},
18230 @code{chars} and @code{date}.  In addition, you can score on
18231 @code{followup}, which will create an adaptive score entry that matches
18232 on the @code{References} header using the @code{Message-ID} of the
18233 current article, thereby matching the following thread.
18234
18235 You can also score on @code{thread}, which will try to score all
18236 articles that appear in a thread.  @code{thread} matches uses a
18237 @code{Message-ID} to match on the @code{References} header of the
18238 article.  If the match is made, the @code{Message-ID} of the article is
18239 added to the @code{thread} rule.  (Think about it.  I'd recommend two
18240 aspirins afterwards.)
18241
18242 If you use this scheme, you should set the score file atom @code{mark}
18243 to something small---like -300, perhaps, to avoid having small random
18244 changes result in articles getting marked as read.
18245
18246 After using adaptive scoring for a week or so, Gnus should start to
18247 become properly trained and enhance the authors you like best, and kill
18248 the authors you like least, without you having to say so explicitly.
18249
18250 You can control what groups the adaptive scoring is to be performed on
18251 by using the score files (@pxref{Score File Format}).  This will also
18252 let you use different rules in different groups.
18253
18254 @vindex gnus-adaptive-file-suffix
18255 The adaptive score entries will be put into a file where the name is the
18256 group name with @code{gnus-adaptive-file-suffix} appended.  The default
18257 is @samp{ADAPT}.
18258
18259 @vindex gnus-score-exact-adapt-limit
18260 When doing adaptive scoring, substring or fuzzy matching would probably
18261 give you the best results in most cases.  However, if the header one
18262 matches is short, the possibility for false positives is great, so if
18263 the length of the match is less than
18264 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
18265 this variable is @code{nil}, exact matching will always be used to avoid
18266 this problem.
18267
18268 @vindex gnus-default-adaptive-word-score-alist
18269 As mentioned above, you can adapt either on individual words or entire
18270 headers.  If you adapt on words, the
18271 @code{gnus-default-adaptive-word-score-alist} variable says what score
18272 each instance of a word should add given a mark.
18273
18274 @lisp
18275 (setq gnus-default-adaptive-word-score-alist
18276       `((,gnus-read-mark . 30)
18277         (,gnus-catchup-mark . -10)
18278         (,gnus-killed-mark . -20)
18279         (,gnus-del-mark . -15)))
18280 @end lisp
18281
18282 This is the default value.  If you have adaption on words enabled, every
18283 word that appears in subjects of articles marked with
18284 @code{gnus-read-mark} will result in a score rule that increase the
18285 score with 30 points.
18286
18287 @vindex gnus-default-ignored-adaptive-words
18288 @vindex gnus-ignored-adaptive-words
18289 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
18290 will be ignored.  If you wish to add more words to be ignored, use the
18291 @code{gnus-ignored-adaptive-words} list instead.
18292
18293 @vindex gnus-adaptive-word-length-limit
18294 Some may feel that short words shouldn't count when doing adaptive
18295 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
18296 an integer.  Words shorter than this number will be ignored.  This
18297 variable defaults to @code{nil}.
18298
18299 @vindex gnus-adaptive-word-syntax-table
18300 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
18301 syntax table in effect.  It is similar to the standard syntax table, but
18302 it considers numbers to be non-word-constituent characters.
18303
18304 @vindex gnus-adaptive-word-minimum
18305 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
18306 word scoring process will never bring down the score of an article to
18307 below this number.  The default is @code{nil}.
18308
18309 @vindex gnus-adaptive-word-no-group-words
18310 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
18311 won't adaptively word score any of the words in the group name.  Useful
18312 for groups like @samp{comp.editors.emacs}, where most of the subject
18313 lines contain the word @samp{emacs}.
18314
18315 After using this scheme for a while, it might be nice to write a
18316 @code{gnus-psychoanalyze-user} command to go through the rules and see
18317 what words you like and what words you don't like.  Or perhaps not.
18318
18319 Note that the adaptive word scoring thing is highly experimental and is
18320 likely to change in the future.  Initial impressions seem to indicate
18321 that it's totally useless as it stands.  Some more work (involving more
18322 rigorous statistical methods) will have to be done to make this useful.
18323
18324
18325 @node Home Score File
18326 @section Home Score File
18327
18328 The score file where new score file entries will go is called the
18329 @dfn{home score file}.  This is normally (and by default) the score file
18330 for the group itself.  For instance, the home score file for
18331 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
18332
18333 However, this may not be what you want.  It is often convenient to share
18334 a common home score file among many groups---all @samp{emacs} groups
18335 could perhaps use the same home score file.
18336
18337 @vindex gnus-home-score-file
18338 The variable that controls this is @code{gnus-home-score-file}.  It can
18339 be:
18340
18341 @enumerate
18342 @item
18343 A string.  Then this file will be used as the home score file for all
18344 groups.
18345
18346 @item
18347 A function.  The result of this function will be used as the home score
18348 file.  The function will be called with the name of the group as the
18349 parameter.
18350
18351 @item
18352 A list.  The elements in this list can be:
18353
18354 @enumerate
18355 @item
18356 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
18357 group name, the @var{file-name} will be used as the home score file.
18358
18359 @item
18360 A function.  If the function returns non-nil, the result will be used as
18361 the home score file.
18362
18363 @item
18364 A string.  Use the string as the home score file.
18365 @end enumerate
18366
18367 The list will be traversed from the beginning towards the end looking
18368 for matches.
18369
18370 @end enumerate
18371
18372 So, if you want to use just a single score file, you could say:
18373
18374 @lisp
18375 (setq gnus-home-score-file
18376       "my-total-score-file.SCORE")
18377 @end lisp
18378
18379 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
18380 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
18381
18382 @findex gnus-hierarchial-home-score-file
18383 @lisp
18384 (setq gnus-home-score-file
18385       'gnus-hierarchial-home-score-file)
18386 @end lisp
18387
18388 This is a ready-made function provided for your convenience.
18389 Other functions include
18390
18391 @table @code
18392 @item gnus-current-home-score-file
18393 @findex gnus-current-home-score-file
18394 Return the ``current'' regular score file.  This will make scoring
18395 commands add entry to the ``innermost'' matching score file.
18396
18397 @end table
18398
18399 If you want to have one score file for the @samp{emacs} groups and
18400 another for the @samp{comp} groups, while letting all other groups use
18401 their own home score files:
18402
18403 @lisp
18404 (setq gnus-home-score-file
18405       ;; All groups that match the regexp "\\.emacs"
18406       '(("\\.emacs" "emacs.SCORE")
18407         ;; All the comp groups in one score file
18408         ("^comp" "comp.SCORE")))
18409 @end lisp
18410
18411 @vindex gnus-home-adapt-file
18412 @code{gnus-home-adapt-file} works exactly the same way as
18413 @code{gnus-home-score-file}, but says what the home adaptive score file
18414 is instead.  All new adaptive file entries will go into the file
18415 specified by this variable, and the same syntax is allowed.
18416
18417 In addition to using @code{gnus-home-score-file} and
18418 @code{gnus-home-adapt-file}, you can also use group parameters
18419 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
18420 Parameters}) to achieve much the same.  Group and topic parameters take
18421 precedence over this variable.
18422
18423
18424 @node Followups To Yourself
18425 @section Followups To Yourself
18426
18427 Gnus offers two commands for picking out the @code{Message-ID} header in
18428 the current buffer.  Gnus will then add a score rule that scores using
18429 this @code{Message-ID} on the @code{References} header of other
18430 articles.  This will, in effect, increase the score of all articles that
18431 respond to the article in the current buffer.  Quite useful if you want
18432 to easily note when people answer what you've said.
18433
18434 @table @code
18435
18436 @item gnus-score-followup-article
18437 @findex gnus-score-followup-article
18438 This will add a score to articles that directly follow up your own
18439 article.
18440
18441 @item gnus-score-followup-thread
18442 @findex gnus-score-followup-thread
18443 This will add a score to all articles that appear in a thread ``below''
18444 your own article.
18445 @end table
18446
18447 @vindex message-sent-hook
18448 These two functions are both primarily meant to be used in hooks like
18449 @code{message-sent-hook}, like this:
18450 @lisp
18451 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
18452 @end lisp
18453
18454
18455 If you look closely at your own @code{Message-ID}, you'll notice that
18456 the first two or three characters are always the same.  Here's two of
18457 mine:
18458
18459 @example
18460 <x6u3u47icf.fsf@@eyesore.no>
18461 <x6sp9o7ibw.fsf@@eyesore.no>
18462 @end example
18463
18464 So ``my'' ident on this machine is @samp{x6}.  This can be
18465 exploited---the following rule will raise the score on all followups to
18466 myself:
18467
18468 @lisp
18469 ("references"
18470  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
18471   1000 nil r))
18472 @end lisp
18473
18474 Whether it's the first two or first three characters that are ``yours''
18475 is system-dependent.
18476
18477
18478 @node Scoring On Other Headers
18479 @section Scoring On Other Headers
18480 @cindex scoring on other headers
18481
18482 Gnus is quite fast when scoring the ``traditional''
18483 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
18484 other headers requires writing a @code{head} scoring rule, which means
18485 that Gnus has to request every single article from the back end to find
18486 matches.  This takes a long time in big groups.
18487
18488 Now, there's not much you can do about this for news groups, but for
18489 mail groups, you have greater control.  In the @pxref{To From
18490 Newsgroups} section of the manual, it's explained in greater detail what
18491 this mechanism does, but here's a cookbook example for @code{nnml} on
18492 how to allow scoring on the @samp{To} and @samp{Cc} headers.
18493
18494 Put the following in your @file{.gnus.el} file.
18495
18496 @lisp
18497 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
18498       nnmail-extra-headers gnus-extra-headers)
18499 @end lisp
18500
18501 Restart Gnus and rebuild your @code{nnml} overview files with the
18502 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
18503 time if you have much mail.
18504
18505 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
18506 so: @kbd{I e s p To RET <your name> RET}.
18507
18508 See?  Simple.
18509
18510
18511 @node Scoring Tips
18512 @section Scoring Tips
18513 @cindex scoring tips
18514
18515 @table @dfn
18516
18517 @item Crossposts
18518 @cindex crossposts
18519 @cindex scoring crossposts
18520 If you want to lower the score of crossposts, the line to match on is
18521 the @code{Xref} header.
18522 @lisp
18523 ("xref" (" talk.politics.misc:" -1000))
18524 @end lisp
18525
18526 @item Multiple crossposts
18527 If you want to lower the score of articles that have been crossposted to
18528 more than, say, 3 groups:
18529 @lisp
18530 ("xref"
18531   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
18532    -1000 nil r))
18533 @end lisp
18534
18535 @item Matching on the body
18536 This is generally not a very good idea---it takes a very long time.
18537 Gnus actually has to fetch each individual article from the server.  But
18538 you might want to anyway, I guess.  Even though there are three match
18539 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
18540 and stick with it in each score file.  If you use any two, each article
18541 will be fetched @emph{twice}.  If you want to match a bit on the
18542 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
18543 the matches.
18544
18545 @item Marking as read
18546 You will probably want to mark articles that have scores below a certain
18547 number as read.  This is most easily achieved by putting the following
18548 in your @file{all.SCORE} file:
18549 @lisp
18550 ((mark -100))
18551 @end lisp
18552 You may also consider doing something similar with @code{expunge}.
18553
18554 @item Negated character classes
18555 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
18556 That will match newlines, which might lead to, well, The Unknown.  Say
18557 @code{[^abcd\n]*} instead.
18558 @end table
18559
18560
18561 @node Reverse Scoring
18562 @section Reverse Scoring
18563 @cindex reverse scoring
18564
18565 If you want to keep just articles that have @samp{Sex with Emacs} in the
18566 subject header, and expunge all other articles, you could put something
18567 like this in your score file:
18568
18569 @lisp
18570 (("subject"
18571   ("Sex with Emacs" 2))
18572  (mark 1)
18573  (expunge 1))
18574 @end lisp
18575
18576 So, you raise all articles that match @samp{Sex with Emacs} and mark the
18577 rest as read, and expunge them to boot.
18578
18579
18580 @node Global Score Files
18581 @section Global Score Files
18582 @cindex global score files
18583
18584 Sure, other newsreaders have ``global kill files''.  These are usually
18585 nothing more than a single kill file that applies to all groups, stored
18586 in the user's home directory.  Bah!  Puny, weak newsreaders!
18587
18588 What I'm talking about here are Global Score Files.  Score files from
18589 all over the world, from users everywhere, uniting all nations in one
18590 big, happy score file union!  Ange-score!  New and untested!
18591
18592 @vindex gnus-global-score-files
18593 All you have to do to use other people's score files is to set the
18594 @code{gnus-global-score-files} variable.  One entry for each score file,
18595 or each score file directory.  Gnus will decide by itself what score
18596 files are applicable to which group.
18597
18598 To use the score file
18599 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
18600 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
18601 say this:
18602
18603 @lisp
18604 (setq gnus-global-score-files
18605       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
18606         "/ftp@@ftp.some-where:/pub/score/"))
18607 @end lisp
18608
18609 @findex gnus-score-search-global-directories
18610 @noindent
18611 Simple, eh?  Directory names must end with a @samp{/}.  These
18612 directories are typically scanned only once during each Gnus session.
18613 If you feel the need to manually re-scan the remote directories, you can
18614 use the @code{gnus-score-search-global-directories} command.
18615
18616 Note that, at present, using this option will slow down group entry
18617 somewhat.  (That is---a lot.)
18618
18619 If you want to start maintaining score files for other people to use,
18620 just put your score file up for anonymous ftp and announce it to the
18621 world.  Become a retro-moderator!  Participate in the retro-moderator
18622 wars sure to ensue, where retro-moderators battle it out for the
18623 sympathy of the people, luring them to use their score files on false
18624 premises!  Yay!  The net is saved!
18625
18626 Here are some tips for the would-be retro-moderator, off the top of my
18627 head:
18628
18629 @itemize @bullet
18630
18631 @item
18632 Articles heavily crossposted are probably junk.
18633 @item
18634 To lower a single inappropriate article, lower by @code{Message-ID}.
18635 @item
18636 Particularly brilliant authors can be raised on a permanent basis.
18637 @item
18638 Authors that repeatedly post off-charter for the group can safely be
18639 lowered out of existence.
18640 @item
18641 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
18642 articles completely.
18643
18644 @item
18645 Use expiring score entries to keep the size of the file down.  You
18646 should probably have a long expiry period, though, as some sites keep
18647 old articles for a long time.
18648 @end itemize
18649
18650 ... I wonder whether other newsreaders will support global score files
18651 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
18652 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
18653 holding our breath yet?
18654
18655
18656 @node Kill Files
18657 @section Kill Files
18658 @cindex kill files
18659
18660 Gnus still supports those pesky old kill files.  In fact, the kill file
18661 entries can now be expiring, which is something I wrote before Daniel
18662 Quinlan thought of doing score files, so I've left the code in there.
18663
18664 In short, kill processing is a lot slower (and I do mean @emph{a lot})
18665 than score processing, so it might be a good idea to rewrite your kill
18666 files into score files.
18667
18668 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
18669 forms into this file, which means that you can use kill files as some
18670 sort of primitive hook function to be run on group entry, even though
18671 that isn't a very good idea.
18672
18673 Normal kill files look like this:
18674
18675 @lisp
18676 (gnus-kill "From" "Lars Ingebrigtsen")
18677 (gnus-kill "Subject" "ding")
18678 (gnus-expunge "X")
18679 @end lisp
18680
18681 This will mark every article written by me as read, and remove the
18682 marked articles from the summary buffer.  Very useful, you'll agree.
18683
18684 Other programs use a totally different kill file syntax.  If Gnus
18685 encounters what looks like a @code{rn} kill file, it will take a stab at
18686 interpreting it.
18687
18688 Two summary functions for editing a GNUS kill file:
18689
18690 @table @kbd
18691
18692 @item M-k
18693 @kindex M-k (Summary)
18694 @findex gnus-summary-edit-local-kill
18695 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
18696
18697 @item M-K
18698 @kindex M-K (Summary)
18699 @findex gnus-summary-edit-global-kill
18700 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
18701 @end table
18702
18703 Two group mode functions for editing the kill files:
18704
18705 @table @kbd
18706
18707 @item M-k
18708 @kindex M-k (Group)
18709 @findex gnus-group-edit-local-kill
18710 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
18711
18712 @item M-K
18713 @kindex M-K (Group)
18714 @findex gnus-group-edit-global-kill
18715 Edit the general kill file (@code{gnus-group-edit-global-kill}).
18716 @end table
18717
18718 Kill file variables:
18719
18720 @table @code
18721 @item gnus-kill-file-name
18722 @vindex gnus-kill-file-name
18723 A kill file for the group @samp{soc.motss} is normally called
18724 @file{soc.motss.KILL}.  The suffix appended to the group name to get
18725 this file name is detailed by the @code{gnus-kill-file-name} variable.
18726 The ``global'' kill file (not in the score file sense of ``global'', of
18727 course) is just called @file{KILL}.
18728
18729 @vindex gnus-kill-save-kill-file
18730 @item gnus-kill-save-kill-file
18731 If this variable is non-@code{nil}, Gnus will save the
18732 kill file after processing, which is necessary if you use expiring
18733 kills.
18734
18735 @item gnus-apply-kill-hook
18736 @vindex gnus-apply-kill-hook
18737 @findex gnus-apply-kill-file-unless-scored
18738 @findex gnus-apply-kill-file
18739 A hook called to apply kill files to a group.  It is
18740 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
18741 kill file if you have a score file for the same group, you can set this
18742 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
18743 kill files to be processed, you should set this variable to @code{nil}.
18744
18745 @item gnus-kill-file-mode-hook
18746 @vindex gnus-kill-file-mode-hook
18747 A hook called in kill-file mode buffers.
18748
18749 @end table
18750
18751
18752 @node Converting Kill Files
18753 @section Converting Kill Files
18754 @cindex kill files
18755 @cindex converting kill files
18756
18757 If you have loads of old kill files, you may want to convert them into
18758 score files.  If they are ``regular'', you can use
18759 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
18760 by hand.
18761
18762 The kill to score conversion package isn't included in Gnus by default.
18763 You can fetch it from
18764 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
18765
18766 If your old kill files are very complex---if they contain more
18767 non-@code{gnus-kill} forms than not, you'll have to convert them by
18768 hand.  Or just let them be as they are.  Gnus will still use them as
18769 before.
18770
18771
18772 @node GroupLens
18773 @section GroupLens
18774 @cindex GroupLens
18775
18776 GroupLens (@uref{http://www.cs.umn.edu/Research/GroupLens/}) is a
18777 collaborative filtering system that helps you work together with other
18778 people to find the quality news articles out of the huge volume of
18779 news articles generated every day.
18780
18781 To accomplish this the GroupLens system combines your opinions about
18782 articles you have already read with the opinions of others who have done
18783 likewise and gives you a personalized prediction for each unread news
18784 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
18785 rate articles, and finds other people that rate articles the same way.
18786 Once it has found some people you agree with it tells you, in the form
18787 of a prediction, what they thought of the article.  You can use this
18788 prediction to help you decide whether or not you want to read the
18789 article.
18790
18791 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
18792 so this section is mostly of historical interest.
18793
18794 @menu
18795 * Using GroupLens::             How to make Gnus use GroupLens.
18796 * Rating Articles::             Letting GroupLens know how you rate articles.
18797 * Displaying Predictions::      Displaying predictions given by GroupLens.
18798 * GroupLens Variables::         Customizing GroupLens.
18799 @end menu
18800
18801
18802 @node Using GroupLens
18803 @subsection Using GroupLens
18804
18805 To use GroupLens you must register a pseudonym with your local Better
18806 Bit Bureau (BBB).
18807 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html} is the only
18808 better bit in town at the moment.
18809
18810 Once you have registered you'll need to set a couple of variables.
18811
18812 @table @code
18813
18814 @item gnus-use-grouplens
18815 @vindex gnus-use-grouplens
18816 Setting this variable to a non-@code{nil} value will make Gnus hook into
18817 all the relevant GroupLens functions.
18818
18819 @item grouplens-pseudonym
18820 @vindex grouplens-pseudonym
18821 This variable should be set to the pseudonym you got when registering
18822 with the Better Bit Bureau.
18823
18824 @item grouplens-newsgroups
18825 @vindex grouplens-newsgroups
18826 A list of groups that you want to get GroupLens predictions for.
18827
18828 @end table
18829
18830 That's the minimum of what you need to get up and running with GroupLens.
18831 Once you've registered, GroupLens will start giving you scores for
18832 articles based on the average of what other people think.  But, to get
18833 the real benefit of GroupLens you need to start rating articles
18834 yourself.  Then the scores GroupLens gives you will be personalized for
18835 you, based on how the people you usually agree with have already rated.
18836
18837
18838 @node Rating Articles
18839 @subsection Rating Articles
18840
18841 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
18842 Where 1 means something like this article is a waste of bandwidth and 5
18843 means that the article was really good.  The basic question to ask
18844 yourself is, "on a scale from 1 to 5 would I like to see more articles
18845 like this one?"
18846
18847 There are four ways to enter a rating for an article in GroupLens.
18848
18849 @table @kbd
18850
18851 @item r
18852 @kindex r (GroupLens)
18853 @findex bbb-summary-rate-article
18854 This function will prompt you for a rating on a scale of one to five.
18855
18856 @item k
18857 @kindex k (GroupLens)
18858 @findex grouplens-score-thread
18859 This function will prompt you for a rating, and rate all the articles in
18860 the thread.  This is really useful for some of those long running giant
18861 threads in rec.humor.
18862
18863 @end table
18864
18865 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
18866 the score of the article you're reading.
18867
18868 @table @kbd
18869
18870 @item 1-5 n
18871 @kindex n (GroupLens)
18872 @findex grouplens-next-unread-article
18873 Rate the article and go to the next unread article.
18874
18875 @item 1-5 ,
18876 @kindex , (GroupLens)
18877 @findex grouplens-best-unread-article
18878 Rate the article and go to the next unread article with the highest score.
18879
18880 @end table
18881
18882 If you want to give the current article a score of 4 and then go to the
18883 next article, just type @kbd{4 n}.
18884
18885
18886 @node Displaying Predictions
18887 @subsection Displaying Predictions
18888
18889 GroupLens makes a prediction for you about how much you will like a
18890 news article.  The predictions from GroupLens are on a scale from 1 to
18891 5, where 1 is the worst and 5 is the best.  You can use the predictions
18892 from GroupLens in one of three ways controlled by the variable
18893 @code{gnus-grouplens-override-scoring}.
18894
18895 @vindex gnus-grouplens-override-scoring
18896 There are three ways to display predictions in grouplens.  You may
18897 choose to have the GroupLens scores contribute to, or override the
18898 regular gnus scoring mechanism.  override is the default; however, some
18899 people prefer to see the Gnus scores plus the grouplens scores.  To get
18900 the separate scoring behavior you need to set
18901 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
18902 GroupLens predictions combined with the grouplens scores set it to
18903 @code{'override} and to combine the scores set
18904 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
18905 the combine option you will also want to set the values for
18906 @code{grouplens-prediction-offset} and
18907 @code{grouplens-score-scale-factor}.
18908
18909 @vindex grouplens-prediction-display
18910 In either case, GroupLens gives you a few choices for how you would like
18911 to see your predictions displayed.  The display of predictions is
18912 controlled by the @code{grouplens-prediction-display} variable.
18913
18914 The following are valid values for that variable.
18915
18916 @table @code
18917 @item prediction-spot
18918 The higher the prediction, the further to the right an @samp{*} is
18919 displayed.
18920
18921 @item confidence-interval
18922 A numeric confidence interval.
18923
18924 @item prediction-bar
18925 The higher the prediction, the longer the bar.
18926
18927 @item confidence-bar
18928 Numerical confidence.
18929
18930 @item confidence-spot
18931 The spot gets bigger with more confidence.
18932
18933 @item prediction-num
18934 Plain-old numeric value.
18935
18936 @item confidence-plus-minus
18937 Prediction +/- confidence.
18938
18939 @end table
18940
18941
18942 @node GroupLens Variables
18943 @subsection GroupLens Variables
18944
18945 @table @code
18946
18947 @item gnus-summary-grouplens-line-format
18948 The summary line format used in GroupLens-enhanced summary buffers.  It
18949 accepts the same specs as the normal summary line format (@pxref{Summary
18950 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
18951 %s\n}.
18952
18953 @item grouplens-bbb-host
18954 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
18955 default.
18956
18957 @item grouplens-bbb-port
18958 Port of the host running the bbbd server.  The default is 9000.
18959
18960 @item grouplens-score-offset
18961 Offset the prediction by this value.  In other words, subtract the
18962 prediction value by this number to arrive at the effective score.  The
18963 default is 0.
18964
18965 @item grouplens-score-scale-factor
18966 This variable allows the user to magnify the effect of GroupLens scores.
18967 The scale factor is applied after the offset.  The default is 1.
18968
18969 @end table
18970
18971
18972 @node Advanced Scoring
18973 @section Advanced Scoring
18974
18975 Scoring on Subjects and From headers is nice enough, but what if you're
18976 really interested in what a person has to say only when she's talking
18977 about a particular subject?  Or what if you really don't want to
18978 read what person A has to say when she's following up to person B, but
18979 want to read what she says when she's following up to person C?
18980
18981 By using advanced scoring rules you may create arbitrarily complex
18982 scoring patterns.
18983
18984 @menu
18985 * Advanced Scoring Syntax::     A definition.
18986 * Advanced Scoring Examples::   What they look like.
18987 * Advanced Scoring Tips::       Getting the most out of it.
18988 @end menu
18989
18990
18991 @node Advanced Scoring Syntax
18992 @subsection Advanced Scoring Syntax
18993
18994 Ordinary scoring rules have a string as the first element in the rule.
18995 Advanced scoring rules have a list as the first element.  The second
18996 element is the score to be applied if the first element evaluated to a
18997 non-@code{nil} value.
18998
18999 These lists may consist of three logical operators, one redirection
19000 operator, and various match operators.
19001
19002 Logical operators:
19003
19004 @table @code
19005 @item &
19006 @itemx and
19007 This logical operator will evaluate each of its arguments until it finds
19008 one that evaluates to @code{false}, and then it'll stop.  If all arguments
19009 evaluate to @code{true} values, then this operator will return
19010 @code{true}.
19011
19012 @item |
19013 @itemx or
19014 This logical operator will evaluate each of its arguments until it finds
19015 one that evaluates to @code{true}.  If no arguments are @code{true},
19016 then this operator will return @code{false}.
19017
19018 @item !
19019 @itemx not
19020 @itemx Â¬
19021 This logical operator only takes a single argument.  It returns the
19022 logical negation of the value of its argument.
19023
19024 @end table
19025
19026 There is an @dfn{indirection operator} that will make its arguments
19027 apply to the ancestors of the current article being scored.  For
19028 instance, @code{1-} will make score rules apply to the parent of the
19029 current article.  @code{2-} will make score rules apply to the
19030 grandparent of the current article.  Alternatively, you can write
19031 @code{^^}, where the number of @code{^}s (carets) says how far back into
19032 the ancestry you want to go.
19033
19034 Finally, we have the match operators.  These are the ones that do the
19035 real work.  Match operators are header name strings followed by a match
19036 and a match type.  A typical match operator looks like @samp{("from"
19037 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
19038 simple scoring, and the match types are also the same.
19039
19040
19041 @node Advanced Scoring Examples
19042 @subsection Advanced Scoring Examples
19043
19044 Please note that the following examples are score file rules.  To
19045 make a complete score file from them, surround them with another pair
19046 of parentheses.
19047
19048 Let's say you want to increase the score of articles written by Lars
19049 when he's talking about Gnus:
19050
19051 @example
19052 ((&
19053   ("from" "Lars Ingebrigtsen")
19054   ("subject" "Gnus"))
19055  1000)
19056 @end example
19057
19058 Quite simple, huh?
19059
19060 When he writes long articles, he sometimes has something nice to say:
19061
19062 @example
19063 ((&
19064   ("from" "Lars Ingebrigtsen")
19065   (|
19066    ("subject" "Gnus")
19067    ("lines" 100 >)))
19068  1000)
19069 @end example
19070
19071 However, when he responds to things written by Reig Eigil Logge, you
19072 really don't want to read what he's written:
19073
19074 @example
19075 ((&
19076   ("from" "Lars Ingebrigtsen")
19077   (1- ("from" "Reig Eigir Logge")))
19078  -100000)
19079 @end example
19080
19081 Everybody that follows up Redmondo when he writes about disappearing
19082 socks should have their scores raised, but only when they talk about
19083 white socks.  However, when Lars talks about socks, it's usually not
19084 very interesting:
19085
19086 @example
19087 ((&
19088   (1-
19089    (&
19090     ("from" "redmondo@@.*no" r)
19091     ("body" "disappearing.*socks" t)))
19092   (! ("from" "Lars Ingebrigtsen"))
19093   ("body" "white.*socks"))
19094  1000)
19095 @end example
19096
19097 The possibilities are endless.
19098
19099
19100 @node Advanced Scoring Tips
19101 @subsection Advanced Scoring Tips
19102
19103 The @code{&} and @code{|} logical operators do short-circuit logic.
19104 That is, they stop processing their arguments when it's clear what the
19105 result of the operation will be.  For instance, if one of the arguments
19106 of an @code{&} evaluates to @code{false}, there's no point in evaluating
19107 the rest of the arguments.  This means that you should put slow matches
19108 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
19109 @samp{subject}) first.
19110
19111 The indirection arguments (@code{1-} and so on) will make their
19112 arguments work on previous generations of the thread.  If you say
19113 something like:
19114
19115 @example
19116 ...
19117 (1-
19118  (1-
19119   ("from" "lars")))
19120 ...
19121 @end example
19122
19123 Then that means "score on the from header of the grandparent of the
19124 current article".  An indirection is quite fast, but it's better to say:
19125
19126 @example
19127 (1-
19128  (&
19129   ("from" "Lars")
19130   ("subject" "Gnus")))
19131 @end example
19132
19133 than it is to say:
19134
19135 @example
19136 (&
19137  (1- ("from" "Lars"))
19138  (1- ("subject" "Gnus")))
19139 @end example
19140
19141
19142 @node Score Decays
19143 @section Score Decays
19144 @cindex score decays
19145 @cindex decays
19146
19147 You may find that your scores have a tendency to grow without
19148 bounds, especially if you're using adaptive scoring.  If scores get too
19149 big, they lose all meaning---they simply max out and it's difficult to
19150 use them in any sensible way.
19151
19152 @vindex gnus-decay-scores
19153 @findex gnus-decay-score
19154 @vindex gnus-decay-score-function
19155 Gnus provides a mechanism for decaying scores to help with this problem.
19156 When score files are loaded and @code{gnus-decay-scores} is
19157 non-@code{nil}, Gnus will run the score files through the decaying
19158 mechanism thereby lowering the scores of all non-permanent score rules.
19159 The decay itself if performed by the @code{gnus-decay-score-function}
19160 function, which is @code{gnus-decay-score} by default.  Here's the
19161 definition of that function:
19162
19163 @lisp
19164 (defun gnus-decay-score (score)
19165   "Decay SCORE.
19166 This is done according to `gnus-score-decay-constant'
19167 and `gnus-score-decay-scale'."
19168   (floor
19169    (- score
19170       (* (if (< score 0) 1 -1)
19171          (min (abs score)
19172               (max gnus-score-decay-constant
19173                    (* (abs score)
19174                       gnus-score-decay-scale)))))))
19175 @end lisp
19176
19177 @vindex gnus-score-decay-scale
19178 @vindex gnus-score-decay-constant
19179 @code{gnus-score-decay-constant} is 3 by default and
19180 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
19181
19182 @enumerate
19183 @item
19184 Scores between -3 and 3 will be set to 0 when this function is called.
19185
19186 @item
19187 Scores with magnitudes between 3 and 60 will be shrunk by 3.
19188
19189 @item
19190 Scores with magnitudes greater than 60 will be shrunk by 5% of the
19191 score.
19192 @end enumerate
19193
19194 If you don't like this decay function, write your own.  It is called
19195 with the score to be decayed as its only parameter, and it should return
19196 the new score, which should be an integer.
19197
19198 Gnus will try to decay scores once a day.  If you haven't run Gnus for
19199 four days, Gnus will decay the scores four times, for instance.
19200
19201 @iftex
19202 @iflatex
19203 @chapter Message
19204 @include message.texi
19205 @chapter Emacs MIME
19206 @include emacs-mime.texi
19207 @chapter Sieve
19208 @include sieve.texi
19209 @chapter PGG
19210 @include pgg.texi
19211 @end iflatex
19212 @end iftex
19213
19214 @node Various
19215 @chapter Various
19216
19217 @menu
19218 * Process/Prefix::              A convention used by many treatment commands.
19219 * Interactive::                 Making Gnus ask you many questions.
19220 * Symbolic Prefixes::           How to supply some Gnus functions with options.
19221 * Formatting Variables::        You can specify what buffers should look like.
19222 * Window Layout::               Configuring the Gnus buffer windows.
19223 * Faces and Fonts::             How to change how faces look.
19224 * Compilation::                 How to speed Gnus up.
19225 * Mode Lines::                  Displaying information in the mode lines.
19226 * Highlighting and Menus::      Making buffers look all nice and cozy.
19227 * Buttons::                     Get tendinitis in ten easy steps!
19228 * Daemons::                     Gnus can do things behind your back.
19229 * NoCeM::                       How to avoid spam and other fatty foods.
19230 * Undo::                        Some actions can be undone.
19231 * Predicate Specifiers::        Specifying predicates.
19232 * Moderation::                  What to do if you're a moderator.
19233 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
19234 * Fuzzy Matching::              What's the big fuzz?
19235 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
19236 * Various Various::             Things that are really various.
19237 @end menu
19238
19239
19240 @node Process/Prefix
19241 @section Process/Prefix
19242 @cindex process/prefix convention
19243
19244 Many functions, among them functions for moving, decoding and saving
19245 articles, use what is known as the @dfn{Process/Prefix convention}.
19246
19247 This is a method for figuring out what articles the user wants the
19248 command to be performed on.
19249
19250 It goes like this:
19251
19252 If the numeric prefix is N, perform the operation on the next N
19253 articles, starting with the current one.  If the numeric prefix is
19254 negative, perform the operation on the previous N articles, starting
19255 with the current one.
19256
19257 @vindex transient-mark-mode
19258 If @code{transient-mark-mode} in non-@code{nil} and the region is
19259 active, all articles in the region will be worked upon.
19260
19261 If there is no numeric prefix, but some articles are marked with the
19262 process mark, perform the operation on the articles marked with
19263 the process mark.
19264
19265 If there is neither a numeric prefix nor any articles marked with the
19266 process mark, just perform the operation on the current article.
19267
19268 Quite simple, really, but it needs to be made clear so that surprises
19269 are avoided.
19270
19271 Commands that react to the process mark will push the current list of
19272 process marked articles onto a stack and will then clear all process
19273 marked articles.  You can restore the previous configuration with the
19274 @kbd{M P y} command (@pxref{Setting Process Marks}).
19275
19276 @vindex gnus-summary-goto-unread
19277 One thing that seems to shock & horrify lots of people is that, for
19278 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
19279 Since each @kbd{d} (which marks the current article as read) by default
19280 goes to the next unread article after marking, this means that @kbd{3 d}
19281 will mark the next three unread articles as read, no matter what the
19282 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
19283 @code{nil} for a more straightforward action.
19284
19285 Many commands do not use the process/prefix convention.  All commands
19286 that do explicitly say so in this manual.  To apply the process/prefix
19287 convention to commands that do not use it, you can use the @kbd{M-&}
19288 command.  For instance, to mark all the articles in the group as
19289 expirable, you could say `M P b M-& E'.
19290
19291
19292 @node Interactive
19293 @section Interactive
19294 @cindex interaction
19295
19296 @table @code
19297
19298 @item gnus-novice-user
19299 @vindex gnus-novice-user
19300 If this variable is non-@code{nil}, you are either a newcomer to the
19301 World of Usenet, or you are very cautious, which is a nice thing to be,
19302 really.  You will be given questions of the type ``Are you sure you want
19303 to do this?'' before doing anything dangerous.  This is @code{t} by
19304 default.
19305
19306 @item gnus-expert-user
19307 @vindex gnus-expert-user
19308 If this variable is non-@code{nil}, you will seldom be asked any
19309 questions by Gnus.  It will simply assume you know what you're doing, no
19310 matter how strange.
19311
19312 @item gnus-interactive-catchup
19313 @vindex gnus-interactive-catchup
19314 Require confirmation before catching up a group if non-@code{nil}.  It
19315 is @code{t} by default.
19316
19317 @item gnus-interactive-exit
19318 @vindex gnus-interactive-exit
19319 Require confirmation before exiting Gnus.  This variable is @code{t} by
19320 default.
19321 @end table
19322
19323
19324 @node Symbolic Prefixes
19325 @section Symbolic Prefixes
19326 @cindex symbolic prefixes
19327
19328 Quite a lot of Emacs commands react to the (numeric) prefix.  For
19329 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
19330 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
19331 rule of 900 to the current article.
19332
19333 This is all nice and well, but what if you want to give a command some
19334 additional information?  Well, what most commands do is interpret the
19335 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
19336 doesn't want a backup file to be created when saving the current buffer,
19337 for instance.  But what if you want to save without making a backup
19338 file, and you want Emacs to flash lights and play a nice tune at the
19339 same time?  You can't, and you're probably perfectly happy that way.
19340
19341 @kindex M-i (Summary)
19342 @findex gnus-symbolic-argument
19343 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
19344 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
19345 character typed in is the value.  You can stack as many @kbd{M-i}
19346 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
19347 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
19348 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
19349 @code{b}''.  You get the drift.
19350
19351 Typing in symbolic prefixes to commands that don't accept them doesn't
19352 hurt, but it doesn't do any good either.  Currently not many Gnus
19353 functions make use of the symbolic prefix.
19354
19355 If you're interested in how Gnus implements this, @pxref{Extended
19356 Interactive}.
19357
19358
19359 @node Formatting Variables
19360 @section Formatting Variables
19361 @cindex formatting variables
19362
19363 Throughout this manual you've probably noticed lots of variables called
19364 things like @code{gnus-group-line-format} and
19365 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
19366 output lines in the various buffers.  There's quite a lot of them.
19367 Fortunately, they all use the same syntax, so there's not that much to
19368 be annoyed by.
19369
19370 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
19371 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
19372 lots of percentages everywhere.
19373
19374 @menu
19375 * Formatting Basics::           A formatting variable is basically a format string.
19376 * Mode Line Formatting::        Some rules about mode line formatting variables.
19377 * Advanced Formatting::         Modifying output in various ways.
19378 * User-Defined Specs::          Having Gnus call your own functions.
19379 * Formatting Fonts::            Making the formatting look colorful and nice.
19380 * Positioning Point::           Moving point to a position after an operation.
19381 * Tabulation::                  Tabulating your output.
19382 * Wide Characters::             Dealing with wide characters.
19383 @end menu
19384
19385 Currently Gnus uses the following formatting variables:
19386 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
19387 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
19388 @code{gnus-group-mode-line-format},
19389 @code{gnus-summary-mode-line-format},
19390 @code{gnus-article-mode-line-format},
19391 @code{gnus-server-mode-line-format}, and
19392 @code{gnus-summary-pick-line-format}.
19393
19394 All these format variables can also be arbitrary elisp forms.  In that
19395 case, they will be @code{eval}ed to insert the required lines.
19396
19397 @kindex M-x gnus-update-format
19398 @findex gnus-update-format
19399 Gnus includes a command to help you while creating your own format
19400 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
19401 update the spec in question and pop you to a buffer where you can
19402 examine the resulting lisp code to be run to generate the line.
19403
19404
19405
19406 @node Formatting Basics
19407 @subsection Formatting Basics
19408
19409 Each @samp{%} element will be replaced by some string or other when the
19410 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
19411 spec, and pad with spaces to get a 5-character field''.
19412
19413 As with normal C and Emacs Lisp formatting strings, the numerical
19414 modifier between the @samp{%} and the formatting type character will
19415 @dfn{pad} the output so that it is always at least that long.
19416 @samp{%5y} will make the field always (at least) five characters wide by
19417 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
19418 the right instead.
19419
19420 You may also wish to limit the length of the field to protect against
19421 particularly wide values.  For that you can say @samp{%4,6y}, which
19422 means that the field will never be more than 6 characters wide and never
19423 less than 4 characters wide.
19424
19425 Also Gnus supports some extended format specifications, such as
19426 @samp{%&user-date;}.
19427
19428
19429 @node Mode Line Formatting
19430 @subsection Mode Line Formatting
19431
19432 Mode line formatting variables (e.g.,
19433 @code{gnus-summary-mode-line-format}) follow the same rules as other,
19434 buffer line oriented formatting variables (@pxref{Formatting Basics})
19435 with the following two differences:
19436
19437 @enumerate
19438
19439 @item
19440 There must be no newline (@samp{\n}) at the end.
19441
19442 @item
19443 The special @samp{%%b} spec can be used to display the buffer name.
19444 Well, it's no spec at all, really---@samp{%%} is just a way to quote
19445 @samp{%} to allow it to pass through the formatting machinery unmangled,
19446 so that Emacs receives @samp{%b}, which is something the Emacs mode line
19447 display interprets to mean ``show the buffer name''.  For a full list of
19448 mode line specs Emacs understands, see the documentation of the
19449 @code{mode-line-format} variable.
19450
19451 @end enumerate
19452
19453
19454 @node Advanced Formatting
19455 @subsection Advanced Formatting
19456
19457 It is frequently useful to post-process the fields in some way.
19458 Padding, limiting, cutting off parts and suppressing certain values can
19459 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
19460 look like @samp{%~(cut 3)~(ignore "0")y}.
19461
19462 These are the valid modifiers:
19463
19464 @table @code
19465 @item pad
19466 @itemx pad-left
19467 Pad the field to the left with spaces until it reaches the required
19468 length.
19469
19470 @item pad-right
19471 Pad the field to the right with spaces until it reaches the required
19472 length.
19473
19474 @item max
19475 @itemx max-left
19476 Cut off characters from the left until it reaches the specified length.
19477
19478 @item max-right
19479 Cut off characters from the right until it reaches the specified
19480 length.
19481
19482 @item cut
19483 @itemx cut-left
19484 Cut off the specified number of characters from the left.
19485
19486 @item cut-right
19487 Cut off the specified number of characters from the right.
19488
19489 @item ignore
19490 Return an empty string if the field is equal to the specified value.
19491
19492 @item form
19493 Use the specified form as the field value when the @samp{@@} spec is
19494 used.
19495
19496 Here's an example:
19497
19498 @lisp
19499 "~(form (current-time-string))@@"
19500 @end lisp
19501
19502 @end table
19503
19504 Let's take an example.  The @samp{%o} spec in the summary mode lines
19505 will return a date in compact ISO8601 format---@samp{19960809T230410}.
19506 This is quite a mouthful, so we want to shave off the century number and
19507 the time, leaving us with a six-character date.  That would be
19508 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
19509 maxing, and we need the padding to ensure that the date is never less
19510 than 6 characters to make it look nice in columns.)
19511
19512 Ignoring is done first; then cutting; then maxing; and then as the very
19513 last operation, padding.
19514
19515 If you use lots of these advanced thingies, you'll find that Gnus gets
19516 quite slow.  This can be helped enormously by running @kbd{M-x
19517 gnus-compile} when you are satisfied with the look of your lines.
19518 @xref{Compilation}.
19519
19520
19521 @node User-Defined Specs
19522 @subsection User-Defined Specs
19523
19524 All the specs allow for inserting user defined specifiers---@samp{u}.
19525 The next character in the format string should be a letter.  Gnus
19526 will call the function @code{gnus-user-format-function-}@samp{X}, where
19527 @samp{X} is the letter following @samp{%u}.  The function will be passed
19528 a single parameter---what the parameter means depends on what buffer
19529 it's being called from.  The function should return a string, which will
19530 be inserted into the buffer just like information from any other
19531 specifier.  This function may also be called with dummy values, so it
19532 should protect against that.
19533
19534 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
19535 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
19536
19537 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
19538 much the same without defining new functions.  Here's an example:
19539 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
19540 given here will be evaluated to yield the current line number, and then
19541 inserted.
19542
19543
19544 @node Formatting Fonts
19545 @subsection Formatting Fonts
19546
19547 There are specs for highlighting, and these are shared by all the format
19548 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
19549 the special @code{mouse-face} property set, which means that it will be
19550 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
19551 over it.
19552
19553 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
19554 normal faces set using @code{gnus-face-0}, which is @code{bold} by
19555 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
19556 and so on.  Create as many faces as you wish.  The same goes for the
19557 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
19558 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
19559
19560 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
19561 special @code{balloon-help} property set to @code{gnus-balloon-face-0}.
19562 If you say @samp{%1<<}, you'll get @code{gnus-balloon-face-1} and so on.
19563 The @code{gnus-balloon-face-*} variables should be either strings or
19564 symbols naming functions that return a string.  When the mouse passes
19565 over text with this property set, a balloon window will appear and
19566 display the string.  Please refer to @ref{(emacs)Help Echo} (in GNU
19567 Emacs) or the doc string of @code{balloon-help-mode} (in XEmacs) for
19568 more information on this.  (For technical reasons, the guillemets have
19569 been approximated as @samp{<<} and @samp{>>} in this paragraph.)
19570
19571 Here's an alternative recipe for the group buffer:
19572
19573 @lisp
19574 ;; Create three face types.
19575 (setq gnus-face-1 'bold)
19576 (setq gnus-face-3 'italic)
19577
19578 ;; We want the article count to be in
19579 ;; a bold and green face.  So we create
19580 ;; a new face called `my-green-bold'.
19581 (copy-face 'bold 'my-green-bold)
19582 ;; Set the color.
19583 (set-face-foreground 'my-green-bold "ForestGreen")
19584 (setq gnus-face-2 'my-green-bold)
19585
19586 ;; Set the new & fancy format.
19587 (setq gnus-group-line-format
19588       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
19589 @end lisp
19590
19591 I'm sure you'll be able to use this scheme to create totally unreadable
19592 and extremely vulgar displays.  Have fun!
19593
19594 Note that the @samp{%(} specs (and friends) do not make any sense on the
19595 mode-line variables.
19596
19597 @node Positioning Point
19598 @subsection Positioning Point
19599
19600 Gnus usually moves point to a pre-defined place on each line in most
19601 buffers.  By default, point move to the first colon character on the
19602 line.  You can customize this behaviour in three different ways.
19603
19604 You can move the colon character to somewhere else on the line.
19605
19606 @findex gnus-goto-colon
19607 You can redefine the function that moves the point to the colon.  The
19608 function is called @code{gnus-goto-colon}.
19609
19610 But perhaps the most convenient way to deal with this, if you don't want
19611 to have a colon in your line, is to use the @samp{%C} specifier.  If you
19612 put a @samp{%C} somewhere in your format line definition, Gnus will
19613 place point there.
19614
19615
19616 @node Tabulation
19617 @subsection Tabulation
19618
19619 You can usually line up your displays by padding and cutting your
19620 strings.  However, when combining various strings of different size, it
19621 can often be more convenient to just output the strings, and then worry
19622 about lining up the following text afterwards.
19623
19624 To do that, Gnus supplies tabulator specs--@samp{%=}.  There are two
19625 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
19626
19627 @samp{%50=} will insert space characters to pad the line up to column
19628 50.  If the text is already past column 50, nothing will be inserted.
19629 This is the soft tabulator.
19630
19631 @samp{%-50=} will insert space characters to pad the line up to column
19632 50.  If the text is already past column 50, the excess text past column
19633 50 will be removed.  This is the hard tabulator.
19634
19635
19636 @node Wide Characters
19637 @subsection Wide Characters
19638
19639 Proportional fonts in most countries have characters of the same width.
19640 Some countries, however, use Latin characters mixed with wider
19641 characters---most notable East Asian countries.
19642
19643 The problem is that when formatting, Gnus assumes that if a string is 10
19644 characters wide, it'll be 10 Latin characters wide on the screen.  In
19645 these countries, that's not true.
19646
19647 @vindex gnus-use-correct-string-widths
19648 To help fix this, you can set @code{gnus-use-correct-string-widths} to
19649 @code{t}.  This makes buffer generation slower, but the results will be
19650 prettier.  The default value under XEmacs is @code{t} but @code{nil}
19651 for Emacs.
19652
19653
19654 @node Window Layout
19655 @section Window Layout
19656 @cindex window layout
19657
19658 No, there's nothing here about X, so be quiet.
19659
19660 @vindex gnus-use-full-window
19661 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
19662 other windows and occupy the entire Emacs screen by itself.  It is
19663 @code{t} by default.
19664
19665 Setting this variable to @code{nil} kinda works, but there are
19666 glitches.  Use at your own peril.
19667
19668 @vindex gnus-buffer-configuration
19669 @code{gnus-buffer-configuration} describes how much space each Gnus
19670 buffer should be given.  Here's an excerpt of this variable:
19671
19672 @lisp
19673 ((group (vertical 1.0 (group 1.0 point)
19674                       (if gnus-carpal (group-carpal 4))))
19675  (article (vertical 1.0 (summary 0.25 point)
19676                         (article 1.0))))
19677 @end lisp
19678
19679 This is an alist.  The @dfn{key} is a symbol that names some action or
19680 other.  For instance, when displaying the group buffer, the window
19681 configuration function will use @code{group} as the key.  A full list of
19682 possible names is listed below.
19683
19684 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
19685 should occupy.  To take the @code{article} split as an example -
19686
19687 @lisp
19688 (article (vertical 1.0 (summary 0.25 point)
19689                        (article 1.0)))
19690 @end lisp
19691
19692 This @dfn{split} says that the summary buffer should occupy 25% of upper
19693 half of the screen, and that it is placed over the article buffer.  As
19694 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
19695 reaching for that calculator there).  However, the special number
19696 @code{1.0} is used to signal that this buffer should soak up all the
19697 rest of the space available after the rest of the buffers have taken
19698 whatever they need.  There should be only one buffer with the @code{1.0}
19699 size spec per split.
19700
19701 Point will be put in the buffer that has the optional third element
19702 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
19703 split where the tag @code{frame-focus} is a member (i.e. is the third or
19704 fourth element in the list, depending on whether the @code{point} tag is
19705 present) gets focus.
19706
19707 Here's a more complicated example:
19708
19709 @lisp
19710 (article (vertical 1.0 (group 4)
19711                        (summary 0.25 point)
19712                        (if gnus-carpal (summary-carpal 4))
19713                        (article 1.0)))
19714 @end lisp
19715
19716 If the size spec is an integer instead of a floating point number,
19717 then that number will be used to say how many lines a buffer should
19718 occupy, not a percentage.
19719
19720 If the @dfn{split} looks like something that can be @code{eval}ed (to be
19721 precise---if the @code{car} of the split is a function or a subr), this
19722 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
19723 be used as a split.  This means that there will be three buffers if
19724 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
19725 is non-@code{nil}.
19726
19727 Not complicated enough for you?  Well, try this on for size:
19728
19729 @lisp
19730 (article (horizontal 1.0
19731              (vertical 0.5
19732                  (group 1.0)
19733                  (gnus-carpal 4))
19734              (vertical 1.0
19735                  (summary 0.25 point)
19736                  (summary-carpal 4)
19737                  (article 1.0))))
19738 @end lisp
19739
19740 Whoops.  Two buffers with the mystery 100% tag.  And what's that
19741 @code{horizontal} thingie?
19742
19743 If the first element in one of the split is @code{horizontal}, Gnus will
19744 split the window horizontally, giving you two windows side-by-side.
19745 Inside each of these strips you may carry on all you like in the normal
19746 fashion.  The number following @code{horizontal} says what percentage of
19747 the screen is to be given to this strip.
19748
19749 For each split, there @emph{must} be one element that has the 100% tag.
19750 The splitting is never accurate, and this buffer will eat any leftover
19751 lines from the splits.
19752
19753 To be slightly more formal, here's a definition of what a valid split
19754 may look like:
19755
19756 @example
19757 split      = frame | horizontal | vertical | buffer | form
19758 frame      = "(frame " size *split ")"
19759 horizontal = "(horizontal " size *split ")"
19760 vertical   = "(vertical " size *split ")"
19761 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
19762 size       = number | frame-params
19763 buf-name   = group | article | summary ...
19764 @end example
19765
19766 The limitations are that the @code{frame} split can only appear as the
19767 top-level split.  @var{form} should be an Emacs Lisp form that should
19768 return a valid split.  We see that each split is fully recursive, and
19769 may contain any number of @code{vertical} and @code{horizontal} splits.
19770
19771 @vindex gnus-window-min-width
19772 @vindex gnus-window-min-height
19773 @cindex window height
19774 @cindex window width
19775 Finding the right sizes can be a bit complicated.  No window may be less
19776 than @code{gnus-window-min-height} (default 1) characters high, and all
19777 windows must be at least @code{gnus-window-min-width} (default 1)
19778 characters wide.  Gnus will try to enforce this before applying the
19779 splits.  If you want to use the normal Emacs window width/height limit,
19780 you can just set these two variables to @code{nil}.
19781
19782 If you're not familiar with Emacs terminology, @code{horizontal} and
19783 @code{vertical} splits may work the opposite way of what you'd expect.
19784 Windows inside a @code{horizontal} split are shown side-by-side, and
19785 windows within a @code{vertical} split are shown above each other.
19786
19787 @findex gnus-configure-frame
19788 If you want to experiment with window placement, a good tip is to call
19789 @code{gnus-configure-frame} directly with a split.  This is the function
19790 that does all the real work when splitting buffers.  Below is a pretty
19791 nonsensical configuration with 5 windows; two for the group buffer and
19792 three for the article buffer.  (I said it was nonsensical.)  If you
19793 @code{eval} the statement below, you can get an idea of how that would
19794 look straight away, without going through the normal Gnus channels.
19795 Play with it until you're satisfied, and then use
19796 @code{gnus-add-configuration} to add your new creation to the buffer
19797 configuration list.
19798
19799 @lisp
19800 (gnus-configure-frame
19801  '(horizontal 1.0
19802     (vertical 10
19803       (group 1.0)
19804       (article 0.3 point))
19805     (vertical 1.0
19806       (article 1.0)
19807       (horizontal 4
19808         (group 1.0)
19809         (article 10)))))
19810 @end lisp
19811
19812 You might want to have several frames as well.  No prob---just use the
19813 @code{frame} split:
19814
19815 @lisp
19816 (gnus-configure-frame
19817  '(frame 1.0
19818          (vertical 1.0
19819                    (summary 0.25 point frame-focus)
19820                    (article 1.0))
19821          (vertical ((height . 5) (width . 15)
19822                     (user-position . t)
19823                     (left . -1) (top . 1))
19824                    (picon 1.0))))
19825
19826 @end lisp
19827
19828 This split will result in the familiar summary/article window
19829 configuration in the first (or ``main'') frame, while a small additional
19830 frame will be created where picons will be shown.  As you can see,
19831 instead of the normal @code{1.0} top-level spec, each additional split
19832 should have a frame parameter alist as the size spec.
19833 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
19834 Reference Manual}.  Under XEmacs, a frame property list will be
19835 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
19836 is such a plist.
19837 The list of all possible keys for @code{gnus-buffer-configuration} can
19838 be found in its default value.
19839
19840 Note that the @code{message} key is used for both
19841 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
19842 it is desirable to distinguish between the two, something like this
19843 might be used:
19844
19845 @lisp
19846 (message (horizontal 1.0
19847                      (vertical 1.0 (message 1.0 point))
19848                      (vertical 0.24
19849                                (if (buffer-live-p gnus-summary-buffer)
19850                                    '(summary 0.5))
19851                                (group 1.0)))))
19852 @end lisp
19853
19854 One common desire for a multiple frame split is to have a separate frame
19855 for composing mail and news while leaving the original frame intact.  To
19856 accomplish that, something like the following can be done:
19857
19858 @lisp
19859 (message
19860   (frame 1.0
19861          (if (not (buffer-live-p gnus-summary-buffer))
19862              (car (cdr (assoc 'group gnus-buffer-configuration)))
19863            (car (cdr (assoc 'summary gnus-buffer-configuration))))
19864          (vertical ((user-position . t) (top . 1) (left . 1)
19865                     (name . "Message"))
19866                    (message 1.0 point))))
19867 @end lisp
19868
19869 @findex gnus-add-configuration
19870 Since the @code{gnus-buffer-configuration} variable is so long and
19871 complicated, there's a function you can use to ease changing the config
19872 of a single setting: @code{gnus-add-configuration}.  If, for instance,
19873 you want to change the @code{article} setting, you could say:
19874
19875 @lisp
19876 (gnus-add-configuration
19877  '(article (vertical 1.0
19878                (group 4)
19879                (summary .25 point)
19880                (article 1.0))))
19881 @end lisp
19882
19883 You'd typically stick these @code{gnus-add-configuration} calls in your
19884 @file{.gnus.el} file or in some startup hook---they should be run after
19885 Gnus has been loaded.
19886
19887 @vindex gnus-always-force-window-configuration
19888 If all windows mentioned in the configuration are already visible, Gnus
19889 won't change the window configuration.  If you always want to force the
19890 ``right'' window configuration, you can set
19891 @code{gnus-always-force-window-configuration} to non-@code{nil}.
19892
19893 If you're using tree displays (@pxref{Tree Display}), and the tree
19894 window is displayed vertically next to another window, you may also want
19895 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
19896 windows resized.
19897
19898 @subsection Example Window Configurations
19899
19900 @itemize @bullet
19901 @item
19902 Narrow left hand side occupied by group buffer.  Right hand side split
19903 between summary buffer (top one-sixth) and article buffer (bottom).
19904
19905 @ifinfo
19906 @example
19907 +---+---------+
19908 | G | Summary |
19909 | r +---------+
19910 | o |         |
19911 | u | Article |
19912 | p |         |
19913 +---+---------+
19914 @end example
19915 @end ifinfo
19916
19917 @lisp
19918 (gnus-add-configuration
19919  '(article
19920    (horizontal 1.0
19921                (vertical 25 (group 1.0))
19922                (vertical 1.0
19923                          (summary 0.16 point)
19924                          (article 1.0)))))
19925
19926 (gnus-add-configuration
19927  '(summary
19928    (horizontal 1.0
19929                (vertical 25 (group 1.0))
19930                (vertical 1.0 (summary 1.0 point)))))
19931 @end lisp
19932
19933 @end itemize
19934
19935
19936 @node Faces and Fonts
19937 @section Faces and Fonts
19938 @cindex faces
19939 @cindex fonts
19940 @cindex colors
19941
19942 Fiddling with fonts and faces used to be very difficult, but these days
19943 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
19944 the face you want to alter, and alter it via the standard Customize
19945 interface.
19946
19947
19948 @node Compilation
19949 @section Compilation
19950 @cindex compilation
19951 @cindex byte-compilation
19952
19953 @findex gnus-compile
19954
19955 Remember all those line format specification variables?
19956 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
19957 on.  Now, Gnus will of course heed whatever these variables are, but,
19958 unfortunately, changing them will mean a quite significant slow-down.
19959 (The default values of these variables have byte-compiled functions
19960 associated with them, while the user-generated versions do not, of
19961 course.)
19962
19963 To help with this, you can run @kbd{M-x gnus-compile} after you've
19964 fiddled around with the variables and feel that you're (kind of)
19965 satisfied.  This will result in the new specs being byte-compiled, and
19966 you'll get top speed again.  Gnus will save these compiled specs in the
19967 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
19968 this function, though---you should compile them yourself by sticking
19969 them into the @code{.gnus.el} file and byte-compiling that file.)
19970
19971
19972 @node Mode Lines
19973 @section Mode Lines
19974 @cindex mode lines
19975
19976 @vindex gnus-updated-mode-lines
19977 @code{gnus-updated-mode-lines} says what buffers should keep their mode
19978 lines updated.  It is a list of symbols.  Supported symbols include
19979 @code{group}, @code{article}, @code{summary}, @code{server},
19980 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
19981 Gnus will keep that mode line updated with information that may be
19982 pertinent.  If this variable is @code{nil}, screen refresh may be
19983 quicker.
19984
19985 @cindex display-time
19986
19987 @vindex gnus-mode-non-string-length
19988 By default, Gnus displays information on the current article in the mode
19989 lines of the summary and article buffers.  The information Gnus wishes
19990 to display (e.g. the subject of the article) is often longer than the
19991 mode lines, and therefore have to be cut off at some point.  The
19992 @code{gnus-mode-non-string-length} variable says how long the other
19993 elements on the line is (i.e., the non-info part).  If you put
19994 additional elements on the mode line (e.g. a clock), you should modify
19995 this variable:
19996
19997 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
19998 @lisp
19999 (add-hook 'display-time-hook
20000           (lambda () (setq gnus-mode-non-string-length
20001                            (+ 21
20002                               (if line-number-mode 5 0)
20003                               (if column-number-mode 4 0)
20004                               (length display-time-string)))))
20005 @end lisp
20006
20007 If this variable is @code{nil} (which is the default), the mode line
20008 strings won't be chopped off, and they won't be padded either.  Note
20009 that the default is unlikely to be desirable, as even the percentage
20010 complete in the buffer may be crowded off the mode line; the user should
20011 configure this variable appropriately for her configuration.
20012
20013
20014 @node Highlighting and Menus
20015 @section Highlighting and Menus
20016 @cindex visual
20017 @cindex highlighting
20018 @cindex menus
20019
20020 @vindex gnus-visual
20021 The @code{gnus-visual} variable controls most of the Gnus-prettifying
20022 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
20023 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
20024 file.
20025
20026 This variable can be a list of visual properties that are enabled.  The
20027 following elements are valid, and are all included by default:
20028
20029 @table @code
20030 @item group-highlight
20031 Do highlights in the group buffer.
20032 @item summary-highlight
20033 Do highlights in the summary buffer.
20034 @item article-highlight
20035 Do highlights in the article buffer.
20036 @item highlight
20037 Turn on highlighting in all buffers.
20038 @item group-menu
20039 Create menus in the group buffer.
20040 @item summary-menu
20041 Create menus in the summary buffers.
20042 @item article-menu
20043 Create menus in the article buffer.
20044 @item browse-menu
20045 Create menus in the browse buffer.
20046 @item server-menu
20047 Create menus in the server buffer.
20048 @item score-menu
20049 Create menus in the score buffers.
20050 @item menu
20051 Create menus in all buffers.
20052 @end table
20053
20054 So if you only want highlighting in the article buffer and menus in all
20055 buffers, you could say something like:
20056
20057 @lisp
20058 (setq gnus-visual '(article-highlight menu))
20059 @end lisp
20060
20061 If you want highlighting only and no menus whatsoever, you'd say:
20062
20063 @lisp
20064 (setq gnus-visual '(highlight))
20065 @end lisp
20066
20067 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
20068 in all Gnus buffers.
20069
20070 Other general variables that influence the look of all buffers include:
20071
20072 @table @code
20073 @item gnus-mouse-face
20074 @vindex gnus-mouse-face
20075 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
20076 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
20077
20078 @end table
20079
20080 There are hooks associated with the creation of all the different menus:
20081
20082 @table @code
20083
20084 @item gnus-article-menu-hook
20085 @vindex gnus-article-menu-hook
20086 Hook called after creating the article mode menu.
20087
20088 @item gnus-group-menu-hook
20089 @vindex gnus-group-menu-hook
20090 Hook called after creating the group mode menu.
20091
20092 @item gnus-summary-menu-hook
20093 @vindex gnus-summary-menu-hook
20094 Hook called after creating the summary mode menu.
20095
20096 @item gnus-server-menu-hook
20097 @vindex gnus-server-menu-hook
20098 Hook called after creating the server mode menu.
20099
20100 @item gnus-browse-menu-hook
20101 @vindex gnus-browse-menu-hook
20102 Hook called after creating the browse mode menu.
20103
20104 @item gnus-score-menu-hook
20105 @vindex gnus-score-menu-hook
20106 Hook called after creating the score mode menu.
20107
20108 @end table
20109
20110
20111 @node Buttons
20112 @section Buttons
20113 @cindex buttons
20114 @cindex mouse
20115 @cindex click
20116
20117 Those new-fangled @dfn{mouse} contraptions is very popular with the
20118 young, hep kids who don't want to learn the proper way to do things
20119 these days.  Why, I remember way back in the summer of '89, when I was
20120 using Emacs on a Tops 20 system.  Three hundred users on one single
20121 machine, and every user was running Simula compilers.  Bah!
20122
20123 Right.
20124
20125 @vindex gnus-carpal
20126 Well, you can make Gnus display bufferfuls of buttons you can click to
20127 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
20128 really.  Tell the chiropractor I sent you.
20129
20130
20131 @table @code
20132
20133 @item gnus-carpal-mode-hook
20134 @vindex gnus-carpal-mode-hook
20135 Hook run in all carpal mode buffers.
20136
20137 @item gnus-carpal-button-face
20138 @vindex gnus-carpal-button-face
20139 Face used on buttons.
20140
20141 @item gnus-carpal-header-face
20142 @vindex gnus-carpal-header-face
20143 Face used on carpal buffer headers.
20144
20145 @item gnus-carpal-group-buffer-buttons
20146 @vindex gnus-carpal-group-buffer-buttons
20147 Buttons in the group buffer.
20148
20149 @item gnus-carpal-summary-buffer-buttons
20150 @vindex gnus-carpal-summary-buffer-buttons
20151 Buttons in the summary buffer.
20152
20153 @item gnus-carpal-server-buffer-buttons
20154 @vindex gnus-carpal-server-buffer-buttons
20155 Buttons in the server buffer.
20156
20157 @item gnus-carpal-browse-buffer-buttons
20158 @vindex gnus-carpal-browse-buffer-buttons
20159 Buttons in the browse buffer.
20160 @end table
20161
20162 All the @code{buttons} variables are lists.  The elements in these list
20163 are either cons cells where the @code{car} contains a text to be displayed and
20164 the @code{cdr} contains a function symbol, or a simple string.
20165
20166
20167 @node Daemons
20168 @section Daemons
20169 @cindex demons
20170 @cindex daemons
20171
20172 Gnus, being larger than any program ever written (allegedly), does lots
20173 of strange stuff that you may wish to have done while you're not
20174 present.  For instance, you may want it to check for new mail once in a
20175 while.  Or you may want it to close down all connections to all servers
20176 when you leave Emacs idle.  And stuff like that.
20177
20178 Gnus will let you do stuff like that by defining various
20179 @dfn{handlers}.  Each handler consists of three elements:  A
20180 @var{function}, a @var{time}, and an @var{idle} parameter.
20181
20182 Here's an example of a handler that closes connections when Emacs has
20183 been idle for thirty minutes:
20184
20185 @lisp
20186 (gnus-demon-close-connections nil 30)
20187 @end lisp
20188
20189 Here's a handler that scans for PGP headers every hour when Emacs is
20190 idle:
20191
20192 @lisp
20193 (gnus-demon-scan-pgp 60 t)
20194 @end lisp
20195
20196 This @var{time} parameter and than @var{idle} parameter work together
20197 in a strange, but wonderful fashion.  Basically, if @var{idle} is
20198 @code{nil}, then the function will be called every @var{time} minutes.
20199
20200 If @var{idle} is @code{t}, then the function will be called after
20201 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
20202 the function will never be called.  But once Emacs goes idle, the
20203 function will be called every @var{time} minutes.
20204
20205 If @var{idle} is a number and @var{time} is a number, the function will
20206 be called every @var{time} minutes only when Emacs has been idle for
20207 @var{idle} minutes.
20208
20209 If @var{idle} is a number and @var{time} is @code{nil}, the function
20210 will be called once every time Emacs has been idle for @var{idle}
20211 minutes.
20212
20213 And if @var{time} is a string, it should look like @samp{07:31}, and
20214 the function will then be called once every day somewhere near that
20215 time.  Modified by the @var{idle} parameter, of course.
20216
20217 @vindex gnus-demon-timestep
20218 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
20219 seconds.  This is 60 by default.  If you change that variable,
20220 all the timings in the handlers will be affected.)
20221
20222 So, if you want to add a handler, you could put something like this in
20223 your @file{.gnus} file:
20224
20225 @findex gnus-demon-add-handler
20226 @lisp
20227 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
20228 @end lisp
20229
20230 @findex gnus-demon-add-nocem
20231 @findex gnus-demon-add-scanmail
20232 @findex gnus-demon-add-rescan
20233 @findex gnus-demon-add-scan-timestamps
20234 @findex gnus-demon-add-disconnection
20235 Some ready-made functions to do this have been created:
20236 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
20237 @code{gnus-demon-add-nntp-close-connection},
20238 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
20239 @code{gnus-demon-add-scanmail}.  Just put those functions in your
20240 @file{.gnus} if you want those abilities.
20241
20242 @findex gnus-demon-init
20243 @findex gnus-demon-cancel
20244 @vindex gnus-demon-handlers
20245 If you add handlers to @code{gnus-demon-handlers} directly, you should
20246 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
20247 daemons, you can use the @code{gnus-demon-cancel} function.
20248
20249 Note that adding daemons can be pretty naughty if you over do it.  Adding
20250 functions that scan all news and mail from all servers every two seconds
20251 is a sure-fire way of getting booted off any respectable system.  So
20252 behave.
20253
20254
20255 @node NoCeM
20256 @section NoCeM
20257 @cindex nocem
20258 @cindex spam
20259
20260 @dfn{Spamming} is posting the same article lots and lots of times.
20261 Spamming is bad.  Spamming is evil.
20262
20263 Spamming is usually canceled within a day or so by various anti-spamming
20264 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
20265 NoCeM is pronounced ``no see-'em'', and means what the name
20266 implies---these are messages that make the offending articles, like, go
20267 away.
20268
20269 What use are these NoCeM messages if the articles are canceled anyway?
20270 Some sites do not honor cancel messages and some sites just honor cancels
20271 from a select few people.  Then you may wish to make use of the NoCeM
20272 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
20273
20274 Gnus can read and parse the messages in this group automatically, and
20275 this will make spam disappear.
20276
20277 There are some variables to customize, of course:
20278
20279 @table @code
20280 @item gnus-use-nocem
20281 @vindex gnus-use-nocem
20282 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
20283 by default.
20284
20285 @item gnus-nocem-groups
20286 @vindex gnus-nocem-groups
20287 Gnus will look for NoCeM messages in the groups in this list.  The
20288 default is @code{("news.lists.filters" "news.admin.net-abuse.bulletins"
20289 "alt.nocem.misc" "news.admin.net-abuse.announce")}.
20290
20291 @item gnus-nocem-issuers
20292 @vindex gnus-nocem-issuers
20293 There are many people issuing NoCeM messages.  This list says what
20294 people you want to listen to.  The default is @code{("Automoose-1"
20295 "clewis@@ferret.ocunix.on.ca" "cosmo.roadkill" "SpamHippo"
20296 "hweede@@snafu.de")}; fine, upstanding citizens all of them.
20297
20298 Known despammers that you can put in this list are listed at
20299 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
20300
20301 You do not have to heed NoCeM messages from all these people---just the
20302 ones you want to listen to.  You also don't have to accept all NoCeM
20303 messages from the people you like.  Each NoCeM message has a @dfn{type}
20304 header that gives the message a (more or less, usually less) rigorous
20305 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
20306 @samp{binary}, and @samp{troll}.  To specify this, you have to use
20307 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
20308 Each condition is either a string (which is a regexp that matches types
20309 you want to use) or a list on the form @code{(not @var{string})}, where
20310 @var{string} is a regexp that matches types you don't want to use.
20311
20312 For instance, if you want all NoCeM messages from Chris Lewis except his
20313 @samp{troll} messages, you'd say:
20314
20315 @lisp
20316 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
20317 @end lisp
20318
20319 On the other hand, if you just want nothing but his @samp{spam} and
20320 @samp{spew} messages, you'd say:
20321
20322 @lisp
20323 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
20324 @end lisp
20325
20326 The specs are applied left-to-right.
20327
20328
20329 @item gnus-nocem-verifyer
20330 @vindex gnus-nocem-verifyer
20331 @findex mc-verify
20332 This should be a function for verifying that the NoCeM issuer is who she
20333 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
20334 function.  If this is too slow and you don't care for verification
20335 (which may be dangerous), you can set this variable to @code{nil}.
20336
20337 If you want signed NoCeM messages to be verified and unsigned messages
20338 not to be verified (but used anyway), you could do something like:
20339
20340 @lisp
20341 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
20342
20343 (defun my-gnus-mc-verify ()
20344   (not (eq 'forged
20345            (ignore-errors
20346              (if (mc-verify)
20347                  t
20348                'forged)))))
20349 @end lisp
20350
20351 This might be dangerous, though.
20352
20353 @item gnus-nocem-directory
20354 @vindex gnus-nocem-directory
20355 This is where Gnus will store its NoCeM cache files.  The default is
20356 @file{~/News/NoCeM/}.
20357
20358 @item gnus-nocem-expiry-wait
20359 @vindex gnus-nocem-expiry-wait
20360 The number of days before removing old NoCeM entries from the cache.
20361 The default is 15.  If you make it shorter Gnus will be faster, but you
20362 might then see old spam.
20363
20364 @item gnus-nocem-check-from
20365 @vindex gnus-nocem-check-from
20366 Non-@code{nil} means check for valid issuers in message bodies.
20367 Otherwise don't bother fetching articles unless their author matches a
20368 valid issuer; that is much faster if you are selective about the
20369 issuers.
20370
20371 @item gnus-nocem-check-article-limit
20372 @vindex gnus-nocem-check-article-limit
20373 If non-@code{nil}, the maximum number of articles to check in any NoCeM
20374 group.  NoCeM groups can be huge and very slow to process.
20375
20376 @end table
20377
20378 Using NoCeM could potentially be a memory hog.  If you have many living
20379 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
20380 big.  If this is a problem, you should kill off all (or most) of your
20381 unsubscribed groups (@pxref{Subscription Commands}).
20382
20383
20384 @node Undo
20385 @section Undo
20386 @cindex undo
20387
20388 It is very useful to be able to undo actions one has done.  In normal
20389 Emacs buffers, it's easy enough---you just push the @code{undo} button.
20390 In Gnus buffers, however, it isn't that simple.
20391
20392 The things Gnus displays in its buffer is of no value whatsoever to
20393 Gnus---it's all just data designed to look nice to the user.
20394 Killing a group in the group buffer with @kbd{C-k} makes the line
20395 disappear, but that's just a side-effect of the real action---the
20396 removal of the group in question from the internal Gnus structures.
20397 Undoing something like that can't be done by the normal Emacs
20398 @code{undo} function.
20399
20400 Gnus tries to remedy this somewhat by keeping track of what the user
20401 does and coming up with actions that would reverse the actions the user
20402 takes.  When the user then presses the @code{undo} key, Gnus will run
20403 the code to reverse the previous action, or the previous actions.
20404 However, not all actions are easily reversible, so Gnus currently offers
20405 a few key functions to be undoable.  These include killing groups,
20406 yanking groups, and changing the list of read articles of groups.
20407 That's it, really.  More functions may be added in the future, but each
20408 added function means an increase in data to be stored, so Gnus will
20409 never be totally undoable.
20410
20411 @findex gnus-undo-mode
20412 @vindex gnus-use-undo
20413 @findex gnus-undo
20414 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
20415 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
20416 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
20417 command, which should feel kinda like the normal Emacs @code{undo}
20418 command.
20419
20420
20421 @node Predicate Specifiers
20422 @section Predicate Specifiers
20423 @cindex predicate specifiers
20424
20425 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
20426 form that allows flexible specification of predicates without having
20427 to type all that much.
20428
20429 These specifiers are lists consisting of functions, symbols and lists.
20430
20431 Here's an example:
20432
20433 @lisp
20434 (or gnus-article-unseen-p
20435     gnus-article-unread-p)
20436 @end lisp
20437
20438 The available symbols are @code{or}, @code{and} and @code{not}.  The
20439 functions all take one parameter.
20440
20441 @findex gnus-make-predicate
20442 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
20443 to create a function that can be called.  This input parameter to this
20444 function will be passed along to all the functions in the predicate
20445 specifier.
20446
20447
20448 @node Moderation
20449 @section Moderation
20450 @cindex moderation
20451
20452 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
20453 It is not included in the standard Gnus package.  Write a mail to
20454 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
20455 get a copy.
20456
20457 The moderation package is implemented as a minor mode for summary
20458 buffers.  Put
20459
20460 @lisp
20461 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
20462 @end lisp
20463
20464 in your @file{.gnus.el} file.
20465
20466 If you are the moderator of @samp{rec.zoofle}, this is how it's
20467 supposed to work:
20468
20469 @enumerate
20470 @item
20471 You split your incoming mail by matching on
20472 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
20473 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
20474
20475 @item
20476 You enter that group once in a while and post articles using the @kbd{e}
20477 (edit-and-post) or @kbd{s} (just send unedited) commands.
20478
20479 @item
20480 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
20481 articles that weren't approved by you, you can cancel them with the
20482 @kbd{c} command.
20483 @end enumerate
20484
20485 To use moderation mode in these two groups, say:
20486
20487 @lisp
20488 (setq gnus-moderated-list
20489       "^nnml:rec.zoofle$\\|^rec.zoofle$")
20490 @end lisp
20491
20492
20493 @node Image Enhancements
20494 @section Image Enhancements
20495
20496 XEmacs, as well as Emacs 21, is able to display pictures and stuff, so
20497 Gnus has taken advantage of that.
20498
20499 @menu
20500 * Picons::                      How to display pictures of what you're reading.
20501 * Smileys::                     Show all those happy faces the way they were meant to be shown.
20502 * X-Face::                      Display a funky, teensy black-and-white image.
20503 * Toolbar::                     Click'n'drool.
20504 * XVarious::                    Other XEmacsy Gnusey variables.
20505 @end menu
20506
20507
20508 @node Picons
20509 @subsection Picons
20510
20511 @iftex
20512 @iflatex
20513 \include{picons}
20514 @end iflatex
20515 @end iftex
20516
20517 So@dots{}  You want to slow down your news reader even more!  This is a
20518 good way to do so.  Its also a great way to impress people staring
20519 over your shoulder as you read news.
20520
20521 @menu
20522 * Picon Basics::                What are picons and How do I get them.
20523 * Picon Requirements::          Don't go further if you aren't using XEmacs.
20524 * Easy Picons::                 Displaying Picons---the easy way.
20525 * Hard Picons::                 The way you should do it.  You'll learn something.
20526 * Picon Useless Configuration::  Other variables you can trash/tweak/munge/play with.
20527 @end menu
20528
20529
20530 @node Picon Basics
20531 @subsubsection Picon Basics
20532
20533 What are Picons?  To quote directly from the Picons Web site:
20534
20535 @iftex
20536 @iflatex
20537 \margindex{}
20538 @end iflatex
20539 @end iftex
20540
20541 @quotation
20542 @dfn{Picons} is short for ``personal icons''.  They're small,
20543 constrained images used to represent users and domains on the net,
20544 organized into databases so that the appropriate image for a given
20545 e-mail address can be found.  Besides users and domains, there are picon
20546 databases for Usenet newsgroups and weather forecasts.  The picons are
20547 in either monochrome @code{XBM} format or color @code{XPM} and
20548 @code{GIF} formats.
20549 @end quotation
20550
20551 @vindex gnus-picons-piconsearch-url
20552 If you have a permanent connection to the Internet you can use Steve
20553 Kinzler's Picons Search engine by setting
20554 @code{gnus-picons-piconsearch-url} to the string @*
20555 @uref{http://www.cs.indiana.edu/picons/search.html}.
20556
20557 @vindex gnus-picons-database
20558 Otherwise you need a local copy of his database.  For instructions on
20559 obtaining and installing the picons databases, point your Web browser at @*
20560 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.  Gnus expects
20561 picons to be installed into a location pointed to by
20562 @code{gnus-picons-database}.
20563
20564 If you are using Debian GNU/Linux, saying @samp{apt-get install
20565 picons.*} will install the picons where Gnus can find them.
20566
20567
20568 @node Picon Requirements
20569 @subsubsection Picon Requirements
20570
20571 To have Gnus display Picons for you, you must have @code{x} support
20572 compiled into XEmacs.  To display color picons which are much nicer
20573 than the black & white one, you also need one of @code{xpm} or
20574 @code{gif} compiled into XEmacs.
20575
20576 @vindex gnus-picons-convert-x-face
20577 If you want to display faces from @code{X-Face} headers, you should have
20578 the @code{xface} support compiled into XEmacs.  Otherwise you must have
20579 the @code{netpbm} utilities installed, or munge the
20580 @code{gnus-picons-convert-x-face} variable to use something else.
20581 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20582
20583 @node Easy Picons
20584 @subsubsection Easy Picons
20585
20586 To enable displaying picons, simply put the following line in your
20587 @file{~/.gnus} file and start Gnus.
20588
20589 @lisp
20590 (setq gnus-use-picons t)
20591 (setq gnus-treat-display-picons t)
20592 @end lisp
20593
20594 and make sure @code{gnus-picons-database} points to the directory
20595 containing the Picons databases.
20596
20597 Alternatively if you want to use the web piconsearch engine add this:
20598
20599 @lisp
20600 (setq gnus-picons-piconsearch-url
20601       "http://www.cs.indiana.edu:800/piconsearch")
20602 @end lisp
20603
20604
20605 @node Hard Picons
20606 @subsubsection Hard Picons
20607
20608 @iftex
20609 @iflatex
20610 \margindex{}
20611 @end iflatex
20612 @end iftex
20613
20614 Gnus can display picons for you as you enter and leave groups and
20615 articles.  It knows how to interact with three sections of the picons
20616 database.  Namely, it can display the picons newsgroup pictures,
20617 author's face picture(s), and the authors domain.  To enable this
20618 feature, you need to select where to get the picons from, and where to
20619 display them.
20620
20621 @table @code
20622
20623 @item gnus-picons-database
20624 @vindex gnus-picons-database
20625 The location of the picons database.  Should point to a directory
20626 containing the @file{news}, @file{domains}, @file{users} (and so on)
20627 subdirectories.  This is only useful if
20628 @code{gnus-picons-piconsearch-url} is @code{nil}.  Defaults to
20629 @file{/usr/local/faces/}.
20630
20631 @item gnus-picons-piconsearch-url
20632 @vindex gnus-picons-piconsearch-url
20633 The URL for the web picons search engine.  The only currently known
20634 engine is @uref{http://www.cs.indiana.edu:800/piconsearch}.  To
20635 workaround network delays, icons will be fetched in the background.  If
20636 this is @code{nil} 'the default), then picons are fetched from local
20637 database indicated by @code{gnus-picons-database}.
20638
20639 @item gnus-picons-display-where
20640 @vindex gnus-picons-display-where
20641 Where the picon images should be displayed.  It is @code{picons} by
20642 default (which by default maps to the buffer @samp{*Picons*}).  Other
20643 valid places could be @code{article}, @code{summary}, or
20644 @samp{*scratch*} for all I care.  Just make sure that you've made the
20645 buffer visible using the standard Gnus window configuration
20646 routines---@pxref{Window Layout}.
20647
20648 @item gnus-picons-group-excluded-groups
20649 @vindex gnus-picons-group-excluded-groups
20650 Groups that are matched by this regexp won't have their group icons
20651 displayed.
20652
20653 @end table
20654
20655 Note: If you set @code{gnus-use-picons} to @code{t}, it will set up your
20656 window configuration for you to include the @code{picons} buffer.
20657
20658 Now that you've made those decision, you need to add the following
20659 functions to the appropriate hooks so these pictures will get displayed
20660 at the right time.
20661
20662 @vindex gnus-picons-display-where
20663 @table @code
20664 @item gnus-article-display-picons
20665 @findex gnus-article-display-picons
20666 Looks up and displays the picons for the author and the author's domain
20667 in the @code{gnus-picons-display-where} buffer.
20668
20669 @item gnus-picons-article-display-x-face
20670 @findex gnus-picons-article-display-x-face
20671 Decodes and displays the X-Face header if present.
20672 (NOTE: @code{x-face} is used in the function name, not @code{xface})
20673
20674 @end table
20675
20676
20677
20678 @node Picon Useless Configuration
20679 @subsubsection Picon Useless Configuration
20680
20681 @iftex
20682 @iflatex
20683 \margindex{}
20684 @end iflatex
20685 @end iftex
20686
20687 The following variables offer further control over how things are
20688 done, where things are located, and other useless stuff you really
20689 don't need to worry about.
20690
20691 @table @code
20692
20693 @item gnus-picons-news-directories
20694 @vindex gnus-picons-news-directories
20695 List of subdirectories to search in @code{gnus-picons-database} for
20696 newsgroups faces.  @code{("news")} is the default.
20697
20698 @item gnus-picons-user-directories
20699 @vindex gnus-picons-user-directories
20700 List of subdirectories to search in @code{gnus-picons-database} for user
20701 faces.  @code{("local" "users" "usenix" "misc")} is the default.
20702
20703 @item gnus-picons-domain-directories
20704 @vindex gnus-picons-domain-directories
20705 List of subdirectories to search in @code{gnus-picons-database} for
20706 domain name faces.  Defaults to @code{("domains")}.  Some people may
20707 want to add @samp{"unknown"} to this list.
20708
20709 @item gnus-picons-convert-x-face
20710 @vindex gnus-picons-convert-x-face
20711 If you don't have @code{xface} support builtin XEmacs, this is the
20712 command to use to convert the @code{X-Face} header to an X bitmap
20713 (@code{xbm}).  Defaults to @code{(format "@{ echo '/* Width=48,
20714 Height=48 */'; uncompface; @} | icontopbm | pbmtoxbm > %s"
20715 gnus-picons-x-face-file-name)}
20716 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20717
20718 @item gnus-picons-x-face-file-name
20719 @vindex gnus-picons-x-face-file-name
20720 Names a temporary file to store the @code{X-Face} bitmap in.  Defaults
20721 to @code{(format "/tmp/picon-xface.%s.xbm" (user-login-name))}.
20722 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20723
20724 @item gnus-picons-has-modeline-p
20725 @vindex gnus-picons-has-modeline-p
20726 If you have set @code{gnus-picons-display-where} to @code{picons}, your
20727 XEmacs frame will become really cluttered.  To alleviate this a bit you
20728 can set @code{gnus-picons-has-modeline-p} to @code{nil}; this will
20729 remove the mode line from the Picons buffer.  This is only useful if
20730 @code{gnus-picons-display-where} is @code{picons}.
20731
20732 @item gnus-picons-refresh-before-display
20733 @vindex gnus-picons-refresh-before-display
20734 If non-nil, display the article buffer before computing the picons.
20735 Defaults to @code{nil}.
20736
20737 @item gnus-picons-display-as-address
20738 @vindex gnus-picons-display-as-address
20739 If @code{t} display textual email addresses along with pictures.
20740 Defaults to @code{t}.
20741
20742 @item gnus-picons-file-suffixes
20743 @vindex gnus-picons-file-suffixes
20744 Ordered list of suffixes on picon file names to try.  Defaults to
20745 @code{("xpm" "gif" "xbm")} minus those not builtin your XEmacs.
20746
20747 @item gnus-picons-setup-hook
20748 @vindex gnus-picons-setup-hook
20749 Hook run in the picon buffer, if that is displayed.
20750
20751 @item gnus-picons-display-article-move-p
20752 @vindex gnus-picons-display-article-move-p
20753 Whether to move point to first empty line when displaying picons.  This
20754 has only an effect if `gnus-picons-display-where' has value `article'.
20755
20756 If @code{nil}, display the picons in the @code{From} and
20757 @code{Newsgroups} lines.  This is the default.
20758
20759 @item gnus-picons-clear-cache-on-shutdown
20760 @vindex gnus-picons-clear-cache-on-shutdown
20761 Whether to clear the picons cache when exiting gnus.  Gnus caches every
20762 picons it finds while it is running.  This saves some time in the search
20763 process but eats some memory.  If this variable is set to @code{nil},
20764 Gnus will never clear the cache itself; you will have to manually call
20765 @code{gnus-picons-clear-cache} to clear it.  Otherwise the cache will be
20766 cleared every time you exit Gnus.  Defaults to @code{t}.
20767
20768 @iftex
20769 @iflatex
20770 \margindex{}
20771 @end iflatex
20772 @end iftex
20773
20774 @end table
20775
20776 @node Smileys
20777 @subsection Smileys
20778 @cindex smileys
20779
20780 @iftex
20781 @iflatex
20782 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
20783 \input{smiley}
20784 @end iflatex
20785 @end iftex
20786
20787 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
20788 currently the only package that uses Smiley, it is documented here.
20789
20790 In short---to use Smiley in Gnus, put the following in your
20791 @file{.gnus.el} file:
20792
20793 @lisp
20794 (setq gnus-treat-display-smileys t)
20795 @end lisp
20796
20797 Smiley maps text smiley faces---@samp{:-)}, @samp{:-=}, @samp{:-(} and
20798 the like---to pictures and displays those instead of the text smiley
20799 faces.  The conversion is controlled by a list of regexps that matches
20800 text and maps that to file names.
20801
20802 @vindex smiley-nosey-regexp-alist
20803 @vindex smiley-deformed-regexp-alist
20804 Smiley supplies two example conversion alists by default:
20805 @code{smiley-deformed-regexp-alist} (which matches @samp{:)}, @samp{:(}
20806 and so on), and @code{smiley-nosey-regexp-alist} (which matches
20807 @samp{:-)}, @samp{:-(} and so on).
20808
20809 The alist used is specified by the @code{smiley-regexp-alist} variable,
20810 which defaults to the value of @code{smiley-deformed-regexp-alist}.
20811
20812 The first item in each element is the regexp to be matched; the second
20813 element is the regexp match group that is to be replaced by the picture;
20814 and the third element is the name of the file to be displayed.
20815
20816 The following variables customize where Smiley will look for these
20817 files, as well as the color to be used and stuff:
20818
20819 @table @code
20820
20821 @item smiley-data-directory
20822 @vindex smiley-data-directory
20823 Where Smiley will look for smiley faces files.
20824
20825 @item smiley-flesh-color
20826 @vindex smiley-flesh-color
20827 Skin color.  The default is @samp{yellow}, which is really racist.
20828
20829 @item smiley-features-color
20830 @vindex smiley-features-color
20831 Color of the features of the face.  The default is @samp{black}.
20832
20833 @item smiley-tongue-color
20834 @vindex smiley-tongue-color
20835 Color of the tongue.  The default is @samp{red}.
20836
20837 @item smiley-circle-color
20838 @vindex smiley-circle-color
20839 Color of the circle around the face.  The default is @samp{black}.
20840
20841 @item smiley-mouse-face
20842 @vindex smiley-mouse-face
20843 Face used for mouse highlighting over the smiley face.
20844
20845 @end table
20846
20847
20848 @node X-Face
20849 @subsection X-Face
20850 @cindex x-face
20851
20852 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
20853 depth) image that's supposed to represent the author of the message.
20854 It seems to be supported by an ever-growing number of mail and news
20855 readers.
20856
20857 @cindex x-face
20858 @findex gnus-article-display-x-face
20859 @findex gnus-article-x-face-command
20860 @vindex gnus-article-x-face-command
20861 @vindex gnus-article-x-face-too-ugly
20862 @iftex
20863 @iflatex
20864 \include{xface}
20865 @end iflatex
20866 @end iftex
20867 @c @anchor{X-Face}
20868
20869 Decoding an @code{X-Face} header either requires an Emacs that has
20870 @samp{compface} support (which most XEmacs versions has), or that you
20871 have @samp{compface} installed on your system.  If either is true,
20872 Gnus will default to displaying @code{X-Face} headers.
20873
20874 The variable that controls this is the
20875 @code{gnus-article-x-face-command} variable.  If this variable is a
20876 string, this string will be executed in a sub-shell.  If it is a
20877 function, this function will be called with the face as the argument.
20878 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
20879 the @code{From} header, the face will not be shown.
20880
20881 The default action under Emacs 20 is to fork off the @code{display}
20882 program@footnote{@code{display} is from the ImageMagick package.  For
20883 the @code{uncompface} and @code{icontopbm} programs look for a package
20884 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
20885 view the face.
20886
20887 Under XEmacs or Emacs 21+ with suitable image support, the default
20888 action is to display the face before the @code{From} header.  (It's
20889 nicer if XEmacs has been compiled with @code{X-Face} support---that
20890 will make display somewhat faster.  If there's no native @code{X-Face}
20891 support, Gnus will try to convert the @code{X-Face} header using
20892 external programs from the @code{pbmplus} package and
20893 friends.@footnote{On a GNU/Linux system look for packages with names
20894 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
20895
20896 (NOTE: @code{x-face} is used in the variable/function names, not
20897 @code{xface}).
20898
20899 Gnus provides a few convenience functions and variables to allow
20900 easier insertion of X-Face headers in outgoing messages.
20901
20902 @findex gnus-random-x-face
20903 @code{gnus-random-x-face} goes through all the @samp{pbm} files
20904 in @code{gnus-x-face-directory} and picks one at random, and then
20905 converts it to the X-Face format by using the
20906 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
20907 @samp{pbm} files should be 48x48 pixels big.
20908
20909 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
20910 converts the file to X-Face format by using the
20911 @code{gnus-convert-image-to-x-face-command} shell command.
20912
20913 Here's how you would typically use the former function.  Put something
20914 like the following in your @file{.gnus.el} file:
20915
20916 @lisp
20917 (setq message-required-news-headers
20918       (nconc message-required-news-headers
20919              (list '(X-Face . gnus-random-x-face))))
20920 @end lisp
20921
20922 Using the latter function would be something like this:
20923
20924 @lisp
20925 (setq message-required-news-headers
20926       (nconc message-required-news-headers
20927              (list '(X-Face . (lambda ()
20928                                 (gnus-x-face-from-file
20929                                  "~/My-face.gif"))))))
20930 @end lisp
20931
20932
20933 @node Toolbar
20934 @subsection Toolbar
20935
20936 @table @code
20937
20938 @iftex
20939 @iflatex
20940 \margindex{}
20941 @end iflatex
20942 @end iftex
20943
20944 @item gnus-use-toolbar
20945 @vindex gnus-use-toolbar
20946 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
20947 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
20948 @code{right-toolbar}, or @code{left-toolbar}.
20949
20950 @item gnus-group-toolbar
20951 @vindex gnus-group-toolbar
20952 The toolbar in the group buffer.
20953
20954 @item gnus-summary-toolbar
20955 @vindex gnus-summary-toolbar
20956 The toolbar in the summary buffer.
20957
20958 @item gnus-summary-mail-toolbar
20959 @vindex gnus-summary-mail-toolbar
20960 The toolbar in the summary buffer of mail groups.
20961
20962 @end table
20963
20964
20965 @node XVarious
20966 @subsection Various XEmacs Variables
20967
20968 @table @code
20969 @item gnus-xmas-glyph-directory
20970 @vindex gnus-xmas-glyph-directory
20971 This is where Gnus will look for pictures.  Gnus will normally
20972 auto-detect this directory, but you may set it manually if you have an
20973 unusual directory structure.
20974
20975 @item gnus-xmas-logo-color-alist
20976 @vindex gnus-xmas-logo-color-alist
20977 This is an alist where the key is a type symbol and the values are the
20978 foreground and background color of the splash page glyph.
20979
20980 @item gnus-xmas-logo-color-style
20981 @vindex gnus-xmas-logo-color-style
20982 This is the key used to look up the color in the alist described above.
20983 Valid values include @code{flame}, @code{pine}, @code{moss},
20984 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
20985 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
20986
20987 @item gnus-xmas-modeline-glyph
20988 @vindex gnus-xmas-modeline-glyph
20989 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
20990 default.
20991
20992 @iftex
20993 @iflatex
20994 \margindex{}
20995 @end iflatex
20996 @end iftex
20997
20998 @end table
20999
21000
21001
21002
21003 @node Fuzzy Matching
21004 @section Fuzzy Matching
21005 @cindex fuzzy matching
21006
21007 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
21008 things like scoring, thread gathering and thread comparison.
21009
21010 As opposed to regular expression matching, fuzzy matching is very fuzzy.
21011 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
21012 means, and the implementation has changed over time.
21013
21014 Basically, it tries to remove all noise from lines before comparing.
21015 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21016 out of the strings before comparing the results.  This often leads to
21017 adequate results---even when faced with strings generated by text
21018 manglers masquerading as newsreaders.
21019
21020
21021 @node Thwarting Email Spam
21022 @section Thwarting Email Spam
21023 @cindex email spam
21024 @cindex spam
21025 @cindex UCE
21026 @cindex unsolicited commercial email
21027
21028 In these last days of the Usenet, commercial vultures are hanging about
21029 and grepping through news like crazy to find email addresses they can
21030 foist off their scams and products to.  As a reaction to this, many
21031 people have started putting nonsense addresses into their @code{From}
21032 lines.  I think this is counterproductive---it makes it difficult for
21033 people to send you legitimate mail in response to things you write, as
21034 well as making it difficult to see who wrote what.  This rewriting may
21035 perhaps be a bigger menace than the unsolicited commercial email itself
21036 in the end.
21037
21038 The biggest problem I have with email spam is that it comes in under
21039 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
21040 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
21041 mail group, only to find two pyramid schemes, seven advertisements
21042 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
21043 and one mail asking me to repent and find some god.
21044
21045 This is annoying.  Here's what you can do about it.
21046
21047 @menu
21048 * The problem of spam::         Some background, and some solutions
21049 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
21050 * SpamAssassin::                How to use external anti-spam tools.
21051 * Hashcash::                    Reduce spam by burning CPU time.
21052 * Filtering Spam Using spam.el::  
21053 * Filtering Spam Using Statistics (spam-stat.el)::  
21054 @end menu
21055
21056 @node The problem of spam
21057 @subsection The problem of spam
21058 @cindex email spam
21059 @cindex spam filtering approaches
21060 @cindex filtering approaches, spam
21061 @cindex UCE
21062 @cindex unsolicited commercial email
21063
21064 First, some background on spam.
21065
21066 If you have access to e-mail, you are familiar with spam (technically
21067 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
21068 because e-mail delivery is very cheap compared to paper mail, so only
21069 a very small percentage of people need to respond to an UCE to make it
21070 worthwhile to the advertiser.  Ironically, one of the most common
21071 spams is the one offering a database of e-mail addresses for further
21072 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
21073 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
21074
21075 Spam comes from a wide variety of sources.  It is simply impossible to
21076 dispose of all spam without discarding useful messages.  A good
21077 example is the TMDA system, which requires senders
21078 unknown to you to confirm themselves as legitimate senders before
21079 their e-mail can reach you.  Without getting into the technical side
21080 of TMDA, a downside is clearly that e-mail from legitimate sources may
21081 be discarded if those sources can't or won't confirm themselves
21082 through the TMDA system.  Another problem with TMDA is that it
21083 requires its users to have a basic understanding of e-mail delivery
21084 and processing.
21085
21086 The simplest approach to filtering spam is filtering.  If you get 200
21087 spam messages per day from @email{random-address@@vmadmin.com}, you
21088 block @samp{vmadmin.com}.  If you get 200 messages about
21089 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
21090 message.  This, unfortunately, is a great way to discard legitimate
21091 e-mail.  For instance, the very informative and useful RISKS digest
21092 has been blocked by overzealous mail filters because it
21093 @strong{contained} words that were common in spam messages.
21094 Nevertheless, in isolated cases, with great care, direct filtering of
21095 mail can be useful.
21096
21097 Another approach to filtering e-mail is the distributed spam
21098 processing, for instance DCC implements such a system.  In essence,
21099 @code{N} systems around the world agree that a machine @samp{X} in
21100 China, Ghana, or California is sending out spam e-mail, and these
21101 @code{N} systems enter @samp{X} or the spam e-mail from @samp{X} into
21102 a database.  The criteria for spam detection vary - it may be the
21103 number of messages sent, the content of the messages, and so on.  When
21104 a user of the distributed processing system wants to find out if a
21105 message is spam, he consults one of those @code{N} systems.
21106
21107 Distributed spam processing works very well against spammers that send
21108 a large number of messages at once, but it requires the user to set up
21109 fairly complicated checks.  There are commercial and free distributed
21110 spam processing systems.  Distributed spam processing has its risks as
21111 well.  For instance legitimate e-mail senders have been accused of
21112 sending spam, and their web sites have been shut down for some time
21113 because of the incident.
21114
21115 The statistical approach to spam filtering is also popular.  It is
21116 based on a statistical analysis of previous spam messages.  Usually
21117 the analysis is a simple word frequency count, with perhaps pairs of
21118 words or 3-word combinations thrown into the mix.  Statistical
21119 analysis of spam works very well in most of the cases, but it can
21120 classify legitimate e-mail as spam in some cases.  It takes time to
21121 run the analysis, the full message must be analyzed, and the user has
21122 to store the database of spam analyses.
21123
21124 @node Anti-Spam Basics
21125 @subsection Anti-Spam Basics
21126 @cindex email spam
21127 @cindex spam
21128 @cindex UCE
21129 @cindex unsolicited commercial email
21130
21131 One way of dealing with spam is having Gnus split out all spam into a
21132 @samp{spam} mail group (@pxref{Splitting Mail}).
21133
21134 First, pick one (1) valid mail address that you can be reached at, and
21135 put it in your @code{From} header of all your news articles.  (I've
21136 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
21137 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
21138 sysadmin whether your sendmail installation accepts keywords in the local
21139 part of the mail address.)
21140
21141 @lisp
21142 (setq message-default-news-headers
21143       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
21144 @end lisp
21145
21146 Then put the following split rule in @code{nnmail-split-fancy}
21147 (@pxref{Fancy Mail Splitting}):
21148
21149 @lisp
21150 (
21151  ...
21152  (to "larsi@@trym.ifi.uio.no"
21153       (| ("subject" "re:.*" "misc")
21154          ("references" ".*@@.*" "misc")
21155          "spam"))
21156  ...
21157 )
21158 @end lisp
21159
21160 This says that all mail to this address is suspect, but if it has a
21161 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
21162 header, it's probably ok.  All the rest goes to the @samp{spam} group.
21163 (This idea probably comes from Tim Pierce.)
21164
21165 In addition, many mail spammers talk directly to your @sc{smtp} server
21166 and do not include your email address explicitly in the @code{To}
21167 header.  Why they do this is unknown---perhaps it's to thwart this
21168 thwarting scheme?  In any case, this is trivial to deal with---you just
21169 put anything not addressed to you in the @samp{spam} group by ending
21170 your fancy split rule in this way:
21171
21172 @lisp
21173 (
21174  ...
21175  (to "larsi" "misc")
21176  "spam")
21177 @end lisp
21178
21179 In my experience, this will sort virtually everything into the right
21180 group.  You still have to check the @samp{spam} group from time to time to
21181 check for legitimate mail, though.  If you feel like being a good net
21182 citizen, you can even send off complaints to the proper authorities on
21183 each unsolicited commercial email---at your leisure.
21184
21185 If you are also a lazy net citizen, you will probably prefer complaining
21186 automatically with the @file{gnus-junk.el} package, available FOR FREE
21187 at @* @uref{http://stud2.tuwien.ac.at/~e9426626/gnus-junk.html}.
21188 Since most e-mail spam is sent automatically, this may reconcile the
21189 cosmic balance somewhat.
21190
21191 This works for me.  It allows people an easy way to contact me (they can
21192 just press @kbd{r} in the usual way), and I'm not bothered at all with
21193 spam.  It's a win-win situation.  Forging @code{From} headers to point
21194 to non-existent domains is yucky, in my opinion.
21195
21196
21197
21198 @node SpamAssassin
21199 @subsection SpamAssassin, Vipul's Razor, DCC, etc
21200 @cindex SpamAssassin
21201 @cindex Vipul's Razor
21202 @cindex DCC
21203
21204 The days where the hints in the previous section was sufficient in
21205 avoiding spam is coming to an end.  There are many tools out there
21206 that claim to reduce the amount of spam you get.  This section could
21207 easily become outdated fast, as new products replace old, but
21208 fortunately most of these tools seem to have similar interfaces.  Even
21209 though this section will use SpamAssassin as an example, it should be
21210 easy to adapt it to most other tools.
21211
21212 If the tool you are using is not installed on the mail server, you
21213 need to invoke it yourself.  Ideas on how to use the
21214 @code{:postscript} mail source parameter (@pxref{Mail Source
21215 Specifiers}) follows.
21216
21217 @lisp
21218 (setq mail-sources
21219       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
21220         (pop :user "jrl"
21221              :server "pophost"
21222              :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
21223 @end lisp
21224
21225 Once you managed to process your incoming spool somehow, thus making
21226 the mail contain e.g. a header indicating it is spam, you are ready to
21227 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
21228
21229 @lisp
21230 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
21231                              ...))
21232 @end lisp
21233
21234 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
21235
21236 @lisp
21237 (setq nnmail-split-methods 'nnmail-split-fancy
21238       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
21239                              ...))
21240 @end lisp
21241
21242 Some people might not like the idea of piping the mail through various
21243 programs using a @code{:prescript} (if some program is buggy, you
21244 might lose all mail).  If you are one of them, another solution is to
21245 call the external tools during splitting.  Example fancy split method:
21246
21247 @lisp
21248 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
21249                              ...))
21250 (defun kevin-spamassassin ()
21251   (save-excursion
21252     (let ((buf (or (get-buffer " *nnmail incoming*")
21253                    (get-buffer " *nnml move*"))))
21254       (if (not buf)
21255           (progn (message "Oops, cannot find message buffer") nil)
21256         (set-buffer buf)
21257         (if (eq 1 (call-process-region (point-min) (point-max)
21258                                        "spamc" nil nil nil "-c"))
21259             "spam")))))
21260 @end lisp
21261
21262 That is about it.  As some spam is likely to get through anyway, you
21263 might want to have a nifty function to call when you happen to read
21264 spam.  And here is the nifty function:
21265
21266 @lisp
21267  (defun my-gnus-raze-spam ()
21268   "Submit SPAM to Vipul's Razor, then mark it as expirable."
21269   (interactive)
21270   (gnus-summary-show-raw-article)
21271   (gnus-summary-save-in-pipe "razor-report -f -d")
21272   (gnus-summary-mark-as-expirable 1))
21273 @end lisp
21274
21275 @node Hashcash
21276 @subsection Hashcash
21277 @cindex hashcash
21278
21279 A novel technique to fight spam is to require senders to do something
21280 costly for each message they send.  This has the obvious drawback that
21281 you cannot rely on that everyone in the world uses this technique,
21282 since it is not part of the Internet standards, but it may be useful
21283 in smaller communities.
21284
21285 While the tools in the previous section work well in practice, they
21286 work only because the tools are constantly maintained and updated as
21287 new form of spam appears.  This means that a small percentage of spam
21288 will always get through.  It also means that somewhere, someone needs
21289 to read lots of spam to update these tools.  Hashcash avoids that, but
21290 instead requires that everyone you communicate with supports the
21291 scheme.  You can view the two approaches as pragmatic vs dogmatic.
21292 The approaches have their own advantages and disadvantages, but as
21293 often in the real world, a combination of them is stronger than either
21294 one of them separately.
21295
21296 @cindex X-Hashcash
21297 The ``something costly'' is to burn CPU time, more specifically to
21298 compute a hash collision up to a certain number of bits.  The
21299 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
21300 header. For more details, and for the external application
21301 @code{hashcash} you need to install to use this feature, see
21302 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
21303 information can be found at @uref{http://www.camram.org/}.
21304
21305 If you wish to call hashcash for each message you send, say something
21306 like:
21307
21308 @lisp
21309 (require 'hashcash)
21310 (add-hook 'message-send-hook 'mail-add-payment)
21311 @end lisp
21312
21313 The @code{hashcash.el} library can be found at
21314 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}, or in the Gnus
21315 development contrib directory.
21316
21317 You will need to set up some additional variables as well:
21318
21319 @table @code
21320
21321 @item hashcash-default-payment
21322 @vindex hashcash-default-payment
21323 This variable indicates the default number of bits the hash collision
21324 should consist of.  By default this is 0, meaning nothing will be
21325 done.  Suggested useful values include 17 to 29.
21326
21327 @item hashcash-payment-alist
21328 @vindex hashcash-payment-alist
21329 Some receivers may require you to spend burn more CPU time than the
21330 default.  This variable contains a list of @samp{(ADDR AMOUNT)} cells,
21331 where ADDR is the receiver (email address or newsgroup) and AMOUNT is
21332 the number of bits in the collision that is needed.  It can also
21333 contain @samp{(ADDR STRING AMOUNT)} cells, where the STRING is the
21334 string to use (normally the email address or newsgroup name is used).
21335
21336 @item hashcash
21337 @vindex hashcash
21338 Where the @code{hashcash} binary is installed.
21339
21340 @end table
21341
21342 Currently there is no built in functionality in Gnus to verify
21343 hashcash cookies, it is expected that this is performed by your hand
21344 customized mail filtering scripts.  Improvements in this area would be
21345 a useful contribution, however.
21346
21347 @node Filtering Spam Using spam.el
21348 @subsection Filtering Spam Using spam.el
21349 @cindex spam filtering
21350 @cindex spam.el
21351
21352 The idea behind @code{spam.el} is to have a control center for spam detection
21353 and filtering in Gnus.  To that end, @code{spam.el} does two things: it
21354 filters incoming mail, and it analyzes mail known to be spam.
21355
21356 So, what happens when you load @code{spam.el}?  First of all, you get
21357 the following keyboard commands:
21358
21359 @table @kbd
21360
21361 @item M-d
21362 @itemx M s x
21363 @itemx S x
21364 @kindex M-d
21365 @kindex S x
21366 @kindex M s x
21367 @findex gnus-summary-mark-as-spam
21368 @code{gnus-summary-mark-as-spam}.
21369
21370 Mark current article as spam, showing it with the @samp{H} mark.
21371 Whenever you see a spam article, make sure to mark its summary line
21372 with @kbd{M-d} before leaving the group.
21373
21374 @item M s t
21375 @itemx S t
21376 @kindex M s t
21377 @kindex S t
21378 @findex spam-bogofilter-score
21379 @code{spam-bogofilter-score}.
21380
21381 You must have bogofilter processing enabled for that command to work
21382 properly.
21383
21384 @xref{Bogofilter}.
21385
21386 @end table
21387
21388 Gnus can learn from the spam you get.  All you have to do is collect
21389 your spam in one or more spam groups, and set the variable
21390 @code{spam-junk-mailgroups} as appropriate.  In these groups, all messages
21391 are considered to be spam by default: they get the @samp{H} mark.  You must
21392 review these messages from time to time and remove the @samp{H} mark for
21393 every message that is not spam after all.  When you leave a spam
21394 group, all messages that continue with the @samp{H} mark, are passed on to
21395 the spam-detection engine (bogofilter, ifile, and others).  To remove
21396 the @samp{H} mark, you can use @kbd{M-u} to "unread" the article, or @kbd{d} for
21397 declaring it read the non-spam way.  When you leave a group, all @samp{H}
21398 marked articles, saved or unsaved, are sent to Bogofilter or ifile
21399 (depending on @code{spam-use-bogofilter} and @code{spam-use-ifile}), which will study
21400 them as spam samples.
21401
21402 Messages may also be deleted in various other ways, and unless
21403 @code{spam-ham-marks-form} gets overridden below, marks @samp{R} and @samp{r} for
21404 default read or explicit delete, marks @samp{X} and @samp{K} for automatic or
21405 explicit kills, as well as mark @samp{Y} for low scores, are all considered
21406 to be associated with articles which are not spam.  This assumption
21407 might be false, in particular if you use kill files or score files as
21408 means for detecting genuine spam, you should then adjust
21409 @code{spam-ham-marks-form}.  When you leave a group, all _unsaved_ articles
21410 bearing any the above marks are sent to Bogofilter or ifile, which
21411 will study these as not-spam samples.  If you explicit kill a lot, you
21412 might sometimes end up with articles marked @samp{K} which you never saw,
21413 and which might accidentally contain spam.  Best is to make sure that
21414 real spam is marked with @samp{H}, and nothing else.
21415
21416 All other marks do not contribute to Bogofilter or ifile
21417 pre-conditioning.  In particular, ticked, dormant or souped articles
21418 are likely to contribute later, when they will get deleted for real,
21419 so there is no need to use them prematurely.  Explicitly expired
21420 articles do not contribute, command @kbd{E} is a way to get rid of an
21421 article without Bogofilter or ifile ever seeing it.
21422
21423 @strong{TODO: @code{spam-use-ifile} does not process spam articles on group exit.
21424 I'm waiting for info from the author of @code{ifile-gnus.el}, because I think
21425 that functionality should go in @code{ifile-gnus.el} rather than @code{spam.el}.}
21426
21427 To use the @code{spam.el} facilities for incoming mail filtering, you
21428 must add the following to your fancy split list
21429 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
21430
21431 @example
21432 (: spam-split)
21433 @end example
21434
21435 Note that the fancy split may be called @code{nnmail-split-fancy} or
21436 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
21437 nnimap back ends to retrieve your mail.
21438
21439 The @code{spam-split} function will process incoming mail and send the mail
21440 considered to be spam into the group name given by the variable
21441 @code{spam-split-group}.  Usually that group name is @samp{spam}.
21442
21443 The following are the methods you can use to control the behavior of
21444 @code{spam-split}:
21445
21446 @menu
21447 * Blacklists and Whitelists::   
21448 * BBDB Whitelists::             
21449 * Blackholes::                  
21450 * Bogofilter::                  
21451 * Ifile spam filtering::        
21452 * Extending spam.el::           
21453 @end menu
21454
21455 @node Blacklists and Whitelists
21456 @subsubsection Blacklists and Whitelists
21457 @cindex spam filtering
21458 @cindex whitelists, spam filtering
21459 @cindex blacklists, spam filtering
21460 @cindex spam.el
21461
21462 @defvar spam-use-blacklist
21463 Set this variables to t (the default) if you want to use blacklists.
21464 @end defvar
21465
21466 @defvar spam-use-whitelist
21467 Set this variables to t if you want to use whitelists.
21468 @end defvar
21469
21470 Blacklists are lists of regular expressions matching addresses you
21471 consider to be spam senders.  For instance, to block mail from any
21472 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
21473 blacklist.  Since you start out with an empty blacklist, no harm is
21474 done by having the @code{spam-use-blacklist} variable set, so it is
21475 set by default.  Blacklist entries use the Emacs regular expression
21476 syntax.
21477
21478 Conversely, whitelists tell Gnus what addresses are considered
21479 legitimate.  All non-whitelisted addresses are considered spammers.
21480 This option is probably not useful for most Gnus users unless the
21481 whitelists is very comprehensive.  Also see @ref{BBDB Whitelists}.
21482 Whitelist entries use the Emacs regular expression syntax.
21483
21484 The Blacklist and whitelist location can be customized with the
21485 @code{spam-directory} variable (@file{~/News/spam} by default).  The whitelist
21486 and blacklist files will be in that directory, named @file{whitelist} and
21487 @file{blacklist} respectively.
21488
21489 @node BBDB Whitelists
21490 @subsubsection BBDB Whitelists
21491 @cindex spam filtering
21492 @cindex BBDB whitelists, spam filtering
21493 @cindex BBDB, spam filtering
21494 @cindex spam.el
21495
21496 @defvar spam-use-bbdb
21497
21498 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
21499 Whitelists}), but uses the BBDB as the source of whitelisted addresses,
21500 without regular expressions.  You must have the BBDB loaded for
21501 @code{spam-use-bbdb} to work properly.  Only addresses in the BBDB
21502 will be allowed through; all others will be classified as spam.
21503
21504 @end defvar
21505
21506 @node Blackholes
21507 @subsubsection Blackholes
21508 @cindex spam filtering
21509 @cindex blackholes, spam filtering
21510 @cindex spam.el
21511
21512 @defvar spam-use-blackholes
21513
21514 This option is disabled by default.  You can let Gnus consult the
21515 blackhole-type distributed spam processing systems (DCC, for instance)
21516 when you set this option.  The variable @code{spam-blackhole-servers}
21517 holds the list of blackhole servers Gnus will consult.  The current
21518 list is fairly comprehensive, but make sure to let us know if it
21519 contains outdated servers.
21520
21521 The blackhole check uses the @code{dig.el} package, but you can tell
21522 @code{spam.el} to use @code{dns.el} instead for better performance if
21523 you set @code{spam-use-dig} to nil.  It is not recommended at this
21524 time to set @code{spam-use-dig} to nil despite the possible
21525 performance improvements, because some users may be unable to use it,
21526 but you can try it and see if it works for you.
21527
21528 @end defvar
21529
21530 @node Bogofilter
21531 @subsubsection Bogofilter
21532 @cindex spam filtering
21533 @cindex bogofilter, spam filtering
21534 @cindex spam.el
21535
21536 @defvar spam-use-bogofilter
21537
21538 Set this variable if you want to use Eric Raymond's speedy Bogofilter.
21539 This has been tested with a locally patched copy of version 0.4.  Make
21540 sure to read the installation comments in @code{spam.el}.
21541
21542 With a minimum of care for associating the @samp{H} mark for spam
21543 articles only, Bogofilter training all gets fairly automatic.  You
21544 should do this until you get a few hundreds of articles in each
21545 category, spam or not.  The shell command @command{head -1
21546 ~/.bogofilter/*} shows both article counts.  The command @kbd{S t} in
21547 summary mode, either for debugging or for curiosity, triggers
21548 Bogofilter into displaying in another buffer the @emph{spamicity}
21549 score of the current article (between 0.0 and 1.0), together with the
21550 article words which most significantly contribute to the score.
21551
21552 @end defvar
21553
21554 @node Ifile spam filtering
21555 @subsubsection Ifile spam filtering
21556 @cindex spam filtering
21557 @cindex ifile, spam filtering
21558 @cindex spam.el
21559
21560 @defvar spam-use-ifile
21561
21562 Enable this variable if you want to use Ifile, a statistical analyzer
21563 similar to Bogofilter.  Currently you must have @code{ifile-gnus.el}
21564 loaded.  The integration of Ifile with @code{spam.el} is not finished
21565 yet, but you can use @code{ifile-gnus.el} on its own if you like.
21566
21567 @end defvar
21568
21569 @node Extending spam.el
21570 @subsubsection Extending spam.el
21571 @cindex spam filtering
21572 @cindex spam.el, extending
21573 @cindex extending spam.el
21574
21575 Say you want to add a new back end called blackbox.  Provide the following:
21576
21577 @enumerate
21578 @item
21579 documentation
21580
21581 @item
21582 code
21583
21584 @example
21585 (defvar spam-use-blackbox nil
21586   "True if blackbox should be used.")
21587 @end example
21588
21589 Add
21590 @example
21591     (spam-use-blackbox   . spam-check-blackbox)
21592 @end example
21593 to @code{spam-list-of-checks}.
21594
21595 @item
21596 functionality
21597
21598 Write the @code{spam-check-blackbox} function.  It should return
21599 @samp{nil} or @code{spam-split-group}.  See the existing
21600 @code{spam-check-*} functions for examples of what you can do.
21601 @end enumerate
21602
21603 @node Filtering Spam Using Statistics (spam-stat.el)
21604 @subsection Filtering Spam Using Statistics (spam-stat.el)
21605 @cindex Paul Graham
21606 @cindex Graham, Paul
21607 @cindex naive Bayesian spam filtering
21608 @cindex Bayesian spam filtering, naive
21609 @cindex spam filtering, naive Bayesian
21610
21611 Paul Graham has written an excellent essay about spam filtering using
21612 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
21613 Spam}.  In it he describes the inherent deficiency of rule-based
21614 filtering as used by SpamAssassin, for example: Somebody has to write
21615 the rules, and everybody else has to install these rules.  You are
21616 always late.  It would be much better, he argues, to filter mail based
21617 on whether it somehow resembles spam or non-spam.  One way to measure
21618 this is word distribution.  He then goes on to describe a solution
21619 that checks whether a new mail resembles any of your other spam mails
21620 or not.
21621
21622 The basic idea is this:  Create a two collections of your mail, one
21623 with spam, one with non-spam.  Count how often each word appears in
21624 either collection, weight this by the total number of mails in the
21625 collections, and store this information in a dictionary.  For every
21626 word in a new mail, determine its probability to belong to a spam or a
21627 non-spam mail.  Use the 15 most conspicuous words, compute the total
21628 probability of the mail being spam.  If this probability is higher
21629 than a certain threshold, the mail is considered to be spam.
21630
21631 Gnus supports this kind of filtering.  But it needs some setting up.
21632 First, you need two collections of your mail, one with spam, one with
21633 non-spam.  Then you need to create a dictionary using these two
21634 collections, and save it.  And last but not least, you need to use
21635 this dictionary in your fancy mail splitting rules.
21636
21637 @menu
21638 * Creating a spam-stat dictionary::  
21639 * Splitting mail using spam-stat::  
21640 * Low-level interface to the spam-stat dictionary::  
21641 @end menu
21642
21643 @node Creating a spam-stat dictionary
21644 @subsubsection Creating a spam-stat dictionary
21645
21646 Before you can begin to filter spam based on statistics, you must
21647 create these statistics based on two mail collections, one with spam,
21648 one with non-spam.  These statistics are then stored in a dictionary
21649 for later use.  In order for these statistics to be meaningful, you
21650 need several hundred emails in both collections.
21651
21652 Gnus currently supports only the nnml back end for automated dictionary
21653 creation.  The nnml back end stores all mails in a directory, one file
21654 per mail.  Use the following:
21655
21656 @defun spam-stat-process-spam-directory
21657 Create spam statistics for every file in this directory.  Every file
21658 is treated as one spam mail.
21659 @end defun
21660
21661 @defun spam-stat-process-non-spam-directory
21662 Create non-spam statistics for every file in this directory.  Every
21663 file is treated as one non-spam mail.
21664 @end defun
21665
21666 Usually you would call @code{spam-stat-process-spam-directory} on a
21667 directory such as @file{~/Mail/mail/spam} (this usually corresponds
21668 the the group @samp{nnml:mail.spam}), and you would call
21669 @code{spam-stat-process-non-spam-directory} on a directory such as
21670 @file{~/Mail/mail/misc} (this usually corresponds the the group
21671 @samp{nnml:mail.misc}).
21672
21673 @defvar spam-stat
21674 This variable holds the hash-table with all the statistics -- the
21675 dictionary we have been talking about.  For every word in either
21676 collection, this hash-table stores a vector describing how often the
21677 word appeared in spam and often it appeared in non-spam mails.
21678
21679 If you want to regenerate the statistics from scratch, you need to
21680 reset the dictionary.
21681
21682 @end defvar
21683
21684 @defun spam-stat-reset
21685 Reset the @code{spam-stat} hash-table, deleting all the statistics.
21686
21687 When you are done, you must save the dictionary.  The dictionary may
21688 be rather large.  If you will not update the dictionary incrementally
21689 (instead, you will recreate it once a month, for example), then you
21690 can reduce the size of the dictionary by deleting all words that did
21691 not appear often enough or that do not clearly belong to only spam or
21692 only non-spam mails.
21693 @end defun
21694
21695 @defun spam-stat-reduce-size
21696 Reduce the size of the dictionary.  Use this only if you do not want
21697 to update the dictionary incrementally.
21698 @end defun
21699
21700 @defun spam-stat-save
21701 Save the dictionary.
21702 @end defun
21703
21704 @defvar spam-stat-file
21705 The filename used to store the dictionary.  This defaults to
21706 @file{~/.spam-stat.el}.
21707 @end defvar
21708
21709 @node Splitting mail using spam-stat
21710 @subsubsection Splitting mail using spam-stat
21711
21712 In order to use @code{spam-stat} to split your mail, you need to add the
21713 following to your @file{~/.gnus} file:
21714
21715 @example
21716 (require 'spam-stat)
21717 (spam-stat-load)
21718 @end example
21719
21720 This will load the necessary Gnus code, and the dictionary you
21721 created.
21722
21723 Next, you need to adapt your fancy splitting rules:  You need to
21724 determine how to use @code{spam-stat}.  In the simplest case, you only have
21725 two groups, @samp{mail.misc} and @samp{mail.spam}.  The following expression says
21726 that mail is either spam or it should go into @samp{mail.misc}.  If it is
21727 spam, then @code{spam-stat-split-fancy} will return @samp{mail.spam}.
21728
21729 @example
21730 (setq nnmail-split-fancy
21731       `(| (: spam-stat-split-fancy)
21732           "mail.misc"))
21733 @end example
21734
21735 @defvar spam-stat-split-fancy-spam-group
21736 The group to use for spam.  Default is @samp{mail.spam}.
21737 @end defvar
21738
21739 If you also filter mail with specific subjects into other groups, use
21740 the following expression.  It only the mails not matching the regular
21741 expression are considered potential spam.
21742
21743 @example
21744 (setq nnmail-split-fancy
21745       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
21746           (: spam-stat-split-fancy)
21747           "mail.misc"))
21748 @end example
21749
21750 If you want to filter for spam first, then you must be careful when
21751 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
21752 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
21753 non-spam, therefore both should be in your collection of non-spam
21754 mails, when creating the dictionary!
21755
21756 @example
21757 (setq nnmail-split-fancy
21758       `(| (: spam-stat-split-fancy)
21759           ("Subject" "\\bspam-stat\\b" "mail.emacs")
21760           "mail.misc"))
21761 @end example
21762
21763 You can combine this with traditional filtering.  Here, we move all
21764 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
21765 @code{spam-stat-split-fancy} will never see them, the mails in
21766 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
21767 nor in your collection of non-spam mails, when creating the
21768 dictionary!
21769
21770 @example
21771 (setq nnmail-split-fancy
21772       `(| ("Content-Type" "text/html" "mail.spam.filtered")
21773           (: spam-stat-split-fancy)
21774           ("Subject" "\\bspam-stat\\b" "mail.emacs")
21775           "mail.misc"))
21776 @end example
21777
21778
21779 @node Low-level interface to the spam-stat dictionary
21780 @subsubsection Low-level interface to the spam-stat dictionary
21781
21782 The main interface to using @code{spam-stat}, are the following functions:
21783
21784 @defun spam-stat-buffer-is-spam
21785 called in a buffer, that buffer is considered to be a new spam mail;
21786 use this for new mail that has not been processed before
21787
21788 @end defun
21789
21790 @defun spam-stat-buffer-is-no-spam
21791 called in a buffer, that buffer is considered to be a new non-spam
21792 mail; use this for new mail that has not been processed before
21793
21794 @end defun
21795
21796 @defun spam-stat-buffer-change-to-spam
21797 called in a buffer, that buffer is no longer considered to be normal
21798 mail but spam; use this to change the status of a mail that has
21799 already been processed as non-spam
21800
21801 @end defun
21802
21803 @defun spam-stat-buffer-change-to-non-spam
21804 called in a buffer, that buffer is no longer considered to be spam but
21805 normal mail; use this to change the status of a mail that has already
21806 been processed as spam
21807
21808 @end defun
21809
21810 @defun spam-stat-save
21811 save the hash table to the file; the filename used is stored in the
21812 variable @code{spam-stat-file}
21813
21814 @end defun
21815
21816 @defun spam-stat-load
21817 load the hash table from a file; the filename used is stored in the
21818 variable @code{spam-stat-file}
21819
21820 @end defun
21821
21822 @defun spam-stat-score-word
21823 return the spam score for a word
21824
21825 @end defun
21826
21827 @defun spam-stat-score-buffer
21828 return the spam score for a buffer
21829
21830 @end defun
21831
21832 @defun spam-stat-split-fancy
21833 for fancy mail splitting; add the rule @samp{(: spam-stat-split-fancy)} to
21834 @code{nnmail-split-fancy}
21835
21836 This requires the following in your @file{~/.gnus} file:
21837
21838 @example
21839 (require 'spam-stat)
21840 (spam-stat-load)
21841 @end example
21842
21843 @end defun
21844
21845 Typical test will involve calls to the following functions:
21846
21847 @example
21848 Reset: (setq spam-stat (make-hash-table :test 'equal))
21849 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
21850 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
21851 Save table: (spam-stat-save)
21852 File size: (nth 7 (file-attributes spam-stat-file))
21853 Number of words: (hash-table-count spam-stat)
21854 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
21855 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
21856 Reduce table size: (spam-stat-reduce-size)
21857 Save table: (spam-stat-save)
21858 File size: (nth 7 (file-attributes spam-stat-file))
21859 Number of words: (hash-table-count spam-stat)
21860 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
21861 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
21862 @end example
21863
21864 Here is how you would create your dictionary:
21865
21866 @example
21867 Reset: (setq spam-stat (make-hash-table :test 'equal))
21868 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
21869 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
21870 Repeat for any other non-spam group you need...
21871 Reduce table size: (spam-stat-reduce-size)
21872 Save table: (spam-stat-save)
21873 @end example
21874
21875 @node Various Various
21876 @section Various Various
21877 @cindex mode lines
21878 @cindex highlights
21879
21880 @table @code
21881
21882 @item gnus-home-directory
21883 All Gnus path variables will be initialized from this variable, which
21884 defaults to @file{~/}.
21885
21886 @item gnus-directory
21887 @vindex gnus-directory
21888 Most Gnus storage path variables will be initialized from this variable,
21889 which defaults to the @samp{SAVEDIR} environment variable, or
21890 @file{~/News/} if that variable isn't set.
21891
21892 Note that Gnus is mostly loaded when the @file{.gnus.el} file is read.
21893 This means that other directory variables that are initialized from this
21894 variable won't be set properly if you set this variable in
21895 @file{.gnus.el}.  Set this variable in @file{.emacs} instead.
21896
21897 @item gnus-default-directory
21898 @vindex gnus-default-directory
21899 Not related to the above variable at all---this variable says what the
21900 default directory of all Gnus buffers should be.  If you issue commands
21901 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
21902 default directory.  If this variable is @code{nil} (which is the
21903 default), the default directory will be the default directory of the
21904 buffer you were in when you started Gnus.
21905
21906 @item gnus-verbose
21907 @vindex gnus-verbose
21908 This variable is an integer between zero and ten.  The higher the value,
21909 the more messages will be displayed.  If this variable is zero, Gnus
21910 will never flash any messages, if it is seven (which is the default),
21911 most important messages will be shown, and if it is ten, Gnus won't ever
21912 shut up, but will flash so many messages it will make your head swim.
21913
21914 @item gnus-verbose-backends
21915 @vindex gnus-verbose-backends
21916 This variable works the same way as @code{gnus-verbose}, but it applies
21917 to the Gnus back ends instead of Gnus proper.
21918
21919 @item nnheader-max-head-length
21920 @vindex nnheader-max-head-length
21921 When the back ends read straight heads of articles, they all try to read
21922 as little as possible.  This variable (default 4096) specifies
21923 the absolute max length the back ends will try to read before giving up
21924 on finding a separator line between the head and the body.  If this
21925 variable is @code{nil}, there is no upper read bound.  If it is
21926 @code{t}, the back ends won't try to read the articles piece by piece,
21927 but read the entire articles.  This makes sense with some versions of
21928 @code{ange-ftp} or @code{efs}.
21929
21930 @item nnheader-head-chop-length
21931 @vindex nnheader-head-chop-length
21932 This variable (default 2048) says how big a piece of each article to
21933 read when doing the operation described above.
21934
21935 @item nnheader-file-name-translation-alist
21936 @vindex nnheader-file-name-translation-alist
21937 @cindex file names
21938 @cindex invalid characters in file names
21939 @cindex characters in file names
21940 This is an alist that says how to translate characters in file names.
21941 For instance, if @samp{:} is invalid as a file character in file names
21942 on your system (you OS/2 user you), you could say something like:
21943
21944 @lisp
21945 (setq nnheader-file-name-translation-alist
21946       '((?: . ?_)))
21947 @end lisp
21948
21949 In fact, this is the default value for this variable on OS/2 and MS
21950 Windows (phooey) systems.
21951
21952 @item gnus-hidden-properties
21953 @vindex gnus-hidden-properties
21954 This is a list of properties to use to hide ``invisible'' text.  It is
21955 @code{(invisible t intangible t)} by default on most systems, which
21956 makes invisible text invisible and intangible.
21957
21958 @item gnus-parse-headers-hook
21959 @vindex gnus-parse-headers-hook
21960 A hook called before parsing headers.  It can be used, for instance, to
21961 gather statistics on the headers fetched, or perhaps you'd like to prune
21962 some headers.  I don't see why you'd want that, though.
21963
21964 @item gnus-shell-command-separator
21965 @vindex gnus-shell-command-separator
21966 String used to separate two shell commands.  The default is @samp{;}.
21967
21968 @item gnus-invalid-group-regexp
21969 @vindex gnus-invalid-group-regexp
21970
21971 Regexp to match ``invalid'' group names when querying user for a group
21972 name.  The default value catches some @strong{really} invalid group
21973 names who could possibly mess up Gnus internally (like allowing
21974 @samp{:} in a group name, which is normally used to delimit method and
21975 group).
21976
21977 @sc{imap} users might want to allow @samp{/} in group names though.
21978
21979
21980 @end table
21981
21982 @node The End
21983 @chapter The End
21984
21985 Well, that's the manual---you can get on with your life now.  Keep in
21986 touch.  Say hello to your cats from me.
21987
21988 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
21989
21990 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
21991
21992 @quotation
21993 @strong{Te Deum}
21994
21995 @sp 1
21996 Not because of victories @*
21997 I sing,@*
21998 having none,@*
21999 but for the common sunshine,@*
22000 the breeze,@*
22001 the largess of the spring.
22002
22003 @sp 1
22004 Not for victory@*
22005 but for the day's work done@*
22006 as well as I was able;@*
22007 not for a seat upon the dais@*
22008 but at the common table.@*
22009 @end quotation
22010
22011
22012 @node Appendices
22013 @chapter Appendices
22014
22015 @menu
22016 * XEmacs::                      Requirements for installing under XEmacs.
22017 * History::                     How Gnus got where it is today.
22018 * On Writing Manuals::          Why this is not a beginner's guide.
22019 * Terminology::                 We use really difficult, like, words here.
22020 * Customization::               Tailoring Gnus to your needs.
22021 * Troubleshooting::             What you might try if things do not work.
22022 * Gnus Reference Guide::        Rilly, rilly technical stuff.
22023 * Emacs for Heathens::          A short introduction to Emacsian terms.
22024 * Frequently Asked Questions::
22025 @end menu
22026
22027
22028 @node XEmacs
22029 @section XEmacs
22030 @cindex XEmacs
22031 @cindex Installing under XEmacs
22032
22033 XEmacs is distributed as a collection of packages.  You should install
22034 whatever packages the Gnus XEmacs package requires.  The current
22035 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
22036 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
22037 @samp{xemacs-base}, and @samp{fsf-compat}.  The @samp{misc-games}
22038 package is required for Morse decoding.
22039
22040
22041 @node History
22042 @section History
22043
22044 @cindex history
22045 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
22046 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
22047
22048 If you want to investigate the person responsible for this outrage,
22049 you can point your (feh!) web browser to
22050 @uref{http://quimby.gnus.org/}.  This is also the primary
22051 distribution point for the new and spiffy versions of Gnus, and is
22052 known as The Site That Destroys Newsrcs And Drives People Mad.
22053
22054 During the first extended alpha period of development, the new Gnus was
22055 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
22056 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
22057 (Besides, the ``Gnus'' in this abbreviation should probably be
22058 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
22059 appropriate name, don't you think?)
22060
22061 In any case, after spending all that energy on coming up with a new and
22062 spunky name, we decided that the name was @emph{too} spunky, so we
22063 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
22064 ``@sc{gnus}''.  New vs. old.
22065
22066 @menu
22067 * Gnus Versions::               What Gnus versions have been released.
22068 * Other Gnus Versions::         Other Gnus versions that also have been released.
22069 * Why?::                        What's the point of Gnus?
22070 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
22071 * Conformity::                  Gnus tries to conform to all standards.
22072 * Emacsen::                     Gnus can be run on a few modern Emacsen.
22073 * Gnus Development::            How Gnus is developed.
22074 * Contributors::                Oodles of people.
22075 * New Features::                Pointers to some of the new stuff in Gnus.
22076 @end menu
22077
22078
22079 @node Gnus Versions
22080 @subsection Gnus Versions
22081 @cindex ding Gnus
22082 @cindex September Gnus
22083 @cindex Red Gnus
22084 @cindex Quassia Gnus
22085 @cindex Pterodactyl Gnus
22086 @cindex Oort Gnus
22087 @cindex No Gnus
22088
22089 The first ``proper'' release of Gnus 5 was done in November 1995 when it
22090 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
22091 plus 15 Gnus 5.0 releases).
22092
22093 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
22094 releases)) was released under the name ``Gnus 5.2'' (40 releases).
22095
22096 On July 28th 1996 work on Red Gnus was begun, and it was released on
22097 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
22098
22099 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
22100 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
22101
22102 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
22103 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
22104 1999.
22105
22106 On the 26th of October 2000, Oort Gnus was begun.
22107
22108 If you happen upon a version of Gnus that has a prefixed name --
22109 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
22110 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
22111 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
22112 run.  Walk away, calmly, until you're out of its reach.  Find a proper
22113 released version of Gnus and snuggle up to that instead.
22114
22115
22116 @node Other Gnus Versions
22117 @subsection Other Gnus Versions
22118 @cindex Semi-gnus
22119
22120 In addition to the versions of Gnus which have had their releases
22121 coordinated by Lars, one major development has been Semi-gnus from
22122 Japan.  It's based on a library called @sc{semi}, which provides
22123 @sc{mime} capabilities.
22124
22125 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
22126 Collectively, they are called ``Semi-gnus'', and different strains are
22127 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
22128 @sc{mime} and multilingualization things, especially important for
22129 Japanese users.
22130
22131
22132 @node Why?
22133 @subsection Why?
22134
22135 What's the point of Gnus?
22136
22137 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
22138 newsreader, that lets you do anything you can think of.  That was my
22139 original motivation, but while working on Gnus, it has become clear to
22140 me that this generation of newsreaders really belong in the stone age.
22141 Newsreaders haven't developed much since the infancy of the net.  If the
22142 volume continues to rise with the current rate of increase, all current
22143 newsreaders will be pretty much useless.  How do you deal with
22144 newsgroups that have thousands of new articles each day?  How do you
22145 keep track of millions of people who post?
22146
22147 Gnus offers no real solutions to these questions, but I would very much
22148 like to see Gnus being used as a testing ground for new methods of
22149 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
22150 to separate the newsreader from the back ends, Gnus now offers a simple
22151 interface for anybody who wants to write new back ends for fetching mail
22152 and news from different sources.  I have added hooks for customizations
22153 everywhere I could imagine it being useful.  By doing so, I'm inviting
22154 every one of you to explore and invent.
22155
22156 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
22157 @kbd{C-u 100 M-x all-hail-xemacs}.
22158
22159
22160 @node Compatibility
22161 @subsection Compatibility
22162
22163 @cindex compatibility
22164 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
22165 bindings have been kept.  More key bindings have been added, of course,
22166 but only in one or two obscure cases have old bindings been changed.
22167
22168 Our motto is:
22169 @quotation
22170 @cartouche
22171 @center In a cloud bones of steel.
22172 @end cartouche
22173 @end quotation
22174
22175 All commands have kept their names.  Some internal functions have changed
22176 their names.
22177
22178 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
22179 Articles}.
22180
22181 One major compatibility question is the presence of several summary
22182 buffers.  All variables relevant while reading a group are
22183 buffer-local to the summary buffer they belong in.  Although many
22184 important variables have their values copied into their global
22185 counterparts whenever a command is executed in the summary buffer, this
22186 change might lead to incorrect values being used unless you are careful.
22187
22188 All code that relies on knowledge of @sc{gnus} internals will probably
22189 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
22190 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
22191 maintains a hash table that points to the entries in this alist (which
22192 speeds up many functions), and changing the alist directly will lead to
22193 peculiar results.
22194
22195 @cindex hilit19
22196 @cindex highlighting
22197 Old hilit19 code does not work at all.  In fact, you should probably
22198 remove all hilit code from all Gnus hooks
22199 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
22200 Gnus provides various integrated functions for highlighting.  These are
22201 faster and more accurate.  To make life easier for everybody, Gnus will
22202 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
22203 Away!
22204
22205 Packages like @code{expire-kill} will no longer work.  As a matter of
22206 fact, you should probably remove all old @sc{gnus} packages (and other
22207 code) when you start using Gnus.  More likely than not, Gnus already
22208 does what you have written code to make @sc{gnus} do.  (Snicker.)
22209
22210 Even though old methods of doing things are still supported, only the
22211 new methods are documented in this manual.  If you detect a new method of
22212 doing something while reading this manual, that does not mean you have
22213 to stop doing it the old way.
22214
22215 Gnus understands all @sc{gnus} startup files.
22216
22217 @kindex M-x gnus-bug
22218 @findex gnus-bug
22219 @cindex reporting bugs
22220 @cindex bugs
22221 Overall, a casual user who hasn't written much code that depends on
22222 @sc{gnus} internals should suffer no problems.  If problems occur,
22223 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
22224
22225 @vindex gnus-bug-create-help-buffer
22226 If you are in the habit of sending bug reports @emph{very} often, you
22227 may find the helpful help buffer annoying after a while.  If so, set
22228 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
22229 up at you.
22230
22231
22232 @node Conformity
22233 @subsection Conformity
22234
22235 No rebels without a clue here, ma'am.  We conform to all standards known
22236 to (wo)man.  Except for those standards and/or conventions we disagree
22237 with, of course.
22238
22239 @table @strong
22240
22241 @item RFC (2)822
22242 @cindex RFC 822
22243 @cindex RFC 2822
22244 There are no known breaches of this standard.
22245
22246 @item RFC 1036
22247 @cindex RFC 1036
22248 There are no known breaches of this standard, either.
22249
22250 @item Son-of-RFC 1036
22251 @cindex Son-of-RFC 1036
22252 We do have some breaches to this one.
22253
22254 @table @emph
22255
22256 @item X-Newsreader
22257 @itemx User-Agent
22258 These are considered to be ``vanity headers'', while I consider them
22259 to be consumer information.  After seeing so many badly formatted
22260 articles coming from @code{tin} and @code{Netscape} I know not to use
22261 either of those for posting articles.  I would not have known that if
22262 it wasn't for the @code{X-Newsreader} header.
22263 @end table
22264
22265 @item USEFOR
22266 @cindex USEFOR
22267 USEFOR is an IETF working group writing a successor to RFC 1036, based
22268 on Son-of-RFC 1036.  They have produced a number of drafts proposing
22269 various changes to the format of news articles.  The Gnus towers will
22270 look into implementing the changes when the draft is accepted as an RFC.
22271
22272 @item MIME - RFC 2045-2049 etc
22273 @cindex MIME
22274 All the various @sc{mime} RFCs are supported.
22275
22276 @item Disposition Notifications - RFC 2298
22277 Message Mode is able to request notifications from the receiver.
22278
22279 @item PGP - RFC 1991 and RFC 2440
22280 @cindex RFC 1991
22281 @cindex RFC 2440
22282 RFC 1991 is the original PGP message specification, published as a
22283 Information RFC.  RFC 2440 was the follow-up, now called Open PGP, and
22284 put on the Standards Track.  Both document a non-@sc{mime} aware PGP
22285 format.  Gnus supports both encoding (signing and encryption) and
22286 decoding (verification and decryption).
22287
22288 @item PGP/MIME - RFC 2015/3156
22289 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
22290 1991) describes the @sc{mime}-wrapping around the RF 1991/2440 format.
22291 Gnus supports both encoding and decoding.
22292
22293 @item S/MIME - RFC 2633
22294 RFC 2633 describes the @sc{s/mime} format.
22295
22296 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
22297 RFC 1730 is @sc{imap} version 4, updated somewhat by RFC 2060 (@sc{imap} 4
22298 revision 1).  RFC 2195 describes CRAM-MD5 authentication for @sc{imap}. RFC
22299 2086 describes access control lists (ACLs) for @sc{imap}. RFC 2359
22300 describes a @sc{imap} protocol enhancement.  RFC 2595 describes the proper
22301 TLS integration (STARTTLS) with @sc{imap}.  RFC 1731 describes the
22302 GSSAPI/Kerberos4 mechanisms for @sc{imap}.
22303
22304 @end table
22305
22306 If you ever notice Gnus acting non-compliant with regards to the texts
22307 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
22308 know.
22309
22310
22311 @node Emacsen
22312 @subsection Emacsen
22313 @cindex Emacsen
22314 @cindex XEmacs
22315 @cindex Mule
22316 @cindex Emacs
22317
22318 Gnus should work on :
22319
22320 @itemize @bullet
22321
22322 @item
22323 Emacs 20.3 and up.
22324
22325 @item
22326 XEmacs 20.4 and up.
22327
22328 @end itemize
22329
22330 This Gnus version will absolutely not work on any Emacsen older than
22331 that.  Not reliably, at least.  Older versions of Gnus may work on older
22332 Emacs versions.
22333
22334 There are some vague differences between Gnus on the various
22335 platforms---XEmacs features more graphics (a logo and a toolbar)---but
22336 other than that, things should look pretty much the same under all
22337 Emacsen.
22338
22339
22340 @node Gnus Development
22341 @subsection Gnus Development
22342
22343 Gnus is developed in a two-phased cycle.  The first phase involves much
22344 discussion on the @samp{ding@@gnus.org} mailing list, where people
22345 propose changes and new features, post patches and new back ends.  This
22346 phase is called the @dfn{alpha} phase, since the Gnusae released in this
22347 phase are @dfn{alpha releases}, or (perhaps more commonly in other
22348 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
22349 unstable and should not be used by casual users.  Gnus alpha releases
22350 have names like ``Red Gnus'' and ``Quassia Gnus''.
22351
22352 After futzing around for 50-100 alpha releases, Gnus is declared
22353 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
22354 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
22355 supposed to be able to use these, and these are mostly discussed on the
22356 @samp{gnu.emacs.gnus} newsgroup.
22357
22358 @cindex Incoming*
22359 @vindex mail-source-delete-incoming
22360 Some variable defaults differ between alpha Gnusae and released Gnusae.
22361 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
22362 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
22363 lossage of mail if an alpha release hiccups while handling the mail.
22364
22365 The division of discussion between the ding mailing list and the Gnus
22366 newsgroup is not purely based on publicity concerns.  It's true that
22367 having people write about the horrible things that an alpha Gnus release
22368 can do (sometimes) in a public forum may scare people off, but more
22369 importantly, talking about new experimental features that have been
22370 introduced may confuse casual users.  New features are frequently
22371 introduced, fiddled with, and judged to be found wanting, and then
22372 either discarded or totally rewritten.  People reading the mailing list
22373 usually keep up with these rapid changes, while people on the newsgroup
22374 can't be assumed to do so.
22375
22376
22377
22378 @node Contributors
22379 @subsection Contributors
22380 @cindex contributors
22381
22382 The new Gnus version couldn't have been done without the help of all the
22383 people on the (ding) mailing list.  Every day for over a year I have
22384 gotten billions of nice bug reports from them, filling me with joy,
22385 every single one of them.  Smooches.  The people on the list have been
22386 tried beyond endurance, what with my ``oh, that's a neat idea <type
22387 type>, yup, I'll release it right away <ship off> no wait, that doesn't
22388 work at all <type type>, yup, I'll ship that one off right away <ship
22389 off> no, wait, that absolutely does not work'' policy for releases.
22390 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
22391 ``worser''? ``much worser''?  ``worsest''?)
22392
22393 I would like to take this opportunity to thank the Academy for...  oops,
22394 wrong show.
22395
22396 @itemize @bullet
22397
22398 @item
22399 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
22400
22401 @item
22402 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
22403 nnwarchive and many, many other things connected with @sc{mime} and
22404 other types of en/decoding, as well as general bug fixing, new
22405 functionality and stuff.
22406
22407 @item
22408 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
22409 well as numerous other things).
22410
22411 @item
22412 Luis Fernandes---design and graphics.
22413
22414 @item
22415 Joe Reiss---creator of the smiley faces.
22416
22417 @item
22418 Justin Sheehy--the FAQ maintainer.
22419
22420 @item
22421 Erik Naggum---help, ideas, support, code and stuff.
22422
22423 @item
22424 Wes Hardaker---@file{gnus-picon.el} and the manual section on
22425 @dfn{picons} (@pxref{Picons}).
22426
22427 @item
22428 Kim-Minh Kaplan---further work on the picon code.
22429
22430 @item
22431 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
22432 (@pxref{GroupLens}).
22433
22434 @item
22435 Sudish Joseph---innumerable bug fixes.
22436
22437 @item
22438 Ilja Weis---@file{gnus-topic.el}.
22439
22440 @item
22441 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
22442
22443 @item
22444 Vladimir Alexiev---the refcard and reference booklets.
22445
22446 @item
22447 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
22448 distribution by Felix Lee and JWZ.
22449
22450 @item
22451 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
22452
22453 @item
22454 Peter Mutsaers---orphan article scoring code.
22455
22456 @item
22457 Ken Raeburn---POP mail support.
22458
22459 @item
22460 Hallvard B Furuseth---various bits and pieces, especially dealing with
22461 .newsrc files.
22462
22463 @item
22464 Brian Edmonds---@file{gnus-bbdb.el}.
22465
22466 @item
22467 David Moore---rewrite of @file{nnvirtual.el} and many other things.
22468
22469 @item
22470 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
22471
22472 @item
22473 François Pinard---many, many interesting and thorough bug reports, as
22474 well as autoconf support.
22475
22476 @end itemize
22477
22478 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
22479 Borges, and Jost Krieger proof-reading parts of the manual.
22480
22481 The following people have contributed many patches and suggestions:
22482
22483 Christopher Davis,
22484 Andrew Eskilsson,
22485 Kai Grossjohann,
22486 David KÃ¥gedal,
22487 Richard Pieri,
22488 Fabrice Popineau,
22489 Daniel Quinlan,
22490 Jason L. Tibbitts, III,
22491 and
22492 Jack Vinson.
22493
22494 Also thanks to the following for patches and stuff:
22495
22496 Jari Aalto,
22497 Adrian Aichner,
22498 Vladimir Alexiev,
22499 Russ Allbery,
22500 Peter Arius,
22501 Matt Armstrong,
22502 Marc Auslander,
22503 Miles Bader,
22504 Alexei V. Barantsev,
22505 Frank Bennett,
22506 Robert Bihlmeyer,
22507 Chris Bone,
22508 Mark Borges,
22509 Mark Boyns,
22510 Lance A. Brown,
22511 Rob Browning,
22512 Kees de Bruin,
22513 Martin Buchholz,
22514 Joe Buehler,
22515 Kevin Buhr,
22516 Alastair Burt,
22517 Joao Cachopo,
22518 Zlatko Calusic,
22519 Massimo Campostrini,
22520 Castor,
22521 David Charlap,
22522 Dan Christensen,
22523 Kevin Christian,
22524 Jae-you Chung, @c ?
22525 James H. Cloos, Jr.,
22526 Laura Conrad,
22527 Michael R. Cook,
22528 Glenn Coombs,
22529 Andrew J. Cosgriff,
22530 Neil Crellin,
22531 Frank D. Cringle,
22532 Geoffrey T. Dairiki,
22533 Andre Deparade,
22534 Ulrik Dickow,
22535 Dave Disser,
22536 Rui-Tao Dong, @c ?
22537 Joev Dubach,
22538 Michael Welsh Duggan,
22539 Dave Edmondson,
22540 Paul Eggert,
22541 Mark W. Eichin,
22542 Karl Eichwalder,
22543 Enami Tsugutomo, @c Enami
22544 Michael Ernst,
22545 Luc Van Eycken,
22546 Sam Falkner,
22547 Nelson Jose dos Santos Ferreira,
22548 Sigbjorn Finne,
22549 Sven Fischer,
22550 Paul Fisher,
22551 Decklin Foster,
22552 Gary D. Foster,
22553 Paul Franklin,
22554 Guy Geens,
22555 Arne Georg Gleditsch,
22556 David S. Goldberg,
22557 Michelangelo Grigni,
22558 Dale Hagglund,
22559 D. Hall,
22560 Magnus Hammerin,
22561 Kenichi Handa, @c Handa
22562 Raja R. Harinath,
22563 Yoshiki Hayashi, @c ?
22564 P. E. Jareth Hein,
22565 Hisashige Kenji, @c Hisashige
22566 Scott Hofmann,
22567 Marc Horowitz,
22568 Gunnar Horrigmo,
22569 Richard Hoskins,
22570 Brad Howes,
22571 Miguel de Icaza,
22572 François Felix Ingrand,
22573 Tatsuya Ichikawa, @c ?
22574 Ishikawa Ichiro, @c Ishikawa
22575 Lee Iverson,
22576 Iwamuro Motonori, @c Iwamuro
22577 Rajappa Iyer,
22578 Andreas Jaeger,
22579 Adam P. Jenkins,
22580 Randell Jesup,
22581 Fred Johansen,
22582 Gareth Jones,
22583 Simon Josefsson,
22584 Greg Klanderman,
22585 Karl Kleinpaste,
22586 Michael Klingbeil,
22587 Peter Skov Knudsen,
22588 Shuhei Kobayashi, @c Kobayashi
22589 Petr Konecny,
22590 Koseki Yoshinori, @c Koseki
22591 Thor Kristoffersen,
22592 Jens Lautenbacher,
22593 Martin Larose,
22594 Seokchan Lee, @c Lee
22595 Joerg Lenneis,
22596 Carsten Leonhardt,
22597 James LewisMoss,
22598 Christian Limpach,
22599 Markus Linnala,
22600 Dave Love,
22601 Mike McEwan,
22602 Tonny Madsen,
22603 Shlomo Mahlab,
22604 Nat Makarevitch,
22605 Istvan Marko,
22606 David Martin,
22607 Jason R. Mastaler,
22608 Gordon Matzigkeit,
22609 Timo Metzemakers,
22610 Richard Mlynarik,
22611 Lantz Moore,
22612 Morioka Tomohiko, @c Morioka
22613 Erik Toubro Nielsen,
22614 Hrvoje Niksic,
22615 Andy Norman,
22616 Fred Oberhauser,
22617 C. R. Oldham,
22618 Alexandre Oliva,
22619 Ken Olstad,
22620 Masaharu Onishi, @c Onishi
22621 Hideki Ono, @c Ono
22622 Ettore Perazzoli,
22623 William Perry,
22624 Stephen Peters,
22625 Jens-Ulrik Holger Petersen,
22626 Ulrich Pfeifer,
22627 Matt Pharr,
22628 Andy Piper,
22629 John McClary Prevost,
22630 Bill Pringlemeir,
22631 Mike Pullen,
22632 Jim Radford,
22633 Colin Rafferty,
22634 Lasse Rasinen,
22635 Lars Balker Rasmussen,
22636 Joe Reiss,
22637 Renaud Rioboo,
22638 Roland B. Roberts,
22639 Bart Robinson,
22640 Christian von Roques,
22641 Markus Rost,
22642 Jason Rumney,
22643 Wolfgang Rupprecht,
22644 Jay Sachs,
22645 Dewey M. Sasser,
22646 Conrad Sauerwald,
22647 Loren Schall,
22648 Dan Schmidt,
22649 Ralph Schleicher,
22650 Philippe Schnoebelen,
22651 Andreas Schwab,
22652 Randal L. Schwartz,
22653 Danny Siu,
22654 Matt Simmons,
22655 Paul D. Smith,
22656 Jeff Sparkes,
22657 Toby Speight,
22658 Michael Sperber,
22659 Darren Stalder,
22660 Richard Stallman,
22661 Greg Stark,
22662 Sam Steingold,
22663 Paul Stevenson,
22664 Jonas Steverud,
22665 Paul Stodghill,
22666 Kiyokazu Suto, @c Suto
22667 Kurt Swanson,
22668 Samuel Tardieu,
22669 Teddy,
22670 Chuck Thompson,
22671 Tozawa Akihiko, @c Tozawa
22672 Philippe Troin,
22673 James Troup,
22674 Trung Tran-Duc,
22675 Jack Twilley,
22676 Aaron M. Ucko,
22677 Aki Vehtari,
22678 Didier Verna,
22679 Vladimir Volovich,
22680 Jan Vroonhof,
22681 Stefan Waldherr,
22682 Pete Ware,
22683 Barry A. Warsaw,
22684 Christoph Wedler,
22685 Joe Wells,
22686 Lee Willis,
22687 Katsumi Yamaoka @c Yamaoka
22688 and
22689 Lloyd Zusman.
22690
22691
22692 For a full overview of what each person has done, the ChangeLogs
22693 included in the Gnus alpha distributions should give ample reading
22694 (550kB and counting).
22695
22696 Apologies to everybody that I've forgotten, of which there are many, I'm
22697 sure.
22698
22699 Gee, that's quite a list of people.  I guess that must mean that there
22700 actually are people who are using Gnus.  Who'd'a thunk it!
22701
22702
22703 @node New Features
22704 @subsection New Features
22705 @cindex new features
22706
22707 @menu
22708 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
22709 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
22710 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
22711 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
22712 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
22713 @end menu
22714
22715 These lists are, of course, just @emph{short} overviews of the
22716 @emph{most} important new features.  No, really.  There are tons more.
22717 Yes, we have feeping creaturism in full effect.
22718
22719 @node ding Gnus
22720 @subsubsection (ding) Gnus
22721
22722 New features in Gnus 5.0/5.1:
22723
22724 @itemize @bullet
22725
22726 @item
22727 The look of all buffers can be changed by setting format-like variables
22728 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
22729
22730 @item
22731 Local spool and several @sc{nntp} servers can be used at once
22732 (@pxref{Select Methods}).
22733
22734 @item
22735 You can combine groups into virtual groups (@pxref{Virtual Groups}).
22736
22737 @item
22738 You can read a number of different mail formats (@pxref{Getting Mail}).
22739 All the mail back ends implement a convenient mail expiry scheme
22740 (@pxref{Expiring Mail}).
22741
22742 @item
22743 Gnus can use various strategies for gathering threads that have lost
22744 their roots (thereby gathering loose sub-threads into one thread) or it
22745 can go back and retrieve enough headers to build a complete thread
22746 (@pxref{Customizing Threading}).
22747
22748 @item
22749 Killed groups can be displayed in the group buffer, and you can read
22750 them as well (@pxref{Listing Groups}).
22751
22752 @item
22753 Gnus can do partial group updates---you do not have to retrieve the
22754 entire active file just to check for new articles in a few groups
22755 (@pxref{The Active File}).
22756
22757 @item
22758 Gnus implements a sliding scale of subscribedness to groups
22759 (@pxref{Group Levels}).
22760
22761 @item
22762 You can score articles according to any number of criteria
22763 (@pxref{Scoring}).  You can even get Gnus to find out how to score
22764 articles for you (@pxref{Adaptive Scoring}).
22765
22766 @item
22767 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
22768 manner, so it should be difficult to lose much data on what you have
22769 read if your machine should go down (@pxref{Auto Save}).
22770
22771 @item
22772 Gnus now has its own startup file (@file{.gnus}) to avoid cluttering up
22773 the @file{.emacs} file.
22774
22775 @item
22776 You can set the process mark on both groups and articles and perform
22777 operations on all the marked items (@pxref{Process/Prefix}).
22778
22779 @item
22780 You can grep through a subset of groups and create a group from the
22781 results (@pxref{Kibozed Groups}).
22782
22783 @item
22784 You can list subsets of groups according to, well, anything
22785 (@pxref{Listing Groups}).
22786
22787 @item
22788 You can browse foreign servers and subscribe to groups from those
22789 servers (@pxref{Browse Foreign Server}).
22790
22791 @item
22792 Gnus can fetch articles, asynchronously, on a second connection to the
22793 server (@pxref{Asynchronous Fetching}).
22794
22795 @item
22796 You can cache articles locally (@pxref{Article Caching}).
22797
22798 @item
22799 The uudecode functions have been expanded and generalized
22800 (@pxref{Decoding Articles}).
22801
22802 @item
22803 You can still post uuencoded articles, which was a little-known feature
22804 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
22805
22806 @item
22807 Fetching parents (and other articles) now actually works without
22808 glitches (@pxref{Finding the Parent}).
22809
22810 @item
22811 Gnus can fetch FAQs and group descriptions (@pxref{Group Information}).
22812
22813 @item
22814 Digests (and other files) can be used as the basis for groups
22815 (@pxref{Document Groups}).
22816
22817 @item
22818 Articles can be highlighted and customized (@pxref{Customizing
22819 Articles}).
22820
22821 @item
22822 URLs and other external references can be buttonized (@pxref{Article
22823 Buttons}).
22824
22825 @item
22826 You can do lots of strange stuff with the Gnus window & frame
22827 configuration (@pxref{Window Layout}).
22828
22829 @item
22830 You can click on buttons instead of using the keyboard
22831 (@pxref{Buttons}).
22832
22833 @end itemize
22834
22835
22836 @node September Gnus
22837 @subsubsection September Gnus
22838
22839 @iftex
22840 @iflatex
22841 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
22842 @end iflatex
22843 @end iftex
22844
22845 New features in Gnus 5.2/5.3:
22846
22847 @itemize @bullet
22848
22849 @item
22850 A new message composition mode is used.  All old customization variables
22851 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
22852 now obsolete.
22853
22854 @item
22855 Gnus is now able to generate @dfn{sparse} threads---threads where
22856 missing articles are represented by empty nodes (@pxref{Customizing
22857 Threading}).
22858
22859 @lisp
22860 (setq gnus-build-sparse-threads 'some)
22861 @end lisp
22862
22863 @item
22864 Outgoing articles are stored on a special archive server
22865 (@pxref{Archived Messages}).
22866
22867 @item
22868 Partial thread regeneration now happens when articles are
22869 referred.
22870
22871 @item
22872 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
22873
22874 @item
22875 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
22876
22877 @item
22878 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
22879
22880 @lisp
22881 (setq gnus-use-trees t)
22882 @end lisp
22883
22884 @item
22885 An @code{nn}-like pick-and-read minor mode is available for the summary
22886 buffers (@pxref{Pick and Read}).
22887
22888 @lisp
22889 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
22890 @end lisp
22891
22892 @item
22893 In binary groups you can use a special binary minor mode (@pxref{Binary
22894 Groups}).
22895
22896 @item
22897 Groups can be grouped in a folding topic hierarchy (@pxref{Group
22898 Topics}).
22899
22900 @lisp
22901 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
22902 @end lisp
22903
22904 @item
22905 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
22906
22907 @item
22908 Groups can now have a score, and bubbling based on entry frequency
22909 is possible (@pxref{Group Score}).
22910
22911 @lisp
22912 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
22913 @end lisp
22914
22915 @item
22916 Groups can be process-marked, and commands can be performed on
22917 groups of groups (@pxref{Marking Groups}).
22918
22919 @item
22920 Caching is possible in virtual groups.
22921
22922 @item
22923 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
22924 news batches, ClariNet briefs collections, and just about everything
22925 else (@pxref{Document Groups}).
22926
22927 @item
22928 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
22929 (@pxref{SOUP}).
22930
22931 @item
22932 The Gnus cache is much faster.
22933
22934 @item
22935 Groups can be sorted according to many criteria (@pxref{Sorting
22936 Groups}).
22937
22938 @item
22939 New group parameters have been introduced to set list-addresses and
22940 expiry times (@pxref{Group Parameters}).
22941
22942 @item
22943 All formatting specs allow specifying faces to be used
22944 (@pxref{Formatting Fonts}).
22945
22946 @item
22947 There are several more commands for setting/removing/acting on process
22948 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
22949
22950 @item
22951 The summary buffer can be limited to show parts of the available
22952 articles based on a wide range of criteria.  These commands have been
22953 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
22954
22955 @item
22956 Articles can be made persistent with the @kbd{*} command
22957 (@pxref{Persistent Articles}).
22958
22959 @item
22960 All functions for hiding article elements are now toggles.
22961
22962 @item
22963 Article headers can be buttonized (@pxref{Article Washing}).
22964
22965 @item
22966 All mail back ends support fetching articles by @code{Message-ID}.
22967
22968 @item
22969 Duplicate mail can now be treated properly (@pxref{Duplicates}).
22970
22971 @item
22972 All summary mode commands are available directly from the article
22973 buffer (@pxref{Article Keymap}).
22974
22975 @item
22976 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
22977 Layout}).
22978
22979 @item
22980 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
22981 @iftex
22982 @iflatex
22983 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
22984 @end iflatex
22985 @end iftex
22986
22987 @item
22988 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
22989
22990 @lisp
22991 (setq gnus-use-nocem t)
22992 @end lisp
22993
22994 @item
22995 Groups can be made permanently visible (@pxref{Listing Groups}).
22996
22997 @lisp
22998 (setq gnus-permanently-visible-groups "^nnml:")
22999 @end lisp
23000
23001 @item
23002 Many new hooks have been introduced to make customizing easier.
23003
23004 @item
23005 Gnus respects the @code{Mail-Copies-To} header.
23006
23007 @item
23008 Threads can be gathered by looking at the @code{References} header
23009 (@pxref{Customizing Threading}).
23010
23011 @lisp
23012 (setq gnus-summary-thread-gathering-function
23013       'gnus-gather-threads-by-references)
23014 @end lisp
23015
23016 @item
23017 Read articles can be stored in a special backlog buffer to avoid
23018 refetching (@pxref{Article Backlog}).
23019
23020 @lisp
23021 (setq gnus-keep-backlog 50)
23022 @end lisp
23023
23024 @item
23025 A clean copy of the current article is always stored in a separate
23026 buffer to allow easier treatment.
23027
23028 @item
23029 Gnus can suggest where to save articles (@pxref{Saving Articles}).
23030
23031 @item
23032 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
23033 Articles}).
23034
23035 @lisp
23036 (setq gnus-prompt-before-saving t)
23037 @end lisp
23038
23039 @item
23040 @code{gnus-uu} can view decoded files asynchronously while fetching
23041 articles (@pxref{Other Decode Variables}).
23042
23043 @lisp
23044 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
23045 @end lisp
23046
23047 @item
23048 Filling in the article buffer now works properly on cited text
23049 (@pxref{Article Washing}).
23050
23051 @item
23052 Hiding cited text adds buttons to toggle hiding, and how much
23053 cited text to hide is now customizable (@pxref{Article Hiding}).
23054
23055 @lisp
23056 (setq gnus-cited-lines-visible 2)
23057 @end lisp
23058
23059 @item
23060 Boring headers can be hidden (@pxref{Article Hiding}).
23061
23062 @item
23063 Default scoring values can now be set from the menu bar.
23064
23065 @item
23066 Further syntax checking of outgoing articles have been added.
23067
23068 @end itemize
23069
23070
23071 @node Red Gnus
23072 @subsubsection Red Gnus
23073
23074 New features in Gnus 5.4/5.5:
23075
23076 @iftex
23077 @iflatex
23078 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
23079 @end iflatex
23080 @end iftex
23081
23082 @itemize @bullet
23083
23084 @item
23085 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
23086
23087 @item
23088 Article prefetching functionality has been moved up into
23089 Gnus (@pxref{Asynchronous Fetching}).
23090
23091 @item
23092 Scoring can now be performed with logical operators like @code{and},
23093 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
23094 Scoring}).
23095
23096 @item
23097 Article washing status can be displayed in the
23098 article mode line (@pxref{Misc Article}).
23099
23100 @item
23101 @file{gnus.el} has been split into many smaller files.
23102
23103 @item
23104 Suppression of duplicate articles based on Message-ID can be done
23105 (@pxref{Duplicate Suppression}).
23106
23107 @lisp
23108 (setq gnus-suppress-duplicates t)
23109 @end lisp
23110
23111 @item
23112 New variables for specifying what score and adapt files are to be
23113 considered home score and adapt files (@pxref{Home Score File}) have
23114 been added.
23115
23116 @item
23117 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
23118 Server Internals}).
23119
23120 @item
23121 Groups can inherit group parameters from parent topics (@pxref{Topic
23122 Parameters}).
23123
23124 @item
23125 Article editing has been revamped and is now actually usable.
23126
23127 @item
23128 Signatures can be recognized in more intelligent fashions
23129 (@pxref{Article Signature}).
23130
23131 @item
23132 Summary pick mode has been made to look more @code{nn}-like.  Line
23133 numbers are displayed and the @kbd{.} command can be used to pick
23134 articles (@code{Pick and Read}).
23135
23136 @item
23137 Commands for moving the @file{.newsrc.eld} from one server to
23138 another have been added (@pxref{Changing Servers}).
23139
23140 @item
23141 There's a way now to specify that ``uninteresting'' fields be suppressed
23142 when generating lines in buffers (@pxref{Advanced Formatting}).
23143
23144 @item
23145 Several commands in the group buffer can be undone with @kbd{C-M-_}
23146 (@pxref{Undo}).
23147
23148 @item
23149 Scoring can be done on words using the new score type @code{w}
23150 (@pxref{Score File Format}).
23151
23152 @item
23153 Adaptive scoring can be done on a Subject word-by-word basis
23154 (@pxref{Adaptive Scoring}).
23155
23156 @lisp
23157 (setq gnus-use-adaptive-scoring '(word))
23158 @end lisp
23159
23160 @item
23161 Scores can be decayed (@pxref{Score Decays}).
23162
23163 @lisp
23164 (setq gnus-decay-scores t)
23165 @end lisp
23166
23167 @item
23168 Scoring can be performed using a regexp on the Date header.  The Date is
23169 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
23170
23171 @item
23172 A new command has been added to remove all data on articles from
23173 the native server (@pxref{Changing Servers}).
23174
23175 @item
23176 A new command for reading collections of documents
23177 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
23178 (@pxref{Really Various Summary Commands}).
23179
23180 @item
23181 Process mark sets can be pushed and popped (@pxref{Setting Process
23182 Marks}).
23183
23184 @item
23185 A new mail-to-news back end makes it possible to post even when the @sc{nntp}
23186 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
23187
23188 @item
23189 A new back end for reading searches from Web search engines
23190 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
23191 (@pxref{Web Searches}).
23192
23193 @item
23194 Groups inside topics can now be sorted using the standard sorting
23195 functions, and each topic can be sorted independently (@pxref{Topic
23196 Sorting}).
23197
23198 @item
23199 Subsets of the groups can be sorted independently (@code{Sorting
23200 Groups}).
23201
23202 @item
23203 Cached articles can be pulled into the groups (@pxref{Summary Generation
23204 Commands}).
23205 @iftex
23206 @iflatex
23207 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
23208 @end iflatex
23209 @end iftex
23210
23211 @item
23212 Score files are now applied in a more reliable order (@pxref{Score
23213 Variables}).
23214
23215 @item
23216 Reports on where mail messages end up can be generated (@pxref{Splitting
23217 Mail}).
23218
23219 @item
23220 More hooks and functions have been added to remove junk from incoming
23221 mail before saving the mail (@pxref{Washing Mail}).
23222
23223 @item
23224 Emphasized text can be properly fontisized:
23225
23226 @end itemize
23227
23228
23229 @node Quassia Gnus
23230 @subsubsection Quassia Gnus
23231
23232 New features in Gnus 5.6:
23233
23234 @itemize @bullet
23235
23236 @item
23237 New functionality for using Gnus as an offline newsreader has been
23238 added.  A plethora of new commands and modes have been added.  See
23239 @pxref{Gnus Unplugged} for the full story.
23240
23241 @item
23242  The @code{nndraft} back end has returned, but works differently than
23243 before.  All Message buffers are now also articles in the @code{nndraft}
23244 group, which is created automatically.
23245
23246 @item
23247 @code{gnus-alter-header-function} can now be used to alter header
23248 values.
23249
23250 @item
23251  @code{gnus-summary-goto-article} now accept Message-ID's.
23252
23253 @item
23254  A new Message command for deleting text in the body of a message
23255 outside the region: @kbd{C-c C-v}.
23256
23257 @item
23258  You can now post to component group in @code{nnvirtual} groups with
23259 @kbd{C-u C-c C-c}.
23260
23261 @item
23262  @code{nntp-rlogin-program}---new variable to ease customization.
23263
23264 @item
23265  @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
23266 re-highlighting of the article buffer.
23267
23268 @item
23269  New element in @code{gnus-boring-article-headers}---@code{long-to}.
23270
23271 @item
23272  @kbd{M-i} symbolic prefix command.  See the section "Symbolic
23273 Prefixes" in the Gnus manual for details.
23274
23275 @item
23276  @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
23277 @kbd{a} to add the score rule to the "all.SCORE" file.
23278
23279 @item
23280  @code{gnus-simplify-subject-functions} variable to allow greater
23281 control over simplification.
23282
23283 @item
23284  @kbd{A T}---new command for fetching the current thread.
23285
23286 @item
23287  @kbd{/ T}---new command for including the current thread in the
23288 limit.
23289
23290 @item
23291  @kbd{M-RET} is a new Message command for breaking cited text.
23292
23293 @item
23294  @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
23295
23296 @item
23297  The @code{custom-face-lookup} function has been removed.
23298 If you used this function in your initialization files, you must
23299 rewrite them to use @code{face-spec-set} instead.
23300
23301 @item
23302  Canceling now uses the current select method.  Symbolic prefix
23303 @kbd{a} forces normal posting method.
23304
23305 @item
23306  New command to translate M******** sm*rtq**t*s into proper
23307 text---@kbd{W d}.
23308
23309 @item
23310  For easier debugging of @code{nntp}, you can set
23311 @code{nntp-record-commands} to a non-@code{nil} value.
23312
23313 @item
23314  @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
23315 controlling where and how to send @sc{authinfo} to @sc{nntp} servers.
23316
23317 @item
23318  A command for editing group parameters from the summary buffer
23319 has been added.
23320
23321 @item
23322  A history of where mails have been split is available.
23323
23324 @item
23325  A new article date command has been added---@code{article-date-iso8601}.
23326
23327 @item
23328  Subjects can be simplified when threading by setting
23329 @code{gnus-score-thread-simplify}.
23330
23331 @item
23332  A new function for citing in Message has been
23333 added---@code{message-cite-original-without-signature}.
23334
23335 @item
23336  @code{article-strip-all-blank-lines}---new article command.
23337
23338 @item
23339  A new Message command to kill to the end of the article has
23340 been added.
23341
23342 @item
23343  A minimum adaptive score can be specified by using the
23344 @code{gnus-adaptive-word-minimum} variable.
23345
23346 @item
23347  The "lapsed date" article header can be kept continually
23348 updated by the @code{gnus-start-date-timer} command.
23349
23350 @item
23351  Web listserv archives can be read with the @code{nnlistserv} back end.
23352
23353 @item
23354  Old dejanews archives can now be read by @code{nnweb}.
23355
23356 @end itemize
23357
23358 @node Pterodactyl Gnus
23359 @subsubsection Pterodactyl Gnus
23360
23361 New features in Gnus 5.8:
23362
23363 @itemize @bullet
23364
23365 @item
23366 The mail-fetching functions have changed.  See the manual for the
23367 many details.  In particular, all procmail fetching variables are gone.
23368
23369 If you used procmail like in
23370
23371 @lisp
23372 (setq nnmail-use-procmail t)
23373 (setq nnmail-spool-file 'procmail)
23374 (setq nnmail-procmail-directory "~/mail/incoming/")
23375 (setq nnmail-procmail-suffix "\\.in")
23376 @end lisp
23377
23378 this now has changed to
23379
23380 @lisp
23381 (setq mail-sources
23382       '((directory :path "~/mail/incoming/"
23383                    :suffix ".in")))
23384 @end lisp
23385
23386 More information is available in the info doc at Select Methods ->
23387 Getting Mail -> Mail Sources
23388
23389 @item
23390 Gnus is now a @sc{mime}-capable reader.  This affects many parts of
23391 Gnus, and adds a slew of new commands.  See the manual for details.
23392
23393 @item
23394 Gnus has also been multilingualized.  This also affects too
23395 many parts of Gnus to summarize here, and adds many new variables.
23396
23397 @item
23398 @code{gnus-auto-select-first} can now be a function to be
23399 called to position point.
23400
23401 @item
23402 The user can now decide which extra headers should be included in
23403 summary buffers and @sc{nov} files.
23404
23405 @item
23406 @code{gnus-article-display-hook} has been removed.  Instead, a number
23407 of variables starting with @code{gnus-treat-} have been added.
23408
23409 @item
23410 The Gnus posting styles have been redone again and now works in a
23411 subtly different manner.
23412
23413 @item
23414 New web-based back ends have been added: @code{nnslashdot},
23415 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
23416 again, to keep up with ever-changing layouts.
23417
23418 @item
23419 Gnus can now read @sc{imap} mail via @code{nnimap}.
23420
23421 @end itemize
23422
23423 @iftex
23424
23425 @page
23426 @node The Manual
23427 @section The Manual
23428 @cindex colophon
23429 @cindex manual
23430
23431 This manual was generated from a TeXinfo file and then run through
23432 either @code{texi2dvi}
23433 @iflatex
23434 or my own home-brewed TeXinfo to \LaTeX\ transformer,
23435 and then run through @code{latex} and @code{dvips}
23436 @end iflatex
23437 to get what you hold in your hands now.
23438
23439 The following conventions have been used:
23440
23441 @enumerate
23442
23443 @item
23444 This is a @samp{string}
23445
23446 @item
23447 This is a @kbd{keystroke}
23448
23449 @item
23450 This is a @file{file}
23451
23452 @item
23453 This is a @code{symbol}
23454
23455 @end enumerate
23456
23457 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
23458 mean:
23459
23460 @lisp
23461 (setq flargnoze "yes")
23462 @end lisp
23463
23464 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
23465
23466 @lisp
23467 (setq flumphel 'yes)
23468 @end lisp
23469
23470 @samp{yes} and @code{yes} are two @emph{very} different things---don't
23471 ever get them confused.
23472
23473 @iflatex
23474 @c @head
23475 Of course, everything in this manual is of vital interest, so you should
23476 read it all.  Several times.  However, if you feel like skimming the
23477 manual, look for that gnu head you should see in the margin over
23478 there---it means that what's being discussed is of more importance than
23479 the rest of the stuff.  (On the other hand, if everything is infinitely
23480 important, how can anything be more important than that?  Just one more
23481 of the mysteries of this world, I guess.)
23482 @end iflatex
23483
23484 @end iftex
23485
23486
23487 @node On Writing Manuals
23488 @section On Writing Manuals
23489
23490 I guess most manuals are written after-the-fact; documenting a program
23491 that's already there.  This is not how this manual is written.  When
23492 implementing something, I write the manual entry for that something
23493 straight away.  I then see that it's difficult to explain the
23494 functionality, so I write how it's supposed to be, and then I change the
23495 implementation.  Writing the documentation and writing the code goes
23496 hand in hand.
23497
23498 This, of course, means that this manual has no, or little, flow.  It
23499 documents absolutely everything in Gnus, but often not where you're
23500 looking for it.  It is a reference manual, and not a guide to how to get
23501 started with Gnus.
23502
23503 That would be a totally different book, that should be written using the
23504 reference manual as source material.  It would look quite differently.
23505
23506
23507 @page
23508 @node Terminology
23509 @section Terminology
23510
23511 @cindex terminology
23512 @table @dfn
23513
23514 @item news
23515 @cindex news
23516 This is what you are supposed to use this thing for---reading news.
23517 News is generally fetched from a nearby @sc{nntp} server, and is
23518 generally publicly available to everybody.  If you post news, the entire
23519 world is likely to read just what you have written, and they'll all
23520 snigger mischievously.  Behind your back.
23521
23522 @item mail
23523 @cindex mail
23524 Everything that's delivered to you personally is mail.  Some news/mail
23525 readers (like Gnus) blur the distinction between mail and news, but
23526 there is a difference.  Mail is private.  News is public.  Mailing is
23527 not posting, and replying is not following up.
23528
23529 @item reply
23530 @cindex reply
23531 Send a mail to the person who has written what you are reading.
23532
23533 @item follow up
23534 @cindex follow up
23535 Post an article to the current newsgroup responding to the article you
23536 are reading.
23537
23538 @item back end
23539 @cindex back end
23540 Gnus considers mail and news to be mostly the same, really.  The only
23541 difference is how to access the actual articles.  News articles are
23542 commonly fetched via the protocol NNTP, whereas mail messages could be
23543 read from a file on the local disk.  The internal architecture of Gnus
23544 thus comprises a `front end' and a number of `back ends'.  Internally,
23545 when you enter a group (by hitting @key{RET}, say), you thereby invoke
23546 a function in the front end in Gnus.  The front end then `talks' to a
23547 back end and says things like ``Give me the list of articles in the foo
23548 group'' or ``Show me article number 4711''.
23549
23550 So a back end mainly defines either a protocol (the @code{nntp} back end
23551 accesses news via NNTP, the @code{nnimap} back end accesses mail via
23552 IMAP) or a file format and directory layout (the @code{nnspool} back end
23553 accesses news via the common `spool directory' format, the @code{nnml}
23554 back end access mail via a file format and directory layout that's
23555 quite similar).
23556
23557 Gnus does not handle the underlying media, so to speak---this is all
23558 done by the back ends.  A back end is a collection of functions to
23559 access the articles.
23560
23561 However, sometimes the term `back end' is also used where `server'
23562 would have been more appropriate.  And then there is the term `select
23563 method' which can mean either.  The Gnus terminology can be quite
23564 confusing.
23565
23566 @item native
23567 @cindex native
23568 Gnus will always use one method (and back end) as the @dfn{native}, or
23569 default, way of getting news.
23570
23571 @item foreign
23572 @cindex foreign
23573 You can also have any number of foreign groups active at the same time.
23574 These are groups that use non-native non-secondary back ends for getting
23575 news.
23576
23577 @item secondary
23578 @cindex secondary
23579 Secondary back ends are somewhere half-way between being native and being
23580 foreign, but they mostly act like they are native.
23581
23582 @item article
23583 @cindex article
23584 A message that has been posted as news.
23585
23586 @item mail message
23587 @cindex mail message
23588 A message that has been mailed.
23589
23590 @item message
23591 @cindex message
23592 A mail message or news article
23593
23594 @item head
23595 @cindex head
23596 The top part of a message, where administrative information (etc.) is
23597 put.
23598
23599 @item body
23600 @cindex body
23601 The rest of an article.  Everything not in the head is in the
23602 body.
23603
23604 @item header
23605 @cindex header
23606 A line from the head of an article.
23607
23608 @item headers
23609 @cindex headers
23610 A collection of such lines, or a collection of heads.  Or even a
23611 collection of @sc{nov} lines.
23612
23613 @item @sc{nov}
23614 @cindex nov
23615 When Gnus enters a group, it asks the back end for the headers of all
23616 unread articles in the group.  Most servers support the News OverView
23617 format, which is more compact and much faster to read and parse than the
23618 normal @sc{head} format.
23619
23620 @item level
23621 @cindex levels
23622 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
23623 that have a lower level are ``more'' subscribed than the groups with a
23624 higher level.  In fact, groups on levels 1-5 are considered
23625 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
23626 are @dfn{killed}.  Commands for listing groups and scanning for new
23627 articles will all use the numeric prefix as @dfn{working level}.
23628
23629 @item killed groups
23630 @cindex killed groups
23631 No information on killed groups is stored or updated, which makes killed
23632 groups much easier to handle than subscribed groups.
23633
23634 @item zombie groups
23635 @cindex zombie groups
23636 Just like killed groups, only slightly less dead.
23637
23638 @item active file
23639 @cindex active file
23640 The news server has to keep track of what articles it carries, and what
23641 groups exist.  All this information in stored in the active file, which
23642 is rather large, as you might surmise.
23643
23644 @item bogus groups
23645 @cindex bogus groups
23646 A group that exists in the @file{.newsrc} file, but isn't known to the
23647 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
23648 This means that the group probably doesn't exist (any more).
23649
23650 @item activating
23651 @cindex activating groups
23652 The act of asking the server for info on a group and computing the
23653 number of unread articles is called @dfn{activating the group}.
23654 Un-activated groups are listed with @samp{*} in the group buffer.
23655
23656 @item server
23657 @cindex server
23658 A machine one can connect to and get news (or mail) from.
23659
23660 @item select method
23661 @cindex select method
23662 A structure that specifies the back end, the server and the virtual
23663 server settings.
23664
23665 @item virtual server
23666 @cindex virtual server
23667 A named select method.  Since a select method defines all there is to
23668 know about connecting to a (physical) server, taking the thing as a
23669 whole is a virtual server.
23670
23671 @item washing
23672 @cindex washing
23673 Taking a buffer and running it through a filter of some sort.  The
23674 result will (more often than not) be cleaner and more pleasing than the
23675 original.
23676
23677 @item ephemeral groups
23678 @cindex ephemeral groups
23679 Most groups store data on what articles you have read.  @dfn{Ephemeral}
23680 groups are groups that will have no data stored---when you exit the
23681 group, it'll disappear into the aether.
23682
23683 @item solid groups
23684 @cindex solid groups
23685 This is the opposite of ephemeral groups.  All groups listed in the
23686 group buffer are solid groups.
23687
23688 @item sparse articles
23689 @cindex sparse articles
23690 These are article placeholders shown in the summary buffer when
23691 @code{gnus-build-sparse-threads} has been switched on.
23692
23693 @item threading
23694 @cindex threading
23695 To put responses to articles directly after the articles they respond
23696 to---in a hierarchical fashion.
23697
23698 @item root
23699 @cindex root
23700 @cindex thread root
23701 The first article in a thread is the root.  It is the ancestor of all
23702 articles in the thread.
23703
23704 @item parent
23705 @cindex parent
23706 An article that has responses.
23707
23708 @item child
23709 @cindex child
23710 An article that responds to a different article---its parent.
23711
23712 @item digest
23713 @cindex digest
23714 A collection of messages in one file.  The most common digest format is
23715 specified by RFC 1153.
23716
23717 @end table
23718
23719
23720 @page
23721 @node Customization
23722 @section Customization
23723 @cindex general customization
23724
23725 All variables are properly documented elsewhere in this manual.  This
23726 section is designed to give general pointers on how to customize Gnus
23727 for some quite common situations.
23728
23729 @menu
23730 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
23731 * Slow Terminal Connection::    You run a remote Emacs.
23732 * Little Disk Space::           You feel that having large setup files is icky.
23733 * Slow Machine::                You feel like buying a faster machine.
23734 @end menu
23735
23736
23737 @node Slow/Expensive Connection
23738 @subsection Slow/Expensive NNTP Connection
23739
23740 If you run Emacs on a machine locally, and get your news from a machine
23741 over some very thin strings, you want to cut down on the amount of data
23742 Gnus has to get from the @sc{nntp} server.
23743
23744 @table @code
23745
23746 @item gnus-read-active-file
23747 Set this to @code{nil}, which will inhibit Gnus from requesting the
23748 entire active file from the server.  This file is often v.  large.  You
23749 also have to set @code{gnus-check-new-newsgroups} and
23750 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
23751 doesn't suddenly decide to fetch the active file anyway.
23752
23753 @item gnus-nov-is-evil
23754 This one has to be @code{nil}.  If not, grabbing article headers from
23755 the @sc{nntp} server will not be very fast.  Not all @sc{nntp} servers
23756 support @sc{xover}; Gnus will detect this by itself.
23757 @end table
23758
23759
23760 @node Slow Terminal Connection
23761 @subsection Slow Terminal Connection
23762
23763 Let's say you use your home computer for dialing up the system that runs
23764 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
23765 possible) the amount of data sent over the wires.
23766
23767 @table @code
23768
23769 @item gnus-auto-center-summary
23770 Set this to @code{nil} to inhibit Gnus from re-centering the summary
23771 buffer all the time.  If it is @code{vertical}, do only vertical
23772 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
23773 horizontal and vertical recentering.
23774
23775 @item gnus-visible-headers
23776 Cut down on the headers included in the articles to the
23777 minimum.  You can, in fact, make do without them altogether---most of the
23778 useful data is in the summary buffer, anyway.  Set this variable to
23779 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
23780
23781 Set this hook to all the available hiding commands:
23782 @lisp
23783 (setq gnus-treat-hide-headers 'head
23784       gnus-treat-hide-signature t
23785       gnus-treat-hide-citation t)
23786 @end lisp
23787
23788 @item gnus-use-full-window
23789 By setting this to @code{nil}, you can make all the windows smaller.
23790 While this doesn't really cut down much generally, it means that you
23791 have to see smaller portions of articles before deciding that you didn't
23792 want to read them anyway.
23793
23794 @item gnus-thread-hide-subtree
23795 If this is non-@code{nil}, all threads in the summary buffer will be
23796 hidden initially.
23797
23798
23799 @item gnus-updated-mode-lines
23800 If this is @code{nil}, Gnus will not put information in the buffer mode
23801 lines, which might save some time.
23802 @end table
23803
23804
23805 @node Little Disk Space
23806 @subsection Little Disk Space
23807 @cindex disk space
23808
23809 The startup files can get rather large, so you may want to cut their
23810 sizes a bit if you are running out of space.
23811
23812 @table @code
23813
23814 @item gnus-save-newsrc-file
23815 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
23816 only save @file{.newsrc.eld}.  This means that you will not be able to
23817 use any other newsreaders than Gnus.  This variable is @code{t} by
23818 default.
23819
23820 @item gnus-read-newsrc-file
23821 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
23822 only read @file{.newsrc.eld}.  This means that you will not be able to
23823 use any other newsreaders than Gnus.  This variable is @code{t} by
23824 default.
23825
23826 @item gnus-save-killed-list
23827 If this is @code{nil}, Gnus will not save the list of dead groups.  You
23828 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
23829 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
23830 variable to @code{nil}.  This variable is @code{t} by default.
23831
23832 @end table
23833
23834
23835 @node Slow Machine
23836 @subsection Slow Machine
23837 @cindex slow machine
23838
23839 If you have a slow machine, or are just really impatient, there are a
23840 few things you can do to make Gnus run faster.
23841
23842 Set @code{gnus-check-new-newsgroups} and
23843 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
23844
23845 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
23846 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
23847 summary buffer faster.
23848
23849
23850 @page
23851 @node Troubleshooting
23852 @section Troubleshooting
23853 @cindex troubleshooting
23854
23855 Gnus works @emph{so} well straight out of the box---I can't imagine any
23856 problems, really.
23857
23858 Ahem.
23859
23860 @enumerate
23861
23862 @item
23863 Make sure your computer is switched on.
23864
23865 @item
23866 Make sure that you really load the current Gnus version.  If you have
23867 been running @sc{gnus}, you need to exit Emacs and start it up again before
23868 Gnus will work.
23869
23870 @item
23871 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
23872 like @samp{Gnus v5.46; nntp 4.0} you have the right files loaded.  If,
23873 on the other hand, you get something like @samp{NNTP 3.x} or @samp{nntp
23874 flee}, you have some old @file{.el} files lying around.  Delete these.
23875
23876 @item
23877 Read the help group (@kbd{G h} in the group buffer) for a FAQ and a
23878 how-to.
23879
23880 @item
23881 @vindex max-lisp-eval-depth
23882 Gnus works on many recursive structures, and in some extreme (and very
23883 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
23884 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
23885 something like that.
23886 @end enumerate
23887
23888 If all else fails, report the problem as a bug.
23889
23890 @cindex bugs
23891 @cindex reporting bugs
23892
23893 @kindex M-x gnus-bug
23894 @findex gnus-bug
23895 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
23896 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
23897 me the backtrace.  I will fix bugs, but I can only fix them if you send
23898 me a precise description as to how to reproduce the bug.
23899
23900 You really can never be too detailed in a bug report.  Always use the
23901 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
23902 a 10Kb mail each time you use it, and even if you have sent me your
23903 environment 500 times before.  I don't care.  I want the full info each
23904 time.
23905
23906 It is also important to remember that I have no memory whatsoever.  If
23907 you send a bug report, and I send you a reply, and then you just send
23908 back ``No, it's not! Moron!'', I will have no idea what you are
23909 insulting me about.  Always over-explain everything.  It's much easier
23910 for all of us---if I don't have all the information I need, I will just
23911 mail you and ask for more info, and everything takes more time.
23912
23913 If the problem you're seeing is very visual, and you can't quite explain
23914 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
23915 it somewhere it can be reached, and include the URL of the picture in
23916 the bug report.
23917
23918 @cindex patches
23919 If you would like to contribute a patch to fix bugs or make
23920 improvements, please produce the patch using @samp{diff -u}.
23921
23922 @cindex edebug
23923 If you want to debug your problem further before reporting, possibly
23924 in order to solve the problem yourself and send a patch, you can use
23925 edebug.  Debugging lisp code is documented in the Elisp manual
23926 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
23927 Lisp Reference Manual}).  To get you started with edebug, consider if
23928 you discover some weird behaviour when pressing @kbd{c}, the first
23929 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
23930 the documentation buffer that leads you to the function definition,
23931 then press @kbd{M-x edebug-defun RET} with point inside that function,
23932 return to Gnus and press @kbd{c} to invoke the code.  You will be
23933 placed in the lisp buffer and can single step using @kbd{SPC} and
23934 evaluate expressions using @kbd{M-:} or inspect variables using
23935 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
23936 @kbd{c} or @kbd{g}.
23937
23938 @cindex elp
23939 @cindex profile
23940 @cindex slow
23941 Sometimes, a problem do not directly generate a elisp error but
23942 manifests itself by causing Gnus to be very slow.  In these cases, you
23943 can use @kbd{M-x toggle-debug-on-quit} and press C-j when things are
23944 slow, and then try to analyze the backtrace (repeating the procedure
23945 helps isolating the real problem areas).  A fancier approach is to use
23946 the elisp profiler, ELP.  The profiler is (or should be) fully
23947 documented elsewhere, but to get you started there are a few steps
23948 that need to be followed.  First, instrument the part of Gnus you are
23949 interested in for profiling, e.g. @kbd{M-x elp-instrument-package RET
23950 gnus} or @kbd{M-x elp-instrument-packagre RET message}.  Then perform
23951 the operation that is slow and press @kbd{M-x elp-results}.  You will
23952 then see which operations that takes time, and can debug them further.
23953 If the entire operation takes much longer than the time spent in the
23954 slowest function in the profiler output, you probably profiled the
23955 wrong part of Gnus.  To reset profiling statistics, use @kbd{M-x
23956 elp-reset-all}.  @kbd{M-x elp-restore-all} is supposed to remove
23957 profiling, but given the complexities and dynamic code generation in
23958 Gnus, it might not always work perfectly.
23959
23960 If you just need help, you are better off asking on
23961 @samp{gnu.emacs.gnus}.  I'm not very helpful.
23962
23963 @cindex gnu.emacs.gnus
23964 @cindex ding mailing list
23965 You can also ask on the ding mailing list---@samp{ding@@gnus.org}.
23966 Write to @samp{ding-request@@gnus.org} to subscribe.
23967
23968
23969 @page
23970 @node Gnus Reference Guide
23971 @section Gnus Reference Guide
23972
23973 It is my hope that other people will figure out smart stuff that Gnus
23974 can do, and that other people will write those smart things as well.  To
23975 facilitate that I thought it would be a good idea to describe the inner
23976 workings of Gnus.  And some of the not-so-inner workings, while I'm at
23977 it.
23978
23979 You can never expect the internals of a program not to change, but I
23980 will be defining (in some details) the interface between Gnus and its
23981 back ends (this is written in stone), the format of the score files
23982 (ditto), data structures (some are less likely to change than others)
23983 and general methods of operation.
23984
23985 @menu
23986 * Gnus Utility Functions::      Common functions and variable to use.
23987 * Back End Interface::          How Gnus communicates with the servers.
23988 * Score File Syntax::           A BNF definition of the score file standard.
23989 * Headers::                     How Gnus stores headers internally.
23990 * Ranges::                      A handy format for storing mucho numbers.
23991 * Group Info::                  The group info format.
23992 * Extended Interactive::        Symbolic prefixes and stuff.
23993 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
23994 * Various File Formats::        Formats of files that Gnus use.
23995 @end menu
23996
23997
23998 @node Gnus Utility Functions
23999 @subsection Gnus Utility Functions
24000 @cindex Gnus utility functions
24001 @cindex utility functions
24002 @cindex functions
24003 @cindex internal variables
24004
24005 When writing small functions to be run from hooks (and stuff), it's
24006 vital to have access to the Gnus internal functions and variables.
24007 Below is a list of the most common ones.
24008
24009 @table @code
24010
24011 @item gnus-newsgroup-name
24012 @vindex gnus-newsgroup-name
24013 This variable holds the name of the current newsgroup.
24014
24015 @item gnus-find-method-for-group
24016 @findex gnus-find-method-for-group
24017 A function that returns the select method for @var{group}.
24018
24019 @item gnus-group-real-name
24020 @findex gnus-group-real-name
24021 Takes a full (prefixed) Gnus group name, and returns the unprefixed
24022 name.
24023
24024 @item gnus-group-prefixed-name
24025 @findex gnus-group-prefixed-name
24026 Takes an unprefixed group name and a select method, and returns the full
24027 (prefixed) Gnus group name.
24028
24029 @item gnus-get-info
24030 @findex gnus-get-info
24031 Returns the group info list for @var{group}.
24032
24033 @item gnus-group-unread
24034 @findex gnus-group-unread
24035 The number of unread articles in @var{group}, or @code{t} if that is
24036 unknown.
24037
24038 @item gnus-active
24039 @findex gnus-active
24040 The active entry for @var{group}.
24041
24042 @item gnus-set-active
24043 @findex gnus-set-active
24044 Set the active entry for @var{group}.
24045
24046 @item gnus-add-current-to-buffer-list
24047 @findex gnus-add-current-to-buffer-list
24048 Adds the current buffer to the list of buffers to be killed on Gnus
24049 exit.
24050
24051 @item gnus-continuum-version
24052 @findex gnus-continuum-version
24053 Takes a Gnus version string as a parameter and returns a floating point
24054 number.  Earlier versions will always get a lower number than later
24055 versions.
24056
24057 @item gnus-group-read-only-p
24058 @findex gnus-group-read-only-p
24059 Says whether @var{group} is read-only or not.
24060
24061 @item gnus-news-group-p
24062 @findex gnus-news-group-p
24063 Says whether @var{group} came from a news back end.
24064
24065 @item gnus-ephemeral-group-p
24066 @findex gnus-ephemeral-group-p
24067 Says whether @var{group} is ephemeral or not.
24068
24069 @item gnus-server-to-method
24070 @findex gnus-server-to-method
24071 Returns the select method corresponding to @var{server}.
24072
24073 @item gnus-server-equal
24074 @findex gnus-server-equal
24075 Says whether two virtual servers are equal.
24076
24077 @item gnus-group-native-p
24078 @findex gnus-group-native-p
24079 Says whether @var{group} is native or not.
24080
24081 @item gnus-group-secondary-p
24082 @findex gnus-group-secondary-p
24083 Says whether @var{group} is secondary or not.
24084
24085 @item gnus-group-foreign-p
24086 @findex gnus-group-foreign-p
24087 Says whether @var{group} is foreign or not.
24088
24089 @item group-group-find-parameter
24090 @findex group-group-find-parameter
24091 Returns the parameter list of @var{group}.  If given a second parameter,
24092 returns the value of that parameter for @var{group}.
24093
24094 @item gnus-group-set-parameter
24095 @findex gnus-group-set-parameter
24096 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
24097
24098 @item gnus-narrow-to-body
24099 @findex gnus-narrow-to-body
24100 Narrows the current buffer to the body of the article.
24101
24102 @item gnus-check-backend-function
24103 @findex gnus-check-backend-function
24104 Takes two parameters, @var{function} and @var{group}.  If the back end
24105 @var{group} comes from supports @var{function}, return non-@code{nil}.
24106
24107 @lisp
24108 (gnus-check-backend-function "request-scan" "nnml:misc")
24109 @result{} t
24110 @end lisp
24111
24112 @item gnus-read-method
24113 @findex gnus-read-method
24114 Prompts the user for a select method.
24115
24116 @end table
24117
24118
24119 @node Back End Interface
24120 @subsection Back End Interface
24121
24122 Gnus doesn't know anything about @sc{nntp}, spools, mail or virtual
24123 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
24124 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
24125 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
24126 examples of the latter we have @code{nntp-port-number} and
24127 @code{nnmbox-directory}.
24128
24129 When Gnus asks for information from a back end---say @code{nntp}---on
24130 something, it will normally include a virtual server name in the
24131 function parameters.  (If not, the back end should use the ``current''
24132 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
24133 server as its only (optional) parameter.  If this virtual server hasn't
24134 been opened, the function should fail.
24135
24136 Note that a virtual server name has no relation to some physical server
24137 name.  Take this example:
24138
24139 @lisp
24140 (nntp "odd-one"
24141       (nntp-address "ifi.uio.no")
24142       (nntp-port-number 4324))
24143 @end lisp
24144
24145 Here the virtual server name is @samp{odd-one} while the name of
24146 the physical server is @samp{ifi.uio.no}.
24147
24148 The back ends should be able to switch between several virtual servers.
24149 The standard back ends implement this by keeping an alist of virtual
24150 server environments that they pull down/push up when needed.
24151
24152 There are two groups of interface functions: @dfn{required functions},
24153 which must be present, and @dfn{optional functions}, which Gnus will
24154 always check for presence before attempting to call 'em.
24155
24156 All these functions are expected to return data in the buffer
24157 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
24158 unfortunately named, but we'll have to live with it.  When I talk about
24159 @dfn{resulting data}, I always refer to the data in that buffer.  When I
24160 talk about @dfn{return value}, I talk about the function value returned by
24161 the function call.  Functions that fail should return @code{nil} as the
24162 return value.
24163
24164 Some back ends could be said to be @dfn{server-forming} back ends, and
24165 some might be said not to be.  The latter are back ends that generally
24166 only operate on one group at a time, and have no concept of ``server''
24167 -- they have a group, and they deliver info on that group and nothing
24168 more.
24169
24170 Gnus identifies each message by way of group name and article number.  A
24171 few remarks about these article numbers might be useful.  First of all,
24172 the numbers are positive integers.  Secondly, it is normally not
24173 possible for later articles to `re-use' older article numbers without
24174 confusing Gnus.  That is, if a group has ever contained a message
24175 numbered 42, then no other message may get that number, or Gnus will get
24176 mightily confused.@footnote{See the function
24177 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
24178 Third, article numbers must be assigned in order of arrival in the
24179 group; this is not necessarily the same as the date of the message.
24180
24181 The previous paragraph already mentions all the `hard' restrictions that
24182 article numbers must fulfill.  But it seems that it might be useful to
24183 assign @emph{consecutive} article numbers, for Gnus gets quite confused
24184 if there are holes in the article numbering sequence.  However, due to
24185 the `no-reuse' restriction, holes cannot be avoided altogether.  It's
24186 also useful for the article numbers to start at 1 to avoid running out
24187 of numbers as long as possible.
24188
24189 Note that by convention, backends are named @code{nnsomething}, but
24190 Gnus also comes with some @code{nnnotbackends}, such as
24191 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
24192
24193 In the examples and definitions I will refer to the imaginary back end
24194 @code{nnchoke}.
24195
24196 @cindex @code{nnchoke}
24197
24198 @menu
24199 * Required Back End Functions::  Functions that must be implemented.
24200 * Optional Back End Functions::  Functions that need not be implemented.
24201 * Error Messaging::             How to get messages and report errors.
24202 * Writing New Back Ends::       Extending old back ends.
24203 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
24204 * Mail-like Back Ends::         Some tips on mail back ends.
24205 @end menu
24206
24207
24208 @node Required Back End Functions
24209 @subsubsection Required Back End Functions
24210
24211 @table @code
24212
24213 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
24214
24215 @var{articles} is either a range of article numbers or a list of
24216 @code{Message-ID}s.  Current back ends do not fully support either---only
24217 sequences (lists) of article numbers, and most back ends do not support
24218 retrieval of @code{Message-ID}s.  But they should try for both.
24219
24220 The result data should either be HEADs or @sc{nov} lines, and the result
24221 value should either be @code{headers} or @code{nov} to reflect this.
24222 This might later be expanded to @code{various}, which will be a mixture
24223 of HEADs and @sc{nov} lines, but this is currently not supported by Gnus.
24224
24225 If @var{fetch-old} is non-@code{nil} it says to try fetching "extra
24226 headers", in some meaning of the word.  This is generally done by
24227 fetching (at most) @var{fetch-old} extra headers less than the smallest
24228 article number in @code{articles}, and filling the gaps as well.  The
24229 presence of this parameter can be ignored if the back end finds it
24230 cumbersome to follow the request.  If this is non-@code{nil} and not a
24231 number, do maximum fetches.
24232
24233 Here's an example HEAD:
24234
24235 @example
24236 221 1056 Article retrieved.
24237 Path: ifi.uio.no!sturles
24238 From: sturles@@ifi.uio.no (Sturle Sunde)
24239 Newsgroups: ifi.discussion
24240 Subject: Re: Something very droll
24241 Date: 27 Oct 1994 14:02:57 +0100
24242 Organization: Dept. of Informatics, University of Oslo, Norway
24243 Lines: 26
24244 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
24245 References: <38jdmq$4qu@@visbur.ifi.uio.no>
24246 NNTP-Posting-Host: holmenkollen.ifi.uio.no
24247 .
24248 @end example
24249
24250 So a @code{headers} return value would imply that there's a number of
24251 these in the data buffer.
24252
24253 Here's a BNF definition of such a buffer:
24254
24255 @example
24256 headers        = *head
24257 head           = error / valid-head
24258 error-message  = [ "4" / "5" ] 2number " " <error message> eol
24259 valid-head     = valid-message *header "." eol
24260 valid-message  = "221 " <number> " Article retrieved." eol
24261 header         = <text> eol
24262 @end example
24263
24264 If the return value is @code{nov}, the data buffer should contain
24265 @dfn{network overview database} lines.  These are basically fields
24266 separated by tabs.
24267
24268 @example
24269 nov-buffer = *nov-line
24270 nov-line   = 8*9 [ field <TAB> ] eol
24271 field      = <text except TAB>
24272 @end example
24273
24274 For a closer look at what should be in those fields,
24275 @pxref{Headers}.
24276
24277
24278 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
24279
24280 @var{server} is here the virtual server name.  @var{definitions} is a
24281 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
24282
24283 If the server can't be opened, no error should be signaled.  The back end
24284 may then choose to refuse further attempts at connecting to this
24285 server.  In fact, it should do so.
24286
24287 If the server is opened already, this function should return a
24288 non-@code{nil} value.  There should be no data returned.
24289
24290
24291 @item (nnchoke-close-server &optional SERVER)
24292
24293 Close connection to @var{server} and free all resources connected
24294 to it.  Return @code{nil} if the server couldn't be closed for some
24295 reason.
24296
24297 There should be no data returned.
24298
24299
24300 @item (nnchoke-request-close)
24301
24302 Close connection to all servers and free all resources that the back end
24303 have reserved.  All buffers that have been created by that back end
24304 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
24305 function is generally only called when Gnus is shutting down.
24306
24307 There should be no data returned.
24308
24309
24310 @item (nnchoke-server-opened &optional SERVER)
24311
24312 If @var{server} is the current virtual server, and the connection to the
24313 physical server is alive, then this function should return a
24314 non-@code{nil} vlue.  This function should under no circumstances
24315 attempt to reconnect to a server we have lost connection to.
24316
24317 There should be no data returned.
24318
24319
24320 @item (nnchoke-status-message &optional SERVER)
24321
24322 This function should return the last error message from @var{server}.
24323
24324 There should be no data returned.
24325
24326
24327 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
24328
24329 The result data from this function should be the article specified by
24330 @var{article}.  This might either be a @code{Message-ID} or a number.
24331 It is optional whether to implement retrieval by @code{Message-ID}, but
24332 it would be nice if that were possible.
24333
24334 If @var{to-buffer} is non-@code{nil}, the result data should be returned
24335 in this buffer instead of the normal data buffer.  This is to make it
24336 possible to avoid copying large amounts of data from one buffer to
24337 another, while Gnus mainly requests articles to be inserted directly
24338 into its article buffer.
24339
24340 If it is at all possible, this function should return a cons cell where
24341 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
24342 the article number.  This will enable Gnus to find out what the real
24343 group and article numbers are when fetching articles by
24344 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
24345 on successful article retrieval.
24346
24347
24348 @item (nnchoke-request-group GROUP &optional SERVER FAST)
24349
24350 Get data on @var{group}.  This function also has the side effect of
24351 making @var{group} the current group.
24352
24353 If @var{fast}, don't bother to return useful data, just make @var{group}
24354 the current group.
24355
24356 Here's an example of some result data and a definition of the same:
24357
24358 @example
24359 211 56 1000 1059 ifi.discussion
24360 @end example
24361
24362 The first number is the status, which should be 211.  Next is the
24363 total number of articles in the group, the lowest article number, the
24364 highest article number, and finally the group name.  Note that the total
24365 number of articles may be less than one might think while just
24366 considering the highest and lowest article numbers, but some articles
24367 may have been canceled.  Gnus just discards the total-number, so
24368 whether one should take the bother to generate it properly (if that is a
24369 problem) is left as an exercise to the reader.  If the group contains no
24370 articles, the lowest article number should be reported as 1 and the
24371 highest as 0.
24372
24373 @example
24374 group-status = [ error / info ] eol
24375 error        = [ "4" / "5" ] 2<number> " " <Error message>
24376 info         = "211 " 3* [ <number> " " ] <string>
24377 @end example
24378
24379
24380 @item (nnchoke-close-group GROUP &optional SERVER)
24381
24382 Close @var{group} and free any resources connected to it.  This will be
24383 a no-op on most back ends.
24384
24385 There should be no data returned.
24386
24387
24388 @item (nnchoke-request-list &optional SERVER)
24389
24390 Return a list of all groups available on @var{server}.  And that means
24391 @emph{all}.
24392
24393 Here's an example from a server that only carries two groups:
24394
24395 @example
24396 ifi.test 0000002200 0000002000 y
24397 ifi.discussion 3324 3300 n
24398 @end example
24399
24400 On each line we have a group name, then the highest article number in
24401 that group, the lowest article number, and finally a flag.  If the group
24402 contains no articles, the lowest article number should be reported as 1
24403 and the highest as 0.
24404
24405 @example
24406 active-file = *active-line
24407 active-line = name " " <number> " " <number> " " flags eol
24408 name        = <string>
24409 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
24410 @end example
24411
24412 The flag says whether the group is read-only (@samp{n}), is moderated
24413 (@samp{m}), is dead (@samp{x}), is aliased to some other group
24414 (@samp{=other-group}) or none of the above (@samp{y}).
24415
24416
24417 @item (nnchoke-request-post &optional SERVER)
24418
24419 This function should post the current buffer.  It might return whether
24420 the posting was successful or not, but that's not required.  If, for
24421 instance, the posting is done asynchronously, it has generally not been
24422 completed by the time this function concludes.  In that case, this
24423 function should set up some kind of sentinel to beep the user loud and
24424 clear if the posting could not be completed.
24425
24426 There should be no result data from this function.
24427
24428 @end table
24429
24430
24431 @node Optional Back End Functions
24432 @subsubsection Optional Back End Functions
24433
24434 @table @code
24435
24436 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
24437
24438 @var{groups} is a list of groups, and this function should request data
24439 on all those groups.  How it does it is of no concern to Gnus, but it
24440 should attempt to do this in a speedy fashion.
24441
24442 The return value of this function can be either @code{active} or
24443 @code{group}, which says what the format of the result data is.  The
24444 former is in the same format as the data from
24445 @code{nnchoke-request-list}, while the latter is a buffer full of lines
24446 in the same format as @code{nnchoke-request-group} gives.
24447
24448 @example
24449 group-buffer = *active-line / *group-status
24450 @end example
24451
24452
24453 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
24454
24455 A Gnus group info (@pxref{Group Info}) is handed to the back end for
24456 alterations.  This comes in handy if the back end really carries all the
24457 information (as is the case with virtual and imap groups).  This
24458 function should destructively alter the info to suit its needs, and
24459 should return a non-nil value.
24460
24461 There should be no result data from this function.
24462
24463
24464 @item (nnchoke-request-type GROUP &optional ARTICLE)
24465
24466 When the user issues commands for ``sending news'' (@kbd{F} in the
24467 summary buffer, for instance), Gnus has to know whether the article the
24468 user is following up on is news or mail.  This function should return
24469 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
24470 is mail and @code{unknown} if the type can't be decided.  (The
24471 @var{article} parameter is necessary in @code{nnvirtual} groups which
24472 might very well combine mail groups and news groups.)  Both @var{group}
24473 and @var{article} may be @code{nil}.
24474
24475 There should be no result data from this function.
24476
24477
24478 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
24479
24480 Set/remove/add marks on articles.  Normally Gnus handles the article
24481 marks (such as read, ticked, expired etc) internally, and store them in
24482 @code{~/.newsrc.eld}.  Some back ends (such as @sc{imap}) however carry
24483 all information about the articles on the server, so Gnus need to
24484 propagate the mark information to the server.
24485
24486 ACTION is a list of mark setting requests, having this format:
24487
24488 @example
24489 (RANGE ACTION MARK)
24490 @end example
24491
24492 RANGE is a range of articles you wish to update marks on.  ACTION is
24493 @code{add} or @code{del}, used to add marks or remove marks
24494 (preserving all marks not mentioned).  MARK is a list of marks; where
24495 each mark is a symbol.  Currently used marks are @code{read},
24496 @code{tick}, @code{reply}, @code{expire}, @code{killed},
24497 @code{dormant}, @code{save}, @code{download}, @code{unsend},
24498 @code{forward} and @code{recent}, but your back end should, if
24499 possible, not limit itself to these.
24500
24501 Given contradictory actions, the last action in the list should be the
24502 effective one.  That is, if your action contains a request to add the
24503 @code{tick} mark on article 1 and, later in the list, a request to
24504 remove the mark on the same article, the mark should in fact be removed.
24505
24506 An example action list:
24507
24508 @example
24509 (((5 12 30) 'del '(tick))
24510  ((10 . 90) 'add '(read expire))
24511  ((92 94) 'del '(read)))
24512 @end example
24513
24514 The function should return a range of articles it wasn't able to set the
24515 mark on (currently not used for anything).
24516
24517 There should be no result data from this function.
24518
24519 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
24520
24521 If the user tries to set a mark that the back end doesn't like, this
24522 function may change the mark.  Gnus will use whatever this function
24523 returns as the mark for @var{article} instead of the original
24524 @var{mark}.  If the back end doesn't care, it must return the original
24525 @var{mark}, and not @code{nil} or any other type of garbage.
24526
24527 The only use for this I can see is what @code{nnvirtual} does with
24528 it---if a component group is auto-expirable, marking an article as read
24529 in the virtual group should result in the article being marked as
24530 expirable.
24531
24532 There should be no result data from this function.
24533
24534
24535 @item (nnchoke-request-scan &optional GROUP SERVER)
24536
24537 This function may be called at any time (by Gnus or anything else) to
24538 request that the back end check for incoming articles, in one way or
24539 another.  A mail back end will typically read the spool file or query the
24540 POP server when this function is invoked.  The @var{group} doesn't have
24541 to be heeded---if the back end decides that it is too much work just
24542 scanning for a single group, it may do a total scan of all groups.  It
24543 would be nice, however, to keep things local if that's practical.
24544
24545 There should be no result data from this function.
24546
24547
24548 @item (nnchoke-request-group-description GROUP &optional SERVER)
24549
24550 The result data from this function should be a description of
24551 @var{group}.
24552
24553 @example
24554 description-line = name <TAB> description eol
24555 name             = <string>
24556 description      = <text>
24557 @end example
24558
24559 @item (nnchoke-request-list-newsgroups &optional SERVER)
24560
24561 The result data from this function should be the description of all
24562 groups available on the server.
24563
24564 @example
24565 description-buffer = *description-line
24566 @end example
24567
24568
24569 @item (nnchoke-request-newgroups DATE &optional SERVER)
24570
24571 The result data from this function should be all groups that were
24572 created after @samp{date}, which is in normal human-readable date format
24573 (i.e., the date format used in mail and news headers, and returned by
24574 the function @code{message-make-date} by default).  The data should be
24575 in the active buffer format.
24576
24577 It is okay for this function to return `too many' groups; some back ends
24578 might find it cheaper to return the full list of groups, rather than
24579 just the new groups.  But don't do this for back ends with many groups.
24580 Normally, if the user creates the groups herself, there won't be too
24581 many groups, so @code{nnml} and the like are probably safe.  But for
24582 back ends like @code{nntp}, where the groups have been created by the
24583 server, it is quite likely that there can be many groups.
24584
24585
24586 @item (nnchoke-request-create-group GROUP &optional SERVER)
24587
24588 This function should create an empty group with name @var{group}.
24589
24590 There should be no return data.
24591
24592
24593 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
24594
24595 This function should run the expiry process on all articles in the
24596 @var{articles} range (which is currently a simple list of article
24597 numbers.)  It is left up to the back end to decide how old articles
24598 should be before they are removed by this function.  If @var{force} is
24599 non-@code{nil}, all @var{articles} should be deleted, no matter how new
24600 they are.
24601
24602 This function should return a list of articles that it did not/was not
24603 able to delete.
24604
24605 There should be no result data returned.
24606
24607
24608 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM
24609 &optional LAST)
24610
24611 This function should move @var{article} (which is a number) from
24612 @var{group} by calling @var{accept-form}.
24613
24614 This function should ready the article in question for moving by
24615 removing any header lines it has added to the article, and generally
24616 should ``tidy up'' the article.  Then it should @code{eval}
24617 @var{accept-form} in the buffer where the ``tidy'' article is.  This
24618 will do the actual copying.  If this @code{eval} returns a
24619 non-@code{nil} value, the article should be removed.
24620
24621 If @var{last} is @code{nil}, that means that there is a high likelihood
24622 that there will be more requests issued shortly, so that allows some
24623 optimizations.
24624
24625 The function should return a cons where the @code{car} is the group name and
24626 the @code{cdr} is the article number that the article was entered as.
24627
24628 There should be no data returned.
24629
24630
24631 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
24632
24633 This function takes the current buffer and inserts it into @var{group}.
24634 If @var{last} in @code{nil}, that means that there will be more calls to
24635 this function in short order.
24636
24637 The function should return a cons where the @code{car} is the group name and
24638 the @code{cdr} is the article number that the article was entered as.
24639
24640 There should be no data returned.
24641
24642
24643 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
24644
24645 This function should remove @var{article} (which is a number) from
24646 @var{group} and insert @var{buffer} there instead.
24647
24648 There should be no data returned.
24649
24650
24651 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
24652
24653 This function should delete @var{group}.  If @var{force}, it should
24654 really delete all the articles in the group, and then delete the group
24655 itself.  (If there is such a thing as ``the group itself''.)
24656
24657 There should be no data returned.
24658
24659
24660 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
24661
24662 This function should rename @var{group} into @var{new-name}.  All
24663 articles in @var{group} should move to @var{new-name}.
24664
24665 There should be no data returned.
24666
24667 @end table
24668
24669
24670 @node Error Messaging
24671 @subsubsection Error Messaging
24672
24673 @findex nnheader-report
24674 @findex nnheader-get-report
24675 The back ends should use the function @code{nnheader-report} to report
24676 error conditions---they should not raise errors when they aren't able to
24677 perform a request.  The first argument to this function is the back end
24678 symbol, and the rest are interpreted as arguments to @code{format} if
24679 there are multiple of them, or just a string if there is one of them.
24680 This function must always returns @code{nil}.
24681
24682 @lisp
24683 (nnheader-report 'nnchoke "You did something totally bogus")
24684
24685 (nnheader-report 'nnchoke "Could not request group %s" group)
24686 @end lisp
24687
24688 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
24689 @code{nil} back from a server, and this function returns the most
24690 recently reported message for the back end in question.  This function
24691 takes one argument---the server symbol.
24692
24693 Internally, these functions access @var{back-end}@code{-status-string},
24694 so the @code{nnchoke} back end will have its error message stored in
24695 @code{nnchoke-status-string}.
24696
24697
24698 @node Writing New Back Ends
24699 @subsubsection Writing New Back Ends
24700
24701 Many back ends are quite similar.  @code{nnml} is just like
24702 @code{nnspool}, but it allows you to edit the articles on the server.
24703 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
24704 and it doesn't maintain overview databases.  @code{nndir} is just like
24705 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
24706 editing articles.
24707
24708 It would make sense if it were possible to ``inherit'' functions from
24709 back ends when writing new back ends.  And, indeed, you can do that if you
24710 want to.  (You don't have to if you don't want to, of course.)
24711
24712 All the back ends declare their public variables and functions by using a
24713 package called @code{nnoo}.
24714
24715 To inherit functions from other back ends (and allow other back ends to
24716 inherit functions from the current back end), you should use the
24717 following macros:
24718
24719 @table @code
24720
24721 @item nnoo-declare
24722 This macro declares the first parameter to be a child of the subsequent
24723 parameters.  For instance:
24724
24725 @lisp
24726 (nnoo-declare nndir
24727   nnml nnmh)
24728 @end lisp
24729
24730 @code{nndir} has declared here that it intends to inherit functions from
24731 both @code{nnml} and @code{nnmh}.
24732
24733 @item defvoo
24734 This macro is equivalent to @code{defvar}, but registers the variable as
24735 a public server variable.  Most state-oriented variables should be
24736 declared with @code{defvoo} instead of @code{defvar}.
24737
24738 In addition to the normal @code{defvar} parameters, it takes a list of
24739 variables in the parent back ends to map the variable to when executing
24740 a function in those back ends.
24741
24742 @lisp
24743 (defvoo nndir-directory nil
24744   "Where nndir will look for groups."
24745   nnml-current-directory nnmh-current-directory)
24746 @end lisp
24747
24748 This means that @code{nnml-current-directory} will be set to
24749 @code{nndir-directory} when an @code{nnml} function is called on behalf
24750 of @code{nndir}.  (The same with @code{nnmh}.)
24751
24752 @item nnoo-define-basics
24753 This macro defines some common functions that almost all back ends should
24754 have.
24755
24756 @example
24757 (nnoo-define-basics nndir)
24758 @end example
24759
24760 @item deffoo
24761 This macro is just like @code{defun} and takes the same parameters.  In
24762 addition to doing the normal @code{defun} things, it registers the
24763 function as being public so that other back ends can inherit it.
24764
24765 @item nnoo-map-functions
24766 This macro allows mapping of functions from the current back end to
24767 functions from the parent back ends.
24768
24769 @example
24770 (nnoo-map-functions nndir
24771   (nnml-retrieve-headers 0 nndir-current-group 0 0)
24772   (nnmh-request-article 0 nndir-current-group 0 0))
24773 @end example
24774
24775 This means that when @code{nndir-retrieve-headers} is called, the first,
24776 third, and fourth parameters will be passed on to
24777 @code{nnml-retrieve-headers}, while the second parameter is set to the
24778 value of @code{nndir-current-group}.
24779
24780 @item nnoo-import
24781 This macro allows importing functions from back ends.  It should be the
24782 last thing in the source file, since it will only define functions that
24783 haven't already been defined.
24784
24785 @example
24786 (nnoo-import nndir
24787   (nnmh
24788    nnmh-request-list
24789    nnmh-request-newgroups)
24790   (nnml))
24791 @end example
24792
24793 This means that calls to @code{nndir-request-list} should just be passed
24794 on to @code{nnmh-request-list}, while all public functions from
24795 @code{nnml} that haven't been defined in @code{nndir} yet should be
24796 defined now.
24797
24798 @end table
24799
24800 Below is a slightly shortened version of the @code{nndir} back end.
24801
24802 @lisp
24803 ;;; nndir.el --- single directory newsgroup access for Gnus
24804 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
24805
24806 ;;; Code:
24807
24808 (require 'nnheader)
24809 (require 'nnmh)
24810 (require 'nnml)
24811 (require 'nnoo)
24812 (eval-when-compile (require 'cl))
24813
24814 (nnoo-declare nndir
24815   nnml nnmh)
24816
24817 (defvoo nndir-directory nil
24818   "Where nndir will look for groups."
24819   nnml-current-directory nnmh-current-directory)
24820
24821 (defvoo nndir-nov-is-evil nil
24822   "*Non-nil means that nndir will never retrieve NOV headers."
24823   nnml-nov-is-evil)
24824
24825 (defvoo nndir-current-group ""
24826   nil
24827   nnml-current-group nnmh-current-group)
24828 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
24829 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
24830
24831 (defvoo nndir-status-string "" nil nnmh-status-string)
24832 (defconst nndir-version "nndir 1.0")
24833
24834 ;;; Interface functions.
24835
24836 (nnoo-define-basics nndir)
24837
24838 (deffoo nndir-open-server (server &optional defs)
24839   (setq nndir-directory
24840         (or (cadr (assq 'nndir-directory defs))
24841             server))
24842   (unless (assq 'nndir-directory defs)
24843     (push `(nndir-directory ,server) defs))
24844   (push `(nndir-current-group
24845           ,(file-name-nondirectory
24846             (directory-file-name nndir-directory)))
24847         defs)
24848   (push `(nndir-top-directory
24849           ,(file-name-directory (directory-file-name nndir-directory)))
24850         defs)
24851   (nnoo-change-server 'nndir server defs))
24852
24853 (nnoo-map-functions nndir
24854   (nnml-retrieve-headers 0 nndir-current-group 0 0)
24855   (nnmh-request-article 0 nndir-current-group 0 0)
24856   (nnmh-request-group nndir-current-group 0 0)
24857   (nnmh-close-group nndir-current-group 0))
24858
24859 (nnoo-import nndir
24860   (nnmh
24861    nnmh-status-message
24862    nnmh-request-list
24863    nnmh-request-newgroups))
24864
24865 (provide 'nndir)
24866 @end lisp
24867
24868
24869 @node Hooking New Back Ends Into Gnus
24870 @subsubsection Hooking New Back Ends Into Gnus
24871
24872 @vindex gnus-valid-select-methods
24873 @findex gnus-declare-backend
24874 Having Gnus start using your new back end is rather easy---you just
24875 declare it with the @code{gnus-declare-backend} functions.  This will
24876 enter the back end into the @code{gnus-valid-select-methods} variable.
24877
24878 @code{gnus-declare-backend} takes two parameters---the back end name and
24879 an arbitrary number of @dfn{abilities}.
24880
24881 Here's an example:
24882
24883 @lisp
24884 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
24885 @end lisp
24886
24887 The above line would then go in the @file{nnchoke.el} file.
24888
24889 The abilities can be:
24890
24891 @table @code
24892 @item mail
24893 This is a mailish back end---followups should (probably) go via mail.
24894 @item post
24895 This is a newsish back end---followups should (probably) go via news.
24896 @item post-mail
24897 This back end supports both mail and news.
24898 @item none
24899 This is neither a post nor mail back end---it's something completely
24900 different.
24901 @item respool
24902 It supports respooling---or rather, it is able to modify its source
24903 articles and groups.
24904 @item address
24905 The name of the server should be in the virtual server name.  This is
24906 true for almost all back ends.
24907 @item prompt-address
24908 The user should be prompted for an address when doing commands like
24909 @kbd{B} in the group buffer.  This is true for back ends like
24910 @code{nntp}, but not @code{nnmbox}, for instance.
24911 @end table
24912
24913
24914 @node Mail-like Back Ends
24915 @subsubsection Mail-like Back Ends
24916
24917 One of the things that separate the mail back ends from the rest of the
24918 back ends is the heavy dependence by most of the mail back ends on
24919 common functions in @file{nnmail.el}.  For instance, here's the
24920 definition of @code{nnml-request-scan}:
24921
24922 @lisp
24923 (deffoo nnml-request-scan (&optional group server)
24924   (setq nnml-article-file-alist nil)
24925   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
24926 @end lisp
24927
24928 It simply calls @code{nnmail-get-new-mail} with a few parameters,
24929 and @code{nnmail} takes care of all the moving and splitting of the
24930 mail.
24931
24932 This function takes four parameters.
24933
24934 @table @var
24935 @item method
24936 This should be a symbol to designate which back end is responsible for
24937 the call.
24938
24939 @item exit-function
24940 This function should be called after the splitting has been performed.
24941
24942 @item temp-directory
24943 Where the temporary files should be stored.
24944
24945 @item group
24946 This optional argument should be a group name if the splitting is to be
24947 performed for one group only.
24948 @end table
24949
24950 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
24951 save each article.  @var{back-end}@code{-active-number} will be called to
24952 find the article number assigned to this article.
24953
24954 The function also uses the following variables:
24955 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
24956 this back end); and @var{back-end}@code{-group-alist} and
24957 @var{back-end}@code{-active-file} to generate the new active file.
24958 @var{back-end}@code{-group-alist} should be a group-active alist, like
24959 this:
24960
24961 @example
24962 (("a-group" (1 . 10))
24963  ("some-group" (34 . 39)))
24964 @end example
24965
24966
24967 @node Score File Syntax
24968 @subsection Score File Syntax
24969
24970 Score files are meant to be easily parseable, but yet extremely
24971 mallable.   It was decided that something that had the same read syntax
24972 as an Emacs Lisp list would fit that spec.
24973
24974 Here's a typical score file:
24975
24976 @lisp
24977 (("summary"
24978   ("win95" -10000 nil s)
24979   ("Gnus"))
24980  ("from"
24981   ("Lars" -1000))
24982  (mark -100))
24983 @end lisp
24984
24985 BNF definition of a score file:
24986
24987 @example
24988 score-file      = "" / "(" *element ")"
24989 element         = rule / atom
24990 rule            = string-rule / number-rule / date-rule
24991 string-rule     = "(" quote string-header quote space *string-match ")"
24992 number-rule     = "(" quote number-header quote space *number-match ")"
24993 date-rule       = "(" quote date-header quote space *date-match ")"
24994 quote           = <ascii 34>
24995 string-header   = "subject" / "from" / "references" / "message-id" /
24996                   "xref" / "body" / "head" / "all" / "followup"
24997 number-header   = "lines" / "chars"
24998 date-header     = "date"
24999 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
25000                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
25001 score           = "nil" / <integer>
25002 date            = "nil" / <natural number>
25003 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
25004                   "r" / "regex" / "R" / "Regex" /
25005                   "e" / "exact" / "E" / "Exact" /
25006                   "f" / "fuzzy" / "F" / "Fuzzy"
25007 number-match    = "(" <integer> [ "" / [ space score [ "" /
25008                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
25009 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
25010 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
25011                   space date [ "" / [ space date-match-t ] ] ] ] ")"
25012 date-match-t    = "nil" / "at" / "before" / "after"
25013 atom            = "(" [ required-atom / optional-atom ] ")"
25014 required-atom   = mark / expunge / mark-and-expunge / files /
25015                   exclude-files / read-only / touched
25016 optional-atom   = adapt / local / eval
25017 mark            = "mark" space nil-or-number
25018 nil-or-number   = "nil" / <integer>
25019 expunge         = "expunge" space nil-or-number
25020 mark-and-expunge = "mark-and-expunge" space nil-or-number
25021 files           = "files" *[ space <string> ]
25022 exclude-files   = "exclude-files" *[ space <string> ]
25023 read-only       = "read-only" [ space "nil" / space "t" ]
25024 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
25025 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
25026 local           = "local" *[ space "(" <string> space <form> ")" ]
25027 eval            = "eval" space <form>
25028 space           = *[ " " / <TAB> / <NEWLINE> ]
25029 @end example
25030
25031 Any unrecognized elements in a score file should be ignored, but not
25032 discarded.
25033
25034 As you can see, white space is needed, but the type and amount of white
25035 space is irrelevant.  This means that formatting of the score file is
25036 left up to the programmer---if it's simpler to just spew it all out on
25037 one looong line, then that's ok.
25038
25039 The meaning of the various atoms are explained elsewhere in this
25040 manual (@pxref{Score File Format}).
25041
25042
25043 @node Headers
25044 @subsection Headers
25045
25046 Internally Gnus uses a format for storing article headers that
25047 corresponds to the @sc{nov} format in a mysterious fashion.  One could
25048 almost suspect that the author looked at the @sc{nov} specification and
25049 just shamelessly @emph{stole} the entire thing, and one would be right.
25050
25051 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
25052 RFC 1036 to talk about lines in the head of an article (e.g.,
25053 @code{From}).  It is used by many people as a synonym for
25054 ``head''---``the header and the body''.  (That should be avoided, in my
25055 opinion.)  And Gnus uses a format internally that it calls ``header'',
25056 which is what I'm talking about here.  This is a 9-element vector,
25057 basically, with each header (ouch) having one slot.
25058
25059 These slots are, in order: @code{number}, @code{subject}, @code{from},
25060 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
25061 @code{xref}, and @code{extra}.  There are macros for accessing and
25062 setting these slots---they all have predictable names beginning with
25063 @code{mail-header-} and @code{mail-header-set-}, respectively.
25064
25065 All these slots contain strings, except the @code{extra} slot, which
25066 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
25067
25068
25069 @node Ranges
25070 @subsection Ranges
25071
25072 @sc{gnus} introduced a concept that I found so useful that I've started
25073 using it a lot and have elaborated on it greatly.
25074
25075 The question is simple: If you have a large amount of objects that are
25076 identified by numbers (say, articles, to take a @emph{wild} example)
25077 that you want to qualify as being ``included'', a normal sequence isn't
25078 very useful.  (A 200,000 length sequence is a bit long-winded.)
25079
25080 The solution is as simple as the question: You just collapse the
25081 sequence.
25082
25083 @example
25084 (1 2 3 4 5 6 10 11 12)
25085 @end example
25086
25087 is transformed into
25088
25089 @example
25090 ((1 . 6) (10 . 12))
25091 @end example
25092
25093 To avoid having those nasty @samp{(13 . 13)} elements to denote a
25094 lonesome object, a @samp{13} is a valid element:
25095
25096 @example
25097 ((1 . 6) 7 (10 . 12))
25098 @end example
25099
25100 This means that comparing two ranges to find out whether they are equal
25101 is slightly tricky:
25102
25103 @example
25104 ((1 . 5) 7 8 (10 . 12))
25105 @end example
25106
25107 and
25108
25109 @example
25110 ((1 . 5) (7 . 8) (10 . 12))
25111 @end example
25112
25113 are equal.  In fact, any non-descending list is a range:
25114
25115 @example
25116 (1 2 3 4 5)
25117 @end example
25118
25119 is a perfectly valid range, although a pretty long-winded one.  This is
25120 also valid:
25121
25122 @example
25123 (1 . 5)
25124 @end example
25125
25126 and is equal to the previous range.
25127
25128 Here's a BNF definition of ranges.  Of course, one must remember the
25129 semantic requirement that the numbers are non-descending.  (Any number
25130 of repetition of the same number is allowed, but apt to disappear in
25131 range handling.)
25132
25133 @example
25134 range           = simple-range / normal-range
25135 simple-range    = "(" number " . " number ")"
25136 normal-range    = "(" start-contents ")"
25137 contents        = "" / simple-range *[ " " contents ] /
25138                   number *[ " " contents ]
25139 @end example
25140
25141 Gnus currently uses ranges to keep track of read articles and article
25142 marks.  I plan on implementing a number of range operators in C if The
25143 Powers That Be are willing to let me.  (I haven't asked yet, because I
25144 need to do some more thinking on what operators I need to make life
25145 totally range-based without ever having to convert back to normal
25146 sequences.)
25147
25148
25149 @node Group Info
25150 @subsection Group Info
25151
25152 Gnus stores all permanent info on groups in a @dfn{group info} list.
25153 This list is from three to six elements (or more) long and exhaustively
25154 describes the group.
25155
25156 Here are two example group infos; one is a very simple group while the
25157 second is a more complex one:
25158
25159 @example
25160 ("no.group" 5 ((1 . 54324)))
25161
25162 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
25163                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
25164                 (nnml "")
25165                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
25166 @end example
25167
25168 The first element is the @dfn{group name}---as Gnus knows the group,
25169 anyway.  The second element is the @dfn{subscription level}, which
25170 normally is a small integer.  (It can also be the @dfn{rank}, which is a
25171 cons cell where the @code{car} is the level and the @code{cdr} is the
25172 score.)  The third element is a list of ranges of read articles.  The
25173 fourth element is a list of lists of article marks of various kinds.
25174 The fifth element is the select method (or virtual server, if you like).
25175 The sixth element is a list of @dfn{group parameters}, which is what
25176 this section is about.
25177
25178 Any of the last three elements may be missing if they are not required.
25179 In fact, the vast majority of groups will normally only have the first
25180 three elements, which saves quite a lot of cons cells.
25181
25182 Here's a BNF definition of the group info format:
25183
25184 @example
25185 info          = "(" group space ralevel space read
25186                 [ "" / [ space marks-list [ "" / [ space method [ "" /
25187                 space parameters ] ] ] ] ] ")"
25188 group         = quote <string> quote
25189 ralevel       = rank / level
25190 level         = <integer in the range of 1 to inf>
25191 rank          = "(" level "." score ")"
25192 score         = <integer in the range of 1 to inf>
25193 read          = range
25194 marks-lists   = nil / "(" *marks ")"
25195 marks         = "(" <string> range ")"
25196 method        = "(" <string> *elisp-forms ")"
25197 parameters    = "(" *elisp-forms ")"
25198 @end example
25199
25200 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
25201 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
25202 in pseudo-BNF.
25203
25204 If you have a Gnus info and want to access the elements, Gnus offers a
25205 series of macros for getting/setting these elements.
25206
25207 @table @code
25208 @item gnus-info-group
25209 @itemx gnus-info-set-group
25210 @findex gnus-info-group
25211 @findex gnus-info-set-group
25212 Get/set the group name.
25213
25214 @item gnus-info-rank
25215 @itemx gnus-info-set-rank
25216 @findex gnus-info-rank
25217 @findex gnus-info-set-rank
25218 Get/set the group rank (@pxref{Group Score}).
25219
25220 @item gnus-info-level
25221 @itemx gnus-info-set-level
25222 @findex gnus-info-level
25223 @findex gnus-info-set-level
25224 Get/set the group level.
25225
25226 @item gnus-info-score
25227 @itemx gnus-info-set-score
25228 @findex gnus-info-score
25229 @findex gnus-info-set-score
25230 Get/set the group score (@pxref{Group Score}).
25231
25232 @item gnus-info-read
25233 @itemx gnus-info-set-read
25234 @findex gnus-info-read
25235 @findex gnus-info-set-read
25236 Get/set the ranges of read articles.
25237
25238 @item gnus-info-marks
25239 @itemx gnus-info-set-marks
25240 @findex gnus-info-marks
25241 @findex gnus-info-set-marks
25242 Get/set the lists of ranges of marked articles.
25243
25244 @item gnus-info-method
25245 @itemx gnus-info-set-method
25246 @findex gnus-info-method
25247 @findex gnus-info-set-method
25248 Get/set the group select method.
25249
25250 @item gnus-info-params
25251 @itemx gnus-info-set-params
25252 @findex gnus-info-params
25253 @findex gnus-info-set-params
25254 Get/set the group parameters.
25255 @end table
25256
25257 All the getter functions take one parameter---the info list.  The setter
25258 functions take two parameters---the info list and the new value.
25259
25260 The last three elements in the group info aren't mandatory, so it may be
25261 necessary to extend the group info before setting the element.  If this
25262 is necessary, you can just pass on a non-@code{nil} third parameter to
25263 the three final setter functions to have this happen automatically.
25264
25265
25266 @node Extended Interactive
25267 @subsection Extended Interactive
25268 @cindex interactive
25269 @findex gnus-interactive
25270
25271 Gnus extends the standard Emacs @code{interactive} specification
25272 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
25273 Prefixes}).  Here's an example of how this is used:
25274
25275 @lisp
25276 (defun gnus-summary-increase-score (&optional score symp)
25277   (interactive (gnus-interactive "P\ny"))
25278   ...
25279   )
25280 @end lisp
25281
25282 The best thing to do would have been to implement
25283 @code{gnus-interactive} as a macro which would have returned an
25284 @code{interactive} form, but this isn't possible since Emacs checks
25285 whether a function is interactive or not by simply doing an @code{assq}
25286 on the lambda form.  So, instead we have @code{gnus-interactive}
25287 function that takes a string and returns values that are usable to
25288 @code{interactive}.
25289
25290 This function accepts (almost) all normal @code{interactive} specs, but
25291 adds a few more.
25292
25293 @table @samp
25294 @item y
25295 @vindex gnus-current-prefix-symbol
25296 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
25297 variable.
25298
25299 @item Y
25300 @vindex gnus-current-prefix-symbols
25301 A list of the current symbolic prefixes---the
25302 @code{gnus-current-prefix-symbol} variable.
25303
25304 @item A
25305 The current article number---the @code{gnus-summary-article-number}
25306 function.
25307
25308 @item H
25309 The current article header---the @code{gnus-summary-article-header}
25310 function.
25311
25312 @item g
25313 The current group name---the @code{gnus-group-group-name}
25314 function.
25315
25316 @end table
25317
25318
25319 @node Emacs/XEmacs Code
25320 @subsection Emacs/XEmacs Code
25321 @cindex XEmacs
25322 @cindex Emacsen
25323
25324 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
25325 platforms must be the primary one.  I chose Emacs.  Not because I don't
25326 like XEmacs or Mule, but because it comes first alphabetically.
25327
25328 This means that Gnus will byte-compile under Emacs with nary a warning,
25329 while XEmacs will pump out gigabytes of warnings while byte-compiling.
25330 As I use byte-compilation warnings to help me root out trivial errors in
25331 Gnus, that's very useful.
25332
25333 I've also consistently used Emacs function interfaces, but have used
25334 Gnusey aliases for the functions.  To take an example:  Emacs defines a
25335 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
25336 function.  I then define a function called @code{gnus-run-at-time} that
25337 takes the same parameters as the Emacs @code{run-at-time}.  When running
25338 Gnus under Emacs, the former function is just an alias for the latter.
25339 However, when running under XEmacs, the former is an alias for the
25340 following function:
25341
25342 @lisp
25343 (defun gnus-xmas-run-at-time (time repeat function &rest args)
25344   (start-itimer
25345    "gnus-run-at-time"
25346    `(lambda ()
25347       (,function ,@@args))
25348    time repeat))
25349 @end lisp
25350
25351 This sort of thing has been done for bunches of functions.  Gnus does
25352 not redefine any native Emacs functions while running under XEmacs---it
25353 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
25354 all over.
25355
25356 In the cases where the XEmacs function interface was obviously cleaner,
25357 I used it instead.  For example @code{gnus-region-active-p} is an alias
25358 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
25359
25360 Of course, I could have chosen XEmacs as my native platform and done
25361 mapping functions the other way around.  But I didn't.  The performance
25362 hit these indirections impose on Gnus under XEmacs should be slight.
25363
25364
25365 @node Various File Formats
25366 @subsection Various File Formats
25367
25368 @menu
25369 * Active File Format::          Information on articles and groups available.
25370 * Newsgroups File Format::      Group descriptions.
25371 @end menu
25372
25373
25374 @node Active File Format
25375 @subsubsection Active File Format
25376
25377 The active file lists all groups available on the server in
25378 question.  It also lists the highest and lowest current article numbers
25379 in each group.
25380
25381 Here's an excerpt from a typical active file:
25382
25383 @example
25384 soc.motss 296030 293865 y
25385 alt.binaries.pictures.fractals 3922 3913 n
25386 comp.sources.unix 1605 1593 m
25387 comp.binaries.ibm.pc 5097 5089 y
25388 no.general 1000 900 y
25389 @end example
25390
25391 Here's a pseudo-BNF definition of this file:
25392
25393 @example
25394 active      = *group-line
25395 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
25396 group       = <non-white-space string>
25397 spc         = " "
25398 high-number = <non-negative integer>
25399 low-number  = <positive integer>
25400 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
25401 @end example
25402
25403 For a full description of this file, see the manual pages for
25404 @samp{innd}, in particular @samp{active(5)}.
25405
25406
25407 @node Newsgroups File Format
25408 @subsubsection Newsgroups File Format
25409
25410 The newsgroups file lists groups along with their descriptions.  Not all
25411 groups on the server have to be listed,  and not all groups in the file
25412 have to exist on the server.  The file is meant purely as information to
25413 the user.
25414
25415 The format is quite simple; a group name, a tab, and the description.
25416 Here's the definition:
25417
25418 @example
25419 newsgroups    = *line
25420 line          = group tab description <NEWLINE>
25421 group         = <non-white-space string>
25422 tab           = <TAB>
25423 description   = <string>
25424 @end example
25425
25426
25427 @page
25428 @node Emacs for Heathens
25429 @section Emacs for Heathens
25430
25431 Believe it or not, but some people who use Gnus haven't really used
25432 Emacs much before they embarked on their journey on the Gnus Love Boat.
25433 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
25434 region'', and ``set @code{gnus-flargblossen} to an alist where the key
25435 is a regexp that is used for matching on the group name'' are magical
25436 phrases with little or no meaning, then this appendix is for you.  If
25437 you are already familiar with Emacs, just ignore this and go fondle your
25438 cat instead.
25439
25440 @menu
25441 * Keystrokes::                  Entering text and executing commands.
25442 * Emacs Lisp::                  The built-in Emacs programming language.
25443 @end menu
25444
25445
25446 @node Keystrokes
25447 @subsection Keystrokes
25448
25449 @itemize @bullet
25450 @item
25451 Q: What is an experienced Emacs user?
25452
25453 @item
25454 A: A person who wishes that the terminal had pedals.
25455 @end itemize
25456
25457 Yes, when you use Emacs, you are apt to use the control key, the shift
25458 key and the meta key a lot.  This is very annoying to some people
25459 (notably @code{vi}le users), and the rest of us just love the hell out
25460 of it.  Just give up and submit.  Emacs really does stand for
25461 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
25462 may have heard from other disreputable sources (like the Emacs author).
25463
25464 The shift keys are normally located near your pinky fingers, and are
25465 normally used to get capital letters and stuff.  You probably use it all
25466 the time.  The control key is normally marked ``CTRL'' or something like
25467 that.  The meta key is, funnily enough, never marked as such on any
25468 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
25469 which is the meta key on this keyboard.  It's usually located somewhere
25470 to the left hand side of the keyboard, usually on the bottom row.
25471
25472 Now, us Emacs people don't say ``press the meta-control-m key'',
25473 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
25474 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
25475 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
25476 down the control key, and hold it down while you press @kbd{k}''.
25477 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
25478 the control key and then press @kbd{k}''.  Simple, ay?
25479
25480 This is somewhat complicated by the fact that not all keyboards have a
25481 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
25482 means ``press escape, release escape, press @kbd{k}''.  That's much more
25483 work than if you have a meta key, so if that's the case, I respectfully
25484 suggest you get a real keyboard with a meta key.  You can't live without
25485 it.
25486
25487
25488
25489 @node Emacs Lisp
25490 @subsection Emacs Lisp
25491
25492 Emacs is the King of Editors because it's really a Lisp interpreter.
25493 Each and every key you tap runs some Emacs Lisp code snippet, and since
25494 Emacs Lisp is an interpreted language, that means that you can configure
25495 any key to run any arbitrary code.  You just, like, do it.
25496
25497 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
25498 functions.  (These are byte-compiled for speed, but it's still
25499 interpreted.)  If you decide that you don't like the way Gnus does
25500 certain things, it's trivial to have it do something a different way.
25501 (Well, at least if you know how to write Lisp code.)  However, that's
25502 beyond the scope of this manual, so we are simply going to talk about
25503 some common constructs that you normally use in your @file{.emacs} file
25504 to customize Gnus.
25505
25506 If you want to set the variable @code{gnus-florgbnize} to four (4), you
25507 write the following:
25508
25509 @lisp
25510 (setq gnus-florgbnize 4)
25511 @end lisp
25512
25513 This function (really ``special form'') @code{setq} is the one that can
25514 set a variable to some value.  This is really all you need to know.  Now
25515 you can go and fill your @code{.emacs} file with lots of these to change
25516 how Gnus works.
25517
25518 If you have put that thing in your @code{.emacs} file, it will be read
25519 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
25520 start Emacs.  If you want to change the variable right away, simply say
25521 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
25522 previous ``form'', which is a simple @code{setq} statement here.
25523
25524 Go ahead---just try it, if you're located at your Emacs.  After you
25525 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
25526 is the return value of the form you @code{eval}ed.
25527
25528 Some pitfalls:
25529
25530 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
25531 that means:
25532
25533 @lisp
25534 (setq gnus-read-active-file 'some)
25535 @end lisp
25536
25537 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
25538 @samp{nntp.ifi.uio.no}'', that means:
25539
25540 @lisp
25541 (setq gnus-nntp-server "nntp.ifi.uio.no")
25542 @end lisp
25543
25544 So be careful not to mix up strings (the latter) with symbols (the
25545 former).  The manual is unambiguous, but it can be confusing.
25546
25547 @page
25548 @include gnus-faq.texi
25549
25550 @node Index
25551 @chapter Index
25552 @printindex cp
25553
25554 @node Key Index
25555 @chapter Key Index
25556 @printindex ky
25557
25558 @summarycontents
25559 @contents
25560 @bye
25561
25562 @iftex
25563 @iflatex
25564 \end{document}
25565 @end iflatex
25566 @end iftex
25567
25568 @c Local Variables:
25569 @c mode: texinfo
25570 @c coding: iso-8859-1
25571 @c End:
25572 % LocalWords:  BNF mucho detailmenu cindex kindex kbd
25573 % LocalWords:  findex Gnusae vindex dfn dfn samp nntp setq nnspool nntpserver
25574 % LocalWords:  nnmbox newusers Blllrph NEWGROUPS dingnusdingnusdingnus
25575 % LocalWords:  pre fab rec comp nnslashdot regex ga ga sci nnml nnbabyl nnmh
25576 % LocalWords:  nnfolder emph looong eld newsreaders defun init elc pxref