(gnus-spam-mark): set to `$'
[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.13}
37 \newcommand{\gnuschaptername}{}
38 \newcommand{\gnussectionname}{}
39
40 \newcommand{\gnusbackslash}{/}
41
42 \newcommand{\gnusref}[1]{``#1'' on page \pageref{#1}}
43 \ifx\pdfoutput\undefined
44 \newcommand{\gnusuref}[1]{\gnustt{#1}}
45 \else
46 \newcommand{\gnusuref}[1]{\href{#1}{\gnustt{#1}}}
47 \fi
48 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
49 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
50
51 \newcommand{\gnuskindex}[1]{\index{#1}}
52 \newcommand{\gnusindex}[1]{\index{#1}}
53
54 \newcommand{\gnustt}[1]{{\gnusselectttfont{}#1}}
55 \newcommand{\gnuscode}[1]{\gnustt{#1}}
56 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
57 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
58 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
59 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
60 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
61 \newcommand{\gnusdfn}[1]{\textit{#1}}
62 \newcommand{\gnusi}[1]{\textit{#1}}
63 \newcommand{\gnusstrong}[1]{\textbf{#1}}
64 \newcommand{\gnusemph}[1]{\textit{#1}}
65 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
66 \newcommand{\gnussc}[1]{\textsc{#1}}
67 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
68 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
69 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
70 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
71
72 \newcommand{\gnusbullet}{{${\bullet}$}}
73 \newcommand{\gnusdollar}{\$}
74 \newcommand{\gnusampersand}{\&}
75 \newcommand{\gnuspercent}{\%}
76 \newcommand{\gnushash}{\#}
77 \newcommand{\gnushat}{\symbol{"5E}}
78 \newcommand{\gnusunderline}{\symbol{"5F}}
79 \newcommand{\gnusnot}{$\neg$}
80 \newcommand{\gnustilde}{\symbol{"7E}}
81 \newcommand{\gnusless}{{$<$}}
82 \newcommand{\gnusgreater}{{$>$}}
83 \newcommand{\gnusbraceleft}{{$>$}}
84 \newcommand{\gnusbraceright}{{$>$}}
85
86 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
87 \newcommand{\gnusinteresting}{
88 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
89 }
90
91 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
92
93 \newcommand{\gnuspagechapter}[1]{
94 {\mbox{}}
95 }
96
97 \newdimen{\gnusdimen}
98 \gnusdimen 0pt
99
100 \newcommand{\gnuschapter}[2]{
101 \gnuscleardoublepage
102 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
103 \chapter{#2}
104 \renewcommand{\gnussectionname}{}
105 \renewcommand{\gnuschaptername}{#2}
106 \thispagestyle{empty}
107 \hspace*{-2cm}
108 \begin{picture}(500,500)(0,0)
109 \put(480,350){\makebox(0,0)[tr]{#1}}
110 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
111 \end{picture}
112 \clearpage
113 }
114
115 \newcommand{\gnusfigure}[3]{
116 \begin{figure}
117 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
118 #3
119 \end{picture}
120 \caption{#1}
121 \end{figure}
122 }
123
124 \newcommand{\gnusicon}[1]{
125 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
126 }
127
128 \newcommand{\gnuspicon}[1]{
129 \margindex{\epsfig{figure=#1,width=2cm}}
130 }
131
132 \newcommand{\gnusxface}[2]{
133 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
134 }
135
136 \newcommand{\gnussmiley}[2]{
137 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
138 }
139
140 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
141
142 \newcommand{\gnussection}[1]{
143 \renewcommand{\gnussectionname}{#1}
144 \section{#1}
145 }
146
147 \newenvironment{codelist}%
148 {\begin{list}{}{
149 }
150 }{\end{list}}
151
152 \newenvironment{kbdlist}%
153 {\begin{list}{}{
154 \labelwidth=0cm
155 }
156 }{\end{list}}
157
158 \newenvironment{dfnlist}%
159 {\begin{list}{}{
160 }
161 }{\end{list}}
162
163 \newenvironment{stronglist}%
164 {\begin{list}{}{
165 }
166 }{\end{list}}
167
168 \newenvironment{samplist}%
169 {\begin{list}{}{
170 }
171 }{\end{list}}
172
173 \newenvironment{varlist}%
174 {\begin{list}{}{
175 }
176 }{\end{list}}
177
178 \newenvironment{emphlist}%
179 {\begin{list}{}{
180 }
181 }{\end{list}}
182
183 \newlength\gnusheadtextwidth
184 \setlength{\gnusheadtextwidth}{\headtextwidth}
185 \addtolength{\gnusheadtextwidth}{1cm}
186
187 \newpagestyle{gnuspreamble}%
188 {
189 {
190 \ifodd\count0
191 {
192 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
193 }
194 \else
195 {
196 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
197 }
198 }
199 \fi
200 }
201 }
202 {
203 \ifodd\count0
204 \mbox{} \hfill
205 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
206 \else
207 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
208 \hfill \mbox{}
209 \fi
210 }
211
212 \newpagestyle{gnusindex}%
213 {
214 {
215 \ifodd\count0
216 {
217 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
218 }
219 \else
220 {
221 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
222 }
223 \fi
224 }
225 }
226 {
227 \ifodd\count0
228 \mbox{} \hfill
229 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
230 \else
231 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
232 \hfill \mbox{}
233 \fi
234 }
235
236 \newpagestyle{gnus}%
237 {
238 {
239 \ifodd\count0
240 {
241 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
242 }
243 \else
244 {
245 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
246 }
247 \fi
248 }
249 }
250 {
251 \ifodd\count0
252 \mbox{} \hfill
253 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
254 \else
255 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
256 \hfill \mbox{}
257 \fi
258 }
259
260 \pagenumbering{roman}
261 \pagestyle{gnuspreamble}
262
263 @end iflatex
264 @end iftex
265
266 @iftex
267 @iflatex
268 \begin{titlepage}
269 {
270
271 %\addtolength{\oddsidemargin}{-5cm}
272 %\addtolength{\evensidemargin}{-5cm}
273 \parindent=0cm
274 \addtolength{\textheight}{2cm}
275
276 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
277 \rule{15cm}{1mm}\\
278 \vfill
279 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
280 \vfill
281 \rule{15cm}{1mm}\\
282 \gnusauthor{by Lars Magne Ingebrigtsen}
283 \newpage
284 }
285
286 \mbox{}
287 \vfill
288
289 \thispagestyle{empty}
290
291 Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
292 2002, 2003
293 Free Software Foundation, Inc.
294
295
296 Permission is granted to copy, distribute and/or modify this document
297 under the terms of the GNU Free Documentation License, Version 1.1 or
298 any later version published by the Free Software Foundation; with no
299 Invariant Sections, with the Front-Cover texts being ``A GNU
300 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
301 license is included in the section entitled ``GNU Free Documentation
302 License'' in the Emacs manual.
303
304 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
305 this GNU Manual, like GNU software.  Copies published by the Free
306 Software Foundation raise funds for GNU development.''
307
308 This document is part of a collection distributed under the GNU Free
309 Documentation License.  If you want to distribute this document
310 separately from the collection, you can do so by adding a copy of the
311 license to the document, as described in section 6 of the license.
312 \newpage
313 \end{titlepage}
314 @end iflatex
315 @end iftex
316
317 @ifnottex
318
319 This file documents Gnus, the GNU Emacs newsreader.
320
321 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
322         Free Software Foundation, Inc.
323
324 Permission is granted to copy, distribute and/or modify this document
325 under the terms of the GNU Free Documentation License, Version 1.1 or
326 any later version published by the Free Software Foundation; with the
327 Invariant Sections being none, with the Front-Cover texts being ``A GNU
328 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
329 license is included in the section entitled ``GNU Free Documentation
330 License'' in the Emacs manual.
331
332 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
333 this GNU Manual, like GNU software.  Copies published by the Free
334 Software Foundation raise funds for GNU development.''
335
336 This document is part of a collection distributed under the GNU Free
337 Documentation License.  If you want to distribute this document
338 separately from the collection, you can do so by adding a copy of the
339 license to the document, as described in section 6 of the license.
340 @end ifnottex
341
342 @tex
343
344 @titlepage
345 @title Gnus Manual
346
347 @author by Lars Magne Ingebrigtsen
348 @page
349
350 @vskip 0pt plus 1filll
351 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
352 2002, 2003
353         Free Software Foundation, Inc.
354
355 Permission is granted to copy, distribute and/or modify this document
356 under the terms of the GNU Free Documentation License, Version 1.1 or
357 any later version published by the Free Software Foundation; with no
358 Invariant Sections, with the Front-Cover texts being ``A GNU
359 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
360 license is included in the section entitled ``GNU Free Documentation
361 License'' in the Emacs manual.
362
363 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
364 this GNU Manual, like GNU software.  Copies published by the Free
365 Software Foundation raise funds for GNU development.''
366
367 This document is part of a collection distributed under the GNU Free
368 Documentation License.  If you want to distribute this document
369 separately from the collection, you can do so by adding a copy of the
370 license to the document, as described in section 6 of the license.
371
372 @end titlepage
373 @page
374
375 @end tex
376
377
378 @node Top
379 @top The Gnus Newsreader
380
381 @ifinfo
382
383 You can read news (and mail) from within Emacs by using Gnus.  The news
384 can be gotten by any nefarious means you can think of---@sc{nntp}, local
385 spool or your mbox file.  All at the same time, if you want to push your
386 luck.
387
388 This manual corresponds to Oort Gnus v0.13.
389
390 @end ifinfo
391
392 @iftex
393
394 @iflatex
395 \tableofcontents
396 \gnuscleardoublepage
397 @end iflatex
398
399 Gnus is the advanced, self-documenting, customizable, extensible
400 unreal-time newsreader for GNU Emacs.
401
402 Oops.  That sounds oddly familiar, so let's start over again to avoid
403 being accused of plagiarism:
404
405 Gnus is a message-reading laboratory.  It will let you look at just
406 about anything as if it were a newsgroup.  You can read mail with it,
407 you can browse directories with it, you can @code{ftp} with it---you
408 can even read news with it!
409
410 Gnus tries to empower people who read news the same way Emacs empowers
411 people who edit text.  Gnus sets no limits to what the user should be
412 allowed to do.  Users are encouraged to extend Gnus to make it behave
413 like they want it to behave.  A program should not control people;
414 people should be empowered to do what they want by using (or abusing)
415 the program.
416
417 @end iftex
418
419 @menu
420 * Starting Up::                 Finding news can be a pain.
421 * Group Buffer::                Selecting, subscribing and killing groups.
422 * Summary Buffer::              Reading, saving and posting articles.
423 * Article Buffer::              Displaying and handling articles.
424 * Composing Messages::          Information on sending mail and news.
425 * Select Methods::              Gnus reads all messages from various select methods.
426 * Scoring::                     Assigning values to articles.
427 * Various::                     General purpose settings.
428 * The End::                     Farewell and goodbye.
429 * Appendices::                  Terminology, Emacs intro, FAQ, History, Internals.
430 * Index::                       Variable, function and concept index.
431 * Key Index::                   Key Index.
432
433 Other related manuals
434
435 * Message:(message).            Composing messages.
436 * Emacs-MIME:(emacs-mime).      Composing messages; MIME-specific parts.
437 * Sieve:(sieve).                Managing Sieve scripts in Emacs.
438 * PGG:(pgg).                    PGP/MIME with Gnus.
439
440 @detailmenu
441  --- The Detailed Node Listing ---
442
443 Starting Gnus
444
445 * Finding the News::            Choosing a method for getting news.
446 * The First Time::              What does Gnus do the first time you start it?
447 * The Server is Down::          How can I read my mail then?
448 * Slave Gnusae::                You can have more than one Gnus active at a time.
449 * Fetching a Group::            Starting Gnus just to read a group.
450 * New Groups::                  What is Gnus supposed to do with new groups?
451 * Changing Servers::            You may want to move from one server to another.
452 * Startup Files::               Those pesky startup files---@file{.newsrc}.
453 * Auto Save::                   Recovering from a crash.
454 * The Active File::             Reading the active file over a slow line Takes Time.
455 * Startup Variables::           Other variables you might change.
456
457 New Groups
458
459 * Checking New Groups::         Determining what groups are new.
460 * Subscription Methods::        What Gnus should do with new groups.
461 * Filtering New Groups::        Making Gnus ignore certain new groups.
462
463 Group Buffer
464
465 * Group Buffer Format::         Information listed and how you can change it.
466 * Group Maneuvering::           Commands for moving in the group buffer.
467 * Selecting a Group::           Actually reading news.
468 * Subscription Commands::       Unsubscribing, killing, subscribing.
469 * Group Data::                  Changing the info for a group.
470 * Group Levels::                Levels? What are those, then?
471 * Group Score::                 A mechanism for finding out what groups you like.
472 * Marking Groups::              You can mark groups for later processing.
473 * Foreign Groups::              Creating and editing groups.
474 * Group Parameters::            Each group may have different parameters set.
475 * Listing Groups::              Gnus can list various subsets of the groups.
476 * Sorting Groups::              Re-arrange the group order.
477 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
478 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
479 * Exiting Gnus::                Stop reading news and get some work done.
480 * Group Topics::                A folding group mode divided into topics.
481 * Misc Group Stuff::            Other stuff that you can to do.
482
483 Group Buffer Format
484
485 * Group Line Specification::    Deciding how the group buffer is to look.
486 * Group Modeline Specification::  The group buffer modeline.
487 * Group Highlighting::          Having nice colors in the group buffer.
488
489 Group Topics
490
491 * Topic Commands::              Interactive E-Z commands.
492 * Topic Variables::             How to customize the topics the Lisp Way.
493 * Topic Sorting::               Sorting each topic individually.
494 * Topic Topology::              A map of the world.
495 * Topic Parameters::            Parameters that apply to all groups in a topic.
496
497 Misc Group Stuff
498
499 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
500 * Group Information::           Information and help on groups and Gnus.
501 * Group Timestamp::             Making Gnus keep track of when you last read a group.
502 * File Commands::               Reading and writing the Gnus files.
503 * Sieve Commands::              Managing Sieve scripts.
504
505 Summary Buffer
506
507 * Summary Buffer Format::       Deciding how the summary buffer is to look.
508 * Summary Maneuvering::         Moving around the summary buffer.
509 * Choosing Articles::           Reading articles.
510 * Paging the Article::          Scrolling the current article.
511 * Reply Followup and Post::     Posting articles.
512 * Delayed Articles::            Send articles at a later time.
513 * Marking Articles::            Marking articles as read, expirable, etc.
514 * Limiting::                    You can limit the summary buffer.
515 * Threading::                   How threads are made.
516 * Sorting the Summary Buffer::  How articles and threads are sorted.
517 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
518 * Article Caching::             You may store articles in a cache.
519 * Persistent Articles::         Making articles expiry-resistant.
520 * Article Backlog::             Having already read articles hang around.
521 * Saving Articles::             Ways of customizing article saving.
522 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
523 * Article Treatment::           The article buffer can be mangled at will.
524 * MIME Commands::               Doing MIMEy things with the articles.
525 * Charsets::                    Character set issues.
526 * Article Commands::            Doing various things with the article buffer.
527 * Summary Sorting::             Sorting the summary buffer in various ways.
528 * Finding the Parent::          No child support? Get the parent.
529 * Alternative Approaches::      Reading using non-default summaries.
530 * Tree Display::                A more visual display of threads.
531 * Mail Group Commands::         Some commands can only be used in mail groups.
532 * Various Summary Stuff::       What didn't fit anywhere else.
533 * Exiting the Summary Buffer::  Returning to the Group buffer,
534                                 or reselecting the current group.
535 * Crosspost Handling::          How crossposted articles are dealt with.
536 * Duplicate Suppression::       An alternative when crosspost handling fails.
537 * Security::                    Decrypt and Verify.
538 * Mailing List::                Mailing list minor mode.
539
540 Summary Buffer Format
541
542 * Summary Buffer Lines::        You can specify how summary lines should look.
543 * To From Newsgroups::          How to not display your own name.
544 * Summary Buffer Mode Line::    You can say how the mode line should look.
545 * Summary Highlighting::        Making the summary buffer all pretty and nice.
546
547 Choosing Articles
548
549 * Choosing Commands::           Commands for choosing articles.
550 * Choosing Variables::          Variables that influence these commands.
551
552 Reply, Followup and Post
553
554 * Summary Mail Commands::       Sending mail.
555 * Summary Post Commands::       Sending news.
556 * Summary Message Commands::    Other Message-related commands.
557 * Canceling and Superseding::   
558
559 Marking Articles
560
561 * Unread Articles::             Marks for unread articles.
562 * Read Articles::               Marks for read articles.
563 * Other Marks::                 Marks that do not affect readedness.
564 * Setting Marks::               
565 * Generic Marking Commands::    
566 * Setting Process Marks::       
567
568 Marking Articles
569
570 * Setting Marks::             How to set and remove marks.
571 * Generic Marking Commands::  How to customize the marking.
572 * Setting Process Marks::     How to mark articles for later processing.
573
574 Threading
575
576 * Customizing Threading::       Variables you can change to affect the threading.
577 * Thread Commands::             Thread based commands in the summary buffer.
578
579 Customizing Threading
580
581 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
582 * Filling In Threads::          Making the threads displayed look fuller.
583 * More Threading::              Even more variables for fiddling with threads.
584 * Low-Level Threading::         You thought it was over... but you were wrong!
585
586 Decoding Articles
587
588 * Uuencoded Articles::          Uudecode articles.
589 * Shell Archives::              Unshar articles.
590 * PostScript Files::            Split PostScript.
591 * Other Files::                 Plain save and binhex.
592 * Decoding Variables::          Variables for a happy decoding.
593 * Viewing Files::               You want to look at the result of the decoding?
594
595 Decoding Variables
596
597 * Rule Variables::              Variables that say how a file is to be viewed.
598 * Other Decode Variables::      Other decode variables.
599 * Uuencoding and Posting::      Variables for customizing uuencoding.
600
601 Article Treatment
602
603 * Article Highlighting::        You want to make the article look like fruit salad.
604 * Article Fontisizing::         Making emphasized text look nice.
605 * Article Hiding::              You also want to make certain info go away.
606 * Article Washing::             Lots of way-neat functions to make life better.
607 * Article Header::              Doing various header transformations.
608 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
609 * Article Date::                Grumble, UT!
610 * Article Display::             Display various stuff---X-Face, Picons, Smileys
611 * Article Signature::           What is a signature?
612 * Article Miscellania::         Various other stuff.
613
614 Alternative Approaches
615
616 * Pick and Read::               First mark articles and then read them.
617 * Binary Groups::               Auto-decode all articles.
618
619 Various Summary Stuff
620
621 * Summary Group Information::   Information oriented commands.
622 * Searching for Articles::      Multiple article commands.
623 * Summary Generation Commands::  
624 * Really Various Summary Commands::  Those pesky non-conformant commands.
625
626 Article Buffer
627
628 * Hiding Headers::              Deciding what headers should be displayed.
629 * Using MIME::                  Pushing articles through @sc{mime} before reading them.
630 * Customizing Articles::        Tailoring the look of the articles.
631 * Article Keymap::              Keystrokes available in the article buffer.
632 * Misc Article::                Other stuff.
633
634 Composing Messages
635
636 * Mail::                        Mailing and replying.
637 * Posting Server::              What server should you post and mail via?
638 * Mail and Post::               Mailing and posting at the same time.
639 * Archived Messages::           Where Gnus stores the messages you've sent.
640 * Posting Styles::              An easier way to specify who you are.
641 * Drafts::                      Postponing messages and rejected messages.
642 * Rejected Articles::           What happens if the server doesn't like your article?
643 * Signing and encrypting::      How to compose secure messages.
644
645 Select Methods
646
647 * Server Buffer::               Making and editing virtual servers.
648 * Getting News::                Reading USENET news with Gnus.
649 * Getting Mail::                Reading your personal mail with Gnus.
650 * Browsing the Web::            Getting messages from a plethora of Web sources.
651 * IMAP::                        Using Gnus as a @sc{imap} client.
652 * Other Sources::               Reading directories, files, SOUP packets.
653 * Combined Groups::             Combining groups into one group.
654 * Gnus Unplugged::              Reading news and mail offline.
655
656 Server Buffer
657
658 * Server Buffer Format::        You can customize the look of this buffer.
659 * Server Commands::             Commands to manipulate servers.
660 * Example Methods::             Examples server specifications.
661 * Creating a Virtual Server::   An example session.
662 * Server Variables::            Which variables to set.
663 * Servers and Methods::         You can use server names as select methods.
664 * Unavailable Servers::         Some servers you try to contact may be down.
665
666 Getting News
667
668 * NNTP::                        Reading news from an @sc{nntp} server.
669 * News Spool::                  Reading news from the local spool.
670
671 @sc{nntp}
672
673 * Direct Functions::            Connecting directly to the server.
674 * Indirect Functions::          Connecting indirectly to the server.
675 * Common Variables::            Understood by several connection functions.
676
677 Getting Mail
678
679 * Mail in a Newsreader::        Important introductory notes.
680 * Getting Started Reading Mail::  A simple cookbook example.
681 * Splitting Mail::              How to create mail groups.
682 * Mail Sources::                How to tell Gnus where to get mail from.
683 * Mail Back End Variables::     Variables for customizing mail handling.
684 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
685 * Group Mail Splitting::        Use group customize to drive mail splitting.
686 * Incorporating Old Mail::      What about the old mail you have?
687 * Expiring Mail::               Getting rid of unwanted mail.
688 * Washing Mail::                Removing gruft from the mail you get.
689 * Duplicates::                  Dealing with duplicated mail.
690 * Not Reading Mail::            Using mail back ends for reading other files.
691 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
692
693 Mail Sources
694
695 * Mail Source Specifiers::      How to specify what a mail source is.
696 * Mail Source Customization::   Some variables that influence things.
697 * Fetching Mail::               Using the mail source specifiers.
698
699 Choosing a Mail Back End
700
701 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
702 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
703 * Mail Spool::                  Store your mail in a private spool?
704 * MH Spool::                    An mhspool-like back end.
705 * Mail Folders::                Having one file for each group.
706 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
707
708 Browsing the Web
709
710 * Archiving Mail::              
711 * Web Searches::                Creating groups from articles that match a string.
712 * Slashdot::                    Reading the Slashdot comments.
713 * Ultimate::                    The Ultimate Bulletin Board systems.
714 * Web Archive::                 Reading mailing list archived on web.
715 * RSS::                         Reading RDF site summary.
716 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
717
718 @sc{imap}
719
720 * Splitting in IMAP::           Splitting mail with nnimap.
721 * Expiring in IMAP::            Expiring mail with nnimap.
722 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
723 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
724 * A note on namespaces::        How to (not) use IMAP namespace in Gnus.
725
726 Other Sources
727
728 * Directory Groups::            You can read a directory as if it was a newsgroup.
729 * Anything Groups::             Dired?  Who needs dired?
730 * Document Groups::             Single files can be the basis of a group.
731 * SOUP::                        Reading @sc{soup} packets ``offline''.
732 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
733
734 Document Groups
735
736 * Document Server Internals::   How to add your own document types.
737
738 SOUP
739
740 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
741 * SOUP Groups::                 A back end for reading @sc{soup} packets.
742 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
743
744 Combined Groups
745
746 * Virtual Groups::              Combining articles from many groups.
747 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
748
749 Gnus Unplugged
750
751 * Agent Basics::                How it all is supposed to work.
752 * Agent Categories::            How to tell the Gnus Agent what to download.
753 * Agent Commands::              New commands for all the buffers.
754 * Agent as Cache::              The Agent is a big cache too.
755 * Agent Expiry::                How to make old articles go away.
756 * Agent Regeneration::          How to recover from lost connections and other accidents.
757 * Agent and IMAP::              How to use the Agent with IMAP.
758 * Outgoing Messages::           What happens when you post/mail something?
759 * Agent Variables::             Customizing is fun.
760 * Example Setup::               An example @file{.gnus.el} file for offline people.
761 * Batching Agents::             How to fetch news from a @code{cron} job.
762 * Agent Caveats::               What you think it'll do and what it does.
763
764 Agent Categories
765
766 * Category Syntax::             What a category looks like.
767 * Category Buffer::             A buffer for maintaining categories.
768 * Category Variables::          Customize'r'Us.
769
770 Agent Commands
771
772 * Group Agent Commands::        Configure groups and fetch their contents.
773 * Summary Agent Commands::      Manually select then fetch specific articles.
774 * Server Agent Commands::       Select the servers that are supported by the agent.
775
776 Scoring
777
778 * Summary Score Commands::      Adding score entries for the current group.
779 * Group Score Commands::        General score commands.
780 * Score Variables::             Customize your scoring.  (My, what terminology).
781 * Score File Format::           What a score file may contain.
782 * Score File Editing::          You can edit score files by hand as well.
783 * Adaptive Scoring::            Big Sister Gnus knows what you read.
784 * Home Score File::             How to say where new score entries are to go.
785 * Followups To Yourself::       Having Gnus notice when people answer you.
786 * Scoring On Other Headers::    Scoring on non-standard headers.
787 * Scoring Tips::                How to score effectively.
788 * Reverse Scoring::             That problem child of old is not problem.
789 * Global Score Files::          Earth-spanning, ear-splitting score files.
790 * Kill Files::                  They are still here, but they can be ignored.
791 * Converting Kill Files::       Translating kill files to score files.
792 * GroupLens::                   Getting predictions on what you like to read.
793 * Advanced Scoring::            Using logical expressions to build score rules.
794 * Score Decays::                It can be useful to let scores wither away.
795
796 GroupLens
797
798 * Using GroupLens::             How to make Gnus use GroupLens.
799 * Rating Articles::             Letting GroupLens know how you rate articles.
800 * Displaying Predictions::      Displaying predictions given by GroupLens.
801 * GroupLens Variables::         Customizing GroupLens.
802
803 Advanced Scoring
804
805 * Advanced Scoring Syntax::     A definition.
806 * Advanced Scoring Examples::   What they look like.
807 * Advanced Scoring Tips::       Getting the most out of it.
808
809 Various
810
811 * Process/Prefix::              A convention used by many treatment commands.
812 * Interactive::                 Making Gnus ask you many questions.
813 * Symbolic Prefixes::           How to supply some Gnus functions with options.
814 * Formatting Variables::        You can specify what buffers should look like.
815 * Window Layout::               Configuring the Gnus buffer windows.
816 * Faces and Fonts::             How to change how faces look.
817 * Compilation::                 How to speed Gnus up.
818 * Mode Lines::                  Displaying information in the mode lines.
819 * Highlighting and Menus::      Making buffers look all nice and cozy.
820 * Buttons::                     Get tendinitis in ten easy steps!
821 * Daemons::                     Gnus can do things behind your back.
822 * NoCeM::                       How to avoid spam and other fatty foods.
823 * Undo::                        Some actions can be undone.
824 * Predicate Specifiers::        Specifying predicates.
825 * Moderation::                  What to do if you're a moderator.
826 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
827 * Fuzzy Matching::              What's the big fuzz?
828 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
829 * Various Various::             Things that are really various.
830
831 Formatting Variables
832
833 * Formatting Basics::           A formatting variable is basically a format string.
834 * Mode Line Formatting::        Some rules about mode line formatting variables.
835 * Advanced Formatting::         Modifying output in various ways.
836 * User-Defined Specs::          Having Gnus call your own functions.
837 * Formatting Fonts::            Making the formatting look colorful and nice.
838 * Positioning Point::           Moving point to a position after an operation.
839 * Tabulation::                  Tabulating your output.
840 * Wide Characters::             Dealing with wide characters.
841
842 Image Enhancements
843
844 * Picons::                      How to display pictures of what you're reading.
845 * Smileys::                     Show all those happy faces the way they were meant to be shown.
846 * X-Face::                      Display a funky, teensy black-and-white image.
847 * Toolbar::                     Click'n'drool.
848 * XVarious::                    Other XEmacsy Gnusey variables.
849
850 Picons
851
852 * Picon Basics::                What are picons and How do I get them.
853 * Picon Requirements::          Don't go further if you aren't using XEmacs.
854 * Easy Picons::                 Displaying Picons---the easy way.
855 * Hard Picons::                 The way you should do it.  You'll learn something.
856 * Picon Useless Configuration::  Other variables you can trash/tweak/munge/play with.
857
858 Thwarting Email Spam
859
860 * The problem of spam::         Some background, and some solutions
861 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
862 * SpamAssassin::                How to use external anti-spam tools.
863 * Hashcash::                    Reduce spam by burning CPU time.
864 * Filtering Spam Using The Spam ELisp Package::  
865 * Filtering Spam Using Statistics with spam-stat::  
866
867 Appendices
868
869 * XEmacs::                      Requirements for installing under XEmacs.
870 * History::                     How Gnus got where it is today.
871 * On Writing Manuals::          Why this is not a beginner's guide.
872 * Terminology::                 We use really difficult, like, words here.
873 * Customization::               Tailoring Gnus to your needs.
874 * Troubleshooting::             What you might try if things do not work.
875 * Gnus Reference Guide::        Rilly, rilly technical stuff.
876 * Emacs for Heathens::          A short introduction to Emacsian terms.
877 * Frequently Asked Questions::
878
879 History
880
881 * Gnus Versions::               What Gnus versions have been released.
882 * Other Gnus Versions::         Other Gnus versions that also have been released.
883 * Why?::                        What's the point of Gnus?
884 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
885 * Conformity::                  Gnus tries to conform to all standards.
886 * Emacsen::                     Gnus can be run on a few modern Emacsen.
887 * Gnus Development::            How Gnus is developed.
888 * Contributors::                Oodles of people.
889 * New Features::                Pointers to some of the new stuff in Gnus.
890
891 New Features
892
893 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
894 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
895 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
896 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
897 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
898
899 Customization
900
901 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
902 * Slow Terminal Connection::    You run a remote Emacs.
903 * Little Disk Space::           You feel that having large setup files is icky.
904 * Slow Machine::                You feel like buying a faster machine.
905
906 Gnus Reference Guide
907
908 * Gnus Utility Functions::      Common functions and variable to use.
909 * Back End Interface::          How Gnus communicates with the servers.
910 * Score File Syntax::           A BNF definition of the score file standard.
911 * Headers::                     How Gnus stores headers internally.
912 * Ranges::                      A handy format for storing mucho numbers.
913 * Group Info::                  The group info format.
914 * Extended Interactive::        Symbolic prefixes and stuff.
915 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
916 * Various File Formats::        Formats of files that Gnus use.
917
918 Back End Interface
919
920 * Required Back End Functions::  Functions that must be implemented.
921 * Optional Back End Functions::  Functions that need not be implemented.
922 * Error Messaging::             How to get messages and report errors.
923 * Writing New Back Ends::       Extending old back ends.
924 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
925 * Mail-like Back Ends::         Some tips on mail back ends.
926
927 Various File Formats
928
929 * Active File Format::          Information on articles and groups available.
930 * Newsgroups File Format::      Group descriptions.
931
932 Emacs for Heathens
933
934 * Keystrokes::                  Entering text and executing commands.
935 * Emacs Lisp::                  The built-in Emacs programming language.
936
937 @end detailmenu
938 @end menu
939
940 @node Starting Up
941 @chapter Starting Gnus
942 @cindex starting up
943
944 @kindex M-x gnus
945 @findex gnus
946 If your system administrator has set things up properly, starting Gnus
947 and reading news is extremely easy---you just type @kbd{M-x gnus} in
948 your Emacs.
949
950 @findex gnus-other-frame
951 @kindex M-x gnus-other-frame
952 If you want to start Gnus in a different frame, you can use the command
953 @kbd{M-x gnus-other-frame} instead.
954
955 If things do not go smoothly at startup, you have to twiddle some
956 variables in your @file{~/.gnus} file.  This file is similar to
957 @file{~/.emacs}, but is read when gnus starts.
958
959 If you puzzle at any terms used in this manual, please refer to the
960 terminology section (@pxref{Terminology}).
961
962 @menu
963 * Finding the News::            Choosing a method for getting news.
964 * The First Time::              What does Gnus do the first time you start it?
965 * The Server is Down::          How can I read my mail then?
966 * Slave Gnusae::                You can have more than one Gnus active at a time.
967 * Fetching a Group::            Starting Gnus just to read a group.
968 * New Groups::                  What is Gnus supposed to do with new groups?
969 * Changing Servers::            You may want to move from one server to another.
970 * Startup Files::               Those pesky startup files---@file{.newsrc}.
971 * Auto Save::                   Recovering from a crash.
972 * The Active File::             Reading the active file over a slow line Takes Time.
973 * Startup Variables::           Other variables you might change.
974 @end menu
975
976
977 @node Finding the News
978 @section Finding the News
979 @cindex finding news
980
981 @vindex gnus-select-method
982 @c @head
983 The @code{gnus-select-method} variable says where Gnus should look for
984 news.  This variable should be a list where the first element says
985 @dfn{how} and the second element says @dfn{where}.  This method is your
986 native method.  All groups not fetched with this method are
987 foreign groups.
988
989 For instance, if the @samp{news.somewhere.edu} @sc{nntp} server is where
990 you want to get your daily dosage of news from, you'd say:
991
992 @lisp
993 (setq gnus-select-method '(nntp "news.somewhere.edu"))
994 @end lisp
995
996 If you want to read directly from the local spool, say:
997
998 @lisp
999 (setq gnus-select-method '(nnspool ""))
1000 @end lisp
1001
1002 If you can use a local spool, you probably should, as it will almost
1003 certainly be much faster.  But do not use the local spool if your
1004 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1005
1006 @vindex gnus-nntpserver-file
1007 @cindex NNTPSERVER
1008 @cindex @sc{nntp} server
1009 If this variable is not set, Gnus will take a look at the
1010 @code{NNTPSERVER} environment variable.  If that variable isn't set,
1011 Gnus will see whether @code{gnus-nntpserver-file}
1012 (@file{/etc/nntpserver} by default) has any opinions on the matter.  If
1013 that fails as well, Gnus will try to use the machine running Emacs as an @sc{nntp} server.  That's a long shot, though.
1014
1015 @vindex gnus-nntp-server
1016 If @code{gnus-nntp-server} is set, this variable will override
1017 @code{gnus-select-method}.  You should therefore set
1018 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1019
1020 @vindex gnus-secondary-servers
1021 @vindex gnus-nntp-server
1022 You can also make Gnus prompt you interactively for the name of an
1023 @sc{nntp} server.  If you give a non-numerical prefix to @code{gnus}
1024 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1025 in the @code{gnus-secondary-servers} list (if any).  You can also just
1026 type in the name of any server you feel like visiting.  (Note that this
1027 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1028 gnus} later in the same Emacs session, Gnus will contact the same
1029 server.)
1030
1031 @findex gnus-group-browse-foreign-server
1032 @kindex B (Group)
1033 However, if you use one @sc{nntp} server regularly and are just
1034 interested in a couple of groups from a different server, you would be
1035 better served by using the @kbd{B} command in the group buffer.  It will
1036 let you have a look at what groups are available, and you can subscribe
1037 to any of the groups you want to.  This also makes @file{.newsrc}
1038 maintenance much tidier.  @xref{Foreign Groups}.
1039
1040 @vindex gnus-secondary-select-methods
1041 @c @head
1042 A slightly different approach to foreign groups is to set the
1043 @code{gnus-secondary-select-methods} variable.  The select methods
1044 listed in this variable are in many ways just as native as the
1045 @code{gnus-select-method} server.  They will also be queried for active
1046 files during startup (if that's required), and new newsgroups that
1047 appear on these servers will be subscribed (or not) just as native
1048 groups are.
1049
1050 For instance, if you use the @code{nnmbox} back end to read your mail,
1051 you would typically set this variable to
1052
1053 @lisp
1054 (setq gnus-secondary-select-methods '((nnmbox "")))
1055 @end lisp
1056
1057
1058 @node The First Time
1059 @section The First Time
1060 @cindex first time usage
1061
1062 If no startup files exist, Gnus will try to determine what groups should
1063 be subscribed by default.
1064
1065 @vindex gnus-default-subscribed-newsgroups
1066 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1067 will subscribe you to just those groups in that list, leaving the rest
1068 killed.  Your system administrator should have set this variable to
1069 something useful.
1070
1071 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1072 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1073 here as @dfn{whatever Lars thinks you should read}.)
1074
1075 You'll also be subscribed to the Gnus documentation group, which should
1076 help you with most common problems.
1077
1078 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1079 use the normal functions for handling new groups, and not do anything
1080 special.
1081
1082
1083 @node The Server is Down
1084 @section The Server is Down
1085 @cindex server errors
1086
1087 If the default server is down, Gnus will understandably have some
1088 problems starting.  However, if you have some mail groups in addition to
1089 the news groups, you may want to start Gnus anyway.
1090
1091 Gnus, being the trusting sort of program, will ask whether to proceed
1092 without a native select method if that server can't be contacted.  This
1093 will happen whether the server doesn't actually exist (i.e., you have
1094 given the wrong address) or the server has just momentarily taken ill
1095 for some reason or other.  If you decide to continue and have no foreign
1096 groups, you'll find it difficult to actually do anything in the group
1097 buffer.  But, hey, that's your problem.  Blllrph!
1098
1099 @findex gnus-no-server
1100 @kindex M-x gnus-no-server
1101 @c @head
1102 If you know that the server is definitely down, or you just want to read
1103 your mail without bothering with the server at all, you can use the
1104 @code{gnus-no-server} command to start Gnus.  That might come in handy
1105 if you're in a hurry as well.  This command will not attempt to contact
1106 your primary server---instead, it will just activate all groups on level
1107 1 and 2.  (You should preferably keep no native groups on those two
1108 levels.) Also @pxref{Group Levels}.
1109
1110
1111 @node Slave Gnusae
1112 @section Slave Gnusae
1113 @cindex slave
1114
1115 You might want to run more than one Emacs with more than one Gnus at the
1116 same time.  If you are using different @file{.newsrc} files (e.g., if you
1117 are using the two different Gnusae to read from two different servers),
1118 that is no problem whatsoever.  You just do it.
1119
1120 The problem appears when you want to run two Gnusae that use the same
1121 @code{.newsrc} file.
1122
1123 To work around that problem some, we here at the Think-Tank at the Gnus
1124 Towers have come up with a new concept: @dfn{Masters} and
1125 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1126 taken out a copyright on those words.  If you wish to use those words in
1127 conjunction with each other, you have to send $1 per usage instance to
1128 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1129 Applications}) will be much more expensive, of course.)
1130
1131 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1132 however you do it).  Each subsequent slave Gnusae should be started with
1133 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1134 files, but instead save @dfn{slave files} that contain information only
1135 on what groups have been read in the slave session.  When a master Gnus
1136 starts, it will read (and delete) these slave files, incorporating all
1137 information from them.  (The slave files will be read in the sequence
1138 they were created, so the latest changes will have precedence.)
1139
1140 Information from the slave files has, of course, precedence over the
1141 information in the normal (i.e., master) @code{.newsrc} file.
1142
1143 If the @code{.newsrc*} files have not been saved in the master when the
1144 slave starts, you may be prompted as to whether to read an auto-save
1145 file.  If you answer "yes", the unsaved changes to the master will be
1146 incorporated into the slave.  If you answer "no", the slave may see some
1147 messages as unread that have been read in the master.
1148
1149 @node Fetching a Group
1150 @section Fetching a Group
1151 @cindex fetching a group
1152
1153 @findex gnus-fetch-group
1154 It is sometimes convenient to be able to just say ``I want to read this
1155 group and I don't care whether Gnus has been started or not''.  This is
1156 perhaps more useful for people who write code than for users, but the
1157 command @code{gnus-fetch-group} provides this functionality in any case.
1158 It takes the group name as a parameter.
1159
1160
1161 @node New Groups
1162 @section New Groups
1163 @cindex new groups
1164 @cindex subscription
1165
1166 @vindex gnus-check-new-newsgroups
1167 If you are satisfied that you really never want to see any new groups,
1168 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1169 also save you some time at startup.  Even if this variable is
1170 @code{nil}, you can always subscribe to the new groups just by pressing
1171 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1172 is @code{ask-server} by default.  If you set this variable to
1173 @code{always}, then Gnus will query the back ends for new groups even
1174 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1175
1176 @menu
1177 * Checking New Groups::         Determining what groups are new.
1178 * Subscription Methods::        What Gnus should do with new groups.
1179 * Filtering New Groups::        Making Gnus ignore certain new groups.
1180 @end menu
1181
1182
1183 @node Checking New Groups
1184 @subsection Checking New Groups
1185
1186 Gnus normally determines whether a group is new or not by comparing the
1187 list of groups from the active file(s) with the lists of subscribed and
1188 dead groups.  This isn't a particularly fast method.  If
1189 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1190 server for new groups since the last time.  This is both faster and
1191 cheaper.  This also means that you can get rid of the list of killed
1192 groups altogether, so you may set @code{gnus-save-killed-list} to
1193 @code{nil}, which will save time both at startup, at exit, and all over.
1194 Saves disk space, too.  Why isn't this the default, then?
1195 Unfortunately, not all servers support this command.
1196
1197 I bet I know what you're thinking now: How do I find out whether my
1198 server supports @code{ask-server}?  No?  Good, because I don't have a
1199 fail-safe answer.  I would suggest just setting this variable to
1200 @code{ask-server} and see whether any new groups appear within the next
1201 few days.  If any do, then it works.  If none do, then it doesn't
1202 work.  I could write a function to make Gnus guess whether the server
1203 supports @code{ask-server}, but it would just be a guess.  So I won't.
1204 You could @code{telnet} to the server and say @code{HELP} and see
1205 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1206 it does, then it might work.  (But there are servers that lists
1207 @samp{NEWGROUPS} without supporting the function properly.)
1208
1209 This variable can also be a list of select methods.  If so, Gnus will
1210 issue an @code{ask-server} command to each of the select methods, and
1211 subscribe them (or not) using the normal methods.  This might be handy
1212 if you are monitoring a few servers for new groups.  A side effect is
1213 that startup will take much longer, so you can meditate while waiting.
1214 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1215
1216
1217 @node Subscription Methods
1218 @subsection Subscription Methods
1219
1220 @vindex gnus-subscribe-newsgroup-method
1221 What Gnus does when it encounters a new group is determined by the
1222 @code{gnus-subscribe-newsgroup-method} variable.
1223
1224 This variable should contain a function.  This function will be called
1225 with the name of the new group as the only parameter.
1226
1227 Some handy pre-fab functions are:
1228
1229 @table @code
1230
1231 @item gnus-subscribe-zombies
1232 @vindex gnus-subscribe-zombies
1233 Make all new groups zombies.  This is the default.  You can browse the
1234 zombies later (with @kbd{A z}) and either kill them all off properly
1235 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1236
1237 @item gnus-subscribe-randomly
1238 @vindex gnus-subscribe-randomly
1239 Subscribe all new groups in arbitrary order.  This really means that all
1240 new groups will be added at ``the top'' of the group buffer.
1241
1242 @item gnus-subscribe-alphabetically
1243 @vindex gnus-subscribe-alphabetically
1244 Subscribe all new groups in alphabetical order.
1245
1246 @item gnus-subscribe-hierarchically
1247 @vindex gnus-subscribe-hierarchically
1248 Subscribe all new groups hierarchically.  The difference between this
1249 function and @code{gnus-subscribe-alphabetically} is slight.
1250 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1251 alphabetical fashion, while this function will enter groups into its
1252 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1253 @samp{comp} hierarchy, this function will not mess that configuration
1254 up.  Or something like that.
1255
1256 @item gnus-subscribe-interactively
1257 @vindex gnus-subscribe-interactively
1258 Subscribe new groups interactively.  This means that Gnus will ask
1259 you about @strong{all} new groups.  The groups you choose to subscribe
1260 to will be subscribed hierarchically.
1261
1262 @item gnus-subscribe-killed
1263 @vindex gnus-subscribe-killed
1264 Kill all new groups.
1265
1266 @item gnus-subscribe-topics
1267 @vindex gnus-subscribe-topics
1268 Put the groups into the topic that has a matching @code{subscribe} topic
1269 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1270 topic parameter that looks like
1271
1272 @example
1273 "nnslashdot"
1274 @end example
1275
1276 will mean that all groups that match that regex will be subscribed under
1277 that topic.
1278
1279 If no topics match the groups, the groups will be subscribed in the
1280 top-level topic.
1281
1282 @end table
1283
1284 @vindex gnus-subscribe-hierarchical-interactive
1285 A closely related variable is
1286 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1287 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1288 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1289 will ask you for each sub-hierarchy whether you want to descend the
1290 hierarchy or not.
1291
1292 One common mistake is to set the variable a few paragraphs above
1293 (@code{gnus-subscribe-newsgroup-method}) to
1294 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1295 will not work.  This is ga-ga.  So don't do it.
1296
1297
1298 @node Filtering New Groups
1299 @subsection Filtering New Groups
1300
1301 A nice and portable way to control which new newsgroups should be
1302 subscribed (or ignored) is to put an @dfn{options} line at the start of
1303 the @file{.newsrc} file.  Here's an example:
1304
1305 @example
1306 options -n !alt.all !rec.all sci.all
1307 @end example
1308
1309 @vindex gnus-subscribe-options-newsgroup-method
1310 This line obviously belongs to a serious-minded intellectual scientific
1311 person (or she may just be plain old boring), because it says that all
1312 groups that have names beginning with @samp{alt} and @samp{rec} should
1313 be ignored, and all groups with names beginning with @samp{sci} should
1314 be subscribed.  Gnus will not use the normal subscription method for
1315 subscribing these groups.
1316 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1317 variable defaults to @code{gnus-subscribe-alphabetically}.
1318
1319 @vindex gnus-options-not-subscribe
1320 @vindex gnus-options-subscribe
1321 If you don't want to mess with your @file{.newsrc} file, you can just
1322 set the two variables @code{gnus-options-subscribe} and
1323 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1324 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1325 and if the new group matches the former, it will be unconditionally
1326 subscribed, and if it matches the latter, it will be ignored.
1327
1328 @vindex gnus-auto-subscribed-groups
1329 Yet another variable that meddles here is
1330 @code{gnus-auto-subscribed-groups}.  It works exactly like
1331 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1332 thought it would be nice to have two of these.  This variable is more
1333 meant for setting some ground rules, while the other variable is used
1334 more for user fiddling.  By default this variable makes all new groups
1335 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1336 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1337 subscribed.  If you don't like that, just set this variable to
1338 @code{nil}.
1339
1340 New groups that match this regexp are subscribed using
1341 @code{gnus-subscribe-options-newsgroup-method}.
1342
1343
1344 @node Changing Servers
1345 @section Changing Servers
1346 @cindex changing servers
1347
1348 Sometimes it is necessary to move from one @sc{nntp} server to another.
1349 This happens very rarely, but perhaps you change jobs, or one server is
1350 very flaky and you want to use another.
1351
1352 Changing the server is pretty easy, right?  You just change
1353 @code{gnus-select-method} to point to the new server?
1354
1355 @emph{Wrong!}
1356
1357 Article numbers are not (in any way) kept synchronized between different
1358 @sc{nntp} servers, and the only way Gnus keeps track of what articles
1359 you have read is by keeping track of article numbers.  So when you
1360 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1361 worthless.
1362
1363 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1364 file from one server to another.  They all have one thing in
1365 common---they take a looong time to run.  You don't want to use these
1366 functions more than absolutely necessary.
1367
1368 @kindex M-x gnus-change-server
1369 @findex gnus-change-server
1370 If you have access to both servers, Gnus can request the headers for all
1371 the articles you have read and compare @code{Message-ID}s and map the
1372 article numbers of the read articles and article marks.  The @kbd{M-x
1373 gnus-change-server} command will do this for all your native groups.  It
1374 will prompt for the method you want to move to.
1375
1376 @kindex M-x gnus-group-move-group-to-server
1377 @findex gnus-group-move-group-to-server
1378 You can also move individual groups with the @kbd{M-x
1379 gnus-group-move-group-to-server} command.  This is useful if you want to
1380 move a (foreign) group from one server to another.
1381
1382 @kindex M-x gnus-group-clear-data-on-native-groups
1383 @findex gnus-group-clear-data-on-native-groups
1384 If you don't have access to both the old and new server, all your marks
1385 and read ranges have become worthless.  You can use the @kbd{M-x
1386 gnus-group-clear-data-on-native-groups} command to clear out all data
1387 that you have on your native groups.  Use with caution.
1388
1389 @kindex M-x gnus-group-clear-data
1390 @findex gnus-group-clear-data
1391 Clear the data from the current group only---nix out marks and the
1392 list of read articles (@code{gnus-group-clear-data}).
1393
1394 After changing servers, you @strong{must} move the cache hierarchy away,
1395 since the cached articles will have wrong article numbers, which will
1396 affect which articles Gnus thinks are read.
1397 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1398 to have it done automatically; for @code{gnus-group-clear-data}, you
1399 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1400 cache for all groups).
1401
1402
1403 @node Startup Files
1404 @section Startup Files
1405 @cindex startup files
1406 @cindex .newsrc
1407 @cindex .newsrc.el
1408 @cindex .newsrc.eld
1409
1410 Now, you all know about the @file{.newsrc} file.  All subscription
1411 information is traditionally stored in this file.
1412
1413 Things got a bit more complicated with @sc{gnus}.  In addition to
1414 keeping the @file{.newsrc} file updated, it also used a file called
1415 @file{.newsrc.el} for storing all the information that didn't fit into
1416 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1417 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1418 files was the most recently saved, which enabled people to swap between
1419 @sc{gnus} and other newsreaders.
1420
1421 That was kinda silly, so Gnus went one better: In addition to the
1422 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1423 @file{.newsrc.eld}.  It will read whichever of these files that are most
1424 recent, but it will never write a @file{.newsrc.el} file.  You should
1425 never delete the @file{.newsrc.eld} file---it contains much information
1426 not stored in the @file{.newsrc} file.
1427
1428 @vindex gnus-save-newsrc-file
1429 @vindex gnus-read-newsrc-file
1430 You can turn off writing the @file{.newsrc} file by setting
1431 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1432 the file and save some space, as well as exiting from Gnus faster.
1433 However, this will make it impossible to use other newsreaders than
1434 Gnus.  But hey, who would want to, right?  Similarly, setting
1435 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1436 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1437 convenient if you have a tendency to use Netscape once in a while.
1438
1439 @vindex gnus-save-killed-list
1440 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1441 will not save the list of killed groups to the startup file.  This will
1442 save both time (when starting and quitting) and space (on disk).  It
1443 will also mean that Gnus has no record of what groups are new or old,
1444 so the automatic new groups subscription methods become meaningless.
1445 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1446 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1447 Groups}).  This variable can also be a regular expression.  If that's
1448 the case, remove all groups that do not match this regexp before
1449 saving.  This can be useful in certain obscure situations that involve
1450 several servers where not all servers support @code{ask-server}.
1451
1452 @vindex gnus-startup-file
1453 The @code{gnus-startup-file} variable says where the startup files are.
1454 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1455 file being whatever that one is, with a @samp{.eld} appended.
1456
1457 @vindex gnus-save-newsrc-hook
1458 @vindex gnus-save-quick-newsrc-hook
1459 @vindex gnus-save-standard-newsrc-hook
1460 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1461 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1462 saving the @file{.newsrc.eld} file, and
1463 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1464 @file{.newsrc} file.  The latter two are commonly used to turn version
1465 control on or off.  Version control is on by default when saving the
1466 startup files.  If you want to turn backup creation off, say something like:
1467
1468 @lisp
1469 (defun turn-off-backup ()
1470   (set (make-local-variable 'backup-inhibited) t))
1471
1472 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1473 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1474 @end lisp
1475
1476 @vindex gnus-init-file
1477 @vindex gnus-site-init-file
1478 When Gnus starts, it will read the @code{gnus-site-init-file}
1479 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1480 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1481 and can be used to avoid cluttering your @file{~/.emacs} and
1482 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1483 with the same names as these, but with @file{.elc} and @file{.el}
1484 suffixes.  In other words, if you have set @code{gnus-init-file} to
1485 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1486 and finally @file{~/.gnus} (in this order).
1487
1488
1489
1490 @node Auto Save
1491 @section Auto Save
1492 @cindex dribble file
1493 @cindex auto-save
1494
1495 Whenever you do something that changes the Gnus data (reading articles,
1496 catching up, killing/subscribing groups), the change is added to a
1497 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1498 Emacs way.  If your Emacs should crash before you have saved the
1499 @file{.newsrc} files, all changes you have made can be recovered from
1500 this file.
1501
1502 If Gnus detects this file at startup, it will ask the user whether to
1503 read it.  The auto save file is deleted whenever the real startup file is
1504 saved.
1505
1506 @vindex gnus-use-dribble-file
1507 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1508 maintain a dribble buffer.  The default is @code{t}.
1509
1510 @vindex gnus-dribble-directory
1511 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1512 this variable is @code{nil}, which it is by default, Gnus will dribble
1513 into the directory where the @file{.newsrc} file is located.  (This is
1514 normally the user's home directory.)  The dribble file will get the same
1515 file permissions as the @code{.newsrc} file.
1516
1517 @vindex gnus-always-read-dribble-file
1518 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1519 read the dribble file on startup without querying the user.
1520
1521
1522 @node The Active File
1523 @section The Active File
1524 @cindex active file
1525 @cindex ignored groups
1526
1527 When Gnus starts, or indeed whenever it tries to determine whether new
1528 articles have arrived, it reads the active file.  This is a very large
1529 file that lists all the active groups and articles on the server.
1530
1531 @vindex gnus-ignored-newsgroups
1532 Before examining the active file, Gnus deletes all lines that match the
1533 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1534 any groups with bogus names, but you can use this variable to make Gnus
1535 ignore hierarchies you aren't ever interested in.  However, this is not
1536 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1537 Groups} for an overview of other variables that can be used instead.
1538
1539 @c This variable is
1540 @c @code{nil} by default, and will slow down active file handling somewhat
1541 @c if you set it to anything else.
1542
1543 @vindex gnus-read-active-file
1544 @c @head
1545 The active file can be rather Huge, so if you have a slow network, you
1546 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1547 reading the active file.  This variable is @code{some} by default.
1548
1549 Gnus will try to make do by getting information just on the groups that
1550 you actually subscribe to.
1551
1552 Note that if you subscribe to lots and lots of groups, setting this
1553 variable to @code{nil} will probably make Gnus slower, not faster.  At
1554 present, having this variable @code{nil} will slow Gnus down
1555 considerably, unless you read news over a 2400 baud modem.
1556
1557 This variable can also have the value @code{some}.  Gnus will then
1558 attempt to read active info only on the subscribed groups.  On some
1559 servers this is quite fast (on sparkling, brand new INN servers that
1560 support the @code{LIST ACTIVE group} command), on others this isn't fast
1561 at all.  In any case, @code{some} should be faster than @code{nil}, and
1562 is certainly faster than @code{t} over slow lines.
1563
1564 Some news servers (old versions of Leafnode and old versions of INN, for
1565 instance) do not support the @code{LIST ACTIVE group}.  For these
1566 servers, @code{nil} is probably the most efficient value for this
1567 variable.
1568
1569 If this variable is @code{nil}, Gnus will ask for group info in total
1570 lock-step, which isn't very fast.  If it is @code{some} and you use an
1571 @sc{nntp} server, Gnus will pump out commands as fast as it can, and
1572 read all the replies in one swoop.  This will normally result in better
1573 performance, but if the server does not support the aforementioned
1574 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1575
1576 If you think that starting up Gnus takes too long, try all the three
1577 different values for this variable and see what works best for you.
1578
1579 In any case, if you use @code{some} or @code{nil}, you should definitely
1580 kill all groups that you aren't interested in to speed things up.
1581
1582 Note that this variable also affects active file retrieval from
1583 secondary select methods.
1584
1585
1586 @node Startup Variables
1587 @section Startup Variables
1588
1589 @table @code
1590
1591 @item gnus-load-hook
1592 @vindex gnus-load-hook
1593 A hook run while Gnus is being loaded.  Note that this hook will
1594 normally be run just once in each Emacs session, no matter how many
1595 times you start Gnus.
1596
1597 @item gnus-before-startup-hook
1598 @vindex gnus-before-startup-hook
1599 A hook run after starting up Gnus successfully.
1600
1601 @item gnus-startup-hook
1602 @vindex gnus-startup-hook
1603 A hook run as the very last thing after starting up Gnus
1604
1605 @item gnus-started-hook
1606 @vindex gnus-started-hook
1607 A hook that is run as the very last thing after starting up Gnus
1608 successfully.
1609
1610 @item gnus-setup-news-hook
1611 @vindex gnus-setup-news-hook
1612 A hook that is run after reading the @file{.newsrc} file(s), but before
1613 generating the group buffer.
1614
1615 @item gnus-check-bogus-newsgroups
1616 @vindex gnus-check-bogus-newsgroups
1617 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1618 startup.  A @dfn{bogus group} is a group that you have in your
1619 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1620 bogus groups can take quite a while, so to save time and resources it's
1621 best to leave this option off, and do the checking for bogus groups once
1622 in a while from the group buffer instead (@pxref{Group Maintenance}).
1623
1624 @item gnus-inhibit-startup-message
1625 @vindex gnus-inhibit-startup-message
1626 If non-@code{nil}, the startup message won't be displayed.  That way,
1627 your boss might not notice as easily that you are reading news instead
1628 of doing your job.  Note that this variable is used before
1629 @file{.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1630
1631 @item gnus-no-groups-message
1632 @vindex gnus-no-groups-message
1633 Message displayed by Gnus when no groups are available.
1634
1635 @item gnus-play-startup-jingle
1636 @vindex gnus-play-startup-jingle
1637 If non-@code{nil}, play the Gnus jingle at startup.
1638
1639 @item gnus-startup-jingle
1640 @vindex gnus-startup-jingle
1641 Jingle to be played if the above variable is non-@code{nil}.  The
1642 default is @samp{Tuxedomoon.Jingle4.au}.
1643
1644 @end table
1645
1646
1647 @node Group Buffer
1648 @chapter Group Buffer
1649 @cindex group buffer
1650
1651 @c Alex Schroeder suggests to rearrange this as follows:
1652 @c
1653 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1654 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1655 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1656 @c   7. Group Score, 8. Group Buffer Format
1657 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1658 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1659 @c <kensanata> First, "Gnus considers groups... (default 9)."
1660 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1661 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1662 @c <kensanata> Then expand the next paragraph or add some more to it.
1663 @c    This short one sentence explains levels 1 and 2, therefore I understand
1664 @c    that I should keep important news at 3 and boring news at 4.
1665 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1666 @c    Maybe keep those that you don't want to read temporarily at 6,
1667 @c    those that you never want to read at 8, those that offend your
1668 @c    human rights at 9...
1669
1670
1671 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1672 is the first buffer shown when Gnus starts, and will never be killed as
1673 long as Gnus is active.
1674
1675 @iftex
1676 @iflatex
1677 \gnusfigure{The Group Buffer}{320}{
1678 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1679 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1680 \put(120,38){\vector(1,2){10}}
1681 \put(40,60){\makebox(0,0)[r]{Mode line}}
1682 \put(40,58){\vector(1,0){30}}
1683 \put(200,28){\makebox(0,0)[t]{Native select method}}
1684 \put(200,26){\vector(-1,2){15}}
1685 }
1686 @end iflatex
1687 @end iftex
1688
1689 @menu
1690 * Group Buffer Format::         Information listed and how you can change it.
1691 * Group Maneuvering::           Commands for moving in the group buffer.
1692 * Selecting a Group::           Actually reading news.
1693 * Subscription Commands::       Unsubscribing, killing, subscribing.
1694 * Group Data::                  Changing the info for a group.
1695 * Group Levels::                Levels? What are those, then?
1696 * Group Score::                 A mechanism for finding out what groups you like.
1697 * Marking Groups::              You can mark groups for later processing.
1698 * Foreign Groups::              Creating and editing groups.
1699 * Group Parameters::            Each group may have different parameters set.
1700 * Listing Groups::              Gnus can list various subsets of the groups.
1701 * Sorting Groups::              Re-arrange the group order.
1702 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1703 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1704 * Exiting Gnus::                Stop reading news and get some work done.
1705 * Group Topics::                A folding group mode divided into topics.
1706 * Misc Group Stuff::            Other stuff that you can to do.
1707 @end menu
1708
1709
1710 @node Group Buffer Format
1711 @section Group Buffer Format
1712
1713 @menu
1714 * Group Line Specification::    Deciding how the group buffer is to look.
1715 * Group Modeline Specification::  The group buffer modeline.
1716 * Group Highlighting::          Having nice colors in the group buffer.
1717 @end menu
1718
1719
1720 @node Group Line Specification
1721 @subsection Group Line Specification
1722 @cindex group buffer format
1723
1724 The default format of the group buffer is nice and dull, but you can
1725 make it as exciting and ugly as you feel like.
1726
1727 Here's a couple of example group lines:
1728
1729 @example
1730      25: news.announce.newusers
1731  *    0: alt.fan.andrea-dworkin
1732 @end example
1733
1734 Quite simple, huh?
1735
1736 You can see that there are 25 unread articles in
1737 @samp{news.announce.newusers}.  There are no unread articles, but some
1738 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1739 asterisk at the beginning of the line?).
1740
1741 @vindex gnus-group-line-format
1742 You can change that format to whatever you want by fiddling with the
1743 @code{gnus-group-line-format} variable.  This variable works along the
1744 lines of a @code{format} specification, which is pretty much the same as
1745 a @code{printf} specifications, for those of you who use (feh!) C.
1746 @xref{Formatting Variables}.
1747
1748 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1749
1750 There should always be a colon on the line; the cursor always moves to
1751 the colon after performing an operation.  @xref{Positioning
1752 Point}. Nothing else is required---not even the group name.  All
1753 displayed text is just window dressing, and is never examined by Gnus.
1754 Gnus stores all real information it needs using text properties.
1755
1756 (Note that if you make a really strange, wonderful, spreadsheet-like
1757 layout, everybody will believe you are hard at work with the accounting
1758 instead of wasting time reading news.)
1759
1760 Here's a list of all available format characters:
1761
1762 @table @samp
1763
1764 @item M
1765 An asterisk if the group only has marked articles.
1766
1767 @item S
1768 Whether the group is subscribed.
1769
1770 @item L
1771 Level of subscribedness.
1772
1773 @item N
1774 Number of unread articles.
1775
1776 @item I
1777 Number of dormant articles.
1778
1779 @item T
1780 Number of ticked articles.
1781
1782 @item R
1783 Number of read articles.
1784
1785 @item U
1786 Number of unseen articles.
1787
1788 @item t
1789 Estimated total number of articles.  (This is really @var{max-number}
1790 minus @var{min-number} plus 1.)
1791
1792 Gnus uses this estimation because the @sc{nntp} protocol provides
1793 efficient access to @var{max-number} and @var{min-number} but getting
1794 the true unread message count is not possible efficiently.  For
1795 hysterical raisins, even the mail back ends, where the true number of
1796 unread messages might be available efficiently, use the same limited
1797 interface.  To remove this restriction from Gnus means that the back
1798 end interface has to be changed, which is not an easy job.  If you
1799 want to work on this, please contact the Gnus mailing list.
1800
1801 @item y
1802 Number of unread, unticked, non-dormant articles.
1803
1804 @item i
1805 Number of ticked and dormant articles.
1806
1807 @item g
1808 Full group name.
1809
1810 @item G
1811 Group name.
1812
1813 @item C
1814 Group comment (@pxref{Group Parameters}) or group name if there is no
1815 comment element in the group parameters.
1816
1817 @item D
1818 Newsgroup description.
1819
1820 @item o
1821 @samp{m} if moderated.
1822
1823 @item O
1824 @samp{(m)} if moderated.
1825
1826 @item s
1827 Select method.
1828
1829 @item B
1830 If the summary buffer for the group is open or not.
1831
1832 @item n
1833 Select from where.
1834
1835 @item z
1836 A string that looks like @samp{<%s:%n>} if a foreign select method is
1837 used.
1838
1839 @item P
1840 Indentation based on the level of the topic (@pxref{Group Topics}).
1841
1842 @item c
1843 @vindex gnus-group-uncollapsed-levels
1844 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1845 variable says how many levels to leave at the end of the group name.
1846 The default is 1---this will mean that group names like
1847 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1848
1849 @item m
1850 @vindex gnus-new-mail-mark
1851 @cindex %
1852 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1853 the group lately.
1854
1855 @item p
1856 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1857
1858 @item d
1859 A string that says when you last read the group (@pxref{Group
1860 Timestamp}).
1861
1862 @item u
1863 User defined specifier.  The next character in the format string should
1864 be a letter.  Gnus will call the function
1865 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1866 following @samp{%u}.  The function will be passed a single dummy
1867 parameter as argument.  The function should return a string, which will
1868 be inserted into the buffer just like information from any other
1869 specifier.
1870 @end table
1871
1872 @cindex *
1873 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1874 if no info is available---for instance, if it is a non-activated foreign
1875 group, or a bogus native group.
1876
1877
1878 @node Group Modeline Specification
1879 @subsection Group Modeline Specification
1880 @cindex group modeline
1881
1882 @vindex gnus-group-mode-line-format
1883 The mode line can be changed by setting
1884 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1885 doesn't understand that many format specifiers:
1886
1887 @table @samp
1888 @item S
1889 The native news server.
1890 @item M
1891 The native select method.
1892 @end table
1893
1894
1895 @node Group Highlighting
1896 @subsection Group Highlighting
1897 @cindex highlighting
1898 @cindex group highlighting
1899
1900 @vindex gnus-group-highlight
1901 Highlighting in the group buffer is controlled by the
1902 @code{gnus-group-highlight} variable.  This is an alist with elements
1903 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1904 something non-@code{nil}, the @var{face} will be used on the line.
1905
1906 Here's an example value for this variable that might look nice if the
1907 background is dark:
1908
1909 @lisp
1910 (cond (window-system
1911        (setq custom-background-mode 'light)
1912        (defface my-group-face-1
1913          '((t (:foreground "Red" :bold t))) "First group face")
1914        (defface my-group-face-2
1915          '((t (:foreground "DarkSeaGreen4" :bold t))) "Second group face")
1916        (defface my-group-face-3
1917          '((t (:foreground "Green4" :bold t))) "Third group face")
1918        (defface my-group-face-4
1919          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1920        (defface my-group-face-5
1921          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1922
1923 (setq gnus-group-highlight
1924       '(((> unread 200) . my-group-face-1)
1925         ((and (< level 3) (zerop unread)) . my-group-face-2)
1926         ((< level 3) . my-group-face-3)
1927         ((zerop unread) . my-group-face-4)
1928         (t . my-group-face-5)))
1929 @end lisp
1930
1931 Also @pxref{Faces and Fonts}.
1932
1933 Variables that are dynamically bound when the forms are evaluated
1934 include:
1935
1936 @table @code
1937 @item group
1938 The group name.
1939 @item unread
1940 The number of unread articles in the group.
1941 @item method
1942 The select method.
1943 @item mailp
1944 Whether the group is a mail group.
1945 @item level
1946 The level of the group.
1947 @item score
1948 The score of the group.
1949 @item ticked
1950 The number of ticked articles in the group.
1951 @item total
1952 The total number of articles in the group.  Or rather, MAX-NUMBER minus
1953 MIN-NUMBER plus one.
1954 @item topic
1955 When using the topic minor mode, this variable is bound to the current
1956 topic being inserted.
1957 @end table
1958
1959 When the forms are @code{eval}ed, point is at the beginning of the line
1960 of the group in question, so you can use many of the normal Gnus
1961 functions for snarfing info on the group.
1962
1963 @vindex gnus-group-update-hook
1964 @findex gnus-group-highlight-line
1965 @code{gnus-group-update-hook} is called when a group line is changed.
1966 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1967 calls @code{gnus-group-highlight-line} by default.
1968
1969
1970 @node Group Maneuvering
1971 @section Group Maneuvering
1972 @cindex group movement
1973
1974 All movement commands understand the numeric prefix and will behave as
1975 expected, hopefully.
1976
1977 @table @kbd
1978
1979 @item n
1980 @kindex n (Group)
1981 @findex gnus-group-next-unread-group
1982 Go to the next group that has unread articles
1983 (@code{gnus-group-next-unread-group}).
1984
1985 @item p
1986 @itemx DEL
1987 @kindex DEL (Group)
1988 @kindex p (Group)
1989 @findex gnus-group-prev-unread-group
1990 Go to the previous group that has unread articles
1991 (@code{gnus-group-prev-unread-group}).
1992
1993 @item N
1994 @kindex N (Group)
1995 @findex gnus-group-next-group
1996 Go to the next group (@code{gnus-group-next-group}).
1997
1998 @item P
1999 @kindex P (Group)
2000 @findex gnus-group-prev-group
2001 Go to the previous group (@code{gnus-group-prev-group}).
2002
2003 @item M-n
2004 @kindex M-n (Group)
2005 @findex gnus-group-next-unread-group-same-level
2006 Go to the next unread group on the same (or lower) level
2007 (@code{gnus-group-next-unread-group-same-level}).
2008
2009 @item M-p
2010 @kindex M-p (Group)
2011 @findex gnus-group-prev-unread-group-same-level
2012 Go to the previous unread group on the same (or lower) level
2013 (@code{gnus-group-prev-unread-group-same-level}).
2014 @end table
2015
2016 Three commands for jumping to groups:
2017
2018 @table @kbd
2019
2020 @item j
2021 @kindex j (Group)
2022 @findex gnus-group-jump-to-group
2023 Jump to a group (and make it visible if it isn't already)
2024 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2025 like living groups.
2026
2027 @item ,
2028 @kindex , (Group)
2029 @findex gnus-group-best-unread-group
2030 Jump to the unread group with the lowest level
2031 (@code{gnus-group-best-unread-group}).
2032
2033 @item .
2034 @kindex . (Group)
2035 @findex gnus-group-first-unread-group
2036 Jump to the first group with unread articles
2037 (@code{gnus-group-first-unread-group}).
2038 @end table
2039
2040 @vindex gnus-group-goto-unread
2041 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2042 commands will move to the next group, not the next unread group.  Even
2043 the commands that say they move to the next unread group.  The default
2044 is @code{t}.
2045
2046
2047 @node Selecting a Group
2048 @section Selecting a Group
2049 @cindex group selection
2050
2051 @table @kbd
2052
2053 @item SPACE
2054 @kindex SPACE (Group)
2055 @findex gnus-group-read-group
2056 Select the current group, switch to the summary buffer and display the
2057 first unread article (@code{gnus-group-read-group}).  If there are no
2058 unread articles in the group, or if you give a non-numerical prefix to
2059 this command, Gnus will offer to fetch all the old articles in this
2060 group from the server.  If you give a numerical prefix @var{N}, @var{N}
2061 determines the number of articles Gnus will fetch.  If @var{N} is
2062 positive, Gnus fetches the @var{N} newest articles, if @var{N} is
2063 negative, Gnus fetches the @code{abs(@var{N})} oldest articles.
2064
2065 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2066 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2067 - 4 2 SPC} fetches the 42 oldest ones.
2068
2069 When you are in the group (in the Summary buffer), you can type
2070 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2071 ones.
2072
2073 @item RET
2074 @kindex RET (Group)
2075 @findex gnus-group-select-group
2076 Select the current group and switch to the summary buffer
2077 (@code{gnus-group-select-group}).  Takes the same arguments as
2078 @code{gnus-group-read-group}---the only difference is that this command
2079 does not display the first unread article automatically upon group
2080 entry.
2081
2082 @item M-RET
2083 @kindex M-RET (Group)
2084 @findex gnus-group-quick-select-group
2085 This does the same as the command above, but tries to do it with the
2086 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2087 scoring/killing will be performed, there will be no highlights and no
2088 expunging.  This might be useful if you're in a real hurry and have to
2089 enter some humongous group.  If you give a 0 prefix to this command
2090 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2091 which is useful if you want to toggle threading before generating the
2092 summary buffer (@pxref{Summary Generation Commands}).
2093
2094 @item M-SPACE
2095 @kindex M-SPACE (Group)
2096 @findex gnus-group-visible-select-group
2097 This is yet one more command that does the same as the @kbd{RET}
2098 command, but this one does it without expunging and hiding dormants
2099 (@code{gnus-group-visible-select-group}).
2100
2101 @item C-M-RET
2102 @kindex C-M-RET (Group)
2103 @findex gnus-group-select-group-ephemerally
2104 Finally, this command selects the current group ephemerally without
2105 doing any processing of its contents
2106 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2107 turned off.  Everything you do in the group after selecting it in this
2108 manner will have no permanent effects.
2109
2110 @end table
2111
2112 @vindex gnus-large-newsgroup
2113 The @code{gnus-large-newsgroup} variable says what Gnus should consider
2114 to be a big group.  This is 200 by default.  If the group has more
2115 (unread and/or ticked) articles than this, Gnus will query the user
2116 before entering the group.  The user can then specify how many articles
2117 should be fetched from the server.  If the user specifies a negative
2118 number (@code{-n}), the @code{n} oldest articles will be fetched.  If it
2119 is positive, the @code{n} articles that have arrived most recently will
2120 be fetched.
2121
2122 @vindex gnus-select-group-hook
2123 @vindex gnus-auto-select-first
2124 @vindex gnus-auto-select-subject
2125 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2126 automatically when entering a group with the @kbd{SPACE} command.
2127 Which article this is is controlled by the
2128 @code{gnus-auto-select-subject} variable.  Valid values for this
2129 variable is:
2130
2131 @table @code
2132
2133 @item unread
2134 Place point on the subject line of the first unread article.
2135
2136 @item first
2137 Place point on the subject line of the first article.
2138
2139 @item unseen
2140 Place point on the subject line of the first unseen article.
2141
2142 @item unseen-or-unread
2143 Place point on the subject line of the first unseen article, and if
2144 there is no such article, place point on the subject line of the first
2145 unread article.
2146
2147 @item best
2148 Place point on the subject line of the highest-scored unread article.
2149
2150 @end table
2151
2152 This variable can also be a function.  In that case, that function
2153 will be called to place point on a subject line.
2154
2155 If you want to prevent automatic selection in some group (say, in a
2156 binary group with Huge articles) you can set the
2157 @code{gnus-auto-select-first} variable to @code{nil} in
2158 @code{gnus-select-group-hook}, which is called when a group is
2159 selected.
2160
2161
2162 @node Subscription Commands
2163 @section Subscription Commands
2164 @cindex subscription
2165
2166 @table @kbd
2167
2168 @item S t
2169 @itemx u
2170 @kindex S t (Group)
2171 @kindex u (Group)
2172 @findex gnus-group-unsubscribe-current-group
2173 @c @icon{gnus-group-unsubscribe}
2174 Toggle subscription to the current group
2175 (@code{gnus-group-unsubscribe-current-group}).
2176
2177 @item S s
2178 @itemx U
2179 @kindex S s (Group)
2180 @kindex U (Group)
2181 @findex gnus-group-unsubscribe-group
2182 Prompt for a group to subscribe, and then subscribe it.  If it was
2183 subscribed already, unsubscribe it instead
2184 (@code{gnus-group-unsubscribe-group}).
2185
2186 @item S k
2187 @itemx C-k
2188 @kindex S k (Group)
2189 @kindex C-k (Group)
2190 @findex gnus-group-kill-group
2191 @c @icon{gnus-group-kill-group}
2192 Kill the current group (@code{gnus-group-kill-group}).
2193
2194 @item S y
2195 @itemx C-y
2196 @kindex S y (Group)
2197 @kindex C-y (Group)
2198 @findex gnus-group-yank-group
2199 Yank the last killed group (@code{gnus-group-yank-group}).
2200
2201 @item C-x C-t
2202 @kindex C-x C-t (Group)
2203 @findex gnus-group-transpose-groups
2204 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2205 really a subscription command, but you can use it instead of a
2206 kill-and-yank sequence sometimes.
2207
2208 @item S w
2209 @itemx C-w
2210 @kindex S w (Group)
2211 @kindex C-w (Group)
2212 @findex gnus-group-kill-region
2213 Kill all groups in the region (@code{gnus-group-kill-region}).
2214
2215 @item S z
2216 @kindex S z (Group)
2217 @findex gnus-group-kill-all-zombies
2218 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2219
2220 @item S C-k
2221 @kindex S C-k (Group)
2222 @findex gnus-group-kill-level
2223 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2224 These groups can't be yanked back after killing, so this command should
2225 be used with some caution.  The only time where this command comes in
2226 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2227 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2228 kill off all unsubscribed groups that do not have message numbers in the
2229 @file{.newsrc} file.
2230
2231 @end table
2232
2233 Also @pxref{Group Levels}.
2234
2235
2236 @node Group Data
2237 @section Group Data
2238
2239 @table @kbd
2240
2241 @item c
2242 @kindex c (Group)
2243 @findex gnus-group-catchup-current
2244 @vindex gnus-group-catchup-group-hook
2245 @c @icon{gnus-group-catchup-current}
2246 Mark all unticked articles in this group as read
2247 (@code{gnus-group-catchup-current}).
2248 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2249 the group buffer.
2250
2251 @item C
2252 @kindex C (Group)
2253 @findex gnus-group-catchup-current-all
2254 Mark all articles in this group, even the ticked ones, as read
2255 (@code{gnus-group-catchup-current-all}).
2256
2257 @item M-c
2258 @kindex M-c (Group)
2259 @findex gnus-group-clear-data
2260 Clear the data from the current group---nix out marks and the list of
2261 read articles (@code{gnus-group-clear-data}).
2262
2263 @item M-x gnus-group-clear-data-on-native-groups
2264 @kindex M-x gnus-group-clear-data-on-native-groups
2265 @findex gnus-group-clear-data-on-native-groups
2266 If you have switched from one @sc{nntp} server to another, all your marks
2267 and read ranges have become worthless.  You can use this command to
2268 clear out all data that you have on your native groups.  Use with
2269 caution.
2270
2271 @end table
2272
2273
2274 @node Group Levels
2275 @section Group Levels
2276 @cindex group level
2277 @cindex level
2278
2279 All groups have a level of @dfn{subscribedness}.  For instance, if a
2280 group is on level 2, it is more subscribed than a group on level 5.  You
2281 can ask Gnus to just list groups on a given level or lower
2282 (@pxref{Listing Groups}), or to just check for new articles in groups on
2283 a given level or lower (@pxref{Scanning New Messages}).
2284
2285 Remember:  The higher the level of the group, the less important it is.
2286
2287 @table @kbd
2288
2289 @item S l
2290 @kindex S l (Group)
2291 @findex gnus-group-set-current-level
2292 Set the level of the current group.  If a numeric prefix is given, the
2293 next @var{n} groups will have their levels set.  The user will be
2294 prompted for a level.
2295 @end table
2296
2297 @vindex gnus-level-killed
2298 @vindex gnus-level-zombie
2299 @vindex gnus-level-unsubscribed
2300 @vindex gnus-level-subscribed
2301 Gnus considers groups from levels 1 to
2302 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2303 @code{gnus-level-subscribed} (exclusive) and
2304 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2305 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2306 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2307 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2308 same, but zombie and killed groups have no information on what articles
2309 you have read, etc, stored.  This distinction between dead and living
2310 groups isn't done because it is nice or clever, it is done purely for
2311 reasons of efficiency.
2312
2313 It is recommended that you keep all your mail groups (if any) on quite
2314 low levels (e.g. 1 or 2).
2315
2316 Maybe the following description of the default behavior of Gnus helps to
2317 understand what these levels are all about.  By default, Gnus shows you
2318 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2319 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2320 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2321 groups are hidden, in a way.
2322
2323 Zombie and killed groups are similar to unsubscribed groups in that they
2324 are hidden by default.  But they are different from subscribed and
2325 unsubscribed groups in that Gnus doesn't ask the news server for
2326 information (number of messages, number of unread messages) on zombie
2327 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2328 aren't interested in.  If most groups are killed, Gnus is faster.
2329
2330 Why does Gnus distinguish between zombie and killed groups?  Well, when
2331 a new group arrives on the server, Gnus by default makes it a zombie
2332 group.  This means that you are normally not bothered with new groups,
2333 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2334 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2335 list of killed groups.)
2336
2337 If you want to play with the level variables, you should show some care.
2338 Set them once, and don't touch them ever again.  Better yet, don't touch
2339 them at all unless you know exactly what you're doing.
2340
2341 @vindex gnus-level-default-unsubscribed
2342 @vindex gnus-level-default-subscribed
2343 Two closely related variables are @code{gnus-level-default-subscribed}
2344 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2345 which are the levels that new groups will be put on if they are
2346 (un)subscribed.  These two variables should, of course, be inside the
2347 relevant valid ranges.
2348
2349 @vindex gnus-keep-same-level
2350 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2351 will only move to groups of the same level (or lower).  In
2352 particular, going from the last article in one group to the next group
2353 will go to the next group of the same level (or lower).  This might be
2354 handy if you want to read the most important groups before you read the
2355 rest.
2356
2357 If this variable is @code{best}, Gnus will make the next newsgroup the
2358 one with the best level.
2359
2360 @vindex gnus-group-default-list-level
2361 All groups with a level less than or equal to
2362 @code{gnus-group-default-list-level} will be listed in the group buffer
2363 by default.
2364
2365 @vindex gnus-group-list-inactive-groups
2366 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2367 groups will be listed along with the unread groups.  This variable is
2368 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2369 listed.
2370
2371 @vindex gnus-group-use-permanent-levels
2372 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2373 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2374 use this level as the ``work'' level.
2375
2376 @vindex gnus-activate-level
2377 Gnus will normally just activate (i. e., query the server about) groups
2378 on level @code{gnus-activate-level} or less.  If you don't want to
2379 activate unsubscribed groups, for instance, you might set this variable
2380 to 5.  The default is 6.
2381
2382
2383 @node Group Score
2384 @section Group Score
2385 @cindex group score
2386 @cindex group rank
2387 @cindex rank
2388
2389 You would normally keep important groups on high levels, but that scheme
2390 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2391 group buffer according to how often you read groups, perhaps?  Within
2392 reason?
2393
2394 This is what @dfn{group score} is for.  You can have Gnus assign a score
2395 to each group through the mechanism described below.  You can then sort
2396 the group buffer based on this score.  Alternatively, you can sort on
2397 score and then level.  (Taken together, the level and the score is
2398 called the @dfn{rank} of the group.  A group that is on level 4 and has
2399 a score of 1 has a higher rank than a group on level 5 that has a score
2400 of 300.  (The level is the most significant part and the score is the
2401 least significant part.))
2402
2403 @findex gnus-summary-bubble-group
2404 If you want groups you read often to get higher scores than groups you
2405 read seldom you can add the @code{gnus-summary-bubble-group} function to
2406 the @code{gnus-summary-exit-hook} hook.  This will result (after
2407 sorting) in a bubbling sort of action.  If you want to see that in
2408 action after each summary exit, you can add
2409 @code{gnus-group-sort-groups-by-rank} or
2410 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2411 slow things down somewhat.
2412
2413
2414 @node Marking Groups
2415 @section Marking Groups
2416 @cindex marking groups
2417
2418 If you want to perform some command on several groups, and they appear
2419 subsequently in the group buffer, you would normally just give a
2420 numerical prefix to the command.  Most group commands will then do your
2421 bidding on those groups.
2422
2423 However, if the groups are not in sequential order, you can still
2424 perform a command on several groups.  You simply mark the groups first
2425 with the process mark and then execute the command.
2426
2427 @table @kbd
2428
2429 @item #
2430 @kindex # (Group)
2431 @itemx M m
2432 @kindex M m (Group)
2433 @findex gnus-group-mark-group
2434 Set the mark on the current group (@code{gnus-group-mark-group}).
2435
2436 @item M-#
2437 @kindex M-# (Group)
2438 @itemx M u
2439 @kindex M u (Group)
2440 @findex gnus-group-unmark-group
2441 Remove the mark from the current group
2442 (@code{gnus-group-unmark-group}).
2443
2444 @item M U
2445 @kindex M U (Group)
2446 @findex gnus-group-unmark-all-groups
2447 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2448
2449 @item M w
2450 @kindex M w (Group)
2451 @findex gnus-group-mark-region
2452 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2453
2454 @item M b
2455 @kindex M b (Group)
2456 @findex gnus-group-mark-buffer
2457 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2458
2459 @item M r
2460 @kindex M r (Group)
2461 @findex gnus-group-mark-regexp
2462 Mark all groups that match some regular expression
2463 (@code{gnus-group-mark-regexp}).
2464 @end table
2465
2466 Also @pxref{Process/Prefix}.
2467
2468 @findex gnus-group-universal-argument
2469 If you want to execute some command on all groups that have been marked
2470 with the process mark, you can use the @kbd{M-&}
2471 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2472 the command to be executed.
2473
2474
2475 @node Foreign Groups
2476 @section Foreign Groups
2477 @cindex foreign groups
2478
2479 Below are some group mode commands for making and editing general foreign
2480 groups, as well as commands to ease the creation of a few
2481 special-purpose groups.  All these commands insert the newly created
2482 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2483 consulted.
2484
2485 @table @kbd
2486
2487 @item G m
2488 @kindex G m (Group)
2489 @findex gnus-group-make-group
2490 @cindex making groups
2491 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2492 for a name, a method and possibly an @dfn{address}.  For an easier way
2493 to subscribe to @sc{nntp} groups, @pxref{Browse Foreign Server}.
2494
2495 @item G r
2496 @kindex G r (Group)
2497 @findex gnus-group-rename-group
2498 @cindex renaming groups
2499 Rename the current group to something else
2500 (@code{gnus-group-rename-group}).  This is valid only on some
2501 groups---mail groups mostly.  This command might very well be quite slow
2502 on some back ends.
2503
2504 @item G c
2505 @kindex G c (Group)
2506 @cindex customizing
2507 @findex gnus-group-customize
2508 Customize the group parameters (@code{gnus-group-customize}).
2509
2510 @item G e
2511 @kindex G e (Group)
2512 @findex gnus-group-edit-group-method
2513 @cindex renaming groups
2514 Enter a buffer where you can edit the select method of the current
2515 group (@code{gnus-group-edit-group-method}).
2516
2517 @item G p
2518 @kindex G p (Group)
2519 @findex gnus-group-edit-group-parameters
2520 Enter a buffer where you can edit the group parameters
2521 (@code{gnus-group-edit-group-parameters}).
2522
2523 @item G E
2524 @kindex G E (Group)
2525 @findex gnus-group-edit-group
2526 Enter a buffer where you can edit the group info
2527 (@code{gnus-group-edit-group}).
2528
2529 @item G d
2530 @kindex G d (Group)
2531 @findex gnus-group-make-directory-group
2532 @cindex nndir
2533 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2534 for a directory name (@code{gnus-group-make-directory-group}).
2535
2536 @item G h
2537 @kindex G h (Group)
2538 @cindex help group
2539 @findex gnus-group-make-help-group
2540 Make the Gnus help group (@code{gnus-group-make-help-group}).
2541
2542 @item G a
2543 @kindex G a (Group)
2544 @cindex (ding) archive
2545 @cindex archive group
2546 @findex gnus-group-make-archive-group
2547 @vindex gnus-group-archive-directory
2548 @vindex gnus-group-recent-archive-directory
2549 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2550 default a group pointing to the most recent articles will be created
2551 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2552 group will be created from @code{gnus-group-archive-directory}.
2553
2554 @item G k
2555 @kindex G k (Group)
2556 @findex gnus-group-make-kiboze-group
2557 @cindex nnkiboze
2558 Make a kiboze group.  You will be prompted for a name, for a regexp to
2559 match groups to be ``included'' in the kiboze group, and a series of
2560 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2561 @xref{Kibozed Groups}.
2562
2563 @item G D
2564 @kindex G D (Group)
2565 @findex gnus-group-enter-directory
2566 @cindex nneething
2567 Read an arbitrary directory as if it were a newsgroup with the
2568 @code{nneething} back end (@code{gnus-group-enter-directory}).
2569 @xref{Anything Groups}.
2570
2571 @item G f
2572 @kindex G f (Group)
2573 @findex gnus-group-make-doc-group
2574 @cindex ClariNet Briefs
2575 @cindex nndoc
2576 Make a group based on some file or other
2577 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2578 command, you will be prompted for a file name and a file type.
2579 Currently supported types are @code{mbox}, @code{babyl},
2580 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2581 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2582 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2583 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2584 you run this command without a prefix, Gnus will guess at the file
2585 type.  @xref{Document Groups}.
2586
2587 @item G u
2588 @kindex G u (Group)
2589 @vindex gnus-useful-groups
2590 @findex gnus-group-make-useful-group
2591 Create one of the groups mentioned in @code{gnus-useful-groups}
2592 (@code{gnus-group-make-useful-group}).
2593
2594 @item G w
2595 @kindex G w (Group)
2596 @findex gnus-group-make-web-group
2597 @cindex Google
2598 @cindex nnweb
2599 @cindex gmane
2600 Make an ephemeral group based on a web search
2601 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2602 command, make a solid group instead.  You will be prompted for the
2603 search engine type and the search string.  Valid search engine types
2604 include @code{google}, @code{dejanews}, and @code{gmane}.
2605 @xref{Web Searches}.
2606
2607 If you use the @code{google} search engine, you can limit the search
2608 to a particular group by using a match string like
2609 @samp{shaving group:alt.sysadmin.recovery}.
2610
2611 @item G DEL
2612 @kindex G DEL (Group)
2613 @findex gnus-group-delete-group
2614 This function will delete the current group
2615 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2616 actually delete all the articles in the group, and forcibly remove the
2617 group itself from the face of the Earth.  Use a prefix only if you are
2618 absolutely sure of what you are doing.  This command can't be used on
2619 read-only groups (like @code{nntp} group), though.
2620
2621 @item G V
2622 @kindex G V (Group)
2623 @findex gnus-group-make-empty-virtual
2624 Make a new, fresh, empty @code{nnvirtual} group
2625 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2626
2627 @item G v
2628 @kindex G v (Group)
2629 @findex gnus-group-add-to-virtual
2630 Add the current group to an @code{nnvirtual} group
2631 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2632 @end table
2633
2634 @xref{Select Methods}, for more information on the various select
2635 methods.
2636
2637 @vindex gnus-activate-foreign-newsgroups
2638 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2639 Gnus will check all foreign groups with this level or lower at startup.
2640 This might take quite a while, especially if you subscribe to lots of
2641 groups from different @sc{nntp} servers.  Also @pxref{Group Levels};
2642 @code{gnus-activate-level} also affects activation of foreign
2643 newsgroups.
2644
2645
2646 @node Group Parameters
2647 @section Group Parameters
2648 @cindex group parameters
2649
2650 The group parameters store information local to a particular group.
2651 Here's an example group parameter list:
2652
2653 @example
2654 ((to-address . "ding@@gnus.org")
2655  (auto-expire . t))
2656 @end example
2657
2658 We see that each element consists of a "dotted pair"---the thing before
2659 the dot is the key, while the thing after the dot is the value.  All the
2660 parameters have this form @emph{except} local variable specs, which are
2661 not dotted pairs, but proper lists.
2662
2663 Some parameters have correspondant customizable variables, each of which
2664 is an alist of regexps and values.
2665
2666 The following group parameters can be used:
2667
2668 @table @code
2669 @item to-address
2670 @cindex to-address
2671 Address used by when doing followups and new posts.
2672
2673 @example
2674 (to-address . "some@@where.com")
2675 @end example
2676
2677 This is primarily useful in mail groups that represent closed mailing
2678 lists---mailing lists where it's expected that everybody that writes to
2679 the mailing list is subscribed to it.  Since using this parameter
2680 ensures that the mail only goes to the mailing list itself, it means
2681 that members won't receive two copies of your followups.
2682
2683 Using @code{to-address} will actually work whether the group is foreign
2684 or not.  Let's say there's a group on the server that is called
2685 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2686 the articles from a mail-to-news gateway.  Posting directly to this
2687 group is therefore impossible---you have to send mail to the mailing
2688 list address instead.
2689
2690 See also @code{gnus-parameter-to-address-alist}.
2691
2692 @item to-list
2693 @cindex to-list
2694 Address used when doing @kbd{a} in that group.
2695
2696 @example
2697 (to-list . "some@@where.com")
2698 @end example
2699
2700 It is totally ignored
2701 when doing a followup---except that if it is present in a news group,
2702 you'll get mail group semantics when doing @kbd{f}.
2703
2704 If you do an @kbd{a} command in a mail group and you have neither a
2705 @code{to-list} group parameter nor a @code{to-address} group parameter,
2706 then a @code{to-list} group parameter will be added automatically upon
2707 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2708 @vindex gnus-add-to-list
2709
2710 If you do an @kbd{a} command in a mail group and you don't have a
2711 @code{to-list} group parameter, one will be added automatically upon
2712 sending the message.
2713
2714 @findex gnus-mailing-list-mode
2715 @cindex Mail List Groups
2716 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2717 entering summary buffer.
2718
2719 See also @code{gnus-parameter-to-list-alist}.
2720
2721 @anchor{subscribed}
2722 @item subscribed
2723 @cindex subscribed
2724 If this parameter is set to @code{t}, Gnus will consider the
2725 to-address and to-list parameters for this group as addresses of
2726 mailing lists you are subscribed to.  Giving Gnus this information is
2727 (only) a first step in getting it to generate correct Mail-Followup-To
2728 headers for your posts to these lists.  Look here @pxref{(message)Mailing
2729 Lists} for a complete treatment of available MFT support.
2730
2731 See also @code{gnus-find-subscribed-addresses}, the function that
2732 directly uses this group parameter.
2733
2734 @item visible
2735 @cindex visible
2736 If the group parameter list has the element @code{(visible . t)},
2737 that group will always be visible in the Group buffer, regardless
2738 of whether it has any unread articles.
2739
2740 @item broken-reply-to
2741 @cindex broken-reply-to
2742 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2743 headers in this group are to be ignored.  This can be useful if you're
2744 reading a mailing list group where the listserv has inserted
2745 @code{Reply-To} headers that point back to the listserv itself.  This is
2746 broken behavior.  So there!
2747
2748 @item to-group
2749 @cindex to-group
2750 Elements like @code{(to-group . "some.group.name")} means that all
2751 posts in that group will be sent to @code{some.group.name}.
2752
2753 @item newsgroup
2754 @cindex newsgroup
2755 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2756 will treat all responses as if they were responses to news articles.
2757 This can be useful if you have a mail group that's really a mirror of a
2758 news group.
2759
2760 @item gcc-self
2761 @cindex gcc-self
2762 If @code{(gcc-self . t)} is present in the group parameter list, newly
2763 composed messages will be @code{Gcc}'d to the current group.  If
2764 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2765 generated, if @code{(gcc-self . "string")} is present, this string will
2766 be inserted literally as a @code{gcc} header.  This parameter takes
2767 precedence over any default @code{Gcc} rules as described later
2768 (@pxref{Archived Messages}).  CAVEAT:: It yields an error putting
2769 @code{(gcc-self . t)} in groups of a @code{nntp} server or so, because
2770 a @code{nntp} server doesn't accept articles.
2771
2772 @item auto-expire
2773 @cindex auto-expire
2774 If the group parameter has an element that looks like @code{(auto-expire
2775 . t)}, all articles read will be marked as expirable.  For an
2776 alternative approach, @pxref{Expiring Mail}.
2777
2778 See also @code{gnus-auto-expirable-newsgroups}.
2779
2780 @item total-expire
2781 @cindex total-expire
2782 If the group parameter has an element that looks like
2783 @code{(total-expire . t)}, all read articles will be put through the
2784 expiry process, even if they are not marked as expirable.  Use with
2785 caution.  Unread, ticked and dormant articles are not eligible for
2786 expiry.
2787
2788 See also @code{gnus-total-expirable-newsgroups}.
2789
2790 @item expiry-wait
2791 @cindex expiry-wait
2792 @vindex nnmail-expiry-wait-function
2793 If the group parameter has an element that looks like
2794 @code{(expiry-wait . 10)}, this value will override any
2795 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2796 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2797 can either be a number of days (not necessarily an integer) or the
2798 symbols @code{never} or @code{immediate}.
2799
2800 @item score-file
2801 @cindex score file group parameter
2802 Elements that look like @code{(score-file . "file")} will make
2803 @file{file} into the current score file for the group in question.  All
2804 interactive score entries will be put into this file.
2805
2806 @item adapt-file
2807 @cindex adapt file group parameter
2808 Elements that look like @code{(adapt-file . "file")} will make
2809 @file{file} into the current adaptive file for the group in question.
2810 All adaptive score entries will be put into this file.
2811
2812 @item admin-address
2813 @cindex admin-address
2814 When unsubscribing from a mailing list you should never send the
2815 unsubscription notice to the mailing list itself.  Instead, you'd send
2816 messages to the administrative address.  This parameter allows you to
2817 put the admin address somewhere convenient.
2818
2819 @item display
2820 @cindex display
2821 Elements that look like @code{(display . MODE)} say which articles to
2822 display on entering the group.  Valid values are:
2823
2824 @table @code
2825 @item all
2826 Display all articles, both read and unread.
2827
2828 @item an integer
2829 Display the last INTEGER articles in the group.  This is the same as
2830 entering the group with C-u INTEGER.
2831
2832 @item default
2833 Display the default visible articles, which normally includes unread and
2834 ticked articles.
2835
2836 @item an array
2837 Display articles that satisfy a predicate.
2838
2839 Here are some examples:
2840
2841 @table @code
2842 @item [unread]
2843 Display only unread articles.
2844
2845 @item [not expire]
2846 Display everything except expirable articles.
2847
2848 @item [and (not reply) (not expire)]
2849 Display everything except expirable and articles you've already
2850 responded to.
2851 @end table
2852
2853 The available operators are @code{not}, @code{and} and @code{or}.
2854 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2855 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2856 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2857 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2858
2859 @end table
2860
2861 The @code{display} parameter works by limiting the summary buffer to
2862 the subset specified.  You can pop the limit by using the @kbd{/ w}
2863 command (@pxref{Limiting}).
2864
2865 @item comment
2866 @cindex comment
2867 Elements that look like @code{(comment . "This is a comment")} are
2868 arbitrary comments on the group.  You can display comments in the
2869 group line (@pxref{Group Line Specification}).
2870
2871 @item charset
2872 @cindex charset
2873 Elements that look like @code{(charset . iso-8859-1)} will make
2874 @code{iso-8859-1} the default charset; that is, the charset that will be
2875 used for all articles that do not specify a charset.
2876
2877 See also @code{gnus-group-charset-alist}.
2878
2879 @item ignored-charsets
2880 @cindex ignored-charset
2881 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2882 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2883 default charset will be used for decoding articles.
2884
2885 See also @code{gnus-group-ignored-charsets-alist}.
2886
2887 @item posting-style
2888 @cindex posting-style
2889 You can store additional posting style information for this group
2890 here (@pxref{Posting Styles}).  The format is that of an entry in the
2891 @code{gnus-posting-styles} alist, except that there's no regexp matching
2892 the group name (of course).  Style elements in this group parameter will
2893 take precedence over the ones found in @code{gnus-posting-styles}.
2894
2895 For instance, if you want a funky name and signature in this group only,
2896 instead of hacking @code{gnus-posting-styles}, you could put something
2897 like this in the group parameters:
2898
2899 @example
2900 (posting-style
2901   (name "Funky Name")
2902   ("X-My-Header" "Funky Value")
2903   (signature "Funky Signature"))
2904 @end example
2905
2906 @item post-method
2907 @cindex post-method
2908 If it is set, the value is used as the method for posting message
2909 instead of @code{gnus-post-method}.
2910
2911 @item banner
2912 @cindex banner
2913 An item like @code{(banner . "regex")} causes any part of an article
2914 that matches the regular expression "regex" to be stripped. Instead of
2915 "regex", you can also use the symbol @code{signature} which strips the
2916 last signature or any of the elements of the alist
2917 @code{gnus-article-banner-alist}.
2918
2919 @item sieve
2920 @cindex sieve
2921 This parameter contains a Sieve test that should match incoming mail
2922 that should be placed in this group.  From this group parameter, a
2923 Sieve @samp{IF} control structure is generated, having the test as the
2924 condition and @samp{fileinto "group.name";} as the body.
2925
2926 For example, if the INBOX.list.sieve group has the @code{(sieve
2927 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2928 translating the group parameter into a Sieve script (@pxref{Sieve
2929 Commands}) the following Sieve code is generated:
2930
2931 @example
2932 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2933         fileinto \"INBOX.list.sieve\";
2934 @}
2935 @end example
2936
2937 The Sieve language is described in RFC 3028.  @xref{Top, , Top, sieve,
2938 Emacs Sieve}.
2939
2940 @item (@var{variable} @var{form})
2941 You can use the group parameters to set variables local to the group you
2942 are entering.  If you want to turn threading off in @samp{news.answers},
2943 you could put @code{(gnus-show-threads nil)} in the group parameters of
2944 that group.  @code{gnus-show-threads} will be made into a local variable
2945 in the summary buffer you enter, and the form @code{nil} will be
2946 @code{eval}ed there.
2947
2948 @vindex gnus-list-identifiers
2949 A use for this feature, is to remove a mailing list identifier tag in
2950 the subject fields of articles.   E.g. if the news group
2951 @samp{nntp+news.gnus.org:gmane.text.docbook.apps} has the tag
2952 @samp{DOC-BOOK-APPS:} in the subject of all articles, this tag can be
2953 removed from the article subjects in the summary buffer for the group by
2954 putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")} into the group
2955 parameters for the group.
2956
2957
2958 This can also be used as a group-specific hook function, if you'd like.
2959 If you want to hear a beep when you enter a group, you could put
2960 something like @code{(dummy-variable (ding))} in the parameters of that
2961 group.  @code{dummy-variable} will be set to the result of the
2962 @code{(ding)} form, but who cares?
2963
2964 @end table
2965
2966 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2967 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2968 presents you with a Customize-like interface.  The latter helps avoid
2969 silly Lisp errors.)  You might also be interested in reading about topic
2970 parameters (@pxref{Topic Parameters}).
2971
2972 @vindex gnus-parameters
2973 Group parameters can be set via the @code{gnus-parameters} variable too.
2974 But some variables, such as @code{visible}, have no effect.  For
2975 example:
2976
2977 @example
2978 (setq gnus-parameters
2979       '(("mail\\..*"
2980          (gnus-show-threads nil)
2981          (gnus-use-scoring nil)
2982          (gnus-summary-line-format
2983           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
2984          (gcc-self . t)
2985          (display . all))
2986
2987         ("^nnimap:\\(foo.bar\\)$"
2988          (to-group . "\\1"))
2989
2990         ("mail\\.me"
2991          (gnus-use-scoring  t))
2992
2993         ("list\\..*"
2994          (total-expire . t)
2995          (broken-reply-to . t))))
2996 @end example
2997
2998 String value of parameters will be subjected to regexp substitution, as
2999 the @code{to-group} example shows.
3000
3001
3002 @node Listing Groups
3003 @section Listing Groups
3004 @cindex group listing
3005
3006 These commands all list various slices of the groups available.
3007
3008 @table @kbd
3009
3010 @item l
3011 @itemx A s
3012 @kindex A s (Group)
3013 @kindex l (Group)
3014 @findex gnus-group-list-groups
3015 List all groups that have unread articles
3016 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3017 command will list only groups of level ARG and lower.  By default, it
3018 only lists groups of level five (i. e.,
3019 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3020 groups).
3021
3022 @item L
3023 @itemx A u
3024 @kindex A u (Group)
3025 @kindex L (Group)
3026 @findex gnus-group-list-all-groups
3027 List all groups, whether they have unread articles or not
3028 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3029 this command will list only groups of level ARG and lower.  By default,
3030 it lists groups of level seven or lower (i.e., just subscribed and
3031 unsubscribed groups).
3032
3033 @item A l
3034 @kindex A l (Group)
3035 @findex gnus-group-list-level
3036 List all unread groups on a specific level
3037 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3038 with no unread articles.
3039
3040 @item A k
3041 @kindex A k (Group)
3042 @findex gnus-group-list-killed
3043 List all killed groups (@code{gnus-group-list-killed}).  If given a
3044 prefix argument, really list all groups that are available, but aren't
3045 currently (un)subscribed.  This could entail reading the active file
3046 from the server.
3047
3048 @item A z
3049 @kindex A z (Group)
3050 @findex gnus-group-list-zombies
3051 List all zombie groups (@code{gnus-group-list-zombies}).
3052
3053 @item A m
3054 @kindex A m (Group)
3055 @findex gnus-group-list-matching
3056 List all unread, subscribed groups with names that match a regexp
3057 (@code{gnus-group-list-matching}).
3058
3059 @item A M
3060 @kindex A M (Group)
3061 @findex gnus-group-list-all-matching
3062 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3063
3064 @item A A
3065 @kindex A A (Group)
3066 @findex gnus-group-list-active
3067 List absolutely all groups in the active file(s) of the
3068 server(s) you are connected to (@code{gnus-group-list-active}).  This
3069 might very well take quite a while.  It might actually be a better idea
3070 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3071 thing to match on.  Also note that this command may list groups that
3072 don't exist (yet)---these will be listed as if they were killed groups.
3073 Take the output with some grains of salt.
3074
3075 @item A a
3076 @kindex A a (Group)
3077 @findex gnus-group-apropos
3078 List all groups that have names that match a regexp
3079 (@code{gnus-group-apropos}).
3080
3081 @item A d
3082 @kindex A d (Group)
3083 @findex gnus-group-description-apropos
3084 List all groups that have names or descriptions that match a regexp
3085 (@code{gnus-group-description-apropos}).
3086
3087 @item A c
3088 @kindex A c (Group)
3089 @findex gnus-group-list-cached
3090 List all groups with cached articles (@code{gnus-group-list-cached}).
3091
3092 @item A ?
3093 @kindex A ? (Group)
3094 @findex gnus-group-list-dormant
3095 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3096
3097 @item A /
3098 @kindex A / (Group)
3099 @findex gnus-group-list-limit
3100 List groups limited within the current selection
3101 (@code{gnus-group-list-limit}).
3102
3103 @item A f
3104 @kindex A f (Group)
3105 @findex gnus-group-list-flush
3106 Flush groups from the current selection (@code{gnus-group-list-flush}).
3107
3108 @item A p
3109 @kindex A p (Group)
3110 @findex gnus-group-list-plus
3111 List groups plus the current selection (@code{gnus-group-list-plus}).
3112
3113 @end table
3114
3115 @vindex gnus-permanently-visible-groups
3116 @cindex visible group parameter
3117 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3118 always be shown, whether they have unread articles or not.  You can also
3119 add the @code{visible} element to the group parameters in question to
3120 get the same effect.
3121
3122 @vindex gnus-list-groups-with-ticked-articles
3123 Groups that have just ticked articles in it are normally listed in the
3124 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3125 @code{nil}, these groups will be treated just like totally empty
3126 groups.  It is @code{t} by default.
3127
3128
3129 @node Sorting Groups
3130 @section Sorting Groups
3131 @cindex sorting groups
3132
3133 @kindex C-c C-s (Group)
3134 @findex gnus-group-sort-groups
3135 @vindex gnus-group-sort-function
3136 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3137 group buffer according to the function(s) given by the
3138 @code{gnus-group-sort-function} variable.  Available sorting functions
3139 include:
3140
3141 @table @code
3142
3143 @item gnus-group-sort-by-alphabet
3144 @findex gnus-group-sort-by-alphabet
3145 Sort the group names alphabetically.  This is the default.
3146
3147 @item gnus-group-sort-by-real-name
3148 @findex gnus-group-sort-by-real-name
3149 Sort the group alphabetically on the real (unprefixed) group names.
3150
3151 @item gnus-group-sort-by-level
3152 @findex gnus-group-sort-by-level
3153 Sort by group level.
3154
3155 @item gnus-group-sort-by-score
3156 @findex gnus-group-sort-by-score
3157 Sort by group score.  @xref{Group Score}.
3158
3159 @item gnus-group-sort-by-rank
3160 @findex gnus-group-sort-by-rank
3161 Sort by group score and then the group level.  The level and the score
3162 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3163
3164 @item gnus-group-sort-by-unread
3165 @findex gnus-group-sort-by-unread
3166 Sort by number of unread articles.
3167
3168 @item gnus-group-sort-by-method
3169 @findex gnus-group-sort-by-method
3170 Sort alphabetically on the select method.
3171
3172 @item gnus-group-sort-by-server
3173 @findex gnus-group-sort-by-server
3174 Sort alphabetically on the Gnus server name.
3175
3176
3177 @end table
3178
3179 @code{gnus-group-sort-function} can also be a list of sorting
3180 functions.  In that case, the most significant sort key function must be
3181 the last one.
3182
3183
3184 There are also a number of commands for sorting directly according to
3185 some sorting criteria:
3186
3187 @table @kbd
3188 @item G S a
3189 @kindex G S a (Group)
3190 @findex gnus-group-sort-groups-by-alphabet
3191 Sort the group buffer alphabetically by group name
3192 (@code{gnus-group-sort-groups-by-alphabet}).
3193
3194 @item G S u
3195 @kindex G S u (Group)
3196 @findex gnus-group-sort-groups-by-unread
3197 Sort the group buffer by the number of unread articles
3198 (@code{gnus-group-sort-groups-by-unread}).
3199
3200 @item G S l
3201 @kindex G S l (Group)
3202 @findex gnus-group-sort-groups-by-level
3203 Sort the group buffer by group level
3204 (@code{gnus-group-sort-groups-by-level}).
3205
3206 @item G S v
3207 @kindex G S v (Group)
3208 @findex gnus-group-sort-groups-by-score
3209 Sort the group buffer by group score
3210 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3211
3212 @item G S r
3213 @kindex G S r (Group)
3214 @findex gnus-group-sort-groups-by-rank
3215 Sort the group buffer by group rank
3216 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3217
3218 @item G S m
3219 @kindex G S m (Group)
3220 @findex gnus-group-sort-groups-by-method
3221 Sort the group buffer alphabetically by back end name
3222 (@code{gnus-group-sort-groups-by-method}).
3223
3224 @item G S n
3225 @kindex G S n (Group)
3226 @findex gnus-group-sort-groups-by-real-name
3227 Sort the group buffer alphabetically by real (unprefixed) group name
3228 (@code{gnus-group-sort-groups-by-real-name}).
3229
3230 @end table
3231
3232 All the commands below obey the process/prefix convention
3233 (@pxref{Process/Prefix}).
3234
3235 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3236 commands will sort in reverse order.
3237
3238 You can also sort a subset of the groups:
3239
3240 @table @kbd
3241 @item G P a
3242 @kindex G P a (Group)
3243 @findex gnus-group-sort-selected-groups-by-alphabet
3244 Sort the groups alphabetically by group name
3245 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3246
3247 @item G P u
3248 @kindex G P u (Group)
3249 @findex gnus-group-sort-selected-groups-by-unread
3250 Sort the groups by the number of unread articles
3251 (@code{gnus-group-sort-selected-groups-by-unread}).
3252
3253 @item G P l
3254 @kindex G P l (Group)
3255 @findex gnus-group-sort-selected-groups-by-level
3256 Sort the groups by group level
3257 (@code{gnus-group-sort-selected-groups-by-level}).
3258
3259 @item G P v
3260 @kindex G P v (Group)
3261 @findex gnus-group-sort-selected-groups-by-score
3262 Sort the groups by group score
3263 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3264
3265 @item G P r
3266 @kindex G P r (Group)
3267 @findex gnus-group-sort-selected-groups-by-rank
3268 Sort the groups by group rank
3269 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3270
3271 @item G P m
3272 @kindex G P m (Group)
3273 @findex gnus-group-sort-selected-groups-by-method
3274 Sort the groups alphabetically by back end name
3275 (@code{gnus-group-sort-selected-groups-by-method}).
3276
3277 @item G P n
3278 @kindex G P n (Group)
3279 @findex gnus-group-sort-selected-groups-by-real-name
3280 Sort the groups alphabetically by real (unprefixed) group name
3281 (@code{gnus-group-sort-selected-groups-by-real-name}).
3282
3283 @item G P s
3284 @kindex G P s (Group)
3285 @findex gnus-group-sort-selected-groups
3286 Sort the groups according to @code{gnus-group-sort-function}.
3287
3288 @end table
3289
3290 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3291 move groups around.
3292
3293
3294 @node Group Maintenance
3295 @section Group Maintenance
3296 @cindex bogus groups
3297
3298 @table @kbd
3299 @item b
3300 @kindex b (Group)
3301 @findex gnus-group-check-bogus-groups
3302 Find bogus groups and delete them
3303 (@code{gnus-group-check-bogus-groups}).
3304
3305 @item F
3306 @kindex F (Group)
3307 @findex gnus-group-find-new-groups
3308 Find new groups and process them (@code{gnus-group-find-new-groups}).
3309 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3310 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3311 to query the server for new groups, and subscribe the new groups as
3312 zombies.
3313
3314 @item C-c C-x
3315 @kindex C-c C-x (Group)
3316 @findex gnus-group-expire-articles
3317 Run all expirable articles in the current group through the expiry
3318 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3319 all expirable articles in the group that have been around for a while.
3320 (@pxref{Expiring Mail}).
3321
3322 @item C-c C-M-x
3323 @kindex C-c C-M-x (Group)
3324 @findex gnus-group-expire-all-groups
3325 Run all expirable articles in all groups through the expiry process
3326 (@code{gnus-group-expire-all-groups}).
3327
3328 @end table
3329
3330
3331 @node Browse Foreign Server
3332 @section Browse Foreign Server
3333 @cindex foreign servers
3334 @cindex browsing servers
3335
3336 @table @kbd
3337 @item B
3338 @kindex B (Group)
3339 @findex gnus-group-browse-foreign-server
3340 You will be queried for a select method and a server name.  Gnus will
3341 then attempt to contact this server and let you browse the groups there
3342 (@code{gnus-group-browse-foreign-server}).
3343 @end table
3344
3345 @findex gnus-browse-mode
3346 A new buffer with a list of available groups will appear.  This buffer
3347 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3348 a lot) like a normal group buffer.
3349
3350 Here's a list of keystrokes available in the browse mode:
3351
3352 @table @kbd
3353 @item n
3354 @kindex n (Browse)
3355 @findex gnus-group-next-group
3356 Go to the next group (@code{gnus-group-next-group}).
3357
3358 @item p
3359 @kindex p (Browse)
3360 @findex gnus-group-prev-group
3361 Go to the previous group (@code{gnus-group-prev-group}).
3362
3363 @item SPACE
3364 @kindex SPACE (Browse)
3365 @findex gnus-browse-read-group
3366 Enter the current group and display the first article
3367 (@code{gnus-browse-read-group}).
3368
3369 @item RET
3370 @kindex RET (Browse)
3371 @findex gnus-browse-select-group
3372 Enter the current group (@code{gnus-browse-select-group}).
3373
3374 @item u
3375 @kindex u (Browse)
3376 @findex gnus-browse-unsubscribe-current-group
3377 Unsubscribe to the current group, or, as will be the case here,
3378 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3379
3380 @item l
3381 @itemx q
3382 @kindex q (Browse)
3383 @kindex l (Browse)
3384 @findex gnus-browse-exit
3385 Exit browse mode (@code{gnus-browse-exit}).
3386
3387 @item d
3388 @kindex d (Browse)
3389 @findex gnus-browse-describe-group
3390 Describe the current group (@code{gnus-browse-describe-group}).
3391
3392 @item ?
3393 @kindex ? (Browse)
3394 @findex gnus-browse-describe-briefly
3395 Describe browse mode briefly (well, there's not much to describe, is
3396 there) (@code{gnus-browse-describe-briefly}).
3397 @end table
3398
3399
3400 @node Exiting Gnus
3401 @section Exiting Gnus
3402 @cindex exiting Gnus
3403
3404 Yes, Gnus is ex(c)iting.
3405
3406 @table @kbd
3407 @item z
3408 @kindex z (Group)
3409 @findex gnus-group-suspend
3410 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3411 but it kills all buffers except the Group buffer.  I'm not sure why this
3412 is a gain, but then who am I to judge?
3413
3414 @item q
3415 @kindex q (Group)
3416 @findex gnus-group-exit
3417 @c @icon{gnus-group-exit}
3418 Quit Gnus (@code{gnus-group-exit}).
3419
3420 @item Q
3421 @kindex Q (Group)
3422 @findex gnus-group-quit
3423 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3424 The dribble file will be saved, though (@pxref{Auto Save}).
3425 @end table
3426
3427 @vindex gnus-exit-gnus-hook
3428 @vindex gnus-suspend-gnus-hook
3429 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3430 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3431 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3432 exiting Gnus.
3433
3434 @findex gnus-unload
3435 @cindex unloading
3436 If you wish to completely unload Gnus and all its adherents, you can use
3437 the @code{gnus-unload} command.  This command is also very handy when
3438 trying to customize meta-variables.
3439
3440 Note:
3441
3442 @quotation
3443 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3444 numbly heavy and herself fall into a hazy trance as the boy sitting
3445 behind her drew repeated lines with his pencil across the back of her
3446 plastic chair.
3447 @end quotation
3448
3449
3450 @node Group Topics
3451 @section Group Topics
3452 @cindex topics
3453
3454 If you read lots and lots of groups, it might be convenient to group
3455 them hierarchically according to topics.  You put your Emacs groups over
3456 here, your sex groups over there, and the rest (what, two groups or so?)
3457 you put in some misc section that you never bother with anyway.  You can
3458 even group the Emacs sex groups as a sub-topic to either the Emacs
3459 groups or the sex groups---or both!  Go wild!
3460
3461 @iftex
3462 @iflatex
3463 \gnusfigure{Group Topics}{400}{
3464 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3465 }
3466 @end iflatex
3467 @end iftex
3468
3469 Here's an example:
3470
3471 @example
3472 Gnus
3473   Emacs -- I wuw it!
3474      3: comp.emacs
3475      2: alt.religion.emacs
3476     Naughty Emacs
3477      452: alt.sex.emacs
3478        0: comp.talk.emacs.recovery
3479   Misc
3480      8: comp.binaries.fractals
3481     13: comp.sources.unix
3482 @end example
3483
3484 @findex gnus-topic-mode
3485 @kindex t (Group)
3486 To get this @emph{fab} functionality you simply turn on (ooh!) the
3487 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3488 is a toggling command.)
3489
3490 Go ahead, just try it.  I'll still be here when you get back.  La de
3491 dum...  Nice tune, that...  la la la...  What, you're back?  Yes, and
3492 now press @kbd{l}.  There.  All your groups are now listed under
3493 @samp{misc}.  Doesn't that make you feel all warm and fuzzy?  Hot and
3494 bothered?
3495
3496 If you want this permanently enabled, you should add that minor mode to
3497 the hook for the group mode.  Put the following line in your
3498 @file{~/.gnus} file:
3499
3500 @lisp
3501 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3502 @end lisp
3503
3504 @menu
3505 * Topic Commands::              Interactive E-Z commands.
3506 * Topic Variables::             How to customize the topics the Lisp Way.
3507 * Topic Sorting::               Sorting each topic individually.
3508 * Topic Topology::              A map of the world.
3509 * Topic Parameters::            Parameters that apply to all groups in a topic.
3510 @end menu
3511
3512
3513 @node Topic Commands
3514 @subsection Topic Commands
3515 @cindex topic commands
3516
3517 When the topic minor mode is turned on, a new @kbd{T} submap will be
3518 available.  In addition, a few of the standard keys change their
3519 definitions slightly.
3520
3521 In general, the following kinds of operations are possible on topics.
3522 First of all, you want to create topics.  Secondly, you want to put
3523 groups in topics and to move them around until you have an order you
3524 like.  The third kind of operation is to show/hide parts of the whole
3525 shebang.  You might want to hide a topic including its subtopics and
3526 groups, to get a better overview of the other groups.
3527
3528 Here is a list of the basic keys that you might need to set up topics
3529 the way you like.
3530
3531 @table @kbd
3532
3533 @item T n
3534 @kindex T n (Topic)
3535 @findex gnus-topic-create-topic
3536 Prompt for a new topic name and create it
3537 (@code{gnus-topic-create-topic}).
3538
3539 @item T TAB
3540 @itemx TAB
3541 @kindex T TAB (Topic)
3542 @kindex TAB (Topic)
3543 @findex gnus-topic-indent
3544 ``Indent'' the current topic so that it becomes a sub-topic of the
3545 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3546 ``un-indent'' the topic instead.
3547
3548 @item M-TAB
3549 @kindex M-TAB (Topic)
3550 @findex gnus-topic-unindent
3551 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3552 parent of its current parent (@code{gnus-topic-unindent}).
3553
3554 @end table
3555
3556 The following two keys can be used to move groups and topics around.
3557 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3558 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3559 kill and yank rather than cut and paste.
3560
3561 @table @kbd
3562
3563 @item C-k
3564 @kindex C-k (Topic)
3565 @findex gnus-topic-kill-group
3566 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3567 topic will be removed along with the topic.
3568
3569 @item C-y
3570 @kindex C-y (Topic)
3571 @findex gnus-topic-yank-group
3572 Yank the previously killed group or topic
3573 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3574 before all groups.
3575
3576 So, to move a topic to the beginning of the list of topics, just hit
3577 @kbd{C-k} on it.  This is like the `cut' part of cut and paste.  Then,
3578 move the cursor to the beginning of the buffer (just below the `Gnus'
3579 topic) and hit @kbd{C-y}.  This is like the `paste' part of cut and
3580 paste.  Like I said -- E-Z.
3581
3582 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3583 you can move topics around as well as groups.
3584
3585 @end table
3586
3587 After setting up the topics the way you like them, you might wish to
3588 hide a topic, or to show it again.  That's why we have the following
3589 key.
3590
3591 @table @kbd
3592
3593 @item RET
3594 @kindex RET (Topic)
3595 @findex gnus-topic-select-group
3596 @itemx SPACE
3597 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3598 When you perform this command on a group, you'll enter the group, as
3599 usual.  When done on a topic line, the topic will be folded (if it was
3600 visible) or unfolded (if it was folded already).  So it's basically a
3601 toggling command on topics.  In addition, if you give a numerical
3602 prefix, group on that level (and lower) will be displayed.
3603
3604 @end table
3605
3606 Now for a list of other commands, in no particular order.
3607
3608 @table @kbd
3609
3610 @item T m
3611 @kindex T m (Topic)
3612 @findex gnus-topic-move-group
3613 Move the current group to some other topic
3614 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3615 convention (@pxref{Process/Prefix}).
3616
3617 @item T j
3618 @kindex T j (Topic)
3619 @findex gnus-topic-jump-to-topic
3620 Go to a topic (@code{gnus-topic-jump-to-topic}).
3621
3622 @item T c
3623 @kindex T c (Topic)
3624 @findex gnus-topic-copy-group
3625 Copy the current group to some other topic
3626 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3627 convention (@pxref{Process/Prefix}).
3628
3629 @item T h
3630 @kindex T h (Topic)
3631 @findex gnus-topic-hide-topic
3632 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3633 a prefix, hide the topic permanently.
3634
3635 @item T s
3636 @kindex T s (Topic)
3637 @findex gnus-topic-show-topic
3638 Show the current topic (@code{gnus-topic-show-topic}).  If given
3639 a prefix, show the topic permanently.
3640
3641 @item T D
3642 @kindex T D (Topic)
3643 @findex gnus-topic-remove-group
3644 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3645 This command is mainly useful if you have the same group in several
3646 topics and wish to remove it from one of the topics.  You may also
3647 remove a group from all topics, but in that case, Gnus will add it to
3648 the root topic the next time you start Gnus.  In fact, all new groups
3649 (which, naturally, don't belong to any topic) will show up in the root
3650 topic.
3651
3652 This command uses the process/prefix convention
3653 (@pxref{Process/Prefix}).
3654
3655 @item T M
3656 @kindex T M (Topic)
3657 @findex gnus-topic-move-matching
3658 Move all groups that match some regular expression to a topic
3659 (@code{gnus-topic-move-matching}).
3660
3661 @item T C
3662 @kindex T C (Topic)
3663 @findex gnus-topic-copy-matching
3664 Copy all groups that match some regular expression to a topic
3665 (@code{gnus-topic-copy-matching}).
3666
3667 @item T H
3668 @kindex T H (Topic)
3669 @findex gnus-topic-toggle-display-empty-topics
3670 Toggle hiding empty topics
3671 (@code{gnus-topic-toggle-display-empty-topics}).
3672
3673 @item T #
3674 @kindex T # (Topic)
3675 @findex gnus-topic-mark-topic
3676 Mark all groups in the current topic with the process mark
3677 (@code{gnus-topic-mark-topic}).
3678
3679 @item T M-#
3680 @kindex T M-# (Topic)
3681 @findex gnus-topic-unmark-topic
3682 Remove the process mark from all groups in the current topic
3683 (@code{gnus-topic-unmark-topic}).
3684
3685 @item C-c C-x
3686 @kindex C-c C-x (Topic)
3687 @findex gnus-topic-expire-articles
3688 Run all expirable articles in the current group or topic through the
3689 expiry process (if any)
3690 (@code{gnus-topic-expire-articles}). (@pxref{Expiring Mail}).
3691
3692 @item T r
3693 @kindex T r (Topic)
3694 @findex gnus-topic-rename
3695 Rename a topic (@code{gnus-topic-rename}).
3696
3697 @item T DEL
3698 @kindex T DEL (Topic)
3699 @findex gnus-topic-delete
3700 Delete an empty topic (@code{gnus-topic-delete}).
3701
3702 @item A T
3703 @kindex A T (Topic)
3704 @findex gnus-topic-list-active
3705 List all groups that Gnus knows about in a topics-ified way
3706 (@code{gnus-topic-list-active}).
3707
3708 @item T M-n
3709 @kindex T M-n (Topic)
3710 @findex gnus-topic-goto-next-topic
3711 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3712
3713 @item T M-p
3714 @kindex T M-p (Topic)
3715 @findex gnus-topic-goto-previous-topic
3716 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3717
3718 @item G p
3719 @kindex G p (Topic)
3720 @findex gnus-topic-edit-parameters
3721 @cindex group parameters
3722 @cindex topic parameters
3723 @cindex parameters
3724 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3725 @xref{Topic Parameters}.
3726
3727 @end table
3728
3729
3730 @node Topic Variables
3731 @subsection Topic Variables
3732 @cindex topic variables
3733
3734 The previous section told you how to tell Gnus which topics to display.
3735 This section explains how to tell Gnus what to display about each topic.
3736
3737 @vindex gnus-topic-line-format
3738 The topic lines themselves are created according to the
3739 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3740 Valid elements are:
3741
3742 @table @samp
3743 @item i
3744 Indentation.
3745 @item n
3746 Topic name.
3747 @item v
3748 Visibility.
3749 @item l
3750 Level.
3751 @item g
3752 Number of groups in the topic.
3753 @item a
3754 Number of unread articles in the topic.
3755 @item A
3756 Number of unread articles in the topic and all its subtopics.
3757 @end table
3758
3759 @vindex gnus-topic-indent-level
3760 Each sub-topic (and the groups in the sub-topics) will be indented with
3761 @code{gnus-topic-indent-level} times the topic level number of spaces.
3762 The default is 2.
3763
3764 @vindex gnus-topic-mode-hook
3765 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3766
3767 @vindex gnus-topic-display-empty-topics
3768 The @code{gnus-topic-display-empty-topics} says whether to display even
3769 topics that have no unread articles in them.  The default is @code{t}.
3770
3771
3772 @node Topic Sorting
3773 @subsection Topic Sorting
3774 @cindex topic sorting
3775
3776 You can sort the groups in each topic individually with the following
3777 commands:
3778
3779
3780 @table @kbd
3781 @item T S a
3782 @kindex T S a (Topic)
3783 @findex gnus-topic-sort-groups-by-alphabet
3784 Sort the current topic alphabetically by group name
3785 (@code{gnus-topic-sort-groups-by-alphabet}).
3786
3787 @item T S u
3788 @kindex T S u (Topic)
3789 @findex gnus-topic-sort-groups-by-unread
3790 Sort the current topic by the number of unread articles
3791 (@code{gnus-topic-sort-groups-by-unread}).
3792
3793 @item T S l
3794 @kindex T S l (Topic)
3795 @findex gnus-topic-sort-groups-by-level
3796 Sort the current topic by group level
3797 (@code{gnus-topic-sort-groups-by-level}).
3798
3799 @item T S v
3800 @kindex T S v (Topic)
3801 @findex gnus-topic-sort-groups-by-score
3802 Sort the current topic by group score
3803 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3804
3805 @item T S r
3806 @kindex T S r (Topic)
3807 @findex gnus-topic-sort-groups-by-rank
3808 Sort the current topic by group rank
3809 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3810
3811 @item T S m
3812 @kindex T S m (Topic)
3813 @findex gnus-topic-sort-groups-by-method
3814 Sort the current topic alphabetically by back end name
3815 (@code{gnus-topic-sort-groups-by-method}).
3816
3817 @item T S e
3818 @kindex T S e (Topic)
3819 @findex gnus-topic-sort-groups-by-server
3820 Sort the current topic alphabetically by server name
3821 (@code{gnus-topic-sort-groups-by-server}).
3822
3823 @item T S s
3824 @kindex T S s
3825 @findex gnus-topic-sort-groups
3826 Sort the current topic according to the function(s) given by the
3827 @code{gnus-group-sort-function} variable
3828 (@code{gnus-topic-sort-groups}).
3829
3830 @end table
3831
3832 When given a prefix argument, all these commands will sort in reverse
3833 order.  @xref{Sorting Groups}, for more information about group
3834 sorting.
3835
3836
3837 @node Topic Topology
3838 @subsection Topic Topology
3839 @cindex topic topology
3840 @cindex topology
3841
3842 So, let's have a look at an example group buffer:
3843
3844 @example
3845 Gnus
3846   Emacs -- I wuw it!
3847      3: comp.emacs
3848      2: alt.religion.emacs
3849     Naughty Emacs
3850      452: alt.sex.emacs
3851        0: comp.talk.emacs.recovery
3852   Misc
3853      8: comp.binaries.fractals
3854     13: comp.sources.unix
3855 @end example
3856
3857 So, here we have one top-level topic (@samp{Gnus}), two topics under
3858 that, and one sub-topic under one of the sub-topics.  (There is always
3859 just one (1) top-level topic).  This topology can be expressed as
3860 follows:
3861
3862 @lisp
3863 (("Gnus" visible)
3864  (("Emacs -- I wuw it!" visible)
3865   (("Naughty Emacs" visible)))
3866  (("Misc" visible)))
3867 @end lisp
3868
3869 @vindex gnus-topic-topology
3870 This is in fact how the variable @code{gnus-topic-topology} would look
3871 for the display above.  That variable is saved in the @file{.newsrc.eld}
3872 file, and shouldn't be messed with manually---unless you really want
3873 to.  Since this variable is read from the @file{.newsrc.eld} file,
3874 setting it in any other startup files will have no effect.
3875
3876 This topology shows what topics are sub-topics of what topics (right),
3877 and which topics are visible.  Two settings are currently
3878 allowed---@code{visible} and @code{invisible}.
3879
3880
3881 @node Topic Parameters
3882 @subsection Topic Parameters
3883 @cindex topic parameters
3884
3885 All groups in a topic will inherit group parameters from the parent (and
3886 ancestor) topic parameters.  All valid group parameters are valid topic
3887 parameters (@pxref{Group Parameters}).
3888
3889 In addition, the following parameters are only valid as topic
3890 parameters:
3891
3892 @table @code
3893 @item subscribe
3894 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3895 @code{subscribe} topic parameter says what groups go in what topic.  Its
3896 value should be a regexp to match the groups that should go in that
3897 topic.
3898
3899 @item subscribe-level
3900 When subscribing new groups by topic (see the @code{subscribe} parameter),
3901 the group will be subscribed with the level specified in the
3902 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3903
3904 @end table
3905
3906 Group parameters (of course) override topic parameters, and topic
3907 parameters in sub-topics override topic parameters in super-topics.  You
3908 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3909 verb, although you may feel free to disagree with me here.)
3910
3911 @example
3912 Gnus
3913   Emacs
3914      3: comp.emacs
3915      2: alt.religion.emacs
3916    452: alt.sex.emacs
3917     Relief
3918      452: alt.sex.emacs
3919        0: comp.talk.emacs.recovery
3920   Misc
3921      8: comp.binaries.fractals
3922     13: comp.sources.unix
3923    452: alt.sex.emacs
3924 @end example
3925
3926 The @samp{Emacs} topic has the topic parameter @code{(score-file
3927 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3928 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3929 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3930 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3931 . "religion.SCORE")}.
3932
3933 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
3934 will get the @file{relief.SCORE} home score file.  If you enter the same
3935 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
3936 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
3937 get the @file{religion.SCORE} home score file.
3938
3939 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
3940 there are some problems, especially with the @code{total-expiry}
3941 parameter.  Say you have a mail group in two topics; one with
3942 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
3943 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
3944 of these topics you mean to expire articles from, so anything may
3945 happen.  In fact, I hereby declare that it is @dfn{undefined} what
3946 happens.  You just have to be careful if you do stuff like that.
3947
3948
3949 @node Misc Group Stuff
3950 @section Misc Group Stuff
3951
3952 @menu
3953 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
3954 * Group Information::           Information and help on groups and Gnus.
3955 * Group Timestamp::             Making Gnus keep track of when you last read a group.
3956 * File Commands::               Reading and writing the Gnus files.
3957 * Sieve Commands::              Managing Sieve scripts.
3958 @end menu
3959
3960 @table @kbd
3961
3962 @item ^
3963 @kindex ^ (Group)
3964 @findex gnus-group-enter-server-mode
3965 Enter the server buffer (@code{gnus-group-enter-server-mode}).
3966 @xref{Server Buffer}.
3967
3968 @item a
3969 @kindex a (Group)
3970 @findex gnus-group-post-news
3971 Start composing a message (a news by default)
3972 (@code{gnus-group-post-news}).  If given a prefix, post to the group
3973 under the point.  If the prefix is 1, prompt for a group to post to.
3974 Contrary to what the name of this function suggests, the prepared
3975 article might be a mail instead of a news, if a mail group is specified
3976 with the prefix argument.  @xref{Composing Messages}.
3977
3978 @item m
3979 @kindex m (Group)
3980 @findex gnus-group-mail
3981 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
3982 use the posting style of the group under the point.  If the prefix is 1,
3983 prompt for a group name to find the posting style.
3984 @xref{Composing Messages}.
3985
3986 @item i
3987 @kindex i (Group)
3988 @findex gnus-group-news
3989 Start composing a news (@code{gnus-group-news}).  If given a prefix,
3990 post to the group under the point.  If the prefix is 1, prompt
3991 for group to post to.  @xref{Composing Messages}.
3992
3993 This function actually prepares a news even when using mail groups.
3994 This is useful for "posting" messages to mail groups without actually
3995 sending them over the network: they're just saved directly to the group
3996 in question.  The corresponding back end must have a request-post method
3997 for this to work though.
3998
3999 @end table
4000
4001 Variables for the group buffer:
4002
4003 @table @code
4004
4005 @item gnus-group-mode-hook
4006 @vindex gnus-group-mode-hook
4007 is called after the group buffer has been
4008 created.
4009
4010 @item gnus-group-prepare-hook
4011 @vindex gnus-group-prepare-hook
4012 is called after the group buffer is
4013 generated.  It may be used to modify the buffer in some strange,
4014 unnatural way.
4015
4016 @item gnus-group-prepared-hook
4017 @vindex gnus-group-prepare-hook
4018 is called as the very last thing after the group buffer has been
4019 generated.  It may be used to move point around, for instance.
4020
4021 @item gnus-permanently-visible-groups
4022 @vindex gnus-permanently-visible-groups
4023 Groups matching this regexp will always be listed in the group buffer,
4024 whether they are empty or not.
4025
4026 @item gnus-group-name-charset-method-alist
4027 @vindex gnus-group-name-charset-method-alist
4028 An alist of method and the charset for group names. It is used to show
4029 non-ASCII group names.
4030
4031 For example:
4032 @lisp
4033 (setq gnus-group-name-charset-method-alist
4034     '(((nntp "news.com.cn") . cn-gb-2312)))
4035 @end lisp
4036
4037 @item gnus-group-name-charset-group-alist
4038 @cindex UTF-8 group names
4039 @vindex gnus-group-name-charset-group-alist
4040 An alist of regexp of group name and the charset for group names.  It
4041 is used to show non-ASCII group names.  @code{((".*" utf-8))} is the
4042 default value if UTF-8 is supported, otherwise the default is
4043 @code{nil}.
4044
4045 For example:
4046 @lisp
4047 (setq gnus-group-name-charset-group-alist
4048     '(("\\.com\\.cn:" . cn-gb-2312)))
4049 @end lisp
4050
4051 @end table
4052
4053 @node Scanning New Messages
4054 @subsection Scanning New Messages
4055 @cindex new messages
4056 @cindex scanning new news
4057
4058 @table @kbd
4059
4060 @item g
4061 @kindex g (Group)
4062 @findex gnus-group-get-new-news
4063 @c @icon{gnus-group-get-new-news}
4064 Check the server(s) for new articles.  If the numerical prefix is used,
4065 this command will check only groups of level @var{arg} and lower
4066 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4067 command will force a total re-reading of the active file(s) from the
4068 back end(s).
4069
4070 @item M-g
4071 @kindex M-g (Group)
4072 @findex gnus-group-get-new-news-this-group
4073 @vindex gnus-goto-next-group-when-activating
4074 @c @icon{gnus-group-get-new-news-this-group}
4075 Check whether new articles have arrived in the current group
4076 (@code{gnus-group-get-new-news-this-group}).
4077 @code{gnus-goto-next-group-when-activating} says whether this command is
4078 to move point to the next group or not.  It is @code{t} by default.
4079
4080 @findex gnus-activate-all-groups
4081 @cindex activating groups
4082 @item C-c M-g
4083 @kindex C-c M-g (Group)
4084 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4085
4086 @item R
4087 @kindex R (Group)
4088 @cindex restarting
4089 @findex gnus-group-restart
4090 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4091 file(s), closes the connection to all servers, clears up all run-time
4092 Gnus variables, and then starts Gnus all over again.
4093
4094 @end table
4095
4096 @vindex gnus-get-new-news-hook
4097 @code{gnus-get-new-news-hook} is run just before checking for new news.
4098
4099 @vindex gnus-after-getting-new-news-hook
4100 @code{gnus-after-getting-new-news-hook} is run after checking for new
4101 news.
4102
4103
4104 @node Group Information
4105 @subsection Group Information
4106 @cindex group information
4107 @cindex information on groups
4108
4109 @table @kbd
4110
4111
4112 @item H f
4113 @kindex H f (Group)
4114 @findex gnus-group-fetch-faq
4115 @vindex gnus-group-faq-directory
4116 @cindex FAQ
4117 @cindex ange-ftp
4118 Try to fetch the FAQ for the current group
4119 (@code{gnus-group-fetch-faq}).  Gnus will try to get the FAQ from
4120 @code{gnus-group-faq-directory}, which is usually a directory on a
4121 remote machine.  This variable can also be a list of directories.  In
4122 that case, giving a prefix to this command will allow you to choose
4123 between the various sites.  @code{ange-ftp} (or @code{efs}) will be used
4124 for fetching the file.
4125
4126 If fetching from the first site is unsuccessful, Gnus will attempt to go
4127 through @code{gnus-group-faq-directory} and try to open them one by one.
4128
4129 @item H c
4130 @kindex H c (Group)
4131 @findex gnus-group-fetch-charter
4132 @vindex gnus-group-charter-alist
4133 @cindex charter
4134 Try to open the charter for the current group in a web browser
4135 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4136 prefix argument.
4137
4138 Gnus will use @code{gnus-group-charter-alist} to find the location of
4139 the charter.  If no location is known, Gnus will fetch the control
4140 messages for the group, which in some cases includes the charter.
4141
4142 @item H C
4143 @kindex H C (Group)
4144 @findex gnus-group-fetch-control
4145 @vindex gnus-group-fetch-control-use-browse-url
4146 @cindex control message
4147 Fetch the control messages for the group from the archive at
4148 @code{ftp.isc.org} (@code{gnus-group-fetch-control}). Query for a
4149 group if given a prefix argument.
4150
4151 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4152 Gnus will open the control messages in a browser using
4153 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4154 and displayed in an ephemeral group.
4155
4156 Note that the control messages are compressed.  To use this command
4157 you need to turn on @code{auto-compression-mode}
4158 (@pxref{(emacs)Compressed Files}).
4159
4160 @item H d
4161 @itemx C-c C-d
4162 @c @icon{gnus-group-describe-group}
4163 @kindex H d (Group)
4164 @kindex C-c C-d (Group)
4165 @cindex describing groups
4166 @cindex group description
4167 @findex gnus-group-describe-group
4168 Describe the current group (@code{gnus-group-describe-group}).  If given
4169 a prefix, force Gnus to re-read the description from the server.
4170
4171 @item M-d
4172 @kindex M-d (Group)
4173 @findex gnus-group-describe-all-groups
4174 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4175 prefix, force Gnus to re-read the description file from the server.
4176
4177 @item H v
4178 @itemx V
4179 @kindex V (Group)
4180 @kindex H v (Group)
4181 @cindex version
4182 @findex gnus-version
4183 Display current Gnus version numbers (@code{gnus-version}).
4184
4185 @item ?
4186 @kindex ? (Group)
4187 @findex gnus-group-describe-briefly
4188 Give a very short help message (@code{gnus-group-describe-briefly}).
4189
4190 @item C-c C-i
4191 @kindex C-c C-i (Group)
4192 @cindex info
4193 @cindex manual
4194 @findex gnus-info-find-node
4195 Go to the Gnus info node (@code{gnus-info-find-node}).
4196 @end table
4197
4198
4199 @node Group Timestamp
4200 @subsection Group Timestamp
4201 @cindex timestamps
4202 @cindex group timestamps
4203
4204 It can be convenient to let Gnus keep track of when you last read a
4205 group.  To set the ball rolling, you should add
4206 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4207
4208 @lisp
4209 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4210 @end lisp
4211
4212 After doing this, each time you enter a group, it'll be recorded.
4213
4214 This information can be displayed in various ways---the easiest is to
4215 use the @samp{%d} spec in the group line format:
4216
4217 @lisp
4218 (setq gnus-group-line-format
4219       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4220 @end lisp
4221
4222 This will result in lines looking like:
4223
4224 @example
4225 *        0: mail.ding                                19961002T012943
4226          0: custom                                   19961002T012713
4227 @end example
4228
4229 As you can see, the date is displayed in compact ISO 8601 format.  This
4230 may be a bit too much, so to just display the date, you could say
4231 something like:
4232
4233 @lisp
4234 (setq gnus-group-line-format
4235       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4236 @end lisp
4237
4238 If you would like greater control of the time format, you can use a
4239 user-defined format spec.  Something like the following should do the
4240 trick:
4241
4242 @lisp
4243 (setq gnus-group-line-format
4244       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4245 (defun gnus-user-format-function-d (headers)
4246   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4247     (if time
4248         (format-time-string "%b %d  %H:%M" time)
4249       "")))
4250 @end lisp
4251
4252
4253 @node File Commands
4254 @subsection File Commands
4255 @cindex file commands
4256
4257 @table @kbd
4258
4259 @item r
4260 @kindex r (Group)
4261 @findex gnus-group-read-init-file
4262 @vindex gnus-init-file
4263 @cindex reading init file
4264 Re-read the init file (@code{gnus-init-file}, which defaults to
4265 @file{~/.gnus}) (@code{gnus-group-read-init-file}).
4266
4267 @item s
4268 @kindex s (Group)
4269 @findex gnus-group-save-newsrc
4270 @cindex saving .newsrc
4271 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4272 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4273 file(s) whether Gnus thinks it is necessary or not.
4274
4275 @c @item Z
4276 @c @kindex Z (Group)
4277 @c @findex gnus-group-clear-dribble
4278 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4279
4280 @end table
4281
4282
4283 @node Sieve Commands
4284 @subsection Sieve Commands
4285 @cindex group sieve commands
4286
4287 Sieve is a server-side mail filtering language.  In Gnus you can use
4288 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4289 sieve rules that should apply to each group.  Gnus provides two
4290 commands to translate all these group parameters into a proper Sieve
4291 script that can be transfered to the server somehow.
4292
4293 @vindex gnus-sieve-file
4294 @vindex gnus-sieve-region-start
4295 @vindex gnus-sieve-region-end
4296 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4297 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4298 between two delimiters, @code{gnus-sieve-region-start} and
4299 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4300 outside these delimiters that will not be removed the next time you
4301 regenerate the Sieve script.
4302
4303 @vindex gnus-sieve-crosspost
4304 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4305 is generated.  If it is non-@code{nil} (the default) articles is
4306 placed in all groups that have matching rules, otherwise the article
4307 is only placed in the group with the first matching rule.  For
4308 example, the group parameter @samp{(sieve address "sender"
4309 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4310 code if @code{gnus-sieve-crosspost} is @code{nil}. (When
4311 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4312 except that the line containing the call to @code{stop} is removed.)
4313
4314 @example
4315 if address "sender" "owner-ding@@hpc.uh.edu" @{
4316         fileinto "INBOX.ding";
4317         stop;
4318 @}
4319 @end example
4320
4321 @xref{Top, ,Top, sieve, Emacs Sieve}.
4322
4323 @table @kbd
4324
4325 @item D g
4326 @kindex D g (Group)
4327 @findex gnus-sieve-generate
4328 @vindex gnus-sieve-file
4329 @cindex generating sieve script
4330 Regenerate a Sieve script from the @code{sieve} group parameters and
4331 put you into the @code{gnus-sieve-file} without saving it.
4332
4333 @item D u
4334 @kindex D u (Group)
4335 @findex gnus-sieve-update
4336 @vindex gnus-sieve-file
4337 @cindex updating sieve script
4338 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4339 @code{sieve} group parameters, save the file and upload it to the
4340 server using the @code{sieveshell} program.
4341
4342 @end table
4343
4344
4345 @node Summary Buffer
4346 @chapter Summary Buffer
4347 @cindex summary buffer
4348
4349 A line for each article is displayed in the summary buffer.  You can
4350 move around, read articles, post articles and reply to articles.
4351
4352 The most common way to a summary buffer is to select a group from the
4353 group buffer (@pxref{Selecting a Group}).
4354
4355 You can have as many summary buffers open as you wish.
4356
4357 @menu
4358 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4359 * Summary Maneuvering::         Moving around the summary buffer.
4360 * Choosing Articles::           Reading articles.
4361 * Paging the Article::          Scrolling the current article.
4362 * Reply Followup and Post::     Posting articles.
4363 * Delayed Articles::            Send articles at a later time.
4364 * Marking Articles::            Marking articles as read, expirable, etc.
4365 * Limiting::                    You can limit the summary buffer.
4366 * Threading::                   How threads are made.
4367 * Sorting the Summary Buffer::  How articles and threads are sorted.
4368 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4369 * Article Caching::             You may store articles in a cache.
4370 * Persistent Articles::         Making articles expiry-resistant.
4371 * Article Backlog::             Having already read articles hang around.
4372 * Saving Articles::             Ways of customizing article saving.
4373 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4374 * Article Treatment::           The article buffer can be mangled at will.
4375 * MIME Commands::               Doing MIMEy things with the articles.
4376 * Charsets::                    Character set issues.
4377 * Article Commands::            Doing various things with the article buffer.
4378 * Summary Sorting::             Sorting the summary buffer in various ways.
4379 * Finding the Parent::          No child support? Get the parent.
4380 * Alternative Approaches::      Reading using non-default summaries.
4381 * Tree Display::                A more visual display of threads.
4382 * Mail Group Commands::         Some commands can only be used in mail groups.
4383 * Various Summary Stuff::       What didn't fit anywhere else.
4384 * Exiting the Summary Buffer::  Returning to the Group buffer,
4385                                 or reselecting the current group.
4386 * Crosspost Handling::          How crossposted articles are dealt with.
4387 * Duplicate Suppression::       An alternative when crosspost handling fails.
4388 * Security::                    Decrypt and Verify.
4389 * Mailing List::                Mailing list minor mode.
4390 @end menu
4391
4392
4393 @node Summary Buffer Format
4394 @section Summary Buffer Format
4395 @cindex summary buffer format
4396
4397 @iftex
4398 @iflatex
4399 \gnusfigure{The Summary Buffer}{180}{
4400 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4401 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4402 }
4403 @end iflatex
4404 @end iftex
4405
4406 @menu
4407 * Summary Buffer Lines::        You can specify how summary lines should look.
4408 * To From Newsgroups::          How to not display your own name.
4409 * Summary Buffer Mode Line::    You can say how the mode line should look.
4410 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4411 @end menu
4412
4413 @findex mail-extract-address-components
4414 @findex gnus-extract-address-components
4415 @vindex gnus-extract-address-components
4416 Gnus will use the value of the @code{gnus-extract-address-components}
4417 variable as a function for getting the name and address parts of a
4418 @code{From} header.  Two pre-defined functions exist:
4419 @code{gnus-extract-address-components}, which is the default, quite
4420 fast, and too simplistic solution; and
4421 @code{mail-extract-address-components}, which works very nicely, but is
4422 slower.  The default function will return the wrong answer in 5% of the
4423 cases.  If this is unacceptable to you, use the other function instead:
4424
4425 @lisp
4426 (setq gnus-extract-address-components
4427       'mail-extract-address-components)
4428 @end lisp
4429
4430 @vindex gnus-summary-same-subject
4431 @code{gnus-summary-same-subject} is a string indicating that the current
4432 article has the same subject as the previous.  This string will be used
4433 with those specs that require it.  The default is @code{""}.
4434
4435
4436 @node Summary Buffer Lines
4437 @subsection Summary Buffer Lines
4438
4439 @vindex gnus-summary-line-format
4440 You can change the format of the lines in the summary buffer by changing
4441 the @code{gnus-summary-line-format} variable.  It works along the same
4442 lines as a normal @code{format} string, with some extensions
4443 (@pxref{Formatting Variables}).
4444
4445 There should always be a colon or a point position marker on the line;
4446 the cursor always moves to the point position marker or the colon after
4447 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4448 possible to change this.  Just write a new function
4449 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4450 @xref{Positioning Point}.
4451
4452 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4453
4454 The following format specification characters and extended format
4455 specification(s) are understood:
4456
4457 @table @samp
4458 @item N
4459 Article number.
4460 @item S
4461 Subject string.  List identifiers stripped,
4462 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4463 @item s
4464 Subject if the article is the root of the thread or the previous article
4465 had a different subject, @code{gnus-summary-same-subject} otherwise.
4466 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4467 @item F
4468 Full @code{From} header.
4469 @item n
4470 The name (from the @code{From} header).
4471 @item f
4472 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4473 From Newsgroups}).
4474 @item a
4475 The name (from the @code{From} header).  This differs from the @code{n}
4476 spec in that it uses the function designated by the
4477 @code{gnus-extract-address-components} variable, which is slower, but
4478 may be more thorough.
4479 @item A
4480 The address (from the @code{From} header).  This works the same way as
4481 the @code{a} spec.
4482 @item L
4483 Number of lines in the article.
4484 @item c
4485 Number of characters in the article. This specifier is not supported
4486 in some methods (like nnfolder).
4487 @item k
4488 Pretty-printed version of the number of characters in the article;
4489 for example, @samp{1.2k} or @samp{0.4M}.
4490 @item I
4491 Indentation based on thread level (@pxref{Customizing Threading}).
4492 @item B
4493 A complex trn-style thread tree, showing response-connecting trace
4494 lines.  A thread could be drawn like this:
4495
4496 @example
4497 >
4498 +->
4499 | +->
4500 | | \->
4501 | |   \->
4502 | \->
4503 +->
4504 \->
4505 @end example
4506
4507 You can customize the appearance with the following options.  Note
4508 that it is possible to make the thread display look really neat by
4509 replacing the default ASCII characters with graphic line-drawing
4510 glyphs.
4511 @table @code
4512 @item gnus-sum-thread-tree-root
4513 @vindex gnus-sum-thread-tree-root
4514 Used for the root of a thread.  If @code{nil}, use subject
4515 instead. The default is @samp{> }.
4516
4517 @item gnus-sum-thread-tree-single-indent
4518 @vindex gnus-sum-thread-tree-single-indent
4519 Used for a thread with just one message.  If @code{nil}, use subject
4520 instead.  The default is @samp{}.
4521
4522 @item gnus-sum-thread-tree-vertical
4523 @vindex gnus-sum-thread-tree-vertical
4524 Used for drawing a vertical line.  The default is @samp{| }.
4525
4526 @item gnus-sum-thread-tree-indent
4527 @vindex gnus-sum-thread-tree-indent
4528 Used for indenting.  The default is @samp{  }. 
4529
4530 @item gnus-sum-thread-tree-leaf-with-other
4531 @vindex gnus-sum-thread-tree-leaf-with-other
4532 Used for a leaf with brothers.  The default is @samp{+-> }.
4533
4534 @item gnus-sum-thread-tree-single-leaf
4535 @vindex gnus-sum-thread-tree-single-leaf
4536 Used for a leaf without brothers.  The default is @samp{\-> }
4537
4538 @end table
4539
4540 @item T
4541 Nothing if the article is a root and lots of spaces if it isn't (it
4542 pushes everything after it off the screen).
4543 @item [
4544 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4545 for adopted articles (@pxref{Customizing Threading}).
4546 @item ]
4547 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4548 for adopted articles.
4549 @item >
4550 One space for each thread level.
4551 @item <
4552 Twenty minus thread level spaces.
4553 @item U
4554 Unread. @xref{Read Articles}.
4555
4556 @item R
4557 This misleadingly named specifier is the @dfn{secondary mark}.  This
4558 mark will say whether the article has been replied to, has been cached,
4559 or has been saved.  @xref{Other Marks}.
4560
4561 @item i
4562 Score as a number (@pxref{Scoring}).
4563 @item z
4564 @vindex gnus-summary-zcore-fuzz
4565 Zcore, @samp{+} if above the default level and @samp{-} if below the
4566 default level.  If the difference between
4567 @code{gnus-summary-default-score} and the score is less than
4568 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4569 @item V
4570 Total thread score.
4571 @item x
4572 @code{Xref}.
4573 @item D
4574 @code{Date}.
4575 @item d
4576 The @code{Date} in @code{DD-MMM} format.
4577 @item o
4578 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4579 @item M
4580 @code{Message-ID}.
4581 @item r
4582 @code{References}.
4583 @item t
4584 Number of articles in the current sub-thread.  Using this spec will slow
4585 down summary buffer generation somewhat.
4586 @item e
4587 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4588 article has any children.
4589 @item P
4590 The line number.
4591 @item O
4592 Download mark.
4593 @item &user-date;
4594 Age sensitive date format.  Various date format is defined in
4595 @code{gnus-user-date-format-alist}.
4596 @item u
4597 User defined specifier.  The next character in the format string should
4598 be a letter.  Gnus will call the function
4599 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
4600 following @samp{%u}.  The function will be passed the current header as
4601 argument.  The function should return a string, which will be inserted
4602 into the summary just like information from any other summary specifier.
4603 @end table
4604
4605 Text between @samp{%(} and @samp{%)} will be highlighted with
4606 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4607 There can only be one such area.
4608
4609 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4610 have to be handled with care.  For reasons of efficiency, Gnus will
4611 compute what column these characters will end up in, and ``hard-code''
4612 that.  This means that it is invalid to have these specs after a
4613 variable-length spec.  Well, you might not be arrested, but your summary
4614 buffer will look strange, which is bad enough.
4615
4616 The smart choice is to have these specs as far to the left as possible.
4617 (Isn't that the case with everything, though?  But I digress.)
4618
4619 This restriction may disappear in later versions of Gnus.
4620
4621
4622 @node To From Newsgroups
4623 @subsection To From Newsgroups
4624 @cindex To
4625 @cindex Newsgroups
4626
4627 In some groups (particularly in archive groups), the @code{From} header
4628 isn't very interesting, since all the articles there are written by
4629 you.  To display the information in the @code{To} or @code{Newsgroups}
4630 headers instead, you need to decide three things: What information to
4631 gather; where to display it; and when to display it.
4632
4633 @enumerate
4634 @item
4635 @vindex gnus-extra-headers
4636 The reading of extra header information is controlled by the
4637 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4638 instance:
4639
4640 @lisp
4641 (setq gnus-extra-headers
4642       '(To Newsgroups X-Newsreader))
4643 @end lisp
4644
4645 This will result in Gnus trying to obtain these three headers, and
4646 storing it in header structures for later easy retrieval.
4647
4648 @item
4649 @findex gnus-extra-header
4650 The value of these extra headers can be accessed via the
4651 @code{gnus-extra-header} function.  Here's a format line spec that will
4652 access the @code{X-Newsreader} header:
4653
4654 @example
4655 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4656 @end example
4657
4658 @item
4659 @vindex gnus-ignored-from-addresses
4660 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4661 summary line spec returns the @code{To}, @code{Newsreader} or
4662 @code{From} header.  If this regexp matches the contents of the
4663 @code{From} header, the value of the @code{To} or @code{Newsreader}
4664 headers are used instead.
4665
4666 @end enumerate
4667
4668 @vindex nnmail-extra-headers
4669 A related variable is @code{nnmail-extra-headers}, which controls when
4670 to include extra headers when generating overview (@sc{nov}) files.  If
4671 you have old overview files, you should regenerate them after changing
4672 this variable, by entering the server buffer using `^', and then `g' on
4673 the appropriate mail server (e.g. nnml) to cause regeneration.
4674
4675 @vindex gnus-summary-line-format
4676 You also have to instruct Gnus to display the data by changing the
4677 @code{%n} spec to the @code{%f} spec in the
4678 @code{gnus-summary-line-format} variable.
4679
4680 In summary, you'd typically put something like the following in
4681 @file{~/.gnus}:
4682
4683 @lisp
4684 (setq gnus-extra-headers
4685       '(To Newsgroups))
4686 (setq nnmail-extra-headers gnus-extra-headers)
4687 (setq gnus-summary-line-format
4688       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4689 (setq gnus-ignored-from-addresses
4690       "Your Name Here")
4691 @end lisp
4692
4693 (The values listed above are the default values in Gnus.  Alter them
4694 to fit your needs.)
4695
4696 A note for news server administrators, or for users who wish to try to
4697 convince their news server administrator to provide some additional
4698 support:
4699
4700 The above is mostly useful for mail groups, where you have control over
4701 the @sc{nov} files that are created.  However, if you can persuade your
4702 nntp admin to add (in the usual implementation, notably INN):
4703
4704 @example
4705 Newsgroups:full
4706 @end example
4707
4708 to the end of her @file{overview.fmt} file, then you can use that just
4709 as you would the extra headers from the mail groups.
4710
4711
4712 @node Summary Buffer Mode Line
4713 @subsection Summary Buffer Mode Line
4714
4715 @vindex gnus-summary-mode-line-format
4716 You can also change the format of the summary mode bar (@pxref{Mode Line
4717 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4718 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4719
4720 Here are the elements you can play with:
4721
4722 @table @samp
4723 @item G
4724 Group name.
4725 @item p
4726 Unprefixed group name.
4727 @item A
4728 Current article number.
4729 @item z
4730 Current article score.
4731 @item V
4732 Gnus version.
4733 @item U
4734 Number of unread articles in this group.
4735 @item e
4736 Number of unread articles in this group that aren't displayed in the
4737 summary buffer.
4738 @item Z
4739 A string with the number of unread and unselected articles represented
4740 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4741 articles, and just as @samp{<%U more>} if there are just unread articles
4742 and no unselected ones.
4743 @item g
4744 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4745 shortened to @samp{r.a.anime}.
4746 @item S
4747 Subject of the current article.
4748 @item u
4749 User-defined spec (@pxref{User-Defined Specs}).
4750 @item s
4751 Name of the current score file (@pxref{Scoring}).
4752 @item d
4753 Number of dormant articles (@pxref{Unread Articles}).
4754 @item t
4755 Number of ticked articles (@pxref{Unread Articles}).
4756 @item r
4757 Number of articles that have been marked as read in this session.
4758 @item E
4759 Number of articles expunged by the score files.
4760 @end table
4761
4762
4763 @node Summary Highlighting
4764 @subsection Summary Highlighting
4765
4766 @table @code
4767
4768 @item gnus-visual-mark-article-hook
4769 @vindex gnus-visual-mark-article-hook
4770 This hook is run after selecting an article.  It is meant to be used for
4771 highlighting the article in some way.  It is not run if
4772 @code{gnus-visual} is @code{nil}.
4773
4774 @item gnus-summary-update-hook
4775 @vindex gnus-summary-update-hook
4776 This hook is called when a summary line is changed.  It is not run if
4777 @code{gnus-visual} is @code{nil}.
4778
4779 @item gnus-summary-selected-face
4780 @vindex gnus-summary-selected-face
4781 This is the face (or @dfn{font} as some people call it) used to
4782 highlight the current article in the summary buffer.
4783
4784 @item gnus-summary-highlight
4785 @vindex gnus-summary-highlight
4786 Summary lines are highlighted according to this variable, which is a
4787 list where the elements are of the format @code{(@var{form}
4788 . @var{face})}.  If you would, for instance, like ticked articles to be
4789 italic and high-scored articles to be bold, you could set this variable
4790 to something like
4791 @lisp
4792 (((eq mark gnus-ticked-mark) . italic)
4793  ((> score default) . bold))
4794 @end lisp
4795 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4796 @var{face} will be applied to the line.
4797 @end table
4798
4799
4800 @node Summary Maneuvering
4801 @section Summary Maneuvering
4802 @cindex summary movement
4803
4804 All the straight movement commands understand the numeric prefix and
4805 behave pretty much as you'd expect.
4806
4807 None of these commands select articles.
4808
4809 @table @kbd
4810 @item G M-n
4811 @itemx M-n
4812 @kindex M-n (Summary)
4813 @kindex G M-n (Summary)
4814 @findex gnus-summary-next-unread-subject
4815 Go to the next summary line of an unread article
4816 (@code{gnus-summary-next-unread-subject}).
4817
4818 @item G M-p
4819 @itemx M-p
4820 @kindex M-p (Summary)
4821 @kindex G M-p (Summary)
4822 @findex gnus-summary-prev-unread-subject
4823 Go to the previous summary line of an unread article
4824 (@code{gnus-summary-prev-unread-subject}).
4825
4826 @item G g
4827 @kindex G g (Summary)
4828 @findex gnus-summary-goto-subject
4829 Ask for an article number and then go to the summary line of that article
4830 without displaying the article (@code{gnus-summary-goto-subject}).
4831 @end table
4832
4833 If Gnus asks you to press a key to confirm going to the next group, you
4834 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4835 buffer, searching for the next group to read without actually returning
4836 to the group buffer.
4837
4838 Variables related to summary movement:
4839
4840 @table @code
4841
4842 @vindex gnus-auto-select-next
4843 @item gnus-auto-select-next
4844 If you issue one of the movement commands (like @kbd{n}) and there are
4845 no more unread articles after the current one, Gnus will offer to go to
4846 the next group.  If this variable is @code{t} and the next group is
4847 empty, Gnus will exit summary mode and return to the group buffer.  If
4848 this variable is neither @code{t} nor @code{nil}, Gnus will select the
4849 next group with unread articles.  As a special case, if this variable
4850 is @code{quietly}, Gnus will select the next group without asking for
4851 confirmation.  If this variable is @code{almost-quietly}, the same
4852 will happen only if you are located on the last article in the group.
4853 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4854 command will go to the next group without confirmation.  Also
4855 @pxref{Group Levels}.
4856
4857 @item gnus-auto-select-same
4858 @vindex gnus-auto-select-same
4859 If non-@code{nil}, all the movement commands will try to go to the next
4860 article with the same subject as the current.  (@dfn{Same} here might
4861 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4862 for details (@pxref{Customizing Threading}).)  If there are no more
4863 articles with the same subject, go to the first unread article.
4864
4865 This variable is not particularly useful if you use a threaded display.
4866
4867 @item gnus-summary-check-current
4868 @vindex gnus-summary-check-current
4869 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4870 to the next (or previous) article if the current article is unread.
4871 Instead, they will choose the current article.
4872
4873 @item gnus-auto-center-summary
4874 @vindex gnus-auto-center-summary
4875 If non-@code{nil}, Gnus will keep the point in the summary buffer
4876 centered at all times.  This makes things quite tidy, but if you have a
4877 slow network connection, or simply do not like this un-Emacsism, you can
4878 set this variable to @code{nil} to get the normal Emacs scrolling
4879 action.  This will also inhibit horizontal re-centering of the summary
4880 buffer, which might make it more inconvenient to read extremely long
4881 threads.
4882
4883 This variable can also be a number.  In that case, center the window at
4884 the given number of lines from the top.
4885
4886 @end table
4887
4888
4889 @node Choosing Articles
4890 @section Choosing Articles
4891 @cindex selecting articles
4892
4893 @menu
4894 * Choosing Commands::           Commands for choosing articles.
4895 * Choosing Variables::          Variables that influence these commands.
4896 @end menu
4897
4898
4899 @node Choosing Commands
4900 @subsection Choosing Commands
4901
4902 None of the following movement commands understand the numeric prefix,
4903 and they all select and display an article.
4904
4905 If you want to fetch new articles or redisplay the group, see
4906 @ref{Exiting the Summary Buffer}.
4907
4908 @table @kbd
4909 @item SPACE
4910 @kindex SPACE (Summary)
4911 @findex gnus-summary-next-page
4912 Select the current article, or, if that one's read already, the next
4913 unread article (@code{gnus-summary-next-page}).
4914
4915 @item G n
4916 @itemx n
4917 @kindex n (Summary)
4918 @kindex G n (Summary)
4919 @findex gnus-summary-next-unread-article
4920 @c @icon{gnus-summary-next-unread}
4921 Go to next unread article (@code{gnus-summary-next-unread-article}).
4922
4923 @item G p
4924 @itemx p
4925 @kindex p (Summary)
4926 @findex gnus-summary-prev-unread-article
4927 @c @icon{gnus-summary-prev-unread}
4928 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
4929
4930 @item G N
4931 @itemx N
4932 @kindex N (Summary)
4933 @kindex G N (Summary)
4934 @findex gnus-summary-next-article
4935 Go to the next article (@code{gnus-summary-next-article}).
4936
4937 @item G P
4938 @itemx P
4939 @kindex P (Summary)
4940 @kindex G P (Summary)
4941 @findex gnus-summary-prev-article
4942 Go to the previous article (@code{gnus-summary-prev-article}).
4943
4944 @item G C-n
4945 @kindex G C-n (Summary)
4946 @findex gnus-summary-next-same-subject
4947 Go to the next article with the same subject
4948 (@code{gnus-summary-next-same-subject}).
4949
4950 @item G C-p
4951 @kindex G C-p (Summary)
4952 @findex gnus-summary-prev-same-subject
4953 Go to the previous article with the same subject
4954 (@code{gnus-summary-prev-same-subject}).
4955
4956 @item G f
4957 @itemx .
4958 @kindex G f  (Summary)
4959 @kindex .  (Summary)
4960 @findex gnus-summary-first-unread-article
4961 Go to the first unread article
4962 (@code{gnus-summary-first-unread-article}).
4963
4964 @item G b
4965 @itemx ,
4966 @kindex G b (Summary)
4967 @kindex , (Summary)
4968 @findex gnus-summary-best-unread-article
4969 Go to the unread article with the highest score
4970 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
4971 go to the first unread article that has a score over the default score.
4972
4973 @item G l
4974 @itemx l
4975 @kindex l (Summary)
4976 @kindex G l (Summary)
4977 @findex gnus-summary-goto-last-article
4978 Go to the previous article read (@code{gnus-summary-goto-last-article}).
4979
4980 @item G o
4981 @kindex G o (Summary)
4982 @findex gnus-summary-pop-article
4983 @cindex history
4984 @cindex article history
4985 Pop an article off the summary history and go to this article
4986 (@code{gnus-summary-pop-article}).  This command differs from the
4987 command above in that you can pop as many previous articles off the
4988 history as you like, while @kbd{l} toggles the two last read articles.
4989 For a somewhat related issue (if you use these commands a lot),
4990 @pxref{Article Backlog}.
4991
4992 @item G j
4993 @itemx j
4994 @kindex j (Summary)
4995 @kindex G j (Summary)
4996 @findex gnus-summary-goto-article
4997 Ask for an article number or @code{Message-ID}, and then go to that
4998 article (@code{gnus-summary-goto-article}).
4999
5000 @end table
5001
5002
5003 @node Choosing Variables
5004 @subsection Choosing Variables
5005
5006 Some variables relevant for moving and selecting articles:
5007
5008 @table @code
5009 @item gnus-auto-extend-newsgroup
5010 @vindex gnus-auto-extend-newsgroup
5011 All the movement commands will try to go to the previous (or next)
5012 article, even if that article isn't displayed in the Summary buffer if
5013 this variable is non-@code{nil}.  Gnus will then fetch the article from
5014 the server and display it in the article buffer.
5015
5016 @item gnus-select-article-hook
5017 @vindex gnus-select-article-hook
5018 This hook is called whenever an article is selected.  By default it
5019 exposes any threads hidden under the selected article.  If you would 
5020 like each article to be saved in the Agent as you read it, putting
5021 @code{gnus-agent-fetch-selected-article} on this hook will do so.
5022
5023 @item gnus-mark-article-hook
5024 @vindex gnus-mark-article-hook
5025 @findex gnus-summary-mark-unread-as-read
5026 @findex gnus-summary-mark-read-and-unread-as-read
5027 @findex gnus-unread-mark
5028 This hook is called whenever an article is selected.  It is intended to
5029 be used for marking articles as read.  The default value is
5030 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5031 mark of almost any article you read to @code{gnus-unread-mark}.  The
5032 only articles not affected by this function are ticked, dormant, and
5033 expirable articles.  If you'd instead like to just have unread articles
5034 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5035 instead.  It will leave marks like @code{gnus-low-score-mark},
5036 @code{gnus-del-mark} (and so on) alone.
5037
5038 @end table
5039
5040
5041 @node Paging the Article
5042 @section Scrolling the Article
5043 @cindex article scrolling
5044
5045 @table @kbd
5046
5047 @item SPACE
5048 @kindex SPACE (Summary)
5049 @findex gnus-summary-next-page
5050 Pressing @kbd{SPACE} will scroll the current article forward one page,
5051 or, if you have come to the end of the current article, will choose the
5052 next article (@code{gnus-summary-next-page}).
5053
5054 @item DEL
5055 @kindex DEL (Summary)
5056 @findex gnus-summary-prev-page
5057 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5058
5059 @item RET
5060 @kindex RET (Summary)
5061 @findex gnus-summary-scroll-up
5062 Scroll the current article one line forward
5063 (@code{gnus-summary-scroll-up}).
5064
5065 @item M-RET
5066 @kindex M-RET (Summary)
5067 @findex gnus-summary-scroll-down
5068 Scroll the current article one line backward
5069 (@code{gnus-summary-scroll-down}).
5070
5071 @item A g
5072 @itemx g
5073 @kindex A g (Summary)
5074 @kindex g (Summary)
5075 @findex gnus-summary-show-article
5076 @vindex gnus-summary-show-article-charset-alist
5077 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5078 given a prefix, fetch the current article, but don't run any of the
5079 article treatment functions.  This will give you a ``raw'' article, just
5080 the way it came from the server.
5081
5082 If given a numerical prefix, you can do semi-manual charset stuff.
5083 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5084 encoded in the @code{cn-gb-2312} charset.  If you have
5085
5086 @lisp
5087 (setq gnus-summary-show-article-charset-alist
5088       '((1 . cn-gb-2312)
5089         (2 . big5)))
5090 @end lisp
5091
5092 then you can say @kbd{C-u 1 g} to get the same effect.
5093
5094 @item A <
5095 @itemx <
5096 @kindex < (Summary)
5097 @kindex A < (Summary)
5098 @findex gnus-summary-beginning-of-article
5099 Scroll to the beginning of the article
5100 (@code{gnus-summary-beginning-of-article}).
5101
5102 @item A >
5103 @itemx >
5104 @kindex > (Summary)
5105 @kindex A > (Summary)
5106 @findex gnus-summary-end-of-article
5107 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5108
5109 @item A s
5110 @itemx s
5111 @kindex A s (Summary)
5112 @kindex s (Summary)
5113 @findex gnus-summary-isearch-article
5114 Perform an isearch in the article buffer
5115 (@code{gnus-summary-isearch-article}).
5116
5117 @item h
5118 @kindex h (Summary)
5119 @findex gnus-summary-select-article-buffer
5120 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5121
5122 @end table
5123
5124
5125 @node Reply Followup and Post
5126 @section Reply, Followup and Post
5127
5128 @menu
5129 * Summary Mail Commands::       Sending mail.
5130 * Summary Post Commands::       Sending news.
5131 * Summary Message Commands::    Other Message-related commands.
5132 * Canceling and Superseding::   
5133 @end menu
5134
5135
5136 @node Summary Mail Commands
5137 @subsection Summary Mail Commands
5138 @cindex mail
5139 @cindex composing mail
5140
5141 Commands for composing a mail message:
5142
5143 @table @kbd
5144
5145 @item S r
5146 @itemx r
5147 @kindex S r (Summary)
5148 @kindex r (Summary)
5149 @findex gnus-summary-reply
5150 @c @icon{gnus-summary-mail-reply}
5151 @c @icon{gnus-summary-reply}
5152 Mail a reply to the author of the current article
5153 (@code{gnus-summary-reply}).
5154
5155 @item S R
5156 @itemx R
5157 @kindex R (Summary)
5158 @kindex S R (Summary)
5159 @findex gnus-summary-reply-with-original
5160 @c @icon{gnus-summary-reply-with-original}
5161 Mail a reply to the author of the current article and include the
5162 original message (@code{gnus-summary-reply-with-original}).  This
5163 command uses the process/prefix convention.
5164
5165 @item S w
5166 @kindex S w (Summary)
5167 @findex gnus-summary-wide-reply
5168 Mail a wide reply to the author of the current article
5169 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5170 goes out to all people listed in the @code{To}, @code{From} (or
5171 @code{Reply-to}) and @code{Cc} headers.
5172
5173 @item S W
5174 @kindex S W (Summary)
5175 @findex gnus-summary-wide-reply-with-original
5176 Mail a wide reply to the current article and include the original
5177 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5178 the process/prefix convention.
5179
5180 @item S v
5181 @kindex S v (Summary)
5182 @findex gnus-summary-very-wide-reply
5183 Mail a very wide reply to the author of the current article
5184 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5185 that goes out to all people listed in the @code{To}, @code{From} (or
5186 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5187 articles.  This command uses the process/prefix convention.
5188
5189 @item S V
5190 @kindex S V (Summary)
5191 @findex gnus-summary-very-wide-reply-with-original
5192 Mail a very wide reply to the author of the current article and include the
5193 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5194 command uses the process/prefix convention.
5195
5196 @item S B r
5197 @kindex S B r (Summary)
5198 @findex gnus-summary-reply-broken-reply-to
5199 Mail a reply to the author of the current article but ignore the
5200 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5201
5202 @item S B R
5203 @kindex S B R (Summary)
5204 @findex gnus-summary-reply-broken-reply-to-with-original
5205 Mail a reply to the author of the current article and include the
5206 original message but ignore the @code{Reply-To} field
5207 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5208
5209 @item S o m
5210 @itemx C-c C-f
5211 @kindex S o m (Summary)
5212 @kindex C-c C-f (Summary)
5213 @findex gnus-summary-mail-forward
5214 @c @icon{gnus-summary-mail-forward}
5215 Forward the current article to some other person
5216 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
5217 is forwarded according to the value of (@code{message-forward-as-mime})
5218 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
5219 message and forward directly inline; if the prefix is 2, forward message
5220 as an rfc822 @sc{mime} section; if the prefix is 3, decode message and
5221 forward as an rfc822 @sc{mime} section; if the prefix is 4, forward message
5222 directly inline; otherwise, the message is forwarded as no prefix given
5223 but use the flipped value of (@code{message-forward-as-mime}).  By
5224 default, the message is decoded and forwarded as an rfc822 @sc{mime}
5225 section.
5226
5227 @item S m
5228 @itemx m
5229 @kindex m (Summary)
5230 @kindex S m (Summary)
5231 @findex gnus-summary-mail-other-window
5232 @c @icon{gnus-summary-mail-originate}
5233 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5234 the posting style of the current group.  If given a prefix, disable that.
5235 If the prefix is 1, prompt for a group name to find the posting style.
5236
5237 @item S i
5238 @itemx i
5239 @kindex i (Summary)
5240 @kindex S i (Summary)
5241 @findex gnus-summary-news-other-window
5242 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5243 post to the current group.  If given a prefix, disable that.  If the
5244 prefix is 1, prompt for a group to post to.
5245
5246 This function actually prepares a news even when using mail groups.
5247 This is useful for "posting" messages to mail groups without actually
5248 sending them over the network: they're just saved directly to the group
5249 in question.  The corresponding back end must have a request-post method
5250 for this to work though.
5251
5252 @item S D b
5253 @kindex S D b (Summary)
5254 @findex gnus-summary-resend-bounced-mail
5255 @cindex bouncing mail
5256 If you have sent a mail, but the mail was bounced back to you for some
5257 reason (wrong address, transient failure), you can use this command to
5258 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5259 will be popped into a mail buffer where you can edit the headers before
5260 sending the mail off again.  If you give a prefix to this command, and
5261 the bounced mail is a reply to some other mail, Gnus will try to fetch
5262 that mail and display it for easy perusal of its headers.  This might
5263 very well fail, though.
5264
5265 @item S D r
5266 @kindex S D r (Summary)
5267 @findex gnus-summary-resend-message
5268 Not to be confused with the previous command,
5269 @code{gnus-summary-resend-message} will prompt you for an address to
5270 send the current message off to, and then send it to that place.  The
5271 headers of the message won't be altered---but lots of headers that say
5272 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5273 means that you actually send a mail to someone that has a @code{To}
5274 header that (probably) points to yourself.  This will confuse people.
5275 So, natcherly you'll only do that if you're really eVIl.
5276
5277 This command is mainly used if you have several accounts and want to
5278 ship a mail to a different account of yours.  (If you're both
5279 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5280 to the @code{root} account, you may want to resend it to
5281 @code{postmaster}.  Ordnung muss sein!
5282
5283 This command understands the process/prefix convention
5284 (@pxref{Process/Prefix}).
5285
5286 @item S O m
5287 @kindex S O m (Summary)
5288 @findex gnus-uu-digest-mail-forward
5289 Digest the current series (@pxref{Decoding Articles}) and forward the
5290 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
5291 uses the process/prefix convention (@pxref{Process/Prefix}).
5292
5293 @item S M-c
5294 @kindex S M-c (Summary)
5295 @findex gnus-summary-mail-crosspost-complaint
5296 @cindex crossposting
5297 @cindex excessive crossposting
5298 Send a complaint about excessive crossposting to the author of the
5299 current article (@code{gnus-summary-mail-crosspost-complaint}).
5300
5301 @findex gnus-crosspost-complaint
5302 This command is provided as a way to fight back against the current
5303 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5304 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5305 command understands the process/prefix convention
5306 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5307
5308 @end table
5309
5310 Also @xref{Header Commands, ,Header Commands, message, The Message
5311 Manual}, for more information.
5312
5313
5314 @node Summary Post Commands
5315 @subsection Summary Post Commands
5316 @cindex post
5317 @cindex composing news
5318
5319 Commands for posting a news article:
5320
5321 @table @kbd
5322 @item S p
5323 @itemx a
5324 @kindex a (Summary)
5325 @kindex S p (Summary)
5326 @findex gnus-summary-post-news
5327 @c @icon{gnus-summary-post-news}
5328 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5329 default, post to the current group.  If given a prefix, disable that.
5330 If the prefix is 1, prompt for another group instead.
5331
5332 @item S f
5333 @itemx f
5334 @kindex f (Summary)
5335 @kindex S f (Summary)
5336 @findex gnus-summary-followup
5337 @c @icon{gnus-summary-followup}
5338 Post a followup to the current article (@code{gnus-summary-followup}).
5339
5340 @item S F
5341 @itemx F
5342 @kindex S F (Summary)
5343 @kindex F (Summary)
5344 @c @icon{gnus-summary-followup-with-original}
5345 @findex gnus-summary-followup-with-original
5346 Post a followup to the current article and include the original message
5347 (@code{gnus-summary-followup-with-original}).   This command uses the
5348 process/prefix convention.
5349
5350 @item S n
5351 @kindex S n (Summary)
5352 @findex gnus-summary-followup-to-mail
5353 Post a followup to the current article via news, even if you got the
5354 message through mail (@code{gnus-summary-followup-to-mail}).
5355
5356 @item S N
5357 @kindex S N (Summary)
5358 @findex gnus-summary-followup-to-mail-with-original
5359 Post a followup to the current article via news, even if you got the
5360 message through mail and include the original message
5361 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5362 the process/prefix convention.
5363
5364 @item S o p
5365 @kindex S o p (Summary)
5366 @findex gnus-summary-post-forward
5367 Forward the current article to a newsgroup
5368 (@code{gnus-summary-post-forward}).
5369  If no prefix is given, the message is forwarded according to the value
5370 of (@code{message-forward-as-mime}) and
5371 (@code{message-forward-show-mml}); if the prefix is 1, decode the
5372 message and forward directly inline; if the prefix is 2, forward message
5373 as an rfc822 @sc{mime} section; if the prefix is 3, decode message and
5374 forward as an rfc822 @sc{mime} section; if the prefix is 4, forward message
5375 directly inline; otherwise, the message is forwarded as no prefix given
5376 but use the flipped value of (@code{message-forward-as-mime}).  By
5377 default, the message is decoded and forwarded as an rfc822 @sc{mime} section.
5378
5379 @item S O p
5380 @kindex S O p (Summary)
5381 @findex gnus-uu-digest-post-forward
5382 @cindex digests
5383 @cindex making digests
5384 Digest the current series and forward the result to a newsgroup
5385 (@code{gnus-uu-digest-mail-forward}).  This command uses the
5386 process/prefix convention.
5387
5388 @item S u
5389 @kindex S u (Summary)
5390 @findex gnus-uu-post-news
5391 @c @icon{gnus-uu-post-news}
5392 Uuencode a file, split it into parts, and post it as a series
5393 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5394 @end table
5395
5396 Also @xref{Header Commands, ,Header Commands, message, The Message
5397 Manual}, for more information.
5398
5399
5400 @node Summary Message Commands
5401 @subsection Summary Message Commands
5402
5403 @table @kbd
5404 @item S y
5405 @kindex S y (Summary)
5406 @findex gnus-summary-yank-message
5407 Yank the current article into an already existing Message composition
5408 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5409 what message buffer you want to yank into, and understands the
5410 process/prefix convention (@pxref{Process/Prefix}).
5411
5412 @end table
5413
5414
5415 @node Canceling and Superseding
5416 @subsection Canceling Articles
5417 @cindex canceling articles
5418 @cindex superseding articles
5419
5420 Have you ever written something, and then decided that you really,
5421 really, really wish you hadn't posted that?
5422
5423 Well, you can't cancel mail, but you can cancel posts.
5424
5425 @findex gnus-summary-cancel-article
5426 @kindex C (Summary)
5427 @c @icon{gnus-summary-cancel-article}
5428 Find the article you wish to cancel (you can only cancel your own
5429 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5430 c} (@code{gnus-summary-cancel-article}).  Your article will be
5431 canceled---machines all over the world will be deleting your article.
5432 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5433
5434 Be aware, however, that not all sites honor cancels, so your article may
5435 live on here and there, while most sites will delete the article in
5436 question.
5437
5438 Gnus will use the ``current'' select method when canceling.  If you
5439 want to use the standard posting method, use the @samp{a} symbolic
5440 prefix (@pxref{Symbolic Prefixes}).
5441
5442 If you discover that you have made some mistakes and want to do some
5443 corrections, you can post a @dfn{superseding} article that will replace
5444 your original article.
5445
5446 @findex gnus-summary-supersede-article
5447 @kindex S (Summary)
5448 Go to the original article and press @kbd{S s}
5449 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5450 where you can edit the article all you want before sending it off the
5451 usual way.
5452
5453 The same goes for superseding as for canceling, only more so: Some
5454 sites do not honor superseding.  On those sites, it will appear that you
5455 have posted almost the same article twice.
5456
5457 If you have just posted the article, and change your mind right away,
5458 there is a trick you can use to cancel/supersede the article without
5459 waiting for the article to appear on your site first.  You simply return
5460 to the post buffer (which is called @code{*sent ...*}).  There you will
5461 find the article you just posted, with all the headers intact.  Change
5462 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5463 header by substituting one of those words for the word
5464 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5465 you would do normally.  The previous article will be
5466 canceled/superseded.
5467
5468 Just remember, kids: There is no 'c' in 'supersede'.
5469
5470 @node Delayed Articles
5471 @section Delayed Articles
5472 @cindex delayed sending
5473 @cindex send delayed
5474
5475 Sometimes, you might wish to delay the sending of a message.  For
5476 example, you might wish to arrange for a message to turn up just in time
5477 to remind your about the birthday of your Significant Other.  For this,
5478 there is the @code{gnus-delay} package.  Setup is simple:
5479
5480 @lisp
5481 (gnus-delay-initialize)
5482 @end lisp
5483
5484 @findex gnus-delay-article
5485 Normally, to send a message you use the @kbd{C-c C-c} command from
5486 Message mode.  To delay a message, use @kbd{C-c C-j}
5487 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5488 message should be delayed.  Possible answers are:
5489
5490 @itemize @bullet
5491 @item
5492 A time span.  Consists of an integer and a letter.  For example,
5493 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5494 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5495 (months) and @code{Y} (years).
5496
5497 @item
5498 A specific date.  Looks like @code{YYYYY-MM-DD}.  The message will be
5499 delayed until that day, at a specific time (eight o'clock by default).
5500 See also @code{gnus-delay-default-hour}.
5501
5502 @item
5503 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5504 stuff.  The deadline will be at that time today, except if that time has
5505 already passed, then it's at the given time tomorrow.  So if it's ten
5506 o'clock in the morning and you specify @code{11:15}, then the deadline
5507 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5508 that means a time tomorrow.
5509 @end itemize
5510
5511 The action of the @code{gnus-delay-article} command is influenced by a
5512 couple of variables:
5513
5514 @table @code
5515 @item gnus-delay-default-hour
5516 @vindex gnus-delay-default-hour
5517 When you specify a specific date, the message will be due on that hour
5518 on the given date.  Possible values are integers 0 through 23.
5519
5520 @item gnus-delay-default-delay
5521 @vindex gnus-delay-default-delay
5522 This is a string and gives the default delay.  It can be of any of the
5523 formats described above.
5524
5525 @item gnus-delay-group
5526 @vindex gnus-delay-group
5527 Delayed articles will be kept in this group on the drafts server until
5528 they are due.  You probably don't need to change this.  The default
5529 value is @code{"delayed"}.
5530
5531 @item gnus-delay-header
5532 @vindex gnus-delay-header
5533 The deadline for each article will be stored in a header.  This variable
5534 is a string and gives the header name.  You probably don't need to
5535 change this.  The default value is @code{"X-Gnus-Delayed"}.
5536 @end table
5537
5538 The way delaying works is like this: when you use the
5539 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5540 calculates the deadline of the message and stores it in the
5541 @code{X-Gnus-Delayed} header and puts the message in the
5542 @code{nndraft:delayed} group.
5543
5544 And whenever you get new news, Gnus looks through the group for articles
5545 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5546 function for this.  By default, this function is added to the hook
5547 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5548 Maybe you want to use the demon to send drafts?  Just tell the demon to
5549 execute the @code{gnus-delay-send-queue} function.
5550
5551 @table @code
5552 @item gnus-delay-initialize
5553 @findex gnus-delay-initialize
5554 By default, this function installs @code{gnus-delay-send-queue} in
5555 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5556 argument @code{no-check}.  If it is non-@code{nil},
5557 @code{gnus-get-new-news-hook} is not changed.  The optional first
5558 argument is ignored.
5559
5560 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5561 Presumably, you want to use the demon for sending due delayed articles.
5562 Just don't forget to set that up :-)
5563 @end table
5564
5565
5566 @node Marking Articles
5567 @section Marking Articles
5568 @cindex article marking
5569 @cindex article ticking
5570 @cindex marks
5571
5572 There are several marks you can set on an article.
5573
5574 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5575 neologism ohoy!) of the article.  Alphabetic marks generally mean
5576 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5577
5578 In addition, you also have marks that do not affect readedness.
5579
5580 @menu
5581 * Unread Articles::             Marks for unread articles.
5582 * Read Articles::               Marks for read articles.
5583 * Other Marks::                 Marks that do not affect readedness.
5584 @end menu
5585
5586 @ifinfo
5587 There's a plethora of commands for manipulating these marks:
5588 @end ifinfo
5589
5590 @menu
5591 * Setting Marks::             How to set and remove marks.
5592 * Generic Marking Commands::  How to customize the marking.
5593 * Setting Process Marks::     How to mark articles for later processing.
5594 @end menu
5595
5596
5597 @node Unread Articles
5598 @subsection Unread Articles
5599
5600 The following marks mark articles as (kinda) unread, in one form or
5601 other.
5602
5603 @table @samp
5604 @item !
5605 @vindex gnus-ticked-mark
5606 Marked as ticked (@code{gnus-ticked-mark}).
5607
5608 @dfn{Ticked articles} are articles that will remain visible always.  If
5609 you see an article that you find interesting, or you want to put off
5610 reading it, or replying to it, until sometime later, you'd typically
5611 tick it.  However, articles can be expired (from news servers by the
5612 news server software, Gnus itself never expires ticked messages), so if
5613 you want to keep an article forever, you'll have to make it persistent
5614 (@pxref{Persistent Articles}).
5615
5616 @item ?
5617 @vindex gnus-dormant-mark
5618 Marked as dormant (@code{gnus-dormant-mark}).
5619
5620 @dfn{Dormant articles} will only appear in the summary buffer if there
5621 are followups to it.  If you want to see them even if they don't have
5622 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5623 Otherwise (except for the visibility issue), they are just like ticked
5624 messages.
5625
5626 @item SPACE
5627 @vindex gnus-unread-mark
5628 Marked as unread (@code{gnus-unread-mark}).
5629
5630 @dfn{Unread articles} are articles that haven't been read at all yet.
5631 @end table
5632
5633
5634 @node Read Articles
5635 @subsection Read Articles
5636 @cindex expirable mark
5637
5638 All the following marks mark articles as read.
5639
5640 @table @samp
5641
5642 @item r
5643 @vindex gnus-del-mark
5644 These are articles that the user has marked as read with the @kbd{d}
5645 command manually, more or less (@code{gnus-del-mark}).
5646
5647 @item R
5648 @vindex gnus-read-mark
5649 Articles that have actually been read (@code{gnus-read-mark}).
5650
5651 @item O
5652 @vindex gnus-ancient-mark
5653 Articles that were marked as read in previous sessions and are now
5654 @dfn{old} (@code{gnus-ancient-mark}).
5655
5656 @item K
5657 @vindex gnus-killed-mark
5658 Marked as killed (@code{gnus-killed-mark}).
5659
5660 @item X
5661 @vindex gnus-kill-file-mark
5662 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5663
5664 @item Y
5665 @vindex gnus-low-score-mark
5666 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5667
5668 @item C
5669 @vindex gnus-catchup-mark
5670 Marked as read by a catchup (@code{gnus-catchup-mark}).
5671
5672 @item G
5673 @vindex gnus-canceled-mark
5674 Canceled article (@code{gnus-canceled-mark})
5675
5676 @item F
5677 @vindex gnus-souped-mark
5678 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5679
5680 @item Q
5681 @vindex gnus-sparse-mark
5682 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5683 Threading}.
5684
5685 @item M
5686 @vindex gnus-duplicate-mark
5687 Article marked as read by duplicate suppression
5688 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5689
5690 @end table
5691
5692 All these marks just mean that the article is marked as read, really.
5693 They are interpreted differently when doing adaptive scoring, though.
5694
5695 One more special mark, though:
5696
5697 @table @samp
5698 @item E
5699 @vindex gnus-expirable-mark
5700 Marked as expirable (@code{gnus-expirable-mark}).
5701
5702 Marking articles as @dfn{expirable} (or have them marked as such
5703 automatically) doesn't make much sense in normal groups---a user doesn't
5704 control expiring of news articles, but in mail groups, for instance,
5705 articles marked as @dfn{expirable} can be deleted by Gnus at
5706 any time.
5707 @end table
5708
5709
5710 @node Other Marks
5711 @subsection Other Marks
5712 @cindex process mark
5713 @cindex bookmarks
5714
5715 There are some marks that have nothing to do with whether the article is
5716 read or not.
5717
5718 @itemize @bullet
5719
5720 @item
5721 You can set a bookmark in the current article.  Say you are reading a
5722 long thesis on cats' urinary tracts, and have to go home for dinner
5723 before you've finished reading the thesis.  You can then set a bookmark
5724 in the article, and Gnus will jump to this bookmark the next time it
5725 encounters the article.  @xref{Setting Marks}.
5726
5727 @item
5728 @vindex gnus-replied-mark
5729 All articles that you have replied to or made a followup to (i.e., have
5730 answered) will be marked with an @samp{A} in the second column
5731 (@code{gnus-replied-mark}).
5732
5733 @item
5734 @vindex gnus-forwarded-mark
5735 All articles that you have forwarded will be marked with an @samp{F} in
5736 the second column (@code{gnus-forwarded-mark}).
5737
5738 @item
5739 @vindex gnus-cached-mark
5740 Articles stored in the article cache will be marked with an @samp{*} in
5741 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5742
5743 @item
5744 @vindex gnus-saved-mark
5745 Articles ``saved'' (in some manner or other; not necessarily
5746 religiously) are marked with an @samp{S} in the second column
5747 (@code{gnus-saved-mark}).
5748
5749 @item
5750 @vindex gnus-recent-mark
5751 Articles that according to the server haven't been shown to the user
5752 before are marked with a @samp{N} in the second column
5753 (@code{gnus-recent-mark}).  Note that not all servers support this
5754 mark, in which case it simply never appears. Compare with
5755 @code{gnus-unseen-mark}.
5756
5757 @item
5758 @vindex gnus-unseen-mark
5759 Articles that haven't been seen before in Gnus by the user are marked
5760 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5761 Compare with @code{gnus-recent-mark}.
5762
5763 @item
5764 @vindex gnus-downloaded-mark
5765 When using the Gnus agent @pxref{Agent Basics}, articles may be
5766 downloaded for unplugged (offline) viewing.  If you are using the
5767 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5768 (The variable @code{gnus-downloaded-mark} controls which character to
5769 use.)
5770
5771 @item
5772 @vindex gnus-undownloaded-mark
5773 When using the Gnus agent @pxref{Agent Basics}, some articles might
5774 not have been downloaded.  Such articles cannot be viewed while you
5775 are unplugged (offline).  If you are using the @samp{%O} spec, these
5776 articles get the @samp{-} mark in that spec.  (The variable
5777 @code{gnus-undownloaded-mark} controls which character to use.)
5778
5779 @item
5780 @vindex gnus-downloadable-mark
5781 The Gnus agent @pxref{Agent Basics} downloads some articles
5782 automatically, but it is also possible to explicitly mark articles for
5783 download, even if they would not be downloaded automatically.  Such
5784 explicitly-marked articles get the @samp{%} mark in the first column.
5785 (The variable @code{gnus-downloadable-mark} controls which character to
5786 use.)
5787
5788 @item
5789 @vindex gnus-not-empty-thread-mark
5790 @vindex gnus-empty-thread-mark
5791 If the @samp{%e} spec is used, the presence of threads or not will be
5792 marked with @code{gnus-not-empty-thread-mark} and
5793 @code{gnus-empty-thread-mark} in the third column, respectively.
5794
5795 @item
5796 @vindex gnus-process-mark
5797 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5798 variety of commands react to the presence of the process mark.  For
5799 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5800 all articles that have been marked with the process mark.  Articles
5801 marked with the process mark have a @samp{#} in the second column.
5802
5803 @end itemize
5804
5805 You might have noticed that most of these ``non-readedness'' marks
5806 appear in the second column by default.  So if you have a cached, saved,
5807 replied article that you have process-marked, what will that look like?
5808
5809 Nothing much.  The precedence rules go as follows: process -> cache ->
5810 replied -> saved.  So if the article is in the cache and is replied,
5811 you'll only see the cache mark and not the replied mark.
5812
5813
5814 @node Setting Marks
5815 @subsection Setting Marks
5816 @cindex setting marks
5817
5818 All the marking commands understand the numeric prefix.
5819
5820 @table @kbd
5821 @item M c
5822 @itemx M-u
5823 @kindex M c (Summary)
5824 @kindex M-u (Summary)
5825 @findex gnus-summary-clear-mark-forward
5826 @cindex mark as unread
5827 Clear all readedness-marks from the current article
5828 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5829 article as unread.
5830
5831 @item M t
5832 @itemx !
5833 @kindex ! (Summary)
5834 @kindex M t (Summary)
5835 @findex gnus-summary-tick-article-forward
5836 Tick the current article (@code{gnus-summary-tick-article-forward}).
5837 @xref{Article Caching}.
5838
5839 @item M ?
5840 @itemx ?
5841 @kindex ? (Summary)
5842 @kindex M ? (Summary)
5843 @findex gnus-summary-mark-as-dormant
5844 Mark the current article as dormant
5845 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5846
5847 @item M d
5848 @itemx d
5849 @kindex M d (Summary)
5850 @kindex d (Summary)
5851 @findex gnus-summary-mark-as-read-forward
5852 Mark the current article as read
5853 (@code{gnus-summary-mark-as-read-forward}).
5854
5855 @item D
5856 @kindex D (Summary)
5857 @findex gnus-summary-mark-as-read-backward
5858 Mark the current article as read and move point to the previous line
5859 (@code{gnus-summary-mark-as-read-backward}).
5860
5861 @item M k
5862 @itemx k
5863 @kindex k (Summary)
5864 @kindex M k (Summary)
5865 @findex gnus-summary-kill-same-subject-and-select
5866 Mark all articles that have the same subject as the current one as read,
5867 and then select the next unread article
5868 (@code{gnus-summary-kill-same-subject-and-select}).
5869
5870 @item M K
5871 @itemx C-k
5872 @kindex M K (Summary)
5873 @kindex C-k (Summary)
5874 @findex gnus-summary-kill-same-subject
5875 Mark all articles that have the same subject as the current one as read
5876 (@code{gnus-summary-kill-same-subject}).
5877
5878 @item M C
5879 @kindex M C (Summary)
5880 @findex gnus-summary-catchup
5881 @c @icon{gnus-summary-catchup}
5882 Mark all unread articles as read (@code{gnus-summary-catchup}).
5883
5884 @item M C-c
5885 @kindex M C-c (Summary)
5886 @findex gnus-summary-catchup-all
5887 Mark all articles in the group as read---even the ticked and dormant
5888 articles (@code{gnus-summary-catchup-all}).
5889
5890 @item M H
5891 @kindex M H (Summary)
5892 @findex gnus-summary-catchup-to-here
5893 Catchup the current group to point (before the point)
5894 (@code{gnus-summary-catchup-to-here}).
5895
5896 @item M h
5897 @kindex M h (Summary)
5898 @findex gnus-summary-catchup-from-here
5899 Catchup the current group from point (after the point)
5900 (@code{gnus-summary-catchup-from-here}).
5901
5902 @item C-w
5903 @kindex C-w (Summary)
5904 @findex gnus-summary-mark-region-as-read
5905 Mark all articles between point and mark as read
5906 (@code{gnus-summary-mark-region-as-read}).
5907
5908 @item M V k
5909 @kindex M V k (Summary)
5910 @findex gnus-summary-kill-below
5911 Kill all articles with scores below the default score (or below the
5912 numeric prefix) (@code{gnus-summary-kill-below}).
5913
5914 @item M e
5915 @itemx E
5916 @kindex M e (Summary)
5917 @kindex E (Summary)
5918 @findex gnus-summary-mark-as-expirable
5919 Mark the current article as expirable
5920 (@code{gnus-summary-mark-as-expirable}).
5921
5922 @item M b
5923 @kindex M b (Summary)
5924 @findex gnus-summary-set-bookmark
5925 Set a bookmark in the current article
5926 (@code{gnus-summary-set-bookmark}).
5927
5928 @item M B
5929 @kindex M B (Summary)
5930 @findex gnus-summary-remove-bookmark
5931 Remove the bookmark from the current article
5932 (@code{gnus-summary-remove-bookmark}).
5933
5934 @item M V c
5935 @kindex M V c (Summary)
5936 @findex gnus-summary-clear-above
5937 Clear all marks from articles with scores over the default score (or
5938 over the numeric prefix) (@code{gnus-summary-clear-above}).
5939
5940 @item M V u
5941 @kindex M V u (Summary)
5942 @findex gnus-summary-tick-above
5943 Tick all articles with scores over the default score (or over the
5944 numeric prefix) (@code{gnus-summary-tick-above}).
5945
5946 @item M V m
5947 @kindex M V m (Summary)
5948 @findex gnus-summary-mark-above
5949 Prompt for a mark, and mark all articles with scores over the default
5950 score (or over the numeric prefix) with this mark
5951 (@code{gnus-summary-clear-above}).
5952 @end table
5953
5954 @vindex gnus-summary-goto-unread
5955 The @code{gnus-summary-goto-unread} variable controls what action should
5956 be taken after setting a mark.  If non-@code{nil}, point will move to
5957 the next/previous unread article.  If @code{nil}, point will just move
5958 one line up or down.  As a special case, if this variable is
5959 @code{never}, all the marking commands as well as other commands (like
5960 @kbd{SPACE}) will move to the next article, whether it is unread or not.
5961 The default is @code{t}.
5962
5963
5964 @node Generic Marking Commands
5965 @subsection Generic Marking Commands
5966
5967 Some people would like the command that ticks an article (@kbd{!}) go to
5968 the next article.  Others would like it to go to the next unread
5969 article.  Yet others would like it to stay on the current article.  And
5970 even though I haven't heard of anybody wanting it to go to the
5971 previous (unread) article, I'm sure there are people that want that as
5972 well.
5973
5974 Multiply these five behaviors with five different marking commands, and
5975 you get a potentially complex set of variable to control what each
5976 command should do.
5977
5978 To sidestep that mess, Gnus provides commands that do all these
5979 different things.  They can be found on the @kbd{M M} map in the summary
5980 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
5981 to list in this manual.
5982
5983 While you can use these commands directly, most users would prefer
5984 altering the summary mode keymap.  For instance, if you would like the
5985 @kbd{!} command to go to the next article instead of the next unread
5986 article, you could say something like:
5987
5988 @lisp
5989 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
5990 (defun my-alter-summary-map ()
5991   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
5992 @end lisp
5993
5994 or
5995
5996 @lisp
5997 (defun my-alter-summary-map ()
5998   (local-set-key "!" "MM!n"))
5999 @end lisp
6000
6001
6002 @node Setting Process Marks
6003 @subsection Setting Process Marks
6004 @cindex setting process marks
6005
6006 Process marks are displayed as @code{#} in the summary buffer, and are
6007 used for marking articles in such a way that other commands will
6008 process these articles.  For instance, if you process mark four
6009 articles and then use the @kbd{*} command, Gnus will enter these four
6010 commands into the cache.  For more information,
6011 @pxref{Process/Prefix}.
6012
6013 @table @kbd
6014
6015 @item M P p
6016 @itemx #
6017 @kindex # (Summary)
6018 @kindex M P p (Summary)
6019 @findex gnus-summary-mark-as-processable
6020 Mark the current article with the process mark
6021 (@code{gnus-summary-mark-as-processable}).
6022 @findex gnus-summary-unmark-as-processable
6023
6024 @item M P u
6025 @itemx M-#
6026 @kindex M P u (Summary)
6027 @kindex M-# (Summary)
6028 Remove the process mark, if any, from the current article
6029 (@code{gnus-summary-unmark-as-processable}).
6030
6031 @item M P U
6032 @kindex M P U (Summary)
6033 @findex gnus-summary-unmark-all-processable
6034 Remove the process mark from all articles
6035 (@code{gnus-summary-unmark-all-processable}).
6036
6037 @item M P i
6038 @kindex M P i (Summary)
6039 @findex gnus-uu-invert-processable
6040 Invert the list of process marked articles
6041 (@code{gnus-uu-invert-processable}).
6042
6043 @item M P R
6044 @kindex M P R (Summary)
6045 @findex gnus-uu-mark-by-regexp
6046 Mark articles that have a @code{Subject} header that matches a regular
6047 expression (@code{gnus-uu-mark-by-regexp}).
6048
6049 @item M P G
6050 @kindex M P G (Summary)
6051 @findex gnus-uu-unmark-by-regexp
6052 Unmark articles that have a @code{Subject} header that matches a regular
6053 expression (@code{gnus-uu-unmark-by-regexp}).
6054
6055 @item M P r
6056 @kindex M P r (Summary)
6057 @findex gnus-uu-mark-region
6058 Mark articles in region (@code{gnus-uu-mark-region}).
6059
6060 @item M P g
6061 @kindex M P g
6062 @findex gnus-uu-unmark-region
6063 Unmark articles in region (@code{gnus-uu-unmark-region}).
6064
6065 @item M P t
6066 @kindex M P t (Summary)
6067 @findex gnus-uu-mark-thread
6068 Mark all articles in the current (sub)thread
6069 (@code{gnus-uu-mark-thread}).
6070
6071 @item M P T
6072 @kindex M P T (Summary)
6073 @findex gnus-uu-unmark-thread
6074 Unmark all articles in the current (sub)thread
6075 (@code{gnus-uu-unmark-thread}).
6076
6077 @item M P v
6078 @kindex M P v (Summary)
6079 @findex gnus-uu-mark-over
6080 Mark all articles that have a score above the prefix argument
6081 (@code{gnus-uu-mark-over}).
6082
6083 @item M P s
6084 @kindex M P s (Summary)
6085 @findex gnus-uu-mark-series
6086 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6087
6088 @item M P S
6089 @kindex M P S (Summary)
6090 @findex gnus-uu-mark-sparse
6091 Mark all series that have already had some articles marked
6092 (@code{gnus-uu-mark-sparse}).
6093
6094 @item M P a
6095 @kindex M P a (Summary)
6096 @findex gnus-uu-mark-all
6097 Mark all articles in series order (@code{gnus-uu-mark-series}).
6098
6099 @item M P b
6100 @kindex M P b (Summary)
6101 @findex gnus-uu-mark-buffer
6102 Mark all articles in the buffer in the order they appear
6103 (@code{gnus-uu-mark-buffer}).
6104
6105 @item M P k
6106 @kindex M P k (Summary)
6107 @findex gnus-summary-kill-process-mark
6108 Push the current process mark set onto the stack and unmark all articles
6109 (@code{gnus-summary-kill-process-mark}).
6110
6111 @item M P y
6112 @kindex M P y (Summary)
6113 @findex gnus-summary-yank-process-mark
6114 Pop the previous process mark set from the stack and restore it
6115 (@code{gnus-summary-yank-process-mark}).
6116
6117 @item M P w
6118 @kindex M P w (Summary)
6119 @findex gnus-summary-save-process-mark
6120 Push the current process mark set onto the stack
6121 (@code{gnus-summary-save-process-mark}).
6122
6123 @end table
6124
6125 Also see the @kbd{&} command in @pxref{Searching for Articles} for how to
6126 set process marks based on article body contents.
6127
6128
6129 @node Limiting
6130 @section Limiting
6131 @cindex limiting
6132
6133 It can be convenient to limit the summary buffer to just show some
6134 subset of the articles currently in the group.  The effect most limit
6135 commands have is to remove a few (or many) articles from the summary
6136 buffer.
6137
6138 All limiting commands work on subsets of the articles already fetched
6139 from the servers.  None of these commands query the server for
6140 additional articles.
6141
6142 @table @kbd
6143
6144 @item / /
6145 @itemx / s
6146 @kindex / / (Summary)
6147 @findex gnus-summary-limit-to-subject
6148 Limit the summary buffer to articles that match some subject
6149 (@code{gnus-summary-limit-to-subject}). If given a prefix, exclude
6150 matching articles.
6151
6152 @item / a
6153 @kindex / a (Summary)
6154 @findex gnus-summary-limit-to-author
6155 Limit the summary buffer to articles that match some author
6156 (@code{gnus-summary-limit-to-author}). If given a prefix, exclude
6157 matching articles.
6158
6159 @item / x
6160 @kindex / x (Summary)
6161 @findex gnus-summary-limit-to-extra
6162 Limit the summary buffer to articles that match one of the ``extra''
6163 headers (@pxref{To From Newsgroups})
6164 (@code{gnus-summary-limit-to-extra}). If given a prefix, exclude
6165 matching articles.
6166
6167 @item / u
6168 @itemx x
6169 @kindex / u (Summary)
6170 @kindex x (Summary)
6171 @findex gnus-summary-limit-to-unread
6172 Limit the summary buffer to articles not marked as read
6173 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6174 buffer to articles strictly unread.  This means that ticked and
6175 dormant articles will also be excluded.
6176
6177 @item / m
6178 @kindex / m (Summary)
6179 @findex gnus-summary-limit-to-marks
6180 Ask for a mark and then limit to all articles that have been marked
6181 with that mark (@code{gnus-summary-limit-to-marks}).
6182
6183 @item / t
6184 @kindex / t (Summary)
6185 @findex gnus-summary-limit-to-age
6186 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6187 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6188 articles younger than that number of days.
6189
6190 @item / n
6191 @kindex / n (Summary)
6192 @findex gnus-summary-limit-to-articles
6193 Limit the summary buffer to the current article
6194 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6195 convention (@pxref{Process/Prefix}).
6196
6197 @item / w
6198 @kindex / w (Summary)
6199 @findex gnus-summary-pop-limit
6200 Pop the previous limit off the stack and restore it
6201 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6202 the stack.
6203
6204 @item / .
6205 @kindex / . (Summary)
6206 @findex gnus-summary-limit-to-unseen
6207 Limit the summary buffer to the unseen articles
6208 (@code{gnus-summary-limit-to-unseen}).
6209
6210 @item / v
6211 @kindex / v (Summary)
6212 @findex gnus-summary-limit-to-score
6213 Limit the summary buffer to articles that have a score at or above some
6214 score (@code{gnus-summary-limit-to-score}).
6215
6216 @item / p
6217 @kindex / p (Summary)
6218 @findex gnus-summary-limit-to-display-predicate
6219 Limit the summary buffer to articles that satisfy the @code{display}
6220 group parameter predicate
6221 (@code{gnus-summary-limit-to-display-predicate}).  See @pxref{Group
6222 Parameters} for more on this predicate.
6223
6224 @item / E
6225 @itemx M S
6226 @kindex M S (Summary)
6227 @kindex / E (Summary)
6228 @findex gnus-summary-limit-include-expunged
6229 Include all expunged articles in the limit
6230 (@code{gnus-summary-limit-include-expunged}).
6231
6232 @item / D
6233 @kindex / D (Summary)
6234 @findex gnus-summary-limit-include-dormant
6235 Include all dormant articles in the limit
6236 (@code{gnus-summary-limit-include-dormant}).
6237
6238 @item / *
6239 @kindex / * (Summary)
6240 @findex gnus-summary-limit-include-cached
6241 Include all cached articles in the limit
6242 (@code{gnus-summary-limit-include-cached}).
6243
6244 @item / d
6245 @kindex / d (Summary)
6246 @findex gnus-summary-limit-exclude-dormant
6247 Exclude all dormant articles from the limit
6248 (@code{gnus-summary-limit-exclude-dormant}).
6249
6250 @item / M
6251 @kindex / M (Summary)
6252 @findex gnus-summary-limit-exclude-marks
6253 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6254
6255 @item / T
6256 @kindex / T (Summary)
6257 @findex gnus-summary-limit-include-thread
6258 Include all the articles in the current thread in the limit.
6259
6260 @item / c
6261 @kindex / c (Summary)
6262 @findex gnus-summary-limit-exclude-childless-dormant
6263 Exclude all dormant articles that have no children from the limit
6264 (@code{gnus-summary-limit-exclude-childless-dormant}).
6265
6266 @item / C
6267 @kindex / C (Summary)
6268 @findex gnus-summary-limit-mark-excluded-as-read
6269 Mark all excluded unread articles as read
6270 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
6271 also mark excluded ticked and dormant articles as read.
6272
6273 @item / N
6274 @kindex / N (Summary)
6275 @findex gnus-summary-insert-new-articles
6276 Insert all new articles in the summary buffer. It scans for new emails
6277 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6278
6279 @item / o
6280 @kindex / o (Summary)
6281 @findex gnus-summary-insert-old-articles
6282 Insert all old articles in the summary buffer. If given a numbered
6283 prefix, fetch this number of articles.
6284
6285 @end table
6286
6287
6288 @node Threading
6289 @section Threading
6290 @cindex threading
6291 @cindex article threading
6292
6293 Gnus threads articles by default.  @dfn{To thread} is to put responses
6294 to articles directly after the articles they respond to---in a
6295 hierarchical fashion.
6296
6297 Threading is done by looking at the @code{References} headers of the
6298 articles.  In a perfect world, this would be enough to build pretty
6299 trees, but unfortunately, the @code{References} header is often broken
6300 or simply missing.  Weird news propagation exacerbates the problem,
6301 so one has to employ other heuristics to get pleasing results.  A
6302 plethora of approaches exists, as detailed in horrible detail in
6303 @pxref{Customizing Threading}.
6304
6305 First, a quick overview of the concepts:
6306
6307 @table @dfn
6308 @item root
6309 The top-most article in a thread; the first article in the thread.
6310
6311 @item thread
6312 A tree-like article structure.
6313
6314 @item sub-thread
6315 A small(er) section of this tree-like structure.
6316
6317 @item loose threads
6318 Threads often lose their roots due to article expiry, or due to the root
6319 already having been read in a previous session, and not displayed in the
6320 summary buffer.  We then typically have many sub-threads that really
6321 belong to one thread, but are without connecting roots.  These are
6322 called loose threads.
6323
6324 @item thread gathering
6325 An attempt to gather loose threads into bigger threads.
6326
6327 @item sparse threads
6328 A thread where the missing articles have been ``guessed'' at, and are
6329 displayed as empty lines in the summary buffer.
6330
6331 @end table
6332
6333
6334 @menu
6335 * Customizing Threading::       Variables you can change to affect the threading.
6336 * Thread Commands::             Thread based commands in the summary buffer.
6337 @end menu
6338
6339
6340 @node Customizing Threading
6341 @subsection Customizing Threading
6342 @cindex customizing threading
6343
6344 @menu
6345 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6346 * Filling In Threads::          Making the threads displayed look fuller.
6347 * More Threading::              Even more variables for fiddling with threads.
6348 * Low-Level Threading::         You thought it was over... but you were wrong!
6349 @end menu
6350
6351
6352 @node Loose Threads
6353 @subsubsection Loose Threads
6354 @cindex <
6355 @cindex >
6356 @cindex loose threads
6357
6358 @table @code
6359 @item gnus-summary-make-false-root
6360 @vindex gnus-summary-make-false-root
6361 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
6362 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6363 Yup.)  Loose subtrees occur when the real root has expired, or you've
6364 read or killed the root in a previous session.
6365
6366 When there is no real root of a thread, Gnus will have to fudge
6367 something.  This variable says what fudging method Gnus should use.
6368 There are four possible values:
6369
6370 @iftex
6371 @iflatex
6372 \gnusfigure{The Summary Buffer}{390}{
6373 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6374 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6375 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6376 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6377 }
6378 @end iflatex
6379 @end iftex
6380
6381 @cindex adopting articles
6382
6383 @table @code
6384
6385 @item adopt
6386 Gnus will make the first of the orphaned articles the parent.  This
6387 parent will adopt all the other articles.  The adopted articles will be
6388 marked as such by pointy brackets (@samp{<>}) instead of the standard
6389 square brackets (@samp{[]}).  This is the default method.
6390
6391 @item dummy
6392 @vindex gnus-summary-dummy-line-format
6393 @vindex gnus-summary-make-false-root-always
6394 Gnus will create a dummy summary line that will pretend to be the
6395 parent.  This dummy line does not correspond to any real article, so
6396 selecting it will just select the first real article after the dummy
6397 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6398 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6399 which is the subject of the article.  @xref{Formatting Variables}.
6400 If you want all threads to have a dummy root, even the non-gathered
6401 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6402
6403 @item empty
6404 Gnus won't actually make any article the parent, but simply leave the
6405 subject field of all orphans except the first empty.  (Actually, it will
6406 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6407 Buffer Format}).)
6408
6409 @item none
6410 Don't make any article parent at all.  Just gather the threads and
6411 display them after one another.
6412
6413 @item nil
6414 Don't gather loose threads.
6415 @end table
6416
6417 @item gnus-summary-gather-subject-limit
6418 @vindex gnus-summary-gather-subject-limit
6419 Loose threads are gathered by comparing subjects of articles.  If this
6420 variable is @code{nil}, Gnus requires an exact match between the
6421 subjects of the loose threads before gathering them into one big
6422 super-thread.  This might be too strict a requirement, what with the
6423 presence of stupid newsreaders that chop off long subject lines.  If
6424 you think so, set this variable to, say, 20 to require that only the
6425 first 20 characters of the subjects have to match.  If you set this
6426 variable to a really low number, you'll find that Gnus will gather
6427 everything in sight into one thread, which isn't very helpful.
6428
6429 @cindex fuzzy article gathering
6430 If you set this variable to the special value @code{fuzzy}, Gnus will
6431 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6432 Matching}).
6433
6434 @item gnus-simplify-subject-fuzzy-regexp
6435 @vindex gnus-simplify-subject-fuzzy-regexp
6436 This can either be a regular expression or list of regular expressions
6437 that match strings that will be removed from subjects if fuzzy subject
6438 simplification is used.
6439
6440 @item gnus-simplify-ignored-prefixes
6441 @vindex gnus-simplify-ignored-prefixes
6442 If you set @code{gnus-summary-gather-subject-limit} to something as low
6443 as 10, you might consider setting this variable to something sensible:
6444
6445 @c Written by Michael Ernst <mernst@cs.rice.edu>
6446 @lisp
6447 (setq gnus-simplify-ignored-prefixes
6448       (concat
6449        "\\`\\[?\\("
6450        (mapconcat
6451         'identity
6452         '("looking"
6453           "wanted" "followup" "summary\\( of\\)?"
6454           "help" "query" "problem" "question"
6455           "answer" "reference" "announce"
6456           "How can I" "How to" "Comparison of"
6457           ;; ...
6458           )
6459         "\\|")
6460        "\\)\\s *\\("
6461        (mapconcat 'identity
6462                   '("for" "for reference" "with" "about")
6463                   "\\|")
6464        "\\)?\\]?:?[ \t]*"))
6465 @end lisp
6466
6467 All words that match this regexp will be removed before comparing two
6468 subjects.
6469
6470 @item gnus-simplify-subject-functions
6471 @vindex gnus-simplify-subject-functions
6472 If non-@code{nil}, this variable overrides
6473 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6474 list of functions to apply to the @code{Subject} string iteratively to
6475 arrive at the simplified version of the string.
6476
6477 Useful functions to put in this list include:
6478
6479 @table @code
6480 @item gnus-simplify-subject-re
6481 @findex gnus-simplify-subject-re
6482 Strip the leading @samp{Re:}.
6483
6484 @item gnus-simplify-subject-fuzzy
6485 @findex gnus-simplify-subject-fuzzy
6486 Simplify fuzzily.
6487
6488 @item gnus-simplify-whitespace
6489 @findex gnus-simplify-whitespace
6490 Remove excessive whitespace.
6491
6492 @item gnus-simplify-all-whitespace
6493 @findex gnus-simplify-all-whitespace
6494 Remove all whitespace.
6495 @end table
6496
6497 You may also write your own functions, of course.
6498
6499
6500 @item gnus-summary-gather-exclude-subject
6501 @vindex gnus-summary-gather-exclude-subject
6502 Since loose thread gathering is done on subjects only, that might lead
6503 to many false hits, especially with certain common subjects like
6504 @samp{} and @samp{(none)}.  To make the situation slightly better,
6505 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6506 what subjects should be excluded from the gathering process.@*
6507 The default is @samp{^ *$\\|^(none)$}.
6508
6509 @item gnus-summary-thread-gathering-function
6510 @vindex gnus-summary-thread-gathering-function
6511 Gnus gathers threads by looking at @code{Subject} headers.  This means
6512 that totally unrelated articles may end up in the same ``thread'', which
6513 is confusing.  An alternate approach is to look at all the
6514 @code{Message-ID}s in all the @code{References} headers to find matches.
6515 This will ensure that no gathered threads ever include unrelated
6516 articles, but it also means that people who have posted with broken
6517 newsreaders won't be gathered properly.  The choice is yours---plague or
6518 cholera:
6519
6520 @table @code
6521 @item gnus-gather-threads-by-subject
6522 @findex gnus-gather-threads-by-subject
6523 This function is the default gathering function and looks at
6524 @code{Subject}s exclusively.
6525
6526 @item gnus-gather-threads-by-references
6527 @findex gnus-gather-threads-by-references
6528 This function looks at @code{References} headers exclusively.
6529 @end table
6530
6531 If you want to test gathering by @code{References}, you could say
6532 something like:
6533
6534 @lisp
6535 (setq gnus-summary-thread-gathering-function
6536       'gnus-gather-threads-by-references)
6537 @end lisp
6538
6539 @end table
6540
6541
6542 @node Filling In Threads
6543 @subsubsection Filling In Threads
6544
6545 @table @code
6546 @item gnus-fetch-old-headers
6547 @vindex gnus-fetch-old-headers
6548 If non-@code{nil}, Gnus will attempt to build old threads by fetching
6549 more old headers---headers to articles marked as read.  If you
6550 would like to display as few summary lines as possible, but still
6551 connect as many loose threads as possible, you should set this variable
6552 to @code{some} or a number.  If you set it to a number, no more than
6553 that number of extra old headers will be fetched.  In either case,
6554 fetching old headers only works if the back end you are using carries
6555 overview files---this would normally be @code{nntp}, @code{nnspool},
6556 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6557 the thread has been expired by the server, there's not much Gnus can do
6558 about that.
6559
6560 This variable can also be set to @code{invisible}.  This won't have any
6561 visible effects, but is useful if you use the @kbd{A T} command a lot
6562 (@pxref{Finding the Parent}).
6563
6564 @item gnus-build-sparse-threads
6565 @vindex gnus-build-sparse-threads
6566 Fetching old headers can be slow.  A low-rent similar effect can be
6567 gotten by setting this variable to @code{some}.  Gnus will then look at
6568 the complete @code{References} headers of all articles and try to string
6569 together articles that belong in the same thread.  This will leave
6570 @dfn{gaps} in the threading display where Gnus guesses that an article
6571 is missing from the thread.  (These gaps appear like normal summary
6572 lines.  If you select a gap, Gnus will try to fetch the article in
6573 question.)  If this variable is @code{t}, Gnus will display all these
6574 ``gaps'' without regard for whether they are useful for completing the
6575 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
6576 off sparse leaf nodes that don't lead anywhere.  This variable is
6577 @code{nil} by default.
6578
6579 @item gnus-read-all-available-headers
6580 @vindex gnus-read-all-available-headers
6581 This is a rather obscure variable that few will find useful.  It's
6582 intended for those non-news newsgroups where the back end has to fetch
6583 quite a lot to present the summary buffer, and where it's impossible to
6584 go back to parents of articles.  This is mostly the case in the
6585 web-based groups, like the @code{nnultimate} groups.
6586
6587 If you don't use those, then it's safe to leave this as the default
6588 @code{nil}.  If you want to use this variable, it should be a regexp
6589 that matches the group name, or @code{t} for all groups.
6590
6591 @end table
6592
6593
6594 @node More Threading
6595 @subsubsection More Threading
6596
6597 @table @code
6598 @item gnus-show-threads
6599 @vindex gnus-show-threads
6600 If this variable is @code{nil}, no threading will be done, and all of
6601 the rest of the variables here will have no effect.  Turning threading
6602 off will speed group selection up a bit, but it is sure to make reading
6603 slower and more awkward.
6604
6605 @item gnus-thread-hide-subtree
6606 @vindex gnus-thread-hide-subtree
6607 If non-@code{nil}, all threads will be hidden when the summary buffer is
6608 generated.
6609
6610 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6611 Available predicates are @code{gnus-article-unread-p} and
6612 @code{gnus-article-unseen-p}).
6613
6614 Here's an example:
6615
6616 @lisp
6617 (setq gnus-thread-hide-subtree
6618       '(or gnus-article-unread-p
6619            gnus-article-unseen-p))
6620 @end lisp
6621
6622 (It's a pretty nonsensical example, since all unseen articles are also
6623 unread, but you get my drift.)
6624
6625
6626 @item gnus-thread-expunge-below
6627 @vindex gnus-thread-expunge-below
6628 All threads that have a total score (as defined by
6629 @code{gnus-thread-score-function}) less than this number will be
6630 expunged.  This variable is @code{nil} by default, which means that no
6631 threads are expunged.
6632
6633 @item gnus-thread-hide-killed
6634 @vindex gnus-thread-hide-killed
6635 if you kill a thread and this variable is non-@code{nil}, the subtree
6636 will be hidden.
6637
6638 @item gnus-thread-ignore-subject
6639 @vindex gnus-thread-ignore-subject
6640 Sometimes somebody changes the subject in the middle of a thread.  If
6641 this variable is non-@code{nil}, which is the default, the subject
6642 change is ignored.  If it is @code{nil}, a change in the subject will
6643 result in a new thread.
6644
6645 @item gnus-thread-indent-level
6646 @vindex gnus-thread-indent-level
6647 This is a number that says how much each sub-thread should be indented.
6648 The default is 4.
6649
6650 @item gnus-sort-gathered-threads-function
6651 @vindex gnus-sort-gathered-threads-function
6652 Sometimes, particularly with mailing lists, the order in which mails
6653 arrive locally is not necessarily the same as the order in which they
6654 arrived on the mailing list.  Consequently, when sorting sub-threads
6655 using the default @code{gnus-thread-sort-by-number}, responses can end
6656 up appearing before the article to which they are responding to.
6657 Setting this variable to an alternate value
6658 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6659 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6660 more logical sub-thread ordering in such instances.
6661
6662 @end table
6663
6664
6665 @node Low-Level Threading
6666 @subsubsection Low-Level Threading
6667
6668 @table @code
6669
6670 @item gnus-parse-headers-hook
6671 @vindex gnus-parse-headers-hook
6672 Hook run before parsing any headers.
6673
6674 @item gnus-alter-header-function
6675 @vindex gnus-alter-header-function
6676 If non-@code{nil}, this function will be called to allow alteration of
6677 article header structures.  The function is called with one parameter,
6678 the article header vector, which it may alter in any way.  For instance,
6679 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6680 in systematic ways (by adding prefixes and such), you can use this
6681 variable to un-scramble the @code{Message-ID}s so that they are more
6682 meaningful.  Here's one example:
6683
6684 @lisp
6685 (setq gnus-alter-header-function 'my-alter-message-id)
6686
6687 (defun my-alter-message-id (header)
6688   (let ((id (mail-header-id header)))
6689     (when (string-match
6690            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6691       (mail-header-set-id
6692        (concat (match-string 1 id) "@@" (match-string 2 id))
6693        header))))
6694 @end lisp
6695
6696 @end table
6697
6698
6699 @node Thread Commands
6700 @subsection Thread Commands
6701 @cindex thread commands
6702
6703 @table @kbd
6704
6705 @item T k
6706 @itemx C-M-k
6707 @kindex T k (Summary)
6708 @kindex C-M-k (Summary)
6709 @findex gnus-summary-kill-thread
6710 Mark all articles in the current (sub-)thread as read
6711 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6712 remove all marks instead.  If the prefix argument is negative, tick
6713 articles instead.
6714
6715 @item T l
6716 @itemx C-M-l
6717 @kindex T l (Summary)
6718 @kindex C-M-l (Summary)
6719 @findex gnus-summary-lower-thread
6720 Lower the score of the current (sub-)thread
6721 (@code{gnus-summary-lower-thread}).
6722
6723 @item T i
6724 @kindex T i (Summary)
6725 @findex gnus-summary-raise-thread
6726 Increase the score of the current (sub-)thread
6727 (@code{gnus-summary-raise-thread}).
6728
6729 @item T #
6730 @kindex T # (Summary)
6731 @findex gnus-uu-mark-thread
6732 Set the process mark on the current (sub-)thread
6733 (@code{gnus-uu-mark-thread}).
6734
6735 @item T M-#
6736 @kindex T M-# (Summary)
6737 @findex gnus-uu-unmark-thread
6738 Remove the process mark from the current (sub-)thread
6739 (@code{gnus-uu-unmark-thread}).
6740
6741 @item T T
6742 @kindex T T (Summary)
6743 @findex gnus-summary-toggle-threads
6744 Toggle threading (@code{gnus-summary-toggle-threads}).
6745
6746 @item T s
6747 @kindex T s (Summary)
6748 @findex gnus-summary-show-thread
6749 Expose the (sub-)thread hidden under the current article, if any
6750 (@code{gnus-summary-show-thread}).
6751
6752 @item T h
6753 @kindex T h (Summary)
6754 @findex gnus-summary-hide-thread
6755 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6756
6757 @item T S
6758 @kindex T S (Summary)
6759 @findex gnus-summary-show-all-threads
6760 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6761
6762 @item T H
6763 @kindex T H (Summary)
6764 @findex gnus-summary-hide-all-threads
6765 Hide all threads (@code{gnus-summary-hide-all-threads}).
6766
6767 @item T t
6768 @kindex T t (Summary)
6769 @findex gnus-summary-rethread-current
6770 Re-thread the current article's thread
6771 (@code{gnus-summary-rethread-current}).  This works even when the
6772 summary buffer is otherwise unthreaded.
6773
6774 @item T ^
6775 @kindex T ^ (Summary)
6776 @findex gnus-summary-reparent-thread
6777 Make the current article the child of the marked (or previous) article
6778 (@code{gnus-summary-reparent-thread}).
6779
6780 @end table
6781
6782 The following commands are thread movement commands.  They all
6783 understand the numeric prefix.
6784
6785 @table @kbd
6786
6787 @item T n
6788 @kindex T n (Summary)
6789 @itemx C-M-f
6790 @kindex C-M-n (Summary)
6791 @itemx M-down
6792 @kindex M-down (Summary)
6793 @findex gnus-summary-next-thread
6794 Go to the next thread (@code{gnus-summary-next-thread}).
6795
6796 @item T p
6797 @kindex T p (Summary)
6798 @itemx C-M-b
6799 @kindex C-M-p (Summary)
6800 @itemx M-up
6801 @kindex M-up (Summary)
6802 @findex gnus-summary-prev-thread
6803 Go to the previous thread (@code{gnus-summary-prev-thread}).
6804
6805 @item T d
6806 @kindex T d (Summary)
6807 @findex gnus-summary-down-thread
6808 Descend the thread (@code{gnus-summary-down-thread}).
6809
6810 @item T u
6811 @kindex T u (Summary)
6812 @findex gnus-summary-up-thread
6813 Ascend the thread (@code{gnus-summary-up-thread}).
6814
6815 @item T o
6816 @kindex T o (Summary)
6817 @findex gnus-summary-top-thread
6818 Go to the top of the thread (@code{gnus-summary-top-thread}).
6819 @end table
6820
6821 @vindex gnus-thread-operation-ignore-subject
6822 If you ignore subject while threading, you'll naturally end up with
6823 threads that have several different subjects in them.  If you then issue
6824 a command like `T k' (@code{gnus-summary-kill-thread}) you might not
6825 wish to kill the entire thread, but just those parts of the thread that
6826 have the same subject as the current article.  If you like this idea,
6827 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6828 is non-@code{nil} (which it is by default), subjects will be ignored
6829 when doing thread commands.  If this variable is @code{nil}, articles in
6830 the same thread with different subjects will not be included in the
6831 operation in question.  If this variable is @code{fuzzy}, only articles
6832 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6833 Matching}).
6834
6835
6836 @node Sorting the Summary Buffer
6837 @section Sorting the Summary Buffer
6838
6839 @findex gnus-thread-sort-by-total-score
6840 @findex gnus-thread-sort-by-date
6841 @findex gnus-thread-sort-by-score
6842 @findex gnus-thread-sort-by-subject
6843 @findex gnus-thread-sort-by-author
6844 @findex gnus-thread-sort-by-number
6845 @findex gnus-thread-sort-by-random
6846 @vindex gnus-thread-sort-functions
6847 @findex gnus-thread-sort-by-most-recent-thread
6848 If you are using a threaded summary display, you can sort the threads by
6849 setting @code{gnus-thread-sort-functions}, which can be either a single
6850 function, a list of functions, or a list containing functions and
6851 @code{(not some-function)} elements.
6852
6853 By default, sorting is done on article numbers.  Ready-made sorting
6854 predicate functions include @code{gnus-thread-sort-by-number},
6855 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6856 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6857 @code{gnus-thread-sort-by-most-recent-number},
6858 @code{gnus-thread-sort-by-most-recent-date},
6859 @code{gnus-thread-sort-by-random} and
6860 @code{gnus-thread-sort-by-total-score}.
6861
6862 Each function takes two threads and returns non-@code{nil} if the first
6863 thread should be sorted before the other.  Note that sorting really is
6864 normally done by looking only at the roots of each thread.
6865
6866 If you use more than one function, the primary sort key should be the
6867 last function in the list.  You should probably always include
6868 @code{gnus-thread-sort-by-number} in the list of sorting
6869 functions---preferably first.  This will ensure that threads that are
6870 equal with respect to the other sort criteria will be displayed in
6871 ascending article order.
6872
6873 If you would like to sort by reverse score, then by subject, and finally
6874 by number, you could do something like:
6875
6876 @lisp
6877 (setq gnus-thread-sort-functions
6878       '(gnus-thread-sort-by-number
6879         gnus-thread-sort-by-subject
6880         (not gnus-thread-sort-by-total-score)))
6881 @end lisp
6882
6883 The threads that have highest score will be displayed first in the
6884 summary buffer.  When threads have the same score, they will be sorted
6885 alphabetically.  The threads that have the same score and the same
6886 subject will be sorted by number, which is (normally) the sequence in
6887 which the articles arrived.
6888
6889 If you want to sort by score and then reverse arrival order, you could
6890 say something like:
6891
6892 @lisp
6893 (setq gnus-thread-sort-functions
6894       '((lambda (t1 t2)
6895           (not (gnus-thread-sort-by-number t1 t2)))
6896         gnus-thread-sort-by-score))
6897 @end lisp
6898
6899 @vindex gnus-thread-score-function
6900 The function in the @code{gnus-thread-score-function} variable (default
6901 @code{+}) is used for calculating the total score of a thread.  Useful
6902 functions might be @code{max}, @code{min}, or squared means, or whatever
6903 tickles your fancy.
6904
6905 @findex gnus-article-sort-functions
6906 @findex gnus-article-sort-by-date
6907 @findex gnus-article-sort-by-score
6908 @findex gnus-article-sort-by-subject
6909 @findex gnus-article-sort-by-author
6910 @findex gnus-article-sort-by-random
6911 @findex gnus-article-sort-by-number
6912 If you are using an unthreaded display for some strange reason or
6913 other, you have to fiddle with the @code{gnus-article-sort-functions}
6914 variable.  It is very similar to the
6915 @code{gnus-thread-sort-functions}, except that it uses slightly
6916 different functions for article comparison.  Available sorting
6917 predicate functions are @code{gnus-article-sort-by-number},
6918 @code{gnus-article-sort-by-author},
6919 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
6920 @code{gnus-article-sort-by-random}, and
6921 @code{gnus-article-sort-by-score}.
6922
6923 If you want to sort an unthreaded summary display by subject, you could
6924 say something like:
6925
6926 @lisp
6927 (setq gnus-article-sort-functions
6928       '(gnus-article-sort-by-number
6929         gnus-article-sort-by-subject))
6930 @end lisp
6931
6932
6933
6934 @node Asynchronous Fetching
6935 @section Asynchronous Article Fetching
6936 @cindex asynchronous article fetching
6937 @cindex article pre-fetch
6938 @cindex pre-fetch
6939
6940 If you read your news from an @sc{nntp} server that's far away, the
6941 network latencies may make reading articles a chore.  You have to wait
6942 for a while after pressing @kbd{n} to go to the next article before the
6943 article appears.  Why can't Gnus just go ahead and fetch the article
6944 while you are reading the previous one?  Why not, indeed.
6945
6946 First, some caveats.  There are some pitfalls to using asynchronous
6947 article fetching, especially the way Gnus does it.
6948
6949 Let's say you are reading article 1, which is short, and article 2 is
6950 quite long, and you are not interested in reading that.  Gnus does not
6951 know this, so it goes ahead and fetches article 2.  You decide to read
6952 article 3, but since Gnus is in the process of fetching article 2, the
6953 connection is blocked.
6954
6955 To avoid these situations, Gnus will open two (count 'em two)
6956 connections to the server.  Some people may think this isn't a very nice
6957 thing to do, but I don't see any real alternatives.  Setting up that
6958 extra connection takes some time, so Gnus startup will be slower.
6959
6960 Gnus will fetch more articles than you will read.  This will mean that
6961 the link between your machine and the @sc{nntp} server will become more
6962 loaded than if you didn't use article pre-fetch.  The server itself will
6963 also become more loaded---both with the extra article requests, and the
6964 extra connection.
6965
6966 Ok, so now you know that you shouldn't really use this thing...  unless
6967 you really want to.
6968
6969 @vindex gnus-asynchronous
6970 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
6971 happen automatically.
6972
6973 @vindex gnus-use-article-prefetch
6974 You can control how many articles are to be pre-fetched by setting
6975 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
6976 that when you read an article in the group, the back end will pre-fetch
6977 the next 30 articles.  If this variable is @code{t}, the back end will
6978 pre-fetch all the articles it can without bound.  If it is
6979 @code{nil}, no pre-fetching will be done.
6980
6981 @vindex gnus-async-prefetch-article-p
6982 @findex gnus-async-read-p
6983 There are probably some articles that you don't want to pre-fetch---read
6984 articles, for instance.  The @code{gnus-async-prefetch-article-p} variable controls whether an article is to be pre-fetched.  This function should
6985 return non-@code{nil} when the article in question is to be
6986 pre-fetched.  The default is @code{gnus-async-read-p}, which returns
6987 @code{nil} on read articles.  The function is called with an article
6988 data structure as the only parameter.
6989
6990 If, for instance, you wish to pre-fetch only unread articles shorter than 100 lines, you could say something like:
6991
6992 @lisp
6993 (defun my-async-short-unread-p (data)
6994   "Return non-nil for short, unread articles."
6995   (and (gnus-data-unread-p data)
6996        (< (mail-header-lines (gnus-data-header data))
6997           100)))
6998
6999 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7000 @end lisp
7001
7002 These functions will be called many, many times, so they should
7003 preferably be short and sweet to avoid slowing down Gnus too much.
7004 It's probably a good idea to byte-compile things like this.
7005
7006 @vindex gnus-prefetched-article-deletion-strategy
7007 Articles have to be removed from the asynch buffer sooner or later.  The
7008 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7009 articles.  This is a list that may contain the following elements:
7010
7011 @table @code
7012 @item read
7013 Remove articles when they are read.
7014
7015 @item exit
7016 Remove articles when exiting the group.
7017 @end table
7018
7019 The default value is @code{(read exit)}.
7020
7021 @c @vindex gnus-use-header-prefetch
7022 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7023 @c from the next group.
7024
7025
7026 @node Article Caching
7027 @section Article Caching
7028 @cindex article caching
7029 @cindex caching
7030
7031 If you have an @emph{extremely} slow @sc{nntp} connection, you may
7032 consider turning article caching on.  Each article will then be stored
7033 locally under your home directory.  As you may surmise, this could
7034 potentially use @emph{huge} amounts of disk space, as well as eat up all
7035 your inodes so fast it will make your head swim.  In vodka.
7036
7037 Used carefully, though, it could be just an easier way to save articles.
7038
7039 @vindex gnus-use-long-file-name
7040 @vindex gnus-cache-directory
7041 @vindex gnus-use-cache
7042 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7043 all articles ticked or marked as dormant will then be copied
7044 over to your local cache (@code{gnus-cache-directory}).  Whether this
7045 cache is flat or hierarchical is controlled by the
7046 @code{gnus-use-long-file-name} variable, as usual.
7047
7048 When re-selecting a ticked or dormant article, it will be fetched from the
7049 cache instead of from the server.  As articles in your cache will never
7050 expire, this might serve as a method of saving articles while still
7051 keeping them where they belong.  Just mark all articles you want to save
7052 as dormant, and don't worry.
7053
7054 When an article is marked as read, is it removed from the cache.
7055
7056 @vindex gnus-cache-remove-articles
7057 @vindex gnus-cache-enter-articles
7058 The entering/removal of articles from the cache is controlled by the
7059 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7060 variables.  Both are lists of symbols.  The first is @code{(ticked
7061 dormant)} by default, meaning that ticked and dormant articles will be
7062 put in the cache.  The latter is @code{(read)} by default, meaning that
7063 articles marked as read are removed from the cache.  Possibly
7064 symbols in these two lists are @code{ticked}, @code{dormant},
7065 @code{unread} and @code{read}.
7066
7067 @findex gnus-jog-cache
7068 So where does the massive article-fetching and storing come into the
7069 picture?  The @code{gnus-jog-cache} command will go through all
7070 subscribed newsgroups, request all unread articles, score them, and
7071 store them in the cache.  You should only ever, ever ever ever, use this
7072 command if 1) your connection to the @sc{nntp} server is really, really,
7073 really slow and 2) you have a really, really, really huge disk.
7074 Seriously.  One way to cut down on the number of articles downloaded is
7075 to score unwanted articles down and have them marked as read.  They will
7076 not then be downloaded by this command.
7077
7078 @vindex gnus-uncacheable-groups
7079 @vindex gnus-cacheable-groups
7080 It is likely that you do not want caching on all groups.  For instance,
7081 if your @code{nnml} mail is located under your home directory, it makes no
7082 sense to cache it somewhere else under your home directory.  Unless you
7083 feel that it's neat to use twice as much space.
7084
7085 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7086 regexp of groups to cache, @samp{^nntp} for instance, or set the
7087 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7088 Both variables are @code{nil} by default.  If a group matches both
7089 variables, the group is not cached.
7090
7091 @findex gnus-cache-generate-nov-databases
7092 @findex gnus-cache-generate-active
7093 @vindex gnus-cache-active-file
7094 The cache stores information on what articles it contains in its active
7095 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7096 of the cache) becomes all messed up for some reason or other, Gnus
7097 offers two functions that will try to set things right.  @kbd{M-x
7098 gnus-cache-generate-nov-databases} will (re)build all the @sc{nov}
7099 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7100 file.
7101
7102 @findex gnus-cache-move-cache
7103 @code{gnus-cache-move-cache} will move your whole
7104 @code{gnus-cache-directory} to some other location. You get asked to
7105 where, isn't that cool?
7106
7107 @node Persistent Articles
7108 @section Persistent Articles
7109 @cindex persistent articles
7110
7111 Closely related to article caching, we have @dfn{persistent articles}.
7112 In fact, it's just a different way of looking at caching, and much more
7113 useful in my opinion.
7114
7115 Say you're reading a newsgroup, and you happen on to some valuable gem
7116 that you want to keep and treasure forever.  You'd normally just save it
7117 (using one of the many saving commands) in some file.  The problem with
7118 that is that it's just, well, yucky.  Ideally you'd prefer just having
7119 the article remain in the group where you found it forever; untouched by
7120 the expiry going on at the news server.
7121
7122 This is what a @dfn{persistent article} is---an article that just won't
7123 be deleted.  It's implemented using the normal cache functions, but
7124 you use two explicit commands for managing persistent articles:
7125
7126 @table @kbd
7127
7128 @item *
7129 @kindex * (Summary)
7130 @findex gnus-cache-enter-article
7131 Make the current article persistent (@code{gnus-cache-enter-article}).
7132
7133 @item M-*
7134 @kindex M-* (Summary)
7135 @findex gnus-cache-remove-article
7136 Remove the current article from the persistent articles
7137 (@code{gnus-cache-remove-article}).  This will normally delete the
7138 article.
7139 @end table
7140
7141 Both these commands understand the process/prefix convention.
7142
7143 To avoid having all ticked articles (and stuff) entered into the cache,
7144 you should set @code{gnus-use-cache} to @code{passive} if you're just
7145 interested in persistent articles:
7146
7147 @lisp
7148 (setq gnus-use-cache 'passive)
7149 @end lisp
7150
7151
7152 @node Article Backlog
7153 @section Article Backlog
7154 @cindex backlog
7155 @cindex article backlog
7156
7157 If you have a slow connection, but the idea of using caching seems
7158 unappealing to you (and it is, really), you can help the situation some
7159 by switching on the @dfn{backlog}.  This is where Gnus will buffer
7160 already read articles so that it doesn't have to re-fetch articles
7161 you've already read.  This only helps if you are in the habit of
7162 re-selecting articles you've recently read, of course.  If you never do
7163 that, turning the backlog on will slow Gnus down a little bit, and
7164 increase memory usage some.
7165
7166 @vindex gnus-keep-backlog
7167 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
7168 at most @var{n} old articles in a buffer for later re-fetching.  If this
7169 variable is non-@code{nil} and is not a number, Gnus will store
7170 @emph{all} read articles, which means that your Emacs will grow without
7171 bound before exploding and taking your machine down with you.  I put
7172 that in there just to keep y'all on your toes.
7173
7174 This variable is @code{nil} by default.
7175
7176
7177 @node Saving Articles
7178 @section Saving Articles
7179 @cindex saving articles
7180
7181 Gnus can save articles in a number of ways.  Below is the documentation
7182 for saving articles in a fairly straight-forward fashion (i.e., little
7183 processing of the article is done before it is saved).  For a different
7184 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7185 (@pxref{Decoding Articles}).
7186
7187 For the commands listed here, the target is a file.  If you want to
7188 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7189 command (@pxref{Mail Group Commands}).
7190
7191 @vindex gnus-save-all-headers
7192 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
7193 unwanted headers before saving the article.
7194
7195 @vindex gnus-saved-headers
7196 If the preceding variable is @code{nil}, all headers that match the
7197 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7198 deleted before saving.
7199
7200 @table @kbd
7201
7202 @item O o
7203 @itemx o
7204 @kindex O o (Summary)
7205 @kindex o (Summary)
7206 @findex gnus-summary-save-article
7207 @c @icon{gnus-summary-save-article}
7208 Save the current article using the default article saver
7209 (@code{gnus-summary-save-article}).
7210
7211 @item O m
7212 @kindex O m (Summary)
7213 @findex gnus-summary-save-article-mail
7214 Save the current article in mail format
7215 (@code{gnus-summary-save-article-mail}).
7216
7217 @item O r
7218 @kindex O r (Summary)
7219 @findex gnus-summary-save-article-rmail
7220 Save the current article in rmail format
7221 (@code{gnus-summary-save-article-rmail}).
7222
7223 @item O f
7224 @kindex O f (Summary)
7225 @findex gnus-summary-save-article-file
7226 @c @icon{gnus-summary-save-article-file}
7227 Save the current article in plain file format
7228 (@code{gnus-summary-save-article-file}).
7229
7230 @item O F
7231 @kindex O F (Summary)
7232 @findex gnus-summary-write-article-file
7233 Write the current article in plain file format, overwriting any previous
7234 file contents (@code{gnus-summary-write-article-file}).
7235
7236 @item O b
7237 @kindex O b (Summary)
7238 @findex gnus-summary-save-article-body-file
7239 Save the current article body in plain file format
7240 (@code{gnus-summary-save-article-body-file}).
7241
7242 @item O h
7243 @kindex O h (Summary)
7244 @findex gnus-summary-save-article-folder
7245 Save the current article in mh folder format
7246 (@code{gnus-summary-save-article-folder}).
7247
7248 @item O v
7249 @kindex O v (Summary)
7250 @findex gnus-summary-save-article-vm
7251 Save the current article in a VM folder
7252 (@code{gnus-summary-save-article-vm}).
7253
7254 @item O p
7255 @itemx |
7256 @kindex O p (Summary)
7257 @kindex | (Summary)
7258 @findex gnus-summary-pipe-output
7259 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7260 the current article to a process (@code{gnus-summary-pipe-output}).
7261 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7262 complete headers in the piped output.
7263
7264 @item O P
7265 @kindex O P (Summary)
7266 @findex gnus-summary-muttprint
7267 @vindex gnus-summary-muttprint-program
7268 Save the current article into muttprint. That is, print it using the
7269 external program Muttprint (see
7270 @uref{http://muttprint.sourceforge.net/}). The program name and
7271 options to use is controlled by the variable
7272 @code{gnus-summary-muttprint-program}. (@code{gnus-summary-muttprint}).
7273
7274 @end table
7275
7276 @vindex gnus-prompt-before-saving
7277 All these commands use the process/prefix convention
7278 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7279 functions, you might get tired of being prompted for files to save each
7280 and every article in.  The prompting action is controlled by
7281 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7282 default, giving you that excessive prompting action you know and
7283 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7284 just once for each series of articles you save.  If you like to really
7285 have Gnus do all your thinking for you, you can even set this variable
7286 to @code{nil}, which means that you will never be prompted for files to
7287 save articles in.  Gnus will simply save all the articles in the default
7288 files.
7289
7290
7291 @vindex gnus-default-article-saver
7292 You can customize the @code{gnus-default-article-saver} variable to make
7293 Gnus do what you want it to.  You can use any of the six ready-made
7294 functions below, or you can create your own.
7295
7296 @table @code
7297
7298 @item gnus-summary-save-in-rmail
7299 @findex gnus-summary-save-in-rmail
7300 @vindex gnus-rmail-save-name
7301 @findex gnus-plain-save-name
7302 This is the default format, @dfn{babyl}.  Uses the function in the
7303 @code{gnus-rmail-save-name} variable to get a file name to save the
7304 article in.  The default is @code{gnus-plain-save-name}.
7305
7306 @item gnus-summary-save-in-mail
7307 @findex gnus-summary-save-in-mail
7308 @vindex gnus-mail-save-name
7309 Save in a Unix mail (mbox) file.  Uses the function in the
7310 @code{gnus-mail-save-name} variable to get a file name to save the
7311 article in.  The default is @code{gnus-plain-save-name}.
7312
7313 @item gnus-summary-save-in-file
7314 @findex gnus-summary-save-in-file
7315 @vindex gnus-file-save-name
7316 @findex gnus-numeric-save-name
7317 Append the article straight to an ordinary file.  Uses the function in
7318 the @code{gnus-file-save-name} variable to get a file name to save the
7319 article in.  The default is @code{gnus-numeric-save-name}.
7320
7321 @item gnus-summary-write-to-file
7322 @findex gnus-summary-write-to-file
7323 Write the article straight to an ordinary file.  The file is
7324 overwritten if it exists.  Uses the function in the
7325 @code{gnus-file-save-name} variable to get a file name to save the
7326 article in.  The default is @code{gnus-numeric-save-name}.
7327
7328 @item gnus-summary-save-body-in-file
7329 @findex gnus-summary-save-body-in-file
7330 Append the article body to an ordinary file.  Uses the function in the
7331 @code{gnus-file-save-name} variable to get a file name to save the
7332 article in.  The default is @code{gnus-numeric-save-name}.
7333
7334 @item gnus-summary-save-in-folder
7335 @findex gnus-summary-save-in-folder
7336 @findex gnus-folder-save-name
7337 @findex gnus-Folder-save-name
7338 @vindex gnus-folder-save-name
7339 @cindex rcvstore
7340 @cindex MH folders
7341 Save the article to an MH folder using @code{rcvstore} from the MH
7342 library.  Uses the function in the @code{gnus-folder-save-name} variable
7343 to get a file name to save the article in.  The default is
7344 @code{gnus-folder-save-name}, but you can also use
7345 @code{gnus-Folder-save-name}, which creates capitalized names.
7346
7347 @item gnus-summary-save-in-vm
7348 @findex gnus-summary-save-in-vm
7349 Save the article in a VM folder.  You have to have the VM mail
7350 reader to use this setting.
7351 @end table
7352
7353 @vindex gnus-article-save-directory
7354 All of these functions, except for the last one, will save the article
7355 in the @code{gnus-article-save-directory}, which is initialized from the
7356 @code{SAVEDIR} environment variable.  This is @file{~/News/} by
7357 default.
7358
7359 As you can see above, the functions use different functions to find a
7360 suitable name of a file to save the article in.  Below is a list of
7361 available functions that generate names:
7362
7363 @table @code
7364
7365 @item gnus-Numeric-save-name
7366 @findex gnus-Numeric-save-name
7367 File names like @file{~/News/Alt.andrea-dworkin/45}.
7368
7369 @item gnus-numeric-save-name
7370 @findex gnus-numeric-save-name
7371 File names like @file{~/News/alt.andrea-dworkin/45}.
7372
7373 @item gnus-Plain-save-name
7374 @findex gnus-Plain-save-name
7375 File names like @file{~/News/Alt.andrea-dworkin}.
7376
7377 @item gnus-plain-save-name
7378 @findex gnus-plain-save-name
7379 File names like @file{~/News/alt.andrea-dworkin}.
7380
7381 @item gnus-sender-save-name
7382 @findex gnus-sender-save-name
7383 File names like @file{~/News/larsi}.
7384 @end table
7385
7386 @vindex gnus-split-methods
7387 You can have Gnus suggest where to save articles by plonking a regexp into
7388 the @code{gnus-split-methods} alist.  For instance, if you would like to
7389 save articles related to Gnus in the file @file{gnus-stuff}, and articles
7390 related to VM in @code{vm-stuff}, you could set this variable to something
7391 like:
7392
7393 @lisp
7394 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7395  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7396  (my-choosing-function "../other-dir/my-stuff")
7397  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7398 @end lisp
7399
7400 We see that this is a list where each element is a list that has two
7401 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7402 a string (in which case it is used as a regexp to match on the article
7403 head); it can be a symbol (which will be called as a function with the
7404 group name as a parameter); or it can be a list (which will be
7405 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7406 the @dfn{file} will be used as a default prompt.  In addition, the
7407 result of the operation itself will be used if the function or form
7408 called returns a string or a list of strings.
7409
7410 You basically end up with a list of file names that might be used when
7411 saving the current article.  (All ``matches'' will be used.)  You will
7412 then be prompted for what you really want to use as a name, with file
7413 name completion over the results from applying this variable.
7414
7415 This variable is @code{((gnus-article-archive-name))} by default, which
7416 means that Gnus will look at the articles it saves for an
7417 @code{Archive-name} line and use that as a suggestion for the file
7418 name.
7419
7420 Here's an example function to clean up file names somewhat.  If you have
7421 lots of mail groups called things like
7422 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7423 these group names before creating the file name to save to.  The
7424 following will do just that:
7425
7426 @lisp
7427 (defun my-save-name (group)
7428   (when (string-match "^nnml:mail." group)
7429     (substring group (match-end 0))))
7430
7431 (setq gnus-split-methods
7432       '((gnus-article-archive-name)
7433         (my-save-name)))
7434 @end lisp
7435
7436
7437 @vindex gnus-use-long-file-name
7438 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7439 @code{nil}, all the preceding functions will replace all periods
7440 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7441 the functions will generate hierarchies of directories instead of having
7442 all the files in the top level directory
7443 (@file{~/News/alt/andrea-dworkin} instead of
7444 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7445 on most systems.  However, for historical reasons, this is @code{nil} on
7446 Xenix and usg-unix-v machines by default.
7447
7448 This function also affects kill and score file names.  If this variable
7449 is a list, and the list contains the element @code{not-score}, long file
7450 names will not be used for score files, if it contains the element
7451 @code{not-save}, long file names will not be used for saving, and if it
7452 contains the element @code{not-kill}, long file names will not be used
7453 for kill files.
7454
7455 If you'd like to save articles in a hierarchy that looks something like
7456 a spool, you could
7457
7458 @lisp
7459 (setq gnus-use-long-file-name '(not-save)) ; to get a hierarchy
7460 (setq gnus-default-article-saver
7461       'gnus-summary-save-in-file) ; no encoding
7462 @end lisp
7463
7464 Then just save with @kbd{o}.  You'd then read this hierarchy with
7465 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7466 the top level directory as the argument (@file{~/News/}).  Then just walk
7467 around to the groups/directories with @code{nneething}.
7468
7469
7470 @node Decoding Articles
7471 @section Decoding Articles
7472 @cindex decoding articles
7473
7474 Sometime users post articles (or series of articles) that have been
7475 encoded in some way or other.  Gnus can decode them for you.
7476
7477 @menu
7478 * Uuencoded Articles::          Uudecode articles.
7479 * Shell Archives::              Unshar articles.
7480 * PostScript Files::            Split PostScript.
7481 * Other Files::                 Plain save and binhex.
7482 * Decoding Variables::          Variables for a happy decoding.
7483 * Viewing Files::               You want to look at the result of the decoding?
7484 @end menu
7485
7486 @cindex series
7487 @cindex article series
7488 All these functions use the process/prefix convention
7489 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7490 the extension that a ``single article'' means ``a single series''.  Gnus
7491 can find out by itself what articles belong to a series, decode all the
7492 articles and unpack/view/save the resulting file(s).
7493
7494 Gnus guesses what articles are in the series according to the following
7495 simplish rule: The subjects must be (nearly) identical, except for the
7496 last two numbers of the line.  (Spaces are largely ignored, however.)
7497
7498 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
7499 will find all the articles that match the regexp @samp{^cat.gif
7500 ([0-9]+/[0-9]+).*$}.
7501
7502 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7503 series}, will not be properly recognized by any of the automatic viewing
7504 commands, and you have to mark the articles manually with @kbd{#}.
7505
7506
7507 @node Uuencoded Articles
7508 @subsection Uuencoded Articles
7509 @cindex uudecode
7510 @cindex uuencoded articles
7511
7512 @table @kbd
7513
7514 @item X u
7515 @kindex X u (Summary)
7516 @findex gnus-uu-decode-uu
7517 @c @icon{gnus-uu-decode-uu}
7518 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7519
7520 @item X U
7521 @kindex X U (Summary)
7522 @findex gnus-uu-decode-uu-and-save
7523 Uudecodes and saves the current series
7524 (@code{gnus-uu-decode-uu-and-save}).
7525
7526 @item X v u
7527 @kindex X v u (Summary)
7528 @findex gnus-uu-decode-uu-view
7529 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7530
7531 @item X v U
7532 @kindex X v U (Summary)
7533 @findex gnus-uu-decode-uu-and-save-view
7534 Uudecodes, views and saves the current series
7535 (@code{gnus-uu-decode-uu-and-save-view}).
7536
7537 @end table
7538
7539 Remember that these all react to the presence of articles marked with
7540 the process mark.  If, for instance, you'd like to decode and save an
7541 entire newsgroup, you'd typically do @kbd{M P a}
7542 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7543 (@code{gnus-uu-decode-uu-and-save}).
7544
7545 All this is very much different from how @code{gnus-uu} worked with
7546 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7547 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7548 articles in some way (@pxref{Setting Process Marks}) and then press
7549 @kbd{X u}.
7550
7551 @vindex gnus-uu-notify-files
7552 Note: When trying to decode articles that have names matching
7553 @code{gnus-uu-notify-files}, which is hard-coded to
7554 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7555 automatically post an article on @samp{comp.unix.wizards} saying that
7556 you have just viewed the file in question.  This feature can't be turned
7557 off.
7558
7559
7560 @node Shell Archives
7561 @subsection Shell Archives
7562 @cindex unshar
7563 @cindex shell archives
7564 @cindex shared articles
7565
7566 Shell archives (``shar files'') used to be a popular way to distribute
7567 sources, but it isn't used all that much today.  In any case, we have
7568 some commands to deal with these:
7569
7570 @table @kbd
7571
7572 @item X s
7573 @kindex X s (Summary)
7574 @findex gnus-uu-decode-unshar
7575 Unshars the current series (@code{gnus-uu-decode-unshar}).
7576
7577 @item X S
7578 @kindex X S (Summary)
7579 @findex gnus-uu-decode-unshar-and-save
7580 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7581
7582 @item X v s
7583 @kindex X v s (Summary)
7584 @findex gnus-uu-decode-unshar-view
7585 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7586
7587 @item X v S
7588 @kindex X v S (Summary)
7589 @findex gnus-uu-decode-unshar-and-save-view
7590 Unshars, views and saves the current series
7591 (@code{gnus-uu-decode-unshar-and-save-view}).
7592 @end table
7593
7594
7595 @node PostScript Files
7596 @subsection PostScript Files
7597 @cindex PostScript
7598
7599 @table @kbd
7600
7601 @item X p
7602 @kindex X p (Summary)
7603 @findex gnus-uu-decode-postscript
7604 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7605
7606 @item X P
7607 @kindex X P (Summary)
7608 @findex gnus-uu-decode-postscript-and-save
7609 Unpack and save the current PostScript series
7610 (@code{gnus-uu-decode-postscript-and-save}).
7611
7612 @item X v p
7613 @kindex X v p (Summary)
7614 @findex gnus-uu-decode-postscript-view
7615 View the current PostScript series
7616 (@code{gnus-uu-decode-postscript-view}).
7617
7618 @item X v P
7619 @kindex X v P (Summary)
7620 @findex gnus-uu-decode-postscript-and-save-view
7621 View and save the current PostScript series
7622 (@code{gnus-uu-decode-postscript-and-save-view}).
7623 @end table
7624
7625
7626 @node Other Files
7627 @subsection Other Files
7628
7629 @table @kbd
7630 @item X o
7631 @kindex X o (Summary)
7632 @findex gnus-uu-decode-save
7633 Save the current series
7634 (@code{gnus-uu-decode-save}).
7635
7636 @item X b
7637 @kindex X b (Summary)
7638 @findex gnus-uu-decode-binhex
7639 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7640 doesn't really work yet.
7641 @end table
7642
7643
7644 @node Decoding Variables
7645 @subsection Decoding Variables
7646
7647 Adjective, not verb.
7648
7649 @menu
7650 * Rule Variables::              Variables that say how a file is to be viewed.
7651 * Other Decode Variables::      Other decode variables.
7652 * Uuencoding and Posting::      Variables for customizing uuencoding.
7653 @end menu
7654
7655
7656 @node Rule Variables
7657 @subsubsection Rule Variables
7658 @cindex rule variables
7659
7660 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7661 variables are of the form
7662
7663 @lisp
7664       (list '(regexp1 command2)
7665             '(regexp2 command2)
7666             ...)
7667 @end lisp
7668
7669 @table @code
7670
7671 @item gnus-uu-user-view-rules
7672 @vindex gnus-uu-user-view-rules
7673 @cindex sox
7674 This variable is consulted first when viewing files.  If you wish to use,
7675 for instance, @code{sox} to convert an @samp{.au} sound file, you could
7676 say something like:
7677 @lisp
7678 (setq gnus-uu-user-view-rules
7679       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7680 @end lisp
7681
7682 @item gnus-uu-user-view-rules-end
7683 @vindex gnus-uu-user-view-rules-end
7684 This variable is consulted if Gnus couldn't make any matches from the
7685 user and default view rules.
7686
7687 @item gnus-uu-user-archive-rules
7688 @vindex gnus-uu-user-archive-rules
7689 This variable can be used to say what commands should be used to unpack
7690 archives.
7691 @end table
7692
7693
7694 @node Other Decode Variables
7695 @subsubsection Other Decode Variables
7696
7697 @table @code
7698 @vindex gnus-uu-grabbed-file-functions
7699
7700 @item gnus-uu-grabbed-file-functions
7701 All functions in this list will be called right after each file has been
7702 successfully decoded---so that you can move or view files right away,
7703 and don't have to wait for all files to be decoded before you can do
7704 anything.  Ready-made functions you can put in this list are:
7705
7706 @table @code
7707
7708 @item gnus-uu-grab-view
7709 @findex gnus-uu-grab-view
7710 View the file.
7711
7712 @item gnus-uu-grab-move
7713 @findex gnus-uu-grab-move
7714 Move the file (if you're using a saving function.)
7715 @end table
7716
7717 @item gnus-uu-be-dangerous
7718 @vindex gnus-uu-be-dangerous
7719 Specifies what to do if unusual situations arise during decoding.  If
7720 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7721 that didn't work, and overwrite existing files.  Otherwise, ask each
7722 time.
7723
7724 @item gnus-uu-ignore-files-by-name
7725 @vindex gnus-uu-ignore-files-by-name
7726 Files with name matching this regular expression won't be viewed.
7727
7728 @item gnus-uu-ignore-files-by-type
7729 @vindex gnus-uu-ignore-files-by-type
7730 Files with a @sc{mime} type matching this variable won't be viewed.
7731 Note that Gnus tries to guess what type the file is based on the name.
7732 @code{gnus-uu} is not a @sc{mime} package (yet), so this is slightly
7733 kludgey.
7734
7735 @item gnus-uu-tmp-dir
7736 @vindex gnus-uu-tmp-dir
7737 Where @code{gnus-uu} does its work.
7738
7739 @item gnus-uu-do-not-unpack-archives
7740 @vindex gnus-uu-do-not-unpack-archives
7741 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7742 looking for files to display.
7743
7744 @item gnus-uu-view-and-save
7745 @vindex gnus-uu-view-and-save
7746 Non-@code{nil} means that the user will always be asked to save a file
7747 after viewing it.
7748
7749 @item gnus-uu-ignore-default-view-rules
7750 @vindex gnus-uu-ignore-default-view-rules
7751 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7752 rules.
7753
7754 @item gnus-uu-ignore-default-archive-rules
7755 @vindex gnus-uu-ignore-default-archive-rules
7756 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7757 unpacking commands.
7758
7759 @item gnus-uu-kill-carriage-return
7760 @vindex gnus-uu-kill-carriage-return
7761 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7762 from articles.
7763
7764 @item gnus-uu-unmark-articles-not-decoded
7765 @vindex gnus-uu-unmark-articles-not-decoded
7766 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7767 decoded articles as unread.
7768
7769 @item gnus-uu-correct-stripped-uucode
7770 @vindex gnus-uu-correct-stripped-uucode
7771 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7772 uuencoded files that have had trailing spaces deleted.
7773
7774 @item gnus-uu-pre-uudecode-hook
7775 @vindex gnus-uu-pre-uudecode-hook
7776 Hook run before sending a message to @code{uudecode}.
7777
7778 @item gnus-uu-view-with-metamail
7779 @vindex gnus-uu-view-with-metamail
7780 @cindex metamail
7781 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7782 commands defined by the rule variables and just fudge a @sc{mime}
7783 content type based on the file name.  The result will be fed to
7784 @code{metamail} for viewing.
7785
7786 @item gnus-uu-save-in-digest
7787 @vindex gnus-uu-save-in-digest
7788 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7789 decoding, will save in digests.  If this variable is @code{nil},
7790 @code{gnus-uu} will just save everything in a file without any
7791 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7792 to specify any meaningful volume and issue numbers were found, so I
7793 simply dropped them.
7794
7795 @end table
7796
7797
7798 @node Uuencoding and Posting
7799 @subsubsection Uuencoding and Posting
7800
7801 @table @code
7802
7803 @item gnus-uu-post-include-before-composing
7804 @vindex gnus-uu-post-include-before-composing
7805 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7806 before you compose the article.  If this variable is @code{t}, you can
7807 either include an encoded file with @kbd{C-c C-i} or have one included
7808 for you when you post the article.
7809
7810 @item gnus-uu-post-length
7811 @vindex gnus-uu-post-length
7812 Maximum length of an article.  The encoded file will be split into how
7813 many articles it takes to post the entire file.
7814
7815 @item gnus-uu-post-threaded
7816 @vindex gnus-uu-post-threaded
7817 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7818 thread.  This may not be smart, as no other decoder I have seen is able
7819 to follow threads when collecting uuencoded articles.  (Well, I have
7820 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7821 think that counts...) Default is @code{nil}.
7822
7823 @item gnus-uu-post-separate-description
7824 @vindex gnus-uu-post-separate-description
7825 Non-@code{nil} means that the description will be posted in a separate
7826 article.  The first article will typically be numbered (0/x).  If this
7827 variable is @code{nil}, the description the user enters will be included
7828 at the beginning of the first article, which will be numbered (1/x).
7829 Default is @code{t}.
7830
7831 @end table
7832
7833
7834 @node Viewing Files
7835 @subsection Viewing Files
7836 @cindex viewing files
7837 @cindex pseudo-articles
7838
7839 After decoding, if the file is some sort of archive, Gnus will attempt
7840 to unpack the archive and see if any of the files in the archive can be
7841 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7842 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
7843 uncompress and de-tar the main file, and then view the two pictures.
7844 This unpacking process is recursive, so if the archive contains archives
7845 of archives, it'll all be unpacked.
7846
7847 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
7848 extracted file into the summary buffer.  If you go to these
7849 ``articles'', you will be prompted for a command to run (usually Gnus
7850 will make a suggestion), and then the command will be run.
7851
7852 @vindex gnus-view-pseudo-asynchronously
7853 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7854 until the viewing is done before proceeding.
7855
7856 @vindex gnus-view-pseudos
7857 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7858 the pseudo-articles into the summary buffer, but view them
7859 immediately.  If this variable is @code{not-confirm}, the user won't even
7860 be asked for a confirmation before viewing is done.
7861
7862 @vindex gnus-view-pseudos-separately
7863 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7864 pseudo-article will be created for each file to be viewed.  If
7865 @code{nil}, all files that use the same viewing command will be given as
7866 a list of parameters to that command.
7867
7868 @vindex gnus-insert-pseudo-articles
7869 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7870 pseudo-articles when decoding.  It is @code{t} by default.
7871
7872 So; there you are, reading your @emph{pseudo-articles} in your
7873 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7874 Why isn't anything real anymore? How did we get here?
7875
7876
7877 @node Article Treatment
7878 @section Article Treatment
7879
7880 Reading through this huge manual, you may have quite forgotten that the
7881 object of newsreaders is to actually, like, read what people have
7882 written.  Reading articles.  Unfortunately, people are quite bad at
7883 writing, so there are tons of functions and variables to make reading
7884 these articles easier.
7885
7886 @menu
7887 * Article Highlighting::        You want to make the article look like fruit salad.
7888 * Article Fontisizing::         Making emphasized text look nice.
7889 * Article Hiding::              You also want to make certain info go away.
7890 * Article Washing::             Lots of way-neat functions to make life better.
7891 * Article Header::              Doing various header transformations.
7892 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7893 * Article Date::                Grumble, UT!
7894 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7895 * Article Signature::           What is a signature?
7896 * Article Miscellania::         Various other stuff.
7897 @end menu
7898
7899
7900 @node Article Highlighting
7901 @subsection Article Highlighting
7902 @cindex highlighting
7903
7904 Not only do you want your article buffer to look like fruit salad, but
7905 you want it to look like technicolor fruit salad.
7906
7907 @table @kbd
7908
7909 @item W H a
7910 @kindex W H a (Summary)
7911 @findex gnus-article-highlight
7912 @findex gnus-article-maybe-highlight
7913 Do much highlighting of the current article
7914 (@code{gnus-article-highlight}).  This function highlights header, cited
7915 text, the signature, and adds buttons to the body and the head.
7916
7917 @item W H h
7918 @kindex W H h (Summary)
7919 @findex gnus-article-highlight-headers
7920 @vindex gnus-header-face-alist
7921 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7922 highlighting will be done according to the @code{gnus-header-face-alist}
7923 variable, which is a list where each element has the form
7924 @code{(@var{regexp} @var{name} @var{content})}.
7925 @var{regexp} is a regular expression for matching the
7926 header, @var{name} is the face used for highlighting the header name
7927 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7928 the header value.  The first match made will be used.  Note that
7929 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7930
7931 @item W H c
7932 @kindex W H c (Summary)
7933 @findex gnus-article-highlight-citation
7934 Highlight cited text (@code{gnus-article-highlight-citation}).
7935
7936 Some variables to customize the citation highlights:
7937
7938 @table @code
7939 @vindex gnus-cite-parse-max-size
7940
7941 @item gnus-cite-parse-max-size
7942 If the article size if bigger than this variable (which is 25000 by
7943 default), no citation highlighting will be performed.
7944
7945 @item gnus-cite-max-prefix
7946 @vindex gnus-cite-max-prefix
7947 Maximum possible length for a citation prefix (default 20).
7948
7949 @item gnus-cite-face-list
7950 @vindex gnus-cite-face-list
7951 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
7952 When there are citations from multiple articles in the same message,
7953 Gnus will try to give each citation from each article its own face.
7954 This should make it easier to see who wrote what.
7955
7956 @item gnus-supercite-regexp
7957 @vindex gnus-supercite-regexp
7958 Regexp matching normal Supercite attribution lines.
7959
7960 @item gnus-supercite-secondary-regexp
7961 @vindex gnus-supercite-secondary-regexp
7962 Regexp matching mangled Supercite attribution lines.
7963
7964 @item gnus-cite-minimum-match-count
7965 @vindex gnus-cite-minimum-match-count
7966 Minimum number of identical prefixes we have to see before we believe
7967 that it's a citation.
7968
7969 @item gnus-cite-attribution-prefix
7970 @vindex gnus-cite-attribution-prefix
7971 Regexp matching the beginning of an attribution line.
7972
7973 @item gnus-cite-attribution-suffix
7974 @vindex gnus-cite-attribution-suffix
7975 Regexp matching the end of an attribution line.
7976
7977 @item gnus-cite-attribution-face
7978 @vindex gnus-cite-attribution-face
7979 Face used for attribution lines.  It is merged with the face for the
7980 cited text belonging to the attribution.
7981
7982 @end table
7983
7984
7985 @item W H s
7986 @kindex W H s (Summary)
7987 @vindex gnus-signature-separator
7988 @vindex gnus-signature-face
7989 @findex gnus-article-highlight-signature
7990 Highlight the signature (@code{gnus-article-highlight-signature}).
7991 Everything after @code{gnus-signature-separator} (@pxref{Article
7992 Signature}) in an article will be considered a signature and will be
7993 highlighted with @code{gnus-signature-face}, which is @code{italic} by
7994 default.
7995
7996 @end table
7997
7998 @xref{Customizing Articles}, for how to highlight articles automatically.
7999
8000
8001 @node Article Fontisizing
8002 @subsection Article Fontisizing
8003 @cindex emphasis
8004 @cindex article emphasis
8005
8006 @findex gnus-article-emphasize
8007 @kindex W e (Summary)
8008 People commonly add emphasis to words in news articles by writing things
8009 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8010 this look nicer by running the article through the @kbd{W e}
8011 (@code{gnus-article-emphasize}) command.
8012
8013 @vindex gnus-emphasis-alist
8014 How the emphasis is computed is controlled by the
8015 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8016 element is a regular expression to be matched.  The second is a number
8017 that says what regular expression grouping is used to find the entire
8018 emphasized word.  The third is a number that says what regexp grouping
8019 should be displayed and highlighted.  (The text between these two
8020 groupings will be hidden.)  The fourth is the face used for
8021 highlighting.
8022
8023 @lisp
8024 (setq gnus-emphasis-alist
8025       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8026         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8027 @end lisp
8028
8029 @cindex slash
8030 @cindex asterisk
8031 @cindex underline
8032 @cindex /
8033 @cindex *
8034
8035 @vindex gnus-emphasis-underline
8036 @vindex gnus-emphasis-bold
8037 @vindex gnus-emphasis-italic
8038 @vindex gnus-emphasis-underline-bold
8039 @vindex gnus-emphasis-underline-italic
8040 @vindex gnus-emphasis-bold-italic
8041 @vindex gnus-emphasis-underline-bold-italic
8042 By default, there are seven rules, and they use the following faces:
8043 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8044 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8045 @code{gnus-emphasis-underline-italic},
8046 @code{gnus-emphasis-underline-bold}, and
8047 @code{gnus-emphasis-underline-bold-italic}.
8048
8049 If you want to change these faces, you can either use @kbd{M-x
8050 customize}, or you can use @code{copy-face}.  For instance, if you want
8051 to make @code{gnus-emphasis-italic} use a red face instead, you could
8052 say something like:
8053
8054 @lisp
8055 (copy-face 'red 'gnus-emphasis-italic)
8056 @end lisp
8057
8058 @vindex gnus-group-highlight-words-alist
8059
8060 If you want to highlight arbitrary words, you can use the
8061 @code{gnus-group-highlight-words-alist} variable, which uses the same
8062 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8063 parameter (@pxref{Group Parameters}) can also be used.
8064
8065 @xref{Customizing Articles}, for how to fontize articles automatically.
8066
8067
8068 @node Article Hiding
8069 @subsection Article Hiding
8070 @cindex article hiding
8071
8072 Or rather, hiding certain things in each article.  There usually is much
8073 too much cruft in most articles.
8074
8075 @table @kbd
8076
8077 @item W W a
8078 @kindex W W a (Summary)
8079 @findex gnus-article-hide
8080 Do quite a lot of hiding on the article buffer
8081 (@kbd{gnus-article-hide}).  In particular, this function will hide
8082 headers, PGP, cited text and the signature.
8083
8084 @item W W h
8085 @kindex W W h (Summary)
8086 @findex gnus-article-hide-headers
8087 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8088 Headers}.
8089
8090 @item W W b
8091 @kindex W W b (Summary)
8092 @findex gnus-article-hide-boring-headers
8093 Hide headers that aren't particularly interesting
8094 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8095
8096 @item W W s
8097 @kindex W W s (Summary)
8098 @findex gnus-article-hide-signature
8099 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8100 Signature}.
8101
8102 @item W W l
8103 @kindex W W l (Summary)
8104 @findex gnus-article-hide-list-identifiers
8105 @vindex gnus-list-identifiers
8106 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8107 are strings some mailing list servers add to the beginning of all
8108 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8109 @samp{Re: } is skipped before stripping. @code{gnus-list-identifiers}
8110 may not contain @code{\\(..\\)}.
8111
8112 @table @code
8113
8114 @item gnus-list-identifiers
8115 @vindex gnus-list-identifiers
8116 A regular expression that matches list identifiers to be removed from
8117 subject.  This can also be a list of regular expressions.
8118
8119 @end table
8120
8121 @item W W P
8122 @kindex W W P (Summary)
8123 @findex gnus-article-hide-pem
8124 Hide @sc{pem} (privacy enhanced messages) cruft
8125 (@code{gnus-article-hide-pem}).
8126
8127 @item W W B
8128 @kindex W W B (Summary)
8129 @findex gnus-article-strip-banner
8130 @vindex gnus-article-banner-alist
8131 @vindex gnus-article-address-banner-alist
8132 @cindex banner
8133 @cindex OneList
8134 @cindex stripping advertisements
8135 @cindex advertisements
8136 Strip the banner specified by the @code{banner} group parameter
8137 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8138 annoying banners and/or signatures that some mailing lists and moderated
8139 groups adds to all the messages.  The way to use this function is to add
8140 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8141 group you want banners stripped from.  The parameter either be a string,
8142 which will be interpreted as a regular expression matching text to be
8143 removed, or the symbol @code{signature}, meaning that the (last)
8144 signature should be removed, or other symbol, meaning that the
8145 corresponding regular expression in @code{gnus-article-banner-alist} is
8146 used.
8147
8148 Regardless of a group, you can hide things like advertisements only when
8149 the sender of an article has a certain mail address specified in
8150 @code{gnus-article-address-banner-alist}.
8151
8152 @table @code
8153
8154 @item gnus-article-address-banner-alist
8155 @vindex gnus-article-address-banner-alist
8156 Alist of mail addresses and banners.  Each element has the form
8157 @code{(ADDRESS . BANNER)}, where ADDRESS is a regexp matching a mail
8158 address in the From header, BANNER is one of a symbol @code{signature},
8159 an item in @code{gnus-article-banner-alist}, a regexp and @code{nil}.
8160 If ADDRESS matches author's mail address, it will remove things like
8161 advertisements.  For example, if a sender has the mail address
8162 @samp{hail@@yoo-hoo.co.jp} and there is a banner something like
8163 @samp{Do You Yoo-hoo!?} in all articles he sends, you can use the
8164 following element to remove them:
8165
8166 @lisp
8167 ("@@yoo-hoo\\.co\\.jp\\'" . "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8168 @end lisp
8169
8170 @end table
8171
8172 @item W W c
8173 @kindex W W c (Summary)
8174 @findex gnus-article-hide-citation
8175 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8176 customizing the hiding:
8177
8178 @table @code
8179
8180 @item gnus-cited-opened-text-button-line-format
8181 @itemx gnus-cited-closed-text-button-line-format
8182 @vindex gnus-cited-closed-text-button-line-format
8183 @vindex gnus-cited-opened-text-button-line-format
8184 Gnus adds buttons to show where the cited text has been hidden, and to
8185 allow toggle hiding the text.  The format of the variable is specified
8186 by these format-like variable (@pxref{Formatting Variables}).  These
8187 specs are valid:
8188
8189 @table @samp
8190 @item b
8191 Starting point of the hidden text.
8192 @item e
8193 Ending point of the hidden text.
8194 @item l
8195 Number of characters in the hidden region.
8196 @item n
8197 Number of lines of hidden text.
8198 @end table
8199
8200 @item gnus-cited-lines-visible
8201 @vindex gnus-cited-lines-visible
8202 The number of lines at the beginning of the cited text to leave
8203 shown. This can also be a cons cell with the number of lines at the top
8204 and bottom of the text, respectively, to remain visible.
8205
8206 @end table
8207
8208 @item W W C-c
8209 @kindex W W C-c (Summary)
8210 @findex gnus-article-hide-citation-maybe
8211
8212 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8213 following two variables:
8214
8215 @table @code
8216 @item gnus-cite-hide-percentage
8217 @vindex gnus-cite-hide-percentage
8218 If the cited text is of a bigger percentage than this variable (default
8219 50), hide the cited text.
8220
8221 @item gnus-cite-hide-absolute
8222 @vindex gnus-cite-hide-absolute
8223 The cited text must have at least this length (default 10) before it
8224 is hidden.
8225 @end table
8226
8227 @item W W C
8228 @kindex W W C (Summary)
8229 @findex gnus-article-hide-citation-in-followups
8230 Hide cited text in articles that aren't roots
8231 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8232 useful as an interactive command, but might be a handy function to stick
8233 have happen automatically (@pxref{Customizing Articles}).
8234
8235 @end table
8236
8237 All these ``hiding'' commands are toggles, but if you give a negative
8238 prefix to these commands, they will show what they have previously
8239 hidden.  If you give a positive prefix, they will always hide.
8240
8241 Also @pxref{Article Highlighting} for further variables for
8242 citation customization.
8243
8244 @xref{Customizing Articles}, for how to hide article elements
8245 automatically.
8246
8247
8248 @node Article Washing
8249 @subsection Article Washing
8250 @cindex washing
8251 @cindex article washing
8252
8253 We call this ``article washing'' for a really good reason.  Namely, the
8254 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8255
8256 @dfn{Washing} is defined by us as ``changing something from something to
8257 something else'', but normally results in something looking better.
8258 Cleaner, perhaps.
8259
8260 @xref{Customizing Articles}, if you want to change how Gnus displays
8261 articles by default.
8262
8263 @table @kbd
8264
8265 @item C-u g
8266 This is not really washing, it's sort of the opposite of washing.  If
8267 you type this, you see the article exactly as it exists on disk or on
8268 the server.
8269
8270 @item W l
8271 @kindex W l (Summary)
8272 @findex gnus-summary-stop-page-breaking
8273 Remove page breaks from the current article
8274 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8275 delimiters.
8276
8277 @item W r
8278 @kindex W r (Summary)
8279 @findex gnus-summary-caesar-message
8280 @c @icon{gnus-summary-caesar-message}
8281 Do a Caesar rotate (rot13) on the article buffer
8282 (@code{gnus-summary-caesar-message}).
8283 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8284 (Typically offensive jokes and such.)
8285
8286 It's commonly called ``rot13'' because each letter is rotated 13
8287 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8288 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8289 is rumored to have employed this form of, uh, somewhat weak encryption.
8290
8291 @item W m
8292 @kindex W m (Summary)
8293 @findex gnus-summary-morse-message
8294 @c @icon{gnus-summary-morse-message}
8295 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8296
8297 @item W t
8298 @item t
8299 @kindex W t (Summary)
8300 @kindex t (Summary)
8301 @findex gnus-summary-toggle-header
8302 Toggle whether to display all headers in the article buffer
8303 (@code{gnus-summary-toggle-header}).
8304
8305 @item W v
8306 @kindex W v (Summary)
8307 @findex gnus-summary-verbose-headers
8308 Toggle whether to display all headers in the article buffer permanently
8309 (@code{gnus-summary-verbose-headers}).
8310
8311 @item W o
8312 @kindex W o (Summary)
8313 @findex gnus-article-treat-overstrike
8314 Treat overstrike (@code{gnus-article-treat-overstrike}).
8315
8316 @item W d
8317 @kindex W d (Summary)
8318 @findex gnus-article-treat-dumbquotes
8319 @vindex gnus-article-dumbquotes-map
8320 @cindex Smartquotes
8321 @cindex M****s*** sm*rtq**t*s
8322 @cindex Latin 1
8323 Treat M****s*** sm*rtq**t*s according to
8324 @code{gnus-article-dumbquotes-map}
8325 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8326 whether a character is a sm*rtq**t* or not, so it should only be used
8327 interactively.
8328
8329 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8330 an attempt to provide more quoting characters.  If you see something
8331 like @code{\222} or @code{\264} where you're expecting some kind of
8332 apostrophe or quotation mark, then try this wash.
8333
8334 @item W Y f
8335 @kindex W Y f (Summary)
8336 @findex gnus-article-outlook-deuglify-article
8337 @cindex Outlook Express
8338 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8339 unwrap lines, repair attribution and rearrange citation.
8340 (@code{gnus-article-outlook-deuglify-article}).
8341
8342 @item W Y u
8343 @kindex W Y u (Summary)
8344 @findex gnus-article-outlook-unwrap-lines
8345 Unwrap lines that appear to be wrapped citation lines.  You can control
8346 what lines will be unwrapped by frobbing
8347 @code{gnus-outlook-deuglify-unwrap-min} and
8348 @code{gnus-outlook-deuglify-unwrap-max}, indicating the miminum and
8349 maximum length of an unwrapped citation line.
8350 (@code{gnus-outlook-deuglify-article}).
8351
8352 @item W Y a
8353 @kindex W Y a (Summary)
8354 @findex gnus-article-outlook-repair-attribution
8355 Repair a broken attribution line.
8356 (@code{gnus-article-outlook-repair-attribution}).
8357
8358 @item W Y c
8359 @kindex W Y c (Summary)
8360 @findex gnus-article-outlook-rearrange-citation
8361 Repair broken citations by rearranging the text.
8362 (@code{gnus-article-outlook-rearrange-citation}).
8363
8364 @item W w
8365 @kindex W w (Summary)
8366 @findex gnus-article-fill-cited-article
8367 Do word wrap (@code{gnus-article-fill-cited-article}).
8368
8369 You can give the command a numerical prefix to specify the width to use
8370 when filling.
8371
8372 @item W Q
8373 @kindex W Q (Summary)
8374 @findex gnus-article-fill-long-lines
8375 Fill long lines (@code{gnus-article-fill-long-lines}).
8376
8377 @item W C
8378 @kindex W C (Summary)
8379 @findex gnus-article-capitalize-sentences
8380 Capitalize the first word in each sentence
8381 (@code{gnus-article-capitalize-sentences}).
8382
8383 @item W c
8384 @kindex W c (Summary)
8385 @findex gnus-article-remove-cr
8386 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8387 (this takes care of DOS line endings), and then translate any remaining
8388 CRs into LF (this takes care of Mac line endings)
8389 (@code{gnus-article-remove-cr}).
8390
8391 @item W q
8392 @kindex W q (Summary)
8393 @findex gnus-article-de-quoted-unreadable
8394 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8395 Quoted-Printable is one common @sc{mime} encoding employed when sending
8396 non-ASCII (i. e., 8-bit) articles.  It typically makes strings like
8397 @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which doesn't look very
8398 readable to me.  Note that this is usually done automatically by
8399 Gnus if the message in question has a @code{Content-Transfer-Encoding}
8400 header that says that this encoding has been done.
8401 If a prefix is given, a charset will be asked for.
8402
8403 @item W 6
8404 @kindex W 6 (Summary)
8405 @findex gnus-article-de-base64-unreadable
8406 Treat base64 (@code{gnus-article-de-base64-unreadable}).
8407 Base64 is one common @sc{mime} encoding employed when sending non-ASCII
8408 (i. e., 8-bit) articles.  Note that this is usually done
8409 automatically by Gnus if the message in question has a
8410 @code{Content-Transfer-Encoding} header that says that this encoding has
8411 been done.
8412 If a prefix is given, a charset will be asked for.
8413
8414 @item W Z
8415 @kindex W Z (Summary)
8416 @findex gnus-article-decode-HZ
8417 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8418 common encoding employed when sending Chinese articles.  It typically
8419 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8420
8421 @item W u
8422 @kindex W u (Summary)
8423 @findex gnus-article-unsplit-urls
8424 Remove newlines from within URLs.  Some mailers insert newlines into
8425 outgoing email messages to keep lines short.  This reformatting can
8426 split long URLs onto multiple lines.  Repair those URLs by removing
8427 the newlines (@code{gnus-article-unsplit-urls}).
8428
8429 @item W h
8430 @kindex W h (Summary)
8431 @findex gnus-article-wash-html
8432 Treat @sc{html} (@code{gnus-article-wash-html}).  Note that this is
8433 usually done automatically by Gnus if the message in question has a
8434 @code{Content-Type} header that says that the message is @sc{html}.
8435
8436 If a prefix is given, a charset will be asked for.
8437
8438 @vindex gnus-article-wash-function
8439 The default is to use the function specified by
8440 @code{mm-text-html-renderer} (@pxref{(emacs-mime)Display
8441 Customization}) to convert the @sc{html}, but this is controlled by
8442 the @code{gnus-article-wash-function} variable.  Pre-defined functions
8443 you can use include:
8444
8445 @table @code
8446 @item w3
8447 Use Emacs/w3.
8448
8449 @item w3m
8450 Use emacs-w3m (see @uref{http://emacs-w3m.namazu.org/} for more
8451 information).
8452
8453 @item links
8454 Use Links (see @uref{http://artax.karlin.mff.cuni.cz/~mikulas/links/}).
8455
8456 @item lynx
8457 Use Lynx (see @uref{http://lynx.browser.org/}).
8458
8459 @item html2text
8460 Use html2text -- a simple @sc{html} converter included with Gnus.
8461
8462 @end table
8463
8464 @item W b
8465 @kindex W b (Summary)
8466 @findex gnus-article-add-buttons
8467 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8468 @xref{Article Buttons}.
8469
8470 @item W B
8471 @kindex W B (Summary)
8472 @findex gnus-article-add-buttons-to-head
8473 Add clickable buttons to the article headers
8474 (@code{gnus-article-add-buttons-to-head}).
8475
8476 @item W p
8477 @kindex W p (Summary)
8478 @findex gnus-article-verify-x-pgp-sig
8479 Verify a signed control message (@code{gnus-article-verify-x-pgp-sig}).
8480 Control messages such as @code{newgroup} and @code{checkgroups} are
8481 usually signed by the hierarchy maintainer.  You need to add the PGP
8482 public key of the maintainer to your keyring to verify the
8483 message.@footnote{PGP keys for many hierarchies are available at
8484 @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8485
8486 @item W s
8487 @kindex W s (Summary)
8488 @findex gnus-summary-force-verify-and-decrypt
8489 Verify a signed (PGP, @sc{pgp/mime} or @sc{s/mime}) message
8490 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8491
8492 @item W a
8493 @kindex W a (Summary)
8494 @findex gnus-article-strip-headers-in-body
8495 Strip headers like the @code{X-No-Archive} header from the beginning of
8496 article bodies (@code{gnus-article-strip-headers-in-body}).
8497
8498 @item W E l
8499 @kindex W E l (Summary)
8500 @findex gnus-article-strip-leading-blank-lines
8501 Remove all blank lines from the beginning of the article
8502 (@code{gnus-article-strip-leading-blank-lines}).
8503
8504 @item W E m
8505 @kindex W E m (Summary)
8506 @findex gnus-article-strip-multiple-blank-lines
8507 Replace all blank lines with empty lines and then all multiple empty
8508 lines with a single empty line.
8509 (@code{gnus-article-strip-multiple-blank-lines}).
8510
8511 @item W E t
8512 @kindex W E t (Summary)
8513 @findex gnus-article-remove-trailing-blank-lines
8514 Remove all blank lines at the end of the article
8515 (@code{gnus-article-remove-trailing-blank-lines}).
8516
8517 @item W E a
8518 @kindex W E a (Summary)
8519 @findex gnus-article-strip-blank-lines
8520 Do all the three commands above
8521 (@code{gnus-article-strip-blank-lines}).
8522
8523 @item W E A
8524 @kindex W E A (Summary)
8525 @findex gnus-article-strip-all-blank-lines
8526 Remove all blank lines
8527 (@code{gnus-article-strip-all-blank-lines}).
8528
8529 @item W E s
8530 @kindex W E s (Summary)
8531 @findex gnus-article-strip-leading-space
8532 Remove all white space from the beginning of all lines of the article
8533 body (@code{gnus-article-strip-leading-space}).
8534
8535 @item W E e
8536 @kindex W E e (Summary)
8537 @findex gnus-article-strip-trailing-space
8538 Remove all white space from the end of all lines of the article
8539 body (@code{gnus-article-strip-trailing-space}).
8540
8541 @end table
8542
8543 @xref{Customizing Articles}, for how to wash articles automatically.
8544
8545
8546 @node Article Header
8547 @subsection Article Header
8548
8549 These commands perform various transformations of article header.
8550
8551 @table @kbd
8552
8553 @item W G u
8554 @kindex W G u (Summary)
8555 @findex gnus-article-treat-unfold-headers
8556 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8557
8558 @item W G n
8559 @kindex W G n (Summary)
8560 @findex gnus-article-treat-fold-newsgroups
8561 Fold the @code{Newsgroups} and @code{Followup-To} headers
8562 (@code{gnus-article-treat-fold-newsgroups}).
8563
8564 @item W G f
8565 @kindex W G f (Summary)
8566 @findex gnus-article-treat-fold-headers
8567 Fold all the message headers
8568 (@code{gnus-article-treat-fold-headers}).
8569
8570 @item W E w
8571 @kindex W E w
8572 @findex gnus-article-remove-leading-whitespace
8573 Remove excessive whitespace from all headers
8574 (@code{gnus-article-remove-leading-whitespace}).
8575
8576 @end table
8577
8578
8579 @node Article Buttons
8580 @subsection Article Buttons
8581 @cindex buttons
8582
8583 People often include references to other stuff in articles, and it would
8584 be nice if Gnus could just fetch whatever it is that people talk about
8585 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8586 button on these references.
8587
8588 @vindex gnus-button-man-handler
8589 Gnus adds @dfn{buttons} to certain standard references by default:
8590 Well-formed URLs, mail addresses, Message-IDs, Info links and man pages.
8591 This is controlled by two variables, one that handles article bodies and
8592 one that handles article heads:
8593
8594 @table @code
8595
8596 @item gnus-button-alist
8597 @vindex gnus-button-alist
8598 This is an alist where each entry has this form:
8599
8600 @lisp
8601 (REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
8602 @end lisp
8603
8604 @table @var
8605
8606 @item regexp
8607 All text that match this regular expression (case insensitive) will be
8608 considered an external reference.  Here's a typical regexp that matches
8609 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8610 variable containing a regexp, useful variables to use include
8611 @code{gnus-button-url-regexp}.
8612
8613 @item button-par
8614 Gnus has to know which parts of the matches is to be highlighted.  This
8615 is a number that says what sub-expression of the regexp is to be
8616 highlighted.  If you want it all highlighted, you use 0 here.
8617
8618 @item use-p
8619 This form will be @code{eval}ed, and if the result is non-@code{nil},
8620 this is considered a match.  This is useful if you want extra sifting to
8621 avoid false matches.
8622
8623 @item function
8624 This function will be called when you click on this button.
8625
8626 @item data-par
8627 As with @var{button-par}, this is a sub-expression number, but this one
8628 says which part of the match is to be sent as data to @var{function}.
8629
8630 @end table
8631
8632 So the full entry for buttonizing URLs is then
8633
8634 @lisp
8635 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8636 @end lisp
8637
8638 @item gnus-header-button-alist
8639 @vindex gnus-header-button-alist
8640 This is just like the other alist, except that it is applied to the
8641 article head only, and that each entry has an additional element that is
8642 used to say what headers to apply the buttonize coding to:
8643
8644 @lisp
8645 (HEADER REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
8646 @end lisp
8647
8648 @var{header} is a regular expression.
8649
8650 @item gnus-button-url-regexp
8651 @vindex gnus-button-url-regexp
8652 A regular expression that matches embedded URLs.  It is used in the
8653 default values of the variables above.
8654
8655 @item gnus-article-button-face
8656 @vindex gnus-article-button-face
8657 Face used on buttons.
8658
8659 @item gnus-article-mouse-face
8660 @vindex gnus-article-mouse-face
8661 Face used when the mouse cursor is over a button.
8662
8663 @end table
8664
8665 @xref{Customizing Articles}, for how to buttonize articles automatically.
8666
8667
8668 @node Article Date
8669 @subsection Article Date
8670
8671 The date is most likely generated in some obscure timezone you've never
8672 heard of, so it's quite nice to be able to find out what the time was
8673 when the article was sent.
8674
8675 @table @kbd
8676
8677 @item W T u
8678 @kindex W T u (Summary)
8679 @findex gnus-article-date-ut
8680 Display the date in UT (aka. GMT, aka ZULU)
8681 (@code{gnus-article-date-ut}).
8682
8683 @item W T i
8684 @kindex W T i (Summary)
8685 @findex gnus-article-date-iso8601
8686 @cindex ISO 8601
8687 Display the date in international format, aka. ISO 8601
8688 (@code{gnus-article-date-iso8601}).
8689
8690 @item W T l
8691 @kindex W T l (Summary)
8692 @findex gnus-article-date-local
8693 Display the date in the local timezone (@code{gnus-article-date-local}).
8694
8695 @item W T p
8696 @kindex W T p (Summary)
8697 @findex gnus-article-date-english
8698 Display the date in a format that's easily pronounceable in English
8699 (@code{gnus-article-date-english}).
8700
8701 @item W T s
8702 @kindex W T s (Summary)
8703 @vindex gnus-article-time-format
8704 @findex gnus-article-date-user
8705 @findex format-time-string
8706 Display the date using a user-defined format
8707 (@code{gnus-article-date-user}).  The format is specified by the
8708 @code{gnus-article-time-format} variable, and is a string that's passed
8709 to @code{format-time-string}.  See the documentation of that variable
8710 for a list of possible format specs.
8711
8712 @item W T e
8713 @kindex W T e (Summary)
8714 @findex gnus-article-date-lapsed
8715 @findex gnus-start-date-timer
8716 @findex gnus-stop-date-timer
8717 Say how much time has elapsed between the article was posted and now
8718 (@code{gnus-article-date-lapsed}).  It looks something like:
8719
8720 @example
8721 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8722 @end example
8723
8724 The value of @code{gnus-article-date-lapsed-new-header} determines
8725 whether this header will just be added below the old Date one, or will
8726 replace it.
8727
8728 An advantage of using Gnus to read mail is that it converts simple bugs
8729 into wonderful absurdities.
8730
8731 If you want to have this line updated continually, you can put
8732
8733 @lisp
8734 (gnus-start-date-timer)
8735 @end lisp
8736
8737 in your @file{.gnus.el} file, or you can run it off of some hook.  If
8738 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8739 command.
8740
8741 @item W T o
8742 @kindex W T o (Summary)
8743 @findex gnus-article-date-original
8744 Display the original date (@code{gnus-article-date-original}).  This can
8745 be useful if you normally use some other conversion function and are
8746 worried that it might be doing something totally wrong.  Say, claiming
8747 that the article was posted in 1854.  Although something like that is
8748 @emph{totally} impossible.  Don't you trust me? *titter*
8749
8750 @end table
8751
8752 @xref{Customizing Articles}, for how to display the date in your
8753 preferred format automatically.
8754
8755
8756 @node Article Display
8757 @subsection Article Display
8758 @cindex picons
8759 @cindex x-face
8760 @cindex smileys
8761
8762 These commands add various frivolous display gimmicks to the article
8763 buffer in Emacs versions that support them.
8764
8765 @code{X-Face} headers are small black-and-white images supplied by the
8766 message headers (@pxref{X-Face}).
8767
8768 Picons, on the other hand, reside on your own system, and Gnus will
8769 try to match the headers to what you have (@pxref{Picons}).
8770
8771 Smileys are those little @samp{:-)} symbols that people like to litter
8772 their messages with (@pxref{Smileys}).
8773
8774 All these functions are toggles--if the elements already exist,
8775 they'll be removed.
8776
8777 @table @kbd
8778 @item W D x
8779 @kindex W D x (Summary)
8780 @findex gnus-article-display-x-face
8781 Display an @code{X-Face} in the @code{From} header.
8782 (@code{gnus-article-display-x-face}).
8783
8784 @item W D d
8785 @kindex W D d (Summary)
8786 @findex gnus-article-display-face
8787 Display a @code{Face} in the @code{From} header.
8788 (@code{gnus-article-display-face}).
8789
8790 @item W D s
8791 @kindex W D s (Summary)
8792 @findex gnus-treat-smiley
8793 Display smileys (@code{gnus-treat-smiley}).
8794
8795 @item W D f
8796 @kindex W D f (Summary)
8797 @findex gnus-treat-from-picon
8798 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
8799
8800 @item W D m
8801 @kindex W D m (Summary)
8802 @findex gnus-treat-mail-picon
8803 Piconify all mail headers (i. e., @code{Cc}, @code{To})
8804 (@code{gnus-treat-mail-picon}).
8805
8806 @item W D n
8807 @kindex W D n (Summary)
8808 @findex gnus-treat-newsgroups-picon
8809 Piconify all news headers (i. e., @code{Newsgroups} and
8810 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
8811
8812 @item W D D
8813 @kindex W D D (Summary)
8814 @findex gnus-article-remove-images
8815 Remove all images from the article buffer
8816 (@code{gnus-article-remove-images}).
8817
8818 @end table
8819
8820
8821
8822 @node Article Signature
8823 @subsection Article Signature
8824 @cindex signatures
8825 @cindex article signature
8826
8827 @vindex gnus-signature-separator
8828 Each article is divided into two parts---the head and the body.  The
8829 body can be divided into a signature part and a text part.  The variable
8830 that says what is to be considered a signature is
8831 @code{gnus-signature-separator}.  This is normally the standard
8832 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
8833 non-standard signature separators, so this variable can also be a list
8834 of regular expressions to be tested, one by one.  (Searches are done
8835 from the end of the body towards the beginning.)  One likely value is:
8836
8837 @lisp
8838 (setq gnus-signature-separator
8839       '("^-- $"         ; The standard
8840         "^-- *$"        ; A common mangling
8841         "^-------*$"    ; Many people just use a looong
8842                         ; line of dashes.  Shame!
8843         "^ *--------*$" ; Double-shame!
8844         "^________*$"   ; Underscores are also popular
8845         "^========*$")) ; Pervert!
8846 @end lisp
8847
8848 The more permissive you are, the more likely it is that you'll get false
8849 positives.
8850
8851 @vindex gnus-signature-limit
8852 @code{gnus-signature-limit} provides a limit to what is considered a
8853 signature when displaying articles.
8854
8855 @enumerate
8856 @item
8857 If it is an integer, no signature may be longer (in characters) than
8858 that integer.
8859 @item
8860 If it is a floating point number, no signature may be longer (in lines)
8861 than that number.
8862 @item
8863 If it is a function, the function will be called without any parameters,
8864 and if it returns @code{nil}, there is no signature in the buffer.
8865 @item
8866 If it is a string, it will be used as a regexp.  If it matches, the text
8867 in question is not a signature.
8868 @end enumerate
8869
8870 This variable can also be a list where the elements may be of the types
8871 listed above.  Here's an example:
8872
8873 @lisp
8874 (setq gnus-signature-limit
8875       '(200.0 "^---*Forwarded article"))
8876 @end lisp
8877
8878 This means that if there are more than 200 lines after the signature
8879 separator, or the text after the signature separator is matched by
8880 the regular expression @samp{^---*Forwarded article}, then it isn't a
8881 signature after all.
8882
8883
8884 @node Article Miscellania
8885 @subsection Article Miscellania
8886
8887 @table @kbd
8888 @item A t
8889 @kindex A t (Summary)
8890 @findex gnus-article-babel
8891 Translate the article from one language to another
8892 (@code{gnus-article-babel}).
8893
8894 @end table
8895
8896
8897 @node MIME Commands
8898 @section MIME Commands
8899 @cindex MIME decoding
8900 @cindex attachments
8901 @cindex viewing attachments
8902
8903 The following commands all understand the numerical prefix.  For
8904 instance, @kbd{3 b} means ``view the third @sc{mime} part''.
8905
8906 @table @kbd
8907 @item b
8908 @itemx K v
8909 @kindex b (Summary)
8910 @kindex K v (Summary)
8911 View the @sc{mime} part.
8912
8913 @item K o
8914 @kindex K o (Summary)
8915 Save the @sc{mime} part.
8916
8917 @item K c
8918 @kindex K c (Summary)
8919 Copy the @sc{mime} part.
8920
8921 @item K e
8922 @kindex K e (Summary)
8923 View the @sc{mime} part externally.
8924
8925 @item K i
8926 @kindex K i (Summary)
8927 View the @sc{mime} part internally.
8928
8929 @item K |
8930 @kindex K | (Summary)
8931 Pipe the @sc{mime} part to an external command.
8932 @end table
8933
8934 The rest of these @sc{mime} commands do not use the numerical prefix in
8935 the same manner:
8936
8937 @table @kbd
8938 @item K b
8939 @kindex K b (Summary)
8940 Make all the @sc{mime} parts have buttons in front of them.  This is
8941 mostly useful if you wish to save (or perform other actions) on inlined
8942 parts.
8943
8944 @item K m
8945 @kindex K m (Summary)
8946 @findex gnus-summary-repair-multipart
8947 Some multipart messages are transmitted with missing or faulty headers.
8948 This command will attempt to ``repair'' these messages so that they can
8949 be viewed in a more pleasant manner
8950 (@code{gnus-summary-repair-multipart}).
8951
8952 @item X m
8953 @kindex X m (Summary)
8954 @findex gnus-summary-save-parts
8955 Save all parts matching a @sc{mime} type to a directory
8956 (@code{gnus-summary-save-parts}).  Understands the process/prefix
8957 convention (@pxref{Process/Prefix}).
8958
8959 @item M-t
8960 @kindex M-t (Summary)
8961 @findex gnus-summary-toggle-display-buttonized
8962 Toggle the buttonized display of the article buffer
8963 (@code{gnus-summary-toggle-display-buttonized}).
8964
8965 @item W M w
8966 @kindex W M w (Summary)
8967 @findex gnus-article-decode-mime-words
8968 Decode RFC 2047-encoded words in the article headers
8969 (@code{gnus-article-decode-mime-words}).
8970
8971 @item W M c
8972 @kindex W M c (Summary)
8973 @findex gnus-article-decode-charset
8974 Decode encoded article bodies as well as charsets
8975 (@code{gnus-article-decode-charset}).
8976
8977 This command looks in the @code{Content-Type} header to determine the
8978 charset.  If there is no such header in the article, you can give it a
8979 prefix, which will prompt for the charset to decode as.  In regional
8980 groups where people post using some common encoding (but do not
8981 include @sc{mime} headers), you can set the @code{charset} group/topic
8982 parameter to the required charset (@pxref{Group Parameters}).
8983
8984 @item W M v
8985 @kindex W M v (Summary)
8986 @findex gnus-mime-view-all-parts
8987 View all the @sc{mime} parts in the current article
8988 (@code{gnus-mime-view-all-parts}).
8989
8990 @end table
8991
8992 Relevant variables:
8993
8994 @table @code
8995 @item gnus-ignored-mime-types
8996 @vindex gnus-ignored-mime-types
8997 This is a list of regexps.  @sc{mime} types that match a regexp from
8998 this list will be completely ignored by Gnus.  The default value is
8999 @code{nil}.
9000
9001 To have all Vcards be ignored, you'd say something like this:
9002
9003 @lisp
9004 (setq gnus-ignored-mime-types
9005       '("text/x-vcard"))
9006 @end lisp
9007
9008 @item gnus-article-loose-mime
9009 @vindex gnus-article-loose-mime
9010 If non-@code{nil}, Gnus won't required the @samp{MIME-Version} header
9011 before interpreting the message as a @sc{mime} message.  This helps
9012 when reading messages from certain broken mail user agents.  The
9013 default is @code{nil}.
9014
9015 @item gnus-article-emulate-mime
9016 @vindex gnus-article-emulate-mime
9017 There are other, non-@sc{mime} encoding methods used.  The most common
9018 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9019 This variable is non-@code{nil}, Gnus will look in message bodies to
9020 see if it finds these encodings, and if so, it'll run them through the
9021 Gnus @sc{mime} machinery.  The default is @code{t}.
9022
9023 @item gnus-unbuttonized-mime-types
9024 @vindex gnus-unbuttonized-mime-types
9025 This is a list of regexps.  @sc{mime} types that match a regexp from
9026 this list won't have @sc{mime} buttons inserted unless they aren't
9027 displayed or this variable is overridden by
9028 @code{gnus-buttonized-mime-types}.  The default value is
9029 @code{(".*/.*")}.  This variable is only used when
9030 @code{gnus-inhibit-mime-unbuttonizing} is nil.
9031
9032 @item gnus-buttonized-mime-types
9033 @vindex gnus-buttonized-mime-types
9034 This is a list of regexps.  @sc{mime} types that match a regexp from
9035 this list will have @sc{mime} buttons inserted unless they aren't
9036 displayed.  This variable overrides
9037 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9038 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9039 is nil.
9040
9041 To see e.g. security buttons but no other buttons, you could set this
9042 variable to @code{("multipart/signed")} and leave
9043 @code{gnus-unbuttonized-mime-types} at the default value.
9044
9045 @item gnus-inhibit-mime-unbuttonizing
9046 @vindex gnus-inhibit-mime-unbuttonizing
9047 If this is non-nil, then all @sc{mime} parts get buttons.  The default
9048 value is @code{nil}.
9049
9050 @item gnus-article-mime-part-function
9051 @vindex gnus-article-mime-part-function
9052 For each @sc{mime} part, this function will be called with the @sc{mime}
9053 handle as the parameter.  The function is meant to be used to allow
9054 users to gather information from the article (e. g., add Vcard info to
9055 the bbdb database) or to do actions based on parts (e. g., automatically
9056 save all jpegs into some directory).
9057
9058 Here's an example function the does the latter:
9059
9060 @lisp
9061 (defun my-save-all-jpeg-parts (handle)
9062   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9063     (with-temp-buffer
9064       (insert (mm-get-part handle))
9065       (write-region (point-min) (point-max)
9066                     (read-file-name "Save jpeg to: ")))))
9067 (setq gnus-article-mime-part-function
9068       'my-save-all-jpeg-parts)
9069 @end lisp
9070
9071 @vindex gnus-mime-multipart-functions
9072 @item gnus-mime-multipart-functions
9073 Alist of @sc{mime} multipart types and functions to handle them.
9074
9075 @vindex mm-file-name-rewrite-functions
9076 @item mm-file-name-rewrite-functions
9077 List of functions used for rewriting file names of @sc{mime} parts.
9078 Each function takes a file name as input and returns a file name.
9079
9080 Ready-made functions include@*
9081 @code{mm-file-name-delete-whitespace},
9082 @code{mm-file-name-trim-whitespace},
9083 @code{mm-file-name-collapse-whitespace}, and
9084 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9085 the variable @code{mm-file-name-replace-whitespace} to replace each
9086 whitespace character in a file name with that string; default value
9087 is @code{"_"} (a single underscore).
9088 @findex mm-file-name-delete-whitespace
9089 @findex mm-file-name-trim-whitespace
9090 @findex mm-file-name-collapse-whitespace
9091 @findex mm-file-name-replace-whitespace
9092 @vindex mm-file-name-replace-whitespace
9093
9094 The standard functions @code{capitalize}, @code{downcase},
9095 @code{upcase}, and @code{upcase-initials} may be useful, too.
9096
9097 Everybody knows that whitespace characters in file names are evil,
9098 except those who don't know.  If you receive lots of attachments from
9099 such unenlightened users, you can make live easier by adding
9100
9101 @lisp
9102 (setq mm-file-name-rewrite-functions
9103       '(mm-file-name-trim-whitespace
9104         mm-file-name-collapse-whitespace
9105         mm-file-name-replace-whitespace))
9106 @end lisp
9107
9108 @noindent
9109 to your @file{.gnus.el} file.
9110
9111 @end table
9112
9113
9114 @node Charsets
9115 @section Charsets
9116 @cindex charsets
9117
9118 People use different charsets, and we have @sc{mime} to let us know what
9119 charsets they use.  Or rather, we wish we had.  Many people use
9120 newsreaders and mailers that do not understand or use @sc{mime}, and
9121 just send out messages without saying what character sets they use.  To
9122 help a bit with this, some local news hierarchies have policies that say
9123 what character set is the default.  For instance, the @samp{fj}
9124 hierarchy uses @code{iso-2022-jp-2}.
9125
9126 @vindex gnus-group-charset-alist
9127 This knowledge is encoded in the @code{gnus-group-charset-alist}
9128 variable, which is an alist of regexps (use the first item to match full
9129 group names) and default charsets to be used when reading these groups.
9130
9131 In addition, some people do use soi-disant @sc{mime}-aware agents that
9132 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9133 even if they really are in @code{koi-8}.  To help here, the
9134 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9135 charsets that are listed here will be ignored.  The variable can be
9136 set on a group-by-group basis using the group parameters (@pxref{Group
9137 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9138 which includes values some agents insist on having in there.
9139
9140 @vindex gnus-group-posting-charset-alist
9141 When posting, @code{gnus-group-posting-charset-alist} is used to
9142 determine which charsets should not be encoded using the @sc{mime}
9143 encodings.  For instance, some hierarchies discourage using
9144 quoted-printable header encoding.
9145
9146 This variable is an alist of regexps and permitted unencoded charsets
9147 for posting.  Each element of the alist has the form @code{(}@var{test
9148 header body-list}@code{)}, where:
9149
9150 @table @var
9151 @item test
9152 is either a regular expression matching the newsgroup header or a
9153 variable to query,
9154 @item header
9155 is the charset which may be left unencoded in the header (@code{nil}
9156 means encode all charsets),
9157 @item body-list
9158 is a list of charsets which may be encoded using 8bit content-transfer
9159 encoding in the body, or one of the special values @code{nil} (always
9160 encode using quoted-printable) or @code{t} (always use 8bit).
9161 @end table
9162
9163 @cindex Russian
9164 @cindex koi8-r
9165 @cindex koi8-u
9166 @cindex iso-8859-5
9167 @cindex coding system aliases
9168 @cindex preferred charset
9169
9170 Other charset tricks that may be useful, although not Gnus-specific:
9171
9172 If there are several @sc{mime} charsets that encode the same Emacs
9173 charset, you can choose what charset to use by saying the following:
9174
9175 @lisp
9176 (put-charset-property 'cyrillic-iso8859-5
9177                       'preferred-coding-system 'koi8-r)
9178 @end lisp
9179
9180 This means that Russian will be encoded using @code{koi8-r} instead of
9181 the default @code{iso-8859-5} @sc{mime} charset.
9182
9183 If you want to read messages in @code{koi8-u}, you can cheat and say
9184
9185 @lisp
9186 (define-coding-system-alias 'koi8-u 'koi8-r)
9187 @end lisp
9188
9189 This will almost do the right thing.
9190
9191 And finally, to read charsets like @code{windows-1251}, you can say
9192 something like
9193
9194 @lisp
9195 (codepage-setup 1251)
9196 (define-coding-system-alias 'windows-1251 'cp1251)
9197 @end lisp
9198
9199
9200 @node Article Commands
9201 @section Article Commands
9202
9203 @table @kbd
9204
9205 @item A P
9206 @cindex PostScript
9207 @cindex printing
9208 @kindex A P (Summary)
9209 @vindex gnus-ps-print-hook
9210 @findex gnus-summary-print-article
9211 Generate and print a PostScript image of the article buffer
9212 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9213 be run just before printing the buffer.  An alternative way to print
9214 article is to use Muttprint (@pxref{Saving Articles}).
9215
9216 @end table
9217
9218
9219 @node Summary Sorting
9220 @section Summary Sorting
9221 @cindex summary sorting
9222
9223 You can have the summary buffer sorted in various ways, even though I
9224 can't really see why you'd want that.
9225
9226 @table @kbd
9227
9228 @item C-c C-s C-n
9229 @kindex C-c C-s C-n (Summary)
9230 @findex gnus-summary-sort-by-number
9231 Sort by article number (@code{gnus-summary-sort-by-number}).
9232
9233 @item C-c C-s C-a
9234 @kindex C-c C-s C-a (Summary)
9235 @findex gnus-summary-sort-by-author
9236 Sort by author (@code{gnus-summary-sort-by-author}).
9237
9238 @item C-c C-s C-s
9239 @kindex C-c C-s C-s (Summary)
9240 @findex gnus-summary-sort-by-subject
9241 Sort by subject (@code{gnus-summary-sort-by-subject}).
9242
9243 @item C-c C-s C-d
9244 @kindex C-c C-s C-d (Summary)
9245 @findex gnus-summary-sort-by-date
9246 Sort by date (@code{gnus-summary-sort-by-date}).
9247
9248 @item C-c C-s C-l
9249 @kindex C-c C-s C-l (Summary)
9250 @findex gnus-summary-sort-by-lines
9251 Sort by lines (@code{gnus-summary-sort-by-lines}).
9252
9253 @item C-c C-s C-c
9254 @kindex C-c C-s C-c (Summary)
9255 @findex gnus-summary-sort-by-chars
9256 Sort by article length (@code{gnus-summary-sort-by-chars}).
9257
9258 @item C-c C-s C-i
9259 @kindex C-c C-s C-i (Summary)
9260 @findex gnus-summary-sort-by-score
9261 Sort by score (@code{gnus-summary-sort-by-score}).
9262
9263 @item C-c C-s C-r
9264 @kindex C-c C-s C-r (Summary)
9265 @findex gnus-summary-sort-by-random
9266 Randomize (@code{gnus-summary-sort-by-random}).
9267
9268 @item C-c C-s C-o
9269 @kindex C-c C-s C-o (Summary)
9270 @findex gnus-summary-sort-by-original
9271 Sort using the default sorting method
9272 (@code{gnus-summary-sort-by-original}).
9273 @end table
9274
9275 These functions will work both when you use threading and when you don't
9276 use threading.  In the latter case, all summary lines will be sorted,
9277 line by line.  In the former case, sorting will be done on a
9278 root-by-root basis, which might not be what you were looking for.  To
9279 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9280 Commands}).
9281
9282
9283 @node Finding the Parent
9284 @section Finding the Parent
9285 @cindex parent articles
9286 @cindex referring articles
9287
9288 @table @kbd
9289 @item ^
9290 @kindex ^ (Summary)
9291 @findex gnus-summary-refer-parent-article
9292 If you'd like to read the parent of the current article, and it is not
9293 displayed in the summary buffer, you might still be able to.  That is,
9294 if the current group is fetched by @sc{nntp}, the parent hasn't expired
9295 and the @code{References} in the current article are not mangled, you
9296 can just press @kbd{^} or @kbd{A r}
9297 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9298 you'll get the parent.  If the parent is already displayed in the
9299 summary buffer, point will just move to this article.
9300
9301 If given a positive numerical prefix, fetch that many articles back into
9302 the ancestry.  If given a negative numerical prefix, fetch just that
9303 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
9304 grandparent and the grandgrandparent of the current article.  If you say
9305 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
9306 article.
9307
9308 @item A R (Summary)
9309 @findex gnus-summary-refer-references
9310 @kindex A R (Summary)
9311 Fetch all articles mentioned in the @code{References} header of the
9312 article (@code{gnus-summary-refer-references}).
9313
9314 @item A T (Summary)
9315 @findex gnus-summary-refer-thread
9316 @kindex A T (Summary)
9317 Display the full thread where the current article appears
9318 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9319 headers in the current group to work, so it usually takes a while.  If
9320 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9321 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9322 visible effects normally, but it'll make this command work a whole lot
9323 faster.  Of course, it'll make group entry somewhat slow.
9324
9325 @vindex gnus-refer-thread-limit
9326 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9327 articles before the first displayed in the current group) headers to
9328 fetch when doing this command.  The default is 200.  If @code{t}, all
9329 the available headers will be fetched.  This variable can be overridden
9330 by giving the @kbd{A T} command a numerical prefix.
9331
9332 @item M-^ (Summary)
9333 @findex gnus-summary-refer-article
9334 @kindex M-^ (Summary)
9335 @cindex Message-ID
9336 @cindex fetching by Message-ID
9337 You can also ask the @sc{nntp} server for an arbitrary article, no
9338 matter what group it belongs to.  @kbd{M-^}
9339 (@code{gnus-summary-refer-article}) will ask you for a
9340 @code{Message-ID}, which is one of those long, hard-to-read thingies
9341 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9342 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9343 @end table
9344
9345 The current select method will be used when fetching by
9346 @code{Message-ID} from non-news select method, but you can override this
9347 by giving this command a prefix.
9348
9349 @vindex gnus-refer-article-method
9350 If the group you are reading is located on a back end that does not
9351 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9352 you can set @code{gnus-refer-article-method} to an @sc{nntp} method.  It
9353 would, perhaps, be best if the @sc{nntp} server you consult is the one
9354 updating the spool you are reading from, but that's not really
9355 necessary.
9356
9357 It can also be a list of select methods, as well as the special symbol
9358 @code{current}, which means to use the current select method.  If it
9359 is a list, Gnus will try all the methods in the list until it finds a
9360 match.
9361
9362 Here's an example setting that will first try the current method, and
9363 then ask Google if that fails:
9364
9365 @lisp
9366 (setq gnus-refer-article-method
9367       '(current
9368         (nnweb "google" (nnweb-type google))))
9369 @end lisp
9370
9371 Most of the mail back ends support fetching by @code{Message-ID}, but
9372 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9373 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9374 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9375 only able to locate articles that have been posted to the current group.
9376 (Anything else would be too time consuming.)  @code{nnmh} does not
9377 support this at all.
9378
9379
9380 @node Alternative Approaches
9381 @section Alternative Approaches
9382
9383 Different people like to read news using different methods.  This being
9384 Gnus, we offer a small selection of minor modes for the summary buffers.
9385
9386 @menu
9387 * Pick and Read::               First mark articles and then read them.
9388 * Binary Groups::               Auto-decode all articles.
9389 @end menu
9390
9391
9392 @node Pick and Read
9393 @subsection Pick and Read
9394 @cindex pick and read
9395
9396 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9397 a two-phased reading interface.  The user first marks in a summary
9398 buffer the articles she wants to read.  Then she starts reading the
9399 articles with just an article buffer displayed.
9400
9401 @findex gnus-pick-mode
9402 @kindex M-x gnus-pick-mode
9403 Gnus provides a summary buffer minor mode that allows
9404 this---@code{gnus-pick-mode}.  This basically means that a few process
9405 mark commands become one-keystroke commands to allow easy marking, and
9406 it provides one additional command for switching to the summary buffer.
9407
9408 Here are the available keystrokes when using pick mode:
9409
9410 @table @kbd
9411 @item .
9412 @kindex . (Pick)
9413 @findex gnus-pick-article-or-thread
9414 Pick the article or thread on the current line
9415 (@code{gnus-pick-article-or-thread}).  If the variable
9416 @code{gnus-thread-hide-subtree} is true, then this key selects the
9417 entire thread when used at the first article of the thread.  Otherwise,
9418 it selects just the article.  If given a numerical prefix, go to that
9419 thread or article and pick it.  (The line number is normally displayed
9420 at the beginning of the summary pick lines.)
9421
9422 @item SPACE
9423 @kindex SPACE (Pick)
9424 @findex gnus-pick-next-page
9425 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9426 at the end of the buffer, start reading the picked articles.
9427
9428 @item u
9429 @kindex u (Pick)
9430 @findex gnus-pick-unmark-article-or-thread.
9431 Unpick the thread or article
9432 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9433 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9434 thread if used at the first article of the thread.  Otherwise it unpicks
9435 just the article.  You can give this key a numerical prefix to unpick
9436 the thread or article at that line.
9437
9438 @item RET
9439 @kindex RET (Pick)
9440 @findex gnus-pick-start-reading
9441 @vindex gnus-pick-display-summary
9442 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9443 given a prefix, mark all unpicked articles as read first.  If
9444 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9445 will still be visible when you are reading.
9446
9447 @end table
9448
9449 All the normal summary mode commands are still available in the
9450 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9451 which is mapped to the same function
9452 @code{gnus-summary-tick-article-forward}.
9453
9454 If this sounds like a good idea to you, you could say:
9455
9456 @lisp
9457 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9458 @end lisp
9459
9460 @vindex gnus-pick-mode-hook
9461 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9462
9463 @vindex gnus-mark-unpicked-articles-as-read
9464 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9465 all unpicked articles as read.  The default is @code{nil}.
9466
9467 @vindex gnus-summary-pick-line-format
9468 The summary line format in pick mode is slightly different from the
9469 standard format.  At the beginning of each line the line number is
9470 displayed.  The pick mode line format is controlled by the
9471 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9472 Variables}).  It accepts the same format specs that
9473 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9474
9475
9476 @node Binary Groups
9477 @subsection Binary Groups
9478 @cindex binary groups
9479
9480 @findex gnus-binary-mode
9481 @kindex M-x gnus-binary-mode
9482 If you spend much time in binary groups, you may grow tired of hitting
9483 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9484 is a minor mode for summary buffers that makes all ordinary Gnus article
9485 selection functions uudecode series of articles and display the result
9486 instead of just displaying the articles the normal way.
9487
9488 @kindex g (Binary)
9489 @findex gnus-binary-show-article
9490 The only way, in fact, to see the actual articles is the @kbd{g}
9491 command, when you have turned on this mode
9492 (@code{gnus-binary-show-article}).
9493
9494 @vindex gnus-binary-mode-hook
9495 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9496
9497
9498 @node Tree Display
9499 @section Tree Display
9500 @cindex trees
9501
9502 @vindex gnus-use-trees
9503 If you don't like the normal Gnus summary display, you might try setting
9504 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9505 additional @dfn{tree buffer}.  You can execute all summary mode commands
9506 in the tree buffer.
9507
9508 There are a few variables to customize the tree display, of course:
9509
9510 @table @code
9511 @item gnus-tree-mode-hook
9512 @vindex gnus-tree-mode-hook
9513 A hook called in all tree mode buffers.
9514
9515 @item gnus-tree-mode-line-format
9516 @vindex gnus-tree-mode-line-format
9517 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9518 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9519 of valid specs, @pxref{Summary Buffer Mode Line}.
9520
9521 @item gnus-selected-tree-face
9522 @vindex gnus-selected-tree-face
9523 Face used for highlighting the selected article in the tree buffer.  The
9524 default is @code{modeline}.
9525
9526 @item gnus-tree-line-format
9527 @vindex gnus-tree-line-format
9528 A format string for the tree nodes.  The name is a bit of a misnomer,
9529 though---it doesn't define a line, but just the node.  The default value
9530 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9531 the name of the poster.  It is vital that all nodes are of the same
9532 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9533
9534 Valid specs are:
9535
9536 @table @samp
9537 @item n
9538 The name of the poster.
9539 @item f
9540 The @code{From} header.
9541 @item N
9542 The number of the article.
9543 @item [
9544 The opening bracket.
9545 @item ]
9546 The closing bracket.
9547 @item s
9548 The subject.
9549 @end table
9550
9551 @xref{Formatting Variables}.
9552
9553 Variables related to the display are:
9554
9555 @table @code
9556 @item gnus-tree-brackets
9557 @vindex gnus-tree-brackets
9558 This is used for differentiating between ``real'' articles and
9559 ``sparse'' articles.  The format is @code{((@var{real-open} . @var{real-close})
9560 (@var{sparse-open} . @var{sparse-close}) (@var{dummy-open} . @var{dummy-close}))}, and the
9561 default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9562
9563 @item gnus-tree-parent-child-edges
9564 @vindex gnus-tree-parent-child-edges
9565 This is a list that contains the characters used for connecting parent
9566 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9567
9568 @end table
9569
9570 @item gnus-tree-minimize-window
9571 @vindex gnus-tree-minimize-window
9572 If this variable is non-@code{nil}, Gnus will try to keep the tree
9573 buffer as small as possible to allow more room for the other Gnus
9574 windows.  If this variable is a number, the tree buffer will never be
9575 higher than that number.  The default is @code{t}.  Note that if you
9576 have several windows displayed side-by-side in a frame and the tree
9577 buffer is one of these, minimizing the tree window will also resize all
9578 other windows displayed next to it.
9579
9580 You may also wish to add the following hook to keep the window minimized
9581 at all times:
9582
9583 @lisp
9584 (add-hook 'gnus-configure-windows-hook
9585           'gnus-tree-perhaps-minimize)
9586 @end lisp
9587
9588 @item gnus-generate-tree-function
9589 @vindex gnus-generate-tree-function
9590 @findex gnus-generate-horizontal-tree
9591 @findex gnus-generate-vertical-tree
9592 The function that actually generates the thread tree.  Two predefined
9593 functions are available: @code{gnus-generate-horizontal-tree} and
9594 @code{gnus-generate-vertical-tree} (which is the default).
9595
9596 @end table
9597
9598 Here's an example from a horizontal tree buffer:
9599
9600 @example
9601 @{***@}-(***)-[odd]-[Gun]
9602      |      \[Jan]
9603      |      \[odd]-[Eri]
9604      |      \(***)-[Eri]
9605      |            \[odd]-[Paa]
9606      \[Bjo]
9607      \[Gun]
9608      \[Gun]-[Jor]
9609 @end example
9610
9611 Here's the same thread displayed in a vertical tree buffer:
9612
9613 @example
9614 @{***@}
9615   |--------------------------\-----\-----\
9616 (***)                         [Bjo] [Gun] [Gun]
9617   |--\-----\-----\                          |
9618 [odd] [Jan] [odd] (***)                   [Jor]
9619   |           |     |--\
9620 [Gun]       [Eri] [Eri] [odd]
9621                           |
9622                         [Paa]
9623 @end example
9624
9625 If you're using horizontal trees, it might be nice to display the trees
9626 side-by-side with the summary buffer.  You could add something like the
9627 following to your @file{.gnus.el} file:
9628
9629 @lisp
9630 (setq gnus-use-trees t
9631       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9632       gnus-tree-minimize-window nil)
9633 (gnus-add-configuration
9634  '(article
9635    (vertical 1.0
9636              (horizontal 0.25
9637                          (summary 0.75 point)
9638                          (tree 1.0))
9639              (article 1.0))))
9640 @end lisp
9641
9642 @xref{Window Layout}.
9643
9644
9645 @node Mail Group Commands
9646 @section Mail Group Commands
9647 @cindex mail group commands
9648
9649 Some commands only make sense in mail groups.  If these commands are
9650 invalid in the current group, they will raise a hell and let you know.
9651
9652 All these commands (except the expiry and edit commands) use the
9653 process/prefix convention (@pxref{Process/Prefix}).
9654
9655 @table @kbd
9656
9657 @item B e
9658 @kindex B e (Summary)
9659 @findex gnus-summary-expire-articles
9660 Run all expirable articles in the current group through the expiry
9661 process (@code{gnus-summary-expire-articles}).  That is, delete all
9662 expirable articles in the group that have been around for a while.
9663 (@pxref{Expiring Mail}).
9664
9665 @item B C-M-e
9666 @kindex B C-M-e (Summary)
9667 @findex gnus-summary-expire-articles-now
9668 Delete all the expirable articles in the group
9669 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9670 articles eligible for expiry in the current group will
9671 disappear forever into that big @file{/dev/null} in the sky.
9672
9673 @item B DEL
9674 @kindex B DEL (Summary)
9675 @findex gnus-summary-delete-article
9676 @c @icon{gnus-summary-mail-delete}
9677 Delete the mail article.  This is ``delete'' as in ``delete it from your
9678 disk forever and ever, never to return again.'' Use with caution.
9679 (@code{gnus-summary-delete-article}).
9680
9681 @item B m
9682 @kindex B m (Summary)
9683 @cindex move mail
9684 @findex gnus-summary-move-article
9685 @vindex gnus-preserve-marks
9686 Move the article from one mail group to another
9687 (@code{gnus-summary-move-article}).  Marks will be preserved if
9688 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9689
9690 @item B c
9691 @kindex B c (Summary)
9692 @cindex copy mail
9693 @findex gnus-summary-copy-article
9694 @c @icon{gnus-summary-mail-copy}
9695 Copy the article from one group (mail group or not) to a mail group
9696 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9697 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9698
9699 @item B B
9700 @kindex B B (Summary)
9701 @cindex crosspost mail
9702 @findex gnus-summary-crosspost-article
9703 Crosspost the current article to some other group
9704 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9705 the article in the other group, and the Xref headers of the article will
9706 be properly updated.
9707
9708 @item B i
9709 @kindex B i (Summary)
9710 @findex gnus-summary-import-article
9711 Import an arbitrary file into the current mail newsgroup
9712 (@code{gnus-summary-import-article}).  You will be prompted for a file
9713 name, a @code{From} header and a @code{Subject} header.
9714
9715 @item B I
9716 @kindex B I (Summary)
9717 @findex gnus-summary-create-article
9718 Create an empty article in the current mail newsgroups
9719 (@code{gnus-summary-create-article}).  You will be prompted for a
9720 @code{From} header and a @code{Subject} header.
9721
9722 @item B r
9723 @kindex B r (Summary)
9724 @findex gnus-summary-respool-article
9725 Respool the mail article (@code{gnus-summary-respool-article}).
9726 @code{gnus-summary-respool-default-method} will be used as the default
9727 select method when respooling.  This variable is @code{nil} by default,
9728 which means that the current group select method will be used instead.
9729 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9730 (which is the default).
9731
9732 @item B w
9733 @itemx e
9734 @kindex B w (Summary)
9735 @kindex e (Summary)
9736 @findex gnus-summary-edit-article
9737 @kindex C-c C-c (Article)
9738 @findex gnus-summary-edit-article-done
9739 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9740 editing and make the changes permanent, type @kbd{C-c C-c}
9741 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9742 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
9743
9744 @item B q
9745 @kindex B q (Summary)
9746 @findex gnus-summary-respool-query
9747 If you want to re-spool an article, you might be curious as to what group
9748 the article will end up in before you do the re-spooling.  This command
9749 will tell you (@code{gnus-summary-respool-query}).
9750
9751 @item B t
9752 @kindex B t (Summary)
9753 @findex gnus-summary-respool-trace
9754 Similarly, this command will display all fancy splitting patterns used
9755 when respooling, if any (@code{gnus-summary-respool-trace}).
9756
9757 @item B p
9758 @kindex B p (Summary)
9759 @findex gnus-summary-article-posted-p
9760 Some people have a tendency to send you "courtesy" copies when they
9761 follow up to articles you have posted.  These usually have a
9762 @code{Newsgroups} header in them, but not always.  This command
9763 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9764 article from your news server (or rather, from
9765 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9766 report back whether it found the article or not.  Even if it says that
9767 it didn't find the article, it may have been posted anyway---mail
9768 propagation is much faster than news propagation, and the news copy may
9769 just not have arrived yet.
9770
9771 @item K E
9772 @kindex K E (Summary)
9773 @findex gnus-article-encrypt-body
9774 @vindex gnus-article-encrypt-protocol
9775 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
9776 The body is encrypted with the encryption protocol specified by the
9777 variable @code{gnus-article-encrypt-protocol}.
9778
9779 @end table
9780
9781 @vindex gnus-move-split-methods
9782 @cindex moving articles
9783 If you move (or copy) articles regularly, you might wish to have Gnus
9784 suggest where to put the articles.  @code{gnus-move-split-methods} is a
9785 variable that uses the same syntax as @code{gnus-split-methods}
9786 (@pxref{Saving Articles}).  You may customize that variable to create
9787 suggestions you find reasonable.  (Note that
9788 @code{gnus-move-split-methods} uses group names where
9789 @code{gnus-split-methods} uses file names.)
9790
9791 @lisp
9792 (setq gnus-move-split-methods
9793       '(("^From:.*Lars Magne" "nnml:junk")
9794         ("^Subject:.*gnus" "nnfolder:important")
9795         (".*" "nnml:misc")))
9796 @end lisp
9797
9798
9799 @node Various Summary Stuff
9800 @section Various Summary Stuff
9801
9802 @menu
9803 * Summary Group Information::   Information oriented commands.
9804 * Searching for Articles::      Multiple article commands.
9805 * Summary Generation Commands::  
9806 * Really Various Summary Commands::  Those pesky non-conformant commands.
9807 @end menu
9808
9809 @table @code
9810 @vindex gnus-summary-display-while-building
9811 @item gnus-summary-display-while-building
9812 If non-@code{nil}, show and update the summary buffer as it's being
9813 built.  If @code{t}, update the buffer after every line is inserted.
9814 If the value is an integer, @var{n}, update the display every @var{n}
9815 lines.  The default is @code{nil}.
9816
9817 @vindex gnus-summary-mode-hook
9818 @item gnus-summary-mode-hook
9819 This hook is called when creating a summary mode buffer.
9820
9821 @vindex gnus-summary-generate-hook
9822 @item gnus-summary-generate-hook
9823 This is called as the last thing before doing the threading and the
9824 generation of the summary buffer.  It's quite convenient for customizing
9825 the threading variables based on what data the newsgroup has.  This hook
9826 is called from the summary buffer after most summary buffer variables
9827 have been set.
9828
9829 @vindex gnus-summary-prepare-hook
9830 @item gnus-summary-prepare-hook
9831 It is called after the summary buffer has been generated.  You might use
9832 it to, for instance, highlight lines or modify the look of the buffer in
9833 some other ungodly manner.  I don't care.
9834
9835 @vindex gnus-summary-prepared-hook
9836 @item gnus-summary-prepared-hook
9837 A hook called as the very last thing after the summary buffer has been
9838 generated.
9839
9840 @vindex gnus-summary-ignore-duplicates
9841 @item gnus-summary-ignore-duplicates
9842 When Gnus discovers two articles that have the same @code{Message-ID},
9843 it has to do something drastic.  No articles are allowed to have the
9844 same @code{Message-ID}, but this may happen when reading mail from some
9845 sources.  Gnus allows you to customize what happens with this variable.
9846 If it is @code{nil} (which is the default), Gnus will rename the
9847 @code{Message-ID} (for display purposes only) and display the article as
9848 any other article.  If this variable is @code{t}, it won't display the
9849 article---it'll be as if it never existed.
9850
9851 @vindex gnus-alter-articles-to-read-function
9852 @item gnus-alter-articles-to-read-function
9853 This function, which takes two parameters (the group name and the list
9854 of articles to be selected), is called to allow the user to alter the
9855 list of articles to be selected.
9856
9857 For instance, the following function adds the list of cached articles to
9858 the list in one particular group:
9859
9860 @lisp
9861 (defun my-add-cached-articles (group articles)
9862   (if (string= group "some.group")
9863       (append gnus-newsgroup-cached articles)
9864     articles))
9865 @end lisp
9866
9867 @vindex gnus-newsgroup-variables
9868 @item gnus-newsgroup-variables
9869 A list of newsgroup (summary buffer) local variables, or cons of
9870 variables and their default values (when the default values are not
9871 nil), that should be made global while the summary buffer is active.
9872 These variables can be used to set variables in the group parameters
9873 while still allowing them to affect operations done in other
9874 buffers. For example:
9875
9876 @lisp
9877 (setq gnus-newsgroup-variables
9878      '(message-use-followup-to
9879        (gnus-visible-headers .
9880          "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
9881 @end lisp
9882
9883 @end table
9884
9885
9886 @node Summary Group Information
9887 @subsection Summary Group Information
9888
9889 @table @kbd
9890
9891 @item H f
9892 @kindex H f (Summary)
9893 @findex gnus-summary-fetch-faq
9894 @vindex gnus-group-faq-directory
9895 Try to fetch the FAQ (list of frequently asked questions) for the
9896 current group (@code{gnus-summary-fetch-faq}).  Gnus will try to get the
9897 FAQ from @code{gnus-group-faq-directory}, which is usually a directory
9898 on a remote machine.  This variable can also be a list of directories.
9899 In that case, giving a prefix to this command will allow you to choose
9900 between the various sites.  @code{ange-ftp} or @code{efs} will probably
9901 be used for fetching the file.
9902
9903 @item H d
9904 @kindex H d (Summary)
9905 @findex gnus-summary-describe-group
9906 Give a brief description of the current group
9907 (@code{gnus-summary-describe-group}).  If given a prefix, force
9908 rereading the description from the server.
9909
9910 @item H h
9911 @kindex H h (Summary)
9912 @findex gnus-summary-describe-briefly
9913 Give an extremely brief description of the most important summary
9914 keystrokes (@code{gnus-summary-describe-briefly}).
9915
9916 @item H i
9917 @kindex H i (Summary)
9918 @findex gnus-info-find-node
9919 Go to the Gnus info node (@code{gnus-info-find-node}).
9920 @end table
9921
9922
9923 @node Searching for Articles
9924 @subsection Searching for Articles
9925
9926 @table @kbd
9927
9928 @item M-s
9929 @kindex M-s (Summary)
9930 @findex gnus-summary-search-article-forward
9931 Search through all subsequent (raw) articles for a regexp
9932 (@code{gnus-summary-search-article-forward}).
9933
9934 @item M-r
9935 @kindex M-r (Summary)
9936 @findex gnus-summary-search-article-backward
9937 Search through all previous (raw) articles for a regexp
9938 (@code{gnus-summary-search-article-backward}).
9939
9940 @item &
9941 @kindex & (Summary)
9942 @findex gnus-summary-execute-command
9943 This command will prompt you for a header, a regular expression to match
9944 on this field, and a command to be executed if the match is made
9945 (@code{gnus-summary-execute-command}).  If the header is an empty
9946 string, the match is done on the entire article.  If given a prefix,
9947 search backward instead.
9948
9949 For instance, @kbd{& RET some.*string #} will put the process mark on
9950 all articles that have heads or bodies that match @samp{some.*string}.
9951
9952 @item M-&
9953 @kindex M-& (Summary)
9954 @findex gnus-summary-universal-argument
9955 Perform any operation on all articles that have been marked with
9956 the process mark (@code{gnus-summary-universal-argument}).
9957 @end table
9958
9959 @node Summary Generation Commands
9960 @subsection Summary Generation Commands
9961
9962 @table @kbd
9963
9964 @item Y g
9965 @kindex Y g (Summary)
9966 @findex gnus-summary-prepare
9967 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
9968
9969 @item Y c
9970 @kindex Y c (Summary)
9971 @findex gnus-summary-insert-cached-articles
9972 Pull all cached articles (for the current group) into the summary buffer
9973 (@code{gnus-summary-insert-cached-articles}).
9974
9975 @item Y d
9976 @kindex Y d (Summary)
9977 @findex gnus-summary-insert-dormant-articles
9978 Pull all dormant articles (for the current group) into the summary buffer
9979 (@code{gnus-summary-insert-dormant-articles}).
9980
9981 @end table
9982
9983
9984 @node Really Various Summary Commands
9985 @subsection Really Various Summary Commands
9986
9987 @table @kbd
9988
9989 @item A D
9990 @itemx C-d
9991 @kindex C-d (Summary)
9992 @kindex A D (Summary)
9993 @findex gnus-summary-enter-digest-group
9994 If the current article is a collection of other articles (for instance,
9995 a digest), you might use this command to enter a group based on the that
9996 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
9997 guess what article type is currently displayed unless you give a prefix
9998 to this command, which forces a ``digest'' interpretation.  Basically,
9999 whenever you see a message that is a collection of other messages of
10000 some format, you @kbd{C-d} and read these messages in a more convenient
10001 fashion.
10002
10003 @item C-M-d
10004 @kindex C-M-d (Summary)
10005 @findex gnus-summary-read-document
10006 This command is very similar to the one above, but lets you gather
10007 several documents into one biiig group
10008 (@code{gnus-summary-read-document}).  It does this by opening several
10009 @code{nndoc} groups for each document, and then opening an
10010 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10011 command understands the process/prefix convention
10012 (@pxref{Process/Prefix}).
10013
10014 @item C-t
10015 @kindex C-t (Summary)
10016 @findex gnus-summary-toggle-truncation
10017 Toggle truncation of summary lines
10018 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10019 line centering function in the summary buffer, so it's not a good idea
10020 to have truncation switched off while reading articles.
10021
10022 @item =
10023 @kindex = (Summary)
10024 @findex gnus-summary-expand-window
10025 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10026 If given a prefix, force an @code{article} window configuration.
10027
10028 @item C-M-e
10029 @kindex C-M-e (Summary)
10030 @findex gnus-summary-edit-parameters
10031 Edit the group parameters (@pxref{Group Parameters}) of the current
10032 group (@code{gnus-summary-edit-parameters}).
10033
10034 @item C-M-a
10035 @kindex C-M-a (Summary)
10036 @findex gnus-summary-customize-parameters
10037 Customize the group parameters (@pxref{Group Parameters}) of the current
10038 group (@code{gnus-summary-customize-parameters}).
10039
10040 @end table
10041
10042
10043 @node Exiting the Summary Buffer
10044 @section Exiting the Summary Buffer
10045 @cindex summary exit
10046 @cindex exiting groups
10047
10048 Exiting from the summary buffer will normally update all info on the
10049 group and return you to the group buffer.
10050
10051 @table @kbd
10052
10053 @item Z Z
10054 @itemx q
10055 @kindex Z Z (Summary)
10056 @kindex q (Summary)
10057 @findex gnus-summary-exit
10058 @vindex gnus-summary-exit-hook
10059 @vindex gnus-summary-prepare-exit-hook
10060 @c @icon{gnus-summary-exit}
10061 Exit the current group and update all information on the group
10062 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10063 called before doing much of the exiting, which calls
10064 @code{gnus-summary-expire-articles} by default.
10065 @code{gnus-summary-exit-hook} is called after finishing the exit
10066 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10067 group mode having no more (unread) groups.
10068
10069 @item Z E
10070 @itemx Q
10071 @kindex Z E (Summary)
10072 @kindex Q (Summary)
10073 @findex gnus-summary-exit-no-update
10074 Exit the current group without updating any information on the group
10075 (@code{gnus-summary-exit-no-update}).
10076
10077 @item Z c
10078 @itemx c
10079 @kindex Z c (Summary)
10080 @kindex c (Summary)
10081 @findex gnus-summary-catchup-and-exit
10082 @c @icon{gnus-summary-catchup-and-exit}
10083 Mark all unticked articles in the group as read and then exit
10084 (@code{gnus-summary-catchup-and-exit}).
10085
10086 @item Z C
10087 @kindex Z C (Summary)
10088 @findex gnus-summary-catchup-all-and-exit
10089 Mark all articles, even the ticked ones, as read and then exit
10090 (@code{gnus-summary-catchup-all-and-exit}).
10091
10092 @item Z n
10093 @kindex Z n (Summary)
10094 @findex gnus-summary-catchup-and-goto-next-group
10095 Mark all articles as read and go to the next group
10096 (@code{gnus-summary-catchup-and-goto-next-group}).
10097
10098 @item Z R
10099 @kindex Z R (Summary)
10100 @findex gnus-summary-reselect-current-group
10101 Exit this group, and then enter it again
10102 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10103 all articles, both read and unread.
10104
10105 @item Z G
10106 @itemx M-g
10107 @kindex Z G (Summary)
10108 @kindex M-g (Summary)
10109 @findex gnus-summary-rescan-group
10110 @c @icon{gnus-summary-mail-get}
10111 Exit the group, check for new articles in the group, and select the
10112 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10113 articles, both read and unread.
10114
10115 @item Z N
10116 @kindex Z N (Summary)
10117 @findex gnus-summary-next-group
10118 Exit the group and go to the next group
10119 (@code{gnus-summary-next-group}).
10120
10121 @item Z P
10122 @kindex Z P (Summary)
10123 @findex gnus-summary-prev-group
10124 Exit the group and go to the previous group
10125 (@code{gnus-summary-prev-group}).
10126
10127 @item Z s
10128 @kindex Z s (Summary)
10129 @findex gnus-summary-save-newsrc
10130 Save the current number of read/marked articles in the dribble buffer
10131 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10132 given a prefix, also save the @file{.newsrc} file(s).  Using this
10133 command will make exit without updating (the @kbd{Q} command) worthless.
10134 @end table
10135
10136 @vindex gnus-exit-group-hook
10137 @code{gnus-exit-group-hook} is called when you exit the current group
10138 with an ``updating'' exit.  For instance @kbd{Q}
10139 (@code{gnus-summary-exit-no-update}) does not call this hook.
10140
10141 @findex gnus-summary-wake-up-the-dead
10142 @findex gnus-dead-summary-mode
10143 @vindex gnus-kill-summary-on-exit
10144 If you're in the habit of exiting groups, and then changing your mind
10145 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10146 If you do that, Gnus won't kill the summary buffer when you exit it.
10147 (Quelle surprise!)  Instead it will change the name of the buffer to
10148 something like @samp{*Dead Summary ... *} and install a minor mode
10149 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10150 buffer, you'll find that all keys are mapped to a function called
10151 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10152 summary buffer will result in a live, normal summary buffer.
10153
10154 There will never be more than one dead summary buffer at any one time.
10155
10156 @vindex gnus-use-cross-reference
10157 The data on the current group will be updated (which articles you have
10158 read, which articles you have replied to, etc.) when you exit the
10159 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10160 @code{t} (which is the default), articles that are cross-referenced to
10161 this group and are marked as read, will also be marked as read in the
10162 other subscribed groups they were cross-posted to.  If this variable is
10163 neither @code{nil} nor @code{t}, the article will be marked as read in
10164 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10165
10166
10167 @node Crosspost Handling
10168 @section Crosspost Handling
10169
10170 @cindex velveeta
10171 @cindex spamming
10172 Marking cross-posted articles as read ensures that you'll never have to
10173 read the same article more than once.  Unless, of course, somebody has
10174 posted it to several groups separately.  Posting the same article to
10175 several groups (not cross-posting) is called @dfn{spamming}, and you are
10176 by law required to send nasty-grams to anyone who perpetrates such a
10177 heinous crime.  You may want to try NoCeM handling to filter out spam
10178 (@pxref{NoCeM}).
10179
10180 Remember: Cross-posting is kinda ok, but posting the same article
10181 separately to several groups is not.  Massive cross-posting (aka.
10182 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10183 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10184 excessive crossposting (@pxref{Summary Mail Commands}).
10185
10186 @cindex cross-posting
10187 @cindex Xref
10188 @cindex @sc{nov}
10189 One thing that may cause Gnus to not do the cross-posting thing
10190 correctly is if you use an @sc{nntp} server that supports @sc{xover}
10191 (which is very nice, because it speeds things up considerably) which
10192 does not include the @code{Xref} header in its @sc{nov} lines.  This is
10193 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10194 even with @sc{xover} by registering the @code{Xref} lines of all
10195 articles you actually read, but if you kill the articles, or just mark
10196 them as read without reading them, Gnus will not get a chance to snoop
10197 the @code{Xref} lines out of these articles, and will be unable to use
10198 the cross reference mechanism.
10199
10200 @cindex LIST overview.fmt
10201 @cindex overview.fmt
10202 To check whether your @sc{nntp} server includes the @code{Xref} header
10203 in its overview files, try @samp{telnet your.nntp.server nntp},
10204 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10205 overview.fmt}.  This may not work, but if it does, and the last line you
10206 get does not read @samp{Xref:full}, then you should shout and whine at
10207 your news admin until she includes the @code{Xref} header in the
10208 overview files.
10209
10210 @vindex gnus-nov-is-evil
10211 If you want Gnus to get the @code{Xref}s right all the time, you have to
10212 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10213 considerably.
10214
10215 C'est la vie.
10216
10217 For an alternative approach, @pxref{Duplicate Suppression}.
10218
10219
10220 @node Duplicate Suppression
10221 @section Duplicate Suppression
10222
10223 By default, Gnus tries to make sure that you don't have to read the same
10224 article more than once by utilizing the crossposting mechanism
10225 (@pxref{Crosspost Handling}).  However, that simple and efficient
10226 approach may not work satisfactory for some users for various
10227 reasons.
10228
10229 @enumerate
10230 @item
10231 The @sc{nntp} server may fail to generate the @code{Xref} header.  This
10232 is evil and not very common.
10233
10234 @item
10235 The @sc{nntp} server may fail to include the @code{Xref} header in the
10236 @file{.overview} data bases.  This is evil and all too common, alas.
10237
10238 @item
10239 You may be reading the same group (or several related groups) from
10240 different @sc{nntp} servers.
10241
10242 @item
10243 You may be getting mail that duplicates articles posted to groups.
10244 @end enumerate
10245
10246 I'm sure there are other situations where @code{Xref} handling fails as
10247 well, but these four are the most common situations.
10248
10249 If, and only if, @code{Xref} handling fails for you, then you may
10250 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10251 will remember the @code{Message-ID}s of all articles you have read or
10252 otherwise marked as read, and then, as if by magic, mark them as read
10253 all subsequent times you see them---in @emph{all} groups.  Using this
10254 mechanism is quite likely to be somewhat inefficient, but not overly
10255 so.  It's certainly preferable to reading the same articles more than
10256 once.
10257
10258 Duplicate suppression is not a very subtle instrument.  It's more like a
10259 sledge hammer than anything else.  It works in a very simple
10260 fashion---if you have marked an article as read, it adds this Message-ID
10261 to a cache.  The next time it sees this Message-ID, it will mark the
10262 article as read with the @samp{M} mark.  It doesn't care what group it
10263 saw the article in.
10264
10265 @table @code
10266 @item gnus-suppress-duplicates
10267 @vindex gnus-suppress-duplicates
10268 If non-@code{nil}, suppress duplicates.
10269
10270 @item gnus-save-duplicate-list
10271 @vindex gnus-save-duplicate-list
10272 If non-@code{nil}, save the list of duplicates to a file.  This will
10273 make startup and shutdown take longer, so the default is @code{nil}.
10274 However, this means that only duplicate articles read in a single Gnus
10275 session are suppressed.
10276
10277 @item gnus-duplicate-list-length
10278 @vindex gnus-duplicate-list-length
10279 This variable says how many @code{Message-ID}s to keep in the duplicate
10280 suppression list.  The default is 10000.
10281
10282 @item gnus-duplicate-file
10283 @vindex gnus-duplicate-file
10284 The name of the file to store the duplicate suppression list in.  The
10285 default is @file{~/News/suppression}.
10286 @end table
10287
10288 If you have a tendency to stop and start Gnus often, setting
10289 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10290 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
10291 the other hand, saving the list makes startup and shutdown much slower,
10292 so that means that if you stop and start Gnus often, you should set
10293 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10294 to you to figure out, I think.
10295
10296 @node Security
10297 @section Security
10298
10299 Gnus is able to verify signed messages or decrypt encrypted messages.
10300 The formats that are supported are PGP, @sc{pgp/mime} and @sc{s/mime},
10301 however you need some external programs to get things to work:
10302
10303 @enumerate
10304 @item
10305 To handle PGP and PGP/MIME messages, you have to install an OpenPGP
10306 implementation such as GnuPG.  The lisp interface to GnuPG included
10307 with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG Manual}), but
10308 Mailcrypt and gpg.el are also supported.
10309
10310 @item
10311 To handle @sc{s/mime} message, you need to install OpenSSL.  OpenSSL 0.9.6
10312 or newer is recommended.
10313
10314 @end enumerate
10315
10316 More information on how to set things up can be found in the message
10317 manual (@pxref{Security, ,Security, message, Message Manual}).
10318
10319 @table @code
10320 @item mm-verify-option
10321 @vindex mm-verify-option
10322 Option of verifying signed parts.  @code{never}, not verify;
10323 @code{always}, always verify; @code{known}, only verify known
10324 protocols. Otherwise, ask user.
10325
10326 @item mm-decrypt-option
10327 @vindex mm-decrypt-option
10328 Option of decrypting encrypted parts.  @code{never}, no decryption;
10329 @code{always}, always decrypt; @code{known}, only decrypt known
10330 protocols. Otherwise, ask user.
10331
10332 @item mml1991-use
10333 @vindex mml1991-use
10334 Symbol indicating elisp interface to OpenPGP implementation for PGP
10335 messages.  The default is @code{pgg}, but @code{mailcrypt} and
10336 @code{gpg} are also supported although deprecated.
10337
10338 @item mml2015-use
10339 @vindex mml2015-use
10340 Symbol indicating elisp interface to OpenPGP implementation for
10341 PGP/MIME messages.  The default is @code{pgg}, but @code{mailcrypt}
10342 and @code{gpg} are also supported although deprecated.
10343
10344 @end table
10345
10346 @node Mailing List
10347 @section Mailing List
10348
10349 @kindex A M (summary)
10350 @findex gnus-mailing-list-insinuate
10351 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10352 either add a `to-list' group parameter (@pxref{Group Parameters}),
10353 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10354 summary buffer, or say:
10355
10356 @lisp
10357 (add-hook 'gnus-summary-mode-hook 'turn-on-gnus-mailing-list-mode)
10358 @end lisp
10359
10360 That enables the following commands to the summary buffer:
10361
10362 @table @kbd
10363
10364 @item C-c C-n h
10365 @kindex C-c C-n h (Summary)
10366 @findex gnus-mailing-list-help
10367 Send a message to fetch mailing list help, if List-Help field exists.
10368
10369 @item C-c C-n s
10370 @kindex C-c C-n s (Summary)
10371 @findex gnus-mailing-list-subscribe
10372 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10373
10374 @item C-c C-n u
10375 @kindex C-c C-n u (Summary)
10376 @findex gnus-mailing-list-unsubscribe
10377 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10378 field exists.
10379
10380 @item C-c C-n p
10381 @kindex C-c C-n p (Summary)
10382 @findex gnus-mailing-list-post
10383 Post to the mailing list, if List-Post field exists.
10384
10385 @item C-c C-n o
10386 @kindex C-c C-n o (Summary)
10387 @findex gnus-mailing-list-owner
10388 Send a message to the mailing list owner, if List-Owner field exists.
10389
10390 @item C-c C-n a
10391 @kindex C-c C-n a (Summary)
10392 @findex gnus-mailing-list-owner
10393 Browse the mailing list archive, if List-Archive field exists.
10394
10395 @end table
10396
10397 @node Article Buffer
10398 @chapter Article Buffer
10399 @cindex article buffer
10400
10401 The articles are displayed in the article buffer, of which there is only
10402 one.  All the summary buffers share the same article buffer unless you
10403 tell Gnus otherwise.
10404
10405 @menu
10406 * Hiding Headers::              Deciding what headers should be displayed.
10407 * Using MIME::                  Pushing articles through @sc{mime} before reading them.
10408 * Customizing Articles::        Tailoring the look of the articles.
10409 * Article Keymap::              Keystrokes available in the article buffer.
10410 * Misc Article::                Other stuff.
10411 @end menu
10412
10413
10414 @node Hiding Headers
10415 @section Hiding Headers
10416 @cindex hiding headers
10417 @cindex deleting headers
10418
10419 The top section of each article is the @dfn{head}.  (The rest is the
10420 @dfn{body}, but you may have guessed that already.)
10421
10422 @vindex gnus-show-all-headers
10423 There is a lot of useful information in the head: the name of the person
10424 who wrote the article, the date it was written and the subject of the
10425 article.  That's well and nice, but there's also lots of information
10426 most people do not want to see---what systems the article has passed
10427 through before reaching you, the @code{Message-ID}, the
10428 @code{References}, etc. ad nauseum---and you'll probably want to get rid
10429 of some of those lines.  If you want to keep all those lines in the
10430 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10431
10432 Gnus provides you with two variables for sifting headers:
10433
10434 @table @code
10435
10436 @item gnus-visible-headers
10437 @vindex gnus-visible-headers
10438 If this variable is non-@code{nil}, it should be a regular expression
10439 that says what headers you wish to keep in the article buffer.  All
10440 headers that do not match this variable will be hidden.
10441
10442 For instance, if you only want to see the name of the person who wrote
10443 the article and the subject, you'd say:
10444
10445 @lisp
10446 (setq gnus-visible-headers "^From:\\|^Subject:")
10447 @end lisp
10448
10449 This variable can also be a list of regexps to match headers to
10450 remain visible.
10451
10452 @item gnus-ignored-headers
10453 @vindex gnus-ignored-headers
10454 This variable is the reverse of @code{gnus-visible-headers}.  If this
10455 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10456 should be a regular expression that matches all lines that you want to
10457 hide.  All lines that do not match this variable will remain visible.
10458
10459 For instance, if you just want to get rid of the @code{References} line
10460 and the @code{Xref} line, you might say:
10461
10462 @lisp
10463 (setq gnus-ignored-headers "^References:\\|^Xref:")
10464 @end lisp
10465
10466 This variable can also be a list of regexps to match headers to
10467 be removed.
10468
10469 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10470 variable will have no effect.
10471
10472 @end table
10473
10474 @vindex gnus-sorted-header-list
10475 Gnus can also sort the headers for you.  (It does this by default.)  You
10476 can control the sorting by setting the @code{gnus-sorted-header-list}
10477 variable.  It is a list of regular expressions that says in what order
10478 the headers are to be displayed.
10479
10480 For instance, if you want the name of the author of the article first,
10481 and then the subject, you might say something like:
10482
10483 @lisp
10484 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10485 @end lisp
10486
10487 Any headers that are to remain visible, but are not listed in this
10488 variable, will be displayed in random order after all the headers listed in this variable.
10489
10490 @findex gnus-article-hide-boring-headers
10491 @vindex gnus-boring-article-headers
10492 You can hide further boring headers by setting
10493 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10494 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10495 list, but this list doesn't actually contain header names.  Instead is
10496 lists various @dfn{boring conditions} that Gnus can check and remove
10497 from sight.
10498
10499 These conditions are:
10500 @table @code
10501 @item empty
10502 Remove all empty headers.
10503 @item followup-to
10504 Remove the @code{Followup-To} header if it is identical to the
10505 @code{Newsgroups} header.
10506 @item reply-to
10507 Remove the @code{Reply-To} header if it lists the same address as the
10508 @code{From} header.
10509 @item newsgroups
10510 Remove the @code{Newsgroups} header if it only contains the current group
10511 name.
10512 @item to-address
10513 Remove the @code{To} header if it only contains the address identical to
10514 the current groups's @code{to-address} parameter.
10515 @item date
10516 Remove the @code{Date} header if the article is less than three days
10517 old.
10518 @item long-to
10519 Remove the @code{To} header if it is very long.
10520 @item many-to
10521 Remove all @code{To} headers if there are more than one.
10522 @end table
10523
10524 To include these three elements, you could say something like:
10525
10526 @lisp
10527 (setq gnus-boring-article-headers
10528       '(empty followup-to reply-to))
10529 @end lisp
10530
10531 This is also the default value for this variable.
10532
10533
10534 @node Using MIME
10535 @section Using MIME
10536 @cindex @sc{mime}
10537
10538 Mime is a standard for waving your hands through the air, aimlessly,
10539 while people stand around yawning.
10540
10541 @sc{mime}, however, is a standard for encoding your articles, aimlessly,
10542 while all newsreaders die of fear.
10543
10544 @sc{mime} may specify what character set the article uses, the encoding
10545 of the characters, and it also makes it possible to embed pictures and
10546 other naughty stuff in innocent-looking articles.
10547
10548 @vindex gnus-display-mime-function
10549 @findex gnus-display-mime
10550 Gnus pushes @sc{mime} articles through @code{gnus-display-mime-function}
10551 to display the @sc{mime} parts.  This is @code{gnus-display-mime} by
10552 default, which creates a bundle of clickable buttons that can be used to
10553 display, save and manipulate the @sc{mime} objects.
10554
10555 The following commands are available when you have placed point over a
10556 @sc{mime} button:
10557
10558 @table @kbd
10559 @findex gnus-article-press-button
10560 @item RET (Article)
10561 @kindex RET (Article)
10562 @itemx BUTTON-2 (Article)
10563 Toggle displaying of the @sc{mime} object
10564 (@code{gnus-article-press-button}). If builtin viewers can not display
10565 the object, Gnus resorts to external viewers in the @file{mailcap}
10566 files.  If a viewer has the @samp{copiousoutput} specification, the
10567 object is displayed inline.
10568
10569 @findex gnus-mime-view-part
10570 @item M-RET (Article)
10571 @kindex M-RET (Article)
10572 @itemx v (Article)
10573 Prompt for a method, and then view the @sc{mime} object using this
10574 method (@code{gnus-mime-view-part}).
10575
10576 @findex gnus-mime-view-part-as-type
10577 @item t (Article)
10578 @kindex t (Article)
10579 View the @sc{mime} object as if it were a different @sc{mime} media type
10580 (@code{gnus-mime-view-part-as-type}).
10581
10582 @findex gnus-mime-view-part-as-charset
10583 @item C (Article)
10584 @kindex C (Article)
10585 Prompt for a charset, and then view the @sc{mime} object using this
10586 charset (@code{gnus-mime-view-part-as-charset}).
10587
10588 @findex gnus-mime-save-part
10589 @item o (Article)
10590 @kindex o (Article)
10591 Prompt for a file name, and then save the @sc{mime} object
10592 (@code{gnus-mime-save-part}).
10593
10594 @findex gnus-mime-save-part-and-strip
10595 @item C-o (Article)
10596 @kindex C-o (Article)
10597 Prompt for a file name, then save the @sc{mime} object and strip it from
10598 the article.  Then proceed to article editing, where a reasonable
10599 suggestion is being made on how the altered article should look
10600 like. The stripped @sc{mime} object will be referred via the
10601 message/external-body @sc{mime} type.
10602 (@code{gnus-mime-save-part-and-strip}).
10603
10604 @findex gnus-mime-copy-part
10605 @item c (Article)
10606 @kindex c (Article)
10607 Copy the @sc{mime} object to a fresh buffer and display this buffer
10608 (@code{gnus-mime-copy-part}).  Compressed files like @file{.gz} and
10609 @file{.bz2} are automatically decompressed if
10610 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
10611 Accessing Compressed Files, emacs, The Emacs Editor}).
10612
10613 @findex gnus-mime-print-part
10614 @item p (Article)
10615 @kindex p (Article)
10616 Print the @sc{mime} object (@code{gnus-mime-print-part}).  This
10617 command respects the @samp{print=} specifications in the
10618 @file{.mailcap} file.
10619
10620 @findex gnus-mime-inline-part
10621 @item i (Article)
10622 @kindex i (Article)
10623 Insert the contents of the @sc{mime} object into the buffer
10624 (@code{gnus-mime-inline-part}) as text/plain.  If given a prefix, insert
10625 the raw contents without decoding.  If given a numerical prefix, you can
10626 do semi-manual charset stuff (see
10627 @code{gnus-summary-show-article-charset-alist} in @pxref{Paging the
10628 Article}).
10629
10630 @findex gnus-mime-view-part-internally
10631 @item E (Article)
10632 @kindex E (Article)
10633 View the @sc{mime} object with an internal viewer.  If no internal
10634 viewer is available, use an external viewer
10635 (@code{gnus-mime-view-part-internally}).
10636
10637 @findex gnus-mime-view-part-externally
10638 @item e (Article)
10639 @kindex e (Article)
10640 View the @sc{mime} object with an external viewer.
10641 (@code{gnus-mime-view-part-externally}).
10642
10643 @findex gnus-mime-pipe-part
10644 @item | (Article)
10645 @kindex | (Article)
10646 Output the @sc{mime} object to a process (@code{gnus-mime-pipe-part}).
10647
10648 @findex gnus-mime-action-on-part
10649 @item . (Article)
10650 @kindex . (Article)
10651 Interactively run an action on the @sc{mime} object
10652 (@code{gnus-mime-action-on-part}).
10653
10654 @end table
10655
10656 Gnus will display some @sc{mime} objects automatically.  The way Gnus
10657 determines which parts to do this with is described in the Emacs
10658 @sc{mime} manual.
10659
10660 It might be best to just use the toggling functions from the article
10661 buffer to avoid getting nasty surprises.  (For instance, you enter the
10662 group @samp{alt.sing-a-long} and, before you know it, @sc{mime} has
10663 decoded the sound file in the article and some horrible sing-a-long song
10664 comes screaming out your speakers, and you can't find the volume button,
10665 because there isn't one, and people are starting to look at you, and you
10666 try to stop the program, but you can't, and you can't find the program
10667 to control the volume, and everybody else in the room suddenly decides
10668 to look at you disdainfully, and you'll feel rather stupid.)
10669
10670 Any similarity to real events and people is purely coincidental.  Ahem.
10671
10672 Also see @pxref{MIME Commands}.
10673
10674
10675 @node Customizing Articles
10676 @section Customizing Articles
10677 @cindex article customization
10678
10679 A slew of functions for customizing how the articles are to look like
10680 exist.  You can call these functions interactively, or you can have them
10681 called automatically when you select the articles.
10682
10683 To have them called automatically, you should set the corresponding
10684 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10685 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10686 be set, but first we discuss the values these variables can have.
10687
10688 Note: Some values, while valid, make little sense.  Check the list below
10689 for sensible values.
10690
10691 @enumerate
10692 @item
10693 @code{nil}: Don't do this treatment.
10694
10695 @item
10696 @code{t}: Do this treatment on all body parts.
10697
10698 @item
10699 @code{head}: Do the treatment on the headers.
10700
10701 @item
10702 @code{last}: Do this treatment on the last part.
10703
10704 @item
10705 An integer: Do this treatment on all body parts that have a length less
10706 than this number.
10707
10708 @item
10709 A list of strings: Do this treatment on all body parts that are in
10710 articles that are read in groups that have names that match one of the
10711 regexps in the list.
10712
10713 @item
10714 A list where the first element is not a string:
10715
10716 The list is evaluated recursively.  The first element of the list is a
10717 predicate.  The following predicates are recognized: @code{or},
10718 @code{and}, @code{not} and @code{typep}.  Here's an example:
10719
10720 @lisp
10721 (or last
10722     (typep "text/x-vcard"))
10723 @end lisp
10724
10725 @end enumerate
10726
10727 You may have noticed that the word @dfn{part} is used here.  This refers
10728 to the fact that some messages are @sc{mime} multipart articles that may
10729 be divided into several parts.  Articles that are not multiparts are
10730 considered to contain just a single part.
10731
10732 @vindex gnus-article-treat-types
10733 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10734 want to, but by default, only @samp{text/plain} parts are given the
10735 treatment.  This is controlled by the @code{gnus-article-treat-types}
10736 variable, which is a list of regular expressions that are matched to the
10737 type of the part.  This variable is ignored if the value of the
10738 controlling variable is a predicate list, as described above.
10739
10740 The following treatment options are available.  The easiest way to
10741 customize this is to examine the @code{gnus-article-treat} customization
10742 group.  Values in parenthesis are suggested sensible values.  Others are
10743 possible but those listed are probably sufficient for most people.
10744
10745 @table @code
10746 @item gnus-treat-buttonize (t, integer)
10747 @item gnus-treat-buttonize-head (head)
10748
10749 @xref{Article Buttons}.
10750
10751 @item gnus-treat-capitalize-sentences (t, integer)
10752 @item gnus-treat-overstrike (t, integer)
10753 @item gnus-treat-strip-cr (t, integer)
10754 @item gnus-treat-strip-headers-in-body (t, integer)
10755 @item gnus-treat-strip-leading-blank-lines (t, integer)
10756 @item gnus-treat-strip-multiple-blank-lines (t, integer)
10757 @item gnus-treat-strip-pem (t, last, integer)
10758 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
10759 @item gnus-treat-unsplit-urls (t, integer)
10760 @item gnus-treat-wash-html (t, integer)
10761
10762 @xref{Article Washing}.
10763
10764 @item gnus-treat-date-english (head)
10765 @item gnus-treat-date-iso8601 (head)
10766 @item gnus-treat-date-lapsed (head)
10767 @item gnus-treat-date-local (head)
10768 @item gnus-treat-date-original (head)
10769 @item gnus-treat-date-user-defined (head)
10770 @item gnus-treat-date-ut (head)
10771
10772 @xref{Article Date}.
10773
10774 @item gnus-treat-from-picon (head)
10775 @item gnus-treat-mail-picon (head)
10776 @item gnus-treat-newsgroups-picon (head)
10777
10778 @xref{Picons}.
10779
10780 @item gnus-treat-display-smileys (t, integer)
10781
10782 @item gnus-treat-body-boundary (head)
10783
10784 @vindex gnus-body-boundary-delimiter
10785 Adds a delimiter between header and body, the string used as delimiter
10786 is controlled by @code{gnus-body-boundary-delimiter}.
10787
10788 @xref{Smileys}.
10789
10790 @item gnus-treat-display-xface (head)
10791
10792 @xref{X-Face}.
10793
10794 @item gnus-treat-emphasize (t, head, integer)
10795 @item gnus-treat-fill-article (t, integer)
10796 @item gnus-treat-fill-long-lines (t, integer)
10797 @item gnus-treat-hide-boring-headers (head)
10798 @item gnus-treat-hide-citation (t, integer)
10799 @item gnus-treat-hide-citation-maybe (t, integer)
10800 @item gnus-treat-hide-headers (head)
10801 @item gnus-treat-hide-signature (t, last)
10802
10803 @xref{Article Hiding}.
10804
10805 @item gnus-treat-highlight-citation (t, integer)
10806 @item gnus-treat-highlight-headers (head)
10807 @item gnus-treat-highlight-signature (t, last, integer)
10808
10809 @xref{Article Highlighting}.
10810
10811 @item gnus-treat-play-sounds
10812 @item gnus-treat-translate
10813 @item gnus-treat-x-pgp-sig (head)
10814
10815 @item gnus-treat-unfold-headers (head)
10816 @item gnus-treat-fold-headers (head)
10817 @item gnus-treat-fold-newsgroups (head)
10818 @item gnus-treat-leading-whitespace (head)
10819
10820 @xref{Article Header}.
10821
10822
10823 @end table
10824
10825 @vindex gnus-part-display-hook
10826 You can, of course, write your own functions to be called from
10827 @code{gnus-part-display-hook}.  The functions are called narrowed to the
10828 part, and you can do anything you like, pretty much.  There is no
10829 information that you have to keep in the buffer---you can change
10830 everything.
10831
10832
10833 @node Article Keymap
10834 @section Article Keymap
10835
10836 Most of the keystrokes in the summary buffer can also be used in the
10837 article buffer.  They should behave as if you typed them in the summary
10838 buffer, which means that you don't actually have to have a summary
10839 buffer displayed while reading.  You can do it all from the article
10840 buffer.
10841
10842 A few additional keystrokes are available:
10843
10844 @table @kbd
10845
10846 @item SPACE
10847 @kindex SPACE (Article)
10848 @findex gnus-article-next-page
10849 Scroll forwards one page (@code{gnus-article-next-page}).
10850
10851 @item DEL
10852 @kindex DEL (Article)
10853 @findex gnus-article-prev-page
10854 Scroll backwards one page (@code{gnus-article-prev-page}).
10855
10856 @item C-c ^
10857 @kindex C-c ^ (Article)
10858 @findex gnus-article-refer-article
10859 If point is in the neighborhood of a @code{Message-ID} and you press
10860 @kbd{C-c ^}, Gnus will try to get that article from the server
10861 (@code{gnus-article-refer-article}).
10862
10863 @item C-c C-m
10864 @kindex C-c C-m (Article)
10865 @findex gnus-article-mail
10866 Send a reply to the address near point (@code{gnus-article-mail}).  If
10867 given a prefix, include the mail.
10868
10869 @item s
10870 @kindex s (Article)
10871 @findex gnus-article-show-summary
10872 Reconfigure the buffers so that the summary buffer becomes visible
10873 (@code{gnus-article-show-summary}).
10874
10875 @item ?
10876 @kindex ? (Article)
10877 @findex gnus-article-describe-briefly
10878 Give a very brief description of the available keystrokes
10879 (@code{gnus-article-describe-briefly}).
10880
10881 @item TAB
10882 @kindex TAB (Article)
10883 @findex gnus-article-next-button
10884 Go to the next button, if any (@code{gnus-article-next-button}).  This
10885 only makes sense if you have buttonizing turned on.
10886
10887 @item M-TAB
10888 @kindex M-TAB (Article)
10889 @findex gnus-article-prev-button
10890 Go to the previous button, if any (@code{gnus-article-prev-button}).
10891
10892 @item R
10893 @kindex R (Article)
10894 @findex gnus-article-reply-with-original
10895 Send a reply to the current article and yank the current article
10896 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
10897 wide reply.  If the region is active, only yank the text in the
10898 region.
10899
10900 @item F
10901 @kindex F (Article)
10902 @findex gnus-article-followup-with-original
10903 Send a followup to the current article and yank the current article
10904 (@code{gnus-article-followup-with-original}).  If given a prefix, make
10905 a wide reply.  If the region is active, only yank the text in the
10906 region.
10907
10908
10909 @end table
10910
10911
10912 @node Misc Article
10913 @section Misc Article
10914
10915 @table @code
10916
10917 @item gnus-single-article-buffer
10918 @vindex gnus-single-article-buffer
10919 If non-@code{nil}, use the same article buffer for all the groups.
10920 (This is the default.)  If @code{nil}, each group will have its own
10921 article buffer.
10922
10923 @vindex gnus-article-decode-hook
10924 @item gnus-article-decode-hook
10925 @cindex MIME
10926 Hook used to decode @sc{mime} articles.  The default value is
10927 @code{(article-decode-charset article-decode-encoded-words)}
10928
10929 @vindex gnus-article-prepare-hook
10930 @item gnus-article-prepare-hook
10931 This hook is called right after the article has been inserted into the
10932 article buffer.  It is mainly intended for functions that do something
10933 depending on the contents; it should probably not be used for changing
10934 the contents of the article buffer.
10935
10936 @item gnus-article-mode-hook
10937 @vindex gnus-article-mode-hook
10938 Hook called in article mode buffers.
10939
10940 @item gnus-article-mode-syntax-table
10941 @vindex gnus-article-mode-syntax-table
10942 Syntax table used in article buffers.  It is initialized from
10943 @code{text-mode-syntax-table}.
10944
10945 @vindex gnus-article-mode-line-format
10946 @item gnus-article-mode-line-format
10947 This variable is a format string along the same lines as
10948 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
10949 accepts the same format specifications as that variable, with two
10950 extensions:
10951
10952 @table @samp
10953
10954 @item w
10955 The @dfn{wash status} of the article.  This is a short string with one
10956 character for each possible article wash operation that may have been
10957 performed.  The characters and their meaning:
10958
10959 @table @samp
10960
10961 @item c
10962 Displayed when cited text may be hidden in the article buffer.
10963
10964 @item h
10965 Displayed when headers are hidden in the article buffer.
10966
10967 @item p
10968 Displayed when article is digitally signed or encrypted, and Gnus has
10969 hidden the security headers.  (N.B. does not tell anything about
10970 security status, i.e. good or bad signature.)
10971
10972 @item s
10973 Displayed when the signature has been hidden in the Article buffer.
10974
10975 @item o
10976 Displayed when Gnus has treated overstrike characters in the article buffer.
10977
10978 @item e
10979 Displayed when Gnus has treated emphasised strings in the article buffer.
10980
10981 @end table
10982
10983 @item m
10984 The number of @sc{mime} parts in the article.
10985
10986 @end table
10987
10988 @vindex gnus-break-pages
10989
10990 @item gnus-break-pages
10991 Controls whether @dfn{page breaking} is to take place.  If this variable
10992 is non-@code{nil}, the articles will be divided into pages whenever a
10993 page delimiter appears in the article.  If this variable is @code{nil},
10994 paging will not be done.
10995
10996 @item gnus-page-delimiter
10997 @vindex gnus-page-delimiter
10998 This is the delimiter mentioned above.  By default, it is @samp{^L}
10999 (formfeed).
11000 @end table
11001
11002
11003 @node Composing Messages
11004 @chapter Composing Messages
11005 @cindex composing messages
11006 @cindex messages
11007 @cindex mail
11008 @cindex sending mail
11009 @cindex reply
11010 @cindex followup
11011 @cindex post
11012 @cindex using gpg
11013 @cindex using s/mime
11014 @cindex using smime
11015
11016 @kindex C-c C-c (Post)
11017 All commands for posting and mailing will put you in a message buffer
11018 where you can edit the article all you like, before you send the
11019 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
11020 Message Manual}.  Where the message will be posted/mailed to depends
11021 on your setup (@pxref{Posting Server}).
11022
11023 @menu
11024 * Mail::                        Mailing and replying.
11025 * Posting Server::              What server should you post and mail via?
11026 * Mail and Post::               Mailing and posting at the same time.
11027 * Archived Messages::           Where Gnus stores the messages you've sent.
11028 * Posting Styles::              An easier way to specify who you are.
11029 * Drafts::                      Postponing messages and rejected messages.
11030 * Rejected Articles::           What happens if the server doesn't like your article?
11031 * Signing and encrypting::      How to compose secure messages.
11032 @end menu
11033
11034 Also see @pxref{Canceling and Superseding} for information on how to
11035 remove articles you shouldn't have posted.
11036
11037
11038 @node Mail
11039 @section Mail
11040
11041 Variables for customizing outgoing mail:
11042
11043 @table @code
11044 @item gnus-uu-digest-headers
11045 @vindex gnus-uu-digest-headers
11046 List of regexps to match headers included in digested messages.  The
11047 headers will be included in the sequence they are matched.  If
11048 @code{nil} include all headers.
11049
11050 @item gnus-add-to-list
11051 @vindex gnus-add-to-list
11052 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11053 that have none when you do a @kbd{a}.
11054
11055 @item gnus-confirm-mail-reply-to-news
11056 @vindex gnus-confirm-mail-reply-to-news
11057 This can also be a function receiving the group name as the only
11058 parameter which should return non-@code{nil} if a confirmation is
11059 needed, or a regular expression matching group names, where
11060 confirmation is should be asked for.
11061
11062 If you find yourself never wanting to reply to mail, but occasionally
11063 press R anyway, this variable might be for you.
11064
11065 @item gnus-confirm-treat-mail-like-news
11066 @vindex gnus-confirm-treat-mail-like-news
11067 If non-@code{nil}, Gnus also requests confirmation according to
11068 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
11069 useful for treating mailing lists like newsgroups.
11070  
11071 @end table
11072
11073
11074 @node Posting Server
11075 @section Posting Server
11076
11077 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11078 (extremely intelligent, of course) article, where does it go?
11079
11080 Thank you for asking.  I hate you.
11081
11082 It can be quite complicated.
11083
11084 @vindex gnus-post-method
11085 When posting news, Message usually invokes @code{message-send-news}
11086 (@pxref{News Variables, , News Variables, message, Message Manual}).
11087 Normally, Gnus will post using the same select method as you're
11088 reading from (which might be convenient if you're reading lots of
11089 groups from different private servers).  However.  If the server
11090 you're reading from doesn't allow posting, just reading, you probably
11091 want to use some other server to post your (extremely intelligent and
11092 fabulously interesting) articles.  You can then set the
11093 @code{gnus-post-method} to some other method:
11094
11095 @lisp
11096 (setq gnus-post-method '(nnspool ""))
11097 @end lisp
11098
11099 Now, if you've done this, and then this server rejects your article, or
11100 this server is down, what do you do then?  To override this variable you
11101 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11102 the ``current'' server, to get back the default behavior, for posting.
11103
11104 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11105 Gnus will prompt you for what method to use for posting.
11106
11107 You can also set @code{gnus-post-method} to a list of select methods.
11108 If that's the case, Gnus will always prompt you for what method to use
11109 for posting.
11110
11111 Finally, if you want to always post using the native select method,
11112 you can set this variable to @code{native}.
11113
11114 When sending mail, Message invokes @code{message-send-mail-function}.
11115 The default function, @code{message-send-mail-with-sendmail}, pipes
11116 your article to the @code{sendmail} binary for further queuing and
11117 sending.  When your local system is not configured for sending mail
11118 using @code{sendmail}, and you have access to a remote @sc{smtp}
11119 server, you can set @code{message-send-mail-function} to
11120 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11121 package correctly.  An example:
11122
11123 @lisp
11124 (setq message-send-mail-function 'smtpmail-send-it
11125       smtpmail-default-smtp-server "YOUR SMTP HOST")
11126 @end lisp
11127
11128 To the thing similar to this, there is @code{message-smtpmail-send-it}.
11129 It is useful if your ISP requires the POP-before-SMTP authentication.
11130 See the documentation for the function @code{mail-source-touch-pop}.
11131
11132 Other possible choices for @code{message-send-mail-function} includes
11133 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11134 and @code{feedmail-send-it}.
11135
11136 @node Mail and Post
11137 @section Mail and Post
11138
11139 Here's a list of variables relevant to both mailing and
11140 posting:
11141
11142 @table @code
11143 @item gnus-mailing-list-groups
11144 @findex gnus-mailing-list-groups
11145 @cindex mailing lists
11146
11147 If your news server offers groups that are really mailing lists
11148 gatewayed to the @sc{nntp} server, you can read those groups without
11149 problems, but you can't post/followup to them without some difficulty.
11150 One solution is to add a @code{to-address} to the group parameters
11151 (@pxref{Group Parameters}).  An easier thing to do is set the
11152 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11153 really are mailing lists.  Then, at least, followups to the mailing
11154 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11155 still a pain, though.
11156
11157 @end table
11158
11159 You may want to do spell-checking on messages that you send out.  Or, if
11160 you don't want to spell-check by hand, you could add automatic
11161 spell-checking via the @code{ispell} package:
11162
11163 @cindex ispell
11164 @findex ispell-message
11165 @lisp
11166 (add-hook 'message-send-hook 'ispell-message)
11167 @end lisp
11168
11169 If you want to change the @code{ispell} dictionary based on what group
11170 you're in, you could say something like the following:
11171
11172 @lisp
11173 (add-hook 'gnus-select-group-hook
11174           (lambda ()
11175             (cond
11176              ((string-match
11177                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11178               (ispell-change-dictionary "deutsch"))
11179              (t
11180               (ispell-change-dictionary "english")))))
11181 @end lisp
11182
11183 Modify to suit your needs.
11184
11185
11186 @node Archived Messages
11187 @section Archived Messages
11188 @cindex archived messages
11189 @cindex sent messages
11190
11191 Gnus provides a few different methods for storing the mail and news you
11192 send.  The default method is to use the @dfn{archive virtual server} to
11193 store the messages.  If you want to disable this completely, the
11194 @code{gnus-message-archive-group} variable should be @code{nil}, which
11195 is the default.
11196
11197 For archiving interesting messages in a group you read, see the
11198 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11199 Group Commands}).
11200
11201 @vindex gnus-message-archive-method
11202 @code{gnus-message-archive-method} says what virtual server Gnus is to
11203 use to store sent messages.  The default is:
11204
11205 @lisp
11206 (nnfolder "archive"
11207           (nnfolder-directory   "~/Mail/archive")
11208           (nnfolder-active-file "~/Mail/archive/active")
11209           (nnfolder-get-new-mail nil)
11210           (nnfolder-inhibit-expiry t))
11211 @end lisp
11212
11213 You can, however, use any mail select method (@code{nnml},
11214 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11215 for doing this sort of thing, though.  If you don't like the default
11216 directory chosen, you could say something like:
11217
11218 @lisp
11219 (setq gnus-message-archive-method
11220       '(nnfolder "archive"
11221                  (nnfolder-inhibit-expiry t)
11222                  (nnfolder-active-file "~/News/sent-mail/active")
11223                  (nnfolder-directory "~/News/sent-mail/")))
11224 @end lisp
11225
11226 @vindex gnus-message-archive-group
11227 @cindex Gcc
11228 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11229 to one or more group(s) on that server.  Which group to use is
11230 determined by the @code{gnus-message-archive-group} variable.
11231
11232 This variable can be used to do the following:
11233
11234 @itemize @bullet
11235 @item
11236 a string
11237 Messages will be saved in that group.
11238
11239 Note that you can include a select method in the group name, then the
11240 message will not be stored in the select method given by
11241 @code{gnus-message-archive-method}, but in the select method specified
11242 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11243 has the default value shown above.  Then setting
11244 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11245 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11246 value @code{"nnml:foo"}, then outgoing messages will be stored in
11247 @samp{nnml:foo}.
11248 @item
11249 a list of strings
11250 Messages will be saved in all those groups.
11251 @item
11252 an alist of regexps, functions and forms
11253 When a key ``matches'', the result is used.
11254 @item
11255 @code{nil}
11256 No message archiving will take place.  This is the default.
11257 @end itemize
11258
11259 Let's illustrate:
11260
11261 Just saving to a single group called @samp{MisK}:
11262 @lisp
11263 (setq gnus-message-archive-group "MisK")
11264 @end lisp
11265
11266 Saving to two groups, @samp{MisK} and @samp{safe}:
11267 @lisp
11268 (setq gnus-message-archive-group '("MisK" "safe"))
11269 @end lisp
11270
11271 Save to different groups based on what group you are in:
11272 @lisp
11273 (setq gnus-message-archive-group
11274       '(("^alt" "sent-to-alt")
11275         ("mail" "sent-to-mail")
11276         (".*" "sent-to-misc")))
11277 @end lisp
11278
11279 More complex stuff:
11280 @lisp
11281 (setq gnus-message-archive-group
11282       '((if (message-news-p)
11283             "misc-news"
11284           "misc-mail")))
11285 @end lisp
11286
11287 How about storing all news messages in one file, but storing all mail
11288 messages in one file per month:
11289
11290 @lisp
11291 (setq gnus-message-archive-group
11292       '((if (message-news-p)
11293             "misc-news"
11294           (concat "mail." (format-time-string "%Y-%m")))))
11295 @end lisp
11296
11297 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11298 @c use a different value for @code{gnus-message-archive-group} there.)
11299
11300 Now, when you send a message off, it will be stored in the appropriate
11301 group.  (If you want to disable storing for just one particular message,
11302 you can just remove the @code{Gcc} header that has been inserted.)  The
11303 archive group will appear in the group buffer the next time you start
11304 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
11305 enter it and read the articles in it just like you'd read any other
11306 group.  If the group gets really big and annoying, you can simply rename
11307 if (using @kbd{G r} in the group buffer) to something
11308 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11309 continue to be stored in the old (now empty) group.
11310
11311 That's the default method of archiving sent messages.  Gnus offers a
11312 different way for the people who don't like the default method.  In that
11313 case you should set @code{gnus-message-archive-group} to @code{nil};
11314 this will disable archiving.
11315
11316 @table @code
11317 @item gnus-outgoing-message-group
11318 @vindex gnus-outgoing-message-group
11319 All outgoing messages will be put in this group.  If you want to store
11320 all your outgoing mail and articles in the group @samp{nnml:archive},
11321 you set this variable to that value.  This variable can also be a list of
11322 group names.
11323
11324 If you want to have greater control over what group to put each
11325 message in, you can set this variable to a function that checks the
11326 current newsgroup name and then returns a suitable group name (or list
11327 of names).
11328
11329 This variable can be used instead of @code{gnus-message-archive-group},
11330 but the latter is the preferred method.
11331
11332 @item gnus-gcc-mark-as-read
11333 @vindex gnus-gcc-mark-as-read
11334 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11335
11336 @item gnus-gcc-externalize-attachments
11337 @vindex gnus-gcc-externalize-attachments
11338 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11339 and matches the Gcc group name, attach files as external parts; if it is
11340 @code{all}, attach local files as external parts; if it is other
11341 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11342 changed in the future.
11343
11344 @end table
11345
11346
11347 @node Posting Styles
11348 @section Posting Styles
11349 @cindex posting styles
11350 @cindex styles
11351
11352 All them variables, they make my head swim.
11353
11354 So what if you want a different @code{Organization} and signature based
11355 on what groups you post to?  And you post both from your home machine
11356 and your work machine, and you want different @code{From} lines, and so
11357 on?
11358
11359 @vindex gnus-posting-styles
11360 One way to do stuff like that is to write clever hooks that change the
11361 variables you need to have changed.  That's a bit boring, so somebody
11362 came up with the bright idea of letting the user specify these things in
11363 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11364 variable:
11365
11366 @lisp
11367 ((".*"
11368   (signature "Peace and happiness")
11369   (organization "What me?"))
11370  ("^comp"
11371   (signature "Death to everybody"))
11372  ("comp.emacs.i-love-it"
11373   (organization "Emacs is it")))
11374 @end lisp
11375
11376 As you might surmise from this example, this alist consists of several
11377 @dfn{styles}.  Each style will be applicable if the first element
11378 ``matches'', in some form or other.  The entire alist will be iterated
11379 over, from the beginning towards the end, and each match will be
11380 applied, which means that attributes in later styles that match override
11381 the same attributes in earlier matching styles.  So
11382 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11383 signature and the @samp{What me?} @code{Organization} header.
11384
11385 The first element in each style is called the @code{match}.  If it's a
11386 string, then Gnus will try to regexp match it against the group name.
11387 If it is the form @code{(header MATCH REGEXP)}, then Gnus will look in
11388 the original article for a header whose name is MATCH and compare that
11389 REGEXP.  MATCH and REGEXP are strings.  (There original article is the
11390 one you are replying or following up to.  If you are not composing a
11391 reply or a followup, then there is nothing to match against.)  If the
11392 @code{match} is a function symbol, that function will be called with no
11393 arguments.  If it's a variable symbol, then the variable will be
11394 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11395 any case, if this returns a non-@code{nil} value, then the style is said
11396 to @dfn{match}.
11397
11398 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11399 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11400 attribute name can be one of @code{signature}, @code{signature-file},
11401 @code{x-face-file}, @code{address} (overriding
11402 @code{user-mail-address}), @code{name} (overriding
11403 @code{(user-full-name)}) or @code{body}.  The attribute name can also
11404 be a string or a symbol.  In that case, this will be used as a header
11405 name, and the value will be inserted in the headers of the article; if
11406 the value is @code{nil}, the header name will be removed.  If the
11407 attribute name is @code{eval}, the form is evaluated, and the result
11408 is thrown away.
11409
11410 The attribute value can be a string (used verbatim), a function with
11411 zero arguments (the return value will be used), a variable (its value
11412 will be used) or a list (it will be @code{eval}ed and the return value
11413 will be used).  The functions and sexps are called/@code{eval}ed in the
11414 message buffer that is being set up.  The headers of the current article
11415 are available through the @code{message-reply-headers} variable, which
11416 is a vector of the following headers: number subject from date id
11417 references chars lines xref extra.
11418
11419 @vindex message-reply-headers
11420
11421 If you wish to check whether the message you are about to compose is
11422 meant to be a news article or a mail message, you can check the values
11423 of the @code{message-news-p} and @code{message-mail-p} functions.
11424
11425 @findex message-mail-p
11426 @findex message-news-p
11427
11428 So here's a new example:
11429
11430 @lisp
11431 (setq gnus-posting-styles
11432       '((".*"
11433          (signature-file "~/.signature")
11434          (name "User Name")
11435          ("X-Home-Page" (getenv "WWW_HOME"))
11436          (organization "People's Front Against MWM"))
11437         ("^rec.humor"
11438          (signature my-funny-signature-randomizer))
11439         ((equal (system-name) "gnarly")  ;; A form
11440          (signature my-quote-randomizer))
11441         (message-news-p        ;; A function symbol
11442          (signature my-news-signature))
11443         (window-system         ;; A value symbol
11444          ("X-Window-System" (format "%s" window-system)))
11445         ;; If I'm replying to Larsi, set the Organization header.
11446         ((header "from" "larsi.*org")
11447          (Organization "Somewhere, Inc."))
11448         ((posting-from-work-p) ;; A user defined function
11449          (signature-file "~/.work-signature")
11450          (address "user@@bar.foo")
11451          (body "You are fired.\n\nSincerely, your boss.")
11452          (organization "Important Work, Inc"))
11453         ("nnml:.*"
11454          (From (save-excursion
11455                  (set-buffer gnus-article-buffer)
11456                  (message-fetch-field "to"))))
11457         ("^nn.+:"
11458          (signature-file "~/.mail-signature"))))
11459 @end lisp
11460
11461 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11462 @code{From} address in all your outgoing replies, which might be handy
11463 if you fill many roles.
11464
11465
11466 @node Drafts
11467 @section Drafts
11468 @cindex drafts
11469
11470 If you are writing a message (mail or news) and suddenly remember that
11471 you have a steak in the oven (or some pesto in the food processor, you
11472 craaazy vegetarians), you'll probably wish there was a method to save
11473 the message you are writing so that you can continue editing it some
11474 other day, and send it when you feel its finished.
11475
11476 Well, don't worry about it.  Whenever you start composing a message of
11477 some sort using the Gnus mail and post commands, the buffer you get will
11478 automatically associate to an article in a special @dfn{draft} group.
11479 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11480 article will be saved there.  (Auto-save files also go to the draft
11481 group.)
11482
11483 @cindex nndraft
11484 @vindex nndraft-directory
11485 The draft group is a special group (which is implemented as an
11486 @code{nndraft} group, if you absolutely have to know) called
11487 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11488 @code{nndraft} is to store its files.  What makes this group special is
11489 that you can't tick any articles in it or mark any articles as
11490 read---all articles in the group are permanently unread.
11491
11492 If the group doesn't exist, it will be created and you'll be subscribed
11493 to it.  The only way to make it disappear from the Group buffer is to
11494 unsubscribe it.
11495
11496 @c @findex gnus-dissociate-buffer-from-draft
11497 @c @kindex C-c M-d (Mail)
11498 @c @kindex C-c M-d (Post)
11499 @c @findex gnus-associate-buffer-with-draft
11500 @c @kindex C-c C-d (Mail)
11501 @c @kindex C-c C-d (Post)
11502 @c If you're writing some super-secret message that you later want to
11503 @c encode with PGP before sending, you may wish to turn the auto-saving
11504 @c (and association with the draft group) off.  You never know who might be
11505 @c interested in reading all your extremely valuable and terribly horrible
11506 @c and interesting secrets.  The @kbd{C-c M-d}
11507 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11508 @c If you change your mind and want to turn the auto-saving back on again,
11509 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11510 @c
11511 @c @vindex gnus-use-draft
11512 @c To leave association with the draft group off by default, set
11513 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11514
11515 @findex gnus-draft-edit-message
11516 @kindex D e (Draft)
11517 When you want to continue editing the article, you simply enter the
11518 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11519 that.  You will be placed in a buffer where you left off.
11520
11521 Rejected articles will also be put in this draft group (@pxref{Rejected
11522 Articles}).
11523
11524 @findex gnus-draft-send-all-messages
11525 @findex gnus-draft-send-message
11526 If you have lots of rejected messages you want to post (or mail) without
11527 doing further editing, you can use the @kbd{D s} command
11528 (@code{gnus-draft-send-message}).  This command understands the
11529 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11530 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11531 in the buffer.
11532
11533 If you have some messages that you wish not to send, you can use the
11534 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11535 as unsendable.  This is a toggling command.
11536
11537
11538 @node Rejected Articles
11539 @section Rejected Articles
11540 @cindex rejected articles
11541
11542 Sometimes a news server will reject an article.  Perhaps the server
11543 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11544 @emph{there be demons}.  Perhaps you have included too much cited text.
11545 Perhaps the disk is full.  Perhaps the server is down.
11546
11547 These situations are, of course, totally beyond the control of Gnus.
11548 (Gnus, of course, loves the way you look, always feels great, has angels
11549 fluttering around inside of it, doesn't care about how much cited text
11550 you include, never runs full and never goes down.)  So Gnus saves these
11551 articles until some later time when the server feels better.
11552
11553 The rejected articles will automatically be put in a special draft group
11554 (@pxref{Drafts}).  When the server comes back up again, you'd then
11555 typically enter that group and send all the articles off.
11556
11557 @node Signing and encrypting
11558 @section Signing and encrypting
11559 @cindex using gpg
11560 @cindex using s/mime
11561 @cindex using smime
11562
11563 Gnus can digitally sign and encrypt your messages, using vanilla PGP
11564 format or @sc{pgp/mime} or @sc{s/mime}.  For decoding such messages,
11565 see the @code{mm-verify-option} and @code{mm-decrypt-option} options
11566 (@pxref{Security}).
11567
11568 Often, you would like to sign replies to people who send you signed
11569 messages.  Even more often, you might want to encrypt messages which
11570 are in reply to encrypted messages.  Gnus offers
11571 @code{gnus-message-replysign} to enable the former, and
11572 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11573 @code{gnus-message-replysignencrypted} (on by default) will sign
11574 automatically encrypted messages.
11575
11576 Instructing MML to perform security operations on a @sc{mime} part is
11577 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11578 C-m c} key map for encryption, as follows.
11579
11580 @table @kbd
11581
11582 @item C-c C-m s s
11583 @kindex C-c C-m s s
11584 @findex mml-secure-message-sign-smime
11585
11586 Digitally sign current message using @sc{s/mime}.
11587
11588 @item C-c C-m s o
11589 @kindex C-c C-m s o
11590 @findex mml-secure-message-sign-pgp
11591
11592 Digitally sign current message using PGP.
11593
11594 @item C-c C-m s p
11595 @kindex C-c C-m s p
11596 @findex mml-secure-message-sign-pgp
11597
11598 Digitally sign current message using @sc{pgp/mime}.
11599
11600 @item C-c C-m c s
11601 @kindex C-c C-m c s
11602 @findex mml-secure-message-encrypt-smime
11603
11604 Digitally encrypt current message using @sc{s/mime}.
11605
11606 @item C-c C-m c o
11607 @kindex C-c C-m c o
11608 @findex mml-secure-message-encrypt-pgp
11609
11610 Digitally encrypt current message using PGP.
11611
11612 @item C-c C-m c p
11613 @kindex C-c C-m c p
11614 @findex mml-secure-message-encrypt-pgpmime
11615
11616 Digitally encrypt current message using @sc{pgp/mime}.
11617
11618 @item C-c C-m C-n
11619 @kindex C-c C-m C-n
11620 @findex mml-unsecure-message
11621 Remove security related MML tags from message.
11622
11623 @end table
11624
11625 @xref{Security, ,Security, message, Message Manual}, for more information.
11626
11627 @node Select Methods
11628 @chapter Select Methods
11629 @cindex foreign groups
11630 @cindex select methods
11631
11632 A @dfn{foreign group} is a group not read by the usual (or
11633 default) means.  It could be, for instance, a group from a different
11634 @sc{nntp} server, it could be a virtual group, or it could be your own
11635 personal mail group.
11636
11637 A foreign group (or any group, really) is specified by a @dfn{name} and
11638 a @dfn{select method}.  To take the latter first, a select method is a
11639 list where the first element says what back end to use (e.g. @code{nntp},
11640 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11641 name}.  There may be additional elements in the select method, where the
11642 value may have special meaning for the back end in question.
11643
11644 One could say that a select method defines a @dfn{virtual server}---so
11645 we do just that (@pxref{Server Buffer}).
11646
11647 The @dfn{name} of the group is the name the back end will recognize the
11648 group as.
11649
11650 For instance, the group @samp{soc.motss} on the @sc{nntp} server
11651 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11652 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11653 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11654 back end just knows this group as @samp{soc.motss}.
11655
11656 The different methods all have their peculiarities, of course.
11657
11658 @menu
11659 * Server Buffer::               Making and editing virtual servers.
11660 * Getting News::                Reading USENET news with Gnus.
11661 * Getting Mail::                Reading your personal mail with Gnus.
11662 * Browsing the Web::            Getting messages from a plethora of Web sources.
11663 * IMAP::                        Using Gnus as a @sc{imap} client.
11664 * Other Sources::               Reading directories, files, SOUP packets.
11665 * Combined Groups::             Combining groups into one group.
11666 * Gnus Unplugged::              Reading news and mail offline.
11667 @end menu
11668
11669
11670 @node Server Buffer
11671 @section Server Buffer
11672
11673 Traditionally, a @dfn{server} is a machine or a piece of software that
11674 one connects to, and then requests information from.  Gnus does not
11675 connect directly to any real servers, but does all transactions through
11676 one back end or other.  But that's just putting one layer more between
11677 the actual media and Gnus, so we might just as well say that each
11678 back end represents a virtual server.
11679
11680 For instance, the @code{nntp} back end may be used to connect to several
11681 different actual @sc{nntp} servers, or, perhaps, to many different ports
11682 on the same actual @sc{nntp} server.  You tell Gnus which back end to
11683 use, and what parameters to set by specifying a @dfn{select method}.
11684
11685 These select method specifications can sometimes become quite
11686 complicated---say, for instance, that you want to read from the
11687 @sc{nntp} server @samp{news.funet.fi} on port number 13, which
11688 hangs if queried for @sc{nov} headers and has a buggy select.  Ahem.
11689 Anyway, if you had to specify that for each group that used this
11690 server, that would be too much work, so Gnus offers a way of naming
11691 select methods, which is what you do in the server buffer.
11692
11693 To enter the server buffer, use the @kbd{^}
11694 (@code{gnus-group-enter-server-mode}) command in the group buffer.
11695
11696 @menu
11697 * Server Buffer Format::        You can customize the look of this buffer.
11698 * Server Commands::             Commands to manipulate servers.
11699 * Example Methods::             Examples server specifications.
11700 * Creating a Virtual Server::   An example session.
11701 * Server Variables::            Which variables to set.
11702 * Servers and Methods::         You can use server names as select methods.
11703 * Unavailable Servers::         Some servers you try to contact may be down.
11704 @end menu
11705
11706 @vindex gnus-server-mode-hook
11707 @code{gnus-server-mode-hook} is run when creating the server buffer.
11708
11709
11710 @node Server Buffer Format
11711 @subsection Server Buffer Format
11712 @cindex server buffer format
11713
11714 @vindex gnus-server-line-format
11715 You can change the look of the server buffer lines by changing the
11716 @code{gnus-server-line-format} variable.  This is a @code{format}-like
11717 variable, with some simple extensions:
11718
11719 @table @samp
11720
11721 @item h
11722 How the news is fetched---the back end name.
11723
11724 @item n
11725 The name of this server.
11726
11727 @item w
11728 Where the news is to be fetched from---the address.
11729
11730 @item s
11731 The opened/closed/denied status of the server.
11732 @end table
11733
11734 @vindex gnus-server-mode-line-format
11735 The mode line can also be customized by using the
11736 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
11737 Formatting}).  The following specs are understood:
11738
11739 @table @samp
11740 @item S
11741 Server name.
11742
11743 @item M
11744 Server method.
11745 @end table
11746
11747 Also @pxref{Formatting Variables}.
11748
11749
11750 @node Server Commands
11751 @subsection Server Commands
11752 @cindex server commands
11753
11754 @table @kbd
11755
11756 @item a
11757 @kindex a (Server)
11758 @findex gnus-server-add-server
11759 Add a new server (@code{gnus-server-add-server}).
11760
11761 @item e
11762 @kindex e (Server)
11763 @findex gnus-server-edit-server
11764 Edit a server (@code{gnus-server-edit-server}).
11765
11766 @item SPACE
11767 @kindex SPACE (Server)
11768 @findex gnus-server-read-server
11769 Browse the current server (@code{gnus-server-read-server}).
11770
11771 @item q
11772 @kindex q (Server)
11773 @findex gnus-server-exit
11774 Return to the group buffer (@code{gnus-server-exit}).
11775
11776 @item k
11777 @kindex k (Server)
11778 @findex gnus-server-kill-server
11779 Kill the current server (@code{gnus-server-kill-server}).
11780
11781 @item y
11782 @kindex y (Server)
11783 @findex gnus-server-yank-server
11784 Yank the previously killed server (@code{gnus-server-yank-server}).
11785
11786 @item c
11787 @kindex c (Server)
11788 @findex gnus-server-copy-server
11789 Copy the current server (@code{gnus-server-copy-server}).
11790
11791 @item l
11792 @kindex l (Server)
11793 @findex gnus-server-list-servers
11794 List all servers (@code{gnus-server-list-servers}).
11795
11796 @item s
11797 @kindex s (Server)
11798 @findex gnus-server-scan-server
11799 Request that the server scan its sources for new articles
11800 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
11801 servers.
11802
11803 @item g
11804 @kindex g (Server)
11805 @findex gnus-server-regenerate-server
11806 Request that the server regenerate all its data structures
11807 (@code{gnus-server-regenerate-server}).  This can be useful if you have
11808 a mail back end that has gotten out of sync.
11809
11810 @end table
11811
11812
11813 @node Example Methods
11814 @subsection Example Methods
11815
11816 Most select methods are pretty simple and self-explanatory:
11817
11818 @lisp
11819 (nntp "news.funet.fi")
11820 @end lisp
11821
11822 Reading directly from the spool is even simpler:
11823
11824 @lisp
11825 (nnspool "")
11826 @end lisp
11827
11828 As you can see, the first element in a select method is the name of the
11829 back end, and the second is the @dfn{address}, or @dfn{name}, if you
11830 will.
11831
11832 After these two elements, there may be an arbitrary number of
11833 @code{(@var{variable} @var{form})} pairs.
11834
11835 To go back to the first example---imagine that you want to read from
11836 port 15 on that machine.  This is what the select method should
11837 look like then:
11838
11839 @lisp
11840 (nntp "news.funet.fi" (nntp-port-number 15))
11841 @end lisp
11842
11843 You should read the documentation to each back end to find out what
11844 variables are relevant, but here's an @code{nnmh} example:
11845
11846 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
11847 you have two structures that you wish to access: One is your private
11848 mail spool, and the other is a public one.  Here's the possible spec for
11849 your private mail:
11850
11851 @lisp
11852 (nnmh "private" (nnmh-directory "~/private/mail/"))
11853 @end lisp
11854
11855 (This server is then called @samp{private}, but you may have guessed
11856 that.)
11857
11858 Here's the method for a public spool:
11859
11860 @lisp
11861 (nnmh "public"
11862       (nnmh-directory "/usr/information/spool/")
11863       (nnmh-get-new-mail nil))
11864 @end lisp
11865
11866 @cindex proxy
11867 @cindex firewall
11868
11869 If you are behind a firewall and only have access to the @sc{nntp}
11870 server from the firewall machine, you can instruct Gnus to @code{rlogin}
11871 on the firewall machine and telnet from there to the @sc{nntp} server.
11872 Doing this can be rather fiddly, but your virtual server definition
11873 should probably look something like this:
11874
11875 @lisp
11876 (nntp "firewall"
11877       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
11878       (nntp-via-address "the.firewall.machine")
11879       (nntp-address "the.real.nntp.host")
11880       (nntp-end-of-line "\n"))
11881 @end lisp
11882
11883 If you want to use the wonderful @code{ssh} program to provide a
11884 compressed connection over the modem line, you could add the following
11885 configuration to the example above:
11886
11887 @lisp
11888       (nntp-via-rlogin-command "ssh")
11889 @end lisp
11890
11891 See also @code{nntp-via-rlogin-command-switches}.
11892
11893 If you're behind a firewall, but have direct access to the outside world
11894 through a wrapper command like "runsocks", you could open a socksified
11895 telnet connection to the news server as follows:
11896
11897 @lisp
11898 (nntp "outside"
11899       (nntp-pre-command "runsocks")
11900       (nntp-open-connection-function nntp-open-via-telnet)
11901       (nntp-address "the.news.server")
11902       (nntp-end-of-line "\n"))
11903 @end lisp
11904
11905 This means that you have to have set up @code{ssh-agent} correctly to
11906 provide automatic authorization, of course.  And to get a compressed
11907 connection, you have to have the @samp{Compression} option in the
11908 @code{ssh} @file{config} file.
11909
11910
11911 @node Creating a Virtual Server
11912 @subsection Creating a Virtual Server
11913
11914 If you're saving lots of articles in the cache by using persistent
11915 articles, you may want to create a virtual server to read the cache.
11916
11917 First you need to add a new server.  The @kbd{a} command does that.  It
11918 would probably be best to use @code{nnspool} to read the cache.  You
11919 could also use @code{nnml} or @code{nnmh}, though.
11920
11921 Type @kbd{a nnspool RET cache RET}.
11922
11923 You should now have a brand new @code{nnspool} virtual server called
11924 @samp{cache}.  You now need to edit it to have the right definitions.
11925 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
11926 will contain the following:
11927
11928 @lisp
11929 (nnspool "cache")
11930 @end lisp
11931
11932 Change that to:
11933
11934 @lisp
11935 (nnspool "cache"
11936          (nnspool-spool-directory "~/News/cache/")
11937          (nnspool-nov-directory "~/News/cache/")
11938          (nnspool-active-file "~/News/cache/active"))
11939 @end lisp
11940
11941 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
11942 @kbd{RET} over this virtual server, you should be entered into a browse
11943 buffer, and you should be able to enter any of the groups displayed.
11944
11945
11946 @node Server Variables
11947 @subsection Server Variables
11948
11949 One sticky point when defining variables (both on back ends and in Emacs
11950 in general) is that some variables are typically initialized from other
11951 variables when the definition of the variables is being loaded.  If you
11952 change the "base" variable after the variables have been loaded, you
11953 won't change the "derived" variables.
11954
11955 This typically affects directory and file variables.  For instance,
11956 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
11957 directory variables are initialized from that variable, so
11958 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
11959 new virtual @code{nnml} server, it will @emph{not} suffice to set just
11960 @code{nnml-directory}---you have to explicitly set all the file
11961 variables to be what you want them to be.  For a complete list of
11962 variables for each back end, see each back end's section later in this
11963 manual, but here's an example @code{nnml} definition:
11964
11965 @lisp
11966 (nnml "public"
11967       (nnml-directory "~/my-mail/")
11968       (nnml-active-file "~/my-mail/active")
11969       (nnml-newsgroups-file "~/my-mail/newsgroups"))
11970 @end lisp
11971
11972
11973 @node Servers and Methods
11974 @subsection Servers and Methods
11975
11976 Wherever you would normally use a select method
11977 (e.g. @code{gnus-secondary-select-method}, in the group select method,
11978 when browsing a foreign server) you can use a virtual server name
11979 instead.  This could potentially save lots of typing.  And it's nice all
11980 over.
11981
11982
11983 @node Unavailable Servers
11984 @subsection Unavailable Servers
11985
11986 If a server seems to be unreachable, Gnus will mark that server as
11987 @code{denied}.  That means that any subsequent attempt to make contact
11988 with that server will just be ignored.  ``It can't be opened,'' Gnus
11989 will tell you, without making the least effort to see whether that is
11990 actually the case or not.
11991
11992 That might seem quite naughty, but it does make sense most of the time.
11993 Let's say you have 10 groups subscribed to on server
11994 @samp{nephelococcygia.com}.  This server is located somewhere quite far
11995 away from you and the machine is quite slow, so it takes 1 minute just
11996 to find out that it refuses connection to you today.  If Gnus were to
11997 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
11998 attempt to do that.  Once it has gotten a single ``connection refused'',
11999 it will regard that server as ``down''.
12000
12001 So, what happens if the machine was only feeling unwell temporarily?
12002 How do you test to see whether the machine has come up again?
12003
12004 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12005 with the following commands:
12006
12007 @table @kbd
12008
12009 @item O
12010 @kindex O (Server)
12011 @findex gnus-server-open-server
12012 Try to establish connection to the server on the current line
12013 (@code{gnus-server-open-server}).
12014
12015 @item C
12016 @kindex C (Server)
12017 @findex gnus-server-close-server
12018 Close the connection (if any) to the server
12019 (@code{gnus-server-close-server}).
12020
12021 @item D
12022 @kindex D (Server)
12023 @findex gnus-server-deny-server
12024 Mark the current server as unreachable
12025 (@code{gnus-server-deny-server}).
12026
12027 @item M-o
12028 @kindex M-o (Server)
12029 @findex gnus-server-open-all-servers
12030 Open the connections to all servers in the buffer
12031 (@code{gnus-server-open-all-servers}).
12032
12033 @item M-c
12034 @kindex M-c (Server)
12035 @findex gnus-server-close-all-servers
12036 Close the connections to all servers in the buffer
12037 (@code{gnus-server-close-all-servers}).
12038
12039 @item R
12040 @kindex R (Server)
12041 @findex gnus-server-remove-denials
12042 Remove all marks to whether Gnus was denied connection from any servers
12043 (@code{gnus-server-remove-denials}).
12044
12045 @item L
12046 @kindex L (Server)
12047 @findex gnus-server-offline-server
12048 Set server status to offline (@code{gnus-server-offline-server}).
12049
12050 @end table
12051
12052
12053 @node Getting News
12054 @section Getting News
12055 @cindex reading news
12056 @cindex news back ends
12057
12058 A newsreader is normally used for reading news.  Gnus currently provides
12059 only two methods of getting news---it can read from an @sc{nntp} server,
12060 or it can read from a local spool.
12061
12062 @menu
12063 * NNTP::                        Reading news from an @sc{nntp} server.
12064 * News Spool::                  Reading news from the local spool.
12065 @end menu
12066
12067
12068 @node NNTP
12069 @subsection NNTP
12070 @cindex nntp
12071
12072 Subscribing to a foreign group from an @sc{nntp} server is rather easy.
12073 You just specify @code{nntp} as method and the address of the @sc{nntp}
12074 server as the, uhm, address.
12075
12076 If the @sc{nntp} server is located at a non-standard port, setting the
12077 third element of the select method to this port number should allow you
12078 to connect to the right port.  You'll have to edit the group info for
12079 that (@pxref{Foreign Groups}).
12080
12081 The name of the foreign group can be the same as a native group.  In
12082 fact, you can subscribe to the same group from as many different servers
12083 you feel like.  There will be no name collisions.
12084
12085 The following variables can be used to create a virtual @code{nntp}
12086 server:
12087
12088 @table @code
12089
12090 @item nntp-server-opened-hook
12091 @vindex nntp-server-opened-hook
12092 @cindex @sc{mode reader}
12093 @cindex authinfo
12094 @cindex authentification
12095 @cindex nntp authentification
12096 @findex nntp-send-authinfo
12097 @findex nntp-send-mode-reader
12098 is run after a connection has been made.  It can be used to send
12099 commands to the @sc{nntp} server after it has been contacted.  By
12100 default it sends the command @code{MODE READER} to the server with the
12101 @code{nntp-send-mode-reader} function.  This function should always be
12102 present in this hook.
12103
12104 @item nntp-authinfo-function
12105 @vindex nntp-authinfo-function
12106 @findex nntp-send-authinfo
12107 @vindex nntp-authinfo-file
12108 This function will be used to send @samp{AUTHINFO} to the @sc{nntp}
12109 server.  The default function is @code{nntp-send-authinfo}, which looks
12110 through your @file{~/.authinfo} (or whatever you've set the
12111 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12112 are found, it will prompt you for a login name and a password.  The
12113 format of the @file{~/.authinfo} file is (almost) the same as the
12114 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12115 manual page, but here are the salient facts:
12116
12117 @enumerate
12118 @item
12119 The file contains one or more line, each of which define one server.
12120
12121 @item
12122 Each line may contain an arbitrary number of token/value pairs.
12123
12124 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12125 @samp{default}.  In addition Gnus introduces two new tokens, not present
12126 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12127 @samp{force}.  (This is the only way the @file{.authinfo} file format
12128 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12129 indicate what port on the server the credentials apply to and
12130 @samp{force} is explained below.
12131
12132 @end enumerate
12133
12134 Here's an example file:
12135
12136 @example
12137 machine news.uio.no login larsi password geheimnis
12138 machine nntp.ifi.uio.no login larsi force yes
12139 @end example
12140
12141 The token/value pairs may appear in any order; @samp{machine} doesn't
12142 have to be first, for instance.
12143
12144 In this example, both login name and password have been supplied for the
12145 former server, while the latter has only the login name listed, and the
12146 user will be prompted for the password.  The latter also has the
12147 @samp{force} tag, which means that the authinfo will be sent to the
12148 @var{nntp} server upon connection; the default (i.e., when there is not
12149 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12150 until the @var{nntp} server asks for it.
12151
12152 You can also add @samp{default} lines that will apply to all servers
12153 that don't have matching @samp{machine} lines.
12154
12155 @example
12156 default force yes
12157 @end example
12158
12159 This will force sending @samp{AUTHINFO} commands to all servers not
12160 previously mentioned.
12161
12162 Remember to not leave the @file{~/.authinfo} file world-readable.
12163
12164 @item nntp-server-action-alist
12165 @vindex nntp-server-action-alist
12166 This is a list of regexps to match on server types and actions to be
12167 taken when matches are made.  For instance, if you want Gnus to beep
12168 every time you connect to innd, you could say something like:
12169
12170 @lisp
12171 (setq nntp-server-action-alist
12172       '(("innd" (ding))))
12173 @end lisp
12174
12175 You probably don't want to do that, though.
12176
12177 The default value is
12178
12179 @lisp
12180 '(("nntpd 1\\.5\\.11t"
12181    (remove-hook 'nntp-server-opened-hook
12182                 'nntp-send-mode-reader)))
12183 @end lisp
12184
12185 This ensures that Gnus doesn't send the @code{MODE READER} command to
12186 nntpd 1.5.11t, since that command chokes that server, I've been told.
12187
12188 @item nntp-maximum-request
12189 @vindex nntp-maximum-request
12190 If the @sc{nntp} server doesn't support @sc{nov} headers, this back end
12191 will collect headers by sending a series of @code{head} commands.  To
12192 speed things up, the back end sends lots of these commands without
12193 waiting for reply, and then reads all the replies.  This is controlled
12194 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12195 your network is buggy, you should set this to 1.
12196
12197 @item nntp-connection-timeout
12198 @vindex nntp-connection-timeout
12199 If you have lots of foreign @code{nntp} groups that you connect to
12200 regularly, you're sure to have problems with @sc{nntp} servers not
12201 responding properly, or being too loaded to reply within reasonable
12202 time.  This is can lead to awkward problems, which can be helped
12203 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12204 that says how many seconds the @code{nntp} back end should wait for a
12205 connection before giving up.  If it is @code{nil}, which is the default,
12206 no timeouts are done.
12207
12208 @c @item nntp-command-timeout
12209 @c @vindex nntp-command-timeout
12210 @c @cindex PPP connections
12211 @c @cindex dynamic IP addresses
12212 @c If you're running Gnus on a machine that has a dynamically assigned
12213 @c address, Gnus may become confused.  If the address of your machine
12214 @c changes after connecting to the @sc{nntp} server, Gnus will simply sit
12215 @c waiting forever for replies from the server.  To help with this
12216 @c unfortunate problem, you can set this command to a number.  Gnus will
12217 @c then, if it sits waiting for a reply from the server longer than that
12218 @c number of seconds, shut down the connection, start a new one, and resend
12219 @c the command.  This should hopefully be transparent to the user.  A
12220 @c likely number is 30 seconds.
12221 @c
12222 @c @item nntp-retry-on-break
12223 @c @vindex nntp-retry-on-break
12224 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12225 @c hangs.  This will have much the same effect as the command timeout
12226 @c described above.
12227
12228 @item nntp-server-hook
12229 @vindex nntp-server-hook
12230 This hook is run as the last step when connecting to an @sc{nntp}
12231 server.
12232
12233 @item nntp-buggy-select
12234 @vindex nntp-buggy-select
12235 Set this to non-@code{nil} if your select routine is buggy.
12236
12237 @item nntp-nov-is-evil
12238 @vindex nntp-nov-is-evil
12239 If the @sc{nntp} server does not support @sc{nov}, you could set this
12240 variable to @code{t}, but @code{nntp} usually checks automatically whether @sc{nov}
12241 can be used.
12242
12243 @item nntp-xover-commands
12244 @vindex nntp-xover-commands
12245 @cindex nov
12246 @cindex XOVER
12247 List of strings used as commands to fetch @sc{nov} lines from a
12248 server.  The default value of this variable is @code{("XOVER"
12249 "XOVERVIEW")}.
12250
12251 @item nntp-nov-gap
12252 @vindex nntp-nov-gap
12253 @code{nntp} normally sends just one big request for @sc{nov} lines to
12254 the server.  The server responds with one huge list of lines.  However,
12255 if you have read articles 2-5000 in the group, and only want to read
12256 article 1 and 5001, that means that @code{nntp} will fetch 4999 @sc{nov}
12257 lines that you will not need.  This variable says how
12258 big a gap between two consecutive articles is allowed to be before the
12259 @code{XOVER} request is split into several request.  Note that if your
12260 network is fast, setting this variable to a really small number means
12261 that fetching will probably be slower.  If this variable is @code{nil},
12262 @code{nntp} will never split requests.  The default is 5.
12263
12264 @item nntp-prepare-server-hook
12265 @vindex nntp-prepare-server-hook
12266 A hook run before attempting to connect to an @sc{nntp} server.
12267
12268 @item nntp-warn-about-losing-connection
12269 @vindex nntp-warn-about-losing-connection
12270 If this variable is non-@code{nil}, some noise will be made when a
12271 server closes connection.
12272
12273 @item nntp-record-commands
12274 @vindex nntp-record-commands
12275 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12276 @sc{nntp} server (along with a timestamp) in the @samp{*nntp-log*}
12277 buffer.  This is useful if you are debugging a Gnus/@sc{nntp} connection
12278 that doesn't seem to work.
12279
12280 @item nntp-open-connection-function
12281 @vindex nntp-open-connection-function
12282 It is possible to customize how the connection to the nntp server will
12283 be opened.  If you specify an @code{nntp-open-connection-function}
12284 parameter, Gnus will use that function to establish the connection.
12285 Five pre-made functions are supplied.  These functions can be grouped in
12286 two categories: direct connection functions (three pre-made), and
12287 indirect ones (two pre-made).
12288
12289 @item nntp-prepare-post-hook
12290 @vindex nntp-prepare-post-hook
12291 A hook run just before posting an article.  If there is no
12292 @code{Message-ID} header in the article and the news server provides the
12293 recommended ID, it will be added to the article before running this
12294 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12295 inhibit Gnus to add a @code{Message-ID} header, you could say:
12296
12297 @lisp
12298 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12299 @end lisp
12300
12301 Note that not all servers support the recommended ID.  This works for
12302 INN versions 2.3.0 and later, for instance.
12303 @end table
12304
12305 @menu
12306 * Direct Functions::            Connecting directly to the server.
12307 * Indirect Functions::          Connecting indirectly to the server.
12308 * Common Variables::            Understood by several connection functions.
12309 @end menu
12310
12311
12312 @node Direct Functions
12313 @subsubsection Direct Functions
12314 @cindex direct connection functions
12315
12316 These functions are called direct because they open a direct connection
12317 between your machine and the @sc{nntp} server.  The behavior of these
12318 functions is also affected by commonly understood variables
12319 (@pxref{Common Variables}).
12320
12321 @table @code
12322 @findex nntp-open-network-stream
12323 @item nntp-open-network-stream
12324 This is the default, and simply connects to some port or other on the
12325 remote system.
12326
12327 @findex nntp-open-ssl-stream
12328 @item nntp-open-ssl-stream
12329 Opens a connection to a server over a @dfn{secure} channel.  To use
12330 this you must have OpenSSL (@uref{http://www.openssl.org}) or SSLeay
12331 installed (@uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL}, and you also
12332 need @file{ssl.el} (from the W3 distribution, for instance).  You then
12333 define a server as follows:
12334
12335 @lisp
12336 ;; Type `C-c C-c' after you've finished editing.
12337 ;;
12338 ;; "snews" is port 563 and is predefined in our /etc/services
12339 ;; however, openssl s_client -port doesn't like named ports
12340 ;;
12341 (nntp "snews.bar.com"
12342       (nntp-open-connection-function nntp-open-ssl-stream)
12343       (nntp-port-number 563)
12344       (nntp-address "snews.bar.com"))
12345 @end lisp
12346
12347 @findex nntp-open-telnet-stream
12348 @item nntp-open-telnet-stream
12349 Opens a connection to an @sc{nntp} server by simply @samp{telnet}'ing
12350 it.  You might wonder why this function exists, since we have the
12351 default @code{nntp-open-network-stream} which would do the job.  (One
12352 of) the reason(s) is that if you are behind a firewall but have direct
12353 connections to the outside world thanks to a command wrapper like
12354 @code{runsocks}, you can use it like this:
12355
12356 @lisp
12357 (nntp "socksified"
12358       (nntp-pre-command "runsocks")
12359       (nntp-open-connection-function nntp-open-telnet-stream)
12360       (nntp-address "the.news.server"))
12361 @end lisp
12362
12363 With the default method, you would need to wrap your whole Emacs
12364 session, which is not a good idea.
12365 @end table
12366
12367
12368 @node Indirect Functions
12369 @subsubsection Indirect Functions
12370 @cindex indirect connection functions
12371
12372 These functions are called indirect because they connect to an
12373 intermediate host before actually connecting to the @sc{nntp} server.
12374 All of these functions and related variables are also said to belong to
12375 the "via" family of connection: they're all prefixed with "via" to make
12376 things cleaner.  The behavior of these functions is also affected by
12377 commonly understood variables (@pxref{Common Variables}).
12378
12379 @table @code
12380 @item nntp-open-via-rlogin-and-telnet
12381 @findex nntp-open-via-rlogin-and-telnet
12382 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12383 to the real @sc{nntp} server from there.  This is useful for instance if
12384 you need to connect to a firewall machine first.
12385
12386 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12387
12388 @table @code
12389 @item nntp-via-rlogin-command
12390 @vindex nntp-via-rlogin-command
12391 Command used to log in on the intermediate host.  The default is
12392 @samp{rsh}, but @samp{ssh} is a popular alternative.
12393
12394 @item nntp-via-rlogin-command-switches
12395 @vindex nntp-via-rlogin-command-switches
12396 List of strings to be used as the switches to
12397 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12398 @samp{ssh} for `nntp-via-rlogin-command', you may set this to
12399 @samp{("-C")} in order to compress all data connections, otherwise set
12400 this to @samp{("-t")} or @samp{("-C" "-t")} if the telnet command
12401 requires a pseudo-tty allocation on an intermediate host.
12402 @end table
12403
12404 @item nntp-open-via-telnet-and-telnet
12405 @findex nntp-open-via-telnet-and-telnet
12406 Does essentially the same, but uses @samp{telnet} instead of
12407 @samp{rlogin} to connect to the intermediate host.
12408
12409 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12410
12411 @table @code
12412 @item nntp-via-telnet-command
12413 @vindex nntp-via-telnet-command
12414 Command used to @code{telnet} the intermediate host.  The default is
12415 @samp{telnet}.
12416
12417 @item nntp-via-telnet-switches
12418 @vindex nntp-via-telnet-switches
12419 List of strings to be used as the switches to the
12420 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12421
12422 @item nntp-via-user-password
12423 @vindex nntp-via-user-password
12424 Password to use when logging in on the intermediate host.
12425
12426 @item nntp-via-envuser
12427 @vindex nntp-via-envuser
12428 If non-@code{nil}, the intermediate @code{telnet} session (client and
12429 server both) will support the @code{ENVIRON} option and not prompt for
12430 login name. This works for Solaris @code{telnet}, for instance.
12431
12432 @item nntp-via-shell-prompt
12433 @vindex nntp-via-shell-prompt
12434 Regexp matching the shell prompt on the intermediate host.  The default
12435 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12436
12437 @end table
12438
12439 @end table
12440
12441
12442 Here are some additional variables that are understood by all the above
12443 functions:
12444
12445 @table @code
12446
12447 @item nntp-via-user-name
12448 @vindex nntp-via-user-name
12449 User name to use when connecting to the intermediate host.
12450
12451 @item nntp-via-address
12452 @vindex nntp-via-address
12453 Address of the intermediate host to connect to.
12454
12455 @end table
12456
12457
12458 @node Common Variables
12459 @subsubsection Common Variables
12460
12461 The following variables affect the behavior of all, or several of the
12462 pre-made connection functions. When not specified, all functions are
12463 affected.
12464
12465 @table @code
12466
12467 @item nntp-pre-command
12468 @vindex nntp-pre-command
12469 A command wrapper to use when connecting through a non native connection
12470 function (all except @code{nntp-open-network-stream} and
12471 @code{nntp-open-ssl-stream}.  This is where you would put a @samp{SOCKS}
12472 wrapper for instance.
12473
12474 @item nntp-address
12475 @vindex nntp-address
12476 The address of the @sc{nntp} server.
12477
12478 @item nntp-port-number
12479 @vindex nntp-port-number
12480 Port number to connect to the @sc{nntp} server.  The default is @samp{nntp}.
12481 If you use @sc{nntp} over @sc{ssl}, you may want to use integer ports rather
12482 than named ports (i.e, use @samp{563} instead of @samp{snews}), because
12483 external SSL tools may not work with named ports.
12484
12485 @item nntp-end-of-line
12486 @vindex nntp-end-of-line
12487 String to use as end-of-line marker when talking to the @sc{nntp}
12488 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12489 using a non native connection function.
12490
12491 @item nntp-telnet-command
12492 @vindex nntp-telnet-command
12493 Command to use when connecting to the @sc{nntp} server through
12494 @samp{telnet}.  This is NOT for an intermediate host.  This is just for
12495 the real @sc{nntp} server.  The default is @samp{telnet}.
12496
12497 @item nntp-telnet-switches
12498 @vindex nntp-telnet-switches
12499 A list of switches to pass to @code{nntp-telnet-command}.  The default
12500 is @samp{("-8")}.
12501
12502 @end table
12503
12504
12505 @node News Spool
12506 @subsection News Spool
12507 @cindex nnspool
12508 @cindex news spool
12509
12510 Subscribing to a foreign group from the local spool is extremely easy,
12511 and might be useful, for instance, to speed up reading groups that
12512 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12513 instance.
12514
12515 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12516 anything else) as the address.
12517
12518 If you have access to a local spool, you should probably use that as the
12519 native select method (@pxref{Finding the News}).  It is normally faster
12520 than using an @code{nntp} select method, but might not be.  It depends.
12521 You just have to try to find out what's best at your site.
12522
12523 @table @code
12524
12525 @item nnspool-inews-program
12526 @vindex nnspool-inews-program
12527 Program used to post an article.
12528
12529 @item nnspool-inews-switches
12530 @vindex nnspool-inews-switches
12531 Parameters given to the inews program when posting an article.
12532
12533 @item nnspool-spool-directory
12534 @vindex nnspool-spool-directory
12535 Where @code{nnspool} looks for the articles.  This is normally
12536 @file{/usr/spool/news/}.
12537
12538 @item nnspool-nov-directory
12539 @vindex nnspool-nov-directory
12540 Where @code{nnspool} will look for @sc{nov} files.  This is normally
12541 @file{/usr/spool/news/over.view/}.
12542
12543 @item nnspool-lib-dir
12544 @vindex nnspool-lib-dir
12545 Where the news lib dir is (@file{/usr/lib/news/} by default).
12546
12547 @item nnspool-active-file
12548 @vindex nnspool-active-file
12549 The name of the active file.
12550
12551 @item nnspool-newsgroups-file
12552 @vindex nnspool-newsgroups-file
12553 The name of the group descriptions file.
12554
12555 @item nnspool-history-file
12556 @vindex nnspool-history-file
12557 The name of the news history file.
12558
12559 @item nnspool-active-times-file
12560 @vindex nnspool-active-times-file
12561 The name of the active date file.
12562
12563 @item nnspool-nov-is-evil
12564 @vindex nnspool-nov-is-evil
12565 If non-@code{nil}, @code{nnspool} won't try to use any @sc{nov} files
12566 that it finds.
12567
12568 @item nnspool-sift-nov-with-sed
12569 @vindex nnspool-sift-nov-with-sed
12570 @cindex sed
12571 If non-@code{nil}, which is the default, use @code{sed} to get the
12572 relevant portion from the overview file.  If nil, @code{nnspool} will
12573 load the entire file into a buffer and process it there.
12574
12575 @end table
12576
12577
12578 @node Getting Mail
12579 @section Getting Mail
12580 @cindex reading mail
12581 @cindex mail
12582
12583 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12584 course.
12585
12586 @menu
12587 * Mail in a Newsreader::        Important introductory notes.
12588 * Getting Started Reading Mail::  A simple cookbook example.
12589 * Splitting Mail::              How to create mail groups.
12590 * Mail Sources::                How to tell Gnus where to get mail from.
12591 * Mail Back End Variables::     Variables for customizing mail handling.
12592 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12593 * Group Mail Splitting::        Use group customize to drive mail splitting.
12594 * Incorporating Old Mail::      What about the old mail you have?
12595 * Expiring Mail::               Getting rid of unwanted mail.
12596 * Washing Mail::                Removing gruft from the mail you get.
12597 * Duplicates::                  Dealing with duplicated mail.
12598 * Not Reading Mail::            Using mail back ends for reading other files.
12599 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12600 @end menu
12601
12602
12603 @node Mail in a Newsreader
12604 @subsection Mail in a Newsreader
12605
12606 If you are used to traditional mail readers, but have decided to switch
12607 to reading mail with Gnus, you may find yourself experiencing something
12608 of a culture shock.
12609
12610 Gnus does not behave like traditional mail readers.  If you want to make
12611 it behave that way, you can, but it's an uphill battle.
12612
12613 Gnus, by default, handles all its groups using the same approach.  This
12614 approach is very newsreaderly---you enter a group, see the new/unread
12615 messages, and when you read the messages, they get marked as read, and
12616 you don't see them any more.  (Unless you explicitly ask for them.)
12617
12618 In particular, you do not do anything explicitly to delete messages.
12619
12620 Does this mean that all the messages that have been marked as read are
12621 deleted?  How awful!
12622
12623 But, no, it means that old messages are @dfn{expired} according to some
12624 scheme or other.  For news messages, the expire process is controlled by
12625 the news administrator; for mail, the expire process is controlled by
12626 you.  The expire process for mail is covered in depth in @pxref{Expiring
12627 Mail}.
12628
12629 What many Gnus users find, after using it a while for both news and
12630 mail, is that the transport mechanism has very little to do with how
12631 they want to treat a message.
12632
12633 Many people subscribe to several mailing lists.  These are transported
12634 via @sc{smtp}, and are therefore mail.  But we might go for weeks without
12635 answering, or even reading these messages very carefully.  We may not
12636 need to save them because if we should need to read one again, they are
12637 archived somewhere else.
12638
12639 Some people have local news groups which have only a handful of readers.
12640 These are transported via @sc{nntp}, and are therefore news.  But we may need
12641 to read and answer a large fraction of the messages very carefully in
12642 order to do our work.  And there may not be an archive, so we may need
12643 to save the interesting messages the same way we would personal mail.
12644
12645 The important distinction turns out to be not the transport mechanism,
12646 but other factors such as how interested we are in the subject matter,
12647 or how easy it is to retrieve the message if we need to read it again.
12648
12649 Gnus provides many options for sorting mail into ``groups'' which behave
12650 like newsgroups, and for treating each group (whether mail or news)
12651 differently.
12652
12653 Some users never get comfortable using the Gnus (ahem) paradigm and wish
12654 that Gnus should grow up and be a male, er, mail reader.  It is possible
12655 to whip Gnus into a more mailreaderly being, but, as said before, it's
12656 not easy.  People who prefer proper mail readers should try @sc{vm}
12657 instead, which is an excellent, and proper, mail reader.
12658
12659 I don't mean to scare anybody off, but I want to make it clear that you
12660 may be required to learn a new way of thinking about messages.  After
12661 you've been subjected to The Gnus Way, you will come to love it.  I can
12662 guarantee it.  (At least the guy who sold me the Emacs Subliminal
12663 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
12664 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
12665 You Do.)
12666
12667
12668 @node Getting Started Reading Mail
12669 @subsection Getting Started Reading Mail
12670
12671 It's quite easy to use Gnus to read your new mail.  You just plonk the
12672 mail back end of your choice into @code{gnus-secondary-select-methods},
12673 and things will happen automatically.
12674
12675 For instance, if you want to use @code{nnml} (which is a "one file per
12676 mail" back end), you could put the following in your @file{.gnus.el} file:
12677
12678 @lisp
12679 (setq gnus-secondary-select-methods '((nnml "")))
12680 @end lisp
12681
12682 Now, the next time you start Gnus, this back end will be queried for new
12683 articles, and it will move all the messages in your spool file to its
12684 directory, which is @code{~/Mail/} by default.  The new group that will
12685 be created (@samp{mail.misc}) will be subscribed, and you can read it
12686 like any other group.
12687
12688 You will probably want to split the mail into several groups, though:
12689
12690 @lisp
12691 (setq nnmail-split-methods
12692       '(("junk" "^From:.*Lars Ingebrigtsen")
12693         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
12694         ("other" "")))
12695 @end lisp
12696
12697 This will result in three new @code{nnml} mail groups being created:
12698 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
12699 mail that doesn't fit into the first two groups will be placed in the
12700 last group.
12701
12702 This should be sufficient for reading mail with Gnus.  You might want to
12703 give the other sections in this part of the manual a perusal, though.
12704 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
12705
12706
12707 @node Splitting Mail
12708 @subsection Splitting Mail
12709 @cindex splitting mail
12710 @cindex mail splitting
12711
12712 @vindex nnmail-split-methods
12713 The @code{nnmail-split-methods} variable says how the incoming mail is
12714 to be split into groups.
12715
12716 @lisp
12717 (setq nnmail-split-methods
12718   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
12719     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
12720     ("mail.other" "")))
12721 @end lisp
12722
12723 This variable is a list of lists, where the first element of each of
12724 these lists is the name of the mail group (they do not have to be called
12725 something beginning with @samp{mail}, by the way), and the second
12726 element is a regular expression used on the header of each mail to
12727 determine if it belongs in this mail group.  The first string may
12728 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
12729 insert sub-expressions from the matched text.  For instance:
12730
12731 @lisp
12732 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
12733 @end lisp
12734
12735 The second element can also be a function.  In that case, it will be
12736 called narrowed to the headers with the first element of the rule as the
12737 argument.  It should return a non-@code{nil} value if it thinks that the
12738 mail belongs in that group.
12739
12740 The last of these groups should always be a general one, and the regular
12741 expression should @emph{always} be @samp{} so that it matches any mails
12742 that haven't been matched by any of the other regexps.  (These rules are
12743 processed from the beginning of the alist toward the end.  The first
12744 rule to make a match will "win", unless you have crossposting enabled.
12745 In that case, all matching rules will "win".)
12746
12747 If you like to tinker with this yourself, you can set this variable to a
12748 function of your choice.  This function will be called without any
12749 arguments in a buffer narrowed to the headers of an incoming mail
12750 message.  The function should return a list of group names that it
12751 thinks should carry this mail message.
12752
12753 Note that the mail back ends are free to maul the poor, innocent,
12754 incoming headers all they want to.  They all add @code{Lines} headers;
12755 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
12756 @code{From<SPACE>} line to something else.
12757
12758 @vindex nnmail-crosspost
12759 The mail back ends all support cross-posting.  If several regexps match,
12760 the mail will be ``cross-posted'' to all those groups.
12761 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
12762 that no articles are crossposted to the general (@samp{}) group.
12763
12764 @vindex nnmail-crosspost-link-function
12765 @cindex crosspost
12766 @cindex links
12767 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
12768 the crossposted articles.  However, not all file systems support hard
12769 links.  If that's the case for you, set
12770 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
12771 variable is @code{add-name-to-file} by default.)
12772
12773 @kindex M-x nnmail-split-history
12774 @kindex nnmail-split-history
12775 If you wish to see where the previous mail split put the messages, you
12776 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
12777 where re-spooling messages would put the messages, you can use
12778 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
12779 Group Commands}).
12780
12781 @vindex nnmail-split-header-length-limit
12782 Header lines longer than the value of
12783 @code{nnmail-split-header-length-limit} are excluded from the split
12784 function.
12785
12786 @vindex nnmail-mail-splitting-charset
12787 @vindex nnmail-mail-splitting-decodes
12788 By default the splitting codes MIME decodes headers so you can match
12789 on non-ASCII strings.  The @code{nnmail-mail-splitting-charset}
12790 variable specifies the default charset for decoding.  The behaviour
12791 can be turned off completely by binding
12792 @code{nnmail-mail-splitting-decodes} to nil, which is useful if you
12793 want to match articles based on the raw header data.
12794
12795 @vindex nnmail-resplit-incoming
12796 By default, splitting is performed on all incoming messages.  If
12797 you specify a @code{directory} entry for the variable
12798 @code{mail-sources} @pxref{Mail Source Specifiers}, however, then
12799 splitting does @emph{not} happen by default.  You can set the variable
12800 @code{nnmail-resplit-incoming} to a non-nil value to make splitting
12801 happen even in this case.  (This variable has no effect on other kinds
12802 of entries.)
12803
12804 Gnus gives you all the opportunity you could possibly want for shooting
12805 yourself in the foot.  Let's say you create a group that will contain
12806 all the mail you get from your boss.  And then you accidentally
12807 unsubscribe from the group.  Gnus will still put all the mail from your
12808 boss in the unsubscribed group, and so, when your boss mails you ``Have
12809 that report ready by Monday or you're fired!'', you'll never see it and,
12810 come Tuesday, you'll still believe that you're gainfully employed while
12811 you really should be out collecting empty bottles to save up for next
12812 month's rent money.
12813
12814
12815 @node Mail Sources
12816 @subsection Mail Sources
12817
12818 Mail can be gotten from many different sources---the mail spool, from a
12819 POP mail server, from a procmail directory, or from a maildir, for
12820 instance.
12821
12822 @menu
12823 * Mail Source Specifiers::      How to specify what a mail source is.
12824 * Mail Source Customization::   Some variables that influence things.
12825 * Fetching Mail::               Using the mail source specifiers.
12826 @end menu
12827
12828
12829 @node Mail Source Specifiers
12830 @subsubsection Mail Source Specifiers
12831 @cindex POP
12832 @cindex mail server
12833 @cindex procmail
12834 @cindex mail spool
12835 @cindex mail source
12836
12837 You tell Gnus how to fetch mail by setting @code{mail-sources}
12838 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
12839
12840 Here's an example:
12841
12842 @lisp
12843 (pop :server "pop3.mailserver.com" :user "myname")
12844 @end lisp
12845
12846 As can be observed, a mail source specifier is a list where the first
12847 element is a @dfn{mail source type}, followed by an arbitrary number of
12848 @dfn{keywords}.  Keywords that are not explicitly specified are given
12849 default values.
12850
12851 The following mail source types are available:
12852
12853 @table @code
12854 @item file
12855 Get mail from a single file; typically from the mail spool.
12856
12857 Keywords:
12858
12859 @table @code
12860 @item :path
12861 The file name.  Defaults to the value of the @code{MAIL}
12862 environment variable or the value of @code{rmail-spool-directory}
12863 (usually something like @file{/usr/mail/spool/user-name}).
12864 @end table
12865
12866 An example file mail source:
12867
12868 @lisp
12869 (file :path "/usr/spool/mail/user-name")
12870 @end lisp
12871
12872 Or using the default file name:
12873
12874 @lisp
12875 (file)
12876 @end lisp
12877
12878 If the mail spool file is not located on the local machine, it's best to
12879 use POP or @sc{imap} or the like to fetch the mail.  You can not use ange-ftp
12880 file names here---it has no way to lock the mail spool while moving the
12881 mail.
12882
12883 If it's impossible to set up a proper server, you can use ssh instead.
12884
12885 @lisp
12886 (setq mail-sources
12887       '((file :prescript "ssh host bin/getmail >%t")))
12888 @end lisp
12889
12890 The @samp{getmail} script would look something like the following:
12891
12892 @example
12893 #!/bin/sh
12894 #  getmail - move mail from spool to stdout
12895 #  flu@@iki.fi
12896
12897 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
12898 TMP=$HOME/Mail/tmp
12899 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
12900 @end example
12901
12902 Alter this script to fit find the @samp{movemail} you want to use.
12903
12904
12905 @item directory
12906 @vindex nnmail-scan-directory-mail-source-once
12907 Get mail from several files in a directory.  This is typically used when
12908 you have procmail split the incoming mail into several files.  That is,
12909 there is a one-to-one correspondence between files in that directory and
12910 groups, so that mail from the file @file{foo.bar.spool} will be put in
12911 the group @code{foo.bar}.  (You can change the suffix to be used instead
12912 of @code{.spool}.)  Setting
12913 @code{nnmail-scan-directory-mail-source-once} to non-nil forces Gnus to
12914 scan the mail source only once.  This is particularly useful if you want
12915 to scan mail groups at a specified level.
12916
12917 @vindex nnmail-resplit-incoming
12918 There is also the variable @code{nnmail-resplit-incoming}, if you set
12919 that to a non-nil value, then the normal splitting process is applied
12920 to all the files from the directory, @ref{Splitting Mail}.
12921
12922 Keywords:
12923
12924 @table @code
12925 @item :path
12926 The name of the directory where the files are.  There is no default
12927 value.
12928
12929 @item :suffix
12930 Only files ending with this suffix are used.  The default is
12931 @samp{.spool}.
12932
12933 @item :predicate
12934 Only files that have this predicate return non-@code{nil} are returned.
12935 The default is @code{identity}.  This is used as an additional
12936 filter---only files that have the right suffix @emph{and} satisfy this
12937 predicate are considered.
12938
12939 @item :prescript
12940 @itemx :postscript
12941 Script run before/after fetching mail.
12942
12943 @end table
12944
12945 An example directory mail source:
12946
12947 @lisp
12948 (directory :path "/home/user-name/procmail-dir/"
12949            :suffix ".prcml")
12950 @end lisp
12951
12952 @item pop
12953 Get mail from a POP server.
12954
12955 Keywords:
12956
12957 @table @code
12958 @item :server
12959 The name of the POP server.  The default is taken from the
12960 @code{MAILHOST} environment variable.
12961
12962 @item :port
12963 The port number of the POP server.  This can be a number (eg,
12964 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
12965 string, it should be a service name as listed in @file{/etc/services} on
12966 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
12967 need to specify it as @samp{"pop-3"} instead.
12968
12969 @item :user
12970 The user name to give to the POP server.  The default is the login
12971 name.
12972
12973 @item :password
12974 The password to give to the POP server.  If not specified, the user is
12975 prompted.
12976
12977 @item :program
12978 The program to use to fetch mail from the POP server.  This should be
12979 a @code{format}-like string.  Here's an example:
12980
12981 @example
12982 fetchmail %u@@%s -P %p %t
12983 @end example
12984
12985 The valid format specifier characters are:
12986
12987 @table @samp
12988 @item t
12989 The name of the file the mail is to be moved to.  This must always be
12990 included in this string.
12991
12992 @item s
12993 The name of the server.
12994
12995 @item P
12996 The port number of the server.
12997
12998 @item u
12999 The user name to use.
13000
13001 @item p
13002 The password to use.
13003 @end table
13004
13005 The values used for these specs are taken from the values you give the
13006 corresponding keywords.
13007
13008 @item :prescript
13009 A script to be run before fetching the mail.  The syntax is the same as
13010 the @code{:program} keyword.  This can also be a function to be run.
13011
13012 @item :postscript
13013 A script to be run after fetching the mail.  The syntax is the same as
13014 the @code{:program} keyword.  This can also be a function to be run.
13015
13016 @item :function
13017 The function to use to fetch mail from the POP server.  The function is
13018 called with one parameter---the name of the file where the mail should
13019 be moved to.
13020
13021 @item :authentication
13022 This can be either the symbol @code{password} or the symbol @code{apop}
13023 and says what authentication scheme to use.  The default is
13024 @code{password}.
13025
13026 @end table
13027
13028 If the @code{:program} and @code{:function} keywords aren't specified,
13029 @code{pop3-movemail} will be used.
13030
13031 Here are some examples.  Fetch from the default POP server, using the
13032 default user name, and default fetcher:
13033
13034 @lisp
13035 (pop)
13036 @end lisp
13037
13038 Fetch from a named server with a named user and password:
13039
13040 @lisp
13041 (pop :server "my.pop.server"
13042      :user "user-name" :password "secret")
13043 @end lisp
13044
13045 Use @samp{movemail} to move the mail:
13046
13047 @lisp
13048 (pop :program "movemail po:%u %t %p")
13049 @end lisp
13050
13051 @item maildir
13052 Get mail from a maildir.  This is a type of mailbox that is supported by
13053 at least qmail and postfix, where each file in a special directory
13054 contains exactly one mail.
13055
13056 Keywords:
13057
13058 @table @code
13059 @item :path
13060 The name of the directory where the mails are stored.  The default is
13061 taken from the @code{MAILDIR} environment variable or
13062 @samp{~/Maildir/}.
13063 @item :subdirs
13064 The subdirectories of the Maildir.  The default is
13065 @samp{("new" "cur")}.
13066
13067 @c If you sometimes look at your mail through a pop3 daemon before fetching
13068 @c them with Gnus, you may also have to fetch your mails from the
13069 @c @code{cur} directory inside the maildir, like in the first example
13070 @c below.
13071
13072 You can also get mails from remote hosts (because maildirs don't suffer
13073 from locking problems).
13074
13075 @end table
13076
13077 Two example maildir mail sources:
13078
13079 @lisp
13080 (maildir :path "/home/user-name/Maildir/"
13081          :subdirs ("cur" "new"))
13082 @end lisp
13083
13084 @lisp
13085 (maildir :path "/user@@remotehost.org:~/Maildir/"
13086          :subdirs ("new"))
13087 @end lisp
13088
13089 @item imap
13090 Get mail from a @sc{imap} server.  If you don't want to use @sc{imap}
13091 as intended, as a network mail reading protocol (ie with nnimap), for
13092 some reason or other, Gnus let you treat it similar to a POP server
13093 and fetches articles from a given @sc{imap} mailbox.  @xref{IMAP}, for
13094 more information.
13095
13096 Note that for the Kerberos, GSSAPI, SSL/TLS and STARTTLS support you
13097 may need external programs and libraries, @xref{IMAP}.
13098
13099 Keywords:
13100
13101 @table @code
13102 @item :server
13103 The name of the @sc{imap} server.  The default is taken from the
13104 @code{MAILHOST} environment variable.
13105
13106 @item :port
13107 The port number of the @sc{imap} server.  The default is @samp{143}, or
13108 @samp{993} for SSL/TLS connections.
13109
13110 @item :user
13111 The user name to give to the @sc{imap} server.  The default is the login
13112 name.
13113
13114 @item :password
13115 The password to give to the @sc{imap} server.  If not specified, the user is
13116 prompted.
13117
13118 @item :stream
13119 What stream to use for connecting to the server, this is one of the
13120 symbols in @code{imap-stream-alist}.  Right now, this means
13121 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{ssl},
13122 @samp{shell} or the default @samp{network}.
13123
13124 @item :authentication
13125 Which authenticator to use for authenticating to the server, this is
13126 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13127 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13128 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13129
13130 @item :program
13131 When using the `shell' :stream, the contents of this variable is
13132 mapped into the `imap-shell-program' variable.  This should be a
13133 @code{format}-like string (or list of strings).  Here's an example:
13134
13135 @example
13136 ssh %s imapd
13137 @end example
13138
13139 The valid format specifier characters are:
13140
13141 @table @samp
13142 @item s
13143 The name of the server.
13144
13145 @item l
13146 User name from `imap-default-user'.
13147
13148 @item p
13149 The port number of the server.
13150 @end table
13151
13152 The values used for these specs are taken from the values you give the
13153 corresponding keywords.
13154
13155 @item :mailbox
13156 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13157 which normally is the mailbox which receive incoming mail.
13158
13159 @item :predicate
13160 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13161 UNDELETED}, is probably the best choice for most people, but if you
13162 sometimes peek in your mailbox with a @sc{imap} client and mark some
13163 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13164 Then all articles in the mailbox is fetched, no matter what.  For a
13165 complete list of predicates, see RFC 2060 section 6.4.4.
13166
13167 @item :fetchflag
13168 How to flag fetched articles on the server, the default @samp{\Deleted}
13169 will mark them as deleted, an alternative would be @samp{\Seen} which
13170 would simply mark them as read.  These are the two most likely choices,
13171 but more flags are defined in RFC 2060 section 2.3.2.
13172
13173 @item :dontexpunge
13174 If non-nil, don't remove all articles marked as deleted in the mailbox
13175 after finishing the fetch.
13176
13177 @end table
13178
13179 An example @sc{imap} mail source:
13180
13181 @lisp
13182 (imap :server "mail.mycorp.com"
13183       :stream kerberos4
13184       :fetchflag "\\Seen")
13185 @end lisp
13186
13187 @item webmail
13188 Get mail from a webmail server, such as @uref{www.hotmail.com},
13189 @uref{webmail.netscape.com}, @uref{www.netaddress.com},
13190 @uref{mail.yahoo..com}.
13191
13192 NOTE: Webmail largely depends cookies. A "one-line-cookie" patch is
13193 required for url "4.0pre.46".
13194
13195 WARNING: Mails may be lost.  NO WARRANTY.
13196
13197 Keywords:
13198
13199 @table @code
13200 @item :subtype
13201 The type of the webmail server.  The default is @code{hotmail}.  The
13202 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13203
13204 @item :user
13205 The user name to give to the webmail server.  The default is the login
13206 name.
13207
13208 @item :password
13209 The password to give to the webmail server.  If not specified, the user is
13210 prompted.
13211
13212 @item :dontexpunge
13213 If non-nil, only fetch unread articles and don't move them to trash
13214 folder after finishing the fetch.
13215
13216 @end table
13217
13218 An example webmail source:
13219
13220 @lisp
13221 (webmail :subtype 'hotmail
13222          :user "user-name"
13223          :password "secret")
13224 @end lisp
13225 @end table
13226
13227 @table @dfn
13228 @item Common Keywords
13229 Common keywords can be used in any type of mail source.
13230
13231 Keywords:
13232
13233 @table @code
13234 @item :plugged
13235 If non-nil, fetch the mail even when Gnus is unplugged.  If you use
13236 directory source to get mail, you can specify it as in this example:
13237
13238 @lisp
13239 (setq mail-sources
13240       '((directory :path "/home/pavel/.Spool/"
13241                    :suffix ""
13242                    :plugged t)))
13243 @end lisp
13244
13245 Gnus will then fetch your mail even when you are unplugged.  This is
13246 useful when you use local mail and news.
13247
13248 @end table
13249 @end table
13250
13251 @subsubsection Function Interface
13252
13253 Some of the above keywords specify a Lisp function to be executed.
13254 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13255 the value of the keyword while the function is executing.  For example,
13256 consider the following mail-source setting:
13257
13258 @lisp
13259 (setq mail-sources '((pop :user "jrl"
13260                           :server "pophost" :function fetchfunc)))
13261 @end lisp
13262
13263 While the function @code{fetchfunc} is executing, the symbol @code{user}
13264 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13265 @code{"pophost"}.  The symbols @code{port}, @code{password},
13266 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13267 and @code{authentication} are also bound (to their default values).
13268
13269 See above for a list of keywords for each type of mail source.
13270
13271
13272 @node Mail Source Customization
13273 @subsubsection Mail Source Customization
13274
13275 The following is a list of variables that influence how the mail is
13276 fetched.  You would normally not need to set or change any of these
13277 variables.
13278
13279 @table @code
13280 @item mail-source-crash-box
13281 @vindex mail-source-crash-box
13282 File where mail will be stored while processing it.  The default is
13283 @file{~/.emacs-mail-crash-box}.
13284
13285 @item mail-source-delete-incoming
13286 @vindex mail-source-delete-incoming
13287 If non-@code{nil}, delete incoming files after handling them.
13288
13289 @item mail-source-directory
13290 @vindex mail-source-directory
13291 Directory where files (if any) will be stored.  The default is
13292 @file{~/Mail/}.  At present, the only thing this is used for is to say
13293 where the incoming files will be stored if the previous variable is
13294 @code{nil}.
13295
13296 @item mail-source-incoming-file-prefix
13297 @vindex mail-source-incoming-file-prefix
13298 Prefix for file name for storing incoming mail.  The default is
13299 @file{Incoming}, in which case files will end up with names like
13300 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13301 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13302
13303 @item mail-source-default-file-modes
13304 @vindex mail-source-default-file-modes
13305 All new mail files will get this file mode.  The default is 384.
13306
13307 @item mail-source-movemail-program
13308 @vindex mail-source-movemail-program
13309 If non-nil, name of program for fetching new mail.  If nil,
13310 @code{movemail} in @var{exec-directory}.
13311
13312 @end table
13313
13314
13315 @node Fetching Mail
13316 @subsubsection Fetching Mail
13317
13318 @vindex mail-sources
13319 @vindex nnmail-spool-file
13320 The way to actually tell Gnus where to get new mail from is to set
13321 @code{mail-sources} to a list of mail source specifiers
13322 (@pxref{Mail Source Specifiers}).
13323
13324 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13325 @code{nil}, the mail back ends will never attempt to fetch mail by
13326 themselves.
13327
13328 If you want to fetch mail both from your local spool as well as a POP
13329 mail server, you'd say something like:
13330
13331 @lisp
13332 (setq mail-sources
13333       '((file)
13334         (pop :server "pop3.mail.server"
13335              :password "secret")))
13336 @end lisp
13337
13338 Or, if you don't want to use any of the keyword defaults:
13339
13340 @lisp
13341 (setq mail-sources
13342       '((file :path "/var/spool/mail/user-name")
13343         (pop :server "pop3.mail.server"
13344              :user "user-name"
13345              :port "pop3"
13346              :password "secret")))
13347 @end lisp
13348
13349
13350 When you use a mail back end, Gnus will slurp all your mail from your
13351 inbox and plonk it down in your home directory.  Gnus doesn't move any
13352 mail if you're not using a mail back end---you have to do a lot of magic
13353 invocations first.  At the time when you have finished drawing the
13354 pentagram, lightened the candles, and sacrificed the goat, you really
13355 shouldn't be too surprised when Gnus moves your mail.
13356
13357
13358
13359 @node Mail Back End Variables
13360 @subsection Mail Back End Variables
13361
13362 These variables are (for the most part) pertinent to all the various
13363 mail back ends.
13364
13365 @table @code
13366 @vindex nnmail-read-incoming-hook
13367 @item nnmail-read-incoming-hook
13368 The mail back ends all call this hook after reading new mail.  You can
13369 use this hook to notify any mail watch programs, if you want to.
13370
13371 @vindex nnmail-split-hook
13372 @item nnmail-split-hook
13373 @findex article-decode-encoded-words
13374 @findex RFC 1522 decoding
13375 @findex RFC 2047 decoding
13376 Hook run in the buffer where the mail headers of each message is kept
13377 just before the splitting based on these headers is done.  The hook is
13378 free to modify the buffer contents in any way it sees fit---the buffer
13379 is discarded after the splitting has been done, and no changes performed
13380 in the buffer will show up in any files.
13381 @code{gnus-article-decode-encoded-words} is one likely function to add
13382 to this hook.
13383
13384 @vindex nnmail-pre-get-new-mail-hook
13385 @vindex nnmail-post-get-new-mail-hook
13386 @item nnmail-pre-get-new-mail-hook
13387 @itemx nnmail-post-get-new-mail-hook
13388 These are two useful hooks executed when treating new incoming
13389 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13390 starting to handle the new mail) and
13391 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13392 is done).  Here's and example of using these two hooks to change the
13393 default file modes the new mail files get:
13394
13395 @lisp
13396 (add-hook 'nnmail-pre-get-new-mail-hook
13397           (lambda () (set-default-file-modes 511)))
13398
13399 (add-hook 'nnmail-post-get-new-mail-hook
13400           (lambda () (set-default-file-modes 551)))
13401 @end lisp
13402
13403 @item nnmail-use-long-file-names
13404 @vindex nnmail-use-long-file-names
13405 If non-@code{nil}, the mail back ends will use long file and directory
13406 names.  Groups like @samp{mail.misc} will end up in directories
13407 (assuming use of @code{nnml} back end) or files (assuming use of
13408 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13409 the same group will end up in @file{mail/misc}.
13410
13411 @item nnmail-delete-file-function
13412 @vindex nnmail-delete-file-function
13413 @findex delete-file
13414 Function called to delete files.  It is @code{delete-file} by default.
13415
13416 @item nnmail-cache-accepted-message-ids
13417 @vindex nnmail-cache-accepted-message-ids
13418 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13419 the back end (via @code{Gcc}, for instance) into the mail duplication
13420 discovery cache.  The default is @code{nil}.
13421
13422 @item nnmail-cache-ignore-groups
13423 @vindex nnmail-cache-ignore-groups
13424 This can be a regular expression or a list of regular expressions.
13425 Group names that match any of the regular expressions will never be
13426 recorded in the @code{Message-ID} cache.
13427
13428 This can be useful, for example, when using Fancy Splitting
13429 (@pxref{Fancy Mail Splitting}) together with the function
13430 @code{nnmail-split-fancy-with-parent}.
13431
13432 @end table
13433
13434
13435 @node Fancy Mail Splitting
13436 @subsection Fancy Mail Splitting
13437 @cindex mail splitting
13438 @cindex fancy mail splitting
13439
13440 @vindex nnmail-split-fancy
13441 @findex nnmail-split-fancy
13442 If the rather simple, standard method for specifying how to split mail
13443 doesn't allow you to do what you want, you can set
13444 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13445 play with the @code{nnmail-split-fancy} variable.
13446
13447 Let's look at an example value of this variable first:
13448
13449 @lisp
13450 ;; Messages from the mailer daemon are not crossposted to any of
13451 ;; the ordinary groups.  Warnings are put in a separate group
13452 ;; from real errors.
13453 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13454                    "mail.misc"))
13455    ;; Non-error messages are crossposted to all relevant
13456    ;; groups, but we don't crosspost between the group for the
13457    ;; (ding) list and the group for other (ding) related mail.
13458    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13459          ("subject" "ding" "ding.misc"))
13460       ;; Other mailing lists...
13461       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13462       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13463       ;; Both lists below have the same suffix, so prevent
13464       ;; cross-posting to mkpkg.list of messages posted only to
13465       ;; the bugs- list, but allow cross-posting when the
13466       ;; message was really cross-posted.
13467       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13468       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13469       ;; People...
13470       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13471    ;; Unmatched mail goes to the catch all group.
13472    "misc.misc")
13473 @end lisp
13474
13475 This variable has the format of a @dfn{split}.  A split is a (possibly)
13476 recursive structure where each split may contain other splits.  Here are
13477 the five possible split syntaxes:
13478
13479 @enumerate
13480
13481 @item
13482 @samp{group}: If the split is a string, that will be taken as a group
13483 name.  Normal regexp match expansion will be done.  See below for
13484 examples.
13485
13486 @item
13487 @code{(@var{field} @var{value} @code{[-} @var{restrict}
13488 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
13489 first element of which is a string, then store the message as
13490 specified by @var{split}, if header @var{field} (a regexp) contains
13491 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
13492 matches some string after @var{field} and before the end of the
13493 matched @var{value}, the @var{split} is ignored.  If none of the
13494 @var{restrict} clauses match, @var{split} is processed.
13495
13496 @item
13497 @code{(| @var{split}@dots{})}: If the split is a list, and the first
13498 element is @code{|} (vertical bar), then process each @var{split} until
13499 one of them matches.  A @var{split} is said to match if it will cause
13500 the mail message to be stored in one or more groups.
13501
13502 @item
13503 @code{(& @var{split}@dots{})}: If the split is a list, and the first
13504 element is @code{&}, then process all @var{split}s in the list.
13505
13506 @item
13507 @code{junk}: If the split is the symbol @code{junk}, then don't save
13508 (i.e., delete) this message.  Use with extreme caution.
13509
13510 @item
13511 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
13512 a list, and the first element is @code{:}, then the second element will
13513 be called as a function with @var{args} given as arguments.  The
13514 function should return a @var{split}.
13515
13516 @cindex body split
13517 For instance, the following function could be used to split based on the
13518 body of the messages:
13519
13520 @lisp
13521 (defun split-on-body ()
13522   (save-excursion
13523     (set-buffer " *nnmail incoming*")
13524     (goto-char (point-min))
13525     (when (re-search-forward "Some.*string" nil t)
13526       "string.group")))
13527 @end lisp
13528
13529 The @samp{" *nnmail incoming*"} is narrowed to the message in question
13530 when the @code{:} function is run.
13531
13532 @item
13533 @code{(! @var{func} @var{split})}: If the split is a list, and the first
13534 element is @code{!}, then SPLIT will be processed, and FUNC will be
13535 called as a function with the result of SPLIT as argument.  FUNC should
13536 return a split.
13537
13538 @item
13539 @code{nil}: If the split is @code{nil}, it is ignored.
13540
13541 @end enumerate
13542
13543 In these splits, @var{field} must match a complete field name.
13544 @var{value} must match a complete word according to the fundamental mode
13545 syntax table.  You can use @code{.*} in the regexps to match partial
13546 field names or words.  In other words, all @var{value}'s are wrapped in
13547 @samp{\<} and @samp{\>} pairs.
13548
13549 @vindex nnmail-split-abbrev-alist
13550 @var{field} and @var{value} can also be lisp symbols, in that case they
13551 are expanded as specified by the variable
13552 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells, where
13553 the @code{car} of a cell contains the key, and the @code{cdr} contains the associated
13554 value.
13555
13556 @vindex nnmail-split-fancy-syntax-table
13557 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13558 when all this splitting is performed.
13559
13560 If you want to have Gnus create groups dynamically based on some
13561 information in the headers (i.e., do @code{replace-match}-like
13562 substitutions in the group names), you can say things like:
13563
13564 @example
13565 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13566 @end example
13567
13568 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13569 will be filed in @samp{mail.debian.foo}.
13570
13571 If the string contains the element @samp{\&}, then the previously
13572 matched string will be substituted.  Similarly, the elements @samp{\\1}
13573 up to @samp{\\9} will be substituted with the text matched by the
13574 groupings 1 through 9.
13575
13576 @findex nnmail-split-fancy-with-parent
13577 @code{nnmail-split-fancy-with-parent} is a function which allows you to
13578 split followups into the same groups their parents are in.  Sometimes
13579 you can't make splitting rules for all your mail.  For example, your
13580 boss might send you personal mail regarding different projects you are
13581 working on, and as you can't tell your boss to put a distinguishing
13582 string into the subject line, you have to resort to manually moving the
13583 messages into the right group.  With this function, you only have to do
13584 it once per thread.
13585
13586 To use this feature, you have to set @code{nnmail-treat-duplicates} and
13587 @code{nnmail-cache-accepted-message-ids} to a non-nil value.  And then
13588 you can include @code{nnmail-split-fancy-with-parent} using the colon
13589 feature, like so:
13590 @lisp
13591 (setq nnmail-treat-duplicates 'warn     ; or 'delete
13592       nnmail-cache-accepted-message-ids t
13593       nnmail-split-fancy
13594       '(| (: nnmail-split-fancy-with-parent)
13595           ;; other splits go here
13596         ))
13597 @end lisp
13598
13599 This feature works as follows: when @code{nnmail-treat-duplicates} is
13600 non-nil, Gnus records the message id of every message it sees in the
13601 file specified by the variable @code{nnmail-message-id-cache-file},
13602 together with the group it is in (the group is omitted for non-mail
13603 messages).  When mail splitting is invoked, the function
13604 @code{nnmail-split-fancy-with-parent} then looks at the References (and
13605 In-Reply-To) header of each message to split and searches the file
13606 specified by @code{nnmail-message-id-cache-file} for the message ids.
13607 When it has found a parent, it returns the corresponding group name
13608 unless the group name matches the regexp
13609 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is recommended
13610 that you set @code{nnmail-message-id-cache-length} to a somewhat higher
13611 number than the default so that the message ids are still in the cache.
13612 (A value of 5000 appears to create a file some 300 kBytes in size.)
13613 @vindex nnmail-cache-accepted-message-ids
13614 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
13615 also records the message ids of moved articles, so that the followup
13616 messages goes into the new group.
13617
13618 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
13619 want certain groups to be recorded in the cache.  For example, if all
13620 outgoing messages are written to an `outgoing' group, you could set
13621 @code{nnmail-cache-ignore-groups} to match that group name.
13622 Otherwise, answers to all your messages would end up in the
13623 `outgoing' group.
13624
13625
13626 @node Group Mail Splitting
13627 @subsection Group Mail Splitting
13628 @cindex mail splitting
13629 @cindex group mail splitting
13630
13631 @findex gnus-group-split
13632 If you subscribe to dozens of mailing lists but you don't want to
13633 maintain mail splitting rules manually, group mail splitting is for you.
13634 You just have to set @var{to-list} and/or @var{to-address} in group
13635 parameters or group customization and set @code{nnmail-split-methods} to
13636 @code{gnus-group-split}.  This splitting function will scan all groups
13637 for those parameters and split mail accordingly, i.e., messages posted
13638 from or to the addresses specified in the parameters @var{to-list} or
13639 @var{to-address} of a mail group will be stored in that group.
13640
13641 Sometimes, mailing lists have multiple addresses, and you may want mail
13642 splitting to recognize them all: just set the @var{extra-aliases} group
13643 parameter to the list of additional addresses and it's done.  If you'd
13644 rather use a regular expression, set @var{split-regexp}.
13645
13646 All these parameters in a group will be used to create an
13647 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
13648 the @var{value} is a single regular expression that matches
13649 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
13650 matches of @var{split-regexp}, and the @var{split} is the name of the
13651 group.  @var{restrict}s are also supported: just set the
13652 @var{split-exclude} parameter to a list of regular expressions.
13653
13654 If you can't get the right split to be generated using all these
13655 parameters, or you just need something fancier, you can set the
13656 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
13657 this case, all other aforementioned parameters will be ignored by
13658 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
13659 @code{nil}, in which case the group will be ignored by
13660 @code{gnus-group-split}.
13661
13662 @vindex gnus-group-split-default-catch-all-group
13663 @code{gnus-group-split} will do cross-posting on all groups that match,
13664 by defining a single @code{&} fancy split containing one split for each
13665 group.  If a message doesn't match any split, it will be stored in the
13666 group named in @code{gnus-group-split-default-catch-all-group}, unless
13667 some group has @var{split-spec} set to @code{catch-all}, in which case
13668 that group is used as the catch-all group.  Even though this variable is
13669 often used just to name a group, it may also be set to an arbitrarily
13670 complex fancy split (after all, a group name is a fancy split), and this
13671 may be useful to split mail that doesn't go to any mailing list to
13672 personal mail folders.  Note that this fancy split is added as the last
13673 element of a @code{|} split list that also contains a @code{&} split
13674 with the rules extracted from group parameters.
13675
13676 It's time for an example.  Assume the following group parameters have
13677 been defined:
13678
13679 @example
13680 nnml:mail.bar:
13681 ((to-address . "bar@@femail.com")
13682  (split-regexp . ".*@@femail\\.com"))
13683 nnml:mail.foo:
13684 ((to-list . "foo@@nowhere.gov")
13685  (extra-aliases "foo@@localhost" "foo-redist@@home")
13686  (split-exclude "bugs-foo" "rambling-foo")
13687  (admin-address . "foo-request@@nowhere.gov"))
13688 nnml:mail.others:
13689 ((split-spec . catch-all))
13690 @end example
13691
13692 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
13693 behave as if @code{nnmail-split-fancy} had been selected and variable
13694 @code{nnmail-split-fancy} had been set as follows:
13695
13696 @lisp
13697 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
13698       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
13699            - "bugs-foo" - "rambling-foo" "mail.foo"))
13700    "mail.others")
13701 @end lisp
13702
13703 @findex gnus-group-split-fancy
13704 If you'd rather not use group splitting for all your mail groups, you
13705 may use it for only some of them, by using @code{nnmail-split-fancy}
13706 splits like this:
13707
13708 @lisp
13709 (: gnus-group-split-fancy GROUPS NO-CROSSPOST CATCH-ALL)
13710 @end lisp
13711
13712 @var{groups} may be a regular expression or a list of group names whose
13713 parameters will be scanned to generate the output split.
13714 @var{no-crosspost} can be used to disable cross-posting; in this case, a
13715 single @code{|} split will be output.  @var{catch-all} is the fallback
13716 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
13717 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
13718 empty string in any selected group, no catch-all split will be issued.
13719 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
13720 this group will override the value of the @var{catch-all} argument.
13721
13722 @findex gnus-group-split-setup
13723 Unfortunately, scanning all groups and their parameters can be quite
13724 slow, especially considering that it has to be done for every message.
13725 But don't despair!  The function @code{gnus-group-split-setup} can be
13726 used to enable @code{gnus-group-split} in a much more efficient way.  It
13727 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
13728 @code{nnmail-split-fancy} to the split produced by
13729 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
13730 scanned once, no matter how many messages are split.
13731
13732 @findex gnus-group-split-update
13733 However, if you change group parameters, you'd have to update
13734 @code{nnmail-split-fancy} manually.  You can do it by running
13735 @code{gnus-group-split-update}.  If you'd rather have it updated
13736 automatically, just tell @code{gnus-group-split-setup} to do it for
13737 you.  For example, add to your @file{.gnus.el}:
13738
13739 @lisp
13740 (gnus-group-split-setup AUTO-UPDATE CATCH-ALL)
13741 @end lisp
13742
13743 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
13744 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
13745 have to worry about updating @code{nnmail-split-fancy} again.  If you
13746 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
13747 @code{gnus-group-split-default-catch-all-group} will be set to its
13748 value.
13749
13750 @vindex gnus-group-split-updated-hook
13751 Because you may want to change @code{nnmail-split-fancy} after it is set
13752 by @code{gnus-group-split-update}, this function will run
13753 @code{gnus-group-split-updated-hook} just before finishing.
13754
13755 @node Incorporating Old Mail
13756 @subsection Incorporating Old Mail
13757 @cindex incorporating old mail
13758 @cindex import old mail
13759
13760 Most people have lots of old mail stored in various file formats.  If
13761 you have set up Gnus to read mail using one of the spiffy Gnus mail
13762 back ends, you'll probably wish to have that old mail incorporated into
13763 your mail groups.
13764
13765 Doing so can be quite easy.
13766
13767 To take an example: You're reading mail using @code{nnml}
13768 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
13769 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
13770 file filled with important, but old, mail.  You want to move it into
13771 your @code{nnml} groups.
13772
13773 Here's how:
13774
13775 @enumerate
13776 @item
13777 Go to the group buffer.
13778
13779 @item
13780 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
13781 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
13782
13783 @item
13784 Type @kbd{SPACE} to enter the newly created group.
13785
13786 @item
13787 Type @kbd{M P b} to process-mark all articles in this group's buffer
13788 (@pxref{Setting Process Marks}).
13789
13790 @item
13791 Type @kbd{B r} to respool all the process-marked articles, and answer
13792 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
13793 @end enumerate
13794
13795 All the mail messages in the mbox file will now also be spread out over
13796 all your @code{nnml} groups.  Try entering them and check whether things
13797 have gone without a glitch.  If things look ok, you may consider
13798 deleting the mbox file, but I wouldn't do that unless I was absolutely
13799 sure that all the mail has ended up where it should be.
13800
13801 Respooling is also a handy thing to do if you're switching from one mail
13802 back end to another.  Just respool all the mail in the old mail groups
13803 using the new mail back end.
13804
13805
13806 @node Expiring Mail
13807 @subsection Expiring Mail
13808 @cindex article expiry
13809
13810 Traditional mail readers have a tendency to remove mail articles when
13811 you mark them as read, in some way.  Gnus takes a fundamentally
13812 different approach to mail reading.
13813
13814 Gnus basically considers mail just to be news that has been received in
13815 a rather peculiar manner.  It does not think that it has the power to
13816 actually change the mail, or delete any mail messages.  If you enter a
13817 mail group, and mark articles as ``read'', or kill them in some other
13818 fashion, the mail articles will still exist on the system.  I repeat:
13819 Gnus will not delete your old, read mail.  Unless you ask it to, of
13820 course.
13821
13822 To make Gnus get rid of your unwanted mail, you have to mark the
13823 articles as @dfn{expirable}.  (With the default keybindings, this means
13824 that you have to type @kbd{E}.)  This does not mean that the articles
13825 will disappear right away, however.  In general, a mail article will be
13826 deleted from your system if, 1) it is marked as expirable, AND 2) it is
13827 more than one week old.  If you do not mark an article as expirable, it
13828 will remain on your system until hell freezes over.  This bears
13829 repeating one more time, with some spurious capitalizations: IF you do
13830 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
13831
13832 You do not have to mark articles as expirable by hand.  Gnus provides
13833 two features, called `auto-expire' and `total-expire', that can help you
13834 with this.  In a nutshell, `auto-expire' means that Gnus hits @kbd{E}
13835 for you when you select an article.  And `total-expire' means that Gnus
13836 considers all articles as expirable that are read.  So, in addition to
13837 the articles marked @samp{E}, also the articles marked @samp{r},
13838 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
13839 expirable.
13840
13841 When should either auto-expire or total-expire be used?  Most people
13842 who are subscribed to mailing lists split each list into its own group
13843 and then turn on auto-expire or total-expire for those groups.
13844 (@xref{Splitting Mail}, for more information on splitting each list
13845 into its own group.)
13846
13847 Which one is better, auto-expire or total-expire?  It's not easy to
13848 answer.  Generally speaking, auto-expire is probably faster.  Another
13849 advantage of auto-expire is that you get more marks to work with: for
13850 the articles that are supposed to stick around, you can still choose
13851 between tick and dormant and read marks.  But with total-expire, you
13852 only have dormant and ticked to choose from.  The advantage of
13853 total-expire is that it works well with adaptive scoring @pxref{Adaptive
13854 Scoring}.  Auto-expire works with normal scoring but not with adaptive
13855 scoring.
13856
13857 @vindex gnus-auto-expirable-newsgroups
13858 Groups that match the regular expression
13859 @code{gnus-auto-expirable-newsgroups} will have all articles that you
13860 read marked as expirable automatically.  All articles marked as
13861 expirable have an @samp{E} in the first column in the summary buffer.
13862
13863 By default, if you have auto expiry switched on, Gnus will mark all the
13864 articles you read as expirable, no matter if they were read or unread
13865 before.  To avoid having articles marked as read marked as expirable
13866 automatically, you can put something like the following in your
13867 @file{.gnus.el} file:
13868
13869 @vindex gnus-mark-article-hook
13870 @lisp
13871 (remove-hook 'gnus-mark-article-hook
13872              'gnus-summary-mark-read-and-unread-as-read)
13873 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
13874 @end lisp
13875
13876 Note that making a group auto-expirable doesn't mean that all read
13877 articles are expired---only the articles marked as expirable
13878 will be expired.  Also note that using the @kbd{d} command won't make
13879 articles expirable---only semi-automatic marking of articles as read will
13880 mark the articles as expirable in auto-expirable groups.
13881
13882 Let's say you subscribe to a couple of mailing lists, and you want the
13883 articles you have read to disappear after a while:
13884
13885 @lisp
13886 (setq gnus-auto-expirable-newsgroups
13887       "mail.nonsense-list\\|mail.nice-list")
13888 @end lisp
13889
13890 Another way to have auto-expiry happen is to have the element
13891 @code{auto-expire} in the group parameters of the group.
13892
13893 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
13894 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
13895 don't really mix very well.
13896
13897 @vindex nnmail-expiry-wait
13898 The @code{nnmail-expiry-wait} variable supplies the default time an
13899 expirable article has to live.  Gnus starts counting days from when the
13900 message @emph{arrived}, not from when it was sent.  The default is seven
13901 days.
13902
13903 Gnus also supplies a function that lets you fine-tune how long articles
13904 are to live, based on what group they are in.  Let's say you want to
13905 have one month expiry period in the @samp{mail.private} group, a one day
13906 expiry period in the @samp{mail.junk} group, and a six day expiry period
13907 everywhere else:
13908
13909 @vindex nnmail-expiry-wait-function
13910 @lisp
13911 (setq nnmail-expiry-wait-function
13912       (lambda (group)
13913        (cond ((string= group "mail.private")
13914                31)
13915              ((string= group "mail.junk")
13916                1)
13917              ((string= group "important")
13918                'never)
13919              (t
13920                6))))
13921 @end lisp
13922
13923 The group names this function is fed are ``unadorned'' group
13924 names---no @samp{nnml:} prefixes and the like.
13925
13926 The @code{nnmail-expiry-wait} variable and
13927 @code{nnmail-expiry-wait-function} function can either be a number (not
13928 necessarily an integer) or one of the symbols @code{immediate} or
13929 @code{never}.
13930
13931 You can also use the @code{expiry-wait} group parameter to selectively
13932 change the expiry period (@pxref{Group Parameters}).
13933
13934 @vindex nnmail-expiry-target
13935 The normal action taken when expiring articles is to delete them.
13936 However, in some circumstances it might make more sense to move them
13937 to other groups instead of deleting them.  The variable
13938 @code{nnmail-expiry-target} (and the @code{expiry-target} group
13939 parameter) controls this.  The variable supplies a default value for
13940 all groups, which can be overridden for specific groups by the group
13941 parameter.  default value is @code{delete}, but this can also be a
13942 string (which should be the name of the group the message should be
13943 moved to), or a function (which will be called in a buffer narrowed to
13944 the message in question, and with the name of the group being moved
13945 from as its parameter) which should return a target -- either a group
13946 name or @code{delete}.
13947
13948 Here's an example for specifying a group name:
13949 @lisp
13950 (setq nnmail-expiry-target "nnml:expired")
13951 @end lisp
13952
13953 @findex nnmail-fancy-expiry-target
13954 @vindex nnmail-fancy-expiry-targets
13955 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
13956 expire mail to groups according to the variable
13957 @code{nnmail-fancy-expiry-targets}.  Here's an example:
13958
13959 @lisp
13960  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
13961        nnmail-fancy-expiry-targets
13962        '((to-from "boss" "nnfolder:Work")
13963          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
13964          ("from" ".*" "nnfolder:Archive-%Y")))
13965 @end lisp
13966
13967 With this setup, any mail that has @code{IMPORTANT} in its Subject
13968 header and was sent in the year @code{YYYY} and month @code{MMM}, will
13969 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}. If its
13970 From or To header contains the string @code{boss}, it will get expired
13971 to @code{nnfolder:Work}. All other mail will get expired to
13972 @code{nnfolder:Archive-YYYY}.
13973
13974 @vindex nnmail-keep-last-article
13975 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
13976 expire the final article in a mail newsgroup.  This is to make life
13977 easier for procmail users.
13978
13979 @vindex gnus-total-expirable-newsgroups
13980 By the way: That line up there, about Gnus never expiring non-expirable
13981 articles, is a lie.  If you put @code{total-expire} in the group
13982 parameters, articles will not be marked as expirable, but all read
13983 articles will be put through the expiry process.  Use with extreme
13984 caution.  Even more dangerous is the
13985 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
13986 this regexp will have all read articles put through the expiry process,
13987 which means that @emph{all} old mail articles in the groups in question
13988 will be deleted after a while.  Use with extreme caution, and don't come
13989 crying to me when you discover that the regexp you used matched the
13990 wrong group and all your important mail has disappeared.  Be a
13991 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
13992 with!  So there!
13993
13994 Most people make most of their mail groups total-expirable, though.
13995
13996 @vindex gnus-inhibit-user-auto-expire
13997 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
13998 commands will not mark an article as expirable, even if the group has
13999 auto-expire turned on.
14000
14001
14002 @node Washing Mail
14003 @subsection Washing Mail
14004 @cindex mail washing
14005 @cindex list server brain damage
14006 @cindex incoming mail treatment
14007
14008 Mailers and list servers are notorious for doing all sorts of really,
14009 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
14010 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14011 end of all lines passing through our server, so let's do that!!!!1!''
14012 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
14013 considered to be self-evident were not discussed.  So.  Here we are.
14014
14015 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
14016 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
14017 be shocked and dismayed by this, but I haven't got the energy.  It is to
14018 laugh.
14019
14020 Gnus provides a plethora of functions for washing articles while
14021 displaying them, but it might be nicer to do the filtering before
14022 storing the mail to disk.  For that purpose, we have three hooks and
14023 various functions that can be put in these hooks.
14024
14025 @table @code
14026 @item nnmail-prepare-incoming-hook
14027 @vindex nnmail-prepare-incoming-hook
14028 This hook is called before doing anything with the mail and is meant for
14029 grand, sweeping gestures.  It is called in a buffer that contains all
14030 the new, incoming mail.  Functions to be used include:
14031
14032 @table @code
14033 @item nnheader-ms-strip-cr
14034 @findex nnheader-ms-strip-cr
14035 Remove trailing carriage returns from each line.  This is default on
14036 Emacs running on MS machines.
14037
14038 @end table
14039
14040 @item nnmail-prepare-incoming-header-hook
14041 @vindex nnmail-prepare-incoming-header-hook
14042 This hook is called narrowed to each header.  It can be used when
14043 cleaning up the headers.  Functions that can be used include:
14044
14045 @table @code
14046 @item nnmail-remove-leading-whitespace
14047 @findex nnmail-remove-leading-whitespace
14048 Clear leading white space that ``helpful'' listservs have added to the
14049 headers to make them look nice.  Aaah.
14050
14051 (Note that this function works on both the header on the body of all
14052 messages, so it is a potentially dangerous function to use (if a body
14053 of a message contains something that looks like a header line).  So
14054 rather than fix the bug, it is of course the right solution to make it
14055 into a feature by documenting it.)
14056
14057 @item nnmail-remove-list-identifiers
14058 @findex nnmail-remove-list-identifiers
14059 Some list servers add an identifier---for example, @samp{(idm)}---to the
14060 beginning of all @code{Subject} headers.  I'm sure that's nice for
14061 people who use stone age mail readers.  This function will remove
14062 strings that match the @code{nnmail-list-identifiers} regexp, which can
14063 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
14064 @code{\\(..\\)}.
14065
14066 For instance, if you want to remove the @samp{(idm)} and the
14067 @samp{nagnagnag} identifiers:
14068
14069 @lisp
14070 (setq nnmail-list-identifiers
14071       '("(idm)" "nagnagnag"))
14072 @end lisp
14073
14074 This can also be done non-destructively with
14075 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14076
14077 @item nnmail-remove-tabs
14078 @findex nnmail-remove-tabs
14079 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14080
14081 @item nnmail-fix-eudora-headers
14082 @findex nnmail-fix-eudora-headers
14083 @cindex Eudora
14084 Eudora produces broken @code{References} headers, but OK
14085 @code{In-Reply-To} headers.  This function will get rid of the
14086 @code{References} headers.
14087
14088 @end table
14089
14090 @item nnmail-prepare-incoming-message-hook
14091 @vindex nnmail-prepare-incoming-message-hook
14092 This hook is called narrowed to each message.  Functions to be used
14093 include:
14094
14095 @table @code
14096 @item article-de-quoted-unreadable
14097 @findex article-de-quoted-unreadable
14098 Decode Quoted Readable encoding.
14099
14100 @end table
14101 @end table
14102
14103
14104 @node Duplicates
14105 @subsection Duplicates
14106
14107 @vindex nnmail-treat-duplicates
14108 @vindex nnmail-message-id-cache-length
14109 @vindex nnmail-message-id-cache-file
14110 @cindex duplicate mails
14111 If you are a member of a couple of mailing lists, you will sometimes
14112 receive two copies of the same mail.  This can be quite annoying, so
14113 @code{nnmail} checks for and treats any duplicates it might find.  To do
14114 this, it keeps a cache of old @code{Message-ID}s---
14115 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14116 default.  The approximate maximum number of @code{Message-ID}s stored
14117 there is controlled by the @code{nnmail-message-id-cache-length}
14118 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14119 stored.) If all this sounds scary to you, you can set
14120 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14121 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14122 will insert a warning into the head of the mail saying that it thinks
14123 that this is a duplicate of a different message.
14124
14125 This variable can also be a function.  If that's the case, the function
14126 will be called from a buffer narrowed to the message in question with
14127 the @code{Message-ID} as a parameter.  The function must return either
14128 @code{nil}, @code{warn}, or @code{delete}.
14129
14130 You can turn this feature off completely by setting the variable to
14131 @code{nil}.
14132
14133 If you want all the duplicate mails to be put into a special
14134 @dfn{duplicates} group, you could do that using the normal mail split
14135 methods:
14136
14137 @lisp
14138 (setq nnmail-split-fancy
14139       '(| ;; Messages duplicates go to a separate group.
14140           ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14141           ;; Message from daemons, postmaster, and the like to another.
14142           (any mail "mail.misc")
14143           ;; Other rules.
14144           [ ... ] ))
14145 @end lisp
14146
14147 Or something like:
14148 @lisp
14149 (setq nnmail-split-methods
14150       '(("duplicates" "^Gnus-Warning:.*duplicate")
14151         ;; Other rules.
14152         [...]))
14153 @end lisp
14154
14155 Here's a neat feature: If you know that the recipient reads her mail
14156 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14157 @code{delete}, you can send her as many insults as you like, just by
14158 using a @code{Message-ID} of a mail that you know that she's already
14159 received.  Think of all the fun!  She'll never see any of it!  Whee!
14160
14161
14162 @node Not Reading Mail
14163 @subsection Not Reading Mail
14164
14165 If you start using any of the mail back ends, they have the annoying
14166 habit of assuming that you want to read mail with them.  This might not
14167 be unreasonable, but it might not be what you want.
14168
14169 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14170 @code{nil}, none of the back ends will ever attempt to read incoming
14171 mail, which should help.
14172
14173 @vindex nnbabyl-get-new-mail
14174 @vindex nnmbox-get-new-mail
14175 @vindex nnml-get-new-mail
14176 @vindex nnmh-get-new-mail
14177 @vindex nnfolder-get-new-mail
14178 This might be too much, if, for instance, you are reading mail quite
14179 happily with @code{nnml} and just want to peek at some old @sc{rmail}
14180 file you have stashed away with @code{nnbabyl}.  All back ends have
14181 variables called back-end-@code{get-new-mail}.  If you want to disable
14182 the @code{nnbabyl} mail reading, you edit the virtual server for the
14183 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14184
14185 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14186 narrowed to the article to be saved before saving it when reading
14187 incoming mail.
14188
14189
14190 @node Choosing a Mail Back End
14191 @subsection Choosing a Mail Back End
14192
14193 Gnus will read the mail spool when you activate a mail group.  The mail
14194 file is first copied to your home directory.  What happens after that
14195 depends on what format you want to store your mail in.
14196
14197 There are six different mail back ends in the standard Gnus, and more
14198 back ends are available separately.  The mail back end most people use
14199 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14200 Spool}).  You might notice that only five back ends are listed below;
14201 @code{nnmaildir}'s documentation has not yet been completely
14202 incorporated into this manual.  Until it is, you can find it at
14203 @uref{http://multivac.cwru.edu./nnmaildir/}.
14204
14205 @menu
14206 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14207 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
14208 * Mail Spool::                  Store your mail in a private spool?
14209 * MH Spool::                    An mhspool-like back end.
14210 * Mail Folders::                Having one file for each group.
14211 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14212 @end menu
14213
14214
14215 @node Unix Mail Box
14216 @subsubsection Unix Mail Box
14217 @cindex nnmbox
14218 @cindex unix mail box
14219
14220 @vindex nnmbox-active-file
14221 @vindex nnmbox-mbox-file
14222 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14223 mail.  @code{nnmbox} will add extra headers to each mail article to say
14224 which group it belongs in.
14225
14226 Virtual server settings:
14227
14228 @table @code
14229 @item nnmbox-mbox-file
14230 @vindex nnmbox-mbox-file
14231 The name of the mail box in the user's home directory.  Default is
14232 @file{~/mbox}.
14233
14234 @item nnmbox-active-file
14235 @vindex nnmbox-active-file
14236 The name of the active file for the mail box.  Default is
14237 @file{~/.mbox-active}.
14238
14239 @item nnmbox-get-new-mail
14240 @vindex nnmbox-get-new-mail
14241 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14242 into groups.  Default is @code{t}.
14243 @end table
14244
14245
14246 @node Rmail Babyl
14247 @subsubsection Rmail Babyl
14248 @cindex nnbabyl
14249 @cindex rmail mbox
14250
14251 @vindex nnbabyl-active-file
14252 @vindex nnbabyl-mbox-file
14253 The @dfn{nnbabyl} back end will use a babyl mail box (aka. @dfn{rmail
14254 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14255 mail article to say which group it belongs in.
14256
14257 Virtual server settings:
14258
14259 @table @code
14260 @item nnbabyl-mbox-file
14261 @vindex nnbabyl-mbox-file
14262 The name of the rmail mbox file.  The default is @file{~/RMAIL}
14263
14264 @item nnbabyl-active-file
14265 @vindex nnbabyl-active-file
14266 The name of the active file for the rmail box.  The default is
14267 @file{~/.rmail-active}
14268
14269 @item nnbabyl-get-new-mail
14270 @vindex nnbabyl-get-new-mail
14271 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14272 @code{t}
14273 @end table
14274
14275
14276 @node Mail Spool
14277 @subsubsection Mail Spool
14278 @cindex nnml
14279 @cindex mail @sc{nov} spool
14280
14281 The @dfn{nnml} spool mail format isn't compatible with any other known
14282 format.  It should be used with some caution.
14283
14284 @vindex nnml-directory
14285 If you use this back end, Gnus will split all incoming mail into files,
14286 one file for each mail, and put the articles into the corresponding
14287 directories under the directory specified by the @code{nnml-directory}
14288 variable.  The default value is @file{~/Mail/}.
14289
14290 You do not have to create any directories beforehand; Gnus will take
14291 care of all that.
14292
14293 If you have a strict limit as to how many files you are allowed to store
14294 in your account, you should not use this back end.  As each mail gets its
14295 own file, you might very well occupy thousands of inodes within a few
14296 weeks.  If this is no problem for you, and it isn't a problem for you
14297 having your friendly systems administrator walking around, madly,
14298 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14299 know that this is probably the fastest format to use.  You do not have
14300 to trudge through a big mbox file just to read your new mail.
14301
14302 @code{nnml} is probably the slowest back end when it comes to article
14303 splitting.  It has to create lots of files, and it also generates
14304 @sc{nov} databases for the incoming mails.  This makes it possibly the
14305 fastest back end when it comes to reading mail.
14306
14307 @cindex self contained nnml servers
14308 @cindex marks
14309 When the marks file is used (which it is by default), @code{nnml}
14310 servers have the property that you may backup them using @code{tar} or
14311 similar, and later be able to restore them into Gnus (by adding the
14312 proper @code{nnml} server) and have all your marks be preserved.  Marks
14313 for a group is usually stored in the @code{.marks} file (but see
14314 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14315 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14316 to restore the group (after restoring the backup into the nnml
14317 directory).
14318
14319 If for some reason you believe your @file{.marks} files are screwed
14320 up, you can just delete them all.  Gnus will then correctly regenerate
14321 them next time it starts.
14322
14323 Virtual server settings:
14324
14325 @table @code
14326 @item nnml-directory
14327 @vindex nnml-directory
14328 All @code{nnml} directories will be placed under this directory.
14329 The default is the value of `message-directory' (whose default value is
14330 @file{~/Mail}).
14331
14332 @item nnml-active-file
14333 @vindex nnml-active-file
14334 The active file for the @code{nnml} server.  The default is
14335 @file{~/Mail/active"}.
14336
14337 @item nnml-newsgroups-file
14338 @vindex nnml-newsgroups-file
14339 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14340 Format}.  The default is @file{~/Mail/newsgroups"}.
14341
14342 @item nnml-get-new-mail
14343 @vindex nnml-get-new-mail
14344 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14345 @code{t}.
14346
14347 @item nnml-nov-is-evil
14348 @vindex nnml-nov-is-evil
14349 If non-@code{nil}, this back end will ignore any @sc{nov} files.  The
14350 default is @code{nil}.
14351
14352 @item nnml-nov-file-name
14353 @vindex nnml-nov-file-name
14354 The name of the @sc{nov} files.  The default is @file{.overview}.
14355
14356 @item nnml-prepare-save-mail-hook
14357 @vindex nnml-prepare-save-mail-hook
14358 Hook run narrowed to an article before saving.
14359
14360 @item nnml-marks-is-evil
14361 @vindex nnml-marks-is-evil
14362 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14363 default is @code{nil}.
14364
14365 @item nnml-marks-file-name
14366 @vindex nnml-marks-file-name
14367 The name of the @dfn{marks} files.  The default is @file{.marks}.
14368
14369 @item nnml-use-compressed-files
14370 @vindex nnml-use-compressed-files
14371 If non-@code{nil}, @code{nnml} will allow using compressed message
14372 files.
14373
14374 @end table
14375
14376 @findex nnml-generate-nov-databases
14377 If your @code{nnml} groups and @sc{nov} files get totally out of whack,
14378 you can do a complete update by typing @kbd{M-x
14379 nnml-generate-nov-databases}.  This command will trawl through the
14380 entire @code{nnml} hierarchy, looking at each and every article, so it
14381 might take a while to complete.  A better interface to this
14382 functionality can be found in the server buffer (@pxref{Server
14383 Commands}).
14384
14385
14386 @node MH Spool
14387 @subsubsection MH Spool
14388 @cindex nnmh
14389 @cindex mh-e mail spool
14390
14391 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14392 @sc{nov} databases and it doesn't keep an active file or marks file.
14393 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
14394 but it also makes it easier to write procmail scripts for.
14395
14396 Virtual server settings:
14397
14398 @table @code
14399 @item nnmh-directory
14400 @vindex nnmh-directory
14401 All @code{nnmh} directories will be located under this directory.  The
14402 default is the value of @code{message-directory} (whose default is
14403 @file{~/Mail})
14404
14405 @item nnmh-get-new-mail
14406 @vindex nnmh-get-new-mail
14407 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14408 @code{t}.
14409
14410 @item nnmh-be-safe
14411 @vindex nnmh-be-safe
14412 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14413 sure that the articles in the folder are actually what Gnus thinks they
14414 are.  It will check date stamps and stat everything in sight, so
14415 setting this to @code{t} will mean a serious slow-down.  If you never
14416 use anything but Gnus to read the @code{nnmh} articles, you do not have
14417 to set this variable to @code{t}.  The default is @code{nil}.
14418 @end table
14419
14420
14421 @node Mail Folders
14422 @subsubsection Mail Folders
14423 @cindex nnfolder
14424 @cindex mbox folders
14425 @cindex mail folders
14426
14427 @code{nnfolder} is a back end for storing each mail group in a separate
14428 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
14429 will add extra headers to keep track of article numbers and arrival
14430 dates.
14431
14432 @cindex self contained nnfolder servers
14433 @cindex marks
14434 When the marks file is used (which it is by default), @code{nnfolder}
14435 servers have the property that you may backup them using @code{tar} or
14436 similar, and later be able to restore them into Gnus (by adding the
14437 proper @code{nnfolder} server) and have all your marks be preserved.
14438 Marks for a group is usually stored in a file named as the mbox file
14439 with @code{.mrk} concatenated to it (but see
14440 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
14441 Individual @code{nnfolder} groups are also possible to backup, use
14442 @kbd{G m} to restore the group (after restoring the backup into the
14443 @code{nnfolder} directory).
14444
14445 Virtual server settings:
14446
14447 @table @code
14448 @item nnfolder-directory
14449 @vindex nnfolder-directory
14450 All the @code{nnfolder} mail boxes will be stored under this directory.
14451 The default is the value of @code{message-directory} (whose default is
14452 @file{~/Mail})
14453
14454 @item nnfolder-active-file
14455 @vindex nnfolder-active-file
14456 The name of the active file.  The default is @file{~/Mail/active}.
14457
14458 @item nnfolder-newsgroups-file
14459 @vindex nnfolder-newsgroups-file
14460 The name of the group descriptions file.  @xref{Newsgroups File
14461 Format}.  The default is @file{~/Mail/newsgroups"}
14462
14463 @item nnfolder-get-new-mail
14464 @vindex nnfolder-get-new-mail
14465 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
14466 is @code{t}
14467
14468 @item nnfolder-save-buffer-hook
14469 @vindex nnfolder-save-buffer-hook
14470 @cindex backup files
14471 Hook run before saving the folders.  Note that Emacs does the normal
14472 backup renaming of files even with the @code{nnfolder} buffers.  If you
14473 wish to switch this off, you could say something like the following in
14474 your @file{.emacs} file:
14475
14476 @lisp
14477 (defun turn-off-backup ()
14478   (set (make-local-variable 'backup-inhibited) t))
14479
14480 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
14481 @end lisp
14482
14483 @item nnfolder-delete-mail-hook
14484 @vindex nnfolder-delete-mail-hook
14485 Hook run in a buffer narrowed to the message that is to be deleted.
14486 This function can be used to copy the message to somewhere else, or to
14487 extract some information from it before removing it.
14488
14489 @item nnfolder-nov-is-evil
14490 @vindex nnfolder-nov-is-evil
14491 If non-@code{nil}, this back end will ignore any @sc{nov} files.  The
14492 default is @code{nil}.
14493
14494 @item nnfolder-nov-file-suffix
14495 @vindex nnfolder-nov-file-suffix
14496 The extension for @sc{nov} files.  The default is @file{.nov}.
14497
14498 @item nnfolder-nov-directory
14499 @vindex nnfolder-nov-directory
14500 The directory where the @sc{nov} files should be stored.  If nil,
14501 @code{nnfolder-directory} is used.
14502
14503 @item nnfolder-marks-is-evil
14504 @vindex nnfolder-marks-is-evil
14505 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14506 default is @code{nil}.
14507
14508 @item nnfolder-marks-file-suffix
14509 @vindex nnfolder-marks-file-suffix
14510 The extension for @sc{marks} files.  The default is @file{.mrk}.
14511
14512 @item nnfolder-marks-directory
14513 @vindex nnfolder-marks-directory
14514 The directory where the @sc{marks} files should be stored.  If nil,
14515 @code{nnfolder-directory} is used.
14516
14517 @end table
14518
14519
14520 @findex nnfolder-generate-active-file
14521 @kindex M-x nnfolder-generate-active-file
14522 If you have lots of @code{nnfolder}-like files you'd like to read with
14523 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
14524 command to make @code{nnfolder} aware of all likely files in
14525 @code{nnfolder-directory}.  This only works if you use long file names,
14526 though.
14527
14528 @node Comparing Mail Back Ends
14529 @subsubsection Comparing Mail Back Ends
14530
14531 First, just for terminology, the @dfn{back end} is the common word for a
14532 low-level access method---a transport, if you will, by which something
14533 is acquired.  The sense is that one's mail has to come from somewhere,
14534 and so selection of a suitable back end is required in order to get that
14535 mail within spitting distance of Gnus.
14536
14537 The same concept exists for Usenet itself: Though access to articles is
14538 typically done by @sc{nntp} these days, once upon a midnight dreary, everyone
14539 in the world got at Usenet by running a reader on the machine where the
14540 articles lay (the machine which today we call an @sc{nntp} server), and
14541 access was by the reader stepping into the articles' directory spool
14542 area directly.  One can still select between either the @code{nntp} or
14543 @code{nnspool} back ends, to select between these methods, if one happens
14544 actually to live on the server (or can see its spool directly, anyway,
14545 via NFS).
14546
14547 The goal in selecting a mail back end is to pick one which
14548 simultaneously represents a suitable way of dealing with the original
14549 format plus leaving mail in a form that is convenient to use in the
14550 future.  Here are some high and low points on each:
14551
14552 @table @code
14553 @item nnmbox
14554
14555 UNIX systems have historically had a single, very common, and well-
14556 defined format.  All messages arrive in a single @dfn{spool file}, and
14557 they are delineated by a line whose regular expression matches
14558 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
14559 to make it clear in this instance that this is not the RFC-specified
14560 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
14561 historically from the Unix environment, it is simplest if one does not
14562 mess a great deal with the original mailbox format, so if one chooses
14563 this back end, Gnus' primary activity in getting mail from the real spool
14564 area to Gnus' preferred directory is simply to copy it, with no
14565 (appreciable) format change in the process.  It is the ``dumbest'' way
14566 to move mail into availability in the Gnus environment.  This makes it
14567 fast to move into place, but slow to parse, when Gnus has to look at
14568 what's where.
14569
14570 @item nnbabyl
14571
14572 Once upon a time, there was the DEC-10 and DEC-20, running operating
14573 systems called TOPS and related things, and the usual (only?) mail
14574 reading environment was a thing called Babyl.  I don't know what format
14575 was used for mail landing on the system, but Babyl had its own internal
14576 format to which mail was converted, primarily involving creating a
14577 spool-file-like entity with a scheme for inserting Babyl-specific
14578 headers and status bits above the top of each message in the file.
14579 RMAIL was Emacs' first mail reader, it was written by Richard Stallman,
14580 and Stallman came out of that TOPS/Babyl environment, so he wrote RMAIL
14581 to understand the mail files folks already had in existence.  Gnus (and
14582 VM, for that matter) continue to support this format because it's
14583 perceived as having some good qualities in those mailer-specific
14584 headers/status bits stuff.  RMAIL itself still exists as well, of
14585 course, and is still maintained by Stallman.
14586
14587 Both of the above forms leave your mail in a single file on your
14588 file system, and they must parse that entire file each time you take a
14589 look at your mail.
14590
14591 @item nnml
14592
14593 @code{nnml} is the back end which smells the most as though you were
14594 actually operating with an @code{nnspool}-accessed Usenet system.  (In
14595 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
14596 lo these years ago.)  One's mail is taken from the original spool file,
14597 and is then cut up into individual message files, 1:1.  It maintains a
14598 Usenet-style active file (analogous to what one finds in an INN- or
14599 CNews-based news system in (for instance) @file{/var/lib/news/active},
14600 or what is returned via the @samp{NNTP LIST} verb) and also creates
14601 @dfn{overview} files for efficient group entry, as has been defined for
14602 @sc{nntp} servers for some years now.  It is slower in mail-splitting,
14603 due to the creation of lots of files, updates to the @code{nnml} active
14604 file, and additions to overview files on a per-message basis, but it is
14605 extremely fast on access because of what amounts to the indexing support
14606 provided by the active file and overviews.
14607
14608 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
14609 resource which defines available places in the file system to put new
14610 files.  Sysadmins take a dim view of heavy inode occupation within
14611 tight, shared file systems.  But if you live on a personal machine where
14612 the file system is your own and space is not at a premium, @code{nnml}
14613 wins big.
14614
14615 It is also problematic using this back end if you are living in a
14616 FAT16-based Windows world, since much space will be wasted on all these
14617 tiny files.
14618
14619 @item nnmh
14620
14621 The Rand MH mail-reading system has been around UNIX systems for a very
14622 long time; it operates by splitting one's spool file of messages into
14623 individual files, but with little or no indexing support -- @code{nnmh}
14624 is considered to be semantically equivalent to ``@code{nnml} without
14625 active file or overviews''.  This is arguably the worst choice, because
14626 one gets the slowness of individual file creation married to the
14627 slowness of access parsing when learning what's new in one's groups.
14628
14629 @item nnfolder
14630
14631 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
14632 method described above) on a per-group basis.  That is, @code{nnmbox}
14633 itself puts *all* one's mail in one file; @code{nnfolder} provides a
14634 little bit of optimization to this so that each of one's mail groups has
14635 a Unix mail box file.  It's faster than @code{nnmbox} because each group
14636 can be parsed separately, and still provides the simple Unix mail box
14637 format requiring minimal effort in moving the mail around.  In addition,
14638 it maintains an ``active'' file making it much faster for Gnus to figure
14639 out how many messages there are in each separate group.
14640
14641 If you have groups that are expected to have a massive amount of
14642 messages, @code{nnfolder} is not the best choice, but if you receive
14643 only a moderate amount of mail, @code{nnfolder} is probably the most
14644 friendly mail back end all over.
14645
14646 @item nnmaildir
14647
14648 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
14649 differences.  Each message is stored in a separate file, but the
14650 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
14651 also stores the equivalent of @code{nnml}'s overview files in one file
14652 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
14653 @code{df -i} to see how plentiful your inode supply is.)  If this slows
14654 you down or takes up very much space, consider switching to ReiserFS
14655 (@uref{http://www.namesys.com/}) or another non-block-structured
14656 file system.
14657
14658 Since maildirs don't require locking for delivery, the maildirs you use
14659 as groups can also be the maildirs your mail is directly delivered to.
14660 This means you can skip Gnus's mail splitting if your mail is already
14661 organized into different mailboxes during delivery.  A @code{directory}
14662 entry in @code{mail-sources} would have a similar effect, but would
14663 require one set of mailboxes for spooling deliveries (in mbox format,
14664 thus damaging message bodies), and another set to be used as groups (in
14665 whatever format you like).  A maildir has a built-in spool, in the
14666 @code{new/} subdirectory.  Beware that currently, mail moved from
14667 @code{new/} to @code{cur/} instead of via mail splitting will undergo
14668 treatment such as duplicate checking.
14669
14670 An article will not necessarily keep the same number across Gnus
14671 sessions; articles are renumbered starting from 1 for each Gnus session
14672 (more precisely, each time you open the @code{nnmaildir} server).  This
14673 way, you don't get gaps in your article number ranges, and when entering
14674 large groups, Gnus is likely to give a more accurate article count.  The
14675 price is that @code{nnmaildir} doesn't work with the cache or agent.
14676 This will probably be changed in the future.
14677
14678 @code{nnmaildir} stores article marks for a given group in the
14679 corresponding maildir, in a way designed so that it's easy to manipulate
14680 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
14681 else, and still have your marks.  @code{nnml} also stores marks, but
14682 it's not as easy to work with them from outside Gnus as with
14683 @code{nnmaildir}.
14684
14685 For configuring expiry and other things, @code{nnmaildir} uses group
14686 parameters slightly different from those of other mail back ends.
14687
14688 @code{nnmaildir} uses a significant amount of memory to speed things up.
14689 (It keeps in memory some of the things that @code{nnml} stores in files
14690 and that @code{nnmh} repeatedly parses out of message files.)  If this
14691 is a problem for you, you can set the @code{nov-cache-size} group
14692 parameter to something small (0 would probably not work, but 1 probably
14693 would) to make it use less memory.
14694
14695 Startup and shutdown are likely to be slower with @code{nnmaildir} than
14696 with other back ends.  Everything in between is likely to be faster,
14697 depending in part on your file system.
14698
14699 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
14700 to write an @code{nnmaildir}-derived back end.
14701
14702 @end table
14703
14704
14705 @node Browsing the Web
14706 @section Browsing the Web
14707 @cindex web
14708 @cindex browsing the web
14709 @cindex www
14710 @cindex http
14711
14712 Web-based discussion forums are getting more and more popular.  On many
14713 subjects, the web-based forums have become the most important forums,
14714 eclipsing the importance of mailing lists and news groups.  The reason
14715 is easy to understand---they are friendly to new users; you just point
14716 and click, and there's the discussion.  With mailing lists, you have to
14717 go through a cumbersome subscription procedure, and most people don't
14718 even know what a news group is.
14719
14720 The problem with this scenario is that web browsers are not very good at
14721 being newsreaders.  They do not keep track of what articles you've read;
14722 they do not allow you to score on subjects you're interested in; they do
14723 not allow off-line browsing; they require you to click around and drive
14724 you mad in the end.
14725
14726 So---if web browsers suck at reading discussion forums, why not use Gnus
14727 to do it instead?
14728
14729 Gnus has been getting a bit of a collection of back ends for providing
14730 interfaces to these sources.
14731
14732 @menu
14733 * Archiving Mail::              
14734 * Web Searches::                Creating groups from articles that match a string.
14735 * Slashdot::                    Reading the Slashdot comments.
14736 * Ultimate::                    The Ultimate Bulletin Board systems.
14737 * Web Archive::                 Reading mailing list archived on web.
14738 * RSS::                         Reading RDF site summary.
14739 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
14740 @end menu
14741
14742 All the web sources require Emacs/w3 and the url library to work.
14743
14744 The main caveat with all these web sources is that they probably won't
14745 work for a very long time.  Gleaning information from the @sc{html} data
14746 is guesswork at best, and when the layout is altered, the Gnus back end
14747 will fail.  If you have reasonably new versions of these back ends,
14748 though, you should be ok.
14749
14750 One thing all these Web methods have in common is that the Web sources
14751 are often down, unavailable or just plain too slow to be fun.  In those
14752 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
14753 Unplugged}) handle downloading articles, and then you can read them at
14754 leisure from your local disk.  No more World Wide Wait for you.
14755
14756 @node Archiving Mail
14757 @subsection Archiving Mail
14758 @cindex archiving mail
14759 @cindex backup of mail
14760
14761 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
14762 @code{nnmaildir}, now actually store the article marks with each group.
14763 For these servers, archiving and restoring a group while preserving
14764 marks is fairly simple.
14765
14766 (Preserving the group level and group parameters as well still
14767 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
14768 though.)
14769
14770 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
14771 server, take a recursive copy of the server directory.  There is no need
14772 to shut down Gnus, so archiving may be invoked by @code{cron} or
14773 similar.  You restore the data by restoring the directory tree, and
14774 adding a server definition pointing to that directory in Gnus. The
14775 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
14776 might interfere with overwriting data, so you may want to shut down Gnus
14777 before you restore the data.
14778
14779 It is also possible to archive individual @code{nnml},
14780 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
14781 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
14782 directory.  For @code{nnfolder} you need to copy both the base folder
14783 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
14784 this example). Restoring the group is done with @kbd{G m} from the Group
14785 buffer.  The last step makes Gnus notice the new directory.
14786 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
14787 is unnecessary in that case.
14788
14789 @node Web Searches
14790 @subsection Web Searches
14791 @cindex nnweb
14792 @cindex Google
14793 @cindex dejanews
14794 @cindex gmane
14795 @cindex Usenet searches
14796 @cindex searching the Usenet
14797
14798 It's, like, too neat to search the Usenet for articles that match a
14799 string, but it, like, totally @emph{sucks}, like, totally, to use one of
14800 those, like, Web browsers, and you, like, have to, rilly, like, look at
14801 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
14802 searches without having to use a browser.
14803
14804 The @code{nnweb} back end allows an easy interface to the mighty search
14805 engine.  You create an @code{nnweb} group, enter a search pattern, and
14806 then enter the group and read the articles like you would any normal
14807 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
14808 Groups}) will do this in an easy-to-use fashion.
14809
14810 @code{nnweb} groups don't really lend themselves to being solid
14811 groups---they have a very fleeting idea of article numbers.  In fact,
14812 each time you enter an @code{nnweb} group (not even changing the search
14813 pattern), you are likely to get the articles ordered in a different
14814 manner.  Not even using duplicate suppression (@pxref{Duplicate
14815 Suppression}) will help, since @code{nnweb} doesn't even know the
14816 @code{Message-ID} of the articles before reading them using some search
14817 engines (Google, for instance).  The only possible way to keep track
14818 of which articles you've read is by scoring on the @code{Date}
14819 header---mark all articles posted before the last date you read the
14820 group as read.
14821
14822 If the search engine changes its output substantially, @code{nnweb}
14823 won't be able to parse it and will fail.  One could hardly fault the Web
14824 providers if they were to do this---their @emph{raison d'être} is to
14825 make money off of advertisements, not to provide services to the
14826 community.  Since @code{nnweb} washes the ads off all the articles, one
14827 might think that the providers might be somewhat miffed.  We'll see.
14828
14829 You must have the @code{url} and @code{w3} package installed to be able
14830 to use @code{nnweb}.
14831
14832 Virtual server variables:
14833
14834 @table @code
14835 @item nnweb-type
14836 @vindex nnweb-type
14837 What search engine type is being used.  The currently supported types
14838 are @code{google}, @code{dejanews}, and @code{gmane}. Note that
14839 @code{dejanews} is an alias to @code{google}.
14840
14841 @item nnweb-search
14842 @vindex nnweb-search
14843 The search string to feed to the search engine.
14844
14845 @item nnweb-max-hits
14846 @vindex nnweb-max-hits
14847 Advisory maximum number of hits per search to display.  The default is
14848 999.
14849
14850 @item nnweb-type-definition
14851 @vindex nnweb-type-definition
14852 Type-to-definition alist.  This alist says what @code{nnweb} should do
14853 with the various search engine types.  The following elements must be
14854 present:
14855
14856 @table @code
14857 @item article
14858 Function to decode the article and provide something that Gnus
14859 understands.
14860
14861 @item map
14862 Function to create an article number to message header and URL alist.
14863
14864 @item search
14865 Function to send the search string to the search engine.
14866
14867 @item address
14868 The address the aforementioned function should send the search string
14869 to.
14870
14871 @item id
14872 Format string URL to fetch an article by @code{Message-ID}.
14873 @end table
14874
14875 @end table
14876
14877
14878 @node Slashdot
14879 @subsection Slashdot
14880 @cindex Slashdot
14881 @cindex nnslashdot
14882
14883 Slashdot (@uref{http://slashdot.org/}) is a popular news site, with
14884 lively discussion following the news articles.  @code{nnslashdot} will
14885 let you read this forum in a convenient manner.
14886
14887 The easiest way to read this source is to put something like the
14888 following in your @file{.gnus.el} file:
14889
14890 @lisp
14891 (setq gnus-secondary-select-methods
14892       '((nnslashdot "")))
14893 @end lisp
14894
14895 This will make Gnus query the @code{nnslashdot} back end for new comments
14896 and groups.  The @kbd{F} command will subscribe each new news article as
14897 a new Gnus group, and you can read the comments by entering these
14898 groups.  (Note that the default subscription method is to subscribe new
14899 groups as zombies.  Other methods are available (@pxref{Subscription
14900 Methods}).
14901
14902 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
14903 command is the most handy tool (@pxref{Foreign Groups}).
14904
14905 When following up to @code{nnslashdot} comments (or posting new
14906 comments), some light @sc{html}izations will be performed.  In
14907 particular, text quoted with @samp{> } will be quoted with
14908 @code{blockquote} instead, and signatures will have @code{br} added to
14909 the end of each line.  Other than that, you can just write @sc{html}
14910 directly into the message buffer.  Note that Slashdot filters out some
14911 @sc{html} forms.
14912
14913 The following variables can be altered to change its behavior:
14914
14915 @table @code
14916 @item nnslashdot-threaded
14917 Whether @code{nnslashdot} should display threaded groups or not.  The
14918 default is @code{t}.  To be able to display threads, @code{nnslashdot}
14919 has to retrieve absolutely all comments in a group upon entry.  If a
14920 threaded display is not required, @code{nnslashdot} will only retrieve
14921 the comments that are actually wanted by the user.  Threading is nicer,
14922 but much, much slower than unthreaded.
14923
14924 @item nnslashdot-login-name
14925 @vindex nnslashdot-login-name
14926 The login name to use when posting.
14927
14928 @item nnslashdot-password
14929 @vindex nnslashdot-password
14930 The password to use when posting.
14931
14932 @item nnslashdot-directory
14933 @vindex nnslashdot-directory
14934 Where @code{nnslashdot} will store its files.  The default is
14935 @samp{~/News/slashdot/}.
14936
14937 @item nnslashdot-active-url
14938 @vindex nnslashdot-active-url
14939 The @sc{url} format string that will be used to fetch the information on
14940 news articles and comments.  The default is
14941 @samp{http://slashdot.org/search.pl?section=&min=%d}.
14942
14943 @item nnslashdot-comments-url
14944 @vindex nnslashdot-comments-url
14945 The @sc{url} format string that will be used to fetch comments.  The
14946 default is
14947 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
14948
14949 @item nnslashdot-article-url
14950 @vindex nnslashdot-article-url
14951 The @sc{url} format string that will be used to fetch the news article.  The
14952 default is
14953 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
14954
14955 @item nnslashdot-threshold
14956 @vindex nnslashdot-threshold
14957 The score threshold.  The default is -1.
14958
14959 @item nnslashdot-group-number
14960 @vindex nnslashdot-group-number
14961 The number of old groups, in addition to the ten latest, to keep
14962 updated.  The default is 0.
14963
14964 @end table
14965
14966
14967
14968 @node Ultimate
14969 @subsection Ultimate
14970 @cindex nnultimate
14971 @cindex Ultimate Bulletin Board
14972
14973 The Ultimate Bulletin Board (@uref{http://www.ultimatebb.com/}) is
14974 probably the most popular Web bulletin board system used.  It has a
14975 quite regular and nice interface, and it's possible to get the
14976 information Gnus needs to keep groups updated.
14977
14978 The easiest way to get started with @code{nnultimate} is to say
14979 something like the following in the group buffer:  @kbd{B nnultimate RET
14980 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
14981 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
14982 you're interested in; there's quite a list of them on the Ultimate web
14983 site.)  Then subscribe to the groups you're interested in from the
14984 server buffer, and read them from the group buffer.
14985
14986 The following @code{nnultimate} variables can be altered:
14987
14988 @table @code
14989 @item nnultimate-directory
14990 @vindex nnultimate-directory
14991 The directory where @code{nnultimate} stores its files.  The default is
14992 @samp{~/News/ultimate/}.
14993 @end table
14994
14995
14996 @node Web Archive
14997 @subsection Web Archive
14998 @cindex nnwarchive
14999 @cindex Web Archive
15000
15001 Some mailing lists only have archives on Web servers, such as
15002 @uref{http://www.egroups.com/} and
15003 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
15004 interface, and it's possible to get the information Gnus needs to keep
15005 groups updated.
15006
15007 The easiest way to get started with @code{nnwarchive} is to say
15008 something like the following in the group buffer: @kbd{M-x
15009 gnus-group-make-warchive-group RET an_egroup RET egroups RET
15010 www.egroups.com RET your@@email.address RET}.  (Substitute the
15011 @sc{an_egroup} with the mailing list you subscribed, the
15012 @sc{your@@email.address} with your email address.), or to browse the
15013 back end by @kbd{B nnwarchive RET mail-archive RET}.
15014
15015 The following @code{nnwarchive} variables can be altered:
15016
15017 @table @code
15018 @item nnwarchive-directory
15019 @vindex nnwarchive-directory
15020 The directory where @code{nnwarchive} stores its files.  The default is
15021 @samp{~/News/warchive/}.
15022
15023 @item nnwarchive-login
15024 @vindex nnwarchive-login
15025 The account name on the web server.
15026
15027 @item nnwarchive-passwd
15028 @vindex nnwarchive-passwd
15029 The password for your account on the web server.
15030 @end table
15031
15032 @node RSS
15033 @subsection RSS
15034 @cindex nnrss
15035 @cindex RSS
15036
15037 Some sites have RDF site summary (RSS)
15038 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
15039 interface, and it's possible to get the information Gnus needs to keep
15040 groups updated.
15041
15042 The easiest way to get started with @code{nnrss} is to say something
15043 like the following in the group buffer: @kbd{B nnrss RET RET}, then
15044 subscribe groups.
15045
15046 The following @code{nnrss} variables can be altered:
15047
15048 @table @code
15049 @item nnrss-directory
15050 @vindex nnrss-directory
15051 The directory where @code{nnrss} stores its files.  The default is
15052 @samp{~/News/rss/}.
15053
15054 @end table
15055
15056 The following code may be helpful, if you want to show the description in
15057 the summary buffer.
15058
15059 @lisp
15060 (add-to-list 'nnmail-extra-headers nnrss-description-field)
15061 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
15062
15063 (defun gnus-user-format-function-X (header)
15064   (let ((descr
15065          (assq nnrss-description-field (mail-header-extra header))))
15066     (if descr (concat "\n\t" (cdr descr)) "")))
15067 @end lisp
15068
15069 The following code may be useful to open an nnrss url directly from the
15070 summary buffer.
15071 @lisp
15072 (require 'browse-url)
15073
15074 (defun browse-nnrss-url( arg )
15075   (interactive "p")
15076   (let ((url (assq nnrss-url-field
15077                    (mail-header-extra
15078                     (gnus-data-header
15079                      (assq (gnus-summary-article-number)
15080                            gnus-newsgroup-data))))))
15081     (if url
15082         (progn
15083           (browse-url (cdr url))
15084           (gnus-summary-mark-as-read-forward 1))
15085       (gnus-summary-scroll-up arg))))
15086
15087 (eval-after-load "gnus"
15088   #'(define-key gnus-summary-mode-map
15089       (kbd "<RET>") 'browse-nnrss-url))
15090 (add-to-list 'nnmail-extra-headers nnrss-url-field)
15091 @end lisp
15092
15093 @node Customizing w3
15094 @subsection Customizing w3
15095 @cindex w3
15096 @cindex html
15097 @cindex url
15098 @cindex Netscape
15099
15100 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
15101 pages.  Emacs/w3 is documented in its own manual, but there are some
15102 things that may be more relevant for Gnus users.
15103
15104 For instance, a common question is how to make Emacs/w3 follow links
15105 using the @code{browse-url} functions (which will call some external web
15106 browser like Netscape).  Here's one way:
15107
15108 @lisp
15109 (eval-after-load "w3"
15110   '(progn
15111     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
15112     (defun w3-fetch (&optional url target)
15113       (interactive (list (w3-read-url-with-default)))
15114       (if (eq major-mode 'gnus-article-mode)
15115           (browse-url url)
15116         (w3-fetch-orig url target)))))
15117 @end lisp
15118
15119 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15120 @sc{html} in the Gnus article buffers will use @code{browse-url} to
15121 follow the link.
15122
15123
15124 @node IMAP
15125 @section IMAP
15126 @cindex nnimap
15127 @cindex @sc{imap}
15128
15129 @sc{imap} is a network protocol for reading mail (or news, or ...),
15130 think of it as a modernized @sc{nntp}.  Connecting to a @sc{imap}
15131 server is much similar to connecting to a news server, you just
15132 specify the network address of the server.
15133
15134 @sc{imap} has two properties.  First, @sc{imap} can do everything that
15135 POP can, it can hence be viewed as a POP++.  Secondly, @sc{imap} is a
15136 mail storage protocol, similar to @sc{nntp} being a news storage
15137 protocol -- however, @sc{imap} offers more features than @sc{nntp}
15138 because news is more or less read-only whereas mail is read-write.
15139
15140 If you want to use @sc{imap} as a POP++, use an imap entry in
15141 @code{mail-sources}.  With this, Gnus will fetch mails from the
15142 @sc{imap} server and store them on the local disk.  This is not the
15143 usage described in this section--@xref{Mail Sources}.
15144
15145 If you want to use @sc{imap} as a mail storage protocol, use an nnimap
15146 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15147 manipulate mails stored on the @sc{imap} server.  This is the kind of
15148 usage explained in this section.
15149
15150 A server configuration in @code{~/.gnus} with a few @sc{imap} servers
15151 might look something like the following. (Note that for SSL/TLS, you
15152 need external programs and libraries, see below.)
15153
15154 @lisp
15155 (setq gnus-secondary-select-methods
15156       '((nnimap "simpleserver") ; no special configuration
15157         ; perhaps a ssh port forwarded server:
15158         (nnimap "dolk"
15159                 (nnimap-address "localhost")
15160                 (nnimap-server-port 1430))
15161         ; a UW server running on localhost
15162         (nnimap "barbar"
15163                 (nnimap-server-port 143)
15164                 (nnimap-address "localhost")
15165                 (nnimap-list-pattern ("INBOX" "mail/*")))
15166         ; anonymous public cyrus server:
15167         (nnimap "cyrus.andrew.cmu.edu"
15168                 (nnimap-authenticator anonymous)
15169                 (nnimap-list-pattern "archive.*")
15170                 (nnimap-stream network))
15171         ; a ssl server on a non-standard port:
15172         (nnimap "vic20"
15173                 (nnimap-address "vic20.somewhere.com")
15174                 (nnimap-server-port 9930)
15175                 (nnimap-stream ssl))))
15176 @end lisp
15177
15178 After defining the new server, you can subscribe to groups on the
15179 server using normal Gnus commands such as @kbd{U} in the Group Buffer
15180 (@pxref{Subscription Commands}) or via the Server Buffer
15181 (@pxref{Server Buffer}).
15182
15183 The following variables can be used to create a virtual @code{nnimap}
15184 server:
15185
15186 @table @code
15187
15188 @item nnimap-address
15189 @vindex nnimap-address
15190
15191 The address of the remote @sc{imap} server.  Defaults to the virtual
15192 server name if not specified.
15193
15194 @item nnimap-server-port
15195 @vindex nnimap-server-port
15196 Port on server to contact.  Defaults to port 143, or 993 for SSL.
15197
15198 Note that this should be an integer, example server specification:
15199
15200 @lisp
15201 (nnimap "mail.server.com"
15202         (nnimap-server-port 4711))
15203 @end lisp
15204
15205 @item nnimap-list-pattern
15206 @vindex nnimap-list-pattern
15207 String or list of strings of mailboxes to limit available groups to.
15208 This is used when the server has very many mailboxes and you're only
15209 interested in a few -- some servers export your home directory via
15210 @sc{imap}, you'll probably want to limit the mailboxes to those in
15211 @file{~/Mail/*} then.
15212
15213 The string can also be a cons of REFERENCE and the string as above, what
15214 REFERENCE is used for is server specific, but on the University of
15215 Washington server it's a directory that will be concatenated with the
15216 mailbox.
15217
15218 Example server specification:
15219
15220 @lisp
15221 (nnimap "mail.server.com"
15222         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15223                                ("~friend/Mail/" . "list/*"))))
15224 @end lisp
15225
15226 @item nnimap-stream
15227 @vindex nnimap-stream
15228 The type of stream used to connect to your server.  By default, nnimap
15229 will detect and automatically use all of the below, with the exception
15230 of SSL/TLS. (@sc{imap} over SSL/TLS is being replaced by STARTTLS, which
15231 can be automatically detected, but it's not widely deployed yet.)
15232
15233 Example server specification:
15234
15235 @lisp
15236 (nnimap "mail.server.com"
15237         (nnimap-stream ssl))
15238 @end lisp
15239
15240 Please note that the value of @code{nnimap-stream} is a symbol!
15241
15242 @itemize @bullet
15243 @item
15244 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5). Requires the
15245 @samp{imtest} program.
15246 @item
15247 @dfn{kerberos4:} Connect with Kerberos 4. Requires the @samp{imtest} program.
15248 @item
15249 @dfn{starttls:} Connect via the STARTTLS extension (similar to
15250 SSL).  Requires the external library @samp{starttls.el} and program
15251 @samp{starttls}.
15252 @item
15253 @dfn{ssl:} Connect through SSL.  Requires OpenSSL (the program
15254 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
15255 library @samp{ssl.el}.
15256 @item
15257 @dfn{shell:} Use a shell command to start @sc{imap} connection.
15258 @item
15259 @dfn{network:} Plain, TCP/IP network connection.
15260 @end itemize
15261
15262 @vindex imap-kerberos4-program
15263 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
15264 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
15265 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
15266 to make @code{imap.el} use a pty instead of a pipe when communicating
15267 with @samp{imtest}.  You will then suffer from a line length
15268 restrictions on @sc{imap} commands, which might make Gnus seem to hang
15269 indefinitely if you have many articles in a mailbox.  The variable
15270 @code{imap-kerberos4-program} contain parameters to pass to the imtest
15271 program.
15272
15273 @vindex imap-ssl-program
15274 For SSL connections, the OpenSSL program is available from
15275 @uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay,
15276 and nnimap support it too - although the most recent versions of
15277 SSLeay, 0.9.x, are known to have serious bugs making it
15278 useless. Earlier versions, especially 0.8.x, of SSLeay are known to
15279 work. The variable @code{imap-ssl-program} contain parameters to pass
15280 to OpenSSL/SSLeay.  You also need @samp{ssl.el} (from the W3
15281 distribution, for instance).
15282
15283 @vindex imap-shell-program
15284 @vindex imap-shell-host
15285 For @sc{imap} connections using the @code{shell} stream, the variable
15286 @code{imap-shell-program} specify what program to call.
15287
15288 @item nnimap-authenticator
15289 @vindex nnimap-authenticator
15290
15291 The authenticator used to connect to the server.  By default, nnimap
15292 will use the most secure authenticator your server is capable of.
15293
15294 Example server specification:
15295
15296 @lisp
15297 (nnimap "mail.server.com"
15298         (nnimap-authenticator anonymous))
15299 @end lisp
15300
15301 Please note that the value of @code{nnimap-authenticator} is a symbol!
15302
15303 @itemize @bullet
15304 @item
15305 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication. Requires
15306 external program @code{imtest}.
15307 @item
15308 @dfn{kerberos4:} Kerberos 4 authentication. Requires external program
15309 @code{imtest}.
15310 @item
15311 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5. Requires
15312 external library @code{digest-md5.el}.
15313 @item
15314 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
15315 @item
15316 @dfn{login:} Plain-text username/password via LOGIN.
15317 @item
15318 @dfn{anonymous:} Login as `anonymous', supplying your email address as password.
15319 @end itemize
15320
15321 @item nnimap-expunge-on-close
15322 @cindex Expunging
15323 @vindex nnimap-expunge-on-close
15324 Unlike Parmenides the @sc{imap} designers has decided that things that
15325 doesn't exist actually does exist.  More specifically, @sc{imap} has
15326 this concept of marking articles @code{Deleted} which doesn't actually
15327 delete them, and this (marking them @code{Deleted}, that is) is what
15328 nnimap does when you delete a article in Gnus (with @kbd{B DEL} or
15329 similar).
15330
15331 Since the articles aren't really removed when we mark them with the
15332 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
15333 running in circles yet?
15334
15335 Traditionally, nnimap has removed all articles marked as @code{Deleted}
15336 when closing a mailbox but this is now configurable by this server
15337 variable.
15338
15339 The possible options are:
15340
15341 @table @code
15342
15343 @item always
15344 The default behavior, delete all articles marked as "Deleted" when
15345 closing a mailbox.
15346 @item never
15347 Never actually delete articles.  Currently there is no way of showing
15348 the articles marked for deletion in nnimap, but other @sc{imap} clients
15349 may allow you to do this.  If you ever want to run the EXPUNGE command
15350 manually, @xref{Expunging mailboxes}.
15351 @item ask
15352 When closing mailboxes, nnimap will ask if you wish to expunge deleted
15353 articles or not.
15354
15355 @end table
15356
15357 @item nnimap-importantize-dormant
15358 @vindex nnimap-importantize-dormant
15359
15360 If non-nil (the default), marks dormant articles as ticked (as well),
15361 for other @sc{imap} clients. Within Gnus, dormant articles will
15362 naturally still (only) be marked as dormant.  This is to make dormant
15363 articles stand out, just like ticked articles, in other @sc{imap}
15364 clients. (In other words, Gnus has two ``Tick'' marks and @sc{imap}
15365 has only one.)
15366
15367 Probably the only reason for frobing this would be if you're trying
15368 enable per-user persistant dormant flags, using something like:
15369
15370 @lisp
15371 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
15372         (format "gnus-dormant-%s" (user-login-name)))
15373 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
15374         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
15375 @end lisp
15376
15377 In this case, you would not want the per-user dormant flag showing up
15378 as ticked for other users.
15379
15380 @item nnimap-expunge-search-string
15381 @cindex Expunging
15382 @vindex nnimap-expunge-search-string
15383
15384 This variable contain the @sc{imap} search command sent to server when
15385 searching for articles eligible for expiring.  The default is
15386 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
15387 UID set and the second @code{%s} is replaced by a date.
15388
15389 Probably the only useful value to change this to is
15390 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
15391 messages instead of the internal article date. See section 6.4.4 of
15392 RFC 2060 for more information on valid strings.
15393
15394 @item nnimap-authinfo-file
15395 @vindex nnimap-authinfo-file
15396
15397 A file containing credentials used to log in on servers.  The format is
15398 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
15399 variable @code{nntp-authinfo-file} for exact syntax; also see
15400 @ref{NNTP}.
15401
15402 @end table
15403
15404 @menu
15405 * Splitting in IMAP::           Splitting mail with nnimap.
15406 * Expiring in IMAP::            Expiring mail with nnimap.
15407 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
15408 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
15409 * A note on namespaces::        How to (not) use IMAP namespace in Gnus.
15410 @end menu
15411
15412
15413
15414 @node Splitting in IMAP
15415 @subsection Splitting in IMAP
15416 @cindex splitting imap mail
15417
15418 Splitting is something Gnus users has loved and used for years, and now
15419 the rest of the world is catching up.  Yeah, dream on, not many
15420 @sc{imap} server has server side splitting and those that have splitting
15421 seem to use some non-standard protocol.  This means that @sc{imap}
15422 support for Gnus has to do it's own splitting.
15423
15424 And it does.
15425
15426 Here are the variables of interest:
15427
15428 @table @code
15429
15430 @item nnimap-split-crosspost
15431 @cindex splitting, crosspost
15432 @cindex crosspost
15433 @vindex nnimap-split-crosspost
15434
15435 If non-nil, do crossposting if several split methods match the mail.  If
15436 nil, the first match in @code{nnimap-split-rule} found will be used.
15437
15438 Nnmail equivalent: @code{nnmail-crosspost}.
15439
15440 @item nnimap-split-inbox
15441 @cindex splitting, inbox
15442 @cindex inbox
15443 @vindex nnimap-split-inbox
15444
15445 A string or a list of strings that gives the name(s) of @sc{imap}
15446 mailboxes to split from.  Defaults to nil, which means that splitting is
15447 disabled!
15448
15449 @lisp
15450 (setq nnimap-split-inbox
15451       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
15452 @end lisp
15453
15454 No nnmail equivalent.
15455
15456 @item nnimap-split-rule
15457 @cindex Splitting, rules
15458 @vindex nnimap-split-rule
15459
15460 New mail found in @code{nnimap-split-inbox} will be split according to
15461 this variable.
15462
15463 This variable contains a list of lists, where the first element in the
15464 sublist gives the name of the @sc{imap} mailbox to move articles
15465 matching the regexp in the second element in the sublist.  Got that?
15466 Neither did I, we need examples.
15467
15468 @lisp
15469 (setq nnimap-split-rule
15470       '(("INBOX.nnimap"
15471          "^Sender: owner-nnimap@@vic20.globalcom.se")
15472         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
15473         ("INBOX.private" "")))
15474 @end lisp
15475
15476 This will put all articles from the nnimap mailing list into mailbox
15477 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
15478 into INBOX.junk and everything else in INBOX.private.
15479
15480 The first string may contain `\\1' forms, like the ones used by
15481 replace-match to insert sub-expressions from the matched text.  For
15482 instance:
15483
15484 @lisp
15485 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
15486 @end lisp
15487
15488 The first element can also be the symbol @code{junk} to indicate that
15489 matching messages should simply be deleted.  Use with care.
15490
15491 The second element can also be a function.  In that case, it will be
15492 called with the first element of the rule as the argument, in a buffer
15493 containing the headers of the article.  It should return a non-nil value
15494 if it thinks that the mail belongs in that group.
15495
15496 Nnmail users might recollect that the last regexp had to be empty to
15497 match all articles (like in the example above).  This is not required in
15498 nnimap.  Articles not matching any of the regexps will not be moved out
15499 of your inbox.  (This might affect performance if you keep lots of
15500 unread articles in your inbox, since the splitting code would go over
15501 them every time you fetch new mail.)
15502
15503 These rules are processed from the beginning of the alist toward the
15504 end.  The first rule to make a match will "win", unless you have
15505 crossposting enabled.  In that case, all matching rules will "win".
15506
15507 This variable can also have a function as its value, the function will
15508 be called with the headers narrowed and should return a group where it
15509 thinks the article should be split to.  See @code{nnimap-split-fancy}.
15510
15511 The splitting code tries to create mailboxes if it needs to.
15512
15513 To allow for different split rules on different virtual servers, and
15514 even different split rules in different inboxes on the same server,
15515 the syntax of this variable have been extended along the lines of:
15516
15517 @lisp
15518 (setq nnimap-split-rule
15519       '(("my1server"    (".*"    (("ding"    "ding@@gnus.org")
15520                                   ("junk"    "From:.*Simon")))
15521         ("my2server"    ("INBOX" nnimap-split-fancy))
15522         ("my[34]server" (".*"    (("private" "To:.*Simon")
15523                                   ("junk"    my-junk-func)))))
15524 @end lisp
15525
15526 The virtual server name is in fact a regexp, so that the same rules
15527 may apply to several servers.  In the example, the servers
15528 @code{my3server} and @code{my4server} both use the same rules.
15529 Similarly, the inbox string is also a regexp.  The actual splitting
15530 rules are as before, either a function, or a list with group/regexp or
15531 group/function elements.
15532
15533 Nnmail equivalent: @code{nnmail-split-methods}.
15534
15535 @item nnimap-split-predicate
15536 @cindex splitting
15537 @vindex nnimap-split-predicate
15538
15539 Mail matching this predicate in @code{nnimap-split-inbox} will be
15540 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
15541
15542 This might be useful if you use another @sc{imap} client to read mail in
15543 your inbox but would like Gnus to split all articles in the inbox
15544 regardless of readedness. Then you might change this to
15545 @samp{UNDELETED}.
15546
15547 @item nnimap-split-fancy
15548 @cindex splitting, fancy
15549 @findex nnimap-split-fancy
15550 @vindex nnimap-split-fancy
15551
15552 It's possible to set @code{nnimap-split-rule} to
15553 @code{nnmail-split-fancy} if you want to use fancy
15554 splitting. @xref{Fancy Mail Splitting}.
15555
15556 However, to be able to have different fancy split rules for nnmail and
15557 nnimap back ends you can set @code{nnimap-split-rule} to
15558 @code{nnimap-split-fancy} and define the nnimap specific fancy split
15559 rule in @code{nnimap-split-fancy}.
15560
15561 Example:
15562
15563 @lisp
15564 (setq nnimap-split-rule 'nnimap-split-fancy
15565       nnimap-split-fancy ...)
15566 @end lisp
15567
15568 Nnmail equivalent: @code{nnmail-split-fancy}.
15569
15570 @item nnimap-split-download-body
15571 @findex nnimap-split-download-body
15572 @vindex nnimap-split-download-body
15573
15574 Set to non-nil to download entire articles during splitting.  This is
15575 generally not required, and will slow things down considerably.  You
15576 may need it if you want to use an advanced splitting function that
15577 analyses the body to split the article.
15578
15579 @end table
15580
15581 @node Expiring in IMAP
15582 @subsection Expiring in IMAP
15583 @cindex expiring imap mail
15584
15585 Even though @code{nnimap} is not a proper @code{nnmail} derived back
15586 end, it supports most features in regular expiring (@pxref{Expiring
15587 Mail}).  Unlike splitting in IMAP (@pxref{Splitting in IMAP}) it do
15588 not clone the @code{nnmail} variables (i.e., creating
15589 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
15590 follows below are the variables used by the @code{nnimap} expiry
15591 process.
15592
15593 A note on how the expire mark is stored on the @sc{imap} server is
15594 appropriate here as well.  The expire mark is translated into a
15595 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
15596 message.  This means that likely only Gnus will understand and treat
15597 the @code{gnus-expire} mark properly, although other clients may allow
15598 you to view client specific flags on the message.  It also means that
15599 your server must support permanent storage of client specific flags on
15600 messages.  Most do, fortunately.
15601
15602 @table @code
15603
15604 @item nnmail-expiry-wait
15605 @item nnmail-expiry-wait-function
15606
15607 These variables are fully supported.  The expire value can be a
15608 number, the symbol @var{immediate} or @var{never}.
15609
15610 @item nnmail-expiry-target
15611
15612 This variable is supported, and internally implemented by calling the
15613 @code{nnmail} functions that handle this.  It contains an optimization
15614 that if the destination is a IMAP group on the same server, the
15615 article is copied instead of appended (that is, uploaded again).
15616
15617 @end table
15618
15619 @node Editing IMAP ACLs
15620 @subsection Editing IMAP ACLs
15621 @cindex editing imap acls
15622 @cindex Access Control Lists
15623 @cindex Editing @sc{imap} ACLs
15624 @kindex G l
15625 @findex gnus-group-nnimap-edit-acl
15626
15627 ACL stands for Access Control List.  ACLs are used in @sc{imap} for
15628 limiting (or enabling) other users access to your mail boxes.  Not all
15629 @sc{imap} servers support this, this function will give an error if it
15630 doesn't.
15631
15632 To edit a ACL for a mailbox, type @kbd{G l}
15633 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with a ACL
15634 editing window with detailed instructions.
15635
15636 Some possible uses:
15637
15638 @itemize @bullet
15639 @item
15640 Giving "anyone" the "lrs" rights (lookup, read, keep seen/unseen flags)
15641 on your mailing list mailboxes enables other users on the same server to
15642 follow the list without subscribing to it.
15643 @item
15644 At least with the Cyrus server, you are required to give the user
15645 "anyone" posting ("p") capabilities to have "plussing" work (that is,
15646 mail sent to user+mailbox@@domain ending up in the @sc{imap} mailbox
15647 INBOX.mailbox).
15648 @end itemize
15649
15650 @node Expunging mailboxes
15651 @subsection Expunging mailboxes
15652 @cindex expunging
15653
15654 @cindex Expunge
15655 @cindex Manual expunging
15656 @kindex G x
15657 @findex gnus-group-nnimap-expunge
15658
15659 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
15660 you may want the option of expunging all deleted articles in a mailbox
15661 manually.  This is exactly what @kbd{G x} does.
15662
15663 Currently there is no way of showing deleted articles, you can just
15664 delete them.
15665
15666 @node A note on namespaces
15667 @subsection A note on namespaces
15668 @cindex IMAP namespace
15669 @cindex namespaces
15670
15671 The IMAP protocol has a concept called namespaces, described by the
15672 following text in the RFC:
15673
15674 @example
15675 5.1.2.  Mailbox Namespace Naming Convention
15676
15677    By convention, the first hierarchical element of any mailbox name
15678    which begins with "#" identifies the "namespace" of the remainder of
15679    the name.  This makes it possible to disambiguate between different
15680    types of mailbox stores, each of which have their own namespaces.
15681
15682       For example, implementations which offer access to USENET
15683       newsgroups MAY use the "#news" namespace to partition the USENET
15684       newsgroup namespace from that of other mailboxes.  Thus, the
15685       comp.mail.misc newsgroup would have an mailbox name of
15686       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
15687       to a different object (e.g. a user's private mailbox).
15688 @end example
15689
15690 While there is nothing in this text that warrants concern for the IMAP
15691 implementation in Gnus, some servers use namespace prefixes in a way
15692 that does not work with how Gnus uses mailbox names.
15693
15694 Specifically, University of Washington's IMAP server uses mailbox
15695 names like @code{#driver.mbx/read-mail} which are valid only in the
15696 @sc{create} and @sc{append} commands.  After the mailbox is created
15697 (or a messages is appended to a mailbox), it must be accessed without
15698 the namespace prefix, i.e @code{read-mail}.  Since Gnus do not make it
15699 possible for the user to guarantee that user entered mailbox names
15700 will only be used with the CREATE and APPEND commands, you should
15701 simply not use the namespace prefixed mailbox names in Gnus.
15702
15703 See the UoW @sc{imapd} documentation for the @code{#driver.*/} prefix
15704 for more information on how to use the prefixes.  They are a power
15705 tool and should be used only if you are sure what the effects are.
15706
15707 @node Other Sources
15708 @section Other Sources
15709
15710 Gnus can do more than just read news or mail.  The methods described
15711 below allow Gnus to view directories and files as if they were
15712 newsgroups.
15713
15714 @menu
15715 * Directory Groups::            You can read a directory as if it was a newsgroup.
15716 * Anything Groups::             Dired?  Who needs dired?
15717 * Document Groups::             Single files can be the basis of a group.
15718 * SOUP::                        Reading @sc{soup} packets ``offline''.
15719 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
15720 @end menu
15721
15722
15723 @node Directory Groups
15724 @subsection Directory Groups
15725 @cindex nndir
15726 @cindex directory groups
15727
15728 If you have a directory that has lots of articles in separate files in
15729 it, you might treat it as a newsgroup.  The files have to have numerical
15730 names, of course.
15731
15732 This might be an opportune moment to mention @code{ange-ftp} (and its
15733 successor @code{efs}), that most wonderful of all wonderful Emacs
15734 packages.  When I wrote @code{nndir}, I didn't think much about it---a
15735 back end to read directories.  Big deal.
15736
15737 @code{ange-ftp} changes that picture dramatically.  For instance, if you
15738 enter the @code{ange-ftp} file name
15739 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
15740 @code{ange-ftp} or @code{efs} will actually allow you to read this
15741 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
15742
15743 @code{nndir} will use @sc{nov} files if they are present.
15744
15745 @code{nndir} is a ``read-only'' back end---you can't delete or expire
15746 articles with this method.  You can use @code{nnmh} or @code{nnml} for
15747 whatever you use @code{nndir} for, so you could switch to any of those
15748 methods if you feel the need to have a non-read-only @code{nndir}.
15749
15750
15751 @node Anything Groups
15752 @subsection Anything Groups
15753 @cindex nneething
15754
15755 From the @code{nndir} back end (which reads a single spool-like
15756 directory), it's just a hop and a skip to @code{nneething}, which
15757 pretends that any arbitrary directory is a newsgroup.  Strange, but
15758 true.
15759
15760 When @code{nneething} is presented with a directory, it will scan this
15761 directory and assign article numbers to each file.  When you enter such
15762 a group, @code{nneething} must create ``headers'' that Gnus can use.
15763 After all, Gnus is a newsreader, in case you're forgetting.
15764 @code{nneething} does this in a two-step process.  First, it snoops each
15765 file in question.  If the file looks like an article (i.e., the first
15766 few lines look like headers), it will use this as the head.  If this is
15767 just some arbitrary file without a head (e.g. a C source file),
15768 @code{nneething} will cobble up a header out of thin air.  It will use
15769 file ownership, name and date and do whatever it can with these
15770 elements.
15771
15772 All this should happen automatically for you, and you will be presented
15773 with something that looks very much like a newsgroup.  Totally like a
15774 newsgroup, to be precise.  If you select an article, it will be displayed
15775 in the article buffer, just as usual.
15776
15777 If you select a line that represents a directory, Gnus will pop you into
15778 a new summary buffer for this @code{nneething} group.  And so on.  You can
15779 traverse the entire disk this way, if you feel like, but remember that
15780 Gnus is not dired, really, and does not intend to be, either.
15781
15782 There are two overall modes to this action---ephemeral or solid.  When
15783 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
15784 will not store information on what files you have read, and what files
15785 are new, and so on.  If you create a solid @code{nneething} group the
15786 normal way with @kbd{G m}, Gnus will store a mapping table between
15787 article numbers and file names, and you can treat this group like any
15788 other groups.  When you activate a solid @code{nneething} group, you will
15789 be told how many unread articles it contains, etc., etc.
15790
15791 Some variables:
15792
15793 @table @code
15794 @item nneething-map-file-directory
15795 @vindex nneething-map-file-directory
15796 All the mapping files for solid @code{nneething} groups will be stored
15797 in this directory, which defaults to @file{~/.nneething/}.
15798
15799 @item nneething-exclude-files
15800 @vindex nneething-exclude-files
15801 All files that match this regexp will be ignored.  Nice to use to exclude
15802 auto-save files and the like, which is what it does by default.
15803
15804 @item nneething-include-files
15805 @vindex nneething-include-files
15806 Regexp saying what files to include in the group.  If this variable is
15807 non-@code{nil}, only files matching this regexp will be included.
15808
15809 @item nneething-map-file
15810 @vindex nneething-map-file
15811 Name of the map files.
15812 @end table
15813
15814
15815 @node Document Groups
15816 @subsection Document Groups
15817 @cindex nndoc
15818 @cindex documentation group
15819 @cindex help group
15820
15821 @code{nndoc} is a cute little thing that will let you read a single file
15822 as a newsgroup.  Several files types are supported:
15823
15824 @table @code
15825 @cindex babyl
15826 @cindex rmail mbox
15827
15828 @item babyl
15829 The babyl (rmail) mail box.
15830 @cindex mbox
15831 @cindex Unix mbox
15832
15833 @item mbox
15834 The standard Unix mbox file.
15835
15836 @cindex MMDF mail box
15837 @item mmdf
15838 The MMDF mail box format.
15839
15840 @item news
15841 Several news articles appended into a file.
15842
15843 @item rnews
15844 @cindex rnews batch files
15845 The rnews batch transport format.
15846 @cindex forwarded messages
15847
15848 @item forward
15849 Forwarded articles.
15850
15851 @item nsmail
15852 Netscape mail boxes.
15853
15854 @item mime-parts
15855 @sc{mime} multipart messages.
15856
15857 @item standard-digest
15858 The standard (RFC 1153) digest format.
15859
15860 @item mime-digest
15861 A @sc{mime} digest of messages.
15862
15863 @item lanl-gov-announce
15864 Announcement messages from LANL Gov Announce.
15865
15866 @item rfc822-forward
15867 A message forwarded according to RFC822.
15868
15869 @item outlook
15870 The Outlook mail box.
15871
15872 @item oe-dbx
15873 The Outlook Express dbx mail box.
15874
15875 @item exim-bounce
15876 A bounce message from the Exim MTA.
15877
15878 @item forward
15879 A message forwarded according to informal rules.
15880
15881 @item rfc934
15882 An RFC934-forwarded message.
15883
15884 @item mailman
15885 A mailman digest.
15886
15887 @item clari-briefs
15888 A digest of Clarinet brief news items.
15889
15890 @item slack-digest
15891 Non-standard digest format---matches most things, but does it badly.
15892
15893 @item mail-in-mail
15894 The last resort.
15895 @end table
15896
15897 You can also use the special ``file type'' @code{guess}, which means
15898 that @code{nndoc} will try to guess what file type it is looking at.
15899 @code{digest} means that @code{nndoc} should guess what digest type the
15900 file is.
15901
15902 @code{nndoc} will not try to change the file or insert any extra headers into
15903 it---it will simply, like, let you use the file as the basis for a
15904 group.  And that's it.
15905
15906 If you have some old archived articles that you want to insert into your
15907 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
15908 that.  Say you have an old @file{RMAIL} file with mail that you now want
15909 to split into your new @code{nnml} groups.  You look at that file using
15910 @code{nndoc} (using the @kbd{G f} command in the group buffer
15911 (@pxref{Foreign Groups})), set the process mark on all the articles in
15912 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
15913 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
15914 file is now also stored in lots of @code{nnml} directories, and you can
15915 delete that pesky @file{RMAIL} file.  If you have the guts!
15916
15917 Virtual server variables:
15918
15919 @table @code
15920 @item nndoc-article-type
15921 @vindex nndoc-article-type
15922 This should be one of @code{mbox}, @code{babyl}, @code{digest},
15923 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
15924 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
15925 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
15926 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
15927
15928 @item nndoc-post-type
15929 @vindex nndoc-post-type
15930 This variable says whether Gnus is to consider the group a news group or
15931 a mail group.  There are two valid values:  @code{mail} (the default)
15932 and @code{news}.
15933 @end table
15934
15935 @menu
15936 * Document Server Internals::   How to add your own document types.
15937 @end menu
15938
15939
15940 @node Document Server Internals
15941 @subsubsection Document Server Internals
15942
15943 Adding new document types to be recognized by @code{nndoc} isn't
15944 difficult.  You just have to whip up a definition of what the document
15945 looks like, write a predicate function to recognize that document type,
15946 and then hook into @code{nndoc}.
15947
15948 First, here's an example document type definition:
15949
15950 @example
15951 (mmdf
15952  (article-begin .  "^\^A\^A\^A\^A\n")
15953  (body-end .  "^\^A\^A\^A\^A\n"))
15954 @end example
15955
15956 The definition is simply a unique @dfn{name} followed by a series of
15957 regexp pseudo-variable settings.  Below are the possible
15958 variables---don't be daunted by the number of variables; most document
15959 types can be defined with very few settings:
15960
15961 @table @code
15962 @item first-article
15963 If present, @code{nndoc} will skip past all text until it finds
15964 something that match this regexp.  All text before this will be
15965 totally ignored.
15966
15967 @item article-begin
15968 This setting has to be present in all document type definitions.  It
15969 says what the beginning of each article looks like.
15970
15971 @item head-begin-function
15972 If present, this should be a function that moves point to the head of
15973 the article.
15974
15975 @item nndoc-head-begin
15976 If present, this should be a regexp that matches the head of the
15977 article.
15978
15979 @item nndoc-head-end
15980 This should match the end of the head of the article.  It defaults to
15981 @samp{^$}---the empty line.
15982
15983 @item body-begin-function
15984 If present, this function should move point to the beginning of the body
15985 of the article.
15986
15987 @item body-begin
15988 This should match the beginning of the body of the article.  It defaults
15989 to @samp{^\n}.
15990
15991 @item body-end-function
15992 If present, this function should move point to the end of the body of
15993 the article.
15994
15995 @item body-end
15996 If present, this should match the end of the body of the article.
15997
15998 @item file-end
15999 If present, this should match the end of the file.  All text after this
16000 regexp will be totally ignored.
16001
16002 @end table
16003
16004 So, using these variables @code{nndoc} is able to dissect a document
16005 file into a series of articles, each with a head and a body.  However, a
16006 few more variables are needed since not all document types are all that
16007 news-like---variables needed to transform the head or the body into
16008 something that's palatable for Gnus:
16009
16010 @table @code
16011 @item prepare-body-function
16012 If present, this function will be called when requesting an article.  It
16013 will be called with point at the start of the body, and is useful if the
16014 document has encoded some parts of its contents.
16015
16016 @item article-transform-function
16017 If present, this function is called when requesting an article.  It's
16018 meant to be used for more wide-ranging transformation of both head and
16019 body of the article.
16020
16021 @item generate-head-function
16022 If present, this function is called to generate a head that Gnus can
16023 understand.  It is called with the article number as a parameter, and is
16024 expected to generate a nice head for the article in question.  It is
16025 called when requesting the headers of all articles.
16026
16027 @end table
16028
16029 Let's look at the most complicated example I can come up with---standard
16030 digests:
16031
16032 @example
16033 (standard-digest
16034  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16035  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16036  (prepare-body-function . nndoc-unquote-dashes)
16037  (body-end-function . nndoc-digest-body-end)
16038  (head-end . "^ ?$")
16039  (body-begin . "^ ?\n")
16040  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16041  (subtype digest guess))
16042 @end example
16043
16044 We see that all text before a 70-width line of dashes is ignored; all
16045 text after a line that starts with that @samp{^End of} is also ignored;
16046 each article begins with a 30-width line of dashes; the line separating
16047 the head from the body may contain a single space; and that the body is
16048 run through @code{nndoc-unquote-dashes} before being delivered.
16049
16050 To hook your own document definition into @code{nndoc}, use the
16051 @code{nndoc-add-type} function.  It takes two parameters---the first is
16052 the definition itself and the second (optional) parameter says where in
16053 the document type definition alist to put this definition.  The alist is
16054 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
16055 is of @code{mmdf} type, and so on.  These type predicates should return
16056 @code{nil} if the document is not of the correct type; @code{t} if it is
16057 of the correct type; and a number if the document might be of the
16058 correct type.  A high number means high probability; a low number means
16059 low probability with @samp{0} being the lowest valid number.
16060
16061
16062 @node SOUP
16063 @subsection SOUP
16064 @cindex SOUP
16065 @cindex offline
16066
16067 In the PC world people often talk about ``offline'' newsreaders.  These
16068 are thingies that are combined reader/news transport monstrosities.
16069 With built-in modem programs.  Yecchh!
16070
16071 Of course, us Unix Weenie types of human beans use things like
16072 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16073 transport things like Ghod intended.  And then we just use normal
16074 newsreaders.
16075
16076 However, it can sometimes be convenient to do something that's a bit
16077 easier on the brain if you have a very slow modem, and you're not really
16078 that interested in doing things properly.
16079
16080 A file format called @sc{soup} has been developed for transporting news
16081 and mail from servers to home machines and back again.  It can be a bit
16082 fiddly.
16083
16084 First some terminology:
16085
16086 @table @dfn
16087
16088 @item server
16089 This is the machine that is connected to the outside world and where you
16090 get news and/or mail from.
16091
16092 @item home machine
16093 This is the machine that you want to do the actual reading and responding
16094 on.  It is typically not connected to the rest of the world in any way.
16095
16096 @item packet
16097 Something that contains messages and/or commands.  There are two kinds
16098 of packets:
16099
16100 @table @dfn
16101 @item message packets
16102 These are packets made at the server, and typically contain lots of
16103 messages for you to read.  These are called @file{SoupoutX.tgz} by
16104 default, where @var{x} is a number.
16105
16106 @item response packets
16107 These are packets made at the home machine, and typically contains
16108 replies that you've written.  These are called @file{SoupinX.tgz} by
16109 default, where @var{x} is a number.
16110
16111 @end table
16112
16113 @end table
16114
16115
16116 @enumerate
16117
16118 @item
16119 You log in on the server and create a @sc{soup} packet.  You can either
16120 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16121 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16122 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16123
16124 @item
16125 You transfer the packet home.  Rail, boat, car or modem will do fine.
16126
16127 @item
16128 You put the packet in your home directory.
16129
16130 @item
16131 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16132 the native or secondary server.
16133
16134 @item
16135 You read articles and mail and answer and followup to the things you
16136 want (@pxref{SOUP Replies}).
16137
16138 @item
16139 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16140 packet.
16141
16142 @item
16143 You transfer this packet to the server.
16144
16145 @item
16146 You use Gnus to mail this packet out with the @kbd{G s s} command.
16147
16148 @item
16149 You then repeat until you die.
16150
16151 @end enumerate
16152
16153 So you basically have a bipartite system---you use @code{nnsoup} for
16154 reading and Gnus for packing/sending these @sc{soup} packets.
16155
16156 @menu
16157 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16158 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16159 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16160 @end menu
16161
16162
16163 @node SOUP Commands
16164 @subsubsection SOUP Commands
16165
16166 These are commands for creating and manipulating @sc{soup} packets.
16167
16168 @table @kbd
16169 @item G s b
16170 @kindex G s b (Group)
16171 @findex gnus-group-brew-soup
16172 Pack all unread articles in the current group
16173 (@code{gnus-group-brew-soup}).  This command understands the
16174 process/prefix convention.
16175
16176 @item G s w
16177 @kindex G s w (Group)
16178 @findex gnus-soup-save-areas
16179 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16180
16181 @item G s s
16182 @kindex G s s (Group)
16183 @findex gnus-soup-send-replies
16184 Send all replies from the replies packet
16185 (@code{gnus-soup-send-replies}).
16186
16187 @item G s p
16188 @kindex G s p (Group)
16189 @findex gnus-soup-pack-packet
16190 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16191
16192 @item G s r
16193 @kindex G s r (Group)
16194 @findex nnsoup-pack-replies
16195 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16196
16197 @item O s
16198 @kindex O s (Summary)
16199 @findex gnus-soup-add-article
16200 This summary-mode command adds the current article to a @sc{soup} packet
16201 (@code{gnus-soup-add-article}).  It understands the process/prefix
16202 convention (@pxref{Process/Prefix}).
16203
16204 @end table
16205
16206
16207 There are a few variables to customize where Gnus will put all these
16208 thingies:
16209
16210 @table @code
16211
16212 @item gnus-soup-directory
16213 @vindex gnus-soup-directory
16214 Directory where Gnus will save intermediate files while composing
16215 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16216
16217 @item gnus-soup-replies-directory
16218 @vindex gnus-soup-replies-directory
16219 This is what Gnus will use as a temporary directory while sending our
16220 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16221
16222 @item gnus-soup-prefix-file
16223 @vindex gnus-soup-prefix-file
16224 Name of the file where Gnus stores the last used prefix.  The default is
16225 @samp{gnus-prefix}.
16226
16227 @item gnus-soup-packer
16228 @vindex gnus-soup-packer
16229 A format string command for packing a @sc{soup} packet.  The default is
16230 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16231
16232 @item gnus-soup-unpacker
16233 @vindex gnus-soup-unpacker
16234 Format string command for unpacking a @sc{soup} packet.  The default is
16235 @samp{gunzip -c %s | tar xvf -}.
16236
16237 @item gnus-soup-packet-directory
16238 @vindex gnus-soup-packet-directory
16239 Where Gnus will look for reply packets.  The default is @file{~/}.
16240
16241 @item gnus-soup-packet-regexp
16242 @vindex gnus-soup-packet-regexp
16243 Regular expression matching @sc{soup} reply packets in
16244 @code{gnus-soup-packet-directory}.
16245
16246 @end table
16247
16248
16249 @node SOUP Groups
16250 @subsubsection SOUP Groups
16251 @cindex nnsoup
16252
16253 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
16254 read incoming packets, unpack them, and put them in a directory where
16255 you can read them at leisure.
16256
16257 These are the variables you can use to customize its behavior:
16258
16259 @table @code
16260
16261 @item nnsoup-tmp-directory
16262 @vindex nnsoup-tmp-directory
16263 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
16264 directory.  (@file{/tmp/} by default.)
16265
16266 @item nnsoup-directory
16267 @vindex nnsoup-directory
16268 @code{nnsoup} then moves each message and index file to this directory.
16269 The default is @file{~/SOUP/}.
16270
16271 @item nnsoup-replies-directory
16272 @vindex nnsoup-replies-directory
16273 All replies will be stored in this directory before being packed into a
16274 reply packet.  The default is @file{~/SOUP/replies/"}.
16275
16276 @item nnsoup-replies-format-type
16277 @vindex nnsoup-replies-format-type
16278 The @sc{soup} format of the replies packets.  The default is @samp{?n}
16279 (rnews), and I don't think you should touch that variable.  I probably
16280 shouldn't even have documented it.  Drats!  Too late!
16281
16282 @item nnsoup-replies-index-type
16283 @vindex nnsoup-replies-index-type
16284 The index type of the replies packet.  The default is @samp{?n}, which
16285 means ``none''.  Don't fiddle with this one either!
16286
16287 @item nnsoup-active-file
16288 @vindex nnsoup-active-file
16289 Where @code{nnsoup} stores lots of information.  This is not an ``active
16290 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
16291 this file or mess it up in any way, you're dead.  The default is
16292 @file{~/SOUP/active}.
16293
16294 @item nnsoup-packer
16295 @vindex nnsoup-packer
16296 Format string command for packing a reply @sc{soup} packet.  The default
16297 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
16298
16299 @item nnsoup-unpacker
16300 @vindex nnsoup-unpacker
16301 Format string command for unpacking incoming @sc{soup} packets.  The
16302 default is @samp{gunzip -c %s | tar xvf -}.
16303
16304 @item nnsoup-packet-directory
16305 @vindex nnsoup-packet-directory
16306 Where @code{nnsoup} will look for incoming packets.  The default is
16307 @file{~/}.
16308
16309 @item nnsoup-packet-regexp
16310 @vindex nnsoup-packet-regexp
16311 Regular expression matching incoming @sc{soup} packets.  The default is
16312 @samp{Soupout}.
16313
16314 @item nnsoup-always-save
16315 @vindex nnsoup-always-save
16316 If non-@code{nil}, save the replies buffer after each posted message.
16317
16318 @end table
16319
16320
16321 @node SOUP Replies
16322 @subsubsection SOUP Replies
16323
16324 Just using @code{nnsoup} won't mean that your postings and mailings end
16325 up in @sc{soup} reply packets automagically.  You have to work a bit
16326 more for that to happen.
16327
16328 @findex nnsoup-set-variables
16329 The @code{nnsoup-set-variables} command will set the appropriate
16330 variables to ensure that all your followups and replies end up in the
16331 @sc{soup} system.
16332
16333 In specific, this is what it does:
16334
16335 @lisp
16336 (setq message-send-news-function 'nnsoup-request-post)
16337 (setq message-send-mail-function 'nnsoup-request-mail)
16338 @end lisp
16339
16340 And that's it, really.  If you only want news to go into the @sc{soup}
16341 system you just use the first line.  If you only want mail to be
16342 @sc{soup}ed you use the second.
16343
16344
16345 @node Mail-To-News Gateways
16346 @subsection Mail-To-News Gateways
16347 @cindex mail-to-news gateways
16348 @cindex gateways
16349
16350 If your local @code{nntp} server doesn't allow posting, for some reason
16351 or other, you can post using one of the numerous mail-to-news gateways.
16352 The @code{nngateway} back end provides the interface.
16353
16354 Note that you can't read anything from this back end---it can only be
16355 used to post with.
16356
16357 Server variables:
16358
16359 @table @code
16360 @item nngateway-address
16361 @vindex nngateway-address
16362 This is the address of the mail-to-news gateway.
16363
16364 @item nngateway-header-transformation
16365 @vindex nngateway-header-transformation
16366 News headers often have to be transformed in some odd way or other
16367 for the mail-to-news gateway to accept it.  This variable says what
16368 transformation should be called, and defaults to
16369 @code{nngateway-simple-header-transformation}.  The function is called
16370 narrowed to the headers to be transformed and with one parameter---the
16371 gateway address.
16372
16373 This default function just inserts a new @code{To} header based on the
16374 @code{Newsgroups} header and the gateway address.
16375 For instance, an article with this @code{Newsgroups} header:
16376
16377 @example
16378 Newsgroups: alt.religion.emacs
16379 @end example
16380
16381 will get this @code{To} header inserted:
16382
16383 @example
16384 To: alt-religion-emacs@@GATEWAY
16385 @end example
16386
16387 The following pre-defined functions exist:
16388
16389 @findex nngateway-simple-header-transformation
16390 @table @code
16391
16392 @item nngateway-simple-header-transformation
16393 Creates a @code{To} header that looks like
16394 @var{newsgroup}@@@code{nngateway-address}.
16395
16396 @findex nngateway-mail2news-header-transformation
16397
16398 @item nngateway-mail2news-header-transformation
16399 Creates a @code{To} header that looks like
16400 @code{nngateway-address}.
16401
16402 Here's an example:
16403
16404 @lisp
16405 (setq gnus-post-method
16406       '(nngateway
16407         "mail2news@@replay.com"
16408         (nngateway-header-transformation
16409          nngateway-mail2news-header-transformation)))
16410 @end lisp
16411
16412 @end table
16413
16414
16415 @end table
16416
16417 So, to use this, simply say something like:
16418
16419 @lisp
16420 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
16421 @end lisp
16422
16423
16424
16425 @node Combined Groups
16426 @section Combined Groups
16427
16428 Gnus allows combining a mixture of all the other group types into bigger
16429 groups.
16430
16431 @menu
16432 * Virtual Groups::              Combining articles from many groups.
16433 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
16434 @end menu
16435
16436
16437 @node Virtual Groups
16438 @subsection Virtual Groups
16439 @cindex nnvirtual
16440 @cindex virtual groups
16441 @cindex merging groups
16442
16443 An @dfn{nnvirtual group} is really nothing more than a collection of
16444 other groups.
16445
16446 For instance, if you are tired of reading many small groups, you can
16447 put them all in one big group, and then grow tired of reading one
16448 big, unwieldy group.  The joys of computing!
16449
16450 You specify @code{nnvirtual} as the method.  The address should be a
16451 regexp to match component groups.
16452
16453 All marks in the virtual group will stick to the articles in the
16454 component groups.  So if you tick an article in a virtual group, the
16455 article will also be ticked in the component group from whence it
16456 came.  (And vice versa---marks from the component groups will also be
16457 shown in the virtual group.). To create an empty virtual group, run
16458 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
16459 and edit the method regexp with @kbd{M-e}
16460 (@code{gnus-group-edit-group-method})
16461
16462 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
16463 newsgroups into one, big, happy newsgroup:
16464
16465 @lisp
16466 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
16467 @end lisp
16468
16469 The component groups can be native or foreign; everything should work
16470 smoothly, but if your computer explodes, it was probably my fault.
16471
16472 Collecting the same group from several servers might actually be a good
16473 idea if users have set the Distribution header to limit distribution.
16474 If you would like to read @samp{soc.motss} both from a server in Japan
16475 and a server in Norway, you could use the following as the group regexp:
16476
16477 @example
16478 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
16479 @end example
16480
16481 (Remember, though, that if you're creating the group with @kbd{G m}, you
16482 shouldn't double the backslashes, and you should leave off the quote
16483 characters at the beginning and the end of the string.)
16484
16485 This should work kinda smoothly---all articles from both groups should
16486 end up in this one, and there should be no duplicates.  Threading (and
16487 the rest) will still work as usual, but there might be problems with the
16488 sequence of articles.  Sorting on date might be an option here
16489 (@pxref{Selecting a Group}).
16490
16491 One limitation, however---all groups included in a virtual
16492 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
16493 zombie groups can't be component groups for @code{nnvirtual} groups.
16494
16495 @vindex nnvirtual-always-rescan
16496 If the @code{nnvirtual-always-rescan} is non-@code{nil},
16497 @code{nnvirtual} will always scan groups for unread articles when
16498 entering a virtual group.  If this variable is @code{nil} (which is the
16499 default) and you read articles in a component group after the virtual
16500 group has been activated, the read articles from the component group
16501 will show up when you enter the virtual group.  You'll also see this
16502 effect if you have two virtual groups that have a component group in
16503 common.  If that's the case, you should set this variable to @code{t}.
16504 Or you can just tap @code{M-g} on the virtual group every time before
16505 you enter it---it'll have much the same effect.
16506
16507 @code{nnvirtual} can have both mail and news groups as component groups.
16508 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
16509 has to ask the back end of the component group the article comes from
16510 whether it is a news or mail back end.  However, when you do a @kbd{^},
16511 there is typically no sure way for the component back end to know this,
16512 and in that case @code{nnvirtual} tells Gnus that the article came from a
16513 not-news back end.  (Just to be on the safe side.)
16514
16515 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
16516 line from the article you respond to in these cases.
16517
16518 @code{nnvirtual} groups do not inherit anything but articles and marks
16519 from component groups---group parameters, for instance, are not
16520 inherited.
16521
16522
16523 @node Kibozed Groups
16524 @subsection Kibozed Groups
16525 @cindex nnkiboze
16526 @cindex kibozing
16527
16528 @dfn{Kibozing} is defined by @sc{oed} as ``grepping through (parts of)
16529 the news feed''.  @code{nnkiboze} is a back end that will do this for
16530 you.  Oh joy!  Now you can grind any @sc{nntp} server down to a halt
16531 with useless requests!  Oh happiness!
16532
16533 @kindex G k (Group)
16534 To create a kibozed group, use the @kbd{G k} command in the group
16535 buffer.
16536
16537 The address field of the @code{nnkiboze} method is, as with
16538 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
16539 @code{nnkiboze} group.  That's where most similarities between @code{nnkiboze}
16540 and @code{nnvirtual} end.
16541
16542 In addition to this regexp detailing component groups, an @code{nnkiboze} group
16543 must have a score file to say what articles are to be included in
16544 the group (@pxref{Scoring}).
16545
16546 @kindex M-x nnkiboze-generate-groups
16547 @findex nnkiboze-generate-groups
16548 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
16549 @code{nnkiboze} groups you want to have.  This command will take time.  Lots of
16550 time.  Oodles and oodles of time.  Gnus has to fetch the headers from
16551 all the articles in all the component groups and run them through the
16552 scoring process to determine if there are any articles in the groups
16553 that are to be part of the @code{nnkiboze} groups.
16554
16555 Please limit the number of component groups by using restrictive
16556 regexps.  Otherwise your sysadmin may become annoyed with you, and the
16557 @sc{nntp} site may throw you off and never let you back in again.
16558 Stranger things have happened.
16559
16560 @code{nnkiboze} component groups do not have to be alive---they can be dead,
16561 and they can be foreign.  No restrictions.
16562
16563 @vindex nnkiboze-directory
16564 The generation of an @code{nnkiboze} group means writing two files in
16565 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
16566 contains the @sc{nov} header lines for all the articles in the group,
16567 and the other is an additional @file{.newsrc} file to store information
16568 on what groups have been searched through to find component articles.
16569
16570 Articles marked as read in the @code{nnkiboze} group will have
16571 their @sc{nov} lines removed from the @sc{nov} file.
16572
16573
16574 @node Gnus Unplugged
16575 @section Gnus Unplugged
16576 @cindex offline
16577 @cindex unplugged
16578 @cindex Agent
16579 @cindex Gnus Agent
16580 @cindex Gnus Unplugged
16581
16582 In olden times (ca. February '88), people used to run their newsreaders
16583 on big machines with permanent connections to the net.  News transport
16584 was dealt with by news servers, and all the newsreaders had to do was to
16585 read news.  Believe it or not.
16586
16587 Nowadays most people read news and mail at home, and use some sort of
16588 modem to connect to the net.  To avoid running up huge phone bills, it
16589 would be nice to have a way to slurp down all the news and mail, hang up
16590 the phone, read for several hours, and then upload any responses you
16591 have to make.  And then you repeat the procedure.
16592
16593 Of course, you can use news servers for doing this as well.  I've used
16594 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
16595 for some years, but doing that's a bore.  Moving the news server
16596 functionality up to the newsreader makes sense if you're the only person
16597 reading news on a machine.
16598
16599 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
16600 fact, you don't even have to configure anything.
16601
16602 Of course, to use it as such, you have to learn a few new commands.
16603
16604 @menu
16605 * Agent Basics::                How it all is supposed to work.
16606 * Agent Categories::            How to tell the Gnus Agent what to download.
16607 * Agent Commands::              New commands for all the buffers.
16608 * Agent as Cache::              The Agent is a big cache too.
16609 * Agent Expiry::                How to make old articles go away.
16610 * Agent Regeneration::          How to recover from lost connections and other accidents.
16611 * Agent and IMAP::              How to use the Agent with IMAP.
16612 * Outgoing Messages::           What happens when you post/mail something?
16613 * Agent Variables::             Customizing is fun.
16614 * Example Setup::               An example @file{.gnus.el} file for offline people.
16615 * Batching Agents::             How to fetch news from a @code{cron} job.
16616 * Agent Caveats::               What you think it'll do and what it does.
16617 @end menu
16618
16619
16620 @node Agent Basics
16621 @subsection Agent Basics
16622
16623 First, let's get some terminology out of the way.
16624
16625 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
16626 connection to the net (and notified the Agent that this is the case).
16627 When the connection to the net is up again (and Gnus knows this), the
16628 Agent is @dfn{plugged}.
16629
16630 The @dfn{local} machine is the one you're running on, and which isn't
16631 connected to the net continuously.
16632
16633 @dfn{Downloading} means fetching things from the net to your local
16634 machine.  @dfn{Uploading} is doing the opposite.
16635
16636 Let's take a typical Gnus session using the Agent.
16637
16638 @itemize @bullet
16639
16640 @item
16641 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
16642 Agent in a disconnected state.  You can read all the news that you have
16643 already fetched while in this mode.
16644
16645 @item
16646 You then decide to see whether any new news has arrived.  You connect
16647 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
16648 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
16649 as usual.  To check for new mail in unplugged mode, see (@pxref{Mail
16650 Source Specifiers}).
16651
16652 @item
16653 You can then read the new news immediately, or you can download the news
16654 onto your local machine.  If you want to do the latter, you press @kbd{g}
16655 to check if there are any new news and then @kbd{J
16656 s} to fetch all the eligible articles in all the groups.  (To let Gnus
16657 know which articles you want to download, @pxref{Agent Categories}.)
16658
16659 @item
16660 After fetching the articles, you press @kbd{J j} to make Gnus become
16661 unplugged again, and you shut down the PPP thing (or whatever).  And
16662 then you read the news offline.
16663
16664 @item
16665 And then you go to step 2.
16666 @end itemize
16667
16668 Here are some things you should do the first time (or so) that you use
16669 the Agent.
16670
16671 @itemize @bullet
16672
16673 @item
16674 Decide which servers should be covered by the Agent.  If you have a mail
16675 back end, it would probably be nonsensical to have it covered by the
16676 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
16677 @kbd{J a} on the server (or servers) that you wish to have covered by the
16678 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
16679 added servers you do not wish to have covered by the Agent.  By default,
16680 all @code{nntp} and @code{nnimap} groups in @code{gnus-select-method} and
16681 @code{gnus-secondary-select-methods} are agentized.
16682
16683 @item
16684 Decide on download policy.  @xref{Agent Categories}.
16685
16686 @item
16687 Uhm... that's it.
16688 @end itemize
16689
16690
16691 @node Agent Categories
16692 @subsection Agent Categories
16693
16694 One of the main reasons to integrate the news transport layer into the
16695 newsreader is to allow greater control over what articles to download.
16696 There's not much point in downloading huge amounts of articles, just to
16697 find out that you're not interested in reading any of them.  It's better
16698 to be somewhat more conservative in choosing what to download, and then
16699 mark the articles for downloading manually if it should turn out that
16700 you're interested in the articles anyway.
16701
16702 The main way to control what is to be downloaded is to create a
16703 @dfn{category} and then assign some (or all) groups to this category.
16704 Groups that do not belong in any other category belong to the
16705 @code{default} category.  Gnus has its own buffer for creating and
16706 managing categories.
16707
16708 @menu
16709 * Category Syntax::             What a category looks like.
16710 * Category Buffer::             A buffer for maintaining categories.
16711 * Category Variables::          Customize'r'Us.
16712 @end menu
16713
16714
16715 @node Category Syntax
16716 @subsubsection Category Syntax
16717
16718 A category consists of two things.
16719
16720 @enumerate
16721 @item
16722 A predicate which (generally) gives a rough outline of which articles
16723 are eligible for downloading; and
16724
16725 @item
16726 a score rule which (generally) gives you a finer granularity when
16727 deciding what articles to download.  (Note that this @dfn{download
16728 score} is not necessarily related to normal scores.)
16729 @end enumerate
16730
16731 A predicate in its simplest form can be a single predicate such as
16732 @code{true} or @code{false}.  These two will download every available
16733 article or nothing respectively.  In the case of these two special
16734 predicates an additional score rule is superfluous.
16735
16736 Predicates of @code{high} or @code{low} download articles in respect of
16737 their scores in relationship to @code{gnus-agent-high-score} and
16738 @code{gnus-agent-low-score} as described below.
16739
16740 To gain even finer control of what is to be regarded eligible for
16741 download a predicate can consist of a number of predicates with logical
16742 operators sprinkled in between.
16743
16744 Perhaps some examples are in order.
16745
16746 Here's a simple predicate.  (It's the default predicate, in fact, used
16747 for all groups that don't belong to any other category.)
16748
16749 @lisp
16750 short
16751 @end lisp
16752
16753 Quite simple, eh?  This predicate is true if and only if the article is
16754 short (for some value of ``short'').
16755
16756 Here's a more complex predicate:
16757
16758 @lisp
16759 (or high
16760     (and
16761      (not low)
16762      (not long)))
16763 @end lisp
16764
16765 This means that an article should be downloaded if it has a high score,
16766 or if the score is not low and the article is not long.  You get the
16767 drift.
16768
16769 The available logical operators are @code{or}, @code{and} and
16770 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
16771 @samp{|}, @code{&} and @code{!} instead.)
16772
16773 The following predicates are pre-defined, but if none of these fit what
16774 you want to do, you can write your own.
16775
16776 @table @code
16777 @item short
16778 True iff the article is shorter than @code{gnus-agent-short-article}
16779 lines; default 100.
16780
16781 @item long
16782 True iff the article is longer than @code{gnus-agent-long-article}
16783 lines; default 200.
16784
16785 @item low
16786 True iff the article has a download score less than
16787 @code{gnus-agent-low-score}; default 0.
16788
16789 @item high
16790 True iff the article has a download score greater than
16791 @code{gnus-agent-high-score}; default 0.
16792
16793 @item spam
16794 True iff the Gnus Agent guesses that the article is spam.  The
16795 heuristics may change over time, but at present it just computes a
16796 checksum and sees whether articles match.
16797
16798 @item true
16799 Always true.
16800
16801 @item false
16802 Always false.
16803 @end table
16804
16805 If you want to create your own predicate function, here's what you have
16806 to know:  The functions are called with no parameters, but the
16807 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
16808 useful values.
16809
16810 For example, you could decide that you don't want to download articles
16811 that were posted more than a certain number of days ago (e.g. posted
16812 more than @code{gnus-agent-expire-days} ago) you might write a function
16813 something along the lines of the following:
16814
16815 @lisp
16816 (defun my-article-old-p ()
16817   "Say whether an article is old."
16818   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
16819      (- (time-to-days (current-time)) gnus-agent-expire-days)))
16820 @end lisp
16821
16822 with the predicate then defined as:
16823
16824 @lisp
16825 (not my-article-old-p)
16826 @end lisp
16827
16828 or you could append your predicate to the predefined
16829 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
16830 wherever.
16831
16832 @lisp
16833 (require 'gnus-agent)
16834 (setq  gnus-category-predicate-alist
16835   (append gnus-category-predicate-alist
16836          '((old . my-article-old-p))))
16837 @end lisp
16838
16839 and simply specify your predicate as:
16840
16841 @lisp
16842 (not old)
16843 @end lisp
16844
16845 If/when using something like the above, be aware that there are many
16846 misconfigured systems/mailers out there and so an article's date is not
16847 always a reliable indication of when it was posted.  Hell, some people
16848 just don't give a damn.
16849
16850 The above predicates apply to *all* the groups which belong to the
16851 category.  However, if you wish to have a specific predicate for an
16852 individual group within a category, or you're just too lazy to set up a
16853 new category, you can enter a group's individual predicate in it's group
16854 parameters like so:
16855
16856 @lisp
16857 (agent-predicate . short)
16858 @end lisp
16859
16860 This is the group parameter equivalent of the agent category default.
16861 Note that when specifying a single word predicate like this, the
16862 @code{agent-predicate} specification must be in dotted pair notation.
16863
16864 The equivalent of the longer example from above would be:
16865
16866 @lisp
16867 (agent-predicate or high (and (not low) (not long)))
16868 @end lisp
16869
16870 The outer parenthesis required in the category specification are not
16871 entered here as, not being in dotted pair notation, the value of the
16872 predicate is assumed to be a list.
16873
16874
16875 Now, the syntax of the download score is the same as the syntax of
16876 normal score files, except that all elements that require actually
16877 seeing the article itself are verboten.  This means that only the
16878 following headers can be scored on: @code{Subject}, @code{From},
16879 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
16880 @code{Lines}, and @code{Xref}.
16881
16882 As with predicates, the specification of the @code{download score rule}
16883 to use in respect of a group can be in either the category definition if
16884 it's to be applicable to all groups in therein, or a group's parameters
16885 if it's to be specific to that group.
16886
16887 In both of these places the @code{download score rule} can take one of
16888 three forms:
16889
16890 @enumerate
16891 @item
16892 Score rule
16893
16894 This has the same syntax as a normal gnus score file except only a
16895 subset of scoring keywords are available as mentioned above.
16896
16897 example:
16898
16899 @itemize @bullet
16900 @item
16901 Category specification
16902
16903 @lisp
16904 (("from"
16905        ("Lars Ingebrigtsen" 1000000 nil s))
16906 ("lines"
16907        (500 -100 nil <)))
16908 @end lisp
16909
16910 @item
16911 Group Parameter specification
16912
16913 @lisp
16914 (agent-score ("from"
16915                    ("Lars Ingebrigtsen" 1000000 nil s))
16916              ("lines"
16917                    (500 -100 nil <)))
16918 @end lisp
16919
16920 Again, note the omission of the outermost parenthesis here.
16921 @end itemize
16922
16923 @item
16924 Agent score file
16925
16926 These score files must *only* contain the permitted scoring keywords
16927 stated above.
16928
16929 example:
16930
16931 @itemize @bullet
16932 @item
16933 Category specification
16934
16935 @lisp
16936 ("~/News/agent.SCORE")
16937 @end lisp
16938
16939 or perhaps
16940
16941 @lisp
16942 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
16943 @end lisp
16944
16945 @item
16946 Group Parameter specification
16947
16948 @lisp
16949 (agent-score "~/News/agent.SCORE")
16950 @end lisp
16951
16952 Additional score files can be specified as above.  Need I say anything
16953 about parenthesis?
16954 @end itemize
16955
16956 @item
16957 Use @code{normal} score files
16958
16959 If you don't want to maintain two sets of scoring rules for a group, and
16960 your desired @code{downloading} criteria for a group are the same as your
16961 @code{reading} criteria then you can tell the agent to refer to your
16962 @code{normal} score files when deciding what to download.
16963
16964 These directives in either the category definition or a group's
16965 parameters will cause the agent to read in all the applicable score
16966 files for a group, *filtering out* those sections that do not
16967 relate to one of the permitted subset of scoring keywords.
16968
16969 @itemize @bullet
16970 @item
16971 Category Specification
16972
16973 @lisp
16974 file
16975 @end lisp
16976
16977 @item
16978 Group Parameter specification
16979
16980 @lisp
16981 (agent-score . file)
16982 @end lisp
16983 @end itemize
16984 @end enumerate
16985
16986 @node Category Buffer
16987 @subsubsection Category Buffer
16988
16989 You'd normally do all category maintenance from the category buffer.
16990 When you enter it for the first time (with the @kbd{J c} command from
16991 the group buffer), you'll only see the @code{default} category.
16992
16993 The following commands are available in this buffer:
16994
16995 @table @kbd
16996 @item q
16997 @kindex q (Category)
16998 @findex gnus-category-exit
16999 Return to the group buffer (@code{gnus-category-exit}).
17000
17001 @item k
17002 @kindex k (Category)
17003 @findex gnus-category-kill
17004 Kill the current category (@code{gnus-category-kill}).
17005
17006 @item c
17007 @kindex c (Category)
17008 @findex gnus-category-copy
17009 Copy the current category (@code{gnus-category-copy}).
17010
17011 @item a
17012 @kindex a (Category)
17013 @findex gnus-category-add
17014 Add a new category (@code{gnus-category-add}).
17015
17016 @item p
17017 @kindex p (Category)
17018 @findex gnus-category-edit-predicate
17019 Edit the predicate of the current category
17020 (@code{gnus-category-edit-predicate}).
17021
17022 @item g
17023 @kindex g (Category)
17024 @findex gnus-category-edit-groups
17025 Edit the list of groups belonging to the current category
17026 (@code{gnus-category-edit-groups}).
17027
17028 @item s
17029 @kindex s (Category)
17030 @findex gnus-category-edit-score
17031 Edit the download score rule of the current category
17032 (@code{gnus-category-edit-score}).
17033
17034 @item l
17035 @kindex l (Category)
17036 @findex gnus-category-list
17037 List all the categories (@code{gnus-category-list}).
17038 @end table
17039
17040
17041 @node Category Variables
17042 @subsubsection Category Variables
17043
17044 @table @code
17045 @item gnus-category-mode-hook
17046 @vindex gnus-category-mode-hook
17047 Hook run in category buffers.
17048
17049 @item gnus-category-line-format
17050 @vindex gnus-category-line-format
17051 Format of the lines in the category buffer (@pxref{Formatting
17052 Variables}).  Valid elements are:
17053
17054 @table @samp
17055 @item c
17056 The name of the category.
17057
17058 @item g
17059 The number of groups in the category.
17060 @end table
17061
17062 @item gnus-category-mode-line-format
17063 @vindex gnus-category-mode-line-format
17064 Format of the category mode line (@pxref{Mode Line Formatting}).
17065
17066 @item gnus-agent-short-article
17067 @vindex gnus-agent-short-article
17068 Articles that have fewer lines than this are short.  Default 100.
17069
17070 @item gnus-agent-long-article
17071 @vindex gnus-agent-long-article
17072 Articles that have more lines than this are long.  Default 200.
17073
17074 @item gnus-agent-low-score
17075 @vindex gnus-agent-low-score
17076 Articles that have a score lower than this have a low score.  Default
17077 0.
17078
17079 @item gnus-agent-high-score
17080 @vindex gnus-agent-high-score
17081 Articles that have a score higher than this have a high score.  Default
17082 0.
17083
17084 @end table
17085
17086
17087 @node Agent Commands
17088 @subsection Agent Commands
17089
17090 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
17091 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
17092 toggles the plugged/unplugged state of the Gnus Agent.
17093
17094
17095 @menu
17096 * Group Agent Commands::        Configure groups and fetch their contents.
17097 * Summary Agent Commands::      Manually select then fetch specific articles.
17098 * Server Agent Commands::       Select the servers that are supported by the agent.
17099 @end menu
17100
17101
17102
17103
17104 @node Group Agent Commands
17105 @subsubsection Group Agent Commands
17106
17107 @table @kbd
17108 @item J u
17109 @kindex J u (Agent Group)
17110 @findex gnus-agent-fetch-groups
17111 Fetch all eligible articles in the current group
17112 (@code{gnus-agent-fetch-groups}).
17113
17114 @item J c
17115 @kindex J c (Agent Group)
17116 @findex gnus-enter-category-buffer
17117 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
17118
17119 @item J s
17120 @kindex J s (Agent Group)
17121 @findex gnus-agent-fetch-session
17122 Fetch all eligible articles in all groups
17123 (@code{gnus-agent-fetch-session}).
17124
17125 @item J S
17126 @kindex J S (Agent Group)
17127 @findex gnus-group-send-queue
17128 Send all sendable messages in the queue group
17129 (@code{gnus-group-send-queue}).  @xref{Drafts}.
17130
17131 @item J a
17132 @kindex J a (Agent Group)
17133 @findex gnus-agent-add-group
17134 Add the current group to an Agent category
17135 (@code{gnus-agent-add-group}).  This command understands the
17136 process/prefix convention (@pxref{Process/Prefix}).
17137
17138 @item J r
17139 @kindex J r (Agent Group)
17140 @findex gnus-agent-remove-group
17141 Remove the current group from its category, if any
17142 (@code{gnus-agent-remove-group}).  This command understands the
17143 process/prefix convention (@pxref{Process/Prefix}).
17144
17145 @item J Y
17146 @kindex J Y (Agent Group)
17147 @findex gnus-agent-synchronize-flags
17148 Synchronize flags changed while unplugged with remote server, if any.
17149
17150
17151 @end table
17152
17153
17154 @node Summary Agent Commands
17155 @subsubsection Summary Agent Commands
17156
17157 @table @kbd
17158 @item J #
17159 @kindex J # (Agent Summary)
17160 @findex gnus-agent-mark-article
17161 Mark the article for downloading (@code{gnus-agent-mark-article}).
17162
17163 @item J M-#
17164 @kindex J M-# (Agent Summary)
17165 @findex gnus-agent-unmark-article
17166 Remove the downloading mark from the article
17167 (@code{gnus-agent-unmark-article}).
17168
17169 @cindex %
17170 @item @@
17171 @kindex @@ (Agent Summary)
17172 @findex gnus-agent-toggle-mark
17173 Toggle whether to download the article
17174 (@code{gnus-agent-toggle-mark}).  The dowload mark is @samp{%} by
17175 default. 
17176
17177 @item J c
17178 @kindex J c (Agent Summary)
17179 @findex gnus-agent-catchup
17180 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
17181
17182 @item J S
17183 @kindex J S (Agent Summary)
17184 @findex gnus-agent-fetch-group
17185 Download all eligible (See @pxref{Agent Categories}) articles in this group.
17186 (@code{gnus-agent-fetch-group}).
17187
17188 @item J s
17189 @kindex J s (Agent Summary)
17190 @findex gnus-agent-fetch-series
17191 Download all processable articles in this group.
17192 (@code{gnus-agent-fetch-series}).
17193
17194 @item J u
17195 @kindex J u (Agent Summary)
17196 @findex gnus-agent-summary-fetch-group
17197 Download all downloadable articles in the current group
17198 (@code{gnus-agent-summary-fetch-group}).
17199
17200 @end table
17201
17202
17203 @node Server Agent Commands
17204 @subsubsection Server Agent Commands
17205
17206 @table @kbd
17207 @item J a
17208 @kindex J a (Agent Server)
17209 @findex gnus-agent-add-server
17210 Add the current server to the list of servers covered by the Gnus Agent
17211 (@code{gnus-agent-add-server}).
17212
17213 @item J r
17214 @kindex J r (Agent Server)
17215 @findex gnus-agent-remove-server
17216 Remove the current server from the list of servers covered by the Gnus
17217 Agent (@code{gnus-agent-remove-server}).
17218
17219 @end table
17220
17221
17222 @node Agent as Cache
17223 @subsection Agent as Cache
17224
17225 When Gnus is plugged, it is not efficient to download headers or
17226 articles from the server again, if they are already stored in the
17227 Agent.  So, Gnus normally only downloads headers once, and stores them
17228 in the Agent.  These headers are later used when generating the summary
17229 buffer, regardless of whether you are plugged or unplugged.  Articles
17230 are not cached in the Agent by default though (that would potentially
17231 consume lots of disk space), but if you have already downloaded an
17232 article into the Agent, Gnus will not download the article from the
17233 server again but use the locally stored copy instead.
17234
17235 This behaviour can be controlled by @code{gnus-agent-cache}
17236 (@pxref{Agent Variables}).
17237
17238 @node Agent Expiry
17239 @subsection Agent Expiry
17240
17241 @vindex gnus-agent-expire-days
17242 @findex gnus-agent-expire
17243 @kindex M-x gnus-agent-expire
17244 @cindex Agent expiry
17245 @cindex Gnus Agent expiry
17246 @cindex expiry
17247
17248 @code{nnagent} doesn't handle expiry.  Instead, there's a special
17249 @code{gnus-agent-expire} command that will expire all read articles that
17250 are older than @code{gnus-agent-expire-days} days.  It can be run
17251 whenever you feel that you're running out of space.  It's not
17252 particularly fast or efficient, and it's not a particularly good idea to
17253 interrupt it (with @kbd{C-g} or anything else) once you've started it.
17254
17255 Note that other functions, e.g. @code{gnus-request-expire-articles},
17256 might run @code{gnus-agent-expire} for you to keep the agent 
17257 synchronized with the group.
17258
17259 @code{gnus-agent-expire-days} can also be a list of regexp/day pairs.
17260 The regexps will be matched against group names to allow differing
17261 expiry in different groups.
17262
17263 @lisp
17264 (setq gnus-agent-expire-days
17265       '(("alt\\." 7)
17266         (".*binary" 1)
17267         ("." 21)))
17268 @end lisp
17269
17270 If you use the list form, the last element must always be the default
17271 method---it must always match all groups. Also, for a regexp to match,
17272 it must match from the beginning of the group's name.
17273
17274 @vindex gnus-agent-expire-all
17275 If @code{gnus-agent-expire-all} is non-@code{nil}, this command will
17276 expire all articles---unread, read, ticked and dormant.  If @code{nil}
17277 (which is the default), only read articles are eligible for expiry, and
17278 unread, ticked and dormant articles will be kept indefinitely.
17279
17280 If you find that some articles eligible for expiry are never expired,
17281 perhaps some Gnus Agent files are corrupted.  There's a special
17282 @code{gnus-agent-regenerate} command to fix possible problems.
17283
17284 @node Agent Regeneration
17285 @subsection Agent Regeneration
17286
17287 @cindex Agent Regeneration
17288 @cindex Gnus Agent Regeneration
17289 @cindex regeneration
17290
17291 The local data structures used by @code{nnagent} may become corrupted
17292 due to certain exceptional conditions.  When this happens,
17293 @code{nnagent} functionality may degrade or even fail.  The solution
17294 to this problem is to repair the local data structures by removing all
17295 internal inconsistencies.
17296
17297 For example, if your connection to your server is lost while
17298 downloaded articles into the agent, the local data structures will not
17299 know about articles downloaded prior to the connection failure.
17300 Running @code{gnus-agent-regenerate} or
17301 @code{gnus-agent-regenerate-group} will update the data structures
17302 such that you don't need to download these articles a second time.
17303
17304 @findex gnus-agent-regenerate
17305 @kindex M-x gnus-agent-regenerate
17306 The command @code{gnus-agent-regenerate} will perform
17307 @code{gnus-agent-regenerate-group} on every agentized group.  While
17308 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
17309 recommended that you first close all summary buffers.
17310
17311 @findex gnus-agent-regenerate-group
17312 @kindex M-x gnus-agent-regenerate-group
17313 The command @code{gnus-agent-regenerate-group} uses the local copies
17314 of individual articles to repair the local NOV(header) database.  It
17315 then updates the internal data structures that document which articles
17316 are stored locally.  An optional argument will mark articles in the
17317 agent as unread.
17318
17319 @node Agent and IMAP
17320 @subsection Agent and IMAP
17321
17322 The Agent works with any Gnus back end, including nnimap.  However,
17323 since there are some conceptual differences between @sc{nntp} and
17324 @sc{imap}, this section (should) provide you with some information to
17325 make Gnus Agent work smoother as a @sc{imap} Disconnected Mode client.
17326
17327 The first thing to keep in mind is that all flags (read, ticked, etc)
17328 are kept on the @sc{imap} server, rather than in @code{.newsrc} as is the
17329 case for nntp.  Thus Gnus need to remember flag changes when
17330 disconnected, and synchronize these flags when you plug back in.
17331
17332 Gnus keeps track of flag changes when reading nnimap groups under the
17333 Agent.  When you plug back in, Gnus will check if you have any changed
17334 any flags and ask if you wish to synchronize these with the server.
17335 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
17336
17337 @vindex gnus-agent-synchronize-flags
17338 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
17339 never automatically synchronize flags.  If it is @code{ask}, which is
17340 the default, the Agent will check if you made any changes and if so
17341 ask if you wish to synchronize these when you re-connect.  If it has
17342 any other value, all flags will be synchronized automatically.
17343
17344 If you do not wish to synchronize flags automatically when you
17345 re-connect, you can do it manually with the
17346 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
17347 in the group buffer.
17348
17349 Some things are currently not implemented in the Agent that you'd might
17350 expect from a disconnected @sc{imap} client, including:
17351
17352 @itemize @bullet
17353
17354 @item
17355 Copying/moving articles into nnimap groups when unplugged.
17356
17357 @item
17358 Creating/deleting nnimap groups when unplugged.
17359
17360 @end itemize
17361
17362 Technical note: the synchronization algorithm does not work by "pushing"
17363 all local flags to the server, but rather incrementally update the
17364 server view of flags by changing only those flags that were changed by
17365 the user.  Thus, if you set one flag on a article, quit the group and
17366 re-select the group and remove the flag; the flag will be set and
17367 removed from the server when you "synchronize".  The queued flag
17368 operations can be found in the per-server @code{flags} file in the Agent
17369 directory.  It's emptied when you synchronize flags.
17370
17371
17372 @node Outgoing Messages
17373 @subsection Outgoing Messages
17374
17375 When Gnus is unplugged, all outgoing messages (both mail and news) are
17376 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
17377 them there after posting, and edit them at will.
17378
17379 When Gnus is plugged again, you can send the messages either from the
17380 draft group with the special commands available there, or you can use
17381 the @kbd{J S} command in the group buffer to send all the sendable
17382 messages in the draft group.
17383
17384
17385
17386 @node Agent Variables
17387 @subsection Agent Variables
17388
17389 @table @code
17390 @item gnus-agent-directory
17391 @vindex gnus-agent-directory
17392 Where the Gnus Agent will store its files.  The default is
17393 @file{~/News/agent/}.
17394
17395 @item gnus-agent-handle-level
17396 @vindex gnus-agent-handle-level
17397 Groups on levels (@pxref{Group Levels}) higher than this variable will
17398 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
17399 which means that only subscribed group will be considered by the Agent
17400 by default.
17401
17402 @item gnus-agent-plugged-hook
17403 @vindex gnus-agent-plugged-hook
17404 Hook run when connecting to the network.
17405
17406 @item gnus-agent-unplugged-hook
17407 @vindex gnus-agent-unplugged-hook
17408 Hook run when disconnecting from the network.
17409
17410 @item gnus-agent-fetched-hook
17411 @vindex gnus-agent-fetched-hook
17412 Hook run when after finishing fetching articles.
17413
17414 @item gnus-agent-cache
17415 @vindex gnus-agent-cache
17416 Variable to control whether use the locally stored @sc{nov} and
17417 articles when plugged, e.g. essentially using the Agent as a cache.
17418 The default is non-nil, which means to use the Agent as a cache.
17419
17420 @item gnus-agent-go-online
17421 @vindex gnus-agent-go-online
17422 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
17423 automatically switch offline servers into online status.  If it is
17424 @code{ask}, the default, the Agent will ask if you wish to switch
17425 offline servers into online status when you re-connect.  If it has any
17426 other value, all offline servers will be automatically switched into
17427 online status.
17428
17429 @item gnus-agent-mark-unread-after-downloaded
17430 @vindex gnus-agent-mark-unread-after-downloaded
17431 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
17432 mark articles as unread after downloading.  The default is t.
17433
17434 @item gnus-agent-consider-all-articles
17435 @vindex gnus-agent-consider-all-articles
17436 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
17437 agent will fetch all missing headers.  When @code{nil}, the agent will
17438 fetch only new headers. The default is @code{nil}.
17439
17440 @item gnus-agent-max-fetch-size
17441 @vindex gnus-agent-max-fetch-size
17442 The agent fetches articles into a temporary buffer prior to parsing
17443 them into individual files.  To avoid exceeding the max. buffer size,
17444 the agent alternates between fetching and parsing until all articles
17445 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
17446 limit to control how often the cycling occurs.  A large value improves
17447 performance.  A small value minimizes the time lost should the
17448 connection be lost while fetching (You may need to run
17449 @code{gnus-agent-regenerate-group} to update the group's state.
17450 However, all articles parsed prior to loosing the connection will be
17451 available while unplugged).
17452
17453 @item gnus-server-unopen-status
17454 @vindex gnus-server-unopen-status
17455 Perhaps not a Agent variable, but closely related to the Agent, this
17456 variable says what will happen if Gnus cannot open a server.  If the
17457 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
17458 whether to deny the server or whether to unplug the agent.  If the
17459 Agent is disabled, Gnus always simply deny the server.  Other choices
17460 for this variable include @code{denied} and @code{offline} the latter
17461 is only valid if the Agent is used.
17462
17463 @end table
17464
17465
17466 @node Example Setup
17467 @subsection Example Setup
17468
17469 If you don't want to read this manual, and you have a fairly standard
17470 setup, you may be able to use something like the following as your
17471 @file{.gnus.el} file to get started.
17472
17473 @lisp
17474 ;;; Define how Gnus is to fetch news.  We do this over @sc{nntp}
17475 ;;; from your ISP's server.
17476 (setq gnus-select-method '(nntp "news.your-isp.com"))
17477
17478 ;;; Define how Gnus is to read your mail.  We read mail from
17479 ;;; your ISP's POP server.
17480 (setq mail-sources '((pop :server "pop.your-isp.com")))
17481
17482 ;;; Say how Gnus is to store the mail.  We use nnml groups.
17483 (setq gnus-secondary-select-methods '((nnml "")))
17484
17485 ;;; Make Gnus into an offline newsreader.
17486 ;;; (gnus-agentize) ; The obsolete setting.
17487 ;;; (setq gnus-agent t) ; Now the default.
17488 @end lisp
17489
17490 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
17491 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
17492 gnus}.
17493
17494 If this is the first time you've run Gnus, you will be subscribed
17495 automatically to a few default newsgroups.  You'll probably want to
17496 subscribe to more groups, and to do that, you have to query the
17497 @sc{nntp} server for a complete list of groups with the @kbd{A A}
17498 command.  This usually takes quite a while, but you only have to do it
17499 once.
17500
17501 After reading and parsing a while, you'll be presented with a list of
17502 groups.  Subscribe to the ones you want to read with the @kbd{u}
17503 command.  @kbd{l} to make all the killed groups disappear after you've
17504 subscribe to all the groups you want to read.  (@kbd{A k} will bring
17505 back all the killed groups.)
17506
17507 You can now read the groups at once, or you can download the articles
17508 with the @kbd{J s} command.  And then read the rest of this manual to
17509 find out which of the other gazillion things you want to customize.
17510
17511
17512 @node Batching Agents
17513 @subsection Batching Agents
17514
17515 Having the Gnus Agent fetch articles (and post whatever messages you've
17516 written) is quite easy once you've gotten things set up properly.  The
17517 following shell script will do everything that is necessary:
17518
17519 You can run a complete batch command from the command line with the
17520 following incantation:
17521
17522 @example
17523 #!/bin/sh
17524 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
17525 @end example
17526
17527
17528 @node Agent Caveats
17529 @subsection Agent Caveats
17530
17531 The Gnus Agent doesn't seem to work like most other offline
17532 newsreaders.  Here are some common questions that some imaginary people
17533 may ask:
17534
17535 @table @dfn
17536 @item If I read an article while plugged, do they get entered into the Agent?
17537
17538 @strong{No}.  If you want this behaviour, add
17539 @code{gnus-agent-fetch-selected-article} to
17540 @code{gnus-select-article-hook}.
17541
17542 @item If I read an article while plugged, and the article already exists in the Agent, will it get downloaded once more?
17543
17544 @strong{No}, unless @code{gnus-agent-cache} is `nil'.
17545
17546 @end table
17547
17548 In short, when Gnus is unplugged, it only looks into the locally stored
17549 articles; when it's plugged, it talks to your ISP and may also use the
17550 locally stored articles.
17551
17552
17553 @node Scoring
17554 @chapter Scoring
17555 @cindex scoring
17556
17557 Other people use @dfn{kill files}, but we here at Gnus Towers like
17558 scoring better than killing, so we'd rather switch than fight.  They do
17559 something completely different as well, so sit up straight and pay
17560 attention!
17561
17562 @vindex gnus-summary-mark-below
17563 All articles have a default score (@code{gnus-summary-default-score}),
17564 which is 0 by default.  This score may be raised or lowered either
17565 interactively or by score files.  Articles that have a score lower than
17566 @code{gnus-summary-mark-below} are marked as read.
17567
17568 Gnus will read any @dfn{score files} that apply to the current group
17569 before generating the summary buffer.
17570
17571 There are several commands in the summary buffer that insert score
17572 entries based on the current article.  You can, for instance, ask Gnus to
17573 lower or increase the score of all articles with a certain subject.
17574
17575 There are two sorts of scoring entries: Permanent and temporary.
17576 Temporary score entries are self-expiring entries.  Any entries that are
17577 temporary and have not been used for, say, a week, will be removed
17578 silently to help keep the sizes of the score files down.
17579
17580 @menu
17581 * Summary Score Commands::      Adding score entries for the current group.
17582 * Group Score Commands::        General score commands.
17583 * Score Variables::             Customize your scoring.  (My, what terminology).
17584 * Score File Format::           What a score file may contain.
17585 * Score File Editing::          You can edit score files by hand as well.
17586 * Adaptive Scoring::            Big Sister Gnus knows what you read.
17587 * Home Score File::             How to say where new score entries are to go.
17588 * Followups To Yourself::       Having Gnus notice when people answer you.
17589 * Scoring On Other Headers::    Scoring on non-standard headers.
17590 * Scoring Tips::                How to score effectively.
17591 * Reverse Scoring::             That problem child of old is not problem.
17592 * Global Score Files::          Earth-spanning, ear-splitting score files.
17593 * Kill Files::                  They are still here, but they can be ignored.
17594 * Converting Kill Files::       Translating kill files to score files.
17595 * GroupLens::                   Getting predictions on what you like to read.
17596 * Advanced Scoring::            Using logical expressions to build score rules.
17597 * Score Decays::                It can be useful to let scores wither away.
17598 @end menu
17599
17600
17601 @node Summary Score Commands
17602 @section Summary Score Commands
17603 @cindex score commands
17604
17605 The score commands that alter score entries do not actually modify real
17606 score files.  That would be too inefficient.  Gnus maintains a cache of
17607 previously loaded score files, one of which is considered the
17608 @dfn{current score file alist}.  The score commands simply insert
17609 entries into this list, and upon group exit, this list is saved.
17610
17611 The current score file is by default the group's local score file, even
17612 if no such score file actually exists.  To insert score commands into
17613 some other score file (e.g. @file{all.SCORE}), you must first make this
17614 score file the current one.
17615
17616 General score commands that don't actually change the score file:
17617
17618 @table @kbd
17619
17620 @item V s
17621 @kindex V s (Summary)
17622 @findex gnus-summary-set-score
17623 Set the score of the current article (@code{gnus-summary-set-score}).
17624
17625 @item V S
17626 @kindex V S (Summary)
17627 @findex gnus-summary-current-score
17628 Display the score of the current article
17629 (@code{gnus-summary-current-score}).
17630
17631 @item V t
17632 @kindex V t (Summary)
17633 @findex gnus-score-find-trace
17634 Display all score rules that have been used on the current article
17635 (@code{gnus-score-find-trace}).
17636
17637 @item V w
17638 @kindex V w (Summary)
17639 @findex gnus-score-find-favourite-words
17640 List words used in scoring (@code{gnus-score-find-favourite-words}).
17641
17642 @item V R
17643 @kindex V R (Summary)
17644 @findex gnus-summary-rescore
17645 Run the current summary through the scoring process
17646 (@code{gnus-summary-rescore}).  This might be useful if you're playing
17647 around with your score files behind Gnus' back and want to see the
17648 effect you're having.
17649
17650 @item V c
17651 @kindex V c (Summary)
17652 @findex gnus-score-change-score-file
17653 Make a different score file the current
17654 (@code{gnus-score-change-score-file}).
17655
17656 @item V e
17657 @kindex V e (Summary)
17658 @findex gnus-score-edit-current-scores
17659 Edit the current score file (@code{gnus-score-edit-current-scores}).
17660 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
17661 File Editing}).
17662
17663 @item V f
17664 @kindex V f (Summary)
17665 @findex gnus-score-edit-file
17666 Edit a score file and make this score file the current one
17667 (@code{gnus-score-edit-file}).
17668
17669 @item V F
17670 @kindex V F (Summary)
17671 @findex gnus-score-flush-cache
17672 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
17673 after editing score files.
17674
17675 @item V C
17676 @kindex V C (Summary)
17677 @findex gnus-score-customize
17678 Customize a score file in a visually pleasing manner
17679 (@code{gnus-score-customize}).
17680
17681 @end table
17682
17683 The rest of these commands modify the local score file.
17684
17685 @table @kbd
17686
17687 @item V m
17688 @kindex V m (Summary)
17689 @findex gnus-score-set-mark-below
17690 Prompt for a score, and mark all articles with a score below this as
17691 read (@code{gnus-score-set-mark-below}).
17692
17693 @item V x
17694 @kindex V x (Summary)
17695 @findex gnus-score-set-expunge-below
17696 Prompt for a score, and add a score rule to the current score file to
17697 expunge all articles below this score
17698 (@code{gnus-score-set-expunge-below}).
17699 @end table
17700
17701 The keystrokes for actually making score entries follow a very regular
17702 pattern, so there's no need to list all the commands.  (Hundreds of
17703 them.)
17704
17705 @findex gnus-summary-increase-score
17706 @findex gnus-summary-lower-score
17707
17708 @enumerate
17709 @item
17710 The first key is either @kbd{I} (upper case i) for increasing the score
17711 or @kbd{L} for lowering the score.
17712 @item
17713 The second key says what header you want to score on.  The following
17714 keys are available:
17715 @table @kbd
17716
17717 @item a
17718 Score on the author name.
17719
17720 @item s
17721 Score on the subject line.
17722
17723 @item x
17724 Score on the @code{Xref} line---i.e., the cross-posting line.
17725
17726 @item r
17727 Score on the @code{References} line.
17728
17729 @item d
17730 Score on the date.
17731
17732 @item l
17733 Score on the number of lines.
17734
17735 @item i
17736 Score on the @code{Message-ID} header.
17737
17738 @item e
17739 Score on an "extra" header, that is, one of those in gnus-extra-headers,
17740 if your @sc{nntp} server tracks additional header data in overviews.
17741
17742 @item f
17743 Score on followups---this matches the author name, and adds scores to
17744 the followups to this author.  (Using this key leads to the creation of
17745 @file{ADAPT} files.)
17746
17747 @item b
17748 Score on the body.
17749
17750 @item h
17751 Score on the head.
17752
17753 @item t
17754 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
17755 files.)
17756
17757 @end table
17758
17759 @item
17760 The third key is the match type.  Which match types are valid depends on
17761 what headers you are scoring on.
17762
17763 @table @code
17764
17765 @item strings
17766
17767 @table @kbd
17768
17769 @item e
17770 Exact matching.
17771
17772 @item s
17773 Substring matching.
17774
17775 @item f
17776 Fuzzy matching (@pxref{Fuzzy Matching}).
17777
17778 @item r
17779 Regexp matching
17780 @end table
17781
17782 @item date
17783 @table @kbd
17784
17785 @item b
17786 Before date.
17787
17788 @item a
17789 After date.
17790
17791 @item n
17792 This date.
17793 @end table
17794
17795 @item number
17796 @table @kbd
17797
17798 @item <
17799 Less than number.
17800
17801 @item =
17802 Equal to number.
17803
17804 @item >
17805 Greater than number.
17806 @end table
17807 @end table
17808
17809 @item
17810 The fourth and usually final key says whether this is a temporary (i.e.,
17811 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
17812 or whether it is to be done immediately, without adding to the score
17813 file.
17814 @table @kbd
17815
17816 @item t
17817 Temporary score entry.
17818
17819 @item p
17820 Permanent score entry.
17821
17822 @item i
17823 Immediately scoring.
17824 @end table
17825
17826 @item
17827 If you are scoring on `e' (extra) headers, you will then be prompted for
17828 the header name on which you wish to score.  This must be a header named
17829 in gnus-extra-headers, and @samp{TAB} completion is available.
17830
17831 @end enumerate
17832
17833 So, let's say you want to increase the score on the current author with
17834 exact matching permanently: @kbd{I a e p}.  If you want to lower the
17835 score based on the subject line, using substring matching, and make a
17836 temporary score entry: @kbd{L s s t}.  Pretty easy.
17837
17838 To make things a bit more complicated, there are shortcuts.  If you use
17839 a capital letter on either the second or third keys, Gnus will use
17840 defaults for the remaining one or two keystrokes.  The defaults are
17841 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
17842 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
17843
17844 These functions take both the numerical prefix and the symbolic prefix
17845 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
17846 (or increase) the score of the article.  A symbolic prefix of @code{a}
17847 says to use the @file{all.SCORE} file for the command instead of the
17848 current score file.
17849
17850 @vindex gnus-score-mimic-keymap
17851 The @code{gnus-score-mimic-keymap} says whether these commands will
17852 pretend they are keymaps or not.
17853
17854
17855 @node Group Score Commands
17856 @section Group Score Commands
17857 @cindex group score commands
17858
17859 There aren't many of these as yet, I'm afraid.
17860
17861 @table @kbd
17862
17863 @item W f
17864 @kindex W f (Group)
17865 @findex gnus-score-flush-cache
17866 Gnus maintains a cache of score alists to avoid having to reload them
17867 all the time.  This command will flush the cache
17868 (@code{gnus-score-flush-cache}).
17869
17870 @end table
17871
17872 You can do scoring from the command line by saying something like:
17873
17874 @findex gnus-batch-score
17875 @cindex batch scoring
17876 @example
17877 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
17878 @end example
17879
17880
17881 @node Score Variables
17882 @section Score Variables
17883 @cindex score variables
17884
17885 @table @code
17886
17887 @item gnus-use-scoring
17888 @vindex gnus-use-scoring
17889 If @code{nil}, Gnus will not check for score files, and will not, in
17890 general, do any score-related work.  This is @code{t} by default.
17891
17892 @item gnus-kill-killed
17893 @vindex gnus-kill-killed
17894 If this variable is @code{nil}, Gnus will never apply score files to
17895 articles that have already been through the kill process.  While this
17896 may save you lots of time, it also means that if you apply a kill file
17897 to a group, and then change the kill file and want to run it over you
17898 group again to kill more articles, it won't work.  You have to set this
17899 variable to @code{t} to do that.  (It is @code{t} by default.)
17900
17901 @item gnus-kill-files-directory
17902 @vindex gnus-kill-files-directory
17903 All kill and score files will be stored in this directory, which is
17904 initialized from the @code{SAVEDIR} environment variable by default.
17905 This is @file{~/News/} by default.
17906
17907 @item gnus-score-file-suffix
17908 @vindex gnus-score-file-suffix
17909 Suffix to add to the group name to arrive at the score file name
17910 (@samp{SCORE} by default.)
17911
17912 @item gnus-score-uncacheable-files
17913 @vindex gnus-score-uncacheable-files
17914 @cindex score cache
17915 All score files are normally cached to avoid excessive re-loading of
17916 score files.  However, if this might make your Emacs grow big and
17917 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
17918 @file{all.SCORE}, while it might be a good idea to not cache
17919 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
17920 variable is @samp{ADAPT$} by default, so no adaptive score files will
17921 be cached.
17922
17923 @item gnus-save-score
17924 @vindex gnus-save-score
17925 If you have really complicated score files, and do lots of batch
17926 scoring, then you might set this variable to @code{t}.  This will make
17927 Gnus save the scores into the @file{.newsrc.eld} file.
17928
17929 If you do not set this to @code{t}, then manual scores (like those set
17930 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
17931 across group visits.
17932
17933 @item gnus-score-interactive-default-score
17934 @vindex gnus-score-interactive-default-score
17935 Score used by all the interactive raise/lower commands to raise/lower
17936 score with.  Default is 1000, which may seem excessive, but this is to
17937 ensure that the adaptive scoring scheme gets enough room to play with.
17938 We don't want the small changes from the adaptive scoring to overwrite
17939 manually entered data.
17940
17941 @item gnus-summary-default-score
17942 @vindex gnus-summary-default-score
17943 Default score of an article, which is 0 by default.
17944
17945 @item gnus-summary-expunge-below
17946 @vindex gnus-summary-expunge-below
17947 Don't display the summary lines of articles that have scores lower than
17948 this variable.  This is @code{nil} by default, which means that no
17949 articles will be hidden.  This variable is local to the summary buffers,
17950 and has to be set from @code{gnus-summary-mode-hook}.
17951
17952 @item gnus-score-over-mark
17953 @vindex gnus-score-over-mark
17954 Mark (in the third column) used for articles with a score over the
17955 default.  Default is @samp{+}.
17956
17957 @item gnus-score-below-mark
17958 @vindex gnus-score-below-mark
17959 Mark (in the third column) used for articles with a score below the
17960 default.  Default is @samp{-}.
17961
17962 @item gnus-score-find-score-files-function
17963 @vindex gnus-score-find-score-files-function
17964 Function used to find score files for the current group.  This function
17965 is called with the name of the group as the argument.
17966
17967 Predefined functions available are:
17968 @table @code
17969
17970 @item gnus-score-find-single
17971 @findex gnus-score-find-single
17972 Only apply the group's own score file.
17973
17974 @item gnus-score-find-bnews
17975 @findex gnus-score-find-bnews
17976 Apply all score files that match, using bnews syntax.  This is the
17977 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
17978 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
17979 @file{gnu.all.SCORE} would all apply.  In short, the instances of
17980 @samp{all} in the score file names are translated into @samp{.*}, and
17981 then a regexp match is done.
17982
17983 This means that if you have some score entries that you want to apply to
17984 all groups, then you put those entries in the @file{all.SCORE} file.
17985
17986 The score files are applied in a semi-random order, although Gnus will
17987 try to apply the more general score files before the more specific score
17988 files.  It does this by looking at the number of elements in the score
17989 file names---discarding the @samp{all} elements.
17990
17991 @item gnus-score-find-hierarchical
17992 @findex gnus-score-find-hierarchical
17993 Apply all score files from all the parent groups.  This means that you
17994 can't have score files like @file{all.SCORE}, but you can have
17995 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
17996 server.
17997
17998 @end table
17999 This variable can also be a list of functions.  In that case, all
18000 these functions will be called with the group name as argument, and
18001 all the returned lists of score files will be applied.  These
18002 functions can also return lists of lists of score alists directly.  In
18003 that case, the functions that return these non-file score alists
18004 should probably be placed before the ``real'' score file functions, to
18005 ensure that the last score file returned is the local score file.
18006 Phu.
18007
18008 For example, to do hierarchical scoring but use a non-server-specific
18009 overall score file, you could use the value
18010 @example
18011 (list (lambda (group) ("all.SCORE"))
18012       'gnus-score-find-hierarchical)
18013 @end example
18014
18015 @item gnus-score-expiry-days
18016 @vindex gnus-score-expiry-days
18017 This variable says how many days should pass before an unused score file
18018 entry is expired.  If this variable is @code{nil}, no score file entries
18019 are expired.  It's 7 by default.
18020
18021 @item gnus-update-score-entry-dates
18022 @vindex gnus-update-score-entry-dates
18023 If this variable is non-@code{nil}, temporary score entries that have
18024 been triggered (matched) will have their dates updated.  (This is how Gnus
18025 controls expiry---all non-matched-entries will become too old while
18026 matched entries will stay fresh and young.)  However, if you set this
18027 variable to @code{nil}, even matched entries will grow old and will
18028 have to face that oh-so grim reaper.
18029
18030 @item gnus-score-after-write-file-function
18031 @vindex gnus-score-after-write-file-function
18032 Function called with the name of the score file just written.
18033
18034 @item gnus-score-thread-simplify
18035 @vindex gnus-score-thread-simplify
18036 If this variable is non-@code{nil}, article subjects will be simplified
18037 for subject scoring purposes in the same manner as with
18038 threading---according to the current value of
18039 gnus-simplify-subject-functions.  If the scoring entry uses
18040 @code{substring} or @code{exact} matching, the match will also be
18041 simplified in this manner.
18042
18043 @end table
18044
18045
18046 @node Score File Format
18047 @section Score File Format
18048 @cindex score file format
18049
18050 A score file is an @code{emacs-lisp} file that normally contains just a
18051 single form.  Casual users are not expected to edit these files;
18052 everything can be changed from the summary buffer.
18053
18054 Anyway, if you'd like to dig into it yourself, here's an example:
18055
18056 @lisp
18057 (("from"
18058   ("Lars Ingebrigtsen" -10000)
18059   ("Per Abrahamsen")
18060   ("larsi\\|lmi" -50000 nil R))
18061  ("subject"
18062   ("Ding is Badd" nil 728373))
18063  ("xref"
18064   ("alt.politics" -1000 728372 s))
18065  ("lines"
18066   (2 -100 nil <))
18067  (mark 0)
18068  (expunge -1000)
18069  (mark-and-expunge -10)
18070  (read-only nil)
18071  (orphan -10)
18072  (adapt t)
18073  (files "/hom/larsi/News/gnu.SCORE")
18074  (exclude-files "all.SCORE")
18075  (local (gnus-newsgroup-auto-expire t)
18076         (gnus-summary-make-false-root empty))
18077  (eval (ding)))
18078 @end lisp
18079
18080 This example demonstrates most score file elements.  For a different
18081 approach, see @pxref{Advanced Scoring}.
18082
18083 Even though this looks much like lisp code, nothing here is actually
18084 @code{eval}ed.  The lisp reader is used to read this form, though, so it
18085 has to be valid syntactically, if not semantically.
18086
18087 Six keys are supported by this alist:
18088
18089 @table @code
18090
18091 @item STRING
18092 If the key is a string, it is the name of the header to perform the
18093 match on.  Scoring can only be performed on these eight headers:
18094 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
18095 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
18096 these headers, there are three strings to tell Gnus to fetch the entire
18097 article and do the match on larger parts of the article: @code{Body}
18098 will perform the match on the body of the article, @code{Head} will
18099 perform the match on the head of the article, and @code{All} will
18100 perform the match on the entire article.  Note that using any of these
18101 last three keys will slow down group entry @emph{considerably}.  The
18102 final ``header'' you can score on is @code{Followup}.  These score
18103 entries will result in new score entries being added for all follow-ups
18104 to articles that matches these score entries.
18105
18106 Following this key is a arbitrary number of score entries, where each
18107 score entry has one to four elements.
18108 @enumerate
18109
18110 @item
18111 The first element is the @dfn{match element}.  On most headers this will
18112 be a string, but on the Lines and Chars headers, this must be an
18113 integer.
18114
18115 @item
18116 If the second element is present, it should be a number---the @dfn{score
18117 element}.  This number should be an integer in the neginf to posinf
18118 interval.  This number is added to the score of the article if the match
18119 is successful.  If this element is not present, the
18120 @code{gnus-score-interactive-default-score} number will be used
18121 instead.  This is 1000 by default.
18122
18123 @item
18124 If the third element is present, it should be a number---the @dfn{date
18125 element}.  This date says when the last time this score entry matched,
18126 which provides a mechanism for expiring the score entries.  It this
18127 element is not present, the score entry is permanent.  The date is
18128 represented by the number of days since December 31, 1 BCE.
18129
18130 @item
18131 If the fourth element is present, it should be a symbol---the @dfn{type
18132 element}.  This element specifies what function should be used to see
18133 whether this score entry matches the article.  What match types that can
18134 be used depends on what header you wish to perform the match on.
18135 @table @dfn
18136
18137 @item From, Subject, References, Xref, Message-ID
18138 For most header types, there are the @code{r} and @code{R} (regexp), as
18139 well as @code{s} and @code{S} (substring) types, and @code{e} and
18140 @code{E} (exact match), and @code{w} (word match) types.  If this
18141 element is not present, Gnus will assume that substring matching should
18142 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
18143 that the matches will be done in a case-sensitive manner.  All these
18144 one-letter types are really just abbreviations for the @code{regexp},
18145 @code{string}, @code{exact}, and @code{word} types, which you can use
18146 instead, if you feel like.
18147
18148 @item Extra
18149 Just as for the standard string overview headers, if you are using
18150 gnus-extra-headers, you can score on these headers' values.  In this
18151 case, there is a 5th element in the score entry, being the name of the
18152 header to be scored.  The following entry is useful in your
18153 @file{all.SCORE} file in case of spam attacks from a single origin host,
18154 if your @sc{nntp} server tracks NNTP-Posting-Host in overviews:
18155
18156 @lisp
18157 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
18158 @end lisp
18159
18160 @item Lines, Chars
18161 These two headers use different match types: @code{<}, @code{>},
18162 @code{=}, @code{>=} and @code{<=}.
18163
18164 These predicates are true if
18165
18166 @example
18167 (PREDICATE HEADER MATCH)
18168 @end example
18169
18170 evaluates to non-@code{nil}.  For instance, the advanced match
18171 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
18172 following form:
18173
18174 @lisp
18175 (< header-value 4)
18176 @end lisp
18177
18178 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
18179 the match, we get the score added if the article has less than 4 lines.
18180 (It's easy to get confused and think it's the other way around.  But
18181 it's not.  I think.)
18182
18183 When matching on @code{Lines}, be careful because some back ends (like
18184 @code{nndir}) do not generate @code{Lines} header, so every article ends
18185 up being marked as having 0 lines.  This can lead to strange results if
18186 you happen to lower score of the articles with few lines.
18187
18188 @item Date
18189 For the Date header we have three kinda silly match types:
18190 @code{before}, @code{at} and @code{after}.  I can't really imagine this
18191 ever being useful, but, like, it would feel kinda silly not to provide
18192 this function.  Just in case.  You never know.  Better safe than sorry.
18193 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
18194 sex on a first date.  (I have been told that at least one person, and I
18195 quote, ``found this function indispensable'', however.)
18196
18197 @cindex ISO8601
18198 @cindex date
18199 A more useful match type is @code{regexp}.  With it, you can match the
18200 date string using a regular expression.  The date is normalized to
18201 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
18202 you want to match all articles that have been posted on April 1st in
18203 every year, you could use @samp{....0401.........} as a match string,
18204 for instance.  (Note that the date is kept in its original time zone, so
18205 this will match articles that were posted when it was April 1st where
18206 the article was posted from.  Time zones are such wholesome fun for the
18207 whole family, eh?)
18208
18209 @item Head, Body, All
18210 These three match keys use the same match types as the @code{From} (etc)
18211 header uses.
18212
18213 @item Followup
18214 This match key is somewhat special, in that it will match the
18215 @code{From} header, and affect the score of not only the matching
18216 articles, but also all followups to the matching articles.  This allows
18217 you e.g. increase the score of followups to your own articles, or
18218 decrease the score of followups to the articles of some known
18219 trouble-maker.  Uses the same match types as the @code{From} header
18220 uses.  (Using this match key will lead to creation of @file{ADAPT}
18221 files.)
18222
18223 @item Thread
18224 This match key works along the same lines as the @code{Followup} match
18225 key.  If you say that you want to score on a (sub-)thread started by an
18226 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
18227 match.  This will add a new @samp{thread} match for each article that
18228 has @var{x} in its @code{References} header.  (These new @samp{thread}
18229 matches will use the @code{Message-ID}s of these matching articles.)
18230 This will ensure that you can raise/lower the score of an entire thread,
18231 even though some articles in the thread may not have complete
18232 @code{References} headers.  Note that using this may lead to
18233 undeterministic scores of the articles in the thread.  (Using this match
18234 key will lead to creation of @file{ADAPT} files.)
18235 @end table
18236 @end enumerate
18237
18238 @cindex Score File Atoms
18239 @item mark
18240 The value of this entry should be a number.  Any articles with a score
18241 lower than this number will be marked as read.
18242
18243 @item expunge
18244 The value of this entry should be a number.  Any articles with a score
18245 lower than this number will be removed from the summary buffer.
18246
18247 @item mark-and-expunge
18248 The value of this entry should be a number.  Any articles with a score
18249 lower than this number will be marked as read and removed from the
18250 summary buffer.
18251
18252 @item thread-mark-and-expunge
18253 The value of this entry should be a number.  All articles that belong to
18254 a thread that has a total score below this number will be marked as read
18255 and removed from the summary buffer.  @code{gnus-thread-score-function}
18256 says how to compute the total score for a thread.
18257
18258 @item files
18259 The value of this entry should be any number of file names.  These files
18260 are assumed to be score files as well, and will be loaded the same way
18261 this one was.
18262
18263 @item exclude-files
18264 The clue of this entry should be any number of files.  These files will
18265 not be loaded, even though they would normally be so, for some reason or
18266 other.
18267
18268 @item eval
18269 The value of this entry will be @code{eval}el.  This element will be
18270 ignored when handling global score files.
18271
18272 @item read-only
18273 Read-only score files will not be updated or saved.  Global score files
18274 should feature this atom (@pxref{Global Score Files}).  (Note:
18275 @dfn{Global} here really means @dfn{global}; not your personal
18276 apply-to-all-groups score files.)
18277
18278 @item orphan
18279 The value of this entry should be a number.  Articles that do not have
18280 parents will get this number added to their scores.  Imagine you follow
18281 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
18282 will only follow a few of the threads, also want to see any new threads.
18283
18284 You can do this with the following two score file entries:
18285
18286 @example
18287         (orphan -500)
18288         (mark-and-expunge -100)
18289 @end example
18290
18291 When you enter the group the first time, you will only see the new
18292 threads.  You then raise the score of the threads that you find
18293 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
18294 rest.  Next time you enter the group, you will see new articles in the
18295 interesting threads, plus any new threads.
18296
18297 I.e.---the orphan score atom is for high-volume groups where a few
18298 interesting threads which can't be found automatically by ordinary
18299 scoring rules exist.
18300
18301 @item adapt
18302 This entry controls the adaptive scoring.  If it is @code{t}, the
18303 default adaptive scoring rules will be used.  If it is @code{ignore}, no
18304 adaptive scoring will be performed on this group.  If it is a list, this
18305 list will be used as the adaptive scoring rules.  If it isn't present,
18306 or is something other than @code{t} or @code{ignore}, the default
18307 adaptive scoring rules will be used.  If you want to use adaptive
18308 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
18309 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
18310 not want adaptive scoring.  If you only want adaptive scoring in a few
18311 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
18312 insert @code{(adapt t)} in the score files of the groups where you want
18313 it.
18314
18315 @item adapt-file
18316 All adaptive score entries will go to the file named by this entry.  It
18317 will also be applied when entering the group.  This atom might be handy
18318 if you want to adapt on several groups at once, using the same adaptive
18319 file for a number of groups.
18320
18321 @item local
18322 @cindex local variables
18323 The value of this entry should be a list of @code{(VAR VALUE)} pairs.
18324 Each @var{var} will be made buffer-local to the current summary buffer,
18325 and set to the value specified.  This is a convenient, if somewhat
18326 strange, way of setting variables in some groups if you don't like hooks
18327 much.  Note that the @var{value} won't be evaluated.
18328 @end table
18329
18330
18331 @node Score File Editing
18332 @section Score File Editing
18333
18334 You normally enter all scoring commands from the summary buffer, but you
18335 might feel the urge to edit them by hand as well, so we've supplied you
18336 with a mode for that.
18337
18338 It's simply a slightly customized @code{emacs-lisp} mode, with these
18339 additional commands:
18340
18341 @table @kbd
18342
18343 @item C-c C-c
18344 @kindex C-c C-c (Score)
18345 @findex gnus-score-edit-done
18346 Save the changes you have made and return to the summary buffer
18347 (@code{gnus-score-edit-done}).
18348
18349 @item C-c C-d
18350 @kindex C-c C-d (Score)
18351 @findex gnus-score-edit-insert-date
18352 Insert the current date in numerical format
18353 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
18354 you were wondering.
18355
18356 @item C-c C-p
18357 @kindex C-c C-p (Score)
18358 @findex gnus-score-pretty-print
18359 The adaptive score files are saved in an unformatted fashion.  If you
18360 intend to read one of these files, you want to @dfn{pretty print} it
18361 first.  This command (@code{gnus-score-pretty-print}) does that for
18362 you.
18363
18364 @end table
18365
18366 Type @kbd{M-x gnus-score-mode} to use this mode.
18367
18368 @vindex gnus-score-mode-hook
18369 @code{gnus-score-menu-hook} is run in score mode buffers.
18370
18371 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
18372 e} to begin editing score files.
18373
18374
18375 @node Adaptive Scoring
18376 @section Adaptive Scoring
18377 @cindex adaptive scoring
18378
18379 If all this scoring is getting you down, Gnus has a way of making it all
18380 happen automatically---as if by magic.  Or rather, as if by artificial
18381 stupidity, to be precise.
18382
18383 @vindex gnus-use-adaptive-scoring
18384 When you read an article, or mark an article as read, or kill an
18385 article, you leave marks behind.  On exit from the group, Gnus can sniff
18386 these marks and add score elements depending on what marks it finds.
18387 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
18388 @code{t} or @code{(line)}.  If you want score adaptively on separate
18389 words appearing in the subjects, you should set this variable to
18390 @code{(word)}.  If you want to use both adaptive methods, set this
18391 variable to @code{(word line)}.
18392
18393 @vindex gnus-default-adaptive-score-alist
18394 To give you complete control over the scoring process, you can customize
18395 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
18396 might look something like this:
18397
18398 @lisp
18399 (setq gnus-default-adaptive-score-alist
18400   '((gnus-unread-mark)
18401     (gnus-ticked-mark (from 4))
18402     (gnus-dormant-mark (from 5))
18403     (gnus-del-mark (from -4) (subject -1))
18404     (gnus-read-mark (from 4) (subject 2))
18405     (gnus-expirable-mark (from -1) (subject -1))
18406     (gnus-killed-mark (from -1) (subject -3))
18407     (gnus-kill-file-mark)
18408     (gnus-ancient-mark)
18409     (gnus-low-score-mark)
18410     (gnus-catchup-mark (from -1) (subject -1))))
18411 @end lisp
18412
18413 As you see, each element in this alist has a mark as a key (either a
18414 variable name or a ``real'' mark---a character).  Following this key is
18415 a arbitrary number of header/score pairs.  If there are no header/score
18416 pairs following the key, no adaptive scoring will be done on articles
18417 that have that key as the article mark.  For instance, articles with
18418 @code{gnus-unread-mark} in the example above will not get adaptive score
18419 entries.
18420
18421 Each article can have only one mark, so just a single of these rules
18422 will be applied to each article.
18423
18424 To take @code{gnus-del-mark} as an example---this alist says that all
18425 articles that have that mark (i.e., are marked with @samp{D}) will have a
18426 score entry added to lower based on the @code{From} header by -4, and
18427 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
18428
18429 If you have marked 10 articles with the same subject with
18430 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
18431 That means that that subject will get a score of ten times -1, which
18432 should be, unless I'm much mistaken, -10.
18433
18434 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
18435 the read articles will be marked with the @samp{E} mark.  This'll
18436 probably make adaptive scoring slightly impossible, so auto-expiring and
18437 adaptive scoring doesn't really mix very well.
18438
18439 The headers you can score on are @code{from}, @code{subject},
18440 @code{message-id}, @code{references}, @code{xref}, @code{lines},
18441 @code{chars} and @code{date}.  In addition, you can score on
18442 @code{followup}, which will create an adaptive score entry that matches
18443 on the @code{References} header using the @code{Message-ID} of the
18444 current article, thereby matching the following thread.
18445
18446 If you use this scheme, you should set the score file atom @code{mark}
18447 to something small---like -300, perhaps, to avoid having small random
18448 changes result in articles getting marked as read.
18449
18450 After using adaptive scoring for a week or so, Gnus should start to
18451 become properly trained and enhance the authors you like best, and kill
18452 the authors you like least, without you having to say so explicitly.
18453
18454 You can control what groups the adaptive scoring is to be performed on
18455 by using the score files (@pxref{Score File Format}).  This will also
18456 let you use different rules in different groups.
18457
18458 @vindex gnus-adaptive-file-suffix
18459 The adaptive score entries will be put into a file where the name is the
18460 group name with @code{gnus-adaptive-file-suffix} appended.  The default
18461 is @samp{ADAPT}.
18462
18463 @vindex gnus-score-exact-adapt-limit
18464 When doing adaptive scoring, substring or fuzzy matching would probably
18465 give you the best results in most cases.  However, if the header one
18466 matches is short, the possibility for false positives is great, so if
18467 the length of the match is less than
18468 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
18469 this variable is @code{nil}, exact matching will always be used to avoid
18470 this problem.
18471
18472 @vindex gnus-default-adaptive-word-score-alist
18473 As mentioned above, you can adapt either on individual words or entire
18474 headers.  If you adapt on words, the
18475 @code{gnus-default-adaptive-word-score-alist} variable says what score
18476 each instance of a word should add given a mark.
18477
18478 @lisp
18479 (setq gnus-default-adaptive-word-score-alist
18480       `((,gnus-read-mark . 30)
18481         (,gnus-catchup-mark . -10)
18482         (,gnus-killed-mark . -20)
18483         (,gnus-del-mark . -15)))
18484 @end lisp
18485
18486 This is the default value.  If you have adaption on words enabled, every
18487 word that appears in subjects of articles marked with
18488 @code{gnus-read-mark} will result in a score rule that increase the
18489 score with 30 points.
18490
18491 @vindex gnus-default-ignored-adaptive-words
18492 @vindex gnus-ignored-adaptive-words
18493 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
18494 will be ignored.  If you wish to add more words to be ignored, use the
18495 @code{gnus-ignored-adaptive-words} list instead.
18496
18497 @vindex gnus-adaptive-word-length-limit
18498 Some may feel that short words shouldn't count when doing adaptive
18499 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
18500 an integer.  Words shorter than this number will be ignored.  This
18501 variable defaults to @code{nil}.
18502
18503 @vindex gnus-adaptive-word-syntax-table
18504 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
18505 syntax table in effect.  It is similar to the standard syntax table, but
18506 it considers numbers to be non-word-constituent characters.
18507
18508 @vindex gnus-adaptive-word-minimum
18509 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
18510 word scoring process will never bring down the score of an article to
18511 below this number.  The default is @code{nil}.
18512
18513 @vindex gnus-adaptive-word-no-group-words
18514 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
18515 won't adaptively word score any of the words in the group name.  Useful
18516 for groups like @samp{comp.editors.emacs}, where most of the subject
18517 lines contain the word @samp{emacs}.
18518
18519 After using this scheme for a while, it might be nice to write a
18520 @code{gnus-psychoanalyze-user} command to go through the rules and see
18521 what words you like and what words you don't like.  Or perhaps not.
18522
18523 Note that the adaptive word scoring thing is highly experimental and is
18524 likely to change in the future.  Initial impressions seem to indicate
18525 that it's totally useless as it stands.  Some more work (involving more
18526 rigorous statistical methods) will have to be done to make this useful.
18527
18528
18529 @node Home Score File
18530 @section Home Score File
18531
18532 The score file where new score file entries will go is called the
18533 @dfn{home score file}.  This is normally (and by default) the score file
18534 for the group itself.  For instance, the home score file for
18535 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
18536
18537 However, this may not be what you want.  It is often convenient to share
18538 a common home score file among many groups---all @samp{emacs} groups
18539 could perhaps use the same home score file.
18540
18541 @vindex gnus-home-score-file
18542 The variable that controls this is @code{gnus-home-score-file}.  It can
18543 be:
18544
18545 @enumerate
18546 @item
18547 A string.  Then this file will be used as the home score file for all
18548 groups.
18549
18550 @item
18551 A function.  The result of this function will be used as the home score
18552 file.  The function will be called with the name of the group as the
18553 parameter.
18554
18555 @item
18556 A list.  The elements in this list can be:
18557
18558 @enumerate
18559 @item
18560 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
18561 group name, the @var{file-name} will be used as the home score file.
18562
18563 @item
18564 A function.  If the function returns non-nil, the result will be used as
18565 the home score file.
18566
18567 @item
18568 A string.  Use the string as the home score file.
18569 @end enumerate
18570
18571 The list will be traversed from the beginning towards the end looking
18572 for matches.
18573
18574 @end enumerate
18575
18576 So, if you want to use just a single score file, you could say:
18577
18578 @lisp
18579 (setq gnus-home-score-file
18580       "my-total-score-file.SCORE")
18581 @end lisp
18582
18583 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
18584 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
18585
18586 @findex gnus-hierarchial-home-score-file
18587 @lisp
18588 (setq gnus-home-score-file
18589       'gnus-hierarchial-home-score-file)
18590 @end lisp
18591
18592 This is a ready-made function provided for your convenience.
18593 Other functions include
18594
18595 @table @code
18596 @item gnus-current-home-score-file
18597 @findex gnus-current-home-score-file
18598 Return the ``current'' regular score file.  This will make scoring
18599 commands add entry to the ``innermost'' matching score file.
18600
18601 @end table
18602
18603 If you want to have one score file for the @samp{emacs} groups and
18604 another for the @samp{comp} groups, while letting all other groups use
18605 their own home score files:
18606
18607 @lisp
18608 (setq gnus-home-score-file
18609       ;; All groups that match the regexp "\\.emacs"
18610       '(("\\.emacs" "emacs.SCORE")
18611         ;; All the comp groups in one score file
18612         ("^comp" "comp.SCORE")))
18613 @end lisp
18614
18615 @vindex gnus-home-adapt-file
18616 @code{gnus-home-adapt-file} works exactly the same way as
18617 @code{gnus-home-score-file}, but says what the home adaptive score file
18618 is instead.  All new adaptive file entries will go into the file
18619 specified by this variable, and the same syntax is allowed.
18620
18621 In addition to using @code{gnus-home-score-file} and
18622 @code{gnus-home-adapt-file}, you can also use group parameters
18623 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
18624 Parameters}) to achieve much the same.  Group and topic parameters take
18625 precedence over this variable.
18626
18627
18628 @node Followups To Yourself
18629 @section Followups To Yourself
18630
18631 Gnus offers two commands for picking out the @code{Message-ID} header in
18632 the current buffer.  Gnus will then add a score rule that scores using
18633 this @code{Message-ID} on the @code{References} header of other
18634 articles.  This will, in effect, increase the score of all articles that
18635 respond to the article in the current buffer.  Quite useful if you want
18636 to easily note when people answer what you've said.
18637
18638 @table @code
18639
18640 @item gnus-score-followup-article
18641 @findex gnus-score-followup-article
18642 This will add a score to articles that directly follow up your own
18643 article.
18644
18645 @item gnus-score-followup-thread
18646 @findex gnus-score-followup-thread
18647 This will add a score to all articles that appear in a thread ``below''
18648 your own article.
18649 @end table
18650
18651 @vindex message-sent-hook
18652 These two functions are both primarily meant to be used in hooks like
18653 @code{message-sent-hook}, like this:
18654 @lisp
18655 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
18656 @end lisp
18657
18658
18659 If you look closely at your own @code{Message-ID}, you'll notice that
18660 the first two or three characters are always the same.  Here's two of
18661 mine:
18662
18663 @example
18664 <x6u3u47icf.fsf@@eyesore.no>
18665 <x6sp9o7ibw.fsf@@eyesore.no>
18666 @end example
18667
18668 So ``my'' ident on this machine is @samp{x6}.  This can be
18669 exploited---the following rule will raise the score on all followups to
18670 myself:
18671
18672 @lisp
18673 ("references"
18674  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
18675   1000 nil r))
18676 @end lisp
18677
18678 Whether it's the first two or first three characters that are ``yours''
18679 is system-dependent.
18680
18681
18682 @node Scoring On Other Headers
18683 @section Scoring On Other Headers
18684 @cindex scoring on other headers
18685
18686 Gnus is quite fast when scoring the ``traditional''
18687 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
18688 other headers requires writing a @code{head} scoring rule, which means
18689 that Gnus has to request every single article from the back end to find
18690 matches.  This takes a long time in big groups.
18691
18692 Now, there's not much you can do about this for news groups, but for
18693 mail groups, you have greater control.  In the @pxref{To From
18694 Newsgroups} section of the manual, it's explained in greater detail what
18695 this mechanism does, but here's a cookbook example for @code{nnml} on
18696 how to allow scoring on the @samp{To} and @samp{Cc} headers.
18697
18698 Put the following in your @file{.gnus.el} file.
18699
18700 @lisp
18701 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
18702       nnmail-extra-headers gnus-extra-headers)
18703 @end lisp
18704
18705 Restart Gnus and rebuild your @code{nnml} overview files with the
18706 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
18707 time if you have much mail.
18708
18709 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
18710 so: @kbd{I e s p To RET <your name> RET}.
18711
18712 See?  Simple.
18713
18714
18715 @node Scoring Tips
18716 @section Scoring Tips
18717 @cindex scoring tips
18718
18719 @table @dfn
18720
18721 @item Crossposts
18722 @cindex crossposts
18723 @cindex scoring crossposts
18724 If you want to lower the score of crossposts, the line to match on is
18725 the @code{Xref} header.
18726 @lisp
18727 ("xref" (" talk.politics.misc:" -1000))
18728 @end lisp
18729
18730 @item Multiple crossposts
18731 If you want to lower the score of articles that have been crossposted to
18732 more than, say, 3 groups:
18733 @lisp
18734 ("xref"
18735   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
18736    -1000 nil r))
18737 @end lisp
18738
18739 @item Matching on the body
18740 This is generally not a very good idea---it takes a very long time.
18741 Gnus actually has to fetch each individual article from the server.  But
18742 you might want to anyway, I guess.  Even though there are three match
18743 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
18744 and stick with it in each score file.  If you use any two, each article
18745 will be fetched @emph{twice}.  If you want to match a bit on the
18746 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
18747 the matches.
18748
18749 @item Marking as read
18750 You will probably want to mark articles that have scores below a certain
18751 number as read.  This is most easily achieved by putting the following
18752 in your @file{all.SCORE} file:
18753 @lisp
18754 ((mark -100))
18755 @end lisp
18756 You may also consider doing something similar with @code{expunge}.
18757
18758 @item Negated character classes
18759 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
18760 That will match newlines, which might lead to, well, The Unknown.  Say
18761 @code{[^abcd\n]*} instead.
18762 @end table
18763
18764
18765 @node Reverse Scoring
18766 @section Reverse Scoring
18767 @cindex reverse scoring
18768
18769 If you want to keep just articles that have @samp{Sex with Emacs} in the
18770 subject header, and expunge all other articles, you could put something
18771 like this in your score file:
18772
18773 @lisp
18774 (("subject"
18775   ("Sex with Emacs" 2))
18776  (mark 1)
18777  (expunge 1))
18778 @end lisp
18779
18780 So, you raise all articles that match @samp{Sex with Emacs} and mark the
18781 rest as read, and expunge them to boot.
18782
18783
18784 @node Global Score Files
18785 @section Global Score Files
18786 @cindex global score files
18787
18788 Sure, other newsreaders have ``global kill files''.  These are usually
18789 nothing more than a single kill file that applies to all groups, stored
18790 in the user's home directory.  Bah!  Puny, weak newsreaders!
18791
18792 What I'm talking about here are Global Score Files.  Score files from
18793 all over the world, from users everywhere, uniting all nations in one
18794 big, happy score file union!  Ange-score!  New and untested!
18795
18796 @vindex gnus-global-score-files
18797 All you have to do to use other people's score files is to set the
18798 @code{gnus-global-score-files} variable.  One entry for each score file,
18799 or each score file directory.  Gnus will decide by itself what score
18800 files are applicable to which group.
18801
18802 To use the score file
18803 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
18804 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
18805 say this:
18806
18807 @lisp
18808 (setq gnus-global-score-files
18809       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
18810         "/ftp@@ftp.some-where:/pub/score/"))
18811 @end lisp
18812
18813 @findex gnus-score-search-global-directories
18814 @noindent
18815 Simple, eh?  Directory names must end with a @samp{/}.  These
18816 directories are typically scanned only once during each Gnus session.
18817 If you feel the need to manually re-scan the remote directories, you can
18818 use the @code{gnus-score-search-global-directories} command.
18819
18820 Note that, at present, using this option will slow down group entry
18821 somewhat.  (That is---a lot.)
18822
18823 If you want to start maintaining score files for other people to use,
18824 just put your score file up for anonymous ftp and announce it to the
18825 world.  Become a retro-moderator!  Participate in the retro-moderator
18826 wars sure to ensue, where retro-moderators battle it out for the
18827 sympathy of the people, luring them to use their score files on false
18828 premises!  Yay!  The net is saved!
18829
18830 Here are some tips for the would-be retro-moderator, off the top of my
18831 head:
18832
18833 @itemize @bullet
18834
18835 @item
18836 Articles heavily crossposted are probably junk.
18837 @item
18838 To lower a single inappropriate article, lower by @code{Message-ID}.
18839 @item
18840 Particularly brilliant authors can be raised on a permanent basis.
18841 @item
18842 Authors that repeatedly post off-charter for the group can safely be
18843 lowered out of existence.
18844 @item
18845 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
18846 articles completely.
18847
18848 @item
18849 Use expiring score entries to keep the size of the file down.  You
18850 should probably have a long expiry period, though, as some sites keep
18851 old articles for a long time.
18852 @end itemize
18853
18854 ... I wonder whether other newsreaders will support global score files
18855 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
18856 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
18857 holding our breath yet?
18858
18859
18860 @node Kill Files
18861 @section Kill Files
18862 @cindex kill files
18863
18864 Gnus still supports those pesky old kill files.  In fact, the kill file
18865 entries can now be expiring, which is something I wrote before Daniel
18866 Quinlan thought of doing score files, so I've left the code in there.
18867
18868 In short, kill processing is a lot slower (and I do mean @emph{a lot})
18869 than score processing, so it might be a good idea to rewrite your kill
18870 files into score files.
18871
18872 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
18873 forms into this file, which means that you can use kill files as some
18874 sort of primitive hook function to be run on group entry, even though
18875 that isn't a very good idea.
18876
18877 Normal kill files look like this:
18878
18879 @lisp
18880 (gnus-kill "From" "Lars Ingebrigtsen")
18881 (gnus-kill "Subject" "ding")
18882 (gnus-expunge "X")
18883 @end lisp
18884
18885 This will mark every article written by me as read, and remove the
18886 marked articles from the summary buffer.  Very useful, you'll agree.
18887
18888 Other programs use a totally different kill file syntax.  If Gnus
18889 encounters what looks like a @code{rn} kill file, it will take a stab at
18890 interpreting it.
18891
18892 Two summary functions for editing a GNUS kill file:
18893
18894 @table @kbd
18895
18896 @item M-k
18897 @kindex M-k (Summary)
18898 @findex gnus-summary-edit-local-kill
18899 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
18900
18901 @item M-K
18902 @kindex M-K (Summary)
18903 @findex gnus-summary-edit-global-kill
18904 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
18905 @end table
18906
18907 Two group mode functions for editing the kill files:
18908
18909 @table @kbd
18910
18911 @item M-k
18912 @kindex M-k (Group)
18913 @findex gnus-group-edit-local-kill
18914 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
18915
18916 @item M-K
18917 @kindex M-K (Group)
18918 @findex gnus-group-edit-global-kill
18919 Edit the general kill file (@code{gnus-group-edit-global-kill}).
18920 @end table
18921
18922 Kill file variables:
18923
18924 @table @code
18925 @item gnus-kill-file-name
18926 @vindex gnus-kill-file-name
18927 A kill file for the group @samp{soc.motss} is normally called
18928 @file{soc.motss.KILL}.  The suffix appended to the group name to get
18929 this file name is detailed by the @code{gnus-kill-file-name} variable.
18930 The ``global'' kill file (not in the score file sense of ``global'', of
18931 course) is just called @file{KILL}.
18932
18933 @vindex gnus-kill-save-kill-file
18934 @item gnus-kill-save-kill-file
18935 If this variable is non-@code{nil}, Gnus will save the
18936 kill file after processing, which is necessary if you use expiring
18937 kills.
18938
18939 @item gnus-apply-kill-hook
18940 @vindex gnus-apply-kill-hook
18941 @findex gnus-apply-kill-file-unless-scored
18942 @findex gnus-apply-kill-file
18943 A hook called to apply kill files to a group.  It is
18944 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
18945 kill file if you have a score file for the same group, you can set this
18946 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
18947 kill files to be processed, you should set this variable to @code{nil}.
18948
18949 @item gnus-kill-file-mode-hook
18950 @vindex gnus-kill-file-mode-hook
18951 A hook called in kill-file mode buffers.
18952
18953 @end table
18954
18955
18956 @node Converting Kill Files
18957 @section Converting Kill Files
18958 @cindex kill files
18959 @cindex converting kill files
18960
18961 If you have loads of old kill files, you may want to convert them into
18962 score files.  If they are ``regular'', you can use
18963 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
18964 by hand.
18965
18966 The kill to score conversion package isn't included in Gnus by default.
18967 You can fetch it from
18968 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
18969
18970 If your old kill files are very complex---if they contain more
18971 non-@code{gnus-kill} forms than not, you'll have to convert them by
18972 hand.  Or just let them be as they are.  Gnus will still use them as
18973 before.
18974
18975
18976 @node GroupLens
18977 @section GroupLens
18978 @cindex GroupLens
18979
18980 GroupLens (@uref{http://www.cs.umn.edu/Research/GroupLens/}) is a
18981 collaborative filtering system that helps you work together with other
18982 people to find the quality news articles out of the huge volume of
18983 news articles generated every day.
18984
18985 To accomplish this the GroupLens system combines your opinions about
18986 articles you have already read with the opinions of others who have done
18987 likewise and gives you a personalized prediction for each unread news
18988 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
18989 rate articles, and finds other people that rate articles the same way.
18990 Once it has found some people you agree with it tells you, in the form
18991 of a prediction, what they thought of the article.  You can use this
18992 prediction to help you decide whether or not you want to read the
18993 article.
18994
18995 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
18996 so this section is mostly of historical interest.
18997
18998 @menu
18999 * Using GroupLens::             How to make Gnus use GroupLens.
19000 * Rating Articles::             Letting GroupLens know how you rate articles.
19001 * Displaying Predictions::      Displaying predictions given by GroupLens.
19002 * GroupLens Variables::         Customizing GroupLens.
19003 @end menu
19004
19005
19006 @node Using GroupLens
19007 @subsection Using GroupLens
19008
19009 To use GroupLens you must register a pseudonym with your local Better
19010 Bit Bureau (BBB).
19011 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html} is the only
19012 better bit in town at the moment.
19013
19014 Once you have registered you'll need to set a couple of variables.
19015
19016 @table @code
19017
19018 @item gnus-use-grouplens
19019 @vindex gnus-use-grouplens
19020 Setting this variable to a non-@code{nil} value will make Gnus hook into
19021 all the relevant GroupLens functions.
19022
19023 @item grouplens-pseudonym
19024 @vindex grouplens-pseudonym
19025 This variable should be set to the pseudonym you got when registering
19026 with the Better Bit Bureau.
19027
19028 @item grouplens-newsgroups
19029 @vindex grouplens-newsgroups
19030 A list of groups that you want to get GroupLens predictions for.
19031
19032 @end table
19033
19034 That's the minimum of what you need to get up and running with GroupLens.
19035 Once you've registered, GroupLens will start giving you scores for
19036 articles based on the average of what other people think.  But, to get
19037 the real benefit of GroupLens you need to start rating articles
19038 yourself.  Then the scores GroupLens gives you will be personalized for
19039 you, based on how the people you usually agree with have already rated.
19040
19041
19042 @node Rating Articles
19043 @subsection Rating Articles
19044
19045 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
19046 Where 1 means something like this article is a waste of bandwidth and 5
19047 means that the article was really good.  The basic question to ask
19048 yourself is, "on a scale from 1 to 5 would I like to see more articles
19049 like this one?"
19050
19051 There are four ways to enter a rating for an article in GroupLens.
19052
19053 @table @kbd
19054
19055 @item r
19056 @kindex r (GroupLens)
19057 @findex bbb-summary-rate-article
19058 This function will prompt you for a rating on a scale of one to five.
19059
19060 @item k
19061 @kindex k (GroupLens)
19062 @findex grouplens-score-thread
19063 This function will prompt you for a rating, and rate all the articles in
19064 the thread.  This is really useful for some of those long running giant
19065 threads in rec.humor.
19066
19067 @end table
19068
19069 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
19070 the score of the article you're reading.
19071
19072 @table @kbd
19073
19074 @item 1-5 n
19075 @kindex n (GroupLens)
19076 @findex grouplens-next-unread-article
19077 Rate the article and go to the next unread article.
19078
19079 @item 1-5 ,
19080 @kindex , (GroupLens)
19081 @findex grouplens-best-unread-article
19082 Rate the article and go to the next unread article with the highest score.
19083
19084 @end table
19085
19086 If you want to give the current article a score of 4 and then go to the
19087 next article, just type @kbd{4 n}.
19088
19089
19090 @node Displaying Predictions
19091 @subsection Displaying Predictions
19092
19093 GroupLens makes a prediction for you about how much you will like a
19094 news article.  The predictions from GroupLens are on a scale from 1 to
19095 5, where 1 is the worst and 5 is the best.  You can use the predictions
19096 from GroupLens in one of three ways controlled by the variable
19097 @code{gnus-grouplens-override-scoring}.
19098
19099 @vindex gnus-grouplens-override-scoring
19100 There are three ways to display predictions in grouplens.  You may
19101 choose to have the GroupLens scores contribute to, or override the
19102 regular gnus scoring mechanism.  override is the default; however, some
19103 people prefer to see the Gnus scores plus the grouplens scores.  To get
19104 the separate scoring behavior you need to set
19105 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
19106 GroupLens predictions combined with the grouplens scores set it to
19107 @code{'override} and to combine the scores set
19108 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
19109 the combine option you will also want to set the values for
19110 @code{grouplens-prediction-offset} and
19111 @code{grouplens-score-scale-factor}.
19112
19113 @vindex grouplens-prediction-display
19114 In either case, GroupLens gives you a few choices for how you would like
19115 to see your predictions displayed.  The display of predictions is
19116 controlled by the @code{grouplens-prediction-display} variable.
19117
19118 The following are valid values for that variable.
19119
19120 @table @code
19121 @item prediction-spot
19122 The higher the prediction, the further to the right an @samp{*} is
19123 displayed.
19124
19125 @item confidence-interval
19126 A numeric confidence interval.
19127
19128 @item prediction-bar
19129 The higher the prediction, the longer the bar.
19130
19131 @item confidence-bar
19132 Numerical confidence.
19133
19134 @item confidence-spot
19135 The spot gets bigger with more confidence.
19136
19137 @item prediction-num
19138 Plain-old numeric value.
19139
19140 @item confidence-plus-minus
19141 Prediction +/- confidence.
19142
19143 @end table
19144
19145
19146 @node GroupLens Variables
19147 @subsection GroupLens Variables
19148
19149 @table @code
19150
19151 @item gnus-summary-grouplens-line-format
19152 The summary line format used in GroupLens-enhanced summary buffers.  It
19153 accepts the same specs as the normal summary line format (@pxref{Summary
19154 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
19155 %s\n}.
19156
19157 @item grouplens-bbb-host
19158 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
19159 default.
19160
19161 @item grouplens-bbb-port
19162 Port of the host running the bbbd server.  The default is 9000.
19163
19164 @item grouplens-score-offset
19165 Offset the prediction by this value.  In other words, subtract the
19166 prediction value by this number to arrive at the effective score.  The
19167 default is 0.
19168
19169 @item grouplens-score-scale-factor
19170 This variable allows the user to magnify the effect of GroupLens scores.
19171 The scale factor is applied after the offset.  The default is 1.
19172
19173 @end table
19174
19175
19176 @node Advanced Scoring
19177 @section Advanced Scoring
19178
19179 Scoring on Subjects and From headers is nice enough, but what if you're
19180 really interested in what a person has to say only when she's talking
19181 about a particular subject?  Or what if you really don't want to
19182 read what person A has to say when she's following up to person B, but
19183 want to read what she says when she's following up to person C?
19184
19185 By using advanced scoring rules you may create arbitrarily complex
19186 scoring patterns.
19187
19188 @menu
19189 * Advanced Scoring Syntax::     A definition.
19190 * Advanced Scoring Examples::   What they look like.
19191 * Advanced Scoring Tips::       Getting the most out of it.
19192 @end menu
19193
19194
19195 @node Advanced Scoring Syntax
19196 @subsection Advanced Scoring Syntax
19197
19198 Ordinary scoring rules have a string as the first element in the rule.
19199 Advanced scoring rules have a list as the first element.  The second
19200 element is the score to be applied if the first element evaluated to a
19201 non-@code{nil} value.
19202
19203 These lists may consist of three logical operators, one redirection
19204 operator, and various match operators.
19205
19206 Logical operators:
19207
19208 @table @code
19209 @item &
19210 @itemx and
19211 This logical operator will evaluate each of its arguments until it finds
19212 one that evaluates to @code{false}, and then it'll stop.  If all arguments
19213 evaluate to @code{true} values, then this operator will return
19214 @code{true}.
19215
19216 @item |
19217 @itemx or
19218 This logical operator will evaluate each of its arguments until it finds
19219 one that evaluates to @code{true}.  If no arguments are @code{true},
19220 then this operator will return @code{false}.
19221
19222 @item !
19223 @itemx not
19224 @itemx Â¬
19225 This logical operator only takes a single argument.  It returns the
19226 logical negation of the value of its argument.
19227
19228 @end table
19229
19230 There is an @dfn{indirection operator} that will make its arguments
19231 apply to the ancestors of the current article being scored.  For
19232 instance, @code{1-} will make score rules apply to the parent of the
19233 current article.  @code{2-} will make score rules apply to the
19234 grandparent of the current article.  Alternatively, you can write
19235 @code{^^}, where the number of @code{^}s (carets) says how far back into
19236 the ancestry you want to go.
19237
19238 Finally, we have the match operators.  These are the ones that do the
19239 real work.  Match operators are header name strings followed by a match
19240 and a match type.  A typical match operator looks like @samp{("from"
19241 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
19242 simple scoring, and the match types are also the same.
19243
19244
19245 @node Advanced Scoring Examples
19246 @subsection Advanced Scoring Examples
19247
19248 Please note that the following examples are score file rules.  To
19249 make a complete score file from them, surround them with another pair
19250 of parentheses.
19251
19252 Let's say you want to increase the score of articles written by Lars
19253 when he's talking about Gnus:
19254
19255 @example
19256 ((&
19257   ("from" "Lars Ingebrigtsen")
19258   ("subject" "Gnus"))
19259  1000)
19260 @end example
19261
19262 Quite simple, huh?
19263
19264 When he writes long articles, he sometimes has something nice to say:
19265
19266 @example
19267 ((&
19268   ("from" "Lars Ingebrigtsen")
19269   (|
19270    ("subject" "Gnus")
19271    ("lines" 100 >)))
19272  1000)
19273 @end example
19274
19275 However, when he responds to things written by Reig Eigil Logge, you
19276 really don't want to read what he's written:
19277
19278 @example
19279 ((&
19280   ("from" "Lars Ingebrigtsen")
19281   (1- ("from" "Reig Eigir Logge")))
19282  -100000)
19283 @end example
19284
19285 Everybody that follows up Redmondo when he writes about disappearing
19286 socks should have their scores raised, but only when they talk about
19287 white socks.  However, when Lars talks about socks, it's usually not
19288 very interesting:
19289
19290 @example
19291 ((&
19292   (1-
19293    (&
19294     ("from" "redmondo@@.*no" r)
19295     ("body" "disappearing.*socks" t)))
19296   (! ("from" "Lars Ingebrigtsen"))
19297   ("body" "white.*socks"))
19298  1000)
19299 @end example
19300
19301 The possibilities are endless.
19302
19303
19304 @node Advanced Scoring Tips
19305 @subsection Advanced Scoring Tips
19306
19307 The @code{&} and @code{|} logical operators do short-circuit logic.
19308 That is, they stop processing their arguments when it's clear what the
19309 result of the operation will be.  For instance, if one of the arguments
19310 of an @code{&} evaluates to @code{false}, there's no point in evaluating
19311 the rest of the arguments.  This means that you should put slow matches
19312 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
19313 @samp{subject}) first.
19314
19315 The indirection arguments (@code{1-} and so on) will make their
19316 arguments work on previous generations of the thread.  If you say
19317 something like:
19318
19319 @example
19320 ...
19321 (1-
19322  (1-
19323   ("from" "lars")))
19324 ...
19325 @end example
19326
19327 Then that means "score on the from header of the grandparent of the
19328 current article".  An indirection is quite fast, but it's better to say:
19329
19330 @example
19331 (1-
19332  (&
19333   ("from" "Lars")
19334   ("subject" "Gnus")))
19335 @end example
19336
19337 than it is to say:
19338
19339 @example
19340 (&
19341  (1- ("from" "Lars"))
19342  (1- ("subject" "Gnus")))
19343 @end example
19344
19345
19346 @node Score Decays
19347 @section Score Decays
19348 @cindex score decays
19349 @cindex decays
19350
19351 You may find that your scores have a tendency to grow without
19352 bounds, especially if you're using adaptive scoring.  If scores get too
19353 big, they lose all meaning---they simply max out and it's difficult to
19354 use them in any sensible way.
19355
19356 @vindex gnus-decay-scores
19357 @findex gnus-decay-score
19358 @vindex gnus-decay-score-function
19359 Gnus provides a mechanism for decaying scores to help with this problem.
19360 When score files are loaded and @code{gnus-decay-scores} is
19361 non-@code{nil}, Gnus will run the score files through the decaying
19362 mechanism thereby lowering the scores of all non-permanent score rules.
19363 The decay itself if performed by the @code{gnus-decay-score-function}
19364 function, which is @code{gnus-decay-score} by default.  Here's the
19365 definition of that function:
19366
19367 @lisp
19368 (defun gnus-decay-score (score)
19369   "Decay SCORE.
19370 This is done according to `gnus-score-decay-constant'
19371 and `gnus-score-decay-scale'."
19372   (floor
19373    (- score
19374       (* (if (< score 0) 1 -1)
19375          (min (abs score)
19376               (max gnus-score-decay-constant
19377                    (* (abs score)
19378                       gnus-score-decay-scale)))))))
19379 @end lisp
19380
19381 @vindex gnus-score-decay-scale
19382 @vindex gnus-score-decay-constant
19383 @code{gnus-score-decay-constant} is 3 by default and
19384 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
19385
19386 @enumerate
19387 @item
19388 Scores between -3 and 3 will be set to 0 when this function is called.
19389
19390 @item
19391 Scores with magnitudes between 3 and 60 will be shrunk by 3.
19392
19393 @item
19394 Scores with magnitudes greater than 60 will be shrunk by 5% of the
19395 score.
19396 @end enumerate
19397
19398 If you don't like this decay function, write your own.  It is called
19399 with the score to be decayed as its only parameter, and it should return
19400 the new score, which should be an integer.
19401
19402 Gnus will try to decay scores once a day.  If you haven't run Gnus for
19403 four days, Gnus will decay the scores four times, for instance.
19404
19405 @iftex
19406 @iflatex
19407 @chapter Message
19408 @include message.texi
19409 @chapter Emacs MIME
19410 @include emacs-mime.texi
19411 @chapter Sieve
19412 @include sieve.texi
19413 @chapter PGG
19414 @include pgg.texi
19415 @end iflatex
19416 @end iftex
19417
19418 @node Various
19419 @chapter Various
19420
19421 @menu
19422 * Process/Prefix::              A convention used by many treatment commands.
19423 * Interactive::                 Making Gnus ask you many questions.
19424 * Symbolic Prefixes::           How to supply some Gnus functions with options.
19425 * Formatting Variables::        You can specify what buffers should look like.
19426 * Window Layout::               Configuring the Gnus buffer windows.
19427 * Faces and Fonts::             How to change how faces look.
19428 * Compilation::                 How to speed Gnus up.
19429 * Mode Lines::                  Displaying information in the mode lines.
19430 * Highlighting and Menus::      Making buffers look all nice and cozy.
19431 * Buttons::                     Get tendinitis in ten easy steps!
19432 * Daemons::                     Gnus can do things behind your back.
19433 * NoCeM::                       How to avoid spam and other fatty foods.
19434 * Undo::                        Some actions can be undone.
19435 * Predicate Specifiers::        Specifying predicates.
19436 * Moderation::                  What to do if you're a moderator.
19437 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
19438 * Fuzzy Matching::              What's the big fuzz?
19439 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
19440 * Various Various::             Things that are really various.
19441 @end menu
19442
19443
19444 @node Process/Prefix
19445 @section Process/Prefix
19446 @cindex process/prefix convention
19447
19448 Many functions, among them functions for moving, decoding and saving
19449 articles, use what is known as the @dfn{Process/Prefix convention}.
19450
19451 This is a method for figuring out what articles the user wants the
19452 command to be performed on.
19453
19454 It goes like this:
19455
19456 If the numeric prefix is N, perform the operation on the next N
19457 articles, starting with the current one.  If the numeric prefix is
19458 negative, perform the operation on the previous N articles, starting
19459 with the current one.
19460
19461 @vindex transient-mark-mode
19462 If @code{transient-mark-mode} in non-@code{nil} and the region is
19463 active, all articles in the region will be worked upon.
19464
19465 If there is no numeric prefix, but some articles are marked with the
19466 process mark, perform the operation on the articles marked with
19467 the process mark.
19468
19469 If there is neither a numeric prefix nor any articles marked with the
19470 process mark, just perform the operation on the current article.
19471
19472 Quite simple, really, but it needs to be made clear so that surprises
19473 are avoided.
19474
19475 Commands that react to the process mark will push the current list of
19476 process marked articles onto a stack and will then clear all process
19477 marked articles.  You can restore the previous configuration with the
19478 @kbd{M P y} command (@pxref{Setting Process Marks}).
19479
19480 @vindex gnus-summary-goto-unread
19481 One thing that seems to shock & horrify lots of people is that, for
19482 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
19483 Since each @kbd{d} (which marks the current article as read) by default
19484 goes to the next unread article after marking, this means that @kbd{3 d}
19485 will mark the next three unread articles as read, no matter what the
19486 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
19487 @code{nil} for a more straightforward action.
19488
19489 Many commands do not use the process/prefix convention.  All commands
19490 that do explicitly say so in this manual.  To apply the process/prefix
19491 convention to commands that do not use it, you can use the @kbd{M-&}
19492 command.  For instance, to mark all the articles in the group as
19493 expirable, you could say `M P b M-& E'.
19494
19495
19496 @node Interactive
19497 @section Interactive
19498 @cindex interaction
19499
19500 @table @code
19501
19502 @item gnus-novice-user
19503 @vindex gnus-novice-user
19504 If this variable is non-@code{nil}, you are either a newcomer to the
19505 World of Usenet, or you are very cautious, which is a nice thing to be,
19506 really.  You will be given questions of the type ``Are you sure you want
19507 to do this?'' before doing anything dangerous.  This is @code{t} by
19508 default.
19509
19510 @item gnus-expert-user
19511 @vindex gnus-expert-user
19512 If this variable is non-@code{nil}, you will seldom be asked any
19513 questions by Gnus.  It will simply assume you know what you're doing, no
19514 matter how strange.
19515
19516 @item gnus-interactive-catchup
19517 @vindex gnus-interactive-catchup
19518 Require confirmation before catching up a group if non-@code{nil}.  It
19519 is @code{t} by default.
19520
19521 @item gnus-interactive-exit
19522 @vindex gnus-interactive-exit
19523 Require confirmation before exiting Gnus.  This variable is @code{t} by
19524 default.
19525 @end table
19526
19527
19528 @node Symbolic Prefixes
19529 @section Symbolic Prefixes
19530 @cindex symbolic prefixes
19531
19532 Quite a lot of Emacs commands react to the (numeric) prefix.  For
19533 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
19534 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
19535 rule of 900 to the current article.
19536
19537 This is all nice and well, but what if you want to give a command some
19538 additional information?  Well, what most commands do is interpret the
19539 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
19540 doesn't want a backup file to be created when saving the current buffer,
19541 for instance.  But what if you want to save without making a backup
19542 file, and you want Emacs to flash lights and play a nice tune at the
19543 same time?  You can't, and you're probably perfectly happy that way.
19544
19545 @kindex M-i (Summary)
19546 @findex gnus-symbolic-argument
19547 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
19548 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
19549 character typed in is the value.  You can stack as many @kbd{M-i}
19550 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
19551 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
19552 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
19553 @code{b}''.  You get the drift.
19554
19555 Typing in symbolic prefixes to commands that don't accept them doesn't
19556 hurt, but it doesn't do any good either.  Currently not many Gnus
19557 functions make use of the symbolic prefix.
19558
19559 If you're interested in how Gnus implements this, @pxref{Extended
19560 Interactive}.
19561
19562
19563 @node Formatting Variables
19564 @section Formatting Variables
19565 @cindex formatting variables
19566
19567 Throughout this manual you've probably noticed lots of variables called
19568 things like @code{gnus-group-line-format} and
19569 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
19570 output lines in the various buffers.  There's quite a lot of them.
19571 Fortunately, they all use the same syntax, so there's not that much to
19572 be annoyed by.
19573
19574 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
19575 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
19576 lots of percentages everywhere.
19577
19578 @menu
19579 * Formatting Basics::           A formatting variable is basically a format string.
19580 * Mode Line Formatting::        Some rules about mode line formatting variables.
19581 * Advanced Formatting::         Modifying output in various ways.
19582 * User-Defined Specs::          Having Gnus call your own functions.
19583 * Formatting Fonts::            Making the formatting look colorful and nice.
19584 * Positioning Point::           Moving point to a position after an operation.
19585 * Tabulation::                  Tabulating your output.
19586 * Wide Characters::             Dealing with wide characters.
19587 @end menu
19588
19589 Currently Gnus uses the following formatting variables:
19590 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
19591 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
19592 @code{gnus-group-mode-line-format},
19593 @code{gnus-summary-mode-line-format},
19594 @code{gnus-article-mode-line-format},
19595 @code{gnus-server-mode-line-format}, and
19596 @code{gnus-summary-pick-line-format}.
19597
19598 All these format variables can also be arbitrary elisp forms.  In that
19599 case, they will be @code{eval}ed to insert the required lines.
19600
19601 @kindex M-x gnus-update-format
19602 @findex gnus-update-format
19603 Gnus includes a command to help you while creating your own format
19604 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
19605 update the spec in question and pop you to a buffer where you can
19606 examine the resulting lisp code to be run to generate the line.
19607
19608
19609
19610 @node Formatting Basics
19611 @subsection Formatting Basics
19612
19613 Each @samp{%} element will be replaced by some string or other when the
19614 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
19615 spec, and pad with spaces to get a 5-character field''.
19616
19617 As with normal C and Emacs Lisp formatting strings, the numerical
19618 modifier between the @samp{%} and the formatting type character will
19619 @dfn{pad} the output so that it is always at least that long.
19620 @samp{%5y} will make the field always (at least) five characters wide by
19621 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
19622 the right instead.
19623
19624 You may also wish to limit the length of the field to protect against
19625 particularly wide values.  For that you can say @samp{%4,6y}, which
19626 means that the field will never be more than 6 characters wide and never
19627 less than 4 characters wide.
19628
19629 Also Gnus supports some extended format specifications, such as
19630 @samp{%&user-date;}.
19631
19632
19633 @node Mode Line Formatting
19634 @subsection Mode Line Formatting
19635
19636 Mode line formatting variables (e.g.,
19637 @code{gnus-summary-mode-line-format}) follow the same rules as other,
19638 buffer line oriented formatting variables (@pxref{Formatting Basics})
19639 with the following two differences:
19640
19641 @enumerate
19642
19643 @item
19644 There must be no newline (@samp{\n}) at the end.
19645
19646 @item
19647 The special @samp{%%b} spec can be used to display the buffer name.
19648 Well, it's no spec at all, really---@samp{%%} is just a way to quote
19649 @samp{%} to allow it to pass through the formatting machinery unmangled,
19650 so that Emacs receives @samp{%b}, which is something the Emacs mode line
19651 display interprets to mean ``show the buffer name''.  For a full list of
19652 mode line specs Emacs understands, see the documentation of the
19653 @code{mode-line-format} variable.
19654
19655 @end enumerate
19656
19657
19658 @node Advanced Formatting
19659 @subsection Advanced Formatting
19660
19661 It is frequently useful to post-process the fields in some way.
19662 Padding, limiting, cutting off parts and suppressing certain values can
19663 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
19664 look like @samp{%~(cut 3)~(ignore "0")y}.
19665
19666 These are the valid modifiers:
19667
19668 @table @code
19669 @item pad
19670 @itemx pad-left
19671 Pad the field to the left with spaces until it reaches the required
19672 length.
19673
19674 @item pad-right
19675 Pad the field to the right with spaces until it reaches the required
19676 length.
19677
19678 @item max
19679 @itemx max-left
19680 Cut off characters from the left until it reaches the specified length.
19681
19682 @item max-right
19683 Cut off characters from the right until it reaches the specified
19684 length.
19685
19686 @item cut
19687 @itemx cut-left
19688 Cut off the specified number of characters from the left.
19689
19690 @item cut-right
19691 Cut off the specified number of characters from the right.
19692
19693 @item ignore
19694 Return an empty string if the field is equal to the specified value.
19695
19696 @item form
19697 Use the specified form as the field value when the @samp{@@} spec is
19698 used.
19699
19700 Here's an example:
19701
19702 @lisp
19703 "~(form (current-time-string))@@"
19704 @end lisp
19705
19706 @end table
19707
19708 Let's take an example.  The @samp{%o} spec in the summary mode lines
19709 will return a date in compact ISO8601 format---@samp{19960809T230410}.
19710 This is quite a mouthful, so we want to shave off the century number and
19711 the time, leaving us with a six-character date.  That would be
19712 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
19713 maxing, and we need the padding to ensure that the date is never less
19714 than 6 characters to make it look nice in columns.)
19715
19716 Ignoring is done first; then cutting; then maxing; and then as the very
19717 last operation, padding.
19718
19719 If you use lots of these advanced thingies, you'll find that Gnus gets
19720 quite slow.  This can be helped enormously by running @kbd{M-x
19721 gnus-compile} when you are satisfied with the look of your lines.
19722 @xref{Compilation}.
19723
19724
19725 @node User-Defined Specs
19726 @subsection User-Defined Specs
19727
19728 All the specs allow for inserting user defined specifiers---@samp{u}.
19729 The next character in the format string should be a letter.  Gnus
19730 will call the function @code{gnus-user-format-function-}@samp{X}, where
19731 @samp{X} is the letter following @samp{%u}.  The function will be passed
19732 a single parameter---what the parameter means depends on what buffer
19733 it's being called from.  The function should return a string, which will
19734 be inserted into the buffer just like information from any other
19735 specifier.  This function may also be called with dummy values, so it
19736 should protect against that.
19737
19738 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
19739 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
19740
19741 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
19742 much the same without defining new functions.  Here's an example:
19743 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
19744 given here will be evaluated to yield the current line number, and then
19745 inserted.
19746
19747
19748 @node Formatting Fonts
19749 @subsection Formatting Fonts
19750
19751 There are specs for highlighting, and these are shared by all the format
19752 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
19753 the special @code{mouse-face} property set, which means that it will be
19754 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
19755 over it.
19756
19757 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
19758 normal faces set using @code{gnus-face-0}, which is @code{bold} by
19759 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
19760 and so on.  Create as many faces as you wish.  The same goes for the
19761 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
19762 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
19763
19764 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
19765 special @code{balloon-help} property set to @code{gnus-balloon-face-0}.
19766 If you say @samp{%1<<}, you'll get @code{gnus-balloon-face-1} and so on.
19767 The @code{gnus-balloon-face-*} variables should be either strings or
19768 symbols naming functions that return a string.  When the mouse passes
19769 over text with this property set, a balloon window will appear and
19770 display the string.  Please refer to @ref{(emacs)Help Echo} (in GNU
19771 Emacs) or the doc string of @code{balloon-help-mode} (in XEmacs) for
19772 more information on this.  (For technical reasons, the guillemets have
19773 been approximated as @samp{<<} and @samp{>>} in this paragraph.)
19774
19775 Here's an alternative recipe for the group buffer:
19776
19777 @lisp
19778 ;; Create three face types.
19779 (setq gnus-face-1 'bold)
19780 (setq gnus-face-3 'italic)
19781
19782 ;; We want the article count to be in
19783 ;; a bold and green face.  So we create
19784 ;; a new face called `my-green-bold'.
19785 (copy-face 'bold 'my-green-bold)
19786 ;; Set the color.
19787 (set-face-foreground 'my-green-bold "ForestGreen")
19788 (setq gnus-face-2 'my-green-bold)
19789
19790 ;; Set the new & fancy format.
19791 (setq gnus-group-line-format
19792       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
19793 @end lisp
19794
19795 I'm sure you'll be able to use this scheme to create totally unreadable
19796 and extremely vulgar displays.  Have fun!
19797
19798 Note that the @samp{%(} specs (and friends) do not make any sense on the
19799 mode-line variables.
19800
19801 @node Positioning Point
19802 @subsection Positioning Point
19803
19804 Gnus usually moves point to a pre-defined place on each line in most
19805 buffers.  By default, point move to the first colon character on the
19806 line.  You can customize this behaviour in three different ways.
19807
19808 You can move the colon character to somewhere else on the line.
19809
19810 @findex gnus-goto-colon
19811 You can redefine the function that moves the point to the colon.  The
19812 function is called @code{gnus-goto-colon}.
19813
19814 But perhaps the most convenient way to deal with this, if you don't want
19815 to have a colon in your line, is to use the @samp{%*} specifier.  If you
19816 put a @samp{%*} somewhere in your format line definition, Gnus will
19817 place point there.
19818
19819
19820 @node Tabulation
19821 @subsection Tabulation
19822
19823 You can usually line up your displays by padding and cutting your
19824 strings.  However, when combining various strings of different size, it
19825 can often be more convenient to just output the strings, and then worry
19826 about lining up the following text afterwards.
19827
19828 To do that, Gnus supplies tabulator specs--@samp{%=}.  There are two
19829 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
19830
19831 @samp{%50=} will insert space characters to pad the line up to column
19832 50.  If the text is already past column 50, nothing will be inserted.
19833 This is the soft tabulator.
19834
19835 @samp{%-50=} will insert space characters to pad the line up to column
19836 50.  If the text is already past column 50, the excess text past column
19837 50 will be removed.  This is the hard tabulator.
19838
19839
19840 @node Wide Characters
19841 @subsection Wide Characters
19842
19843 Proportional fonts in most countries have characters of the same width.
19844 Some countries, however, use Latin characters mixed with wider
19845 characters---most notable East Asian countries.
19846
19847 The problem is that when formatting, Gnus assumes that if a string is 10
19848 characters wide, it'll be 10 Latin characters wide on the screen.  In
19849 these countries, that's not true.
19850
19851 @vindex gnus-use-correct-string-widths
19852 To help fix this, you can set @code{gnus-use-correct-string-widths} to
19853 @code{t}.  This makes buffer generation slower, but the results will be
19854 prettier.  The default value under XEmacs is @code{t} but @code{nil}
19855 for Emacs.
19856
19857
19858 @node Window Layout
19859 @section Window Layout
19860 @cindex window layout
19861
19862 No, there's nothing here about X, so be quiet.
19863
19864 @vindex gnus-use-full-window
19865 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
19866 other windows and occupy the entire Emacs screen by itself.  It is
19867 @code{t} by default.
19868
19869 Setting this variable to @code{nil} kinda works, but there are
19870 glitches.  Use at your own peril.
19871
19872 @vindex gnus-buffer-configuration
19873 @code{gnus-buffer-configuration} describes how much space each Gnus
19874 buffer should be given.  Here's an excerpt of this variable:
19875
19876 @lisp
19877 ((group (vertical 1.0 (group 1.0 point)
19878                       (if gnus-carpal (group-carpal 4))))
19879  (article (vertical 1.0 (summary 0.25 point)
19880                         (article 1.0))))
19881 @end lisp
19882
19883 This is an alist.  The @dfn{key} is a symbol that names some action or
19884 other.  For instance, when displaying the group buffer, the window
19885 configuration function will use @code{group} as the key.  A full list of
19886 possible names is listed below.
19887
19888 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
19889 should occupy.  To take the @code{article} split as an example -
19890
19891 @lisp
19892 (article (vertical 1.0 (summary 0.25 point)
19893                        (article 1.0)))
19894 @end lisp
19895
19896 This @dfn{split} says that the summary buffer should occupy 25% of upper
19897 half of the screen, and that it is placed over the article buffer.  As
19898 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
19899 reaching for that calculator there).  However, the special number
19900 @code{1.0} is used to signal that this buffer should soak up all the
19901 rest of the space available after the rest of the buffers have taken
19902 whatever they need.  There should be only one buffer with the @code{1.0}
19903 size spec per split.
19904
19905 Point will be put in the buffer that has the optional third element
19906 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
19907 split where the tag @code{frame-focus} is a member (i.e. is the third or
19908 fourth element in the list, depending on whether the @code{point} tag is
19909 present) gets focus.
19910
19911 Here's a more complicated example:
19912
19913 @lisp
19914 (article (vertical 1.0 (group 4)
19915                        (summary 0.25 point)
19916                        (if gnus-carpal (summary-carpal 4))
19917                        (article 1.0)))
19918 @end lisp
19919
19920 If the size spec is an integer instead of a floating point number,
19921 then that number will be used to say how many lines a buffer should
19922 occupy, not a percentage.
19923
19924 If the @dfn{split} looks like something that can be @code{eval}ed (to be
19925 precise---if the @code{car} of the split is a function or a subr), this
19926 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
19927 be used as a split.  This means that there will be three buffers if
19928 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
19929 is non-@code{nil}.
19930
19931 Not complicated enough for you?  Well, try this on for size:
19932
19933 @lisp
19934 (article (horizontal 1.0
19935              (vertical 0.5
19936                  (group 1.0)
19937                  (gnus-carpal 4))
19938              (vertical 1.0
19939                  (summary 0.25 point)
19940                  (summary-carpal 4)
19941                  (article 1.0))))
19942 @end lisp
19943
19944 Whoops.  Two buffers with the mystery 100% tag.  And what's that
19945 @code{horizontal} thingie?
19946
19947 If the first element in one of the split is @code{horizontal}, Gnus will
19948 split the window horizontally, giving you two windows side-by-side.
19949 Inside each of these strips you may carry on all you like in the normal
19950 fashion.  The number following @code{horizontal} says what percentage of
19951 the screen is to be given to this strip.
19952
19953 For each split, there @emph{must} be one element that has the 100% tag.
19954 The splitting is never accurate, and this buffer will eat any leftover
19955 lines from the splits.
19956
19957 To be slightly more formal, here's a definition of what a valid split
19958 may look like:
19959
19960 @example
19961 split      = frame | horizontal | vertical | buffer | form
19962 frame      = "(frame " size *split ")"
19963 horizontal = "(horizontal " size *split ")"
19964 vertical   = "(vertical " size *split ")"
19965 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
19966 size       = number | frame-params
19967 buf-name   = group | article | summary ...
19968 @end example
19969
19970 The limitations are that the @code{frame} split can only appear as the
19971 top-level split.  @var{form} should be an Emacs Lisp form that should
19972 return a valid split.  We see that each split is fully recursive, and
19973 may contain any number of @code{vertical} and @code{horizontal} splits.
19974
19975 @vindex gnus-window-min-width
19976 @vindex gnus-window-min-height
19977 @cindex window height
19978 @cindex window width
19979 Finding the right sizes can be a bit complicated.  No window may be less
19980 than @code{gnus-window-min-height} (default 1) characters high, and all
19981 windows must be at least @code{gnus-window-min-width} (default 1)
19982 characters wide.  Gnus will try to enforce this before applying the
19983 splits.  If you want to use the normal Emacs window width/height limit,
19984 you can just set these two variables to @code{nil}.
19985
19986 If you're not familiar with Emacs terminology, @code{horizontal} and
19987 @code{vertical} splits may work the opposite way of what you'd expect.
19988 Windows inside a @code{horizontal} split are shown side-by-side, and
19989 windows within a @code{vertical} split are shown above each other.
19990
19991 @findex gnus-configure-frame
19992 If you want to experiment with window placement, a good tip is to call
19993 @code{gnus-configure-frame} directly with a split.  This is the function
19994 that does all the real work when splitting buffers.  Below is a pretty
19995 nonsensical configuration with 5 windows; two for the group buffer and
19996 three for the article buffer.  (I said it was nonsensical.)  If you
19997 @code{eval} the statement below, you can get an idea of how that would
19998 look straight away, without going through the normal Gnus channels.
19999 Play with it until you're satisfied, and then use
20000 @code{gnus-add-configuration} to add your new creation to the buffer
20001 configuration list.
20002
20003 @lisp
20004 (gnus-configure-frame
20005  '(horizontal 1.0
20006     (vertical 10
20007       (group 1.0)
20008       (article 0.3 point))
20009     (vertical 1.0
20010       (article 1.0)
20011       (horizontal 4
20012         (group 1.0)
20013         (article 10)))))
20014 @end lisp
20015
20016 You might want to have several frames as well.  No prob---just use the
20017 @code{frame} split:
20018
20019 @lisp
20020 (gnus-configure-frame
20021  '(frame 1.0
20022          (vertical 1.0
20023                    (summary 0.25 point frame-focus)
20024                    (article 1.0))
20025          (vertical ((height . 5) (width . 15)
20026                     (user-position . t)
20027                     (left . -1) (top . 1))
20028                    (picon 1.0))))
20029
20030 @end lisp
20031
20032 This split will result in the familiar summary/article window
20033 configuration in the first (or ``main'') frame, while a small additional
20034 frame will be created where picons will be shown.  As you can see,
20035 instead of the normal @code{1.0} top-level spec, each additional split
20036 should have a frame parameter alist as the size spec.
20037 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
20038 Reference Manual}.  Under XEmacs, a frame property list will be
20039 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
20040 is such a plist.
20041 The list of all possible keys for @code{gnus-buffer-configuration} can
20042 be found in its default value.
20043
20044 Note that the @code{message} key is used for both
20045 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
20046 it is desirable to distinguish between the two, something like this
20047 might be used:
20048
20049 @lisp
20050 (message (horizontal 1.0
20051                      (vertical 1.0 (message 1.0 point))
20052                      (vertical 0.24
20053                                (if (buffer-live-p gnus-summary-buffer)
20054                                    '(summary 0.5))
20055                                (group 1.0))))
20056 @end lisp
20057
20058 One common desire for a multiple frame split is to have a separate frame
20059 for composing mail and news while leaving the original frame intact.  To
20060 accomplish that, something like the following can be done:
20061
20062 @lisp
20063 (message
20064   (frame 1.0
20065          (if (not (buffer-live-p gnus-summary-buffer))
20066              (car (cdr (assoc 'group gnus-buffer-configuration)))
20067            (car (cdr (assoc 'summary gnus-buffer-configuration))))
20068          (vertical ((user-position . t) (top . 1) (left . 1)
20069                     (name . "Message"))
20070                    (message 1.0 point))))
20071 @end lisp
20072
20073 @findex gnus-add-configuration
20074 Since the @code{gnus-buffer-configuration} variable is so long and
20075 complicated, there's a function you can use to ease changing the config
20076 of a single setting: @code{gnus-add-configuration}.  If, for instance,
20077 you want to change the @code{article} setting, you could say:
20078
20079 @lisp
20080 (gnus-add-configuration
20081  '(article (vertical 1.0
20082                (group 4)
20083                (summary .25 point)
20084                (article 1.0))))
20085 @end lisp
20086
20087 You'd typically stick these @code{gnus-add-configuration} calls in your
20088 @file{.gnus.el} file or in some startup hook---they should be run after
20089 Gnus has been loaded.
20090
20091 @vindex gnus-always-force-window-configuration
20092 If all windows mentioned in the configuration are already visible, Gnus
20093 won't change the window configuration.  If you always want to force the
20094 ``right'' window configuration, you can set
20095 @code{gnus-always-force-window-configuration} to non-@code{nil}.
20096
20097 If you're using tree displays (@pxref{Tree Display}), and the tree
20098 window is displayed vertically next to another window, you may also want
20099 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
20100 windows resized.
20101
20102 @subsection Example Window Configurations
20103
20104 @itemize @bullet
20105 @item
20106 Narrow left hand side occupied by group buffer.  Right hand side split
20107 between summary buffer (top one-sixth) and article buffer (bottom).
20108
20109 @ifinfo
20110 @example
20111 +---+---------+
20112 | G | Summary |
20113 | r +---------+
20114 | o |         |
20115 | u | Article |
20116 | p |         |
20117 +---+---------+
20118 @end example
20119 @end ifinfo
20120
20121 @lisp
20122 (gnus-add-configuration
20123  '(article
20124    (horizontal 1.0
20125                (vertical 25 (group 1.0))
20126                (vertical 1.0
20127                          (summary 0.16 point)
20128                          (article 1.0)))))
20129
20130 (gnus-add-configuration
20131  '(summary
20132    (horizontal 1.0
20133                (vertical 25 (group 1.0))
20134                (vertical 1.0 (summary 1.0 point)))))
20135 @end lisp
20136
20137 @end itemize
20138
20139
20140 @node Faces and Fonts
20141 @section Faces and Fonts
20142 @cindex faces
20143 @cindex fonts
20144 @cindex colors
20145
20146 Fiddling with fonts and faces used to be very difficult, but these days
20147 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
20148 the face you want to alter, and alter it via the standard Customize
20149 interface.
20150
20151
20152 @node Compilation
20153 @section Compilation
20154 @cindex compilation
20155 @cindex byte-compilation
20156
20157 @findex gnus-compile
20158
20159 Remember all those line format specification variables?
20160 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
20161 on.  Now, Gnus will of course heed whatever these variables are, but,
20162 unfortunately, changing them will mean a quite significant slow-down.
20163 (The default values of these variables have byte-compiled functions
20164 associated with them, while the user-generated versions do not, of
20165 course.)
20166
20167 To help with this, you can run @kbd{M-x gnus-compile} after you've
20168 fiddled around with the variables and feel that you're (kind of)
20169 satisfied.  This will result in the new specs being byte-compiled, and
20170 you'll get top speed again.  Gnus will save these compiled specs in the
20171 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
20172 this function, though---you should compile them yourself by sticking
20173 them into the @file{.gnus.el} file and byte-compiling that file.)
20174
20175
20176 @node Mode Lines
20177 @section Mode Lines
20178 @cindex mode lines
20179
20180 @vindex gnus-updated-mode-lines
20181 @code{gnus-updated-mode-lines} says what buffers should keep their mode
20182 lines updated.  It is a list of symbols.  Supported symbols include
20183 @code{group}, @code{article}, @code{summary}, @code{server},
20184 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
20185 Gnus will keep that mode line updated with information that may be
20186 pertinent.  If this variable is @code{nil}, screen refresh may be
20187 quicker.
20188
20189 @cindex display-time
20190
20191 @vindex gnus-mode-non-string-length
20192 By default, Gnus displays information on the current article in the mode
20193 lines of the summary and article buffers.  The information Gnus wishes
20194 to display (e.g. the subject of the article) is often longer than the
20195 mode lines, and therefore have to be cut off at some point.  The
20196 @code{gnus-mode-non-string-length} variable says how long the other
20197 elements on the line is (i.e., the non-info part).  If you put
20198 additional elements on the mode line (e.g. a clock), you should modify
20199 this variable:
20200
20201 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
20202 @lisp
20203 (add-hook 'display-time-hook
20204           (lambda () (setq gnus-mode-non-string-length
20205                            (+ 21
20206                               (if line-number-mode 5 0)
20207                               (if column-number-mode 4 0)
20208                               (length display-time-string)))))
20209 @end lisp
20210
20211 If this variable is @code{nil} (which is the default), the mode line
20212 strings won't be chopped off, and they won't be padded either.  Note
20213 that the default is unlikely to be desirable, as even the percentage
20214 complete in the buffer may be crowded off the mode line; the user should
20215 configure this variable appropriately for her configuration.
20216
20217
20218 @node Highlighting and Menus
20219 @section Highlighting and Menus
20220 @cindex visual
20221 @cindex highlighting
20222 @cindex menus
20223
20224 @vindex gnus-visual
20225 The @code{gnus-visual} variable controls most of the Gnus-prettifying
20226 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
20227 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
20228 file.
20229
20230 This variable can be a list of visual properties that are enabled.  The
20231 following elements are valid, and are all included by default:
20232
20233 @table @code
20234 @item group-highlight
20235 Do highlights in the group buffer.
20236 @item summary-highlight
20237 Do highlights in the summary buffer.
20238 @item article-highlight
20239 Do highlights in the article buffer.
20240 @item highlight
20241 Turn on highlighting in all buffers.
20242 @item group-menu
20243 Create menus in the group buffer.
20244 @item summary-menu
20245 Create menus in the summary buffers.
20246 @item article-menu
20247 Create menus in the article buffer.
20248 @item browse-menu
20249 Create menus in the browse buffer.
20250 @item server-menu
20251 Create menus in the server buffer.
20252 @item score-menu
20253 Create menus in the score buffers.
20254 @item menu
20255 Create menus in all buffers.
20256 @end table
20257
20258 So if you only want highlighting in the article buffer and menus in all
20259 buffers, you could say something like:
20260
20261 @lisp
20262 (setq gnus-visual '(article-highlight menu))
20263 @end lisp
20264
20265 If you want highlighting only and no menus whatsoever, you'd say:
20266
20267 @lisp
20268 (setq gnus-visual '(highlight))
20269 @end lisp
20270
20271 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
20272 in all Gnus buffers.
20273
20274 Other general variables that influence the look of all buffers include:
20275
20276 @table @code
20277 @item gnus-mouse-face
20278 @vindex gnus-mouse-face
20279 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
20280 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
20281
20282 @end table
20283
20284 There are hooks associated with the creation of all the different menus:
20285
20286 @table @code
20287
20288 @item gnus-article-menu-hook
20289 @vindex gnus-article-menu-hook
20290 Hook called after creating the article mode menu.
20291
20292 @item gnus-group-menu-hook
20293 @vindex gnus-group-menu-hook
20294 Hook called after creating the group mode menu.
20295
20296 @item gnus-summary-menu-hook
20297 @vindex gnus-summary-menu-hook
20298 Hook called after creating the summary mode menu.
20299
20300 @item gnus-server-menu-hook
20301 @vindex gnus-server-menu-hook
20302 Hook called after creating the server mode menu.
20303
20304 @item gnus-browse-menu-hook
20305 @vindex gnus-browse-menu-hook
20306 Hook called after creating the browse mode menu.
20307
20308 @item gnus-score-menu-hook
20309 @vindex gnus-score-menu-hook
20310 Hook called after creating the score mode menu.
20311
20312 @end table
20313
20314
20315 @node Buttons
20316 @section Buttons
20317 @cindex buttons
20318 @cindex mouse
20319 @cindex click
20320
20321 Those new-fangled @dfn{mouse} contraptions is very popular with the
20322 young, hep kids who don't want to learn the proper way to do things
20323 these days.  Why, I remember way back in the summer of '89, when I was
20324 using Emacs on a Tops 20 system.  Three hundred users on one single
20325 machine, and every user was running Simula compilers.  Bah!
20326
20327 Right.
20328
20329 @vindex gnus-carpal
20330 Well, you can make Gnus display bufferfuls of buttons you can click to
20331 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
20332 really.  Tell the chiropractor I sent you.
20333
20334
20335 @table @code
20336
20337 @item gnus-carpal-mode-hook
20338 @vindex gnus-carpal-mode-hook
20339 Hook run in all carpal mode buffers.
20340
20341 @item gnus-carpal-button-face
20342 @vindex gnus-carpal-button-face
20343 Face used on buttons.
20344
20345 @item gnus-carpal-header-face
20346 @vindex gnus-carpal-header-face
20347 Face used on carpal buffer headers.
20348
20349 @item gnus-carpal-group-buffer-buttons
20350 @vindex gnus-carpal-group-buffer-buttons
20351 Buttons in the group buffer.
20352
20353 @item gnus-carpal-summary-buffer-buttons
20354 @vindex gnus-carpal-summary-buffer-buttons
20355 Buttons in the summary buffer.
20356
20357 @item gnus-carpal-server-buffer-buttons
20358 @vindex gnus-carpal-server-buffer-buttons
20359 Buttons in the server buffer.
20360
20361 @item gnus-carpal-browse-buffer-buttons
20362 @vindex gnus-carpal-browse-buffer-buttons
20363 Buttons in the browse buffer.
20364 @end table
20365
20366 All the @code{buttons} variables are lists.  The elements in these list
20367 are either cons cells where the @code{car} contains a text to be displayed and
20368 the @code{cdr} contains a function symbol, or a simple string.
20369
20370
20371 @node Daemons
20372 @section Daemons
20373 @cindex demons
20374 @cindex daemons
20375
20376 Gnus, being larger than any program ever written (allegedly), does lots
20377 of strange stuff that you may wish to have done while you're not
20378 present.  For instance, you may want it to check for new mail once in a
20379 while.  Or you may want it to close down all connections to all servers
20380 when you leave Emacs idle.  And stuff like that.
20381
20382 Gnus will let you do stuff like that by defining various
20383 @dfn{handlers}.  Each handler consists of three elements:  A
20384 @var{function}, a @var{time}, and an @var{idle} parameter.
20385
20386 Here's an example of a handler that closes connections when Emacs has
20387 been idle for thirty minutes:
20388
20389 @lisp
20390 (gnus-demon-close-connections nil 30)
20391 @end lisp
20392
20393 Here's a handler that scans for PGP headers every hour when Emacs is
20394 idle:
20395
20396 @lisp
20397 (gnus-demon-scan-pgp 60 t)
20398 @end lisp
20399
20400 This @var{time} parameter and than @var{idle} parameter work together
20401 in a strange, but wonderful fashion.  Basically, if @var{idle} is
20402 @code{nil}, then the function will be called every @var{time} minutes.
20403
20404 If @var{idle} is @code{t}, then the function will be called after
20405 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
20406 the function will never be called.  But once Emacs goes idle, the
20407 function will be called every @var{time} minutes.
20408
20409 If @var{idle} is a number and @var{time} is a number, the function will
20410 be called every @var{time} minutes only when Emacs has been idle for
20411 @var{idle} minutes.
20412
20413 If @var{idle} is a number and @var{time} is @code{nil}, the function
20414 will be called once every time Emacs has been idle for @var{idle}
20415 minutes.
20416
20417 And if @var{time} is a string, it should look like @samp{07:31}, and
20418 the function will then be called once every day somewhere near that
20419 time.  Modified by the @var{idle} parameter, of course.
20420
20421 @vindex gnus-demon-timestep
20422 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
20423 seconds.  This is 60 by default.  If you change that variable,
20424 all the timings in the handlers will be affected.)
20425
20426 So, if you want to add a handler, you could put something like this in
20427 your @file{.gnus.el} file:
20428
20429 @findex gnus-demon-add-handler
20430 @lisp
20431 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
20432 @end lisp
20433
20434 @findex gnus-demon-add-nocem
20435 @findex gnus-demon-add-scanmail
20436 @findex gnus-demon-add-rescan
20437 @findex gnus-demon-add-scan-timestamps
20438 @findex gnus-demon-add-disconnection
20439 Some ready-made functions to do this have been created:
20440 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
20441 @code{gnus-demon-add-nntp-close-connection},
20442 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
20443 @code{gnus-demon-add-scanmail}.  Just put those functions in your
20444 @file{.gnus.el} if you want those abilities.
20445
20446 @findex gnus-demon-init
20447 @findex gnus-demon-cancel
20448 @vindex gnus-demon-handlers
20449 If you add handlers to @code{gnus-demon-handlers} directly, you should
20450 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
20451 daemons, you can use the @code{gnus-demon-cancel} function.
20452
20453 Note that adding daemons can be pretty naughty if you over do it.  Adding
20454 functions that scan all news and mail from all servers every two seconds
20455 is a sure-fire way of getting booted off any respectable system.  So
20456 behave.
20457
20458
20459 @node NoCeM
20460 @section NoCeM
20461 @cindex nocem
20462 @cindex spam
20463
20464 @dfn{Spamming} is posting the same article lots and lots of times.
20465 Spamming is bad.  Spamming is evil.
20466
20467 Spamming is usually canceled within a day or so by various anti-spamming
20468 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
20469 NoCeM is pronounced ``no see-'em'', and means what the name
20470 implies---these are messages that make the offending articles, like, go
20471 away.
20472
20473 What use are these NoCeM messages if the articles are canceled anyway?
20474 Some sites do not honor cancel messages and some sites just honor cancels
20475 from a select few people.  Then you may wish to make use of the NoCeM
20476 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
20477
20478 Gnus can read and parse the messages in this group automatically, and
20479 this will make spam disappear.
20480
20481 There are some variables to customize, of course:
20482
20483 @table @code
20484 @item gnus-use-nocem
20485 @vindex gnus-use-nocem
20486 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
20487 by default.
20488
20489 @item gnus-nocem-groups
20490 @vindex gnus-nocem-groups
20491 Gnus will look for NoCeM messages in the groups in this list.  The
20492 default is @code{("news.lists.filters" "news.admin.net-abuse.bulletins"
20493 "alt.nocem.misc" "news.admin.net-abuse.announce")}.
20494
20495 @item gnus-nocem-issuers
20496 @vindex gnus-nocem-issuers
20497 There are many people issuing NoCeM messages.  This list says what
20498 people you want to listen to.  The default is @code{("Automoose-1"
20499 "clewis@@ferret.ocunix.on.ca" "cosmo.roadkill" "SpamHippo"
20500 "hweede@@snafu.de")}; fine, upstanding citizens all of them.
20501
20502 Known despammers that you can put in this list are listed at
20503 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
20504
20505 You do not have to heed NoCeM messages from all these people---just the
20506 ones you want to listen to.  You also don't have to accept all NoCeM
20507 messages from the people you like.  Each NoCeM message has a @dfn{type}
20508 header that gives the message a (more or less, usually less) rigorous
20509 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
20510 @samp{binary}, and @samp{troll}.  To specify this, you have to use
20511 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
20512 Each condition is either a string (which is a regexp that matches types
20513 you want to use) or a list on the form @code{(not @var{string})}, where
20514 @var{string} is a regexp that matches types you don't want to use.
20515
20516 For instance, if you want all NoCeM messages from Chris Lewis except his
20517 @samp{troll} messages, you'd say:
20518
20519 @lisp
20520 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
20521 @end lisp
20522
20523 On the other hand, if you just want nothing but his @samp{spam} and
20524 @samp{spew} messages, you'd say:
20525
20526 @lisp
20527 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
20528 @end lisp
20529
20530 The specs are applied left-to-right.
20531
20532
20533 @item gnus-nocem-verifyer
20534 @vindex gnus-nocem-verifyer
20535 @findex mc-verify
20536 This should be a function for verifying that the NoCeM issuer is who she
20537 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
20538 function.  If this is too slow and you don't care for verification
20539 (which may be dangerous), you can set this variable to @code{nil}.
20540
20541 If you want signed NoCeM messages to be verified and unsigned messages
20542 not to be verified (but used anyway), you could do something like:
20543
20544 @lisp
20545 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
20546
20547 (defun my-gnus-mc-verify ()
20548   (not (eq 'forged
20549            (ignore-errors
20550              (if (mc-verify)
20551                  t
20552                'forged)))))
20553 @end lisp
20554
20555 This might be dangerous, though.
20556
20557 @item gnus-nocem-directory
20558 @vindex gnus-nocem-directory
20559 This is where Gnus will store its NoCeM cache files.  The default is
20560 @file{~/News/NoCeM/}.
20561
20562 @item gnus-nocem-expiry-wait
20563 @vindex gnus-nocem-expiry-wait
20564 The number of days before removing old NoCeM entries from the cache.
20565 The default is 15.  If you make it shorter Gnus will be faster, but you
20566 might then see old spam.
20567
20568 @item gnus-nocem-check-from
20569 @vindex gnus-nocem-check-from
20570 Non-@code{nil} means check for valid issuers in message bodies.
20571 Otherwise don't bother fetching articles unless their author matches a
20572 valid issuer; that is much faster if you are selective about the
20573 issuers.
20574
20575 @item gnus-nocem-check-article-limit
20576 @vindex gnus-nocem-check-article-limit
20577 If non-@code{nil}, the maximum number of articles to check in any NoCeM
20578 group.  NoCeM groups can be huge and very slow to process.
20579
20580 @end table
20581
20582 Using NoCeM could potentially be a memory hog.  If you have many living
20583 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
20584 big.  If this is a problem, you should kill off all (or most) of your
20585 unsubscribed groups (@pxref{Subscription Commands}).
20586
20587
20588 @node Undo
20589 @section Undo
20590 @cindex undo
20591
20592 It is very useful to be able to undo actions one has done.  In normal
20593 Emacs buffers, it's easy enough---you just push the @code{undo} button.
20594 In Gnus buffers, however, it isn't that simple.
20595
20596 The things Gnus displays in its buffer is of no value whatsoever to
20597 Gnus---it's all just data designed to look nice to the user.
20598 Killing a group in the group buffer with @kbd{C-k} makes the line
20599 disappear, but that's just a side-effect of the real action---the
20600 removal of the group in question from the internal Gnus structures.
20601 Undoing something like that can't be done by the normal Emacs
20602 @code{undo} function.
20603
20604 Gnus tries to remedy this somewhat by keeping track of what the user
20605 does and coming up with actions that would reverse the actions the user
20606 takes.  When the user then presses the @code{undo} key, Gnus will run
20607 the code to reverse the previous action, or the previous actions.
20608 However, not all actions are easily reversible, so Gnus currently offers
20609 a few key functions to be undoable.  These include killing groups,
20610 yanking groups, and changing the list of read articles of groups.
20611 That's it, really.  More functions may be added in the future, but each
20612 added function means an increase in data to be stored, so Gnus will
20613 never be totally undoable.
20614
20615 @findex gnus-undo-mode
20616 @vindex gnus-use-undo
20617 @findex gnus-undo
20618 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
20619 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
20620 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
20621 command, which should feel kinda like the normal Emacs @code{undo}
20622 command.
20623
20624
20625 @node Predicate Specifiers
20626 @section Predicate Specifiers
20627 @cindex predicate specifiers
20628
20629 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
20630 form that allows flexible specification of predicates without having
20631 to type all that much.
20632
20633 These specifiers are lists consisting of functions, symbols and lists.
20634
20635 Here's an example:
20636
20637 @lisp
20638 (or gnus-article-unseen-p
20639     gnus-article-unread-p)
20640 @end lisp
20641
20642 The available symbols are @code{or}, @code{and} and @code{not}.  The
20643 functions all take one parameter.
20644
20645 @findex gnus-make-predicate
20646 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
20647 to create a function that can be called.  This input parameter to this
20648 function will be passed along to all the functions in the predicate
20649 specifier.
20650
20651
20652 @node Moderation
20653 @section Moderation
20654 @cindex moderation
20655
20656 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
20657 It is not included in the standard Gnus package.  Write a mail to
20658 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
20659 get a copy.
20660
20661 The moderation package is implemented as a minor mode for summary
20662 buffers.  Put
20663
20664 @lisp
20665 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
20666 @end lisp
20667
20668 in your @file{.gnus.el} file.
20669
20670 If you are the moderator of @samp{rec.zoofle}, this is how it's
20671 supposed to work:
20672
20673 @enumerate
20674 @item
20675 You split your incoming mail by matching on
20676 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
20677 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
20678
20679 @item
20680 You enter that group once in a while and post articles using the @kbd{e}
20681 (edit-and-post) or @kbd{s} (just send unedited) commands.
20682
20683 @item
20684 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
20685 articles that weren't approved by you, you can cancel them with the
20686 @kbd{c} command.
20687 @end enumerate
20688
20689 To use moderation mode in these two groups, say:
20690
20691 @lisp
20692 (setq gnus-moderated-list
20693       "^nnml:rec.zoofle$\\|^rec.zoofle$")
20694 @end lisp
20695
20696
20697 @node Image Enhancements
20698 @section Image Enhancements
20699
20700 XEmacs, as well as Emacs 21, is able to display pictures and stuff, so
20701 Gnus has taken advantage of that.
20702
20703 @menu
20704 * Picons::                      How to display pictures of what you're reading.
20705 * Smileys::                     Show all those happy faces the way they were meant to be shown.
20706 * X-Face::                      Display a funky, teensy black-and-white image.
20707 * Toolbar::                     Click'n'drool.
20708 * XVarious::                    Other XEmacsy Gnusey variables.
20709 @end menu
20710
20711
20712 @node Picons
20713 @subsection Picons
20714
20715 @iftex
20716 @iflatex
20717 \include{picons}
20718 @end iflatex
20719 @end iftex
20720
20721 So@dots{}  You want to slow down your news reader even more!  This is a
20722 good way to do so.  Its also a great way to impress people staring
20723 over your shoulder as you read news.
20724
20725 @menu
20726 * Picon Basics::                What are picons and How do I get them.
20727 * Picon Requirements::          Don't go further if you aren't using XEmacs.
20728 * Easy Picons::                 Displaying Picons---the easy way.
20729 * Hard Picons::                 The way you should do it.  You'll learn something.
20730 * Picon Useless Configuration::  Other variables you can trash/tweak/munge/play with.
20731 @end menu
20732
20733
20734 @node Picon Basics
20735 @subsubsection Picon Basics
20736
20737 What are Picons?  To quote directly from the Picons Web site:
20738
20739 @iftex
20740 @iflatex
20741 \margindex{}
20742 @end iflatex
20743 @end iftex
20744
20745 @quotation
20746 @dfn{Picons} is short for ``personal icons''.  They're small,
20747 constrained images used to represent users and domains on the net,
20748 organized into databases so that the appropriate image for a given
20749 e-mail address can be found.  Besides users and domains, there are picon
20750 databases for Usenet newsgroups and weather forecasts.  The picons are
20751 in either monochrome @code{XBM} format or color @code{XPM} and
20752 @code{GIF} formats.
20753 @end quotation
20754
20755 @vindex gnus-picons-piconsearch-url
20756 If you have a permanent connection to the Internet you can use Steve
20757 Kinzler's Picons Search engine by setting
20758 @code{gnus-picons-piconsearch-url} to the string @*
20759 @uref{http://www.cs.indiana.edu/picons/search.html}.
20760
20761 @vindex gnus-picons-database
20762 Otherwise you need a local copy of his database.  For instructions on
20763 obtaining and installing the picons databases, point your Web browser at @*
20764 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.  Gnus expects
20765 picons to be installed into a location pointed to by
20766 @code{gnus-picons-database}.
20767
20768 If you are using Debian GNU/Linux, saying @samp{apt-get install
20769 picons.*} will install the picons where Gnus can find them.
20770
20771
20772 @node Picon Requirements
20773 @subsubsection Picon Requirements
20774
20775 To have Gnus display Picons for you, you must have @code{x} support
20776 compiled into XEmacs.  To display color picons which are much nicer
20777 than the black & white one, you also need one of @code{xpm} or
20778 @code{gif} compiled into XEmacs.
20779
20780 @vindex gnus-picons-convert-x-face
20781 If you want to display faces from @code{X-Face} headers, you should have
20782 the @code{xface} support compiled into XEmacs.  Otherwise you must have
20783 the @code{netpbm} utilities installed, or munge the
20784 @code{gnus-picons-convert-x-face} variable to use something else.
20785 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20786
20787 @node Easy Picons
20788 @subsubsection Easy Picons
20789
20790 To enable displaying picons, simply put the following line in your
20791 @file{~/.gnus} file and start Gnus.
20792
20793 @lisp
20794 (setq gnus-use-picons t)
20795 (setq gnus-treat-display-picons t)
20796 @end lisp
20797
20798 and make sure @code{gnus-picons-database} points to the directory
20799 containing the Picons databases.
20800
20801 Alternatively if you want to use the web piconsearch engine add this:
20802
20803 @lisp
20804 (setq gnus-picons-piconsearch-url
20805       "http://www.cs.indiana.edu:800/piconsearch")
20806 @end lisp
20807
20808
20809 @node Hard Picons
20810 @subsubsection Hard Picons
20811
20812 @iftex
20813 @iflatex
20814 \margindex{}
20815 @end iflatex
20816 @end iftex
20817
20818 Gnus can display picons for you as you enter and leave groups and
20819 articles.  It knows how to interact with three sections of the picons
20820 database.  Namely, it can display the picons newsgroup pictures,
20821 author's face picture(s), and the authors domain.  To enable this
20822 feature, you need to select where to get the picons from, and where to
20823 display them.
20824
20825 @table @code
20826
20827 @item gnus-picons-database
20828 @vindex gnus-picons-database
20829 The location of the picons database.  Should point to a directory
20830 containing the @file{news}, @file{domains}, @file{users} (and so on)
20831 subdirectories.  This is only useful if
20832 @code{gnus-picons-piconsearch-url} is @code{nil}.  Defaults to
20833 @file{/usr/local/faces/}.
20834
20835 @item gnus-picons-piconsearch-url
20836 @vindex gnus-picons-piconsearch-url
20837 The URL for the web picons search engine.  The only currently known
20838 engine is @uref{http://www.cs.indiana.edu:800/piconsearch}.  To
20839 workaround network delays, icons will be fetched in the background.  If
20840 this is @code{nil} 'the default), then picons are fetched from local
20841 database indicated by @code{gnus-picons-database}.
20842
20843 @item gnus-picons-display-where
20844 @vindex gnus-picons-display-where
20845 Where the picon images should be displayed.  It is @code{picons} by
20846 default (which by default maps to the buffer @samp{*Picons*}).  Other
20847 valid places could be @code{article}, @code{summary}, or
20848 @samp{*scratch*} for all I care.  Just make sure that you've made the
20849 buffer visible using the standard Gnus window configuration
20850 routines---@pxref{Window Layout}.
20851
20852 @item gnus-picons-group-excluded-groups
20853 @vindex gnus-picons-group-excluded-groups
20854 Groups that are matched by this regexp won't have their group icons
20855 displayed.
20856
20857 @end table
20858
20859 Note: If you set @code{gnus-use-picons} to @code{t}, it will set up your
20860 window configuration for you to include the @code{picons} buffer.
20861
20862 Now that you've made those decision, you need to add the following
20863 functions to the appropriate hooks so these pictures will get displayed
20864 at the right time.
20865
20866 @vindex gnus-picons-display-where
20867 @table @code
20868 @item gnus-article-display-picons
20869 @findex gnus-article-display-picons
20870 Looks up and displays the picons for the author and the author's domain
20871 in the @code{gnus-picons-display-where} buffer.
20872
20873 @item gnus-picons-article-display-x-face
20874 @findex gnus-picons-article-display-x-face
20875 Decodes and displays the X-Face header if present.
20876 (NOTE: @code{x-face} is used in the function name, not @code{xface})
20877
20878 @end table
20879
20880
20881
20882 @node Picon Useless Configuration
20883 @subsubsection Picon Useless Configuration
20884
20885 @iftex
20886 @iflatex
20887 \margindex{}
20888 @end iflatex
20889 @end iftex
20890
20891 The following variables offer further control over how things are
20892 done, where things are located, and other useless stuff you really
20893 don't need to worry about.
20894
20895 @table @code
20896
20897 @item gnus-picons-news-directories
20898 @vindex gnus-picons-news-directories
20899 List of subdirectories to search in @code{gnus-picons-database} for
20900 newsgroups faces.  @code{("news")} is the default.
20901
20902 @item gnus-picons-user-directories
20903 @vindex gnus-picons-user-directories
20904 List of subdirectories to search in @code{gnus-picons-database} for user
20905 faces.  @code{("local" "users" "usenix" "misc")} is the default.
20906
20907 @item gnus-picons-domain-directories
20908 @vindex gnus-picons-domain-directories
20909 List of subdirectories to search in @code{gnus-picons-database} for
20910 domain name faces.  Defaults to @code{("domains")}.  Some people may
20911 want to add @samp{"unknown"} to this list.
20912
20913 @item gnus-picons-convert-x-face
20914 @vindex gnus-picons-convert-x-face
20915 If you don't have @code{xface} support builtin XEmacs, this is the
20916 command to use to convert the @code{X-Face} header to an X bitmap
20917 (@code{xbm}).  Defaults to @code{(format "@{ echo '/* Width=48,
20918 Height=48 */'; uncompface; @} | icontopbm | pbmtoxbm > %s"
20919 gnus-picons-x-face-file-name)}
20920 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20921
20922 @item gnus-picons-x-face-file-name
20923 @vindex gnus-picons-x-face-file-name
20924 Names a temporary file to store the @code{X-Face} bitmap in.  Defaults
20925 to @code{(format "/tmp/picon-xface.%s.xbm" (user-login-name))}.
20926 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20927
20928 @item gnus-picons-has-modeline-p
20929 @vindex gnus-picons-has-modeline-p
20930 If you have set @code{gnus-picons-display-where} to @code{picons}, your
20931 XEmacs frame will become really cluttered.  To alleviate this a bit you
20932 can set @code{gnus-picons-has-modeline-p} to @code{nil}; this will
20933 remove the mode line from the Picons buffer.  This is only useful if
20934 @code{gnus-picons-display-where} is @code{picons}.
20935
20936 @item gnus-picons-refresh-before-display
20937 @vindex gnus-picons-refresh-before-display
20938 If non-nil, display the article buffer before computing the picons.
20939 Defaults to @code{nil}.
20940
20941 @item gnus-picons-display-as-address
20942 @vindex gnus-picons-display-as-address
20943 If @code{t} display textual email addresses along with pictures.
20944 Defaults to @code{t}.
20945
20946 @item gnus-picons-file-suffixes
20947 @vindex gnus-picons-file-suffixes
20948 Ordered list of suffixes on picon file names to try.  Defaults to
20949 @code{("xpm" "gif" "xbm")} minus those not builtin your XEmacs.
20950
20951 @item gnus-picons-setup-hook
20952 @vindex gnus-picons-setup-hook
20953 Hook run in the picon buffer, if that is displayed.
20954
20955 @item gnus-picons-display-article-move-p
20956 @vindex gnus-picons-display-article-move-p
20957 Whether to move point to first empty line when displaying picons.  This
20958 has only an effect if `gnus-picons-display-where' has value `article'.
20959
20960 If @code{nil}, display the picons in the @code{From} and
20961 @code{Newsgroups} lines.  This is the default.
20962
20963 @item gnus-picons-clear-cache-on-shutdown
20964 @vindex gnus-picons-clear-cache-on-shutdown
20965 Whether to clear the picons cache when exiting gnus.  Gnus caches every
20966 picons it finds while it is running.  This saves some time in the search
20967 process but eats some memory.  If this variable is set to @code{nil},
20968 Gnus will never clear the cache itself; you will have to manually call
20969 @code{gnus-picons-clear-cache} to clear it.  Otherwise the cache will be
20970 cleared every time you exit Gnus.  Defaults to @code{t}.
20971
20972 @iftex
20973 @iflatex
20974 \margindex{}
20975 @end iflatex
20976 @end iftex
20977
20978 @end table
20979
20980 @node Smileys
20981 @subsection Smileys
20982 @cindex smileys
20983
20984 @iftex
20985 @iflatex
20986 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
20987 \input{smiley}
20988 @end iflatex
20989 @end iftex
20990
20991 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
20992 currently the only package that uses Smiley, it is documented here.
20993
20994 In short---to use Smiley in Gnus, put the following in your
20995 @file{.gnus.el} file:
20996
20997 @lisp
20998 (setq gnus-treat-display-smileys t)
20999 @end lisp
21000
21001 Smiley maps text smiley faces---@samp{:-)}, @samp{:-=}, @samp{:-(} and
21002 the like---to pictures and displays those instead of the text smiley
21003 faces.  The conversion is controlled by a list of regexps that matches
21004 text and maps that to file names.
21005
21006 @vindex smiley-nosey-regexp-alist
21007 @vindex smiley-deformed-regexp-alist
21008 Smiley supplies two example conversion alists by default:
21009 @code{smiley-deformed-regexp-alist} (which matches @samp{:)}, @samp{:(}
21010 and so on), and @code{smiley-nosey-regexp-alist} (which matches
21011 @samp{:-)}, @samp{:-(} and so on).
21012
21013 The alist used is specified by the @code{smiley-regexp-alist} variable,
21014 which defaults to the value of @code{smiley-deformed-regexp-alist}.
21015
21016 The first item in each element is the regexp to be matched; the second
21017 element is the regexp match group that is to be replaced by the picture;
21018 and the third element is the name of the file to be displayed.
21019
21020 The following variables customize where Smiley will look for these
21021 files, as well as the color to be used and stuff:
21022
21023 @table @code
21024
21025 @item smiley-data-directory
21026 @vindex smiley-data-directory
21027 Where Smiley will look for smiley faces files.
21028
21029 @item smiley-flesh-color
21030 @vindex smiley-flesh-color
21031 Skin color.  The default is @samp{yellow}, which is really racist.
21032
21033 @item smiley-features-color
21034 @vindex smiley-features-color
21035 Color of the features of the face.  The default is @samp{black}.
21036
21037 @item smiley-tongue-color
21038 @vindex smiley-tongue-color
21039 Color of the tongue.  The default is @samp{red}.
21040
21041 @item smiley-circle-color
21042 @vindex smiley-circle-color
21043 Color of the circle around the face.  The default is @samp{black}.
21044
21045 @item smiley-mouse-face
21046 @vindex smiley-mouse-face
21047 Face used for mouse highlighting over the smiley face.
21048
21049 @end table
21050
21051
21052 @node X-Face
21053 @subsection X-Face
21054 @cindex x-face
21055
21056 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21057 depth) image that's supposed to represent the author of the message.
21058 It seems to be supported by an ever-growing number of mail and news
21059 readers.
21060
21061 @cindex x-face
21062 @findex gnus-article-display-x-face
21063 @findex gnus-article-x-face-command
21064 @vindex gnus-article-x-face-command
21065 @vindex gnus-article-x-face-too-ugly
21066 @iftex
21067 @iflatex
21068 \include{xface}
21069 @end iflatex
21070 @end iftex
21071 @c @anchor{X-Face}
21072
21073 Decoding an @code{X-Face} header either requires an Emacs that has
21074 @samp{compface} support (which most XEmacs versions has), or that you
21075 have @samp{compface} installed on your system.  If either is true,
21076 Gnus will default to displaying @code{X-Face} headers.
21077
21078 The variable that controls this is the
21079 @code{gnus-article-x-face-command} variable.  If this variable is a
21080 string, this string will be executed in a sub-shell.  If it is a
21081 function, this function will be called with the face as the argument.
21082 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21083 the @code{From} header, the face will not be shown.
21084
21085 The default action under Emacs 20 is to fork off the @code{display}
21086 program@footnote{@code{display} is from the ImageMagick package.  For
21087 the @code{uncompface} and @code{icontopbm} programs look for a package
21088 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21089 view the face.
21090
21091 Under XEmacs or Emacs 21+ with suitable image support, the default
21092 action is to display the face before the @code{From} header.  (It's
21093 nicer if XEmacs has been compiled with @code{X-Face} support---that
21094 will make display somewhat faster.  If there's no native @code{X-Face}
21095 support, Gnus will try to convert the @code{X-Face} header using
21096 external programs from the @code{pbmplus} package and
21097 friends.@footnote{On a GNU/Linux system look for packages with names
21098 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21099
21100 (NOTE: @code{x-face} is used in the variable/function names, not
21101 @code{xface}).
21102
21103 Gnus provides a few convenience functions and variables to allow
21104 easier insertion of X-Face headers in outgoing messages.
21105
21106 @findex gnus-random-x-face
21107 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21108 @code{gnus-x-face-directory} and picks one at random, and then
21109 converts it to the X-Face format by using the
21110 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21111 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21112 header data as a string.
21113
21114 @findex gnus-insert-random-x-face-header
21115 @code{gnus-insert-random-x-face-header} calls
21116 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21117 randomly generated data.
21118
21119 @findex gnus-x-face-from-file
21120 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21121 converts the file to X-Face format by using the
21122 @code{gnus-convert-image-to-x-face-command} shell command.
21123
21124 Here's how you would typically use the first function.  Put something
21125 like the following in your @file{.gnus.el} file:
21126
21127 @lisp
21128 (setq message-required-news-headers
21129       (nconc message-required-news-headers
21130              (list '(X-Face . gnus-random-x-face))))
21131 @end lisp
21132
21133 Using the last function would be something like this:
21134
21135 @lisp
21136 (setq message-required-news-headers
21137       (nconc message-required-news-headers
21138              (list '(X-Face . (lambda ()
21139                                 (gnus-x-face-from-file
21140                                  "~/My-face.gif"))))))
21141 @end lisp
21142
21143
21144 @node Toolbar
21145 @subsection Toolbar
21146
21147 @table @code
21148
21149 @iftex
21150 @iflatex
21151 \margindex{}
21152 @end iflatex
21153 @end iftex
21154
21155 @item gnus-use-toolbar
21156 @vindex gnus-use-toolbar
21157 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
21158 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
21159 @code{right-toolbar}, or @code{left-toolbar}.
21160
21161 @item gnus-group-toolbar
21162 @vindex gnus-group-toolbar
21163 The toolbar in the group buffer.
21164
21165 @item gnus-summary-toolbar
21166 @vindex gnus-summary-toolbar
21167 The toolbar in the summary buffer.
21168
21169 @item gnus-summary-mail-toolbar
21170 @vindex gnus-summary-mail-toolbar
21171 The toolbar in the summary buffer of mail groups.
21172
21173 @end table
21174
21175
21176 @node XVarious
21177 @subsection Various XEmacs Variables
21178
21179 @table @code
21180 @item gnus-xmas-glyph-directory
21181 @vindex gnus-xmas-glyph-directory
21182 This is where Gnus will look for pictures.  Gnus will normally
21183 auto-detect this directory, but you may set it manually if you have an
21184 unusual directory structure.
21185
21186 @item gnus-xmas-logo-color-alist
21187 @vindex gnus-xmas-logo-color-alist
21188 This is an alist where the key is a type symbol and the values are the
21189 foreground and background color of the splash page glyph.
21190
21191 @item gnus-xmas-logo-color-style
21192 @vindex gnus-xmas-logo-color-style
21193 This is the key used to look up the color in the alist described above.
21194 Valid values include @code{flame}, @code{pine}, @code{moss},
21195 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
21196 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
21197
21198 @item gnus-xmas-modeline-glyph
21199 @vindex gnus-xmas-modeline-glyph
21200 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21201 default.
21202
21203 @iftex
21204 @iflatex
21205 \margindex{}
21206 @end iflatex
21207 @end iftex
21208
21209 @end table
21210
21211
21212
21213
21214 @node Fuzzy Matching
21215 @section Fuzzy Matching
21216 @cindex fuzzy matching
21217
21218 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
21219 things like scoring, thread gathering and thread comparison.
21220
21221 As opposed to regular expression matching, fuzzy matching is very fuzzy.
21222 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
21223 means, and the implementation has changed over time.
21224
21225 Basically, it tries to remove all noise from lines before comparing.
21226 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21227 out of the strings before comparing the results.  This often leads to
21228 adequate results---even when faced with strings generated by text
21229 manglers masquerading as newsreaders.
21230
21231
21232 @node Thwarting Email Spam
21233 @section Thwarting Email Spam
21234 @cindex email spam
21235 @cindex spam
21236 @cindex UCE
21237 @cindex unsolicited commercial email
21238
21239 In these last days of the Usenet, commercial vultures are hanging about
21240 and grepping through news like crazy to find email addresses they can
21241 foist off their scams and products to.  As a reaction to this, many
21242 people have started putting nonsense addresses into their @code{From}
21243 lines.  I think this is counterproductive---it makes it difficult for
21244 people to send you legitimate mail in response to things you write, as
21245 well as making it difficult to see who wrote what.  This rewriting may
21246 perhaps be a bigger menace than the unsolicited commercial email itself
21247 in the end.
21248
21249 The biggest problem I have with email spam is that it comes in under
21250 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
21251 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
21252 mail group, only to find two pyramid schemes, seven advertisements
21253 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
21254 and one mail asking me to repent and find some god.
21255
21256 This is annoying.  Here's what you can do about it.
21257
21258 @menu
21259 * The problem of spam::         Some background, and some solutions
21260 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
21261 * SpamAssassin::                How to use external anti-spam tools.
21262 * Hashcash::                    Reduce spam by burning CPU time.
21263 * Filtering Spam Using The Spam ELisp Package::  
21264 * Filtering Spam Using Statistics with spam-stat::  
21265 @end menu
21266
21267 @node The problem of spam
21268 @subsection The problem of spam
21269 @cindex email spam
21270 @cindex spam filtering approaches
21271 @cindex filtering approaches, spam
21272 @cindex UCE
21273 @cindex unsolicited commercial email
21274
21275 First, some background on spam.
21276
21277 If you have access to e-mail, you are familiar with spam (technically
21278 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
21279 because e-mail delivery is very cheap compared to paper mail, so only
21280 a very small percentage of people need to respond to an UCE to make it
21281 worthwhile to the advertiser.  Ironically, one of the most common
21282 spams is the one offering a database of e-mail addresses for further
21283 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
21284 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
21285
21286 Spam comes from a wide variety of sources.  It is simply impossible to
21287 dispose of all spam without discarding useful messages.  A good
21288 example is the TMDA system, which requires senders
21289 unknown to you to confirm themselves as legitimate senders before
21290 their e-mail can reach you.  Without getting into the technical side
21291 of TMDA, a downside is clearly that e-mail from legitimate sources may
21292 be discarded if those sources can't or won't confirm themselves
21293 through the TMDA system.  Another problem with TMDA is that it
21294 requires its users to have a basic understanding of e-mail delivery
21295 and processing.
21296
21297 The simplest approach to filtering spam is filtering.  If you get 200
21298 spam messages per day from @email{random-address@@vmadmin.com}, you
21299 block @samp{vmadmin.com}.  If you get 200 messages about
21300 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
21301 message.  This, unfortunately, is a great way to discard legitimate
21302 e-mail.  For instance, the very informative and useful RISKS digest
21303 has been blocked by overzealous mail filters because it
21304 @strong{contained} words that were common in spam messages.
21305 Nevertheless, in isolated cases, with great care, direct filtering of
21306 mail can be useful.
21307
21308 Another approach to filtering e-mail is the distributed spam
21309 processing, for instance DCC implements such a system.  In essence,
21310 @code{N} systems around the world agree that a machine @samp{X} in
21311 China, Ghana, or California is sending out spam e-mail, and these
21312 @code{N} systems enter @samp{X} or the spam e-mail from @samp{X} into
21313 a database.  The criteria for spam detection vary - it may be the
21314 number of messages sent, the content of the messages, and so on.  When
21315 a user of the distributed processing system wants to find out if a
21316 message is spam, he consults one of those @code{N} systems.
21317
21318 Distributed spam processing works very well against spammers that send
21319 a large number of messages at once, but it requires the user to set up
21320 fairly complicated checks.  There are commercial and free distributed
21321 spam processing systems.  Distributed spam processing has its risks as
21322 well.  For instance legitimate e-mail senders have been accused of
21323 sending spam, and their web sites have been shut down for some time
21324 because of the incident.
21325
21326 The statistical approach to spam filtering is also popular.  It is
21327 based on a statistical analysis of previous spam messages.  Usually
21328 the analysis is a simple word frequency count, with perhaps pairs of
21329 words or 3-word combinations thrown into the mix.  Statistical
21330 analysis of spam works very well in most of the cases, but it can
21331 classify legitimate e-mail as spam in some cases.  It takes time to
21332 run the analysis, the full message must be analyzed, and the user has
21333 to store the database of spam analyses.
21334
21335 @node Anti-Spam Basics
21336 @subsection Anti-Spam Basics
21337 @cindex email spam
21338 @cindex spam
21339 @cindex UCE
21340 @cindex unsolicited commercial email
21341
21342 One way of dealing with spam is having Gnus split out all spam into a
21343 @samp{spam} mail group (@pxref{Splitting Mail}).
21344
21345 First, pick one (1) valid mail address that you can be reached at, and
21346 put it in your @code{From} header of all your news articles.  (I've
21347 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
21348 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
21349 sysadmin whether your sendmail installation accepts keywords in the local
21350 part of the mail address.)
21351
21352 @lisp
21353 (setq message-default-news-headers
21354       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
21355 @end lisp
21356
21357 Then put the following split rule in @code{nnmail-split-fancy}
21358 (@pxref{Fancy Mail Splitting}):
21359
21360 @lisp
21361 (
21362  ...
21363  (to "larsi@@trym.ifi.uio.no"
21364       (| ("subject" "re:.*" "misc")
21365          ("references" ".*@@.*" "misc")
21366          "spam"))
21367  ...
21368 )
21369 @end lisp
21370
21371 This says that all mail to this address is suspect, but if it has a
21372 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
21373 header, it's probably ok.  All the rest goes to the @samp{spam} group.
21374 (This idea probably comes from Tim Pierce.)
21375
21376 In addition, many mail spammers talk directly to your @sc{smtp} server
21377 and do not include your email address explicitly in the @code{To}
21378 header.  Why they do this is unknown---perhaps it's to thwart this
21379 thwarting scheme?  In any case, this is trivial to deal with---you just
21380 put anything not addressed to you in the @samp{spam} group by ending
21381 your fancy split rule in this way:
21382
21383 @lisp
21384 (
21385  ...
21386  (to "larsi" "misc")
21387  "spam")
21388 @end lisp
21389
21390 In my experience, this will sort virtually everything into the right
21391 group.  You still have to check the @samp{spam} group from time to time to
21392 check for legitimate mail, though.  If you feel like being a good net
21393 citizen, you can even send off complaints to the proper authorities on
21394 each unsolicited commercial email---at your leisure.
21395
21396 If you are also a lazy net citizen, you will probably prefer complaining
21397 automatically with the @file{gnus-junk.el} package, available FOR FREE
21398 at @* @uref{http://stud2.tuwien.ac.at/~e9426626/gnus-junk.html}.
21399 Since most e-mail spam is sent automatically, this may reconcile the
21400 cosmic balance somewhat.
21401
21402 This works for me.  It allows people an easy way to contact me (they can
21403 just press @kbd{r} in the usual way), and I'm not bothered at all with
21404 spam.  It's a win-win situation.  Forging @code{From} headers to point
21405 to non-existent domains is yucky, in my opinion.
21406
21407
21408
21409 @node SpamAssassin
21410 @subsection SpamAssassin, Vipul's Razor, DCC, etc
21411 @cindex SpamAssassin
21412 @cindex Vipul's Razor
21413 @cindex DCC
21414
21415 The days where the hints in the previous section was sufficient in
21416 avoiding spam is coming to an end.  There are many tools out there
21417 that claim to reduce the amount of spam you get.  This section could
21418 easily become outdated fast, as new products replace old, but
21419 fortunately most of these tools seem to have similar interfaces.  Even
21420 though this section will use SpamAssassin as an example, it should be
21421 easy to adapt it to most other tools.
21422
21423 If the tool you are using is not installed on the mail server, you
21424 need to invoke it yourself.  Ideas on how to use the
21425 @code{:postscript} mail source parameter (@pxref{Mail Source
21426 Specifiers}) follows.
21427
21428 @lisp
21429 (setq mail-sources
21430       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
21431         (pop :user "jrl"
21432              :server "pophost"
21433              :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
21434 @end lisp
21435
21436 Once you managed to process your incoming spool somehow, thus making
21437 the mail contain e.g. a header indicating it is spam, you are ready to
21438 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
21439
21440 @lisp
21441 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
21442                              ...))
21443 @end lisp
21444
21445 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
21446
21447 @lisp
21448 (setq nnmail-split-methods 'nnmail-split-fancy
21449       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
21450                              ...))
21451 @end lisp
21452
21453 Some people might not like the idea of piping the mail through various
21454 programs using a @code{:prescript} (if some program is buggy, you
21455 might lose all mail).  If you are one of them, another solution is to
21456 call the external tools during splitting.  Example fancy split method:
21457
21458 @lisp
21459 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
21460                              ...))
21461 (defun kevin-spamassassin ()
21462   (save-excursion
21463     (let ((buf (or (get-buffer " *nnmail incoming*")
21464                    (get-buffer " *nnml move*"))))
21465       (if (not buf)
21466           (progn (message "Oops, cannot find message buffer") nil)
21467         (set-buffer buf)
21468         (if (eq 1 (call-process-region (point-min) (point-max)
21469                                        "spamc" nil nil nil "-c"))
21470             "spam")))))
21471 @end lisp
21472
21473 That is about it.  As some spam is likely to get through anyway, you
21474 might want to have a nifty function to call when you happen to read
21475 spam.  And here is the nifty function:
21476
21477 @lisp
21478  (defun my-gnus-raze-spam ()
21479   "Submit SPAM to Vipul's Razor, then mark it as expirable."
21480   (interactive)
21481   (gnus-summary-show-raw-article)
21482   (gnus-summary-save-in-pipe "razor-report -f -d")
21483   (gnus-summary-mark-as-expirable 1))
21484 @end lisp
21485
21486 @node Hashcash
21487 @subsection Hashcash
21488 @cindex hashcash
21489
21490 A novel technique to fight spam is to require senders to do something
21491 costly for each message they send.  This has the obvious drawback that
21492 you cannot rely on that everyone in the world uses this technique,
21493 since it is not part of the Internet standards, but it may be useful
21494 in smaller communities.
21495
21496 While the tools in the previous section work well in practice, they
21497 work only because the tools are constantly maintained and updated as
21498 new form of spam appears.  This means that a small percentage of spam
21499 will always get through.  It also means that somewhere, someone needs
21500 to read lots of spam to update these tools.  Hashcash avoids that, but
21501 instead requires that everyone you communicate with supports the
21502 scheme.  You can view the two approaches as pragmatic vs dogmatic.
21503 The approaches have their own advantages and disadvantages, but as
21504 often in the real world, a combination of them is stronger than either
21505 one of them separately.
21506
21507 @cindex X-Hashcash
21508 The ``something costly'' is to burn CPU time, more specifically to
21509 compute a hash collision up to a certain number of bits.  The
21510 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
21511 header. For more details, and for the external application
21512 @code{hashcash} you need to install to use this feature, see
21513 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
21514 information can be found at @uref{http://www.camram.org/}.
21515
21516 If you wish to call hashcash for each message you send, say something
21517 like:
21518
21519 @lisp
21520 (require 'hashcash)
21521 (add-hook 'message-send-hook 'mail-add-payment)
21522 @end lisp
21523
21524 The @code{hashcash.el} library can be found at
21525 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}, or in the Gnus
21526 development contrib directory.
21527
21528 You will need to set up some additional variables as well:
21529
21530 @table @code
21531
21532 @item hashcash-default-payment
21533 @vindex hashcash-default-payment
21534 This variable indicates the default number of bits the hash collision
21535 should consist of.  By default this is 0, meaning nothing will be
21536 done.  Suggested useful values include 17 to 29.
21537
21538 @item hashcash-payment-alist
21539 @vindex hashcash-payment-alist
21540 Some receivers may require you to spend burn more CPU time than the
21541 default.  This variable contains a list of @samp{(ADDR AMOUNT)} cells,
21542 where ADDR is the receiver (email address or newsgroup) and AMOUNT is
21543 the number of bits in the collision that is needed.  It can also
21544 contain @samp{(ADDR STRING AMOUNT)} cells, where the STRING is the
21545 string to use (normally the email address or newsgroup name is used).
21546
21547 @item hashcash
21548 @vindex hashcash
21549 Where the @code{hashcash} binary is installed.
21550
21551 @end table
21552
21553 Currently there is no built in functionality in Gnus to verify
21554 hashcash cookies, it is expected that this is performed by your hand
21555 customized mail filtering scripts.  Improvements in this area would be
21556 a useful contribution, however.
21557
21558 @node Filtering Spam Using The Spam ELisp Package
21559 @subsection Filtering Spam Using The Spam ELisp Package
21560 @cindex spam filtering
21561 @cindex spam
21562
21563 The idea behind @code{spam.el} is to have a control center for spam detection
21564 and filtering in Gnus.  To that end, @code{spam.el} does two things: it
21565 filters incoming mail, and it analyzes mail known to be spam or ham.
21566 @emph{Ham} is the name used throughout @code{spam.el} to indicate
21567 non-spam messages.
21568
21569 So, what happens when you load @code{spam.el}?  First of all, you get
21570 the following keyboard commands:
21571
21572 @table @kbd
21573
21574 @item M-d
21575 @itemx M s x
21576 @itemx S x
21577 @kindex M-d
21578 @kindex S x
21579 @kindex M s x
21580 @findex gnus-summary-mark-as-spam
21581 @code{gnus-summary-mark-as-spam}.
21582
21583 Mark current article as spam, showing it with the @samp{H} mark.
21584 Whenever you see a spam article, make sure to mark its summary line
21585 with @kbd{M-d} before leaving the group.  This is done automatically
21586 for unread articles in @emph{spam} groups.
21587
21588 @item M s t
21589 @itemx S t
21590 @kindex M s t
21591 @kindex S t
21592 @findex spam-bogofilter-score
21593 @code{spam-bogofilter-score}.
21594
21595 You must have Bogofilter installed for that command to work properly.
21596
21597 @xref{Bogofilter}.
21598
21599 @end table
21600
21601 Also, when you load @code{spam.el}, you will be able to customize its
21602 variables.  Try @code{customize-group} on the @samp{spam} variable
21603 group.
21604
21605 The concepts of ham processors and spam processors are very important.
21606 Ham processors and spam processors for a group can be set with the
21607 @code{spam-process} group parameter, or the
21608 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
21609 mail known to be non-spam (@emph{ham}) and process it in some way so
21610 that later similar mail will also be considered non-spam.  Spam
21611 processors take mail known to be spam and process it so similar spam
21612 will be detected later.
21613
21614 Gnus learns from the spam you get.  You have to collect your spam in
21615 one or more spam groups, and set or customize the variable
21616 @code{spam-junk-mailgroups} as appropriate.  You can also declare
21617 groups to contain spam by setting their group parameter
21618 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
21619 by customizing the corresponding variable
21620 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
21621 parameter and the @code{gnus-spam-newsgroup-contents} variable can
21622 also be used to declare groups as @emph{ham} groups if you set their
21623 classification to @code{gnus-group-spam-classification-ham}.  If
21624 groups are not classified by means of @code{spam-junk-mailgroups},
21625 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
21626 considered @emph{unclassified}.  All groups are unclassified by
21627 default.
21628
21629 In spam groups, all messages are considered to be spam by default:
21630 they get the @samp{H} mark when you enter the group.  You must review
21631 these messages from time to time and remove the @samp{H} mark for
21632 every message that is not spam after all.  To remove the @samp{H}
21633 mark, you can use @kbd{M-u} to "unread" the article, or @kbd{d} for
21634 declaring it read the non-spam way.  When you leave a group, all
21635 spam-marked (@samp{H}) articles are sent to a spam processor which
21636 will study them as spam samples.
21637
21638 Messages may also be deleted in various other ways, and unless
21639 @code{spam-ham-marks} gets overridden below, marks @samp{R} and
21640 @samp{r} for default read or explicit delete, marks @samp{X} and
21641 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
21642 low scores, are all considered to be associated with articles which
21643 are not spam.  This assumption might be false, in particular if you
21644 use kill files or score files as means for detecting genuine spam, you
21645 should then adjust the @code{spam-ham-marks} variable.
21646
21647 @defvar spam-ham-marks
21648 You can customize this variable to be the list of marks you want to
21649 consider ham.  By default, the list contains the deleted, read,
21650 killed, kill-filed, and low-score marks.
21651 @end defvar
21652
21653 @defvar spam-spam-marks
21654 You can customize this variable to be the list of marks you want to
21655 consider spam.  By default, the list contains only the spam mark.
21656 @end defvar
21657
21658 When you leave @emph{any} group, regardless of its
21659 @code{spam-contents} classification, all spam-marked articles are sent
21660 to a spam processor, which will study these as spam samples.  If you
21661 explicit kill a lot, you might sometimes end up with articles marked
21662 @samp{K} which you never saw, and which might accidentally contain
21663 spam.  Best is to make sure that real spam is marked with @samp{H},
21664 and nothing else.
21665
21666 When you leave a @emph{spam} group, all spam-marked articles are
21667 marked as expired after processing with the spam processor.  This is
21668 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
21669 @strong{ham} articles in a spam group will be moved to a location
21670 determined by either the @code{ham-process-destination} group
21671 parameter or a match in the @code{gnus-ham-process-destinations}
21672 variable, which is a list of regular expressions matched with group
21673 names (it's easiest to customize this variable with
21674 @code{customize-variable gnus-ham-process-destinations}).  The ultimate
21675 location is a group name.  If the @code{ham-process-destination}
21676 parameter is not set, spam articles are only expired.
21677
21678 When you leave a @emph{ham} group, all ham-marked articles are sent to
21679 a ham processor, which will study these as non-spam samples.
21680
21681 When you leave a @emph{ham} or @emph{unclassified} group, all
21682 @strong{spam} articles are moved to a location determined by either
21683 the @code{spam-process-destination} group parameter or a match in the
21684 @code{gnus-spam-process-destinations} variable, which is a list of
21685 regular expressions matched with group names (it's easiest to
21686 customize this variable with @code{customize-variable
21687 gnus-spam-process-destinations}).  The ultimate location is a group
21688 name.  If the @code{spam-process-destination} parameter is not set,
21689 the spam articles are only expired.
21690
21691 To use the @code{spam.el} facilities for incoming mail filtering, you
21692 must add the following to your fancy split list
21693 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
21694
21695 @example
21696 (: spam-split)
21697 @end example
21698
21699 Note that the fancy split may be called @code{nnmail-split-fancy} or
21700 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
21701 nnimap back ends to retrieve your mail.
21702
21703 The @code{spam-split} function will process incoming mail and send the
21704 mail considered to be spam into the group name given by the variable
21705 @code{spam-split-group}.  By default that group name is @samp{spam},
21706 but you can customize it.
21707
21708 @emph{Note for IMAP users}
21709
21710 The boolean variable @code{nnimap-split-download-body} needs to be
21711 set, if you want to split based on the whole message instead of just
21712 the headers.  By default, the nnimap backend will only retrieve the
21713 message headers.  If you use spam-check-bogofilter, spam-check-ifile,
21714 or spam-check-stat (the splitters that can benefit from the full
21715 message body), you should set this variable.  It is not set by default
21716 because it will slow IMAP down.
21717
21718 @xref{Splitting in IMAP}.
21719
21720 @emph{TODO: Currently, spam.el only supports insertion of articles
21721 into a backend.  There is no way to tell spam.el that an article is no
21722 longer spam or ham.}
21723
21724 @emph{TODO: spam.el needs to provide a uniform way of training all the
21725 statistical databases.  Some have that functionality built-in, others
21726 don't.}
21727
21728 The following are the methods you can use to control the behavior of
21729 @code{spam-split} and their corresponding spam and ham processors:
21730
21731 @menu
21732 * Blacklists and Whitelists::   
21733 * BBDB Whitelists::             
21734 * Blackholes::                  
21735 * Bogofilter::                  
21736 * ifile spam filtering::        
21737 * spam-stat spam filtering::    
21738 * Extending the spam elisp package::  
21739 @end menu
21740
21741 @node Blacklists and Whitelists
21742 @subsubsection Blacklists and Whitelists
21743 @cindex spam filtering
21744 @cindex whitelists, spam filtering
21745 @cindex blacklists, spam filtering
21746 @cindex spam
21747
21748 @defvar spam-use-blacklist
21749 Set this variable to @code{t} if you want to use blacklists when
21750 splitting incoming mail.  Messages whose senders are in the blacklist
21751 will be sent to the @code{spam-split-group}.  This is an explicit
21752 filter, meaning that it acts only on mail senders @emph{declared} to
21753 be spammers.
21754 @end defvar
21755
21756 @defvar spam-use-whitelist
21757 Set this variable to @code{t} if you want to use whitelists when
21758 splitting incoming mail.  Messages whose senders are not in the
21759 whitelist will be sent to the @code{spam-split-group}.  This is an
21760 implicit filter, meaning it believes everyone to be a spammer unless
21761 told otherwise.  Use with care.
21762 @end defvar
21763
21764 @defvar gnus-group-spam-exit-processor-blacklist
21765 Add this symbol to a group's @code{spam-process} parameter by
21766 customizing the group parameters or the
21767 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
21768 added to a group's @code{spam-process} parameter, the senders of
21769 spam-marked articles will be added to the blacklist.
21770 @end defvar
21771
21772 @defvar gnus-group-ham-exit-processor-whitelist
21773 Add this symbol to a group's @code{spam-process} parameter by
21774 customizing the group parameters or the
21775 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
21776 added to a group's @code{spam-process} parameter, the senders of
21777 ham-marked articles in @emph{ham} groups will be added to the
21778 whitelist.  Note that this ham processor has no effect in @emph{spam}
21779 or @emph{unclassified} groups.
21780 @end defvar
21781
21782 Blacklists are lists of regular expressions matching addresses you
21783 consider to be spam senders.  For instance, to block mail from any
21784 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
21785 blacklist.  You start out with an empty blacklist.  Blacklist entries
21786 use the Emacs regular expression syntax.
21787
21788 Conversely, whitelists tell Gnus what addresses are considered
21789 legitimate.  All non-whitelisted addresses are considered spammers.
21790 This option is probably not useful for most Gnus users unless the
21791 whitelists is very comprehensive or permissive.  Also see @ref{BBDB
21792 Whitelists}.  Whitelist entries use the Emacs regular expression
21793 syntax.
21794
21795 The blacklist and whitelist file locations can be customized with the
21796 @code{spam-directory} variable (@file{~/News/spam} by default), or
21797 the @code{spam-whitelist} and @code{spam-blacklist} variables
21798 directly.  The whitelist and blacklist files will by default be in the
21799 @code{spam-directory} directory, named @file{whitelist} and
21800 @file{blacklist} respectively.
21801
21802 @node BBDB Whitelists
21803 @subsubsection BBDB Whitelists
21804 @cindex spam filtering
21805 @cindex BBDB whitelists, spam filtering
21806 @cindex BBDB, spam filtering
21807 @cindex spam
21808
21809 @defvar spam-use-BBDB
21810
21811 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
21812 Whitelists}), but uses the BBDB as the source of whitelisted addresses,
21813 without regular expressions.  You must have the BBDB loaded for
21814 @code{spam-use-BBDB} to work properly.  Only addresses in the BBDB
21815 will be allowed through; all others will be classified as spam.
21816
21817 @end defvar
21818
21819 @defvar gnus-group-ham-exit-processor-BBDB
21820 Add this symbol to a group's @code{spam-process} parameter by
21821 customizing the group parameters or the
21822 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
21823 added to a group's @code{spam-process} parameter, the senders of
21824 ham-marked articles in @emph{ham} groups will be added to the
21825 BBDB.  Note that this ham processor has no effect in @emph{spam}
21826 or @emph{unclassified} groups.
21827 @end defvar
21828
21829 @node Blackholes
21830 @subsubsection Blackholes
21831 @cindex spam filtering
21832 @cindex blackholes, spam filtering
21833 @cindex spam
21834
21835 @defvar spam-use-blackholes
21836
21837 This option is disabled by default.  You can let Gnus consult the
21838 blackhole-type distributed spam processing systems (DCC, for instance)
21839 when you set this option.  The variable @code{spam-blackhole-servers}
21840 holds the list of blackhole servers Gnus will consult.  The current
21841 list is fairly comprehensive, but make sure to let us know if it
21842 contains outdated servers.
21843
21844 The blackhole check uses the @code{dig.el} package, but you can tell
21845 @code{spam.el} to use @code{dns.el} instead for better performance if
21846 you set @code{spam-use-dig} to nil.  It is not recommended at this
21847 time to set @code{spam-use-dig} to nil despite the possible
21848 performance improvements, because some users may be unable to use it,
21849 but you can try it and see if it works for you.
21850
21851 @end defvar
21852
21853 @defvar spam-blackhole-servers
21854
21855 The list of servers to consult for blackhole checks.
21856
21857 @end defvar
21858
21859 @defvar spam-use-dig
21860
21861 Use the @code{dig.el} package instead of the @code{dns.el} package.
21862 The default setting of @code{t} is recommended.
21863
21864 @end defvar
21865
21866 Blackhole checks are done only on incoming mail.  There is no spam or
21867 ham processor for blackholes.
21868
21869 @node Bogofilter
21870 @subsubsection Bogofilter
21871 @cindex spam filtering
21872 @cindex bogofilter, spam filtering
21873 @cindex spam
21874
21875 @defvar spam-use-bogofilter
21876
21877 Set this variable if you want @code{spam-split} to use Eric Raymond's
21878 speedy Bogofilter.
21879
21880 With a minimum of care for associating the @samp{H} mark for spam
21881 articles only, Bogofilter training all gets fairly automatic.  You
21882 should do this until you get a few hundreds of articles in each
21883 category, spam or not.  The command @kbd{S t} in summary mode, either
21884 for debugging or for curiosity, shows the @emph{spamicity} score of
21885 the current article (between 0.0 and 1.0).
21886
21887 Bogofilter determines if a message is spam based on an internal
21888 threshold, set at compilation time.  That threshold can't be
21889 customized.
21890
21891 If the @code{bogofilter} executable is not in your path, Bogofilter
21892 processing will be turned off.
21893
21894 You should not enable this if you use @code{spam-use-bogofilter-headers}.
21895
21896 @end defvar
21897
21898 @defvar spam-use-bogofilter-headers
21899
21900 Set this variable if you want @code{spam-split} to use Eric Raymond's
21901 speedy Bogofilter, looking only at the message headers.  It works
21902 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
21903 must be in the message already.  Normally you would do this with a
21904 procmail recipe or something similar; consult the Bogofilter
21905 installation documents for details.
21906
21907 You should not enable this if you use @code{spam-use-bogofilter}.
21908
21909 @end defvar
21910
21911 @defvar gnus-group-spam-exit-processor-bogofilter
21912 Add this symbol to a group's @code{spam-process} parameter by
21913 customizing the group parameters or the
21914 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
21915 added to a group's @code{spam-process} parameter, spam-marked articles
21916 will be added to the Bogofilter spam database.
21917 @end defvar
21918
21919 @defvar gnus-group-ham-exit-processor-bogofilter
21920 Add this symbol to a group's @code{spam-process} parameter by
21921 customizing the group parameters or the
21922 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
21923 added to a group's @code{spam-process} parameter, the ham-marked
21924 articles in @emph{ham} groups will be added to the Bogofilter database
21925 of non-spam messages.  Note that this ham processor has no effect in
21926 @emph{spam} or @emph{unclassified} groups.
21927 @end defvar
21928
21929 @defvar spam-bogofilter-database-directory
21930
21931 This is the directory where Bogofilter will store its databases.  It
21932 is not specified by default, so Bogofilter will use its own default
21933 database directory.
21934
21935 @end defvar
21936
21937 The Bogofilter mail classifier is similar to ifile in intent and
21938 purpose.  A ham and a spam processor are provided, plus the
21939 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
21940 variables to indicate to spam-split that Bogofilter should either be
21941 used, or has already been used on the article.  The 0.9.2.1 version of
21942 Bogofilter was used to test this functionality.
21943
21944 @node ifile spam filtering
21945 @subsubsection ifile spam filtering
21946 @cindex spam filtering
21947 @cindex ifile, spam filtering
21948 @cindex spam
21949
21950 @defvar spam-use-ifile
21951
21952 Enable this variable if you want @code{spam-split} to use ifile, a
21953 statistical analyzer similar to Bogofilter.
21954
21955 @end defvar
21956
21957 @defvar spam-ifile-all-categories
21958
21959 Enable this variable if you want @code{spam-use-ifile} to give you all
21960 the ifile categories, not just spam/non-spam.  If you use this, make
21961 sure you train ifile as described in its documentation.
21962
21963 @end defvar
21964
21965 @defvar spam-ifile-spam-category
21966
21967 This is the category of spam messages as far as ifile is concerned.
21968 The actual string used is irrelevant, but you probably want to leave
21969 the default value of @samp{spam}.
21970 @end defvar
21971
21972 @defvar spam-ifile-database-path
21973
21974 This is the filename for the ifile database.  It is not specified by
21975 default, so ifile will use its own default database name.
21976
21977 @end defvar
21978
21979 The ifile mail classifier is similar to Bogofilter in intent and
21980 purpose.  A ham and a spam processor are provided, plus the
21981 @code{spam-use-ifile} variable to indicate to spam-split that ifile
21982 should be used.  The 1.2.1 version of ifile was used to test this
21983 functionality.
21984
21985 @node spam-stat spam filtering
21986 @subsubsection spam-stat spam filtering
21987 @cindex spam filtering
21988 @cindex spam-stat, spam filtering
21989 @cindex spam-stat
21990 @cindex spam
21991
21992 @xref{Filtering Spam Using Statistics with spam-stat}.
21993
21994 @defvar spam-use-stat
21995
21996 Enable this variable if you want @code{spam-split} to use
21997 spam-stat.el, an Emacs Lisp statistical analyzer.
21998
21999 @end defvar
22000
22001 @defvar gnus-group-spam-exit-processor-stat
22002 Add this symbol to a group's @code{spam-process} parameter by
22003 customizing the group parameters or the
22004 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22005 added to a group's @code{spam-process} parameter, the spam-marked
22006 articles will be added to the spam-stat database of spam messages.
22007 @end defvar
22008
22009 @defvar gnus-group-ham-exit-processor-stat
22010 Add this symbol to a group's @code{spam-process} parameter by
22011 customizing the group parameters or the
22012 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22013 added to a group's @code{spam-process} parameter, the ham-marked
22014 articles in @emph{ham} groups will be added to the spam-stat database
22015 of non-spam messages.  Note that this ham processor has no effect in
22016 @emph{spam} or @emph{unclassified} groups.
22017 @end defvar
22018
22019 This enables spam.el to cooperate with spam-stat.el.  spam-stat.el
22020 provides an internal (Lisp-only) spam database, which unlike ifile or
22021 Bogofilter does not require external programs.  A spam and a ham
22022 processor, and the @code{spam-use-stat} variable for @code{spam-split}
22023 are provided.
22024
22025 @node Extending the spam elisp package
22026 @subsubsection Extending the spam elisp package
22027 @cindex spam filtering
22028 @cindex spam elisp package, extending
22029 @cindex extending the spam elisp package
22030
22031 Say you want to add a new back end called blackbox.  For filtering
22032 incoming mail, provide the following:
22033
22034 @enumerate
22035
22036 @item
22037 code
22038
22039 @example
22040 (defvar spam-use-blackbox nil
22041   "True if blackbox should be used.")
22042 @end example
22043
22044 Add
22045 @example
22046     (spam-use-blackbox   . spam-check-blackbox)
22047 @end example
22048 to @code{spam-list-of-checks}.
22049
22050 @item
22051 functionality
22052
22053 Write the @code{spam-check-blackbox} function.  It should return
22054 @samp{nil} or @code{spam-split-group}.  See the existing
22055 @code{spam-check-*} functions for examples of what you can do.
22056 @end enumerate
22057
22058 For processing spam and ham messages, provide the following:
22059
22060 @enumerate
22061
22062 @item
22063 code 
22064
22065 Note you don't have to provide a spam or a ham processor.  Only
22066 provide them if Blackbox supports spam or ham processing.
22067
22068 @example
22069 (defvar gnus-group-spam-exit-processor-blackbox "blackbox"
22070   "The Blackbox summary exit spam processor.
22071 Only applicable to spam groups.")
22072
22073 (defvar gnus-group-ham-exit-processor-blackbox "blackbox"
22074   "The whitelist summary exit ham processor.
22075 Only applicable to non-spam (unclassified and ham) groups.")
22076
22077 @end example
22078
22079 @item
22080 functionality
22081
22082 @example
22083 (defun spam-blackbox-register-spam-routine ()
22084   (spam-generic-register-routine
22085    ;; the spam function
22086    (lambda (article)
22087      (let ((from (spam-fetch-field-from-fast article)))
22088        (when (stringp from)
22089            (blackbox-do-something-with-this-spammer from))))
22090    ;; the ham function
22091    nil))
22092
22093 (defun spam-blackbox-register-ham-routine ()
22094   (spam-generic-register-routine
22095    ;; the spam function
22096    nil
22097    ;; the ham function
22098    (lambda (article)
22099      (let ((from (spam-fetch-field-from-fast article)))
22100        (when (stringp from)
22101            (blackbox-do-something-with-this-ham-sender from))))))
22102 @end example
22103
22104 Write the @code{blackbox-do-something-with-this-ham-sender} and
22105 @code{blackbox-do-something-with-this-spammer} functions.  You can add
22106 more complex code than fetching the message sender, but keep in mind
22107 that retrieving the whole message takes significantly longer than the
22108 sender through @code{spam-fetch-field-from-fast}, because the message
22109 senders are kept in memory by Gnus.
22110
22111 @end enumerate
22112
22113
22114 @node Filtering Spam Using Statistics with spam-stat
22115 @subsection Filtering Spam Using Statistics with spam-stat
22116 @cindex Paul Graham
22117 @cindex Graham, Paul
22118 @cindex naive Bayesian spam filtering
22119 @cindex Bayesian spam filtering, naive
22120 @cindex spam filtering, naive Bayesian
22121
22122 Paul Graham has written an excellent essay about spam filtering using
22123 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
22124 Spam}.  In it he describes the inherent deficiency of rule-based
22125 filtering as used by SpamAssassin, for example: Somebody has to write
22126 the rules, and everybody else has to install these rules.  You are
22127 always late.  It would be much better, he argues, to filter mail based
22128 on whether it somehow resembles spam or non-spam.  One way to measure
22129 this is word distribution.  He then goes on to describe a solution
22130 that checks whether a new mail resembles any of your other spam mails
22131 or not.
22132
22133 The basic idea is this:  Create a two collections of your mail, one
22134 with spam, one with non-spam.  Count how often each word appears in
22135 either collection, weight this by the total number of mails in the
22136 collections, and store this information in a dictionary.  For every
22137 word in a new mail, determine its probability to belong to a spam or a
22138 non-spam mail.  Use the 15 most conspicuous words, compute the total
22139 probability of the mail being spam.  If this probability is higher
22140 than a certain threshold, the mail is considered to be spam.
22141
22142 Gnus supports this kind of filtering.  But it needs some setting up.
22143 First, you need two collections of your mail, one with spam, one with
22144 non-spam.  Then you need to create a dictionary using these two
22145 collections, and save it.  And last but not least, you need to use
22146 this dictionary in your fancy mail splitting rules.
22147
22148 @menu
22149 * Creating a spam-stat dictionary::  
22150 * Splitting mail using spam-stat::  
22151 * Low-level interface to the spam-stat dictionary::  
22152 @end menu
22153
22154 @node Creating a spam-stat dictionary
22155 @subsubsection Creating a spam-stat dictionary
22156
22157 Before you can begin to filter spam based on statistics, you must
22158 create these statistics based on two mail collections, one with spam,
22159 one with non-spam.  These statistics are then stored in a dictionary
22160 for later use.  In order for these statistics to be meaningful, you
22161 need several hundred emails in both collections.
22162
22163 Gnus currently supports only the nnml back end for automated dictionary
22164 creation.  The nnml back end stores all mails in a directory, one file
22165 per mail.  Use the following:
22166
22167 @defun spam-stat-process-spam-directory
22168 Create spam statistics for every file in this directory.  Every file
22169 is treated as one spam mail.
22170 @end defun
22171
22172 @defun spam-stat-process-non-spam-directory
22173 Create non-spam statistics for every file in this directory.  Every
22174 file is treated as one non-spam mail.
22175 @end defun
22176
22177 Usually you would call @code{spam-stat-process-spam-directory} on a
22178 directory such as @file{~/Mail/mail/spam} (this usually corresponds
22179 the the group @samp{nnml:mail.spam}), and you would call
22180 @code{spam-stat-process-non-spam-directory} on a directory such as
22181 @file{~/Mail/mail/misc} (this usually corresponds the the group
22182 @samp{nnml:mail.misc}).
22183
22184 When you are using IMAP, you won't have the mails available locally,
22185 so that will not work.  One solution is to use the Gnus Agent to cache
22186 the articles.  Then you can use directories such as
22187 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
22188 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
22189
22190 @defvar spam-stat
22191 This variable holds the hash-table with all the statistics -- the
22192 dictionary we have been talking about.  For every word in either
22193 collection, this hash-table stores a vector describing how often the
22194 word appeared in spam and often it appeared in non-spam mails.
22195 @end defvar
22196
22197 If you want to regenerate the statistics from scratch, you need to
22198 reset the dictionary.
22199
22200 @defun spam-stat-reset
22201 Reset the @code{spam-stat} hash-table, deleting all the statistics.
22202 @end defun
22203
22204 When you are done, you must save the dictionary.  The dictionary may
22205 be rather large.  If you will not update the dictionary incrementally
22206 (instead, you will recreate it once a month, for example), then you
22207 can reduce the size of the dictionary by deleting all words that did
22208 not appear often enough or that do not clearly belong to only spam or
22209 only non-spam mails.
22210
22211 @defun spam-stat-reduce-size
22212 Reduce the size of the dictionary.  Use this only if you do not want
22213 to update the dictionary incrementally.
22214 @end defun
22215
22216 @defun spam-stat-save
22217 Save the dictionary.
22218 @end defun
22219
22220 @defvar spam-stat-file
22221 The filename used to store the dictionary.  This defaults to
22222 @file{~/.spam-stat.el}.
22223 @end defvar
22224
22225 @node Splitting mail using spam-stat
22226 @subsubsection Splitting mail using spam-stat
22227
22228 In order to use @code{spam-stat} to split your mail, you need to add the
22229 following to your @file{~/.gnus} file:
22230
22231 @example
22232 (require 'spam-stat)
22233 (spam-stat-load)
22234 @end example
22235
22236 This will load the necessary Gnus code, and the dictionary you
22237 created.
22238
22239 Next, you need to adapt your fancy splitting rules:  You need to
22240 determine how to use @code{spam-stat}.  The following examples are for
22241 the nnml back end.  Using the nnimap back end works just as well.  Just
22242 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
22243
22244 In the simplest case, you only have two groups, @samp{mail.misc} and
22245 @samp{mail.spam}.  The following expression says that mail is either
22246 spam or it should go into @samp{mail.misc}.  If it is spam, then
22247 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
22248
22249 @example
22250 (setq nnmail-split-fancy
22251       `(| (: spam-stat-split-fancy)
22252           "mail.misc"))
22253 @end example
22254
22255 @defvar spam-stat-split-fancy-spam-group
22256 The group to use for spam.  Default is @samp{mail.spam}.
22257 @end defvar
22258
22259 If you also filter mail with specific subjects into other groups, use
22260 the following expression.  Only mails not matching the regular
22261 expression are considered potential spam.
22262
22263 @example
22264 (setq nnmail-split-fancy
22265       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
22266           (: spam-stat-split-fancy)
22267           "mail.misc"))
22268 @end example
22269
22270 If you want to filter for spam first, then you must be careful when
22271 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
22272 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
22273 non-spam, therefore both should be in your collection of non-spam
22274 mails, when creating the dictionary!
22275
22276 @example
22277 (setq nnmail-split-fancy
22278       `(| (: spam-stat-split-fancy)
22279           ("Subject" "\\bspam-stat\\b" "mail.emacs")
22280           "mail.misc"))
22281 @end example
22282
22283 You can combine this with traditional filtering.  Here, we move all
22284 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
22285 @code{spam-stat-split-fancy} will never see them, the mails in
22286 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
22287 nor in your collection of non-spam mails, when creating the
22288 dictionary!
22289
22290 @example
22291 (setq nnmail-split-fancy
22292       `(| ("Content-Type" "text/html" "mail.spam.filtered")
22293           (: spam-stat-split-fancy)
22294           ("Subject" "\\bspam-stat\\b" "mail.emacs")
22295           "mail.misc"))
22296 @end example
22297
22298
22299 @node Low-level interface to the spam-stat dictionary
22300 @subsubsection Low-level interface to the spam-stat dictionary
22301
22302 The main interface to using @code{spam-stat}, are the following functions:
22303
22304 @defun spam-stat-buffer-is-spam
22305 Called in a buffer, that buffer is considered to be a new spam mail.
22306 Use this for new mail that has not been processed before.
22307 @end defun
22308
22309 @defun spam-stat-buffer-is-no-spam
22310 Called in a buffer, that buffer is considered to be a new non-spam
22311 mail.  Use this for new mail that has not been processed before.
22312 @end defun
22313
22314 @defun spam-stat-buffer-change-to-spam
22315 Called in a buffer, that buffer is no longer considered to be normal
22316 mail but spam.  Use this to change the status of a mail that has
22317 already been processed as non-spam.
22318 @end defun
22319
22320 @defun spam-stat-buffer-change-to-non-spam
22321 Called in a buffer, that buffer is no longer considered to be spam but
22322 normal mail.  Use this to change the status of a mail that has already
22323 been processed as spam.
22324 @end defun
22325
22326 @defun spam-stat-save
22327 Save the hash table to the file.  The filename used is stored in the
22328 variable @code{spam-stat-file}.
22329 @end defun
22330
22331 @defun spam-stat-load
22332 Load the hash table from a file.  The filename used is stored in the
22333 variable @code{spam-stat-file}.
22334 @end defun
22335
22336 @defun spam-stat-score-word
22337 Return the spam score for a word.
22338 @end defun
22339
22340 @defun spam-stat-score-buffer
22341 Return the spam score for a buffer.
22342 @end defun
22343
22344 @defun spam-stat-split-fancy
22345 Use this function for fancy mail splitting.  Add the rule @samp{(:
22346 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
22347 @end defun
22348
22349 Make sure you load the dictionary before using it.  This requires the
22350 following in your @file{~/.gnus} file:
22351
22352 @example
22353 (require 'spam-stat)
22354 (spam-stat-load)
22355 @end example
22356
22357 Typical test will involve calls to the following functions:
22358
22359 @example
22360 Reset: (setq spam-stat (make-hash-table :test 'equal))
22361 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
22362 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
22363 Save table: (spam-stat-save)
22364 File size: (nth 7 (file-attributes spam-stat-file))
22365 Number of words: (hash-table-count spam-stat)
22366 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
22367 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
22368 Reduce table size: (spam-stat-reduce-size)
22369 Save table: (spam-stat-save)
22370 File size: (nth 7 (file-attributes spam-stat-file))
22371 Number of words: (hash-table-count spam-stat)
22372 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
22373 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
22374 @end example
22375
22376 Here is how you would create your dictionary:
22377
22378 @example
22379 Reset: (setq spam-stat (make-hash-table :test 'equal))
22380 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
22381 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
22382 Repeat for any other non-spam group you need...
22383 Reduce table size: (spam-stat-reduce-size)
22384 Save table: (spam-stat-save)
22385 @end example
22386
22387 @node Various Various
22388 @section Various Various
22389 @cindex mode lines
22390 @cindex highlights
22391
22392 @table @code
22393
22394 @item gnus-home-directory
22395 All Gnus file and directory variables will be initialized from this
22396 variable, which defaults to @file{~/}.
22397
22398 @item gnus-directory
22399 @vindex gnus-directory
22400 Most Gnus storage file and directory variables will be initialized from
22401 this variable, which defaults to the @samp{SAVEDIR} environment
22402 variable, or @file{~/News/} if that variable isn't set.
22403
22404 Note that Gnus is mostly loaded when the @file{.gnus.el} file is read.
22405 This means that other directory variables that are initialized from this
22406 variable won't be set properly if you set this variable in
22407 @file{.gnus.el}.  Set this variable in @file{.emacs} instead.
22408
22409 @item gnus-default-directory
22410 @vindex gnus-default-directory
22411 Not related to the above variable at all---this variable says what the
22412 default directory of all Gnus buffers should be.  If you issue commands
22413 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
22414 default directory.  If this variable is @code{nil} (which is the
22415 default), the default directory will be the default directory of the
22416 buffer you were in when you started Gnus.
22417
22418 @item gnus-verbose
22419 @vindex gnus-verbose
22420 This variable is an integer between zero and ten.  The higher the value,
22421 the more messages will be displayed.  If this variable is zero, Gnus
22422 will never flash any messages, if it is seven (which is the default),
22423 most important messages will be shown, and if it is ten, Gnus won't ever
22424 shut up, but will flash so many messages it will make your head swim.
22425
22426 @item gnus-verbose-backends
22427 @vindex gnus-verbose-backends
22428 This variable works the same way as @code{gnus-verbose}, but it applies
22429 to the Gnus back ends instead of Gnus proper.
22430
22431 @item nnheader-max-head-length
22432 @vindex nnheader-max-head-length
22433 When the back ends read straight heads of articles, they all try to read
22434 as little as possible.  This variable (default 4096) specifies
22435 the absolute max length the back ends will try to read before giving up
22436 on finding a separator line between the head and the body.  If this
22437 variable is @code{nil}, there is no upper read bound.  If it is
22438 @code{t}, the back ends won't try to read the articles piece by piece,
22439 but read the entire articles.  This makes sense with some versions of
22440 @code{ange-ftp} or @code{efs}.
22441
22442 @item nnheader-head-chop-length
22443 @vindex nnheader-head-chop-length
22444 This variable (default 2048) says how big a piece of each article to
22445 read when doing the operation described above.
22446
22447 @item nnheader-file-name-translation-alist
22448 @vindex nnheader-file-name-translation-alist
22449 @cindex file names
22450 @cindex invalid characters in file names
22451 @cindex characters in file names
22452 This is an alist that says how to translate characters in file names.
22453 For instance, if @samp{:} is invalid as a file character in file names
22454 on your system (you OS/2 user you), you could say something like:
22455
22456 @lisp
22457 (setq nnheader-file-name-translation-alist
22458       '((?: . ?_)))
22459 @end lisp
22460
22461 In fact, this is the default value for this variable on OS/2 and MS
22462 Windows (phooey) systems.
22463
22464 @item gnus-hidden-properties
22465 @vindex gnus-hidden-properties
22466 This is a list of properties to use to hide ``invisible'' text.  It is
22467 @code{(invisible t intangible t)} by default on most systems, which
22468 makes invisible text invisible and intangible.
22469
22470 @item gnus-parse-headers-hook
22471 @vindex gnus-parse-headers-hook
22472 A hook called before parsing headers.  It can be used, for instance, to
22473 gather statistics on the headers fetched, or perhaps you'd like to prune
22474 some headers.  I don't see why you'd want that, though.
22475
22476 @item gnus-shell-command-separator
22477 @vindex gnus-shell-command-separator
22478 String used to separate two shell commands.  The default is @samp{;}.
22479
22480 @item gnus-invalid-group-regexp
22481 @vindex gnus-invalid-group-regexp
22482
22483 Regexp to match ``invalid'' group names when querying user for a group
22484 name.  The default value catches some @strong{really} invalid group
22485 names who could possibly mess up Gnus internally (like allowing
22486 @samp{:} in a group name, which is normally used to delimit method and
22487 group).
22488
22489 @sc{imap} users might want to allow @samp{/} in group names though.
22490
22491
22492 @end table
22493
22494 @node The End
22495 @chapter The End
22496
22497 Well, that's the manual---you can get on with your life now.  Keep in
22498 touch.  Say hello to your cats from me.
22499
22500 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
22501
22502 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
22503
22504 @quotation
22505 @strong{Te Deum}
22506
22507 @sp 1
22508 Not because of victories @*
22509 I sing,@*
22510 having none,@*
22511 but for the common sunshine,@*
22512 the breeze,@*
22513 the largess of the spring.
22514
22515 @sp 1
22516 Not for victory@*
22517 but for the day's work done@*
22518 as well as I was able;@*
22519 not for a seat upon the dais@*
22520 but at the common table.@*
22521 @end quotation
22522
22523
22524 @node Appendices
22525 @chapter Appendices
22526
22527 @menu
22528 * XEmacs::                      Requirements for installing under XEmacs.
22529 * History::                     How Gnus got where it is today.
22530 * On Writing Manuals::          Why this is not a beginner's guide.
22531 * Terminology::                 We use really difficult, like, words here.
22532 * Customization::               Tailoring Gnus to your needs.
22533 * Troubleshooting::             What you might try if things do not work.
22534 * Gnus Reference Guide::        Rilly, rilly technical stuff.
22535 * Emacs for Heathens::          A short introduction to Emacsian terms.
22536 * Frequently Asked Questions::
22537 @end menu
22538
22539
22540 @node XEmacs
22541 @section XEmacs
22542 @cindex XEmacs
22543 @cindex Installing under XEmacs
22544
22545 XEmacs is distributed as a collection of packages.  You should install
22546 whatever packages the Gnus XEmacs package requires.  The current
22547 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
22548 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
22549 @samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
22550 @samp{misc-games} package is required for Morse decoding.
22551
22552
22553 @node History
22554 @section History
22555
22556 @cindex history
22557 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
22558 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
22559
22560 If you want to investigate the person responsible for this outrage,
22561 you can point your (feh!) web browser to
22562 @uref{http://quimby.gnus.org/}.  This is also the primary
22563 distribution point for the new and spiffy versions of Gnus, and is
22564 known as The Site That Destroys Newsrcs And Drives People Mad.
22565
22566 During the first extended alpha period of development, the new Gnus was
22567 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
22568 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
22569 (Besides, the ``Gnus'' in this abbreviation should probably be
22570 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
22571 appropriate name, don't you think?)
22572
22573 In any case, after spending all that energy on coming up with a new and
22574 spunky name, we decided that the name was @emph{too} spunky, so we
22575 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
22576 ``@sc{gnus}''.  New vs. old.
22577
22578 @menu
22579 * Gnus Versions::               What Gnus versions have been released.
22580 * Other Gnus Versions::         Other Gnus versions that also have been released.
22581 * Why?::                        What's the point of Gnus?
22582 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
22583 * Conformity::                  Gnus tries to conform to all standards.
22584 * Emacsen::                     Gnus can be run on a few modern Emacsen.
22585 * Gnus Development::            How Gnus is developed.
22586 * Contributors::                Oodles of people.
22587 * New Features::                Pointers to some of the new stuff in Gnus.
22588 @end menu
22589
22590
22591 @node Gnus Versions
22592 @subsection Gnus Versions
22593 @cindex ding Gnus
22594 @cindex September Gnus
22595 @cindex Red Gnus
22596 @cindex Quassia Gnus
22597 @cindex Pterodactyl Gnus
22598 @cindex Oort Gnus
22599 @cindex No Gnus
22600
22601 The first ``proper'' release of Gnus 5 was done in November 1995 when it
22602 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
22603 plus 15 Gnus 5.0 releases).
22604
22605 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
22606 releases)) was released under the name ``Gnus 5.2'' (40 releases).
22607
22608 On July 28th 1996 work on Red Gnus was begun, and it was released on
22609 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
22610
22611 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
22612 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
22613
22614 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
22615 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
22616 1999.
22617
22618 On the 26th of October 2000, Oort Gnus was begun.
22619
22620 If you happen upon a version of Gnus that has a prefixed name --
22621 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
22622 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
22623 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
22624 run.  Walk away, calmly, until you're out of its reach.  Find a proper
22625 released version of Gnus and snuggle up to that instead.
22626
22627
22628 @node Other Gnus Versions
22629 @subsection Other Gnus Versions
22630 @cindex Semi-gnus
22631
22632 In addition to the versions of Gnus which have had their releases
22633 coordinated by Lars, one major development has been Semi-gnus from
22634 Japan.  It's based on a library called @sc{semi}, which provides
22635 @sc{mime} capabilities.
22636
22637 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
22638 Collectively, they are called ``Semi-gnus'', and different strains are
22639 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
22640 @sc{mime} and multilingualization things, especially important for
22641 Japanese users.
22642
22643
22644 @node Why?
22645 @subsection Why?
22646
22647 What's the point of Gnus?
22648
22649 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
22650 newsreader, that lets you do anything you can think of.  That was my
22651 original motivation, but while working on Gnus, it has become clear to
22652 me that this generation of newsreaders really belong in the stone age.
22653 Newsreaders haven't developed much since the infancy of the net.  If the
22654 volume continues to rise with the current rate of increase, all current
22655 newsreaders will be pretty much useless.  How do you deal with
22656 newsgroups that have thousands of new articles each day?  How do you
22657 keep track of millions of people who post?
22658
22659 Gnus offers no real solutions to these questions, but I would very much
22660 like to see Gnus being used as a testing ground for new methods of
22661 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
22662 to separate the newsreader from the back ends, Gnus now offers a simple
22663 interface for anybody who wants to write new back ends for fetching mail
22664 and news from different sources.  I have added hooks for customizations
22665 everywhere I could imagine it being useful.  By doing so, I'm inviting
22666 every one of you to explore and invent.
22667
22668 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
22669 @kbd{C-u 100 M-x all-hail-xemacs}.
22670
22671
22672 @node Compatibility
22673 @subsection Compatibility
22674
22675 @cindex compatibility
22676 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
22677 bindings have been kept.  More key bindings have been added, of course,
22678 but only in one or two obscure cases have old bindings been changed.
22679
22680 Our motto is:
22681 @quotation
22682 @cartouche
22683 @center In a cloud bones of steel.
22684 @end cartouche
22685 @end quotation
22686
22687 All commands have kept their names.  Some internal functions have changed
22688 their names.
22689
22690 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
22691 Articles}.
22692
22693 One major compatibility question is the presence of several summary
22694 buffers.  All variables relevant while reading a group are
22695 buffer-local to the summary buffer they belong in.  Although many
22696 important variables have their values copied into their global
22697 counterparts whenever a command is executed in the summary buffer, this
22698 change might lead to incorrect values being used unless you are careful.
22699
22700 All code that relies on knowledge of @sc{gnus} internals will probably
22701 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
22702 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
22703 maintains a hash table that points to the entries in this alist (which
22704 speeds up many functions), and changing the alist directly will lead to
22705 peculiar results.
22706
22707 @cindex hilit19
22708 @cindex highlighting
22709 Old hilit19 code does not work at all.  In fact, you should probably
22710 remove all hilit code from all Gnus hooks
22711 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
22712 Gnus provides various integrated functions for highlighting.  These are
22713 faster and more accurate.  To make life easier for everybody, Gnus will
22714 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
22715 Away!
22716
22717 Packages like @code{expire-kill} will no longer work.  As a matter of
22718 fact, you should probably remove all old @sc{gnus} packages (and other
22719 code) when you start using Gnus.  More likely than not, Gnus already
22720 does what you have written code to make @sc{gnus} do.  (Snicker.)
22721
22722 Even though old methods of doing things are still supported, only the
22723 new methods are documented in this manual.  If you detect a new method of
22724 doing something while reading this manual, that does not mean you have
22725 to stop doing it the old way.
22726
22727 Gnus understands all @sc{gnus} startup files.
22728
22729 @kindex M-x gnus-bug
22730 @findex gnus-bug
22731 @cindex reporting bugs
22732 @cindex bugs
22733 Overall, a casual user who hasn't written much code that depends on
22734 @sc{gnus} internals should suffer no problems.  If problems occur,
22735 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
22736
22737 @vindex gnus-bug-create-help-buffer
22738 If you are in the habit of sending bug reports @emph{very} often, you
22739 may find the helpful help buffer annoying after a while.  If so, set
22740 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
22741 up at you.
22742
22743
22744 @node Conformity
22745 @subsection Conformity
22746
22747 No rebels without a clue here, ma'am.  We conform to all standards known
22748 to (wo)man.  Except for those standards and/or conventions we disagree
22749 with, of course.
22750
22751 @table @strong
22752
22753 @item RFC (2)822
22754 @cindex RFC 822
22755 @cindex RFC 2822
22756 There are no known breaches of this standard.
22757
22758 @item RFC 1036
22759 @cindex RFC 1036
22760 There are no known breaches of this standard, either.
22761
22762 @item Son-of-RFC 1036
22763 @cindex Son-of-RFC 1036
22764 We do have some breaches to this one.
22765
22766 @table @emph
22767
22768 @item X-Newsreader
22769 @itemx User-Agent
22770 These are considered to be ``vanity headers'', while I consider them
22771 to be consumer information.  After seeing so many badly formatted
22772 articles coming from @code{tin} and @code{Netscape} I know not to use
22773 either of those for posting articles.  I would not have known that if
22774 it wasn't for the @code{X-Newsreader} header.
22775 @end table
22776
22777 @item USEFOR
22778 @cindex USEFOR
22779 USEFOR is an IETF working group writing a successor to RFC 1036, based
22780 on Son-of-RFC 1036.  They have produced a number of drafts proposing
22781 various changes to the format of news articles.  The Gnus towers will
22782 look into implementing the changes when the draft is accepted as an RFC.
22783
22784 @item MIME - RFC 2045-2049 etc
22785 @cindex MIME
22786 All the various @sc{mime} RFCs are supported.
22787
22788 @item Disposition Notifications - RFC 2298
22789 Message Mode is able to request notifications from the receiver.
22790
22791 @item PGP - RFC 1991 and RFC 2440
22792 @cindex RFC 1991
22793 @cindex RFC 2440
22794 RFC 1991 is the original PGP message specification, published as a
22795 Information RFC.  RFC 2440 was the follow-up, now called Open PGP, and
22796 put on the Standards Track.  Both document a non-@sc{mime} aware PGP
22797 format.  Gnus supports both encoding (signing and encryption) and
22798 decoding (verification and decryption).
22799
22800 @item PGP/MIME - RFC 2015/3156
22801 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
22802 1991) describes the @sc{mime}-wrapping around the RF 1991/2440 format.
22803 Gnus supports both encoding and decoding.
22804
22805 @item S/MIME - RFC 2633
22806 RFC 2633 describes the @sc{s/mime} format.
22807
22808 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
22809 RFC 1730 is @sc{imap} version 4, updated somewhat by RFC 2060 (@sc{imap} 4
22810 revision 1).  RFC 2195 describes CRAM-MD5 authentication for @sc{imap}. RFC
22811 2086 describes access control lists (ACLs) for @sc{imap}. RFC 2359
22812 describes a @sc{imap} protocol enhancement.  RFC 2595 describes the proper
22813 TLS integration (STARTTLS) with @sc{imap}.  RFC 1731 describes the
22814 GSSAPI/Kerberos4 mechanisms for @sc{imap}.
22815
22816 @end table
22817
22818 If you ever notice Gnus acting non-compliant with regards to the texts
22819 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
22820 know.
22821
22822
22823 @node Emacsen
22824 @subsection Emacsen
22825 @cindex Emacsen
22826 @cindex XEmacs
22827 @cindex Mule
22828 @cindex Emacs
22829
22830 Gnus should work on :
22831
22832 @itemize @bullet
22833
22834 @item
22835 Emacs 20.3 and up.
22836
22837 @item
22838 XEmacs 20.4 and up.
22839
22840 @end itemize
22841
22842 This Gnus version will absolutely not work on any Emacsen older than
22843 that.  Not reliably, at least.  Older versions of Gnus may work on older
22844 Emacs versions.
22845
22846 There are some vague differences between Gnus on the various
22847 platforms---XEmacs features more graphics (a logo and a toolbar)---but
22848 other than that, things should look pretty much the same under all
22849 Emacsen.
22850
22851
22852 @node Gnus Development
22853 @subsection Gnus Development
22854
22855 Gnus is developed in a two-phased cycle.  The first phase involves much
22856 discussion on the @samp{ding@@gnus.org} mailing list, where people
22857 propose changes and new features, post patches and new back ends.  This
22858 phase is called the @dfn{alpha} phase, since the Gnusae released in this
22859 phase are @dfn{alpha releases}, or (perhaps more commonly in other
22860 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
22861 unstable and should not be used by casual users.  Gnus alpha releases
22862 have names like ``Red Gnus'' and ``Quassia Gnus''.
22863
22864 After futzing around for 50-100 alpha releases, Gnus is declared
22865 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
22866 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
22867 supposed to be able to use these, and these are mostly discussed on the
22868 @samp{gnu.emacs.gnus} newsgroup.
22869
22870 @cindex Incoming*
22871 @vindex mail-source-delete-incoming
22872 Some variable defaults differ between alpha Gnusae and released Gnusae.
22873 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
22874 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
22875 lossage of mail if an alpha release hiccups while handling the mail.
22876
22877 The division of discussion between the ding mailing list and the Gnus
22878 newsgroup is not purely based on publicity concerns.  It's true that
22879 having people write about the horrible things that an alpha Gnus release
22880 can do (sometimes) in a public forum may scare people off, but more
22881 importantly, talking about new experimental features that have been
22882 introduced may confuse casual users.  New features are frequently
22883 introduced, fiddled with, and judged to be found wanting, and then
22884 either discarded or totally rewritten.  People reading the mailing list
22885 usually keep up with these rapid changes, while people on the newsgroup
22886 can't be assumed to do so.
22887
22888
22889
22890 @node Contributors
22891 @subsection Contributors
22892 @cindex contributors
22893
22894 The new Gnus version couldn't have been done without the help of all the
22895 people on the (ding) mailing list.  Every day for over a year I have
22896 gotten billions of nice bug reports from them, filling me with joy,
22897 every single one of them.  Smooches.  The people on the list have been
22898 tried beyond endurance, what with my ``oh, that's a neat idea <type
22899 type>, yup, I'll release it right away <ship off> no wait, that doesn't
22900 work at all <type type>, yup, I'll ship that one off right away <ship
22901 off> no, wait, that absolutely does not work'' policy for releases.
22902 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
22903 ``worser''? ``much worser''?  ``worsest''?)
22904
22905 I would like to take this opportunity to thank the Academy for...  oops,
22906 wrong show.
22907
22908 @itemize @bullet
22909
22910 @item
22911 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
22912
22913 @item
22914 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
22915 nnwarchive and many, many other things connected with @sc{mime} and
22916 other types of en/decoding, as well as general bug fixing, new
22917 functionality and stuff.
22918
22919 @item
22920 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
22921 well as numerous other things).
22922
22923 @item
22924 Luis Fernandes---design and graphics.
22925
22926 @item
22927 Joe Reiss---creator of the smiley faces.
22928
22929 @item
22930 Justin Sheehy--the FAQ maintainer.
22931
22932 @item
22933 Erik Naggum---help, ideas, support, code and stuff.
22934
22935 @item
22936 Wes Hardaker---@file{gnus-picon.el} and the manual section on
22937 @dfn{picons} (@pxref{Picons}).
22938
22939 @item
22940 Kim-Minh Kaplan---further work on the picon code.
22941
22942 @item
22943 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
22944 (@pxref{GroupLens}).
22945
22946 @item
22947 Sudish Joseph---innumerable bug fixes.
22948
22949 @item
22950 Ilja Weis---@file{gnus-topic.el}.
22951
22952 @item
22953 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
22954
22955 @item
22956 Vladimir Alexiev---the refcard and reference booklets.
22957
22958 @item
22959 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
22960 distribution by Felix Lee and JWZ.
22961
22962 @item
22963 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
22964
22965 @item
22966 Peter Mutsaers---orphan article scoring code.
22967
22968 @item
22969 Ken Raeburn---POP mail support.
22970
22971 @item
22972 Hallvard B Furuseth---various bits and pieces, especially dealing with
22973 .newsrc files.
22974
22975 @item
22976 Brian Edmonds---@file{gnus-bbdb.el}.
22977
22978 @item
22979 David Moore---rewrite of @file{nnvirtual.el} and many other things.
22980
22981 @item
22982 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
22983
22984 @item
22985 François Pinard---many, many interesting and thorough bug reports, as
22986 well as autoconf support.
22987
22988 @end itemize
22989
22990 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
22991 Borges, and Jost Krieger proof-reading parts of the manual.
22992
22993 The following people have contributed many patches and suggestions:
22994
22995 Christopher Davis,
22996 Andrew Eskilsson,
22997 Kai Grossjohann,
22998 David KÃ¥gedal,
22999 Richard Pieri,
23000 Fabrice Popineau,
23001 Daniel Quinlan,
23002 Jason L. Tibbitts, III,
23003 and
23004 Jack Vinson.
23005
23006 Also thanks to the following for patches and stuff:
23007
23008 Jari Aalto,
23009 Adrian Aichner,
23010 Vladimir Alexiev,
23011 Russ Allbery,
23012 Peter Arius,
23013 Matt Armstrong,
23014 Marc Auslander,
23015 Miles Bader,
23016 Alexei V. Barantsev,
23017 Frank Bennett,
23018 Robert Bihlmeyer,
23019 Chris Bone,
23020 Mark Borges,
23021 Mark Boyns,
23022 Lance A. Brown,
23023 Rob Browning,
23024 Kees de Bruin,
23025 Martin Buchholz,
23026 Joe Buehler,
23027 Kevin Buhr,
23028 Alastair Burt,
23029 Joao Cachopo,
23030 Zlatko Calusic,
23031 Massimo Campostrini,
23032 Castor,
23033 David Charlap,
23034 Dan Christensen,
23035 Kevin Christian,
23036 Jae-you Chung, @c ?
23037 James H. Cloos, Jr.,
23038 Laura Conrad,
23039 Michael R. Cook,
23040 Glenn Coombs,
23041 Andrew J. Cosgriff,
23042 Neil Crellin,
23043 Frank D. Cringle,
23044 Geoffrey T. Dairiki,
23045 Andre Deparade,
23046 Ulrik Dickow,
23047 Dave Disser,
23048 Rui-Tao Dong, @c ?
23049 Joev Dubach,
23050 Michael Welsh Duggan,
23051 Dave Edmondson,
23052 Paul Eggert,
23053 Mark W. Eichin,
23054 Karl Eichwalder,
23055 Enami Tsugutomo, @c Enami
23056 Michael Ernst,
23057 Luc Van Eycken,
23058 Sam Falkner,
23059 Nelson Jose dos Santos Ferreira,
23060 Sigbjorn Finne,
23061 Sven Fischer,
23062 Paul Fisher,
23063 Decklin Foster,
23064 Gary D. Foster,
23065 Paul Franklin,
23066 Guy Geens,
23067 Arne Georg Gleditsch,
23068 David S. Goldberg,
23069 Michelangelo Grigni,
23070 Dale Hagglund,
23071 D. Hall,
23072 Magnus Hammerin,
23073 Kenichi Handa, @c Handa
23074 Raja R. Harinath,
23075 Yoshiki Hayashi, @c ?
23076 P. E. Jareth Hein,
23077 Hisashige Kenji, @c Hisashige
23078 Scott Hofmann,
23079 Marc Horowitz,
23080 Gunnar Horrigmo,
23081 Richard Hoskins,
23082 Brad Howes,
23083 Miguel de Icaza,
23084 François Felix Ingrand,
23085 Tatsuya Ichikawa, @c ?
23086 Ishikawa Ichiro, @c Ishikawa
23087 Lee Iverson,
23088 Iwamuro Motonori, @c Iwamuro
23089 Rajappa Iyer,
23090 Andreas Jaeger,
23091 Adam P. Jenkins,
23092 Randell Jesup,
23093 Fred Johansen,
23094 Gareth Jones,
23095 Simon Josefsson,
23096 Greg Klanderman,
23097 Karl Kleinpaste,
23098 Michael Klingbeil,
23099 Peter Skov Knudsen,
23100 Shuhei Kobayashi, @c Kobayashi
23101 Petr Konecny,
23102 Koseki Yoshinori, @c Koseki
23103 Thor Kristoffersen,
23104 Jens Lautenbacher,
23105 Martin Larose,
23106 Seokchan Lee, @c Lee
23107 Joerg Lenneis,
23108 Carsten Leonhardt,
23109 James LewisMoss,
23110 Christian Limpach,
23111 Markus Linnala,
23112 Dave Love,
23113 Mike McEwan,
23114 Tonny Madsen,
23115 Shlomo Mahlab,
23116 Nat Makarevitch,
23117 Istvan Marko,
23118 David Martin,
23119 Jason R. Mastaler,
23120 Gordon Matzigkeit,
23121 Timo Metzemakers,
23122 Richard Mlynarik,
23123 Lantz Moore,
23124 Morioka Tomohiko, @c Morioka
23125 Erik Toubro Nielsen,
23126 Hrvoje Niksic,
23127 Andy Norman,
23128 Fred Oberhauser,
23129 C. R. Oldham,
23130 Alexandre Oliva,
23131 Ken Olstad,
23132 Masaharu Onishi, @c Onishi
23133 Hideki Ono, @c Ono
23134 Ettore Perazzoli,
23135 William Perry,
23136 Stephen Peters,
23137 Jens-Ulrik Holger Petersen,
23138 Ulrich Pfeifer,
23139 Matt Pharr,
23140 Andy Piper,
23141 John McClary Prevost,
23142 Bill Pringlemeir,
23143 Mike Pullen,
23144 Jim Radford,
23145 Colin Rafferty,
23146 Lasse Rasinen,
23147 Lars Balker Rasmussen,
23148 Joe Reiss,
23149 Renaud Rioboo,
23150 Roland B. Roberts,
23151 Bart Robinson,
23152 Christian von Roques,
23153 Markus Rost,
23154 Jason Rumney,
23155 Wolfgang Rupprecht,
23156 Jay Sachs,
23157 Dewey M. Sasser,
23158 Conrad Sauerwald,
23159 Loren Schall,
23160 Dan Schmidt,
23161 Ralph Schleicher,
23162 Philippe Schnoebelen,
23163 Andreas Schwab,
23164 Randal L. Schwartz,
23165 Danny Siu,
23166 Matt Simmons,
23167 Paul D. Smith,
23168 Jeff Sparkes,
23169 Toby Speight,
23170 Michael Sperber,
23171 Darren Stalder,
23172 Richard Stallman,
23173 Greg Stark,
23174 Sam Steingold,
23175 Paul Stevenson,
23176 Jonas Steverud,
23177 Paul Stodghill,
23178 Kiyokazu Suto, @c Suto
23179 Kurt Swanson,
23180 Samuel Tardieu,
23181 Teddy,
23182 Chuck Thompson,
23183 Tozawa Akihiko, @c Tozawa
23184 Philippe Troin,
23185 James Troup,
23186 Trung Tran-Duc,
23187 Jack Twilley,
23188 Aaron M. Ucko,
23189 Aki Vehtari,
23190 Didier Verna,
23191 Vladimir Volovich,
23192 Jan Vroonhof,
23193 Stefan Waldherr,
23194 Pete Ware,
23195 Barry A. Warsaw,
23196 Christoph Wedler,
23197 Joe Wells,
23198 Lee Willis,
23199 Katsumi Yamaoka @c Yamaoka
23200 and
23201 Lloyd Zusman.
23202
23203
23204 For a full overview of what each person has done, the ChangeLogs
23205 included in the Gnus alpha distributions should give ample reading
23206 (550kB and counting).
23207
23208 Apologies to everybody that I've forgotten, of which there are many, I'm
23209 sure.
23210
23211 Gee, that's quite a list of people.  I guess that must mean that there
23212 actually are people who are using Gnus.  Who'd'a thunk it!
23213
23214
23215 @node New Features
23216 @subsection New Features
23217 @cindex new features
23218
23219 @menu
23220 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
23221 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
23222 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
23223 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
23224 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
23225 @end menu
23226
23227 These lists are, of course, just @emph{short} overviews of the
23228 @emph{most} important new features.  No, really.  There are tons more.
23229 Yes, we have feeping creaturism in full effect.
23230
23231 @node ding Gnus
23232 @subsubsection (ding) Gnus
23233
23234 New features in Gnus 5.0/5.1:
23235
23236 @itemize @bullet
23237
23238 @item
23239 The look of all buffers can be changed by setting format-like variables
23240 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
23241
23242 @item
23243 Local spool and several @sc{nntp} servers can be used at once
23244 (@pxref{Select Methods}).
23245
23246 @item
23247 You can combine groups into virtual groups (@pxref{Virtual Groups}).
23248
23249 @item
23250 You can read a number of different mail formats (@pxref{Getting Mail}).
23251 All the mail back ends implement a convenient mail expiry scheme
23252 (@pxref{Expiring Mail}).
23253
23254 @item
23255 Gnus can use various strategies for gathering threads that have lost
23256 their roots (thereby gathering loose sub-threads into one thread) or it
23257 can go back and retrieve enough headers to build a complete thread
23258 (@pxref{Customizing Threading}).
23259
23260 @item
23261 Killed groups can be displayed in the group buffer, and you can read
23262 them as well (@pxref{Listing Groups}).
23263
23264 @item
23265 Gnus can do partial group updates---you do not have to retrieve the
23266 entire active file just to check for new articles in a few groups
23267 (@pxref{The Active File}).
23268
23269 @item
23270 Gnus implements a sliding scale of subscribedness to groups
23271 (@pxref{Group Levels}).
23272
23273 @item
23274 You can score articles according to any number of criteria
23275 (@pxref{Scoring}).  You can even get Gnus to find out how to score
23276 articles for you (@pxref{Adaptive Scoring}).
23277
23278 @item
23279 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
23280 manner, so it should be difficult to lose much data on what you have
23281 read if your machine should go down (@pxref{Auto Save}).
23282
23283 @item
23284 Gnus now has its own startup file (@file{.gnus.el}) to avoid cluttering up
23285 the @file{.emacs} file.
23286
23287 @item
23288 You can set the process mark on both groups and articles and perform
23289 operations on all the marked items (@pxref{Process/Prefix}).
23290
23291 @item
23292 You can grep through a subset of groups and create a group from the
23293 results (@pxref{Kibozed Groups}).
23294
23295 @item
23296 You can list subsets of groups according to, well, anything
23297 (@pxref{Listing Groups}).
23298
23299 @item
23300 You can browse foreign servers and subscribe to groups from those
23301 servers (@pxref{Browse Foreign Server}).
23302
23303 @item
23304 Gnus can fetch articles, asynchronously, on a second connection to the
23305 server (@pxref{Asynchronous Fetching}).
23306
23307 @item
23308 You can cache articles locally (@pxref{Article Caching}).
23309
23310 @item
23311 The uudecode functions have been expanded and generalized
23312 (@pxref{Decoding Articles}).
23313
23314 @item
23315 You can still post uuencoded articles, which was a little-known feature
23316 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
23317
23318 @item
23319 Fetching parents (and other articles) now actually works without
23320 glitches (@pxref{Finding the Parent}).
23321
23322 @item
23323 Gnus can fetch FAQs and group descriptions (@pxref{Group Information}).
23324
23325 @item
23326 Digests (and other files) can be used as the basis for groups
23327 (@pxref{Document Groups}).
23328
23329 @item
23330 Articles can be highlighted and customized (@pxref{Customizing
23331 Articles}).
23332
23333 @item
23334 URLs and other external references can be buttonized (@pxref{Article
23335 Buttons}).
23336
23337 @item
23338 You can do lots of strange stuff with the Gnus window & frame
23339 configuration (@pxref{Window Layout}).
23340
23341 @item
23342 You can click on buttons instead of using the keyboard
23343 (@pxref{Buttons}).
23344
23345 @end itemize
23346
23347
23348 @node September Gnus
23349 @subsubsection September Gnus
23350
23351 @iftex
23352 @iflatex
23353 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
23354 @end iflatex
23355 @end iftex
23356
23357 New features in Gnus 5.2/5.3:
23358
23359 @itemize @bullet
23360
23361 @item
23362 A new message composition mode is used.  All old customization variables
23363 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
23364 now obsolete.
23365
23366 @item
23367 Gnus is now able to generate @dfn{sparse} threads---threads where
23368 missing articles are represented by empty nodes (@pxref{Customizing
23369 Threading}).
23370
23371 @lisp
23372 (setq gnus-build-sparse-threads 'some)
23373 @end lisp
23374
23375 @item
23376 Outgoing articles are stored on a special archive server
23377 (@pxref{Archived Messages}).
23378
23379 @item
23380 Partial thread regeneration now happens when articles are
23381 referred.
23382
23383 @item
23384 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
23385
23386 @item
23387 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
23388
23389 @item
23390 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
23391
23392 @lisp
23393 (setq gnus-use-trees t)
23394 @end lisp
23395
23396 @item
23397 An @code{nn}-like pick-and-read minor mode is available for the summary
23398 buffers (@pxref{Pick and Read}).
23399
23400 @lisp
23401 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
23402 @end lisp
23403
23404 @item
23405 In binary groups you can use a special binary minor mode (@pxref{Binary
23406 Groups}).
23407
23408 @item
23409 Groups can be grouped in a folding topic hierarchy (@pxref{Group
23410 Topics}).
23411
23412 @lisp
23413 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
23414 @end lisp
23415
23416 @item
23417 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
23418
23419 @item
23420 Groups can now have a score, and bubbling based on entry frequency
23421 is possible (@pxref{Group Score}).
23422
23423 @lisp
23424 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
23425 @end lisp
23426
23427 @item
23428 Groups can be process-marked, and commands can be performed on
23429 groups of groups (@pxref{Marking Groups}).
23430
23431 @item
23432 Caching is possible in virtual groups.
23433
23434 @item
23435 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
23436 news batches, ClariNet briefs collections, and just about everything
23437 else (@pxref{Document Groups}).
23438
23439 @item
23440 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
23441 (@pxref{SOUP}).
23442
23443 @item
23444 The Gnus cache is much faster.
23445
23446 @item
23447 Groups can be sorted according to many criteria (@pxref{Sorting
23448 Groups}).
23449
23450 @item
23451 New group parameters have been introduced to set list-addresses and
23452 expiry times (@pxref{Group Parameters}).
23453
23454 @item
23455 All formatting specs allow specifying faces to be used
23456 (@pxref{Formatting Fonts}).
23457
23458 @item
23459 There are several more commands for setting/removing/acting on process
23460 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
23461
23462 @item
23463 The summary buffer can be limited to show parts of the available
23464 articles based on a wide range of criteria.  These commands have been
23465 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
23466
23467 @item
23468 Articles can be made persistent with the @kbd{*} command
23469 (@pxref{Persistent Articles}).
23470
23471 @item
23472 All functions for hiding article elements are now toggles.
23473
23474 @item
23475 Article headers can be buttonized (@pxref{Article Washing}).
23476
23477 @item
23478 All mail back ends support fetching articles by @code{Message-ID}.
23479
23480 @item
23481 Duplicate mail can now be treated properly (@pxref{Duplicates}).
23482
23483 @item
23484 All summary mode commands are available directly from the article
23485 buffer (@pxref{Article Keymap}).
23486
23487 @item
23488 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
23489 Layout}).
23490
23491 @item
23492 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
23493 @iftex
23494 @iflatex
23495 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
23496 @end iflatex
23497 @end iftex
23498
23499 @item
23500 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
23501
23502 @lisp
23503 (setq gnus-use-nocem t)
23504 @end lisp
23505
23506 @item
23507 Groups can be made permanently visible (@pxref{Listing Groups}).
23508
23509 @lisp
23510 (setq gnus-permanently-visible-groups "^nnml:")
23511 @end lisp
23512
23513 @item
23514 Many new hooks have been introduced to make customizing easier.
23515
23516 @item
23517 Gnus respects the @code{Mail-Copies-To} header.
23518
23519 @item
23520 Threads can be gathered by looking at the @code{References} header
23521 (@pxref{Customizing Threading}).
23522
23523 @lisp
23524 (setq gnus-summary-thread-gathering-function
23525       'gnus-gather-threads-by-references)
23526 @end lisp
23527
23528 @item
23529 Read articles can be stored in a special backlog buffer to avoid
23530 refetching (@pxref{Article Backlog}).
23531
23532 @lisp
23533 (setq gnus-keep-backlog 50)
23534 @end lisp
23535
23536 @item
23537 A clean copy of the current article is always stored in a separate
23538 buffer to allow easier treatment.
23539
23540 @item
23541 Gnus can suggest where to save articles (@pxref{Saving Articles}).
23542
23543 @item
23544 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
23545 Articles}).
23546
23547 @lisp
23548 (setq gnus-prompt-before-saving t)
23549 @end lisp
23550
23551 @item
23552 @code{gnus-uu} can view decoded files asynchronously while fetching
23553 articles (@pxref{Other Decode Variables}).
23554
23555 @lisp
23556 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
23557 @end lisp
23558
23559 @item
23560 Filling in the article buffer now works properly on cited text
23561 (@pxref{Article Washing}).
23562
23563 @item
23564 Hiding cited text adds buttons to toggle hiding, and how much
23565 cited text to hide is now customizable (@pxref{Article Hiding}).
23566
23567 @lisp
23568 (setq gnus-cited-lines-visible 2)
23569 @end lisp
23570
23571 @item
23572 Boring headers can be hidden (@pxref{Article Hiding}).
23573
23574 @item
23575 Default scoring values can now be set from the menu bar.
23576
23577 @item
23578 Further syntax checking of outgoing articles have been added.
23579
23580 @end itemize
23581
23582
23583 @node Red Gnus
23584 @subsubsection Red Gnus
23585
23586 New features in Gnus 5.4/5.5:
23587
23588 @iftex
23589 @iflatex
23590 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
23591 @end iflatex
23592 @end iftex
23593
23594 @itemize @bullet
23595
23596 @item
23597 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
23598
23599 @item
23600 Article prefetching functionality has been moved up into
23601 Gnus (@pxref{Asynchronous Fetching}).
23602
23603 @item
23604 Scoring can now be performed with logical operators like @code{and},
23605 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
23606 Scoring}).
23607
23608 @item
23609 Article washing status can be displayed in the
23610 article mode line (@pxref{Misc Article}).
23611
23612 @item
23613 @file{gnus.el} has been split into many smaller files.
23614
23615 @item
23616 Suppression of duplicate articles based on Message-ID can be done
23617 (@pxref{Duplicate Suppression}).
23618
23619 @lisp
23620 (setq gnus-suppress-duplicates t)
23621 @end lisp
23622
23623 @item
23624 New variables for specifying what score and adapt files are to be
23625 considered home score and adapt files (@pxref{Home Score File}) have
23626 been added.
23627
23628 @item
23629 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
23630 Server Internals}).
23631
23632 @item
23633 Groups can inherit group parameters from parent topics (@pxref{Topic
23634 Parameters}).
23635
23636 @item
23637 Article editing has been revamped and is now actually usable.
23638
23639 @item
23640 Signatures can be recognized in more intelligent fashions
23641 (@pxref{Article Signature}).
23642
23643 @item
23644 Summary pick mode has been made to look more @code{nn}-like.  Line
23645 numbers are displayed and the @kbd{.} command can be used to pick
23646 articles (@code{Pick and Read}).
23647
23648 @item
23649 Commands for moving the @file{.newsrc.eld} from one server to
23650 another have been added (@pxref{Changing Servers}).
23651
23652 @item
23653 There's a way now to specify that ``uninteresting'' fields be suppressed
23654 when generating lines in buffers (@pxref{Advanced Formatting}).
23655
23656 @item
23657 Several commands in the group buffer can be undone with @kbd{C-M-_}
23658 (@pxref{Undo}).
23659
23660 @item
23661 Scoring can be done on words using the new score type @code{w}
23662 (@pxref{Score File Format}).
23663
23664 @item
23665 Adaptive scoring can be done on a Subject word-by-word basis
23666 (@pxref{Adaptive Scoring}).
23667
23668 @lisp
23669 (setq gnus-use-adaptive-scoring '(word))
23670 @end lisp
23671
23672 @item
23673 Scores can be decayed (@pxref{Score Decays}).
23674
23675 @lisp
23676 (setq gnus-decay-scores t)
23677 @end lisp
23678
23679 @item
23680 Scoring can be performed using a regexp on the Date header.  The Date is
23681 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
23682
23683 @item
23684 A new command has been added to remove all data on articles from
23685 the native server (@pxref{Changing Servers}).
23686
23687 @item
23688 A new command for reading collections of documents
23689 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
23690 (@pxref{Really Various Summary Commands}).
23691
23692 @item
23693 Process mark sets can be pushed and popped (@pxref{Setting Process
23694 Marks}).
23695
23696 @item
23697 A new mail-to-news back end makes it possible to post even when the @sc{nntp}
23698 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
23699
23700 @item
23701 A new back end for reading searches from Web search engines
23702 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
23703 (@pxref{Web Searches}).
23704
23705 @item
23706 Groups inside topics can now be sorted using the standard sorting
23707 functions, and each topic can be sorted independently (@pxref{Topic
23708 Sorting}).
23709
23710 @item
23711 Subsets of the groups can be sorted independently (@code{Sorting
23712 Groups}).
23713
23714 @item
23715 Cached articles can be pulled into the groups (@pxref{Summary Generation
23716 Commands}).
23717 @iftex
23718 @iflatex
23719 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
23720 @end iflatex
23721 @end iftex
23722
23723 @item
23724 Score files are now applied in a more reliable order (@pxref{Score
23725 Variables}).
23726
23727 @item
23728 Reports on where mail messages end up can be generated (@pxref{Splitting
23729 Mail}).
23730
23731 @item
23732 More hooks and functions have been added to remove junk from incoming
23733 mail before saving the mail (@pxref{Washing Mail}).
23734
23735 @item
23736 Emphasized text can be properly fontisized:
23737
23738 @end itemize
23739
23740
23741 @node Quassia Gnus
23742 @subsubsection Quassia Gnus
23743
23744 New features in Gnus 5.6:
23745
23746 @itemize @bullet
23747
23748 @item
23749 New functionality for using Gnus as an offline newsreader has been
23750 added.  A plethora of new commands and modes have been added.  See
23751 @pxref{Gnus Unplugged} for the full story.
23752
23753 @item
23754  The @code{nndraft} back end has returned, but works differently than
23755 before.  All Message buffers are now also articles in the @code{nndraft}
23756 group, which is created automatically.
23757
23758 @item
23759 @code{gnus-alter-header-function} can now be used to alter header
23760 values.
23761
23762 @item
23763  @code{gnus-summary-goto-article} now accept Message-ID's.
23764
23765 @item
23766  A new Message command for deleting text in the body of a message
23767 outside the region: @kbd{C-c C-v}.
23768
23769 @item
23770  You can now post to component group in @code{nnvirtual} groups with
23771 @kbd{C-u C-c C-c}.
23772
23773 @item
23774  @code{nntp-rlogin-program}---new variable to ease customization.
23775
23776 @item
23777  @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
23778 re-highlighting of the article buffer.
23779
23780 @item
23781  New element in @code{gnus-boring-article-headers}---@code{long-to}.
23782
23783 @item
23784  @kbd{M-i} symbolic prefix command.  See the section "Symbolic
23785 Prefixes" in the Gnus manual for details.
23786
23787 @item
23788  @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
23789 @kbd{a} to add the score rule to the "all.SCORE" file.
23790
23791 @item
23792  @code{gnus-simplify-subject-functions} variable to allow greater
23793 control over simplification.
23794
23795 @item
23796  @kbd{A T}---new command for fetching the current thread.
23797
23798 @item
23799  @kbd{/ T}---new command for including the current thread in the
23800 limit.
23801
23802 @item
23803  @kbd{M-RET} is a new Message command for breaking cited text.
23804
23805 @item
23806  @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
23807
23808 @item
23809  The @code{custom-face-lookup} function has been removed.
23810 If you used this function in your initialization files, you must
23811 rewrite them to use @code{face-spec-set} instead.
23812
23813 @item
23814  Canceling now uses the current select method.  Symbolic prefix
23815 @kbd{a} forces normal posting method.
23816
23817 @item
23818  New command to translate M******** sm*rtq**t*s into proper
23819 text---@kbd{W d}.
23820
23821 @item
23822  For easier debugging of @code{nntp}, you can set
23823 @code{nntp-record-commands} to a non-@code{nil} value.
23824
23825 @item
23826  @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
23827 controlling where and how to send @sc{authinfo} to @sc{nntp} servers.
23828
23829 @item
23830  A command for editing group parameters from the summary buffer
23831 has been added.
23832
23833 @item
23834  A history of where mails have been split is available.
23835
23836 @item
23837  A new article date command has been added---@code{article-date-iso8601}.
23838
23839 @item
23840  Subjects can be simplified when threading by setting
23841 @code{gnus-score-thread-simplify}.
23842
23843 @item
23844  A new function for citing in Message has been
23845 added---@code{message-cite-original-without-signature}.
23846
23847 @item
23848  @code{article-strip-all-blank-lines}---new article command.
23849
23850 @item
23851  A new Message command to kill to the end of the article has
23852 been added.
23853
23854 @item
23855  A minimum adaptive score can be specified by using the
23856 @code{gnus-adaptive-word-minimum} variable.
23857
23858 @item
23859  The "lapsed date" article header can be kept continually
23860 updated by the @code{gnus-start-date-timer} command.
23861
23862 @item
23863  Web listserv archives can be read with the @code{nnlistserv} back end.
23864
23865 @item
23866  Old dejanews archives can now be read by @code{nnweb}.
23867
23868 @end itemize
23869
23870 @node Pterodactyl Gnus
23871 @subsubsection Pterodactyl Gnus
23872
23873 New features in Gnus 5.8:
23874
23875 @itemize @bullet
23876
23877 @item
23878 The mail-fetching functions have changed.  See the manual for the
23879 many details.  In particular, all procmail fetching variables are gone.
23880
23881 If you used procmail like in
23882
23883 @lisp
23884 (setq nnmail-use-procmail t)
23885 (setq nnmail-spool-file 'procmail)
23886 (setq nnmail-procmail-directory "~/mail/incoming/")
23887 (setq nnmail-procmail-suffix "\\.in")
23888 @end lisp
23889
23890 this now has changed to
23891
23892 @lisp
23893 (setq mail-sources
23894       '((directory :path "~/mail/incoming/"
23895                    :suffix ".in")))
23896 @end lisp
23897
23898 More information is available in the info doc at Select Methods ->
23899 Getting Mail -> Mail Sources
23900
23901 @item
23902 Gnus is now a @sc{mime}-capable reader.  This affects many parts of
23903 Gnus, and adds a slew of new commands.  See the manual for details.
23904
23905 @item
23906 Gnus has also been multilingualized.  This also affects too
23907 many parts of Gnus to summarize here, and adds many new variables.
23908
23909 @item
23910 @code{gnus-auto-select-first} can now be a function to be
23911 called to position point.
23912
23913 @item
23914 The user can now decide which extra headers should be included in
23915 summary buffers and @sc{nov} files.
23916
23917 @item
23918 @code{gnus-article-display-hook} has been removed.  Instead, a number
23919 of variables starting with @code{gnus-treat-} have been added.
23920
23921 @item
23922 The Gnus posting styles have been redone again and now works in a
23923 subtly different manner.
23924
23925 @item
23926 New web-based back ends have been added: @code{nnslashdot},
23927 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
23928 again, to keep up with ever-changing layouts.
23929
23930 @item
23931 Gnus can now read @sc{imap} mail via @code{nnimap}.
23932
23933 @end itemize
23934
23935 @iftex
23936
23937 @page
23938 @node The Manual
23939 @section The Manual
23940 @cindex colophon
23941 @cindex manual
23942
23943 This manual was generated from a TeXinfo file and then run through
23944 either @code{texi2dvi}
23945 @iflatex
23946 or my own home-brewed TeXinfo to \LaTeX\ transformer,
23947 and then run through @code{latex} and @code{dvips}
23948 @end iflatex
23949 to get what you hold in your hands now.
23950
23951 The following conventions have been used:
23952
23953 @enumerate
23954
23955 @item
23956 This is a @samp{string}
23957
23958 @item
23959 This is a @kbd{keystroke}
23960
23961 @item
23962 This is a @file{file}
23963
23964 @item
23965 This is a @code{symbol}
23966
23967 @end enumerate
23968
23969 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
23970 mean:
23971
23972 @lisp
23973 (setq flargnoze "yes")
23974 @end lisp
23975
23976 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
23977
23978 @lisp
23979 (setq flumphel 'yes)
23980 @end lisp
23981
23982 @samp{yes} and @code{yes} are two @emph{very} different things---don't
23983 ever get them confused.
23984
23985 @iflatex
23986 @c @head
23987 Of course, everything in this manual is of vital interest, so you should
23988 read it all.  Several times.  However, if you feel like skimming the
23989 manual, look for that gnu head you should see in the margin over
23990 there---it means that what's being discussed is of more importance than
23991 the rest of the stuff.  (On the other hand, if everything is infinitely
23992 important, how can anything be more important than that?  Just one more
23993 of the mysteries of this world, I guess.)
23994 @end iflatex
23995
23996 @end iftex
23997
23998
23999 @node On Writing Manuals
24000 @section On Writing Manuals
24001
24002 I guess most manuals are written after-the-fact; documenting a program
24003 that's already there.  This is not how this manual is written.  When
24004 implementing something, I write the manual entry for that something
24005 straight away.  I then see that it's difficult to explain the
24006 functionality, so I write how it's supposed to be, and then I change the
24007 implementation.  Writing the documentation and writing the code goes
24008 hand in hand.
24009
24010 This, of course, means that this manual has no, or little, flow.  It
24011 documents absolutely everything in Gnus, but often not where you're
24012 looking for it.  It is a reference manual, and not a guide to how to get
24013 started with Gnus.
24014
24015 That would be a totally different book, that should be written using the
24016 reference manual as source material.  It would look quite differently.
24017
24018
24019 @page
24020 @node Terminology
24021 @section Terminology
24022
24023 @cindex terminology
24024 @table @dfn
24025
24026 @item news
24027 @cindex news
24028 This is what you are supposed to use this thing for---reading news.
24029 News is generally fetched from a nearby @sc{nntp} server, and is
24030 generally publicly available to everybody.  If you post news, the entire
24031 world is likely to read just what you have written, and they'll all
24032 snigger mischievously.  Behind your back.
24033
24034 @item mail
24035 @cindex mail
24036 Everything that's delivered to you personally is mail.  Some news/mail
24037 readers (like Gnus) blur the distinction between mail and news, but
24038 there is a difference.  Mail is private.  News is public.  Mailing is
24039 not posting, and replying is not following up.
24040
24041 @item reply
24042 @cindex reply
24043 Send a mail to the person who has written what you are reading.
24044
24045 @item follow up
24046 @cindex follow up
24047 Post an article to the current newsgroup responding to the article you
24048 are reading.
24049
24050 @item back end
24051 @cindex back end
24052 Gnus considers mail and news to be mostly the same, really.  The only
24053 difference is how to access the actual articles.  News articles are
24054 commonly fetched via the protocol NNTP, whereas mail messages could be
24055 read from a file on the local disk.  The internal architecture of Gnus
24056 thus comprises a `front end' and a number of `back ends'.  Internally,
24057 when you enter a group (by hitting @key{RET}, say), you thereby invoke
24058 a function in the front end in Gnus.  The front end then `talks' to a
24059 back end and says things like ``Give me the list of articles in the foo
24060 group'' or ``Show me article number 4711''.
24061
24062 So a back end mainly defines either a protocol (the @code{nntp} back end
24063 accesses news via NNTP, the @code{nnimap} back end accesses mail via
24064 IMAP) or a file format and directory layout (the @code{nnspool} back end
24065 accesses news via the common `spool directory' format, the @code{nnml}
24066 back end access mail via a file format and directory layout that's
24067 quite similar).
24068
24069 Gnus does not handle the underlying media, so to speak---this is all
24070 done by the back ends.  A back end is a collection of functions to
24071 access the articles.
24072
24073 However, sometimes the term `back end' is also used where `server'
24074 would have been more appropriate.  And then there is the term `select
24075 method' which can mean either.  The Gnus terminology can be quite
24076 confusing.
24077
24078 @item native
24079 @cindex native
24080 Gnus will always use one method (and back end) as the @dfn{native}, or
24081 default, way of getting news.
24082
24083 @item foreign
24084 @cindex foreign
24085 You can also have any number of foreign groups active at the same time.
24086 These are groups that use non-native non-secondary back ends for getting
24087 news.
24088
24089 @item secondary
24090 @cindex secondary
24091 Secondary back ends are somewhere half-way between being native and being
24092 foreign, but they mostly act like they are native.
24093
24094 @item article
24095 @cindex article
24096 A message that has been posted as news.
24097
24098 @item mail message
24099 @cindex mail message
24100 A message that has been mailed.
24101
24102 @item message
24103 @cindex message
24104 A mail message or news article
24105
24106 @item head
24107 @cindex head
24108 The top part of a message, where administrative information (etc.) is
24109 put.
24110
24111 @item body
24112 @cindex body
24113 The rest of an article.  Everything not in the head is in the
24114 body.
24115
24116 @item header
24117 @cindex header
24118 A line from the head of an article.
24119
24120 @item headers
24121 @cindex headers
24122 A collection of such lines, or a collection of heads.  Or even a
24123 collection of @sc{nov} lines.
24124
24125 @item @sc{nov}
24126 @cindex nov
24127 When Gnus enters a group, it asks the back end for the headers of all
24128 unread articles in the group.  Most servers support the News OverView
24129 format, which is more compact and much faster to read and parse than the
24130 normal @sc{head} format.
24131
24132 @item level
24133 @cindex levels
24134 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
24135 that have a lower level are ``more'' subscribed than the groups with a
24136 higher level.  In fact, groups on levels 1-5 are considered
24137 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
24138 are @dfn{killed}.  Commands for listing groups and scanning for new
24139 articles will all use the numeric prefix as @dfn{working level}.
24140
24141 @item killed groups
24142 @cindex killed groups
24143 No information on killed groups is stored or updated, which makes killed
24144 groups much easier to handle than subscribed groups.
24145
24146 @item zombie groups
24147 @cindex zombie groups
24148 Just like killed groups, only slightly less dead.
24149
24150 @item active file
24151 @cindex active file
24152 The news server has to keep track of what articles it carries, and what
24153 groups exist.  All this information in stored in the active file, which
24154 is rather large, as you might surmise.
24155
24156 @item bogus groups
24157 @cindex bogus groups
24158 A group that exists in the @file{.newsrc} file, but isn't known to the
24159 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
24160 This means that the group probably doesn't exist (any more).
24161
24162 @item activating
24163 @cindex activating groups
24164 The act of asking the server for info on a group and computing the
24165 number of unread articles is called @dfn{activating the group}.
24166 Un-activated groups are listed with @samp{*} in the group buffer.
24167
24168 @item server
24169 @cindex server
24170 A machine one can connect to and get news (or mail) from.
24171
24172 @item select method
24173 @cindex select method
24174 A structure that specifies the back end, the server and the virtual
24175 server settings.
24176
24177 @item virtual server
24178 @cindex virtual server
24179 A named select method.  Since a select method defines all there is to
24180 know about connecting to a (physical) server, taking the thing as a
24181 whole is a virtual server.
24182
24183 @item washing
24184 @cindex washing
24185 Taking a buffer and running it through a filter of some sort.  The
24186 result will (more often than not) be cleaner and more pleasing than the
24187 original.
24188
24189 @item ephemeral groups
24190 @cindex ephemeral groups
24191 Most groups store data on what articles you have read.  @dfn{Ephemeral}
24192 groups are groups that will have no data stored---when you exit the
24193 group, it'll disappear into the aether.
24194
24195 @item solid groups
24196 @cindex solid groups
24197 This is the opposite of ephemeral groups.  All groups listed in the
24198 group buffer are solid groups.
24199
24200 @item sparse articles
24201 @cindex sparse articles
24202 These are article placeholders shown in the summary buffer when
24203 @code{gnus-build-sparse-threads} has been switched on.
24204
24205 @item threading
24206 @cindex threading
24207 To put responses to articles directly after the articles they respond
24208 to---in a hierarchical fashion.
24209
24210 @item root
24211 @cindex root
24212 @cindex thread root
24213 The first article in a thread is the root.  It is the ancestor of all
24214 articles in the thread.
24215
24216 @item parent
24217 @cindex parent
24218 An article that has responses.
24219
24220 @item child
24221 @cindex child
24222 An article that responds to a different article---its parent.
24223
24224 @item digest
24225 @cindex digest
24226 A collection of messages in one file.  The most common digest format is
24227 specified by RFC 1153.
24228
24229 @end table
24230
24231
24232 @page
24233 @node Customization
24234 @section Customization
24235 @cindex general customization
24236
24237 All variables are properly documented elsewhere in this manual.  This
24238 section is designed to give general pointers on how to customize Gnus
24239 for some quite common situations.
24240
24241 @menu
24242 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
24243 * Slow Terminal Connection::    You run a remote Emacs.
24244 * Little Disk Space::           You feel that having large setup files is icky.
24245 * Slow Machine::                You feel like buying a faster machine.
24246 @end menu
24247
24248
24249 @node Slow/Expensive Connection
24250 @subsection Slow/Expensive NNTP Connection
24251
24252 If you run Emacs on a machine locally, and get your news from a machine
24253 over some very thin strings, you want to cut down on the amount of data
24254 Gnus has to get from the @sc{nntp} server.
24255
24256 @table @code
24257
24258 @item gnus-read-active-file
24259 Set this to @code{nil}, which will inhibit Gnus from requesting the
24260 entire active file from the server.  This file is often v.  large.  You
24261 also have to set @code{gnus-check-new-newsgroups} and
24262 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
24263 doesn't suddenly decide to fetch the active file anyway.
24264
24265 @item gnus-nov-is-evil
24266 This one has to be @code{nil}.  If not, grabbing article headers from
24267 the @sc{nntp} server will not be very fast.  Not all @sc{nntp} servers
24268 support @sc{xover}; Gnus will detect this by itself.
24269 @end table
24270
24271
24272 @node Slow Terminal Connection
24273 @subsection Slow Terminal Connection
24274
24275 Let's say you use your home computer for dialing up the system that runs
24276 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
24277 possible) the amount of data sent over the wires.
24278
24279 @table @code
24280
24281 @item gnus-auto-center-summary
24282 Set this to @code{nil} to inhibit Gnus from re-centering the summary
24283 buffer all the time.  If it is @code{vertical}, do only vertical
24284 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
24285 horizontal and vertical recentering.
24286
24287 @item gnus-visible-headers
24288 Cut down on the headers included in the articles to the
24289 minimum.  You can, in fact, make do without them altogether---most of the
24290 useful data is in the summary buffer, anyway.  Set this variable to
24291 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
24292
24293 Set this hook to all the available hiding commands:
24294 @lisp
24295 (setq gnus-treat-hide-headers 'head
24296       gnus-treat-hide-signature t
24297       gnus-treat-hide-citation t)
24298 @end lisp
24299
24300 @item gnus-use-full-window
24301 By setting this to @code{nil}, you can make all the windows smaller.
24302 While this doesn't really cut down much generally, it means that you
24303 have to see smaller portions of articles before deciding that you didn't
24304 want to read them anyway.
24305
24306 @item gnus-thread-hide-subtree
24307 If this is non-@code{nil}, all threads in the summary buffer will be
24308 hidden initially.
24309
24310
24311 @item gnus-updated-mode-lines
24312 If this is @code{nil}, Gnus will not put information in the buffer mode
24313 lines, which might save some time.
24314 @end table
24315
24316
24317 @node Little Disk Space
24318 @subsection Little Disk Space
24319 @cindex disk space
24320
24321 The startup files can get rather large, so you may want to cut their
24322 sizes a bit if you are running out of space.
24323
24324 @table @code
24325
24326 @item gnus-save-newsrc-file
24327 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
24328 only save @file{.newsrc.eld}.  This means that you will not be able to
24329 use any other newsreaders than Gnus.  This variable is @code{t} by
24330 default.
24331
24332 @item gnus-read-newsrc-file
24333 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
24334 only read @file{.newsrc.eld}.  This means that you will not be able to
24335 use any other newsreaders than Gnus.  This variable is @code{t} by
24336 default.
24337
24338 @item gnus-save-killed-list
24339 If this is @code{nil}, Gnus will not save the list of dead groups.  You
24340 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
24341 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
24342 variable to @code{nil}.  This variable is @code{t} by default.
24343
24344 @end table
24345
24346
24347 @node Slow Machine
24348 @subsection Slow Machine
24349 @cindex slow machine
24350
24351 If you have a slow machine, or are just really impatient, there are a
24352 few things you can do to make Gnus run faster.
24353
24354 Set @code{gnus-check-new-newsgroups} and
24355 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
24356
24357 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
24358 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
24359 summary buffer faster.
24360
24361
24362 @page
24363 @node Troubleshooting
24364 @section Troubleshooting
24365 @cindex troubleshooting
24366
24367 Gnus works @emph{so} well straight out of the box---I can't imagine any
24368 problems, really.
24369
24370 Ahem.
24371
24372 @enumerate
24373
24374 @item
24375 Make sure your computer is switched on.
24376
24377 @item
24378 Make sure that you really load the current Gnus version.  If you have
24379 been running @sc{gnus}, you need to exit Emacs and start it up again before
24380 Gnus will work.
24381
24382 @item
24383 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
24384 like @samp{Gnus v5.46; nntp 4.0} you have the right files loaded.  If,
24385 on the other hand, you get something like @samp{NNTP 3.x} or @samp{nntp
24386 flee}, you have some old @file{.el} files lying around.  Delete these.
24387
24388 @item
24389 Read the help group (@kbd{G h} in the group buffer) for a FAQ and a
24390 how-to.
24391
24392 @item
24393 @vindex max-lisp-eval-depth
24394 Gnus works on many recursive structures, and in some extreme (and very
24395 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
24396 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
24397 something like that.
24398 @end enumerate
24399
24400 If all else fails, report the problem as a bug.
24401
24402 @cindex bugs
24403 @cindex reporting bugs
24404
24405 @kindex M-x gnus-bug
24406 @findex gnus-bug
24407 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
24408 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
24409 me the backtrace.  I will fix bugs, but I can only fix them if you send
24410 me a precise description as to how to reproduce the bug.
24411
24412 You really can never be too detailed in a bug report.  Always use the
24413 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
24414 a 10Kb mail each time you use it, and even if you have sent me your
24415 environment 500 times before.  I don't care.  I want the full info each
24416 time.
24417
24418 It is also important to remember that I have no memory whatsoever.  If
24419 you send a bug report, and I send you a reply, and then you just send
24420 back ``No, it's not! Moron!'', I will have no idea what you are
24421 insulting me about.  Always over-explain everything.  It's much easier
24422 for all of us---if I don't have all the information I need, I will just
24423 mail you and ask for more info, and everything takes more time.
24424
24425 If the problem you're seeing is very visual, and you can't quite explain
24426 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
24427 it somewhere it can be reached, and include the URL of the picture in
24428 the bug report.
24429
24430 @cindex patches
24431 If you would like to contribute a patch to fix bugs or make
24432 improvements, please produce the patch using @samp{diff -u}.
24433
24434 @cindex edebug
24435 If you want to debug your problem further before reporting, possibly
24436 in order to solve the problem yourself and send a patch, you can use
24437 edebug.  Debugging lisp code is documented in the Elisp manual
24438 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
24439 Lisp Reference Manual}).  To get you started with edebug, consider if
24440 you discover some weird behaviour when pressing @kbd{c}, the first
24441 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
24442 the documentation buffer that leads you to the function definition,
24443 then press @kbd{M-x edebug-defun RET} with point inside that function,
24444 return to Gnus and press @kbd{c} to invoke the code.  You will be
24445 placed in the lisp buffer and can single step using @kbd{SPC} and
24446 evaluate expressions using @kbd{M-:} or inspect variables using
24447 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
24448 @kbd{c} or @kbd{g}.
24449
24450 @cindex elp
24451 @cindex profile
24452 @cindex slow
24453 Sometimes, a problem do not directly generate a elisp error but
24454 manifests itself by causing Gnus to be very slow.  In these cases, you
24455 can use @kbd{M-x toggle-debug-on-quit} and press C-j when things are
24456 slow, and then try to analyze the backtrace (repeating the procedure
24457 helps isolating the real problem areas).  A fancier approach is to use
24458 the elisp profiler, ELP.  The profiler is (or should be) fully
24459 documented elsewhere, but to get you started there are a few steps
24460 that need to be followed.  First, instrument the part of Gnus you are
24461 interested in for profiling, e.g. @kbd{M-x elp-instrument-package RET
24462 gnus} or @kbd{M-x elp-instrument-packagre RET message}.  Then perform
24463 the operation that is slow and press @kbd{M-x elp-results}.  You will
24464 then see which operations that takes time, and can debug them further.
24465 If the entire operation takes much longer than the time spent in the
24466 slowest function in the profiler output, you probably profiled the
24467 wrong part of Gnus.  To reset profiling statistics, use @kbd{M-x
24468 elp-reset-all}.  @kbd{M-x elp-restore-all} is supposed to remove
24469 profiling, but given the complexities and dynamic code generation in
24470 Gnus, it might not always work perfectly.
24471
24472 If you just need help, you are better off asking on
24473 @samp{gnu.emacs.gnus}.  I'm not very helpful.
24474
24475 @cindex gnu.emacs.gnus
24476 @cindex ding mailing list
24477 You can also ask on the ding mailing list---@samp{ding@@gnus.org}.
24478 Write to @samp{ding-request@@gnus.org} to subscribe.
24479
24480
24481 @page
24482 @node Gnus Reference Guide
24483 @section Gnus Reference Guide
24484
24485 It is my hope that other people will figure out smart stuff that Gnus
24486 can do, and that other people will write those smart things as well.  To
24487 facilitate that I thought it would be a good idea to describe the inner
24488 workings of Gnus.  And some of the not-so-inner workings, while I'm at
24489 it.
24490
24491 You can never expect the internals of a program not to change, but I
24492 will be defining (in some details) the interface between Gnus and its
24493 back ends (this is written in stone), the format of the score files
24494 (ditto), data structures (some are less likely to change than others)
24495 and general methods of operation.
24496
24497 @menu
24498 * Gnus Utility Functions::      Common functions and variable to use.
24499 * Back End Interface::          How Gnus communicates with the servers.
24500 * Score File Syntax::           A BNF definition of the score file standard.
24501 * Headers::                     How Gnus stores headers internally.
24502 * Ranges::                      A handy format for storing mucho numbers.
24503 * Group Info::                  The group info format.
24504 * Extended Interactive::        Symbolic prefixes and stuff.
24505 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
24506 * Various File Formats::        Formats of files that Gnus use.
24507 @end menu
24508
24509
24510 @node Gnus Utility Functions
24511 @subsection Gnus Utility Functions
24512 @cindex Gnus utility functions
24513 @cindex utility functions
24514 @cindex functions
24515 @cindex internal variables
24516
24517 When writing small functions to be run from hooks (and stuff), it's
24518 vital to have access to the Gnus internal functions and variables.
24519 Below is a list of the most common ones.
24520
24521 @table @code
24522
24523 @item gnus-newsgroup-name
24524 @vindex gnus-newsgroup-name
24525 This variable holds the name of the current newsgroup.
24526
24527 @item gnus-find-method-for-group
24528 @findex gnus-find-method-for-group
24529 A function that returns the select method for @var{group}.
24530
24531 @item gnus-group-real-name
24532 @findex gnus-group-real-name
24533 Takes a full (prefixed) Gnus group name, and returns the unprefixed
24534 name.
24535
24536 @item gnus-group-prefixed-name
24537 @findex gnus-group-prefixed-name
24538 Takes an unprefixed group name and a select method, and returns the full
24539 (prefixed) Gnus group name.
24540
24541 @item gnus-get-info
24542 @findex gnus-get-info
24543 Returns the group info list for @var{group}.
24544
24545 @item gnus-group-unread
24546 @findex gnus-group-unread
24547 The number of unread articles in @var{group}, or @code{t} if that is
24548 unknown.
24549
24550 @item gnus-active
24551 @findex gnus-active
24552 The active entry for @var{group}.
24553
24554 @item gnus-set-active
24555 @findex gnus-set-active
24556 Set the active entry for @var{group}.
24557
24558 @item gnus-add-current-to-buffer-list
24559 @findex gnus-add-current-to-buffer-list
24560 Adds the current buffer to the list of buffers to be killed on Gnus
24561 exit.
24562
24563 @item gnus-continuum-version
24564 @findex gnus-continuum-version
24565 Takes a Gnus version string as a parameter and returns a floating point
24566 number.  Earlier versions will always get a lower number than later
24567 versions.
24568
24569 @item gnus-group-read-only-p
24570 @findex gnus-group-read-only-p
24571 Says whether @var{group} is read-only or not.
24572
24573 @item gnus-news-group-p
24574 @findex gnus-news-group-p
24575 Says whether @var{group} came from a news back end.
24576
24577 @item gnus-ephemeral-group-p
24578 @findex gnus-ephemeral-group-p
24579 Says whether @var{group} is ephemeral or not.
24580
24581 @item gnus-server-to-method
24582 @findex gnus-server-to-method
24583 Returns the select method corresponding to @var{server}.
24584
24585 @item gnus-server-equal
24586 @findex gnus-server-equal
24587 Says whether two virtual servers are equal.
24588
24589 @item gnus-group-native-p
24590 @findex gnus-group-native-p
24591 Says whether @var{group} is native or not.
24592
24593 @item gnus-group-secondary-p
24594 @findex gnus-group-secondary-p
24595 Says whether @var{group} is secondary or not.
24596
24597 @item gnus-group-foreign-p
24598 @findex gnus-group-foreign-p
24599 Says whether @var{group} is foreign or not.
24600
24601 @item group-group-find-parameter
24602 @findex group-group-find-parameter
24603 Returns the parameter list of @var{group}.  If given a second parameter,
24604 returns the value of that parameter for @var{group}.
24605
24606 @item gnus-group-set-parameter
24607 @findex gnus-group-set-parameter
24608 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
24609
24610 @item gnus-narrow-to-body
24611 @findex gnus-narrow-to-body
24612 Narrows the current buffer to the body of the article.
24613
24614 @item gnus-check-backend-function
24615 @findex gnus-check-backend-function
24616 Takes two parameters, @var{function} and @var{group}.  If the back end
24617 @var{group} comes from supports @var{function}, return non-@code{nil}.
24618
24619 @lisp
24620 (gnus-check-backend-function "request-scan" "nnml:misc")
24621 @result{} t
24622 @end lisp
24623
24624 @item gnus-read-method
24625 @findex gnus-read-method
24626 Prompts the user for a select method.
24627
24628 @end table
24629
24630
24631 @node Back End Interface
24632 @subsection Back End Interface
24633
24634 Gnus doesn't know anything about @sc{nntp}, spools, mail or virtual
24635 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
24636 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
24637 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
24638 examples of the latter we have @code{nntp-port-number} and
24639 @code{nnmbox-directory}.
24640
24641 When Gnus asks for information from a back end---say @code{nntp}---on
24642 something, it will normally include a virtual server name in the
24643 function parameters.  (If not, the back end should use the ``current''
24644 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
24645 server as its only (optional) parameter.  If this virtual server hasn't
24646 been opened, the function should fail.
24647
24648 Note that a virtual server name has no relation to some physical server
24649 name.  Take this example:
24650
24651 @lisp
24652 (nntp "odd-one"
24653       (nntp-address "ifi.uio.no")
24654       (nntp-port-number 4324))
24655 @end lisp
24656
24657 Here the virtual server name is @samp{odd-one} while the name of
24658 the physical server is @samp{ifi.uio.no}.
24659
24660 The back ends should be able to switch between several virtual servers.
24661 The standard back ends implement this by keeping an alist of virtual
24662 server environments that they pull down/push up when needed.
24663
24664 There are two groups of interface functions: @dfn{required functions},
24665 which must be present, and @dfn{optional functions}, which Gnus will
24666 always check for presence before attempting to call 'em.
24667
24668 All these functions are expected to return data in the buffer
24669 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
24670 unfortunately named, but we'll have to live with it.  When I talk about
24671 @dfn{resulting data}, I always refer to the data in that buffer.  When I
24672 talk about @dfn{return value}, I talk about the function value returned by
24673 the function call.  Functions that fail should return @code{nil} as the
24674 return value.
24675
24676 Some back ends could be said to be @dfn{server-forming} back ends, and
24677 some might be said not to be.  The latter are back ends that generally
24678 only operate on one group at a time, and have no concept of ``server''
24679 -- they have a group, and they deliver info on that group and nothing
24680 more.
24681
24682 Gnus identifies each message by way of group name and article number.  A
24683 few remarks about these article numbers might be useful.  First of all,
24684 the numbers are positive integers.  Secondly, it is normally not
24685 possible for later articles to `re-use' older article numbers without
24686 confusing Gnus.  That is, if a group has ever contained a message
24687 numbered 42, then no other message may get that number, or Gnus will get
24688 mightily confused.@footnote{See the function
24689 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
24690 Third, article numbers must be assigned in order of arrival in the
24691 group; this is not necessarily the same as the date of the message.
24692
24693 The previous paragraph already mentions all the `hard' restrictions that
24694 article numbers must fulfill.  But it seems that it might be useful to
24695 assign @emph{consecutive} article numbers, for Gnus gets quite confused
24696 if there are holes in the article numbering sequence.  However, due to
24697 the `no-reuse' restriction, holes cannot be avoided altogether.  It's
24698 also useful for the article numbers to start at 1 to avoid running out
24699 of numbers as long as possible.
24700
24701 Note that by convention, backends are named @code{nnsomething}, but
24702 Gnus also comes with some @code{nnnotbackends}, such as
24703 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
24704
24705 In the examples and definitions I will refer to the imaginary back end
24706 @code{nnchoke}.
24707
24708 @cindex @code{nnchoke}
24709
24710 @menu
24711 * Required Back End Functions::  Functions that must be implemented.
24712 * Optional Back End Functions::  Functions that need not be implemented.
24713 * Error Messaging::             How to get messages and report errors.
24714 * Writing New Back Ends::       Extending old back ends.
24715 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
24716 * Mail-like Back Ends::         Some tips on mail back ends.
24717 @end menu
24718
24719
24720 @node Required Back End Functions
24721 @subsubsection Required Back End Functions
24722
24723 @table @code
24724
24725 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
24726
24727 @var{articles} is either a range of article numbers or a list of
24728 @code{Message-ID}s.  Current back ends do not fully support either---only
24729 sequences (lists) of article numbers, and most back ends do not support
24730 retrieval of @code{Message-ID}s.  But they should try for both.
24731
24732 The result data should either be HEADs or @sc{nov} lines, and the result
24733 value should either be @code{headers} or @code{nov} to reflect this.
24734 This might later be expanded to @code{various}, which will be a mixture
24735 of HEADs and @sc{nov} lines, but this is currently not supported by Gnus.
24736
24737 If @var{fetch-old} is non-@code{nil} it says to try fetching "extra
24738 headers", in some meaning of the word.  This is generally done by
24739 fetching (at most) @var{fetch-old} extra headers less than the smallest
24740 article number in @code{articles}, and filling the gaps as well.  The
24741 presence of this parameter can be ignored if the back end finds it
24742 cumbersome to follow the request.  If this is non-@code{nil} and not a
24743 number, do maximum fetches.
24744
24745 Here's an example HEAD:
24746
24747 @example
24748 221 1056 Article retrieved.
24749 Path: ifi.uio.no!sturles
24750 From: sturles@@ifi.uio.no (Sturle Sunde)
24751 Newsgroups: ifi.discussion
24752 Subject: Re: Something very droll
24753 Date: 27 Oct 1994 14:02:57 +0100
24754 Organization: Dept. of Informatics, University of Oslo, Norway
24755 Lines: 26
24756 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
24757 References: <38jdmq$4qu@@visbur.ifi.uio.no>
24758 NNTP-Posting-Host: holmenkollen.ifi.uio.no
24759 .
24760 @end example
24761
24762 So a @code{headers} return value would imply that there's a number of
24763 these in the data buffer.
24764
24765 Here's a BNF definition of such a buffer:
24766
24767 @example
24768 headers        = *head
24769 head           = error / valid-head
24770 error-message  = [ "4" / "5" ] 2number " " <error message> eol
24771 valid-head     = valid-message *header "." eol
24772 valid-message  = "221 " <number> " Article retrieved." eol
24773 header         = <text> eol
24774 @end example
24775
24776 If the return value is @code{nov}, the data buffer should contain
24777 @dfn{network overview database} lines.  These are basically fields
24778 separated by tabs.
24779
24780 @example
24781 nov-buffer = *nov-line
24782 nov-line   = 8*9 [ field <TAB> ] eol
24783 field      = <text except TAB>
24784 @end example
24785
24786 For a closer look at what should be in those fields,
24787 @pxref{Headers}.
24788
24789
24790 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
24791
24792 @var{server} is here the virtual server name.  @var{definitions} is a
24793 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
24794
24795 If the server can't be opened, no error should be signaled.  The back end
24796 may then choose to refuse further attempts at connecting to this
24797 server.  In fact, it should do so.
24798
24799 If the server is opened already, this function should return a
24800 non-@code{nil} value.  There should be no data returned.
24801
24802
24803 @item (nnchoke-close-server &optional SERVER)
24804
24805 Close connection to @var{server} and free all resources connected
24806 to it.  Return @code{nil} if the server couldn't be closed for some
24807 reason.
24808
24809 There should be no data returned.
24810
24811
24812 @item (nnchoke-request-close)
24813
24814 Close connection to all servers and free all resources that the back end
24815 have reserved.  All buffers that have been created by that back end
24816 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
24817 function is generally only called when Gnus is shutting down.
24818
24819 There should be no data returned.
24820
24821
24822 @item (nnchoke-server-opened &optional SERVER)
24823
24824 If @var{server} is the current virtual server, and the connection to the
24825 physical server is alive, then this function should return a
24826 non-@code{nil} vlue.  This function should under no circumstances
24827 attempt to reconnect to a server we have lost connection to.
24828
24829 There should be no data returned.
24830
24831
24832 @item (nnchoke-status-message &optional SERVER)
24833
24834 This function should return the last error message from @var{server}.
24835
24836 There should be no data returned.
24837
24838
24839 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
24840
24841 The result data from this function should be the article specified by
24842 @var{article}.  This might either be a @code{Message-ID} or a number.
24843 It is optional whether to implement retrieval by @code{Message-ID}, but
24844 it would be nice if that were possible.
24845
24846 If @var{to-buffer} is non-@code{nil}, the result data should be returned
24847 in this buffer instead of the normal data buffer.  This is to make it
24848 possible to avoid copying large amounts of data from one buffer to
24849 another, while Gnus mainly requests articles to be inserted directly
24850 into its article buffer.
24851
24852 If it is at all possible, this function should return a cons cell where
24853 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
24854 the article number.  This will enable Gnus to find out what the real
24855 group and article numbers are when fetching articles by
24856 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
24857 on successful article retrieval.
24858
24859
24860 @item (nnchoke-request-group GROUP &optional SERVER FAST)
24861
24862 Get data on @var{group}.  This function also has the side effect of
24863 making @var{group} the current group.
24864
24865 If @var{fast}, don't bother to return useful data, just make @var{group}
24866 the current group.
24867
24868 Here's an example of some result data and a definition of the same:
24869
24870 @example
24871 211 56 1000 1059 ifi.discussion
24872 @end example
24873
24874 The first number is the status, which should be 211.  Next is the
24875 total number of articles in the group, the lowest article number, the
24876 highest article number, and finally the group name.  Note that the total
24877 number of articles may be less than one might think while just
24878 considering the highest and lowest article numbers, but some articles
24879 may have been canceled.  Gnus just discards the total-number, so
24880 whether one should take the bother to generate it properly (if that is a
24881 problem) is left as an exercise to the reader.  If the group contains no
24882 articles, the lowest article number should be reported as 1 and the
24883 highest as 0.
24884
24885 @example
24886 group-status = [ error / info ] eol
24887 error        = [ "4" / "5" ] 2<number> " " <Error message>
24888 info         = "211 " 3* [ <number> " " ] <string>
24889 @end example
24890
24891
24892 @item (nnchoke-close-group GROUP &optional SERVER)
24893
24894 Close @var{group} and free any resources connected to it.  This will be
24895 a no-op on most back ends.
24896
24897 There should be no data returned.
24898
24899
24900 @item (nnchoke-request-list &optional SERVER)
24901
24902 Return a list of all groups available on @var{server}.  And that means
24903 @emph{all}.
24904
24905 Here's an example from a server that only carries two groups:
24906
24907 @example
24908 ifi.test 0000002200 0000002000 y
24909 ifi.discussion 3324 3300 n
24910 @end example
24911
24912 On each line we have a group name, then the highest article number in
24913 that group, the lowest article number, and finally a flag.  If the group
24914 contains no articles, the lowest article number should be reported as 1
24915 and the highest as 0.
24916
24917 @example
24918 active-file = *active-line
24919 active-line = name " " <number> " " <number> " " flags eol
24920 name        = <string>
24921 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
24922 @end example
24923
24924 The flag says whether the group is read-only (@samp{n}), is moderated
24925 (@samp{m}), is dead (@samp{x}), is aliased to some other group
24926 (@samp{=other-group}) or none of the above (@samp{y}).
24927
24928
24929 @item (nnchoke-request-post &optional SERVER)
24930
24931 This function should post the current buffer.  It might return whether
24932 the posting was successful or not, but that's not required.  If, for
24933 instance, the posting is done asynchronously, it has generally not been
24934 completed by the time this function concludes.  In that case, this
24935 function should set up some kind of sentinel to beep the user loud and
24936 clear if the posting could not be completed.
24937
24938 There should be no result data from this function.
24939
24940 @end table
24941
24942
24943 @node Optional Back End Functions
24944 @subsubsection Optional Back End Functions
24945
24946 @table @code
24947
24948 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
24949
24950 @var{groups} is a list of groups, and this function should request data
24951 on all those groups.  How it does it is of no concern to Gnus, but it
24952 should attempt to do this in a speedy fashion.
24953
24954 The return value of this function can be either @code{active} or
24955 @code{group}, which says what the format of the result data is.  The
24956 former is in the same format as the data from
24957 @code{nnchoke-request-list}, while the latter is a buffer full of lines
24958 in the same format as @code{nnchoke-request-group} gives.
24959
24960 @example
24961 group-buffer = *active-line / *group-status
24962 @end example
24963
24964
24965 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
24966
24967 A Gnus group info (@pxref{Group Info}) is handed to the back end for
24968 alterations.  This comes in handy if the back end really carries all the
24969 information (as is the case with virtual and imap groups).  This
24970 function should destructively alter the info to suit its needs, and
24971 should return a non-nil value.
24972
24973 There should be no result data from this function.
24974
24975
24976 @item (nnchoke-request-type GROUP &optional ARTICLE)
24977
24978 When the user issues commands for ``sending news'' (@kbd{F} in the
24979 summary buffer, for instance), Gnus has to know whether the article the
24980 user is following up on is news or mail.  This function should return
24981 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
24982 is mail and @code{unknown} if the type can't be decided.  (The
24983 @var{article} parameter is necessary in @code{nnvirtual} groups which
24984 might very well combine mail groups and news groups.)  Both @var{group}
24985 and @var{article} may be @code{nil}.
24986
24987 There should be no result data from this function.
24988
24989
24990 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
24991
24992 Set/remove/add marks on articles.  Normally Gnus handles the article
24993 marks (such as read, ticked, expired etc) internally, and store them in
24994 @code{~/.newsrc.eld}.  Some back ends (such as @sc{imap}) however carry
24995 all information about the articles on the server, so Gnus need to
24996 propagate the mark information to the server.
24997
24998 ACTION is a list of mark setting requests, having this format:
24999
25000 @example
25001 (RANGE ACTION MARK)
25002 @end example
25003
25004 RANGE is a range of articles you wish to update marks on.  ACTION is
25005 @code{add} or @code{del}, used to add marks or remove marks
25006 (preserving all marks not mentioned).  MARK is a list of marks; where
25007 each mark is a symbol.  Currently used marks are @code{read},
25008 @code{tick}, @code{reply}, @code{expire}, @code{killed},
25009 @code{dormant}, @code{save}, @code{download}, @code{unsend},
25010 @code{forward} and @code{recent}, but your back end should, if
25011 possible, not limit itself to these.
25012
25013 Given contradictory actions, the last action in the list should be the
25014 effective one.  That is, if your action contains a request to add the
25015 @code{tick} mark on article 1 and, later in the list, a request to
25016 remove the mark on the same article, the mark should in fact be removed.
25017
25018 An example action list:
25019
25020 @example
25021 (((5 12 30) 'del '(tick))
25022  ((10 . 90) 'add '(read expire))
25023  ((92 94) 'del '(read)))
25024 @end example
25025
25026 The function should return a range of articles it wasn't able to set the
25027 mark on (currently not used for anything).
25028
25029 There should be no result data from this function.
25030
25031 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
25032
25033 If the user tries to set a mark that the back end doesn't like, this
25034 function may change the mark.  Gnus will use whatever this function
25035 returns as the mark for @var{article} instead of the original
25036 @var{mark}.  If the back end doesn't care, it must return the original
25037 @var{mark}, and not @code{nil} or any other type of garbage.
25038
25039 The only use for this I can see is what @code{nnvirtual} does with
25040 it---if a component group is auto-expirable, marking an article as read
25041 in the virtual group should result in the article being marked as
25042 expirable.
25043
25044 There should be no result data from this function.
25045
25046
25047 @item (nnchoke-request-scan &optional GROUP SERVER)
25048
25049 This function may be called at any time (by Gnus or anything else) to
25050 request that the back end check for incoming articles, in one way or
25051 another.  A mail back end will typically read the spool file or query the
25052 POP server when this function is invoked.  The @var{group} doesn't have
25053 to be heeded---if the back end decides that it is too much work just
25054 scanning for a single group, it may do a total scan of all groups.  It
25055 would be nice, however, to keep things local if that's practical.
25056
25057 There should be no result data from this function.
25058
25059
25060 @item (nnchoke-request-group-description GROUP &optional SERVER)
25061
25062 The result data from this function should be a description of
25063 @var{group}.
25064
25065 @example
25066 description-line = name <TAB> description eol
25067 name             = <string>
25068 description      = <text>
25069 @end example
25070
25071 @item (nnchoke-request-list-newsgroups &optional SERVER)
25072
25073 The result data from this function should be the description of all
25074 groups available on the server.
25075
25076 @example
25077 description-buffer = *description-line
25078 @end example
25079
25080
25081 @item (nnchoke-request-newgroups DATE &optional SERVER)
25082
25083 The result data from this function should be all groups that were
25084 created after @samp{date}, which is in normal human-readable date format
25085 (i.e., the date format used in mail and news headers, and returned by
25086 the function @code{message-make-date} by default).  The data should be
25087 in the active buffer format.
25088
25089 It is okay for this function to return `too many' groups; some back ends
25090 might find it cheaper to return the full list of groups, rather than
25091 just the new groups.  But don't do this for back ends with many groups.
25092 Normally, if the user creates the groups herself, there won't be too
25093 many groups, so @code{nnml} and the like are probably safe.  But for
25094 back ends like @code{nntp}, where the groups have been created by the
25095 server, it is quite likely that there can be many groups.
25096
25097
25098 @item (nnchoke-request-create-group GROUP &optional SERVER)
25099
25100 This function should create an empty group with name @var{group}.
25101
25102 There should be no return data.
25103
25104
25105 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
25106
25107 This function should run the expiry process on all articles in the
25108 @var{articles} range (which is currently a simple list of article
25109 numbers.)  It is left up to the back end to decide how old articles
25110 should be before they are removed by this function.  If @var{force} is
25111 non-@code{nil}, all @var{articles} should be deleted, no matter how new
25112 they are.
25113
25114 This function should return a list of articles that it did not/was not
25115 able to delete.
25116
25117 There should be no result data returned.
25118
25119
25120 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM
25121 &optional LAST)
25122
25123 This function should move @var{article} (which is a number) from
25124 @var{group} by calling @var{accept-form}.
25125
25126 This function should ready the article in question for moving by
25127 removing any header lines it has added to the article, and generally
25128 should ``tidy up'' the article.  Then it should @code{eval}
25129 @var{accept-form} in the buffer where the ``tidy'' article is.  This
25130 will do the actual copying.  If this @code{eval} returns a
25131 non-@code{nil} value, the article should be removed.
25132
25133 If @var{last} is @code{nil}, that means that there is a high likelihood
25134 that there will be more requests issued shortly, so that allows some
25135 optimizations.
25136
25137 The function should return a cons where the @code{car} is the group name and
25138 the @code{cdr} is the article number that the article was entered as.
25139
25140 There should be no data returned.
25141
25142
25143 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
25144
25145 This function takes the current buffer and inserts it into @var{group}.
25146 If @var{last} in @code{nil}, that means that there will be more calls to
25147 this function in short order.
25148
25149 The function should return a cons where the @code{car} is the group name and
25150 the @code{cdr} is the article number that the article was entered as.
25151
25152 The group should exist before the backend is asked to accept the
25153 article for that group.
25154
25155 There should be no data returned.
25156
25157
25158 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
25159
25160 This function should remove @var{article} (which is a number) from
25161 @var{group} and insert @var{buffer} there instead.
25162
25163 There should be no data returned.
25164
25165
25166 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
25167
25168 This function should delete @var{group}.  If @var{force}, it should
25169 really delete all the articles in the group, and then delete the group
25170 itself.  (If there is such a thing as ``the group itself''.)
25171
25172 There should be no data returned.
25173
25174
25175 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
25176
25177 This function should rename @var{group} into @var{new-name}.  All
25178 articles in @var{group} should move to @var{new-name}.
25179
25180 There should be no data returned.
25181
25182 @end table
25183
25184
25185 @node Error Messaging
25186 @subsubsection Error Messaging
25187
25188 @findex nnheader-report
25189 @findex nnheader-get-report
25190 The back ends should use the function @code{nnheader-report} to report
25191 error conditions---they should not raise errors when they aren't able to
25192 perform a request.  The first argument to this function is the back end
25193 symbol, and the rest are interpreted as arguments to @code{format} if
25194 there are multiple of them, or just a string if there is one of them.
25195 This function must always returns @code{nil}.
25196
25197 @lisp
25198 (nnheader-report 'nnchoke "You did something totally bogus")
25199
25200 (nnheader-report 'nnchoke "Could not request group %s" group)
25201 @end lisp
25202
25203 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
25204 @code{nil} back from a server, and this function returns the most
25205 recently reported message for the back end in question.  This function
25206 takes one argument---the server symbol.
25207
25208 Internally, these functions access @var{back-end}@code{-status-string},
25209 so the @code{nnchoke} back end will have its error message stored in
25210 @code{nnchoke-status-string}.
25211
25212
25213 @node Writing New Back Ends
25214 @subsubsection Writing New Back Ends
25215
25216 Many back ends are quite similar.  @code{nnml} is just like
25217 @code{nnspool}, but it allows you to edit the articles on the server.
25218 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
25219 and it doesn't maintain overview databases.  @code{nndir} is just like
25220 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
25221 editing articles.
25222
25223 It would make sense if it were possible to ``inherit'' functions from
25224 back ends when writing new back ends.  And, indeed, you can do that if you
25225 want to.  (You don't have to if you don't want to, of course.)
25226
25227 All the back ends declare their public variables and functions by using a
25228 package called @code{nnoo}.
25229
25230 To inherit functions from other back ends (and allow other back ends to
25231 inherit functions from the current back end), you should use the
25232 following macros:
25233
25234 @table @code
25235
25236 @item nnoo-declare
25237 This macro declares the first parameter to be a child of the subsequent
25238 parameters.  For instance:
25239
25240 @lisp
25241 (nnoo-declare nndir
25242   nnml nnmh)
25243 @end lisp
25244
25245 @code{nndir} has declared here that it intends to inherit functions from
25246 both @code{nnml} and @code{nnmh}.
25247
25248 @item defvoo
25249 This macro is equivalent to @code{defvar}, but registers the variable as
25250 a public server variable.  Most state-oriented variables should be
25251 declared with @code{defvoo} instead of @code{defvar}.
25252
25253 In addition to the normal @code{defvar} parameters, it takes a list of
25254 variables in the parent back ends to map the variable to when executing
25255 a function in those back ends.
25256
25257 @lisp
25258 (defvoo nndir-directory nil
25259   "Where nndir will look for groups."
25260   nnml-current-directory nnmh-current-directory)
25261 @end lisp
25262
25263 This means that @code{nnml-current-directory} will be set to
25264 @code{nndir-directory} when an @code{nnml} function is called on behalf
25265 of @code{nndir}.  (The same with @code{nnmh}.)
25266
25267 @item nnoo-define-basics
25268 This macro defines some common functions that almost all back ends should
25269 have.
25270
25271 @example
25272 (nnoo-define-basics nndir)
25273 @end example
25274
25275 @item deffoo
25276 This macro is just like @code{defun} and takes the same parameters.  In
25277 addition to doing the normal @code{defun} things, it registers the
25278 function as being public so that other back ends can inherit it.
25279
25280 @item nnoo-map-functions
25281 This macro allows mapping of functions from the current back end to
25282 functions from the parent back ends.
25283
25284 @example
25285 (nnoo-map-functions nndir
25286   (nnml-retrieve-headers 0 nndir-current-group 0 0)
25287   (nnmh-request-article 0 nndir-current-group 0 0))
25288 @end example
25289
25290 This means that when @code{nndir-retrieve-headers} is called, the first,
25291 third, and fourth parameters will be passed on to
25292 @code{nnml-retrieve-headers}, while the second parameter is set to the
25293 value of @code{nndir-current-group}.
25294
25295 @item nnoo-import
25296 This macro allows importing functions from back ends.  It should be the
25297 last thing in the source file, since it will only define functions that
25298 haven't already been defined.
25299
25300 @example
25301 (nnoo-import nndir
25302   (nnmh
25303    nnmh-request-list
25304    nnmh-request-newgroups)
25305   (nnml))
25306 @end example
25307
25308 This means that calls to @code{nndir-request-list} should just be passed
25309 on to @code{nnmh-request-list}, while all public functions from
25310 @code{nnml} that haven't been defined in @code{nndir} yet should be
25311 defined now.
25312
25313 @end table
25314
25315 Below is a slightly shortened version of the @code{nndir} back end.
25316
25317 @lisp
25318 ;;; nndir.el --- single directory newsgroup access for Gnus
25319 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
25320
25321 ;;; Code:
25322
25323 (require 'nnheader)
25324 (require 'nnmh)
25325 (require 'nnml)
25326 (require 'nnoo)
25327 (eval-when-compile (require 'cl))
25328
25329 (nnoo-declare nndir
25330   nnml nnmh)
25331
25332 (defvoo nndir-directory nil
25333   "Where nndir will look for groups."
25334   nnml-current-directory nnmh-current-directory)
25335
25336 (defvoo nndir-nov-is-evil nil
25337   "*Non-nil means that nndir will never retrieve NOV headers."
25338   nnml-nov-is-evil)
25339
25340 (defvoo nndir-current-group ""
25341   nil
25342   nnml-current-group nnmh-current-group)
25343 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
25344 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
25345
25346 (defvoo nndir-status-string "" nil nnmh-status-string)
25347 (defconst nndir-version "nndir 1.0")
25348
25349 ;;; Interface functions.
25350
25351 (nnoo-define-basics nndir)
25352
25353 (deffoo nndir-open-server (server &optional defs)
25354   (setq nndir-directory
25355         (or (cadr (assq 'nndir-directory defs))
25356             server))
25357   (unless (assq 'nndir-directory defs)
25358     (push `(nndir-directory ,server) defs))
25359   (push `(nndir-current-group
25360           ,(file-name-nondirectory
25361             (directory-file-name nndir-directory)))
25362         defs)
25363   (push `(nndir-top-directory
25364           ,(file-name-directory (directory-file-name nndir-directory)))
25365         defs)
25366   (nnoo-change-server 'nndir server defs))
25367
25368 (nnoo-map-functions nndir
25369   (nnml-retrieve-headers 0 nndir-current-group 0 0)
25370   (nnmh-request-article 0 nndir-current-group 0 0)
25371   (nnmh-request-group nndir-current-group 0 0)
25372   (nnmh-close-group nndir-current-group 0))
25373
25374 (nnoo-import nndir
25375   (nnmh
25376    nnmh-status-message
25377    nnmh-request-list
25378    nnmh-request-newgroups))
25379
25380 (provide 'nndir)
25381 @end lisp
25382
25383
25384 @node Hooking New Back Ends Into Gnus
25385 @subsubsection Hooking New Back Ends Into Gnus
25386
25387 @vindex gnus-valid-select-methods
25388 @findex gnus-declare-backend
25389 Having Gnus start using your new back end is rather easy---you just
25390 declare it with the @code{gnus-declare-backend} functions.  This will
25391 enter the back end into the @code{gnus-valid-select-methods} variable.
25392
25393 @code{gnus-declare-backend} takes two parameters---the back end name and
25394 an arbitrary number of @dfn{abilities}.
25395
25396 Here's an example:
25397
25398 @lisp
25399 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
25400 @end lisp
25401
25402 The above line would then go in the @file{nnchoke.el} file.
25403
25404 The abilities can be:
25405
25406 @table @code
25407 @item mail
25408 This is a mailish back end---followups should (probably) go via mail.
25409 @item post
25410 This is a newsish back end---followups should (probably) go via news.
25411 @item post-mail
25412 This back end supports both mail and news.
25413 @item none
25414 This is neither a post nor mail back end---it's something completely
25415 different.
25416 @item respool
25417 It supports respooling---or rather, it is able to modify its source
25418 articles and groups.
25419 @item address
25420 The name of the server should be in the virtual server name.  This is
25421 true for almost all back ends.
25422 @item prompt-address
25423 The user should be prompted for an address when doing commands like
25424 @kbd{B} in the group buffer.  This is true for back ends like
25425 @code{nntp}, but not @code{nnmbox}, for instance.
25426 @end table
25427
25428
25429 @node Mail-like Back Ends
25430 @subsubsection Mail-like Back Ends
25431
25432 One of the things that separate the mail back ends from the rest of the
25433 back ends is the heavy dependence by most of the mail back ends on
25434 common functions in @file{nnmail.el}.  For instance, here's the
25435 definition of @code{nnml-request-scan}:
25436
25437 @lisp
25438 (deffoo nnml-request-scan (&optional group server)
25439   (setq nnml-article-file-alist nil)
25440   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
25441 @end lisp
25442
25443 It simply calls @code{nnmail-get-new-mail} with a few parameters,
25444 and @code{nnmail} takes care of all the moving and splitting of the
25445 mail.
25446
25447 This function takes four parameters.
25448
25449 @table @var
25450 @item method
25451 This should be a symbol to designate which back end is responsible for
25452 the call.
25453
25454 @item exit-function
25455 This function should be called after the splitting has been performed.
25456
25457 @item temp-directory
25458 Where the temporary files should be stored.
25459
25460 @item group
25461 This optional argument should be a group name if the splitting is to be
25462 performed for one group only.
25463 @end table
25464
25465 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
25466 save each article.  @var{back-end}@code{-active-number} will be called to
25467 find the article number assigned to this article.
25468
25469 The function also uses the following variables:
25470 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
25471 this back end); and @var{back-end}@code{-group-alist} and
25472 @var{back-end}@code{-active-file} to generate the new active file.
25473 @var{back-end}@code{-group-alist} should be a group-active alist, like
25474 this:
25475
25476 @example
25477 (("a-group" (1 . 10))
25478  ("some-group" (34 . 39)))
25479 @end example
25480
25481
25482 @node Score File Syntax
25483 @subsection Score File Syntax
25484
25485 Score files are meant to be easily parseable, but yet extremely
25486 mallable.   It was decided that something that had the same read syntax
25487 as an Emacs Lisp list would fit that spec.
25488
25489 Here's a typical score file:
25490
25491 @lisp
25492 (("summary"
25493   ("win95" -10000 nil s)
25494   ("Gnus"))
25495  ("from"
25496   ("Lars" -1000))
25497  (mark -100))
25498 @end lisp
25499
25500 BNF definition of a score file:
25501
25502 @example
25503 score-file      = "" / "(" *element ")"
25504 element         = rule / atom
25505 rule            = string-rule / number-rule / date-rule
25506 string-rule     = "(" quote string-header quote space *string-match ")"
25507 number-rule     = "(" quote number-header quote space *number-match ")"
25508 date-rule       = "(" quote date-header quote space *date-match ")"
25509 quote           = <ascii 34>
25510 string-header   = "subject" / "from" / "references" / "message-id" /
25511                   "xref" / "body" / "head" / "all" / "followup"
25512 number-header   = "lines" / "chars"
25513 date-header     = "date"
25514 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
25515                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
25516 score           = "nil" / <integer>
25517 date            = "nil" / <natural number>
25518 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
25519                   "r" / "regex" / "R" / "Regex" /
25520                   "e" / "exact" / "E" / "Exact" /
25521                   "f" / "fuzzy" / "F" / "Fuzzy"
25522 number-match    = "(" <integer> [ "" / [ space score [ "" /
25523                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
25524 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
25525 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
25526                   space date [ "" / [ space date-match-t ] ] ] ] ")"
25527 date-match-t    = "nil" / "at" / "before" / "after"
25528 atom            = "(" [ required-atom / optional-atom ] ")"
25529 required-atom   = mark / expunge / mark-and-expunge / files /
25530                   exclude-files / read-only / touched
25531 optional-atom   = adapt / local / eval
25532 mark            = "mark" space nil-or-number
25533 nil-or-number   = "nil" / <integer>
25534 expunge         = "expunge" space nil-or-number
25535 mark-and-expunge = "mark-and-expunge" space nil-or-number
25536 files           = "files" *[ space <string> ]
25537 exclude-files   = "exclude-files" *[ space <string> ]
25538 read-only       = "read-only" [ space "nil" / space "t" ]
25539 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
25540 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
25541 local           = "local" *[ space "(" <string> space <form> ")" ]
25542 eval            = "eval" space <form>
25543 space           = *[ " " / <TAB> / <NEWLINE> ]
25544 @end example
25545
25546 Any unrecognized elements in a score file should be ignored, but not
25547 discarded.
25548
25549 As you can see, white space is needed, but the type and amount of white
25550 space is irrelevant.  This means that formatting of the score file is
25551 left up to the programmer---if it's simpler to just spew it all out on
25552 one looong line, then that's ok.
25553
25554 The meaning of the various atoms are explained elsewhere in this
25555 manual (@pxref{Score File Format}).
25556
25557
25558 @node Headers
25559 @subsection Headers
25560
25561 Internally Gnus uses a format for storing article headers that
25562 corresponds to the @sc{nov} format in a mysterious fashion.  One could
25563 almost suspect that the author looked at the @sc{nov} specification and
25564 just shamelessly @emph{stole} the entire thing, and one would be right.
25565
25566 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
25567 RFC 1036 to talk about lines in the head of an article (e.g.,
25568 @code{From}).  It is used by many people as a synonym for
25569 ``head''---``the header and the body''.  (That should be avoided, in my
25570 opinion.)  And Gnus uses a format internally that it calls ``header'',
25571 which is what I'm talking about here.  This is a 9-element vector,
25572 basically, with each header (ouch) having one slot.
25573
25574 These slots are, in order: @code{number}, @code{subject}, @code{from},
25575 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
25576 @code{xref}, and @code{extra}.  There are macros for accessing and
25577 setting these slots---they all have predictable names beginning with
25578 @code{mail-header-} and @code{mail-header-set-}, respectively.
25579
25580 All these slots contain strings, except the @code{extra} slot, which
25581 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
25582
25583
25584 @node Ranges
25585 @subsection Ranges
25586
25587 @sc{gnus} introduced a concept that I found so useful that I've started
25588 using it a lot and have elaborated on it greatly.
25589
25590 The question is simple: If you have a large amount of objects that are
25591 identified by numbers (say, articles, to take a @emph{wild} example)
25592 that you want to qualify as being ``included'', a normal sequence isn't
25593 very useful.  (A 200,000 length sequence is a bit long-winded.)
25594
25595 The solution is as simple as the question: You just collapse the
25596 sequence.
25597
25598 @example
25599 (1 2 3 4 5 6 10 11 12)
25600 @end example
25601
25602 is transformed into
25603
25604 @example
25605 ((1 . 6) (10 . 12))
25606 @end example
25607
25608 To avoid having those nasty @samp{(13 . 13)} elements to denote a
25609 lonesome object, a @samp{13} is a valid element:
25610
25611 @example
25612 ((1 . 6) 7 (10 . 12))
25613 @end example
25614
25615 This means that comparing two ranges to find out whether they are equal
25616 is slightly tricky:
25617
25618 @example
25619 ((1 . 5) 7 8 (10 . 12))
25620 @end example
25621
25622 and
25623
25624 @example
25625 ((1 . 5) (7 . 8) (10 . 12))
25626 @end example
25627
25628 are equal.  In fact, any non-descending list is a range:
25629
25630 @example
25631 (1 2 3 4 5)
25632 @end example
25633
25634 is a perfectly valid range, although a pretty long-winded one.  This is
25635 also valid:
25636
25637 @example
25638 (1 . 5)
25639 @end example
25640
25641 and is equal to the previous range.
25642
25643 Here's a BNF definition of ranges.  Of course, one must remember the
25644 semantic requirement that the numbers are non-descending.  (Any number
25645 of repetition of the same number is allowed, but apt to disappear in
25646 range handling.)
25647
25648 @example
25649 range           = simple-range / normal-range
25650 simple-range    = "(" number " . " number ")"
25651 normal-range    = "(" start-contents ")"
25652 contents        = "" / simple-range *[ " " contents ] /
25653                   number *[ " " contents ]
25654 @end example
25655
25656 Gnus currently uses ranges to keep track of read articles and article
25657 marks.  I plan on implementing a number of range operators in C if The
25658 Powers That Be are willing to let me.  (I haven't asked yet, because I
25659 need to do some more thinking on what operators I need to make life
25660 totally range-based without ever having to convert back to normal
25661 sequences.)
25662
25663
25664 @node Group Info
25665 @subsection Group Info
25666
25667 Gnus stores all permanent info on groups in a @dfn{group info} list.
25668 This list is from three to six elements (or more) long and exhaustively
25669 describes the group.
25670
25671 Here are two example group infos; one is a very simple group while the
25672 second is a more complex one:
25673
25674 @example
25675 ("no.group" 5 ((1 . 54324)))
25676
25677 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
25678                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
25679                 (nnml "")
25680                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
25681 @end example
25682
25683 The first element is the @dfn{group name}---as Gnus knows the group,
25684 anyway.  The second element is the @dfn{subscription level}, which
25685 normally is a small integer.  (It can also be the @dfn{rank}, which is a
25686 cons cell where the @code{car} is the level and the @code{cdr} is the
25687 score.)  The third element is a list of ranges of read articles.  The
25688 fourth element is a list of lists of article marks of various kinds.
25689 The fifth element is the select method (or virtual server, if you like).
25690 The sixth element is a list of @dfn{group parameters}, which is what
25691 this section is about.
25692
25693 Any of the last three elements may be missing if they are not required.
25694 In fact, the vast majority of groups will normally only have the first
25695 three elements, which saves quite a lot of cons cells.
25696
25697 Here's a BNF definition of the group info format:
25698
25699 @example
25700 info          = "(" group space ralevel space read
25701                 [ "" / [ space marks-list [ "" / [ space method [ "" /
25702                 space parameters ] ] ] ] ] ")"
25703 group         = quote <string> quote
25704 ralevel       = rank / level
25705 level         = <integer in the range of 1 to inf>
25706 rank          = "(" level "." score ")"
25707 score         = <integer in the range of 1 to inf>
25708 read          = range
25709 marks-lists   = nil / "(" *marks ")"
25710 marks         = "(" <string> range ")"
25711 method        = "(" <string> *elisp-forms ")"
25712 parameters    = "(" *elisp-forms ")"
25713 @end example
25714
25715 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
25716 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
25717 in pseudo-BNF.
25718
25719 If you have a Gnus info and want to access the elements, Gnus offers a
25720 series of macros for getting/setting these elements.
25721
25722 @table @code
25723 @item gnus-info-group
25724 @itemx gnus-info-set-group
25725 @findex gnus-info-group
25726 @findex gnus-info-set-group
25727 Get/set the group name.
25728
25729 @item gnus-info-rank
25730 @itemx gnus-info-set-rank
25731 @findex gnus-info-rank
25732 @findex gnus-info-set-rank
25733 Get/set the group rank (@pxref{Group Score}).
25734
25735 @item gnus-info-level
25736 @itemx gnus-info-set-level
25737 @findex gnus-info-level
25738 @findex gnus-info-set-level
25739 Get/set the group level.
25740
25741 @item gnus-info-score
25742 @itemx gnus-info-set-score
25743 @findex gnus-info-score
25744 @findex gnus-info-set-score
25745 Get/set the group score (@pxref{Group Score}).
25746
25747 @item gnus-info-read
25748 @itemx gnus-info-set-read
25749 @findex gnus-info-read
25750 @findex gnus-info-set-read
25751 Get/set the ranges of read articles.
25752
25753 @item gnus-info-marks
25754 @itemx gnus-info-set-marks
25755 @findex gnus-info-marks
25756 @findex gnus-info-set-marks
25757 Get/set the lists of ranges of marked articles.
25758
25759 @item gnus-info-method
25760 @itemx gnus-info-set-method
25761 @findex gnus-info-method
25762 @findex gnus-info-set-method
25763 Get/set the group select method.
25764
25765 @item gnus-info-params
25766 @itemx gnus-info-set-params
25767 @findex gnus-info-params
25768 @findex gnus-info-set-params
25769 Get/set the group parameters.
25770 @end table
25771
25772 All the getter functions take one parameter---the info list.  The setter
25773 functions take two parameters---the info list and the new value.
25774
25775 The last three elements in the group info aren't mandatory, so it may be
25776 necessary to extend the group info before setting the element.  If this
25777 is necessary, you can just pass on a non-@code{nil} third parameter to
25778 the three final setter functions to have this happen automatically.
25779
25780
25781 @node Extended Interactive
25782 @subsection Extended Interactive
25783 @cindex interactive
25784 @findex gnus-interactive
25785
25786 Gnus extends the standard Emacs @code{interactive} specification
25787 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
25788 Prefixes}).  Here's an example of how this is used:
25789
25790 @lisp
25791 (defun gnus-summary-increase-score (&optional score symp)
25792   (interactive (gnus-interactive "P\ny"))
25793   ...
25794   )
25795 @end lisp
25796
25797 The best thing to do would have been to implement
25798 @code{gnus-interactive} as a macro which would have returned an
25799 @code{interactive} form, but this isn't possible since Emacs checks
25800 whether a function is interactive or not by simply doing an @code{assq}
25801 on the lambda form.  So, instead we have @code{gnus-interactive}
25802 function that takes a string and returns values that are usable to
25803 @code{interactive}.
25804
25805 This function accepts (almost) all normal @code{interactive} specs, but
25806 adds a few more.
25807
25808 @table @samp
25809 @item y
25810 @vindex gnus-current-prefix-symbol
25811 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
25812 variable.
25813
25814 @item Y
25815 @vindex gnus-current-prefix-symbols
25816 A list of the current symbolic prefixes---the
25817 @code{gnus-current-prefix-symbol} variable.
25818
25819 @item A
25820 The current article number---the @code{gnus-summary-article-number}
25821 function.
25822
25823 @item H
25824 The current article header---the @code{gnus-summary-article-header}
25825 function.
25826
25827 @item g
25828 The current group name---the @code{gnus-group-group-name}
25829 function.
25830
25831 @end table
25832
25833
25834 @node Emacs/XEmacs Code
25835 @subsection Emacs/XEmacs Code
25836 @cindex XEmacs
25837 @cindex Emacsen
25838
25839 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
25840 platforms must be the primary one.  I chose Emacs.  Not because I don't
25841 like XEmacs or Mule, but because it comes first alphabetically.
25842
25843 This means that Gnus will byte-compile under Emacs with nary a warning,
25844 while XEmacs will pump out gigabytes of warnings while byte-compiling.
25845 As I use byte-compilation warnings to help me root out trivial errors in
25846 Gnus, that's very useful.
25847
25848 I've also consistently used Emacs function interfaces, but have used
25849 Gnusey aliases for the functions.  To take an example:  Emacs defines a
25850 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
25851 function.  I then define a function called @code{gnus-run-at-time} that
25852 takes the same parameters as the Emacs @code{run-at-time}.  When running
25853 Gnus under Emacs, the former function is just an alias for the latter.
25854 However, when running under XEmacs, the former is an alias for the
25855 following function:
25856
25857 @lisp
25858 (defun gnus-xmas-run-at-time (time repeat function &rest args)
25859   (start-itimer
25860    "gnus-run-at-time"
25861    `(lambda ()
25862       (,function ,@@args))
25863    time repeat))
25864 @end lisp
25865
25866 This sort of thing has been done for bunches of functions.  Gnus does
25867 not redefine any native Emacs functions while running under XEmacs---it
25868 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
25869 all over.
25870
25871 In the cases where the XEmacs function interface was obviously cleaner,
25872 I used it instead.  For example @code{gnus-region-active-p} is an alias
25873 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
25874
25875 Of course, I could have chosen XEmacs as my native platform and done
25876 mapping functions the other way around.  But I didn't.  The performance
25877 hit these indirections impose on Gnus under XEmacs should be slight.
25878
25879
25880 @node Various File Formats
25881 @subsection Various File Formats
25882
25883 @menu
25884 * Active File Format::          Information on articles and groups available.
25885 * Newsgroups File Format::      Group descriptions.
25886 @end menu
25887
25888
25889 @node Active File Format
25890 @subsubsection Active File Format
25891
25892 The active file lists all groups available on the server in
25893 question.  It also lists the highest and lowest current article numbers
25894 in each group.
25895
25896 Here's an excerpt from a typical active file:
25897
25898 @example
25899 soc.motss 296030 293865 y
25900 alt.binaries.pictures.fractals 3922 3913 n
25901 comp.sources.unix 1605 1593 m
25902 comp.binaries.ibm.pc 5097 5089 y
25903 no.general 1000 900 y
25904 @end example
25905
25906 Here's a pseudo-BNF definition of this file:
25907
25908 @example
25909 active      = *group-line
25910 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
25911 group       = <non-white-space string>
25912 spc         = " "
25913 high-number = <non-negative integer>
25914 low-number  = <positive integer>
25915 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
25916 @end example
25917
25918 For a full description of this file, see the manual pages for
25919 @samp{innd}, in particular @samp{active(5)}.
25920
25921
25922 @node Newsgroups File Format
25923 @subsubsection Newsgroups File Format
25924
25925 The newsgroups file lists groups along with their descriptions.  Not all
25926 groups on the server have to be listed,  and not all groups in the file
25927 have to exist on the server.  The file is meant purely as information to
25928 the user.
25929
25930 The format is quite simple; a group name, a tab, and the description.
25931 Here's the definition:
25932
25933 @example
25934 newsgroups    = *line
25935 line          = group tab description <NEWLINE>
25936 group         = <non-white-space string>
25937 tab           = <TAB>
25938 description   = <string>
25939 @end example
25940
25941
25942 @page
25943 @node Emacs for Heathens
25944 @section Emacs for Heathens
25945
25946 Believe it or not, but some people who use Gnus haven't really used
25947 Emacs much before they embarked on their journey on the Gnus Love Boat.
25948 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
25949 region'', and ``set @code{gnus-flargblossen} to an alist where the key
25950 is a regexp that is used for matching on the group name'' are magical
25951 phrases with little or no meaning, then this appendix is for you.  If
25952 you are already familiar with Emacs, just ignore this and go fondle your
25953 cat instead.
25954
25955 @menu
25956 * Keystrokes::                  Entering text and executing commands.
25957 * Emacs Lisp::                  The built-in Emacs programming language.
25958 @end menu
25959
25960
25961 @node Keystrokes
25962 @subsection Keystrokes
25963
25964 @itemize @bullet
25965 @item
25966 Q: What is an experienced Emacs user?
25967
25968 @item
25969 A: A person who wishes that the terminal had pedals.
25970 @end itemize
25971
25972 Yes, when you use Emacs, you are apt to use the control key, the shift
25973 key and the meta key a lot.  This is very annoying to some people
25974 (notably @code{vi}le users), and the rest of us just love the hell out
25975 of it.  Just give up and submit.  Emacs really does stand for
25976 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
25977 may have heard from other disreputable sources (like the Emacs author).
25978
25979 The shift keys are normally located near your pinky fingers, and are
25980 normally used to get capital letters and stuff.  You probably use it all
25981 the time.  The control key is normally marked ``CTRL'' or something like
25982 that.  The meta key is, funnily enough, never marked as such on any
25983 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
25984 which is the meta key on this keyboard.  It's usually located somewhere
25985 to the left hand side of the keyboard, usually on the bottom row.
25986
25987 Now, us Emacs people don't say ``press the meta-control-m key'',
25988 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
25989 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
25990 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
25991 down the control key, and hold it down while you press @kbd{k}''.
25992 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
25993 the control key and then press @kbd{k}''.  Simple, ay?
25994
25995 This is somewhat complicated by the fact that not all keyboards have a
25996 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
25997 means ``press escape, release escape, press @kbd{k}''.  That's much more
25998 work than if you have a meta key, so if that's the case, I respectfully
25999 suggest you get a real keyboard with a meta key.  You can't live without
26000 it.
26001
26002
26003
26004 @node Emacs Lisp
26005 @subsection Emacs Lisp
26006
26007 Emacs is the King of Editors because it's really a Lisp interpreter.
26008 Each and every key you tap runs some Emacs Lisp code snippet, and since
26009 Emacs Lisp is an interpreted language, that means that you can configure
26010 any key to run any arbitrary code.  You just, like, do it.
26011
26012 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
26013 functions.  (These are byte-compiled for speed, but it's still
26014 interpreted.)  If you decide that you don't like the way Gnus does
26015 certain things, it's trivial to have it do something a different way.
26016 (Well, at least if you know how to write Lisp code.)  However, that's
26017 beyond the scope of this manual, so we are simply going to talk about
26018 some common constructs that you normally use in your @file{.emacs} file
26019 to customize Gnus.
26020
26021 If you want to set the variable @code{gnus-florgbnize} to four (4), you
26022 write the following:
26023
26024 @lisp
26025 (setq gnus-florgbnize 4)
26026 @end lisp
26027
26028 This function (really ``special form'') @code{setq} is the one that can
26029 set a variable to some value.  This is really all you need to know.  Now
26030 you can go and fill your @file{.emacs} file with lots of these to change
26031 how Gnus works.
26032
26033 If you have put that thing in your @file{.emacs} file, it will be read
26034 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
26035 start Emacs.  If you want to change the variable right away, simply say
26036 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
26037 previous ``form'', which is a simple @code{setq} statement here.
26038
26039 Go ahead---just try it, if you're located at your Emacs.  After you
26040 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
26041 is the return value of the form you @code{eval}ed.
26042
26043 Some pitfalls:
26044
26045 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
26046 that means:
26047
26048 @lisp
26049 (setq gnus-read-active-file 'some)
26050 @end lisp
26051
26052 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
26053 @samp{nntp.ifi.uio.no}'', that means:
26054
26055 @lisp
26056 (setq gnus-nntp-server "nntp.ifi.uio.no")
26057 @end lisp
26058
26059 So be careful not to mix up strings (the latter) with symbols (the
26060 former).  The manual is unambiguous, but it can be confusing.
26061
26062 @page
26063 @include gnus-faq.texi
26064
26065 @node Index
26066 @chapter Index
26067 @printindex cp
26068
26069 @node Key Index
26070 @chapter Key Index
26071 @printindex ky
26072
26073 @summarycontents
26074 @contents
26075 @bye
26076
26077 @iftex
26078 @iflatex
26079 \end{document}
26080 @end iflatex
26081 @end iftex
26082
26083 @c Local Variables:
26084 @c mode: texinfo
26085 @c coding: iso-8859-1
26086 @c End:
26087 % LocalWords:  BNF mucho detailmenu cindex kindex kbd
26088 % LocalWords:  findex Gnusae vindex dfn dfn samp nntp setq nnspool nntpserver
26089 % LocalWords:  nnmbox newusers Blllrph NEWGROUPS dingnusdingnusdingnus
26090 % LocalWords:  pre fab rec comp nnslashdot regex ga ga sci nnml nnbabyl nnmh
26091 % LocalWords:  nnfolder emph looong eld newsreaders defun init elc pxref