Import Oort Gnus v0.19.
[elisp/gnus.git-] / 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.19}
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{\gnusenv}[1]{\gnustt{#1}}
57 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
58 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
59 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
60 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
61 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
62 \newcommand{\gnusdfn}[1]{\textit{#1}}
63 \newcommand{\gnusi}[1]{\textit{#1}}
64 \newcommand{\gnusr}[1]{\textrm{#1}}
65 \newcommand{\gnusstrong}[1]{\textbf{#1}}
66 \newcommand{\gnusemph}[1]{\textit{#1}}
67 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
68 \newcommand{\gnussc}[1]{\textsc{#1}}
69 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
70 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
71 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
72 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
73 \newcommand{\gnusacronym}[1]{\textsc{#1}}
74 \newcommand{\gnusemail}[1]{\textit{#1}}
75
76 \newcommand{\gnusbullet}{{${\bullet}$}}
77 \newcommand{\gnusdollar}{\$}
78 \newcommand{\gnusampersand}{\&}
79 \newcommand{\gnuspercent}{\%}
80 \newcommand{\gnushash}{\#}
81 \newcommand{\gnushat}{\symbol{"5E}}
82 \newcommand{\gnusunderline}{\symbol{"5F}}
83 \newcommand{\gnusnot}{$\neg$}
84 \newcommand{\gnustilde}{\symbol{"7E}}
85 \newcommand{\gnusless}{{$<$}}
86 \newcommand{\gnusgreater}{{$>$}}
87 \newcommand{\gnusbraceleft}{{$>$}}
88 \newcommand{\gnusbraceright}{{$>$}}
89
90 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
91 \newcommand{\gnusinteresting}{
92 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
93 }
94
95 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
96
97 \newcommand{\gnuspagechapter}[1]{
98 {\mbox{}}
99 }
100
101 \newdimen{\gnusdimen}
102 \gnusdimen 0pt
103
104 \newcommand{\gnuschapter}[2]{
105 \gnuscleardoublepage
106 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
107 \chapter{#2}
108 \renewcommand{\gnussectionname}{}
109 \renewcommand{\gnuschaptername}{#2}
110 \thispagestyle{empty}
111 \hspace*{-2cm}
112 \begin{picture}(500,500)(0,0)
113 \put(480,350){\makebox(0,0)[tr]{#1}}
114 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
115 \end{picture}
116 \clearpage
117 }
118
119 \newcommand{\gnusfigure}[3]{
120 \begin{figure}
121 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
122 #3
123 \end{picture}
124 \caption{#1}
125 \end{figure}
126 }
127
128 \newcommand{\gnusicon}[1]{
129 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
130 }
131
132 \newcommand{\gnuspicon}[1]{
133 \margindex{\epsfig{figure=#1,width=2cm}}
134 }
135
136 \newcommand{\gnusxface}[2]{
137 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
138 }
139
140 \newcommand{\gnussmiley}[2]{
141 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
142 }
143
144 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
145
146 \newcommand{\gnussection}[1]{
147 \renewcommand{\gnussectionname}{#1}
148 \section{#1}
149 }
150
151 \newenvironment{codelist}%
152 {\begin{list}{}{
153 }
154 }{\end{list}}
155
156 \newenvironment{kbdlist}%
157 {\begin{list}{}{
158 \labelwidth=0cm
159 }
160 }{\end{list}}
161
162 \newenvironment{dfnlist}%
163 {\begin{list}{}{
164 }
165 }{\end{list}}
166
167 \newenvironment{stronglist}%
168 {\begin{list}{}{
169 }
170 }{\end{list}}
171
172 \newenvironment{samplist}%
173 {\begin{list}{}{
174 }
175 }{\end{list}}
176
177 \newenvironment{varlist}%
178 {\begin{list}{}{
179 }
180 }{\end{list}}
181
182 \newenvironment{emphlist}%
183 {\begin{list}{}{
184 }
185 }{\end{list}}
186
187 \newlength\gnusheadtextwidth
188 \setlength{\gnusheadtextwidth}{\headtextwidth}
189 \addtolength{\gnusheadtextwidth}{1cm}
190
191 \newpagestyle{gnuspreamble}%
192 {
193 {
194 \ifodd\count0
195 {
196 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
197 }
198 \else
199 {
200 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
201 }
202 }
203 \fi
204 }
205 }
206 {
207 \ifodd\count0
208 \mbox{} \hfill
209 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
210 \else
211 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
212 \hfill \mbox{}
213 \fi
214 }
215
216 \newpagestyle{gnusindex}%
217 {
218 {
219 \ifodd\count0
220 {
221 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
222 }
223 \else
224 {
225 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
226 }
227 \fi
228 }
229 }
230 {
231 \ifodd\count0
232 \mbox{} \hfill
233 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
234 \else
235 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
236 \hfill \mbox{}
237 \fi
238 }
239
240 \newpagestyle{gnus}%
241 {
242 {
243 \ifodd\count0
244 {
245 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
246 }
247 \else
248 {
249 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
250 }
251 \fi
252 }
253 }
254 {
255 \ifodd\count0
256 \mbox{} \hfill
257 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
258 \else
259 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
260 \hfill \mbox{}
261 \fi
262 }
263
264 \pagenumbering{roman}
265 \pagestyle{gnuspreamble}
266
267 @end iflatex
268 @end iftex
269
270 @iftex
271 @iflatex
272 \begin{titlepage}
273 {
274
275 %\addtolength{\oddsidemargin}{-5cm}
276 %\addtolength{\evensidemargin}{-5cm}
277 \parindent=0cm
278 \addtolength{\textheight}{2cm}
279
280 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
281 \rule{15cm}{1mm}\\
282 \vfill
283 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
284 \vfill
285 \rule{15cm}{1mm}\\
286 \gnusauthor{by Lars Magne Ingebrigtsen}
287 \newpage
288 }
289
290 \mbox{}
291 \vfill
292
293 \thispagestyle{empty}
294
295 Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
296 2002, 2003
297 Free Software Foundation, Inc.
298
299
300 Permission is granted to copy, distribute and/or modify this document
301 under the terms of the GNU Free Documentation License, Version 1.1 or
302 any later version published by the Free Software Foundation; with no
303 Invariant Sections, with the Front-Cover texts being ``A GNU
304 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
305 license is included in the section entitled ``GNU Free Documentation
306 License'' in the Emacs manual.
307
308 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
309 this GNU Manual, like GNU software.  Copies published by the Free
310 Software Foundation raise funds for GNU development.''
311
312 This document is part of a collection distributed under the GNU Free
313 Documentation License.  If you want to distribute this document
314 separately from the collection, you can do so by adding a copy of the
315 license to the document, as described in section 6 of the license.
316 \newpage
317 \end{titlepage}
318 @end iflatex
319 @end iftex
320
321 @ifnottex
322
323 This file documents Gnus, the GNU Emacs newsreader.
324
325 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
326         Free Software Foundation, Inc.
327
328 Permission is granted to copy, distribute and/or modify this document
329 under the terms of the GNU Free Documentation License, Version 1.1 or
330 any later version published by the Free Software Foundation; with the
331 Invariant Sections being none, with the Front-Cover texts being ``A GNU
332 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
333 license is included in the section entitled ``GNU Free Documentation
334 License'' in the Emacs manual.
335
336 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
337 this GNU Manual, like GNU software.  Copies published by the Free
338 Software Foundation raise funds for GNU development.''
339
340 This document is part of a collection distributed under the GNU Free
341 Documentation License.  If you want to distribute this document
342 separately from the collection, you can do so by adding a copy of the
343 license to the document, as described in section 6 of the license.
344 @end ifnottex
345
346 @tex
347
348 @titlepage
349 @title Gnus Manual
350
351 @author by Lars Magne Ingebrigtsen
352 @page
353
354 @vskip 0pt plus 1filll
355 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
356 2002, 2003
357         Free Software Foundation, Inc.
358
359 Permission is granted to copy, distribute and/or modify this document
360 under the terms of the GNU Free Documentation License, Version 1.1 or
361 any later version published by the Free Software Foundation; with no
362 Invariant Sections, with the Front-Cover texts being ``A GNU
363 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
364 license is included in the section entitled ``GNU Free Documentation
365 License'' in the Emacs manual.
366
367 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
368 this GNU Manual, like GNU software.  Copies published by the Free
369 Software Foundation raise funds for GNU development.''
370
371 This document is part of a collection distributed under the GNU Free
372 Documentation License.  If you want to distribute this document
373 separately from the collection, you can do so by adding a copy of the
374 license to the document, as described in section 6 of the license.
375
376 @end titlepage
377 @page
378
379 @end tex
380
381
382 @node Top
383 @top The Gnus Newsreader
384
385 @ifinfo
386
387 You can read news (and mail) from within Emacs by using Gnus.  The news
388 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
389 spool or your mbox file.  All at the same time, if you want to push your
390 luck.
391
392 This manual corresponds to Oort Gnus v0.19.
393
394 @end ifinfo
395
396 @iftex
397
398 @iflatex
399 \tableofcontents
400 \gnuscleardoublepage
401 @end iflatex
402
403 Gnus is the advanced, self-documenting, customizable, extensible
404 unreal-time newsreader for GNU Emacs.
405
406 Oops.  That sounds oddly familiar, so let's start over again to avoid
407 being accused of plagiarism:
408
409 Gnus is a message-reading laboratory.  It will let you look at just
410 about anything as if it were a newsgroup.  You can read mail with it,
411 you can browse directories with it, you can @code{ftp} with it---you
412 can even read news with it!
413
414 Gnus tries to empower people who read news the same way Emacs empowers
415 people who edit text.  Gnus sets no limits to what the user should be
416 allowed to do.  Users are encouraged to extend Gnus to make it behave
417 like they want it to behave.  A program should not control people;
418 people should be empowered to do what they want by using (or abusing)
419 the program.
420
421 @end iftex
422
423 @menu
424 * Starting Up::                 Finding news can be a pain.
425 * Group Buffer::                Selecting, subscribing and killing groups.
426 * Summary Buffer::              Reading, saving and posting articles.
427 * Article Buffer::              Displaying and handling articles.
428 * Composing Messages::          Information on sending mail and news.
429 * Select Methods::              Gnus reads all messages from various select methods.
430 * Scoring::                     Assigning values to articles.
431 * Various::                     General purpose settings.
432 * The End::                     Farewell and goodbye.
433 * Appendices::                  Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
434 * Index::                       Variable, function and concept index.
435 * Key Index::                   Key Index.
436
437 Other related manuals
438
439 * Message:(message).            Composing messages.
440 * Emacs-MIME:(emacs-mime).      Composing messages; @acronym{MIME}-specific parts.
441 * Sieve:(sieve).                Managing Sieve scripts in Emacs.
442 * PGG:(pgg).                    @acronym{PGP/MIME} with Gnus.
443
444 @detailmenu
445  --- The Detailed Node Listing ---
446
447 Starting Gnus
448
449 * Finding the News::            Choosing a method for getting news.
450 * The First Time::              What does Gnus do the first time you start it?
451 * The Server is Down::          How can I read my mail then?
452 * Slave Gnusae::                You can have more than one Gnus active at a time.
453 * Fetching a Group::            Starting Gnus just to read a group.
454 * New Groups::                  What is Gnus supposed to do with new groups?
455 * Changing Servers::            You may want to move from one server to another.
456 * Startup Files::               Those pesky startup files---@file{.newsrc}.
457 * Auto Save::                   Recovering from a crash.
458 * The Active File::             Reading the active file over a slow line Takes Time.
459 * Startup Variables::           Other variables you might change.
460
461 New Groups
462
463 * Checking New Groups::         Determining what groups are new.
464 * Subscription Methods::        What Gnus should do with new groups.
465 * Filtering New Groups::        Making Gnus ignore certain new groups.
466
467 Group Buffer
468
469 * Group Buffer Format::         Information listed and how you can change it.
470 * Group Maneuvering::           Commands for moving in the group buffer.
471 * Selecting a Group::           Actually reading news.
472 * Subscription Commands::       Unsubscribing, killing, subscribing.
473 * Group Data::                  Changing the info for a group.
474 * Group Levels::                Levels? What are those, then?
475 * Group Score::                 A mechanism for finding out what groups you like.
476 * Marking Groups::              You can mark groups for later processing.
477 * Foreign Groups::              Creating and editing groups.
478 * Group Parameters::            Each group may have different parameters set.
479 * Listing Groups::              Gnus can list various subsets of the groups.
480 * Sorting Groups::              Re-arrange the group order.
481 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
482 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
483 * Exiting Gnus::                Stop reading news and get some work done.
484 * Group Topics::                A folding group mode divided into topics.
485 * Misc Group Stuff::            Other stuff that you can to do.
486
487 Group Buffer Format
488
489 * Group Line Specification::    Deciding how the group buffer is to look.
490 * Group Modeline Specification::  The group buffer modeline.
491 * Group Highlighting::          Having nice colors in the group buffer.
492
493 Group Topics
494
495 * Topic Commands::              Interactive E-Z commands.
496 * Topic Variables::             How to customize the topics the Lisp Way.
497 * Topic Sorting::               Sorting each topic individually.
498 * Topic Topology::              A map of the world.
499 * Topic Parameters::            Parameters that apply to all groups in a topic.
500
501 Misc Group Stuff
502
503 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
504 * Group Information::           Information and help on groups and Gnus.
505 * Group Timestamp::             Making Gnus keep track of when you last read a group.
506 * File Commands::               Reading and writing the Gnus files.
507 * Sieve Commands::              Managing Sieve scripts.
508
509 Summary Buffer
510
511 * Summary Buffer Format::       Deciding how the summary buffer is to look.
512 * Summary Maneuvering::         Moving around the summary buffer.
513 * Choosing Articles::           Reading articles.
514 * Paging the Article::          Scrolling the current article.
515 * Reply Followup and Post::     Posting articles.
516 * Delayed Articles::            Send articles at a later time.
517 * Marking Articles::            Marking articles as read, expirable, etc.
518 * Limiting::                    You can limit the summary buffer.
519 * Threading::                   How threads are made.
520 * Sorting the Summary Buffer::  How articles and threads are sorted.
521 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
522 * Article Caching::             You may store articles in a cache.
523 * Persistent Articles::         Making articles expiry-resistant.
524 * Article Backlog::             Having already read articles hang around.
525 * Saving Articles::             Ways of customizing article saving.
526 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
527 * Article Treatment::           The article buffer can be mangled at will.
528 * MIME Commands::               Doing MIMEy things with the articles.
529 * Charsets::                    Character set issues.
530 * Article Commands::            Doing various things with the article buffer.
531 * Summary Sorting::             Sorting the summary buffer in various ways.
532 * Finding the Parent::          No child support? Get the parent.
533 * Alternative Approaches::      Reading using non-default summaries.
534 * Tree Display::                A more visual display of threads.
535 * Mail Group Commands::         Some commands can only be used in mail groups.
536 * Various Summary Stuff::       What didn't fit anywhere else.
537 * Exiting the Summary Buffer::  Returning to the Group buffer,
538                                 or reselecting the current group.
539 * Crosspost Handling::          How crossposted articles are dealt with.
540 * Duplicate Suppression::       An alternative when crosspost handling fails.
541 * Security::                    Decrypt and Verify.
542 * Mailing List::                Mailing list minor mode.
543
544 Summary Buffer Format
545
546 * Summary Buffer Lines::        You can specify how summary lines should look.
547 * To From Newsgroups::          How to not display your own name.
548 * Summary Buffer Mode Line::    You can say how the mode line should look.
549 * Summary Highlighting::        Making the summary buffer all pretty and nice.
550
551 Choosing Articles
552
553 * Choosing Commands::           Commands for choosing articles.
554 * Choosing Variables::          Variables that influence these commands.
555
556 Reply, Followup and Post
557
558 * Summary Mail Commands::       Sending mail.
559 * Summary Post Commands::       Sending news.
560 * Summary Message Commands::    Other Message-related commands.
561 * Canceling and Superseding::   
562
563 Marking Articles
564
565 * Unread Articles::             Marks for unread articles.
566 * Read Articles::               Marks for read articles.
567 * Other Marks::                 Marks that do not affect readedness.
568 * Setting Marks::               
569 * Generic Marking Commands::    
570 * Setting Process Marks::       
571
572 Marking Articles
573
574 * Setting Marks::             How to set and remove marks.
575 * Generic Marking Commands::  How to customize the marking.
576 * Setting Process Marks::     How to mark articles for later processing.
577
578 Threading
579
580 * Customizing Threading::       Variables you can change to affect the threading.
581 * Thread Commands::             Thread based commands in the summary buffer.
582
583 Customizing Threading
584
585 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
586 * Filling In Threads::          Making the threads displayed look fuller.
587 * More Threading::              Even more variables for fiddling with threads.
588 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
589
590 Decoding Articles
591
592 * Uuencoded Articles::          Uudecode articles.
593 * Shell Archives::              Unshar articles.
594 * PostScript Files::            Split PostScript.
595 * Other Files::                 Plain save and binhex.
596 * Decoding Variables::          Variables for a happy decoding.
597 * Viewing Files::               You want to look at the result of the decoding?
598
599 Decoding Variables
600
601 * Rule Variables::              Variables that say how a file is to be viewed.
602 * Other Decode Variables::      Other decode variables.
603 * Uuencoding and Posting::      Variables for customizing uuencoding.
604
605 Article Treatment
606
607 * Article Highlighting::        You want to make the article look like fruit salad.
608 * Article Fontisizing::         Making emphasized text look nice.
609 * Article Hiding::              You also want to make certain info go away.
610 * Article Washing::             Lots of way-neat functions to make life better.
611 * Article Header::              Doing various header transformations.
612 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
613 * Article Button Levels::       Controlling appearance of buttons.
614 * Article Date::                Grumble, UT!
615 * Article Display::             Display various stuff---X-Face, Picons, Smileys
616 * Article Signature::           What is a signature?
617 * Article Miscellania::         Various other stuff.
618
619 Alternative Approaches
620
621 * Pick and Read::               First mark articles and then read them.
622 * Binary Groups::               Auto-decode all articles.
623
624 Various Summary Stuff
625
626 * Summary Group Information::   Information oriented commands.
627 * Searching for Articles::      Multiple article commands.
628 * Summary Generation Commands::  
629 * Really Various Summary Commands::  Those pesky non-conformant commands.
630
631 Article Buffer
632
633 * Hiding Headers::              Deciding what headers should be displayed.
634 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
635 * Customizing Articles::        Tailoring the look of the articles.
636 * Article Keymap::              Keystrokes available in the article buffer.
637 * Misc Article::                Other stuff.
638
639 Composing Messages
640
641 * Mail::                        Mailing and replying.
642 * Posting Server::              What server should you post and mail via?
643 * Mail and Post::               Mailing and posting at the same time.
644 * Archived Messages::           Where Gnus stores the messages you've sent.
645 * Posting Styles::              An easier way to specify who you are.
646 * Drafts::                      Postponing messages and rejected messages.
647 * Rejected Articles::           What happens if the server doesn't like your article?
648 * Signing and encrypting::      How to compose secure messages.
649
650 Select Methods
651
652 * Server Buffer::               Making and editing virtual servers.
653 * Getting News::                Reading USENET news with Gnus.
654 * Getting Mail::                Reading your personal mail with Gnus.
655 * Browsing the Web::            Getting messages from a plethora of Web sources.
656 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
657 * Other Sources::               Reading directories, files, SOUP packets.
658 * Combined Groups::             Combining groups into one group.
659 * Gnus Unplugged::              Reading news and mail offline.
660
661 Server Buffer
662
663 * Server Buffer Format::        You can customize the look of this buffer.
664 * Server Commands::             Commands to manipulate servers.
665 * Example Methods::             Examples server specifications.
666 * Creating a Virtual Server::   An example session.
667 * Server Variables::            Which variables to set.
668 * Servers and Methods::         You can use server names as select methods.
669 * Unavailable Servers::         Some servers you try to contact may be down.
670
671 Getting News
672
673 * NNTP::                        Reading news from an @acronym{NNTP} server.
674 * News Spool::                  Reading news from the local spool.
675
676 @acronym{NNTP}
677
678 * Direct Functions::            Connecting directly to the server.
679 * Indirect Functions::          Connecting indirectly to the server.
680 * Common Variables::            Understood by several connection functions.
681
682 Getting Mail
683
684 * Mail in a Newsreader::        Important introductory notes.
685 * Getting Started Reading Mail::  A simple cookbook example.
686 * Splitting Mail::              How to create mail groups.
687 * Mail Sources::                How to tell Gnus where to get mail from.
688 * Mail Back End Variables::     Variables for customizing mail handling.
689 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
690 * Group Mail Splitting::        Use group customize to drive mail splitting.
691 * Incorporating Old Mail::      What about the old mail you have?
692 * Expiring Mail::               Getting rid of unwanted mail.
693 * Washing Mail::                Removing gruft from the mail you get.
694 * Duplicates::                  Dealing with duplicated mail.
695 * Not Reading Mail::            Using mail back ends for reading other files.
696 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
697
698 Mail Sources
699
700 * Mail Source Specifiers::      How to specify what a mail source is.
701 * Mail Source Customization::   Some variables that influence things.
702 * Fetching Mail::               Using the mail source specifiers.
703
704 Choosing a Mail Back End
705
706 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
707 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
708 * Mail Spool::                  Store your mail in a private spool?
709 * MH Spool::                    An mhspool-like back end.
710 * Maildir::                     Another one-file-per-message format.
711 * Mail Folders::                Having one file for each group.
712 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
713
714 Browsing the Web
715
716 * Archiving Mail::              
717 * Web Searches::                Creating groups from articles that match a string.
718 * Slashdot::                    Reading the Slashdot comments.
719 * Ultimate::                    The Ultimate Bulletin Board systems.
720 * Web Archive::                 Reading mailing list archived on web.
721 * RSS::                         Reading RDF site summary.
722 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
723
724 @acronym{IMAP}
725
726 * Splitting in IMAP::           Splitting mail with nnimap.
727 * Expiring in IMAP::            Expiring mail with nnimap.
728 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
729 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
730 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
731
732 Other Sources
733
734 * Directory Groups::            You can read a directory as if it was a newsgroup.
735 * Anything Groups::             Dired?  Who needs dired?
736 * Document Groups::             Single files can be the basis of a group.
737 * SOUP::                        Reading @sc{soup} packets ``offline''.
738 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
739
740 Document Groups
741
742 * Document Server Internals::   How to add your own document types.
743
744 SOUP
745
746 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
747 * SOUP Groups::                 A back end for reading @sc{soup} packets.
748 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
749
750 Combined Groups
751
752 * Virtual Groups::              Combining articles from many groups.
753 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
754
755 Gnus Unplugged
756
757 * Agent Basics::                How it all is supposed to work.
758 * Agent Categories::            How to tell the Gnus Agent what to download.
759 * Agent Commands::              New commands for all the buffers.
760 * Agent as Cache::              The Agent is a big cache too.
761 * Agent Expiry::                How to make old articles go away.
762 * Agent Regeneration::          How to recover from lost connections and other accidents.
763 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
764 * Outgoing Messages::           What happens when you post/mail something?
765 * Agent Variables::             Customizing is fun.
766 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
767 * Batching Agents::             How to fetch news from a @code{cron} job.
768 * Agent Caveats::               What you think it'll do and what it does.
769
770 Agent Categories
771
772 * Category Syntax::             What a category looks like.
773 * Category Buffer::             A buffer for maintaining categories.
774 * Category Variables::          Customize'r'Us.
775
776 Agent Commands
777
778 * Group Agent Commands::        Configure groups and fetch their contents.
779 * Summary Agent Commands::      Manually select then fetch specific articles.
780 * Server Agent Commands::       Select the servers that are supported by the agent.
781
782 Scoring
783
784 * Summary Score Commands::      Adding score entries for the current group.
785 * Group Score Commands::        General score commands.
786 * Score Variables::             Customize your scoring.  (My, what terminology).
787 * Score File Format::           What a score file may contain.
788 * Score File Editing::          You can edit score files by hand as well.
789 * Adaptive Scoring::            Big Sister Gnus knows what you read.
790 * Home Score File::             How to say where new score entries are to go.
791 * Followups To Yourself::       Having Gnus notice when people answer you.
792 * Scoring On Other Headers::    Scoring on non-standard headers.
793 * Scoring Tips::                How to score effectively.
794 * Reverse Scoring::             That problem child of old is not problem.
795 * Global Score Files::          Earth-spanning, ear-splitting score files.
796 * Kill Files::                  They are still here, but they can be ignored.
797 * Converting Kill Files::       Translating kill files to score files.
798 * GroupLens::                   Getting predictions on what you like to read.
799 * Advanced Scoring::            Using logical expressions to build score rules.
800 * Score Decays::                It can be useful to let scores wither away.
801
802 GroupLens
803
804 * Using GroupLens::             How to make Gnus use GroupLens.
805 * Rating Articles::             Letting GroupLens know how you rate articles.
806 * Displaying Predictions::      Displaying predictions given by GroupLens.
807 * GroupLens Variables::         Customizing GroupLens.
808
809 Advanced Scoring
810
811 * Advanced Scoring Syntax::     A definition.
812 * Advanced Scoring Examples::   What they look like.
813 * Advanced Scoring Tips::       Getting the most out of it.
814
815 Various
816
817 * Process/Prefix::              A convention used by many treatment commands.
818 * Interactive::                 Making Gnus ask you many questions.
819 * Symbolic Prefixes::           How to supply some Gnus functions with options.
820 * Formatting Variables::        You can specify what buffers should look like.
821 * Window Layout::               Configuring the Gnus buffer windows.
822 * Faces and Fonts::             How to change how faces look.
823 * Compilation::                 How to speed Gnus up.
824 * Mode Lines::                  Displaying information in the mode lines.
825 * Highlighting and Menus::      Making buffers look all nice and cozy.
826 * Buttons::                     Get tendinitis in ten easy steps!
827 * Daemons::                     Gnus can do things behind your back.
828 * NoCeM::                       How to avoid spam and other fatty foods.
829 * Undo::                        Some actions can be undone.
830 * Predicate Specifiers::        Specifying predicates.
831 * Moderation::                  What to do if you're a moderator.
832 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
833 * Fuzzy Matching::              What's the big fuzz?
834 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
835 * Various Various::             Things that are really various.
836
837 Formatting Variables
838
839 * Formatting Basics::           A formatting variable is basically a format string.
840 * Mode Line Formatting::        Some rules about mode line formatting variables.
841 * Advanced Formatting::         Modifying output in various ways.
842 * User-Defined Specs::          Having Gnus call your own functions.
843 * Formatting Fonts::            Making the formatting look colorful and nice.
844 * Positioning Point::           Moving point to a position after an operation.
845 * Tabulation::                  Tabulating your output.
846 * Wide Characters::             Dealing with wide characters.
847
848 Image Enhancements
849
850 * Picons::                      How to display pictures of what you're reading.
851 * Smileys::                     Show all those happy faces the way they were meant to be shown.
852 * X-Face::                      Display a funky, teensy black-and-white image.
853 * XVarious::                    Other XEmacsy Gnusey variables.
854
855 Thwarting Email Spam
856
857 * The problem of spam::         Some background, and some solutions
858 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
859 * SpamAssassin::                How to use external anti-spam tools.
860 * Hashcash::                    Reduce spam by burning CPU time.
861 * Filtering Spam Using The Spam ELisp Package::  
862 * Filtering Spam Using Statistics with spam-stat::  
863
864 Appendices
865
866 * XEmacs::                      Requirements for installing under XEmacs.
867 * History::                     How Gnus got where it is today.
868 * On Writing Manuals::          Why this is not a beginner's guide.
869 * Terminology::                 We use really difficult, like, words here.
870 * Customization::               Tailoring Gnus to your needs.
871 * Troubleshooting::             What you might try if things do not work.
872 * Gnus Reference Guide::        Rilly, rilly technical stuff.
873 * Emacs for Heathens::          A short introduction to Emacsian terms.
874 * Frequently Asked Questions::
875
876 History
877
878 * Gnus Versions::               What Gnus versions have been released.
879 * Other Gnus Versions::         Other Gnus versions that also have been released.
880 * Why?::                        What's the point of Gnus?
881 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
882 * Conformity::                  Gnus tries to conform to all standards.
883 * Emacsen::                     Gnus can be run on a few modern Emacsen.
884 * Gnus Development::            How Gnus is developed.
885 * Contributors::                Oodles of people.
886 * New Features::                Pointers to some of the new stuff in Gnus.
887
888 New Features
889
890 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
891 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
892 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
893 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
894 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
895
896 Customization
897
898 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
899 * Slow Terminal Connection::    You run a remote Emacs.
900 * Little Disk Space::           You feel that having large setup files is icky.
901 * Slow Machine::                You feel like buying a faster machine.
902
903 Gnus Reference Guide
904
905 * Gnus Utility Functions::      Common functions and variable to use.
906 * Back End Interface::          How Gnus communicates with the servers.
907 * Score File Syntax::           A BNF definition of the score file standard.
908 * Headers::                     How Gnus stores headers internally.
909 * Ranges::                      A handy format for storing mucho numbers.
910 * Group Info::                  The group info format.
911 * Extended Interactive::        Symbolic prefixes and stuff.
912 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
913 * Various File Formats::        Formats of files that Gnus use.
914
915 Back End Interface
916
917 * Required Back End Functions::  Functions that must be implemented.
918 * Optional Back End Functions::  Functions that need not be implemented.
919 * Error Messaging::             How to get messages and report errors.
920 * Writing New Back Ends::       Extending old back ends.
921 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
922 * Mail-like Back Ends::         Some tips on mail back ends.
923
924 Various File Formats
925
926 * Active File Format::          Information on articles and groups available.
927 * Newsgroups File Format::      Group descriptions.
928
929 Emacs for Heathens
930
931 * Keystrokes::                  Entering text and executing commands.
932 * Emacs Lisp::                  The built-in Emacs programming language.
933
934 @end detailmenu
935 @end menu
936
937 @node Starting Up
938 @chapter Starting Gnus
939 @cindex starting up
940
941 @kindex M-x gnus
942 @findex gnus
943 If your system administrator has set things up properly, starting Gnus
944 and reading news is extremely easy---you just type @kbd{M-x gnus} in
945 your Emacs.
946
947 @findex gnus-other-frame
948 @kindex M-x gnus-other-frame
949 If you want to start Gnus in a different frame, you can use the command
950 @kbd{M-x gnus-other-frame} instead.
951
952 If things do not go smoothly at startup, you have to twiddle some
953 variables in your @file{~/.gnus.el} file.  This file is similar to
954 @file{~/.emacs}, but is read when gnus starts.
955
956 If you puzzle at any terms used in this manual, please refer to the
957 terminology section (@pxref{Terminology}).
958
959 @menu
960 * Finding the News::            Choosing a method for getting news.
961 * The First Time::              What does Gnus do the first time you start it?
962 * The Server is Down::          How can I read my mail then?
963 * Slave Gnusae::                You can have more than one Gnus active at a time.
964 * Fetching a Group::            Starting Gnus just to read a group.
965 * New Groups::                  What is Gnus supposed to do with new groups?
966 * Changing Servers::            You may want to move from one server to another.
967 * Startup Files::               Those pesky startup files---@file{.newsrc}.
968 * Auto Save::                   Recovering from a crash.
969 * The Active File::             Reading the active file over a slow line Takes Time.
970 * Startup Variables::           Other variables you might change.
971 @end menu
972
973
974 @node Finding the News
975 @section Finding the News
976 @cindex finding news
977
978 @vindex gnus-select-method
979 @c @head
980 The @code{gnus-select-method} variable says where Gnus should look for
981 news.  This variable should be a list where the first element says
982 @dfn{how} and the second element says @dfn{where}.  This method is your
983 native method.  All groups not fetched with this method are
984 foreign groups.
985
986 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
987 you want to get your daily dosage of news from, you'd say:
988
989 @lisp
990 (setq gnus-select-method '(nntp "news.somewhere.edu"))
991 @end lisp
992
993 If you want to read directly from the local spool, say:
994
995 @lisp
996 (setq gnus-select-method '(nnspool ""))
997 @end lisp
998
999 If you can use a local spool, you probably should, as it will almost
1000 certainly be much faster.  But do not use the local spool if your
1001 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1002
1003 @vindex gnus-nntpserver-file
1004 @cindex NNTPSERVER
1005 @cindex @acronym{NNTP} server
1006 If this variable is not set, Gnus will take a look at the
1007 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1008 Gnus will see whether @code{gnus-nntpserver-file}
1009 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1010 If that fails as well, Gnus will try to use the machine running Emacs
1011 as an @acronym{NNTP} server.  That's a long shot, though.
1012
1013 @vindex gnus-nntp-server
1014 If @code{gnus-nntp-server} is set, this variable will override
1015 @code{gnus-select-method}.  You should therefore set
1016 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1017
1018 @vindex gnus-secondary-servers
1019 @vindex gnus-nntp-server
1020 You can also make Gnus prompt you interactively for the name of an
1021 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1022 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1023 in the @code{gnus-secondary-servers} list (if any).  You can also just
1024 type in the name of any server you feel like visiting.  (Note that this
1025 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1026 gnus} later in the same Emacs session, Gnus will contact the same
1027 server.)
1028
1029 @findex gnus-group-browse-foreign-server
1030 @kindex B (Group)
1031 However, if you use one @acronym{NNTP} server regularly and are just
1032 interested in a couple of groups from a different server, you would be
1033 better served by using the @kbd{B} command in the group buffer.  It will
1034 let you have a look at what groups are available, and you can subscribe
1035 to any of the groups you want to.  This also makes @file{.newsrc}
1036 maintenance much tidier.  @xref{Foreign Groups}.
1037
1038 @vindex gnus-secondary-select-methods
1039 @c @head
1040 A slightly different approach to foreign groups is to set the
1041 @code{gnus-secondary-select-methods} variable.  The select methods
1042 listed in this variable are in many ways just as native as the
1043 @code{gnus-select-method} server.  They will also be queried for active
1044 files during startup (if that's required), and new newsgroups that
1045 appear on these servers will be subscribed (or not) just as native
1046 groups are.
1047
1048 For instance, if you use the @code{nnmbox} back end to read your mail,
1049 you would typically set this variable to
1050
1051 @lisp
1052 (setq gnus-secondary-select-methods '((nnmbox "")))
1053 @end lisp
1054
1055
1056 @node The First Time
1057 @section The First Time
1058 @cindex first time usage
1059
1060 If no startup files exist, Gnus will try to determine what groups should
1061 be subscribed by default.
1062
1063 @vindex gnus-default-subscribed-newsgroups
1064 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1065 will subscribe you to just those groups in that list, leaving the rest
1066 killed.  Your system administrator should have set this variable to
1067 something useful.
1068
1069 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1070 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1071 here as @dfn{whatever Lars thinks you should read}.)
1072
1073 You'll also be subscribed to the Gnus documentation group, which should
1074 help you with most common problems.
1075
1076 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1077 use the normal functions for handling new groups, and not do anything
1078 special.
1079
1080
1081 @node The Server is Down
1082 @section The Server is Down
1083 @cindex server errors
1084
1085 If the default server is down, Gnus will understandably have some
1086 problems starting.  However, if you have some mail groups in addition to
1087 the news groups, you may want to start Gnus anyway.
1088
1089 Gnus, being the trusting sort of program, will ask whether to proceed
1090 without a native select method if that server can't be contacted.  This
1091 will happen whether the server doesn't actually exist (i.e., you have
1092 given the wrong address) or the server has just momentarily taken ill
1093 for some reason or other.  If you decide to continue and have no foreign
1094 groups, you'll find it difficult to actually do anything in the group
1095 buffer.  But, hey, that's your problem.  Blllrph!
1096
1097 @findex gnus-no-server
1098 @kindex M-x gnus-no-server
1099 @c @head
1100 If you know that the server is definitely down, or you just want to read
1101 your mail without bothering with the server at all, you can use the
1102 @code{gnus-no-server} command to start Gnus.  That might come in handy
1103 if you're in a hurry as well.  This command will not attempt to contact
1104 your primary server---instead, it will just activate all groups on level
1105 1 and 2.  (You should preferably keep no native groups on those two
1106 levels.) Also @pxref{Group Levels}.
1107
1108
1109 @node Slave Gnusae
1110 @section Slave Gnusae
1111 @cindex slave
1112
1113 You might want to run more than one Emacs with more than one Gnus at the
1114 same time.  If you are using different @file{.newsrc} files (e.g., if you
1115 are using the two different Gnusae to read from two different servers),
1116 that is no problem whatsoever.  You just do it.
1117
1118 The problem appears when you want to run two Gnusae that use the same
1119 @file{.newsrc} file.
1120
1121 To work around that problem some, we here at the Think-Tank at the Gnus
1122 Towers have come up with a new concept: @dfn{Masters} and
1123 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1124 taken out a copyright on those words.  If you wish to use those words in
1125 conjunction with each other, you have to send $1 per usage instance to
1126 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1127 Applications}) will be much more expensive, of course.)
1128
1129 @findex gnus-slave
1130 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1131 however you do it).  Each subsequent slave Gnusae should be started with
1132 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1133 files, but instead save @dfn{slave files} that contain information only
1134 on what groups have been read in the slave session.  When a master Gnus
1135 starts, it will read (and delete) these slave files, incorporating all
1136 information from them.  (The slave files will be read in the sequence
1137 they were created, so the latest changes will have precedence.)
1138
1139 Information from the slave files has, of course, precedence over the
1140 information in the normal (i.e., master) @file{.newsrc} file.
1141
1142 If the @file{.newsrc*} files have not been saved in the master when the
1143 slave starts, you may be prompted as to whether to read an auto-save
1144 file.  If you answer ``yes'', the unsaved changes to the master will be
1145 incorporated into the slave.  If you answer ``no'', the slave may see some
1146 messages as unread that have been read in the master.
1147
1148 @node Fetching a Group
1149 @section Fetching a Group
1150 @cindex fetching a group
1151
1152 @findex gnus-fetch-group
1153 It is sometimes convenient to be able to just say ``I want to read this
1154 group and I don't care whether Gnus has been started or not''.  This is
1155 perhaps more useful for people who write code than for users, but the
1156 command @code{gnus-fetch-group} provides this functionality in any case.
1157 It takes the group name as a parameter.
1158
1159
1160 @node New Groups
1161 @section New Groups
1162 @cindex new groups
1163 @cindex subscription
1164
1165 @vindex gnus-check-new-newsgroups
1166 If you are satisfied that you really never want to see any new groups,
1167 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1168 also save you some time at startup.  Even if this variable is
1169 @code{nil}, you can always subscribe to the new groups just by pressing
1170 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1171 is @code{ask-server} by default.  If you set this variable to
1172 @code{always}, then Gnus will query the back ends for new groups even
1173 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1174
1175 @menu
1176 * Checking New Groups::         Determining what groups are new.
1177 * Subscription Methods::        What Gnus should do with new groups.
1178 * Filtering New Groups::        Making Gnus ignore certain new groups.
1179 @end menu
1180
1181
1182 @node Checking New Groups
1183 @subsection Checking New Groups
1184
1185 Gnus normally determines whether a group is new or not by comparing the
1186 list of groups from the active file(s) with the lists of subscribed and
1187 dead groups.  This isn't a particularly fast method.  If
1188 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1189 server for new groups since the last time.  This is both faster and
1190 cheaper.  This also means that you can get rid of the list of killed
1191 groups altogether, so you may set @code{gnus-save-killed-list} to
1192 @code{nil}, which will save time both at startup, at exit, and all over.
1193 Saves disk space, too.  Why isn't this the default, then?
1194 Unfortunately, not all servers support this command.
1195
1196 I bet I know what you're thinking now: How do I find out whether my
1197 server supports @code{ask-server}?  No?  Good, because I don't have a
1198 fail-safe answer.  I would suggest just setting this variable to
1199 @code{ask-server} and see whether any new groups appear within the next
1200 few days.  If any do, then it works.  If none do, then it doesn't
1201 work.  I could write a function to make Gnus guess whether the server
1202 supports @code{ask-server}, but it would just be a guess.  So I won't.
1203 You could @code{telnet} to the server and say @code{HELP} and see
1204 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1205 it does, then it might work.  (But there are servers that lists
1206 @samp{NEWGROUPS} without supporting the function properly.)
1207
1208 This variable can also be a list of select methods.  If so, Gnus will
1209 issue an @code{ask-server} command to each of the select methods, and
1210 subscribe them (or not) using the normal methods.  This might be handy
1211 if you are monitoring a few servers for new groups.  A side effect is
1212 that startup will take much longer, so you can meditate while waiting.
1213 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1214
1215
1216 @node Subscription Methods
1217 @subsection Subscription Methods
1218
1219 @vindex gnus-subscribe-newsgroup-method
1220 What Gnus does when it encounters a new group is determined by the
1221 @code{gnus-subscribe-newsgroup-method} variable.
1222
1223 This variable should contain a function.  This function will be called
1224 with the name of the new group as the only parameter.
1225
1226 Some handy pre-fab functions are:
1227
1228 @table @code
1229
1230 @item gnus-subscribe-zombies
1231 @vindex gnus-subscribe-zombies
1232 Make all new groups zombies.  This is the default.  You can browse the
1233 zombies later (with @kbd{A z}) and either kill them all off properly
1234 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1235
1236 @item gnus-subscribe-randomly
1237 @vindex gnus-subscribe-randomly
1238 Subscribe all new groups in arbitrary order.  This really means that all
1239 new groups will be added at ``the top'' of the group buffer.
1240
1241 @item gnus-subscribe-alphabetically
1242 @vindex gnus-subscribe-alphabetically
1243 Subscribe all new groups in alphabetical order.
1244
1245 @item gnus-subscribe-hierarchically
1246 @vindex gnus-subscribe-hierarchically
1247 Subscribe all new groups hierarchically.  The difference between this
1248 function and @code{gnus-subscribe-alphabetically} is slight.
1249 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1250 alphabetical fashion, while this function will enter groups into its
1251 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1252 @samp{comp} hierarchy, this function will not mess that configuration
1253 up.  Or something like that.
1254
1255 @item gnus-subscribe-interactively
1256 @vindex gnus-subscribe-interactively
1257 Subscribe new groups interactively.  This means that Gnus will ask
1258 you about @strong{all} new groups.  The groups you choose to subscribe
1259 to will be subscribed hierarchically.
1260
1261 @item gnus-subscribe-killed
1262 @vindex gnus-subscribe-killed
1263 Kill all new groups.
1264
1265 @item gnus-subscribe-topics
1266 @vindex gnus-subscribe-topics
1267 Put the groups into the topic that has a matching @code{subscribe} topic
1268 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1269 topic parameter that looks like
1270
1271 @example
1272 "nnslashdot"
1273 @end example
1274
1275 will mean that all groups that match that regex will be subscribed under
1276 that topic.
1277
1278 If no topics match the groups, the groups will be subscribed in the
1279 top-level topic.
1280
1281 @end table
1282
1283 @vindex gnus-subscribe-hierarchical-interactive
1284 A closely related variable is
1285 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1286 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1287 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1288 will ask you for each sub-hierarchy whether you want to descend the
1289 hierarchy or not.
1290
1291 One common mistake is to set the variable a few paragraphs above
1292 (@code{gnus-subscribe-newsgroup-method}) to
1293 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1294 will not work.  This is ga-ga.  So don't do it.
1295
1296
1297 @node Filtering New Groups
1298 @subsection Filtering New Groups
1299
1300 A nice and portable way to control which new newsgroups should be
1301 subscribed (or ignored) is to put an @dfn{options} line at the start of
1302 the @file{.newsrc} file.  Here's an example:
1303
1304 @example
1305 options -n !alt.all !rec.all sci.all
1306 @end example
1307
1308 @vindex gnus-subscribe-options-newsgroup-method
1309 This line obviously belongs to a serious-minded intellectual scientific
1310 person (or she may just be plain old boring), because it says that all
1311 groups that have names beginning with @samp{alt} and @samp{rec} should
1312 be ignored, and all groups with names beginning with @samp{sci} should
1313 be subscribed.  Gnus will not use the normal subscription method for
1314 subscribing these groups.
1315 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1316 variable defaults to @code{gnus-subscribe-alphabetically}.
1317
1318 @vindex gnus-options-not-subscribe
1319 @vindex gnus-options-subscribe
1320 If you don't want to mess with your @file{.newsrc} file, you can just
1321 set the two variables @code{gnus-options-subscribe} and
1322 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1323 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1324 and if the new group matches the former, it will be unconditionally
1325 subscribed, and if it matches the latter, it will be ignored.
1326
1327 @vindex gnus-auto-subscribed-groups
1328 Yet another variable that meddles here is
1329 @code{gnus-auto-subscribed-groups}.  It works exactly like
1330 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1331 thought it would be nice to have two of these.  This variable is more
1332 meant for setting some ground rules, while the other variable is used
1333 more for user fiddling.  By default this variable makes all new groups
1334 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1335 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1336 subscribed.  If you don't like that, just set this variable to
1337 @code{nil}.
1338
1339 New groups that match this regexp are subscribed using
1340 @code{gnus-subscribe-options-newsgroup-method}.
1341
1342
1343 @node Changing Servers
1344 @section Changing Servers
1345 @cindex changing servers
1346
1347 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1348 This happens very rarely, but perhaps you change jobs, or one server is
1349 very flaky and you want to use another.
1350
1351 Changing the server is pretty easy, right?  You just change
1352 @code{gnus-select-method} to point to the new server?
1353
1354 @emph{Wrong!}
1355
1356 Article numbers are not (in any way) kept synchronized between different
1357 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1358 you have read is by keeping track of article numbers.  So when you
1359 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1360 worthless.
1361
1362 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1363 file from one server to another.  They all have one thing in
1364 common---they take a looong time to run.  You don't want to use these
1365 functions more than absolutely necessary.
1366
1367 @kindex M-x gnus-change-server
1368 @findex gnus-change-server
1369 If you have access to both servers, Gnus can request the headers for all
1370 the articles you have read and compare @code{Message-ID}s and map the
1371 article numbers of the read articles and article marks.  The @kbd{M-x
1372 gnus-change-server} command will do this for all your native groups.  It
1373 will prompt for the method you want to move to.
1374
1375 @kindex M-x gnus-group-move-group-to-server
1376 @findex gnus-group-move-group-to-server
1377 You can also move individual groups with the @kbd{M-x
1378 gnus-group-move-group-to-server} command.  This is useful if you want to
1379 move a (foreign) group from one server to another.
1380
1381 @kindex M-x gnus-group-clear-data-on-native-groups
1382 @findex gnus-group-clear-data-on-native-groups
1383 If you don't have access to both the old and new server, all your marks
1384 and read ranges have become worthless.  You can use the @kbd{M-x
1385 gnus-group-clear-data-on-native-groups} command to clear out all data
1386 that you have on your native groups.  Use with caution.
1387
1388 @kindex M-x gnus-group-clear-data
1389 @findex gnus-group-clear-data
1390 Clear the data from the current group only---nix out marks and the
1391 list of read articles (@code{gnus-group-clear-data}).
1392
1393 After changing servers, you @strong{must} move the cache hierarchy away,
1394 since the cached articles will have wrong article numbers, which will
1395 affect which articles Gnus thinks are read.
1396 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1397 to have it done automatically; for @code{gnus-group-clear-data}, you
1398 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1399 cache for all groups).
1400
1401
1402 @node Startup Files
1403 @section Startup Files
1404 @cindex startup files
1405 @cindex .newsrc
1406 @cindex .newsrc.el
1407 @cindex .newsrc.eld
1408
1409 Now, you all know about the @file{.newsrc} file.  All subscription
1410 information is traditionally stored in this file.
1411
1412 Things got a bit more complicated with @sc{gnus}.  In addition to
1413 keeping the @file{.newsrc} file updated, it also used a file called
1414 @file{.newsrc.el} for storing all the information that didn't fit into
1415 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1416 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1417 files was the most recently saved, which enabled people to swap between
1418 @sc{gnus} and other newsreaders.
1419
1420 That was kinda silly, so Gnus went one better: In addition to the
1421 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1422 @file{.newsrc.eld}.  It will read whichever of these files that are most
1423 recent, but it will never write a @file{.newsrc.el} file.  You should
1424 never delete the @file{.newsrc.eld} file---it contains much information
1425 not stored in the @file{.newsrc} file.
1426
1427 @vindex gnus-save-newsrc-file
1428 @vindex gnus-read-newsrc-file
1429 You can turn off writing the @file{.newsrc} file by setting
1430 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1431 the file and save some space, as well as exiting from Gnus faster.
1432 However, this will make it impossible to use other newsreaders than
1433 Gnus.  But hey, who would want to, right?  Similarly, setting
1434 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1435 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1436 convenient if you have a tendency to use Netscape once in a while.
1437
1438 @vindex gnus-save-killed-list
1439 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1440 will not save the list of killed groups to the startup file.  This will
1441 save both time (when starting and quitting) and space (on disk).  It
1442 will also mean that Gnus has no record of what groups are new or old,
1443 so the automatic new groups subscription methods become meaningless.
1444 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1445 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1446 Groups}).  This variable can also be a regular expression.  If that's
1447 the case, remove all groups that do not match this regexp before
1448 saving.  This can be useful in certain obscure situations that involve
1449 several servers where not all servers support @code{ask-server}.
1450
1451 @vindex gnus-startup-file
1452 @vindex gnus-backup-startup-file
1453 @vindex version-control
1454 The @code{gnus-startup-file} variable says where the startup files are.
1455 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1456 file being whatever that one is, with a @samp{.eld} appended.
1457 If you want version control for this file, set
1458 @code{gnus-backup-startup-file}.  It respects the same values as the
1459 @code{version-control} variable.
1460
1461 @vindex gnus-save-newsrc-hook
1462 @vindex gnus-save-quick-newsrc-hook
1463 @vindex gnus-save-standard-newsrc-hook
1464 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1465 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1466 saving the @file{.newsrc.eld} file, and
1467 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1468 @file{.newsrc} file.  The latter two are commonly used to turn version
1469 control on or off.  Version control is on by default when saving the
1470 startup files.  If you want to turn backup creation off, say something like:
1471
1472 @lisp
1473 (defun turn-off-backup ()
1474   (set (make-local-variable 'backup-inhibited) t))
1475
1476 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1477 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1478 @end lisp
1479
1480 @vindex gnus-init-file
1481 @vindex gnus-site-init-file
1482 When Gnus starts, it will read the @code{gnus-site-init-file}
1483 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1484 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1485 and can be used to avoid cluttering your @file{~/.emacs} and
1486 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1487 with the same names as these, but with @file{.elc} and @file{.el}
1488 suffixes.  In other words, if you have set @code{gnus-init-file} to
1489 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1490 and finally @file{~/.gnus} (in this order).
1491
1492
1493
1494 @node Auto Save
1495 @section Auto Save
1496 @cindex dribble file
1497 @cindex auto-save
1498
1499 Whenever you do something that changes the Gnus data (reading articles,
1500 catching up, killing/subscribing groups), the change is added to a
1501 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1502 Emacs way.  If your Emacs should crash before you have saved the
1503 @file{.newsrc} files, all changes you have made can be recovered from
1504 this file.
1505
1506 If Gnus detects this file at startup, it will ask the user whether to
1507 read it.  The auto save file is deleted whenever the real startup file is
1508 saved.
1509
1510 @vindex gnus-use-dribble-file
1511 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1512 maintain a dribble buffer.  The default is @code{t}.
1513
1514 @vindex gnus-dribble-directory
1515 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1516 this variable is @code{nil}, which it is by default, Gnus will dribble
1517 into the directory where the @file{.newsrc} file is located.  (This is
1518 normally the user's home directory.)  The dribble file will get the same
1519 file permissions as the @file{.newsrc} file.
1520
1521 @vindex gnus-always-read-dribble-file
1522 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1523 read the dribble file on startup without querying the user.
1524
1525
1526 @node The Active File
1527 @section The Active File
1528 @cindex active file
1529 @cindex ignored groups
1530
1531 When Gnus starts, or indeed whenever it tries to determine whether new
1532 articles have arrived, it reads the active file.  This is a very large
1533 file that lists all the active groups and articles on the server.
1534
1535 @vindex gnus-ignored-newsgroups
1536 Before examining the active file, Gnus deletes all lines that match the
1537 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1538 any groups with bogus names, but you can use this variable to make Gnus
1539 ignore hierarchies you aren't ever interested in.  However, this is not
1540 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1541 Groups} for an overview of other variables that can be used instead.
1542
1543 @c This variable is
1544 @c @code{nil} by default, and will slow down active file handling somewhat
1545 @c if you set it to anything else.
1546
1547 @vindex gnus-read-active-file
1548 @c @head
1549 The active file can be rather Huge, so if you have a slow network, you
1550 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1551 reading the active file.  This variable is @code{some} by default.
1552
1553 Gnus will try to make do by getting information just on the groups that
1554 you actually subscribe to.
1555
1556 Note that if you subscribe to lots and lots of groups, setting this
1557 variable to @code{nil} will probably make Gnus slower, not faster.  At
1558 present, having this variable @code{nil} will slow Gnus down
1559 considerably, unless you read news over a 2400 baud modem.
1560
1561 This variable can also have the value @code{some}.  Gnus will then
1562 attempt to read active info only on the subscribed groups.  On some
1563 servers this is quite fast (on sparkling, brand new INN servers that
1564 support the @code{LIST ACTIVE group} command), on others this isn't fast
1565 at all.  In any case, @code{some} should be faster than @code{nil}, and
1566 is certainly faster than @code{t} over slow lines.
1567
1568 Some news servers (old versions of Leafnode and old versions of INN, for
1569 instance) do not support the @code{LIST ACTIVE group}.  For these
1570 servers, @code{nil} is probably the most efficient value for this
1571 variable.
1572
1573 If this variable is @code{nil}, Gnus will ask for group info in total
1574 lock-step, which isn't very fast.  If it is @code{some} and you use an
1575 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1576 read all the replies in one swoop.  This will normally result in better
1577 performance, but if the server does not support the aforementioned
1578 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1579
1580 If you think that starting up Gnus takes too long, try all the three
1581 different values for this variable and see what works best for you.
1582
1583 In any case, if you use @code{some} or @code{nil}, you should definitely
1584 kill all groups that you aren't interested in to speed things up.
1585
1586 Note that this variable also affects active file retrieval from
1587 secondary select methods.
1588
1589
1590 @node Startup Variables
1591 @section Startup Variables
1592
1593 @table @code
1594
1595 @item gnus-load-hook
1596 @vindex gnus-load-hook
1597 A hook run while Gnus is being loaded.  Note that this hook will
1598 normally be run just once in each Emacs session, no matter how many
1599 times you start Gnus.
1600
1601 @item gnus-before-startup-hook
1602 @vindex gnus-before-startup-hook
1603 A hook run after starting up Gnus successfully.
1604
1605 @item gnus-startup-hook
1606 @vindex gnus-startup-hook
1607 A hook run as the very last thing after starting up Gnus
1608
1609 @item gnus-started-hook
1610 @vindex gnus-started-hook
1611 A hook that is run as the very last thing after starting up Gnus
1612 successfully.
1613
1614 @item gnus-setup-news-hook
1615 @vindex gnus-setup-news-hook
1616 A hook that is run after reading the @file{.newsrc} file(s), but before
1617 generating the group buffer.
1618
1619 @item gnus-check-bogus-newsgroups
1620 @vindex gnus-check-bogus-newsgroups
1621 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1622 startup.  A @dfn{bogus group} is a group that you have in your
1623 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1624 bogus groups can take quite a while, so to save time and resources it's
1625 best to leave this option off, and do the checking for bogus groups once
1626 in a while from the group buffer instead (@pxref{Group Maintenance}).
1627
1628 @item gnus-inhibit-startup-message
1629 @vindex gnus-inhibit-startup-message
1630 If non-@code{nil}, the startup message won't be displayed.  That way,
1631 your boss might not notice as easily that you are reading news instead
1632 of doing your job.  Note that this variable is used before
1633 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1634
1635 @item gnus-no-groups-message
1636 @vindex gnus-no-groups-message
1637 Message displayed by Gnus when no groups are available.
1638
1639 @item gnus-play-startup-jingle
1640 @vindex gnus-play-startup-jingle
1641 If non-@code{nil}, play the Gnus jingle at startup.
1642
1643 @item gnus-startup-jingle
1644 @vindex gnus-startup-jingle
1645 Jingle to be played if the above variable is non-@code{nil}.  The
1646 default is @samp{Tuxedomoon.Jingle4.au}.
1647
1648 @end table
1649
1650
1651 @node Group Buffer
1652 @chapter Group Buffer
1653 @cindex group buffer
1654
1655 @c Alex Schroeder suggests to rearrange this as follows:
1656 @c
1657 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1658 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1659 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1660 @c   7. Group Score, 8. Group Buffer Format
1661 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1662 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1663 @c <kensanata> First, "Gnus considers groups... (default 9)."
1664 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1665 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1666 @c <kensanata> Then expand the next paragraph or add some more to it.
1667 @c    This short one sentence explains levels 1 and 2, therefore I understand
1668 @c    that I should keep important news at 3 and boring news at 4.
1669 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1670 @c    Maybe keep those that you don't want to read temporarily at 6,
1671 @c    those that you never want to read at 8, those that offend your
1672 @c    human rights at 9...
1673
1674
1675 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1676 is the first buffer shown when Gnus starts, and will never be killed as
1677 long as Gnus is active.
1678
1679 @iftex
1680 @iflatex
1681 \gnusfigure{The Group Buffer}{320}{
1682 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1683 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1684 \put(120,38){\vector(1,2){10}}
1685 \put(40,60){\makebox(0,0)[r]{Mode line}}
1686 \put(40,58){\vector(1,0){30}}
1687 \put(200,28){\makebox(0,0)[t]{Native select method}}
1688 \put(200,26){\vector(-1,2){15}}
1689 }
1690 @end iflatex
1691 @end iftex
1692
1693 @menu
1694 * Group Buffer Format::         Information listed and how you can change it.
1695 * Group Maneuvering::           Commands for moving in the group buffer.
1696 * Selecting a Group::           Actually reading news.
1697 * Subscription Commands::       Unsubscribing, killing, subscribing.
1698 * Group Data::                  Changing the info for a group.
1699 * Group Levels::                Levels? What are those, then?
1700 * Group Score::                 A mechanism for finding out what groups you like.
1701 * Marking Groups::              You can mark groups for later processing.
1702 * Foreign Groups::              Creating and editing groups.
1703 * Group Parameters::            Each group may have different parameters set.
1704 * Listing Groups::              Gnus can list various subsets of the groups.
1705 * Sorting Groups::              Re-arrange the group order.
1706 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1707 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1708 * Exiting Gnus::                Stop reading news and get some work done.
1709 * Group Topics::                A folding group mode divided into topics.
1710 * Misc Group Stuff::            Other stuff that you can to do.
1711 @end menu
1712
1713
1714 @node Group Buffer Format
1715 @section Group Buffer Format
1716
1717 @menu
1718 * Group Line Specification::    Deciding how the group buffer is to look.
1719 * Group Modeline Specification::  The group buffer modeline.
1720 * Group Highlighting::          Having nice colors in the group buffer.
1721 @end menu
1722
1723
1724 @node Group Line Specification
1725 @subsection Group Line Specification
1726 @cindex group buffer format
1727
1728 The default format of the group buffer is nice and dull, but you can
1729 make it as exciting and ugly as you feel like.
1730
1731 Here's a couple of example group lines:
1732
1733 @example
1734      25: news.announce.newusers
1735  *    0: alt.fan.andrea-dworkin
1736 @end example
1737
1738 Quite simple, huh?
1739
1740 You can see that there are 25 unread articles in
1741 @samp{news.announce.newusers}.  There are no unread articles, but some
1742 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1743 asterisk at the beginning of the line?).
1744
1745 @vindex gnus-group-line-format
1746 You can change that format to whatever you want by fiddling with the
1747 @code{gnus-group-line-format} variable.  This variable works along the
1748 lines of a @code{format} specification, which is pretty much the same as
1749 a @code{printf} specifications, for those of you who use (feh!) C.
1750 @xref{Formatting Variables}.
1751
1752 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1753
1754 There should always be a colon on the line; the cursor always moves to
1755 the colon after performing an operation.  @xref{Positioning
1756 Point}. Nothing else is required---not even the group name.  All
1757 displayed text is just window dressing, and is never examined by Gnus.
1758 Gnus stores all real information it needs using text properties.
1759
1760 (Note that if you make a really strange, wonderful, spreadsheet-like
1761 layout, everybody will believe you are hard at work with the accounting
1762 instead of wasting time reading news.)
1763
1764 Here's a list of all available format characters:
1765
1766 @table @samp
1767
1768 @item M
1769 An asterisk if the group only has marked articles.
1770
1771 @item S
1772 Whether the group is subscribed.
1773
1774 @item L
1775 Level of subscribedness.
1776
1777 @item N
1778 Number of unread articles.
1779
1780 @item I
1781 Number of dormant articles.
1782
1783 @item T
1784 Number of ticked articles.
1785
1786 @item R
1787 Number of read articles.
1788
1789 @item U
1790 Number of unseen articles.
1791
1792 @item t
1793 Estimated total number of articles.  (This is really @var{max-number}
1794 minus @var{min-number} plus 1.)
1795
1796 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1797 efficient access to @var{max-number} and @var{min-number} but getting
1798 the true unread message count is not possible efficiently.  For
1799 hysterical raisins, even the mail back ends, where the true number of
1800 unread messages might be available efficiently, use the same limited
1801 interface.  To remove this restriction from Gnus means that the back
1802 end interface has to be changed, which is not an easy job.  If you
1803 want to work on this, please contact the Gnus mailing list.
1804
1805 @item y
1806 Number of unread, unticked, non-dormant articles.
1807
1808 @item i
1809 Number of ticked and dormant articles.
1810
1811 @item g
1812 Full group name.
1813
1814 @item G
1815 Group name.
1816
1817 @item C
1818 Group comment (@pxref{Group Parameters}) or group name if there is no
1819 comment element in the group parameters.
1820
1821 @item D
1822 Newsgroup description.  You need to read the group descriptions
1823 before these will appear, and to do that, you either have to set
1824 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1825 command. 
1826
1827 @item o
1828 @samp{m} if moderated.
1829
1830 @item O
1831 @samp{(m)} if moderated.
1832
1833 @item s
1834 Select method.
1835
1836 @item B
1837 If the summary buffer for the group is open or not.
1838
1839 @item n
1840 Select from where.
1841
1842 @item z
1843 A string that looks like @samp{<%s:%n>} if a foreign select method is
1844 used.
1845
1846 @item P
1847 Indentation based on the level of the topic (@pxref{Group Topics}).
1848
1849 @item c
1850 @vindex gnus-group-uncollapsed-levels
1851 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1852 variable says how many levels to leave at the end of the group name.
1853 The default is 1---this will mean that group names like
1854 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1855
1856 @item m
1857 @vindex gnus-new-mail-mark
1858 @cindex %
1859 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1860 the group lately.
1861
1862 @item p
1863 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1864
1865 @item d
1866 A string that says when you last read the group (@pxref{Group
1867 Timestamp}).
1868
1869 @item u
1870 User defined specifier.  The next character in the format string should
1871 be a letter.  Gnus will call the function
1872 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1873 following @samp{%u}.  The function will be passed a single dummy
1874 parameter as argument.  The function should return a string, which will
1875 be inserted into the buffer just like information from any other
1876 specifier.
1877 @end table
1878
1879 @cindex *
1880 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1881 if no info is available---for instance, if it is a non-activated foreign
1882 group, or a bogus native group.
1883
1884
1885 @node Group Modeline Specification
1886 @subsection Group Modeline Specification
1887 @cindex group modeline
1888
1889 @vindex gnus-group-mode-line-format
1890 The mode line can be changed by setting
1891 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1892 doesn't understand that many format specifiers:
1893
1894 @table @samp
1895 @item S
1896 The native news server.
1897 @item M
1898 The native select method.
1899 @end table
1900
1901
1902 @node Group Highlighting
1903 @subsection Group Highlighting
1904 @cindex highlighting
1905 @cindex group highlighting
1906
1907 @vindex gnus-group-highlight
1908 Highlighting in the group buffer is controlled by the
1909 @code{gnus-group-highlight} variable.  This is an alist with elements
1910 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1911 something non-@code{nil}, the @var{face} will be used on the line.
1912
1913 Here's an example value for this variable that might look nice if the
1914 background is dark:
1915
1916 @lisp
1917 (cond (window-system
1918        (setq custom-background-mode 'light)
1919        (defface my-group-face-1
1920          '((t (:foreground "Red" :bold t))) "First group face")
1921        (defface my-group-face-2
1922          '((t (:foreground "DarkSeaGreen4" :bold t))) "Second group face")
1923        (defface my-group-face-3
1924          '((t (:foreground "Green4" :bold t))) "Third group face")
1925        (defface my-group-face-4
1926          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1927        (defface my-group-face-5
1928          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1929
1930 (setq gnus-group-highlight
1931       '(((> unread 200) . my-group-face-1)
1932         ((and (< level 3) (zerop unread)) . my-group-face-2)
1933         ((< level 3) . my-group-face-3)
1934         ((zerop unread) . my-group-face-4)
1935         (t . my-group-face-5)))
1936 @end lisp
1937
1938 Also @pxref{Faces and Fonts}.
1939
1940 Variables that are dynamically bound when the forms are evaluated
1941 include:
1942
1943 @table @code
1944 @item group
1945 The group name.
1946 @item unread
1947 The number of unread articles in the group.
1948 @item method
1949 The select method.
1950 @item mailp
1951 Whether the group is a mail group.
1952 @item level
1953 The level of the group.
1954 @item score
1955 The score of the group.
1956 @item ticked
1957 The number of ticked articles in the group.
1958 @item total
1959 The total number of articles in the group.  Or rather,
1960 @var{max-number} minus @var{min-number} plus one.
1961 @item topic
1962 When using the topic minor mode, this variable is bound to the current
1963 topic being inserted.
1964 @end table
1965
1966 When the forms are @code{eval}ed, point is at the beginning of the line
1967 of the group in question, so you can use many of the normal Gnus
1968 functions for snarfing info on the group.
1969
1970 @vindex gnus-group-update-hook
1971 @findex gnus-group-highlight-line
1972 @code{gnus-group-update-hook} is called when a group line is changed.
1973 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1974 calls @code{gnus-group-highlight-line} by default.
1975
1976
1977 @node Group Maneuvering
1978 @section Group Maneuvering
1979 @cindex group movement
1980
1981 All movement commands understand the numeric prefix and will behave as
1982 expected, hopefully.
1983
1984 @table @kbd
1985
1986 @item n
1987 @kindex n (Group)
1988 @findex gnus-group-next-unread-group
1989 Go to the next group that has unread articles
1990 (@code{gnus-group-next-unread-group}).
1991
1992 @item p
1993 @itemx DEL
1994 @kindex DEL (Group)
1995 @kindex p (Group)
1996 @findex gnus-group-prev-unread-group
1997 Go to the previous group that has unread articles
1998 (@code{gnus-group-prev-unread-group}).
1999
2000 @item N
2001 @kindex N (Group)
2002 @findex gnus-group-next-group
2003 Go to the next group (@code{gnus-group-next-group}).
2004
2005 @item P
2006 @kindex P (Group)
2007 @findex gnus-group-prev-group
2008 Go to the previous group (@code{gnus-group-prev-group}).
2009
2010 @item M-n
2011 @kindex M-n (Group)
2012 @findex gnus-group-next-unread-group-same-level
2013 Go to the next unread group on the same (or lower) level
2014 (@code{gnus-group-next-unread-group-same-level}).
2015
2016 @item M-p
2017 @kindex M-p (Group)
2018 @findex gnus-group-prev-unread-group-same-level
2019 Go to the previous unread group on the same (or lower) level
2020 (@code{gnus-group-prev-unread-group-same-level}).
2021 @end table
2022
2023 Three commands for jumping to groups:
2024
2025 @table @kbd
2026
2027 @item j
2028 @kindex j (Group)
2029 @findex gnus-group-jump-to-group
2030 Jump to a group (and make it visible if it isn't already)
2031 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2032 like living groups.
2033
2034 @item ,
2035 @kindex , (Group)
2036 @findex gnus-group-best-unread-group
2037 Jump to the unread group with the lowest level
2038 (@code{gnus-group-best-unread-group}).
2039
2040 @item .
2041 @kindex . (Group)
2042 @findex gnus-group-first-unread-group
2043 Jump to the first group with unread articles
2044 (@code{gnus-group-first-unread-group}).
2045 @end table
2046
2047 @vindex gnus-group-goto-unread
2048 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2049 commands will move to the next group, not the next unread group.  Even
2050 the commands that say they move to the next unread group.  The default
2051 is @code{t}.
2052
2053
2054 @node Selecting a Group
2055 @section Selecting a Group
2056 @cindex group selection
2057
2058 @table @kbd
2059
2060 @item SPACE
2061 @kindex SPACE (Group)
2062 @findex gnus-group-read-group
2063 Select the current group, switch to the summary buffer and display the
2064 first unread article (@code{gnus-group-read-group}).  If there are no
2065 unread articles in the group, or if you give a non-numerical prefix to
2066 this command, Gnus will offer to fetch all the old articles in this
2067 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2068 determines the number of articles Gnus will fetch.  If @var{n} is
2069 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2070 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2071
2072 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2073 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2074 - 4 2 SPC} fetches the 42 oldest ones.
2075
2076 When you are in the group (in the Summary buffer), you can type
2077 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2078 ones.
2079
2080 @item RET
2081 @kindex RET (Group)
2082 @findex gnus-group-select-group
2083 Select the current group and switch to the summary buffer
2084 (@code{gnus-group-select-group}).  Takes the same arguments as
2085 @code{gnus-group-read-group}---the only difference is that this command
2086 does not display the first unread article automatically upon group
2087 entry.
2088
2089 @item M-RET
2090 @kindex M-RET (Group)
2091 @findex gnus-group-quick-select-group
2092 This does the same as the command above, but tries to do it with the
2093 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2094 scoring/killing will be performed, there will be no highlights and no
2095 expunging.  This might be useful if you're in a real hurry and have to
2096 enter some humongous group.  If you give a 0 prefix to this command
2097 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2098 which is useful if you want to toggle threading before generating the
2099 summary buffer (@pxref{Summary Generation Commands}).
2100
2101 @item M-SPACE
2102 @kindex M-SPACE (Group)
2103 @findex gnus-group-visible-select-group
2104 This is yet one more command that does the same as the @kbd{RET}
2105 command, but this one does it without expunging and hiding dormants
2106 (@code{gnus-group-visible-select-group}).
2107
2108 @item C-M-RET
2109 @kindex C-M-RET (Group)
2110 @findex gnus-group-select-group-ephemerally
2111 Finally, this command selects the current group ephemerally without
2112 doing any processing of its contents
2113 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2114 turned off.  Everything you do in the group after selecting it in this
2115 manner will have no permanent effects.
2116
2117 @end table
2118
2119 @vindex gnus-large-newsgroup
2120 The @code{gnus-large-newsgroup} variable says what Gnus should consider
2121 to be a big group.  This is 200 by default.  If the group has more
2122 (unread and/or ticked) articles than this, Gnus will query the user
2123 before entering the group.  The user can then specify how many articles
2124 should be fetched from the server.  If the user specifies a negative
2125 number (@code{-n}), the @code{n} oldest articles will be fetched.  If it
2126 is positive, the @code{n} articles that have arrived most recently will
2127 be fetched.
2128
2129 @vindex gnus-large-ephemeral-newsgroup
2130 Same as @code{gnus-large-newsgroup}, but only used for ephemeral
2131 newsgroups.
2132
2133 @vindex gnus-select-group-hook
2134 @vindex gnus-auto-select-first
2135 @vindex gnus-auto-select-subject
2136 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2137 automatically when entering a group with the @kbd{SPACE} command.
2138 Which article this is is controlled by the
2139 @code{gnus-auto-select-subject} variable.  Valid values for this
2140 variable is:
2141
2142 @table @code
2143
2144 @item unread
2145 Place point on the subject line of the first unread article.
2146
2147 @item first
2148 Place point on the subject line of the first article.
2149
2150 @item unseen
2151 Place point on the subject line of the first unseen article.
2152
2153 @item unseen-or-unread
2154 Place point on the subject line of the first unseen article, and if
2155 there is no such article, place point on the subject line of the first
2156 unread article.
2157
2158 @item best
2159 Place point on the subject line of the highest-scored unread article.
2160
2161 @end table
2162
2163 This variable can also be a function.  In that case, that function
2164 will be called to place point on a subject line.
2165
2166 If you want to prevent automatic selection in some group (say, in a
2167 binary group with Huge articles) you can set the
2168 @code{gnus-auto-select-first} variable to @code{nil} in
2169 @code{gnus-select-group-hook}, which is called when a group is
2170 selected.
2171
2172
2173 @node Subscription Commands
2174 @section Subscription Commands
2175 @cindex subscription
2176
2177 @table @kbd
2178
2179 @item S t
2180 @itemx u
2181 @kindex S t (Group)
2182 @kindex u (Group)
2183 @findex gnus-group-unsubscribe-current-group
2184 @c @icon{gnus-group-unsubscribe}
2185 Toggle subscription to the current group
2186 (@code{gnus-group-unsubscribe-current-group}).
2187
2188 @item S s
2189 @itemx U
2190 @kindex S s (Group)
2191 @kindex U (Group)
2192 @findex gnus-group-unsubscribe-group
2193 Prompt for a group to subscribe, and then subscribe it.  If it was
2194 subscribed already, unsubscribe it instead
2195 (@code{gnus-group-unsubscribe-group}).
2196
2197 @item S k
2198 @itemx C-k
2199 @kindex S k (Group)
2200 @kindex C-k (Group)
2201 @findex gnus-group-kill-group
2202 @c @icon{gnus-group-kill-group}
2203 Kill the current group (@code{gnus-group-kill-group}).
2204
2205 @item S y
2206 @itemx C-y
2207 @kindex S y (Group)
2208 @kindex C-y (Group)
2209 @findex gnus-group-yank-group
2210 Yank the last killed group (@code{gnus-group-yank-group}).
2211
2212 @item C-x C-t
2213 @kindex C-x C-t (Group)
2214 @findex gnus-group-transpose-groups
2215 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2216 really a subscription command, but you can use it instead of a
2217 kill-and-yank sequence sometimes.
2218
2219 @item S w
2220 @itemx C-w
2221 @kindex S w (Group)
2222 @kindex C-w (Group)
2223 @findex gnus-group-kill-region
2224 Kill all groups in the region (@code{gnus-group-kill-region}).
2225
2226 @item S z
2227 @kindex S z (Group)
2228 @findex gnus-group-kill-all-zombies
2229 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2230
2231 @item S C-k
2232 @kindex S C-k (Group)
2233 @findex gnus-group-kill-level
2234 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2235 These groups can't be yanked back after killing, so this command should
2236 be used with some caution.  The only time where this command comes in
2237 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2238 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2239 kill off all unsubscribed groups that do not have message numbers in the
2240 @file{.newsrc} file.
2241
2242 @end table
2243
2244 Also @pxref{Group Levels}.
2245
2246
2247 @node Group Data
2248 @section Group Data
2249
2250 @table @kbd
2251
2252 @item c
2253 @kindex c (Group)
2254 @findex gnus-group-catchup-current
2255 @vindex gnus-group-catchup-group-hook
2256 @c @icon{gnus-group-catchup-current}
2257 Mark all unticked articles in this group as read
2258 (@code{gnus-group-catchup-current}).
2259 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2260 the group buffer.
2261
2262 @item C
2263 @kindex C (Group)
2264 @findex gnus-group-catchup-current-all
2265 Mark all articles in this group, even the ticked ones, as read
2266 (@code{gnus-group-catchup-current-all}).
2267
2268 @item M-c
2269 @kindex M-c (Group)
2270 @findex gnus-group-clear-data
2271 Clear the data from the current group---nix out marks and the list of
2272 read articles (@code{gnus-group-clear-data}).
2273
2274 @item M-x gnus-group-clear-data-on-native-groups
2275 @kindex M-x gnus-group-clear-data-on-native-groups
2276 @findex gnus-group-clear-data-on-native-groups
2277 If you have switched from one @acronym{NNTP} server to another, all your marks
2278 and read ranges have become worthless.  You can use this command to
2279 clear out all data that you have on your native groups.  Use with
2280 caution.
2281
2282 @end table
2283
2284
2285 @node Group Levels
2286 @section Group Levels
2287 @cindex group level
2288 @cindex level
2289
2290 All groups have a level of @dfn{subscribedness}.  For instance, if a
2291 group is on level 2, it is more subscribed than a group on level 5.  You
2292 can ask Gnus to just list groups on a given level or lower
2293 (@pxref{Listing Groups}), or to just check for new articles in groups on
2294 a given level or lower (@pxref{Scanning New Messages}).
2295
2296 Remember:  The higher the level of the group, the less important it is.
2297
2298 @table @kbd
2299
2300 @item S l
2301 @kindex S l (Group)
2302 @findex gnus-group-set-current-level
2303 Set the level of the current group.  If a numeric prefix is given, the
2304 next @var{n} groups will have their levels set.  The user will be
2305 prompted for a level.
2306 @end table
2307
2308 @vindex gnus-level-killed
2309 @vindex gnus-level-zombie
2310 @vindex gnus-level-unsubscribed
2311 @vindex gnus-level-subscribed
2312 Gnus considers groups from levels 1 to
2313 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2314 @code{gnus-level-subscribed} (exclusive) and
2315 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2316 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2317 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2318 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2319 same, but zombie and killed groups have no information on what articles
2320 you have read, etc, stored.  This distinction between dead and living
2321 groups isn't done because it is nice or clever, it is done purely for
2322 reasons of efficiency.
2323
2324 It is recommended that you keep all your mail groups (if any) on quite
2325 low levels (e.g. 1 or 2).
2326
2327 Maybe the following description of the default behavior of Gnus helps to
2328 understand what these levels are all about.  By default, Gnus shows you
2329 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2330 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2331 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2332 groups are hidden, in a way.
2333
2334 Zombie and killed groups are similar to unsubscribed groups in that they
2335 are hidden by default.  But they are different from subscribed and
2336 unsubscribed groups in that Gnus doesn't ask the news server for
2337 information (number of messages, number of unread messages) on zombie
2338 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2339 aren't interested in.  If most groups are killed, Gnus is faster.
2340
2341 Why does Gnus distinguish between zombie and killed groups?  Well, when
2342 a new group arrives on the server, Gnus by default makes it a zombie
2343 group.  This means that you are normally not bothered with new groups,
2344 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2345 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2346 list of killed groups.)
2347
2348 If you want to play with the level variables, you should show some care.
2349 Set them once, and don't touch them ever again.  Better yet, don't touch
2350 them at all unless you know exactly what you're doing.
2351
2352 @vindex gnus-level-default-unsubscribed
2353 @vindex gnus-level-default-subscribed
2354 Two closely related variables are @code{gnus-level-default-subscribed}
2355 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2356 which are the levels that new groups will be put on if they are
2357 (un)subscribed.  These two variables should, of course, be inside the
2358 relevant valid ranges.
2359
2360 @vindex gnus-keep-same-level
2361 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2362 will only move to groups of the same level (or lower).  In
2363 particular, going from the last article in one group to the next group
2364 will go to the next group of the same level (or lower).  This might be
2365 handy if you want to read the most important groups before you read the
2366 rest.
2367
2368 If this variable is @code{best}, Gnus will make the next newsgroup the
2369 one with the best level.
2370
2371 @vindex gnus-group-default-list-level
2372 All groups with a level less than or equal to
2373 @code{gnus-group-default-list-level} will be listed in the group buffer
2374 by default.
2375
2376 @vindex gnus-group-list-inactive-groups
2377 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2378 groups will be listed along with the unread groups.  This variable is
2379 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2380 listed.
2381
2382 @vindex gnus-group-use-permanent-levels
2383 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2384 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2385 use this level as the ``work'' level.
2386
2387 @vindex gnus-activate-level
2388 Gnus will normally just activate (i. e., query the server about) groups
2389 on level @code{gnus-activate-level} or less.  If you don't want to
2390 activate unsubscribed groups, for instance, you might set this variable
2391 to 5.  The default is 6.
2392
2393
2394 @node Group Score
2395 @section Group Score
2396 @cindex group score
2397 @cindex group rank
2398 @cindex rank
2399
2400 You would normally keep important groups on high levels, but that scheme
2401 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2402 group buffer according to how often you read groups, perhaps?  Within
2403 reason?
2404
2405 This is what @dfn{group score} is for.  You can have Gnus assign a score
2406 to each group through the mechanism described below.  You can then sort
2407 the group buffer based on this score.  Alternatively, you can sort on
2408 score and then level.  (Taken together, the level and the score is
2409 called the @dfn{rank} of the group.  A group that is on level 4 and has
2410 a score of 1 has a higher rank than a group on level 5 that has a score
2411 of 300.  (The level is the most significant part and the score is the
2412 least significant part.))
2413
2414 @findex gnus-summary-bubble-group
2415 If you want groups you read often to get higher scores than groups you
2416 read seldom you can add the @code{gnus-summary-bubble-group} function to
2417 the @code{gnus-summary-exit-hook} hook.  This will result (after
2418 sorting) in a bubbling sort of action.  If you want to see that in
2419 action after each summary exit, you can add
2420 @code{gnus-group-sort-groups-by-rank} or
2421 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2422 slow things down somewhat.
2423
2424
2425 @node Marking Groups
2426 @section Marking Groups
2427 @cindex marking groups
2428
2429 If you want to perform some command on several groups, and they appear
2430 subsequently in the group buffer, you would normally just give a
2431 numerical prefix to the command.  Most group commands will then do your
2432 bidding on those groups.
2433
2434 However, if the groups are not in sequential order, you can still
2435 perform a command on several groups.  You simply mark the groups first
2436 with the process mark and then execute the command.
2437
2438 @table @kbd
2439
2440 @item #
2441 @kindex # (Group)
2442 @itemx M m
2443 @kindex M m (Group)
2444 @findex gnus-group-mark-group
2445 Set the mark on the current group (@code{gnus-group-mark-group}).
2446
2447 @item M-#
2448 @kindex M-# (Group)
2449 @itemx M u
2450 @kindex M u (Group)
2451 @findex gnus-group-unmark-group
2452 Remove the mark from the current group
2453 (@code{gnus-group-unmark-group}).
2454
2455 @item M U
2456 @kindex M U (Group)
2457 @findex gnus-group-unmark-all-groups
2458 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2459
2460 @item M w
2461 @kindex M w (Group)
2462 @findex gnus-group-mark-region
2463 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2464
2465 @item M b
2466 @kindex M b (Group)
2467 @findex gnus-group-mark-buffer
2468 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2469
2470 @item M r
2471 @kindex M r (Group)
2472 @findex gnus-group-mark-regexp
2473 Mark all groups that match some regular expression
2474 (@code{gnus-group-mark-regexp}).
2475 @end table
2476
2477 Also @pxref{Process/Prefix}.
2478
2479 @findex gnus-group-universal-argument
2480 If you want to execute some command on all groups that have been marked
2481 with the process mark, you can use the @kbd{M-&}
2482 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2483 the command to be executed.
2484
2485
2486 @node Foreign Groups
2487 @section Foreign Groups
2488 @cindex foreign groups
2489
2490 Below are some group mode commands for making and editing general foreign
2491 groups, as well as commands to ease the creation of a few
2492 special-purpose groups.  All these commands insert the newly created
2493 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2494 consulted.
2495
2496 @table @kbd
2497
2498 @item G m
2499 @kindex G m (Group)
2500 @findex gnus-group-make-group
2501 @cindex making groups
2502 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2503 for a name, a method and possibly an @dfn{address}.  For an easier way
2504 to subscribe to @acronym{NNTP} groups, @pxref{Browse Foreign Server}.
2505
2506 @item G r
2507 @kindex G r (Group)
2508 @findex gnus-group-rename-group
2509 @cindex renaming groups
2510 Rename the current group to something else
2511 (@code{gnus-group-rename-group}).  This is valid only on some
2512 groups---mail groups mostly.  This command might very well be quite slow
2513 on some back ends.
2514
2515 @item G c
2516 @kindex G c (Group)
2517 @cindex customizing
2518 @findex gnus-group-customize
2519 Customize the group parameters (@code{gnus-group-customize}).
2520
2521 @item G e
2522 @kindex G e (Group)
2523 @findex gnus-group-edit-group-method
2524 @cindex renaming groups
2525 Enter a buffer where you can edit the select method of the current
2526 group (@code{gnus-group-edit-group-method}).
2527
2528 @item G p
2529 @kindex G p (Group)
2530 @findex gnus-group-edit-group-parameters
2531 Enter a buffer where you can edit the group parameters
2532 (@code{gnus-group-edit-group-parameters}).
2533
2534 @item G E
2535 @kindex G E (Group)
2536 @findex gnus-group-edit-group
2537 Enter a buffer where you can edit the group info
2538 (@code{gnus-group-edit-group}).
2539
2540 @item G d
2541 @kindex G d (Group)
2542 @findex gnus-group-make-directory-group
2543 @cindex nndir
2544 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2545 for a directory name (@code{gnus-group-make-directory-group}).
2546
2547 @item G h
2548 @kindex G h (Group)
2549 @cindex help group
2550 @findex gnus-group-make-help-group
2551 Make the Gnus help group (@code{gnus-group-make-help-group}).
2552
2553 @item G a
2554 @kindex G a (Group)
2555 @cindex (ding) archive
2556 @cindex archive group
2557 @findex gnus-group-make-archive-group
2558 @vindex gnus-group-archive-directory
2559 @vindex gnus-group-recent-archive-directory
2560 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2561 default a group pointing to the most recent articles will be created
2562 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2563 group will be created from @code{gnus-group-archive-directory}.
2564
2565 @item G k
2566 @kindex G k (Group)
2567 @findex gnus-group-make-kiboze-group
2568 @cindex nnkiboze
2569 Make a kiboze group.  You will be prompted for a name, for a regexp to
2570 match groups to be ``included'' in the kiboze group, and a series of
2571 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2572 @xref{Kibozed Groups}.
2573
2574 @item G D
2575 @kindex G D (Group)
2576 @findex gnus-group-enter-directory
2577 @cindex nneething
2578 Read an arbitrary directory as if it were a newsgroup with the
2579 @code{nneething} back end (@code{gnus-group-enter-directory}).
2580 @xref{Anything Groups}.
2581
2582 @item G f
2583 @kindex G f (Group)
2584 @findex gnus-group-make-doc-group
2585 @cindex ClariNet Briefs
2586 @cindex nndoc
2587 Make a group based on some file or other
2588 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2589 command, you will be prompted for a file name and a file type.
2590 Currently supported types are @code{mbox}, @code{babyl},
2591 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2592 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2593 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2594 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2595 you run this command without a prefix, Gnus will guess at the file
2596 type.  @xref{Document Groups}.
2597
2598 @item G u
2599 @kindex G u (Group)
2600 @vindex gnus-useful-groups
2601 @findex gnus-group-make-useful-group
2602 Create one of the groups mentioned in @code{gnus-useful-groups}
2603 (@code{gnus-group-make-useful-group}).
2604
2605 @item G w
2606 @kindex G w (Group)
2607 @findex gnus-group-make-web-group
2608 @cindex Google
2609 @cindex nnweb
2610 @cindex gmane
2611 Make an ephemeral group based on a web search
2612 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2613 command, make a solid group instead.  You will be prompted for the
2614 search engine type and the search string.  Valid search engine types
2615 include @code{google}, @code{dejanews}, and @code{gmane}.
2616 @xref{Web Searches}.
2617
2618 If you use the @code{google} search engine, you can limit the search
2619 to a particular group by using a match string like
2620 @samp{shaving group:alt.sysadmin.recovery}.
2621
2622 @item G DEL
2623 @kindex G DEL (Group)
2624 @findex gnus-group-delete-group
2625 This function will delete the current group
2626 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2627 actually delete all the articles in the group, and forcibly remove the
2628 group itself from the face of the Earth.  Use a prefix only if you are
2629 absolutely sure of what you are doing.  This command can't be used on
2630 read-only groups (like @code{nntp} group), though.
2631
2632 @item G V
2633 @kindex G V (Group)
2634 @findex gnus-group-make-empty-virtual
2635 Make a new, fresh, empty @code{nnvirtual} group
2636 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2637
2638 @item G v
2639 @kindex G v (Group)
2640 @findex gnus-group-add-to-virtual
2641 Add the current group to an @code{nnvirtual} group
2642 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2643 @end table
2644
2645 @xref{Select Methods}, for more information on the various select
2646 methods.
2647
2648 @vindex gnus-activate-foreign-newsgroups
2649 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2650 Gnus will check all foreign groups with this level or lower at startup.
2651 This might take quite a while, especially if you subscribe to lots of
2652 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2653 @code{gnus-activate-level} also affects activation of foreign
2654 newsgroups.
2655
2656
2657 @node Group Parameters
2658 @section Group Parameters
2659 @cindex group parameters
2660
2661 The group parameters store information local to a particular group.
2662 Here's an example group parameter list:
2663
2664 @example
2665 ((to-address . "ding@@gnus.org")
2666  (auto-expire . t))
2667 @end example
2668
2669 We see that each element consists of a ``dotted pair''---the thing before
2670 the dot is the key, while the thing after the dot is the value.  All the
2671 parameters have this form @emph{except} local variable specs, which are
2672 not dotted pairs, but proper lists.
2673
2674 Some parameters have correspondant customizable variables, each of which
2675 is an alist of regexps and values.
2676
2677 The following group parameters can be used:
2678
2679 @table @code
2680 @item to-address
2681 @cindex to-address
2682 Address used by when doing followups and new posts.
2683
2684 @example
2685 (to-address . "some@@where.com")
2686 @end example
2687
2688 This is primarily useful in mail groups that represent closed mailing
2689 lists---mailing lists where it's expected that everybody that writes to
2690 the mailing list is subscribed to it.  Since using this parameter
2691 ensures that the mail only goes to the mailing list itself, it means
2692 that members won't receive two copies of your followups.
2693
2694 Using @code{to-address} will actually work whether the group is foreign
2695 or not.  Let's say there's a group on the server that is called
2696 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2697 the articles from a mail-to-news gateway.  Posting directly to this
2698 group is therefore impossible---you have to send mail to the mailing
2699 list address instead.
2700
2701 See also @code{gnus-parameter-to-address-alist}.
2702
2703 @item to-list
2704 @cindex to-list
2705 Address used when doing @kbd{a} in that group.
2706
2707 @example
2708 (to-list . "some@@where.com")
2709 @end example
2710
2711 It is totally ignored
2712 when doing a followup---except that if it is present in a news group,
2713 you'll get mail group semantics when doing @kbd{f}.
2714
2715 If you do an @kbd{a} command in a mail group and you have neither a
2716 @code{to-list} group parameter nor a @code{to-address} group parameter,
2717 then a @code{to-list} group parameter will be added automatically upon
2718 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2719 @vindex gnus-add-to-list
2720
2721 If you do an @kbd{a} command in a mail group and you don't have a
2722 @code{to-list} group parameter, one will be added automatically upon
2723 sending the message.
2724
2725 @findex gnus-mailing-list-mode
2726 @cindex Mail List Groups
2727 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2728 entering summary buffer.
2729
2730 See also @code{gnus-parameter-to-list-alist}.
2731
2732 @anchor{subscribed}
2733 @item subscribed
2734 @cindex subscribed
2735 If this parameter is set to @code{t}, Gnus will consider the
2736 to-address and to-list parameters for this group as addresses of
2737 mailing lists you are subscribed to.  Giving Gnus this information is
2738 (only) a first step in getting it to generate correct Mail-Followup-To
2739 headers for your posts to these lists.  Look here @pxref{Mailing
2740 Lists, , Mailing Lists, message, The Message Manual} for a complete
2741 treatment of available MFT support.
2742
2743 See also @code{gnus-find-subscribed-addresses}, the function that
2744 directly uses this group parameter.
2745
2746 @item visible
2747 @cindex visible
2748 If the group parameter list has the element @code{(visible . t)},
2749 that group will always be visible in the Group buffer, regardless
2750 of whether it has any unread articles.
2751
2752 @item broken-reply-to
2753 @cindex broken-reply-to
2754 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2755 headers in this group are to be ignored, and for the header to be hidden
2756 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2757 can be useful if you're reading a mailing list group where the listserv
2758 has inserted @code{Reply-To} headers that point back to the listserv
2759 itself.  That is broken behavior.  So there!
2760
2761 @item to-group
2762 @cindex to-group
2763 Elements like @code{(to-group . "some.group.name")} means that all
2764 posts in that group will be sent to @code{some.group.name}.
2765
2766 @item newsgroup
2767 @cindex newsgroup
2768 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2769 will treat all responses as if they were responses to news articles.
2770 This can be useful if you have a mail group that's really a mirror of a
2771 news group.
2772
2773 @item gcc-self
2774 @cindex gcc-self
2775 If @code{(gcc-self . t)} is present in the group parameter list, newly
2776 composed messages will be @code{Gcc}'d to the current group.  If
2777 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2778 generated, if @code{(gcc-self . "string")} is present, this string will
2779 be inserted literally as a @code{gcc} header.  This parameter takes
2780 precedence over any default @code{Gcc} rules as described later
2781 (@pxref{Archived Messages}).  CAVEAT:: It yields an error putting
2782 @code{(gcc-self . t)} in groups of a @code{nntp} server or so, because
2783 a @code{nntp} server doesn't accept articles.
2784
2785 @item auto-expire
2786 @cindex auto-expire
2787 If the group parameter has an element that looks like @code{(auto-expire
2788 . t)}, all articles read will be marked as expirable.  For an
2789 alternative approach, @pxref{Expiring Mail}.
2790
2791 See also @code{gnus-auto-expirable-newsgroups}.
2792
2793 @item total-expire
2794 @cindex total-expire
2795 If the group parameter has an element that looks like
2796 @code{(total-expire . t)}, all read articles will be put through the
2797 expiry process, even if they are not marked as expirable.  Use with
2798 caution.  Unread, ticked and dormant articles are not eligible for
2799 expiry.
2800
2801 See also @code{gnus-total-expirable-newsgroups}.
2802
2803 @item expiry-wait
2804 @cindex expiry-wait
2805 @vindex nnmail-expiry-wait-function
2806 If the group parameter has an element that looks like
2807 @code{(expiry-wait . 10)}, this value will override any
2808 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2809 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2810 can either be a number of days (not necessarily an integer) or the
2811 symbols @code{never} or @code{immediate}.
2812
2813 @item score-file
2814 @cindex score file group parameter
2815 Elements that look like @code{(score-file . "file")} will make
2816 @file{file} into the current score file for the group in question.  All
2817 interactive score entries will be put into this file.
2818
2819 @item adapt-file
2820 @cindex adapt file group parameter
2821 Elements that look like @code{(adapt-file . "file")} will make
2822 @file{file} into the current adaptive file for the group in question.
2823 All adaptive score entries will be put into this file.
2824
2825 @item admin-address
2826 @cindex admin-address
2827 When unsubscribing from a mailing list you should never send the
2828 unsubscription notice to the mailing list itself.  Instead, you'd send
2829 messages to the administrative address.  This parameter allows you to
2830 put the admin address somewhere convenient.
2831
2832 @item display
2833 @cindex display
2834 Elements that look like @code{(display . MODE)} say which articles to
2835 display on entering the group.  Valid values are:
2836
2837 @table @code
2838 @item all
2839 Display all articles, both read and unread.
2840
2841 @item an integer
2842 Display the last @var{integer} articles in the group.  This is the same as
2843 entering the group with @kbd{C-u @var{integer}}.
2844
2845 @item default
2846 Display the default visible articles, which normally includes unread and
2847 ticked articles.
2848
2849 @item an array
2850 Display articles that satisfy a predicate.
2851
2852 Here are some examples:
2853
2854 @table @code
2855 @item [unread]
2856 Display only unread articles.
2857
2858 @item [not expire]
2859 Display everything except expirable articles.
2860
2861 @item [and (not reply) (not expire)]
2862 Display everything except expirable and articles you've already
2863 responded to.
2864 @end table
2865
2866 The available operators are @code{not}, @code{and} and @code{or}.
2867 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2868 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2869 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2870 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2871
2872 @end table
2873
2874 The @code{display} parameter works by limiting the summary buffer to
2875 the subset specified.  You can pop the limit by using the @kbd{/ w}
2876 command (@pxref{Limiting}).
2877
2878 @item comment
2879 @cindex comment
2880 Elements that look like @code{(comment . "This is a comment")} are
2881 arbitrary comments on the group.  You can display comments in the
2882 group line (@pxref{Group Line Specification}).
2883
2884 @item charset
2885 @cindex charset
2886 Elements that look like @code{(charset . iso-8859-1)} will make
2887 @code{iso-8859-1} the default charset; that is, the charset that will be
2888 used for all articles that do not specify a charset.
2889
2890 See also @code{gnus-group-charset-alist}.
2891
2892 @item ignored-charsets
2893 @cindex ignored-charset
2894 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2895 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2896 default charset will be used for decoding articles.
2897
2898 See also @code{gnus-group-ignored-charsets-alist}.
2899
2900 @item posting-style
2901 @cindex posting-style
2902 You can store additional posting style information for this group
2903 here (@pxref{Posting Styles}).  The format is that of an entry in the
2904 @code{gnus-posting-styles} alist, except that there's no regexp matching
2905 the group name (of course).  Style elements in this group parameter will
2906 take precedence over the ones found in @code{gnus-posting-styles}.
2907
2908 For instance, if you want a funky name and signature in this group only,
2909 instead of hacking @code{gnus-posting-styles}, you could put something
2910 like this in the group parameters:
2911
2912 @example
2913 (posting-style
2914   (name "Funky Name")
2915   ("X-My-Header" "Funky Value")
2916   (signature "Funky Signature"))
2917 @end example
2918
2919 @item post-method
2920 @cindex post-method
2921 If it is set, the value is used as the method for posting message
2922 instead of @code{gnus-post-method}.
2923
2924 @item banner
2925 @cindex banner
2926 An item like @code{(banner . @var{regexp})} causes any part of an article
2927 that matches the regular expression @var{regexp} to be stripped. Instead of
2928 @var{regexp}, you can also use the symbol @code{signature} which strips the
2929 last signature or any of the elements of the alist
2930 @code{gnus-article-banner-alist}.
2931
2932 @item sieve
2933 @cindex sieve
2934 This parameter contains a Sieve test that should match incoming mail
2935 that should be placed in this group.  From this group parameter, a
2936 Sieve @samp{IF} control structure is generated, having the test as the
2937 condition and @samp{fileinto "group.name";} as the body.
2938
2939 For example, if the INBOX.list.sieve group has the @code{(sieve
2940 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2941 translating the group parameter into a Sieve script (@pxref{Sieve
2942 Commands}) the following Sieve code is generated:
2943
2944 @example
2945 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2946         fileinto \"INBOX.list.sieve\";
2947 @}
2948 @end example
2949
2950 The Sieve language is described in RFC 3028.  @xref{Top, , Top, sieve,
2951 Emacs Sieve}.
2952
2953 @item (@var{variable} @var{form})
2954 You can use the group parameters to set variables local to the group you
2955 are entering.  If you want to turn threading off in @samp{news.answers},
2956 you could put @code{(gnus-show-threads nil)} in the group parameters of
2957 that group.  @code{gnus-show-threads} will be made into a local variable
2958 in the summary buffer you enter, and the form @code{nil} will be
2959 @code{eval}ed there.
2960
2961 Note that this feature sets the variable locally to the summary buffer.
2962 But some variables are evaluated in the article buffer, or in the
2963 message buffer (of a reply or followup or otherwise newly created
2964 message).  As a workaround, it might help to add the variable in
2965 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
2966 Stuff}.  So if you want to set @code{message-from-style} via the group
2967 parameters, then you may need the following statement elsewhere in your
2968 @file{~/.gnus} file:
2969 @lisp
2970 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
2971 @end lisp
2972
2973 @vindex gnus-list-identifiers
2974 A use for this feature is to remove a mailing list identifier tag in
2975 the subject fields of articles.   E.g. if the news group
2976 @samp{nntp+news.gnus.org:gmane.text.docbook.apps} has the tag
2977 @samp{DOC-BOOK-APPS:} in the subject of all articles, this tag can be
2978 removed from the article subjects in the summary buffer for the group by
2979 putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")} into the group
2980 parameters for the group.
2981
2982 This can also be used as a group-specific hook function, if you'd like.
2983 If you want to hear a beep when you enter a group, you could put
2984 something like @code{(dummy-variable (ding))} in the parameters of that
2985 group.  @code{dummy-variable} will be set to the result of the
2986 @code{(ding)} form, but who cares?
2987
2988 @end table
2989
2990 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2991 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2992 presents you with a Customize-like interface.  The latter helps avoid
2993 silly Lisp errors.)  You might also be interested in reading about topic
2994 parameters (@pxref{Topic Parameters}).
2995
2996 @vindex gnus-parameters
2997 Group parameters can be set via the @code{gnus-parameters} variable too.
2998 But some variables, such as @code{visible}, have no effect.  For
2999 example:
3000
3001 @lisp
3002 (setq gnus-parameters
3003       '(("mail\\..*"
3004          (gnus-show-threads nil)
3005          (gnus-use-scoring nil)
3006          (gnus-summary-line-format
3007           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3008          (gcc-self . t)
3009          (display . all))
3010
3011         ("^nnimap:\\(foo.bar\\)$"
3012          (to-group . "\\1"))
3013
3014         ("mail\\.me"
3015          (gnus-use-scoring  t))
3016
3017         ("list\\..*"
3018          (total-expire . t)
3019          (broken-reply-to . t))))
3020 @end lisp
3021
3022 String value of parameters will be subjected to regexp substitution, as
3023 the @code{to-group} example shows.
3024
3025
3026 @node Listing Groups
3027 @section Listing Groups
3028 @cindex group listing
3029
3030 These commands all list various slices of the groups available.
3031
3032 @table @kbd
3033
3034 @item l
3035 @itemx A s
3036 @kindex A s (Group)
3037 @kindex l (Group)
3038 @findex gnus-group-list-groups
3039 List all groups that have unread articles
3040 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3041 command will list only groups of level ARG and lower.  By default, it
3042 only lists groups of level five (i.e.,
3043 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3044 groups).
3045
3046 @item L
3047 @itemx A u
3048 @kindex A u (Group)
3049 @kindex L (Group)
3050 @findex gnus-group-list-all-groups
3051 List all groups, whether they have unread articles or not
3052 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3053 this command will list only groups of level ARG and lower.  By default,
3054 it lists groups of level seven or lower (i.e., just subscribed and
3055 unsubscribed groups).
3056
3057 @item A l
3058 @kindex A l (Group)
3059 @findex gnus-group-list-level
3060 List all unread groups on a specific level
3061 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3062 with no unread articles.
3063
3064 @item A k
3065 @kindex A k (Group)
3066 @findex gnus-group-list-killed
3067 List all killed groups (@code{gnus-group-list-killed}).  If given a
3068 prefix argument, really list all groups that are available, but aren't
3069 currently (un)subscribed.  This could entail reading the active file
3070 from the server.
3071
3072 @item A z
3073 @kindex A z (Group)
3074 @findex gnus-group-list-zombies
3075 List all zombie groups (@code{gnus-group-list-zombies}).
3076
3077 @item A m
3078 @kindex A m (Group)
3079 @findex gnus-group-list-matching
3080 List all unread, subscribed groups with names that match a regexp
3081 (@code{gnus-group-list-matching}).
3082
3083 @item A M
3084 @kindex A M (Group)
3085 @findex gnus-group-list-all-matching
3086 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3087
3088 @item A A
3089 @kindex A A (Group)
3090 @findex gnus-group-list-active
3091 List absolutely all groups in the active file(s) of the
3092 server(s) you are connected to (@code{gnus-group-list-active}).  This
3093 might very well take quite a while.  It might actually be a better idea
3094 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3095 thing to match on.  Also note that this command may list groups that
3096 don't exist (yet)---these will be listed as if they were killed groups.
3097 Take the output with some grains of salt.
3098
3099 @item A a
3100 @kindex A a (Group)
3101 @findex gnus-group-apropos
3102 List all groups that have names that match a regexp
3103 (@code{gnus-group-apropos}).
3104
3105 @item A d
3106 @kindex A d (Group)
3107 @findex gnus-group-description-apropos
3108 List all groups that have names or descriptions that match a regexp
3109 (@code{gnus-group-description-apropos}).
3110
3111 @item A c
3112 @kindex A c (Group)
3113 @findex gnus-group-list-cached
3114 List all groups with cached articles (@code{gnus-group-list-cached}).
3115
3116 @item A ?
3117 @kindex A ? (Group)
3118 @findex gnus-group-list-dormant
3119 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3120
3121 @item A /
3122 @kindex A / (Group)
3123 @findex gnus-group-list-limit
3124 List groups limited within the current selection
3125 (@code{gnus-group-list-limit}).
3126
3127 @item A f
3128 @kindex A f (Group)
3129 @findex gnus-group-list-flush
3130 Flush groups from the current selection (@code{gnus-group-list-flush}).
3131
3132 @item A p
3133 @kindex A p (Group)
3134 @findex gnus-group-list-plus
3135 List groups plus the current selection (@code{gnus-group-list-plus}).
3136
3137 @end table
3138
3139 @vindex gnus-permanently-visible-groups
3140 @cindex visible group parameter
3141 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3142 always be shown, whether they have unread articles or not.  You can also
3143 add the @code{visible} element to the group parameters in question to
3144 get the same effect.
3145
3146 @vindex gnus-list-groups-with-ticked-articles
3147 Groups that have just ticked articles in it are normally listed in the
3148 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3149 @code{nil}, these groups will be treated just like totally empty
3150 groups.  It is @code{t} by default.
3151
3152
3153 @node Sorting Groups
3154 @section Sorting Groups
3155 @cindex sorting groups
3156
3157 @kindex C-c C-s (Group)
3158 @findex gnus-group-sort-groups
3159 @vindex gnus-group-sort-function
3160 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3161 group buffer according to the function(s) given by the
3162 @code{gnus-group-sort-function} variable.  Available sorting functions
3163 include:
3164
3165 @table @code
3166
3167 @item gnus-group-sort-by-alphabet
3168 @findex gnus-group-sort-by-alphabet
3169 Sort the group names alphabetically.  This is the default.
3170
3171 @item gnus-group-sort-by-real-name
3172 @findex gnus-group-sort-by-real-name
3173 Sort the group alphabetically on the real (unprefixed) group names.
3174
3175 @item gnus-group-sort-by-level
3176 @findex gnus-group-sort-by-level
3177 Sort by group level.
3178
3179 @item gnus-group-sort-by-score
3180 @findex gnus-group-sort-by-score
3181 Sort by group score.  @xref{Group Score}.
3182
3183 @item gnus-group-sort-by-rank
3184 @findex gnus-group-sort-by-rank
3185 Sort by group score and then the group level.  The level and the score
3186 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3187
3188 @item gnus-group-sort-by-unread
3189 @findex gnus-group-sort-by-unread
3190 Sort by number of unread articles.
3191
3192 @item gnus-group-sort-by-method
3193 @findex gnus-group-sort-by-method
3194 Sort alphabetically on the select method.
3195
3196 @item gnus-group-sort-by-server
3197 @findex gnus-group-sort-by-server
3198 Sort alphabetically on the Gnus server name.
3199
3200
3201 @end table
3202
3203 @code{gnus-group-sort-function} can also be a list of sorting
3204 functions.  In that case, the most significant sort key function must be
3205 the last one.
3206
3207
3208 There are also a number of commands for sorting directly according to
3209 some sorting criteria:
3210
3211 @table @kbd
3212 @item G S a
3213 @kindex G S a (Group)
3214 @findex gnus-group-sort-groups-by-alphabet
3215 Sort the group buffer alphabetically by group name
3216 (@code{gnus-group-sort-groups-by-alphabet}).
3217
3218 @item G S u
3219 @kindex G S u (Group)
3220 @findex gnus-group-sort-groups-by-unread
3221 Sort the group buffer by the number of unread articles
3222 (@code{gnus-group-sort-groups-by-unread}).
3223
3224 @item G S l
3225 @kindex G S l (Group)
3226 @findex gnus-group-sort-groups-by-level
3227 Sort the group buffer by group level
3228 (@code{gnus-group-sort-groups-by-level}).
3229
3230 @item G S v
3231 @kindex G S v (Group)
3232 @findex gnus-group-sort-groups-by-score
3233 Sort the group buffer by group score
3234 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3235
3236 @item G S r
3237 @kindex G S r (Group)
3238 @findex gnus-group-sort-groups-by-rank
3239 Sort the group buffer by group rank
3240 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3241
3242 @item G S m
3243 @kindex G S m (Group)
3244 @findex gnus-group-sort-groups-by-method
3245 Sort the group buffer alphabetically by back end name
3246 (@code{gnus-group-sort-groups-by-method}).
3247
3248 @item G S n
3249 @kindex G S n (Group)
3250 @findex gnus-group-sort-groups-by-real-name
3251 Sort the group buffer alphabetically by real (unprefixed) group name
3252 (@code{gnus-group-sort-groups-by-real-name}).
3253
3254 @end table
3255
3256 All the commands below obey the process/prefix convention
3257 (@pxref{Process/Prefix}).
3258
3259 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3260 commands will sort in reverse order.
3261
3262 You can also sort a subset of the groups:
3263
3264 @table @kbd
3265 @item G P a
3266 @kindex G P a (Group)
3267 @findex gnus-group-sort-selected-groups-by-alphabet
3268 Sort the groups alphabetically by group name
3269 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3270
3271 @item G P u
3272 @kindex G P u (Group)
3273 @findex gnus-group-sort-selected-groups-by-unread
3274 Sort the groups by the number of unread articles
3275 (@code{gnus-group-sort-selected-groups-by-unread}).
3276
3277 @item G P l
3278 @kindex G P l (Group)
3279 @findex gnus-group-sort-selected-groups-by-level
3280 Sort the groups by group level
3281 (@code{gnus-group-sort-selected-groups-by-level}).
3282
3283 @item G P v
3284 @kindex G P v (Group)
3285 @findex gnus-group-sort-selected-groups-by-score
3286 Sort the groups by group score
3287 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3288
3289 @item G P r
3290 @kindex G P r (Group)
3291 @findex gnus-group-sort-selected-groups-by-rank
3292 Sort the groups by group rank
3293 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3294
3295 @item G P m
3296 @kindex G P m (Group)
3297 @findex gnus-group-sort-selected-groups-by-method
3298 Sort the groups alphabetically by back end name
3299 (@code{gnus-group-sort-selected-groups-by-method}).
3300
3301 @item G P n
3302 @kindex G P n (Group)
3303 @findex gnus-group-sort-selected-groups-by-real-name
3304 Sort the groups alphabetically by real (unprefixed) group name
3305 (@code{gnus-group-sort-selected-groups-by-real-name}).
3306
3307 @item G P s
3308 @kindex G P s (Group)
3309 @findex gnus-group-sort-selected-groups
3310 Sort the groups according to @code{gnus-group-sort-function}.
3311
3312 @end table
3313
3314 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3315 move groups around.
3316
3317
3318 @node Group Maintenance
3319 @section Group Maintenance
3320 @cindex bogus groups
3321
3322 @table @kbd
3323 @item b
3324 @kindex b (Group)
3325 @findex gnus-group-check-bogus-groups
3326 Find bogus groups and delete them
3327 (@code{gnus-group-check-bogus-groups}).
3328
3329 @item F
3330 @kindex F (Group)
3331 @findex gnus-group-find-new-groups
3332 Find new groups and process them (@code{gnus-group-find-new-groups}).
3333 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3334 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3335 to query the server for new groups, and subscribe the new groups as
3336 zombies.
3337
3338 @item C-c C-x
3339 @kindex C-c C-x (Group)
3340 @findex gnus-group-expire-articles
3341 Run all expirable articles in the current group through the expiry
3342 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3343 all expirable articles in the group that have been around for a while.
3344 (@pxref{Expiring Mail}).
3345
3346 @item C-c C-M-x
3347 @kindex C-c C-M-x (Group)
3348 @findex gnus-group-expire-all-groups
3349 Run all expirable articles in all groups through the expiry process
3350 (@code{gnus-group-expire-all-groups}).
3351
3352 @end table
3353
3354
3355 @node Browse Foreign Server
3356 @section Browse Foreign Server
3357 @cindex foreign servers
3358 @cindex browsing servers
3359
3360 @table @kbd
3361 @item B
3362 @kindex B (Group)
3363 @findex gnus-group-browse-foreign-server
3364 You will be queried for a select method and a server name.  Gnus will
3365 then attempt to contact this server and let you browse the groups there
3366 (@code{gnus-group-browse-foreign-server}).
3367 @end table
3368
3369 @findex gnus-browse-mode
3370 A new buffer with a list of available groups will appear.  This buffer
3371 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3372 a lot) like a normal group buffer.
3373
3374 Here's a list of keystrokes available in the browse mode:
3375
3376 @table @kbd
3377 @item n
3378 @kindex n (Browse)
3379 @findex gnus-group-next-group
3380 Go to the next group (@code{gnus-group-next-group}).
3381
3382 @item p
3383 @kindex p (Browse)
3384 @findex gnus-group-prev-group
3385 Go to the previous group (@code{gnus-group-prev-group}).
3386
3387 @item SPACE
3388 @kindex SPACE (Browse)
3389 @findex gnus-browse-read-group
3390 Enter the current group and display the first article
3391 (@code{gnus-browse-read-group}).
3392
3393 @item RET
3394 @kindex RET (Browse)
3395 @findex gnus-browse-select-group
3396 Enter the current group (@code{gnus-browse-select-group}).
3397
3398 @item u
3399 @kindex u (Browse)
3400 @findex gnus-browse-unsubscribe-current-group
3401 Unsubscribe to the current group, or, as will be the case here,
3402 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3403
3404 @item l
3405 @itemx q
3406 @kindex q (Browse)
3407 @kindex l (Browse)
3408 @findex gnus-browse-exit
3409 Exit browse mode (@code{gnus-browse-exit}).
3410
3411 @item d
3412 @kindex d (Browse)
3413 @findex gnus-browse-describe-group
3414 Describe the current group (@code{gnus-browse-describe-group}).
3415
3416 @item ?
3417 @kindex ? (Browse)
3418 @findex gnus-browse-describe-briefly
3419 Describe browse mode briefly (well, there's not much to describe, is
3420 there) (@code{gnus-browse-describe-briefly}).
3421 @end table
3422
3423
3424 @node Exiting Gnus
3425 @section Exiting Gnus
3426 @cindex exiting Gnus
3427
3428 Yes, Gnus is ex(c)iting.
3429
3430 @table @kbd
3431 @item z
3432 @kindex z (Group)
3433 @findex gnus-group-suspend
3434 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3435 but it kills all buffers except the Group buffer.  I'm not sure why this
3436 is a gain, but then who am I to judge?
3437
3438 @item q
3439 @kindex q (Group)
3440 @findex gnus-group-exit
3441 @c @icon{gnus-group-exit}
3442 Quit Gnus (@code{gnus-group-exit}).
3443
3444 @item Q
3445 @kindex Q (Group)
3446 @findex gnus-group-quit
3447 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3448 The dribble file will be saved, though (@pxref{Auto Save}).
3449 @end table
3450
3451 @vindex gnus-exit-gnus-hook
3452 @vindex gnus-suspend-gnus-hook
3453 @vindex gnus-after-exiting-gnus-hook
3454 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3455 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3456 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3457 exiting Gnus.
3458
3459 Note:
3460
3461 @quotation
3462 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3463 numbly heavy and herself fall into a hazy trance as the boy sitting
3464 behind her drew repeated lines with his pencil across the back of her
3465 plastic chair.
3466 @end quotation
3467
3468
3469 @node Group Topics
3470 @section Group Topics
3471 @cindex topics
3472
3473 If you read lots and lots of groups, it might be convenient to group
3474 them hierarchically according to topics.  You put your Emacs groups over
3475 here, your sex groups over there, and the rest (what, two groups or so?)
3476 you put in some misc section that you never bother with anyway.  You can
3477 even group the Emacs sex groups as a sub-topic to either the Emacs
3478 groups or the sex groups---or both!  Go wild!
3479
3480 @iftex
3481 @iflatex
3482 \gnusfigure{Group Topics}{400}{
3483 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3484 }
3485 @end iflatex
3486 @end iftex
3487
3488 Here's an example:
3489
3490 @example
3491 Gnus
3492   Emacs -- I wuw it!
3493      3: comp.emacs
3494      2: alt.religion.emacs
3495     Naughty Emacs
3496      452: alt.sex.emacs
3497        0: comp.talk.emacs.recovery
3498   Misc
3499      8: comp.binaries.fractals
3500     13: comp.sources.unix
3501 @end example
3502
3503 @findex gnus-topic-mode
3504 @kindex t (Group)
3505 To get this @emph{fab} functionality you simply turn on (ooh!) the
3506 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3507 is a toggling command.)
3508
3509 Go ahead, just try it.  I'll still be here when you get back.  La de
3510 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3511 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3512 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3513 Hot and bothered?
3514
3515 If you want this permanently enabled, you should add that minor mode to
3516 the hook for the group mode.  Put the following line in your
3517 @file{~/.gnus.el} file:
3518
3519 @lisp
3520 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3521 @end lisp
3522
3523 @menu
3524 * Topic Commands::              Interactive E-Z commands.
3525 * Topic Variables::             How to customize the topics the Lisp Way.
3526 * Topic Sorting::               Sorting each topic individually.
3527 * Topic Topology::              A map of the world.
3528 * Topic Parameters::            Parameters that apply to all groups in a topic.
3529 @end menu
3530
3531
3532 @node Topic Commands
3533 @subsection Topic Commands
3534 @cindex topic commands
3535
3536 When the topic minor mode is turned on, a new @kbd{T} submap will be
3537 available.  In addition, a few of the standard keys change their
3538 definitions slightly.
3539
3540 In general, the following kinds of operations are possible on topics.
3541 First of all, you want to create topics.  Secondly, you want to put
3542 groups in topics and to move them around until you have an order you
3543 like.  The third kind of operation is to show/hide parts of the whole
3544 shebang.  You might want to hide a topic including its subtopics and
3545 groups, to get a better overview of the other groups.
3546
3547 Here is a list of the basic keys that you might need to set up topics
3548 the way you like.
3549
3550 @table @kbd
3551
3552 @item T n
3553 @kindex T n (Topic)
3554 @findex gnus-topic-create-topic
3555 Prompt for a new topic name and create it
3556 (@code{gnus-topic-create-topic}).
3557
3558 @item T TAB
3559 @itemx TAB
3560 @kindex T TAB (Topic)
3561 @kindex TAB (Topic)
3562 @findex gnus-topic-indent
3563 ``Indent'' the current topic so that it becomes a sub-topic of the
3564 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3565 ``un-indent'' the topic instead.
3566
3567 @item M-TAB
3568 @kindex M-TAB (Topic)
3569 @findex gnus-topic-unindent
3570 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3571 parent of its current parent (@code{gnus-topic-unindent}).
3572
3573 @end table
3574
3575 The following two keys can be used to move groups and topics around.
3576 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3577 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3578 kill and yank rather than cut and paste.
3579
3580 @table @kbd
3581
3582 @item C-k
3583 @kindex C-k (Topic)
3584 @findex gnus-topic-kill-group
3585 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3586 topic will be removed along with the topic.
3587
3588 @item C-y
3589 @kindex C-y (Topic)
3590 @findex gnus-topic-yank-group
3591 Yank the previously killed group or topic
3592 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3593 before all groups.
3594
3595 So, to move a topic to the beginning of the list of topics, just hit
3596 @kbd{C-k} on it.  This is like the `cut' part of cut and paste.  Then,
3597 move the cursor to the beginning of the buffer (just below the `Gnus'
3598 topic) and hit @kbd{C-y}.  This is like the `paste' part of cut and
3599 paste.  Like I said -- E-Z.
3600
3601 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3602 you can move topics around as well as groups.
3603
3604 @end table
3605
3606 After setting up the topics the way you like them, you might wish to
3607 hide a topic, or to show it again.  That's why we have the following
3608 key.
3609
3610 @table @kbd
3611
3612 @item RET
3613 @kindex RET (Topic)
3614 @findex gnus-topic-select-group
3615 @itemx SPACE
3616 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3617 When you perform this command on a group, you'll enter the group, as
3618 usual.  When done on a topic line, the topic will be folded (if it was
3619 visible) or unfolded (if it was folded already).  So it's basically a
3620 toggling command on topics.  In addition, if you give a numerical
3621 prefix, group on that level (and lower) will be displayed.
3622
3623 @end table
3624
3625 Now for a list of other commands, in no particular order.
3626
3627 @table @kbd
3628
3629 @item T m
3630 @kindex T m (Topic)
3631 @findex gnus-topic-move-group
3632 Move the current group to some other topic
3633 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3634 convention (@pxref{Process/Prefix}).
3635
3636 @item T j
3637 @kindex T j (Topic)
3638 @findex gnus-topic-jump-to-topic
3639 Go to a topic (@code{gnus-topic-jump-to-topic}).
3640
3641 @item T c
3642 @kindex T c (Topic)
3643 @findex gnus-topic-copy-group
3644 Copy the current group to some other topic
3645 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3646 convention (@pxref{Process/Prefix}).
3647
3648 @item T h
3649 @kindex T h (Topic)
3650 @findex gnus-topic-hide-topic
3651 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3652 a prefix, hide the topic permanently.
3653
3654 @item T s
3655 @kindex T s (Topic)
3656 @findex gnus-topic-show-topic
3657 Show the current topic (@code{gnus-topic-show-topic}).  If given
3658 a prefix, show the topic permanently.
3659
3660 @item T D
3661 @kindex T D (Topic)
3662 @findex gnus-topic-remove-group
3663 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3664 This command is mainly useful if you have the same group in several
3665 topics and wish to remove it from one of the topics.  You may also
3666 remove a group from all topics, but in that case, Gnus will add it to
3667 the root topic the next time you start Gnus.  In fact, all new groups
3668 (which, naturally, don't belong to any topic) will show up in the root
3669 topic.
3670
3671 This command uses the process/prefix convention
3672 (@pxref{Process/Prefix}).
3673
3674 @item T M
3675 @kindex T M (Topic)
3676 @findex gnus-topic-move-matching
3677 Move all groups that match some regular expression to a topic
3678 (@code{gnus-topic-move-matching}).
3679
3680 @item T C
3681 @kindex T C (Topic)
3682 @findex gnus-topic-copy-matching
3683 Copy all groups that match some regular expression to a topic
3684 (@code{gnus-topic-copy-matching}).
3685
3686 @item T H
3687 @kindex T H (Topic)
3688 @findex gnus-topic-toggle-display-empty-topics
3689 Toggle hiding empty topics
3690 (@code{gnus-topic-toggle-display-empty-topics}).
3691
3692 @item T #
3693 @kindex T # (Topic)
3694 @findex gnus-topic-mark-topic
3695 Mark all groups in the current topic with the process mark
3696 (@code{gnus-topic-mark-topic}).  This command works recursively on
3697 sub-topics unless given a prefix.
3698
3699 @item T M-#
3700 @kindex T M-# (Topic)
3701 @findex gnus-topic-unmark-topic
3702 Remove the process mark from all groups in the current topic
3703 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3704 sub-topics unless given a prefix.
3705
3706 @item C-c C-x
3707 @kindex C-c C-x (Topic)
3708 @findex gnus-topic-expire-articles
3709 Run all expirable articles in the current group or topic through the
3710 expiry process (if any)
3711 (@code{gnus-topic-expire-articles}). (@pxref{Expiring Mail}).
3712
3713 @item T r
3714 @kindex T r (Topic)
3715 @findex gnus-topic-rename
3716 Rename a topic (@code{gnus-topic-rename}).
3717
3718 @item T DEL
3719 @kindex T DEL (Topic)
3720 @findex gnus-topic-delete
3721 Delete an empty topic (@code{gnus-topic-delete}).
3722
3723 @item A T
3724 @kindex A T (Topic)
3725 @findex gnus-topic-list-active
3726 List all groups that Gnus knows about in a topics-ified way
3727 (@code{gnus-topic-list-active}).
3728
3729 @item T M-n
3730 @kindex T M-n (Topic)
3731 @findex gnus-topic-goto-next-topic
3732 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3733
3734 @item T M-p
3735 @kindex T M-p (Topic)
3736 @findex gnus-topic-goto-previous-topic
3737 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3738
3739 @item G p
3740 @kindex G p (Topic)
3741 @findex gnus-topic-edit-parameters
3742 @cindex group parameters
3743 @cindex topic parameters
3744 @cindex parameters
3745 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3746 @xref{Topic Parameters}.
3747
3748 @end table
3749
3750
3751 @node Topic Variables
3752 @subsection Topic Variables
3753 @cindex topic variables
3754
3755 The previous section told you how to tell Gnus which topics to display.
3756 This section explains how to tell Gnus what to display about each topic.
3757
3758 @vindex gnus-topic-line-format
3759 The topic lines themselves are created according to the
3760 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3761 Valid elements are:
3762
3763 @table @samp
3764 @item i
3765 Indentation.
3766 @item n
3767 Topic name.
3768 @item v
3769 Visibility.
3770 @item l
3771 Level.
3772 @item g
3773 Number of groups in the topic.
3774 @item a
3775 Number of unread articles in the topic.
3776 @item A
3777 Number of unread articles in the topic and all its subtopics.
3778 @end table
3779
3780 @vindex gnus-topic-indent-level
3781 Each sub-topic (and the groups in the sub-topics) will be indented with
3782 @code{gnus-topic-indent-level} times the topic level number of spaces.
3783 The default is 2.
3784
3785 @vindex gnus-topic-mode-hook
3786 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3787
3788 @vindex gnus-topic-display-empty-topics
3789 The @code{gnus-topic-display-empty-topics} says whether to display even
3790 topics that have no unread articles in them.  The default is @code{t}.
3791
3792
3793 @node Topic Sorting
3794 @subsection Topic Sorting
3795 @cindex topic sorting
3796
3797 You can sort the groups in each topic individually with the following
3798 commands:
3799
3800
3801 @table @kbd
3802 @item T S a
3803 @kindex T S a (Topic)
3804 @findex gnus-topic-sort-groups-by-alphabet
3805 Sort the current topic alphabetically by group name
3806 (@code{gnus-topic-sort-groups-by-alphabet}).
3807
3808 @item T S u
3809 @kindex T S u (Topic)
3810 @findex gnus-topic-sort-groups-by-unread
3811 Sort the current topic by the number of unread articles
3812 (@code{gnus-topic-sort-groups-by-unread}).
3813
3814 @item T S l
3815 @kindex T S l (Topic)
3816 @findex gnus-topic-sort-groups-by-level
3817 Sort the current topic by group level
3818 (@code{gnus-topic-sort-groups-by-level}).
3819
3820 @item T S v
3821 @kindex T S v (Topic)
3822 @findex gnus-topic-sort-groups-by-score
3823 Sort the current topic by group score
3824 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3825
3826 @item T S r
3827 @kindex T S r (Topic)
3828 @findex gnus-topic-sort-groups-by-rank
3829 Sort the current topic by group rank
3830 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3831
3832 @item T S m
3833 @kindex T S m (Topic)
3834 @findex gnus-topic-sort-groups-by-method
3835 Sort the current topic alphabetically by back end name
3836 (@code{gnus-topic-sort-groups-by-method}).
3837
3838 @item T S e
3839 @kindex T S e (Topic)
3840 @findex gnus-topic-sort-groups-by-server
3841 Sort the current topic alphabetically by server name
3842 (@code{gnus-topic-sort-groups-by-server}).
3843
3844 @item T S s
3845 @kindex T S s
3846 @findex gnus-topic-sort-groups
3847 Sort the current topic according to the function(s) given by the
3848 @code{gnus-group-sort-function} variable
3849 (@code{gnus-topic-sort-groups}).
3850
3851 @end table
3852
3853 When given a prefix argument, all these commands will sort in reverse
3854 order.  @xref{Sorting Groups}, for more information about group
3855 sorting.
3856
3857
3858 @node Topic Topology
3859 @subsection Topic Topology
3860 @cindex topic topology
3861 @cindex topology
3862
3863 So, let's have a look at an example group buffer:
3864
3865 @example
3866 Gnus
3867   Emacs -- I wuw it!
3868      3: comp.emacs
3869      2: alt.religion.emacs
3870     Naughty Emacs
3871      452: alt.sex.emacs
3872        0: comp.talk.emacs.recovery
3873   Misc
3874      8: comp.binaries.fractals
3875     13: comp.sources.unix
3876 @end example
3877
3878 So, here we have one top-level topic (@samp{Gnus}), two topics under
3879 that, and one sub-topic under one of the sub-topics.  (There is always
3880 just one (1) top-level topic).  This topology can be expressed as
3881 follows:
3882
3883 @lisp
3884 (("Gnus" visible)
3885  (("Emacs -- I wuw it!" visible)
3886   (("Naughty Emacs" visible)))
3887  (("Misc" visible)))
3888 @end lisp
3889
3890 @vindex gnus-topic-topology
3891 This is in fact how the variable @code{gnus-topic-topology} would look
3892 for the display above.  That variable is saved in the @file{.newsrc.eld}
3893 file, and shouldn't be messed with manually---unless you really want
3894 to.  Since this variable is read from the @file{.newsrc.eld} file,
3895 setting it in any other startup files will have no effect.
3896
3897 This topology shows what topics are sub-topics of what topics (right),
3898 and which topics are visible.  Two settings are currently
3899 allowed---@code{visible} and @code{invisible}.
3900
3901
3902 @node Topic Parameters
3903 @subsection Topic Parameters
3904 @cindex topic parameters
3905
3906 All groups in a topic will inherit group parameters from the parent (and
3907 ancestor) topic parameters.  All valid group parameters are valid topic
3908 parameters (@pxref{Group Parameters}).
3909
3910 In addition, the following parameters are only valid as topic
3911 parameters:
3912
3913 @table @code
3914 @item subscribe
3915 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3916 @code{subscribe} topic parameter says what groups go in what topic.  Its
3917 value should be a regexp to match the groups that should go in that
3918 topic.
3919
3920 @item subscribe-level
3921 When subscribing new groups by topic (see the @code{subscribe} parameter),
3922 the group will be subscribed with the level specified in the
3923 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3924
3925 @end table
3926
3927 Group parameters (of course) override topic parameters, and topic
3928 parameters in sub-topics override topic parameters in super-topics.  You
3929 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3930 verb, although you may feel free to disagree with me here.)
3931
3932 @example
3933 Gnus
3934   Emacs
3935      3: comp.emacs
3936      2: alt.religion.emacs
3937    452: alt.sex.emacs
3938     Relief
3939      452: alt.sex.emacs
3940        0: comp.talk.emacs.recovery
3941   Misc
3942      8: comp.binaries.fractals
3943     13: comp.sources.unix
3944    452: alt.sex.emacs
3945 @end example
3946
3947 The @samp{Emacs} topic has the topic parameter @code{(score-file
3948 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3949 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3950 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3951 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3952 . "religion.SCORE")}.
3953
3954 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
3955 will get the @file{relief.SCORE} home score file.  If you enter the same
3956 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
3957 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
3958 get the @file{religion.SCORE} home score file.
3959
3960 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
3961 there are some problems, especially with the @code{total-expiry}
3962 parameter.  Say you have a mail group in two topics; one with
3963 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
3964 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
3965 of these topics you mean to expire articles from, so anything may
3966 happen.  In fact, I hereby declare that it is @dfn{undefined} what
3967 happens.  You just have to be careful if you do stuff like that.
3968
3969
3970 @node Misc Group Stuff
3971 @section Misc Group Stuff
3972
3973 @menu
3974 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
3975 * Group Information::           Information and help on groups and Gnus.
3976 * Group Timestamp::             Making Gnus keep track of when you last read a group.
3977 * File Commands::               Reading and writing the Gnus files.
3978 * Sieve Commands::              Managing Sieve scripts.
3979 @end menu
3980
3981 @table @kbd
3982
3983 @item ^
3984 @kindex ^ (Group)
3985 @findex gnus-group-enter-server-mode
3986 Enter the server buffer (@code{gnus-group-enter-server-mode}).
3987 @xref{Server Buffer}.
3988
3989 @item a
3990 @kindex a (Group)
3991 @findex gnus-group-post-news
3992 Start composing a message (a news by default)
3993 (@code{gnus-group-post-news}).  If given a prefix, post to the group
3994 under the point.  If the prefix is 1, prompt for a group to post to.
3995 Contrary to what the name of this function suggests, the prepared
3996 article might be a mail instead of a news, if a mail group is specified
3997 with the prefix argument.  @xref{Composing Messages}.
3998
3999 @item m
4000 @kindex m (Group)
4001 @findex gnus-group-mail
4002 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
4003 use the posting style of the group under the point.  If the prefix is 1,
4004 prompt for a group name to find the posting style.
4005 @xref{Composing Messages}.
4006
4007 @item i
4008 @kindex i (Group)
4009 @findex gnus-group-news
4010 Start composing a news (@code{gnus-group-news}).  If given a prefix,
4011 post to the group under the point.  If the prefix is 1, prompt
4012 for group to post to.  @xref{Composing Messages}.
4013
4014 This function actually prepares a news even when using mail groups.
4015 This is useful for ``posting'' messages to mail groups without actually
4016 sending them over the network: they're just saved directly to the group
4017 in question.  The corresponding back end must have a request-post method
4018 for this to work though.
4019
4020 @end table
4021
4022 Variables for the group buffer:
4023
4024 @table @code
4025
4026 @item gnus-group-mode-hook
4027 @vindex gnus-group-mode-hook
4028 is called after the group buffer has been
4029 created.
4030
4031 @item gnus-group-prepare-hook
4032 @vindex gnus-group-prepare-hook
4033 is called after the group buffer is
4034 generated.  It may be used to modify the buffer in some strange,
4035 unnatural way.
4036
4037 @item gnus-group-prepared-hook
4038 @vindex gnus-group-prepare-hook
4039 is called as the very last thing after the group buffer has been
4040 generated.  It may be used to move point around, for instance.
4041
4042 @item gnus-permanently-visible-groups
4043 @vindex gnus-permanently-visible-groups
4044 Groups matching this regexp will always be listed in the group buffer,
4045 whether they are empty or not.
4046
4047 @item gnus-group-name-charset-method-alist
4048 @vindex gnus-group-name-charset-method-alist
4049 An alist of method and the charset for group names. It is used to show
4050 non-@acronym{ASCII} group names.
4051
4052 For example:
4053 @lisp
4054 (setq gnus-group-name-charset-method-alist
4055     '(((nntp "news.com.cn") . cn-gb-2312)))
4056 @end lisp
4057
4058 @item gnus-group-name-charset-group-alist
4059 @cindex UTF-8 group names
4060 @vindex gnus-group-name-charset-group-alist
4061 An alist of regexp of group name and the charset for group names.  It
4062 is used to show non-@acronym{ASCII} group names.  @code{((".*"
4063 utf-8))} is the default value if UTF-8 is supported, otherwise the
4064 default is @code{nil}.
4065
4066 For example:
4067 @lisp
4068 (setq gnus-group-name-charset-group-alist
4069     '(("\\.com\\.cn:" . cn-gb-2312)))
4070 @end lisp
4071
4072 @end table
4073
4074 @node Scanning New Messages
4075 @subsection Scanning New Messages
4076 @cindex new messages
4077 @cindex scanning new news
4078
4079 @table @kbd
4080
4081 @item g
4082 @kindex g (Group)
4083 @findex gnus-group-get-new-news
4084 @c @icon{gnus-group-get-new-news}
4085 Check the server(s) for new articles.  If the numerical prefix is used,
4086 this command will check only groups of level @var{arg} and lower
4087 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4088 command will force a total re-reading of the active file(s) from the
4089 back end(s).
4090
4091 @item M-g
4092 @kindex M-g (Group)
4093 @findex gnus-group-get-new-news-this-group
4094 @vindex gnus-goto-next-group-when-activating
4095 @c @icon{gnus-group-get-new-news-this-group}
4096 Check whether new articles have arrived in the current group
4097 (@code{gnus-group-get-new-news-this-group}).
4098 @code{gnus-goto-next-group-when-activating} says whether this command is
4099 to move point to the next group or not.  It is @code{t} by default.
4100
4101 @findex gnus-activate-all-groups
4102 @cindex activating groups
4103 @item C-c M-g
4104 @kindex C-c M-g (Group)
4105 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4106
4107 @item R
4108 @kindex R (Group)
4109 @cindex restarting
4110 @findex gnus-group-restart
4111 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4112 file(s), closes the connection to all servers, clears up all run-time
4113 Gnus variables, and then starts Gnus all over again.
4114
4115 @end table
4116
4117 @vindex gnus-get-new-news-hook
4118 @code{gnus-get-new-news-hook} is run just before checking for new news.
4119
4120 @vindex gnus-after-getting-new-news-hook
4121 @code{gnus-after-getting-new-news-hook} is run after checking for new
4122 news.
4123
4124
4125 @node Group Information
4126 @subsection Group Information
4127 @cindex group information
4128 @cindex information on groups
4129
4130 @table @kbd
4131
4132
4133 @item H f
4134 @kindex H f (Group)
4135 @findex gnus-group-fetch-faq
4136 @vindex gnus-group-faq-directory
4137 @cindex FAQ
4138 @cindex ange-ftp
4139 Try to fetch the @acronym{FAQ} for the current group
4140 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
4141 from @code{gnus-group-faq-directory}, which is usually a directory on
4142 a remote machine.  This variable can also be a list of directories.
4143 In that case, giving a prefix to this command will allow you to choose
4144 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
4145 used for fetching the file.
4146
4147 If fetching from the first site is unsuccessful, Gnus will attempt to go
4148 through @code{gnus-group-faq-directory} and try to open them one by one.
4149
4150 @item H c
4151 @kindex H c (Group)
4152 @findex gnus-group-fetch-charter
4153 @vindex gnus-group-charter-alist
4154 @cindex charter
4155 Try to open the charter for the current group in a web browser
4156 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4157 prefix argument.
4158
4159 Gnus will use @code{gnus-group-charter-alist} to find the location of
4160 the charter.  If no location is known, Gnus will fetch the control
4161 messages for the group, which in some cases includes the charter.
4162
4163 @item H C
4164 @kindex H C (Group)
4165 @findex gnus-group-fetch-control
4166 @vindex gnus-group-fetch-control-use-browse-url
4167 @cindex control message
4168 Fetch the control messages for the group from the archive at
4169 @code{ftp.isc.org} (@code{gnus-group-fetch-control}). Query for a
4170 group if given a prefix argument.
4171
4172 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4173 Gnus will open the control messages in a browser using
4174 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4175 and displayed in an ephemeral group.
4176
4177 Note that the control messages are compressed.  To use this command
4178 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
4179 Files, ,Compressed Files, emacs, The Emacs Manual}).
4180
4181 @item H d
4182 @itemx C-c C-d
4183 @c @icon{gnus-group-describe-group}
4184 @kindex H d (Group)
4185 @kindex C-c C-d (Group)
4186 @cindex describing groups
4187 @cindex group description
4188 @findex gnus-group-describe-group
4189 Describe the current group (@code{gnus-group-describe-group}).  If given
4190 a prefix, force Gnus to re-read the description from the server.
4191
4192 @item M-d
4193 @kindex M-d (Group)
4194 @findex gnus-group-describe-all-groups
4195 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4196 prefix, force Gnus to re-read the description file from the server.
4197
4198 @item H v
4199 @itemx V
4200 @kindex V (Group)
4201 @kindex H v (Group)
4202 @cindex version
4203 @findex gnus-version
4204 Display current Gnus version numbers (@code{gnus-version}).
4205
4206 @item ?
4207 @kindex ? (Group)
4208 @findex gnus-group-describe-briefly
4209 Give a very short help message (@code{gnus-group-describe-briefly}).
4210
4211 @item C-c C-i
4212 @kindex C-c C-i (Group)
4213 @cindex info
4214 @cindex manual
4215 @findex gnus-info-find-node
4216 Go to the Gnus info node (@code{gnus-info-find-node}).
4217 @end table
4218
4219
4220 @node Group Timestamp
4221 @subsection Group Timestamp
4222 @cindex timestamps
4223 @cindex group timestamps
4224
4225 It can be convenient to let Gnus keep track of when you last read a
4226 group.  To set the ball rolling, you should add
4227 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4228
4229 @lisp
4230 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4231 @end lisp
4232
4233 After doing this, each time you enter a group, it'll be recorded.
4234
4235 This information can be displayed in various ways---the easiest is to
4236 use the @samp{%d} spec in the group line format:
4237
4238 @lisp
4239 (setq gnus-group-line-format
4240       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4241 @end lisp
4242
4243 This will result in lines looking like:
4244
4245 @example
4246 *        0: mail.ding                                19961002T012943
4247          0: custom                                   19961002T012713
4248 @end example
4249
4250 As you can see, the date is displayed in compact ISO 8601 format.  This
4251 may be a bit too much, so to just display the date, you could say
4252 something like:
4253
4254 @lisp
4255 (setq gnus-group-line-format
4256       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4257 @end lisp
4258
4259 If you would like greater control of the time format, you can use a
4260 user-defined format spec.  Something like the following should do the
4261 trick:
4262
4263 @lisp
4264 (setq gnus-group-line-format
4265       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4266 (defun gnus-user-format-function-d (headers)
4267   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4268     (if time
4269         (format-time-string "%b %d  %H:%M" time)
4270       "")))
4271 @end lisp
4272
4273
4274 @node File Commands
4275 @subsection File Commands
4276 @cindex file commands
4277
4278 @table @kbd
4279
4280 @item r
4281 @kindex r (Group)
4282 @findex gnus-group-read-init-file
4283 @vindex gnus-init-file
4284 @cindex reading init file
4285 Re-read the init file (@code{gnus-init-file}, which defaults to
4286 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4287
4288 @item s
4289 @kindex s (Group)
4290 @findex gnus-group-save-newsrc
4291 @cindex saving .newsrc
4292 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4293 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4294 file(s) whether Gnus thinks it is necessary or not.
4295
4296 @c @item Z
4297 @c @kindex Z (Group)
4298 @c @findex gnus-group-clear-dribble
4299 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4300
4301 @end table
4302
4303
4304 @node Sieve Commands
4305 @subsection Sieve Commands
4306 @cindex group sieve commands
4307
4308 Sieve is a server-side mail filtering language.  In Gnus you can use
4309 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4310 sieve rules that should apply to each group.  Gnus provides two
4311 commands to translate all these group parameters into a proper Sieve
4312 script that can be transfered to the server somehow.
4313
4314 @vindex gnus-sieve-file
4315 @vindex gnus-sieve-region-start
4316 @vindex gnus-sieve-region-end
4317 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4318 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4319 between two delimiters, @code{gnus-sieve-region-start} and
4320 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4321 outside these delimiters that will not be removed the next time you
4322 regenerate the Sieve script.
4323
4324 @vindex gnus-sieve-crosspost
4325 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4326 is generated.  If it is non-@code{nil} (the default) articles is
4327 placed in all groups that have matching rules, otherwise the article
4328 is only placed in the group with the first matching rule.  For
4329 example, the group parameter @samp{(sieve address "sender"
4330 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4331 code if @code{gnus-sieve-crosspost} is @code{nil}. (When
4332 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4333 except that the line containing the call to @code{stop} is removed.)
4334
4335 @example
4336 if address "sender" "owner-ding@@hpc.uh.edu" @{
4337         fileinto "INBOX.ding";
4338         stop;
4339 @}
4340 @end example
4341
4342 @xref{Top, ,Top, sieve, Emacs Sieve}.
4343
4344 @table @kbd
4345
4346 @item D g
4347 @kindex D g (Group)
4348 @findex gnus-sieve-generate
4349 @vindex gnus-sieve-file
4350 @cindex generating sieve script
4351 Regenerate a Sieve script from the @code{sieve} group parameters and
4352 put you into the @code{gnus-sieve-file} without saving it.
4353
4354 @item D u
4355 @kindex D u (Group)
4356 @findex gnus-sieve-update
4357 @vindex gnus-sieve-file
4358 @cindex updating sieve script
4359 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4360 @code{sieve} group parameters, save the file and upload it to the
4361 server using the @code{sieveshell} program.
4362
4363 @end table
4364
4365
4366 @node Summary Buffer
4367 @chapter Summary Buffer
4368 @cindex summary buffer
4369
4370 A line for each article is displayed in the summary buffer.  You can
4371 move around, read articles, post articles and reply to articles.
4372
4373 The most common way to a summary buffer is to select a group from the
4374 group buffer (@pxref{Selecting a Group}).
4375
4376 You can have as many summary buffers open as you wish.
4377
4378 @menu
4379 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4380 * Summary Maneuvering::         Moving around the summary buffer.
4381 * Choosing Articles::           Reading articles.
4382 * Paging the Article::          Scrolling the current article.
4383 * Reply Followup and Post::     Posting articles.
4384 * Delayed Articles::            Send articles at a later time.
4385 * Marking Articles::            Marking articles as read, expirable, etc.
4386 * Limiting::                    You can limit the summary buffer.
4387 * Threading::                   How threads are made.
4388 * Sorting the Summary Buffer::  How articles and threads are sorted.
4389 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4390 * Article Caching::             You may store articles in a cache.
4391 * Persistent Articles::         Making articles expiry-resistant.
4392 * Article Backlog::             Having already read articles hang around.
4393 * Saving Articles::             Ways of customizing article saving.
4394 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4395 * Article Treatment::           The article buffer can be mangled at will.
4396 * MIME Commands::               Doing MIMEy things with the articles.
4397 * Charsets::                    Character set issues.
4398 * Article Commands::            Doing various things with the article buffer.
4399 * Summary Sorting::             Sorting the summary buffer in various ways.
4400 * Finding the Parent::          No child support? Get the parent.
4401 * Alternative Approaches::      Reading using non-default summaries.
4402 * Tree Display::                A more visual display of threads.
4403 * Mail Group Commands::         Some commands can only be used in mail groups.
4404 * Various Summary Stuff::       What didn't fit anywhere else.
4405 * Exiting the Summary Buffer::  Returning to the Group buffer,
4406                                 or reselecting the current group.
4407 * Crosspost Handling::          How crossposted articles are dealt with.
4408 * Duplicate Suppression::       An alternative when crosspost handling fails.
4409 * Security::                    Decrypt and Verify.
4410 * Mailing List::                Mailing list minor mode.
4411 @end menu
4412
4413
4414 @node Summary Buffer Format
4415 @section Summary Buffer Format
4416 @cindex summary buffer format
4417
4418 @iftex
4419 @iflatex
4420 \gnusfigure{The Summary Buffer}{180}{
4421 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4422 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4423 }
4424 @end iflatex
4425 @end iftex
4426
4427 @menu
4428 * Summary Buffer Lines::        You can specify how summary lines should look.
4429 * To From Newsgroups::          How to not display your own name.
4430 * Summary Buffer Mode Line::    You can say how the mode line should look.
4431 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4432 @end menu
4433
4434 @findex mail-extract-address-components
4435 @findex gnus-extract-address-components
4436 @vindex gnus-extract-address-components
4437 Gnus will use the value of the @code{gnus-extract-address-components}
4438 variable as a function for getting the name and address parts of a
4439 @code{From} header.  Two pre-defined functions exist:
4440 @code{gnus-extract-address-components}, which is the default, quite
4441 fast, and too simplistic solution; and
4442 @code{mail-extract-address-components}, which works very nicely, but is
4443 slower.  The default function will return the wrong answer in 5% of the
4444 cases.  If this is unacceptable to you, use the other function instead:
4445
4446 @lisp
4447 (setq gnus-extract-address-components
4448       'mail-extract-address-components)
4449 @end lisp
4450
4451 @vindex gnus-summary-same-subject
4452 @code{gnus-summary-same-subject} is a string indicating that the current
4453 article has the same subject as the previous.  This string will be used
4454 with those specs that require it.  The default is @code{""}.
4455
4456
4457 @node Summary Buffer Lines
4458 @subsection Summary Buffer Lines
4459
4460 @vindex gnus-summary-line-format
4461 You can change the format of the lines in the summary buffer by changing
4462 the @code{gnus-summary-line-format} variable.  It works along the same
4463 lines as a normal @code{format} string, with some extensions
4464 (@pxref{Formatting Variables}).
4465
4466 There should always be a colon or a point position marker on the line;
4467 the cursor always moves to the point position marker or the colon after
4468 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4469 possible to change this.  Just write a new function
4470 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4471 @xref{Positioning Point}.
4472
4473 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4474
4475 The following format specification characters and extended format
4476 specification(s) are understood:
4477
4478 @table @samp
4479 @item N
4480 Article number.
4481 @item S
4482 Subject string.  List identifiers stripped,
4483 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4484 @item s
4485 Subject if the article is the root of the thread or the previous article
4486 had a different subject, @code{gnus-summary-same-subject} otherwise.
4487 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4488 @item F
4489 Full @code{From} header.
4490 @item n
4491 The name (from the @code{From} header).
4492 @item f
4493 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4494 From Newsgroups}).
4495 @item a
4496 The name (from the @code{From} header).  This differs from the @code{n}
4497 spec in that it uses the function designated by the
4498 @code{gnus-extract-address-components} variable, which is slower, but
4499 may be more thorough.
4500 @item A
4501 The address (from the @code{From} header).  This works the same way as
4502 the @code{a} spec.
4503 @item L
4504 Number of lines in the article.
4505 @item c
4506 Number of characters in the article. This specifier is not supported
4507 in some methods (like nnfolder).
4508 @item k
4509 Pretty-printed version of the number of characters in the article;
4510 for example, @samp{1.2k} or @samp{0.4M}.
4511 @item I
4512 Indentation based on thread level (@pxref{Customizing Threading}).
4513 @item B
4514 A complex trn-style thread tree, showing response-connecting trace
4515 lines.  A thread could be drawn like this:
4516
4517 @example
4518 >
4519 +->
4520 | +->
4521 | | \->
4522 | |   \->
4523 | \->
4524 +->
4525 \->
4526 @end example
4527
4528 You can customize the appearance with the following options.  Note
4529 that it is possible to make the thread display look really neat by
4530 replacing the default @acronym{ASCII} characters with graphic
4531 line-drawing glyphs.
4532 @table @code
4533 @item gnus-sum-thread-tree-root
4534 @vindex gnus-sum-thread-tree-root
4535 Used for the root of a thread.  If @code{nil}, use subject
4536 instead.  The default is @samp{> }.
4537
4538 @item gnus-sum-thread-tree-false-root
4539 @vindex gnus-sum-thread-tree-false-root
4540 Used for the false root of a thread (@pxref{Loose Threads}).  If
4541 @code{nil}, use subject instead.  The default is @samp{> }.
4542
4543 @item gnus-sum-thread-tree-false-root
4544 @vindex gnus-sum-thread-tree-false-root
4545 Used for the root of a thread if it is a false root.  If @code{nil},
4546 use subject instead. The default is @samp{> }.
4547
4548 @item gnus-sum-thread-tree-single-indent
4549 @vindex gnus-sum-thread-tree-single-indent
4550 Used for a thread with just one message.  If @code{nil}, use subject
4551 instead.  The default is @samp{}.
4552
4553 @item gnus-sum-thread-tree-vertical
4554 @vindex gnus-sum-thread-tree-vertical
4555 Used for drawing a vertical line.  The default is @samp{| }.
4556
4557 @item gnus-sum-thread-tree-indent
4558 @vindex gnus-sum-thread-tree-indent
4559 Used for indenting.  The default is @samp{  }. 
4560
4561 @item gnus-sum-thread-tree-leaf-with-other
4562 @vindex gnus-sum-thread-tree-leaf-with-other
4563 Used for a leaf with brothers.  The default is @samp{+-> }.
4564
4565 @item gnus-sum-thread-tree-single-leaf
4566 @vindex gnus-sum-thread-tree-single-leaf
4567 Used for a leaf without brothers.  The default is @samp{\-> }
4568
4569 @end table
4570
4571 @item T
4572 Nothing if the article is a root and lots of spaces if it isn't (it
4573 pushes everything after it off the screen).
4574 @item [
4575 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4576 for adopted articles (@pxref{Customizing Threading}).
4577 @item ]
4578 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4579 for adopted articles.
4580 @item >
4581 One space for each thread level.
4582 @item <
4583 Twenty minus thread level spaces.
4584 @item U
4585 Unread. @xref{Read Articles}.
4586
4587 @item R
4588 This misleadingly named specifier is the @dfn{secondary mark}.  This
4589 mark will say whether the article has been replied to, has been cached,
4590 or has been saved.  @xref{Other Marks}.
4591
4592 @item i
4593 Score as a number (@pxref{Scoring}).
4594 @item z
4595 @vindex gnus-summary-zcore-fuzz
4596 Zcore, @samp{+} if above the default level and @samp{-} if below the
4597 default level.  If the difference between
4598 @code{gnus-summary-default-score} and the score is less than
4599 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4600 @item V
4601 Total thread score.
4602 @item x
4603 @code{Xref}.
4604 @item D
4605 @code{Date}.
4606 @item d
4607 The @code{Date} in @code{DD-MMM} format.
4608 @item o
4609 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4610 @item M
4611 @code{Message-ID}.
4612 @item r
4613 @code{References}.
4614 @item t
4615 Number of articles in the current sub-thread.  Using this spec will slow
4616 down summary buffer generation somewhat.
4617 @item e
4618 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4619 article has any children.
4620 @item P
4621 The line number.
4622 @item O
4623 Download mark.
4624 @item &user-date;
4625 Age sensitive date format.  Various date format is defined in
4626 @code{gnus-user-date-format-alist}.
4627 @item u
4628 User defined specifier.  The next character in the format string should
4629 be a letter.  Gnus will call the function
4630 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
4631 following @samp{%u}.  The function will be passed the current header as
4632 argument.  The function should return a string, which will be inserted
4633 into the summary just like information from any other summary specifier.
4634 @end table
4635
4636 Text between @samp{%(} and @samp{%)} will be highlighted with
4637 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4638 There can only be one such area.
4639
4640 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4641 have to be handled with care.  For reasons of efficiency, Gnus will
4642 compute what column these characters will end up in, and ``hard-code''
4643 that.  This means that it is invalid to have these specs after a
4644 variable-length spec.  Well, you might not be arrested, but your summary
4645 buffer will look strange, which is bad enough.
4646
4647 The smart choice is to have these specs as far to the left as possible.
4648 (Isn't that the case with everything, though?  But I digress.)
4649
4650 This restriction may disappear in later versions of Gnus.
4651
4652
4653 @node To From Newsgroups
4654 @subsection To From Newsgroups
4655 @cindex To
4656 @cindex Newsgroups
4657
4658 In some groups (particularly in archive groups), the @code{From} header
4659 isn't very interesting, since all the articles there are written by
4660 you.  To display the information in the @code{To} or @code{Newsgroups}
4661 headers instead, you need to decide three things: What information to
4662 gather; where to display it; and when to display it.
4663
4664 @enumerate
4665 @item
4666 @vindex gnus-extra-headers
4667 The reading of extra header information is controlled by the
4668 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4669 instance:
4670
4671 @lisp
4672 (setq gnus-extra-headers
4673       '(To Newsgroups X-Newsreader))
4674 @end lisp
4675
4676 This will result in Gnus trying to obtain these three headers, and
4677 storing it in header structures for later easy retrieval.
4678
4679 @item
4680 @findex gnus-extra-header
4681 The value of these extra headers can be accessed via the
4682 @code{gnus-extra-header} function.  Here's a format line spec that will
4683 access the @code{X-Newsreader} header:
4684
4685 @example
4686 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4687 @end example
4688
4689 @item
4690 @vindex gnus-ignored-from-addresses
4691 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4692 summary line spec returns the @code{To}, @code{Newsreader} or
4693 @code{From} header.  If this regexp matches the contents of the
4694 @code{From} header, the value of the @code{To} or @code{Newsreader}
4695 headers are used instead.
4696
4697 @end enumerate
4698
4699 @vindex nnmail-extra-headers
4700 A related variable is @code{nnmail-extra-headers}, which controls when
4701 to include extra headers when generating overview (@acronym{NOV}) files.
4702 If you have old overview files, you should regenerate them after
4703 changing this variable, by entering the server buffer using @kbd{^},
4704 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
4705 regeneration.
4706
4707 @vindex gnus-summary-line-format
4708 You also have to instruct Gnus to display the data by changing the
4709 @code{%n} spec to the @code{%f} spec in the
4710 @code{gnus-summary-line-format} variable.
4711
4712 In summary, you'd typically put something like the following in
4713 @file{~/.gnus.el}:
4714
4715 @lisp
4716 (setq gnus-extra-headers
4717       '(To Newsgroups))
4718 (setq nnmail-extra-headers gnus-extra-headers)
4719 (setq gnus-summary-line-format
4720       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4721 (setq gnus-ignored-from-addresses
4722       "Your Name Here")
4723 @end lisp
4724
4725 (The values listed above are the default values in Gnus.  Alter them
4726 to fit your needs.)
4727
4728 A note for news server administrators, or for users who wish to try to
4729 convince their news server administrator to provide some additional
4730 support:
4731
4732 The above is mostly useful for mail groups, where you have control over
4733 the @acronym{NOV} files that are created.  However, if you can persuade your
4734 nntp admin to add (in the usual implementation, notably INN):
4735
4736 @example
4737 Newsgroups:full
4738 @end example
4739
4740 to the end of her @file{overview.fmt} file, then you can use that just
4741 as you would the extra headers from the mail groups.
4742
4743
4744 @node Summary Buffer Mode Line
4745 @subsection Summary Buffer Mode Line
4746
4747 @vindex gnus-summary-mode-line-format
4748 You can also change the format of the summary mode bar (@pxref{Mode Line
4749 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4750 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4751
4752 Here are the elements you can play with:
4753
4754 @table @samp
4755 @item G
4756 Group name.
4757 @item p
4758 Unprefixed group name.
4759 @item A
4760 Current article number.
4761 @item z
4762 Current article score.
4763 @item V
4764 Gnus version.
4765 @item U
4766 Number of unread articles in this group.
4767 @item e
4768 Number of unread articles in this group that aren't displayed in the
4769 summary buffer.
4770 @item Z
4771 A string with the number of unread and unselected articles represented
4772 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4773 articles, and just as @samp{<%U more>} if there are just unread articles
4774 and no unselected ones.
4775 @item g
4776 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4777 shortened to @samp{r.a.anime}.
4778 @item S
4779 Subject of the current article.
4780 @item u
4781 User-defined spec (@pxref{User-Defined Specs}).
4782 @item s
4783 Name of the current score file (@pxref{Scoring}).
4784 @item d
4785 Number of dormant articles (@pxref{Unread Articles}).
4786 @item t
4787 Number of ticked articles (@pxref{Unread Articles}).
4788 @item r
4789 Number of articles that have been marked as read in this session.
4790 @item E
4791 Number of articles expunged by the score files.
4792 @end table
4793
4794
4795 @node Summary Highlighting
4796 @subsection Summary Highlighting
4797
4798 @table @code
4799
4800 @item gnus-visual-mark-article-hook
4801 @vindex gnus-visual-mark-article-hook
4802 This hook is run after selecting an article.  It is meant to be used for
4803 highlighting the article in some way.  It is not run if
4804 @code{gnus-visual} is @code{nil}.
4805
4806 @item gnus-summary-update-hook
4807 @vindex gnus-summary-update-hook
4808 This hook is called when a summary line is changed.  It is not run if
4809 @code{gnus-visual} is @code{nil}.
4810
4811 @item gnus-summary-selected-face
4812 @vindex gnus-summary-selected-face
4813 This is the face (or @dfn{font} as some people call it) used to
4814 highlight the current article in the summary buffer.
4815
4816 @item gnus-summary-highlight
4817 @vindex gnus-summary-highlight
4818 Summary lines are highlighted according to this variable, which is a
4819 list where the elements are of the format @code{(@var{form}
4820 . @var{face})}.  If you would, for instance, like ticked articles to be
4821 italic and high-scored articles to be bold, you could set this variable
4822 to something like
4823 @lisp
4824 (((eq mark gnus-ticked-mark) . italic)
4825  ((> score default) . bold))
4826 @end lisp
4827 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4828 @var{face} will be applied to the line.
4829 @end table
4830
4831
4832 @node Summary Maneuvering
4833 @section Summary Maneuvering
4834 @cindex summary movement
4835
4836 All the straight movement commands understand the numeric prefix and
4837 behave pretty much as you'd expect.
4838
4839 None of these commands select articles.
4840
4841 @table @kbd
4842 @item G M-n
4843 @itemx M-n
4844 @kindex M-n (Summary)
4845 @kindex G M-n (Summary)
4846 @findex gnus-summary-next-unread-subject
4847 Go to the next summary line of an unread article
4848 (@code{gnus-summary-next-unread-subject}).
4849
4850 @item G M-p
4851 @itemx M-p
4852 @kindex M-p (Summary)
4853 @kindex G M-p (Summary)
4854 @findex gnus-summary-prev-unread-subject
4855 Go to the previous summary line of an unread article
4856 (@code{gnus-summary-prev-unread-subject}).
4857
4858 @item G g
4859 @kindex G g (Summary)
4860 @findex gnus-summary-goto-subject
4861 Ask for an article number and then go to the summary line of that article
4862 without displaying the article (@code{gnus-summary-goto-subject}).
4863 @end table
4864
4865 If Gnus asks you to press a key to confirm going to the next group, you
4866 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4867 buffer, searching for the next group to read without actually returning
4868 to the group buffer.
4869
4870 Variables related to summary movement:
4871
4872 @table @code
4873
4874 @vindex gnus-auto-select-next
4875 @item gnus-auto-select-next
4876 If you issue one of the movement commands (like @kbd{n}) and there are
4877 no more unread articles after the current one, Gnus will offer to go to
4878 the next group.  If this variable is @code{t} and the next group is
4879 empty, Gnus will exit summary mode and return to the group buffer.  If
4880 this variable is neither @code{t} nor @code{nil}, Gnus will select the
4881 next group with unread articles.  As a special case, if this variable
4882 is @code{quietly}, Gnus will select the next group without asking for
4883 confirmation.  If this variable is @code{almost-quietly}, the same
4884 will happen only if you are located on the last article in the group.
4885 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4886 command will go to the next group without confirmation.  Also
4887 @pxref{Group Levels}.
4888
4889 @item gnus-auto-select-same
4890 @vindex gnus-auto-select-same
4891 If non-@code{nil}, all the movement commands will try to go to the next
4892 article with the same subject as the current.  (@dfn{Same} here might
4893 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4894 for details (@pxref{Customizing Threading}).)  If there are no more
4895 articles with the same subject, go to the first unread article.
4896
4897 This variable is not particularly useful if you use a threaded display.
4898
4899 @item gnus-summary-check-current
4900 @vindex gnus-summary-check-current
4901 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4902 to the next (or previous) article if the current article is unread.
4903 Instead, they will choose the current article.
4904
4905 @item gnus-auto-center-summary
4906 @vindex gnus-auto-center-summary
4907 If non-@code{nil}, Gnus will keep the point in the summary buffer
4908 centered at all times.  This makes things quite tidy, but if you have a
4909 slow network connection, or simply do not like this un-Emacsism, you can
4910 set this variable to @code{nil} to get the normal Emacs scrolling
4911 action.  This will also inhibit horizontal re-centering of the summary
4912 buffer, which might make it more inconvenient to read extremely long
4913 threads.
4914
4915 This variable can also be a number.  In that case, center the window at
4916 the given number of lines from the top.
4917
4918 @end table
4919
4920
4921 @node Choosing Articles
4922 @section Choosing Articles
4923 @cindex selecting articles
4924
4925 @menu
4926 * Choosing Commands::           Commands for choosing articles.
4927 * Choosing Variables::          Variables that influence these commands.
4928 @end menu
4929
4930
4931 @node Choosing Commands
4932 @subsection Choosing Commands
4933
4934 None of the following movement commands understand the numeric prefix,
4935 and they all select and display an article.
4936
4937 If you want to fetch new articles or redisplay the group, see
4938 @ref{Exiting the Summary Buffer}.
4939
4940 @table @kbd
4941 @item SPACE
4942 @kindex SPACE (Summary)
4943 @findex gnus-summary-next-page
4944 Select the current article, or, if that one's read already, the next
4945 unread article (@code{gnus-summary-next-page}).
4946
4947 If you have an article window open already and you press @kbd{SPACE}
4948 again, the article will be scrolled.  This lets you conveniently
4949 @kbd{SPACE} through an entire newsgroup.  @pxref{Paging the Article}.
4950
4951 @item G n
4952 @itemx n
4953 @kindex n (Summary)
4954 @kindex G n (Summary)
4955 @findex gnus-summary-next-unread-article
4956 @c @icon{gnus-summary-next-unread}
4957 Go to next unread article (@code{gnus-summary-next-unread-article}).
4958
4959 @item G p
4960 @itemx p
4961 @kindex p (Summary)
4962 @findex gnus-summary-prev-unread-article
4963 @c @icon{gnus-summary-prev-unread}
4964 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
4965
4966 @item G N
4967 @itemx N
4968 @kindex N (Summary)
4969 @kindex G N (Summary)
4970 @findex gnus-summary-next-article
4971 Go to the next article (@code{gnus-summary-next-article}).
4972
4973 @item G P
4974 @itemx P
4975 @kindex P (Summary)
4976 @kindex G P (Summary)
4977 @findex gnus-summary-prev-article
4978 Go to the previous article (@code{gnus-summary-prev-article}).
4979
4980 @item G C-n
4981 @kindex G C-n (Summary)
4982 @findex gnus-summary-next-same-subject
4983 Go to the next article with the same subject
4984 (@code{gnus-summary-next-same-subject}).
4985
4986 @item G C-p
4987 @kindex G C-p (Summary)
4988 @findex gnus-summary-prev-same-subject
4989 Go to the previous article with the same subject
4990 (@code{gnus-summary-prev-same-subject}).
4991
4992 @item G f
4993 @itemx .
4994 @kindex G f  (Summary)
4995 @kindex .  (Summary)
4996 @findex gnus-summary-first-unread-article
4997 Go to the first unread article
4998 (@code{gnus-summary-first-unread-article}).
4999
5000 @item G b
5001 @itemx ,
5002 @kindex G b (Summary)
5003 @kindex , (Summary)
5004 @findex gnus-summary-best-unread-article
5005 Go to the unread article with the highest score
5006 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
5007 go to the first unread article that has a score over the default score.
5008
5009 @item G l
5010 @itemx l
5011 @kindex l (Summary)
5012 @kindex G l (Summary)
5013 @findex gnus-summary-goto-last-article
5014 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5015
5016 @item G o
5017 @kindex G o (Summary)
5018 @findex gnus-summary-pop-article
5019 @cindex history
5020 @cindex article history
5021 Pop an article off the summary history and go to this article
5022 (@code{gnus-summary-pop-article}).  This command differs from the
5023 command above in that you can pop as many previous articles off the
5024 history as you like, while @kbd{l} toggles the two last read articles.
5025 For a somewhat related issue (if you use these commands a lot),
5026 @pxref{Article Backlog}.
5027
5028 @item G j
5029 @itemx j
5030 @kindex j (Summary)
5031 @kindex G j (Summary)
5032 @findex gnus-summary-goto-article
5033 Ask for an article number or @code{Message-ID}, and then go to that
5034 article (@code{gnus-summary-goto-article}).
5035
5036 @end table
5037
5038
5039 @node Choosing Variables
5040 @subsection Choosing Variables
5041
5042 Some variables relevant for moving and selecting articles:
5043
5044 @table @code
5045 @item gnus-auto-extend-newsgroup
5046 @vindex gnus-auto-extend-newsgroup
5047 All the movement commands will try to go to the previous (or next)
5048 article, even if that article isn't displayed in the Summary buffer if
5049 this variable is non-@code{nil}.  Gnus will then fetch the article from
5050 the server and display it in the article buffer.
5051
5052 @item gnus-select-article-hook
5053 @vindex gnus-select-article-hook
5054 This hook is called whenever an article is selected.  By default it
5055 exposes any threads hidden under the selected article.  If you would 
5056 like each article to be saved in the Agent as you read it, putting
5057 @code{gnus-agent-fetch-selected-article} on this hook will do so.
5058
5059 @item gnus-mark-article-hook
5060 @vindex gnus-mark-article-hook
5061 @findex gnus-summary-mark-unread-as-read
5062 @findex gnus-summary-mark-read-and-unread-as-read
5063 @findex gnus-unread-mark
5064 This hook is called whenever an article is selected.  It is intended to
5065 be used for marking articles as read.  The default value is
5066 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5067 mark of almost any article you read to @code{gnus-unread-mark}.  The
5068 only articles not affected by this function are ticked, dormant, and
5069 expirable articles.  If you'd instead like to just have unread articles
5070 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5071 instead.  It will leave marks like @code{gnus-low-score-mark},
5072 @code{gnus-del-mark} (and so on) alone.
5073
5074 @end table
5075
5076
5077 @node Paging the Article
5078 @section Scrolling the Article
5079 @cindex article scrolling
5080
5081 @table @kbd
5082
5083 @item SPACE
5084 @kindex SPACE (Summary)
5085 @findex gnus-summary-next-page
5086 Pressing @kbd{SPACE} will scroll the current article forward one page,
5087 or, if you have come to the end of the current article, will choose the
5088 next article (@code{gnus-summary-next-page}).
5089
5090 @vindex gnus-article-boring-faces
5091 @vindex gnus-article-skip-boring
5092 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5093 the article consists only of citations and signature, then it will be
5094 skipped; the next article will be shown instead.  You can customize
5095 what is considered uninteresting with
5096 @code{gnus-article-boring-faces}.  You can manually view the article's
5097 pages, no matter how boring, using @kbd{C-M-v}.
5098
5099 @item DEL
5100 @kindex DEL (Summary)
5101 @findex gnus-summary-prev-page
5102 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5103
5104 @item RET
5105 @kindex RET (Summary)
5106 @findex gnus-summary-scroll-up
5107 Scroll the current article one line forward
5108 (@code{gnus-summary-scroll-up}).
5109
5110 @item M-RET
5111 @kindex M-RET (Summary)
5112 @findex gnus-summary-scroll-down
5113 Scroll the current article one line backward
5114 (@code{gnus-summary-scroll-down}).
5115
5116 @item A g
5117 @itemx g
5118 @kindex A g (Summary)
5119 @kindex g (Summary)
5120 @findex gnus-summary-show-article
5121 @vindex gnus-summary-show-article-charset-alist
5122 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5123 given a prefix, fetch the current article, but don't run any of the
5124 article treatment functions.  This will give you a ``raw'' article, just
5125 the way it came from the server.
5126
5127 If given a numerical prefix, you can do semi-manual charset stuff.
5128 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5129 encoded in the @code{cn-gb-2312} charset.  If you have
5130
5131 @lisp
5132 (setq gnus-summary-show-article-charset-alist
5133       '((1 . cn-gb-2312)
5134         (2 . big5)))
5135 @end lisp
5136
5137 then you can say @kbd{C-u 1 g} to get the same effect.
5138
5139 @item A <
5140 @itemx <
5141 @kindex < (Summary)
5142 @kindex A < (Summary)
5143 @findex gnus-summary-beginning-of-article
5144 Scroll to the beginning of the article
5145 (@code{gnus-summary-beginning-of-article}).
5146
5147 @item A >
5148 @itemx >
5149 @kindex > (Summary)
5150 @kindex A > (Summary)
5151 @findex gnus-summary-end-of-article
5152 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5153
5154 @item A s
5155 @itemx s
5156 @kindex A s (Summary)
5157 @kindex s (Summary)
5158 @findex gnus-summary-isearch-article
5159 Perform an isearch in the article buffer
5160 (@code{gnus-summary-isearch-article}).
5161
5162 @item h
5163 @kindex h (Summary)
5164 @findex gnus-summary-select-article-buffer
5165 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5166
5167 @end table
5168
5169
5170 @node Reply Followup and Post
5171 @section Reply, Followup and Post
5172
5173 @menu
5174 * Summary Mail Commands::       Sending mail.
5175 * Summary Post Commands::       Sending news.
5176 * Summary Message Commands::    Other Message-related commands.
5177 * Canceling and Superseding::   
5178 @end menu
5179
5180
5181 @node Summary Mail Commands
5182 @subsection Summary Mail Commands
5183 @cindex mail
5184 @cindex composing mail
5185
5186 Commands for composing a mail message:
5187
5188 @table @kbd
5189
5190 @item S r
5191 @itemx r
5192 @kindex S r (Summary)
5193 @kindex r (Summary)
5194 @findex gnus-summary-reply
5195 @c @icon{gnus-summary-mail-reply}
5196 @c @icon{gnus-summary-reply}
5197 Mail a reply to the author of the current article
5198 (@code{gnus-summary-reply}).
5199
5200 @item S R
5201 @itemx R
5202 @kindex R (Summary)
5203 @kindex S R (Summary)
5204 @findex gnus-summary-reply-with-original
5205 @c @icon{gnus-summary-reply-with-original}
5206 Mail a reply to the author of the current article and include the
5207 original message (@code{gnus-summary-reply-with-original}).  This
5208 command uses the process/prefix convention.
5209
5210 @item S w
5211 @kindex S w (Summary)
5212 @findex gnus-summary-wide-reply
5213 Mail a wide reply to the author of the current article
5214 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5215 goes out to all people listed in the @code{To}, @code{From} (or
5216 @code{Reply-to}) and @code{Cc} headers.
5217
5218 @item S W
5219 @kindex S W (Summary)
5220 @findex gnus-summary-wide-reply-with-original
5221 Mail a wide reply to the current article and include the original
5222 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5223 the process/prefix convention.
5224
5225 @item S v
5226 @kindex S v (Summary)
5227 @findex gnus-summary-very-wide-reply
5228 Mail a very wide reply to the author of the current article
5229 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5230 that goes out to all people listed in the @code{To}, @code{From} (or
5231 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5232 articles.  This command uses the process/prefix convention.
5233
5234 @item S V
5235 @kindex S V (Summary)
5236 @findex gnus-summary-very-wide-reply-with-original
5237 Mail a very wide reply to the author of the current article and include the
5238 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5239 command uses the process/prefix convention.
5240
5241 @item S B r
5242 @kindex S B r (Summary)
5243 @findex gnus-summary-reply-broken-reply-to
5244 Mail a reply to the author of the current article but ignore the
5245 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5246 If you need this because a mailing list incorrectly sets a
5247 @code{Reply-To} header pointing to the list, you probably want to set
5248 the @code{broken-reply-to} group parameter instead, so things will work
5249 correctly.  @xref{Group Parameters}.
5250
5251 @item S B R
5252 @kindex S B R (Summary)
5253 @findex gnus-summary-reply-broken-reply-to-with-original
5254 Mail a reply to the author of the current article and include the
5255 original message but ignore the @code{Reply-To} field
5256 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5257
5258 @item S o m
5259 @itemx C-c C-f
5260 @kindex S o m (Summary)
5261 @kindex C-c C-f (Summary)
5262 @findex gnus-summary-mail-forward
5263 @c @icon{gnus-summary-mail-forward}
5264 Forward the current article to some other person
5265 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
5266 is forwarded according to the value of (@code{message-forward-as-mime})
5267 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
5268 message and forward directly inline; if the prefix is 2, forward message
5269 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5270 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5271 directly inline; otherwise, the message is forwarded as no prefix given
5272 but use the flipped value of (@code{message-forward-as-mime}).  By
5273 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
5274 section.
5275
5276 @item S m
5277 @itemx m
5278 @kindex m (Summary)
5279 @kindex S m (Summary)
5280 @findex gnus-summary-mail-other-window
5281 @c @icon{gnus-summary-mail-originate}
5282 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5283 the posting style of the current group.  If given a prefix, disable that.
5284 If the prefix is 1, prompt for a group name to find the posting style.
5285
5286 @item S i
5287 @itemx i
5288 @kindex i (Summary)
5289 @kindex S i (Summary)
5290 @findex gnus-summary-news-other-window
5291 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5292 post to the current group.  If given a prefix, disable that.  If the
5293 prefix is 1, prompt for a group to post to.
5294
5295 This function actually prepares a news even when using mail groups.
5296 This is useful for ``posting'' messages to mail groups without actually
5297 sending them over the network: they're just saved directly to the group
5298 in question.  The corresponding back end must have a request-post method
5299 for this to work though.
5300
5301 @item S D b
5302 @kindex S D b (Summary)
5303 @findex gnus-summary-resend-bounced-mail
5304 @cindex bouncing mail
5305 If you have sent a mail, but the mail was bounced back to you for some
5306 reason (wrong address, transient failure), you can use this command to
5307 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5308 will be popped into a mail buffer where you can edit the headers before
5309 sending the mail off again.  If you give a prefix to this command, and
5310 the bounced mail is a reply to some other mail, Gnus will try to fetch
5311 that mail and display it for easy perusal of its headers.  This might
5312 very well fail, though.
5313
5314 @item S D r
5315 @kindex S D r (Summary)
5316 @findex gnus-summary-resend-message
5317 Not to be confused with the previous command,
5318 @code{gnus-summary-resend-message} will prompt you for an address to
5319 send the current message off to, and then send it to that place.  The
5320 headers of the message won't be altered---but lots of headers that say
5321 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5322 means that you actually send a mail to someone that has a @code{To}
5323 header that (probably) points to yourself.  This will confuse people.
5324 So, natcherly you'll only do that if you're really eVIl.
5325
5326 This command is mainly used if you have several accounts and want to
5327 ship a mail to a different account of yours.  (If you're both
5328 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5329 to the @code{root} account, you may want to resend it to
5330 @code{postmaster}.  Ordnung muss sein!
5331
5332 This command understands the process/prefix convention
5333 (@pxref{Process/Prefix}).
5334
5335 @item S O m
5336 @kindex S O m (Summary)
5337 @findex gnus-uu-digest-mail-forward
5338 Digest the current series (@pxref{Decoding Articles}) and forward the
5339 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
5340 uses the process/prefix convention (@pxref{Process/Prefix}).
5341
5342 @item S M-c
5343 @kindex S M-c (Summary)
5344 @findex gnus-summary-mail-crosspost-complaint
5345 @cindex crossposting
5346 @cindex excessive crossposting
5347 Send a complaint about excessive crossposting to the author of the
5348 current article (@code{gnus-summary-mail-crosspost-complaint}).
5349
5350 @findex gnus-crosspost-complaint
5351 This command is provided as a way to fight back against the current
5352 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5353 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5354 command understands the process/prefix convention
5355 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5356
5357 @end table
5358
5359 Also @xref{Header Commands, ,Header Commands, message, The Message
5360 Manual}, for more information.
5361
5362
5363 @node Summary Post Commands
5364 @subsection Summary Post Commands
5365 @cindex post
5366 @cindex composing news
5367
5368 Commands for posting a news article:
5369
5370 @table @kbd
5371 @item S p
5372 @itemx a
5373 @kindex a (Summary)
5374 @kindex S p (Summary)
5375 @findex gnus-summary-post-news
5376 @c @icon{gnus-summary-post-news}
5377 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5378 default, post to the current group.  If given a prefix, disable that.
5379 If the prefix is 1, prompt for another group instead.
5380
5381 @item S f
5382 @itemx f
5383 @kindex f (Summary)
5384 @kindex S f (Summary)
5385 @findex gnus-summary-followup
5386 @c @icon{gnus-summary-followup}
5387 Post a followup to the current article (@code{gnus-summary-followup}).
5388
5389 @item S F
5390 @itemx F
5391 @kindex S F (Summary)
5392 @kindex F (Summary)
5393 @c @icon{gnus-summary-followup-with-original}
5394 @findex gnus-summary-followup-with-original
5395 Post a followup to the current article and include the original message
5396 (@code{gnus-summary-followup-with-original}).   This command uses the
5397 process/prefix convention.
5398
5399 @item S n
5400 @kindex S n (Summary)
5401 @findex gnus-summary-followup-to-mail
5402 Post a followup to the current article via news, even if you got the
5403 message through mail (@code{gnus-summary-followup-to-mail}).
5404
5405 @item S N
5406 @kindex S N (Summary)
5407 @findex gnus-summary-followup-to-mail-with-original
5408 Post a followup to the current article via news, even if you got the
5409 message through mail and include the original message
5410 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5411 the process/prefix convention.
5412
5413 @item S o p
5414 @kindex S o p (Summary)
5415 @findex gnus-summary-post-forward
5416 Forward the current article to a newsgroup
5417 (@code{gnus-summary-post-forward}).
5418  If no prefix is given, the message is forwarded according to the value
5419 of (@code{message-forward-as-mime}) and
5420 (@code{message-forward-show-mml}); if the prefix is 1, decode the
5421 message and forward directly inline; if the prefix is 2, forward message
5422 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5423 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5424 directly inline; otherwise, the message is forwarded as no prefix given
5425 but use the flipped value of (@code{message-forward-as-mime}).  By
5426 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
5427
5428 @item S O p
5429 @kindex S O p (Summary)
5430 @findex gnus-uu-digest-post-forward
5431 @cindex digests
5432 @cindex making digests
5433 Digest the current series and forward the result to a newsgroup
5434 (@code{gnus-uu-digest-mail-forward}).  This command uses the
5435 process/prefix convention.
5436
5437 @item S u
5438 @kindex S u (Summary)
5439 @findex gnus-uu-post-news
5440 @c @icon{gnus-uu-post-news}
5441 Uuencode a file, split it into parts, and post it as a series
5442 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5443 @end table
5444
5445 Also @xref{Header Commands, ,Header Commands, message, The Message
5446 Manual}, for more information.
5447
5448
5449 @node Summary Message Commands
5450 @subsection Summary Message Commands
5451
5452 @table @kbd
5453 @item S y
5454 @kindex S y (Summary)
5455 @findex gnus-summary-yank-message
5456 Yank the current article into an already existing Message composition
5457 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5458 what message buffer you want to yank into, and understands the
5459 process/prefix convention (@pxref{Process/Prefix}).
5460
5461 @end table
5462
5463
5464 @node Canceling and Superseding
5465 @subsection Canceling Articles
5466 @cindex canceling articles
5467 @cindex superseding articles
5468
5469 Have you ever written something, and then decided that you really,
5470 really, really wish you hadn't posted that?
5471
5472 Well, you can't cancel mail, but you can cancel posts.
5473
5474 @findex gnus-summary-cancel-article
5475 @kindex C (Summary)
5476 @c @icon{gnus-summary-cancel-article}
5477 Find the article you wish to cancel (you can only cancel your own
5478 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5479 c} (@code{gnus-summary-cancel-article}).  Your article will be
5480 canceled---machines all over the world will be deleting your article.
5481 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5482
5483 Be aware, however, that not all sites honor cancels, so your article may
5484 live on here and there, while most sites will delete the article in
5485 question.
5486
5487 Gnus will use the ``current'' select method when canceling.  If you
5488 want to use the standard posting method, use the @samp{a} symbolic
5489 prefix (@pxref{Symbolic Prefixes}).
5490
5491 If you discover that you have made some mistakes and want to do some
5492 corrections, you can post a @dfn{superseding} article that will replace
5493 your original article.
5494
5495 @findex gnus-summary-supersede-article
5496 @kindex S (Summary)
5497 Go to the original article and press @kbd{S s}
5498 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5499 where you can edit the article all you want before sending it off the
5500 usual way.
5501
5502 The same goes for superseding as for canceling, only more so: Some
5503 sites do not honor superseding.  On those sites, it will appear that you
5504 have posted almost the same article twice.
5505
5506 If you have just posted the article, and change your mind right away,
5507 there is a trick you can use to cancel/supersede the article without
5508 waiting for the article to appear on your site first.  You simply return
5509 to the post buffer (which is called @code{*sent ...*}).  There you will
5510 find the article you just posted, with all the headers intact.  Change
5511 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5512 header by substituting one of those words for the word
5513 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5514 you would do normally.  The previous article will be
5515 canceled/superseded.
5516
5517 Just remember, kids: There is no 'c' in 'supersede'.
5518
5519 @node Delayed Articles
5520 @section Delayed Articles
5521 @cindex delayed sending
5522 @cindex send delayed
5523
5524 Sometimes, you might wish to delay the sending of a message.  For
5525 example, you might wish to arrange for a message to turn up just in time
5526 to remind your about the birthday of your Significant Other.  For this,
5527 there is the @code{gnus-delay} package.  Setup is simple:
5528
5529 @lisp
5530 (gnus-delay-initialize)
5531 @end lisp
5532
5533 @findex gnus-delay-article
5534 Normally, to send a message you use the @kbd{C-c C-c} command from
5535 Message mode.  To delay a message, use @kbd{C-c C-j}
5536 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5537 message should be delayed.  Possible answers are:
5538
5539 @itemize @bullet
5540 @item
5541 A time span.  Consists of an integer and a letter.  For example,
5542 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5543 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5544 (months) and @code{Y} (years).
5545
5546 @item
5547 A specific date.  Looks like @code{YYYYY-MM-DD}.  The message will be
5548 delayed until that day, at a specific time (eight o'clock by default).
5549 See also @code{gnus-delay-default-hour}.
5550
5551 @item
5552 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5553 stuff.  The deadline will be at that time today, except if that time has
5554 already passed, then it's at the given time tomorrow.  So if it's ten
5555 o'clock in the morning and you specify @code{11:15}, then the deadline
5556 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5557 that means a time tomorrow.
5558 @end itemize
5559
5560 The action of the @code{gnus-delay-article} command is influenced by a
5561 couple of variables:
5562
5563 @table @code
5564 @item gnus-delay-default-hour
5565 @vindex gnus-delay-default-hour
5566 When you specify a specific date, the message will be due on that hour
5567 on the given date.  Possible values are integers 0 through 23.
5568
5569 @item gnus-delay-default-delay
5570 @vindex gnus-delay-default-delay
5571 This is a string and gives the default delay.  It can be of any of the
5572 formats described above.
5573
5574 @item gnus-delay-group
5575 @vindex gnus-delay-group
5576 Delayed articles will be kept in this group on the drafts server until
5577 they are due.  You probably don't need to change this.  The default
5578 value is @code{"delayed"}.
5579
5580 @item gnus-delay-header
5581 @vindex gnus-delay-header
5582 The deadline for each article will be stored in a header.  This variable
5583 is a string and gives the header name.  You probably don't need to
5584 change this.  The default value is @code{"X-Gnus-Delayed"}.
5585 @end table
5586
5587 The way delaying works is like this: when you use the
5588 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5589 calculates the deadline of the message and stores it in the
5590 @code{X-Gnus-Delayed} header and puts the message in the
5591 @code{nndraft:delayed} group.
5592
5593 @findex gnus-delay-send-queue
5594 And whenever you get new news, Gnus looks through the group for articles
5595 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5596 function for this.  By default, this function is added to the hook
5597 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5598 Maybe you want to use the demon to send drafts?  Just tell the demon to
5599 execute the @code{gnus-delay-send-queue} function.
5600
5601 @table @code
5602 @item gnus-delay-initialize
5603 @findex gnus-delay-initialize
5604 By default, this function installs @code{gnus-delay-send-queue} in
5605 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5606 argument @code{no-check}.  If it is non-@code{nil},
5607 @code{gnus-get-new-news-hook} is not changed.  The optional first
5608 argument is ignored.
5609
5610 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5611 Presumably, you want to use the demon for sending due delayed articles.
5612 Just don't forget to set that up :-)
5613 @end table
5614
5615
5616 @node Marking Articles
5617 @section Marking Articles
5618 @cindex article marking
5619 @cindex article ticking
5620 @cindex marks
5621
5622 There are several marks you can set on an article.
5623
5624 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5625 neologism ohoy!) of the article.  Alphabetic marks generally mean
5626 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5627
5628 In addition, you also have marks that do not affect readedness.
5629
5630 @menu
5631 * Unread Articles::             Marks for unread articles.
5632 * Read Articles::               Marks for read articles.
5633 * Other Marks::                 Marks that do not affect readedness.
5634 @end menu
5635
5636 @ifinfo
5637 There's a plethora of commands for manipulating these marks:
5638 @end ifinfo
5639
5640 @menu
5641 * Setting Marks::             How to set and remove marks.
5642 * Generic Marking Commands::  How to customize the marking.
5643 * Setting Process Marks::     How to mark articles for later processing.
5644 @end menu
5645
5646
5647 @node Unread Articles
5648 @subsection Unread Articles
5649
5650 The following marks mark articles as (kinda) unread, in one form or
5651 other.
5652
5653 @table @samp
5654 @item !
5655 @vindex gnus-ticked-mark
5656 Marked as ticked (@code{gnus-ticked-mark}).
5657
5658 @dfn{Ticked articles} are articles that will remain visible always.  If
5659 you see an article that you find interesting, or you want to put off
5660 reading it, or replying to it, until sometime later, you'd typically
5661 tick it.  However, articles can be expired (from news servers by the
5662 news server software, Gnus itself never expires ticked messages), so if
5663 you want to keep an article forever, you'll have to make it persistent
5664 (@pxref{Persistent Articles}).
5665
5666 @item ?
5667 @vindex gnus-dormant-mark
5668 Marked as dormant (@code{gnus-dormant-mark}).
5669
5670 @dfn{Dormant articles} will only appear in the summary buffer if there
5671 are followups to it.  If you want to see them even if they don't have
5672 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5673 Otherwise (except for the visibility issue), they are just like ticked
5674 messages.
5675
5676 @item SPACE
5677 @vindex gnus-unread-mark
5678 Marked as unread (@code{gnus-unread-mark}).
5679
5680 @dfn{Unread articles} are articles that haven't been read at all yet.
5681 @end table
5682
5683
5684 @node Read Articles
5685 @subsection Read Articles
5686 @cindex expirable mark
5687
5688 All the following marks mark articles as read.
5689
5690 @table @samp
5691
5692 @item r
5693 @vindex gnus-del-mark
5694 These are articles that the user has marked as read with the @kbd{d}
5695 command manually, more or less (@code{gnus-del-mark}).
5696
5697 @item R
5698 @vindex gnus-read-mark
5699 Articles that have actually been read (@code{gnus-read-mark}).
5700
5701 @item O
5702 @vindex gnus-ancient-mark
5703 Articles that were marked as read in previous sessions and are now
5704 @dfn{old} (@code{gnus-ancient-mark}).
5705
5706 @item K
5707 @vindex gnus-killed-mark
5708 Marked as killed (@code{gnus-killed-mark}).
5709
5710 @item X
5711 @vindex gnus-kill-file-mark
5712 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5713
5714 @item Y
5715 @vindex gnus-low-score-mark
5716 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5717
5718 @item C
5719 @vindex gnus-catchup-mark
5720 Marked as read by a catchup (@code{gnus-catchup-mark}).
5721
5722 @item G
5723 @vindex gnus-canceled-mark
5724 Canceled article (@code{gnus-canceled-mark})
5725
5726 @item F
5727 @vindex gnus-souped-mark
5728 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5729
5730 @item Q
5731 @vindex gnus-sparse-mark
5732 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5733 Threading}.
5734
5735 @item M
5736 @vindex gnus-duplicate-mark
5737 Article marked as read by duplicate suppression
5738 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5739
5740 @end table
5741
5742 All these marks just mean that the article is marked as read, really.
5743 They are interpreted differently when doing adaptive scoring, though.
5744
5745 One more special mark, though:
5746
5747 @table @samp
5748 @item E
5749 @vindex gnus-expirable-mark
5750 Marked as expirable (@code{gnus-expirable-mark}).
5751
5752 Marking articles as @dfn{expirable} (or have them marked as such
5753 automatically) doesn't make much sense in normal groups---a user doesn't
5754 control expiring of news articles, but in mail groups, for instance,
5755 articles marked as @dfn{expirable} can be deleted by Gnus at
5756 any time.
5757 @end table
5758
5759
5760 @node Other Marks
5761 @subsection Other Marks
5762 @cindex process mark
5763 @cindex bookmarks
5764
5765 There are some marks that have nothing to do with whether the article is
5766 read or not.
5767
5768 @itemize @bullet
5769
5770 @item
5771 You can set a bookmark in the current article.  Say you are reading a
5772 long thesis on cats' urinary tracts, and have to go home for dinner
5773 before you've finished reading the thesis.  You can then set a bookmark
5774 in the article, and Gnus will jump to this bookmark the next time it
5775 encounters the article.  @xref{Setting Marks}.
5776
5777 @item
5778 @vindex gnus-replied-mark
5779 All articles that you have replied to or made a followup to (i.e., have
5780 answered) will be marked with an @samp{A} in the second column
5781 (@code{gnus-replied-mark}).
5782
5783 @item
5784 @vindex gnus-forwarded-mark
5785 All articles that you have forwarded will be marked with an @samp{F} in
5786 the second column (@code{gnus-forwarded-mark}).
5787
5788 @item
5789 @vindex gnus-cached-mark
5790 Articles stored in the article cache will be marked with an @samp{*} in
5791 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5792
5793 @item
5794 @vindex gnus-saved-mark
5795 Articles ``saved'' (in some manner or other; not necessarily
5796 religiously) are marked with an @samp{S} in the second column
5797 (@code{gnus-saved-mark}).
5798
5799 @item
5800 @vindex gnus-recent-mark
5801 Articles that according to the server haven't been shown to the user
5802 before are marked with a @samp{N} in the second column
5803 (@code{gnus-recent-mark}).  Note that not all servers support this
5804 mark, in which case it simply never appears. Compare with
5805 @code{gnus-unseen-mark}.
5806
5807 @item
5808 @vindex gnus-unseen-mark
5809 Articles that haven't been seen before in Gnus by the user are marked
5810 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5811 Compare with @code{gnus-recent-mark}.
5812
5813 @item
5814 @vindex gnus-downloaded-mark
5815 When using the Gnus agent @pxref{Agent Basics}, articles may be
5816 downloaded for unplugged (offline) viewing.  If you are using the
5817 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5818 (The variable @code{gnus-downloaded-mark} controls which character to
5819 use.)
5820
5821 @item
5822 @vindex gnus-undownloaded-mark
5823 When using the Gnus agent @pxref{Agent Basics}, some articles might
5824 not have been downloaded.  Such articles cannot be viewed while you
5825 are unplugged (offline).  If you are using the @samp{%O} spec, these
5826 articles get the @samp{-} mark in that spec.  (The variable
5827 @code{gnus-undownloaded-mark} controls which character to use.)
5828
5829 @item
5830 @vindex gnus-downloadable-mark
5831 The Gnus agent @pxref{Agent Basics} downloads some articles
5832 automatically, but it is also possible to explicitly mark articles for
5833 download, even if they would not be downloaded automatically.  Such
5834 explicitly-marked articles get the @samp{%} mark in the first column.
5835 (The variable @code{gnus-downloadable-mark} controls which character to
5836 use.)
5837
5838 @item
5839 @vindex gnus-not-empty-thread-mark
5840 @vindex gnus-empty-thread-mark
5841 If the @samp{%e} spec is used, the presence of threads or not will be
5842 marked with @code{gnus-not-empty-thread-mark} and
5843 @code{gnus-empty-thread-mark} in the third column, respectively.
5844
5845 @item
5846 @vindex gnus-process-mark
5847 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5848 variety of commands react to the presence of the process mark.  For
5849 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5850 all articles that have been marked with the process mark.  Articles
5851 marked with the process mark have a @samp{#} in the second column.
5852
5853 @end itemize
5854
5855 You might have noticed that most of these ``non-readedness'' marks
5856 appear in the second column by default.  So if you have a cached, saved,
5857 replied article that you have process-marked, what will that look like?
5858
5859 Nothing much.  The precedence rules go as follows: process -> cache ->
5860 replied -> saved.  So if the article is in the cache and is replied,
5861 you'll only see the cache mark and not the replied mark.
5862
5863
5864 @node Setting Marks
5865 @subsection Setting Marks
5866 @cindex setting marks
5867
5868 All the marking commands understand the numeric prefix.
5869
5870 @table @kbd
5871 @item M c
5872 @itemx M-u
5873 @kindex M c (Summary)
5874 @kindex M-u (Summary)
5875 @findex gnus-summary-clear-mark-forward
5876 @cindex mark as unread
5877 Clear all readedness-marks from the current article
5878 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5879 article as unread.
5880
5881 @item M t
5882 @itemx !
5883 @kindex ! (Summary)
5884 @kindex M t (Summary)
5885 @findex gnus-summary-tick-article-forward
5886 Tick the current article (@code{gnus-summary-tick-article-forward}).
5887 @xref{Article Caching}.
5888
5889 @item M ?
5890 @itemx ?
5891 @kindex ? (Summary)
5892 @kindex M ? (Summary)
5893 @findex gnus-summary-mark-as-dormant
5894 Mark the current article as dormant
5895 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5896
5897 @item M d
5898 @itemx d
5899 @kindex M d (Summary)
5900 @kindex d (Summary)
5901 @findex gnus-summary-mark-as-read-forward
5902 Mark the current article as read
5903 (@code{gnus-summary-mark-as-read-forward}).
5904
5905 @item D
5906 @kindex D (Summary)
5907 @findex gnus-summary-mark-as-read-backward
5908 Mark the current article as read and move point to the previous line
5909 (@code{gnus-summary-mark-as-read-backward}).
5910
5911 @item M k
5912 @itemx k
5913 @kindex k (Summary)
5914 @kindex M k (Summary)
5915 @findex gnus-summary-kill-same-subject-and-select
5916 Mark all articles that have the same subject as the current one as read,
5917 and then select the next unread article
5918 (@code{gnus-summary-kill-same-subject-and-select}).
5919
5920 @item M K
5921 @itemx C-k
5922 @kindex M K (Summary)
5923 @kindex C-k (Summary)
5924 @findex gnus-summary-kill-same-subject
5925 Mark all articles that have the same subject as the current one as read
5926 (@code{gnus-summary-kill-same-subject}).
5927
5928 @item M C
5929 @kindex M C (Summary)
5930 @findex gnus-summary-catchup
5931 @c @icon{gnus-summary-catchup}
5932 Mark all unread articles as read (@code{gnus-summary-catchup}).
5933
5934 @item M C-c
5935 @kindex M C-c (Summary)
5936 @findex gnus-summary-catchup-all
5937 Mark all articles in the group as read---even the ticked and dormant
5938 articles (@code{gnus-summary-catchup-all}).
5939
5940 @item M H
5941 @kindex M H (Summary)
5942 @findex gnus-summary-catchup-to-here
5943 Catchup the current group to point (before the point)
5944 (@code{gnus-summary-catchup-to-here}).
5945
5946 @item M h
5947 @kindex M h (Summary)
5948 @findex gnus-summary-catchup-from-here
5949 Catchup the current group from point (after the point)
5950 (@code{gnus-summary-catchup-from-here}).
5951
5952 @item C-w
5953 @kindex C-w (Summary)
5954 @findex gnus-summary-mark-region-as-read
5955 Mark all articles between point and mark as read
5956 (@code{gnus-summary-mark-region-as-read}).
5957
5958 @item M V k
5959 @kindex M V k (Summary)
5960 @findex gnus-summary-kill-below
5961 Kill all articles with scores below the default score (or below the
5962 numeric prefix) (@code{gnus-summary-kill-below}).
5963
5964 @item M e
5965 @itemx E
5966 @kindex M e (Summary)
5967 @kindex E (Summary)
5968 @findex gnus-summary-mark-as-expirable
5969 Mark the current article as expirable
5970 (@code{gnus-summary-mark-as-expirable}).
5971
5972 @item M b
5973 @kindex M b (Summary)
5974 @findex gnus-summary-set-bookmark
5975 Set a bookmark in the current article
5976 (@code{gnus-summary-set-bookmark}).
5977
5978 @item M B
5979 @kindex M B (Summary)
5980 @findex gnus-summary-remove-bookmark
5981 Remove the bookmark from the current article
5982 (@code{gnus-summary-remove-bookmark}).
5983
5984 @item M V c
5985 @kindex M V c (Summary)
5986 @findex gnus-summary-clear-above
5987 Clear all marks from articles with scores over the default score (or
5988 over the numeric prefix) (@code{gnus-summary-clear-above}).
5989
5990 @item M V u
5991 @kindex M V u (Summary)
5992 @findex gnus-summary-tick-above
5993 Tick all articles with scores over the default score (or over the
5994 numeric prefix) (@code{gnus-summary-tick-above}).
5995
5996 @item M V m
5997 @kindex M V m (Summary)
5998 @findex gnus-summary-mark-above
5999 Prompt for a mark, and mark all articles with scores over the default
6000 score (or over the numeric prefix) with this mark
6001 (@code{gnus-summary-clear-above}).
6002 @end table
6003
6004 @vindex gnus-summary-goto-unread
6005 The @code{gnus-summary-goto-unread} variable controls what action should
6006 be taken after setting a mark.  If non-@code{nil}, point will move to
6007 the next/previous unread article.  If @code{nil}, point will just move
6008 one line up or down.  As a special case, if this variable is
6009 @code{never}, all the marking commands as well as other commands (like
6010 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6011 The default is @code{t}.
6012
6013
6014 @node Generic Marking Commands
6015 @subsection Generic Marking Commands
6016
6017 Some people would like the command that ticks an article (@kbd{!}) go to
6018 the next article.  Others would like it to go to the next unread
6019 article.  Yet others would like it to stay on the current article.  And
6020 even though I haven't heard of anybody wanting it to go to the
6021 previous (unread) article, I'm sure there are people that want that as
6022 well.
6023
6024 Multiply these five behaviors with five different marking commands, and
6025 you get a potentially complex set of variable to control what each
6026 command should do.
6027
6028 To sidestep that mess, Gnus provides commands that do all these
6029 different things.  They can be found on the @kbd{M M} map in the summary
6030 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6031 to list in this manual.
6032
6033 While you can use these commands directly, most users would prefer
6034 altering the summary mode keymap.  For instance, if you would like the
6035 @kbd{!} command to go to the next article instead of the next unread
6036 article, you could say something like:
6037
6038 @lisp
6039 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6040 (defun my-alter-summary-map ()
6041   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6042 @end lisp
6043
6044 or
6045
6046 @lisp
6047 (defun my-alter-summary-map ()
6048   (local-set-key "!" "MM!n"))
6049 @end lisp
6050
6051
6052 @node Setting Process Marks
6053 @subsection Setting Process Marks
6054 @cindex setting process marks
6055
6056 Process marks are displayed as @code{#} in the summary buffer, and are
6057 used for marking articles in such a way that other commands will
6058 process these articles.  For instance, if you process mark four
6059 articles and then use the @kbd{*} command, Gnus will enter these four
6060 commands into the cache.  For more information,
6061 @pxref{Process/Prefix}.
6062
6063 @table @kbd
6064
6065 @item M P p
6066 @itemx #
6067 @kindex # (Summary)
6068 @kindex M P p (Summary)
6069 @findex gnus-summary-mark-as-processable
6070 Mark the current article with the process mark
6071 (@code{gnus-summary-mark-as-processable}).
6072 @findex gnus-summary-unmark-as-processable
6073
6074 @item M P u
6075 @itemx M-#
6076 @kindex M P u (Summary)
6077 @kindex M-# (Summary)
6078 Remove the process mark, if any, from the current article
6079 (@code{gnus-summary-unmark-as-processable}).
6080
6081 @item M P U
6082 @kindex M P U (Summary)
6083 @findex gnus-summary-unmark-all-processable
6084 Remove the process mark from all articles
6085 (@code{gnus-summary-unmark-all-processable}).
6086
6087 @item M P i
6088 @kindex M P i (Summary)
6089 @findex gnus-uu-invert-processable
6090 Invert the list of process marked articles
6091 (@code{gnus-uu-invert-processable}).
6092
6093 @item M P R
6094 @kindex M P R (Summary)
6095 @findex gnus-uu-mark-by-regexp
6096 Mark articles that have a @code{Subject} header that matches a regular
6097 expression (@code{gnus-uu-mark-by-regexp}).
6098
6099 @item M P G
6100 @kindex M P G (Summary)
6101 @findex gnus-uu-unmark-by-regexp
6102 Unmark articles that have a @code{Subject} header that matches a regular
6103 expression (@code{gnus-uu-unmark-by-regexp}).
6104
6105 @item M P r
6106 @kindex M P r (Summary)
6107 @findex gnus-uu-mark-region
6108 Mark articles in region (@code{gnus-uu-mark-region}).
6109
6110 @item M P g
6111 @kindex M P g
6112 @findex gnus-uu-unmark-region
6113 Unmark articles in region (@code{gnus-uu-unmark-region}).
6114
6115 @item M P t
6116 @kindex M P t (Summary)
6117 @findex gnus-uu-mark-thread
6118 Mark all articles in the current (sub)thread
6119 (@code{gnus-uu-mark-thread}).
6120
6121 @item M P T
6122 @kindex M P T (Summary)
6123 @findex gnus-uu-unmark-thread
6124 Unmark all articles in the current (sub)thread
6125 (@code{gnus-uu-unmark-thread}).
6126
6127 @item M P v
6128 @kindex M P v (Summary)
6129 @findex gnus-uu-mark-over
6130 Mark all articles that have a score above the prefix argument
6131 (@code{gnus-uu-mark-over}).
6132
6133 @item M P s
6134 @kindex M P s (Summary)
6135 @findex gnus-uu-mark-series
6136 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6137
6138 @item M P S
6139 @kindex M P S (Summary)
6140 @findex gnus-uu-mark-sparse
6141 Mark all series that have already had some articles marked
6142 (@code{gnus-uu-mark-sparse}).
6143
6144 @item M P a
6145 @kindex M P a (Summary)
6146 @findex gnus-uu-mark-all
6147 Mark all articles in series order (@code{gnus-uu-mark-series}).
6148
6149 @item M P b
6150 @kindex M P b (Summary)
6151 @findex gnus-uu-mark-buffer
6152 Mark all articles in the buffer in the order they appear
6153 (@code{gnus-uu-mark-buffer}).
6154
6155 @item M P k
6156 @kindex M P k (Summary)
6157 @findex gnus-summary-kill-process-mark
6158 Push the current process mark set onto the stack and unmark all articles
6159 (@code{gnus-summary-kill-process-mark}).
6160
6161 @item M P y
6162 @kindex M P y (Summary)
6163 @findex gnus-summary-yank-process-mark
6164 Pop the previous process mark set from the stack and restore it
6165 (@code{gnus-summary-yank-process-mark}).
6166
6167 @item M P w
6168 @kindex M P w (Summary)
6169 @findex gnus-summary-save-process-mark
6170 Push the current process mark set onto the stack
6171 (@code{gnus-summary-save-process-mark}).
6172
6173 @end table
6174
6175 Also see the @kbd{&} command in @pxref{Searching for Articles} for how to
6176 set process marks based on article body contents.
6177
6178
6179 @node Limiting
6180 @section Limiting
6181 @cindex limiting
6182
6183 It can be convenient to limit the summary buffer to just show some
6184 subset of the articles currently in the group.  The effect most limit
6185 commands have is to remove a few (or many) articles from the summary
6186 buffer.
6187
6188 All limiting commands work on subsets of the articles already fetched
6189 from the servers.  None of these commands query the server for
6190 additional articles.
6191
6192 @table @kbd
6193
6194 @item / /
6195 @itemx / s
6196 @kindex / / (Summary)
6197 @findex gnus-summary-limit-to-subject
6198 Limit the summary buffer to articles that match some subject
6199 (@code{gnus-summary-limit-to-subject}). If given a prefix, exclude
6200 matching articles.
6201
6202 @item / a
6203 @kindex / a (Summary)
6204 @findex gnus-summary-limit-to-author
6205 Limit the summary buffer to articles that match some author
6206 (@code{gnus-summary-limit-to-author}). If given a prefix, exclude
6207 matching articles.
6208
6209 @item / x
6210 @kindex / x (Summary)
6211 @findex gnus-summary-limit-to-extra
6212 Limit the summary buffer to articles that match one of the ``extra''
6213 headers (@pxref{To From Newsgroups})
6214 (@code{gnus-summary-limit-to-extra}). If given a prefix, exclude
6215 matching articles.
6216
6217 @item / u
6218 @itemx x
6219 @kindex / u (Summary)
6220 @kindex x (Summary)
6221 @findex gnus-summary-limit-to-unread
6222 Limit the summary buffer to articles not marked as read
6223 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6224 buffer to articles strictly unread.  This means that ticked and
6225 dormant articles will also be excluded.
6226
6227 @item / m
6228 @kindex / m (Summary)
6229 @findex gnus-summary-limit-to-marks
6230 Ask for a mark and then limit to all articles that have been marked
6231 with that mark (@code{gnus-summary-limit-to-marks}).
6232
6233 @item / t
6234 @kindex / t (Summary)
6235 @findex gnus-summary-limit-to-age
6236 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6237 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6238 articles younger than that number of days.
6239
6240 @item / n
6241 @kindex / n (Summary)
6242 @findex gnus-summary-limit-to-articles
6243 Limit the summary buffer to the current article
6244 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6245 convention (@pxref{Process/Prefix}).
6246
6247 @item / w
6248 @kindex / w (Summary)
6249 @findex gnus-summary-pop-limit
6250 Pop the previous limit off the stack and restore it
6251 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6252 the stack.
6253
6254 @item / .
6255 @kindex / . (Summary)
6256 @findex gnus-summary-limit-to-unseen
6257 Limit the summary buffer to the unseen articles
6258 (@code{gnus-summary-limit-to-unseen}).
6259
6260 @item / v
6261 @kindex / v (Summary)
6262 @findex gnus-summary-limit-to-score
6263 Limit the summary buffer to articles that have a score at or above some
6264 score (@code{gnus-summary-limit-to-score}).
6265
6266 @item / p
6267 @kindex / p (Summary)
6268 @findex gnus-summary-limit-to-display-predicate
6269 Limit the summary buffer to articles that satisfy the @code{display}
6270 group parameter predicate
6271 (@code{gnus-summary-limit-to-display-predicate}).  See @pxref{Group
6272 Parameters} for more on this predicate.
6273
6274 @item / E
6275 @itemx M S
6276 @kindex M S (Summary)
6277 @kindex / E (Summary)
6278 @findex gnus-summary-limit-include-expunged
6279 Include all expunged articles in the limit
6280 (@code{gnus-summary-limit-include-expunged}).
6281
6282 @item / D
6283 @kindex / D (Summary)
6284 @findex gnus-summary-limit-include-dormant
6285 Include all dormant articles in the limit
6286 (@code{gnus-summary-limit-include-dormant}).
6287
6288 @item / *
6289 @kindex / * (Summary)
6290 @findex gnus-summary-limit-include-cached
6291 Include all cached articles in the limit
6292 (@code{gnus-summary-limit-include-cached}).
6293
6294 @item / d
6295 @kindex / d (Summary)
6296 @findex gnus-summary-limit-exclude-dormant
6297 Exclude all dormant articles from the limit
6298 (@code{gnus-summary-limit-exclude-dormant}).
6299
6300 @item / M
6301 @kindex / M (Summary)
6302 @findex gnus-summary-limit-exclude-marks
6303 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6304
6305 @item / T
6306 @kindex / T (Summary)
6307 @findex gnus-summary-limit-include-thread
6308 Include all the articles in the current thread in the limit.
6309
6310 @item / c
6311 @kindex / c (Summary)
6312 @findex gnus-summary-limit-exclude-childless-dormant
6313 Exclude all dormant articles that have no children from the limit
6314 (@code{gnus-summary-limit-exclude-childless-dormant}).
6315
6316 @item / C
6317 @kindex / C (Summary)
6318 @findex gnus-summary-limit-mark-excluded-as-read
6319 Mark all excluded unread articles as read
6320 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
6321 also mark excluded ticked and dormant articles as read.
6322
6323 @item / N
6324 @kindex / N (Summary)
6325 @findex gnus-summary-insert-new-articles
6326 Insert all new articles in the summary buffer. It scans for new emails
6327 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6328
6329 @item / o
6330 @kindex / o (Summary)
6331 @findex gnus-summary-insert-old-articles
6332 Insert all old articles in the summary buffer. If given a numbered
6333 prefix, fetch this number of articles.
6334
6335 @end table
6336
6337
6338 @node Threading
6339 @section Threading
6340 @cindex threading
6341 @cindex article threading
6342
6343 Gnus threads articles by default.  @dfn{To thread} is to put responses
6344 to articles directly after the articles they respond to---in a
6345 hierarchical fashion.
6346
6347 Threading is done by looking at the @code{References} headers of the
6348 articles.  In a perfect world, this would be enough to build pretty
6349 trees, but unfortunately, the @code{References} header is often broken
6350 or simply missing.  Weird news propagation exacerbates the problem,
6351 so one has to employ other heuristics to get pleasing results.  A
6352 plethora of approaches exists, as detailed in horrible detail in
6353 @pxref{Customizing Threading}.
6354
6355 First, a quick overview of the concepts:
6356
6357 @table @dfn
6358 @item root
6359 The top-most article in a thread; the first article in the thread.
6360
6361 @item thread
6362 A tree-like article structure.
6363
6364 @item sub-thread
6365 A small(er) section of this tree-like structure.
6366
6367 @item loose threads
6368 Threads often lose their roots due to article expiry, or due to the root
6369 already having been read in a previous session, and not displayed in the
6370 summary buffer.  We then typically have many sub-threads that really
6371 belong to one thread, but are without connecting roots.  These are
6372 called loose threads.
6373
6374 @item thread gathering
6375 An attempt to gather loose threads into bigger threads.
6376
6377 @item sparse threads
6378 A thread where the missing articles have been ``guessed'' at, and are
6379 displayed as empty lines in the summary buffer.
6380
6381 @end table
6382
6383
6384 @menu
6385 * Customizing Threading::       Variables you can change to affect the threading.
6386 * Thread Commands::             Thread based commands in the summary buffer.
6387 @end menu
6388
6389
6390 @node Customizing Threading
6391 @subsection Customizing Threading
6392 @cindex customizing threading
6393
6394 @menu
6395 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6396 * Filling In Threads::          Making the threads displayed look fuller.
6397 * More Threading::              Even more variables for fiddling with threads.
6398 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6399 @end menu
6400
6401
6402 @node Loose Threads
6403 @subsubsection Loose Threads
6404 @cindex <
6405 @cindex >
6406 @cindex loose threads
6407
6408 @table @code
6409 @item gnus-summary-make-false-root
6410 @vindex gnus-summary-make-false-root
6411 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
6412 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6413 Yup.)  Loose subtrees occur when the real root has expired, or you've
6414 read or killed the root in a previous session.
6415
6416 When there is no real root of a thread, Gnus will have to fudge
6417 something.  This variable says what fudging method Gnus should use.
6418 There are four possible values:
6419
6420 @iftex
6421 @iflatex
6422 \gnusfigure{The Summary Buffer}{390}{
6423 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6424 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6425 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6426 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6427 }
6428 @end iflatex
6429 @end iftex
6430
6431 @cindex adopting articles
6432
6433 @table @code
6434
6435 @item adopt
6436 Gnus will make the first of the orphaned articles the parent.  This
6437 parent will adopt all the other articles.  The adopted articles will be
6438 marked as such by pointy brackets (@samp{<>}) instead of the standard
6439 square brackets (@samp{[]}).  This is the default method.
6440
6441 @item dummy
6442 @vindex gnus-summary-dummy-line-format
6443 @vindex gnus-summary-make-false-root-always
6444 Gnus will create a dummy summary line that will pretend to be the
6445 parent.  This dummy line does not correspond to any real article, so
6446 selecting it will just select the first real article after the dummy
6447 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6448 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6449 which is the subject of the article.  @xref{Formatting Variables}.
6450 If you want all threads to have a dummy root, even the non-gathered
6451 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6452
6453 @item empty
6454 Gnus won't actually make any article the parent, but simply leave the
6455 subject field of all orphans except the first empty.  (Actually, it will
6456 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6457 Buffer Format}).)
6458
6459 @item none
6460 Don't make any article parent at all.  Just gather the threads and
6461 display them after one another.
6462
6463 @item nil
6464 Don't gather loose threads.
6465 @end table
6466
6467 @item gnus-summary-gather-subject-limit
6468 @vindex gnus-summary-gather-subject-limit
6469 Loose threads are gathered by comparing subjects of articles.  If this
6470 variable is @code{nil}, Gnus requires an exact match between the
6471 subjects of the loose threads before gathering them into one big
6472 super-thread.  This might be too strict a requirement, what with the
6473 presence of stupid newsreaders that chop off long subject lines.  If
6474 you think so, set this variable to, say, 20 to require that only the
6475 first 20 characters of the subjects have to match.  If you set this
6476 variable to a really low number, you'll find that Gnus will gather
6477 everything in sight into one thread, which isn't very helpful.
6478
6479 @cindex fuzzy article gathering
6480 If you set this variable to the special value @code{fuzzy}, Gnus will
6481 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6482 Matching}).
6483
6484 @item gnus-simplify-subject-fuzzy-regexp
6485 @vindex gnus-simplify-subject-fuzzy-regexp
6486 This can either be a regular expression or list of regular expressions
6487 that match strings that will be removed from subjects if fuzzy subject
6488 simplification is used.
6489
6490 @item gnus-simplify-ignored-prefixes
6491 @vindex gnus-simplify-ignored-prefixes
6492 If you set @code{gnus-summary-gather-subject-limit} to something as low
6493 as 10, you might consider setting this variable to something sensible:
6494
6495 @c Written by Michael Ernst <mernst@cs.rice.edu>
6496 @lisp
6497 (setq gnus-simplify-ignored-prefixes
6498       (concat
6499        "\\`\\[?\\("
6500        (mapconcat
6501         'identity
6502         '("looking"
6503           "wanted" "followup" "summary\\( of\\)?"
6504           "help" "query" "problem" "question"
6505           "answer" "reference" "announce"
6506           "How can I" "How to" "Comparison of"
6507           ;; ...
6508           )
6509         "\\|")
6510        "\\)\\s *\\("
6511        (mapconcat 'identity
6512                   '("for" "for reference" "with" "about")
6513                   "\\|")
6514        "\\)?\\]?:?[ \t]*"))
6515 @end lisp
6516
6517 All words that match this regexp will be removed before comparing two
6518 subjects.
6519
6520 @item gnus-simplify-subject-functions
6521 @vindex gnus-simplify-subject-functions
6522 If non-@code{nil}, this variable overrides
6523 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6524 list of functions to apply to the @code{Subject} string iteratively to
6525 arrive at the simplified version of the string.
6526
6527 Useful functions to put in this list include:
6528
6529 @table @code
6530 @item gnus-simplify-subject-re
6531 @findex gnus-simplify-subject-re
6532 Strip the leading @samp{Re:}.
6533
6534 @item gnus-simplify-subject-fuzzy
6535 @findex gnus-simplify-subject-fuzzy
6536 Simplify fuzzily.
6537
6538 @item gnus-simplify-whitespace
6539 @findex gnus-simplify-whitespace
6540 Remove excessive whitespace.
6541
6542 @item gnus-simplify-all-whitespace
6543 @findex gnus-simplify-all-whitespace
6544 Remove all whitespace.
6545 @end table
6546
6547 You may also write your own functions, of course.
6548
6549
6550 @item gnus-summary-gather-exclude-subject
6551 @vindex gnus-summary-gather-exclude-subject
6552 Since loose thread gathering is done on subjects only, that might lead
6553 to many false hits, especially with certain common subjects like
6554 @samp{} and @samp{(none)}.  To make the situation slightly better,
6555 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6556 what subjects should be excluded from the gathering process.@*
6557 The default is @samp{^ *$\\|^(none)$}.
6558
6559 @item gnus-summary-thread-gathering-function
6560 @vindex gnus-summary-thread-gathering-function
6561 Gnus gathers threads by looking at @code{Subject} headers.  This means
6562 that totally unrelated articles may end up in the same ``thread'', which
6563 is confusing.  An alternate approach is to look at all the
6564 @code{Message-ID}s in all the @code{References} headers to find matches.
6565 This will ensure that no gathered threads ever include unrelated
6566 articles, but it also means that people who have posted with broken
6567 newsreaders won't be gathered properly.  The choice is yours---plague or
6568 cholera:
6569
6570 @table @code
6571 @item gnus-gather-threads-by-subject
6572 @findex gnus-gather-threads-by-subject
6573 This function is the default gathering function and looks at
6574 @code{Subject}s exclusively.
6575
6576 @item gnus-gather-threads-by-references
6577 @findex gnus-gather-threads-by-references
6578 This function looks at @code{References} headers exclusively.
6579 @end table
6580
6581 If you want to test gathering by @code{References}, you could say
6582 something like:
6583
6584 @lisp
6585 (setq gnus-summary-thread-gathering-function
6586       'gnus-gather-threads-by-references)
6587 @end lisp
6588
6589 @end table
6590
6591
6592 @node Filling In Threads
6593 @subsubsection Filling In Threads
6594
6595 @table @code
6596 @item gnus-fetch-old-headers
6597 @vindex gnus-fetch-old-headers
6598 If non-@code{nil}, Gnus will attempt to build old threads by fetching
6599 more old headers---headers to articles marked as read.  If you
6600 would like to display as few summary lines as possible, but still
6601 connect as many loose threads as possible, you should set this variable
6602 to @code{some} or a number.  If you set it to a number, no more than
6603 that number of extra old headers will be fetched.  In either case,
6604 fetching old headers only works if the back end you are using carries
6605 overview files---this would normally be @code{nntp}, @code{nnspool},
6606 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6607 the thread has been expired by the server, there's not much Gnus can do
6608 about that.
6609
6610 This variable can also be set to @code{invisible}.  This won't have any
6611 visible effects, but is useful if you use the @kbd{A T} command a lot
6612 (@pxref{Finding the Parent}).
6613
6614 @item gnus-fetch-old-ephemeral-headers
6615 @vindex gnus-fetch-old-ephemeral-headers
6616 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
6617 newsgroups.
6618
6619 @item gnus-build-sparse-threads
6620 @vindex gnus-build-sparse-threads
6621 Fetching old headers can be slow.  A low-rent similar effect can be
6622 gotten by setting this variable to @code{some}.  Gnus will then look at
6623 the complete @code{References} headers of all articles and try to string
6624 together articles that belong in the same thread.  This will leave
6625 @dfn{gaps} in the threading display where Gnus guesses that an article
6626 is missing from the thread.  (These gaps appear like normal summary
6627 lines.  If you select a gap, Gnus will try to fetch the article in
6628 question.)  If this variable is @code{t}, Gnus will display all these
6629 ``gaps'' without regard for whether they are useful for completing the
6630 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
6631 off sparse leaf nodes that don't lead anywhere.  This variable is
6632 @code{nil} by default.
6633
6634 @item gnus-read-all-available-headers
6635 @vindex gnus-read-all-available-headers
6636 This is a rather obscure variable that few will find useful.  It's
6637 intended for those non-news newsgroups where the back end has to fetch
6638 quite a lot to present the summary buffer, and where it's impossible to
6639 go back to parents of articles.  This is mostly the case in the
6640 web-based groups, like the @code{nnultimate} groups.
6641
6642 If you don't use those, then it's safe to leave this as the default
6643 @code{nil}.  If you want to use this variable, it should be a regexp
6644 that matches the group name, or @code{t} for all groups.
6645
6646 @end table
6647
6648
6649 @node More Threading
6650 @subsubsection More Threading
6651
6652 @table @code
6653 @item gnus-show-threads
6654 @vindex gnus-show-threads
6655 If this variable is @code{nil}, no threading will be done, and all of
6656 the rest of the variables here will have no effect.  Turning threading
6657 off will speed group selection up a bit, but it is sure to make reading
6658 slower and more awkward.
6659
6660 @item gnus-thread-hide-subtree
6661 @vindex gnus-thread-hide-subtree
6662 If non-@code{nil}, all threads will be hidden when the summary buffer is
6663 generated.
6664
6665 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6666 Available predicates are @code{gnus-article-unread-p} and
6667 @code{gnus-article-unseen-p}).
6668
6669 Here's an example:
6670
6671 @lisp
6672 (setq gnus-thread-hide-subtree
6673       '(or gnus-article-unread-p
6674            gnus-article-unseen-p))
6675 @end lisp
6676
6677 (It's a pretty nonsensical example, since all unseen articles are also
6678 unread, but you get my drift.)
6679
6680
6681 @item gnus-thread-expunge-below
6682 @vindex gnus-thread-expunge-below
6683 All threads that have a total score (as defined by
6684 @code{gnus-thread-score-function}) less than this number will be
6685 expunged.  This variable is @code{nil} by default, which means that no
6686 threads are expunged.
6687
6688 @item gnus-thread-hide-killed
6689 @vindex gnus-thread-hide-killed
6690 if you kill a thread and this variable is non-@code{nil}, the subtree
6691 will be hidden.
6692
6693 @item gnus-thread-ignore-subject
6694 @vindex gnus-thread-ignore-subject
6695 Sometimes somebody changes the subject in the middle of a thread.  If
6696 this variable is non-@code{nil}, which is the default, the subject
6697 change is ignored.  If it is @code{nil}, a change in the subject will
6698 result in a new thread.
6699
6700 @item gnus-thread-indent-level
6701 @vindex gnus-thread-indent-level
6702 This is a number that says how much each sub-thread should be indented.
6703 The default is 4.
6704
6705 @item gnus-sort-gathered-threads-function
6706 @vindex gnus-sort-gathered-threads-function
6707 Sometimes, particularly with mailing lists, the order in which mails
6708 arrive locally is not necessarily the same as the order in which they
6709 arrived on the mailing list.  Consequently, when sorting sub-threads
6710 using the default @code{gnus-thread-sort-by-number}, responses can end
6711 up appearing before the article to which they are responding to.
6712 Setting this variable to an alternate value
6713 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6714 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6715 more logical sub-thread ordering in such instances.
6716
6717 @end table
6718
6719
6720 @node Low-Level Threading
6721 @subsubsection Low-Level Threading
6722
6723 @table @code
6724
6725 @item gnus-parse-headers-hook
6726 @vindex gnus-parse-headers-hook
6727 Hook run before parsing any headers.
6728
6729 @item gnus-alter-header-function
6730 @vindex gnus-alter-header-function
6731 If non-@code{nil}, this function will be called to allow alteration of
6732 article header structures.  The function is called with one parameter,
6733 the article header vector, which it may alter in any way.  For instance,
6734 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6735 in systematic ways (by adding prefixes and such), you can use this
6736 variable to un-scramble the @code{Message-ID}s so that they are more
6737 meaningful.  Here's one example:
6738
6739 @lisp
6740 (setq gnus-alter-header-function 'my-alter-message-id)
6741
6742 (defun my-alter-message-id (header)
6743   (let ((id (mail-header-id header)))
6744     (when (string-match
6745            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6746       (mail-header-set-id
6747        (concat (match-string 1 id) "@@" (match-string 2 id))
6748        header))))
6749 @end lisp
6750
6751 @end table
6752
6753
6754 @node Thread Commands
6755 @subsection Thread Commands
6756 @cindex thread commands
6757
6758 @table @kbd
6759
6760 @item T k
6761 @itemx C-M-k
6762 @kindex T k (Summary)
6763 @kindex C-M-k (Summary)
6764 @findex gnus-summary-kill-thread
6765 Mark all articles in the current (sub-)thread as read
6766 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6767 remove all marks instead.  If the prefix argument is negative, tick
6768 articles instead.
6769
6770 @item T l
6771 @itemx C-M-l
6772 @kindex T l (Summary)
6773 @kindex C-M-l (Summary)
6774 @findex gnus-summary-lower-thread
6775 Lower the score of the current (sub-)thread
6776 (@code{gnus-summary-lower-thread}).
6777
6778 @item T i
6779 @kindex T i (Summary)
6780 @findex gnus-summary-raise-thread
6781 Increase the score of the current (sub-)thread
6782 (@code{gnus-summary-raise-thread}).
6783
6784 @item T #
6785 @kindex T # (Summary)
6786 @findex gnus-uu-mark-thread
6787 Set the process mark on the current (sub-)thread
6788 (@code{gnus-uu-mark-thread}).
6789
6790 @item T M-#
6791 @kindex T M-# (Summary)
6792 @findex gnus-uu-unmark-thread
6793 Remove the process mark from the current (sub-)thread
6794 (@code{gnus-uu-unmark-thread}).
6795
6796 @item T T
6797 @kindex T T (Summary)
6798 @findex gnus-summary-toggle-threads
6799 Toggle threading (@code{gnus-summary-toggle-threads}).
6800
6801 @item T s
6802 @kindex T s (Summary)
6803 @findex gnus-summary-show-thread
6804 Expose the (sub-)thread hidden under the current article, if any
6805 (@code{gnus-summary-show-thread}).
6806
6807 @item T h
6808 @kindex T h (Summary)
6809 @findex gnus-summary-hide-thread
6810 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6811
6812 @item T S
6813 @kindex T S (Summary)
6814 @findex gnus-summary-show-all-threads
6815 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6816
6817 @item T H
6818 @kindex T H (Summary)
6819 @findex gnus-summary-hide-all-threads
6820 Hide all threads (@code{gnus-summary-hide-all-threads}).
6821
6822 @item T t
6823 @kindex T t (Summary)
6824 @findex gnus-summary-rethread-current
6825 Re-thread the current article's thread
6826 (@code{gnus-summary-rethread-current}).  This works even when the
6827 summary buffer is otherwise unthreaded.
6828
6829 @item T ^
6830 @kindex T ^ (Summary)
6831 @findex gnus-summary-reparent-thread
6832 Make the current article the child of the marked (or previous) article
6833 (@code{gnus-summary-reparent-thread}).
6834
6835 @end table
6836
6837 The following commands are thread movement commands.  They all
6838 understand the numeric prefix.
6839
6840 @table @kbd
6841
6842 @item T n
6843 @kindex T n (Summary)
6844 @itemx C-M-f
6845 @kindex C-M-n (Summary)
6846 @itemx M-down
6847 @kindex M-down (Summary)
6848 @findex gnus-summary-next-thread
6849 Go to the next thread (@code{gnus-summary-next-thread}).
6850
6851 @item T p
6852 @kindex T p (Summary)
6853 @itemx C-M-b
6854 @kindex C-M-p (Summary)
6855 @itemx M-up
6856 @kindex M-up (Summary)
6857 @findex gnus-summary-prev-thread
6858 Go to the previous thread (@code{gnus-summary-prev-thread}).
6859
6860 @item T d
6861 @kindex T d (Summary)
6862 @findex gnus-summary-down-thread
6863 Descend the thread (@code{gnus-summary-down-thread}).
6864
6865 @item T u
6866 @kindex T u (Summary)
6867 @findex gnus-summary-up-thread
6868 Ascend the thread (@code{gnus-summary-up-thread}).
6869
6870 @item T o
6871 @kindex T o (Summary)
6872 @findex gnus-summary-top-thread
6873 Go to the top of the thread (@code{gnus-summary-top-thread}).
6874 @end table
6875
6876 @vindex gnus-thread-operation-ignore-subject
6877 If you ignore subject while threading, you'll naturally end up with
6878 threads that have several different subjects in them.  If you then issue
6879 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
6880 wish to kill the entire thread, but just those parts of the thread that
6881 have the same subject as the current article.  If you like this idea,
6882 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6883 is non-@code{nil} (which it is by default), subjects will be ignored
6884 when doing thread commands.  If this variable is @code{nil}, articles in
6885 the same thread with different subjects will not be included in the
6886 operation in question.  If this variable is @code{fuzzy}, only articles
6887 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6888 Matching}).
6889
6890
6891 @node Sorting the Summary Buffer
6892 @section Sorting the Summary Buffer
6893
6894 @findex gnus-thread-sort-by-total-score
6895 @findex gnus-thread-sort-by-date
6896 @findex gnus-thread-sort-by-score
6897 @findex gnus-thread-sort-by-subject
6898 @findex gnus-thread-sort-by-author
6899 @findex gnus-thread-sort-by-number
6900 @findex gnus-thread-sort-by-random
6901 @vindex gnus-thread-sort-functions
6902 @findex gnus-thread-sort-by-most-recent-thread
6903 If you are using a threaded summary display, you can sort the threads by
6904 setting @code{gnus-thread-sort-functions}, which can be either a single
6905 function, a list of functions, or a list containing functions and
6906 @code{(not some-function)} elements.
6907
6908 By default, sorting is done on article numbers.  Ready-made sorting
6909 predicate functions include @code{gnus-thread-sort-by-number},
6910 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6911 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6912 @code{gnus-thread-sort-by-most-recent-number},
6913 @code{gnus-thread-sort-by-most-recent-date},
6914 @code{gnus-thread-sort-by-random} and
6915 @code{gnus-thread-sort-by-total-score}.
6916
6917 Each function takes two threads and returns non-@code{nil} if the first
6918 thread should be sorted before the other.  Note that sorting really is
6919 normally done by looking only at the roots of each thread.
6920
6921 If you use more than one function, the primary sort key should be the
6922 last function in the list.  You should probably always include
6923 @code{gnus-thread-sort-by-number} in the list of sorting
6924 functions---preferably first.  This will ensure that threads that are
6925 equal with respect to the other sort criteria will be displayed in
6926 ascending article order.
6927
6928 If you would like to sort by reverse score, then by subject, and finally
6929 by number, you could do something like:
6930
6931 @lisp
6932 (setq gnus-thread-sort-functions
6933       '(gnus-thread-sort-by-number
6934         gnus-thread-sort-by-subject
6935         (not gnus-thread-sort-by-total-score)))
6936 @end lisp
6937
6938 The threads that have highest score will be displayed first in the
6939 summary buffer.  When threads have the same score, they will be sorted
6940 alphabetically.  The threads that have the same score and the same
6941 subject will be sorted by number, which is (normally) the sequence in
6942 which the articles arrived.
6943
6944 If you want to sort by score and then reverse arrival order, you could
6945 say something like:
6946
6947 @lisp
6948 (setq gnus-thread-sort-functions
6949       '((lambda (t1 t2)
6950           (not (gnus-thread-sort-by-number t1 t2)))
6951         gnus-thread-sort-by-score))
6952 @end lisp
6953
6954 @vindex gnus-thread-score-function
6955 The function in the @code{gnus-thread-score-function} variable (default
6956 @code{+}) is used for calculating the total score of a thread.  Useful
6957 functions might be @code{max}, @code{min}, or squared means, or whatever
6958 tickles your fancy.
6959
6960 @findex gnus-article-sort-functions
6961 @findex gnus-article-sort-by-date
6962 @findex gnus-article-sort-by-score
6963 @findex gnus-article-sort-by-subject
6964 @findex gnus-article-sort-by-author
6965 @findex gnus-article-sort-by-random
6966 @findex gnus-article-sort-by-number
6967 If you are using an unthreaded display for some strange reason or
6968 other, you have to fiddle with the @code{gnus-article-sort-functions}
6969 variable.  It is very similar to the
6970 @code{gnus-thread-sort-functions}, except that it uses slightly
6971 different functions for article comparison.  Available sorting
6972 predicate functions are @code{gnus-article-sort-by-number},
6973 @code{gnus-article-sort-by-author},
6974 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
6975 @code{gnus-article-sort-by-random}, and
6976 @code{gnus-article-sort-by-score}.
6977
6978 If you want to sort an unthreaded summary display by subject, you could
6979 say something like:
6980
6981 @lisp
6982 (setq gnus-article-sort-functions
6983       '(gnus-article-sort-by-number
6984         gnus-article-sort-by-subject))
6985 @end lisp
6986
6987
6988
6989 @node Asynchronous Fetching
6990 @section Asynchronous Article Fetching
6991 @cindex asynchronous article fetching
6992 @cindex article pre-fetch
6993 @cindex pre-fetch
6994
6995 If you read your news from an @acronym{NNTP} server that's far away, the
6996 network latencies may make reading articles a chore.  You have to wait
6997 for a while after pressing @kbd{n} to go to the next article before the
6998 article appears.  Why can't Gnus just go ahead and fetch the article
6999 while you are reading the previous one?  Why not, indeed.
7000
7001 First, some caveats.  There are some pitfalls to using asynchronous
7002 article fetching, especially the way Gnus does it.
7003
7004 Let's say you are reading article 1, which is short, and article 2 is
7005 quite long, and you are not interested in reading that.  Gnus does not
7006 know this, so it goes ahead and fetches article 2.  You decide to read
7007 article 3, but since Gnus is in the process of fetching article 2, the
7008 connection is blocked.
7009
7010 To avoid these situations, Gnus will open two (count 'em two)
7011 connections to the server.  Some people may think this isn't a very nice
7012 thing to do, but I don't see any real alternatives.  Setting up that
7013 extra connection takes some time, so Gnus startup will be slower.
7014
7015 Gnus will fetch more articles than you will read.  This will mean that
7016 the link between your machine and the @acronym{NNTP} server will become more
7017 loaded than if you didn't use article pre-fetch.  The server itself will
7018 also become more loaded---both with the extra article requests, and the
7019 extra connection.
7020
7021 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7022 you really want to.
7023
7024 @vindex gnus-asynchronous
7025 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7026 happen automatically.
7027
7028 @vindex gnus-use-article-prefetch
7029 You can control how many articles are to be pre-fetched by setting
7030 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7031 that when you read an article in the group, the back end will pre-fetch
7032 the next 30 articles.  If this variable is @code{t}, the back end will
7033 pre-fetch all the articles it can without bound.  If it is
7034 @code{nil}, no pre-fetching will be done.
7035
7036 @vindex gnus-async-prefetch-article-p
7037 @findex gnus-async-read-p
7038 There are probably some articles that you don't want to pre-fetch---read
7039 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7040 variable controls whether an article is to be pre-fetched.  This
7041 function should return non-@code{nil} when the article in question is
7042 to be pre-fetched.  The default is @code{gnus-async-read-p}, which
7043 returns @code{nil} on read articles.  The function is called with an
7044 article data structure as the only parameter.
7045
7046 If, for instance, you wish to pre-fetch only unread articles shorter
7047 than 100 lines, you could say something like:
7048
7049 @lisp
7050 (defun my-async-short-unread-p (data)
7051   "Return non-nil for short, unread articles."
7052   (and (gnus-data-unread-p data)
7053        (< (mail-header-lines (gnus-data-header data))
7054           100)))
7055
7056 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7057 @end lisp
7058
7059 These functions will be called many, many times, so they should
7060 preferably be short and sweet to avoid slowing down Gnus too much.
7061 It's probably a good idea to byte-compile things like this.
7062
7063 @vindex gnus-prefetched-article-deletion-strategy
7064 Articles have to be removed from the asynch buffer sooner or later.  The
7065 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7066 articles.  This is a list that may contain the following elements:
7067
7068 @table @code
7069 @item read
7070 Remove articles when they are read.
7071
7072 @item exit
7073 Remove articles when exiting the group.
7074 @end table
7075
7076 The default value is @code{(read exit)}.
7077
7078 @c @vindex gnus-use-header-prefetch
7079 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7080 @c from the next group.
7081
7082
7083 @node Article Caching
7084 @section Article Caching
7085 @cindex article caching
7086 @cindex caching
7087
7088 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7089 consider turning article caching on.  Each article will then be stored
7090 locally under your home directory.  As you may surmise, this could
7091 potentially use @emph{huge} amounts of disk space, as well as eat up all
7092 your inodes so fast it will make your head swim.  In vodka.
7093
7094 Used carefully, though, it could be just an easier way to save articles.
7095
7096 @vindex gnus-use-long-file-name
7097 @vindex gnus-cache-directory
7098 @vindex gnus-use-cache
7099 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7100 all articles ticked or marked as dormant will then be copied
7101 over to your local cache (@code{gnus-cache-directory}).  Whether this
7102 cache is flat or hierarchical is controlled by the
7103 @code{gnus-use-long-file-name} variable, as usual.
7104
7105 When re-selecting a ticked or dormant article, it will be fetched from the
7106 cache instead of from the server.  As articles in your cache will never
7107 expire, this might serve as a method of saving articles while still
7108 keeping them where they belong.  Just mark all articles you want to save
7109 as dormant, and don't worry.
7110
7111 When an article is marked as read, is it removed from the cache.
7112
7113 @vindex gnus-cache-remove-articles
7114 @vindex gnus-cache-enter-articles
7115 The entering/removal of articles from the cache is controlled by the
7116 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7117 variables.  Both are lists of symbols.  The first is @code{(ticked
7118 dormant)} by default, meaning that ticked and dormant articles will be
7119 put in the cache.  The latter is @code{(read)} by default, meaning that
7120 articles marked as read are removed from the cache.  Possibly
7121 symbols in these two lists are @code{ticked}, @code{dormant},
7122 @code{unread} and @code{read}.
7123
7124 @findex gnus-jog-cache
7125 So where does the massive article-fetching and storing come into the
7126 picture?  The @code{gnus-jog-cache} command will go through all
7127 subscribed newsgroups, request all unread articles, score them, and
7128 store them in the cache.  You should only ever, ever ever ever, use this
7129 command if 1) your connection to the @acronym{NNTP} server is really, really,
7130 really slow and 2) you have a really, really, really huge disk.
7131 Seriously.  One way to cut down on the number of articles downloaded is
7132 to score unwanted articles down and have them marked as read.  They will
7133 not then be downloaded by this command.
7134
7135 @vindex gnus-uncacheable-groups
7136 @vindex gnus-cacheable-groups
7137 It is likely that you do not want caching on all groups.  For instance,
7138 if your @code{nnml} mail is located under your home directory, it makes no
7139 sense to cache it somewhere else under your home directory.  Unless you
7140 feel that it's neat to use twice as much space.
7141
7142 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7143 regexp of groups to cache, @samp{^nntp} for instance, or set the
7144 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7145 Both variables are @code{nil} by default.  If a group matches both
7146 variables, the group is not cached.
7147
7148 @findex gnus-cache-generate-nov-databases
7149 @findex gnus-cache-generate-active
7150 @vindex gnus-cache-active-file
7151 The cache stores information on what articles it contains in its active
7152 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7153 of the cache) becomes all messed up for some reason or other, Gnus
7154 offers two functions that will try to set things right.  @kbd{M-x
7155 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7156 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7157 file.
7158
7159 @findex gnus-cache-move-cache
7160 @code{gnus-cache-move-cache} will move your whole
7161 @code{gnus-cache-directory} to some other location. You get asked to
7162 where, isn't that cool?
7163
7164 @node Persistent Articles
7165 @section Persistent Articles
7166 @cindex persistent articles
7167
7168 Closely related to article caching, we have @dfn{persistent articles}.
7169 In fact, it's just a different way of looking at caching, and much more
7170 useful in my opinion.
7171
7172 Say you're reading a newsgroup, and you happen on to some valuable gem
7173 that you want to keep and treasure forever.  You'd normally just save it
7174 (using one of the many saving commands) in some file.  The problem with
7175 that is that it's just, well, yucky.  Ideally you'd prefer just having
7176 the article remain in the group where you found it forever; untouched by
7177 the expiry going on at the news server.
7178
7179 This is what a @dfn{persistent article} is---an article that just won't
7180 be deleted.  It's implemented using the normal cache functions, but
7181 you use two explicit commands for managing persistent articles:
7182
7183 @table @kbd
7184
7185 @item *
7186 @kindex * (Summary)
7187 @findex gnus-cache-enter-article
7188 Make the current article persistent (@code{gnus-cache-enter-article}).
7189
7190 @item M-*
7191 @kindex M-* (Summary)
7192 @findex gnus-cache-remove-article
7193 Remove the current article from the persistent articles
7194 (@code{gnus-cache-remove-article}).  This will normally delete the
7195 article.
7196 @end table
7197
7198 Both these commands understand the process/prefix convention.
7199
7200 To avoid having all ticked articles (and stuff) entered into the cache,
7201 you should set @code{gnus-use-cache} to @code{passive} if you're just
7202 interested in persistent articles:
7203
7204 @lisp
7205 (setq gnus-use-cache 'passive)
7206 @end lisp
7207
7208
7209 @node Article Backlog
7210 @section Article Backlog
7211 @cindex backlog
7212 @cindex article backlog
7213
7214 If you have a slow connection, but the idea of using caching seems
7215 unappealing to you (and it is, really), you can help the situation some
7216 by switching on the @dfn{backlog}.  This is where Gnus will buffer
7217 already read articles so that it doesn't have to re-fetch articles
7218 you've already read.  This only helps if you are in the habit of
7219 re-selecting articles you've recently read, of course.  If you never do
7220 that, turning the backlog on will slow Gnus down a little bit, and
7221 increase memory usage some.
7222
7223 @vindex gnus-keep-backlog
7224 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
7225 at most @var{n} old articles in a buffer for later re-fetching.  If this
7226 variable is non-@code{nil} and is not a number, Gnus will store
7227 @emph{all} read articles, which means that your Emacs will grow without
7228 bound before exploding and taking your machine down with you.  I put
7229 that in there just to keep y'all on your toes.
7230
7231 The default value is 20.
7232
7233
7234 @node Saving Articles
7235 @section Saving Articles
7236 @cindex saving articles
7237
7238 Gnus can save articles in a number of ways.  Below is the documentation
7239 for saving articles in a fairly straight-forward fashion (i.e., little
7240 processing of the article is done before it is saved).  For a different
7241 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7242 (@pxref{Decoding Articles}).
7243
7244 For the commands listed here, the target is a file.  If you want to
7245 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7246 command (@pxref{Mail Group Commands}).
7247
7248 @vindex gnus-save-all-headers
7249 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
7250 unwanted headers before saving the article.
7251
7252 @vindex gnus-saved-headers
7253 If the preceding variable is @code{nil}, all headers that match the
7254 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7255 deleted before saving.
7256
7257 @table @kbd
7258
7259 @item O o
7260 @itemx o
7261 @kindex O o (Summary)
7262 @kindex o (Summary)
7263 @findex gnus-summary-save-article
7264 @c @icon{gnus-summary-save-article}
7265 Save the current article using the default article saver
7266 (@code{gnus-summary-save-article}).
7267
7268 @item O m
7269 @kindex O m (Summary)
7270 @findex gnus-summary-save-article-mail
7271 Save the current article in mail format
7272 (@code{gnus-summary-save-article-mail}).
7273
7274 @item O r
7275 @kindex O r (Summary)
7276 @findex gnus-summary-save-article-rmail
7277 Save the current article in Rmail format
7278 (@code{gnus-summary-save-article-rmail}).
7279
7280 @item O f
7281 @kindex O f (Summary)
7282 @findex gnus-summary-save-article-file
7283 @c @icon{gnus-summary-save-article-file}
7284 Save the current article in plain file format
7285 (@code{gnus-summary-save-article-file}).
7286
7287 @item O F
7288 @kindex O F (Summary)
7289 @findex gnus-summary-write-article-file
7290 Write the current article in plain file format, overwriting any previous
7291 file contents (@code{gnus-summary-write-article-file}).
7292
7293 @item O b
7294 @kindex O b (Summary)
7295 @findex gnus-summary-save-article-body-file
7296 Save the current article body in plain file format
7297 (@code{gnus-summary-save-article-body-file}).
7298
7299 @item O h
7300 @kindex O h (Summary)
7301 @findex gnus-summary-save-article-folder
7302 Save the current article in mh folder format
7303 (@code{gnus-summary-save-article-folder}).
7304
7305 @item O v
7306 @kindex O v (Summary)
7307 @findex gnus-summary-save-article-vm
7308 Save the current article in a VM folder
7309 (@code{gnus-summary-save-article-vm}).
7310
7311 @item O p
7312 @itemx |
7313 @kindex O p (Summary)
7314 @kindex | (Summary)
7315 @findex gnus-summary-pipe-output
7316 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7317 the current article to a process (@code{gnus-summary-pipe-output}).
7318 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7319 complete headers in the piped output.
7320
7321 @item O P
7322 @kindex O P (Summary)
7323 @findex gnus-summary-muttprint
7324 @vindex gnus-summary-muttprint-program
7325 Save the current article into muttprint. That is, print it using the
7326 external program @uref{http://muttprint.sourceforge.net/,
7327 Muttprint}. The program name and options to use is controlled by the
7328 variable @code{gnus-summary-muttprint-program}.
7329 (@code{gnus-summary-muttprint}).
7330
7331 @end table
7332
7333 @vindex gnus-prompt-before-saving
7334 All these commands use the process/prefix convention
7335 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7336 functions, you might get tired of being prompted for files to save each
7337 and every article in.  The prompting action is controlled by
7338 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7339 default, giving you that excessive prompting action you know and
7340 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7341 just once for each series of articles you save.  If you like to really
7342 have Gnus do all your thinking for you, you can even set this variable
7343 to @code{nil}, which means that you will never be prompted for files to
7344 save articles in.  Gnus will simply save all the articles in the default
7345 files.
7346
7347
7348 @vindex gnus-default-article-saver
7349 You can customize the @code{gnus-default-article-saver} variable to make
7350 Gnus do what you want it to.  You can use any of the six ready-made
7351 functions below, or you can create your own.
7352
7353 @table @code
7354
7355 @item gnus-summary-save-in-rmail
7356 @findex gnus-summary-save-in-rmail
7357 @vindex gnus-rmail-save-name
7358 @findex gnus-plain-save-name
7359 This is the default format, @dfn{Babyl}.  Uses the function in the
7360 @code{gnus-rmail-save-name} variable to get a file name to save the
7361 article in.  The default is @code{gnus-plain-save-name}.
7362
7363 @item gnus-summary-save-in-mail
7364 @findex gnus-summary-save-in-mail
7365 @vindex gnus-mail-save-name
7366 Save in a Unix mail (mbox) file.  Uses the function in the
7367 @code{gnus-mail-save-name} variable to get a file name to save the
7368 article in.  The default is @code{gnus-plain-save-name}.
7369
7370 @item gnus-summary-save-in-file
7371 @findex gnus-summary-save-in-file
7372 @vindex gnus-file-save-name
7373 @findex gnus-numeric-save-name
7374 Append the article straight to an ordinary file.  Uses the function in
7375 the @code{gnus-file-save-name} variable to get a file name to save the
7376 article in.  The default is @code{gnus-numeric-save-name}.
7377
7378 @item gnus-summary-write-to-file
7379 @findex gnus-summary-write-to-file
7380 Write the article straight to an ordinary file.  The file is
7381 overwritten if it exists.  Uses the function in the
7382 @code{gnus-file-save-name} variable to get a file name to save the
7383 article in.  The default is @code{gnus-numeric-save-name}.
7384
7385 @item gnus-summary-save-body-in-file
7386 @findex gnus-summary-save-body-in-file
7387 Append the article body to an ordinary file.  Uses the function in the
7388 @code{gnus-file-save-name} variable to get a file name to save the
7389 article in.  The default is @code{gnus-numeric-save-name}.
7390
7391 @item gnus-summary-save-in-folder
7392 @findex gnus-summary-save-in-folder
7393 @findex gnus-folder-save-name
7394 @findex gnus-Folder-save-name
7395 @vindex gnus-folder-save-name
7396 @cindex rcvstore
7397 @cindex MH folders
7398 Save the article to an MH folder using @code{rcvstore} from the MH
7399 library.  Uses the function in the @code{gnus-folder-save-name} variable
7400 to get a file name to save the article in.  The default is
7401 @code{gnus-folder-save-name}, but you can also use
7402 @code{gnus-Folder-save-name}, which creates capitalized names.
7403
7404 @item gnus-summary-save-in-vm
7405 @findex gnus-summary-save-in-vm
7406 Save the article in a VM folder.  You have to have the VM mail
7407 reader to use this setting.
7408 @end table
7409
7410 @vindex gnus-article-save-directory
7411 All of these functions, except for the last one, will save the article
7412 in the @code{gnus-article-save-directory}, which is initialized from the
7413 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
7414 default.
7415
7416 As you can see above, the functions use different functions to find a
7417 suitable name of a file to save the article in.  Below is a list of
7418 available functions that generate names:
7419
7420 @table @code
7421
7422 @item gnus-Numeric-save-name
7423 @findex gnus-Numeric-save-name
7424 File names like @file{~/News/Alt.andrea-dworkin/45}.
7425
7426 @item gnus-numeric-save-name
7427 @findex gnus-numeric-save-name
7428 File names like @file{~/News/alt.andrea-dworkin/45}.
7429
7430 @item gnus-Plain-save-name
7431 @findex gnus-Plain-save-name
7432 File names like @file{~/News/Alt.andrea-dworkin}.
7433
7434 @item gnus-plain-save-name
7435 @findex gnus-plain-save-name
7436 File names like @file{~/News/alt.andrea-dworkin}.
7437
7438 @item gnus-sender-save-name
7439 @findex gnus-sender-save-name
7440 File names like @file{~/News/larsi}.
7441 @end table
7442
7443 @vindex gnus-split-methods
7444 You can have Gnus suggest where to save articles by plonking a regexp into
7445 the @code{gnus-split-methods} alist.  For instance, if you would like to
7446 save articles related to Gnus in the file @file{gnus-stuff}, and articles
7447 related to VM in @file{vm-stuff}, you could set this variable to something
7448 like:
7449
7450 @lisp
7451 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7452  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7453  (my-choosing-function "../other-dir/my-stuff")
7454  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7455 @end lisp
7456
7457 We see that this is a list where each element is a list that has two
7458 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7459 a string (in which case it is used as a regexp to match on the article
7460 head); it can be a symbol (which will be called as a function with the
7461 group name as a parameter); or it can be a list (which will be
7462 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7463 the @dfn{file} will be used as a default prompt.  In addition, the
7464 result of the operation itself will be used if the function or form
7465 called returns a string or a list of strings.
7466
7467 You basically end up with a list of file names that might be used when
7468 saving the current article.  (All ``matches'' will be used.)  You will
7469 then be prompted for what you really want to use as a name, with file
7470 name completion over the results from applying this variable.
7471
7472 This variable is @code{((gnus-article-archive-name))} by default, which
7473 means that Gnus will look at the articles it saves for an
7474 @code{Archive-name} line and use that as a suggestion for the file
7475 name.
7476
7477 Here's an example function to clean up file names somewhat.  If you have
7478 lots of mail groups called things like
7479 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7480 these group names before creating the file name to save to.  The
7481 following will do just that:
7482
7483 @lisp
7484 (defun my-save-name (group)
7485   (when (string-match "^nnml:mail." group)
7486     (substring group (match-end 0))))
7487
7488 (setq gnus-split-methods
7489       '((gnus-article-archive-name)
7490         (my-save-name)))
7491 @end lisp
7492
7493
7494 @vindex gnus-use-long-file-name
7495 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7496 @code{nil}, all the preceding functions will replace all periods
7497 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7498 the functions will generate hierarchies of directories instead of having
7499 all the files in the top level directory
7500 (@file{~/News/alt/andrea-dworkin} instead of
7501 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7502 on most systems.  However, for historical reasons, this is @code{nil} on
7503 Xenix and usg-unix-v machines by default.
7504
7505 This function also affects kill and score file names.  If this variable
7506 is a list, and the list contains the element @code{not-score}, long file
7507 names will not be used for score files, if it contains the element
7508 @code{not-save}, long file names will not be used for saving, and if it
7509 contains the element @code{not-kill}, long file names will not be used
7510 for kill files.
7511
7512 If you'd like to save articles in a hierarchy that looks something like
7513 a spool, you could
7514
7515 @lisp
7516 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
7517 (setq gnus-default-article-saver
7518       'gnus-summary-save-in-file)          ; @r{no encoding}
7519 @end lisp
7520
7521 Then just save with @kbd{o}.  You'd then read this hierarchy with
7522 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7523 the top level directory as the argument (@file{~/News/}).  Then just walk
7524 around to the groups/directories with @code{nneething}.
7525
7526
7527 @node Decoding Articles
7528 @section Decoding Articles
7529 @cindex decoding articles
7530
7531 Sometime users post articles (or series of articles) that have been
7532 encoded in some way or other.  Gnus can decode them for you.
7533
7534 @menu
7535 * Uuencoded Articles::          Uudecode articles.
7536 * Shell Archives::              Unshar articles.
7537 * PostScript Files::            Split PostScript.
7538 * Other Files::                 Plain save and binhex.
7539 * Decoding Variables::          Variables for a happy decoding.
7540 * Viewing Files::               You want to look at the result of the decoding?
7541 @end menu
7542
7543 @cindex series
7544 @cindex article series
7545 All these functions use the process/prefix convention
7546 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7547 the extension that a ``single article'' means ``a single series''.  Gnus
7548 can find out by itself what articles belong to a series, decode all the
7549 articles and unpack/view/save the resulting file(s).
7550
7551 Gnus guesses what articles are in the series according to the following
7552 simplish rule: The subjects must be (nearly) identical, except for the
7553 last two numbers of the line.  (Spaces are largely ignored, however.)
7554
7555 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
7556 will find all the articles that match the regexp @samp{^cat.gif
7557 ([0-9]+/[0-9]+).*$}.
7558
7559 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7560 series}, will not be properly recognized by any of the automatic viewing
7561 commands, and you have to mark the articles manually with @kbd{#}.
7562
7563
7564 @node Uuencoded Articles
7565 @subsection Uuencoded Articles
7566 @cindex uudecode
7567 @cindex uuencoded articles
7568
7569 @table @kbd
7570
7571 @item X u
7572 @kindex X u (Summary)
7573 @findex gnus-uu-decode-uu
7574 @c @icon{gnus-uu-decode-uu}
7575 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7576
7577 @item X U
7578 @kindex X U (Summary)
7579 @findex gnus-uu-decode-uu-and-save
7580 Uudecodes and saves the current series
7581 (@code{gnus-uu-decode-uu-and-save}).
7582
7583 @item X v u
7584 @kindex X v u (Summary)
7585 @findex gnus-uu-decode-uu-view
7586 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7587
7588 @item X v U
7589 @kindex X v U (Summary)
7590 @findex gnus-uu-decode-uu-and-save-view
7591 Uudecodes, views and saves the current series
7592 (@code{gnus-uu-decode-uu-and-save-view}).
7593
7594 @end table
7595
7596 Remember that these all react to the presence of articles marked with
7597 the process mark.  If, for instance, you'd like to decode and save an
7598 entire newsgroup, you'd typically do @kbd{M P a}
7599 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7600 (@code{gnus-uu-decode-uu-and-save}).
7601
7602 All this is very much different from how @code{gnus-uu} worked with
7603 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7604 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7605 articles in some way (@pxref{Setting Process Marks}) and then press
7606 @kbd{X u}.
7607
7608 @vindex gnus-uu-notify-files
7609 Note: When trying to decode articles that have names matching
7610 @code{gnus-uu-notify-files}, which is hard-coded to
7611 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7612 automatically post an article on @samp{comp.unix.wizards} saying that
7613 you have just viewed the file in question.  This feature can't be turned
7614 off.
7615
7616
7617 @node Shell Archives
7618 @subsection Shell Archives
7619 @cindex unshar
7620 @cindex shell archives
7621 @cindex shared articles
7622
7623 Shell archives (``shar files'') used to be a popular way to distribute
7624 sources, but it isn't used all that much today.  In any case, we have
7625 some commands to deal with these:
7626
7627 @table @kbd
7628
7629 @item X s
7630 @kindex X s (Summary)
7631 @findex gnus-uu-decode-unshar
7632 Unshars the current series (@code{gnus-uu-decode-unshar}).
7633
7634 @item X S
7635 @kindex X S (Summary)
7636 @findex gnus-uu-decode-unshar-and-save
7637 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7638
7639 @item X v s
7640 @kindex X v s (Summary)
7641 @findex gnus-uu-decode-unshar-view
7642 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7643
7644 @item X v S
7645 @kindex X v S (Summary)
7646 @findex gnus-uu-decode-unshar-and-save-view
7647 Unshars, views and saves the current series
7648 (@code{gnus-uu-decode-unshar-and-save-view}).
7649 @end table
7650
7651
7652 @node PostScript Files
7653 @subsection PostScript Files
7654 @cindex PostScript
7655
7656 @table @kbd
7657
7658 @item X p
7659 @kindex X p (Summary)
7660 @findex gnus-uu-decode-postscript
7661 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7662
7663 @item X P
7664 @kindex X P (Summary)
7665 @findex gnus-uu-decode-postscript-and-save
7666 Unpack and save the current PostScript series
7667 (@code{gnus-uu-decode-postscript-and-save}).
7668
7669 @item X v p
7670 @kindex X v p (Summary)
7671 @findex gnus-uu-decode-postscript-view
7672 View the current PostScript series
7673 (@code{gnus-uu-decode-postscript-view}).
7674
7675 @item X v P
7676 @kindex X v P (Summary)
7677 @findex gnus-uu-decode-postscript-and-save-view
7678 View and save the current PostScript series
7679 (@code{gnus-uu-decode-postscript-and-save-view}).
7680 @end table
7681
7682
7683 @node Other Files
7684 @subsection Other Files
7685
7686 @table @kbd
7687 @item X o
7688 @kindex X o (Summary)
7689 @findex gnus-uu-decode-save
7690 Save the current series
7691 (@code{gnus-uu-decode-save}).
7692
7693 @item X b
7694 @kindex X b (Summary)
7695 @findex gnus-uu-decode-binhex
7696 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7697 doesn't really work yet.
7698 @end table
7699
7700
7701 @node Decoding Variables
7702 @subsection Decoding Variables
7703
7704 Adjective, not verb.
7705
7706 @menu
7707 * Rule Variables::              Variables that say how a file is to be viewed.
7708 * Other Decode Variables::      Other decode variables.
7709 * Uuencoding and Posting::      Variables for customizing uuencoding.
7710 @end menu
7711
7712
7713 @node Rule Variables
7714 @subsubsection Rule Variables
7715 @cindex rule variables
7716
7717 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7718 variables are of the form
7719
7720 @lisp
7721       (list '(regexp1 command2)
7722             '(regexp2 command2)
7723             ...)
7724 @end lisp
7725
7726 @table @code
7727
7728 @item gnus-uu-user-view-rules
7729 @vindex gnus-uu-user-view-rules
7730 @cindex sox
7731 This variable is consulted first when viewing files.  If you wish to use,
7732 for instance, @code{sox} to convert an @file{.au} sound file, you could
7733 say something like:
7734 @lisp
7735 (setq gnus-uu-user-view-rules
7736       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7737 @end lisp
7738
7739 @item gnus-uu-user-view-rules-end
7740 @vindex gnus-uu-user-view-rules-end
7741 This variable is consulted if Gnus couldn't make any matches from the
7742 user and default view rules.
7743
7744 @item gnus-uu-user-archive-rules
7745 @vindex gnus-uu-user-archive-rules
7746 This variable can be used to say what commands should be used to unpack
7747 archives.
7748 @end table
7749
7750
7751 @node Other Decode Variables
7752 @subsubsection Other Decode Variables
7753
7754 @table @code
7755 @vindex gnus-uu-grabbed-file-functions
7756
7757 @item gnus-uu-grabbed-file-functions
7758 All functions in this list will be called right after each file has been
7759 successfully decoded---so that you can move or view files right away,
7760 and don't have to wait for all files to be decoded before you can do
7761 anything.  Ready-made functions you can put in this list are:
7762
7763 @table @code
7764
7765 @item gnus-uu-grab-view
7766 @findex gnus-uu-grab-view
7767 View the file.
7768
7769 @item gnus-uu-grab-move
7770 @findex gnus-uu-grab-move
7771 Move the file (if you're using a saving function.)
7772 @end table
7773
7774 @item gnus-uu-be-dangerous
7775 @vindex gnus-uu-be-dangerous
7776 Specifies what to do if unusual situations arise during decoding.  If
7777 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7778 that didn't work, and overwrite existing files.  Otherwise, ask each
7779 time.
7780
7781 @item gnus-uu-ignore-files-by-name
7782 @vindex gnus-uu-ignore-files-by-name
7783 Files with name matching this regular expression won't be viewed.
7784
7785 @item gnus-uu-ignore-files-by-type
7786 @vindex gnus-uu-ignore-files-by-type
7787 Files with a @acronym{MIME} type matching this variable won't be viewed.
7788 Note that Gnus tries to guess what type the file is based on the name.
7789 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
7790 kludgey.
7791
7792 @item gnus-uu-tmp-dir
7793 @vindex gnus-uu-tmp-dir
7794 Where @code{gnus-uu} does its work.
7795
7796 @item gnus-uu-do-not-unpack-archives
7797 @vindex gnus-uu-do-not-unpack-archives
7798 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7799 looking for files to display.
7800
7801 @item gnus-uu-view-and-save
7802 @vindex gnus-uu-view-and-save
7803 Non-@code{nil} means that the user will always be asked to save a file
7804 after viewing it.
7805
7806 @item gnus-uu-ignore-default-view-rules
7807 @vindex gnus-uu-ignore-default-view-rules
7808 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7809 rules.
7810
7811 @item gnus-uu-ignore-default-archive-rules
7812 @vindex gnus-uu-ignore-default-archive-rules
7813 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7814 unpacking commands.
7815
7816 @item gnus-uu-kill-carriage-return
7817 @vindex gnus-uu-kill-carriage-return
7818 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7819 from articles.
7820
7821 @item gnus-uu-unmark-articles-not-decoded
7822 @vindex gnus-uu-unmark-articles-not-decoded
7823 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7824 decoded articles as unread.
7825
7826 @item gnus-uu-correct-stripped-uucode
7827 @vindex gnus-uu-correct-stripped-uucode
7828 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7829 uuencoded files that have had trailing spaces deleted.
7830
7831 @item gnus-uu-pre-uudecode-hook
7832 @vindex gnus-uu-pre-uudecode-hook
7833 Hook run before sending a message to @code{uudecode}.
7834
7835 @item gnus-uu-view-with-metamail
7836 @vindex gnus-uu-view-with-metamail
7837 @cindex metamail
7838 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7839 commands defined by the rule variables and just fudge a @acronym{MIME}
7840 content type based on the file name.  The result will be fed to
7841 @code{metamail} for viewing.
7842
7843 @item gnus-uu-save-in-digest
7844 @vindex gnus-uu-save-in-digest
7845 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7846 decoding, will save in digests.  If this variable is @code{nil},
7847 @code{gnus-uu} will just save everything in a file without any
7848 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7849 to specify any meaningful volume and issue numbers were found, so I
7850 simply dropped them.
7851
7852 @end table
7853
7854
7855 @node Uuencoding and Posting
7856 @subsubsection Uuencoding and Posting
7857
7858 @table @code
7859
7860 @item gnus-uu-post-include-before-composing
7861 @vindex gnus-uu-post-include-before-composing
7862 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7863 before you compose the article.  If this variable is @code{t}, you can
7864 either include an encoded file with @kbd{C-c C-i} or have one included
7865 for you when you post the article.
7866
7867 @item gnus-uu-post-length
7868 @vindex gnus-uu-post-length
7869 Maximum length of an article.  The encoded file will be split into how
7870 many articles it takes to post the entire file.
7871
7872 @item gnus-uu-post-threaded
7873 @vindex gnus-uu-post-threaded
7874 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7875 thread.  This may not be smart, as no other decoder I have seen is able
7876 to follow threads when collecting uuencoded articles.  (Well, I have
7877 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7878 think that counts@dots{}) Default is @code{nil}.
7879
7880 @item gnus-uu-post-separate-description
7881 @vindex gnus-uu-post-separate-description
7882 Non-@code{nil} means that the description will be posted in a separate
7883 article.  The first article will typically be numbered (0/x).  If this
7884 variable is @code{nil}, the description the user enters will be included
7885 at the beginning of the first article, which will be numbered (1/x).
7886 Default is @code{t}.
7887
7888 @end table
7889
7890
7891 @node Viewing Files
7892 @subsection Viewing Files
7893 @cindex viewing files
7894 @cindex pseudo-articles
7895
7896 After decoding, if the file is some sort of archive, Gnus will attempt
7897 to unpack the archive and see if any of the files in the archive can be
7898 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7899 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
7900 uncompress and de-tar the main file, and then view the two pictures.
7901 This unpacking process is recursive, so if the archive contains archives
7902 of archives, it'll all be unpacked.
7903
7904 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
7905 extracted file into the summary buffer.  If you go to these
7906 ``articles'', you will be prompted for a command to run (usually Gnus
7907 will make a suggestion), and then the command will be run.
7908
7909 @vindex gnus-view-pseudo-asynchronously
7910 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7911 until the viewing is done before proceeding.
7912
7913 @vindex gnus-view-pseudos
7914 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7915 the pseudo-articles into the summary buffer, but view them
7916 immediately.  If this variable is @code{not-confirm}, the user won't even
7917 be asked for a confirmation before viewing is done.
7918
7919 @vindex gnus-view-pseudos-separately
7920 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7921 pseudo-article will be created for each file to be viewed.  If
7922 @code{nil}, all files that use the same viewing command will be given as
7923 a list of parameters to that command.
7924
7925 @vindex gnus-insert-pseudo-articles
7926 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7927 pseudo-articles when decoding.  It is @code{t} by default.
7928
7929 So; there you are, reading your @emph{pseudo-articles} in your
7930 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7931 Why isn't anything real anymore? How did we get here?
7932
7933
7934 @node Article Treatment
7935 @section Article Treatment
7936
7937 Reading through this huge manual, you may have quite forgotten that the
7938 object of newsreaders is to actually, like, read what people have
7939 written.  Reading articles.  Unfortunately, people are quite bad at
7940 writing, so there are tons of functions and variables to make reading
7941 these articles easier.
7942
7943 @menu
7944 * Article Highlighting::        You want to make the article look like fruit salad.
7945 * Article Fontisizing::         Making emphasized text look nice.
7946 * Article Hiding::              You also want to make certain info go away.
7947 * Article Washing::             Lots of way-neat functions to make life better.
7948 * Article Header::              Doing various header transformations.
7949 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7950 * Article Button Levels::       Controlling appearance of buttons.
7951 * Article Date::                Grumble, UT!
7952 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7953 * Article Signature::           What is a signature?
7954 * Article Miscellania::         Various other stuff.
7955 @end menu
7956
7957
7958 @node Article Highlighting
7959 @subsection Article Highlighting
7960 @cindex highlighting
7961
7962 Not only do you want your article buffer to look like fruit salad, but
7963 you want it to look like technicolor fruit salad.
7964
7965 @table @kbd
7966
7967 @item W H a
7968 @kindex W H a (Summary)
7969 @findex gnus-article-highlight
7970 @findex gnus-article-maybe-highlight
7971 Do much highlighting of the current article
7972 (@code{gnus-article-highlight}).  This function highlights header, cited
7973 text, the signature, and adds buttons to the body and the head.
7974
7975 @item W H h
7976 @kindex W H h (Summary)
7977 @findex gnus-article-highlight-headers
7978 @vindex gnus-header-face-alist
7979 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7980 highlighting will be done according to the @code{gnus-header-face-alist}
7981 variable, which is a list where each element has the form
7982 @code{(@var{regexp} @var{name} @var{content})}.
7983 @var{regexp} is a regular expression for matching the
7984 header, @var{name} is the face used for highlighting the header name
7985 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7986 the header value.  The first match made will be used.  Note that
7987 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7988
7989 @item W H c
7990 @kindex W H c (Summary)
7991 @findex gnus-article-highlight-citation
7992 Highlight cited text (@code{gnus-article-highlight-citation}).
7993
7994 Some variables to customize the citation highlights:
7995
7996 @table @code
7997 @vindex gnus-cite-parse-max-size
7998
7999 @item gnus-cite-parse-max-size
8000 If the article size if bigger than this variable (which is 25000 by
8001 default), no citation highlighting will be performed.
8002
8003 @item gnus-cite-max-prefix
8004 @vindex gnus-cite-max-prefix
8005 Maximum possible length for a citation prefix (default 20).
8006
8007 @item gnus-cite-face-list
8008 @vindex gnus-cite-face-list
8009 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8010 When there are citations from multiple articles in the same message,
8011 Gnus will try to give each citation from each article its own face.
8012 This should make it easier to see who wrote what.
8013
8014 @item gnus-supercite-regexp
8015 @vindex gnus-supercite-regexp
8016 Regexp matching normal Supercite attribution lines.
8017
8018 @item gnus-supercite-secondary-regexp
8019 @vindex gnus-supercite-secondary-regexp
8020 Regexp matching mangled Supercite attribution lines.
8021
8022 @item gnus-cite-minimum-match-count
8023 @vindex gnus-cite-minimum-match-count
8024 Minimum number of identical prefixes we have to see before we believe
8025 that it's a citation.
8026
8027 @item gnus-cite-attribution-prefix
8028 @vindex gnus-cite-attribution-prefix
8029 Regexp matching the beginning of an attribution line.
8030
8031 @item gnus-cite-attribution-suffix
8032 @vindex gnus-cite-attribution-suffix
8033 Regexp matching the end of an attribution line.
8034
8035 @item gnus-cite-attribution-face
8036 @vindex gnus-cite-attribution-face
8037 Face used for attribution lines.  It is merged with the face for the
8038 cited text belonging to the attribution.
8039
8040 @end table
8041
8042
8043 @item W H s
8044 @kindex W H s (Summary)
8045 @vindex gnus-signature-separator
8046 @vindex gnus-signature-face
8047 @findex gnus-article-highlight-signature
8048 Highlight the signature (@code{gnus-article-highlight-signature}).
8049 Everything after @code{gnus-signature-separator} (@pxref{Article
8050 Signature}) in an article will be considered a signature and will be
8051 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8052 default.
8053
8054 @end table
8055
8056 @xref{Customizing Articles}, for how to highlight articles automatically.
8057
8058
8059 @node Article Fontisizing
8060 @subsection Article Fontisizing
8061 @cindex emphasis
8062 @cindex article emphasis
8063
8064 @findex gnus-article-emphasize
8065 @kindex W e (Summary)
8066 People commonly add emphasis to words in news articles by writing things
8067 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8068 this look nicer by running the article through the @kbd{W e}
8069 (@code{gnus-article-emphasize}) command.
8070
8071 @vindex gnus-emphasis-alist
8072 How the emphasis is computed is controlled by the
8073 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8074 element is a regular expression to be matched.  The second is a number
8075 that says what regular expression grouping is used to find the entire
8076 emphasized word.  The third is a number that says what regexp grouping
8077 should be displayed and highlighted.  (The text between these two
8078 groupings will be hidden.)  The fourth is the face used for
8079 highlighting.
8080
8081 @lisp
8082 (setq gnus-emphasis-alist
8083       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8084         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8085 @end lisp
8086
8087 @cindex slash
8088 @cindex asterisk
8089 @cindex underline
8090 @cindex /
8091 @cindex *
8092
8093 @vindex gnus-emphasis-underline
8094 @vindex gnus-emphasis-bold
8095 @vindex gnus-emphasis-italic
8096 @vindex gnus-emphasis-underline-bold
8097 @vindex gnus-emphasis-underline-italic
8098 @vindex gnus-emphasis-bold-italic
8099 @vindex gnus-emphasis-underline-bold-italic
8100 By default, there are seven rules, and they use the following faces:
8101 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8102 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8103 @code{gnus-emphasis-underline-italic},
8104 @code{gnus-emphasis-underline-bold}, and
8105 @code{gnus-emphasis-underline-bold-italic}.
8106
8107 If you want to change these faces, you can either use @kbd{M-x
8108 customize}, or you can use @code{copy-face}.  For instance, if you want
8109 to make @code{gnus-emphasis-italic} use a red face instead, you could
8110 say something like:
8111
8112 @lisp
8113 (copy-face 'red 'gnus-emphasis-italic)
8114 @end lisp
8115
8116 @vindex gnus-group-highlight-words-alist
8117
8118 If you want to highlight arbitrary words, you can use the
8119 @code{gnus-group-highlight-words-alist} variable, which uses the same
8120 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8121 parameter (@pxref{Group Parameters}) can also be used.
8122
8123 @xref{Customizing Articles}, for how to fontize articles automatically.
8124
8125
8126 @node Article Hiding
8127 @subsection Article Hiding
8128 @cindex article hiding
8129
8130 Or rather, hiding certain things in each article.  There usually is much
8131 too much cruft in most articles.
8132
8133 @table @kbd
8134
8135 @item W W a
8136 @kindex W W a (Summary)
8137 @findex gnus-article-hide
8138 Do quite a lot of hiding on the article buffer
8139 (@kbd{gnus-article-hide}).  In particular, this function will hide
8140 headers, @acronym{PGP}, cited text and the signature.
8141
8142 @item W W h
8143 @kindex W W h (Summary)
8144 @findex gnus-article-hide-headers
8145 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8146 Headers}.
8147
8148 @item W W b
8149 @kindex W W b (Summary)
8150 @findex gnus-article-hide-boring-headers
8151 Hide headers that aren't particularly interesting
8152 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8153
8154 @item W W s
8155 @kindex W W s (Summary)
8156 @findex gnus-article-hide-signature
8157 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8158 Signature}.
8159
8160 @item W W l
8161 @kindex W W l (Summary)
8162 @findex gnus-article-hide-list-identifiers
8163 @vindex gnus-list-identifiers
8164 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8165 are strings some mailing list servers add to the beginning of all
8166 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8167 @samp{Re: } is skipped before stripping. @code{gnus-list-identifiers}
8168 may not contain @code{\\(..\\)}.
8169
8170 @table @code
8171
8172 @item gnus-list-identifiers
8173 @vindex gnus-list-identifiers
8174 A regular expression that matches list identifiers to be removed from
8175 subject.  This can also be a list of regular expressions.
8176
8177 @end table
8178
8179 @item W W P
8180 @kindex W W P (Summary)
8181 @findex gnus-article-hide-pem
8182 Hide @acronym{PEM} (privacy enhanced messages) cruft
8183 (@code{gnus-article-hide-pem}).
8184
8185 @item W W B
8186 @kindex W W B (Summary)
8187 @findex gnus-article-strip-banner
8188 @vindex gnus-article-banner-alist
8189 @vindex gnus-article-address-banner-alist
8190 @cindex banner
8191 @cindex OneList
8192 @cindex stripping advertisements
8193 @cindex advertisements
8194 Strip the banner specified by the @code{banner} group parameter
8195 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8196 annoying banners and/or signatures that some mailing lists and moderated
8197 groups adds to all the messages.  The way to use this function is to add
8198 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8199 group you want banners stripped from.  The parameter either be a string,
8200 which will be interpreted as a regular expression matching text to be
8201 removed, or the symbol @code{signature}, meaning that the (last)
8202 signature should be removed, or other symbol, meaning that the
8203 corresponding regular expression in @code{gnus-article-banner-alist} is
8204 used.
8205
8206 Regardless of a group, you can hide things like advertisements only when
8207 the sender of an article has a certain mail address specified in
8208 @code{gnus-article-address-banner-alist}.
8209
8210 @table @code
8211
8212 @item gnus-article-address-banner-alist
8213 @vindex gnus-article-address-banner-alist
8214 Alist of mail addresses and banners.  Each element has the form
8215 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8216 matching a mail address in the From header, @var{banner} is one of a
8217 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8218 a regexp and @code{nil}.  If @var{address} matches author's mail
8219 address, it will remove things like advertisements.  For example, if a
8220 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8221 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8222 sends, you can use the following element to remove them:
8223
8224 @lisp
8225 ("@@yoo-hoo\\.co\\.jp\\'" . "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8226 @end lisp
8227
8228 @end table
8229
8230 @item W W c
8231 @kindex W W c (Summary)
8232 @findex gnus-article-hide-citation
8233 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8234 customizing the hiding:
8235
8236 @table @code
8237
8238 @item gnus-cited-opened-text-button-line-format
8239 @itemx gnus-cited-closed-text-button-line-format
8240 @vindex gnus-cited-closed-text-button-line-format
8241 @vindex gnus-cited-opened-text-button-line-format
8242 Gnus adds buttons to show where the cited text has been hidden, and to
8243 allow toggle hiding the text.  The format of the variable is specified
8244 by these format-like variable (@pxref{Formatting Variables}).  These
8245 specs are valid:
8246
8247 @table @samp
8248 @item b
8249 Starting point of the hidden text.
8250 @item e
8251 Ending point of the hidden text.
8252 @item l
8253 Number of characters in the hidden region.
8254 @item n
8255 Number of lines of hidden text.
8256 @end table
8257
8258 @item gnus-cited-lines-visible
8259 @vindex gnus-cited-lines-visible
8260 The number of lines at the beginning of the cited text to leave
8261 shown. This can also be a cons cell with the number of lines at the top
8262 and bottom of the text, respectively, to remain visible.
8263
8264 @end table
8265
8266 @item W W C-c
8267 @kindex W W C-c (Summary)
8268 @findex gnus-article-hide-citation-maybe
8269
8270 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8271 following two variables:
8272
8273 @table @code
8274 @item gnus-cite-hide-percentage
8275 @vindex gnus-cite-hide-percentage
8276 If the cited text is of a bigger percentage than this variable (default
8277 50), hide the cited text.
8278
8279 @item gnus-cite-hide-absolute
8280 @vindex gnus-cite-hide-absolute
8281 The cited text must have at least this length (default 10) before it
8282 is hidden.
8283 @end table
8284
8285 @item W W C
8286 @kindex W W C (Summary)
8287 @findex gnus-article-hide-citation-in-followups
8288 Hide cited text in articles that aren't roots
8289 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8290 useful as an interactive command, but might be a handy function to stick
8291 have happen automatically (@pxref{Customizing Articles}).
8292
8293 @end table
8294
8295 All these ``hiding'' commands are toggles, but if you give a negative
8296 prefix to these commands, they will show what they have previously
8297 hidden.  If you give a positive prefix, they will always hide.
8298
8299 Also @pxref{Article Highlighting} for further variables for
8300 citation customization.
8301
8302 @xref{Customizing Articles}, for how to hide article elements
8303 automatically.
8304
8305
8306 @node Article Washing
8307 @subsection Article Washing
8308 @cindex washing
8309 @cindex article washing
8310
8311 We call this ``article washing'' for a really good reason.  Namely, the
8312 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8313
8314 @dfn{Washing} is defined by us as ``changing something from something to
8315 something else'', but normally results in something looking better.
8316 Cleaner, perhaps.
8317
8318 @xref{Customizing Articles}, if you want to change how Gnus displays
8319 articles by default.
8320
8321 @table @kbd
8322
8323 @item C-u g
8324 This is not really washing, it's sort of the opposite of washing.  If
8325 you type this, you see the article exactly as it exists on disk or on
8326 the server.
8327
8328 @item g
8329 Force redisplaying of the current article
8330 (@code{gnus-summary-show-article}).  This is also not really washing.
8331 If you type this, you see the article without any previously applied
8332 interactive Washing functions but with all default treatments
8333 (@pxref{Customizing Articles}).
8334
8335 @item W l
8336 @kindex W l (Summary)
8337 @findex gnus-summary-stop-page-breaking
8338 Remove page breaks from the current article
8339 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8340 delimiters.
8341
8342 @item W r
8343 @kindex W r (Summary)
8344 @findex gnus-summary-caesar-message
8345 @c @icon{gnus-summary-caesar-message}
8346 Do a Caesar rotate (rot13) on the article buffer
8347 (@code{gnus-summary-caesar-message}).
8348 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8349 (Typically offensive jokes and such.)
8350
8351 It's commonly called ``rot13'' because each letter is rotated 13
8352 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8353 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8354 is rumored to have employed this form of, uh, somewhat weak encryption.
8355
8356 @item W m
8357 @kindex W m (Summary)
8358 @findex gnus-summary-morse-message
8359 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8360
8361 @item W t
8362 @item t
8363 @kindex W t (Summary)
8364 @kindex t (Summary)
8365 @findex gnus-summary-toggle-header
8366 Toggle whether to display all headers in the article buffer
8367 (@code{gnus-summary-toggle-header}).
8368
8369 @item W v
8370 @kindex W v (Summary)
8371 @findex gnus-summary-verbose-headers
8372 Toggle whether to display all headers in the article buffer permanently
8373 (@code{gnus-summary-verbose-headers}).
8374
8375 @item W o
8376 @kindex W o (Summary)
8377 @findex gnus-article-treat-overstrike
8378 Treat overstrike (@code{gnus-article-treat-overstrike}).
8379
8380 @item W d
8381 @kindex W d (Summary)
8382 @findex gnus-article-treat-dumbquotes
8383 @vindex gnus-article-dumbquotes-map
8384 @cindex Smartquotes
8385 @cindex M****s*** sm*rtq**t*s
8386 @cindex Latin 1
8387 Treat M****s*** sm*rtq**t*s according to
8388 @code{gnus-article-dumbquotes-map}
8389 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8390 whether a character is a sm*rtq**t* or not, so it should only be used
8391 interactively.
8392
8393 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8394 an attempt to provide more quoting characters.  If you see something
8395 like @code{\222} or @code{\264} where you're expecting some kind of
8396 apostrophe or quotation mark, then try this wash.
8397
8398 @item W Y f
8399 @kindex W Y f (Summary)
8400 @findex gnus-article-outlook-deuglify-article
8401 @cindex Outlook Express
8402 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8403 unwrap lines, repair attribution and rearrange citation.
8404 (@code{gnus-article-outlook-deuglify-article}).
8405
8406 @item W Y u
8407 @kindex W Y u (Summary)
8408 @findex gnus-article-outlook-unwrap-lines
8409 @vindex gnus-outlook-deuglify-unwrap-min
8410 @vindex gnus-outlook-deuglify-unwrap-max
8411 Unwrap lines that appear to be wrapped citation lines.  You can control
8412 what lines will be unwrapped by frobbing
8413 @code{gnus-outlook-deuglify-unwrap-min} and
8414 @code{gnus-outlook-deuglify-unwrap-max}, indicating the miminum and
8415 maximum length of an unwrapped citation line.
8416 (@code{gnus-article-outlook-unwrap-lines}).
8417
8418 @item W Y a
8419 @kindex W Y a (Summary)
8420 @findex gnus-article-outlook-repair-attribution
8421 Repair a broken attribution line.
8422 (@code{gnus-article-outlook-repair-attribution}).
8423
8424 @item W Y c
8425 @kindex W Y c (Summary)
8426 @findex gnus-article-outlook-rearrange-citation
8427 Repair broken citations by rearranging the text.
8428 (@code{gnus-article-outlook-rearrange-citation}).
8429
8430 @item W w
8431 @kindex W w (Summary)
8432 @findex gnus-article-fill-cited-article
8433 Do word wrap (@code{gnus-article-fill-cited-article}).
8434
8435 You can give the command a numerical prefix to specify the width to use
8436 when filling.
8437
8438 @item W Q
8439 @kindex W Q (Summary)
8440 @findex gnus-article-fill-long-lines
8441 Fill long lines (@code{gnus-article-fill-long-lines}).
8442
8443 @item W C
8444 @kindex W C (Summary)
8445 @findex gnus-article-capitalize-sentences
8446 Capitalize the first word in each sentence
8447 (@code{gnus-article-capitalize-sentences}).
8448
8449 @item W c
8450 @kindex W c (Summary)
8451 @findex gnus-article-remove-cr
8452 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8453 (this takes care of DOS line endings), and then translate any remaining
8454 CRs into LF (this takes care of Mac line endings)
8455 (@code{gnus-article-remove-cr}).
8456
8457 @item W q
8458 @kindex W q (Summary)
8459 @findex gnus-article-de-quoted-unreadable
8460 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8461 Quoted-Printable is one common @acronym{MIME} encoding employed when
8462 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
8463 makes strings like @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which
8464 doesn't look very readable to me.  Note that this is usually done
8465 automatically by Gnus if the message in question has a
8466 @code{Content-Transfer-Encoding} header that says that this encoding
8467 has been done.  If a prefix is given, a charset will be asked for.
8468
8469 @item W 6
8470 @kindex W 6 (Summary)
8471 @findex gnus-article-de-base64-unreadable
8472 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
8473 one common @acronym{MIME} encoding employed when sending
8474 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
8475 usually done automatically by Gnus if the message in question has a
8476 @code{Content-Transfer-Encoding} header that says that this encoding
8477 has been done.  If a prefix is given, a charset will be asked for.
8478
8479 @item W Z
8480 @kindex W Z (Summary)
8481 @findex gnus-article-decode-HZ
8482 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8483 common encoding employed when sending Chinese articles.  It typically
8484 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8485
8486 @item W u
8487 @kindex W u (Summary)
8488 @findex gnus-article-unsplit-urls
8489 Remove newlines from within URLs.  Some mailers insert newlines into
8490 outgoing email messages to keep lines short.  This reformatting can
8491 split long URLs onto multiple lines.  Repair those URLs by removing
8492 the newlines (@code{gnus-article-unsplit-urls}).
8493
8494 @item W h
8495 @kindex W h (Summary)
8496 @findex gnus-article-wash-html
8497 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
8498 usually done automatically by Gnus if the message in question has a
8499 @code{Content-Type} header that says that the message is @acronym{HTML}.
8500
8501 If a prefix is given, a charset will be asked for.
8502
8503 @vindex gnus-article-wash-function
8504 The default is to use the function specified by
8505 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
8506 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
8507 @acronym{HTML}, but this is controlled by the
8508 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8509 can use include:
8510
8511 @table @code
8512 @item w3
8513 Use Emacs/w3.
8514
8515 @item w3m
8516 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
8517
8518 @item links
8519 Use @uref{http://links.sf.net/, Links}.
8520
8521 @item lynx
8522 Use @uref{http://lynx.isc.org/, Lynx}.
8523
8524 @item html2text
8525 Use html2text---a simple @acronym{HTML} converter included with Gnus.
8526
8527 @end table
8528
8529 @item W b
8530 @kindex W b (Summary)
8531 @findex gnus-article-add-buttons
8532 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8533 @xref{Article Buttons}.
8534
8535 @item W B
8536 @kindex W B (Summary)
8537 @findex gnus-article-add-buttons-to-head
8538 Add clickable buttons to the article headers
8539 (@code{gnus-article-add-buttons-to-head}).
8540
8541 @item W p
8542 @kindex W p (Summary)
8543 @findex gnus-article-verify-x-pgp-sig
8544 Verify a signed control message
8545 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
8546 @code{newgroup} and @code{checkgroups} are usually signed by the
8547 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
8548 the maintainer to your keyring to verify the
8549 message.@footnote{@acronym{PGP} keys for many hierarchies are
8550 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8551
8552 @item W s
8553 @kindex W s (Summary)
8554 @findex gnus-summary-force-verify-and-decrypt
8555 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
8556 @acronym{S/MIME}) message
8557 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8558
8559 @item W a
8560 @kindex W a (Summary)
8561 @findex gnus-article-strip-headers-in-body
8562 Strip headers like the @code{X-No-Archive} header from the beginning of
8563 article bodies (@code{gnus-article-strip-headers-in-body}).
8564
8565 @item W E l
8566 @kindex W E l (Summary)
8567 @findex gnus-article-strip-leading-blank-lines
8568 Remove all blank lines from the beginning of the article
8569 (@code{gnus-article-strip-leading-blank-lines}).
8570
8571 @item W E m
8572 @kindex W E m (Summary)
8573 @findex gnus-article-strip-multiple-blank-lines
8574 Replace all blank lines with empty lines and then all multiple empty
8575 lines with a single empty line.
8576 (@code{gnus-article-strip-multiple-blank-lines}).
8577
8578 @item W E t
8579 @kindex W E t (Summary)
8580 @findex gnus-article-remove-trailing-blank-lines
8581 Remove all blank lines at the end of the article
8582 (@code{gnus-article-remove-trailing-blank-lines}).
8583
8584 @item W E a
8585 @kindex W E a (Summary)
8586 @findex gnus-article-strip-blank-lines
8587 Do all the three commands above
8588 (@code{gnus-article-strip-blank-lines}).
8589
8590 @item W E A
8591 @kindex W E A (Summary)
8592 @findex gnus-article-strip-all-blank-lines
8593 Remove all blank lines
8594 (@code{gnus-article-strip-all-blank-lines}).
8595
8596 @item W E s
8597 @kindex W E s (Summary)
8598 @findex gnus-article-strip-leading-space
8599 Remove all white space from the beginning of all lines of the article
8600 body (@code{gnus-article-strip-leading-space}).
8601
8602 @item W E e
8603 @kindex W E e (Summary)
8604 @findex gnus-article-strip-trailing-space
8605 Remove all white space from the end of all lines of the article
8606 body (@code{gnus-article-strip-trailing-space}).
8607
8608 @end table
8609
8610 @xref{Customizing Articles}, for how to wash articles automatically.
8611
8612
8613 @node Article Header
8614 @subsection Article Header
8615
8616 These commands perform various transformations of article header.
8617
8618 @table @kbd
8619
8620 @item W G u
8621 @kindex W G u (Summary)
8622 @findex gnus-article-treat-unfold-headers
8623 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8624
8625 @item W G n
8626 @kindex W G n (Summary)
8627 @findex gnus-article-treat-fold-newsgroups
8628 Fold the @code{Newsgroups} and @code{Followup-To} headers
8629 (@code{gnus-article-treat-fold-newsgroups}).
8630
8631 @item W G f
8632 @kindex W G f (Summary)
8633 @findex gnus-article-treat-fold-headers
8634 Fold all the message headers
8635 (@code{gnus-article-treat-fold-headers}).
8636
8637 @item W E w
8638 @kindex W E w
8639 @findex gnus-article-remove-leading-whitespace
8640 Remove excessive whitespace from all headers
8641 (@code{gnus-article-remove-leading-whitespace}).
8642
8643 @end table
8644
8645
8646 @node Article Buttons
8647 @subsection Article Buttons
8648 @cindex buttons
8649
8650 People often include references to other stuff in articles, and it would
8651 be nice if Gnus could just fetch whatever it is that people talk about
8652 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8653 button on these references.
8654
8655 @vindex gnus-button-man-handler
8656 Gnus adds @dfn{buttons} to certain standard references by default:
8657 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
8658 Emacs or Gnus related references.  This is controlled by two variables,
8659 one that handles article bodies and one that handles article heads:
8660
8661 @table @code
8662
8663 @item gnus-button-alist
8664 @vindex gnus-button-alist
8665 This is an alist where each entry has this form:
8666
8667 @lisp
8668 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8669 @end lisp
8670
8671 @table @var
8672
8673 @item regexp
8674 All text that match this regular expression (case insensitive) will be
8675 considered an external reference.  Here's a typical regexp that matches
8676 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8677 variable containing a regexp, useful variables to use include
8678 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
8679
8680 @item button-par
8681 Gnus has to know which parts of the matches is to be highlighted.  This
8682 is a number that says what sub-expression of the regexp is to be
8683 highlighted.  If you want it all highlighted, you use 0 here.
8684
8685 @item use-p
8686 This form will be @code{eval}ed, and if the result is non-@code{nil},
8687 this is considered a match.  This is useful if you want extra sifting to
8688 avoid false matches.  Often variables named
8689 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
8690 Levels}, but any other form may be used too.
8691
8692 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
8693
8694 @item function
8695 This function will be called when you click on this button.
8696
8697 @item data-par
8698 As with @var{button-par}, this is a sub-expression number, but this one
8699 says which part of the match is to be sent as data to @var{function}.
8700
8701 @end table
8702
8703 So the full entry for buttonizing URLs is then
8704
8705 @lisp
8706 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8707 @end lisp
8708
8709 @item gnus-header-button-alist
8710 @vindex gnus-header-button-alist
8711 This is just like the other alist, except that it is applied to the
8712 article head only, and that each entry has an additional element that is
8713 used to say what headers to apply the buttonize coding to:
8714
8715 @lisp
8716 (@var{header} @var{regexp} @var{nutton-par} @var{use-p} @var{function} @var{data-par})
8717 @end lisp
8718
8719 @var{header} is a regular expression.
8720
8721 @subsubsection Related variables and functions
8722
8723 @item gnus-button-@var{*}-level
8724 @xref{Article Button Levels}.
8725
8726 @c Stuff related to gnus-button-browse-level
8727
8728 @item gnus-button-url-regexp
8729 @vindex gnus-button-url-regexp
8730 A regular expression that matches embedded URLs.  It is used in the
8731 default values of the variables above.
8732
8733 @c Stuff related to gnus-button-man-level
8734
8735 @item gnus-button-man-handler
8736 @vindex gnus-button-man-handler
8737 The function to use for displaying man pages.  It must take at least one
8738 argument with a string naming the man page.
8739
8740 @c Stuff related to gnus-button-message-level
8741
8742 @item gnus-button-mid-or-mail-regexp
8743 @vindex gnus-button-mid-or-mail-regexp
8744 Regular expression that matches a message ID or a mail address.
8745
8746 @item gnus-button-prefer-mid-or-mail
8747 @vindex gnus-button-prefer-mid-or-mail
8748 This variable determines what to do when the button on a string as
8749 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
8750 message ID or a mail address.  If it is one of the symbols @code{mid} or
8751 @code{mail}, Gnus will always assume that the string is a message ID or
8752 a mail address, respectivly.  If this variable is set to the symbol
8753 @code{ask}, always query the user what do do.  If it is a function, this
8754 function will be called with the string as it's only argument.  The
8755 function must return @code{mid}, @code{mail}, @code{invalid} or
8756 @code{ask}.  The default value is the function
8757 @code{gnus-button-mid-or-mail-heuristic}.
8758
8759 @item gnus-button-mid-or-mail-heuristic
8760 @findex gnus-button-mid-or-mail-heuristic
8761 Function that guesses whether it's argument is a message ID or a mail
8762 address.  Returns @code{mid} it's a message IDs, @code{mail} if it's a
8763 mail address, @code{ask} if unsure and @code{invalid} if the string is
8764 invalid.
8765
8766 @item gnus-button-mid-or-mail-heuristic-alist
8767 @vindex gnus-button-mid-or-mail-heuristic-alist
8768 An alist of @code{(RATE . REGEXP)} pairs used by the function
8769 @code{gnus-button-mid-or-mail-heuristic}.
8770
8771 @c Stuff related to gnus-button-tex-level
8772
8773 @item gnus-button-ctan-handler
8774 @findex gnus-button-ctan-handler
8775 The function to use for displaying CTAN links.  It must take one
8776 argument, the string naming the URL.
8777
8778 @item gnus-ctan-url
8779 @vindex gnus-ctan-url
8780 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
8781 by @code{gnus-button-ctan-handler}.
8782
8783 @c Misc stuff
8784
8785 @item gnus-article-button-face
8786 @vindex gnus-article-button-face
8787 Face used on buttons.
8788
8789 @item gnus-article-mouse-face
8790 @vindex gnus-article-mouse-face
8791 Face used when the mouse cursor is over a button.
8792
8793 @end table
8794
8795 @xref{Customizing Articles}, for how to buttonize articles automatically.
8796
8797
8798 @node Article Button Levels
8799 @subsection Article button levels
8800 @cindex button levels
8801 The higher the value of the variables @code{gnus-button-@var{*}-level},
8802 the more buttons will appear.  If the level is zero, no corresponding
8803 buttons are displayed.  With the default value (which is 5) you should
8804 already see quite a lot of buttons.  With higher levels, you will see
8805 more buttons, but you may also get more false positives.  To avoid them,
8806 you can set the variables @code{gnus-button-@var{*}-level} local to
8807 specific groups (@pxref{Group Parameters}).  Here's an example for the
8808 variable @code{gnus-parameters}:
8809
8810 @lisp
8811 ;; @r{increase @code{gnus-button-*-level} in some groups:}
8812 (setq gnus-parameters
8813       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
8814         ("\\<unix\\>"               (gnus-button-man-level 10))
8815         ("\\<tex\\>"                (gnus-button-tex-level 10))))
8816 @end lisp
8817
8818 @table @code
8819
8820 @item gnus-button-browse-level
8821 @vindex gnus-button-browse-level
8822 Controls the display of references to message IDs, mail addresses and
8823 news URLs.  Related variables and functions include
8824 @code{gnus-button-url-regexp}, @code{browse-url}, and
8825 @code{browse-url-browser-function}.
8826
8827 @item gnus-button-emacs-level
8828 @vindex gnus-button-emacs-level
8829 Controls the display of Emacs or Gnus references.  Related functions are
8830 @code{gnus-button-handle-custom},
8831 @code{gnus-button-handle-describe-function},
8832 @code{gnus-button-handle-describe-variable},
8833 @code{gnus-button-handle-symbol},
8834 @code{gnus-button-handle-describe-key},
8835 @code{gnus-button-handle-apropos},
8836 @code{gnus-button-handle-apropos-command},
8837 @code{gnus-button-handle-apropos-variable},
8838 @code{gnus-button-handle-apropos-documentation}, and
8839 @code{gnus-button-handle-library}.
8840
8841 @item gnus-button-man-level
8842 @vindex gnus-button-man-level
8843 Controls the display of references to (Unix) man pages.
8844 See @code{gnus-button-man-handler}.
8845
8846 @item gnus-button-message-level
8847 @vindex gnus-button-message-level
8848 Controls the display of message IDs, mail addresses and news URLs.
8849 Related variables and functions include
8850 @code{gnus-button-mid-or-mail-regexp},
8851 @code{gnus-button-prefer-mid-or-mail},
8852 @code{gnus-button-mid-or-mail-heuristic}, and
8853 @code{gnus-button-mid-or-mail-heuristic-alist}.
8854
8855 @item gnus-button-tex-level
8856 @vindex gnus-button-tex-level
8857 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
8858 URLs.  See the variables @code{gnus-ctan-url},
8859 @code{gnus-button-ctan-handler},
8860 @code{gnus-button-ctan-directory-regexp}, and
8861 @code{gnus-button-handle-ctan-bogus-regexp}.
8862
8863 @end table
8864
8865
8866 @node Article Date
8867 @subsection Article Date
8868
8869 The date is most likely generated in some obscure timezone you've never
8870 heard of, so it's quite nice to be able to find out what the time was
8871 when the article was sent.
8872
8873 @table @kbd
8874
8875 @item W T u
8876 @kindex W T u (Summary)
8877 @findex gnus-article-date-ut
8878 Display the date in UT (aka. GMT, aka ZULU)
8879 (@code{gnus-article-date-ut}).
8880
8881 @item W T i
8882 @kindex W T i (Summary)
8883 @findex gnus-article-date-iso8601
8884 @cindex ISO 8601
8885 Display the date in international format, aka. ISO 8601
8886 (@code{gnus-article-date-iso8601}).
8887
8888 @item W T l
8889 @kindex W T l (Summary)
8890 @findex gnus-article-date-local
8891 Display the date in the local timezone (@code{gnus-article-date-local}).
8892
8893 @item W T p
8894 @kindex W T p (Summary)
8895 @findex gnus-article-date-english
8896 Display the date in a format that's easily pronounceable in English
8897 (@code{gnus-article-date-english}).
8898
8899 @item W T s
8900 @kindex W T s (Summary)
8901 @vindex gnus-article-time-format
8902 @findex gnus-article-date-user
8903 @findex format-time-string
8904 Display the date using a user-defined format
8905 (@code{gnus-article-date-user}).  The format is specified by the
8906 @code{gnus-article-time-format} variable, and is a string that's passed
8907 to @code{format-time-string}.  See the documentation of that variable
8908 for a list of possible format specs.
8909
8910 @item W T e
8911 @kindex W T e (Summary)
8912 @findex gnus-article-date-lapsed
8913 @findex gnus-start-date-timer
8914 @findex gnus-stop-date-timer
8915 Say how much time has elapsed between the article was posted and now
8916 (@code{gnus-article-date-lapsed}).  It looks something like:
8917
8918 @example
8919 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8920 @end example
8921
8922 @vindex gnus-article-date-lapsed-new-header
8923 The value of @code{gnus-article-date-lapsed-new-header} determines
8924 whether this header will just be added below the old Date one, or will
8925 replace it.
8926
8927 An advantage of using Gnus to read mail is that it converts simple bugs
8928 into wonderful absurdities.
8929
8930 If you want to have this line updated continually, you can put
8931
8932 @lisp
8933 (gnus-start-date-timer)
8934 @end lisp
8935
8936 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
8937 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8938 command.
8939
8940 @item W T o
8941 @kindex W T o (Summary)
8942 @findex gnus-article-date-original
8943 Display the original date (@code{gnus-article-date-original}).  This can
8944 be useful if you normally use some other conversion function and are
8945 worried that it might be doing something totally wrong.  Say, claiming
8946 that the article was posted in 1854.  Although something like that is
8947 @emph{totally} impossible.  Don't you trust me? *titter*
8948
8949 @end table
8950
8951 @xref{Customizing Articles}, for how to display the date in your
8952 preferred format automatically.
8953
8954
8955 @node Article Display
8956 @subsection Article Display
8957 @cindex picons
8958 @cindex x-face
8959 @cindex smileys
8960
8961 These commands add various frivolous display gimmicks to the article
8962 buffer in Emacs versions that support them.
8963
8964 @code{X-Face} headers are small black-and-white images supplied by the
8965 message headers (@pxref{X-Face}).
8966
8967 Picons, on the other hand, reside on your own system, and Gnus will
8968 try to match the headers to what you have (@pxref{Picons}).
8969
8970 Smileys are those little @samp{:-)} symbols that people like to litter
8971 their messages with (@pxref{Smileys}).
8972
8973 All these functions are toggles---if the elements already exist,
8974 they'll be removed.
8975
8976 @table @kbd
8977 @item W D x
8978 @kindex W D x (Summary)
8979 @findex gnus-article-display-x-face
8980 Display an @code{X-Face} in the @code{From} header.
8981 (@code{gnus-article-display-x-face}).
8982
8983 @item W D d
8984 @kindex W D d (Summary)
8985 @findex gnus-article-display-face
8986 Display a @code{Face} in the @code{From} header.
8987 (@code{gnus-article-display-face}).
8988
8989 @item W D s
8990 @kindex W D s (Summary)
8991 @findex gnus-treat-smiley
8992 Display smileys (@code{gnus-treat-smiley}).
8993
8994 @item W D f
8995 @kindex W D f (Summary)
8996 @findex gnus-treat-from-picon
8997 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
8998
8999 @item W D m
9000 @kindex W D m (Summary)
9001 @findex gnus-treat-mail-picon
9002 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9003 (@code{gnus-treat-mail-picon}).
9004
9005 @item W D n
9006 @kindex W D n (Summary)
9007 @findex gnus-treat-newsgroups-picon
9008 Piconify all news headers (i. e., @code{Newsgroups} and
9009 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9010
9011 @item W D D
9012 @kindex W D D (Summary)
9013 @findex gnus-article-remove-images
9014 Remove all images from the article buffer
9015 (@code{gnus-article-remove-images}).
9016
9017 @end table
9018
9019
9020
9021 @node Article Signature
9022 @subsection Article Signature
9023 @cindex signatures
9024 @cindex article signature
9025
9026 @vindex gnus-signature-separator
9027 Each article is divided into two parts---the head and the body.  The
9028 body can be divided into a signature part and a text part.  The variable
9029 that says what is to be considered a signature is
9030 @code{gnus-signature-separator}.  This is normally the standard
9031 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9032 non-standard signature separators, so this variable can also be a list
9033 of regular expressions to be tested, one by one.  (Searches are done
9034 from the end of the body towards the beginning.)  One likely value is:
9035
9036 @lisp
9037 (setq gnus-signature-separator
9038       '("^-- $"         ; @r{The standard}
9039         "^-- *$"        ; @r{A common mangling}
9040         "^-------*$"    ; @r{Many people just use a looong}
9041                         ; @r{line of dashes.  Shame!}
9042         "^ *--------*$" ; @r{Double-shame!}
9043         "^________*$"   ; @r{Underscores are also popular}
9044         "^========*$")) ; @r{Pervert!}
9045 @end lisp
9046
9047 The more permissive you are, the more likely it is that you'll get false
9048 positives.
9049
9050 @vindex gnus-signature-limit
9051 @code{gnus-signature-limit} provides a limit to what is considered a
9052 signature when displaying articles.
9053
9054 @enumerate
9055 @item
9056 If it is an integer, no signature may be longer (in characters) than
9057 that integer.
9058 @item
9059 If it is a floating point number, no signature may be longer (in lines)
9060 than that number.
9061 @item
9062 If it is a function, the function will be called without any parameters,
9063 and if it returns @code{nil}, there is no signature in the buffer.
9064 @item
9065 If it is a string, it will be used as a regexp.  If it matches, the text
9066 in question is not a signature.
9067 @end enumerate
9068
9069 This variable can also be a list where the elements may be of the types
9070 listed above.  Here's an example:
9071
9072 @lisp
9073 (setq gnus-signature-limit
9074       '(200.0 "^---*Forwarded article"))
9075 @end lisp
9076
9077 This means that if there are more than 200 lines after the signature
9078 separator, or the text after the signature separator is matched by
9079 the regular expression @samp{^---*Forwarded article}, then it isn't a
9080 signature after all.
9081
9082
9083 @node Article Miscellania
9084 @subsection Article Miscellania
9085
9086 @table @kbd
9087 @item A t
9088 @kindex A t (Summary)
9089 @findex gnus-article-babel
9090 Translate the article from one language to another
9091 (@code{gnus-article-babel}).
9092
9093 @end table
9094
9095
9096 @node MIME Commands
9097 @section MIME Commands
9098 @cindex MIME decoding
9099 @cindex attachments
9100 @cindex viewing attachments
9101
9102 The following commands all understand the numerical prefix.  For
9103 instance, @kbd{3 b} means ``view the third @acronym{MIME} part''.
9104
9105 @table @kbd
9106 @item b
9107 @itemx K v
9108 @kindex b (Summary)
9109 @kindex K v (Summary)
9110 View the @acronym{MIME} part.
9111
9112 @item K o
9113 @kindex K o (Summary)
9114 Save the @acronym{MIME} part.
9115
9116 @item K c
9117 @kindex K c (Summary)
9118 Copy the @acronym{MIME} part.
9119
9120 @item K e
9121 @kindex K e (Summary)
9122 View the @acronym{MIME} part externally.
9123
9124 @item K i
9125 @kindex K i (Summary)
9126 View the @acronym{MIME} part internally.
9127
9128 @item K |
9129 @kindex K | (Summary)
9130 Pipe the @acronym{MIME} part to an external command.
9131 @end table
9132
9133 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9134 the same manner:
9135
9136 @table @kbd
9137 @item K b
9138 @kindex K b (Summary)
9139 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9140 mostly useful if you wish to save (or perform other actions) on inlined
9141 parts.
9142
9143 @item K m
9144 @kindex K m (Summary)
9145 @findex gnus-summary-repair-multipart
9146 Some multipart messages are transmitted with missing or faulty headers.
9147 This command will attempt to ``repair'' these messages so that they can
9148 be viewed in a more pleasant manner
9149 (@code{gnus-summary-repair-multipart}).
9150
9151 @item X m
9152 @kindex X m (Summary)
9153 @findex gnus-summary-save-parts
9154 Save all parts matching a @acronym{MIME} type to a directory
9155 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9156 convention (@pxref{Process/Prefix}).
9157
9158 @item M-t
9159 @kindex M-t (Summary)
9160 @findex gnus-summary-toggle-display-buttonized
9161 Toggle the buttonized display of the article buffer
9162 (@code{gnus-summary-toggle-display-buttonized}).
9163
9164 @item W M w
9165 @kindex W M w (Summary)
9166 @findex gnus-article-decode-mime-words
9167 Decode RFC 2047-encoded words in the article headers
9168 (@code{gnus-article-decode-mime-words}).
9169
9170 @item W M c
9171 @kindex W M c (Summary)
9172 @findex gnus-article-decode-charset
9173 Decode encoded article bodies as well as charsets
9174 (@code{gnus-article-decode-charset}).
9175
9176 This command looks in the @code{Content-Type} header to determine the
9177 charset.  If there is no such header in the article, you can give it a
9178 prefix, which will prompt for the charset to decode as.  In regional
9179 groups where people post using some common encoding (but do not
9180 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9181 parameter to the required charset (@pxref{Group Parameters}).
9182
9183 @item W M v
9184 @kindex W M v (Summary)
9185 @findex gnus-mime-view-all-parts
9186 View all the @acronym{MIME} parts in the current article
9187 (@code{gnus-mime-view-all-parts}).
9188
9189 @end table
9190
9191 Relevant variables:
9192
9193 @table @code
9194 @item gnus-ignored-mime-types
9195 @vindex gnus-ignored-mime-types
9196 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9197 this list will be completely ignored by Gnus.  The default value is
9198 @code{nil}.
9199
9200 To have all Vcards be ignored, you'd say something like this:
9201
9202 @lisp
9203 (setq gnus-ignored-mime-types
9204       '("text/x-vcard"))
9205 @end lisp
9206
9207 @item gnus-article-loose-mime
9208 @vindex gnus-article-loose-mime
9209 If non-@code{nil}, Gnus won't required the @samp{MIME-Version} header
9210 before interpreting the message as a @acronym{MIME} message.  This helps
9211 when reading messages from certain broken mail user agents.  The
9212 default is @code{nil}.
9213
9214 @item gnus-article-emulate-mime
9215 @vindex gnus-article-emulate-mime
9216 There are other, non-@acronym{MIME} encoding methods used.  The most common
9217 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9218 this variable is non-@code{nil}, Gnus will look in message bodies to
9219 see if it finds these encodings, and if so, it'll run them through the
9220 Gnus @acronym{MIME} machinery.  The default is @code{t}.
9221
9222 @item gnus-unbuttonized-mime-types
9223 @vindex gnus-unbuttonized-mime-types
9224 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9225 this list won't have @acronym{MIME} buttons inserted unless they aren't
9226 displayed or this variable is overridden by
9227 @code{gnus-buttonized-mime-types}.  The default value is
9228 @code{(".*/.*")}.  This variable is only used when
9229 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9230
9231 @item gnus-buttonized-mime-types
9232 @vindex gnus-buttonized-mime-types
9233 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9234 this list will have @acronym{MIME} buttons inserted unless they aren't
9235 displayed.  This variable overrides
9236 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9237 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9238 is @code{nil}.
9239
9240 To see e.g. security buttons but no other buttons, you could set this
9241 variable to @code{("multipart/signed")} and leave
9242 @code{gnus-unbuttonized-mime-types} at the default value.
9243
9244 @item gnus-inhibit-mime-unbuttonizing
9245 @vindex gnus-inhibit-mime-unbuttonizing
9246 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9247 default value is @code{nil}.
9248
9249 @item gnus-article-mime-part-function
9250 @vindex gnus-article-mime-part-function
9251 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9252 handle as the parameter.  The function is meant to be used to allow
9253 users to gather information from the article (e. g., add Vcard info to
9254 the bbdb database) or to do actions based on parts (e. g., automatically
9255 save all jpegs into some directory).
9256
9257 Here's an example function the does the latter:
9258
9259 @lisp
9260 (defun my-save-all-jpeg-parts (handle)
9261   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9262     (with-temp-buffer
9263       (insert (mm-get-part handle))
9264       (write-region (point-min) (point-max)
9265                     (read-file-name "Save jpeg to: ")))))
9266 (setq gnus-article-mime-part-function
9267       'my-save-all-jpeg-parts)
9268 @end lisp
9269
9270 @vindex gnus-mime-multipart-functions
9271 @item gnus-mime-multipart-functions
9272 Alist of @acronym{MIME} multipart types and functions to handle them.
9273
9274 @vindex mm-file-name-rewrite-functions
9275 @item mm-file-name-rewrite-functions
9276 List of functions used for rewriting file names of @acronym{MIME} parts.
9277 Each function takes a file name as input and returns a file name.
9278
9279 Ready-made functions include@*
9280 @code{mm-file-name-delete-whitespace},
9281 @code{mm-file-name-trim-whitespace},
9282 @code{mm-file-name-collapse-whitespace}, and
9283 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9284 the variable @code{mm-file-name-replace-whitespace} to replace each
9285 whitespace character in a file name with that string; default value
9286 is @code{"_"} (a single underscore).
9287 @findex mm-file-name-delete-whitespace
9288 @findex mm-file-name-trim-whitespace
9289 @findex mm-file-name-collapse-whitespace
9290 @findex mm-file-name-replace-whitespace
9291 @vindex mm-file-name-replace-whitespace
9292
9293 The standard functions @code{capitalize}, @code{downcase},
9294 @code{upcase}, and @code{upcase-initials} may be useful, too.
9295
9296 Everybody knows that whitespace characters in file names are evil,
9297 except those who don't know.  If you receive lots of attachments from
9298 such unenlightened users, you can make live easier by adding
9299
9300 @lisp
9301 (setq mm-file-name-rewrite-functions
9302       '(mm-file-name-trim-whitespace
9303         mm-file-name-collapse-whitespace
9304         mm-file-name-replace-whitespace))
9305 @end lisp
9306
9307 @noindent
9308 to your @file{~/.gnus.el} file.
9309
9310 @end table
9311
9312
9313 @node Charsets
9314 @section Charsets
9315 @cindex charsets
9316
9317 People use different charsets, and we have @acronym{MIME} to let us know what
9318 charsets they use.  Or rather, we wish we had.  Many people use
9319 newsreaders and mailers that do not understand or use @acronym{MIME}, and
9320 just send out messages without saying what character sets they use.  To
9321 help a bit with this, some local news hierarchies have policies that say
9322 what character set is the default.  For instance, the @samp{fj}
9323 hierarchy uses @code{iso-2022-jp-2}.
9324
9325 @vindex gnus-group-charset-alist
9326 This knowledge is encoded in the @code{gnus-group-charset-alist}
9327 variable, which is an alist of regexps (use the first item to match full
9328 group names) and default charsets to be used when reading these groups.
9329
9330 @vindex gnus-newsgroup-ignored-charsets
9331 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
9332 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9333 even if they really are in @code{koi-8}.  To help here, the
9334 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9335 charsets that are listed here will be ignored.  The variable can be
9336 set on a group-by-group basis using the group parameters (@pxref{Group
9337 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9338 which includes values some agents insist on having in there.
9339
9340 @vindex gnus-group-posting-charset-alist
9341 When posting, @code{gnus-group-posting-charset-alist} is used to
9342 determine which charsets should not be encoded using the @acronym{MIME}
9343 encodings.  For instance, some hierarchies discourage using
9344 quoted-printable header encoding.
9345
9346 This variable is an alist of regexps and permitted unencoded charsets
9347 for posting.  Each element of the alist has the form @code{(}@var{test
9348 header body-list}@code{)}, where:
9349
9350 @table @var
9351 @item test
9352 is either a regular expression matching the newsgroup header or a
9353 variable to query,
9354 @item header
9355 is the charset which may be left unencoded in the header (@code{nil}
9356 means encode all charsets),
9357 @item body-list
9358 is a list of charsets which may be encoded using 8bit content-transfer
9359 encoding in the body, or one of the special values @code{nil} (always
9360 encode using quoted-printable) or @code{t} (always use 8bit).
9361 @end table
9362
9363 @cindex Russian
9364 @cindex koi8-r
9365 @cindex koi8-u
9366 @cindex iso-8859-5
9367 @cindex coding system aliases
9368 @cindex preferred charset
9369
9370 Other charset tricks that may be useful, although not Gnus-specific:
9371
9372 If there are several @acronym{MIME} charsets that encode the same Emacs
9373 charset, you can choose what charset to use by saying the following:
9374
9375 @lisp
9376 (put-charset-property 'cyrillic-iso8859-5
9377                       'preferred-coding-system 'koi8-r)
9378 @end lisp
9379
9380 This means that Russian will be encoded using @code{koi8-r} instead of
9381 the default @code{iso-8859-5} @acronym{MIME} charset.
9382
9383 If you want to read messages in @code{koi8-u}, you can cheat and say
9384
9385 @lisp
9386 (define-coding-system-alias 'koi8-u 'koi8-r)
9387 @end lisp
9388
9389 This will almost do the right thing.
9390
9391 And finally, to read charsets like @code{windows-1251}, you can say
9392 something like
9393
9394 @lisp
9395 (codepage-setup 1251)
9396 (define-coding-system-alias 'windows-1251 'cp1251)
9397 @end lisp
9398
9399
9400 @node Article Commands
9401 @section Article Commands
9402
9403 @table @kbd
9404
9405 @item A P
9406 @cindex PostScript
9407 @cindex printing
9408 @kindex A P (Summary)
9409 @vindex gnus-ps-print-hook
9410 @findex gnus-summary-print-article
9411 Generate and print a PostScript image of the article buffer
9412 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9413 be run just before printing the buffer.  An alternative way to print
9414 article is to use Muttprint (@pxref{Saving Articles}).
9415
9416 @end table
9417
9418
9419 @node Summary Sorting
9420 @section Summary Sorting
9421 @cindex summary sorting
9422
9423 You can have the summary buffer sorted in various ways, even though I
9424 can't really see why you'd want that.
9425
9426 @table @kbd
9427
9428 @item C-c C-s C-n
9429 @kindex C-c C-s C-n (Summary)
9430 @findex gnus-summary-sort-by-number
9431 Sort by article number (@code{gnus-summary-sort-by-number}).
9432
9433 @item C-c C-s C-a
9434 @kindex C-c C-s C-a (Summary)
9435 @findex gnus-summary-sort-by-author
9436 Sort by author (@code{gnus-summary-sort-by-author}).
9437
9438 @item C-c C-s C-s
9439 @kindex C-c C-s C-s (Summary)
9440 @findex gnus-summary-sort-by-subject
9441 Sort by subject (@code{gnus-summary-sort-by-subject}).
9442
9443 @item C-c C-s C-d
9444 @kindex C-c C-s C-d (Summary)
9445 @findex gnus-summary-sort-by-date
9446 Sort by date (@code{gnus-summary-sort-by-date}).
9447
9448 @item C-c C-s C-l
9449 @kindex C-c C-s C-l (Summary)
9450 @findex gnus-summary-sort-by-lines
9451 Sort by lines (@code{gnus-summary-sort-by-lines}).
9452
9453 @item C-c C-s C-c
9454 @kindex C-c C-s C-c (Summary)
9455 @findex gnus-summary-sort-by-chars
9456 Sort by article length (@code{gnus-summary-sort-by-chars}).
9457
9458 @item C-c C-s C-i
9459 @kindex C-c C-s C-i (Summary)
9460 @findex gnus-summary-sort-by-score
9461 Sort by score (@code{gnus-summary-sort-by-score}).
9462
9463 @item C-c C-s C-r
9464 @kindex C-c C-s C-r (Summary)
9465 @findex gnus-summary-sort-by-random
9466 Randomize (@code{gnus-summary-sort-by-random}).
9467
9468 @item C-c C-s C-o
9469 @kindex C-c C-s C-o (Summary)
9470 @findex gnus-summary-sort-by-original
9471 Sort using the default sorting method
9472 (@code{gnus-summary-sort-by-original}).
9473 @end table
9474
9475 These functions will work both when you use threading and when you don't
9476 use threading.  In the latter case, all summary lines will be sorted,
9477 line by line.  In the former case, sorting will be done on a
9478 root-by-root basis, which might not be what you were looking for.  To
9479 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9480 Commands}).
9481
9482
9483 @node Finding the Parent
9484 @section Finding the Parent
9485 @cindex parent articles
9486 @cindex referring articles
9487
9488 @table @kbd
9489 @item ^
9490 @kindex ^ (Summary)
9491 @findex gnus-summary-refer-parent-article
9492 If you'd like to read the parent of the current article, and it is not
9493 displayed in the summary buffer, you might still be able to.  That is,
9494 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
9495 and the @code{References} in the current article are not mangled, you
9496 can just press @kbd{^} or @kbd{A r}
9497 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9498 you'll get the parent.  If the parent is already displayed in the
9499 summary buffer, point will just move to this article.
9500
9501 If given a positive numerical prefix, fetch that many articles back into
9502 the ancestry.  If given a negative numerical prefix, fetch just that
9503 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
9504 grandparent and the grandgrandparent of the current article.  If you say
9505 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
9506 article.
9507
9508 @item A R (Summary)
9509 @findex gnus-summary-refer-references
9510 @kindex A R (Summary)
9511 Fetch all articles mentioned in the @code{References} header of the
9512 article (@code{gnus-summary-refer-references}).
9513
9514 @item A T (Summary)
9515 @findex gnus-summary-refer-thread
9516 @kindex A T (Summary)
9517 Display the full thread where the current article appears
9518 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9519 headers in the current group to work, so it usually takes a while.  If
9520 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9521 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9522 visible effects normally, but it'll make this command work a whole lot
9523 faster.  Of course, it'll make group entry somewhat slow.
9524
9525 @vindex gnus-refer-thread-limit
9526 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9527 articles before the first displayed in the current group) headers to
9528 fetch when doing this command.  The default is 200.  If @code{t}, all
9529 the available headers will be fetched.  This variable can be overridden
9530 by giving the @kbd{A T} command a numerical prefix.
9531
9532 @item M-^ (Summary)
9533 @findex gnus-summary-refer-article
9534 @kindex M-^ (Summary)
9535 @cindex Message-ID
9536 @cindex fetching by Message-ID
9537 You can also ask the @acronym{NNTP} server for an arbitrary article, no
9538 matter what group it belongs to.  @kbd{M-^}
9539 (@code{gnus-summary-refer-article}) will ask you for a
9540 @code{Message-ID}, which is one of those long, hard-to-read thingies
9541 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9542 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9543 @end table
9544
9545 The current select method will be used when fetching by
9546 @code{Message-ID} from non-news select method, but you can override this
9547 by giving this command a prefix.
9548
9549 @vindex gnus-refer-article-method
9550 If the group you are reading is located on a back end that does not
9551 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9552 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
9553 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
9554 updating the spool you are reading from, but that's not really
9555 necessary.
9556
9557 It can also be a list of select methods, as well as the special symbol
9558 @code{current}, which means to use the current select method.  If it
9559 is a list, Gnus will try all the methods in the list until it finds a
9560 match.
9561
9562 Here's an example setting that will first try the current method, and
9563 then ask Google if that fails:
9564
9565 @lisp
9566 (setq gnus-refer-article-method
9567       '(current
9568         (nnweb "google" (nnweb-type google))))
9569 @end lisp
9570
9571 Most of the mail back ends support fetching by @code{Message-ID}, but
9572 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9573 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9574 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9575 only able to locate articles that have been posted to the current group.
9576 (Anything else would be too time consuming.)  @code{nnmh} does not
9577 support this at all.
9578
9579
9580 @node Alternative Approaches
9581 @section Alternative Approaches
9582
9583 Different people like to read news using different methods.  This being
9584 Gnus, we offer a small selection of minor modes for the summary buffers.
9585
9586 @menu
9587 * Pick and Read::               First mark articles and then read them.
9588 * Binary Groups::               Auto-decode all articles.
9589 @end menu
9590
9591
9592 @node Pick and Read
9593 @subsection Pick and Read
9594 @cindex pick and read
9595
9596 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9597 a two-phased reading interface.  The user first marks in a summary
9598 buffer the articles she wants to read.  Then she starts reading the
9599 articles with just an article buffer displayed.
9600
9601 @findex gnus-pick-mode
9602 @kindex M-x gnus-pick-mode
9603 Gnus provides a summary buffer minor mode that allows
9604 this---@code{gnus-pick-mode}.  This basically means that a few process
9605 mark commands become one-keystroke commands to allow easy marking, and
9606 it provides one additional command for switching to the summary buffer.
9607
9608 Here are the available keystrokes when using pick mode:
9609
9610 @table @kbd
9611 @item .
9612 @kindex . (Pick)
9613 @findex gnus-pick-article-or-thread
9614 Pick the article or thread on the current line
9615 (@code{gnus-pick-article-or-thread}).  If the variable
9616 @code{gnus-thread-hide-subtree} is true, then this key selects the
9617 entire thread when used at the first article of the thread.  Otherwise,
9618 it selects just the article.  If given a numerical prefix, go to that
9619 thread or article and pick it.  (The line number is normally displayed
9620 at the beginning of the summary pick lines.)
9621
9622 @item SPACE
9623 @kindex SPACE (Pick)
9624 @findex gnus-pick-next-page
9625 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9626 at the end of the buffer, start reading the picked articles.
9627
9628 @item u
9629 @kindex u (Pick)
9630 @findex gnus-pick-unmark-article-or-thread.
9631 Unpick the thread or article
9632 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9633 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9634 thread if used at the first article of the thread.  Otherwise it unpicks
9635 just the article.  You can give this key a numerical prefix to unpick
9636 the thread or article at that line.
9637
9638 @item RET
9639 @kindex RET (Pick)
9640 @findex gnus-pick-start-reading
9641 @vindex gnus-pick-display-summary
9642 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9643 given a prefix, mark all unpicked articles as read first.  If
9644 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9645 will still be visible when you are reading.
9646
9647 @end table
9648
9649 All the normal summary mode commands are still available in the
9650 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9651 which is mapped to the same function
9652 @code{gnus-summary-tick-article-forward}.
9653
9654 If this sounds like a good idea to you, you could say:
9655
9656 @lisp
9657 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9658 @end lisp
9659
9660 @vindex gnus-pick-mode-hook
9661 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9662
9663 @vindex gnus-mark-unpicked-articles-as-read
9664 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9665 all unpicked articles as read.  The default is @code{nil}.
9666
9667 @vindex gnus-summary-pick-line-format
9668 The summary line format in pick mode is slightly different from the
9669 standard format.  At the beginning of each line the line number is
9670 displayed.  The pick mode line format is controlled by the
9671 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9672 Variables}).  It accepts the same format specs that
9673 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9674
9675
9676 @node Binary Groups
9677 @subsection Binary Groups
9678 @cindex binary groups
9679
9680 @findex gnus-binary-mode
9681 @kindex M-x gnus-binary-mode
9682 If you spend much time in binary groups, you may grow tired of hitting
9683 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9684 is a minor mode for summary buffers that makes all ordinary Gnus article
9685 selection functions uudecode series of articles and display the result
9686 instead of just displaying the articles the normal way.
9687
9688 @kindex g (Binary)
9689 @findex gnus-binary-show-article
9690 The only way, in fact, to see the actual articles is the @kbd{g}
9691 command, when you have turned on this mode
9692 (@code{gnus-binary-show-article}).
9693
9694 @vindex gnus-binary-mode-hook
9695 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9696
9697
9698 @node Tree Display
9699 @section Tree Display
9700 @cindex trees
9701
9702 @vindex gnus-use-trees
9703 If you don't like the normal Gnus summary display, you might try setting
9704 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9705 additional @dfn{tree buffer}.  You can execute all summary mode commands
9706 in the tree buffer.
9707
9708 There are a few variables to customize the tree display, of course:
9709
9710 @table @code
9711 @item gnus-tree-mode-hook
9712 @vindex gnus-tree-mode-hook
9713 A hook called in all tree mode buffers.
9714
9715 @item gnus-tree-mode-line-format
9716 @vindex gnus-tree-mode-line-format
9717 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9718 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9719 of valid specs, @pxref{Summary Buffer Mode Line}.
9720
9721 @item gnus-selected-tree-face
9722 @vindex gnus-selected-tree-face
9723 Face used for highlighting the selected article in the tree buffer.  The
9724 default is @code{modeline}.
9725
9726 @item gnus-tree-line-format
9727 @vindex gnus-tree-line-format
9728 A format string for the tree nodes.  The name is a bit of a misnomer,
9729 though---it doesn't define a line, but just the node.  The default value
9730 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9731 the name of the poster.  It is vital that all nodes are of the same
9732 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9733
9734 Valid specs are:
9735
9736 @table @samp
9737 @item n
9738 The name of the poster.
9739 @item f
9740 The @code{From} header.
9741 @item N
9742 The number of the article.
9743 @item [
9744 The opening bracket.
9745 @item ]
9746 The closing bracket.
9747 @item s
9748 The subject.
9749 @end table
9750
9751 @xref{Formatting Variables}.
9752
9753 Variables related to the display are:
9754
9755 @table @code
9756 @item gnus-tree-brackets
9757 @vindex gnus-tree-brackets
9758 This is used for differentiating between ``real'' articles and
9759 ``sparse'' articles.  The format is @code{((@var{real-open} . @var{real-close})
9760 (@var{sparse-open} . @var{sparse-close}) (@var{dummy-open} . @var{dummy-close}))}, and the
9761 default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9762
9763 @item gnus-tree-parent-child-edges
9764 @vindex gnus-tree-parent-child-edges
9765 This is a list that contains the characters used for connecting parent
9766 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9767
9768 @end table
9769
9770 @item gnus-tree-minimize-window
9771 @vindex gnus-tree-minimize-window
9772 If this variable is non-@code{nil}, Gnus will try to keep the tree
9773 buffer as small as possible to allow more room for the other Gnus
9774 windows.  If this variable is a number, the tree buffer will never be
9775 higher than that number.  The default is @code{t}.  Note that if you
9776 have several windows displayed side-by-side in a frame and the tree
9777 buffer is one of these, minimizing the tree window will also resize all
9778 other windows displayed next to it.
9779
9780 You may also wish to add the following hook to keep the window minimized
9781 at all times:
9782
9783 @lisp
9784 (add-hook 'gnus-configure-windows-hook
9785           'gnus-tree-perhaps-minimize)
9786 @end lisp
9787
9788 @item gnus-generate-tree-function
9789 @vindex gnus-generate-tree-function
9790 @findex gnus-generate-horizontal-tree
9791 @findex gnus-generate-vertical-tree
9792 The function that actually generates the thread tree.  Two predefined
9793 functions are available: @code{gnus-generate-horizontal-tree} and
9794 @code{gnus-generate-vertical-tree} (which is the default).
9795
9796 @end table
9797
9798 Here's an example from a horizontal tree buffer:
9799
9800 @example
9801 @{***@}-(***)-[odd]-[Gun]
9802      |      \[Jan]
9803      |      \[odd]-[Eri]
9804      |      \(***)-[Eri]
9805      |            \[odd]-[Paa]
9806      \[Bjo]
9807      \[Gun]
9808      \[Gun]-[Jor]
9809 @end example
9810
9811 Here's the same thread displayed in a vertical tree buffer:
9812
9813 @example
9814 @{***@}
9815   |--------------------------\-----\-----\
9816 (***)                         [Bjo] [Gun] [Gun]
9817   |--\-----\-----\                          |
9818 [odd] [Jan] [odd] (***)                   [Jor]
9819   |           |     |--\
9820 [Gun]       [Eri] [Eri] [odd]
9821                           |
9822                         [Paa]
9823 @end example
9824
9825 If you're using horizontal trees, it might be nice to display the trees
9826 side-by-side with the summary buffer.  You could add something like the
9827 following to your @file{~/.gnus.el} file:
9828
9829 @lisp
9830 (setq gnus-use-trees t
9831       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9832       gnus-tree-minimize-window nil)
9833 (gnus-add-configuration
9834  '(article
9835    (vertical 1.0
9836              (horizontal 0.25
9837                          (summary 0.75 point)
9838                          (tree 1.0))
9839              (article 1.0))))
9840 @end lisp
9841
9842 @xref{Window Layout}.
9843
9844
9845 @node Mail Group Commands
9846 @section Mail Group Commands
9847 @cindex mail group commands
9848
9849 Some commands only make sense in mail groups.  If these commands are
9850 invalid in the current group, they will raise a hell and let you know.
9851
9852 All these commands (except the expiry and edit commands) use the
9853 process/prefix convention (@pxref{Process/Prefix}).
9854
9855 @table @kbd
9856
9857 @item B e
9858 @kindex B e (Summary)
9859 @findex gnus-summary-expire-articles
9860 Run all expirable articles in the current group through the expiry
9861 process (@code{gnus-summary-expire-articles}).  That is, delete all
9862 expirable articles in the group that have been around for a while.
9863 (@pxref{Expiring Mail}).
9864
9865 @item B C-M-e
9866 @kindex B C-M-e (Summary)
9867 @findex gnus-summary-expire-articles-now
9868 Delete all the expirable articles in the group
9869 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9870 articles eligible for expiry in the current group will
9871 disappear forever into that big @file{/dev/null} in the sky.
9872
9873 @item B DEL
9874 @kindex B DEL (Summary)
9875 @findex gnus-summary-delete-article
9876 @c @icon{gnus-summary-mail-delete}
9877 Delete the mail article.  This is ``delete'' as in ``delete it from your
9878 disk forever and ever, never to return again.'' Use with caution.
9879 (@code{gnus-summary-delete-article}).
9880
9881 @item B m
9882 @kindex B m (Summary)
9883 @cindex move mail
9884 @findex gnus-summary-move-article
9885 @vindex gnus-preserve-marks
9886 Move the article from one mail group to another
9887 (@code{gnus-summary-move-article}).  Marks will be preserved if
9888 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9889
9890 @item B c
9891 @kindex B c (Summary)
9892 @cindex copy mail
9893 @findex gnus-summary-copy-article
9894 @c @icon{gnus-summary-mail-copy}
9895 Copy the article from one group (mail group or not) to a mail group
9896 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9897 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9898
9899 @item B B
9900 @kindex B B (Summary)
9901 @cindex crosspost mail
9902 @findex gnus-summary-crosspost-article
9903 Crosspost the current article to some other group
9904 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9905 the article in the other group, and the Xref headers of the article will
9906 be properly updated.
9907
9908 @item B i
9909 @kindex B i (Summary)
9910 @findex gnus-summary-import-article
9911 Import an arbitrary file into the current mail newsgroup
9912 (@code{gnus-summary-import-article}).  You will be prompted for a file
9913 name, a @code{From} header and a @code{Subject} header.
9914
9915 @item B I
9916 @kindex B I (Summary)
9917 @findex gnus-summary-create-article
9918 Create an empty article in the current mail newsgroups
9919 (@code{gnus-summary-create-article}).  You will be prompted for a
9920 @code{From} header and a @code{Subject} header.
9921
9922 @item B r
9923 @kindex B r (Summary)
9924 @findex gnus-summary-respool-article
9925 @vindex gnus-summary-respool-default-method
9926 Respool the mail article (@code{gnus-summary-respool-article}).
9927 @code{gnus-summary-respool-default-method} will be used as the default
9928 select method when respooling.  This variable is @code{nil} by default,
9929 which means that the current group select method will be used instead.
9930 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9931 (which is the default).
9932
9933 @item B w
9934 @itemx e
9935 @kindex B w (Summary)
9936 @kindex e (Summary)
9937 @findex gnus-summary-edit-article
9938 @kindex C-c C-c (Article)
9939 @findex gnus-summary-edit-article-done
9940 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9941 editing and make the changes permanent, type @kbd{C-c C-c}
9942 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9943 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
9944
9945 @item B q
9946 @kindex B q (Summary)
9947 @findex gnus-summary-respool-query
9948 If you want to re-spool an article, you might be curious as to what group
9949 the article will end up in before you do the re-spooling.  This command
9950 will tell you (@code{gnus-summary-respool-query}).
9951
9952 @item B t
9953 @kindex B t (Summary)
9954 @findex gnus-summary-respool-trace
9955 Similarly, this command will display all fancy splitting patterns used
9956 when respooling, if any (@code{gnus-summary-respool-trace}).
9957
9958 @item B p
9959 @kindex B p (Summary)
9960 @findex gnus-summary-article-posted-p
9961 Some people have a tendency to send you ``courtesy'' copies when they
9962 follow up to articles you have posted.  These usually have a
9963 @code{Newsgroups} header in them, but not always.  This command
9964 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9965 article from your news server (or rather, from
9966 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9967 report back whether it found the article or not.  Even if it says that
9968 it didn't find the article, it may have been posted anyway---mail
9969 propagation is much faster than news propagation, and the news copy may
9970 just not have arrived yet.
9971
9972 @item K E
9973 @kindex K E (Summary)
9974 @findex gnus-article-encrypt-body
9975 @vindex gnus-article-encrypt-protocol
9976 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
9977 The body is encrypted with the encryption protocol specified by the
9978 variable @code{gnus-article-encrypt-protocol}.
9979
9980 @end table
9981
9982 @vindex gnus-move-split-methods
9983 @cindex moving articles
9984 If you move (or copy) articles regularly, you might wish to have Gnus
9985 suggest where to put the articles.  @code{gnus-move-split-methods} is a
9986 variable that uses the same syntax as @code{gnus-split-methods}
9987 (@pxref{Saving Articles}).  You may customize that variable to create
9988 suggestions you find reasonable.  (Note that
9989 @code{gnus-move-split-methods} uses group names where
9990 @code{gnus-split-methods} uses file names.)
9991
9992 @lisp
9993 (setq gnus-move-split-methods
9994       '(("^From:.*Lars Magne" "nnml:junk")
9995         ("^Subject:.*gnus" "nnfolder:important")
9996         (".*" "nnml:misc")))
9997 @end lisp
9998
9999
10000 @node Various Summary Stuff
10001 @section Various Summary Stuff
10002
10003 @menu
10004 * Summary Group Information::   Information oriented commands.
10005 * Searching for Articles::      Multiple article commands.
10006 * Summary Generation Commands::  
10007 * Really Various Summary Commands::  Those pesky non-conformant commands.
10008 @end menu
10009
10010 @table @code
10011 @vindex gnus-summary-display-while-building
10012 @item gnus-summary-display-while-building
10013 If non-@code{nil}, show and update the summary buffer as it's being
10014 built.  If @code{t}, update the buffer after every line is inserted.
10015 If the value is an integer, @var{n}, update the display every @var{n}
10016 lines.  The default is @code{nil}.
10017
10018 @vindex gnus-summary-mode-hook
10019 @item gnus-summary-mode-hook
10020 This hook is called when creating a summary mode buffer.
10021
10022 @vindex gnus-summary-generate-hook
10023 @item gnus-summary-generate-hook
10024 This is called as the last thing before doing the threading and the
10025 generation of the summary buffer.  It's quite convenient for customizing
10026 the threading variables based on what data the newsgroup has.  This hook
10027 is called from the summary buffer after most summary buffer variables
10028 have been set.
10029
10030 @vindex gnus-summary-prepare-hook
10031 @item gnus-summary-prepare-hook
10032 It is called after the summary buffer has been generated.  You might use
10033 it to, for instance, highlight lines or modify the look of the buffer in
10034 some other ungodly manner.  I don't care.
10035
10036 @vindex gnus-summary-prepared-hook
10037 @item gnus-summary-prepared-hook
10038 A hook called as the very last thing after the summary buffer has been
10039 generated.
10040
10041 @vindex gnus-summary-ignore-duplicates
10042 @item gnus-summary-ignore-duplicates
10043 When Gnus discovers two articles that have the same @code{Message-ID},
10044 it has to do something drastic.  No articles are allowed to have the
10045 same @code{Message-ID}, but this may happen when reading mail from some
10046 sources.  Gnus allows you to customize what happens with this variable.
10047 If it is @code{nil} (which is the default), Gnus will rename the
10048 @code{Message-ID} (for display purposes only) and display the article as
10049 any other article.  If this variable is @code{t}, it won't display the
10050 article---it'll be as if it never existed.
10051
10052 @vindex gnus-alter-articles-to-read-function
10053 @item gnus-alter-articles-to-read-function
10054 This function, which takes two parameters (the group name and the list
10055 of articles to be selected), is called to allow the user to alter the
10056 list of articles to be selected.
10057
10058 For instance, the following function adds the list of cached articles to
10059 the list in one particular group:
10060
10061 @lisp
10062 (defun my-add-cached-articles (group articles)
10063   (if (string= group "some.group")
10064       (append gnus-newsgroup-cached articles)
10065     articles))
10066 @end lisp
10067
10068 @vindex gnus-newsgroup-variables
10069 @item gnus-newsgroup-variables
10070 A list of newsgroup (summary buffer) local variables, or cons of
10071 variables and their default values (when the default values are not
10072 @code{nil}), that should be made global while the summary buffer is
10073 active.  These variables can be used to set variables in the group
10074 parameters while still allowing them to affect operations done in
10075 other buffers. For example:
10076
10077 @lisp
10078 (setq gnus-newsgroup-variables
10079      '(message-use-followup-to
10080        (gnus-visible-headers .
10081          "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10082 @end lisp
10083
10084 @end table
10085
10086
10087 @node Summary Group Information
10088 @subsection Summary Group Information
10089
10090 @table @kbd
10091
10092 @item H f
10093 @kindex H f (Summary)
10094 @findex gnus-summary-fetch-faq
10095 @vindex gnus-group-faq-directory
10096 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10097 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
10098 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10099 is usually a directory on a remote machine.  This variable can also be
10100 a list of directories.  In that case, giving a prefix to this command
10101 will allow you to choose between the various sites.  @code{ange-ftp}
10102 or @code{efs} will probably be used for fetching the file.
10103
10104 @item H d
10105 @kindex H d (Summary)
10106 @findex gnus-summary-describe-group
10107 Give a brief description of the current group
10108 (@code{gnus-summary-describe-group}).  If given a prefix, force
10109 rereading the description from the server.
10110
10111 @item H h
10112 @kindex H h (Summary)
10113 @findex gnus-summary-describe-briefly
10114 Give an extremely brief description of the most important summary
10115 keystrokes (@code{gnus-summary-describe-briefly}).
10116
10117 @item H i
10118 @kindex H i (Summary)
10119 @findex gnus-info-find-node
10120 Go to the Gnus info node (@code{gnus-info-find-node}).
10121 @end table
10122
10123
10124 @node Searching for Articles
10125 @subsection Searching for Articles
10126
10127 @table @kbd
10128
10129 @item M-s
10130 @kindex M-s (Summary)
10131 @findex gnus-summary-search-article-forward
10132 Search through all subsequent (raw) articles for a regexp
10133 (@code{gnus-summary-search-article-forward}).
10134
10135 @item M-r
10136 @kindex M-r (Summary)
10137 @findex gnus-summary-search-article-backward
10138 Search through all previous (raw) articles for a regexp
10139 (@code{gnus-summary-search-article-backward}).
10140
10141 @item &
10142 @kindex & (Summary)
10143 @findex gnus-summary-execute-command
10144 This command will prompt you for a header, a regular expression to match
10145 on this field, and a command to be executed if the match is made
10146 (@code{gnus-summary-execute-command}).  If the header is an empty
10147 string, the match is done on the entire article.  If given a prefix,
10148 search backward instead.
10149
10150 For instance, @kbd{& RET some.*string #} will put the process mark on
10151 all articles that have heads or bodies that match @samp{some.*string}.
10152
10153 @item M-&
10154 @kindex M-& (Summary)
10155 @findex gnus-summary-universal-argument
10156 Perform any operation on all articles that have been marked with
10157 the process mark (@code{gnus-summary-universal-argument}).
10158 @end table
10159
10160 @node Summary Generation Commands
10161 @subsection Summary Generation Commands
10162
10163 @table @kbd
10164
10165 @item Y g
10166 @kindex Y g (Summary)
10167 @findex gnus-summary-prepare
10168 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10169
10170 @item Y c
10171 @kindex Y c (Summary)
10172 @findex gnus-summary-insert-cached-articles
10173 Pull all cached articles (for the current group) into the summary buffer
10174 (@code{gnus-summary-insert-cached-articles}).
10175
10176 @item Y d
10177 @kindex Y d (Summary)
10178 @findex gnus-summary-insert-dormant-articles
10179 Pull all dormant articles (for the current group) into the summary buffer
10180 (@code{gnus-summary-insert-dormant-articles}).
10181
10182 @end table
10183
10184
10185 @node Really Various Summary Commands
10186 @subsection Really Various Summary Commands
10187
10188 @table @kbd
10189
10190 @item A D
10191 @itemx C-d
10192 @kindex C-d (Summary)
10193 @kindex A D (Summary)
10194 @findex gnus-summary-enter-digest-group
10195 If the current article is a collection of other articles (for instance,
10196 a digest), you might use this command to enter a group based on the that
10197 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10198 guess what article type is currently displayed unless you give a prefix
10199 to this command, which forces a ``digest'' interpretation.  Basically,
10200 whenever you see a message that is a collection of other messages of
10201 some format, you @kbd{C-d} and read these messages in a more convenient
10202 fashion.
10203
10204 @item C-M-d
10205 @kindex C-M-d (Summary)
10206 @findex gnus-summary-read-document
10207 This command is very similar to the one above, but lets you gather
10208 several documents into one biiig group
10209 (@code{gnus-summary-read-document}).  It does this by opening several
10210 @code{nndoc} groups for each document, and then opening an
10211 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10212 command understands the process/prefix convention
10213 (@pxref{Process/Prefix}).
10214
10215 @item C-t
10216 @kindex C-t (Summary)
10217 @findex gnus-summary-toggle-truncation
10218 Toggle truncation of summary lines
10219 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10220 line centering function in the summary buffer, so it's not a good idea
10221 to have truncation switched off while reading articles.
10222
10223 @item =
10224 @kindex = (Summary)
10225 @findex gnus-summary-expand-window
10226 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10227 If given a prefix, force an @code{article} window configuration.
10228
10229 @item C-M-e
10230 @kindex C-M-e (Summary)
10231 @findex gnus-summary-edit-parameters
10232 Edit the group parameters (@pxref{Group Parameters}) of the current
10233 group (@code{gnus-summary-edit-parameters}).
10234
10235 @item C-M-a
10236 @kindex C-M-a (Summary)
10237 @findex gnus-summary-customize-parameters
10238 Customize the group parameters (@pxref{Group Parameters}) of the current
10239 group (@code{gnus-summary-customize-parameters}).
10240
10241 @end table
10242
10243
10244 @node Exiting the Summary Buffer
10245 @section Exiting the Summary Buffer
10246 @cindex summary exit
10247 @cindex exiting groups
10248
10249 Exiting from the summary buffer will normally update all info on the
10250 group and return you to the group buffer.
10251
10252 @table @kbd
10253
10254 @item Z Z
10255 @itemx q
10256 @kindex Z Z (Summary)
10257 @kindex q (Summary)
10258 @findex gnus-summary-exit
10259 @vindex gnus-summary-exit-hook
10260 @vindex gnus-summary-prepare-exit-hook
10261 @vindex gnus-group-no-more-groups-hook
10262 @c @icon{gnus-summary-exit}
10263 Exit the current group and update all information on the group
10264 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10265 called before doing much of the exiting, which calls
10266 @code{gnus-summary-expire-articles} by default.
10267 @code{gnus-summary-exit-hook} is called after finishing the exit
10268 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10269 group mode having no more (unread) groups.
10270
10271 @item Z E
10272 @itemx Q
10273 @kindex Z E (Summary)
10274 @kindex Q (Summary)
10275 @findex gnus-summary-exit-no-update
10276 Exit the current group without updating any information on the group
10277 (@code{gnus-summary-exit-no-update}).
10278
10279 @item Z c
10280 @itemx c
10281 @kindex Z c (Summary)
10282 @kindex c (Summary)
10283 @findex gnus-summary-catchup-and-exit
10284 @c @icon{gnus-summary-catchup-and-exit}
10285 Mark all unticked articles in the group as read and then exit
10286 (@code{gnus-summary-catchup-and-exit}).
10287
10288 @item Z C
10289 @kindex Z C (Summary)
10290 @findex gnus-summary-catchup-all-and-exit
10291 Mark all articles, even the ticked ones, as read and then exit
10292 (@code{gnus-summary-catchup-all-and-exit}).
10293
10294 @item Z n
10295 @kindex Z n (Summary)
10296 @findex gnus-summary-catchup-and-goto-next-group
10297 Mark all articles as read and go to the next group
10298 (@code{gnus-summary-catchup-and-goto-next-group}).
10299
10300 @item Z R
10301 @kindex Z R (Summary)
10302 @findex gnus-summary-reselect-current-group
10303 Exit this group, and then enter it again
10304 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10305 all articles, both read and unread.
10306
10307 @item Z G
10308 @itemx M-g
10309 @kindex Z G (Summary)
10310 @kindex M-g (Summary)
10311 @findex gnus-summary-rescan-group
10312 @c @icon{gnus-summary-mail-get}
10313 Exit the group, check for new articles in the group, and select the
10314 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10315 articles, both read and unread.
10316
10317 @item Z N
10318 @kindex Z N (Summary)
10319 @findex gnus-summary-next-group
10320 Exit the group and go to the next group
10321 (@code{gnus-summary-next-group}).
10322
10323 @item Z P
10324 @kindex Z P (Summary)
10325 @findex gnus-summary-prev-group
10326 Exit the group and go to the previous group
10327 (@code{gnus-summary-prev-group}).
10328
10329 @item Z s
10330 @kindex Z s (Summary)
10331 @findex gnus-summary-save-newsrc
10332 Save the current number of read/marked articles in the dribble buffer
10333 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10334 given a prefix, also save the @file{.newsrc} file(s).  Using this
10335 command will make exit without updating (the @kbd{Q} command) worthless.
10336 @end table
10337
10338 @vindex gnus-exit-group-hook
10339 @code{gnus-exit-group-hook} is called when you exit the current group
10340 with an ``updating'' exit.  For instance @kbd{Q}
10341 (@code{gnus-summary-exit-no-update}) does not call this hook.
10342
10343 @findex gnus-summary-wake-up-the-dead
10344 @findex gnus-dead-summary-mode
10345 @vindex gnus-kill-summary-on-exit
10346 If you're in the habit of exiting groups, and then changing your mind
10347 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10348 If you do that, Gnus won't kill the summary buffer when you exit it.
10349 (Quelle surprise!)  Instead it will change the name of the buffer to
10350 something like @samp{*Dead Summary ... *} and install a minor mode
10351 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10352 buffer, you'll find that all keys are mapped to a function called
10353 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10354 summary buffer will result in a live, normal summary buffer.
10355
10356 There will never be more than one dead summary buffer at any one time.
10357
10358 @vindex gnus-use-cross-reference
10359 The data on the current group will be updated (which articles you have
10360 read, which articles you have replied to, etc.) when you exit the
10361 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10362 @code{t} (which is the default), articles that are cross-referenced to
10363 this group and are marked as read, will also be marked as read in the
10364 other subscribed groups they were cross-posted to.  If this variable is
10365 neither @code{nil} nor @code{t}, the article will be marked as read in
10366 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10367
10368
10369 @node Crosspost Handling
10370 @section Crosspost Handling
10371
10372 @cindex velveeta
10373 @cindex spamming
10374 Marking cross-posted articles as read ensures that you'll never have to
10375 read the same article more than once.  Unless, of course, somebody has
10376 posted it to several groups separately.  Posting the same article to
10377 several groups (not cross-posting) is called @dfn{spamming}, and you are
10378 by law required to send nasty-grams to anyone who perpetrates such a
10379 heinous crime.  You may want to try NoCeM handling to filter out spam
10380 (@pxref{NoCeM}).
10381
10382 Remember: Cross-posting is kinda ok, but posting the same article
10383 separately to several groups is not.  Massive cross-posting (aka.
10384 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10385 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10386 excessive crossposting (@pxref{Summary Mail Commands}).
10387
10388 @cindex cross-posting
10389 @cindex Xref
10390 @cindex @acronym{NOV}
10391 One thing that may cause Gnus to not do the cross-posting thing
10392 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
10393 (which is very nice, because it speeds things up considerably) which
10394 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
10395 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10396 even with @sc{xover} by registering the @code{Xref} lines of all
10397 articles you actually read, but if you kill the articles, or just mark
10398 them as read without reading them, Gnus will not get a chance to snoop
10399 the @code{Xref} lines out of these articles, and will be unable to use
10400 the cross reference mechanism.
10401
10402 @cindex LIST overview.fmt
10403 @cindex overview.fmt
10404 To check whether your @acronym{NNTP} server includes the @code{Xref} header
10405 in its overview files, try @samp{telnet your.nntp.server nntp},
10406 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10407 overview.fmt}.  This may not work, but if it does, and the last line you
10408 get does not read @samp{Xref:full}, then you should shout and whine at
10409 your news admin until she includes the @code{Xref} header in the
10410 overview files.
10411
10412 @vindex gnus-nov-is-evil
10413 If you want Gnus to get the @code{Xref}s right all the time, you have to
10414 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10415 considerably.
10416
10417 C'est la vie.
10418
10419 For an alternative approach, @pxref{Duplicate Suppression}.
10420
10421
10422 @node Duplicate Suppression
10423 @section Duplicate Suppression
10424
10425 By default, Gnus tries to make sure that you don't have to read the same
10426 article more than once by utilizing the crossposting mechanism
10427 (@pxref{Crosspost Handling}).  However, that simple and efficient
10428 approach may not work satisfactory for some users for various
10429 reasons.
10430
10431 @enumerate
10432 @item
10433 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
10434 is evil and not very common.
10435
10436 @item
10437 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
10438 @file{.overview} data bases.  This is evil and all too common, alas.
10439
10440 @item
10441 You may be reading the same group (or several related groups) from
10442 different @acronym{NNTP} servers.
10443
10444 @item
10445 You may be getting mail that duplicates articles posted to groups.
10446 @end enumerate
10447
10448 I'm sure there are other situations where @code{Xref} handling fails as
10449 well, but these four are the most common situations.
10450
10451 If, and only if, @code{Xref} handling fails for you, then you may
10452 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10453 will remember the @code{Message-ID}s of all articles you have read or
10454 otherwise marked as read, and then, as if by magic, mark them as read
10455 all subsequent times you see them---in @emph{all} groups.  Using this
10456 mechanism is quite likely to be somewhat inefficient, but not overly
10457 so.  It's certainly preferable to reading the same articles more than
10458 once.
10459
10460 Duplicate suppression is not a very subtle instrument.  It's more like a
10461 sledge hammer than anything else.  It works in a very simple
10462 fashion---if you have marked an article as read, it adds this Message-ID
10463 to a cache.  The next time it sees this Message-ID, it will mark the
10464 article as read with the @samp{M} mark.  It doesn't care what group it
10465 saw the article in.
10466
10467 @table @code
10468 @item gnus-suppress-duplicates
10469 @vindex gnus-suppress-duplicates
10470 If non-@code{nil}, suppress duplicates.
10471
10472 @item gnus-save-duplicate-list
10473 @vindex gnus-save-duplicate-list
10474 If non-@code{nil}, save the list of duplicates to a file.  This will
10475 make startup and shutdown take longer, so the default is @code{nil}.
10476 However, this means that only duplicate articles read in a single Gnus
10477 session are suppressed.
10478
10479 @item gnus-duplicate-list-length
10480 @vindex gnus-duplicate-list-length
10481 This variable says how many @code{Message-ID}s to keep in the duplicate
10482 suppression list.  The default is 10000.
10483
10484 @item gnus-duplicate-file
10485 @vindex gnus-duplicate-file
10486 The name of the file to store the duplicate suppression list in.  The
10487 default is @file{~/News/suppression}.
10488 @end table
10489
10490 If you have a tendency to stop and start Gnus often, setting
10491 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10492 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
10493 the other hand, saving the list makes startup and shutdown much slower,
10494 so that means that if you stop and start Gnus often, you should set
10495 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10496 to you to figure out, I think.
10497
10498 @node Security
10499 @section Security
10500
10501 Gnus is able to verify signed messages or decrypt encrypted messages.
10502 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
10503 and @acronym{S/MIME}, however you need some external programs to get
10504 things to work:
10505
10506 @enumerate
10507 @item
10508 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
10509 install an OpenPGP implementation such as GnuPG.  The lisp interface
10510 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
10511 Manual}), but Mailcrypt and gpg.el are also supported.
10512
10513 @item
10514 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
10515 or newer is recommended.
10516
10517 @end enumerate
10518
10519 More information on how to set things up can be found in the message
10520 manual (@pxref{Security, ,Security, message, Message Manual}).
10521
10522 @table @code
10523 @item mm-verify-option
10524 @vindex mm-verify-option
10525 Option of verifying signed parts.  @code{never}, not verify;
10526 @code{always}, always verify; @code{known}, only verify known
10527 protocols. Otherwise, ask user.
10528
10529 @item mm-decrypt-option
10530 @vindex mm-decrypt-option
10531 Option of decrypting encrypted parts.  @code{never}, no decryption;
10532 @code{always}, always decrypt; @code{known}, only decrypt known
10533 protocols. Otherwise, ask user.
10534
10535 @item mml1991-use
10536 @vindex mml1991-use
10537 Symbol indicating elisp interface to OpenPGP implementation for
10538 @acronym{PGP} messages.  The default is @code{pgg}, but
10539 @code{mailcrypt} and @code{gpg} are also supported although
10540 deprecated.
10541
10542 @item mml2015-use
10543 @vindex mml2015-use
10544 Symbol indicating elisp interface to OpenPGP implementation for
10545 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
10546 @code{mailcrypt} and @code{gpg} are also supported although
10547 deprecated.
10548
10549 @end table
10550
10551 @cindex snarfing keys
10552 @cindex importing PGP keys
10553 @cindex PGP key ring import
10554 Snarfing OpenPGP keys (i.e., importing keys from articles into your
10555 key ring) is not supported explicitly through a menu item or command,
10556 rather Gnus do detect and label keys as @samp{application/pgp-keys},
10557 allowing you to specify whatever action you think is appropriate
10558 through the usual @acronym{MIME} infrastructure.  You can use a
10559 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
10560 Emacs MIME Manual}) such as the following to import keys using GNU
10561 Privacy Guard when you click on the @acronym{MIME} button
10562 (@pxref{Using MIME}).
10563
10564 @example
10565 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
10566 @end example
10567
10568 This happens to also be the default action defined in
10569 @code{mailcap-mime-data}.
10570
10571 @node Mailing List
10572 @section Mailing List
10573
10574 @kindex A M (summary)
10575 @findex gnus-mailing-list-insinuate
10576 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10577 add a @code{to-list} group parameter (@pxref{Group Parameters}),
10578 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10579 summary buffer.
10580
10581 That enables the following commands to the summary buffer:
10582
10583 @table @kbd
10584
10585 @item C-c C-n h
10586 @kindex C-c C-n h (Summary)
10587 @findex gnus-mailing-list-help
10588 Send a message to fetch mailing list help, if List-Help field exists.
10589
10590 @item C-c C-n s
10591 @kindex C-c C-n s (Summary)
10592 @findex gnus-mailing-list-subscribe
10593 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10594
10595 @item C-c C-n u
10596 @kindex C-c C-n u (Summary)
10597 @findex gnus-mailing-list-unsubscribe
10598 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10599 field exists.
10600
10601 @item C-c C-n p
10602 @kindex C-c C-n p (Summary)
10603 @findex gnus-mailing-list-post
10604 Post to the mailing list, if List-Post field exists.
10605
10606 @item C-c C-n o
10607 @kindex C-c C-n o (Summary)
10608 @findex gnus-mailing-list-owner
10609 Send a message to the mailing list owner, if List-Owner field exists.
10610
10611 @item C-c C-n a
10612 @kindex C-c C-n a (Summary)
10613 @findex gnus-mailing-list-owner
10614 Browse the mailing list archive, if List-Archive field exists.
10615
10616 @end table
10617
10618
10619 @node Article Buffer
10620 @chapter Article Buffer
10621 @cindex article buffer
10622
10623 The articles are displayed in the article buffer, of which there is only
10624 one.  All the summary buffers share the same article buffer unless you
10625 tell Gnus otherwise.
10626
10627 @menu
10628 * Hiding Headers::              Deciding what headers should be displayed.
10629 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
10630 * Customizing Articles::        Tailoring the look of the articles.
10631 * Article Keymap::              Keystrokes available in the article buffer.
10632 * Misc Article::                Other stuff.
10633 @end menu
10634
10635
10636 @node Hiding Headers
10637 @section Hiding Headers
10638 @cindex hiding headers
10639 @cindex deleting headers
10640
10641 The top section of each article is the @dfn{head}.  (The rest is the
10642 @dfn{body}, but you may have guessed that already.)
10643
10644 @vindex gnus-show-all-headers
10645 There is a lot of useful information in the head: the name of the person
10646 who wrote the article, the date it was written and the subject of the
10647 article.  That's well and nice, but there's also lots of information
10648 most people do not want to see---what systems the article has passed
10649 through before reaching you, the @code{Message-ID}, the
10650 @code{References}, etc. ad nauseum---and you'll probably want to get rid
10651 of some of those lines.  If you want to keep all those lines in the
10652 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10653
10654 Gnus provides you with two variables for sifting headers:
10655
10656 @table @code
10657
10658 @item gnus-visible-headers
10659 @vindex gnus-visible-headers
10660 If this variable is non-@code{nil}, it should be a regular expression
10661 that says what headers you wish to keep in the article buffer.  All
10662 headers that do not match this variable will be hidden.
10663
10664 For instance, if you only want to see the name of the person who wrote
10665 the article and the subject, you'd say:
10666
10667 @lisp
10668 (setq gnus-visible-headers "^From:\\|^Subject:")
10669 @end lisp
10670
10671 This variable can also be a list of regexps to match headers to
10672 remain visible.
10673
10674 @item gnus-ignored-headers
10675 @vindex gnus-ignored-headers
10676 This variable is the reverse of @code{gnus-visible-headers}.  If this
10677 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10678 should be a regular expression that matches all lines that you want to
10679 hide.  All lines that do not match this variable will remain visible.
10680
10681 For instance, if you just want to get rid of the @code{References} line
10682 and the @code{Xref} line, you might say:
10683
10684 @lisp
10685 (setq gnus-ignored-headers "^References:\\|^Xref:")
10686 @end lisp
10687
10688 This variable can also be a list of regexps to match headers to
10689 be removed.
10690
10691 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10692 variable will have no effect.
10693
10694 @end table
10695
10696 @vindex gnus-sorted-header-list
10697 Gnus can also sort the headers for you.  (It does this by default.)  You
10698 can control the sorting by setting the @code{gnus-sorted-header-list}
10699 variable.  It is a list of regular expressions that says in what order
10700 the headers are to be displayed.
10701
10702 For instance, if you want the name of the author of the article first,
10703 and then the subject, you might say something like:
10704
10705 @lisp
10706 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10707 @end lisp
10708
10709 Any headers that are to remain visible, but are not listed in this
10710 variable, will be displayed in random order after all the headers listed in this variable.
10711
10712 @findex gnus-article-hide-boring-headers
10713 @vindex gnus-boring-article-headers
10714 You can hide further boring headers by setting
10715 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10716 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10717 list, but this list doesn't actually contain header names.  Instead is
10718 lists various @dfn{boring conditions} that Gnus can check and remove
10719 from sight.
10720
10721 These conditions are:
10722 @table @code
10723 @item empty
10724 Remove all empty headers.
10725 @item followup-to
10726 Remove the @code{Followup-To} header if it is identical to the
10727 @code{Newsgroups} header.
10728 @item reply-to
10729 Remove the @code{Reply-To} header if it lists the same address as the
10730 @code{From} header, or if the @code{broken-reply-to} group parameter is
10731 set.
10732 @item newsgroups
10733 Remove the @code{Newsgroups} header if it only contains the current group
10734 name.
10735 @item to-address
10736 Remove the @code{To} header if it only contains the address identical to
10737 the current groups's @code{to-address} parameter.
10738 @item to-list
10739 Remove the @code{To} header if it only contains the address identical to
10740 the current groups's @code{to-list} parameter.
10741 @item cc-list
10742 Remove the @code{CC} header if it only contains the address identical to
10743 the current groups's @code{to-list} parameter.
10744 @item date
10745 Remove the @code{Date} header if the article is less than three days
10746 old.
10747 @item long-to
10748 Remove the @code{To} header if it is very long.
10749 @item many-to
10750 Remove all @code{To} headers if there are more than one.
10751 @end table
10752
10753 To include these three elements, you could say something like:
10754
10755 @lisp
10756 (setq gnus-boring-article-headers
10757       '(empty followup-to reply-to))
10758 @end lisp
10759
10760 This is also the default value for this variable.
10761
10762
10763 @node Using MIME
10764 @section Using MIME
10765 @cindex @acronym{MIME}
10766
10767 Mime is a standard for waving your hands through the air, aimlessly,
10768 while people stand around yawning.
10769
10770 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
10771 while all newsreaders die of fear.
10772
10773 @acronym{MIME} may specify what character set the article uses, the encoding
10774 of the characters, and it also makes it possible to embed pictures and
10775 other naughty stuff in innocent-looking articles.
10776
10777 @vindex gnus-display-mime-function
10778 @findex gnus-display-mime
10779 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
10780 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
10781 default, which creates a bundle of clickable buttons that can be used to
10782 display, save and manipulate the @acronym{MIME} objects.
10783
10784 The following commands are available when you have placed point over a
10785 @acronym{MIME} button:
10786
10787 @table @kbd
10788 @findex gnus-article-press-button
10789 @item RET (Article)
10790 @kindex RET (Article)
10791 @itemx BUTTON-2 (Article)
10792 Toggle displaying of the @acronym{MIME} object
10793 (@code{gnus-article-press-button}). If builtin viewers can not display
10794 the object, Gnus resorts to external viewers in the @file{mailcap}
10795 files.  If a viewer has the @samp{copiousoutput} specification, the
10796 object is displayed inline.
10797
10798 @findex gnus-mime-view-part
10799 @item M-RET (Article)
10800 @kindex M-RET (Article)
10801 @itemx v (Article)
10802 Prompt for a method, and then view the @acronym{MIME} object using this
10803 method (@code{gnus-mime-view-part}).
10804
10805 @findex gnus-mime-view-part-as-type
10806 @item t (Article)
10807 @kindex t (Article)
10808 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
10809 (@code{gnus-mime-view-part-as-type}).
10810
10811 @findex gnus-mime-view-part-as-charset
10812 @item C (Article)
10813 @kindex C (Article)
10814 Prompt for a charset, and then view the @acronym{MIME} object using this
10815 charset (@code{gnus-mime-view-part-as-charset}).
10816
10817 @findex gnus-mime-save-part
10818 @item o (Article)
10819 @kindex o (Article)
10820 Prompt for a file name, and then save the @acronym{MIME} object
10821 (@code{gnus-mime-save-part}).
10822
10823 @findex gnus-mime-save-part-and-strip
10824 @item C-o (Article)
10825 @kindex C-o (Article)
10826 Prompt for a file name, then save the @acronym{MIME} object and strip it from
10827 the article.  Then proceed to article editing, where a reasonable
10828 suggestion is being made on how the altered article should look
10829 like.  The stripped @acronym{MIME} object will be referred via the
10830 message/external-body @acronym{MIME} type.
10831 (@code{gnus-mime-save-part-and-strip}).
10832
10833 @findex gnus-mime-delete-part
10834 @item d (Article)
10835 @kindex d (Article)
10836 Delete the @acronym{MIME} object from the article and replace it with some
10837 information about the removed @acronym{MIME} object
10838 (@code{gnus-mime-delete-part}).
10839
10840 @findex gnus-mime-copy-part
10841 @item c (Article)
10842 @kindex c (Article)
10843 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
10844 (@code{gnus-mime-copy-part}).  Compressed files like @file{.gz} and
10845 @file{.bz2} are automatically decompressed if
10846 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
10847 Accessing Compressed Files, emacs, The Emacs Editor}).
10848
10849 @findex gnus-mime-print-part
10850 @item p (Article)
10851 @kindex p (Article)
10852 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
10853 command respects the @samp{print=} specifications in the
10854 @file{.mailcap} file.
10855
10856 @findex gnus-mime-inline-part
10857 @item i (Article)
10858 @kindex i (Article)
10859 Insert the contents of the @acronym{MIME} object into the buffer
10860 (@code{gnus-mime-inline-part}) as text/plain.  If given a prefix, insert
10861 the raw contents without decoding.  If given a numerical prefix, you can
10862 do semi-manual charset stuff (see
10863 @code{gnus-summary-show-article-charset-alist} in @pxref{Paging the
10864 Article}).
10865
10866 @findex gnus-mime-view-part-internally
10867 @item E (Article)
10868 @kindex E (Article)
10869 View the @acronym{MIME} object with an internal viewer.  If no internal
10870 viewer is available, use an external viewer
10871 (@code{gnus-mime-view-part-internally}).
10872
10873 @findex gnus-mime-view-part-externally
10874 @item e (Article)
10875 @kindex e (Article)
10876 View the @acronym{MIME} object with an external viewer.
10877 (@code{gnus-mime-view-part-externally}).
10878
10879 @findex gnus-mime-pipe-part
10880 @item | (Article)
10881 @kindex | (Article)
10882 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
10883
10884 @findex gnus-mime-action-on-part
10885 @item . (Article)
10886 @kindex . (Article)
10887 Interactively run an action on the @acronym{MIME} object
10888 (@code{gnus-mime-action-on-part}).
10889
10890 @end table
10891
10892 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
10893 determines which parts to do this with is described in the Emacs
10894 @acronym{MIME} manual.
10895
10896 It might be best to just use the toggling functions from the article
10897 buffer to avoid getting nasty surprises.  (For instance, you enter the
10898 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
10899 decoded the sound file in the article and some horrible sing-a-long song
10900 comes screaming out your speakers, and you can't find the volume button,
10901 because there isn't one, and people are starting to look at you, and you
10902 try to stop the program, but you can't, and you can't find the program
10903 to control the volume, and everybody else in the room suddenly decides
10904 to look at you disdainfully, and you'll feel rather stupid.)
10905
10906 Any similarity to real events and people is purely coincidental.  Ahem.
10907
10908 Also see @pxref{MIME Commands}.
10909
10910
10911 @node Customizing Articles
10912 @section Customizing Articles
10913 @cindex article customization
10914
10915 A slew of functions for customizing how the articles are to look like
10916 exist.  You can call these functions interactively
10917 (@pxref{Article Washing}), or you can have them
10918 called automatically when you select the articles.
10919
10920 To have them called automatically, you should set the corresponding
10921 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10922 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10923 be set, but first we discuss the values these variables can have.
10924
10925 Note: Some values, while valid, make little sense.  Check the list below
10926 for sensible values.
10927
10928 @enumerate
10929 @item
10930 @code{nil}: Don't do this treatment.
10931
10932 @item
10933 @code{t}: Do this treatment on all body parts.
10934
10935 @item
10936 @code{head}: Do the treatment on the headers.
10937
10938 @item
10939 @code{last}: Do this treatment on the last part.
10940
10941 @item
10942 An integer: Do this treatment on all body parts that have a length less
10943 than this number.
10944
10945 @item
10946 A list of strings: Do this treatment on all body parts that are in
10947 articles that are read in groups that have names that match one of the
10948 regexps in the list.
10949
10950 @item
10951 A list where the first element is not a string:
10952
10953 The list is evaluated recursively.  The first element of the list is a
10954 predicate.  The following predicates are recognized: @code{or},
10955 @code{and}, @code{not} and @code{typep}.  Here's an example:
10956
10957 @lisp
10958 (or last
10959     (typep "text/x-vcard"))
10960 @end lisp
10961
10962 @end enumerate
10963
10964 You may have noticed that the word @dfn{part} is used here.  This refers
10965 to the fact that some messages are @acronym{MIME} multipart articles that may
10966 be divided into several parts.  Articles that are not multiparts are
10967 considered to contain just a single part.
10968
10969 @vindex gnus-article-treat-types
10970 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10971 want to, but by default, only @samp{text/plain} parts are given the
10972 treatment.  This is controlled by the @code{gnus-article-treat-types}
10973 variable, which is a list of regular expressions that are matched to the
10974 type of the part.  This variable is ignored if the value of the
10975 controlling variable is a predicate list, as described above.
10976
10977 The following treatment options are available.  The easiest way to
10978 customize this is to examine the @code{gnus-article-treat} customization
10979 group.  Values in parenthesis are suggested sensible values.  Others are
10980 possible but those listed are probably sufficient for most people.
10981
10982 @table @code
10983 @item gnus-treat-buttonize (t, integer)
10984 @item gnus-treat-buttonize-head (head)
10985
10986 @xref{Article Buttons}.
10987
10988 @item gnus-treat-capitalize-sentences (t, integer)
10989 @item gnus-treat-overstrike (t, integer)
10990 @item gnus-treat-strip-cr (t, integer)
10991 @item gnus-treat-strip-headers-in-body (t, integer)
10992 @item gnus-treat-strip-leading-blank-lines (t, integer)
10993 @item gnus-treat-strip-multiple-blank-lines (t, integer)
10994 @item gnus-treat-strip-pem (t, last, integer)
10995 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
10996 @item gnus-treat-unsplit-urls (t, integer)
10997 @item gnus-treat-wash-html (t, integer)
10998
10999 @xref{Article Washing}.
11000
11001 @item gnus-treat-date-english (head)
11002 @item gnus-treat-date-iso8601 (head)
11003 @item gnus-treat-date-lapsed (head)
11004 @item gnus-treat-date-local (head)
11005 @item gnus-treat-date-original (head)
11006 @item gnus-treat-date-user-defined (head)
11007 @item gnus-treat-date-ut (head)
11008
11009 @xref{Article Date}.
11010
11011 @item gnus-treat-from-picon (head)
11012 @item gnus-treat-mail-picon (head)
11013 @item gnus-treat-newsgroups-picon (head)
11014
11015 @xref{Picons}.
11016
11017 @item gnus-treat-display-smileys (t, integer)
11018
11019 @item gnus-treat-body-boundary (head)
11020
11021 @vindex gnus-body-boundary-delimiter
11022 Adds a delimiter between header and body, the string used as delimiter
11023 is controlled by @code{gnus-body-boundary-delimiter}.
11024
11025 @xref{Smileys}.
11026
11027 @item gnus-treat-display-xface (head)
11028
11029 @xref{X-Face}.
11030
11031 @item gnus-treat-emphasize (t, head, integer)
11032 @item gnus-treat-fill-article (t, integer)
11033 @item gnus-treat-fill-long-lines (t, integer)
11034 @item gnus-treat-hide-boring-headers (head)
11035 @item gnus-treat-hide-citation (t, integer)
11036 @item gnus-treat-hide-citation-maybe (t, integer)
11037 @item gnus-treat-hide-headers (head)
11038 @item gnus-treat-hide-signature (t, last)
11039 @item gnus-treat-strip-banner (t, last)
11040 @item gnus-treat-strip-list-identifiers (head)
11041
11042 @xref{Article Hiding}.
11043
11044 @item gnus-treat-highlight-citation (t, integer)
11045 @item gnus-treat-highlight-headers (head)
11046 @item gnus-treat-highlight-signature (t, last, integer)
11047
11048 @xref{Article Highlighting}.
11049
11050 @item gnus-treat-play-sounds
11051 @item gnus-treat-translate
11052 @item gnus-treat-x-pgp-sig (head)
11053
11054 @item gnus-treat-unfold-headers (head)
11055 @item gnus-treat-fold-headers (head)
11056 @item gnus-treat-fold-newsgroups (head)
11057 @item gnus-treat-leading-whitespace (head)
11058
11059 @xref{Article Header}.
11060
11061
11062 @end table
11063
11064 @vindex gnus-part-display-hook
11065 You can, of course, write your own functions to be called from
11066 @code{gnus-part-display-hook}.  The functions are called narrowed to the
11067 part, and you can do anything you like, pretty much.  There is no
11068 information that you have to keep in the buffer---you can change
11069 everything.
11070
11071
11072 @node Article Keymap
11073 @section Article Keymap
11074
11075 Most of the keystrokes in the summary buffer can also be used in the
11076 article buffer.  They should behave as if you typed them in the summary
11077 buffer, which means that you don't actually have to have a summary
11078 buffer displayed while reading.  You can do it all from the article
11079 buffer.
11080
11081 A few additional keystrokes are available:
11082
11083 @table @kbd
11084
11085 @item SPACE
11086 @kindex SPACE (Article)
11087 @findex gnus-article-next-page
11088 Scroll forwards one page (@code{gnus-article-next-page}).
11089 This is exactly the same as @kbd{h SPACE h}.
11090
11091 @item DEL
11092 @kindex DEL (Article)
11093 @findex gnus-article-prev-page
11094 Scroll backwards one page (@code{gnus-article-prev-page}).
11095 This is exactly the same as @kbd{h DEL h}.
11096
11097 @item C-c ^
11098 @kindex C-c ^ (Article)
11099 @findex gnus-article-refer-article
11100 If point is in the neighborhood of a @code{Message-ID} and you press
11101 @kbd{C-c ^}, Gnus will try to get that article from the server
11102 (@code{gnus-article-refer-article}).
11103
11104 @item C-c C-m
11105 @kindex C-c C-m (Article)
11106 @findex gnus-article-mail
11107 Send a reply to the address near point (@code{gnus-article-mail}).  If
11108 given a prefix, include the mail.
11109
11110 @item s
11111 @kindex s (Article)
11112 @findex gnus-article-show-summary
11113 Reconfigure the buffers so that the summary buffer becomes visible
11114 (@code{gnus-article-show-summary}).
11115
11116 @item ?
11117 @kindex ? (Article)
11118 @findex gnus-article-describe-briefly
11119 Give a very brief description of the available keystrokes
11120 (@code{gnus-article-describe-briefly}).
11121
11122 @item TAB
11123 @kindex TAB (Article)
11124 @findex gnus-article-next-button
11125 Go to the next button, if any (@code{gnus-article-next-button}).  This
11126 only makes sense if you have buttonizing turned on.
11127
11128 @item M-TAB
11129 @kindex M-TAB (Article)
11130 @findex gnus-article-prev-button
11131 Go to the previous button, if any (@code{gnus-article-prev-button}).
11132
11133 @item R
11134 @kindex R (Article)
11135 @findex gnus-article-reply-with-original
11136 Send a reply to the current article and yank the current article
11137 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
11138 wide reply.  If the region is active, only yank the text in the
11139 region.
11140
11141 @item F
11142 @kindex F (Article)
11143 @findex gnus-article-followup-with-original
11144 Send a followup to the current article and yank the current article
11145 (@code{gnus-article-followup-with-original}).  If given a prefix, make
11146 a wide reply.  If the region is active, only yank the text in the
11147 region.
11148
11149
11150 @end table
11151
11152
11153 @node Misc Article
11154 @section Misc Article
11155
11156 @table @code
11157
11158 @item gnus-single-article-buffer
11159 @vindex gnus-single-article-buffer
11160 If non-@code{nil}, use the same article buffer for all the groups.
11161 (This is the default.)  If @code{nil}, each group will have its own
11162 article buffer.
11163
11164 @vindex gnus-article-decode-hook
11165 @item gnus-article-decode-hook
11166 @cindex MIME
11167 Hook used to decode @acronym{MIME} articles.  The default value is
11168 @code{(article-decode-charset article-decode-encoded-words)}
11169
11170 @vindex gnus-article-prepare-hook
11171 @item gnus-article-prepare-hook
11172 This hook is called right after the article has been inserted into the
11173 article buffer.  It is mainly intended for functions that do something
11174 depending on the contents; it should probably not be used for changing
11175 the contents of the article buffer.
11176
11177 @item gnus-article-mode-hook
11178 @vindex gnus-article-mode-hook
11179 Hook called in article mode buffers.
11180
11181 @item gnus-article-mode-syntax-table
11182 @vindex gnus-article-mode-syntax-table
11183 Syntax table used in article buffers.  It is initialized from
11184 @code{text-mode-syntax-table}.
11185
11186 @vindex gnus-article-over-scroll
11187 @item gnus-article-over-scroll
11188 If non-@code{nil}, allow scrolling the article buffer even when there
11189 no more new text to scroll in.  The default is @code{nil}.
11190
11191 @vindex gnus-article-mode-line-format
11192 @item gnus-article-mode-line-format
11193 This variable is a format string along the same lines as
11194 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
11195 accepts the same format specifications as that variable, with two
11196 extensions:
11197
11198 @table @samp
11199
11200 @item w
11201 The @dfn{wash status} of the article.  This is a short string with one
11202 character for each possible article wash operation that may have been
11203 performed.  The characters and their meaning:
11204
11205 @table @samp
11206
11207 @item c
11208 Displayed when cited text may be hidden in the article buffer.
11209
11210 @item h
11211 Displayed when headers are hidden in the article buffer.
11212
11213 @item p
11214 Displayed when article is digitally signed or encrypted, and Gnus has
11215 hidden the security headers.  (N.B. does not tell anything about
11216 security status, i.e. good or bad signature.)
11217
11218 @item s
11219 Displayed when the signature has been hidden in the Article buffer.
11220
11221 @item o
11222 Displayed when Gnus has treated overstrike characters in the article buffer.
11223
11224 @item e
11225 Displayed when Gnus has treated emphasised strings in the article buffer.
11226
11227 @end table
11228
11229 @item m
11230 The number of @acronym{MIME} parts in the article.
11231
11232 @end table
11233
11234 @vindex gnus-break-pages
11235
11236 @item gnus-break-pages
11237 Controls whether @dfn{page breaking} is to take place.  If this variable
11238 is non-@code{nil}, the articles will be divided into pages whenever a
11239 page delimiter appears in the article.  If this variable is @code{nil},
11240 paging will not be done.
11241
11242 @item gnus-page-delimiter
11243 @vindex gnus-page-delimiter
11244 This is the delimiter mentioned above.  By default, it is @samp{^L}
11245 (formfeed).
11246
11247 @cindex IDNA
11248 @cindex internationalized domain names
11249 @vindex gnus-use-idna
11250 @item gnus-use-idna
11251 This variable controls whether Gnus performs IDNA decoding of
11252 internationalized domain names inside @samp{From}, @samp{To} and
11253 @samp{Cc} headers.  This requires
11254 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
11255 variable is only enabled if you have installed it.
11256
11257 @end table
11258
11259
11260 @node Composing Messages
11261 @chapter Composing Messages
11262 @cindex composing messages
11263 @cindex messages
11264 @cindex mail
11265 @cindex sending mail
11266 @cindex reply
11267 @cindex followup
11268 @cindex post
11269 @cindex using gpg
11270 @cindex using s/mime
11271 @cindex using smime
11272
11273 @kindex C-c C-c (Post)
11274 All commands for posting and mailing will put you in a message buffer
11275 where you can edit the article all you like, before you send the
11276 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
11277 Message Manual}.  Where the message will be posted/mailed to depends
11278 on your setup (@pxref{Posting Server}).
11279
11280 @menu
11281 * Mail::                        Mailing and replying.
11282 * Posting Server::              What server should you post and mail via?
11283 * Mail and Post::               Mailing and posting at the same time.
11284 * Archived Messages::           Where Gnus stores the messages you've sent.
11285 * Posting Styles::              An easier way to specify who you are.
11286 * Drafts::                      Postponing messages and rejected messages.
11287 * Rejected Articles::           What happens if the server doesn't like your article?
11288 * Signing and encrypting::      How to compose secure messages.
11289 @end menu
11290
11291 Also see @pxref{Canceling and Superseding} for information on how to
11292 remove articles you shouldn't have posted.
11293
11294
11295 @node Mail
11296 @section Mail
11297
11298 Variables for customizing outgoing mail:
11299
11300 @table @code
11301 @item gnus-uu-digest-headers
11302 @vindex gnus-uu-digest-headers
11303 List of regexps to match headers included in digested messages.  The
11304 headers will be included in the sequence they are matched.  If
11305 @code{nil} include all headers.
11306
11307 @item gnus-add-to-list
11308 @vindex gnus-add-to-list
11309 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11310 that have none when you do a @kbd{a}.
11311
11312 @item gnus-confirm-mail-reply-to-news
11313 @vindex gnus-confirm-mail-reply-to-news
11314 This can also be a function receiving the group name as the only
11315 parameter which should return non-@code{nil} if a confirmation is
11316 needed, or a regular expression matching group names, where
11317 confirmation is should be asked for.
11318
11319 If you find yourself never wanting to reply to mail, but occasionally
11320 press R anyway, this variable might be for you.
11321
11322 @item gnus-confirm-treat-mail-like-news
11323 @vindex gnus-confirm-treat-mail-like-news
11324 If non-@code{nil}, Gnus also requests confirmation according to
11325 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
11326 useful for treating mailing lists like newsgroups.
11327  
11328 @end table
11329
11330
11331 @node Posting Server
11332 @section Posting Server
11333
11334 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11335 (extremely intelligent, of course) article, where does it go?
11336
11337 Thank you for asking.  I hate you.
11338
11339 It can be quite complicated.
11340
11341 @vindex gnus-post-method
11342 When posting news, Message usually invokes @code{message-send-news}
11343 (@pxref{News Variables, , News Variables, message, Message Manual}).
11344 Normally, Gnus will post using the same select method as you're
11345 reading from (which might be convenient if you're reading lots of
11346 groups from different private servers).  However.  If the server
11347 you're reading from doesn't allow posting, just reading, you probably
11348 want to use some other server to post your (extremely intelligent and
11349 fabulously interesting) articles.  You can then set the
11350 @code{gnus-post-method} to some other method:
11351
11352 @lisp
11353 (setq gnus-post-method '(nnspool ""))
11354 @end lisp
11355
11356 Now, if you've done this, and then this server rejects your article, or
11357 this server is down, what do you do then?  To override this variable you
11358 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11359 the ``current'' server, to get back the default behavior, for posting.
11360
11361 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11362 Gnus will prompt you for what method to use for posting.
11363
11364 You can also set @code{gnus-post-method} to a list of select methods.
11365 If that's the case, Gnus will always prompt you for what method to use
11366 for posting.
11367
11368 Finally, if you want to always post using the native select method,
11369 you can set this variable to @code{native}.
11370
11371 When sending mail, Message invokes @code{message-send-mail-function}.
11372 The default function, @code{message-send-mail-with-sendmail}, pipes
11373 your article to the @code{sendmail} binary for further queuing and
11374 sending.  When your local system is not configured for sending mail
11375 using @code{sendmail}, and you have access to a remote @acronym{SMTP}
11376 server, you can set @code{message-send-mail-function} to
11377 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11378 package correctly.  An example:
11379
11380 @lisp
11381 (setq message-send-mail-function 'smtpmail-send-it
11382       smtpmail-default-smtp-server "YOUR SMTP HOST")
11383 @end lisp
11384
11385 To the thing similar to this, there is
11386 @code{message-smtpmail-send-it}.  It is useful if your ISP requires
11387 the @acronym{POP}-before-@acronym{SMTP} authentication.  See the
11388 documentation for the function @code{mail-source-touch-pop}.
11389
11390 Other possible choices for @code{message-send-mail-function} includes
11391 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11392 and @code{feedmail-send-it}.
11393
11394 @node Mail and Post
11395 @section Mail and Post
11396
11397 Here's a list of variables relevant to both mailing and
11398 posting:
11399
11400 @table @code
11401 @item gnus-mailing-list-groups
11402 @findex gnus-mailing-list-groups
11403 @cindex mailing lists
11404
11405 If your news server offers groups that are really mailing lists
11406 gatewayed to the @acronym{NNTP} server, you can read those groups without
11407 problems, but you can't post/followup to them without some difficulty.
11408 One solution is to add a @code{to-address} to the group parameters
11409 (@pxref{Group Parameters}).  An easier thing to do is set the
11410 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11411 really are mailing lists.  Then, at least, followups to the mailing
11412 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11413 still a pain, though.
11414
11415 @item gnus-user-agent
11416 @vindex gnus-user-agent
11417 @cindex User-Agent
11418
11419 This variable controls which information should be exposed in the
11420 User-Agent header.  It can be one of the symbols @code{gnus} (show only
11421 Gnus version), @code{emacs-gnus} (show only Emacs and Gnus versions),
11422 @code{emacs-gnus-config} (same as @code{emacs-gnus} plus system
11423 configuration), @code{emacs-gnus-type} (same as @code{emacs-gnus} plus
11424 system type) or a custom string.  If you set it to a string, be sure to
11425 use a valid format, see RFC 2616.
11426
11427 @end table
11428
11429 You may want to do spell-checking on messages that you send out.  Or, if
11430 you don't want to spell-check by hand, you could add automatic
11431 spell-checking via the @code{ispell} package:
11432
11433 @cindex ispell
11434 @findex ispell-message
11435 @lisp
11436 (add-hook 'message-send-hook 'ispell-message)
11437 @end lisp
11438
11439 If you want to change the @code{ispell} dictionary based on what group
11440 you're in, you could say something like the following:
11441
11442 @lisp
11443 (add-hook 'gnus-select-group-hook
11444           (lambda ()
11445             (cond
11446              ((string-match
11447                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11448               (ispell-change-dictionary "deutsch"))
11449              (t
11450               (ispell-change-dictionary "english")))))
11451 @end lisp
11452
11453 Modify to suit your needs.
11454
11455
11456 @node Archived Messages
11457 @section Archived Messages
11458 @cindex archived messages
11459 @cindex sent messages
11460
11461 Gnus provides a few different methods for storing the mail and news you
11462 send.  The default method is to use the @dfn{archive virtual server} to
11463 store the messages.  If you want to disable this completely, the
11464 @code{gnus-message-archive-group} variable should be @code{nil}, which
11465 is the default.
11466
11467 For archiving interesting messages in a group you read, see the
11468 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11469 Group Commands}).
11470
11471 @vindex gnus-message-archive-method
11472 @code{gnus-message-archive-method} says what virtual server Gnus is to
11473 use to store sent messages.  The default is:
11474
11475 @lisp
11476 (nnfolder "archive"
11477           (nnfolder-directory   "~/Mail/archive")
11478           (nnfolder-active-file "~/Mail/archive/active")
11479           (nnfolder-get-new-mail nil)
11480           (nnfolder-inhibit-expiry t))
11481 @end lisp
11482
11483 You can, however, use any mail select method (@code{nnml},
11484 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11485 for doing this sort of thing, though.  If you don't like the default
11486 directory chosen, you could say something like:
11487
11488 @lisp
11489 (setq gnus-message-archive-method
11490       '(nnfolder "archive"
11491                  (nnfolder-inhibit-expiry t)
11492                  (nnfolder-active-file "~/News/sent-mail/active")
11493                  (nnfolder-directory "~/News/sent-mail/")))
11494 @end lisp
11495
11496 @vindex gnus-message-archive-group
11497 @cindex Gcc
11498 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11499 to one or more group(s) on that server.  Which group to use is
11500 determined by the @code{gnus-message-archive-group} variable.
11501
11502 This variable can be used to do the following:
11503
11504 @itemize @bullet
11505 @item
11506 a string
11507 Messages will be saved in that group.
11508
11509 Note that you can include a select method in the group name, then the
11510 message will not be stored in the select method given by
11511 @code{gnus-message-archive-method}, but in the select method specified
11512 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11513 has the default value shown above.  Then setting
11514 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11515 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11516 value @code{"nnml:foo"}, then outgoing messages will be stored in
11517 @samp{nnml:foo}.
11518 @item
11519 a list of strings
11520 Messages will be saved in all those groups.
11521 @item
11522 an alist of regexps, functions and forms
11523 When a key ``matches'', the result is used.
11524 @item
11525 @code{nil}
11526 No message archiving will take place.  This is the default.
11527 @end itemize
11528
11529 Let's illustrate:
11530
11531 Just saving to a single group called @samp{MisK}:
11532 @lisp
11533 (setq gnus-message-archive-group "MisK")
11534 @end lisp
11535
11536 Saving to two groups, @samp{MisK} and @samp{safe}:
11537 @lisp
11538 (setq gnus-message-archive-group '("MisK" "safe"))
11539 @end lisp
11540
11541 Save to different groups based on what group you are in:
11542 @lisp
11543 (setq gnus-message-archive-group
11544       '(("^alt" "sent-to-alt")
11545         ("mail" "sent-to-mail")
11546         (".*" "sent-to-misc")))
11547 @end lisp
11548
11549 More complex stuff:
11550 @lisp
11551 (setq gnus-message-archive-group
11552       '((if (message-news-p)
11553             "misc-news"
11554           "misc-mail")))
11555 @end lisp
11556
11557 How about storing all news messages in one file, but storing all mail
11558 messages in one file per month:
11559
11560 @lisp
11561 (setq gnus-message-archive-group
11562       '((if (message-news-p)
11563             "misc-news"
11564           (concat "mail." (format-time-string "%Y-%m")))))
11565 @end lisp
11566
11567 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11568 @c use a different value for @code{gnus-message-archive-group} there.)
11569
11570 Now, when you send a message off, it will be stored in the appropriate
11571 group.  (If you want to disable storing for just one particular message,
11572 you can just remove the @code{Gcc} header that has been inserted.)  The
11573 archive group will appear in the group buffer the next time you start
11574 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
11575 enter it and read the articles in it just like you'd read any other
11576 group.  If the group gets really big and annoying, you can simply rename
11577 if (using @kbd{G r} in the group buffer) to something
11578 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11579 continue to be stored in the old (now empty) group.
11580
11581 That's the default method of archiving sent messages.  Gnus offers a
11582 different way for the people who don't like the default method.  In that
11583 case you should set @code{gnus-message-archive-group} to @code{nil};
11584 this will disable archiving.
11585
11586 @table @code
11587 @item gnus-outgoing-message-group
11588 @vindex gnus-outgoing-message-group
11589 All outgoing messages will be put in this group.  If you want to store
11590 all your outgoing mail and articles in the group @samp{nnml:archive},
11591 you set this variable to that value.  This variable can also be a list of
11592 group names.
11593
11594 If you want to have greater control over what group to put each
11595 message in, you can set this variable to a function that checks the
11596 current newsgroup name and then returns a suitable group name (or list
11597 of names).
11598
11599 This variable can be used instead of @code{gnus-message-archive-group},
11600 but the latter is the preferred method.
11601
11602 @item gnus-gcc-mark-as-read
11603 @vindex gnus-gcc-mark-as-read
11604 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11605
11606 @item gnus-gcc-externalize-attachments
11607 @vindex gnus-gcc-externalize-attachments
11608 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11609 and matches the Gcc group name, attach files as external parts; if it is
11610 @code{all}, attach local files as external parts; if it is other
11611 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11612 changed in the future.
11613
11614 @end table
11615
11616
11617 @node Posting Styles
11618 @section Posting Styles
11619 @cindex posting styles
11620 @cindex styles
11621
11622 All them variables, they make my head swim.
11623
11624 So what if you want a different @code{Organization} and signature based
11625 on what groups you post to?  And you post both from your home machine
11626 and your work machine, and you want different @code{From} lines, and so
11627 on?
11628
11629 @vindex gnus-posting-styles
11630 One way to do stuff like that is to write clever hooks that change the
11631 variables you need to have changed.  That's a bit boring, so somebody
11632 came up with the bright idea of letting the user specify these things in
11633 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11634 variable:
11635
11636 @lisp
11637 ((".*"
11638   (signature "Peace and happiness")
11639   (organization "What me?"))
11640  ("^comp"
11641   (signature "Death to everybody"))
11642  ("comp.emacs.i-love-it"
11643   (organization "Emacs is it")))
11644 @end lisp
11645
11646 As you might surmise from this example, this alist consists of several
11647 @dfn{styles}.  Each style will be applicable if the first element
11648 ``matches'', in some form or other.  The entire alist will be iterated
11649 over, from the beginning towards the end, and each match will be
11650 applied, which means that attributes in later styles that match override
11651 the same attributes in earlier matching styles.  So
11652 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11653 signature and the @samp{What me?} @code{Organization} header.
11654
11655 The first element in each style is called the @code{match}.  If it's a
11656 string, then Gnus will try to regexp match it against the group name.
11657 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
11658 will look in the original article for a header whose name is
11659 @var{match} and compare that @var{regexp}.  @var{match} and
11660 @var{regexp} are strings.  (There original article is the one you are
11661 replying or following up to.  If you are not composing a reply or a
11662 followup, then there is nothing to match against.)  If the
11663 @code{match} is a function symbol, that function will be called with
11664 no arguments.  If it's a variable symbol, then the variable will be
11665 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11666 any case, if this returns a non-@code{nil} value, then the style is
11667 said to @dfn{match}.
11668
11669 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11670 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11671 attribute name can be one of @code{signature}, @code{signature-file},
11672 @code{x-face-file}, @code{address} (overriding
11673 @code{user-mail-address}), @code{name} (overriding
11674 @code{(user-full-name)}) or @code{body}.  The attribute name can also
11675 be a string or a symbol.  In that case, this will be used as a header
11676 name, and the value will be inserted in the headers of the article; if
11677 the value is @code{nil}, the header name will be removed.  If the
11678 attribute name is @code{eval}, the form is evaluated, and the result
11679 is thrown away.
11680
11681 The attribute value can be a string (used verbatim), a function with
11682 zero arguments (the return value will be used), a variable (its value
11683 will be used) or a list (it will be @code{eval}ed and the return value
11684 will be used).  The functions and sexps are called/@code{eval}ed in the
11685 message buffer that is being set up.  The headers of the current article
11686 are available through the @code{message-reply-headers} variable, which
11687 is a vector of the following headers: number subject from date id
11688 references chars lines xref extra.
11689
11690 @vindex message-reply-headers
11691
11692 If you wish to check whether the message you are about to compose is
11693 meant to be a news article or a mail message, you can check the values
11694 of the @code{message-news-p} and @code{message-mail-p} functions.
11695
11696 @findex message-mail-p
11697 @findex message-news-p
11698
11699 So here's a new example:
11700
11701 @lisp
11702 (setq gnus-posting-styles
11703       '((".*"
11704          (signature-file "~/.signature")
11705          (name "User Name")
11706          ("X-Home-Page" (getenv "WWW_HOME"))
11707          (organization "People's Front Against MWM"))
11708         ("^rec.humor"
11709          (signature my-funny-signature-randomizer))
11710         ((equal (system-name) "gnarly")  ;; @r{A form}
11711          (signature my-quote-randomizer))
11712         (message-news-p        ;; @r{A function symbol}
11713          (signature my-news-signature))
11714         (window-system         ;; @r{A value symbol}
11715          ("X-Window-System" (format "%s" window-system)))
11716         ;; @r{If I'm replying to Larsi, set the Organization header.}
11717         ((header "from" "larsi.*org")
11718          (Organization "Somewhere, Inc."))
11719         ((posting-from-work-p) ;; @r{A user defined function}
11720          (signature-file "~/.work-signature")
11721          (address "user@@bar.foo")
11722          (body "You are fired.\n\nSincerely, your boss.")
11723          (organization "Important Work, Inc"))
11724         ("nnml:.*"
11725          (From (save-excursion
11726                  (set-buffer gnus-article-buffer)
11727                  (message-fetch-field "to"))))
11728         ("^nn.+:"
11729          (signature-file "~/.mail-signature"))))
11730 @end lisp
11731
11732 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11733 @code{From} address in all your outgoing replies, which might be handy
11734 if you fill many roles.
11735
11736
11737 @node Drafts
11738 @section Drafts
11739 @cindex drafts
11740
11741 If you are writing a message (mail or news) and suddenly remember that
11742 you have a steak in the oven (or some pesto in the food processor, you
11743 craaazy vegetarians), you'll probably wish there was a method to save
11744 the message you are writing so that you can continue editing it some
11745 other day, and send it when you feel its finished.
11746
11747 Well, don't worry about it.  Whenever you start composing a message of
11748 some sort using the Gnus mail and post commands, the buffer you get will
11749 automatically associate to an article in a special @dfn{draft} group.
11750 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11751 article will be saved there.  (Auto-save files also go to the draft
11752 group.)
11753
11754 @cindex nndraft
11755 @vindex nndraft-directory
11756 The draft group is a special group (which is implemented as an
11757 @code{nndraft} group, if you absolutely have to know) called
11758 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11759 @code{nndraft} is to store its files.  What makes this group special is
11760 that you can't tick any articles in it or mark any articles as
11761 read---all articles in the group are permanently unread.
11762
11763 If the group doesn't exist, it will be created and you'll be subscribed
11764 to it.  The only way to make it disappear from the Group buffer is to
11765 unsubscribe it.  The special properties of the draft group comes from
11766 a group property (@pxref{Group Parameters}), and if lost the group
11767 behaves like any other group.  This means the commands below will not
11768 be available.  To restore the special properties of the group, the
11769 simplest way is to kill the group, using @kbd{C-k}, and restart
11770 Gnus.  The group is automatically created again with the
11771 correct parameters.  The content of the group is not lost.
11772
11773 @c @findex gnus-dissociate-buffer-from-draft
11774 @c @kindex C-c M-d (Mail)
11775 @c @kindex C-c M-d (Post)
11776 @c @findex gnus-associate-buffer-with-draft
11777 @c @kindex C-c C-d (Mail)
11778 @c @kindex C-c C-d (Post)
11779 @c If you're writing some super-secret message that you later want to
11780 @c encode with PGP before sending, you may wish to turn the auto-saving
11781 @c (and association with the draft group) off.  You never know who might be
11782 @c interested in reading all your extremely valuable and terribly horrible
11783 @c and interesting secrets.  The @kbd{C-c M-d}
11784 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11785 @c If you change your mind and want to turn the auto-saving back on again,
11786 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11787 @c
11788 @c @vindex gnus-use-draft
11789 @c To leave association with the draft group off by default, set
11790 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11791
11792 @findex gnus-draft-edit-message
11793 @kindex D e (Draft)
11794 When you want to continue editing the article, you simply enter the
11795 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11796 that.  You will be placed in a buffer where you left off.
11797
11798 Rejected articles will also be put in this draft group (@pxref{Rejected
11799 Articles}).
11800
11801 @findex gnus-draft-send-all-messages
11802 @kindex D s (Draft)
11803 @findex gnus-draft-send-message
11804 @kindex D S (Draft)
11805 If you have lots of rejected messages you want to post (or mail) without
11806 doing further editing, you can use the @kbd{D s} command
11807 (@code{gnus-draft-send-message}).  This command understands the
11808 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11809 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11810 in the buffer.
11811
11812 @findex gnus-draft-toggle-sending
11813 @kindex D t (Draft)
11814 If you have some messages that you wish not to send, you can use the
11815 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11816 as unsendable.  This is a toggling command.
11817
11818
11819 @node Rejected Articles
11820 @section Rejected Articles
11821 @cindex rejected articles
11822
11823 Sometimes a news server will reject an article.  Perhaps the server
11824 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11825 @emph{there be demons}.  Perhaps you have included too much cited text.
11826 Perhaps the disk is full.  Perhaps the server is down.
11827
11828 These situations are, of course, totally beyond the control of Gnus.
11829 (Gnus, of course, loves the way you look, always feels great, has angels
11830 fluttering around inside of it, doesn't care about how much cited text
11831 you include, never runs full and never goes down.)  So Gnus saves these
11832 articles until some later time when the server feels better.
11833
11834 The rejected articles will automatically be put in a special draft group
11835 (@pxref{Drafts}).  When the server comes back up again, you'd then
11836 typically enter that group and send all the articles off.
11837
11838 @node Signing and encrypting
11839 @section Signing and encrypting
11840 @cindex using gpg
11841 @cindex using s/mime
11842 @cindex using smime
11843
11844 Gnus can digitally sign and encrypt your messages, using vanilla
11845 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
11846 decoding such messages, see the @code{mm-verify-option} and
11847 @code{mm-decrypt-option} options (@pxref{Security}).
11848
11849 @vindex gnus-message-replysign
11850 @vindex gnus-message-replyencrypt
11851 @vindex gnus-message-replysignencrypted
11852 Often, you would like to sign replies to people who send you signed
11853 messages.  Even more often, you might want to encrypt messages which
11854 are in reply to encrypted messages.  Gnus offers
11855 @code{gnus-message-replysign} to enable the former, and
11856 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11857 @code{gnus-message-replysignencrypted} (on by default) will sign
11858 automatically encrypted messages.
11859
11860 Instructing MML to perform security operations on a @acronym{MIME} part is
11861 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11862 C-m c} key map for encryption, as follows.
11863
11864 @table @kbd
11865
11866 @item C-c C-m s s
11867 @kindex C-c C-m s s
11868 @findex mml-secure-message-sign-smime
11869
11870 Digitally sign current message using @acronym{S/MIME}.
11871
11872 @item C-c C-m s o
11873 @kindex C-c C-m s o
11874 @findex mml-secure-message-sign-pgp
11875
11876 Digitally sign current message using @acronym{PGP}.
11877
11878 @item C-c C-m s p
11879 @kindex C-c C-m s p
11880 @findex mml-secure-message-sign-pgp
11881
11882 Digitally sign current message using @acronym{PGP/MIME}.
11883
11884 @item C-c C-m c s
11885 @kindex C-c C-m c s
11886 @findex mml-secure-message-encrypt-smime
11887
11888 Digitally encrypt current message using @acronym{S/MIME}.
11889
11890 @item C-c C-m c o
11891 @kindex C-c C-m c o
11892 @findex mml-secure-message-encrypt-pgp
11893
11894 Digitally encrypt current message using @acronym{PGP}.
11895
11896 @item C-c C-m c p
11897 @kindex C-c C-m c p
11898 @findex mml-secure-message-encrypt-pgpmime
11899
11900 Digitally encrypt current message using @acronym{PGP/MIME}.
11901
11902 @item C-c C-m C-n
11903 @kindex C-c C-m C-n
11904 @findex mml-unsecure-message
11905 Remove security related MML tags from message.
11906
11907 @end table
11908
11909 @xref{Security, ,Security, message, Message Manual}, for more information.
11910
11911 @node Select Methods
11912 @chapter Select Methods
11913 @cindex foreign groups
11914 @cindex select methods
11915
11916 A @dfn{foreign group} is a group not read by the usual (or
11917 default) means.  It could be, for instance, a group from a different
11918 @acronym{NNTP} server, it could be a virtual group, or it could be your own
11919 personal mail group.
11920
11921 A foreign group (or any group, really) is specified by a @dfn{name} and
11922 a @dfn{select method}.  To take the latter first, a select method is a
11923 list where the first element says what back end to use (e.g. @code{nntp},
11924 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11925 name}.  There may be additional elements in the select method, where the
11926 value may have special meaning for the back end in question.
11927
11928 One could say that a select method defines a @dfn{virtual server}---so
11929 we do just that (@pxref{Server Buffer}).
11930
11931 The @dfn{name} of the group is the name the back end will recognize the
11932 group as.
11933
11934 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
11935 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11936 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11937 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11938 back end just knows this group as @samp{soc.motss}.
11939
11940 The different methods all have their peculiarities, of course.
11941
11942 @menu
11943 * Server Buffer::               Making and editing virtual servers.
11944 * Getting News::                Reading USENET news with Gnus.
11945 * Getting Mail::                Reading your personal mail with Gnus.
11946 * Browsing the Web::            Getting messages from a plethora of Web sources.
11947 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
11948 * Other Sources::               Reading directories, files, SOUP packets.
11949 * Combined Groups::             Combining groups into one group.
11950 * Gnus Unplugged::              Reading news and mail offline.
11951 @end menu
11952
11953
11954 @node Server Buffer
11955 @section Server Buffer
11956
11957 Traditionally, a @dfn{server} is a machine or a piece of software that
11958 one connects to, and then requests information from.  Gnus does not
11959 connect directly to any real servers, but does all transactions through
11960 one back end or other.  But that's just putting one layer more between
11961 the actual media and Gnus, so we might just as well say that each
11962 back end represents a virtual server.
11963
11964 For instance, the @code{nntp} back end may be used to connect to several
11965 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
11966 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
11967 use, and what parameters to set by specifying a @dfn{select method}.
11968
11969 These select method specifications can sometimes become quite
11970 complicated---say, for instance, that you want to read from the
11971 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
11972 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
11973 Anyway, if you had to specify that for each group that used this
11974 server, that would be too much work, so Gnus offers a way of naming
11975 select methods, which is what you do in the server buffer.
11976
11977 To enter the server buffer, use the @kbd{^}
11978 (@code{gnus-group-enter-server-mode}) command in the group buffer.
11979
11980 @menu
11981 * Server Buffer Format::        You can customize the look of this buffer.
11982 * Server Commands::             Commands to manipulate servers.
11983 * Example Methods::             Examples server specifications.
11984 * Creating a Virtual Server::   An example session.
11985 * Server Variables::            Which variables to set.
11986 * Servers and Methods::         You can use server names as select methods.
11987 * Unavailable Servers::         Some servers you try to contact may be down.
11988 @end menu
11989
11990 @vindex gnus-server-mode-hook
11991 @code{gnus-server-mode-hook} is run when creating the server buffer.
11992
11993
11994 @node Server Buffer Format
11995 @subsection Server Buffer Format
11996 @cindex server buffer format
11997
11998 @vindex gnus-server-line-format
11999 You can change the look of the server buffer lines by changing the
12000 @code{gnus-server-line-format} variable.  This is a @code{format}-like
12001 variable, with some simple extensions:
12002
12003 @table @samp
12004
12005 @item h
12006 How the news is fetched---the back end name.
12007
12008 @item n
12009 The name of this server.
12010
12011 @item w
12012 Where the news is to be fetched from---the address.
12013
12014 @item s
12015 The opened/closed/denied status of the server.
12016 @end table
12017
12018 @vindex gnus-server-mode-line-format
12019 The mode line can also be customized by using the
12020 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
12021 Formatting}).  The following specs are understood:
12022
12023 @table @samp
12024 @item S
12025 Server name.
12026
12027 @item M
12028 Server method.
12029 @end table
12030
12031 Also @pxref{Formatting Variables}.
12032
12033
12034 @node Server Commands
12035 @subsection Server Commands
12036 @cindex server commands
12037
12038 @table @kbd
12039
12040 @item a
12041 @kindex a (Server)
12042 @findex gnus-server-add-server
12043 Add a new server (@code{gnus-server-add-server}).
12044
12045 @item e
12046 @kindex e (Server)
12047 @findex gnus-server-edit-server
12048 Edit a server (@code{gnus-server-edit-server}).
12049
12050 @item SPACE
12051 @kindex SPACE (Server)
12052 @findex gnus-server-read-server
12053 Browse the current server (@code{gnus-server-read-server}).
12054
12055 @item q
12056 @kindex q (Server)
12057 @findex gnus-server-exit
12058 Return to the group buffer (@code{gnus-server-exit}).
12059
12060 @item k
12061 @kindex k (Server)
12062 @findex gnus-server-kill-server
12063 Kill the current server (@code{gnus-server-kill-server}).
12064
12065 @item y
12066 @kindex y (Server)
12067 @findex gnus-server-yank-server
12068 Yank the previously killed server (@code{gnus-server-yank-server}).
12069
12070 @item c
12071 @kindex c (Server)
12072 @findex gnus-server-copy-server
12073 Copy the current server (@code{gnus-server-copy-server}).
12074
12075 @item l
12076 @kindex l (Server)
12077 @findex gnus-server-list-servers
12078 List all servers (@code{gnus-server-list-servers}).
12079
12080 @item s
12081 @kindex s (Server)
12082 @findex gnus-server-scan-server
12083 Request that the server scan its sources for new articles
12084 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
12085 servers.
12086
12087 @item g
12088 @kindex g (Server)
12089 @findex gnus-server-regenerate-server
12090 Request that the server regenerate all its data structures
12091 (@code{gnus-server-regenerate-server}).  This can be useful if you have
12092 a mail back end that has gotten out of sync.
12093
12094 @end table
12095
12096
12097 @node Example Methods
12098 @subsection Example Methods
12099
12100 Most select methods are pretty simple and self-explanatory:
12101
12102 @lisp
12103 (nntp "news.funet.fi")
12104 @end lisp
12105
12106 Reading directly from the spool is even simpler:
12107
12108 @lisp
12109 (nnspool "")
12110 @end lisp
12111
12112 As you can see, the first element in a select method is the name of the
12113 back end, and the second is the @dfn{address}, or @dfn{name}, if you
12114 will.
12115
12116 After these two elements, there may be an arbitrary number of
12117 @code{(@var{variable} @var{form})} pairs.
12118
12119 To go back to the first example---imagine that you want to read from
12120 port 15 on that machine.  This is what the select method should
12121 look like then:
12122
12123 @lisp
12124 (nntp "news.funet.fi" (nntp-port-number 15))
12125 @end lisp
12126
12127 You should read the documentation to each back end to find out what
12128 variables are relevant, but here's an @code{nnmh} example:
12129
12130 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
12131 you have two structures that you wish to access: One is your private
12132 mail spool, and the other is a public one.  Here's the possible spec for
12133 your private mail:
12134
12135 @lisp
12136 (nnmh "private" (nnmh-directory "~/private/mail/"))
12137 @end lisp
12138
12139 (This server is then called @samp{private}, but you may have guessed
12140 that.)
12141
12142 Here's the method for a public spool:
12143
12144 @lisp
12145 (nnmh "public"
12146       (nnmh-directory "/usr/information/spool/")
12147       (nnmh-get-new-mail nil))
12148 @end lisp
12149
12150 @cindex proxy
12151 @cindex firewall
12152
12153 If you are behind a firewall and only have access to the @acronym{NNTP}
12154 server from the firewall machine, you can instruct Gnus to @code{rlogin}
12155 on the firewall machine and telnet from there to the @acronym{NNTP} server.
12156 Doing this can be rather fiddly, but your virtual server definition
12157 should probably look something like this:
12158
12159 @lisp
12160 (nntp "firewall"
12161       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
12162       (nntp-via-address "the.firewall.machine")
12163       (nntp-address "the.real.nntp.host")
12164       (nntp-end-of-line "\n"))
12165 @end lisp
12166
12167 If you want to use the wonderful @code{ssh} program to provide a
12168 compressed connection over the modem line, you could add the following
12169 configuration to the example above:
12170
12171 @lisp
12172       (nntp-via-rlogin-command "ssh")
12173 @end lisp
12174
12175 See also @code{nntp-via-rlogin-command-switches}.
12176
12177 If you're behind a firewall, but have direct access to the outside world
12178 through a wrapper command like "runsocks", you could open a socksified
12179 telnet connection to the news server as follows:
12180
12181 @lisp
12182 (nntp "outside"
12183       (nntp-pre-command "runsocks")
12184       (nntp-open-connection-function nntp-open-via-telnet)
12185       (nntp-address "the.news.server")
12186       (nntp-end-of-line "\n"))
12187 @end lisp
12188
12189 This means that you have to have set up @code{ssh-agent} correctly to
12190 provide automatic authorization, of course.  And to get a compressed
12191 connection, you have to have the @samp{Compression} option in the
12192 @code{ssh} @file{config} file.
12193
12194
12195 @node Creating a Virtual Server
12196 @subsection Creating a Virtual Server
12197
12198 If you're saving lots of articles in the cache by using persistent
12199 articles, you may want to create a virtual server to read the cache.
12200
12201 First you need to add a new server.  The @kbd{a} command does that.  It
12202 would probably be best to use @code{nnspool} to read the cache.  You
12203 could also use @code{nnml} or @code{nnmh}, though.
12204
12205 Type @kbd{a nnspool RET cache RET}.
12206
12207 You should now have a brand new @code{nnspool} virtual server called
12208 @samp{cache}.  You now need to edit it to have the right definitions.
12209 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
12210 will contain the following:
12211
12212 @lisp
12213 (nnspool "cache")
12214 @end lisp
12215
12216 Change that to:
12217
12218 @lisp
12219 (nnspool "cache"
12220          (nnspool-spool-directory "~/News/cache/")
12221          (nnspool-nov-directory "~/News/cache/")
12222          (nnspool-active-file "~/News/cache/active"))
12223 @end lisp
12224
12225 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
12226 @kbd{RET} over this virtual server, you should be entered into a browse
12227 buffer, and you should be able to enter any of the groups displayed.
12228
12229
12230 @node Server Variables
12231 @subsection Server Variables
12232 @cindex server variables
12233 @cindex server parameters
12234
12235 One sticky point when defining variables (both on back ends and in Emacs
12236 in general) is that some variables are typically initialized from other
12237 variables when the definition of the variables is being loaded.  If you
12238 change the ``base'' variable after the variables have been loaded, you
12239 won't change the ``derived'' variables.
12240
12241 This typically affects directory and file variables.  For instance,
12242 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
12243 directory variables are initialized from that variable, so
12244 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
12245 new virtual @code{nnml} server, it will @emph{not} suffice to set just
12246 @code{nnml-directory}---you have to explicitly set all the file
12247 variables to be what you want them to be.  For a complete list of
12248 variables for each back end, see each back end's section later in this
12249 manual, but here's an example @code{nnml} definition:
12250
12251 @lisp
12252 (nnml "public"
12253       (nnml-directory "~/my-mail/")
12254       (nnml-active-file "~/my-mail/active")
12255       (nnml-newsgroups-file "~/my-mail/newsgroups"))
12256 @end lisp
12257
12258 Server variables are often called @dfn{server parameters}.
12259
12260 @node Servers and Methods
12261 @subsection Servers and Methods
12262
12263 Wherever you would normally use a select method
12264 (e.g. @code{gnus-secondary-select-method}, in the group select method,
12265 when browsing a foreign server) you can use a virtual server name
12266 instead.  This could potentially save lots of typing.  And it's nice all
12267 over.
12268
12269
12270 @node Unavailable Servers
12271 @subsection Unavailable Servers
12272
12273 If a server seems to be unreachable, Gnus will mark that server as
12274 @code{denied}.  That means that any subsequent attempt to make contact
12275 with that server will just be ignored.  ``It can't be opened,'' Gnus
12276 will tell you, without making the least effort to see whether that is
12277 actually the case or not.
12278
12279 That might seem quite naughty, but it does make sense most of the time.
12280 Let's say you have 10 groups subscribed to on server
12281 @samp{nephelococcygia.com}.  This server is located somewhere quite far
12282 away from you and the machine is quite slow, so it takes 1 minute just
12283 to find out that it refuses connection to you today.  If Gnus were to
12284 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
12285 attempt to do that.  Once it has gotten a single ``connection refused'',
12286 it will regard that server as ``down''.
12287
12288 So, what happens if the machine was only feeling unwell temporarily?
12289 How do you test to see whether the machine has come up again?
12290
12291 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12292 with the following commands:
12293
12294 @table @kbd
12295
12296 @item O
12297 @kindex O (Server)
12298 @findex gnus-server-open-server
12299 Try to establish connection to the server on the current line
12300 (@code{gnus-server-open-server}).
12301
12302 @item C
12303 @kindex C (Server)
12304 @findex gnus-server-close-server
12305 Close the connection (if any) to the server
12306 (@code{gnus-server-close-server}).
12307
12308 @item D
12309 @kindex D (Server)
12310 @findex gnus-server-deny-server
12311 Mark the current server as unreachable
12312 (@code{gnus-server-deny-server}).
12313
12314 @item M-o
12315 @kindex M-o (Server)
12316 @findex gnus-server-open-all-servers
12317 Open the connections to all servers in the buffer
12318 (@code{gnus-server-open-all-servers}).
12319
12320 @item M-c
12321 @kindex M-c (Server)
12322 @findex gnus-server-close-all-servers
12323 Close the connections to all servers in the buffer
12324 (@code{gnus-server-close-all-servers}).
12325
12326 @item R
12327 @kindex R (Server)
12328 @findex gnus-server-remove-denials
12329 Remove all marks to whether Gnus was denied connection from any servers
12330 (@code{gnus-server-remove-denials}).
12331
12332 @item L
12333 @kindex L (Server)
12334 @findex gnus-server-offline-server
12335 Set server status to offline (@code{gnus-server-offline-server}).
12336
12337 @end table
12338
12339
12340 @node Getting News
12341 @section Getting News
12342 @cindex reading news
12343 @cindex news back ends
12344
12345 A newsreader is normally used for reading news.  Gnus currently provides
12346 only two methods of getting news---it can read from an @acronym{NNTP} server,
12347 or it can read from a local spool.
12348
12349 @menu
12350 * NNTP::                        Reading news from an @acronym{NNTP} server.
12351 * News Spool::                  Reading news from the local spool.
12352 @end menu
12353
12354
12355 @node NNTP
12356 @subsection NNTP
12357 @cindex nntp
12358
12359 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
12360 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
12361 server as the, uhm, address.
12362
12363 If the @acronym{NNTP} server is located at a non-standard port, setting the
12364 third element of the select method to this port number should allow you
12365 to connect to the right port.  You'll have to edit the group info for
12366 that (@pxref{Foreign Groups}).
12367
12368 The name of the foreign group can be the same as a native group.  In
12369 fact, you can subscribe to the same group from as many different servers
12370 you feel like.  There will be no name collisions.
12371
12372 The following variables can be used to create a virtual @code{nntp}
12373 server:
12374
12375 @table @code
12376
12377 @item nntp-server-opened-hook
12378 @vindex nntp-server-opened-hook
12379 @cindex @sc{mode reader}
12380 @cindex authinfo
12381 @cindex authentification
12382 @cindex nntp authentification
12383 @findex nntp-send-authinfo
12384 @findex nntp-send-mode-reader
12385 is run after a connection has been made.  It can be used to send
12386 commands to the @acronym{NNTP} server after it has been contacted.  By
12387 default it sends the command @code{MODE READER} to the server with the
12388 @code{nntp-send-mode-reader} function.  This function should always be
12389 present in this hook.
12390
12391 @item nntp-authinfo-function
12392 @vindex nntp-authinfo-function
12393 @findex nntp-send-authinfo
12394 @vindex nntp-authinfo-file
12395 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
12396 server.  The default function is @code{nntp-send-authinfo}, which looks
12397 through your @file{~/.authinfo} (or whatever you've set the
12398 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12399 are found, it will prompt you for a login name and a password.  The
12400 format of the @file{~/.authinfo} file is (almost) the same as the
12401 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12402 manual page, but here are the salient facts:
12403
12404 @enumerate
12405 @item
12406 The file contains one or more line, each of which define one server.
12407
12408 @item
12409 Each line may contain an arbitrary number of token/value pairs.
12410
12411 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12412 @samp{default}.  In addition Gnus introduces two new tokens, not present
12413 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12414 @samp{force}.  (This is the only way the @file{.authinfo} file format
12415 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12416 indicate what port on the server the credentials apply to and
12417 @samp{force} is explained below.
12418
12419 @end enumerate
12420
12421 Here's an example file:
12422
12423 @example
12424 machine news.uio.no login larsi password geheimnis
12425 machine nntp.ifi.uio.no login larsi force yes
12426 @end example
12427
12428 The token/value pairs may appear in any order; @samp{machine} doesn't
12429 have to be first, for instance.
12430
12431 In this example, both login name and password have been supplied for the
12432 former server, while the latter has only the login name listed, and the
12433 user will be prompted for the password.  The latter also has the
12434 @samp{force} tag, which means that the authinfo will be sent to the
12435 @var{nntp} server upon connection; the default (i.e., when there is not
12436 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12437 until the @var{nntp} server asks for it.
12438
12439 You can also add @samp{default} lines that will apply to all servers
12440 that don't have matching @samp{machine} lines.
12441
12442 @example
12443 default force yes
12444 @end example
12445
12446 This will force sending @samp{AUTHINFO} commands to all servers not
12447 previously mentioned.
12448
12449 Remember to not leave the @file{~/.authinfo} file world-readable.
12450
12451 @item nntp-server-action-alist
12452 @vindex nntp-server-action-alist
12453 This is a list of regexps to match on server types and actions to be
12454 taken when matches are made.  For instance, if you want Gnus to beep
12455 every time you connect to innd, you could say something like:
12456
12457 @lisp
12458 (setq nntp-server-action-alist
12459       '(("innd" (ding))))
12460 @end lisp
12461
12462 You probably don't want to do that, though.
12463
12464 The default value is
12465
12466 @lisp
12467 '(("nntpd 1\\.5\\.11t"
12468    (remove-hook 'nntp-server-opened-hook
12469                 'nntp-send-mode-reader)))
12470 @end lisp
12471
12472 This ensures that Gnus doesn't send the @code{MODE READER} command to
12473 nntpd 1.5.11t, since that command chokes that server, I've been told.
12474
12475 @item nntp-maximum-request
12476 @vindex nntp-maximum-request
12477 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
12478 will collect headers by sending a series of @code{head} commands.  To
12479 speed things up, the back end sends lots of these commands without
12480 waiting for reply, and then reads all the replies.  This is controlled
12481 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12482 your network is buggy, you should set this to 1.
12483
12484 @item nntp-connection-timeout
12485 @vindex nntp-connection-timeout
12486 If you have lots of foreign @code{nntp} groups that you connect to
12487 regularly, you're sure to have problems with @acronym{NNTP} servers not
12488 responding properly, or being too loaded to reply within reasonable
12489 time.  This is can lead to awkward problems, which can be helped
12490 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12491 that says how many seconds the @code{nntp} back end should wait for a
12492 connection before giving up.  If it is @code{nil}, which is the default,
12493 no timeouts are done.
12494
12495 @c @item nntp-command-timeout
12496 @c @vindex nntp-command-timeout
12497 @c @cindex PPP connections
12498 @c @cindex dynamic IP addresses
12499 @c If you're running Gnus on a machine that has a dynamically assigned
12500 @c address, Gnus may become confused.  If the address of your machine
12501 @c changes after connecting to the @acronym{NNTP} server, Gnus will simply sit
12502 @c waiting forever for replies from the server.  To help with this
12503 @c unfortunate problem, you can set this command to a number.  Gnus will
12504 @c then, if it sits waiting for a reply from the server longer than that
12505 @c number of seconds, shut down the connection, start a new one, and resend
12506 @c the command.  This should hopefully be transparent to the user.  A
12507 @c likely number is 30 seconds.
12508 @c
12509 @c @item nntp-retry-on-break
12510 @c @vindex nntp-retry-on-break
12511 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12512 @c hangs.  This will have much the same effect as the command timeout
12513 @c described above.
12514
12515 @item nntp-server-hook
12516 @vindex nntp-server-hook
12517 This hook is run as the last step when connecting to an @acronym{NNTP}
12518 server.
12519
12520 @item nntp-buggy-select
12521 @vindex nntp-buggy-select
12522 Set this to non-@code{nil} if your select routine is buggy.
12523
12524 @item nntp-nov-is-evil
12525 @vindex nntp-nov-is-evil
12526 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
12527 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
12528 can be used.
12529
12530 @item nntp-xover-commands
12531 @vindex nntp-xover-commands
12532 @cindex nov
12533 @cindex XOVER
12534 List of strings used as commands to fetch @acronym{NOV} lines from a
12535 server.  The default value of this variable is @code{("XOVER"
12536 "XOVERVIEW")}.
12537
12538 @item nntp-nov-gap
12539 @vindex nntp-nov-gap
12540 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
12541 the server.  The server responds with one huge list of lines.  However,
12542 if you have read articles 2-5000 in the group, and only want to read
12543 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
12544 lines that you will not need.  This variable says how
12545 big a gap between two consecutive articles is allowed to be before the
12546 @code{XOVER} request is split into several request.  Note that if your
12547 network is fast, setting this variable to a really small number means
12548 that fetching will probably be slower.  If this variable is @code{nil},
12549 @code{nntp} will never split requests.  The default is 5.
12550
12551 @item nntp-prepare-server-hook
12552 @vindex nntp-prepare-server-hook
12553 A hook run before attempting to connect to an @acronym{NNTP} server.
12554
12555 @item nntp-warn-about-losing-connection
12556 @vindex nntp-warn-about-losing-connection
12557 If this variable is non-@code{nil}, some noise will be made when a
12558 server closes connection.
12559
12560 @item nntp-record-commands
12561 @vindex nntp-record-commands
12562 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12563 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
12564 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
12565 that doesn't seem to work.
12566
12567 @item nntp-open-connection-function
12568 @vindex nntp-open-connection-function
12569 It is possible to customize how the connection to the nntp server will
12570 be opened.  If you specify an @code{nntp-open-connection-function}
12571 parameter, Gnus will use that function to establish the connection.
12572 Five pre-made functions are supplied.  These functions can be grouped in
12573 two categories: direct connection functions (three pre-made), and
12574 indirect ones (two pre-made).
12575
12576 @item nntp-prepare-post-hook
12577 @vindex nntp-prepare-post-hook
12578 A hook run just before posting an article.  If there is no
12579 @code{Message-ID} header in the article and the news server provides the
12580 recommended ID, it will be added to the article before running this
12581 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12582 inhibit Gnus to add a @code{Message-ID} header, you could say:
12583
12584 @lisp
12585 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12586 @end lisp
12587
12588 Note that not all servers support the recommended ID.  This works for
12589 INN versions 2.3.0 and later, for instance.
12590
12591 @item nntp-read-timeout
12592 @vindex nntp-read-timeout
12593 How long nntp should wait between checking for the end of output.
12594 Shorter values mean quicker response, but is more CPU intensive.  The
12595 default is 0.1 seconds.  If you have a slow line to the server (and
12596 don't like to see Emacs eat your available CPU power), you might set
12597 this to, say, 1.
12598
12599 @end table
12600
12601 @menu
12602 * Direct Functions::            Connecting directly to the server.
12603 * Indirect Functions::          Connecting indirectly to the server.
12604 * Common Variables::            Understood by several connection functions.
12605 @end menu
12606
12607
12608 @node Direct Functions
12609 @subsubsection Direct Functions
12610 @cindex direct connection functions
12611
12612 These functions are called direct because they open a direct connection
12613 between your machine and the @acronym{NNTP} server.  The behavior of these
12614 functions is also affected by commonly understood variables
12615 (@pxref{Common Variables}).
12616
12617 @table @code
12618 @findex nntp-open-network-stream
12619 @item nntp-open-network-stream
12620 This is the default, and simply connects to some port or other on the
12621 remote system.
12622
12623 @findex nntp-open-tls-stream
12624 @item nntp-open-tls-stream
12625 Opens a connection to a server over a @dfn{secure} channel.  To use
12626 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
12627 installed.  You then define a server as follows:
12628
12629 @lisp
12630 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
12631 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
12632 ;;
12633 (nntp "snews.bar.com"
12634       (nntp-open-connection-function nntp-open-tls-stream)
12635       (nntp-port-number )
12636       (nntp-address "snews.bar.com"))
12637 @end lisp
12638
12639 @findex nntp-open-ssl-stream
12640 @item nntp-open-ssl-stream
12641 Opens a connection to a server over a @dfn{secure} channel.  To use
12642 this you must have @uref{http://www.openssl.org, OpenSSL} or
12643 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
12644 then define a server as follows:
12645
12646 @lisp
12647 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
12648 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
12649 ;;
12650 (nntp "snews.bar.com"
12651       (nntp-open-connection-function nntp-open-ssl-stream)
12652       (nntp-port-number 563)
12653       (nntp-address "snews.bar.com"))
12654 @end lisp
12655
12656 @findex nntp-open-telnet-stream
12657 @item nntp-open-telnet-stream
12658 Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
12659 it.  You might wonder why this function exists, since we have the
12660 default @code{nntp-open-network-stream} which would do the job.  (One
12661 of) the reason(s) is that if you are behind a firewall but have direct
12662 connections to the outside world thanks to a command wrapper like
12663 @code{runsocks}, you can use it like this:
12664
12665 @lisp
12666 (nntp "socksified"
12667       (nntp-pre-command "runsocks")
12668       (nntp-open-connection-function nntp-open-telnet-stream)
12669       (nntp-address "the.news.server"))
12670 @end lisp
12671
12672 With the default method, you would need to wrap your whole Emacs
12673 session, which is not a good idea.
12674 @end table
12675
12676
12677 @node Indirect Functions
12678 @subsubsection Indirect Functions
12679 @cindex indirect connection functions
12680
12681 These functions are called indirect because they connect to an
12682 intermediate host before actually connecting to the @acronym{NNTP} server.
12683 All of these functions and related variables are also said to belong to
12684 the ``via'' family of connection: they're all prefixed with ``via'' to make
12685 things cleaner.  The behavior of these functions is also affected by
12686 commonly understood variables (@pxref{Common Variables}).
12687
12688 @table @code
12689 @item nntp-open-via-rlogin-and-telnet
12690 @findex nntp-open-via-rlogin-and-telnet
12691 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12692 to the real @acronym{NNTP} server from there.  This is useful for instance if
12693 you need to connect to a firewall machine first.
12694
12695 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12696
12697 @table @code
12698 @item nntp-via-rlogin-command
12699 @vindex nntp-via-rlogin-command
12700 Command used to log in on the intermediate host.  The default is
12701 @samp{rsh}, but @samp{ssh} is a popular alternative.
12702
12703 @item nntp-via-rlogin-command-switches
12704 @vindex nntp-via-rlogin-command-switches
12705 List of strings to be used as the switches to
12706 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12707 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
12708 @samp{("-C")} in order to compress all data connections, otherwise set
12709 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
12710 the telnet command requires a pseudo-tty allocation on an intermediate
12711 host.
12712 @end table
12713
12714 @item nntp-open-via-telnet-and-telnet
12715 @findex nntp-open-via-telnet-and-telnet
12716 Does essentially the same, but uses @samp{telnet} instead of
12717 @samp{rlogin} to connect to the intermediate host.
12718
12719 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12720
12721 @table @code
12722 @item nntp-via-telnet-command
12723 @vindex nntp-via-telnet-command
12724 Command used to @code{telnet} the intermediate host.  The default is
12725 @samp{telnet}.
12726
12727 @item nntp-via-telnet-switches
12728 @vindex nntp-via-telnet-switches
12729 List of strings to be used as the switches to the
12730 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12731
12732 @item nntp-via-user-password
12733 @vindex nntp-via-user-password
12734 Password to use when logging in on the intermediate host.
12735
12736 @item nntp-via-envuser
12737 @vindex nntp-via-envuser
12738 If non-@code{nil}, the intermediate @code{telnet} session (client and
12739 server both) will support the @code{ENVIRON} option and not prompt for
12740 login name. This works for Solaris @code{telnet}, for instance.
12741
12742 @item nntp-via-shell-prompt
12743 @vindex nntp-via-shell-prompt
12744 Regexp matching the shell prompt on the intermediate host.  The default
12745 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12746
12747 @end table
12748
12749 @end table
12750
12751
12752 Here are some additional variables that are understood by all the above
12753 functions:
12754
12755 @table @code
12756
12757 @item nntp-via-user-name
12758 @vindex nntp-via-user-name
12759 User name to use when connecting to the intermediate host.
12760
12761 @item nntp-via-address
12762 @vindex nntp-via-address
12763 Address of the intermediate host to connect to.
12764
12765 @end table
12766
12767
12768 @node Common Variables
12769 @subsubsection Common Variables
12770
12771 The following variables affect the behavior of all, or several of the
12772 pre-made connection functions. When not specified, all functions are
12773 affected.
12774
12775 @table @code
12776
12777 @item nntp-pre-command
12778 @vindex nntp-pre-command
12779 A command wrapper to use when connecting through a non native
12780 connection function (all except @code{nntp-open-network-stream},
12781 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}.  This is
12782 where you would put a @samp{SOCKS} wrapper for instance.
12783
12784 @item nntp-address
12785 @vindex nntp-address
12786 The address of the @acronym{NNTP} server.
12787
12788 @item nntp-port-number
12789 @vindex nntp-port-number
12790 Port number to connect to the @acronym{NNTP} server.  The default is
12791 @samp{nntp}.  If you use @acronym{NNTP} over
12792 @acronym{tls}/@acronym{ssl}, you may want to use integer ports rather
12793 than named ports (i.e, use @samp{563} instead of @samp{snews} or
12794 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
12795 not work with named ports.
12796
12797 @item nntp-end-of-line
12798 @vindex nntp-end-of-line
12799 String to use as end-of-line marker when talking to the @acronym{NNTP}
12800 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12801 using a non native connection function.
12802
12803 @item nntp-telnet-command
12804 @vindex nntp-telnet-command
12805 Command to use when connecting to the @acronym{NNTP} server through
12806 @samp{telnet}.  This is @emph{not} for an intermediate host.  This is
12807 just for the real @acronym{NNTP} server.  The default is
12808 @samp{telnet}.
12809
12810 @item nntp-telnet-switches
12811 @vindex nntp-telnet-switches
12812 A list of switches to pass to @code{nntp-telnet-command}.  The default
12813 is @samp{("-8")}.
12814
12815 @end table
12816
12817
12818 @node News Spool
12819 @subsection News Spool
12820 @cindex nnspool
12821 @cindex news spool
12822
12823 Subscribing to a foreign group from the local spool is extremely easy,
12824 and might be useful, for instance, to speed up reading groups that
12825 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12826 instance.
12827
12828 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12829 anything else) as the address.
12830
12831 If you have access to a local spool, you should probably use that as the
12832 native select method (@pxref{Finding the News}).  It is normally faster
12833 than using an @code{nntp} select method, but might not be.  It depends.
12834 You just have to try to find out what's best at your site.
12835
12836 @table @code
12837
12838 @item nnspool-inews-program
12839 @vindex nnspool-inews-program
12840 Program used to post an article.
12841
12842 @item nnspool-inews-switches
12843 @vindex nnspool-inews-switches
12844 Parameters given to the inews program when posting an article.
12845
12846 @item nnspool-spool-directory
12847 @vindex nnspool-spool-directory
12848 Where @code{nnspool} looks for the articles.  This is normally
12849 @file{/usr/spool/news/}.
12850
12851 @item nnspool-nov-directory
12852 @vindex nnspool-nov-directory
12853 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally
12854 @file{/usr/spool/news/over.view/}.
12855
12856 @item nnspool-lib-dir
12857 @vindex nnspool-lib-dir
12858 Where the news lib dir is (@file{/usr/lib/news/} by default).
12859
12860 @item nnspool-active-file
12861 @vindex nnspool-active-file
12862 The name of the active file.
12863
12864 @item nnspool-newsgroups-file
12865 @vindex nnspool-newsgroups-file
12866 The name of the group descriptions file.
12867
12868 @item nnspool-history-file
12869 @vindex nnspool-history-file
12870 The name of the news history file.
12871
12872 @item nnspool-active-times-file
12873 @vindex nnspool-active-times-file
12874 The name of the active date file.
12875
12876 @item nnspool-nov-is-evil
12877 @vindex nnspool-nov-is-evil
12878 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
12879 that it finds.
12880
12881 @item nnspool-sift-nov-with-sed
12882 @vindex nnspool-sift-nov-with-sed
12883 @cindex sed
12884 If non-@code{nil}, which is the default, use @code{sed} to get the
12885 relevant portion from the overview file.  If @code{nil},
12886 @code{nnspool} will load the entire file into a buffer and process it
12887 there.
12888
12889 @end table
12890
12891
12892 @node Getting Mail
12893 @section Getting Mail
12894 @cindex reading mail
12895 @cindex mail
12896
12897 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12898 course.
12899
12900 @menu
12901 * Mail in a Newsreader::        Important introductory notes.
12902 * Getting Started Reading Mail::  A simple cookbook example.
12903 * Splitting Mail::              How to create mail groups.
12904 * Mail Sources::                How to tell Gnus where to get mail from.
12905 * Mail Back End Variables::     Variables for customizing mail handling.
12906 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12907 * Group Mail Splitting::        Use group customize to drive mail splitting.
12908 * Incorporating Old Mail::      What about the old mail you have?
12909 * Expiring Mail::               Getting rid of unwanted mail.
12910 * Washing Mail::                Removing gruft from the mail you get.
12911 * Duplicates::                  Dealing with duplicated mail.
12912 * Not Reading Mail::            Using mail back ends for reading other files.
12913 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12914 @end menu
12915
12916
12917 @node Mail in a Newsreader
12918 @subsection Mail in a Newsreader
12919
12920 If you are used to traditional mail readers, but have decided to switch
12921 to reading mail with Gnus, you may find yourself experiencing something
12922 of a culture shock.
12923
12924 Gnus does not behave like traditional mail readers.  If you want to make
12925 it behave that way, you can, but it's an uphill battle.
12926
12927 Gnus, by default, handles all its groups using the same approach.  This
12928 approach is very newsreaderly---you enter a group, see the new/unread
12929 messages, and when you read the messages, they get marked as read, and
12930 you don't see them any more.  (Unless you explicitly ask for them.)
12931
12932 In particular, you do not do anything explicitly to delete messages.
12933
12934 Does this mean that all the messages that have been marked as read are
12935 deleted?  How awful!
12936
12937 But, no, it means that old messages are @dfn{expired} according to some
12938 scheme or other.  For news messages, the expire process is controlled by
12939 the news administrator; for mail, the expire process is controlled by
12940 you.  The expire process for mail is covered in depth in @pxref{Expiring
12941 Mail}.
12942
12943 What many Gnus users find, after using it a while for both news and
12944 mail, is that the transport mechanism has very little to do with how
12945 they want to treat a message.
12946
12947 Many people subscribe to several mailing lists.  These are transported
12948 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
12949 answering, or even reading these messages very carefully.  We may not
12950 need to save them because if we should need to read one again, they are
12951 archived somewhere else.
12952
12953 Some people have local news groups which have only a handful of readers.
12954 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
12955 to read and answer a large fraction of the messages very carefully in
12956 order to do our work.  And there may not be an archive, so we may need
12957 to save the interesting messages the same way we would personal mail.
12958
12959 The important distinction turns out to be not the transport mechanism,
12960 but other factors such as how interested we are in the subject matter,
12961 or how easy it is to retrieve the message if we need to read it again.
12962
12963 Gnus provides many options for sorting mail into ``groups'' which behave
12964 like newsgroups, and for treating each group (whether mail or news)
12965 differently.
12966
12967 Some users never get comfortable using the Gnus (ahem) paradigm and wish
12968 that Gnus should grow up and be a male, er, mail reader.  It is possible
12969 to whip Gnus into a more mailreaderly being, but, as said before, it's
12970 not easy.  People who prefer proper mail readers should try @sc{vm}
12971 instead, which is an excellent, and proper, mail reader.
12972
12973 I don't mean to scare anybody off, but I want to make it clear that you
12974 may be required to learn a new way of thinking about messages.  After
12975 you've been subjected to The Gnus Way, you will come to love it.  I can
12976 guarantee it.  (At least the guy who sold me the Emacs Subliminal
12977 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
12978 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
12979 You Do.)
12980
12981
12982 @node Getting Started Reading Mail
12983 @subsection Getting Started Reading Mail
12984
12985 It's quite easy to use Gnus to read your new mail.  You just plonk the
12986 mail back end of your choice into @code{gnus-secondary-select-methods},
12987 and things will happen automatically.
12988
12989 For instance, if you want to use @code{nnml} (which is a ``one file per
12990 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
12991
12992 @lisp
12993 (setq gnus-secondary-select-methods '((nnml "")))
12994 @end lisp
12995
12996 Now, the next time you start Gnus, this back end will be queried for new
12997 articles, and it will move all the messages in your spool file to its
12998 directory, which is @file{~/Mail/} by default.  The new group that will
12999 be created (@samp{mail.misc}) will be subscribed, and you can read it
13000 like any other group.
13001
13002 You will probably want to split the mail into several groups, though:
13003
13004 @lisp
13005 (setq nnmail-split-methods
13006       '(("junk" "^From:.*Lars Ingebrigtsen")
13007         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
13008         ("other" "")))
13009 @end lisp
13010
13011 This will result in three new @code{nnml} mail groups being created:
13012 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
13013 mail that doesn't fit into the first two groups will be placed in the
13014 last group.
13015
13016 This should be sufficient for reading mail with Gnus.  You might want to
13017 give the other sections in this part of the manual a perusal, though.
13018 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
13019
13020
13021 @node Splitting Mail
13022 @subsection Splitting Mail
13023 @cindex splitting mail
13024 @cindex mail splitting
13025
13026 @vindex nnmail-split-methods
13027 The @code{nnmail-split-methods} variable says how the incoming mail is
13028 to be split into groups.
13029
13030 @lisp
13031 (setq nnmail-split-methods
13032   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
13033     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
13034     ("mail.other" "")))
13035 @end lisp
13036
13037 This variable is a list of lists, where the first element of each of
13038 these lists is the name of the mail group (they do not have to be called
13039 something beginning with @samp{mail}, by the way), and the second
13040 element is a regular expression used on the header of each mail to
13041 determine if it belongs in this mail group.  The first string may
13042 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
13043 insert sub-expressions from the matched text.  For instance:
13044
13045 @lisp
13046 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
13047 @end lisp
13048
13049 The second element can also be a function.  In that case, it will be
13050 called narrowed to the headers with the first element of the rule as the
13051 argument.  It should return a non-@code{nil} value if it thinks that the
13052 mail belongs in that group.
13053
13054 The last of these groups should always be a general one, and the regular
13055 expression should @emph{always} be @samp{*} so that it matches any mails
13056 that haven't been matched by any of the other regexps.  (These rules are
13057 processed from the beginning of the alist toward the end.  The first
13058 rule to make a match will ``win'', unless you have crossposting enabled.
13059 In that case, all matching rules will ``win''.)
13060
13061 If you like to tinker with this yourself, you can set this variable to a
13062 function of your choice.  This function will be called without any
13063 arguments in a buffer narrowed to the headers of an incoming mail
13064 message.  The function should return a list of group names that it
13065 thinks should carry this mail message.
13066
13067 Note that the mail back ends are free to maul the poor, innocent,
13068 incoming headers all they want to.  They all add @code{Lines} headers;
13069 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
13070 @code{From<SPACE>} line to something else.
13071
13072 @vindex nnmail-crosspost
13073 The mail back ends all support cross-posting.  If several regexps match,
13074 the mail will be ``cross-posted'' to all those groups.
13075 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
13076 that no articles are crossposted to the general (@samp{*}) group.
13077
13078 @vindex nnmail-crosspost-link-function
13079 @cindex crosspost
13080 @cindex links
13081 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
13082 the crossposted articles.  However, not all file systems support hard
13083 links.  If that's the case for you, set
13084 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
13085 variable is @code{add-name-to-file} by default.)
13086
13087 @kindex M-x nnmail-split-history
13088 @kindex nnmail-split-history
13089 If you wish to see where the previous mail split put the messages, you
13090 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
13091 where re-spooling messages would put the messages, you can use
13092 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
13093 Group Commands}).
13094
13095 @vindex nnmail-split-header-length-limit
13096 Header lines longer than the value of
13097 @code{nnmail-split-header-length-limit} are excluded from the split
13098 function.
13099
13100 @vindex nnmail-mail-splitting-charset
13101 @vindex nnmail-mail-splitting-decodes
13102 By default the splitting codes @acronym{MIME} decodes headers so you
13103 can match on non-@acronym{ASCII} strings.  The
13104 @code{nnmail-mail-splitting-charset} variable specifies the default
13105 charset for decoding.  The behaviour can be turned off completely by
13106 binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
13107 useful if you want to match articles based on the raw header data.
13108
13109 @vindex nnmail-resplit-incoming
13110 By default, splitting is performed on all incoming messages.  If you
13111 specify a @code{directory} entry for the variable @code{mail-sources}
13112 @pxref{Mail Source Specifiers}, however, then splitting does
13113 @emph{not} happen by default.  You can set the variable
13114 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
13115 splitting happen even in this case.  (This variable has no effect on
13116 other kinds of entries.)
13117
13118 Gnus gives you all the opportunity you could possibly want for shooting
13119 yourself in the foot.  Let's say you create a group that will contain
13120 all the mail you get from your boss.  And then you accidentally
13121 unsubscribe from the group.  Gnus will still put all the mail from your
13122 boss in the unsubscribed group, and so, when your boss mails you ``Have
13123 that report ready by Monday or you're fired!'', you'll never see it and,
13124 come Tuesday, you'll still believe that you're gainfully employed while
13125 you really should be out collecting empty bottles to save up for next
13126 month's rent money.
13127
13128
13129 @node Mail Sources
13130 @subsection Mail Sources
13131
13132 Mail can be gotten from many different sources---the mail spool, from
13133 a @acronym{POP} mail server, from a procmail directory, or from a
13134 maildir, for instance.
13135
13136 @menu
13137 * Mail Source Specifiers::      How to specify what a mail source is.
13138 * Mail Source Customization::   Some variables that influence things.
13139 * Fetching Mail::               Using the mail source specifiers.
13140 @end menu
13141
13142
13143 @node Mail Source Specifiers
13144 @subsubsection Mail Source Specifiers
13145 @cindex POP
13146 @cindex mail server
13147 @cindex procmail
13148 @cindex mail spool
13149 @cindex mail source
13150
13151 You tell Gnus how to fetch mail by setting @code{mail-sources}
13152 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
13153
13154 Here's an example:
13155
13156 @lisp
13157 (pop :server "pop3.mailserver.com" :user "myname")
13158 @end lisp
13159
13160 As can be observed, a mail source specifier is a list where the first
13161 element is a @dfn{mail source type}, followed by an arbitrary number of
13162 @dfn{keywords}.  Keywords that are not explicitly specified are given
13163 default values.
13164
13165 The following mail source types are available:
13166
13167 @table @code
13168 @item file
13169 Get mail from a single file; typically from the mail spool.
13170
13171 Keywords:
13172
13173 @table @code
13174 @item :path
13175 The file name.  Defaults to the value of the @env{MAIL}
13176 environment variable or the value of @code{rmail-spool-directory}
13177 (usually something like @file{/usr/mail/spool/user-name}).
13178
13179 @item :prescript
13180 @itemx :postscript
13181 Script run before/after fetching mail.
13182 @end table
13183
13184 An example file mail source:
13185
13186 @lisp
13187 (file :path "/usr/spool/mail/user-name")
13188 @end lisp
13189
13190 Or using the default file name:
13191
13192 @lisp
13193 (file)
13194 @end lisp
13195
13196 If the mail spool file is not located on the local machine, it's best
13197 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
13198 You can not use ange-ftp file names here---it has no way to lock the
13199 mail spool while moving the mail.
13200
13201 If it's impossible to set up a proper server, you can use ssh instead.
13202
13203 @lisp
13204 (setq mail-sources
13205       '((file :prescript "ssh host bin/getmail >%t")))
13206 @end lisp
13207
13208 The @samp{getmail} script would look something like the following:
13209
13210 @example
13211 #!/bin/sh
13212 #  getmail - move mail from spool to stdout
13213 #  flu@@iki.fi
13214
13215 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
13216 TMP=$HOME/Mail/tmp
13217 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
13218 @end example
13219
13220 Alter this script to fit find the @samp{movemail} you want to use.
13221
13222
13223 @item directory
13224 @vindex nnmail-scan-directory-mail-source-once
13225 Get mail from several files in a directory.  This is typically used
13226 when you have procmail split the incoming mail into several files.
13227 That is, there is a one-to-one correspondence between files in that
13228 directory and groups, so that mail from the file @file{foo.bar.spool}
13229 will be put in the group @code{foo.bar}.  (You can change the suffix
13230 to be used instead of @code{.spool}.)  Setting
13231 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
13232 Gnus to scan the mail source only once.  This is particularly useful
13233 if you want to scan mail groups at a specified level.
13234
13235 @vindex nnmail-resplit-incoming
13236 There is also the variable @code{nnmail-resplit-incoming}, if you set
13237 that to a non-@code{nil} value, then the normal splitting process is
13238 applied to all the files from the directory, @ref{Splitting Mail}.
13239
13240 Keywords:
13241
13242 @table @code
13243 @item :path
13244 The name of the directory where the files are.  There is no default
13245 value.
13246
13247 @item :suffix
13248 Only files ending with this suffix are used.  The default is
13249 @samp{.spool}.
13250
13251 @item :predicate
13252 Only files that have this predicate return non-@code{nil} are returned.
13253 The default is @code{identity}.  This is used as an additional
13254 filter---only files that have the right suffix @emph{and} satisfy this
13255 predicate are considered.
13256
13257 @item :prescript
13258 @itemx :postscript
13259 Script run before/after fetching mail.
13260
13261 @end table
13262
13263 An example directory mail source:
13264
13265 @lisp
13266 (directory :path "/home/user-name/procmail-dir/"
13267            :suffix ".prcml")
13268 @end lisp
13269
13270 @item pop
13271 Get mail from a @acronym{POP} server.
13272
13273 Keywords:
13274
13275 @table @code
13276 @item :server
13277 The name of the @acronym{POP} server.  The default is taken from the
13278 @env{MAILHOST} environment variable.
13279
13280 @item :port
13281 The port number of the @acronym{POP} server.  This can be a number (eg,
13282 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
13283 string, it should be a service name as listed in @file{/etc/services} on
13284 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
13285 need to specify it as @samp{"pop-3"} instead.
13286
13287 @item :user
13288 The user name to give to the @acronym{POP} server.  The default is the login
13289 name.
13290
13291 @item :password
13292 The password to give to the @acronym{POP} server.  If not specified,
13293 the user is prompted.
13294
13295 @item :program
13296 The program to use to fetch mail from the @acronym{POP} server.  This
13297 should be a @code{format}-like string.  Here's an example:
13298
13299 @example
13300 fetchmail %u@@%s -P %p %t
13301 @end example
13302
13303 The valid format specifier characters are:
13304
13305 @table @samp
13306 @item t
13307 The name of the file the mail is to be moved to.  This must always be
13308 included in this string.
13309
13310 @item s
13311 The name of the server.
13312
13313 @item P
13314 The port number of the server.
13315
13316 @item u
13317 The user name to use.
13318
13319 @item p
13320 The password to use.
13321 @end table
13322
13323 The values used for these specs are taken from the values you give the
13324 corresponding keywords.
13325
13326 @item :prescript
13327 A script to be run before fetching the mail.  The syntax is the same as
13328 the @code{:program} keyword.  This can also be a function to be run.
13329
13330 @item :postscript
13331 A script to be run after fetching the mail.  The syntax is the same as
13332 the @code{:program} keyword.  This can also be a function to be run.
13333
13334 @item :function
13335 The function to use to fetch mail from the @acronym{POP} server.  The
13336 function is called with one parameter---the name of the file where the
13337 mail should be moved to.
13338
13339 @item :authentication
13340 This can be either the symbol @code{password} or the symbol @code{apop}
13341 and says what authentication scheme to use.  The default is
13342 @code{password}.
13343
13344 @end table
13345
13346 If the @code{:program} and @code{:function} keywords aren't specified,
13347 @code{pop3-movemail} will be used.
13348
13349 Here are some examples.  Fetch from the default @acronym{POP} server,
13350 using the default user name, and default fetcher:
13351
13352 @lisp
13353 (pop)
13354 @end lisp
13355
13356 Fetch from a named server with a named user and password:
13357
13358 @lisp
13359 (pop :server "my.pop.server"
13360      :user "user-name" :password "secret")
13361 @end lisp
13362
13363 Use @samp{movemail} to move the mail:
13364
13365 @lisp
13366 (pop :program "movemail po:%u %t %p")
13367 @end lisp
13368
13369 @item maildir
13370 Get mail from a maildir.  This is a type of mailbox that is supported by
13371 at least qmail and postfix, where each file in a special directory
13372 contains exactly one mail.
13373
13374 Keywords:
13375
13376 @table @code
13377 @item :path
13378 The name of the directory where the mails are stored.  The default is
13379 taken from the @env{MAILDIR} environment variable or
13380 @file{~/Maildir/}.
13381 @item :subdirs
13382 The subdirectories of the Maildir.  The default is
13383 @samp{("new" "cur")}.
13384
13385 @c If you sometimes look at your mail through a pop3 daemon before fetching
13386 @c them with Gnus, you may also have to fetch your mails from the
13387 @c @code{cur} directory inside the maildir, like in the first example
13388 @c below.
13389
13390 You can also get mails from remote hosts (because maildirs don't suffer
13391 from locking problems).
13392
13393 @end table
13394
13395 Two example maildir mail sources:
13396
13397 @lisp
13398 (maildir :path "/home/user-name/Maildir/"
13399          :subdirs ("cur" "new"))
13400 @end lisp
13401
13402 @lisp
13403 (maildir :path "/user@@remotehost.org:~/Maildir/"
13404          :subdirs ("new"))
13405 @end lisp
13406
13407 @item imap
13408 Get mail from a @acronym{IMAP} server.  If you don't want to use
13409 @acronym{IMAP} as intended, as a network mail reading protocol (ie
13410 with nnimap), for some reason or other, Gnus let you treat it similar
13411 to a @acronym{POP} server and fetches articles from a given
13412 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
13413
13414 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
13415 may need external programs and libraries, @xref{IMAP}.
13416
13417 Keywords:
13418
13419 @table @code
13420 @item :server
13421 The name of the @acronym{IMAP} server.  The default is taken from the
13422 @env{MAILHOST} environment variable.
13423
13424 @item :port
13425 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
13426 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
13427
13428 @item :user
13429 The user name to give to the @acronym{IMAP} server.  The default is the login
13430 name.
13431
13432 @item :password
13433 The password to give to the @acronym{IMAP} server.  If not specified, the user is
13434 prompted.
13435
13436 @item :stream
13437 What stream to use for connecting to the server, this is one of the
13438 symbols in @code{imap-stream-alist}.  Right now, this means
13439 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
13440 @samp{ssl}, @samp{shell} or the default @samp{network}.
13441
13442 @item :authentication
13443 Which authenticator to use for authenticating to the server, this is
13444 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13445 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13446 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13447
13448 @item :program
13449 When using the `shell' :stream, the contents of this variable is
13450 mapped into the @code{imap-shell-program} variable.  This should be a
13451 @code{format}-like string (or list of strings).  Here's an example:
13452
13453 @example
13454 ssh %s imapd
13455 @end example
13456
13457 The valid format specifier characters are:
13458
13459 @table @samp
13460 @item s
13461 The name of the server.
13462
13463 @item l
13464 User name from @code{imap-default-user}.
13465
13466 @item p
13467 The port number of the server.
13468 @end table
13469
13470 The values used for these specs are taken from the values you give the
13471 corresponding keywords.
13472
13473 @item :mailbox
13474 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13475 which normally is the mailbox which receive incoming mail.
13476
13477 @item :predicate
13478 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13479 UNDELETED}, is probably the best choice for most people, but if you
13480 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
13481 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13482 Then all articles in the mailbox is fetched, no matter what.  For a
13483 complete list of predicates, see RFC 2060 section 6.4.4.
13484
13485 @item :fetchflag
13486 How to flag fetched articles on the server, the default @samp{\Deleted}
13487 will mark them as deleted, an alternative would be @samp{\Seen} which
13488 would simply mark them as read.  These are the two most likely choices,
13489 but more flags are defined in RFC 2060 section 2.3.2.
13490
13491 @item :dontexpunge
13492 If non-@code{nil}, don't remove all articles marked as deleted in the
13493 mailbox after finishing the fetch.
13494
13495 @end table
13496
13497 An example @acronym{IMAP} mail source:
13498
13499 @lisp
13500 (imap :server "mail.mycorp.com"
13501       :stream kerberos4
13502       :fetchflag "\\Seen")
13503 @end lisp
13504
13505 @item webmail
13506 Get mail from a webmail server, such as @uref{www.hotmail.com},
13507 @uref{webmail.netscape.com}, @uref{www.netaddress.com},
13508 @uref{mail.yahoo.com}.
13509
13510 NOTE: Webmail largely depends cookies. A "one-line-cookie" patch is
13511 required for url "4.0pre.46".
13512
13513 WARNING: Mails may be lost.  NO WARRANTY.
13514
13515 Keywords:
13516
13517 @table @code
13518 @item :subtype
13519 The type of the webmail server.  The default is @code{hotmail}.  The
13520 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13521
13522 @item :user
13523 The user name to give to the webmail server.  The default is the login
13524 name.
13525
13526 @item :password
13527 The password to give to the webmail server.  If not specified, the user is
13528 prompted.
13529
13530 @item :dontexpunge
13531 If non-@code{nil}, only fetch unread articles and don't move them to
13532 trash folder after finishing the fetch.
13533
13534 @end table
13535
13536 An example webmail source:
13537
13538 @lisp
13539 (webmail :subtype 'hotmail
13540          :user "user-name"
13541          :password "secret")
13542 @end lisp
13543 @end table
13544
13545 @table @dfn
13546 @item Common Keywords
13547 Common keywords can be used in any type of mail source.
13548
13549 Keywords:
13550
13551 @table @code
13552 @item :plugged
13553 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
13554 use directory source to get mail, you can specify it as in this
13555 example:
13556
13557 @lisp
13558 (setq mail-sources
13559       '((directory :path "/home/pavel/.Spool/"
13560                    :suffix ""
13561                    :plugged t)))
13562 @end lisp
13563
13564 Gnus will then fetch your mail even when you are unplugged.  This is
13565 useful when you use local mail and news.
13566
13567 @end table
13568 @end table
13569
13570 @subsubsection Function Interface
13571
13572 Some of the above keywords specify a Lisp function to be executed.
13573 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13574 the value of the keyword while the function is executing.  For example,
13575 consider the following mail-source setting:
13576
13577 @lisp
13578 (setq mail-sources '((pop :user "jrl"
13579                           :server "pophost" :function fetchfunc)))
13580 @end lisp
13581
13582 While the function @code{fetchfunc} is executing, the symbol @code{user}
13583 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13584 @code{"pophost"}.  The symbols @code{port}, @code{password},
13585 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13586 and @code{authentication} are also bound (to their default values).
13587
13588 See above for a list of keywords for each type of mail source.
13589
13590
13591 @node Mail Source Customization
13592 @subsubsection Mail Source Customization
13593
13594 The following is a list of variables that influence how the mail is
13595 fetched.  You would normally not need to set or change any of these
13596 variables.
13597
13598 @table @code
13599 @item mail-source-crash-box
13600 @vindex mail-source-crash-box
13601 File where mail will be stored while processing it.  The default is
13602 @file{~/.emacs-mail-crash-box}.
13603
13604 @item mail-source-delete-incoming
13605 @vindex mail-source-delete-incoming
13606 If non-@code{nil}, delete incoming files after handling them.  If
13607 @code{t}, delete the files immediately, if @code{nil}, never delete any
13608 files.  If a positive number, delete files older than number of days
13609 (This will only happen, when reveiving new mail).  You may also set
13610 @code{mail-source-delete-incoming} to @code{nil} and call
13611 @code{mail-source-delete-old-incoming} from a hook or interactively.
13612
13613 @item mail-source-delete-old-incoming-confirm
13614 @vindex mail-source-delete-old-incoming-confirm
13615 If non-@code{nil}, ask for for confirmation before deleting old incoming
13616 files.  This variable only applies when
13617 @code{mail-source-delete-incoming} is a positive number.
13618
13619 @item mail-source-ignore-errors
13620 @vindex mail-source-ignore-errors
13621 If non-@code{nil}, ignore errors when reading mail from a mail source.
13622
13623 @item mail-source-directory
13624 @vindex mail-source-directory
13625 Directory where files (if any) will be stored.  The default is
13626 @file{~/Mail/}.  At present, the only thing this is used for is to say
13627 where the incoming files will be stored if the previous variable is
13628 @code{nil}.
13629
13630 @item mail-source-incoming-file-prefix
13631 @vindex mail-source-incoming-file-prefix
13632 Prefix for file name for storing incoming mail.  The default is
13633 @file{Incoming}, in which case files will end up with names like
13634 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13635 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13636
13637 @item mail-source-default-file-modes
13638 @vindex mail-source-default-file-modes
13639 All new mail files will get this file mode.  The default is 384.
13640
13641 @item mail-source-movemail-program
13642 @vindex mail-source-movemail-program
13643 If non-@code{nil}, name of program for fetching new mail.  If
13644 @code{nil}, @code{movemail} in @var{exec-directory}.
13645
13646 @end table
13647
13648
13649 @node Fetching Mail
13650 @subsubsection Fetching Mail
13651
13652 @vindex mail-sources
13653 @vindex nnmail-spool-file
13654 The way to actually tell Gnus where to get new mail from is to set
13655 @code{mail-sources} to a list of mail source specifiers
13656 (@pxref{Mail Source Specifiers}).
13657
13658 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13659 @code{nil}, the mail back ends will never attempt to fetch mail by
13660 themselves.
13661
13662 If you want to fetch mail both from your local spool as well as a
13663 @acronym{POP} mail server, you'd say something like:
13664
13665 @lisp
13666 (setq mail-sources
13667       '((file)
13668         (pop :server "pop3.mail.server"
13669              :password "secret")))
13670 @end lisp
13671
13672 Or, if you don't want to use any of the keyword defaults:
13673
13674 @lisp
13675 (setq mail-sources
13676       '((file :path "/var/spool/mail/user-name")
13677         (pop :server "pop3.mail.server"
13678              :user "user-name"
13679              :port "pop3"
13680              :password "secret")))
13681 @end lisp
13682
13683
13684 When you use a mail back end, Gnus will slurp all your mail from your
13685 inbox and plonk it down in your home directory.  Gnus doesn't move any
13686 mail if you're not using a mail back end---you have to do a lot of magic
13687 invocations first.  At the time when you have finished drawing the
13688 pentagram, lightened the candles, and sacrificed the goat, you really
13689 shouldn't be too surprised when Gnus moves your mail.
13690
13691
13692
13693 @node Mail Back End Variables
13694 @subsection Mail Back End Variables
13695
13696 These variables are (for the most part) pertinent to all the various
13697 mail back ends.
13698
13699 @table @code
13700 @vindex nnmail-read-incoming-hook
13701 @item nnmail-read-incoming-hook
13702 The mail back ends all call this hook after reading new mail.  You can
13703 use this hook to notify any mail watch programs, if you want to.
13704
13705 @vindex nnmail-split-hook
13706 @item nnmail-split-hook
13707 @findex gnus-article-decode-encoded-words
13708 @findex RFC 1522 decoding
13709 @findex RFC 2047 decoding
13710 Hook run in the buffer where the mail headers of each message is kept
13711 just before the splitting based on these headers is done.  The hook is
13712 free to modify the buffer contents in any way it sees fit---the buffer
13713 is discarded after the splitting has been done, and no changes performed
13714 in the buffer will show up in any files.
13715 @code{gnus-article-decode-encoded-words} is one likely function to add
13716 to this hook.
13717
13718 @vindex nnmail-pre-get-new-mail-hook
13719 @vindex nnmail-post-get-new-mail-hook
13720 @item nnmail-pre-get-new-mail-hook
13721 @itemx nnmail-post-get-new-mail-hook
13722 These are two useful hooks executed when treating new incoming
13723 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13724 starting to handle the new mail) and
13725 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13726 is done).  Here's and example of using these two hooks to change the
13727 default file modes the new mail files get:
13728
13729 @lisp
13730 (add-hook 'nnmail-pre-get-new-mail-hook
13731           (lambda () (set-default-file-modes 511)))
13732
13733 (add-hook 'nnmail-post-get-new-mail-hook
13734           (lambda () (set-default-file-modes 551)))
13735 @end lisp
13736
13737 @item nnmail-use-long-file-names
13738 @vindex nnmail-use-long-file-names
13739 If non-@code{nil}, the mail back ends will use long file and directory
13740 names.  Groups like @samp{mail.misc} will end up in directories
13741 (assuming use of @code{nnml} back end) or files (assuming use of
13742 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13743 the same group will end up in @file{mail/misc}.
13744
13745 @item nnmail-delete-file-function
13746 @vindex nnmail-delete-file-function
13747 @findex delete-file
13748 Function called to delete files.  It is @code{delete-file} by default.
13749
13750 @item nnmail-cache-accepted-message-ids
13751 @vindex nnmail-cache-accepted-message-ids
13752 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13753 the back end (via @code{Gcc}, for instance) into the mail duplication
13754 discovery cache.  The default is @code{nil}.
13755
13756 @item nnmail-cache-ignore-groups
13757 @vindex nnmail-cache-ignore-groups
13758 This can be a regular expression or a list of regular expressions.
13759 Group names that match any of the regular expressions will never be
13760 recorded in the @code{Message-ID} cache.
13761
13762 This can be useful, for example, when using Fancy Splitting
13763 (@pxref{Fancy Mail Splitting}) together with the function
13764 @code{nnmail-split-fancy-with-parent}.
13765
13766 @end table
13767
13768
13769 @node Fancy Mail Splitting
13770 @subsection Fancy Mail Splitting
13771 @cindex mail splitting
13772 @cindex fancy mail splitting
13773
13774 @vindex nnmail-split-fancy
13775 @findex nnmail-split-fancy
13776 If the rather simple, standard method for specifying how to split mail
13777 doesn't allow you to do what you want, you can set
13778 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13779 play with the @code{nnmail-split-fancy} variable.
13780
13781 Let's look at an example value of this variable first:
13782
13783 @lisp
13784 ;; @r{Messages from the mailer daemon are not crossposted to any of}
13785 ;; @r{the ordinary groups.  Warnings are put in a separate group}
13786 ;; @r{from real errors.}
13787 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13788                    "mail.misc"))
13789    ;; @r{Non-error messages are crossposted to all relevant}
13790    ;; @r{groups, but we don't crosspost between the group for the}
13791    ;; @r{(ding) list and the group for other (ding) related mail.}
13792    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13793          ("subject" "ding" "ding.misc"))
13794       ;; @r{Other mailing lists@dots{}}
13795       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13796       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13797       ;; @r{Both lists below have the same suffix, so prevent}
13798       ;; @r{cross-posting to mkpkg.list of messages posted only to}
13799       ;; @r{the bugs- list, but allow cross-posting when the}
13800       ;; @r{message was really cross-posted.}
13801       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13802       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13803       ;; @r{People@dots{}}
13804       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13805    ;; @r{Unmatched mail goes to the catch all group.}
13806    "misc.misc")
13807 @end lisp
13808
13809 This variable has the format of a @dfn{split}.  A split is a (possibly)
13810 recursive structure where each split may contain other splits.  Here are
13811 the five possible split syntaxes:
13812
13813 @enumerate
13814
13815 @item
13816 @samp{group}: If the split is a string, that will be taken as a group
13817 name.  Normal regexp match expansion will be done.  See below for
13818 examples.
13819
13820 @item
13821 @code{(@var{field} @var{value} @code{[-} @var{restrict}
13822 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
13823 first element of which is a string, then store the message as
13824 specified by @var{split}, if header @var{field} (a regexp) contains
13825 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
13826 matches some string after @var{field} and before the end of the
13827 matched @var{value}, the @var{split} is ignored.  If none of the
13828 @var{restrict} clauses match, @var{split} is processed.
13829
13830 @item
13831 @code{(| @var{split}@dots{})}: If the split is a list, and the first
13832 element is @code{|} (vertical bar), then process each @var{split} until
13833 one of them matches.  A @var{split} is said to match if it will cause
13834 the mail message to be stored in one or more groups.
13835
13836 @item
13837 @code{(& @var{split}@dots{})}: If the split is a list, and the first
13838 element is @code{&}, then process all @var{split}s in the list.
13839
13840 @item
13841 @code{junk}: If the split is the symbol @code{junk}, then don't save
13842 (i.e., delete) this message.  Use with extreme caution.
13843
13844 @item
13845 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
13846 a list, and the first element is @code{:}, then the second element will
13847 be called as a function with @var{args} given as arguments.  The
13848 function should return a @var{split}.
13849
13850 @cindex body split
13851 For instance, the following function could be used to split based on the
13852 body of the messages:
13853
13854 @lisp
13855 (defun split-on-body ()
13856   (save-excursion
13857     (set-buffer " *nnmail incoming*")
13858     (goto-char (point-min))
13859     (when (re-search-forward "Some.*string" nil t)
13860       "string.group")))
13861 @end lisp
13862
13863 The @samp{" *nnmail incoming*"} is narrowed to the message in question
13864 when the @code{:} function is run.
13865
13866 @item
13867 @code{(! @var{func} @var{split})}: If the split is a list, and the
13868 first element is @code{!}, then @var{split} will be processed, and
13869 @var{func} will be called as a function with the result of @var{split}
13870 as argument.  @var{func} should return a split.
13871
13872 @item
13873 @code{nil}: If the split is @code{nil}, it is ignored.
13874
13875 @end enumerate
13876
13877 In these splits, @var{field} must match a complete field name.
13878 @var{value} must match a complete word according to the fundamental mode
13879 syntax table.  You can use @code{.*} in the regexps to match partial
13880 field names or words.  In other words, all @var{value}'s are wrapped in
13881 @samp{\<} and @samp{\>} pairs.
13882
13883 @vindex nnmail-split-abbrev-alist
13884 @var{field} and @var{value} can also be lisp symbols, in that case they
13885 are expanded as specified by the variable
13886 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells, where
13887 the @code{car} of a cell contains the key, and the @code{cdr} contains the associated
13888 value.
13889
13890 @vindex nnmail-split-fancy-syntax-table
13891 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13892 when all this splitting is performed.
13893
13894 If you want to have Gnus create groups dynamically based on some
13895 information in the headers (i.e., do @code{replace-match}-like
13896 substitutions in the group names), you can say things like:
13897
13898 @example
13899 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13900 @end example
13901
13902 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13903 will be filed in @samp{mail.debian.foo}.
13904
13905 If the string contains the element @samp{\&}, then the previously
13906 matched string will be substituted.  Similarly, the elements @samp{\\1}
13907 up to @samp{\\9} will be substituted with the text matched by the
13908 groupings 1 through 9.
13909
13910 @findex nnmail-split-fancy-with-parent
13911 @code{nnmail-split-fancy-with-parent} is a function which allows you to
13912 split followups into the same groups their parents are in.  Sometimes
13913 you can't make splitting rules for all your mail.  For example, your
13914 boss might send you personal mail regarding different projects you are
13915 working on, and as you can't tell your boss to put a distinguishing
13916 string into the subject line, you have to resort to manually moving the
13917 messages into the right group.  With this function, you only have to do
13918 it once per thread.
13919
13920 To use this feature, you have to set @code{nnmail-treat-duplicates}
13921 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
13922 value.  And then you can include @code{nnmail-split-fancy-with-parent}
13923 using the colon feature, like so:
13924 @lisp
13925 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
13926       nnmail-cache-accepted-message-ids t
13927       nnmail-split-fancy
13928       '(| (: nnmail-split-fancy-with-parent)
13929           ;; @r{other splits go here}
13930         ))
13931 @end lisp
13932
13933 This feature works as follows: when @code{nnmail-treat-duplicates} is
13934 non-@code{nil}, Gnus records the message id of every message it sees
13935 in the file specified by the variable
13936 @code{nnmail-message-id-cache-file}, together with the group it is in
13937 (the group is omitted for non-mail messages).  When mail splitting is
13938 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
13939 at the References (and In-Reply-To) header of each message to split
13940 and searches the file specified by @code{nnmail-message-id-cache-file}
13941 for the message ids.  When it has found a parent, it returns the
13942 corresponding group name unless the group name matches the regexp
13943 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
13944 recommended that you set @code{nnmail-message-id-cache-length} to a
13945 somewhat higher number than the default so that the message ids are
13946 still in the cache.  (A value of 5000 appears to create a file some
13947 300 kBytes in size.)
13948 @vindex nnmail-cache-accepted-message-ids
13949 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
13950 also records the message ids of moved articles, so that the followup
13951 messages goes into the new group.
13952
13953 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
13954 want certain groups to be recorded in the cache.  For example, if all
13955 outgoing messages are written to an `outgoing' group, you could set
13956 @code{nnmail-cache-ignore-groups} to match that group name.
13957 Otherwise, answers to all your messages would end up in the
13958 `outgoing' group.
13959
13960
13961 @node Group Mail Splitting
13962 @subsection Group Mail Splitting
13963 @cindex mail splitting
13964 @cindex group mail splitting
13965
13966 @findex gnus-group-split
13967 If you subscribe to dozens of mailing lists but you don't want to
13968 maintain mail splitting rules manually, group mail splitting is for you.
13969 You just have to set @var{to-list} and/or @var{to-address} in group
13970 parameters or group customization and set @code{nnmail-split-methods} to
13971 @code{gnus-group-split}.  This splitting function will scan all groups
13972 for those parameters and split mail accordingly, i.e., messages posted
13973 from or to the addresses specified in the parameters @var{to-list} or
13974 @var{to-address} of a mail group will be stored in that group.
13975
13976 Sometimes, mailing lists have multiple addresses, and you may want mail
13977 splitting to recognize them all: just set the @var{extra-aliases} group
13978 parameter to the list of additional addresses and it's done.  If you'd
13979 rather use a regular expression, set @var{split-regexp}.
13980
13981 All these parameters in a group will be used to create an
13982 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
13983 the @var{value} is a single regular expression that matches
13984 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
13985 matches of @var{split-regexp}, and the @var{split} is the name of the
13986 group.  @var{restrict}s are also supported: just set the
13987 @var{split-exclude} parameter to a list of regular expressions.
13988
13989 If you can't get the right split to be generated using all these
13990 parameters, or you just need something fancier, you can set the
13991 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
13992 this case, all other aforementioned parameters will be ignored by
13993 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
13994 @code{nil}, in which case the group will be ignored by
13995 @code{gnus-group-split}.
13996
13997 @vindex gnus-group-split-default-catch-all-group
13998 @code{gnus-group-split} will do cross-posting on all groups that match,
13999 by defining a single @code{&} fancy split containing one split for each
14000 group.  If a message doesn't match any split, it will be stored in the
14001 group named in @code{gnus-group-split-default-catch-all-group}, unless
14002 some group has @var{split-spec} set to @code{catch-all}, in which case
14003 that group is used as the catch-all group.  Even though this variable is
14004 often used just to name a group, it may also be set to an arbitrarily
14005 complex fancy split (after all, a group name is a fancy split), and this
14006 may be useful to split mail that doesn't go to any mailing list to
14007 personal mail folders.  Note that this fancy split is added as the last
14008 element of a @code{|} split list that also contains a @code{&} split
14009 with the rules extracted from group parameters.
14010
14011 It's time for an example.  Assume the following group parameters have
14012 been defined:
14013
14014 @example
14015 nnml:mail.bar:
14016 ((to-address . "bar@@femail.com")
14017  (split-regexp . ".*@@femail\\.com"))
14018 nnml:mail.foo:
14019 ((to-list . "foo@@nowhere.gov")
14020  (extra-aliases "foo@@localhost" "foo-redist@@home")
14021  (split-exclude "bugs-foo" "rambling-foo")
14022  (admin-address . "foo-request@@nowhere.gov"))
14023 nnml:mail.others:
14024 ((split-spec . catch-all))
14025 @end example
14026
14027 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
14028 behave as if @code{nnmail-split-fancy} had been selected and variable
14029 @code{nnmail-split-fancy} had been set as follows:
14030
14031 @lisp
14032 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
14033       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
14034            - "bugs-foo" - "rambling-foo" "mail.foo"))
14035    "mail.others")
14036 @end lisp
14037
14038 @findex gnus-group-split-fancy
14039 If you'd rather not use group splitting for all your mail groups, you
14040 may use it for only some of them, by using @code{nnmail-split-fancy}
14041 splits like this:
14042
14043 @lisp
14044 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
14045 @end lisp
14046
14047 @var{groups} may be a regular expression or a list of group names whose
14048 parameters will be scanned to generate the output split.
14049 @var{no-crosspost} can be used to disable cross-posting; in this case, a
14050 single @code{|} split will be output.  @var{catch-all} is the fallback
14051 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
14052 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
14053 empty string in any selected group, no catch-all split will be issued.
14054 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
14055 this group will override the value of the @var{catch-all} argument.
14056
14057 @findex gnus-group-split-setup
14058 Unfortunately, scanning all groups and their parameters can be quite
14059 slow, especially considering that it has to be done for every message.
14060 But don't despair!  The function @code{gnus-group-split-setup} can be
14061 used to enable @code{gnus-group-split} in a much more efficient way.  It
14062 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
14063 @code{nnmail-split-fancy} to the split produced by
14064 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
14065 scanned once, no matter how many messages are split.
14066
14067 @findex gnus-group-split-update
14068 However, if you change group parameters, you'd have to update
14069 @code{nnmail-split-fancy} manually.  You can do it by running
14070 @code{gnus-group-split-update}.  If you'd rather have it updated
14071 automatically, just tell @code{gnus-group-split-setup} to do it for
14072 you.  For example, add to your @file{~/.gnus.el}:
14073
14074 @lisp
14075 (gnus-group-split-setup @var{auto-update} @var{catch-all})
14076 @end lisp
14077
14078 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
14079 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
14080 have to worry about updating @code{nnmail-split-fancy} again.  If you
14081 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
14082 @code{gnus-group-split-default-catch-all-group} will be set to its
14083 value.
14084
14085 @vindex gnus-group-split-updated-hook
14086 Because you may want to change @code{nnmail-split-fancy} after it is set
14087 by @code{gnus-group-split-update}, this function will run
14088 @code{gnus-group-split-updated-hook} just before finishing.
14089
14090 @node Incorporating Old Mail
14091 @subsection Incorporating Old Mail
14092 @cindex incorporating old mail
14093 @cindex import old mail
14094
14095 Most people have lots of old mail stored in various file formats.  If
14096 you have set up Gnus to read mail using one of the spiffy Gnus mail
14097 back ends, you'll probably wish to have that old mail incorporated into
14098 your mail groups.
14099
14100 Doing so can be quite easy.
14101
14102 To take an example: You're reading mail using @code{nnml}
14103 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
14104 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
14105 file filled with important, but old, mail.  You want to move it into
14106 your @code{nnml} groups.
14107
14108 Here's how:
14109
14110 @enumerate
14111 @item
14112 Go to the group buffer.
14113
14114 @item
14115 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
14116 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
14117
14118 @item
14119 Type @kbd{SPACE} to enter the newly created group.
14120
14121 @item
14122 Type @kbd{M P b} to process-mark all articles in this group's buffer
14123 (@pxref{Setting Process Marks}).
14124
14125 @item
14126 Type @kbd{B r} to respool all the process-marked articles, and answer
14127 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
14128 @end enumerate
14129
14130 All the mail messages in the mbox file will now also be spread out over
14131 all your @code{nnml} groups.  Try entering them and check whether things
14132 have gone without a glitch.  If things look ok, you may consider
14133 deleting the mbox file, but I wouldn't do that unless I was absolutely
14134 sure that all the mail has ended up where it should be.
14135
14136 Respooling is also a handy thing to do if you're switching from one mail
14137 back end to another.  Just respool all the mail in the old mail groups
14138 using the new mail back end.
14139
14140
14141 @node Expiring Mail
14142 @subsection Expiring Mail
14143 @cindex article expiry
14144
14145 Traditional mail readers have a tendency to remove mail articles when
14146 you mark them as read, in some way.  Gnus takes a fundamentally
14147 different approach to mail reading.
14148
14149 Gnus basically considers mail just to be news that has been received in
14150 a rather peculiar manner.  It does not think that it has the power to
14151 actually change the mail, or delete any mail messages.  If you enter a
14152 mail group, and mark articles as ``read'', or kill them in some other
14153 fashion, the mail articles will still exist on the system.  I repeat:
14154 Gnus will not delete your old, read mail.  Unless you ask it to, of
14155 course.
14156
14157 To make Gnus get rid of your unwanted mail, you have to mark the
14158 articles as @dfn{expirable}.  (With the default keybindings, this means
14159 that you have to type @kbd{E}.)  This does not mean that the articles
14160 will disappear right away, however.  In general, a mail article will be
14161 deleted from your system if, 1) it is marked as expirable, AND 2) it is
14162 more than one week old.  If you do not mark an article as expirable, it
14163 will remain on your system until hell freezes over.  This bears
14164 repeating one more time, with some spurious capitalizations: IF you do
14165 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
14166
14167 You do not have to mark articles as expirable by hand.  Gnus provides
14168 two features, called `auto-expire' and `total-expire', that can help you
14169 with this.  In a nutshell, `auto-expire' means that Gnus hits @kbd{E}
14170 for you when you select an article.  And `total-expire' means that Gnus
14171 considers all articles as expirable that are read.  So, in addition to
14172 the articles marked @samp{E}, also the articles marked @samp{r},
14173 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
14174 expirable.
14175
14176 When should either auto-expire or total-expire be used?  Most people
14177 who are subscribed to mailing lists split each list into its own group
14178 and then turn on auto-expire or total-expire for those groups.
14179 (@xref{Splitting Mail}, for more information on splitting each list
14180 into its own group.)
14181
14182 Which one is better, auto-expire or total-expire?  It's not easy to
14183 answer.  Generally speaking, auto-expire is probably faster.  Another
14184 advantage of auto-expire is that you get more marks to work with: for
14185 the articles that are supposed to stick around, you can still choose
14186 between tick and dormant and read marks.  But with total-expire, you
14187 only have dormant and ticked to choose from.  The advantage of
14188 total-expire is that it works well with adaptive scoring @pxref{Adaptive
14189 Scoring}.  Auto-expire works with normal scoring but not with adaptive
14190 scoring.
14191
14192 @vindex gnus-auto-expirable-newsgroups
14193 Groups that match the regular expression
14194 @code{gnus-auto-expirable-newsgroups} will have all articles that you
14195 read marked as expirable automatically.  All articles marked as
14196 expirable have an @samp{E} in the first column in the summary buffer.
14197
14198 By default, if you have auto expiry switched on, Gnus will mark all the
14199 articles you read as expirable, no matter if they were read or unread
14200 before.  To avoid having articles marked as read marked as expirable
14201 automatically, you can put something like the following in your
14202 @file{~/.gnus.el} file:
14203
14204 @vindex gnus-mark-article-hook
14205 @lisp
14206 (remove-hook 'gnus-mark-article-hook
14207              'gnus-summary-mark-read-and-unread-as-read)
14208 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
14209 @end lisp
14210
14211 Note that making a group auto-expirable doesn't mean that all read
14212 articles are expired---only the articles marked as expirable
14213 will be expired.  Also note that using the @kbd{d} command won't make
14214 articles expirable---only semi-automatic marking of articles as read will
14215 mark the articles as expirable in auto-expirable groups.
14216
14217 Let's say you subscribe to a couple of mailing lists, and you want the
14218 articles you have read to disappear after a while:
14219
14220 @lisp
14221 (setq gnus-auto-expirable-newsgroups
14222       "mail.nonsense-list\\|mail.nice-list")
14223 @end lisp
14224
14225 Another way to have auto-expiry happen is to have the element
14226 @code{auto-expire} in the group parameters of the group.
14227
14228 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
14229 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
14230 don't really mix very well.
14231
14232 @vindex nnmail-expiry-wait
14233 The @code{nnmail-expiry-wait} variable supplies the default time an
14234 expirable article has to live.  Gnus starts counting days from when the
14235 message @emph{arrived}, not from when it was sent.  The default is seven
14236 days.
14237
14238 Gnus also supplies a function that lets you fine-tune how long articles
14239 are to live, based on what group they are in.  Let's say you want to
14240 have one month expiry period in the @samp{mail.private} group, a one day
14241 expiry period in the @samp{mail.junk} group, and a six day expiry period
14242 everywhere else:
14243
14244 @vindex nnmail-expiry-wait-function
14245 @lisp
14246 (setq nnmail-expiry-wait-function
14247       (lambda (group)
14248        (cond ((string= group "mail.private")
14249                31)
14250              ((string= group "mail.junk")
14251                1)
14252              ((string= group "important")
14253                'never)
14254              (t
14255                6))))
14256 @end lisp
14257
14258 The group names this function is fed are ``unadorned'' group
14259 names---no @samp{nnml:} prefixes and the like.
14260
14261 The @code{nnmail-expiry-wait} variable and
14262 @code{nnmail-expiry-wait-function} function can either be a number (not
14263 necessarily an integer) or one of the symbols @code{immediate} or
14264 @code{never}.
14265
14266 You can also use the @code{expiry-wait} group parameter to selectively
14267 change the expiry period (@pxref{Group Parameters}).
14268
14269 @vindex nnmail-expiry-target
14270 The normal action taken when expiring articles is to delete them.
14271 However, in some circumstances it might make more sense to move them
14272 to other groups instead of deleting them.  The variable
14273 @code{nnmail-expiry-target} (and the @code{expiry-target} group
14274 parameter) controls this.  The variable supplies a default value for
14275 all groups, which can be overridden for specific groups by the group
14276 parameter.  default value is @code{delete}, but this can also be a
14277 string (which should be the name of the group the message should be
14278 moved to), or a function (which will be called in a buffer narrowed to
14279 the message in question, and with the name of the group being moved
14280 from as its parameter) which should return a target---either a group
14281 name or @code{delete}.
14282
14283 Here's an example for specifying a group name:
14284 @lisp
14285 (setq nnmail-expiry-target "nnml:expired")
14286 @end lisp
14287
14288 @findex nnmail-fancy-expiry-target
14289 @vindex nnmail-fancy-expiry-targets
14290 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
14291 expire mail to groups according to the variable
14292 @code{nnmail-fancy-expiry-targets}.  Here's an example:
14293
14294 @lisp
14295  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
14296        nnmail-fancy-expiry-targets
14297        '((to-from "boss" "nnfolder:Work")
14298          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
14299          ("from" ".*" "nnfolder:Archive-%Y")))
14300 @end lisp
14301
14302 With this setup, any mail that has @code{IMPORTANT} in its Subject
14303 header and was sent in the year @code{YYYY} and month @code{MMM}, will
14304 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}. If its
14305 From or To header contains the string @code{boss}, it will get expired
14306 to @code{nnfolder:Work}. All other mail will get expired to
14307 @code{nnfolder:Archive-YYYY}.
14308
14309 @vindex nnmail-keep-last-article
14310 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
14311 expire the final article in a mail newsgroup.  This is to make life
14312 easier for procmail users.
14313
14314 @vindex gnus-total-expirable-newsgroups
14315 By the way: That line up there, about Gnus never expiring non-expirable
14316 articles, is a lie.  If you put @code{total-expire} in the group
14317 parameters, articles will not be marked as expirable, but all read
14318 articles will be put through the expiry process.  Use with extreme
14319 caution.  Even more dangerous is the
14320 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
14321 this regexp will have all read articles put through the expiry process,
14322 which means that @emph{all} old mail articles in the groups in question
14323 will be deleted after a while.  Use with extreme caution, and don't come
14324 crying to me when you discover that the regexp you used matched the
14325 wrong group and all your important mail has disappeared.  Be a
14326 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
14327 with!  So there!
14328
14329 Most people make most of their mail groups total-expirable, though.
14330
14331 @vindex gnus-inhibit-user-auto-expire
14332 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
14333 commands will not mark an article as expirable, even if the group has
14334 auto-expire turned on.
14335
14336
14337 @node Washing Mail
14338 @subsection Washing Mail
14339 @cindex mail washing
14340 @cindex list server brain damage
14341 @cindex incoming mail treatment
14342
14343 Mailers and list servers are notorious for doing all sorts of really,
14344 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
14345 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14346 end of all lines passing through our server, so let's do that!!!!1!''
14347 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
14348 considered to be self-evident were not discussed.  So.  Here we are.
14349
14350 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
14351 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
14352 be shocked and dismayed by this, but I haven't got the energy.  It is to
14353 laugh.
14354
14355 Gnus provides a plethora of functions for washing articles while
14356 displaying them, but it might be nicer to do the filtering before
14357 storing the mail to disk.  For that purpose, we have three hooks and
14358 various functions that can be put in these hooks.
14359
14360 @table @code
14361 @item nnmail-prepare-incoming-hook
14362 @vindex nnmail-prepare-incoming-hook
14363 This hook is called before doing anything with the mail and is meant for
14364 grand, sweeping gestures.  It is called in a buffer that contains all
14365 the new, incoming mail.  Functions to be used include:
14366
14367 @table @code
14368 @item nnheader-ms-strip-cr
14369 @findex nnheader-ms-strip-cr
14370 Remove trailing carriage returns from each line.  This is default on
14371 Emacs running on MS machines.
14372
14373 @end table
14374
14375 @item nnmail-prepare-incoming-header-hook
14376 @vindex nnmail-prepare-incoming-header-hook
14377 This hook is called narrowed to each header.  It can be used when
14378 cleaning up the headers.  Functions that can be used include:
14379
14380 @table @code
14381 @item nnmail-remove-leading-whitespace
14382 @findex nnmail-remove-leading-whitespace
14383 Clear leading white space that ``helpful'' listservs have added to the
14384 headers to make them look nice.  Aaah.
14385
14386 (Note that this function works on both the header on the body of all
14387 messages, so it is a potentially dangerous function to use (if a body
14388 of a message contains something that looks like a header line).  So
14389 rather than fix the bug, it is of course the right solution to make it
14390 into a feature by documenting it.)
14391
14392 @item nnmail-remove-list-identifiers
14393 @findex nnmail-remove-list-identifiers
14394 Some list servers add an identifier---for example, @samp{(idm)}---to the
14395 beginning of all @code{Subject} headers.  I'm sure that's nice for
14396 people who use stone age mail readers.  This function will remove
14397 strings that match the @code{nnmail-list-identifiers} regexp, which can
14398 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
14399 @code{\\(..\\)}.
14400
14401 For instance, if you want to remove the @samp{(idm)} and the
14402 @samp{nagnagnag} identifiers:
14403
14404 @lisp
14405 (setq nnmail-list-identifiers
14406       '("(idm)" "nagnagnag"))
14407 @end lisp
14408
14409 This can also be done non-destructively with
14410 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14411
14412 @item nnmail-remove-tabs
14413 @findex nnmail-remove-tabs
14414 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14415
14416 @item nnmail-fix-eudora-headers
14417 @findex nnmail-fix-eudora-headers
14418 @cindex Eudora
14419 Eudora produces broken @code{References} headers, but OK
14420 @code{In-Reply-To} headers.  This function will get rid of the
14421 @code{References} headers.
14422
14423 @end table
14424
14425 @item nnmail-prepare-incoming-message-hook
14426 @vindex nnmail-prepare-incoming-message-hook
14427 This hook is called narrowed to each message.  Functions to be used
14428 include:
14429
14430 @table @code
14431 @item article-de-quoted-unreadable
14432 @findex article-de-quoted-unreadable
14433 Decode Quoted Readable encoding.
14434
14435 @end table
14436 @end table
14437
14438
14439 @node Duplicates
14440 @subsection Duplicates
14441
14442 @vindex nnmail-treat-duplicates
14443 @vindex nnmail-message-id-cache-length
14444 @vindex nnmail-message-id-cache-file
14445 @cindex duplicate mails
14446 If you are a member of a couple of mailing lists, you will sometimes
14447 receive two copies of the same mail.  This can be quite annoying, so
14448 @code{nnmail} checks for and treats any duplicates it might find.  To do
14449 this, it keeps a cache of old @code{Message-ID}s---
14450 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14451 default.  The approximate maximum number of @code{Message-ID}s stored
14452 there is controlled by the @code{nnmail-message-id-cache-length}
14453 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14454 stored.) If all this sounds scary to you, you can set
14455 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14456 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14457 will insert a warning into the head of the mail saying that it thinks
14458 that this is a duplicate of a different message.
14459
14460 This variable can also be a function.  If that's the case, the function
14461 will be called from a buffer narrowed to the message in question with
14462 the @code{Message-ID} as a parameter.  The function must return either
14463 @code{nil}, @code{warn}, or @code{delete}.
14464
14465 You can turn this feature off completely by setting the variable to
14466 @code{nil}.
14467
14468 If you want all the duplicate mails to be put into a special
14469 @dfn{duplicates} group, you could do that using the normal mail split
14470 methods:
14471
14472 @lisp
14473 (setq nnmail-split-fancy
14474       '(| ;; @r{Messages duplicates go to a separate group.}
14475           ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14476           ;; @r{Message from daemons, postmaster, and the like to another.}
14477           (any mail "mail.misc")
14478           ;; @r{Other rules.}
14479           [ ... ] ))
14480 @end lisp
14481
14482 Or something like:
14483 @lisp
14484 (setq nnmail-split-methods
14485       '(("duplicates" "^Gnus-Warning:.*duplicate")
14486         ;; @r{Other rules.}
14487         [...]))
14488 @end lisp
14489
14490 Here's a neat feature: If you know that the recipient reads her mail
14491 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14492 @code{delete}, you can send her as many insults as you like, just by
14493 using a @code{Message-ID} of a mail that you know that she's already
14494 received.  Think of all the fun!  She'll never see any of it!  Whee!
14495
14496
14497 @node Not Reading Mail
14498 @subsection Not Reading Mail
14499
14500 If you start using any of the mail back ends, they have the annoying
14501 habit of assuming that you want to read mail with them.  This might not
14502 be unreasonable, but it might not be what you want.
14503
14504 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14505 @code{nil}, none of the back ends will ever attempt to read incoming
14506 mail, which should help.
14507
14508 @vindex nnbabyl-get-new-mail
14509 @vindex nnmbox-get-new-mail
14510 @vindex nnml-get-new-mail
14511 @vindex nnmh-get-new-mail
14512 @vindex nnfolder-get-new-mail
14513 This might be too much, if, for instance, you are reading mail quite
14514 happily with @code{nnml} and just want to peek at some old Rmail
14515 file you have stashed away with @code{nnbabyl}.  All back ends have
14516 variables called back-end-@code{get-new-mail}.  If you want to disable
14517 the @code{nnbabyl} mail reading, you edit the virtual server for the
14518 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14519
14520 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14521 narrowed to the article to be saved before saving it when reading
14522 incoming mail.
14523
14524
14525 @node Choosing a Mail Back End
14526 @subsection Choosing a Mail Back End
14527
14528 Gnus will read the mail spool when you activate a mail group.  The mail
14529 file is first copied to your home directory.  What happens after that
14530 depends on what format you want to store your mail in.
14531
14532 There are six different mail back ends in the standard Gnus, and more
14533 back ends are available separately.  The mail back end most people use
14534 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14535 Spool}).
14536
14537 @menu
14538 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14539 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
14540 * Mail Spool::                  Store your mail in a private spool?
14541 * MH Spool::                    An mhspool-like back end.
14542 * Maildir::                     Another one-file-per-message format.
14543 * Mail Folders::                Having one file for each group.
14544 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14545 @end menu
14546
14547
14548 @node Unix Mail Box
14549 @subsubsection Unix Mail Box
14550 @cindex nnmbox
14551 @cindex unix mail box
14552
14553 @vindex nnmbox-active-file
14554 @vindex nnmbox-mbox-file
14555 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14556 mail.  @code{nnmbox} will add extra headers to each mail article to say
14557 which group it belongs in.
14558
14559 Virtual server settings:
14560
14561 @table @code
14562 @item nnmbox-mbox-file
14563 @vindex nnmbox-mbox-file
14564 The name of the mail box in the user's home directory.  Default is
14565 @file{~/mbox}.
14566
14567 @item nnmbox-active-file
14568 @vindex nnmbox-active-file
14569 The name of the active file for the mail box.  Default is
14570 @file{~/.mbox-active}.
14571
14572 @item nnmbox-get-new-mail
14573 @vindex nnmbox-get-new-mail
14574 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14575 into groups.  Default is @code{t}.
14576 @end table
14577
14578
14579 @node Rmail Babyl
14580 @subsubsection Rmail Babyl
14581 @cindex nnbabyl
14582 @cindex Rmail mbox
14583
14584 @vindex nnbabyl-active-file
14585 @vindex nnbabyl-mbox-file
14586 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
14587 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14588 mail article to say which group it belongs in.
14589
14590 Virtual server settings:
14591
14592 @table @code
14593 @item nnbabyl-mbox-file
14594 @vindex nnbabyl-mbox-file
14595 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
14596
14597 @item nnbabyl-active-file
14598 @vindex nnbabyl-active-file
14599 The name of the active file for the rmail box.  The default is
14600 @file{~/.rmail-active}
14601
14602 @item nnbabyl-get-new-mail
14603 @vindex nnbabyl-get-new-mail
14604 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14605 @code{t}
14606 @end table
14607
14608
14609 @node Mail Spool
14610 @subsubsection Mail Spool
14611 @cindex nnml
14612 @cindex mail @acronym{NOV} spool
14613
14614 The @dfn{nnml} spool mail format isn't compatible with any other known
14615 format.  It should be used with some caution.
14616
14617 @vindex nnml-directory
14618 If you use this back end, Gnus will split all incoming mail into files,
14619 one file for each mail, and put the articles into the corresponding
14620 directories under the directory specified by the @code{nnml-directory}
14621 variable.  The default value is @file{~/Mail/}.
14622
14623 You do not have to create any directories beforehand; Gnus will take
14624 care of all that.
14625
14626 If you have a strict limit as to how many files you are allowed to store
14627 in your account, you should not use this back end.  As each mail gets its
14628 own file, you might very well occupy thousands of inodes within a few
14629 weeks.  If this is no problem for you, and it isn't a problem for you
14630 having your friendly systems administrator walking around, madly,
14631 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14632 know that this is probably the fastest format to use.  You do not have
14633 to trudge through a big mbox file just to read your new mail.
14634
14635 @code{nnml} is probably the slowest back end when it comes to article
14636 splitting.  It has to create lots of files, and it also generates
14637 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
14638 fastest back end when it comes to reading mail.
14639
14640 @cindex self contained nnml servers
14641 @cindex marks
14642 When the marks file is used (which it is by default), @code{nnml}
14643 servers have the property that you may backup them using @code{tar} or
14644 similar, and later be able to restore them into Gnus (by adding the
14645 proper @code{nnml} server) and have all your marks be preserved.  Marks
14646 for a group is usually stored in the @code{.marks} file (but see
14647 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14648 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14649 to restore the group (after restoring the backup into the nnml
14650 directory).
14651
14652 If for some reason you believe your @file{.marks} files are screwed
14653 up, you can just delete them all.  Gnus will then correctly regenerate
14654 them next time it starts.
14655
14656 Virtual server settings:
14657
14658 @table @code
14659 @item nnml-directory
14660 @vindex nnml-directory
14661 All @code{nnml} directories will be placed under this directory.  The
14662 default is the value of @code{message-directory} (whose default value
14663 is @file{~/Mail}).
14664
14665 @item nnml-active-file
14666 @vindex nnml-active-file
14667 The active file for the @code{nnml} server.  The default is
14668 @file{~/Mail/active}.
14669
14670 @item nnml-newsgroups-file
14671 @vindex nnml-newsgroups-file
14672 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14673 Format}.  The default is @file{~/Mail/newsgroups}.
14674
14675 @item nnml-get-new-mail
14676 @vindex nnml-get-new-mail
14677 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14678 @code{t}.
14679
14680 @item nnml-nov-is-evil
14681 @vindex nnml-nov-is-evil
14682 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
14683 default is @code{nil}.
14684
14685 @item nnml-nov-file-name
14686 @vindex nnml-nov-file-name
14687 The name of the @acronym{NOV} files.  The default is @file{.overview}.
14688
14689 @item nnml-prepare-save-mail-hook
14690 @vindex nnml-prepare-save-mail-hook
14691 Hook run narrowed to an article before saving.
14692
14693 @item nnml-marks-is-evil
14694 @vindex nnml-marks-is-evil
14695 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14696 default is @code{nil}.
14697
14698 @item nnml-marks-file-name
14699 @vindex nnml-marks-file-name
14700 The name of the @dfn{marks} files.  The default is @file{.marks}.
14701
14702 @item nnml-use-compressed-files
14703 @vindex nnml-use-compressed-files
14704 If non-@code{nil}, @code{nnml} will allow using compressed message
14705 files.
14706
14707 @end table
14708
14709 @findex nnml-generate-nov-databases
14710 If your @code{nnml} groups and @acronym{NOV} files get totally out of whack,
14711 you can do a complete update by typing @kbd{M-x
14712 nnml-generate-nov-databases}.  This command will trawl through the
14713 entire @code{nnml} hierarchy, looking at each and every article, so it
14714 might take a while to complete.  A better interface to this
14715 functionality can be found in the server buffer (@pxref{Server
14716 Commands}).
14717
14718
14719 @node MH Spool
14720 @subsubsection MH Spool
14721 @cindex nnmh
14722 @cindex mh-e mail spool
14723
14724 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14725 @acronym{NOV} databases and it doesn't keep an active file or marks file.
14726 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
14727 but it also makes it easier to write procmail scripts for.
14728
14729 Virtual server settings:
14730
14731 @table @code
14732 @item nnmh-directory
14733 @vindex nnmh-directory
14734 All @code{nnmh} directories will be located under this directory.  The
14735 default is the value of @code{message-directory} (whose default is
14736 @file{~/Mail})
14737
14738 @item nnmh-get-new-mail
14739 @vindex nnmh-get-new-mail
14740 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14741 @code{t}.
14742
14743 @item nnmh-be-safe
14744 @vindex nnmh-be-safe
14745 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14746 sure that the articles in the folder are actually what Gnus thinks they
14747 are.  It will check date stamps and stat everything in sight, so
14748 setting this to @code{t} will mean a serious slow-down.  If you never
14749 use anything but Gnus to read the @code{nnmh} articles, you do not have
14750 to set this variable to @code{t}.  The default is @code{nil}.
14751 @end table
14752
14753
14754 @node Maildir
14755 @subsubsection Maildir
14756 @cindex nnmaildir
14757 @cindex maildir
14758
14759 @code{nnmaildir} stores mail in the maildir format, with each maildir
14760 corresponding to a group in Gnus.  This format is documented here:
14761 @uref{http://cr.yp.to/proto/maildir.html} and here:
14762 @uref{http://www.qmail.org/man/man5/maildir.html}.  nnmaildir also
14763 stores extra information in the @file{.nnmaildir/} directory within a
14764 maildir.
14765
14766 Maildir format was designed to allow concurrent deliveries and
14767 reading, without needing locks.  With other backends, you would have
14768 your mail delivered to a spool of some kind, and then you would
14769 configure Gnus to split mail from that spool into your groups.  You
14770 can still do that with nnmaildir, but the more common configuration is
14771 to have your mail delivered directly to the maildirs that appear as
14772 group in Gnus.
14773
14774 nnmaildir is designed to be perfectly reliable: @kbd{C-g} will never
14775 corrupt its data in memory, and @code{SIGKILL} will never corrupt its
14776 data in the filesystem.
14777
14778 nnmaildir stores article marks and @acronym{NOV} data in each maildir.  So you
14779 can copy a whole maildir from one Gnus setup to another, and you will
14780 keep your marks.
14781
14782 Virtual server settings:
14783
14784 @table @code
14785 @item directory
14786 For each of your nnmaildir servers (it's very unlikely that you'd need
14787 more than one), you need to create a directory and populate it with
14788 maildirs or symlinks to maildirs (and nothing else; do not choose a
14789 directory already used for other purposes).  Each maildir will be
14790 represented in Gnus as a newsgroup on that server; the filename of the
14791 symlink will be the name of the group.  Any filenames in the directory
14792 starting with `.' are ignored.  The directory is scanned when you
14793 first start Gnus, and each time you type @kbd{g} in the group buffer;
14794 if any maildirs have been removed or added, nnmaildir notices at these
14795 times.
14796
14797 The value of the @code{directory} parameter should be a Lisp form
14798 which is processed by @code{eval} and @code{expand-file-name} to get
14799 the path of the directory for this server.  The form is @code{eval}ed
14800 only when the server is opened; the resulting string is used until the
14801 server is closed.  (If you don't know about forms and @code{eval},
14802 don't worry---a simple string will work.)  This parameter is not
14803 optional; you must specify it.  I don't recommend using
14804 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
14805 use that directory by default for various things, and may get confused
14806 if nnmaildir uses it too.  @code{"~/.nnmaildir"} is a typical value.
14807
14808 @item target-prefix
14809 This should be a Lisp form which is processed by @code{eval} and
14810 @code{expand-file-name}.  The form is @code{eval}ed only when the
14811 server is opened; the resulting string is used until the server is
14812 closed.
14813
14814 When you create a group on an nnmaildir server, the maildir is created
14815 with @code{target-prefix} prepended to its name, and a symlink
14816 pointing to that maildir is created, named with the plain group name.
14817 So if @code{directory} is @code{"~/.nnmaildir"} and
14818 @code{target-prefix} is @code{"../maildirs/"}, then when you create
14819 the group @code{foo}, nnmaildir will create
14820 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
14821 @file{~/.nnmaildir/foo} as a symlink pointing to
14822 @file{../maildirs/foo}.
14823
14824 You can set @code{target-prefix} to a string without any slashes to
14825 create both maildirs and symlinks in the same @code{directory}; in
14826 this case, any maildirs found in @code{directory} whose names start
14827 with @code{target-prefix} will not be listed as groups (but the
14828 symlinks pointing to them will be).
14829
14830 As a special case, if @code{target-prefix} is @code{""} (the default),
14831 then when you create a group, the maildir will be created in
14832 @code{directory} without a corresponding symlink.  Beware that you
14833 cannot use @code{gnus-group-delete-group} on such groups without the
14834 @code{force} argument.
14835
14836 @item directory-files
14837 This should be a function with the same interface as
14838 @code{directory-files} (such as @code{directory-files} itself).  It is
14839 used to scan the server's @code{directory} for maildirs.  This
14840 parameter is optional; the default is
14841 @code{nnheader-directory-files-safe} if
14842 @code{nnheader-directory-files-is-safe} is @code{nil}, and
14843 @code{directory-files} otherwise.
14844 (@code{nnheader-directory-files-is-safe} is checked only once when the
14845 server is opened; if you want to check it each time the directory is
14846 scanned, you'll have to provide your own function that does that.)
14847
14848 @item get-new-mail
14849 If non-@code{nil}, then after scanning for new mail in the group
14850 maildirs themselves as usual, this server will also incorporate mail
14851 the conventional Gnus way, from @code{mail-sources} according to
14852 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
14853 value is @code{nil}.
14854
14855 Do @emph{not} use the same maildir both in @code{mail-sources} and as
14856 an nnmaildir group.  The results might happen to be useful, but that
14857 would be by chance, not by design, and the results might be different
14858 in the future.  If your split rules create new groups, remember to
14859 supply a @code{create-directory} server parameter.
14860 @end table
14861
14862 @subsubsection Group parameters
14863
14864 nnmaildir uses several group parameters.  It's safe to ignore all
14865 this; the default behavior for nnmaildir is the same as the default
14866 behavior for other mail backends: articles are deleted after one week,
14867 etc.  Except for the expiry parameters, all this functionality is
14868 unique to nnmaildir, so you can ignore it if you're just trying to
14869 duplicate the behavior you already have with another backend.
14870
14871 If the value of any of these parameters is a vector, the first element
14872 is evaluated as a Lisp form and the result is used, rather than the
14873 original value.  If the value is not a vector, the value itself is
14874 evaluated as a Lisp form.  (This is why these parameters use names
14875 different from those of other, similar parameters supported by other
14876 backends: they have different, though similar, meanings.)  (For
14877 numbers, strings, @code{nil}, and @code{t}, you can ignore the
14878 @code{eval} business again; for other values, remember to use an extra
14879 quote and wrap the value in a vector when appropriate.)
14880
14881 @table @code
14882 @item expire-age
14883 An integer specifying the minimum age, in seconds, of an article before
14884 it will be expired, or the symbol @code{never} to specify that
14885 articles should never be expired.  If this parameter is not set,
14886 nnmaildir falls back to the usual
14887 @code{nnmail-expiry-wait}(@code{-function}) variables (overridable by
14888 the @code{expiry-wait}(@code{-function}) group parameters.  If you
14889 wanted a value of 3 days, you could use something like @code{[(* 3 24
14890 60 60)]}; nnmaildir will evaluate the form and use the result.  An
14891 article's age is measured starting from the article file's
14892 modification time.  Normally, this is the same as the article's
14893 delivery time, but editing an article makes it younger.  Moving an
14894 article (other than via expiry) may also make an article younger.
14895
14896 @item expire-group
14897 If this is set to a string (a full Gnus group name, like
14898 @code{"backend+server.address.string:group.name"}), and if it is not
14899 the name of the same group that the parameter belongs to, then
14900 articles will be moved to the specified group during expiry before
14901 being deleted.  @emph{If this is set to an nnmaildir group, the
14902 article will be just as old in the destination group as it was in the
14903 source group.}  So be careful with @code{expire-age} in the
14904 destination group.  If this is set to the name of the same group that
14905 the parameter belongs to, then the article is not expired at all.  If
14906 you use the vector form, the first element is evaluated once for each
14907 article.  So that form can refer to
14908 @code{nnmaildir-article-file-name}, etc., to decide where to put the
14909 article.  @emph{If this parameter is not set, nnmaildir does not fall
14910 back to the @code{expiry-target} group parameter or the
14911 @code{nnmail-expiry-target} variable.}
14912
14913 @item read-only
14914 If this is set to @code{t}, nnmaildir will treat the articles in this
14915 maildir as read-only.  This means: articles are not renamed from
14916 @file{new/} into @file{cur/}; articles are only found in @file{new/},
14917 not @file{cur/}; articles are never deleted; articles cannot be
14918 edited.  @file{new/} is expected to be a symlink to the @file{new/}
14919 directory of another maildir---e.g., a system-wide mailbox containing
14920 a mailing list of common interest.  Everything in the maildir outside
14921 @file{new/} is @emph{not} treated as read-only, so for a shared
14922 mailbox, you do still need to set up your own maildir (or have write
14923 permission to the shared mailbox); your maildir just won't contain
14924 extra copies of the articles.
14925
14926 @item directory-files
14927 A function with the same interface as @code{directory-files}.  It is
14928 used to scan the directories in the maildir corresponding to this
14929 group to find articles.  The default is the function specified by the
14930 server's @code{directory-files} parameter.
14931
14932 @item distrust-Lines:
14933 If non-@code{nil}, nnmaildir will always count the lines of an
14934 article, rather than use the @code{Lines:} header field.  If
14935 @code{nil}, the header field will be used if present.
14936
14937 @item always-marks
14938 A list of mark symbols, such as
14939 @code{['(read expire)]}.  Whenever Gnus asks nnmaildir for
14940 article marks, nnmaildir will say that all articles have these
14941 marks, regardless of whether the marks stored in the filesystem
14942 say so.  This is a proof-of-concept feature that will probably be
14943 removed eventually; it ought to be done in Gnus proper, or
14944 abandoned if it's not worthwhile.
14945
14946 @item never-marks
14947 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
14948 Gnus asks nnmaildir for article marks, nnmaildir will say that no
14949 articles have these marks, regardless of whether the marks stored in
14950 the filesystem say so.  @code{never-marks} overrides
14951 @code{always-marks}.  This is a proof-of-concept feature that will
14952 probably be removed eventually; it ought to be done in Gnus proper, or
14953 abandoned if it's not worthwhile.
14954
14955 @item nov-cache-size
14956 An integer specifying the size of the @acronym{NOV} memory cache.  To speed
14957 things up, nnmaildir keeps @acronym{NOV} data in memory for a limited number of
14958 articles in each group.  (This is probably not worthwhile, and will
14959 probably be removed in the future.)  This parameter's value is noticed
14960 only the first time a group is seen after the server is opened---i.e.,
14961 when you first start Gnus, typically.  The @acronym{NOV} cache is never resized
14962 until the server is closed and reopened.  The default is an estimate
14963 of the number of articles that would be displayed in the summary
14964 buffer: a count of articles that are either marked with @code{tick} or
14965 not marked with @code{read}, plus a little extra.
14966 @end table
14967
14968 @subsubsection Article identification
14969 Articles are stored in the @file{cur/} subdirectory of each maildir.
14970 Each article file is named like @code{uniq:info}, where @code{uniq}
14971 contains no colons.  nnmaildir ignores, but preserves, the
14972 @code{:info} part.  (Other maildir readers typically use this part of
14973 the filename to store marks.)  The @code{uniq} part uniquely
14974 identifies the article, and is used in various places in the
14975 @file{.nnmaildir/} subdirectory of the maildir to store information
14976 about the corresponding article.  The full pathname of an article is
14977 available in the variable @code{nnmaildir-article-file-name} after you
14978 request the article in the summary buffer.
14979
14980 @subsubsection NOV data
14981 An article identified by @code{uniq} has its @acronym{NOV} data (used to
14982 generate lines in the summary buffer) stored in
14983 @code{.nnmaildir/nov/uniq}.  There is no
14984 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
14985 need for it---an article's @acronym{NOV} data is updated automatically when the
14986 article or @code{nnmail-extra-headers} has changed.)  You can force
14987 nnmaildir to regenerate the @acronym{NOV} data for a single article simply by
14988 deleting the corresponding @acronym{NOV} file, but @emph{beware}: this will also
14989 cause nnmaildir to assign a new article number for this article, which
14990 may cause trouble with @code{seen} marks, the Agent, and the cache.
14991
14992 @subsubsection Article marks
14993 An article identified by @code{uniq} is considered to have the mark
14994 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
14995 When Gnus asks nnmaildir for a group's marks, nnmaildir looks for such
14996 files and reports the set of marks it finds.  When Gnus asks nnmaildir
14997 to store a new set of marks, nnmaildir creates and deletes the
14998 corresponding files as needed.  (Actually, rather than create a new
14999 file for each mark, it just creates hard links to
15000 @file{.nnmaildir/markfile}, to save inodes.)
15001
15002 You can invent new marks by creating a new directory in
15003 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
15004 your server, untar it later, and keep your marks.  You can add and
15005 remove marks yourself by creating and deleting mark files.  If you do
15006 this while Gnus is running and your nnmaildir server is open, it's
15007 best to exit all summary buffers for nnmaildir groups and type @kbd{s}
15008 in the group buffer first, and to type @kbd{g} or @kbd{M-g} in the
15009 group buffer afterwards.  Otherwise, Gnus might not pick up the
15010 changes, and might undo them.
15011
15012
15013 @node Mail Folders
15014 @subsubsection Mail Folders
15015 @cindex nnfolder
15016 @cindex mbox folders
15017 @cindex mail folders
15018
15019 @code{nnfolder} is a back end for storing each mail group in a separate
15020 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
15021 will add extra headers to keep track of article numbers and arrival
15022 dates.
15023
15024 @cindex self contained nnfolder servers
15025 @cindex marks
15026 When the marks file is used (which it is by default), @code{nnfolder}
15027 servers have the property that you may backup them using @code{tar} or
15028 similar, and later be able to restore them into Gnus (by adding the
15029 proper @code{nnfolder} server) and have all your marks be preserved.
15030 Marks for a group is usually stored in a file named as the mbox file
15031 with @code{.mrk} concatenated to it (but see
15032 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
15033 Individual @code{nnfolder} groups are also possible to backup, use
15034 @kbd{G m} to restore the group (after restoring the backup into the
15035 @code{nnfolder} directory).
15036
15037 Virtual server settings:
15038
15039 @table @code
15040 @item nnfolder-directory
15041 @vindex nnfolder-directory
15042 All the @code{nnfolder} mail boxes will be stored under this directory.
15043 The default is the value of @code{message-directory} (whose default is
15044 @file{~/Mail})
15045
15046 @item nnfolder-active-file
15047 @vindex nnfolder-active-file
15048 The name of the active file.  The default is @file{~/Mail/active}.
15049
15050 @item nnfolder-newsgroups-file
15051 @vindex nnfolder-newsgroups-file
15052 The name of the group descriptions file.  @xref{Newsgroups File
15053 Format}.  The default is @file{~/Mail/newsgroups}
15054
15055 @item nnfolder-get-new-mail
15056 @vindex nnfolder-get-new-mail
15057 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
15058 is @code{t}
15059
15060 @item nnfolder-save-buffer-hook
15061 @vindex nnfolder-save-buffer-hook
15062 @cindex backup files
15063 Hook run before saving the folders.  Note that Emacs does the normal
15064 backup renaming of files even with the @code{nnfolder} buffers.  If you
15065 wish to switch this off, you could say something like the following in
15066 your @file{.emacs} file:
15067
15068 @lisp
15069 (defun turn-off-backup ()
15070   (set (make-local-variable 'backup-inhibited) t))
15071
15072 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
15073 @end lisp
15074
15075 @item nnfolder-delete-mail-hook
15076 @vindex nnfolder-delete-mail-hook
15077 Hook run in a buffer narrowed to the message that is to be deleted.
15078 This function can be used to copy the message to somewhere else, or to
15079 extract some information from it before removing it.
15080
15081 @item nnfolder-nov-is-evil
15082 @vindex nnfolder-nov-is-evil
15083 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
15084 default is @code{nil}.
15085
15086 @item nnfolder-nov-file-suffix
15087 @vindex nnfolder-nov-file-suffix
15088 The extension for @acronym{NOV} files.  The default is @file{.nov}.
15089
15090 @item nnfolder-nov-directory
15091 @vindex nnfolder-nov-directory
15092 The directory where the @acronym{NOV} files should be stored.  If
15093 @code{nil}, @code{nnfolder-directory} is used.
15094
15095 @item nnfolder-marks-is-evil
15096 @vindex nnfolder-marks-is-evil
15097 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
15098 default is @code{nil}.
15099
15100 @item nnfolder-marks-file-suffix
15101 @vindex nnfolder-marks-file-suffix
15102 The extension for @sc{marks} files.  The default is @file{.mrk}.
15103
15104 @item nnfolder-marks-directory
15105 @vindex nnfolder-marks-directory
15106 The directory where the @sc{marks} files should be stored.  If
15107 @code{nil}, @code{nnfolder-directory} is used.
15108
15109 @end table
15110
15111
15112 @findex nnfolder-generate-active-file
15113 @kindex M-x nnfolder-generate-active-file
15114 If you have lots of @code{nnfolder}-like files you'd like to read with
15115 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
15116 command to make @code{nnfolder} aware of all likely files in
15117 @code{nnfolder-directory}.  This only works if you use long file names,
15118 though.
15119
15120 @node Comparing Mail Back Ends
15121 @subsubsection Comparing Mail Back Ends
15122
15123 First, just for terminology, the @dfn{back end} is the common word for a
15124 low-level access method---a transport, if you will, by which something
15125 is acquired.  The sense is that one's mail has to come from somewhere,
15126 and so selection of a suitable back end is required in order to get that
15127 mail within spitting distance of Gnus.
15128
15129 The same concept exists for Usenet itself: Though access to articles is
15130 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
15131 in the world got at Usenet by running a reader on the machine where the
15132 articles lay (the machine which today we call an @acronym{NNTP} server), and
15133 access was by the reader stepping into the articles' directory spool
15134 area directly.  One can still select between either the @code{nntp} or
15135 @code{nnspool} back ends, to select between these methods, if one happens
15136 actually to live on the server (or can see its spool directly, anyway,
15137 via NFS).
15138
15139 The goal in selecting a mail back end is to pick one which
15140 simultaneously represents a suitable way of dealing with the original
15141 format plus leaving mail in a form that is convenient to use in the
15142 future.  Here are some high and low points on each:
15143
15144 @table @code
15145 @item nnmbox
15146
15147 UNIX systems have historically had a single, very common, and well-
15148 defined format.  All messages arrive in a single @dfn{spool file}, and
15149 they are delineated by a line whose regular expression matches
15150 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
15151 to make it clear in this instance that this is not the RFC-specified
15152 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
15153 historically from the Unix environment, it is simplest if one does not
15154 mess a great deal with the original mailbox format, so if one chooses
15155 this back end, Gnus' primary activity in getting mail from the real spool
15156 area to Gnus' preferred directory is simply to copy it, with no
15157 (appreciable) format change in the process.  It is the ``dumbest'' way
15158 to move mail into availability in the Gnus environment.  This makes it
15159 fast to move into place, but slow to parse, when Gnus has to look at
15160 what's where.
15161
15162 @item nnbabyl
15163
15164 Once upon a time, there was the DEC-10 and DEC-20, running operating
15165 systems called TOPS and related things, and the usual (only?) mail
15166 reading environment was a thing called Babyl.  I don't know what format
15167 was used for mail landing on the system, but Babyl had its own internal
15168 format to which mail was converted, primarily involving creating a
15169 spool-file-like entity with a scheme for inserting Babyl-specific
15170 headers and status bits above the top of each message in the file.
15171 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
15172 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
15173 to understand the mail files folks already had in existence.  Gnus (and
15174 VM, for that matter) continue to support this format because it's
15175 perceived as having some good qualities in those mailer-specific
15176 headers/status bits stuff.  Rmail itself still exists as well, of
15177 course, and is still maintained by Stallman.
15178
15179 Both of the above forms leave your mail in a single file on your
15180 file system, and they must parse that entire file each time you take a
15181 look at your mail.
15182
15183 @item nnml
15184
15185 @code{nnml} is the back end which smells the most as though you were
15186 actually operating with an @code{nnspool}-accessed Usenet system.  (In
15187 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
15188 lo these years ago.)  One's mail is taken from the original spool file,
15189 and is then cut up into individual message files, 1:1.  It maintains a
15190 Usenet-style active file (analogous to what one finds in an INN- or
15191 CNews-based news system in (for instance) @file{/var/lib/news/active},
15192 or what is returned via the @samp{NNTP LIST} verb) and also creates
15193 @dfn{overview} files for efficient group entry, as has been defined for
15194 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
15195 due to the creation of lots of files, updates to the @code{nnml} active
15196 file, and additions to overview files on a per-message basis, but it is
15197 extremely fast on access because of what amounts to the indexing support
15198 provided by the active file and overviews.
15199
15200 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
15201 resource which defines available places in the file system to put new
15202 files.  Sysadmins take a dim view of heavy inode occupation within
15203 tight, shared file systems.  But if you live on a personal machine where
15204 the file system is your own and space is not at a premium, @code{nnml}
15205 wins big.
15206
15207 It is also problematic using this back end if you are living in a
15208 FAT16-based Windows world, since much space will be wasted on all these
15209 tiny files.
15210
15211 @item nnmh
15212
15213 The Rand MH mail-reading system has been around UNIX systems for a very
15214 long time; it operates by splitting one's spool file of messages into
15215 individual files, but with little or no indexing support---@code{nnmh}
15216 is considered to be semantically equivalent to ``@code{nnml} without
15217 active file or overviews''.  This is arguably the worst choice, because
15218 one gets the slowness of individual file creation married to the
15219 slowness of access parsing when learning what's new in one's groups.
15220
15221 @item nnfolder
15222
15223 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
15224 method described above) on a per-group basis.  That is, @code{nnmbox}
15225 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
15226 little bit of optimization to this so that each of one's mail groups has
15227 a Unix mail box file.  It's faster than @code{nnmbox} because each group
15228 can be parsed separately, and still provides the simple Unix mail box
15229 format requiring minimal effort in moving the mail around.  In addition,
15230 it maintains an ``active'' file making it much faster for Gnus to figure
15231 out how many messages there are in each separate group.
15232
15233 If you have groups that are expected to have a massive amount of
15234 messages, @code{nnfolder} is not the best choice, but if you receive
15235 only a moderate amount of mail, @code{nnfolder} is probably the most
15236 friendly mail back end all over.
15237
15238 @item nnmaildir
15239
15240 For configuring expiry and other things, @code{nnmaildir} uses
15241 incompatible group parameters, slightly different from those of other
15242 mail back ends.
15243
15244 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
15245 differences.  Each message is stored in a separate file, but the
15246 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
15247 also stores the equivalent of @code{nnml}'s overview files in one file
15248 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
15249 @code{df -i} to see how plentiful your inode supply is.)  If this slows
15250 you down or takes up very much space, consider switching to 
15251 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
15252 file system.
15253
15254 Since maildirs don't require locking for delivery, the maildirs you use
15255 as groups can also be the maildirs your mail is directly delivered to.
15256 This means you can skip Gnus's mail splitting if your mail is already
15257 organized into different mailboxes during delivery.  A @code{directory}
15258 entry in @code{mail-sources} would have a similar effect, but would
15259 require one set of mailboxes for spooling deliveries (in mbox format,
15260 thus damaging message bodies), and another set to be used as groups (in
15261 whatever format you like).  A maildir has a built-in spool, in the
15262 @code{new/} subdirectory.  Beware that currently, mail moved from
15263 @code{new/} to @code{cur/} instead of via mail splitting will not
15264 undergo treatment such as duplicate checking.
15265
15266 @code{nnmaildir} stores article marks for a given group in the
15267 corresponding maildir, in a way designed so that it's easy to manipulate
15268 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
15269 else, and still have your marks.  @code{nnml} also stores marks, but
15270 it's not as easy to work with them from outside Gnus as with
15271 @code{nnmaildir}.
15272
15273 @code{nnmaildir} uses a significant amount of memory to speed things up.
15274 (It keeps in memory some of the things that @code{nnml} stores in files
15275 and that @code{nnmh} repeatedly parses out of message files.)  If this
15276 is a problem for you, you can set the @code{nov-cache-size} group
15277 parameter to something small (0 would probably not work, but 1 probably
15278 would) to make it use less memory.  This caching will probably be
15279 removed in the future.
15280
15281 Startup is likely to be slower with @code{nnmaildir} than with other
15282 back ends.  Everything else is likely to be faster, depending in part
15283 on your file system.
15284
15285 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
15286 to write an @code{nnmaildir}-derived back end.
15287
15288 @end table
15289
15290
15291 @node Browsing the Web
15292 @section Browsing the Web
15293 @cindex web
15294 @cindex browsing the web
15295 @cindex www
15296 @cindex http
15297
15298 Web-based discussion forums are getting more and more popular.  On many
15299 subjects, the web-based forums have become the most important forums,
15300 eclipsing the importance of mailing lists and news groups.  The reason
15301 is easy to understand---they are friendly to new users; you just point
15302 and click, and there's the discussion.  With mailing lists, you have to
15303 go through a cumbersome subscription procedure, and most people don't
15304 even know what a news group is.
15305
15306 The problem with this scenario is that web browsers are not very good at
15307 being newsreaders.  They do not keep track of what articles you've read;
15308 they do not allow you to score on subjects you're interested in; they do
15309 not allow off-line browsing; they require you to click around and drive
15310 you mad in the end.
15311
15312 So---if web browsers suck at reading discussion forums, why not use Gnus
15313 to do it instead?
15314
15315 Gnus has been getting a bit of a collection of back ends for providing
15316 interfaces to these sources.
15317
15318 @menu
15319 * Archiving Mail::              
15320 * Web Searches::                Creating groups from articles that match a string.
15321 * Slashdot::                    Reading the Slashdot comments.
15322 * Ultimate::                    The Ultimate Bulletin Board systems.
15323 * Web Archive::                 Reading mailing list archived on web.
15324 * RSS::                         Reading RDF site summary.
15325 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
15326 @end menu
15327
15328 All the web sources require Emacs/w3 and the url library to work.
15329
15330 The main caveat with all these web sources is that they probably won't
15331 work for a very long time.  Gleaning information from the @acronym{HTML} data
15332 is guesswork at best, and when the layout is altered, the Gnus back end
15333 will fail.  If you have reasonably new versions of these back ends,
15334 though, you should be ok.
15335
15336 One thing all these Web methods have in common is that the Web sources
15337 are often down, unavailable or just plain too slow to be fun.  In those
15338 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
15339 Unplugged}) handle downloading articles, and then you can read them at
15340 leisure from your local disk.  No more World Wide Wait for you.
15341
15342 @node Archiving Mail
15343 @subsection Archiving Mail
15344 @cindex archiving mail
15345 @cindex backup of mail
15346
15347 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
15348 @code{nnmaildir}, now actually store the article marks with each group.
15349 For these servers, archiving and restoring a group while preserving
15350 marks is fairly simple.
15351
15352 (Preserving the group level and group parameters as well still
15353 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
15354 though.)
15355
15356 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
15357 server, take a recursive copy of the server directory.  There is no need
15358 to shut down Gnus, so archiving may be invoked by @code{cron} or
15359 similar.  You restore the data by restoring the directory tree, and
15360 adding a server definition pointing to that directory in Gnus. The
15361 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
15362 might interfere with overwriting data, so you may want to shut down Gnus
15363 before you restore the data.
15364
15365 It is also possible to archive individual @code{nnml},
15366 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
15367 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
15368 directory.  For @code{nnfolder} you need to copy both the base folder
15369 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
15370 this example). Restoring the group is done with @kbd{G m} from the Group
15371 buffer.  The last step makes Gnus notice the new directory.
15372 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
15373 is unnecessary in that case.
15374
15375 @node Web Searches
15376 @subsection Web Searches
15377 @cindex nnweb
15378 @cindex Google
15379 @cindex dejanews
15380 @cindex gmane
15381 @cindex Usenet searches
15382 @cindex searching the Usenet
15383
15384 It's, like, too neat to search the Usenet for articles that match a
15385 string, but it, like, totally @emph{sucks}, like, totally, to use one of
15386 those, like, Web browsers, and you, like, have to, rilly, like, look at
15387 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
15388 searches without having to use a browser.
15389
15390 The @code{nnweb} back end allows an easy interface to the mighty search
15391 engine.  You create an @code{nnweb} group, enter a search pattern, and
15392 then enter the group and read the articles like you would any normal
15393 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
15394 Groups}) will do this in an easy-to-use fashion.
15395
15396 @code{nnweb} groups don't really lend themselves to being solid
15397 groups---they have a very fleeting idea of article numbers.  In fact,
15398 each time you enter an @code{nnweb} group (not even changing the search
15399 pattern), you are likely to get the articles ordered in a different
15400 manner.  Not even using duplicate suppression (@pxref{Duplicate
15401 Suppression}) will help, since @code{nnweb} doesn't even know the
15402 @code{Message-ID} of the articles before reading them using some search
15403 engines (Google, for instance).  The only possible way to keep track
15404 of which articles you've read is by scoring on the @code{Date}
15405 header---mark all articles posted before the last date you read the
15406 group as read.
15407
15408 If the search engine changes its output substantially, @code{nnweb}
15409 won't be able to parse it and will fail.  One could hardly fault the Web
15410 providers if they were to do this---their @emph{raison d'être} is to
15411 make money off of advertisements, not to provide services to the
15412 community.  Since @code{nnweb} washes the ads off all the articles, one
15413 might think that the providers might be somewhat miffed.  We'll see.
15414
15415 You must have the @code{url} and @code{w3} package installed to be able
15416 to use @code{nnweb}.
15417
15418 Virtual server variables:
15419
15420 @table @code
15421 @item nnweb-type
15422 @vindex nnweb-type
15423 What search engine type is being used.  The currently supported types
15424 are @code{google}, @code{dejanews}, and @code{gmane}. Note that
15425 @code{dejanews} is an alias to @code{google}.
15426
15427 @item nnweb-search
15428 @vindex nnweb-search
15429 The search string to feed to the search engine.
15430
15431 @item nnweb-max-hits
15432 @vindex nnweb-max-hits
15433 Advisory maximum number of hits per search to display.  The default is
15434 999.
15435
15436 @item nnweb-type-definition
15437 @vindex nnweb-type-definition
15438 Type-to-definition alist.  This alist says what @code{nnweb} should do
15439 with the various search engine types.  The following elements must be
15440 present:
15441
15442 @table @code
15443 @item article
15444 Function to decode the article and provide something that Gnus
15445 understands.
15446
15447 @item map
15448 Function to create an article number to message header and URL alist.
15449
15450 @item search
15451 Function to send the search string to the search engine.
15452
15453 @item address
15454 The address the aforementioned function should send the search string
15455 to.
15456
15457 @item id
15458 Format string URL to fetch an article by @code{Message-ID}.
15459 @end table
15460
15461 @end table
15462
15463
15464 @node Slashdot
15465 @subsection Slashdot
15466 @cindex Slashdot
15467 @cindex nnslashdot
15468
15469 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
15470 lively discussion following the news articles.  @code{nnslashdot} will
15471 let you read this forum in a convenient manner.
15472
15473 The easiest way to read this source is to put something like the
15474 following in your @file{~/.gnus.el} file:
15475
15476 @lisp
15477 (setq gnus-secondary-select-methods
15478       '((nnslashdot "")))
15479 @end lisp
15480
15481 This will make Gnus query the @code{nnslashdot} back end for new comments
15482 and groups.  The @kbd{F} command will subscribe each new news article as
15483 a new Gnus group, and you can read the comments by entering these
15484 groups.  (Note that the default subscription method is to subscribe new
15485 groups as zombies.  Other methods are available (@pxref{Subscription
15486 Methods}).
15487
15488 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
15489 command is the most handy tool (@pxref{Foreign Groups}).
15490
15491 When following up to @code{nnslashdot} comments (or posting new
15492 comments), some light @acronym{HTML}izations will be performed.  In
15493 particular, text quoted with @samp{> } will be quoted with
15494 @code{blockquote} instead, and signatures will have @code{br} added to
15495 the end of each line.  Other than that, you can just write @acronym{HTML}
15496 directly into the message buffer.  Note that Slashdot filters out some
15497 @acronym{HTML} forms.
15498
15499 The following variables can be altered to change its behavior:
15500
15501 @table @code
15502 @item nnslashdot-threaded
15503 Whether @code{nnslashdot} should display threaded groups or not.  The
15504 default is @code{t}.  To be able to display threads, @code{nnslashdot}
15505 has to retrieve absolutely all comments in a group upon entry.  If a
15506 threaded display is not required, @code{nnslashdot} will only retrieve
15507 the comments that are actually wanted by the user.  Threading is nicer,
15508 but much, much slower than unthreaded.
15509
15510 @item nnslashdot-login-name
15511 @vindex nnslashdot-login-name
15512 The login name to use when posting.
15513
15514 @item nnslashdot-password
15515 @vindex nnslashdot-password
15516 The password to use when posting.
15517
15518 @item nnslashdot-directory
15519 @vindex nnslashdot-directory
15520 Where @code{nnslashdot} will store its files.  The default is
15521 @file{~/News/slashdot/}.
15522
15523 @item nnslashdot-active-url
15524 @vindex nnslashdot-active-url
15525 The @sc{url} format string that will be used to fetch the information on
15526 news articles and comments.  The default is
15527 @samp{http://slashdot.org/search.pl?section=&min=%d}.
15528
15529 @item nnslashdot-comments-url
15530 @vindex nnslashdot-comments-url
15531 The @sc{url} format string that will be used to fetch comments.  The
15532 default is
15533 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
15534
15535 @item nnslashdot-article-url
15536 @vindex nnslashdot-article-url
15537 The @sc{url} format string that will be used to fetch the news article.  The
15538 default is
15539 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
15540
15541 @item nnslashdot-threshold
15542 @vindex nnslashdot-threshold
15543 The score threshold.  The default is -1.
15544
15545 @item nnslashdot-group-number
15546 @vindex nnslashdot-group-number
15547 The number of old groups, in addition to the ten latest, to keep
15548 updated.  The default is 0.
15549
15550 @end table
15551
15552
15553
15554 @node Ultimate
15555 @subsection Ultimate
15556 @cindex nnultimate
15557 @cindex Ultimate Bulletin Board
15558
15559 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
15560 probably the most popular Web bulletin board system used.  It has a
15561 quite regular and nice interface, and it's possible to get the
15562 information Gnus needs to keep groups updated.
15563
15564 The easiest way to get started with @code{nnultimate} is to say
15565 something like the following in the group buffer:  @kbd{B nnultimate RET
15566 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
15567 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
15568 you're interested in; there's quite a list of them on the Ultimate web
15569 site.)  Then subscribe to the groups you're interested in from the
15570 server buffer, and read them from the group buffer.
15571
15572 The following @code{nnultimate} variables can be altered:
15573
15574 @table @code
15575 @item nnultimate-directory
15576 @vindex nnultimate-directory
15577 The directory where @code{nnultimate} stores its files.  The default is
15578 @file{~/News/ultimate/}.
15579 @end table
15580
15581
15582 @node Web Archive
15583 @subsection Web Archive
15584 @cindex nnwarchive
15585 @cindex Web Archive
15586
15587 Some mailing lists only have archives on Web servers, such as
15588 @uref{http://www.egroups.com/} and
15589 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
15590 interface, and it's possible to get the information Gnus needs to keep
15591 groups updated.
15592
15593 @findex gnus-group-make-warchive-group
15594 The easiest way to get started with @code{nnwarchive} is to say
15595 something like the following in the group buffer: @kbd{M-x
15596 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
15597 www.egroups.com RET @var{your@@email.address RET}}.  (Substitute the
15598 @var{an_egroup} with the mailing list you subscribed, the
15599 @var{your@@email.address} with your email address.), or to browse the
15600 back end by @kbd{B nnwarchive RET mail-archive RET}.
15601
15602 The following @code{nnwarchive} variables can be altered:
15603
15604 @table @code
15605 @item nnwarchive-directory
15606 @vindex nnwarchive-directory
15607 The directory where @code{nnwarchive} stores its files.  The default is
15608 @file{~/News/warchive/}.
15609
15610 @item nnwarchive-login
15611 @vindex nnwarchive-login
15612 The account name on the web server.
15613
15614 @item nnwarchive-passwd
15615 @vindex nnwarchive-passwd
15616 The password for your account on the web server.
15617 @end table
15618
15619 @node RSS
15620 @subsection RSS
15621 @cindex nnrss
15622 @cindex RSS
15623
15624 Some sites have RDF site summary (RSS)
15625 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
15626 interface, and it's possible to get the information Gnus needs to keep
15627 groups updated.
15628
15629 The easiest way to get started with @code{nnrss} is to say something
15630 like the following in the group buffer: @kbd{B nnrss RET RET}, then
15631 subscribe groups.
15632
15633 The following @code{nnrss} variables can be altered:
15634
15635 @table @code
15636 @item nnrss-directory
15637 @vindex nnrss-directory
15638 The directory where @code{nnrss} stores its files.  The default is
15639 @file{~/News/rss/}.
15640
15641 @end table
15642
15643 The following code may be helpful, if you want to show the description in
15644 the summary buffer.
15645
15646 @lisp
15647 (add-to-list 'nnmail-extra-headers nnrss-description-field)
15648 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
15649
15650 (defun gnus-user-format-function-X (header)
15651   (let ((descr
15652          (assq nnrss-description-field (mail-header-extra header))))
15653     (if descr (concat "\n\t" (cdr descr)) "")))
15654 @end lisp
15655
15656 The following code may be useful to open an nnrss url directly from the
15657 summary buffer.
15658 @lisp
15659 (require 'browse-url)
15660
15661 (defun browse-nnrss-url( arg )
15662   (interactive "p")
15663   (let ((url (assq nnrss-url-field
15664                    (mail-header-extra
15665                     (gnus-data-header
15666                      (assq (gnus-summary-article-number)
15667                            gnus-newsgroup-data))))))
15668     (if url
15669         (progn
15670           (browse-url (cdr url))
15671           (gnus-summary-mark-as-read-forward 1))
15672       (gnus-summary-scroll-up arg))))
15673
15674 (eval-after-load "gnus"
15675   #'(define-key gnus-summary-mode-map
15676       (kbd "<RET>") 'browse-nnrss-url))
15677 (add-to-list 'nnmail-extra-headers nnrss-url-field)
15678 @end lisp
15679
15680 @node Customizing w3
15681 @subsection Customizing w3
15682 @cindex w3
15683 @cindex html
15684 @cindex url
15685 @cindex Netscape
15686
15687 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
15688 pages.  Emacs/w3 is documented in its own manual, but there are some
15689 things that may be more relevant for Gnus users.
15690
15691 For instance, a common question is how to make Emacs/w3 follow links
15692 using the @code{browse-url} functions (which will call some external web
15693 browser like Netscape).  Here's one way:
15694
15695 @lisp
15696 (eval-after-load "w3"
15697   '(progn
15698     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
15699     (defun w3-fetch (&optional url target)
15700       (interactive (list (w3-read-url-with-default)))
15701       (if (eq major-mode 'gnus-article-mode)
15702           (browse-url url)
15703         (w3-fetch-orig url target)))))
15704 @end lisp
15705
15706 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15707 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
15708 follow the link.
15709
15710
15711 @node IMAP
15712 @section IMAP
15713 @cindex nnimap
15714 @cindex @acronym{IMAP}
15715
15716 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
15717 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
15718 server is much similar to connecting to a news server, you just
15719 specify the network address of the server.
15720
15721 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
15722 everything that @acronym{POP} can, it can hence be viewed as a
15723 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
15724 similar to @acronym{NNTP} being a news storage protocol---however,
15725 @acronym{IMAP} offers more features than @acronym{NNTP} because news
15726 is more or less read-only whereas mail is read-write.
15727
15728 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
15729 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
15730 the @acronym{IMAP} server and store them on the local disk.  This is
15731 not the usage described in this section---@xref{Mail Sources}.
15732
15733 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
15734 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15735 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
15736 usage explained in this section.
15737
15738 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP} servers
15739 might look something like the following. (Note that for @acronym{TLS}/@acronym{SSL}, you
15740 need external programs and libraries, see below.)
15741
15742 @lisp
15743 (setq gnus-secondary-select-methods
15744       '((nnimap "simpleserver") ; @r{no special configuration}
15745         ; @r{perhaps a ssh port forwarded server:}
15746         (nnimap "dolk"
15747                 (nnimap-address "localhost")
15748                 (nnimap-server-port 1430))
15749         ; @r{a UW server running on localhost}
15750         (nnimap "barbar"
15751                 (nnimap-server-port 143)
15752                 (nnimap-address "localhost")
15753                 (nnimap-list-pattern ("INBOX" "mail/*")))
15754         ; @r{anonymous public cyrus server:}
15755         (nnimap "cyrus.andrew.cmu.edu"
15756                 (nnimap-authenticator anonymous)
15757                 (nnimap-list-pattern "archive.*")
15758                 (nnimap-stream network))
15759         ; @r{a ssl server on a non-standard port:}
15760         (nnimap "vic20"
15761                 (nnimap-address "vic20.somewhere.com")
15762                 (nnimap-server-port 9930)
15763                 (nnimap-stream ssl))))
15764 @end lisp
15765
15766 After defining the new server, you can subscribe to groups on the
15767 server using normal Gnus commands such as @kbd{U} in the Group Buffer
15768 (@pxref{Subscription Commands}) or via the Server Buffer
15769 (@pxref{Server Buffer}).
15770
15771 The following variables can be used to create a virtual @code{nnimap}
15772 server:
15773
15774 @table @code
15775
15776 @item nnimap-address
15777 @vindex nnimap-address
15778
15779 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
15780 server name if not specified.
15781
15782 @item nnimap-server-port
15783 @vindex nnimap-server-port
15784 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
15785
15786 Note that this should be an integer, example server specification:
15787
15788 @lisp
15789 (nnimap "mail.server.com"
15790         (nnimap-server-port 4711))
15791 @end lisp
15792
15793 @item nnimap-list-pattern
15794 @vindex nnimap-list-pattern
15795 String or list of strings of mailboxes to limit available groups to.
15796 This is used when the server has very many mailboxes and you're only
15797 interested in a few---some servers export your home directory via
15798 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
15799 @file{~/Mail/*} then.
15800
15801 The string can also be a cons of REFERENCE and the string as above, what
15802 REFERENCE is used for is server specific, but on the University of
15803 Washington server it's a directory that will be concatenated with the
15804 mailbox.
15805
15806 Example server specification:
15807
15808 @lisp
15809 (nnimap "mail.server.com"
15810         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15811                                ("~friend/Mail/" . "list/*"))))
15812 @end lisp
15813
15814 @item nnimap-stream
15815 @vindex nnimap-stream
15816 The type of stream used to connect to your server.  By default, nnimap
15817 will detect and automatically use all of the below, with the exception
15818 of @acronym{TLS}/@acronym{SSL}. (@acronym{IMAP} over @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which
15819 can be automatically detected, but it's not widely deployed yet.)
15820
15821 Example server specification:
15822
15823 @lisp
15824 (nnimap "mail.server.com"
15825         (nnimap-stream ssl))
15826 @end lisp
15827
15828 Please note that the value of @code{nnimap-stream} is a symbol!
15829
15830 @itemize @bullet
15831 @item
15832 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5). Requires the
15833 @samp{gsasl} or @samp{imtest} program.
15834 @item
15835 @dfn{kerberos4:} Connect with Kerberos 4. Requires the @samp{imtest} program.
15836 @item
15837 @dfn{starttls:} Connect via the STARTTLS extension (similar to
15838 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
15839 @samp{starttls}.
15840 @item
15841 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
15842 @samp{gnutls-cli}).
15843 @item
15844 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
15845 @samp{openssl}) or SSLeay (@samp{s_client}).
15846 @item
15847 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
15848 @item
15849 @dfn{network:} Plain, TCP/IP network connection.
15850 @end itemize
15851
15852 @vindex imap-kerberos4-program
15853 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
15854 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
15855 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
15856 to make @code{imap.el} use a pty instead of a pipe when communicating
15857 with @samp{imtest}.  You will then suffer from a line length
15858 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
15859 indefinitely if you have many articles in a mailbox.  The variable
15860 @code{imap-kerberos4-program} contain parameters to pass to the imtest
15861 program.
15862
15863 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
15864 needed.  It is available from
15865 @uref{http://www.gnu.org/software/gnutls/}.
15866
15867 @vindex imap-gssapi-program
15868 This parameter specifies a list of command lines that invoke a GSSAPI
15869 authenticated @acronym{IMAP} stream in a subshell.  They are tried
15870 sequentially until a connection is made, or the list has been
15871 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
15872 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
15873 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
15874 tried.
15875
15876 @vindex imap-ssl-program
15877 For @acronym{SSL} connections, the OpenSSL program is available from
15878 @uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay,
15879 and nnimap support it too---although the most recent versions of
15880 SSLeay, 0.9.x, are known to have serious bugs making it
15881 useless. Earlier versions, especially 0.8.x, of SSLeay are known to
15882 work. The variable @code{imap-ssl-program} contain parameters to pass
15883 to OpenSSL/SSLeay.
15884
15885 @vindex imap-shell-program
15886 @vindex imap-shell-host
15887 For @acronym{IMAP} connections using the @code{shell} stream, the variable
15888 @code{imap-shell-program} specify what program to call.
15889
15890 @item nnimap-authenticator
15891 @vindex nnimap-authenticator
15892
15893 The authenticator used to connect to the server.  By default, nnimap
15894 will use the most secure authenticator your server is capable of.
15895
15896 Example server specification:
15897
15898 @lisp
15899 (nnimap "mail.server.com"
15900         (nnimap-authenticator anonymous))
15901 @end lisp
15902
15903 Please note that the value of @code{nnimap-authenticator} is a symbol!
15904
15905 @itemize @bullet
15906 @item
15907 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication. Requires
15908 external program @code{gsasl} or @code{imtest}.
15909 @item
15910 @dfn{kerberos4:} Kerberos 4 authentication. Requires external program
15911 @code{imtest}.
15912 @item
15913 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5. Requires
15914 external library @code{digest-md5.el}.
15915 @item
15916 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
15917 @item
15918 @dfn{login:} Plain-text username/password via LOGIN.
15919 @item
15920 @dfn{anonymous:} Login as `anonymous', supplying your email address as password.
15921 @end itemize
15922
15923 @item nnimap-expunge-on-close
15924 @cindex Expunging
15925 @vindex nnimap-expunge-on-close
15926 Unlike Parmenides the @acronym{IMAP} designers has decided that things that
15927 doesn't exist actually does exist.  More specifically, @acronym{IMAP} has
15928 this concept of marking articles @code{Deleted} which doesn't actually
15929 delete them, and this (marking them @code{Deleted}, that is) is what
15930 nnimap does when you delete a article in Gnus (with @kbd{B DEL} or
15931 similar).
15932
15933 Since the articles aren't really removed when we mark them with the
15934 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
15935 running in circles yet?
15936
15937 Traditionally, nnimap has removed all articles marked as @code{Deleted}
15938 when closing a mailbox but this is now configurable by this server
15939 variable.
15940
15941 The possible options are:
15942
15943 @table @code
15944
15945 @item always
15946 The default behavior, delete all articles marked as ``Deleted'' when
15947 closing a mailbox.
15948 @item never
15949 Never actually delete articles.  Currently there is no way of showing
15950 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
15951 may allow you to do this.  If you ever want to run the EXPUNGE command
15952 manually, @xref{Expunging mailboxes}.
15953 @item ask
15954 When closing mailboxes, nnimap will ask if you wish to expunge deleted
15955 articles or not.
15956
15957 @end table
15958
15959 @item nnimap-importantize-dormant
15960 @vindex nnimap-importantize-dormant
15961
15962 If non-@code{nil} (the default), marks dormant articles as ticked (as
15963 well), for other @acronym{IMAP} clients. Within Gnus, dormant articles will
15964 naturally still (only) be marked as dormant.  This is to make dormant
15965 articles stand out, just like ticked articles, in other @acronym{IMAP}
15966 clients. (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
15967 has only one.)
15968
15969 Probably the only reason for frobing this would be if you're trying
15970 enable per-user persistant dormant flags, using something like:
15971
15972 @lisp
15973 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
15974         (format "gnus-dormant-%s" (user-login-name)))
15975 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
15976         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
15977 @end lisp
15978
15979 In this case, you would not want the per-user dormant flag showing up
15980 as ticked for other users.
15981
15982 @item nnimap-expunge-search-string
15983 @cindex Expunging
15984 @vindex nnimap-expunge-search-string
15985
15986 This variable contain the @acronym{IMAP} search command sent to server when
15987 searching for articles eligible for expiring.  The default is
15988 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
15989 UID set and the second @code{%s} is replaced by a date.
15990
15991 Probably the only useful value to change this to is
15992 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
15993 messages instead of the internal article date. See section 6.4.4 of
15994 RFC 2060 for more information on valid strings.
15995
15996 @item nnimap-authinfo-file
15997 @vindex nnimap-authinfo-file
15998
15999 A file containing credentials used to log in on servers.  The format is
16000 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
16001 variable @code{nntp-authinfo-file} for exact syntax; also see
16002 @ref{NNTP}.
16003
16004 @end table
16005
16006 @menu
16007 * Splitting in IMAP::           Splitting mail with nnimap.
16008 * Expiring in IMAP::            Expiring mail with nnimap.
16009 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
16010 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
16011 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
16012 @end menu
16013
16014
16015
16016 @node Splitting in IMAP
16017 @subsection Splitting in IMAP
16018 @cindex splitting imap mail
16019
16020 Splitting is something Gnus users has loved and used for years, and now
16021 the rest of the world is catching up.  Yeah, dream on, not many
16022 @acronym{IMAP} server has server side splitting and those that have splitting
16023 seem to use some non-standard protocol.  This means that @acronym{IMAP}
16024 support for Gnus has to do it's own splitting.
16025
16026 And it does.
16027
16028 Here are the variables of interest:
16029
16030 @table @code
16031
16032 @item nnimap-split-crosspost
16033 @cindex splitting, crosspost
16034 @cindex crosspost
16035 @vindex nnimap-split-crosspost
16036
16037 If non-@code{nil}, do crossposting if several split methods match the
16038 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
16039 found will be used.
16040
16041 Nnmail equivalent: @code{nnmail-crosspost}.
16042
16043 @item nnimap-split-inbox
16044 @cindex splitting, inbox
16045 @cindex inbox
16046 @vindex nnimap-split-inbox
16047
16048 A string or a list of strings that gives the name(s) of @acronym{IMAP}
16049 mailboxes to split from.  Defaults to @code{nil}, which means that
16050 splitting is disabled!
16051
16052 @lisp
16053 (setq nnimap-split-inbox
16054       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
16055 @end lisp
16056
16057 No nnmail equivalent.
16058
16059 @item nnimap-split-rule
16060 @cindex Splitting, rules
16061 @vindex nnimap-split-rule
16062
16063 New mail found in @code{nnimap-split-inbox} will be split according to
16064 this variable.
16065
16066 This variable contains a list of lists, where the first element in the
16067 sublist gives the name of the @acronym{IMAP} mailbox to move articles
16068 matching the regexp in the second element in the sublist.  Got that?
16069 Neither did I, we need examples.
16070
16071 @lisp
16072 (setq nnimap-split-rule
16073       '(("INBOX.nnimap"
16074          "^Sender: owner-nnimap@@vic20.globalcom.se")
16075         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
16076         ("INBOX.private" "")))
16077 @end lisp
16078
16079 This will put all articles from the nnimap mailing list into mailbox
16080 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
16081 into INBOX.junk and everything else in INBOX.private.
16082
16083 The first string may contain `\\1' forms, like the ones used by
16084 replace-match to insert sub-expressions from the matched text.  For
16085 instance:
16086
16087 @lisp
16088 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
16089 @end lisp
16090
16091 The first element can also be the symbol @code{junk} to indicate that
16092 matching messages should simply be deleted.  Use with care.
16093
16094 The second element can also be a function.  In that case, it will be
16095 called with the first element of the rule as the argument, in a buffer
16096 containing the headers of the article.  It should return a
16097 non-@code{nil} value if it thinks that the mail belongs in that group.
16098
16099 Nnmail users might recollect that the last regexp had to be empty to
16100 match all articles (like in the example above).  This is not required in
16101 nnimap.  Articles not matching any of the regexps will not be moved out
16102 of your inbox.  (This might affect performance if you keep lots of
16103 unread articles in your inbox, since the splitting code would go over
16104 them every time you fetch new mail.)
16105
16106 These rules are processed from the beginning of the alist toward the
16107 end.  The first rule to make a match will ``win'', unless you have
16108 crossposting enabled.  In that case, all matching rules will ``win''.
16109
16110 This variable can also have a function as its value, the function will
16111 be called with the headers narrowed and should return a group where it
16112 thinks the article should be split to.  See @code{nnimap-split-fancy}.
16113
16114 The splitting code tries to create mailboxes if it needs to.
16115
16116 To allow for different split rules on different virtual servers, and
16117 even different split rules in different inboxes on the same server,
16118 the syntax of this variable have been extended along the lines of:
16119
16120 @lisp
16121 (setq nnimap-split-rule
16122       '(("my1server"    (".*"    (("ding"    "ding@@gnus.org")
16123                                   ("junk"    "From:.*Simon")))
16124         ("my2server"    ("INBOX" nnimap-split-fancy))
16125         ("my[34]server" (".*"    (("private" "To:.*Simon")
16126                                   ("junk"    my-junk-func)))))
16127 @end lisp
16128
16129 The virtual server name is in fact a regexp, so that the same rules
16130 may apply to several servers.  In the example, the servers
16131 @code{my3server} and @code{my4server} both use the same rules.
16132 Similarly, the inbox string is also a regexp.  The actual splitting
16133 rules are as before, either a function, or a list with group/regexp or
16134 group/function elements.
16135
16136 Nnmail equivalent: @code{nnmail-split-methods}.
16137
16138 @item nnimap-split-predicate
16139 @cindex splitting
16140 @vindex nnimap-split-predicate
16141
16142 Mail matching this predicate in @code{nnimap-split-inbox} will be
16143 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
16144
16145 This might be useful if you use another @acronym{IMAP} client to read mail in
16146 your inbox but would like Gnus to split all articles in the inbox
16147 regardless of readedness. Then you might change this to
16148 @samp{UNDELETED}.
16149
16150 @item nnimap-split-fancy
16151 @cindex splitting, fancy
16152 @findex nnimap-split-fancy
16153 @vindex nnimap-split-fancy
16154
16155 It's possible to set @code{nnimap-split-rule} to
16156 @code{nnmail-split-fancy} if you want to use fancy
16157 splitting. @xref{Fancy Mail Splitting}.
16158
16159 However, to be able to have different fancy split rules for nnmail and
16160 nnimap back ends you can set @code{nnimap-split-rule} to
16161 @code{nnimap-split-fancy} and define the nnimap specific fancy split
16162 rule in @code{nnimap-split-fancy}.
16163
16164 Example:
16165
16166 @lisp
16167 (setq nnimap-split-rule 'nnimap-split-fancy
16168       nnimap-split-fancy ...)
16169 @end lisp
16170
16171 Nnmail equivalent: @code{nnmail-split-fancy}.
16172
16173 @item nnimap-split-download-body
16174 @findex nnimap-split-download-body
16175 @vindex nnimap-split-download-body
16176
16177 Set to non-@code{nil} to download entire articles during splitting.
16178 This is generally not required, and will slow things down
16179 considerably.  You may need it if you want to use an advanced
16180 splitting function that analyses the body to split the article.
16181
16182 @end table
16183
16184 @node Expiring in IMAP
16185 @subsection Expiring in IMAP
16186 @cindex expiring imap mail
16187
16188 Even though @code{nnimap} is not a proper @code{nnmail} derived back
16189 end, it supports most features in regular expiring (@pxref{Expiring
16190 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
16191 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
16192 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
16193 follows below are the variables used by the @code{nnimap} expiry
16194 process.
16195
16196 A note on how the expire mark is stored on the @acronym{IMAP} server is
16197 appropriate here as well.  The expire mark is translated into a
16198 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
16199 message.  This means that likely only Gnus will understand and treat
16200 the @code{gnus-expire} mark properly, although other clients may allow
16201 you to view client specific flags on the message.  It also means that
16202 your server must support permanent storage of client specific flags on
16203 messages.  Most do, fortunately.
16204
16205 @table @code
16206
16207 @item nnmail-expiry-wait
16208 @item nnmail-expiry-wait-function
16209
16210 These variables are fully supported.  The expire value can be a
16211 number, the symbol @code{immediate} or @code{never}.
16212
16213 @item nnmail-expiry-target
16214
16215 This variable is supported, and internally implemented by calling the
16216 @code{nnmail} functions that handle this.  It contains an optimization
16217 that if the destination is a @acronym{IMAP} group on the same server, the
16218 article is copied instead of appended (that is, uploaded again).
16219
16220 @end table
16221
16222 @node Editing IMAP ACLs
16223 @subsection Editing IMAP ACLs
16224 @cindex editing imap acls
16225 @cindex Access Control Lists
16226 @cindex Editing @acronym{IMAP} ACLs
16227 @kindex G l
16228 @findex gnus-group-nnimap-edit-acl
16229
16230 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
16231 limiting (or enabling) other users access to your mail boxes.  Not all
16232 @acronym{IMAP} servers support this, this function will give an error if it
16233 doesn't.
16234
16235 To edit a ACL for a mailbox, type @kbd{G l}
16236 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with a ACL
16237 editing window with detailed instructions.
16238
16239 Some possible uses:
16240
16241 @itemize @bullet
16242 @item
16243 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
16244 on your mailing list mailboxes enables other users on the same server to
16245 follow the list without subscribing to it.
16246 @item
16247 At least with the Cyrus server, you are required to give the user
16248 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
16249 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
16250 INBOX.mailbox).
16251 @end itemize
16252
16253 @node Expunging mailboxes
16254 @subsection Expunging mailboxes
16255 @cindex expunging
16256
16257 @cindex Expunge
16258 @cindex Manual expunging
16259 @kindex G x
16260 @findex gnus-group-nnimap-expunge
16261
16262 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
16263 you may want the option of expunging all deleted articles in a mailbox
16264 manually.  This is exactly what @kbd{G x} does.
16265
16266 Currently there is no way of showing deleted articles, you can just
16267 delete them.
16268
16269 @node A note on namespaces
16270 @subsection A note on namespaces
16271 @cindex IMAP namespace
16272 @cindex namespaces
16273
16274 The @acronym{IMAP} protocol has a concept called namespaces, described
16275 by the following text in the RFC:
16276
16277 @example
16278 5.1.2.  Mailbox Namespace Naming Convention
16279
16280    By convention, the first hierarchical element of any mailbox name
16281    which begins with "#" identifies the "namespace" of the remainder of
16282    the name.  This makes it possible to disambiguate between different
16283    types of mailbox stores, each of which have their own namespaces.
16284
16285       For example, implementations which offer access to USENET
16286       newsgroups MAY use the "#news" namespace to partition the USENET
16287       newsgroup namespace from that of other mailboxes.  Thus, the
16288       comp.mail.misc newsgroup would have an mailbox name of
16289       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
16290       to a different object (e.g. a user's private mailbox).
16291 @end example
16292
16293 While there is nothing in this text that warrants concern for the
16294 @acronym{IMAP} implementation in Gnus, some servers use namespace
16295 prefixes in a way that does not work with how Gnus uses mailbox names.
16296
16297 Specifically, University of Washington's @acronym{IMAP} server uses
16298 mailbox names like @code{#driver.mbx/read-mail} which are valid only
16299 in the @sc{create} and @sc{append} commands.  After the mailbox is
16300 created (or a messages is appended to a mailbox), it must be accessed
16301 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
16302 not make it possible for the user to guarantee that user entered
16303 mailbox names will only be used with the CREATE and APPEND commands,
16304 you should simply not use the namespace prefixed mailbox names in
16305 Gnus.
16306
16307 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
16308 for more information on how to use the prefixes.  They are a power
16309 tool and should be used only if you are sure what the effects are.
16310
16311 @node Other Sources
16312 @section Other Sources
16313
16314 Gnus can do more than just read news or mail.  The methods described
16315 below allow Gnus to view directories and files as if they were
16316 newsgroups.
16317
16318 @menu
16319 * Directory Groups::            You can read a directory as if it was a newsgroup.
16320 * Anything Groups::             Dired?  Who needs dired?
16321 * Document Groups::             Single files can be the basis of a group.
16322 * SOUP::                        Reading @sc{soup} packets ``offline''.
16323 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
16324 @end menu
16325
16326
16327 @node Directory Groups
16328 @subsection Directory Groups
16329 @cindex nndir
16330 @cindex directory groups
16331
16332 If you have a directory that has lots of articles in separate files in
16333 it, you might treat it as a newsgroup.  The files have to have numerical
16334 names, of course.
16335
16336 This might be an opportune moment to mention @code{ange-ftp} (and its
16337 successor @code{efs}), that most wonderful of all wonderful Emacs
16338 packages.  When I wrote @code{nndir}, I didn't think much about it---a
16339 back end to read directories.  Big deal.
16340
16341 @code{ange-ftp} changes that picture dramatically.  For instance, if you
16342 enter the @code{ange-ftp} file name
16343 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16344 @code{ange-ftp} or @code{efs} will actually allow you to read this
16345 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
16346
16347 @code{nndir} will use @acronym{NOV} files if they are present.
16348
16349 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16350 articles with this method.  You can use @code{nnmh} or @code{nnml} for
16351 whatever you use @code{nndir} for, so you could switch to any of those
16352 methods if you feel the need to have a non-read-only @code{nndir}.
16353
16354
16355 @node Anything Groups
16356 @subsection Anything Groups
16357 @cindex nneething
16358
16359 From the @code{nndir} back end (which reads a single spool-like
16360 directory), it's just a hop and a skip to @code{nneething}, which
16361 pretends that any arbitrary directory is a newsgroup.  Strange, but
16362 true.
16363
16364 When @code{nneething} is presented with a directory, it will scan this
16365 directory and assign article numbers to each file.  When you enter such
16366 a group, @code{nneething} must create ``headers'' that Gnus can use.
16367 After all, Gnus is a newsreader, in case you're forgetting.
16368 @code{nneething} does this in a two-step process.  First, it snoops each
16369 file in question.  If the file looks like an article (i.e., the first
16370 few lines look like headers), it will use this as the head.  If this is
16371 just some arbitrary file without a head (e.g. a C source file),
16372 @code{nneething} will cobble up a header out of thin air.  It will use
16373 file ownership, name and date and do whatever it can with these
16374 elements.
16375
16376 All this should happen automatically for you, and you will be presented
16377 with something that looks very much like a newsgroup.  Totally like a
16378 newsgroup, to be precise.  If you select an article, it will be displayed
16379 in the article buffer, just as usual.
16380
16381 If you select a line that represents a directory, Gnus will pop you into
16382 a new summary buffer for this @code{nneething} group.  And so on.  You can
16383 traverse the entire disk this way, if you feel like, but remember that
16384 Gnus is not dired, really, and does not intend to be, either.
16385
16386 There are two overall modes to this action---ephemeral or solid.  When
16387 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16388 will not store information on what files you have read, and what files
16389 are new, and so on.  If you create a solid @code{nneething} group the
16390 normal way with @kbd{G m}, Gnus will store a mapping table between
16391 article numbers and file names, and you can treat this group like any
16392 other groups.  When you activate a solid @code{nneething} group, you will
16393 be told how many unread articles it contains, etc., etc.
16394
16395 Some variables:
16396
16397 @table @code
16398 @item nneething-map-file-directory
16399 @vindex nneething-map-file-directory
16400 All the mapping files for solid @code{nneething} groups will be stored
16401 in this directory, which defaults to @file{~/.nneething/}.
16402
16403 @item nneething-exclude-files
16404 @vindex nneething-exclude-files
16405 All files that match this regexp will be ignored.  Nice to use to exclude
16406 auto-save files and the like, which is what it does by default.
16407
16408 @item nneething-include-files
16409 @vindex nneething-include-files
16410 Regexp saying what files to include in the group.  If this variable is
16411 non-@code{nil}, only files matching this regexp will be included.
16412
16413 @item nneething-map-file
16414 @vindex nneething-map-file
16415 Name of the map files.
16416 @end table
16417
16418
16419 @node Document Groups
16420 @subsection Document Groups
16421 @cindex nndoc
16422 @cindex documentation group
16423 @cindex help group
16424
16425 @code{nndoc} is a cute little thing that will let you read a single file
16426 as a newsgroup.  Several files types are supported:
16427
16428 @table @code
16429 @cindex Babyl
16430 @cindex Rmail mbox
16431
16432 @item babyl
16433 The Babyl (Rmail) mail box.
16434 @cindex mbox
16435 @cindex Unix mbox
16436
16437 @item mbox
16438 The standard Unix mbox file.
16439
16440 @cindex MMDF mail box
16441 @item mmdf
16442 The MMDF mail box format.
16443
16444 @item news
16445 Several news articles appended into a file.
16446
16447 @item rnews
16448 @cindex rnews batch files
16449 The rnews batch transport format.
16450 @cindex forwarded messages
16451
16452 @item forward
16453 Forwarded articles.
16454
16455 @item nsmail
16456 Netscape mail boxes.
16457
16458 @item mime-parts
16459 @acronym{MIME} multipart messages.
16460
16461 @item standard-digest
16462 The standard (RFC 1153) digest format.
16463
16464 @item mime-digest
16465 A @acronym{MIME} digest of messages.
16466
16467 @item lanl-gov-announce
16468 Announcement messages from LANL Gov Announce.
16469
16470 @item rfc822-forward
16471 A message forwarded according to RFC822.
16472
16473 @item outlook
16474 The Outlook mail box.
16475
16476 @item oe-dbx
16477 The Outlook Express dbx mail box.
16478
16479 @item exim-bounce
16480 A bounce message from the Exim MTA.
16481
16482 @item forward
16483 A message forwarded according to informal rules.
16484
16485 @item rfc934
16486 An RFC934-forwarded message.
16487
16488 @item mailman
16489 A mailman digest.
16490
16491 @item clari-briefs
16492 A digest of Clarinet brief news items.
16493
16494 @item slack-digest
16495 Non-standard digest format---matches most things, but does it badly.
16496
16497 @item mail-in-mail
16498 The last resort.
16499 @end table
16500
16501 You can also use the special ``file type'' @code{guess}, which means
16502 that @code{nndoc} will try to guess what file type it is looking at.
16503 @code{digest} means that @code{nndoc} should guess what digest type the
16504 file is.
16505
16506 @code{nndoc} will not try to change the file or insert any extra headers into
16507 it---it will simply, like, let you use the file as the basis for a
16508 group.  And that's it.
16509
16510 If you have some old archived articles that you want to insert into your
16511 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16512 that.  Say you have an old @file{RMAIL} file with mail that you now want
16513 to split into your new @code{nnml} groups.  You look at that file using
16514 @code{nndoc} (using the @kbd{G f} command in the group buffer
16515 (@pxref{Foreign Groups})), set the process mark on all the articles in
16516 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16517 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
16518 file is now also stored in lots of @code{nnml} directories, and you can
16519 delete that pesky @file{RMAIL} file.  If you have the guts!
16520
16521 Virtual server variables:
16522
16523 @table @code
16524 @item nndoc-article-type
16525 @vindex nndoc-article-type
16526 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16527 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16528 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16529 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16530 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16531
16532 @item nndoc-post-type
16533 @vindex nndoc-post-type
16534 This variable says whether Gnus is to consider the group a news group or
16535 a mail group.  There are two valid values:  @code{mail} (the default)
16536 and @code{news}.
16537 @end table
16538
16539 @menu
16540 * Document Server Internals::   How to add your own document types.
16541 @end menu
16542
16543
16544 @node Document Server Internals
16545 @subsubsection Document Server Internals
16546
16547 Adding new document types to be recognized by @code{nndoc} isn't
16548 difficult.  You just have to whip up a definition of what the document
16549 looks like, write a predicate function to recognize that document type,
16550 and then hook into @code{nndoc}.
16551
16552 First, here's an example document type definition:
16553
16554 @example
16555 (mmdf
16556  (article-begin .  "^\^A\^A\^A\^A\n")
16557  (body-end .  "^\^A\^A\^A\^A\n"))
16558 @end example
16559
16560 The definition is simply a unique @dfn{name} followed by a series of
16561 regexp pseudo-variable settings.  Below are the possible
16562 variables---don't be daunted by the number of variables; most document
16563 types can be defined with very few settings:
16564
16565 @table @code
16566 @item first-article
16567 If present, @code{nndoc} will skip past all text until it finds
16568 something that match this regexp.  All text before this will be
16569 totally ignored.
16570
16571 @item article-begin
16572 This setting has to be present in all document type definitions.  It
16573 says what the beginning of each article looks like.
16574
16575 @item head-begin-function
16576 If present, this should be a function that moves point to the head of
16577 the article.
16578
16579 @item nndoc-head-begin
16580 If present, this should be a regexp that matches the head of the
16581 article.
16582
16583 @item nndoc-head-end
16584 This should match the end of the head of the article.  It defaults to
16585 @samp{^$}---the empty line.
16586
16587 @item body-begin-function
16588 If present, this function should move point to the beginning of the body
16589 of the article.
16590
16591 @item body-begin
16592 This should match the beginning of the body of the article.  It defaults
16593 to @samp{^\n}.
16594
16595 @item body-end-function
16596 If present, this function should move point to the end of the body of
16597 the article.
16598
16599 @item body-end
16600 If present, this should match the end of the body of the article.
16601
16602 @item file-end
16603 If present, this should match the end of the file.  All text after this
16604 regexp will be totally ignored.
16605
16606 @end table
16607
16608 So, using these variables @code{nndoc} is able to dissect a document
16609 file into a series of articles, each with a head and a body.  However, a
16610 few more variables are needed since not all document types are all that
16611 news-like---variables needed to transform the head or the body into
16612 something that's palatable for Gnus:
16613
16614 @table @code
16615 @item prepare-body-function
16616 If present, this function will be called when requesting an article.  It
16617 will be called with point at the start of the body, and is useful if the
16618 document has encoded some parts of its contents.
16619
16620 @item article-transform-function
16621 If present, this function is called when requesting an article.  It's
16622 meant to be used for more wide-ranging transformation of both head and
16623 body of the article.
16624
16625 @item generate-head-function
16626 If present, this function is called to generate a head that Gnus can
16627 understand.  It is called with the article number as a parameter, and is
16628 expected to generate a nice head for the article in question.  It is
16629 called when requesting the headers of all articles.
16630
16631 @end table
16632
16633 Let's look at the most complicated example I can come up with---standard
16634 digests:
16635
16636 @example
16637 (standard-digest
16638  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16639  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16640  (prepare-body-function . nndoc-unquote-dashes)
16641  (body-end-function . nndoc-digest-body-end)
16642  (head-end . "^ ?$")
16643  (body-begin . "^ ?\n")
16644  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16645  (subtype digest guess))
16646 @end example
16647
16648 We see that all text before a 70-width line of dashes is ignored; all
16649 text after a line that starts with that @samp{^End of} is also ignored;
16650 each article begins with a 30-width line of dashes; the line separating
16651 the head from the body may contain a single space; and that the body is
16652 run through @code{nndoc-unquote-dashes} before being delivered.
16653
16654 To hook your own document definition into @code{nndoc}, use the
16655 @code{nndoc-add-type} function.  It takes two parameters---the first
16656 is the definition itself and the second (optional) parameter says
16657 where in the document type definition alist to put this definition.
16658 The alist is traversed sequentially, and
16659 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
16660 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
16661 @code{mmdf} type, and so on.  These type predicates should return
16662 @code{nil} if the document is not of the correct type; @code{t} if it
16663 is of the correct type; and a number if the document might be of the
16664 correct type.  A high number means high probability; a low number
16665 means low probability with @samp{0} being the lowest valid number.
16666
16667
16668 @node SOUP
16669 @subsection SOUP
16670 @cindex SOUP
16671 @cindex offline
16672
16673 In the PC world people often talk about ``offline'' newsreaders.  These
16674 are thingies that are combined reader/news transport monstrosities.
16675 With built-in modem programs.  Yecchh!
16676
16677 Of course, us Unix Weenie types of human beans use things like
16678 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16679 transport things like Ghod intended.  And then we just use normal
16680 newsreaders.
16681
16682 However, it can sometimes be convenient to do something that's a bit
16683 easier on the brain if you have a very slow modem, and you're not really
16684 that interested in doing things properly.
16685
16686 A file format called @sc{soup} has been developed for transporting news
16687 and mail from servers to home machines and back again.  It can be a bit
16688 fiddly.
16689
16690 First some terminology:
16691
16692 @table @dfn
16693
16694 @item server
16695 This is the machine that is connected to the outside world and where you
16696 get news and/or mail from.
16697
16698 @item home machine
16699 This is the machine that you want to do the actual reading and responding
16700 on.  It is typically not connected to the rest of the world in any way.
16701
16702 @item packet
16703 Something that contains messages and/or commands.  There are two kinds
16704 of packets:
16705
16706 @table @dfn
16707 @item message packets
16708 These are packets made at the server, and typically contain lots of
16709 messages for you to read.  These are called @file{SoupoutX.tgz} by
16710 default, where @var{x} is a number.
16711
16712 @item response packets
16713 These are packets made at the home machine, and typically contains
16714 replies that you've written.  These are called @file{SoupinX.tgz} by
16715 default, where @var{x} is a number.
16716
16717 @end table
16718
16719 @end table
16720
16721
16722 @enumerate
16723
16724 @item
16725 You log in on the server and create a @sc{soup} packet.  You can either
16726 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16727 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16728 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16729
16730 @item
16731 You transfer the packet home.  Rail, boat, car or modem will do fine.
16732
16733 @item
16734 You put the packet in your home directory.
16735
16736 @item
16737 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16738 the native or secondary server.
16739
16740 @item
16741 You read articles and mail and answer and followup to the things you
16742 want (@pxref{SOUP Replies}).
16743
16744 @item
16745 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16746 packet.
16747
16748 @item
16749 You transfer this packet to the server.
16750
16751 @item
16752 You use Gnus to mail this packet out with the @kbd{G s s} command.
16753
16754 @item
16755 You then repeat until you die.
16756
16757 @end enumerate
16758
16759 So you basically have a bipartite system---you use @code{nnsoup} for
16760 reading and Gnus for packing/sending these @sc{soup} packets.
16761
16762 @menu
16763 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16764 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16765 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16766 @end menu
16767
16768
16769 @node SOUP Commands
16770 @subsubsection SOUP Commands
16771
16772 These are commands for creating and manipulating @sc{soup} packets.
16773
16774 @table @kbd
16775 @item G s b
16776 @kindex G s b (Group)
16777 @findex gnus-group-brew-soup
16778 Pack all unread articles in the current group
16779 (@code{gnus-group-brew-soup}).  This command understands the
16780 process/prefix convention.
16781
16782 @item G s w
16783 @kindex G s w (Group)
16784 @findex gnus-soup-save-areas
16785 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16786
16787 @item G s s
16788 @kindex G s s (Group)
16789 @findex gnus-soup-send-replies
16790 Send all replies from the replies packet
16791 (@code{gnus-soup-send-replies}).
16792
16793 @item G s p
16794 @kindex G s p (Group)
16795 @findex gnus-soup-pack-packet
16796 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16797
16798 @item G s r
16799 @kindex G s r (Group)
16800 @findex nnsoup-pack-replies
16801 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16802
16803 @item O s
16804 @kindex O s (Summary)
16805 @findex gnus-soup-add-article
16806 This summary-mode command adds the current article to a @sc{soup} packet
16807 (@code{gnus-soup-add-article}).  It understands the process/prefix
16808 convention (@pxref{Process/Prefix}).
16809
16810 @end table
16811
16812
16813 There are a few variables to customize where Gnus will put all these
16814 thingies:
16815
16816 @table @code
16817
16818 @item gnus-soup-directory
16819 @vindex gnus-soup-directory
16820 Directory where Gnus will save intermediate files while composing
16821 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16822
16823 @item gnus-soup-replies-directory
16824 @vindex gnus-soup-replies-directory
16825 This is what Gnus will use as a temporary directory while sending our
16826 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16827
16828 @item gnus-soup-prefix-file
16829 @vindex gnus-soup-prefix-file
16830 Name of the file where Gnus stores the last used prefix.  The default is
16831 @samp{gnus-prefix}.
16832
16833 @item gnus-soup-packer
16834 @vindex gnus-soup-packer
16835 A format string command for packing a @sc{soup} packet.  The default is
16836 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16837
16838 @item gnus-soup-unpacker
16839 @vindex gnus-soup-unpacker
16840 Format string command for unpacking a @sc{soup} packet.  The default is
16841 @samp{gunzip -c %s | tar xvf -}.
16842
16843 @item gnus-soup-packet-directory
16844 @vindex gnus-soup-packet-directory
16845 Where Gnus will look for reply packets.  The default is @file{~/}.
16846
16847 @item gnus-soup-packet-regexp
16848 @vindex gnus-soup-packet-regexp
16849 Regular expression matching @sc{soup} reply packets in
16850 @code{gnus-soup-packet-directory}.
16851
16852 @end table
16853
16854
16855 @node SOUP Groups
16856 @subsubsection SOUP Groups
16857 @cindex nnsoup
16858
16859 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
16860 read incoming packets, unpack them, and put them in a directory where
16861 you can read them at leisure.
16862
16863 These are the variables you can use to customize its behavior:
16864
16865 @table @code
16866
16867 @item nnsoup-tmp-directory
16868 @vindex nnsoup-tmp-directory
16869 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
16870 directory.  (@file{/tmp/} by default.)
16871
16872 @item nnsoup-directory
16873 @vindex nnsoup-directory
16874 @code{nnsoup} then moves each message and index file to this directory.
16875 The default is @file{~/SOUP/}.
16876
16877 @item nnsoup-replies-directory
16878 @vindex nnsoup-replies-directory
16879 All replies will be stored in this directory before being packed into a
16880 reply packet.  The default is @file{~/SOUP/replies/}.
16881
16882 @item nnsoup-replies-format-type
16883 @vindex nnsoup-replies-format-type
16884 The @sc{soup} format of the replies packets.  The default is @samp{?n}
16885 (rnews), and I don't think you should touch that variable.  I probably
16886 shouldn't even have documented it.  Drats!  Too late!
16887
16888 @item nnsoup-replies-index-type
16889 @vindex nnsoup-replies-index-type
16890 The index type of the replies packet.  The default is @samp{?n}, which
16891 means ``none''.  Don't fiddle with this one either!
16892
16893 @item nnsoup-active-file
16894 @vindex nnsoup-active-file
16895 Where @code{nnsoup} stores lots of information.  This is not an ``active
16896 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
16897 this file or mess it up in any way, you're dead.  The default is
16898 @file{~/SOUP/active}.
16899
16900 @item nnsoup-packer
16901 @vindex nnsoup-packer
16902 Format string command for packing a reply @sc{soup} packet.  The default
16903 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
16904
16905 @item nnsoup-unpacker
16906 @vindex nnsoup-unpacker
16907 Format string command for unpacking incoming @sc{soup} packets.  The
16908 default is @samp{gunzip -c %s | tar xvf -}.
16909
16910 @item nnsoup-packet-directory
16911 @vindex nnsoup-packet-directory
16912 Where @code{nnsoup} will look for incoming packets.  The default is
16913 @file{~/}.
16914
16915 @item nnsoup-packet-regexp
16916 @vindex nnsoup-packet-regexp
16917 Regular expression matching incoming @sc{soup} packets.  The default is
16918 @samp{Soupout}.
16919
16920 @item nnsoup-always-save
16921 @vindex nnsoup-always-save
16922 If non-@code{nil}, save the replies buffer after each posted message.
16923
16924 @end table
16925
16926
16927 @node SOUP Replies
16928 @subsubsection SOUP Replies
16929
16930 Just using @code{nnsoup} won't mean that your postings and mailings end
16931 up in @sc{soup} reply packets automagically.  You have to work a bit
16932 more for that to happen.
16933
16934 @findex nnsoup-set-variables
16935 The @code{nnsoup-set-variables} command will set the appropriate
16936 variables to ensure that all your followups and replies end up in the
16937 @sc{soup} system.
16938
16939 In specific, this is what it does:
16940
16941 @lisp
16942 (setq message-send-news-function 'nnsoup-request-post)
16943 (setq message-send-mail-function 'nnsoup-request-mail)
16944 @end lisp
16945
16946 And that's it, really.  If you only want news to go into the @sc{soup}
16947 system you just use the first line.  If you only want mail to be
16948 @sc{soup}ed you use the second.
16949
16950
16951 @node Mail-To-News Gateways
16952 @subsection Mail-To-News Gateways
16953 @cindex mail-to-news gateways
16954 @cindex gateways
16955
16956 If your local @code{nntp} server doesn't allow posting, for some reason
16957 or other, you can post using one of the numerous mail-to-news gateways.
16958 The @code{nngateway} back end provides the interface.
16959
16960 Note that you can't read anything from this back end---it can only be
16961 used to post with.
16962
16963 Server variables:
16964
16965 @table @code
16966 @item nngateway-address
16967 @vindex nngateway-address
16968 This is the address of the mail-to-news gateway.
16969
16970 @item nngateway-header-transformation
16971 @vindex nngateway-header-transformation
16972 News headers often have to be transformed in some odd way or other
16973 for the mail-to-news gateway to accept it.  This variable says what
16974 transformation should be called, and defaults to
16975 @code{nngateway-simple-header-transformation}.  The function is called
16976 narrowed to the headers to be transformed and with one parameter---the
16977 gateway address.
16978
16979 This default function just inserts a new @code{To} header based on the
16980 @code{Newsgroups} header and the gateway address.
16981 For instance, an article with this @code{Newsgroups} header:
16982
16983 @example
16984 Newsgroups: alt.religion.emacs
16985 @end example
16986
16987 will get this @code{To} header inserted:
16988
16989 @example
16990 To: alt-religion-emacs@@GATEWAY
16991 @end example
16992
16993 The following pre-defined functions exist:
16994
16995 @findex nngateway-simple-header-transformation
16996 @table @code
16997
16998 @item nngateway-simple-header-transformation
16999 Creates a @code{To} header that looks like
17000 @var{newsgroup}@@@code{nngateway-address}.
17001
17002 @findex nngateway-mail2news-header-transformation
17003
17004 @item nngateway-mail2news-header-transformation
17005 Creates a @code{To} header that looks like
17006 @code{nngateway-address}.
17007
17008 Here's an example:
17009
17010 @lisp
17011 (setq gnus-post-method
17012       '(nngateway
17013         "mail2news@@replay.com"
17014         (nngateway-header-transformation
17015          nngateway-mail2news-header-transformation)))
17016 @end lisp
17017
17018 @end table
17019
17020
17021 @end table
17022
17023 So, to use this, simply say something like:
17024
17025 @lisp
17026 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17027 @end lisp
17028
17029
17030
17031 @node Combined Groups
17032 @section Combined Groups
17033
17034 Gnus allows combining a mixture of all the other group types into bigger
17035 groups.
17036
17037 @menu
17038 * Virtual Groups::              Combining articles from many groups.
17039 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
17040 @end menu
17041
17042
17043 @node Virtual Groups
17044 @subsection Virtual Groups
17045 @cindex nnvirtual
17046 @cindex virtual groups
17047 @cindex merging groups
17048
17049 An @dfn{nnvirtual group} is really nothing more than a collection of
17050 other groups.
17051
17052 For instance, if you are tired of reading many small groups, you can
17053 put them all in one big group, and then grow tired of reading one
17054 big, unwieldy group.  The joys of computing!
17055
17056 You specify @code{nnvirtual} as the method.  The address should be a
17057 regexp to match component groups.
17058
17059 All marks in the virtual group will stick to the articles in the
17060 component groups.  So if you tick an article in a virtual group, the
17061 article will also be ticked in the component group from whence it
17062 came.  (And vice versa---marks from the component groups will also be
17063 shown in the virtual group.). To create an empty virtual group, run
17064 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17065 and edit the method regexp with @kbd{M-e}
17066 (@code{gnus-group-edit-group-method})
17067
17068 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17069 newsgroups into one, big, happy newsgroup:
17070
17071 @lisp
17072 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17073 @end lisp
17074
17075 The component groups can be native or foreign; everything should work
17076 smoothly, but if your computer explodes, it was probably my fault.
17077
17078 Collecting the same group from several servers might actually be a good
17079 idea if users have set the Distribution header to limit distribution.
17080 If you would like to read @samp{soc.motss} both from a server in Japan
17081 and a server in Norway, you could use the following as the group regexp:
17082
17083 @example
17084 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17085 @end example
17086
17087 (Remember, though, that if you're creating the group with @kbd{G m}, you
17088 shouldn't double the backslashes, and you should leave off the quote
17089 characters at the beginning and the end of the string.)
17090
17091 This should work kinda smoothly---all articles from both groups should
17092 end up in this one, and there should be no duplicates.  Threading (and
17093 the rest) will still work as usual, but there might be problems with the
17094 sequence of articles.  Sorting on date might be an option here
17095 (@pxref{Selecting a Group}).
17096
17097 One limitation, however---all groups included in a virtual
17098 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17099 zombie groups can't be component groups for @code{nnvirtual} groups.
17100
17101 @vindex nnvirtual-always-rescan
17102 If the @code{nnvirtual-always-rescan} is non-@code{nil},
17103 @code{nnvirtual} will always scan groups for unread articles when
17104 entering a virtual group.  If this variable is @code{nil} (which is the
17105 default) and you read articles in a component group after the virtual
17106 group has been activated, the read articles from the component group
17107 will show up when you enter the virtual group.  You'll also see this
17108 effect if you have two virtual groups that have a component group in
17109 common.  If that's the case, you should set this variable to @code{t}.
17110 Or you can just tap @code{M-g} on the virtual group every time before
17111 you enter it---it'll have much the same effect.
17112
17113 @code{nnvirtual} can have both mail and news groups as component groups.
17114 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17115 has to ask the back end of the component group the article comes from
17116 whether it is a news or mail back end.  However, when you do a @kbd{^},
17117 there is typically no sure way for the component back end to know this,
17118 and in that case @code{nnvirtual} tells Gnus that the article came from a
17119 not-news back end.  (Just to be on the safe side.)
17120
17121 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17122 line from the article you respond to in these cases.
17123
17124 @code{nnvirtual} groups do not inherit anything but articles and marks
17125 from component groups---group parameters, for instance, are not
17126 inherited.
17127
17128
17129 @node Kibozed Groups
17130 @subsection Kibozed Groups
17131 @cindex nnkiboze
17132 @cindex kibozing
17133
17134 @dfn{Kibozing} is defined by @acronym{oed} as ``grepping through (parts of)
17135 the news feed''.  @code{nnkiboze} is a back end that will do this for
17136 you.  Oh joy!  Now you can grind any @acronym{NNTP} server down to a halt
17137 with useless requests!  Oh happiness!
17138
17139 @kindex G k (Group)
17140 To create a kibozed group, use the @kbd{G k} command in the group
17141 buffer.
17142
17143 The address field of the @code{nnkiboze} method is, as with
17144 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17145 @code{nnkiboze} group.  That's where most similarities between
17146 @code{nnkiboze} and @code{nnvirtual} end.
17147
17148 In addition to this regexp detailing component groups, an
17149 @code{nnkiboze} group must have a score file to say what articles are
17150 to be included in the group (@pxref{Scoring}).
17151
17152 @kindex M-x nnkiboze-generate-groups
17153 @findex nnkiboze-generate-groups
17154 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17155 @code{nnkiboze} groups you want to have.  This command will take time.
17156 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
17157 headers from all the articles in all the component groups and run them
17158 through the scoring process to determine if there are any articles in
17159 the groups that are to be part of the @code{nnkiboze} groups.
17160
17161 Please limit the number of component groups by using restrictive
17162 regexps.  Otherwise your sysadmin may become annoyed with you, and the
17163 @acronym{NNTP} site may throw you off and never let you back in again.
17164 Stranger things have happened.
17165
17166 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17167 and they can be foreign.  No restrictions.
17168
17169 @vindex nnkiboze-directory
17170 The generation of an @code{nnkiboze} group means writing two files in
17171 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
17172 contains the @acronym{NOV} header lines for all the articles in the group,
17173 and the other is an additional @file{.newsrc} file to store information
17174 on what groups have been searched through to find component articles.
17175
17176 Articles marked as read in the @code{nnkiboze} group will have
17177 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17178
17179
17180 @node Gnus Unplugged
17181 @section Gnus Unplugged
17182 @cindex offline
17183 @cindex unplugged
17184 @cindex Agent
17185 @cindex Gnus Agent
17186 @cindex Gnus Unplugged
17187
17188 In olden times (ca. February '88), people used to run their newsreaders
17189 on big machines with permanent connections to the net.  News transport
17190 was dealt with by news servers, and all the newsreaders had to do was to
17191 read news.  Believe it or not.
17192
17193 Nowadays most people read news and mail at home, and use some sort of
17194 modem to connect to the net.  To avoid running up huge phone bills, it
17195 would be nice to have a way to slurp down all the news and mail, hang up
17196 the phone, read for several hours, and then upload any responses you
17197 have to make.  And then you repeat the procedure.
17198
17199 Of course, you can use news servers for doing this as well.  I've used
17200 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17201 for some years, but doing that's a bore.  Moving the news server
17202 functionality up to the newsreader makes sense if you're the only person
17203 reading news on a machine.
17204
17205 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
17206 fact, you don't even have to configure anything.
17207
17208 Of course, to use it as such, you have to learn a few new commands.
17209
17210 @menu
17211 * Agent Basics::                How it all is supposed to work.
17212 * Agent Categories::            How to tell the Gnus Agent what to download.
17213 * Agent Commands::              New commands for all the buffers.
17214 * Agent as Cache::              The Agent is a big cache too.
17215 * Agent Expiry::                How to make old articles go away.
17216 * Agent Regeneration::          How to recover from lost connections and other accidents.
17217 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
17218 * Outgoing Messages::           What happens when you post/mail something?
17219 * Agent Variables::             Customizing is fun.
17220 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
17221 * Batching Agents::             How to fetch news from a @code{cron} job.
17222 * Agent Caveats::               What you think it'll do and what it does.
17223 @end menu
17224
17225
17226 @node Agent Basics
17227 @subsection Agent Basics
17228
17229 First, let's get some terminology out of the way.
17230
17231 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17232 connection to the net (and notified the Agent that this is the case).
17233 When the connection to the net is up again (and Gnus knows this), the
17234 Agent is @dfn{plugged}.
17235
17236 The @dfn{local} machine is the one you're running on, and which isn't
17237 connected to the net continuously.
17238
17239 @dfn{Downloading} means fetching things from the net to your local
17240 machine.  @dfn{Uploading} is doing the opposite.
17241
17242 Let's take a typical Gnus session using the Agent.
17243
17244 @itemize @bullet
17245
17246 @item
17247 @findex gnus-unplugged
17248 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
17249 Agent in a disconnected state.  You can read all the news that you have
17250 already fetched while in this mode.
17251
17252 @item
17253 You then decide to see whether any new news has arrived.  You connect
17254 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17255 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17256 as usual.  To check for new mail in unplugged mode, see (@pxref{Mail
17257 Source Specifiers}).
17258
17259 @item
17260 You can then read the new news immediately, or you can download the news
17261 onto your local machine.  If you want to do the latter, you press @kbd{g}
17262 to check if there are any new news and then @kbd{J
17263 s} to fetch all the eligible articles in all the groups.  (To let Gnus
17264 know which articles you want to download, @pxref{Agent Categories}.)
17265
17266 @item
17267 After fetching the articles, you press @kbd{J j} to make Gnus become
17268 unplugged again, and you shut down the PPP thing (or whatever).  And
17269 then you read the news offline.
17270
17271 @item
17272 And then you go to step 2.
17273 @end itemize
17274
17275 Here are some things you should do the first time (or so) that you use
17276 the Agent.
17277
17278 @itemize @bullet
17279
17280 @item
17281 Decide which servers should be covered by the Agent.  If you have a mail
17282 back end, it would probably be nonsensical to have it covered by the
17283 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
17284 @kbd{J a} on the server (or servers) that you wish to have covered by the
17285 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17286 added servers you do not wish to have covered by the Agent.  By default,
17287 all @code{nntp} and @code{nnimap} groups in @code{gnus-select-method} and
17288 @code{gnus-secondary-select-methods} are agentized.
17289
17290 @item
17291
17292 Decide on download policy.  It's fairly simple once you decide whether
17293 you are going to use agent categories, topic parameters, and/or group
17294 parameters to implement your policy.  If you're new to gnus, it
17295 is probably best to start with a category @xref{Agent Categories}.
17296
17297 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17298 (@pxref{Agent Categories}) provide for setting a policy that applies
17299 to multiple groups.  Which you use is entirely up to you.  Topic
17300 parameters do override categories so, if you mix the two, you'll have
17301 to take that into account.  If you have a few groups that deviate from
17302 your policy, you can use grou parameters (@pxref{Group Parameters}) to
17303 configure them.
17304
17305 @item
17306 Uhm@dots{} that's it.
17307 @end itemize
17308
17309
17310 @node Agent Categories
17311 @subsection Agent Categories
17312
17313 One of the main reasons to integrate the news transport layer into the
17314 newsreader is to allow greater control over what articles to download.
17315 There's not much point in downloading huge amounts of articles, just to
17316 find out that you're not interested in reading any of them.  It's better
17317 to be somewhat more conservative in choosing what to download, and then
17318 mark the articles for downloading manually if it should turn out that
17319 you're interested in the articles anyway.
17320
17321 One of the more effective methods for controlling what is to be
17322 downloaded is to create a @dfn{category} and then assign some (or all)
17323 groups to this category.  Groups that do not belong in any other
17324 category belong to the @code{default} category.  Gnus has its own
17325 buffer for creating and managing categories.
17326
17327 If you prefer, you can also use group parameters (@pxref{Group
17328 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17329 alternative approach to controlling the agent.  The only real
17330 difference is that categories are specific to the agent (so there is
17331 less to learn) while group and topic parameters include the kitchen
17332 sink.
17333
17334 Since you can set agent parameters in several different places we have
17335 a rule to decide which source to believe.  This rule specifies that
17336 the parameter sources are checked in the following order: group
17337 parameters, topic parameters, agent category, and finally customizable
17338 variables. So you can mix all of these sources to produce a wide range
17339 of behavior, just don't blame me if you don't remember where you put
17340 your settings.
17341
17342 @menu
17343 * Category Syntax::             What a category looks like.
17344 * Category Buffer::             A buffer for maintaining categories.
17345 * Category Variables::          Customize'r'Us.
17346 @end menu
17347
17348
17349 @node Category Syntax
17350 @subsubsection Category Syntax
17351
17352 A category consists of a name, the list of groups belonging to the
17353 category, and a number of optional parameters that override the
17354 customizable variables.  The complete list of agent parameters are
17355 listed below.
17356
17357 @table @code
17358 @item gnus-agent-cat-name
17359 The name of the category.
17360
17361 @item gnus-agent-cat-groups
17362 The list of groups that are in this category.
17363
17364 @item gnus-agent-cat-predicate
17365 A predicate which (generally) gives a rough outline of which articles
17366 are eligible for downloading; and
17367
17368 @item gnus-agent-cat-score-file
17369 a score rule which (generally) gives you a finer granularity when
17370 deciding what articles to download.  (Note that this @dfn{download
17371 score} is not necessarily related to normal scores.)
17372
17373 @item gnus-agent-cat-enable-expiration
17374 a boolean indicating whether the agent should expire old articles in
17375 this group.  Most groups should be expired to conserve disk space.  In
17376 fact, its probably safe to say that the gnus.* hierarchy contains the
17377 only groups that should not be expired.
17378
17379 @item gnus-agent-cat-days-until-old
17380 an integer indicating the number of days that the agent should wait
17381 before deciding that a read article is safe to expire.
17382
17383 @item gnus-agent-cat-low-score
17384 an integer that overrides the value of @code{gnus-agent-low-score}.
17385
17386 @item gnus-agent-cat-high-score
17387 an integer that overrides the value of @code{gnus-agent-high-score}.
17388
17389 @item gnus-agent-cat-length-when-short
17390 an integer that overrides the value of
17391 @code{gnus-agent-short-article}.
17392
17393 @item gnus-agent-cat-length-when-long
17394 an integer that overrides the value of @code{gnus-agent-long-article}.
17395 @end table
17396
17397 The name of a category can not be changed once the category has been
17398 created.
17399
17400 Each category maintains a list of groups that are exclusive members of
17401 that category.  The exclusivity rule is automatically enforced, add a
17402 group to a new category and it is automatically removed from its old
17403 category.
17404
17405 A predicate in its simplest form can be a single predicate such as
17406 @code{true} or @code{false}.  These two will download every available
17407 article or nothing respectively.  In the case of these two special
17408 predicates an additional score rule is superfluous.
17409
17410 Predicates of @code{high} or @code{low} download articles in respect of
17411 their scores in relationship to @code{gnus-agent-high-score} and
17412 @code{gnus-agent-low-score} as described below.
17413
17414 To gain even finer control of what is to be regarded eligible for
17415 download a predicate can consist of a number of predicates with logical
17416 operators sprinkled in between.
17417
17418 Perhaps some examples are in order.
17419
17420 Here's a simple predicate.  (It's the default predicate, in fact, used
17421 for all groups that don't belong to any other category.)
17422
17423 @lisp
17424 short
17425 @end lisp
17426
17427 Quite simple, eh?  This predicate is true if and only if the article is
17428 short (for some value of ``short'').
17429
17430 Here's a more complex predicate:
17431
17432 @lisp
17433 (or high
17434     (and
17435      (not low)
17436      (not long)))
17437 @end lisp
17438
17439 This means that an article should be downloaded if it has a high score,
17440 or if the score is not low and the article is not long.  You get the
17441 drift.
17442
17443 The available logical operators are @code{or}, @code{and} and
17444 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
17445 @samp{|}, @code{&} and @code{!} instead.)
17446
17447 The following predicates are pre-defined, but if none of these fit what
17448 you want to do, you can write your own.
17449
17450 When evaluating each of these predicates, the named constant will be
17451 bound to the value determined by calling
17452 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
17453 example, gnus-agent-short-article will be bound to
17454 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
17455 means that you can specify a predicate in your category then tune that
17456 predicate to individual groups.
17457
17458 @table @code
17459 @item short
17460 True iff the article is shorter than @code{gnus-agent-short-article}
17461 lines; default 100.
17462
17463 @item long
17464 True iff the article is longer than @code{gnus-agent-long-article}
17465 lines; default 200.
17466
17467 @item low
17468 True iff the article has a download score less than
17469 @code{gnus-agent-low-score}; default 0.
17470
17471 @item high
17472 True iff the article has a download score greater than
17473 @code{gnus-agent-high-score}; default 0.
17474
17475 @item spam
17476 True iff the Gnus Agent guesses that the article is spam.  The
17477 heuristics may change over time, but at present it just computes a
17478 checksum and sees whether articles match.
17479
17480 @item true
17481 Always true.
17482
17483 @item false
17484 Always false.
17485 @end table
17486
17487 If you want to create your own predicate function, here's what you have
17488 to know:  The functions are called with no parameters, but the
17489 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
17490 useful values.
17491
17492 For example, you could decide that you don't want to download articles
17493 that were posted more than a certain number of days ago (e.g. posted
17494 more than @code{gnus-agent-expire-days} ago) you might write a function
17495 something along the lines of the following:
17496
17497 @lisp
17498 (defun my-article-old-p ()
17499   "Say whether an article is old."
17500   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
17501      (- (time-to-days (current-time)) gnus-agent-expire-days)))
17502 @end lisp
17503
17504 with the predicate then defined as:
17505
17506 @lisp
17507 (not my-article-old-p)
17508 @end lisp
17509
17510 or you could append your predicate to the predefined
17511 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
17512 wherever.
17513
17514 @lisp
17515 (require 'gnus-agent)
17516 (setq  gnus-category-predicate-alist
17517   (append gnus-category-predicate-alist
17518          '((old . my-article-old-p))))
17519 @end lisp
17520
17521 and simply specify your predicate as:
17522
17523 @lisp
17524 (not old)
17525 @end lisp
17526
17527 If/when using something like the above, be aware that there are many
17528 misconfigured systems/mailers out there and so an article's date is not
17529 always a reliable indication of when it was posted.  Hell, some people
17530 just don't give a damn.
17531
17532 The above predicates apply to @emph{all} the groups which belong to the
17533 category.  However, if you wish to have a specific predicate for an
17534 individual group within a category, or you're just too lazy to set up a
17535 new category, you can enter a group's individual predicate in it's group
17536 parameters like so:
17537
17538 @lisp
17539 (agent-predicate . short)
17540 @end lisp
17541
17542 This is the group/topic parameter equivalent of the agent category default.
17543 Note that when specifying a single word predicate like this, the
17544 @code{agent-predicate} specification must be in dotted pair notation.
17545
17546 The equivalent of the longer example from above would be:
17547
17548 @lisp
17549 (agent-predicate or high (and (not low) (not long)))
17550 @end lisp
17551
17552 The outer parenthesis required in the category specification are not
17553 entered here as, not being in dotted pair notation, the value of the
17554 predicate is assumed to be a list.
17555
17556
17557 Now, the syntax of the download score is the same as the syntax of
17558 normal score files, except that all elements that require actually
17559 seeing the article itself are verboten.  This means that only the
17560 following headers can be scored on: @code{Subject}, @code{From},
17561 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
17562 @code{Lines}, and @code{Xref}.
17563
17564 As with predicates, the specification of the @code{download score rule}
17565 to use in respect of a group can be in either the category definition if
17566 it's to be applicable to all groups in therein, or a group's parameters
17567 if it's to be specific to that group.
17568
17569 In both of these places the @code{download score rule} can take one of
17570 three forms:
17571
17572 @enumerate
17573 @item
17574 Score rule
17575
17576 This has the same syntax as a normal gnus score file except only a
17577 subset of scoring keywords are available as mentioned above.
17578
17579 example:
17580
17581 @itemize @bullet
17582 @item
17583 Category specification
17584
17585 @lisp
17586 (("from"
17587        ("Lars Ingebrigtsen" 1000000 nil s))
17588 ("lines"
17589        (500 -100 nil <)))
17590 @end lisp
17591
17592 @item
17593 Group/Topic Parameter specification
17594
17595 @lisp
17596 (agent-score ("from"
17597                    ("Lars Ingebrigtsen" 1000000 nil s))
17598              ("lines"
17599                    (500 -100 nil <)))
17600 @end lisp
17601
17602 Again, note the omission of the outermost parenthesis here.
17603 @end itemize
17604
17605 @item
17606 Agent score file
17607
17608 These score files must @emph{only} contain the permitted scoring
17609 keywords stated above.
17610
17611 example:
17612
17613 @itemize @bullet
17614 @item
17615 Category specification
17616
17617 @lisp
17618 ("~/News/agent.SCORE")
17619 @end lisp
17620
17621 or perhaps
17622
17623 @lisp
17624 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
17625 @end lisp
17626
17627 @item
17628 Group Parameter specification
17629
17630 @lisp
17631 (agent-score "~/News/agent.SCORE")
17632 @end lisp
17633
17634 Additional score files can be specified as above.  Need I say anything
17635 about parenthesis?
17636 @end itemize
17637
17638 @item
17639 Use @code{normal} score files
17640
17641 If you don't want to maintain two sets of scoring rules for a group, and
17642 your desired @code{downloading} criteria for a group are the same as your
17643 @code{reading} criteria then you can tell the agent to refer to your
17644 @code{normal} score files when deciding what to download.
17645
17646 These directives in either the category definition or a group's
17647 parameters will cause the agent to read in all the applicable score
17648 files for a group, @emph{filtering out} those sections that do not
17649 relate to one of the permitted subset of scoring keywords.
17650
17651 @itemize @bullet
17652 @item
17653 Category Specification
17654
17655 @lisp
17656 file
17657 @end lisp
17658
17659 @item
17660 Group Parameter specification
17661
17662 @lisp
17663 (agent-score . file)
17664 @end lisp
17665 @end itemize
17666 @end enumerate
17667
17668 @node Category Buffer
17669 @subsubsection Category Buffer
17670
17671 You'd normally do all category maintenance from the category buffer.
17672 When you enter it for the first time (with the @kbd{J c} command from
17673 the group buffer), you'll only see the @code{default} category.
17674
17675 The following commands are available in this buffer:
17676
17677 @table @kbd
17678 @item q
17679 @kindex q (Category)
17680 @findex gnus-category-exit
17681 Return to the group buffer (@code{gnus-category-exit}).
17682
17683 @item e
17684 @kindex e (Category)
17685 @findex gnus-category-customize-category
17686 Use a customization buffer to set all of the selected category's
17687 parameters at one time (@code{gnus-category-customize-category}).
17688
17689 @item k
17690 @kindex k (Category)
17691 @findex gnus-category-kill
17692 Kill the current category (@code{gnus-category-kill}).
17693
17694 @item c
17695 @kindex c (Category)
17696 @findex gnus-category-copy
17697 Copy the current category (@code{gnus-category-copy}).
17698
17699 @item a
17700 @kindex a (Category)
17701 @findex gnus-category-add
17702 Add a new category (@code{gnus-category-add}).
17703
17704 @item p
17705 @kindex p (Category)
17706 @findex gnus-category-edit-predicate
17707 Edit the predicate of the current category
17708 (@code{gnus-category-edit-predicate}).
17709
17710 @item g
17711 @kindex g (Category)
17712 @findex gnus-category-edit-groups
17713 Edit the list of groups belonging to the current category
17714 (@code{gnus-category-edit-groups}).
17715
17716 @item s
17717 @kindex s (Category)
17718 @findex gnus-category-edit-score
17719 Edit the download score rule of the current category
17720 (@code{gnus-category-edit-score}).
17721
17722 @item l
17723 @kindex l (Category)
17724 @findex gnus-category-list
17725 List all the categories (@code{gnus-category-list}).
17726 @end table
17727
17728
17729 @node Category Variables
17730 @subsubsection Category Variables
17731
17732 @table @code
17733 @item gnus-category-mode-hook
17734 @vindex gnus-category-mode-hook
17735 Hook run in category buffers.
17736
17737 @item gnus-category-line-format
17738 @vindex gnus-category-line-format
17739 Format of the lines in the category buffer (@pxref{Formatting
17740 Variables}).  Valid elements are:
17741
17742 @table @samp
17743 @item c
17744 The name of the category.
17745
17746 @item g
17747 The number of groups in the category.
17748 @end table
17749
17750 @item gnus-category-mode-line-format
17751 @vindex gnus-category-mode-line-format
17752 Format of the category mode line (@pxref{Mode Line Formatting}).
17753
17754 @item gnus-agent-short-article
17755 @vindex gnus-agent-short-article
17756 Articles that have fewer lines than this are short.  Default 100.
17757
17758 @item gnus-agent-long-article
17759 @vindex gnus-agent-long-article
17760 Articles that have more lines than this are long.  Default 200.
17761
17762 @item gnus-agent-low-score
17763 @vindex gnus-agent-low-score
17764 Articles that have a score lower than this have a low score.  Default
17765 0.
17766
17767 @item gnus-agent-high-score
17768 @vindex gnus-agent-high-score
17769 Articles that have a score higher than this have a high score.  Default
17770 0.
17771
17772 @item gnus-agent-expire-days
17773 @vindex gnus-agent-expire-days
17774 The number of days that a @samp{read} article must stay in the agent's
17775 local disk before becoming eligible for expiration (While the name is
17776 the same, this doesn't mean expiring the article on the server.  It
17777 just means deleting the local copy of the article).  What is also
17778 important to understand is that the counter starts with the time the
17779 article was written to the local disk and not the time the article was
17780 read.
17781 Default 7.
17782
17783 @item gnus-agent-enable-expiration
17784 @vindex gnus-agent-enable-expiration
17785 Determines whether articles in a group are, by default, expired or
17786 retained indefinitely.  The default is @code{ENABLE} which means that
17787 you'll have to disable expiration when desired.  On the other hand,
17788 you could set this to @code{DISABLE}.  In that case, you would then
17789 have to enable expiration in selected groups.
17790
17791 @end table
17792
17793
17794 @node Agent Commands
17795 @subsection Agent Commands
17796 @findex gnus-agent-toggle-plugged
17797 @kindex J j (Agent)
17798
17799 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
17800 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
17801 toggles the plugged/unplugged state of the Gnus Agent.
17802
17803
17804 @menu
17805 * Group Agent Commands::        Configure groups and fetch their contents.
17806 * Summary Agent Commands::      Manually select then fetch specific articles.
17807 * Server Agent Commands::       Select the servers that are supported by the agent.
17808 @end menu
17809
17810
17811
17812
17813 @node Group Agent Commands
17814 @subsubsection Group Agent Commands
17815
17816 @table @kbd
17817 @item J u
17818 @kindex J u (Agent Group)
17819 @findex gnus-agent-fetch-groups
17820 Fetch all eligible articles in the current group
17821 (@code{gnus-agent-fetch-groups}).
17822
17823 @item J c
17824 @kindex J c (Agent Group)
17825 @findex gnus-enter-category-buffer
17826 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
17827
17828 @item J s
17829 @kindex J s (Agent Group)
17830 @findex gnus-agent-fetch-session
17831 Fetch all eligible articles in all groups
17832 (@code{gnus-agent-fetch-session}).
17833
17834 @item J S
17835 @kindex J S (Agent Group)
17836 @findex gnus-group-send-queue
17837 Send all sendable messages in the queue group
17838 (@code{gnus-group-send-queue}).  @xref{Drafts}.
17839
17840 @item J a
17841 @kindex J a (Agent Group)
17842 @findex gnus-agent-add-group
17843 Add the current group to an Agent category
17844 (@code{gnus-agent-add-group}).  This command understands the
17845 process/prefix convention (@pxref{Process/Prefix}).
17846
17847 @item J r
17848 @kindex J r (Agent Group)
17849 @findex gnus-agent-remove-group
17850 Remove the current group from its category, if any
17851 (@code{gnus-agent-remove-group}).  This command understands the
17852 process/prefix convention (@pxref{Process/Prefix}).
17853
17854 @item J Y
17855 @kindex J Y (Agent Group)
17856 @findex gnus-agent-synchronize-flags
17857 Synchronize flags changed while unplugged with remote server, if any.
17858
17859
17860 @end table
17861
17862
17863 @node Summary Agent Commands
17864 @subsubsection Summary Agent Commands
17865
17866 @table @kbd
17867 @item J #
17868 @kindex J # (Agent Summary)
17869 @findex gnus-agent-mark-article
17870 Mark the article for downloading (@code{gnus-agent-mark-article}).
17871
17872 @item J M-#
17873 @kindex J M-# (Agent Summary)
17874 @findex gnus-agent-unmark-article
17875 Remove the downloading mark from the article
17876 (@code{gnus-agent-unmark-article}).
17877
17878 @cindex %
17879 @item @@
17880 @kindex @@ (Agent Summary)
17881 @findex gnus-agent-toggle-mark
17882 Toggle whether to download the article
17883 (@code{gnus-agent-toggle-mark}).  The dowload mark is @samp{%} by
17884 default. 
17885
17886 @item J c
17887 @kindex J c (Agent Summary)
17888 @findex gnus-agent-catchup
17889 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
17890
17891 @item J S
17892 @kindex J S (Agent Summary)
17893 @findex gnus-agent-fetch-group
17894 Download all eligible (See @pxref{Agent Categories}) articles in this group.
17895 (@code{gnus-agent-fetch-group}).
17896
17897 @item J s
17898 @kindex J s (Agent Summary)
17899 @findex gnus-agent-fetch-series
17900 Download all processable articles in this group.
17901 (@code{gnus-agent-fetch-series}).
17902
17903 @item J u
17904 @kindex J u (Agent Summary)
17905 @findex gnus-agent-summary-fetch-group
17906 Download all downloadable articles in the current group
17907 (@code{gnus-agent-summary-fetch-group}).
17908
17909 @end table
17910
17911
17912 @node Server Agent Commands
17913 @subsubsection Server Agent Commands
17914
17915 @table @kbd
17916 @item J a
17917 @kindex J a (Agent Server)
17918 @findex gnus-agent-add-server
17919 Add the current server to the list of servers covered by the Gnus Agent
17920 (@code{gnus-agent-add-server}).
17921
17922 @item J r
17923 @kindex J r (Agent Server)
17924 @findex gnus-agent-remove-server
17925 Remove the current server from the list of servers covered by the Gnus
17926 Agent (@code{gnus-agent-remove-server}).
17927
17928 @end table
17929
17930
17931 @node Agent as Cache
17932 @subsection Agent as Cache
17933
17934 When Gnus is plugged, it is not efficient to download headers or
17935 articles from the server again, if they are already stored in the
17936 Agent.  So, Gnus normally only downloads headers once, and stores them
17937 in the Agent.  These headers are later used when generating the summary
17938 buffer, regardless of whether you are plugged or unplugged.  Articles
17939 are not cached in the Agent by default though (that would potentially
17940 consume lots of disk space), but if you have already downloaded an
17941 article into the Agent, Gnus will not download the article from the
17942 server again but use the locally stored copy instead.
17943
17944 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
17945 @pxref{Agent Variables}) to always download headers and articles while
17946 plugged.  Gnus will almost certainly be slower, but it will be kept
17947 synchronized with the server.  That last point probably won't make any
17948 sense if you are using a nntp or nnimap backend.
17949
17950 @node Agent Expiry
17951 @subsection Agent Expiry
17952
17953 @vindex gnus-agent-expire-days
17954 @findex gnus-agent-expire
17955 @kindex M-x gnus-agent-expire
17956 @kindex M-x gnus-agent-expire-group
17957 @findex gnus-agent-expire-group
17958 @cindex Agent expiry
17959 @cindex Gnus Agent expiry
17960 @cindex expiry
17961
17962 The Agent backend, @code{nnagent}, doesn't handle expiry. Well, at
17963 least it doesn't handle it like other backends.  Instead, there are
17964 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
17965 commands that will expire all read articles that are older than
17966 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
17967 that you're running out of space.  Neither are particularly fast or
17968 efficient, and it's not a particularly good idea to interrupt them (with
17969 @kbd{C-g} or anything else) once you've started one of them.
17970
17971 Note that other functions, e.g. @code{gnus-request-expire-articles},
17972 might run @code{gnus-agent-expire} for you to keep the agent 
17973 synchronized with the group.
17974
17975 The agent parameter @code{agent-enable-expiration} may be used to
17976 prevent expiration in selected groups.
17977
17978 @vindex gnus-agent-expire-all
17979 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
17980 expiration commands will expire all articles---unread, read, ticked
17981 and dormant.  If @code{nil} (which is the default), only read articles
17982 are eligible for expiry, and unread, ticked and dormant articles will
17983 be kept indefinitely.
17984
17985 If you find that some articles eligible for expiry are never expired,
17986 perhaps some Gnus Agent files are corrupted.  There's are special
17987 commands, @code{gnus-agent-regenerate} and
17988 @code{gnus-agent-regenerate-group}, to fix possible problems.
17989
17990 @node Agent Regeneration
17991 @subsection Agent Regeneration
17992
17993 @cindex Agent Regeneration
17994 @cindex Gnus Agent Regeneration
17995 @cindex regeneration
17996
17997 The local data structures used by @code{nnagent} may become corrupted
17998 due to certain exceptional conditions.  When this happens,
17999 @code{nnagent} functionality may degrade or even fail.  The solution
18000 to this problem is to repair the local data structures by removing all
18001 internal inconsistencies.
18002
18003 For example, if your connection to your server is lost while
18004 downloaded articles into the agent, the local data structures will not
18005 know about articles successfully downloaded prior to the connection
18006 failure.  Running @code{gnus-agent-regenerate} or
18007 @code{gnus-agent-regenerate-group} will update the data structures
18008 such that you don't need to download these articles a second time.
18009
18010 @findex gnus-agent-regenerate
18011 @kindex M-x gnus-agent-regenerate
18012 The command @code{gnus-agent-regenerate} will perform
18013 @code{gnus-agent-regenerate-group} on every agentized group.  While
18014 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18015 recommended that you first close all summary buffers.
18016
18017 @findex gnus-agent-regenerate-group
18018 @kindex M-x gnus-agent-regenerate-group
18019 The command @code{gnus-agent-regenerate-group} uses the local copies
18020 of individual articles to repair the local @acronym{NOV}(header) database.  It
18021 then updates the internal data structures that document which articles
18022 are stored locally.  An optional argument will mark articles in the
18023 agent as unread.
18024
18025 @node Agent and IMAP
18026 @subsection Agent and IMAP
18027
18028 The Agent works with any Gnus back end, including nnimap.  However,
18029 since there are some conceptual differences between @acronym{NNTP} and
18030 @acronym{IMAP}, this section (should) provide you with some information to
18031 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18032
18033 The first thing to keep in mind is that all flags (read, ticked, etc)
18034 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18035 case for nntp.  Thus Gnus need to remember flag changes when
18036 disconnected, and synchronize these flags when you plug back in.
18037
18038 Gnus keeps track of flag changes when reading nnimap groups under the
18039 Agent.  When you plug back in, Gnus will check if you have any changed
18040 any flags and ask if you wish to synchronize these with the server.
18041 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18042
18043 @vindex gnus-agent-synchronize-flags
18044 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18045 never automatically synchronize flags.  If it is @code{ask}, which is
18046 the default, the Agent will check if you made any changes and if so
18047 ask if you wish to synchronize these when you re-connect.  If it has
18048 any other value, all flags will be synchronized automatically.
18049
18050 If you do not wish to synchronize flags automatically when you
18051 re-connect, you can do it manually with the
18052 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18053 in the group buffer.
18054
18055 Some things are currently not implemented in the Agent that you'd might
18056 expect from a disconnected @acronym{IMAP} client, including:
18057
18058 @itemize @bullet
18059
18060 @item
18061 Copying/moving articles into nnimap groups when unplugged.
18062
18063 @item
18064 Creating/deleting nnimap groups when unplugged.
18065
18066 @end itemize
18067
18068 Technical note: the synchronization algorithm does not work by ``pushing''
18069 all local flags to the server, but rather incrementally update the
18070 server view of flags by changing only those flags that were changed by
18071 the user.  Thus, if you set one flag on a article, quit the group and
18072 re-select the group and remove the flag; the flag will be set and
18073 removed from the server when you ``synchronize''.  The queued flag
18074 operations can be found in the per-server @code{flags} file in the Agent
18075 directory.  It's emptied when you synchronize flags.
18076
18077
18078 @node Outgoing Messages
18079 @subsection Outgoing Messages
18080
18081 When Gnus is unplugged, all outgoing messages (both mail and news) are
18082 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
18083 them there after posting, and edit them at will.
18084
18085 When Gnus is plugged again, you can send the messages either from the
18086 draft group with the special commands available there, or you can use
18087 the @kbd{J S} command in the group buffer to send all the sendable
18088 messages in the draft group.
18089
18090
18091
18092 @node Agent Variables
18093 @subsection Agent Variables
18094
18095 @table @code
18096 @item gnus-agent-directory
18097 @vindex gnus-agent-directory
18098 Where the Gnus Agent will store its files.  The default is
18099 @file{~/News/agent/}.
18100
18101 @item gnus-agent-handle-level
18102 @vindex gnus-agent-handle-level
18103 Groups on levels (@pxref{Group Levels}) higher than this variable will
18104 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
18105 which means that only subscribed group will be considered by the Agent
18106 by default.
18107
18108 @item gnus-agent-plugged-hook
18109 @vindex gnus-agent-plugged-hook
18110 Hook run when connecting to the network.
18111
18112 @item gnus-agent-unplugged-hook
18113 @vindex gnus-agent-unplugged-hook
18114 Hook run when disconnecting from the network.
18115
18116 @item gnus-agent-fetched-hook
18117 @vindex gnus-agent-fetched-hook
18118 Hook run when finished fetching articles.
18119
18120 @item gnus-agent-cache
18121 @vindex gnus-agent-cache
18122 Variable to control whether use the locally stored @acronym{NOV} and
18123 articles when plugged, e.g. essentially using the Agent as a cache.
18124 The default is non-@code{nil}, which means to use the Agent as a cache.
18125
18126 @item gnus-agent-go-online
18127 @vindex gnus-agent-go-online
18128 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18129 automatically switch offline servers into online status.  If it is
18130 @code{ask}, the default, the Agent will ask if you wish to switch
18131 offline servers into online status when you re-connect.  If it has any
18132 other value, all offline servers will be automatically switched into
18133 online status.
18134
18135 @item gnus-agent-mark-unread-after-downloaded
18136 @vindex gnus-agent-mark-unread-after-downloaded
18137 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18138 mark articles as unread after downloading.  This is usually a safe
18139 thing to do as the newly downloaded article has obviously not been
18140 read.  The default is t.
18141
18142 @item gnus-agent-consider-all-articles
18143 @vindex gnus-agent-consider-all-articles
18144 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18145 agent will fetch all missing headers.  When @code{nil}, the agent will
18146 fetch only new headers. The default is @code{nil}.
18147
18148 @item gnus-agent-max-fetch-size
18149 @vindex gnus-agent-max-fetch-size
18150 The agent fetches articles into a temporary buffer prior to parsing
18151 them into individual files.  To avoid exceeding the max. buffer size,
18152 the agent alternates between fetching and parsing until all articles
18153 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
18154 limit to control how often the cycling occurs.  A large value improves
18155 performance.  A small value minimizes the time lost should the
18156 connection be lost while fetching (You may need to run
18157 @code{gnus-agent-regenerate-group} to update the group's state.
18158 However, all articles parsed prior to loosing the connection will be
18159 available while unplugged).  The default is 10M so it is unusual to
18160 see any cycling.
18161
18162 @item gnus-server-unopen-status
18163 @vindex gnus-server-unopen-status
18164 Perhaps not a Agent variable, but closely related to the Agent, this
18165 variable says what will happen if Gnus cannot open a server.  If the
18166 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18167 whether to deny the server or whether to unplug the agent.  If the
18168 Agent is disabled, Gnus always simply deny the server.  Other choices
18169 for this variable include @code{denied} and @code{offline} the latter
18170 is only valid if the Agent is used.
18171
18172 @item gnus-auto-goto-ignores
18173 @vindex gnus-auto-goto-ignores
18174 Another variable that isn't a Agent variable, yet so closely related
18175 that most will look for it here, this variable tells the summary
18176 buffer how to maneuver around undownloaded (only headers stored in the
18177 agent) and unfetched (neither article nor headers stored) articles.
18178
18179 The legal values are @code{nil} (maneuver to any article),
18180 @code{undownloaded} (maneuvering while unplugged ignores articles that
18181 have not been fetched), @code{always-undownloaded} (maneuvering always
18182 ignores articles that have not been fetched), @code{unfetched}
18183 (maneuvering ignores articles whose headers have not been fetched).
18184
18185 @end table
18186
18187
18188 @node Example Setup
18189 @subsection Example Setup
18190
18191 If you don't want to read this manual, and you have a fairly standard
18192 setup, you may be able to use something like the following as your
18193 @file{~/.gnus.el} file to get started.
18194
18195 @lisp
18196 ;;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
18197 ;;; @r{from your ISP's server.}
18198 (setq gnus-select-method '(nntp "news.your-isp.com"))
18199
18200 ;;; @r{Define how Gnus is to read your mail.  We read mail from}
18201 ;;; @r{your ISP's @acronym{POP} server.}
18202 (setq mail-sources '((pop :server "pop.your-isp.com")))
18203
18204 ;;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
18205 (setq gnus-secondary-select-methods '((nnml "")))
18206
18207 ;;; @r{Make Gnus into an offline newsreader.}
18208 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18209 ;;; (setq gnus-agent t) ; @r{Now the default.}
18210 @end lisp
18211
18212 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
18213 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18214 gnus}.
18215
18216 If this is the first time you've run Gnus, you will be subscribed
18217 automatically to a few default newsgroups.  You'll probably want to
18218 subscribe to more groups, and to do that, you have to query the
18219 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18220 command.  This usually takes quite a while, but you only have to do it
18221 once.
18222
18223 After reading and parsing a while, you'll be presented with a list of
18224 groups.  Subscribe to the ones you want to read with the @kbd{u}
18225 command.  @kbd{l} to make all the killed groups disappear after you've
18226 subscribe to all the groups you want to read.  (@kbd{A k} will bring
18227 back all the killed groups.)
18228
18229 You can now read the groups at once, or you can download the articles
18230 with the @kbd{J s} command.  And then read the rest of this manual to
18231 find out which of the other gazillion things you want to customize.
18232
18233
18234 @node Batching Agents
18235 @subsection Batching Agents
18236 @findex gnus-agent-batch
18237
18238 Having the Gnus Agent fetch articles (and post whatever messages you've
18239 written) is quite easy once you've gotten things set up properly.  The
18240 following shell script will do everything that is necessary:
18241
18242 You can run a complete batch command from the command line with the
18243 following incantation:
18244
18245 @example
18246 #!/bin/sh
18247 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18248 @end example
18249
18250
18251 @node Agent Caveats
18252 @subsection Agent Caveats
18253
18254 The Gnus Agent doesn't seem to work like most other offline
18255 newsreaders.  Here are some common questions that some imaginary people
18256 may ask:
18257
18258 @table @dfn
18259 @item If I read an article while plugged, do they get entered into the Agent?
18260
18261 @strong{No}.  If you want this behaviour, add
18262 @code{gnus-agent-fetch-selected-article} to
18263 @code{gnus-select-article-hook}.
18264
18265 @item If I read an article while plugged, and the article already exists in 
18266 the Agent, will it get downloaded once more?
18267
18268 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18269
18270 @end table
18271
18272 In short, when Gnus is unplugged, it only looks into the locally stored
18273 articles; when it's plugged, it talks to your ISP and may also use the
18274 locally stored articles.
18275
18276
18277 @node Scoring
18278 @chapter Scoring
18279 @cindex scoring
18280
18281 Other people use @dfn{kill files}, but we here at Gnus Towers like
18282 scoring better than killing, so we'd rather switch than fight.  They do
18283 something completely different as well, so sit up straight and pay
18284 attention!
18285
18286 @vindex gnus-summary-mark-below
18287 All articles have a default score (@code{gnus-summary-default-score}),
18288 which is 0 by default.  This score may be raised or lowered either
18289 interactively or by score files.  Articles that have a score lower than
18290 @code{gnus-summary-mark-below} are marked as read.
18291
18292 Gnus will read any @dfn{score files} that apply to the current group
18293 before generating the summary buffer.
18294
18295 There are several commands in the summary buffer that insert score
18296 entries based on the current article.  You can, for instance, ask Gnus to
18297 lower or increase the score of all articles with a certain subject.
18298
18299 There are two sorts of scoring entries: Permanent and temporary.
18300 Temporary score entries are self-expiring entries.  Any entries that are
18301 temporary and have not been used for, say, a week, will be removed
18302 silently to help keep the sizes of the score files down.
18303
18304 @menu
18305 * Summary Score Commands::      Adding score entries for the current group.
18306 * Group Score Commands::        General score commands.
18307 * Score Variables::             Customize your scoring.  (My, what terminology).
18308 * Score File Format::           What a score file may contain.
18309 * Score File Editing::          You can edit score files by hand as well.
18310 * Adaptive Scoring::            Big Sister Gnus knows what you read.
18311 * Home Score File::             How to say where new score entries are to go.
18312 * Followups To Yourself::       Having Gnus notice when people answer you.
18313 * Scoring On Other Headers::    Scoring on non-standard headers.
18314 * Scoring Tips::                How to score effectively.
18315 * Reverse Scoring::             That problem child of old is not problem.
18316 * Global Score Files::          Earth-spanning, ear-splitting score files.
18317 * Kill Files::                  They are still here, but they can be ignored.
18318 * Converting Kill Files::       Translating kill files to score files.
18319 * GroupLens::                   Getting predictions on what you like to read.
18320 * Advanced Scoring::            Using logical expressions to build score rules.
18321 * Score Decays::                It can be useful to let scores wither away.
18322 @end menu
18323
18324
18325 @node Summary Score Commands
18326 @section Summary Score Commands
18327 @cindex score commands
18328
18329 The score commands that alter score entries do not actually modify real
18330 score files.  That would be too inefficient.  Gnus maintains a cache of
18331 previously loaded score files, one of which is considered the
18332 @dfn{current score file alist}.  The score commands simply insert
18333 entries into this list, and upon group exit, this list is saved.
18334
18335 The current score file is by default the group's local score file, even
18336 if no such score file actually exists.  To insert score commands into
18337 some other score file (e.g. @file{all.SCORE}), you must first make this
18338 score file the current one.
18339
18340 General score commands that don't actually change the score file:
18341
18342 @table @kbd
18343
18344 @item V s
18345 @kindex V s (Summary)
18346 @findex gnus-summary-set-score
18347 Set the score of the current article (@code{gnus-summary-set-score}).
18348
18349 @item V S
18350 @kindex V S (Summary)
18351 @findex gnus-summary-current-score
18352 Display the score of the current article
18353 (@code{gnus-summary-current-score}).
18354
18355 @item V t
18356 @kindex V t (Summary)
18357 @findex gnus-score-find-trace
18358 Display all score rules that have been used on the current article
18359 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
18360 can use @kbd{q} to quit.  @kbd{e} edits the corresponding score file.
18361 When point is on a string within the match element, @kbd{e} will try to
18362 bring you to this string in the score file.
18363
18364 @item V w
18365 @kindex V w (Summary)
18366 @findex gnus-score-find-favourite-words
18367 List words used in scoring (@code{gnus-score-find-favourite-words}).
18368
18369 @item V R
18370 @kindex V R (Summary)
18371 @findex gnus-summary-rescore
18372 Run the current summary through the scoring process
18373 (@code{gnus-summary-rescore}).  This might be useful if you're playing
18374 around with your score files behind Gnus' back and want to see the
18375 effect you're having.
18376
18377 @item V c
18378 @kindex V c (Summary)
18379 @findex gnus-score-change-score-file
18380 Make a different score file the current
18381 (@code{gnus-score-change-score-file}).
18382
18383 @item V e
18384 @kindex V e (Summary)
18385 @findex gnus-score-edit-current-scores
18386 Edit the current score file (@code{gnus-score-edit-current-scores}).
18387 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18388 File Editing}).
18389
18390 @item V f
18391 @kindex V f (Summary)
18392 @findex gnus-score-edit-file
18393 Edit a score file and make this score file the current one
18394 (@code{gnus-score-edit-file}).
18395
18396 @item V F
18397 @kindex V F (Summary)
18398 @findex gnus-score-flush-cache
18399 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
18400 after editing score files.
18401
18402 @item V C
18403 @kindex V C (Summary)
18404 @findex gnus-score-customize
18405 Customize a score file in a visually pleasing manner
18406 (@code{gnus-score-customize}).
18407
18408 @end table
18409
18410 The rest of these commands modify the local score file.
18411
18412 @table @kbd
18413
18414 @item V m
18415 @kindex V m (Summary)
18416 @findex gnus-score-set-mark-below
18417 Prompt for a score, and mark all articles with a score below this as
18418 read (@code{gnus-score-set-mark-below}).
18419
18420 @item V x
18421 @kindex V x (Summary)
18422 @findex gnus-score-set-expunge-below
18423 Prompt for a score, and add a score rule to the current score file to
18424 expunge all articles below this score
18425 (@code{gnus-score-set-expunge-below}).
18426 @end table
18427
18428 The keystrokes for actually making score entries follow a very regular
18429 pattern, so there's no need to list all the commands.  (Hundreds of
18430 them.)
18431
18432 @findex gnus-summary-increase-score
18433 @findex gnus-summary-lower-score
18434
18435 @enumerate
18436 @item
18437 The first key is either @kbd{I} (upper case i) for increasing the score
18438 or @kbd{L} for lowering the score.
18439 @item
18440 The second key says what header you want to score on.  The following
18441 keys are available:
18442 @table @kbd
18443
18444 @item a
18445 Score on the author name.
18446
18447 @item s
18448 Score on the subject line.
18449
18450 @item x
18451 Score on the @code{Xref} line---i.e., the cross-posting line.
18452
18453 @item r
18454 Score on the @code{References} line.
18455
18456 @item d
18457 Score on the date.
18458
18459 @item l
18460 Score on the number of lines.
18461
18462 @item i
18463 Score on the @code{Message-ID} header.
18464
18465 @item e
18466 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
18467 if your @acronym{NNTP} server tracks additional header data in overviews.
18468
18469 @item f
18470 Score on followups---this matches the author name, and adds scores to
18471 the followups to this author.  (Using this key leads to the creation of
18472 @file{ADAPT} files.)
18473
18474 @item b
18475 Score on the body.
18476
18477 @item h
18478 Score on the head.
18479
18480 @item t
18481 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
18482 files.)
18483
18484 @end table
18485
18486 @item
18487 The third key is the match type.  Which match types are valid depends on
18488 what headers you are scoring on.
18489
18490 @table @code
18491
18492 @item strings
18493
18494 @table @kbd
18495
18496 @item e
18497 Exact matching.
18498
18499 @item s
18500 Substring matching.
18501
18502 @item f
18503 Fuzzy matching (@pxref{Fuzzy Matching}).
18504
18505 @item r
18506 Regexp matching
18507 @end table
18508
18509 @item date
18510 @table @kbd
18511
18512 @item b
18513 Before date.
18514
18515 @item a
18516 After date.
18517
18518 @item n
18519 This date.
18520 @end table
18521
18522 @item number
18523 @table @kbd
18524
18525 @item <
18526 Less than number.
18527
18528 @item =
18529 Equal to number.
18530
18531 @item >
18532 Greater than number.
18533 @end table
18534 @end table
18535
18536 @item
18537 The fourth and usually final key says whether this is a temporary (i.e.,
18538 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
18539 or whether it is to be done immediately, without adding to the score
18540 file.
18541 @table @kbd
18542
18543 @item t
18544 Temporary score entry.
18545
18546 @item p
18547 Permanent score entry.
18548
18549 @item i
18550 Immediately scoring.
18551 @end table
18552
18553 @item
18554 If you are scoring on `e' (extra) headers, you will then be prompted for
18555 the header name on which you wish to score.  This must be a header named
18556 in gnus-extra-headers, and @samp{TAB} completion is available.
18557
18558 @end enumerate
18559
18560 So, let's say you want to increase the score on the current author with
18561 exact matching permanently: @kbd{I a e p}.  If you want to lower the
18562 score based on the subject line, using substring matching, and make a
18563 temporary score entry: @kbd{L s s t}.  Pretty easy.
18564
18565 To make things a bit more complicated, there are shortcuts.  If you use
18566 a capital letter on either the second or third keys, Gnus will use
18567 defaults for the remaining one or two keystrokes.  The defaults are
18568 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
18569 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
18570
18571 These functions take both the numerical prefix and the symbolic prefix
18572 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
18573 (or increase) the score of the article.  A symbolic prefix of @code{a}
18574 says to use the @file{all.SCORE} file for the command instead of the
18575 current score file.
18576
18577 @vindex gnus-score-mimic-keymap
18578 The @code{gnus-score-mimic-keymap} says whether these commands will
18579 pretend they are keymaps or not.
18580
18581
18582 @node Group Score Commands
18583 @section Group Score Commands
18584 @cindex group score commands
18585
18586 There aren't many of these as yet, I'm afraid.
18587
18588 @table @kbd
18589
18590 @item W f
18591 @kindex W f (Group)
18592 @findex gnus-score-flush-cache
18593 Gnus maintains a cache of score alists to avoid having to reload them
18594 all the time.  This command will flush the cache
18595 (@code{gnus-score-flush-cache}).
18596
18597 @end table
18598
18599 You can do scoring from the command line by saying something like:
18600
18601 @findex gnus-batch-score
18602 @cindex batch scoring
18603 @example
18604 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
18605 @end example
18606
18607
18608 @node Score Variables
18609 @section Score Variables
18610 @cindex score variables
18611
18612 @table @code
18613
18614 @item gnus-use-scoring
18615 @vindex gnus-use-scoring
18616 If @code{nil}, Gnus will not check for score files, and will not, in
18617 general, do any score-related work.  This is @code{t} by default.
18618
18619 @item gnus-kill-killed
18620 @vindex gnus-kill-killed
18621 If this variable is @code{nil}, Gnus will never apply score files to
18622 articles that have already been through the kill process.  While this
18623 may save you lots of time, it also means that if you apply a kill file
18624 to a group, and then change the kill file and want to run it over you
18625 group again to kill more articles, it won't work.  You have to set this
18626 variable to @code{t} to do that.  (It is @code{t} by default.)
18627
18628 @item gnus-kill-files-directory
18629 @vindex gnus-kill-files-directory
18630 All kill and score files will be stored in this directory, which is
18631 initialized from the @env{SAVEDIR} environment variable by default.
18632 This is @file{~/News/} by default.
18633
18634 @item gnus-score-file-suffix
18635 @vindex gnus-score-file-suffix
18636 Suffix to add to the group name to arrive at the score file name
18637 (@file{SCORE} by default.)
18638
18639 @item gnus-score-uncacheable-files
18640 @vindex gnus-score-uncacheable-files
18641 @cindex score cache
18642 All score files are normally cached to avoid excessive re-loading of
18643 score files.  However, if this might make your Emacs grow big and
18644 bloated, so this regexp can be used to weed out score files unlikely
18645 to be needed again.  It would be a bad idea to deny caching of
18646 @file{all.SCORE}, while it might be a good idea to not cache
18647 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
18648 variable is @samp{ADAPT$} by default, so no adaptive score files will
18649 be cached.
18650
18651 @item gnus-save-score
18652 @vindex gnus-save-score
18653 If you have really complicated score files, and do lots of batch
18654 scoring, then you might set this variable to @code{t}.  This will make
18655 Gnus save the scores into the @file{.newsrc.eld} file.
18656
18657 If you do not set this to @code{t}, then manual scores (like those set
18658 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
18659 across group visits.
18660
18661 @item gnus-score-interactive-default-score
18662 @vindex gnus-score-interactive-default-score
18663 Score used by all the interactive raise/lower commands to raise/lower
18664 score with.  Default is 1000, which may seem excessive, but this is to
18665 ensure that the adaptive scoring scheme gets enough room to play with.
18666 We don't want the small changes from the adaptive scoring to overwrite
18667 manually entered data.
18668
18669 @item gnus-summary-default-score
18670 @vindex gnus-summary-default-score
18671 Default score of an article, which is 0 by default.
18672
18673 @item gnus-summary-expunge-below
18674 @vindex gnus-summary-expunge-below
18675 Don't display the summary lines of articles that have scores lower than
18676 this variable.  This is @code{nil} by default, which means that no
18677 articles will be hidden.  This variable is local to the summary buffers,
18678 and has to be set from @code{gnus-summary-mode-hook}.
18679
18680 @item gnus-score-over-mark
18681 @vindex gnus-score-over-mark
18682 Mark (in the third column) used for articles with a score over the
18683 default.  Default is @samp{+}.
18684
18685 @item gnus-score-below-mark
18686 @vindex gnus-score-below-mark
18687 Mark (in the third column) used for articles with a score below the
18688 default.  Default is @samp{-}.
18689
18690 @item gnus-score-find-score-files-function
18691 @vindex gnus-score-find-score-files-function
18692 Function used to find score files for the current group.  This function
18693 is called with the name of the group as the argument.
18694
18695 Predefined functions available are:
18696 @table @code
18697
18698 @item gnus-score-find-single
18699 @findex gnus-score-find-single
18700 Only apply the group's own score file.
18701
18702 @item gnus-score-find-bnews
18703 @findex gnus-score-find-bnews
18704 Apply all score files that match, using bnews syntax.  This is the
18705 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
18706 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
18707 @file{gnu.all.SCORE} would all apply.  In short, the instances of
18708 @samp{all} in the score file names are translated into @samp{.*}, and
18709 then a regexp match is done.
18710
18711 This means that if you have some score entries that you want to apply to
18712 all groups, then you put those entries in the @file{all.SCORE} file.
18713
18714 The score files are applied in a semi-random order, although Gnus will
18715 try to apply the more general score files before the more specific score
18716 files.  It does this by looking at the number of elements in the score
18717 file names---discarding the @samp{all} elements.
18718
18719 @item gnus-score-find-hierarchical
18720 @findex gnus-score-find-hierarchical
18721 Apply all score files from all the parent groups.  This means that you
18722 can't have score files like @file{all.SCORE}, but you can have
18723 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
18724 server.
18725
18726 @end table
18727 This variable can also be a list of functions.  In that case, all
18728 these functions will be called with the group name as argument, and
18729 all the returned lists of score files will be applied.  These
18730 functions can also return lists of lists of score alists directly.  In
18731 that case, the functions that return these non-file score alists
18732 should probably be placed before the ``real'' score file functions, to
18733 ensure that the last score file returned is the local score file.
18734 Phu.
18735
18736 For example, to do hierarchical scoring but use a non-server-specific
18737 overall score file, you could use the value
18738 @example
18739 (list (lambda (group) ("all.SCORE"))
18740       'gnus-score-find-hierarchical)
18741 @end example
18742
18743 @item gnus-score-expiry-days
18744 @vindex gnus-score-expiry-days
18745 This variable says how many days should pass before an unused score file
18746 entry is expired.  If this variable is @code{nil}, no score file entries
18747 are expired.  It's 7 by default.
18748
18749 @item gnus-update-score-entry-dates
18750 @vindex gnus-update-score-entry-dates
18751 If this variable is non-@code{nil}, temporary score entries that have
18752 been triggered (matched) will have their dates updated.  (This is how Gnus
18753 controls expiry---all non-matched-entries will become too old while
18754 matched entries will stay fresh and young.)  However, if you set this
18755 variable to @code{nil}, even matched entries will grow old and will
18756 have to face that oh-so grim reaper.
18757
18758 @item gnus-score-after-write-file-function
18759 @vindex gnus-score-after-write-file-function
18760 Function called with the name of the score file just written.
18761
18762 @item gnus-score-thread-simplify
18763 @vindex gnus-score-thread-simplify
18764 If this variable is non-@code{nil}, article subjects will be
18765 simplified for subject scoring purposes in the same manner as with
18766 threading---according to the current value of
18767 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
18768 @code{substring} or @code{exact} matching, the match will also be
18769 simplified in this manner.
18770
18771 @end table
18772
18773
18774 @node Score File Format
18775 @section Score File Format
18776 @cindex score file format
18777
18778 A score file is an @code{emacs-lisp} file that normally contains just a
18779 single form.  Casual users are not expected to edit these files;
18780 everything can be changed from the summary buffer.
18781
18782 Anyway, if you'd like to dig into it yourself, here's an example:
18783
18784 @lisp
18785 (("from"
18786   ("Lars Ingebrigtsen" -10000)
18787   ("Per Abrahamsen")
18788   ("larsi\\|lmi" -50000 nil R))
18789  ("subject"
18790   ("Ding is Badd" nil 728373))
18791  ("xref"
18792   ("alt.politics" -1000 728372 s))
18793  ("lines"
18794   (2 -100 nil <))
18795  (mark 0)
18796  (expunge -1000)
18797  (mark-and-expunge -10)
18798  (read-only nil)
18799  (orphan -10)
18800  (adapt t)
18801  (files "/hom/larsi/News/gnu.SCORE")
18802  (exclude-files "all.SCORE")
18803  (local (gnus-newsgroup-auto-expire t)
18804         (gnus-summary-make-false-root empty))
18805  (eval (ding)))
18806 @end lisp
18807
18808 This example demonstrates most score file elements.  For a different
18809 approach, see @pxref{Advanced Scoring}.
18810
18811 Even though this looks much like lisp code, nothing here is actually
18812 @code{eval}ed.  The lisp reader is used to read this form, though, so it
18813 has to be valid syntactically, if not semantically.
18814
18815 Six keys are supported by this alist:
18816
18817 @table @code
18818
18819 @item STRING
18820 If the key is a string, it is the name of the header to perform the
18821 match on.  Scoring can only be performed on these eight headers:
18822 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
18823 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
18824 these headers, there are three strings to tell Gnus to fetch the entire
18825 article and do the match on larger parts of the article: @code{Body}
18826 will perform the match on the body of the article, @code{Head} will
18827 perform the match on the head of the article, and @code{All} will
18828 perform the match on the entire article.  Note that using any of these
18829 last three keys will slow down group entry @emph{considerably}.  The
18830 final ``header'' you can score on is @code{Followup}.  These score
18831 entries will result in new score entries being added for all follow-ups
18832 to articles that matches these score entries.
18833
18834 Following this key is a arbitrary number of score entries, where each
18835 score entry has one to four elements.
18836 @enumerate
18837
18838 @item
18839 The first element is the @dfn{match element}.  On most headers this will
18840 be a string, but on the Lines and Chars headers, this must be an
18841 integer.
18842
18843 @item
18844 If the second element is present, it should be a number---the @dfn{score
18845 element}.  This number should be an integer in the neginf to posinf
18846 interval.  This number is added to the score of the article if the match
18847 is successful.  If this element is not present, the
18848 @code{gnus-score-interactive-default-score} number will be used
18849 instead.  This is 1000 by default.
18850
18851 @item
18852 If the third element is present, it should be a number---the @dfn{date
18853 element}.  This date says when the last time this score entry matched,
18854 which provides a mechanism for expiring the score entries.  It this
18855 element is not present, the score entry is permanent.  The date is
18856 represented by the number of days since December 31, 1 BCE.
18857
18858 @item
18859 If the fourth element is present, it should be a symbol---the @dfn{type
18860 element}.  This element specifies what function should be used to see
18861 whether this score entry matches the article.  What match types that can
18862 be used depends on what header you wish to perform the match on.
18863 @table @dfn
18864
18865 @item From, Subject, References, Xref, Message-ID
18866 For most header types, there are the @code{r} and @code{R} (regexp), as
18867 well as @code{s} and @code{S} (substring) types, and @code{e} and
18868 @code{E} (exact match), and @code{w} (word match) types.  If this
18869 element is not present, Gnus will assume that substring matching should
18870 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
18871 that the matches will be done in a case-sensitive manner.  All these
18872 one-letter types are really just abbreviations for the @code{regexp},
18873 @code{string}, @code{exact}, and @code{word} types, which you can use
18874 instead, if you feel like.
18875
18876 @item Extra
18877 Just as for the standard string overview headers, if you are using
18878 gnus-extra-headers, you can score on these headers' values.  In this
18879 case, there is a 5th element in the score entry, being the name of the
18880 header to be scored.  The following entry is useful in your
18881 @file{all.SCORE} file in case of spam attacks from a single origin host,
18882 if your @acronym{NNTP} server tracks NNTP-Posting-Host in overviews:
18883
18884 @lisp
18885 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
18886 @end lisp
18887
18888 @item Lines, Chars
18889 These two headers use different match types: @code{<}, @code{>},
18890 @code{=}, @code{>=} and @code{<=}.
18891
18892 These predicates are true if
18893
18894 @example
18895 (PREDICATE HEADER MATCH)
18896 @end example
18897
18898 evaluates to non-@code{nil}.  For instance, the advanced match
18899 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
18900 following form:
18901
18902 @lisp
18903 (< header-value 4)
18904 @end lisp
18905
18906 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
18907 the match, we get the score added if the article has less than 4 lines.
18908 (It's easy to get confused and think it's the other way around.  But
18909 it's not.  I think.)
18910
18911 When matching on @code{Lines}, be careful because some back ends (like
18912 @code{nndir}) do not generate @code{Lines} header, so every article ends
18913 up being marked as having 0 lines.  This can lead to strange results if
18914 you happen to lower score of the articles with few lines.
18915
18916 @item Date
18917 For the Date header we have three kinda silly match types:
18918 @code{before}, @code{at} and @code{after}.  I can't really imagine this
18919 ever being useful, but, like, it would feel kinda silly not to provide
18920 this function.  Just in case.  You never know.  Better safe than sorry.
18921 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
18922 sex on a first date.  (I have been told that at least one person, and I
18923 quote, ``found this function indispensable'', however.)
18924
18925 @cindex ISO8601
18926 @cindex date
18927 A more useful match type is @code{regexp}.  With it, you can match the
18928 date string using a regular expression.  The date is normalized to
18929 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
18930 you want to match all articles that have been posted on April 1st in
18931 every year, you could use @samp{....0401.........} as a match string,
18932 for instance.  (Note that the date is kept in its original time zone, so
18933 this will match articles that were posted when it was April 1st where
18934 the article was posted from.  Time zones are such wholesome fun for the
18935 whole family, eh?)
18936
18937 @item Head, Body, All
18938 These three match keys use the same match types as the @code{From} (etc)
18939 header uses.
18940
18941 @item Followup
18942 This match key is somewhat special, in that it will match the
18943 @code{From} header, and affect the score of not only the matching
18944 articles, but also all followups to the matching articles.  This allows
18945 you e.g. increase the score of followups to your own articles, or
18946 decrease the score of followups to the articles of some known
18947 trouble-maker.  Uses the same match types as the @code{From} header
18948 uses.  (Using this match key will lead to creation of @file{ADAPT}
18949 files.)
18950
18951 @item Thread
18952 This match key works along the same lines as the @code{Followup} match
18953 key.  If you say that you want to score on a (sub-)thread started by an
18954 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
18955 match.  This will add a new @samp{thread} match for each article that
18956 has @var{x} in its @code{References} header.  (These new @samp{thread}
18957 matches will use the @code{Message-ID}s of these matching articles.)
18958 This will ensure that you can raise/lower the score of an entire thread,
18959 even though some articles in the thread may not have complete
18960 @code{References} headers.  Note that using this may lead to
18961 undeterministic scores of the articles in the thread.  (Using this match
18962 key will lead to creation of @file{ADAPT} files.)
18963 @end table
18964 @end enumerate
18965
18966 @cindex Score File Atoms
18967 @item mark
18968 The value of this entry should be a number.  Any articles with a score
18969 lower than this number will be marked as read.
18970
18971 @item expunge
18972 The value of this entry should be a number.  Any articles with a score
18973 lower than this number will be removed from the summary buffer.
18974
18975 @item mark-and-expunge
18976 The value of this entry should be a number.  Any articles with a score
18977 lower than this number will be marked as read and removed from the
18978 summary buffer.
18979
18980 @item thread-mark-and-expunge
18981 The value of this entry should be a number.  All articles that belong to
18982 a thread that has a total score below this number will be marked as read
18983 and removed from the summary buffer.  @code{gnus-thread-score-function}
18984 says how to compute the total score for a thread.
18985
18986 @item files
18987 The value of this entry should be any number of file names.  These files
18988 are assumed to be score files as well, and will be loaded the same way
18989 this one was.
18990
18991 @item exclude-files
18992 The clue of this entry should be any number of files.  These files will
18993 not be loaded, even though they would normally be so, for some reason or
18994 other.
18995
18996 @item eval
18997 The value of this entry will be @code{eval}el.  This element will be
18998 ignored when handling global score files.
18999
19000 @item read-only
19001 Read-only score files will not be updated or saved.  Global score files
19002 should feature this atom (@pxref{Global Score Files}).  (Note:
19003 @dfn{Global} here really means @dfn{global}; not your personal
19004 apply-to-all-groups score files.)
19005
19006 @item orphan
19007 The value of this entry should be a number.  Articles that do not have
19008 parents will get this number added to their scores.  Imagine you follow
19009 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
19010 will only follow a few of the threads, also want to see any new threads.
19011
19012 You can do this with the following two score file entries:
19013
19014 @example
19015         (orphan -500)
19016         (mark-and-expunge -100)
19017 @end example
19018
19019 When you enter the group the first time, you will only see the new
19020 threads.  You then raise the score of the threads that you find
19021 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19022 rest.  Next time you enter the group, you will see new articles in the
19023 interesting threads, plus any new threads.
19024
19025 I.e.---the orphan score atom is for high-volume groups where a few
19026 interesting threads which can't be found automatically by ordinary
19027 scoring rules exist.
19028
19029 @item adapt
19030 This entry controls the adaptive scoring.  If it is @code{t}, the
19031 default adaptive scoring rules will be used.  If it is @code{ignore}, no
19032 adaptive scoring will be performed on this group.  If it is a list, this
19033 list will be used as the adaptive scoring rules.  If it isn't present,
19034 or is something other than @code{t} or @code{ignore}, the default
19035 adaptive scoring rules will be used.  If you want to use adaptive
19036 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19037 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19038 not want adaptive scoring.  If you only want adaptive scoring in a few
19039 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19040 insert @code{(adapt t)} in the score files of the groups where you want
19041 it.
19042
19043 @item adapt-file
19044 All adaptive score entries will go to the file named by this entry.  It
19045 will also be applied when entering the group.  This atom might be handy
19046 if you want to adapt on several groups at once, using the same adaptive
19047 file for a number of groups.
19048
19049 @item local
19050 @cindex local variables
19051 The value of this entry should be a list of @code{(@var{var}
19052 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
19053 current summary buffer, and set to the value specified.  This is a
19054 convenient, if somewhat strange, way of setting variables in some
19055 groups if you don't like hooks much.  Note that the @var{value} won't
19056 be evaluated.
19057 @end table
19058
19059
19060 @node Score File Editing
19061 @section Score File Editing
19062
19063 You normally enter all scoring commands from the summary buffer, but you
19064 might feel the urge to edit them by hand as well, so we've supplied you
19065 with a mode for that.
19066
19067 It's simply a slightly customized @code{emacs-lisp} mode, with these
19068 additional commands:
19069
19070 @table @kbd
19071
19072 @item C-c C-c
19073 @kindex C-c C-c (Score)
19074 @findex gnus-score-edit-done
19075 Save the changes you have made and return to the summary buffer
19076 (@code{gnus-score-edit-done}).
19077
19078 @item C-c C-d
19079 @kindex C-c C-d (Score)
19080 @findex gnus-score-edit-insert-date
19081 Insert the current date in numerical format
19082 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
19083 you were wondering.
19084
19085 @item C-c C-p
19086 @kindex C-c C-p (Score)
19087 @findex gnus-score-pretty-print
19088 The adaptive score files are saved in an unformatted fashion.  If you
19089 intend to read one of these files, you want to @dfn{pretty print} it
19090 first.  This command (@code{gnus-score-pretty-print}) does that for
19091 you.
19092
19093 @end table
19094
19095 Type @kbd{M-x gnus-score-mode} to use this mode.
19096
19097 @vindex gnus-score-mode-hook
19098 @code{gnus-score-menu-hook} is run in score mode buffers.
19099
19100 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
19101 e} to begin editing score files.
19102
19103
19104 @node Adaptive Scoring
19105 @section Adaptive Scoring
19106 @cindex adaptive scoring
19107
19108 If all this scoring is getting you down, Gnus has a way of making it all
19109 happen automatically---as if by magic.  Or rather, as if by artificial
19110 stupidity, to be precise.
19111
19112 @vindex gnus-use-adaptive-scoring
19113 When you read an article, or mark an article as read, or kill an
19114 article, you leave marks behind.  On exit from the group, Gnus can sniff
19115 these marks and add score elements depending on what marks it finds.
19116 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19117 @code{t} or @code{(line)}.  If you want score adaptively on separate
19118 words appearing in the subjects, you should set this variable to
19119 @code{(word)}.  If you want to use both adaptive methods, set this
19120 variable to @code{(word line)}.
19121
19122 @vindex gnus-default-adaptive-score-alist
19123 To give you complete control over the scoring process, you can customize
19124 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
19125 might look something like this:
19126
19127 @lisp
19128 (setq gnus-default-adaptive-score-alist
19129   '((gnus-unread-mark)
19130     (gnus-ticked-mark (from 4))
19131     (gnus-dormant-mark (from 5))
19132     (gnus-del-mark (from -4) (subject -1))
19133     (gnus-read-mark (from 4) (subject 2))
19134     (gnus-expirable-mark (from -1) (subject -1))
19135     (gnus-killed-mark (from -1) (subject -3))
19136     (gnus-kill-file-mark)
19137     (gnus-ancient-mark)
19138     (gnus-low-score-mark)
19139     (gnus-catchup-mark (from -1) (subject -1))))
19140 @end lisp
19141
19142 As you see, each element in this alist has a mark as a key (either a
19143 variable name or a ``real'' mark---a character).  Following this key is
19144 a arbitrary number of header/score pairs.  If there are no header/score
19145 pairs following the key, no adaptive scoring will be done on articles
19146 that have that key as the article mark.  For instance, articles with
19147 @code{gnus-unread-mark} in the example above will not get adaptive score
19148 entries.
19149
19150 Each article can have only one mark, so just a single of these rules
19151 will be applied to each article.
19152
19153 To take @code{gnus-del-mark} as an example---this alist says that all
19154 articles that have that mark (i.e., are marked with @samp{e}) will have a
19155 score entry added to lower based on the @code{From} header by -4, and
19156 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
19157
19158 If you have marked 10 articles with the same subject with
19159 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19160 That means that that subject will get a score of ten times -1, which
19161 should be, unless I'm much mistaken, -10.
19162
19163 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19164 the read articles will be marked with the @samp{E} mark.  This'll
19165 probably make adaptive scoring slightly impossible, so auto-expiring and
19166 adaptive scoring doesn't really mix very well.
19167
19168 The headers you can score on are @code{from}, @code{subject},
19169 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19170 @code{chars} and @code{date}.  In addition, you can score on
19171 @code{followup}, which will create an adaptive score entry that matches
19172 on the @code{References} header using the @code{Message-ID} of the
19173 current article, thereby matching the following thread.
19174
19175 If you use this scheme, you should set the score file atom @code{mark}
19176 to something small---like -300, perhaps, to avoid having small random
19177 changes result in articles getting marked as read.
19178
19179 After using adaptive scoring for a week or so, Gnus should start to
19180 become properly trained and enhance the authors you like best, and kill
19181 the authors you like least, without you having to say so explicitly.
19182
19183 You can control what groups the adaptive scoring is to be performed on
19184 by using the score files (@pxref{Score File Format}).  This will also
19185 let you use different rules in different groups.
19186
19187 @vindex gnus-adaptive-file-suffix
19188 The adaptive score entries will be put into a file where the name is the
19189 group name with @code{gnus-adaptive-file-suffix} appended.  The default
19190 is @file{ADAPT}.
19191
19192 @vindex gnus-score-exact-adapt-limit
19193 When doing adaptive scoring, substring or fuzzy matching would probably
19194 give you the best results in most cases.  However, if the header one
19195 matches is short, the possibility for false positives is great, so if
19196 the length of the match is less than
19197 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
19198 this variable is @code{nil}, exact matching will always be used to avoid
19199 this problem.
19200
19201 @vindex gnus-default-adaptive-word-score-alist
19202 As mentioned above, you can adapt either on individual words or entire
19203 headers.  If you adapt on words, the
19204 @code{gnus-default-adaptive-word-score-alist} variable says what score
19205 each instance of a word should add given a mark.
19206
19207 @lisp
19208 (setq gnus-default-adaptive-word-score-alist
19209       `((,gnus-read-mark . 30)
19210         (,gnus-catchup-mark . -10)
19211         (,gnus-killed-mark . -20)
19212         (,gnus-del-mark . -15)))
19213 @end lisp
19214
19215 This is the default value.  If you have adaption on words enabled, every
19216 word that appears in subjects of articles marked with
19217 @code{gnus-read-mark} will result in a score rule that increase the
19218 score with 30 points.
19219
19220 @vindex gnus-default-ignored-adaptive-words
19221 @vindex gnus-ignored-adaptive-words
19222 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19223 will be ignored.  If you wish to add more words to be ignored, use the
19224 @code{gnus-ignored-adaptive-words} list instead.
19225
19226 @vindex gnus-adaptive-word-length-limit
19227 Some may feel that short words shouldn't count when doing adaptive
19228 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
19229 an integer.  Words shorter than this number will be ignored.  This
19230 variable defaults to @code{nil}.
19231
19232 @vindex gnus-adaptive-word-syntax-table
19233 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19234 syntax table in effect.  It is similar to the standard syntax table, but
19235 it considers numbers to be non-word-constituent characters.
19236
19237 @vindex gnus-adaptive-word-minimum
19238 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19239 word scoring process will never bring down the score of an article to
19240 below this number.  The default is @code{nil}.
19241
19242 @vindex gnus-adaptive-word-no-group-words
19243 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19244 won't adaptively word score any of the words in the group name.  Useful
19245 for groups like @samp{comp.editors.emacs}, where most of the subject
19246 lines contain the word @samp{emacs}.
19247
19248 After using this scheme for a while, it might be nice to write a
19249 @code{gnus-psychoanalyze-user} command to go through the rules and see
19250 what words you like and what words you don't like.  Or perhaps not.
19251
19252 Note that the adaptive word scoring thing is highly experimental and is
19253 likely to change in the future.  Initial impressions seem to indicate
19254 that it's totally useless as it stands.  Some more work (involving more
19255 rigorous statistical methods) will have to be done to make this useful.
19256
19257
19258 @node Home Score File
19259 @section Home Score File
19260
19261 The score file where new score file entries will go is called the
19262 @dfn{home score file}.  This is normally (and by default) the score file
19263 for the group itself.  For instance, the home score file for
19264 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19265
19266 However, this may not be what you want.  It is often convenient to share
19267 a common home score file among many groups---all @samp{emacs} groups
19268 could perhaps use the same home score file.
19269
19270 @vindex gnus-home-score-file
19271 The variable that controls this is @code{gnus-home-score-file}.  It can
19272 be:
19273
19274 @enumerate
19275 @item
19276 A string.  Then this file will be used as the home score file for all
19277 groups.
19278
19279 @item
19280 A function.  The result of this function will be used as the home score
19281 file.  The function will be called with the name of the group as the
19282 parameter.
19283
19284 @item
19285 A list.  The elements in this list can be:
19286
19287 @enumerate
19288 @item
19289 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
19290 group name, the @var{file-name} will be used as the home score file.
19291
19292 @item
19293 A function.  If the function returns non-@code{nil}, the result will
19294 be used as the home score file.
19295
19296 @item
19297 A string.  Use the string as the home score file.
19298 @end enumerate
19299
19300 The list will be traversed from the beginning towards the end looking
19301 for matches.
19302
19303 @end enumerate
19304
19305 So, if you want to use just a single score file, you could say:
19306
19307 @lisp
19308 (setq gnus-home-score-file
19309       "my-total-score-file.SCORE")
19310 @end lisp
19311
19312 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19313 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19314
19315 @findex gnus-hierarchial-home-score-file
19316 @lisp
19317 (setq gnus-home-score-file
19318       'gnus-hierarchial-home-score-file)
19319 @end lisp
19320
19321 This is a ready-made function provided for your convenience.
19322 Other functions include
19323
19324 @table @code
19325 @item gnus-current-home-score-file
19326 @findex gnus-current-home-score-file
19327 Return the ``current'' regular score file.  This will make scoring
19328 commands add entry to the ``innermost'' matching score file.
19329
19330 @end table
19331
19332 If you want to have one score file for the @samp{emacs} groups and
19333 another for the @samp{comp} groups, while letting all other groups use
19334 their own home score files:
19335
19336 @lisp
19337 (setq gnus-home-score-file
19338       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19339       '(("\\.emacs" "emacs.SCORE")
19340         ;; @r{All the comp groups in one score file}
19341         ("^comp" "comp.SCORE")))
19342 @end lisp
19343
19344 @vindex gnus-home-adapt-file
19345 @code{gnus-home-adapt-file} works exactly the same way as
19346 @code{gnus-home-score-file}, but says what the home adaptive score file
19347 is instead.  All new adaptive file entries will go into the file
19348 specified by this variable, and the same syntax is allowed.
19349
19350 In addition to using @code{gnus-home-score-file} and
19351 @code{gnus-home-adapt-file}, you can also use group parameters
19352 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19353 Parameters}) to achieve much the same.  Group and topic parameters take
19354 precedence over this variable.
19355
19356
19357 @node Followups To Yourself
19358 @section Followups To Yourself
19359
19360 Gnus offers two commands for picking out the @code{Message-ID} header in
19361 the current buffer.  Gnus will then add a score rule that scores using
19362 this @code{Message-ID} on the @code{References} header of other
19363 articles.  This will, in effect, increase the score of all articles that
19364 respond to the article in the current buffer.  Quite useful if you want
19365 to easily note when people answer what you've said.
19366
19367 @table @code
19368
19369 @item gnus-score-followup-article
19370 @findex gnus-score-followup-article
19371 This will add a score to articles that directly follow up your own
19372 article.
19373
19374 @item gnus-score-followup-thread
19375 @findex gnus-score-followup-thread
19376 This will add a score to all articles that appear in a thread ``below''
19377 your own article.
19378 @end table
19379
19380 @vindex message-sent-hook
19381 These two functions are both primarily meant to be used in hooks like
19382 @code{message-sent-hook}, like this:
19383 @lisp
19384 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19385 @end lisp
19386
19387
19388 If you look closely at your own @code{Message-ID}, you'll notice that
19389 the first two or three characters are always the same.  Here's two of
19390 mine:
19391
19392 @example
19393 <x6u3u47icf.fsf@@eyesore.no>
19394 <x6sp9o7ibw.fsf@@eyesore.no>
19395 @end example
19396
19397 So ``my'' ident on this machine is @samp{x6}.  This can be
19398 exploited---the following rule will raise the score on all followups to
19399 myself:
19400
19401 @lisp
19402 ("references"
19403  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
19404   1000 nil r))
19405 @end lisp
19406
19407 Whether it's the first two or first three characters that are ``yours''
19408 is system-dependent.
19409
19410
19411 @node Scoring On Other Headers
19412 @section Scoring On Other Headers
19413 @cindex scoring on other headers
19414
19415 Gnus is quite fast when scoring the ``traditional''
19416 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
19417 other headers requires writing a @code{head} scoring rule, which means
19418 that Gnus has to request every single article from the back end to find
19419 matches.  This takes a long time in big groups.
19420
19421 Now, there's not much you can do about this for news groups, but for
19422 mail groups, you have greater control.  In the @pxref{To From
19423 Newsgroups} section of the manual, it's explained in greater detail what
19424 this mechanism does, but here's a cookbook example for @code{nnml} on
19425 how to allow scoring on the @samp{To} and @samp{Cc} headers.
19426
19427 Put the following in your @file{~/.gnus.el} file.
19428
19429 @lisp
19430 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
19431       nnmail-extra-headers gnus-extra-headers)
19432 @end lisp
19433
19434 Restart Gnus and rebuild your @code{nnml} overview files with the
19435 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
19436 time if you have much mail.
19437
19438 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
19439 so: @kbd{I e s p To RET <your name> RET}.
19440
19441 See?  Simple.
19442
19443
19444 @node Scoring Tips
19445 @section Scoring Tips
19446 @cindex scoring tips
19447
19448 @table @dfn
19449
19450 @item Crossposts
19451 @cindex crossposts
19452 @cindex scoring crossposts
19453 If you want to lower the score of crossposts, the line to match on is
19454 the @code{Xref} header.
19455 @lisp
19456 ("xref" (" talk.politics.misc:" -1000))
19457 @end lisp
19458
19459 @item Multiple crossposts
19460 If you want to lower the score of articles that have been crossposted to
19461 more than, say, 3 groups:
19462 @lisp
19463 ("xref"
19464   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
19465    -1000 nil r))
19466 @end lisp
19467
19468 @item Matching on the body
19469 This is generally not a very good idea---it takes a very long time.
19470 Gnus actually has to fetch each individual article from the server.  But
19471 you might want to anyway, I guess.  Even though there are three match
19472 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
19473 and stick with it in each score file.  If you use any two, each article
19474 will be fetched @emph{twice}.  If you want to match a bit on the
19475 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
19476 the matches.
19477
19478 @item Marking as read
19479 You will probably want to mark articles that have scores below a certain
19480 number as read.  This is most easily achieved by putting the following
19481 in your @file{all.SCORE} file:
19482 @lisp
19483 ((mark -100))
19484 @end lisp
19485 You may also consider doing something similar with @code{expunge}.
19486
19487 @item Negated character classes
19488 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
19489 That will match newlines, which might lead to, well, The Unknown.  Say
19490 @code{[^abcd\n]*} instead.
19491 @end table
19492
19493
19494 @node Reverse Scoring
19495 @section Reverse Scoring
19496 @cindex reverse scoring
19497
19498 If you want to keep just articles that have @samp{Sex with Emacs} in the
19499 subject header, and expunge all other articles, you could put something
19500 like this in your score file:
19501
19502 @lisp
19503 (("subject"
19504   ("Sex with Emacs" 2))
19505  (mark 1)
19506  (expunge 1))
19507 @end lisp
19508
19509 So, you raise all articles that match @samp{Sex with Emacs} and mark the
19510 rest as read, and expunge them to boot.
19511
19512
19513 @node Global Score Files
19514 @section Global Score Files
19515 @cindex global score files
19516
19517 Sure, other newsreaders have ``global kill files''.  These are usually
19518 nothing more than a single kill file that applies to all groups, stored
19519 in the user's home directory.  Bah!  Puny, weak newsreaders!
19520
19521 What I'm talking about here are Global Score Files.  Score files from
19522 all over the world, from users everywhere, uniting all nations in one
19523 big, happy score file union!  Ange-score!  New and untested!
19524
19525 @vindex gnus-global-score-files
19526 All you have to do to use other people's score files is to set the
19527 @code{gnus-global-score-files} variable.  One entry for each score file,
19528 or each score file directory.  Gnus will decide by itself what score
19529 files are applicable to which group.
19530
19531 To use the score file
19532 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
19533 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
19534 say this:
19535
19536 @lisp
19537 (setq gnus-global-score-files
19538       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
19539         "/ftp@@ftp.some-where:/pub/score/"))
19540 @end lisp
19541
19542 @findex gnus-score-search-global-directories
19543 @noindent
19544 Simple, eh?  Directory names must end with a @samp{/}.  These
19545 directories are typically scanned only once during each Gnus session.
19546 If you feel the need to manually re-scan the remote directories, you can
19547 use the @code{gnus-score-search-global-directories} command.
19548
19549 Note that, at present, using this option will slow down group entry
19550 somewhat.  (That is---a lot.)
19551
19552 If you want to start maintaining score files for other people to use,
19553 just put your score file up for anonymous ftp and announce it to the
19554 world.  Become a retro-moderator!  Participate in the retro-moderator
19555 wars sure to ensue, where retro-moderators battle it out for the
19556 sympathy of the people, luring them to use their score files on false
19557 premises!  Yay!  The net is saved!
19558
19559 Here are some tips for the would-be retro-moderator, off the top of my
19560 head:
19561
19562 @itemize @bullet
19563
19564 @item
19565 Articles heavily crossposted are probably junk.
19566 @item
19567 To lower a single inappropriate article, lower by @code{Message-ID}.
19568 @item
19569 Particularly brilliant authors can be raised on a permanent basis.
19570 @item
19571 Authors that repeatedly post off-charter for the group can safely be
19572 lowered out of existence.
19573 @item
19574 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
19575 articles completely.
19576
19577 @item
19578 Use expiring score entries to keep the size of the file down.  You
19579 should probably have a long expiry period, though, as some sites keep
19580 old articles for a long time.
19581 @end itemize
19582
19583 @dots{} I wonder whether other newsreaders will support global score files
19584 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
19585 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
19586 holding our breath yet?
19587
19588
19589 @node Kill Files
19590 @section Kill Files
19591 @cindex kill files
19592
19593 Gnus still supports those pesky old kill files.  In fact, the kill file
19594 entries can now be expiring, which is something I wrote before Daniel
19595 Quinlan thought of doing score files, so I've left the code in there.
19596
19597 In short, kill processing is a lot slower (and I do mean @emph{a lot})
19598 than score processing, so it might be a good idea to rewrite your kill
19599 files into score files.
19600
19601 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
19602 forms into this file, which means that you can use kill files as some
19603 sort of primitive hook function to be run on group entry, even though
19604 that isn't a very good idea.
19605
19606 Normal kill files look like this:
19607
19608 @lisp
19609 (gnus-kill "From" "Lars Ingebrigtsen")
19610 (gnus-kill "Subject" "ding")
19611 (gnus-expunge "X")
19612 @end lisp
19613
19614 This will mark every article written by me as read, and remove the
19615 marked articles from the summary buffer.  Very useful, you'll agree.
19616
19617 Other programs use a totally different kill file syntax.  If Gnus
19618 encounters what looks like a @code{rn} kill file, it will take a stab at
19619 interpreting it.
19620
19621 Two summary functions for editing a @sc{gnus} kill file:
19622
19623 @table @kbd
19624
19625 @item M-k
19626 @kindex M-k (Summary)
19627 @findex gnus-summary-edit-local-kill
19628 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
19629
19630 @item M-K
19631 @kindex M-K (Summary)
19632 @findex gnus-summary-edit-global-kill
19633 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
19634 @end table
19635
19636 Two group mode functions for editing the kill files:
19637
19638 @table @kbd
19639
19640 @item M-k
19641 @kindex M-k (Group)
19642 @findex gnus-group-edit-local-kill
19643 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
19644
19645 @item M-K
19646 @kindex M-K (Group)
19647 @findex gnus-group-edit-global-kill
19648 Edit the general kill file (@code{gnus-group-edit-global-kill}).
19649 @end table
19650
19651 Kill file variables:
19652
19653 @table @code
19654 @item gnus-kill-file-name
19655 @vindex gnus-kill-file-name
19656 A kill file for the group @samp{soc.motss} is normally called
19657 @file{soc.motss.KILL}.  The suffix appended to the group name to get
19658 this file name is detailed by the @code{gnus-kill-file-name} variable.
19659 The ``global'' kill file (not in the score file sense of ``global'', of
19660 course) is just called @file{KILL}.
19661
19662 @vindex gnus-kill-save-kill-file
19663 @item gnus-kill-save-kill-file
19664 If this variable is non-@code{nil}, Gnus will save the
19665 kill file after processing, which is necessary if you use expiring
19666 kills.
19667
19668 @item gnus-apply-kill-hook
19669 @vindex gnus-apply-kill-hook
19670 @findex gnus-apply-kill-file-unless-scored
19671 @findex gnus-apply-kill-file
19672 A hook called to apply kill files to a group.  It is
19673 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
19674 kill file if you have a score file for the same group, you can set this
19675 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
19676 kill files to be processed, you should set this variable to @code{nil}.
19677
19678 @item gnus-kill-file-mode-hook
19679 @vindex gnus-kill-file-mode-hook
19680 A hook called in kill-file mode buffers.
19681
19682 @end table
19683
19684
19685 @node Converting Kill Files
19686 @section Converting Kill Files
19687 @cindex kill files
19688 @cindex converting kill files
19689
19690 If you have loads of old kill files, you may want to convert them into
19691 score files.  If they are ``regular'', you can use
19692 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
19693 by hand.
19694
19695 The kill to score conversion package isn't included in Gnus by default.
19696 You can fetch it from
19697 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
19698
19699 If your old kill files are very complex---if they contain more
19700 non-@code{gnus-kill} forms than not, you'll have to convert them by
19701 hand.  Or just let them be as they are.  Gnus will still use them as
19702 before.
19703
19704
19705 @node GroupLens
19706 @section GroupLens
19707 @cindex GroupLens
19708
19709 @uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} is a
19710 collaborative filtering system that helps you work together with other
19711 people to find the quality news articles out of the huge volume of
19712 news articles generated every day.
19713
19714 To accomplish this the GroupLens system combines your opinions about
19715 articles you have already read with the opinions of others who have done
19716 likewise and gives you a personalized prediction for each unread news
19717 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
19718 rate articles, and finds other people that rate articles the same way.
19719 Once it has found some people you agree with it tells you, in the form
19720 of a prediction, what they thought of the article.  You can use this
19721 prediction to help you decide whether or not you want to read the
19722 article.
19723
19724 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
19725 so this section is mostly of historical interest.
19726
19727 @menu
19728 * Using GroupLens::             How to make Gnus use GroupLens.
19729 * Rating Articles::             Letting GroupLens know how you rate articles.
19730 * Displaying Predictions::      Displaying predictions given by GroupLens.
19731 * GroupLens Variables::         Customizing GroupLens.
19732 @end menu
19733
19734
19735 @node Using GroupLens
19736 @subsection Using GroupLens
19737
19738 To use GroupLens you must register a pseudonym with your local
19739 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
19740 Bureau (BBB)} is the only better bit in town at the moment.
19741
19742 Once you have registered you'll need to set a couple of variables.
19743
19744 @table @code
19745
19746 @item gnus-use-grouplens
19747 @vindex gnus-use-grouplens
19748 Setting this variable to a non-@code{nil} value will make Gnus hook into
19749 all the relevant GroupLens functions.
19750
19751 @item grouplens-pseudonym
19752 @vindex grouplens-pseudonym
19753 This variable should be set to the pseudonym you got when registering
19754 with the Better Bit Bureau.
19755
19756 @item grouplens-newsgroups
19757 @vindex grouplens-newsgroups
19758 A list of groups that you want to get GroupLens predictions for.
19759
19760 @end table
19761
19762 That's the minimum of what you need to get up and running with GroupLens.
19763 Once you've registered, GroupLens will start giving you scores for
19764 articles based on the average of what other people think.  But, to get
19765 the real benefit of GroupLens you need to start rating articles
19766 yourself.  Then the scores GroupLens gives you will be personalized for
19767 you, based on how the people you usually agree with have already rated.
19768
19769
19770 @node Rating Articles
19771 @subsection Rating Articles
19772
19773 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
19774 Where 1 means something like this article is a waste of bandwidth and 5
19775 means that the article was really good.  The basic question to ask
19776 yourself is, ``on a scale from 1 to 5 would I like to see more articles
19777 like this one?''
19778
19779 There are four ways to enter a rating for an article in GroupLens.
19780
19781 @table @kbd
19782
19783 @item r
19784 @kindex r (GroupLens)
19785 @findex bbb-summary-rate-article
19786 This function will prompt you for a rating on a scale of one to five.
19787
19788 @item k
19789 @kindex k (GroupLens)
19790 @findex grouplens-score-thread
19791 This function will prompt you for a rating, and rate all the articles in
19792 the thread.  This is really useful for some of those long running giant
19793 threads in rec.humor.
19794
19795 @end table
19796
19797 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
19798 the score of the article you're reading.
19799
19800 @table @kbd
19801
19802 @item 1-5 n
19803 @kindex n (GroupLens)
19804 @findex grouplens-next-unread-article
19805 Rate the article and go to the next unread article.
19806
19807 @item 1-5 ,
19808 @kindex , (GroupLens)
19809 @findex grouplens-best-unread-article
19810 Rate the article and go to the next unread article with the highest score.
19811
19812 @end table
19813
19814 If you want to give the current article a score of 4 and then go to the
19815 next article, just type @kbd{4 n}.
19816
19817
19818 @node Displaying Predictions
19819 @subsection Displaying Predictions
19820
19821 GroupLens makes a prediction for you about how much you will like a
19822 news article.  The predictions from GroupLens are on a scale from 1 to
19823 5, where 1 is the worst and 5 is the best.  You can use the predictions
19824 from GroupLens in one of three ways controlled by the variable
19825 @code{gnus-grouplens-override-scoring}.
19826
19827 @vindex gnus-grouplens-override-scoring
19828 There are three ways to display predictions in grouplens.  You may
19829 choose to have the GroupLens scores contribute to, or override the
19830 regular gnus scoring mechanism.  override is the default; however, some
19831 people prefer to see the Gnus scores plus the grouplens scores.  To get
19832 the separate scoring behavior you need to set
19833 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
19834 GroupLens predictions combined with the grouplens scores set it to
19835 @code{'override} and to combine the scores set
19836 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
19837 the combine option you will also want to set the values for
19838 @code{grouplens-prediction-offset} and
19839 @code{grouplens-score-scale-factor}.
19840
19841 @vindex grouplens-prediction-display
19842 In either case, GroupLens gives you a few choices for how you would like
19843 to see your predictions displayed.  The display of predictions is
19844 controlled by the @code{grouplens-prediction-display} variable.
19845
19846 The following are valid values for that variable.
19847
19848 @table @code
19849 @item prediction-spot
19850 The higher the prediction, the further to the right an @samp{*} is
19851 displayed.
19852
19853 @item confidence-interval
19854 A numeric confidence interval.
19855
19856 @item prediction-bar
19857 The higher the prediction, the longer the bar.
19858
19859 @item confidence-bar
19860 Numerical confidence.
19861
19862 @item confidence-spot
19863 The spot gets bigger with more confidence.
19864
19865 @item prediction-num
19866 Plain-old numeric value.
19867
19868 @item confidence-plus-minus
19869 Prediction +/- confidence.
19870
19871 @end table
19872
19873
19874 @node GroupLens Variables
19875 @subsection GroupLens Variables
19876
19877 @table @code
19878
19879 @item gnus-summary-grouplens-line-format
19880 The summary line format used in GroupLens-enhanced summary buffers.  It
19881 accepts the same specs as the normal summary line format (@pxref{Summary
19882 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
19883 %s\n}.
19884
19885 @item grouplens-bbb-host
19886 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
19887 default.
19888
19889 @item grouplens-bbb-port
19890 Port of the host running the bbbd server.  The default is 9000.
19891
19892 @item grouplens-score-offset
19893 Offset the prediction by this value.  In other words, subtract the
19894 prediction value by this number to arrive at the effective score.  The
19895 default is 0.
19896
19897 @item grouplens-score-scale-factor
19898 This variable allows the user to magnify the effect of GroupLens scores.
19899 The scale factor is applied after the offset.  The default is 1.
19900
19901 @end table
19902
19903
19904 @node Advanced Scoring
19905 @section Advanced Scoring
19906
19907 Scoring on Subjects and From headers is nice enough, but what if you're
19908 really interested in what a person has to say only when she's talking
19909 about a particular subject?  Or what if you really don't want to
19910 read what person A has to say when she's following up to person B, but
19911 want to read what she says when she's following up to person C?
19912
19913 By using advanced scoring rules you may create arbitrarily complex
19914 scoring patterns.
19915
19916 @menu
19917 * Advanced Scoring Syntax::     A definition.
19918 * Advanced Scoring Examples::   What they look like.
19919 * Advanced Scoring Tips::       Getting the most out of it.
19920 @end menu
19921
19922
19923 @node Advanced Scoring Syntax
19924 @subsection Advanced Scoring Syntax
19925
19926 Ordinary scoring rules have a string as the first element in the rule.
19927 Advanced scoring rules have a list as the first element.  The second
19928 element is the score to be applied if the first element evaluated to a
19929 non-@code{nil} value.
19930
19931 These lists may consist of three logical operators, one redirection
19932 operator, and various match operators.
19933
19934 Logical operators:
19935
19936 @table @code
19937 @item &
19938 @itemx and
19939 This logical operator will evaluate each of its arguments until it finds
19940 one that evaluates to @code{false}, and then it'll stop.  If all arguments
19941 evaluate to @code{true} values, then this operator will return
19942 @code{true}.
19943
19944 @item |
19945 @itemx or
19946 This logical operator will evaluate each of its arguments until it finds
19947 one that evaluates to @code{true}.  If no arguments are @code{true},
19948 then this operator will return @code{false}.
19949
19950 @item !
19951 @itemx not
19952 @itemx Â¬
19953 This logical operator only takes a single argument.  It returns the
19954 logical negation of the value of its argument.
19955
19956 @end table
19957
19958 There is an @dfn{indirection operator} that will make its arguments
19959 apply to the ancestors of the current article being scored.  For
19960 instance, @code{1-} will make score rules apply to the parent of the
19961 current article.  @code{2-} will make score rules apply to the
19962 grandparent of the current article.  Alternatively, you can write
19963 @code{^^}, where the number of @code{^}s (carets) says how far back into
19964 the ancestry you want to go.
19965
19966 Finally, we have the match operators.  These are the ones that do the
19967 real work.  Match operators are header name strings followed by a match
19968 and a match type.  A typical match operator looks like @samp{("from"
19969 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
19970 simple scoring, and the match types are also the same.
19971
19972
19973 @node Advanced Scoring Examples
19974 @subsection Advanced Scoring Examples
19975
19976 Please note that the following examples are score file rules.  To
19977 make a complete score file from them, surround them with another pair
19978 of parentheses.
19979
19980 Let's say you want to increase the score of articles written by Lars
19981 when he's talking about Gnus:
19982
19983 @example
19984 ((&
19985   ("from" "Lars Ingebrigtsen")
19986   ("subject" "Gnus"))
19987  1000)
19988 @end example
19989
19990 Quite simple, huh?
19991
19992 When he writes long articles, he sometimes has something nice to say:
19993
19994 @example
19995 ((&
19996   ("from" "Lars Ingebrigtsen")
19997   (|
19998    ("subject" "Gnus")
19999    ("lines" 100 >)))
20000  1000)
20001 @end example
20002
20003 However, when he responds to things written by Reig Eigil Logge, you
20004 really don't want to read what he's written:
20005
20006 @example
20007 ((&
20008   ("from" "Lars Ingebrigtsen")
20009   (1- ("from" "Reig Eigir Logge")))
20010  -100000)
20011 @end example
20012
20013 Everybody that follows up Redmondo when he writes about disappearing
20014 socks should have their scores raised, but only when they talk about
20015 white socks.  However, when Lars talks about socks, it's usually not
20016 very interesting:
20017
20018 @example
20019 ((&
20020   (1-
20021    (&
20022     ("from" "redmondo@@.*no" r)
20023     ("body" "disappearing.*socks" t)))
20024   (! ("from" "Lars Ingebrigtsen"))
20025   ("body" "white.*socks"))
20026  1000)
20027 @end example
20028
20029 The possibilities are endless.
20030
20031
20032 @node Advanced Scoring Tips
20033 @subsection Advanced Scoring Tips
20034
20035 The @code{&} and @code{|} logical operators do short-circuit logic.
20036 That is, they stop processing their arguments when it's clear what the
20037 result of the operation will be.  For instance, if one of the arguments
20038 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20039 the rest of the arguments.  This means that you should put slow matches
20040 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20041 @samp{subject}) first.
20042
20043 The indirection arguments (@code{1-} and so on) will make their
20044 arguments work on previous generations of the thread.  If you say
20045 something like:
20046
20047 @example
20048 ...
20049 (1-
20050  (1-
20051   ("from" "lars")))
20052 ...
20053 @end example
20054
20055 Then that means "score on the from header of the grandparent of the
20056 current article".  An indirection is quite fast, but it's better to say:
20057
20058 @example
20059 (1-
20060  (&
20061   ("from" "Lars")
20062   ("subject" "Gnus")))
20063 @end example
20064
20065 than it is to say:
20066
20067 @example
20068 (&
20069  (1- ("from" "Lars"))
20070  (1- ("subject" "Gnus")))
20071 @end example
20072
20073
20074 @node Score Decays
20075 @section Score Decays
20076 @cindex score decays
20077 @cindex decays
20078
20079 You may find that your scores have a tendency to grow without
20080 bounds, especially if you're using adaptive scoring.  If scores get too
20081 big, they lose all meaning---they simply max out and it's difficult to
20082 use them in any sensible way.
20083
20084 @vindex gnus-decay-scores
20085 @findex gnus-decay-score
20086 @vindex gnus-decay-score-function
20087 Gnus provides a mechanism for decaying scores to help with this problem.
20088 When score files are loaded and @code{gnus-decay-scores} is
20089 non-@code{nil}, Gnus will run the score files through the decaying
20090 mechanism thereby lowering the scores of all non-permanent score rules.
20091 The decay itself if performed by the @code{gnus-decay-score-function}
20092 function, which is @code{gnus-decay-score} by default.  Here's the
20093 definition of that function:
20094
20095 @lisp
20096 (defun gnus-decay-score (score)
20097   "Decay SCORE.
20098 This is done according to `gnus-score-decay-constant'
20099 and `gnus-score-decay-scale'."
20100   (floor
20101    (- score
20102       (* (if (< score 0) 1 -1)
20103          (min (abs score)
20104               (max gnus-score-decay-constant
20105                    (* (abs score)
20106                       gnus-score-decay-scale)))))))
20107 @end lisp
20108
20109 @vindex gnus-score-decay-scale
20110 @vindex gnus-score-decay-constant
20111 @code{gnus-score-decay-constant} is 3 by default and
20112 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
20113
20114 @enumerate
20115 @item
20116 Scores between -3 and 3 will be set to 0 when this function is called.
20117
20118 @item
20119 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20120
20121 @item
20122 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20123 score.
20124 @end enumerate
20125
20126 If you don't like this decay function, write your own.  It is called
20127 with the score to be decayed as its only parameter, and it should return
20128 the new score, which should be an integer.
20129
20130 Gnus will try to decay scores once a day.  If you haven't run Gnus for
20131 four days, Gnus will decay the scores four times, for instance.
20132
20133 @iftex
20134 @iflatex
20135 @chapter Message
20136 @include message.texi
20137 @chapter Emacs MIME
20138 @include emacs-mime.texi
20139 @chapter Sieve
20140 @include sieve.texi
20141 @chapter PGG
20142 @include pgg.texi
20143 @end iflatex
20144 @end iftex
20145
20146 @node Various
20147 @chapter Various
20148
20149 @menu
20150 * Process/Prefix::              A convention used by many treatment commands.
20151 * Interactive::                 Making Gnus ask you many questions.
20152 * Symbolic Prefixes::           How to supply some Gnus functions with options.
20153 * Formatting Variables::        You can specify what buffers should look like.
20154 * Window Layout::               Configuring the Gnus buffer windows.
20155 * Faces and Fonts::             How to change how faces look.
20156 * Compilation::                 How to speed Gnus up.
20157 * Mode Lines::                  Displaying information in the mode lines.
20158 * Highlighting and Menus::      Making buffers look all nice and cozy.
20159 * Buttons::                     Get tendinitis in ten easy steps!
20160 * Daemons::                     Gnus can do things behind your back.
20161 * NoCeM::                       How to avoid spam and other fatty foods.
20162 * Undo::                        Some actions can be undone.
20163 * Predicate Specifiers::        Specifying predicates.
20164 * Moderation::                  What to do if you're a moderator.
20165 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
20166 * Fuzzy Matching::              What's the big fuzz?
20167 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
20168 * Various Various::             Things that are really various.
20169 @end menu
20170
20171
20172 @node Process/Prefix
20173 @section Process/Prefix
20174 @cindex process/prefix convention
20175
20176 Many functions, among them functions for moving, decoding and saving
20177 articles, use what is known as the @dfn{Process/Prefix convention}.
20178
20179 This is a method for figuring out what articles the user wants the
20180 command to be performed on.
20181
20182 It goes like this:
20183
20184 If the numeric prefix is N, perform the operation on the next N
20185 articles, starting with the current one.  If the numeric prefix is
20186 negative, perform the operation on the previous N articles, starting
20187 with the current one.
20188
20189 @vindex transient-mark-mode
20190 If @code{transient-mark-mode} in non-@code{nil} and the region is
20191 active, all articles in the region will be worked upon.
20192
20193 If there is no numeric prefix, but some articles are marked with the
20194 process mark, perform the operation on the articles marked with
20195 the process mark.
20196
20197 If there is neither a numeric prefix nor any articles marked with the
20198 process mark, just perform the operation on the current article.
20199
20200 Quite simple, really, but it needs to be made clear so that surprises
20201 are avoided.
20202
20203 Commands that react to the process mark will push the current list of
20204 process marked articles onto a stack and will then clear all process
20205 marked articles.  You can restore the previous configuration with the
20206 @kbd{M P y} command (@pxref{Setting Process Marks}).
20207
20208 @vindex gnus-summary-goto-unread
20209 One thing that seems to shock & horrify lots of people is that, for
20210 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20211 Since each @kbd{d} (which marks the current article as read) by default
20212 goes to the next unread article after marking, this means that @kbd{3 d}
20213 will mark the next three unread articles as read, no matter what the
20214 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
20215 @code{nil} for a more straightforward action.
20216
20217 Many commands do not use the process/prefix convention.  All commands
20218 that do explicitly say so in this manual.  To apply the process/prefix
20219 convention to commands that do not use it, you can use the @kbd{M-&}
20220 command.  For instance, to mark all the articles in the group as
20221 expirable, you could say @kbd{M P b M-& E}.
20222
20223
20224 @node Interactive
20225 @section Interactive
20226 @cindex interaction
20227
20228 @table @code
20229
20230 @item gnus-novice-user
20231 @vindex gnus-novice-user
20232 If this variable is non-@code{nil}, you are either a newcomer to the
20233 World of Usenet, or you are very cautious, which is a nice thing to be,
20234 really.  You will be given questions of the type ``Are you sure you want
20235 to do this?'' before doing anything dangerous.  This is @code{t} by
20236 default.
20237
20238 @item gnus-expert-user
20239 @vindex gnus-expert-user
20240 If this variable is non-@code{nil}, you will seldom be asked any
20241 questions by Gnus.  It will simply assume you know what you're doing, no
20242 matter how strange.
20243
20244 @item gnus-interactive-catchup
20245 @vindex gnus-interactive-catchup
20246 Require confirmation before catching up a group if non-@code{nil}.  It
20247 is @code{t} by default.
20248
20249 @item gnus-interactive-exit
20250 @vindex gnus-interactive-exit
20251 Require confirmation before exiting Gnus.  This variable is @code{t} by
20252 default.
20253 @end table
20254
20255
20256 @node Symbolic Prefixes
20257 @section Symbolic Prefixes
20258 @cindex symbolic prefixes
20259
20260 Quite a lot of Emacs commands react to the (numeric) prefix.  For
20261 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20262 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20263 rule of 900 to the current article.
20264
20265 This is all nice and well, but what if you want to give a command some
20266 additional information?  Well, what most commands do is interpret the
20267 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
20268 doesn't want a backup file to be created when saving the current buffer,
20269 for instance.  But what if you want to save without making a backup
20270 file, and you want Emacs to flash lights and play a nice tune at the
20271 same time?  You can't, and you're probably perfectly happy that way.
20272
20273 @kindex M-i (Summary)
20274 @findex gnus-symbolic-argument
20275 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
20276 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20277 character typed in is the value.  You can stack as many @kbd{M-i}
20278 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20279 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
20280 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20281 @code{b}''.  You get the drift.
20282
20283 Typing in symbolic prefixes to commands that don't accept them doesn't
20284 hurt, but it doesn't do any good either.  Currently not many Gnus
20285 functions make use of the symbolic prefix.
20286
20287 If you're interested in how Gnus implements this, @pxref{Extended
20288 Interactive}.
20289
20290
20291 @node Formatting Variables
20292 @section Formatting Variables
20293 @cindex formatting variables
20294
20295 Throughout this manual you've probably noticed lots of variables called
20296 things like @code{gnus-group-line-format} and
20297 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
20298 output lines in the various buffers.  There's quite a lot of them.
20299 Fortunately, they all use the same syntax, so there's not that much to
20300 be annoyed by.
20301
20302 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20303 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
20304 lots of percentages everywhere.
20305
20306 @menu
20307 * Formatting Basics::           A formatting variable is basically a format string.
20308 * Mode Line Formatting::        Some rules about mode line formatting variables.
20309 * Advanced Formatting::         Modifying output in various ways.
20310 * User-Defined Specs::          Having Gnus call your own functions.
20311 * Formatting Fonts::            Making the formatting look colorful and nice.
20312 * Positioning Point::           Moving point to a position after an operation.
20313 * Tabulation::                  Tabulating your output.
20314 * Wide Characters::             Dealing with wide characters.
20315 @end menu
20316
20317 Currently Gnus uses the following formatting variables:
20318 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20319 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20320 @code{gnus-group-mode-line-format},
20321 @code{gnus-summary-mode-line-format},
20322 @code{gnus-article-mode-line-format},
20323 @code{gnus-server-mode-line-format}, and
20324 @code{gnus-summary-pick-line-format}.
20325
20326 All these format variables can also be arbitrary elisp forms.  In that
20327 case, they will be @code{eval}ed to insert the required lines.
20328
20329 @kindex M-x gnus-update-format
20330 @findex gnus-update-format
20331 Gnus includes a command to help you while creating your own format
20332 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
20333 update the spec in question and pop you to a buffer where you can
20334 examine the resulting lisp code to be run to generate the line.
20335
20336
20337
20338 @node Formatting Basics
20339 @subsection Formatting Basics
20340
20341 Each @samp{%} element will be replaced by some string or other when the
20342 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
20343 spec, and pad with spaces to get a 5-character field''.
20344
20345 As with normal C and Emacs Lisp formatting strings, the numerical
20346 modifier between the @samp{%} and the formatting type character will
20347 @dfn{pad} the output so that it is always at least that long.
20348 @samp{%5y} will make the field always (at least) five characters wide by
20349 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
20350 the right instead.
20351
20352 You may also wish to limit the length of the field to protect against
20353 particularly wide values.  For that you can say @samp{%4,6y}, which
20354 means that the field will never be more than 6 characters wide and never
20355 less than 4 characters wide.
20356
20357 Also Gnus supports some extended format specifications, such as
20358 @samp{%&user-date;}.
20359
20360
20361 @node Mode Line Formatting
20362 @subsection Mode Line Formatting
20363
20364 Mode line formatting variables (e.g.,
20365 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20366 buffer line oriented formatting variables (@pxref{Formatting Basics})
20367 with the following two differences:
20368
20369 @enumerate
20370
20371 @item
20372 There must be no newline (@samp{\n}) at the end.
20373
20374 @item
20375 The special @samp{%%b} spec can be used to display the buffer name.
20376 Well, it's no spec at all, really---@samp{%%} is just a way to quote
20377 @samp{%} to allow it to pass through the formatting machinery unmangled,
20378 so that Emacs receives @samp{%b}, which is something the Emacs mode line
20379 display interprets to mean ``show the buffer name''.  For a full list of
20380 mode line specs Emacs understands, see the documentation of the
20381 @code{mode-line-format} variable.
20382
20383 @end enumerate
20384
20385
20386 @node Advanced Formatting
20387 @subsection Advanced Formatting
20388
20389 It is frequently useful to post-process the fields in some way.
20390 Padding, limiting, cutting off parts and suppressing certain values can
20391 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
20392 look like @samp{%~(cut 3)~(ignore "0")y}.
20393
20394 These are the valid modifiers:
20395
20396 @table @code
20397 @item pad
20398 @itemx pad-left
20399 Pad the field to the left with spaces until it reaches the required
20400 length.
20401
20402 @item pad-right
20403 Pad the field to the right with spaces until it reaches the required
20404 length.
20405
20406 @item max
20407 @itemx max-left
20408 Cut off characters from the left until it reaches the specified length.
20409
20410 @item max-right
20411 Cut off characters from the right until it reaches the specified
20412 length.
20413
20414 @item cut
20415 @itemx cut-left
20416 Cut off the specified number of characters from the left.
20417
20418 @item cut-right
20419 Cut off the specified number of characters from the right.
20420
20421 @item ignore
20422 Return an empty string if the field is equal to the specified value.
20423
20424 @item form
20425 Use the specified form as the field value when the @samp{@@} spec is
20426 used.
20427
20428 Here's an example:
20429
20430 @lisp
20431 "~(form (current-time-string))@@"
20432 @end lisp
20433
20434 @end table
20435
20436 Let's take an example.  The @samp{%o} spec in the summary mode lines
20437 will return a date in compact ISO8601 format---@samp{19960809T230410}.
20438 This is quite a mouthful, so we want to shave off the century number and
20439 the time, leaving us with a six-character date.  That would be
20440 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
20441 maxing, and we need the padding to ensure that the date is never less
20442 than 6 characters to make it look nice in columns.)
20443
20444 Ignoring is done first; then cutting; then maxing; and then as the very
20445 last operation, padding.
20446
20447 If you use lots of these advanced thingies, you'll find that Gnus gets
20448 quite slow.  This can be helped enormously by running @kbd{M-x
20449 gnus-compile} when you are satisfied with the look of your lines.
20450 @xref{Compilation}.
20451
20452
20453 @node User-Defined Specs
20454 @subsection User-Defined Specs
20455
20456 All the specs allow for inserting user defined specifiers---@samp{u}.
20457 The next character in the format string should be a letter.  Gnus
20458 will call the function @code{gnus-user-format-function-}@samp{X}, where
20459 @samp{X} is the letter following @samp{%u}.  The function will be passed
20460 a single parameter---what the parameter means depends on what buffer
20461 it's being called from.  The function should return a string, which will
20462 be inserted into the buffer just like information from any other
20463 specifier.  This function may also be called with dummy values, so it
20464 should protect against that.
20465
20466 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
20467 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
20468
20469 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
20470 much the same without defining new functions.  Here's an example:
20471 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
20472 given here will be evaluated to yield the current line number, and then
20473 inserted.
20474
20475
20476 @node Formatting Fonts
20477 @subsection Formatting Fonts
20478
20479 There are specs for highlighting, and these are shared by all the format
20480 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
20481 the special @code{mouse-face} property set, which means that it will be
20482 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
20483 over it.
20484
20485 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
20486 normal faces set using @code{gnus-face-0}, which is @code{bold} by
20487 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
20488 and so on.  Create as many faces as you wish.  The same goes for the
20489 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
20490 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
20491
20492 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
20493 special @code{balloon-help} property set to
20494 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
20495 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
20496 variables should be either strings or symbols naming functions that
20497 return a string.  When the mouse passes over text with this property
20498 set, a balloon window will appear and display the string.  Please
20499 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
20500 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
20501 XEmacs) for more information on this.  (For technical reasons, the
20502 guillemets have been approximated as @samp{<<} and @samp{>>} in this
20503 paragraph.)
20504
20505 Here's an alternative recipe for the group buffer:
20506
20507 @lisp
20508 ;; @r{Create three face types.}
20509 (setq gnus-face-1 'bold)
20510 (setq gnus-face-3 'italic)
20511
20512 ;; @r{We want the article count to be in}
20513 ;; @r{a bold and green face.  So we create}
20514 ;; @r{a new face called @code{my-green-bold}.}
20515 (copy-face 'bold 'my-green-bold)
20516 ;; @r{Set the color.}
20517 (set-face-foreground 'my-green-bold "ForestGreen")
20518 (setq gnus-face-2 'my-green-bold)
20519
20520 ;; @r{Set the new & fancy format.}
20521 (setq gnus-group-line-format
20522       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
20523 @end lisp
20524
20525 I'm sure you'll be able to use this scheme to create totally unreadable
20526 and extremely vulgar displays.  Have fun!
20527
20528 Note that the @samp{%(} specs (and friends) do not make any sense on the
20529 mode-line variables.
20530
20531 @node Positioning Point
20532 @subsection Positioning Point
20533
20534 Gnus usually moves point to a pre-defined place on each line in most
20535 buffers.  By default, point move to the first colon character on the
20536 line.  You can customize this behaviour in three different ways.
20537
20538 You can move the colon character to somewhere else on the line.
20539
20540 @findex gnus-goto-colon
20541 You can redefine the function that moves the point to the colon.  The
20542 function is called @code{gnus-goto-colon}.
20543
20544 But perhaps the most convenient way to deal with this, if you don't want
20545 to have a colon in your line, is to use the @samp{%*} specifier.  If you
20546 put a @samp{%*} somewhere in your format line definition, Gnus will
20547 place point there.
20548
20549
20550 @node Tabulation
20551 @subsection Tabulation
20552
20553 You can usually line up your displays by padding and cutting your
20554 strings.  However, when combining various strings of different size, it
20555 can often be more convenient to just output the strings, and then worry
20556 about lining up the following text afterwards.
20557
20558 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
20559 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
20560
20561 @samp{%50=} will insert space characters to pad the line up to column
20562 50.  If the text is already past column 50, nothing will be inserted.
20563 This is the soft tabulator.
20564
20565 @samp{%-50=} will insert space characters to pad the line up to column
20566 50.  If the text is already past column 50, the excess text past column
20567 50 will be removed.  This is the hard tabulator.
20568
20569
20570 @node Wide Characters
20571 @subsection Wide Characters
20572
20573 Proportional fonts in most countries have characters of the same width.
20574 Some countries, however, use Latin characters mixed with wider
20575 characters---most notable East Asian countries.
20576
20577 The problem is that when formatting, Gnus assumes that if a string is 10
20578 characters wide, it'll be 10 Latin characters wide on the screen.  In
20579 these countries, that's not true.
20580
20581 @vindex gnus-use-correct-string-widths
20582 To help fix this, you can set @code{gnus-use-correct-string-widths} to
20583 @code{t}.  This makes buffer generation slower, but the results will be
20584 prettier.  The default value under XEmacs is @code{t} but @code{nil}
20585 for Emacs.
20586
20587
20588 @node Window Layout
20589 @section Window Layout
20590 @cindex window layout
20591
20592 No, there's nothing here about X, so be quiet.
20593
20594 @vindex gnus-use-full-window
20595 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
20596 other windows and occupy the entire Emacs screen by itself.  It is
20597 @code{t} by default.
20598
20599 Setting this variable to @code{nil} kinda works, but there are
20600 glitches.  Use at your own peril.
20601
20602 @vindex gnus-buffer-configuration
20603 @code{gnus-buffer-configuration} describes how much space each Gnus
20604 buffer should be given.  Here's an excerpt of this variable:
20605
20606 @lisp
20607 ((group (vertical 1.0 (group 1.0 point)
20608                       (if gnus-carpal (group-carpal 4))))
20609  (article (vertical 1.0 (summary 0.25 point)
20610                         (article 1.0))))
20611 @end lisp
20612
20613 This is an alist.  The @dfn{key} is a symbol that names some action or
20614 other.  For instance, when displaying the group buffer, the window
20615 configuration function will use @code{group} as the key.  A full list of
20616 possible names is listed below.
20617
20618 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
20619 should occupy.  To take the @code{article} split as an example -
20620
20621 @lisp
20622 (article (vertical 1.0 (summary 0.25 point)
20623                        (article 1.0)))
20624 @end lisp
20625
20626 This @dfn{split} says that the summary buffer should occupy 25% of upper
20627 half of the screen, and that it is placed over the article buffer.  As
20628 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
20629 reaching for that calculator there).  However, the special number
20630 @code{1.0} is used to signal that this buffer should soak up all the
20631 rest of the space available after the rest of the buffers have taken
20632 whatever they need.  There should be only one buffer with the @code{1.0}
20633 size spec per split.
20634
20635 Point will be put in the buffer that has the optional third element
20636 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
20637 split where the tag @code{frame-focus} is a member (i.e. is the third or
20638 fourth element in the list, depending on whether the @code{point} tag is
20639 present) gets focus.
20640
20641 Here's a more complicated example:
20642
20643 @lisp
20644 (article (vertical 1.0 (group 4)
20645                        (summary 0.25 point)
20646                        (if gnus-carpal (summary-carpal 4))
20647                        (article 1.0)))
20648 @end lisp
20649
20650 If the size spec is an integer instead of a floating point number,
20651 then that number will be used to say how many lines a buffer should
20652 occupy, not a percentage.
20653
20654 If the @dfn{split} looks like something that can be @code{eval}ed (to be
20655 precise---if the @code{car} of the split is a function or a subr), this
20656 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
20657 be used as a split.  This means that there will be three buffers if
20658 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
20659 is non-@code{nil}.
20660
20661 Not complicated enough for you?  Well, try this on for size:
20662
20663 @lisp
20664 (article (horizontal 1.0
20665              (vertical 0.5
20666                  (group 1.0)
20667                  (gnus-carpal 4))
20668              (vertical 1.0
20669                  (summary 0.25 point)
20670                  (summary-carpal 4)
20671                  (article 1.0))))
20672 @end lisp
20673
20674 Whoops.  Two buffers with the mystery 100% tag.  And what's that
20675 @code{horizontal} thingie?
20676
20677 If the first element in one of the split is @code{horizontal}, Gnus will
20678 split the window horizontally, giving you two windows side-by-side.
20679 Inside each of these strips you may carry on all you like in the normal
20680 fashion.  The number following @code{horizontal} says what percentage of
20681 the screen is to be given to this strip.
20682
20683 For each split, there @emph{must} be one element that has the 100% tag.
20684 The splitting is never accurate, and this buffer will eat any leftover
20685 lines from the splits.
20686
20687 To be slightly more formal, here's a definition of what a valid split
20688 may look like:
20689
20690 @example
20691 split      = frame | horizontal | vertical | buffer | form
20692 frame      = "(frame " size *split ")"
20693 horizontal = "(horizontal " size *split ")"
20694 vertical   = "(vertical " size *split ")"
20695 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
20696 size       = number | frame-params
20697 buf-name   = group | article | summary ...
20698 @end example
20699
20700 The limitations are that the @code{frame} split can only appear as the
20701 top-level split.  @var{form} should be an Emacs Lisp form that should
20702 return a valid split.  We see that each split is fully recursive, and
20703 may contain any number of @code{vertical} and @code{horizontal} splits.
20704
20705 @vindex gnus-window-min-width
20706 @vindex gnus-window-min-height
20707 @cindex window height
20708 @cindex window width
20709 Finding the right sizes can be a bit complicated.  No window may be less
20710 than @code{gnus-window-min-height} (default 1) characters high, and all
20711 windows must be at least @code{gnus-window-min-width} (default 1)
20712 characters wide.  Gnus will try to enforce this before applying the
20713 splits.  If you want to use the normal Emacs window width/height limit,
20714 you can just set these two variables to @code{nil}.
20715
20716 If you're not familiar with Emacs terminology, @code{horizontal} and
20717 @code{vertical} splits may work the opposite way of what you'd expect.
20718 Windows inside a @code{horizontal} split are shown side-by-side, and
20719 windows within a @code{vertical} split are shown above each other.
20720
20721 @findex gnus-configure-frame
20722 If you want to experiment with window placement, a good tip is to call
20723 @code{gnus-configure-frame} directly with a split.  This is the function
20724 that does all the real work when splitting buffers.  Below is a pretty
20725 nonsensical configuration with 5 windows; two for the group buffer and
20726 three for the article buffer.  (I said it was nonsensical.)  If you
20727 @code{eval} the statement below, you can get an idea of how that would
20728 look straight away, without going through the normal Gnus channels.
20729 Play with it until you're satisfied, and then use
20730 @code{gnus-add-configuration} to add your new creation to the buffer
20731 configuration list.
20732
20733 @lisp
20734 (gnus-configure-frame
20735  '(horizontal 1.0
20736     (vertical 10
20737       (group 1.0)
20738       (article 0.3 point))
20739     (vertical 1.0
20740       (article 1.0)
20741       (horizontal 4
20742         (group 1.0)
20743         (article 10)))))
20744 @end lisp
20745
20746 You might want to have several frames as well.  No prob---just use the
20747 @code{frame} split:
20748
20749 @lisp
20750 (gnus-configure-frame
20751  '(frame 1.0
20752          (vertical 1.0
20753                    (summary 0.25 point frame-focus)
20754                    (article 1.0))
20755          (vertical ((height . 5) (width . 15)
20756                     (user-position . t)
20757                     (left . -1) (top . 1))
20758                    (picon 1.0))))
20759
20760 @end lisp
20761
20762 This split will result in the familiar summary/article window
20763 configuration in the first (or ``main'') frame, while a small additional
20764 frame will be created where picons will be shown.  As you can see,
20765 instead of the normal @code{1.0} top-level spec, each additional split
20766 should have a frame parameter alist as the size spec.
20767 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
20768 Reference Manual}.  Under XEmacs, a frame property list will be
20769 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
20770 is such a plist.
20771 The list of all possible keys for @code{gnus-buffer-configuration} can
20772 be found in its default value.
20773
20774 Note that the @code{message} key is used for both
20775 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
20776 it is desirable to distinguish between the two, something like this
20777 might be used:
20778
20779 @lisp
20780 (message (horizontal 1.0
20781                      (vertical 1.0 (message 1.0 point))
20782                      (vertical 0.24
20783                                (if (buffer-live-p gnus-summary-buffer)
20784                                    '(summary 0.5))
20785                                (group 1.0))))
20786 @end lisp
20787
20788 One common desire for a multiple frame split is to have a separate frame
20789 for composing mail and news while leaving the original frame intact.  To
20790 accomplish that, something like the following can be done:
20791
20792 @lisp
20793 (message
20794   (frame 1.0
20795          (if (not (buffer-live-p gnus-summary-buffer))
20796              (car (cdr (assoc 'group gnus-buffer-configuration)))
20797            (car (cdr (assoc 'summary gnus-buffer-configuration))))
20798          (vertical ((user-position . t) (top . 1) (left . 1)
20799                     (name . "Message"))
20800                    (message 1.0 point))))
20801 @end lisp
20802
20803 @findex gnus-add-configuration
20804 Since the @code{gnus-buffer-configuration} variable is so long and
20805 complicated, there's a function you can use to ease changing the config
20806 of a single setting: @code{gnus-add-configuration}.  If, for instance,
20807 you want to change the @code{article} setting, you could say:
20808
20809 @lisp
20810 (gnus-add-configuration
20811  '(article (vertical 1.0
20812                (group 4)
20813                (summary .25 point)
20814                (article 1.0))))
20815 @end lisp
20816
20817 You'd typically stick these @code{gnus-add-configuration} calls in your
20818 @file{~/.gnus.el} file or in some startup hook---they should be run after
20819 Gnus has been loaded.
20820
20821 @vindex gnus-always-force-window-configuration
20822 If all windows mentioned in the configuration are already visible, Gnus
20823 won't change the window configuration.  If you always want to force the
20824 ``right'' window configuration, you can set
20825 @code{gnus-always-force-window-configuration} to non-@code{nil}.
20826
20827 If you're using tree displays (@pxref{Tree Display}), and the tree
20828 window is displayed vertically next to another window, you may also want
20829 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
20830 windows resized.
20831
20832 @subsection Example Window Configurations
20833
20834 @itemize @bullet
20835 @item
20836 Narrow left hand side occupied by group buffer.  Right hand side split
20837 between summary buffer (top one-sixth) and article buffer (bottom).
20838
20839 @ifinfo
20840 @example
20841 +---+---------+
20842 | G | Summary |
20843 | r +---------+
20844 | o |         |
20845 | u | Article |
20846 | p |         |
20847 +---+---------+
20848 @end example
20849 @end ifinfo
20850
20851 @lisp
20852 (gnus-add-configuration
20853  '(article
20854    (horizontal 1.0
20855                (vertical 25 (group 1.0))
20856                (vertical 1.0
20857                          (summary 0.16 point)
20858                          (article 1.0)))))
20859
20860 (gnus-add-configuration
20861  '(summary
20862    (horizontal 1.0
20863                (vertical 25 (group 1.0))
20864                (vertical 1.0 (summary 1.0 point)))))
20865 @end lisp
20866
20867 @end itemize
20868
20869
20870 @node Faces and Fonts
20871 @section Faces and Fonts
20872 @cindex faces
20873 @cindex fonts
20874 @cindex colors
20875
20876 Fiddling with fonts and faces used to be very difficult, but these days
20877 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
20878 the face you want to alter, and alter it via the standard Customize
20879 interface.
20880
20881
20882 @node Compilation
20883 @section Compilation
20884 @cindex compilation
20885 @cindex byte-compilation
20886
20887 @findex gnus-compile
20888
20889 Remember all those line format specification variables?
20890 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
20891 on.  Now, Gnus will of course heed whatever these variables are, but,
20892 unfortunately, changing them will mean a quite significant slow-down.
20893 (The default values of these variables have byte-compiled functions
20894 associated with them, while the user-generated versions do not, of
20895 course.)
20896
20897 To help with this, you can run @kbd{M-x gnus-compile} after you've
20898 fiddled around with the variables and feel that you're (kind of)
20899 satisfied.  This will result in the new specs being byte-compiled, and
20900 you'll get top speed again.  Gnus will save these compiled specs in the
20901 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
20902 this function, though---you should compile them yourself by sticking
20903 them into the @file{~/.gnus.el} file and byte-compiling that file.)
20904
20905
20906 @node Mode Lines
20907 @section Mode Lines
20908 @cindex mode lines
20909
20910 @vindex gnus-updated-mode-lines
20911 @code{gnus-updated-mode-lines} says what buffers should keep their mode
20912 lines updated.  It is a list of symbols.  Supported symbols include
20913 @code{group}, @code{article}, @code{summary}, @code{server},
20914 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
20915 Gnus will keep that mode line updated with information that may be
20916 pertinent.  If this variable is @code{nil}, screen refresh may be
20917 quicker.
20918
20919 @cindex display-time
20920
20921 @vindex gnus-mode-non-string-length
20922 By default, Gnus displays information on the current article in the mode
20923 lines of the summary and article buffers.  The information Gnus wishes
20924 to display (e.g. the subject of the article) is often longer than the
20925 mode lines, and therefore have to be cut off at some point.  The
20926 @code{gnus-mode-non-string-length} variable says how long the other
20927 elements on the line is (i.e., the non-info part).  If you put
20928 additional elements on the mode line (e.g. a clock), you should modify
20929 this variable:
20930
20931 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
20932 @lisp
20933 (add-hook 'display-time-hook
20934           (lambda () (setq gnus-mode-non-string-length
20935                            (+ 21
20936                               (if line-number-mode 5 0)
20937                               (if column-number-mode 4 0)
20938                               (length display-time-string)))))
20939 @end lisp
20940
20941 If this variable is @code{nil} (which is the default), the mode line
20942 strings won't be chopped off, and they won't be padded either.  Note
20943 that the default is unlikely to be desirable, as even the percentage
20944 complete in the buffer may be crowded off the mode line; the user should
20945 configure this variable appropriately for her configuration.
20946
20947
20948 @node Highlighting and Menus
20949 @section Highlighting and Menus
20950 @cindex visual
20951 @cindex highlighting
20952 @cindex menus
20953
20954 @vindex gnus-visual
20955 The @code{gnus-visual} variable controls most of the Gnus-prettifying
20956 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
20957 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
20958 file.
20959
20960 This variable can be a list of visual properties that are enabled.  The
20961 following elements are valid, and are all included by default:
20962
20963 @table @code
20964 @item group-highlight
20965 Do highlights in the group buffer.
20966 @item summary-highlight
20967 Do highlights in the summary buffer.
20968 @item article-highlight
20969 Do highlights in the article buffer.
20970 @item highlight
20971 Turn on highlighting in all buffers.
20972 @item group-menu
20973 Create menus in the group buffer.
20974 @item summary-menu
20975 Create menus in the summary buffers.
20976 @item article-menu
20977 Create menus in the article buffer.
20978 @item browse-menu
20979 Create menus in the browse buffer.
20980 @item server-menu
20981 Create menus in the server buffer.
20982 @item score-menu
20983 Create menus in the score buffers.
20984 @item menu
20985 Create menus in all buffers.
20986 @end table
20987
20988 So if you only want highlighting in the article buffer and menus in all
20989 buffers, you could say something like:
20990
20991 @lisp
20992 (setq gnus-visual '(article-highlight menu))
20993 @end lisp
20994
20995 If you want highlighting only and no menus whatsoever, you'd say:
20996
20997 @lisp
20998 (setq gnus-visual '(highlight))
20999 @end lisp
21000
21001 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21002 in all Gnus buffers.
21003
21004 Other general variables that influence the look of all buffers include:
21005
21006 @table @code
21007 @item gnus-mouse-face
21008 @vindex gnus-mouse-face
21009 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
21010 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21011
21012 @end table
21013
21014 There are hooks associated with the creation of all the different menus:
21015
21016 @table @code
21017
21018 @item gnus-article-menu-hook
21019 @vindex gnus-article-menu-hook
21020 Hook called after creating the article mode menu.
21021
21022 @item gnus-group-menu-hook
21023 @vindex gnus-group-menu-hook
21024 Hook called after creating the group mode menu.
21025
21026 @item gnus-summary-menu-hook
21027 @vindex gnus-summary-menu-hook
21028 Hook called after creating the summary mode menu.
21029
21030 @item gnus-server-menu-hook
21031 @vindex gnus-server-menu-hook
21032 Hook called after creating the server mode menu.
21033
21034 @item gnus-browse-menu-hook
21035 @vindex gnus-browse-menu-hook
21036 Hook called after creating the browse mode menu.
21037
21038 @item gnus-score-menu-hook
21039 @vindex gnus-score-menu-hook
21040 Hook called after creating the score mode menu.
21041
21042 @end table
21043
21044
21045 @node Buttons
21046 @section Buttons
21047 @cindex buttons
21048 @cindex mouse
21049 @cindex click
21050
21051 Those new-fangled @dfn{mouse} contraptions is very popular with the
21052 young, hep kids who don't want to learn the proper way to do things
21053 these days.  Why, I remember way back in the summer of '89, when I was
21054 using Emacs on a Tops 20 system.  Three hundred users on one single
21055 machine, and every user was running Simula compilers.  Bah!
21056
21057 Right.
21058
21059 @vindex gnus-carpal
21060 Well, you can make Gnus display bufferfuls of buttons you can click to
21061 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
21062 really.  Tell the chiropractor I sent you.
21063
21064
21065 @table @code
21066
21067 @item gnus-carpal-mode-hook
21068 @vindex gnus-carpal-mode-hook
21069 Hook run in all carpal mode buffers.
21070
21071 @item gnus-carpal-button-face
21072 @vindex gnus-carpal-button-face
21073 Face used on buttons.
21074
21075 @item gnus-carpal-header-face
21076 @vindex gnus-carpal-header-face
21077 Face used on carpal buffer headers.
21078
21079 @item gnus-carpal-group-buffer-buttons
21080 @vindex gnus-carpal-group-buffer-buttons
21081 Buttons in the group buffer.
21082
21083 @item gnus-carpal-summary-buffer-buttons
21084 @vindex gnus-carpal-summary-buffer-buttons
21085 Buttons in the summary buffer.
21086
21087 @item gnus-carpal-server-buffer-buttons
21088 @vindex gnus-carpal-server-buffer-buttons
21089 Buttons in the server buffer.
21090
21091 @item gnus-carpal-browse-buffer-buttons
21092 @vindex gnus-carpal-browse-buffer-buttons
21093 Buttons in the browse buffer.
21094 @end table
21095
21096 All the @code{buttons} variables are lists.  The elements in these list
21097 are either cons cells where the @code{car} contains a text to be displayed and
21098 the @code{cdr} contains a function symbol, or a simple string.
21099
21100
21101 @node Daemons
21102 @section Daemons
21103 @cindex demons
21104 @cindex daemons
21105
21106 Gnus, being larger than any program ever written (allegedly), does lots
21107 of strange stuff that you may wish to have done while you're not
21108 present.  For instance, you may want it to check for new mail once in a
21109 while.  Or you may want it to close down all connections to all servers
21110 when you leave Emacs idle.  And stuff like that.
21111
21112 Gnus will let you do stuff like that by defining various
21113 @dfn{handlers}.  Each handler consists of three elements:  A
21114 @var{function}, a @var{time}, and an @var{idle} parameter.
21115
21116 Here's an example of a handler that closes connections when Emacs has
21117 been idle for thirty minutes:
21118
21119 @lisp
21120 (gnus-demon-close-connections nil 30)
21121 @end lisp
21122
21123 Here's a handler that scans for @acronym{PGP} headers every hour when
21124 Emacs is idle:
21125
21126 @lisp
21127 (gnus-demon-scan-pgp 60 t)
21128 @end lisp
21129
21130 This @var{time} parameter and than @var{idle} parameter work together
21131 in a strange, but wonderful fashion.  Basically, if @var{idle} is
21132 @code{nil}, then the function will be called every @var{time} minutes.
21133
21134 If @var{idle} is @code{t}, then the function will be called after
21135 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
21136 the function will never be called.  But once Emacs goes idle, the
21137 function will be called every @var{time} minutes.
21138
21139 If @var{idle} is a number and @var{time} is a number, the function will
21140 be called every @var{time} minutes only when Emacs has been idle for
21141 @var{idle} minutes.
21142
21143 If @var{idle} is a number and @var{time} is @code{nil}, the function
21144 will be called once every time Emacs has been idle for @var{idle}
21145 minutes.
21146
21147 And if @var{time} is a string, it should look like @samp{07:31}, and
21148 the function will then be called once every day somewhere near that
21149 time.  Modified by the @var{idle} parameter, of course.
21150
21151 @vindex gnus-demon-timestep
21152 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21153 seconds.  This is 60 by default.  If you change that variable,
21154 all the timings in the handlers will be affected.)
21155
21156 So, if you want to add a handler, you could put something like this in
21157 your @file{~/.gnus.el} file:
21158
21159 @findex gnus-demon-add-handler
21160 @lisp
21161 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21162 @end lisp
21163
21164 @findex gnus-demon-add-nocem
21165 @findex gnus-demon-add-scanmail
21166 @findex gnus-demon-add-rescan
21167 @findex gnus-demon-add-scan-timestamps
21168 @findex gnus-demon-add-disconnection
21169 Some ready-made functions to do this have been created:
21170 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21171 @code{gnus-demon-add-nntp-close-connection},
21172 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21173 @code{gnus-demon-add-scanmail}.  Just put those functions in your
21174 @file{~/.gnus.el} if you want those abilities.
21175
21176 @findex gnus-demon-init
21177 @findex gnus-demon-cancel
21178 @vindex gnus-demon-handlers
21179 If you add handlers to @code{gnus-demon-handlers} directly, you should
21180 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
21181 daemons, you can use the @code{gnus-demon-cancel} function.
21182
21183 Note that adding daemons can be pretty naughty if you over do it.  Adding
21184 functions that scan all news and mail from all servers every two seconds
21185 is a sure-fire way of getting booted off any respectable system.  So
21186 behave.
21187
21188
21189 @node NoCeM
21190 @section NoCeM
21191 @cindex nocem
21192 @cindex spam
21193
21194 @dfn{Spamming} is posting the same article lots and lots of times.
21195 Spamming is bad.  Spamming is evil.
21196
21197 Spamming is usually canceled within a day or so by various anti-spamming
21198 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
21199 NoCeM is pronounced ``no see-'em'', and means what the name
21200 implies---these are messages that make the offending articles, like, go
21201 away.
21202
21203 What use are these NoCeM messages if the articles are canceled anyway?
21204 Some sites do not honor cancel messages and some sites just honor cancels
21205 from a select few people.  Then you may wish to make use of the NoCeM
21206 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21207
21208 Gnus can read and parse the messages in this group automatically, and
21209 this will make spam disappear.
21210
21211 There are some variables to customize, of course:
21212
21213 @table @code
21214 @item gnus-use-nocem
21215 @vindex gnus-use-nocem
21216 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
21217 by default.
21218
21219 @item gnus-nocem-groups
21220 @vindex gnus-nocem-groups
21221 Gnus will look for NoCeM messages in the groups in this list.  The
21222 default is @code{("news.lists.filters" "news.admin.net-abuse.bulletins"
21223 "alt.nocem.misc" "news.admin.net-abuse.announce")}.
21224
21225 @item gnus-nocem-issuers
21226 @vindex gnus-nocem-issuers
21227 There are many people issuing NoCeM messages.  This list says what
21228 people you want to listen to.  The default is @code{("Automoose-1"
21229 "clewis@@ferret.ocunix.on.ca" "cosmo.roadkill" "SpamHippo"
21230 "hweede@@snafu.de")}; fine, upstanding citizens all of them.
21231
21232 Known despammers that you can put in this list are listed at
21233 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21234
21235 You do not have to heed NoCeM messages from all these people---just the
21236 ones you want to listen to.  You also don't have to accept all NoCeM
21237 messages from the people you like.  Each NoCeM message has a @dfn{type}
21238 header that gives the message a (more or less, usually less) rigorous
21239 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21240 @samp{binary}, and @samp{troll}.  To specify this, you have to use
21241 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21242 Each condition is either a string (which is a regexp that matches types
21243 you want to use) or a list on the form @code{(not @var{string})}, where
21244 @var{string} is a regexp that matches types you don't want to use.
21245
21246 For instance, if you want all NoCeM messages from Chris Lewis except his
21247 @samp{troll} messages, you'd say:
21248
21249 @lisp
21250 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21251 @end lisp
21252
21253 On the other hand, if you just want nothing but his @samp{spam} and
21254 @samp{spew} messages, you'd say:
21255
21256 @lisp
21257 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21258 @end lisp
21259
21260 The specs are applied left-to-right.
21261
21262
21263 @item gnus-nocem-verifyer
21264 @vindex gnus-nocem-verifyer
21265 @findex mc-verify
21266 This should be a function for verifying that the NoCeM issuer is who she
21267 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
21268 function.  If this is too slow and you don't care for verification
21269 (which may be dangerous), you can set this variable to @code{nil}.
21270
21271 If you want signed NoCeM messages to be verified and unsigned messages
21272 not to be verified (but used anyway), you could do something like:
21273
21274 @lisp
21275 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
21276
21277 (defun my-gnus-mc-verify ()
21278   (not (eq 'forged
21279            (ignore-errors
21280              (if (mc-verify)
21281                  t
21282                'forged)))))
21283 @end lisp
21284
21285 This might be dangerous, though.
21286
21287 @item gnus-nocem-directory
21288 @vindex gnus-nocem-directory
21289 This is where Gnus will store its NoCeM cache files.  The default is
21290 @file{~/News/NoCeM/}.
21291
21292 @item gnus-nocem-expiry-wait
21293 @vindex gnus-nocem-expiry-wait
21294 The number of days before removing old NoCeM entries from the cache.
21295 The default is 15.  If you make it shorter Gnus will be faster, but you
21296 might then see old spam.
21297
21298 @item gnus-nocem-check-from
21299 @vindex gnus-nocem-check-from
21300 Non-@code{nil} means check for valid issuers in message bodies.
21301 Otherwise don't bother fetching articles unless their author matches a
21302 valid issuer; that is much faster if you are selective about the
21303 issuers.
21304
21305 @item gnus-nocem-check-article-limit
21306 @vindex gnus-nocem-check-article-limit
21307 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21308 group.  NoCeM groups can be huge and very slow to process.
21309
21310 @end table
21311
21312 Using NoCeM could potentially be a memory hog.  If you have many living
21313 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21314 big.  If this is a problem, you should kill off all (or most) of your
21315 unsubscribed groups (@pxref{Subscription Commands}).
21316
21317
21318 @node Undo
21319 @section Undo
21320 @cindex undo
21321
21322 It is very useful to be able to undo actions one has done.  In normal
21323 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21324 In Gnus buffers, however, it isn't that simple.
21325
21326 The things Gnus displays in its buffer is of no value whatsoever to
21327 Gnus---it's all just data designed to look nice to the user.
21328 Killing a group in the group buffer with @kbd{C-k} makes the line
21329 disappear, but that's just a side-effect of the real action---the
21330 removal of the group in question from the internal Gnus structures.
21331 Undoing something like that can't be done by the normal Emacs
21332 @code{undo} function.
21333
21334 Gnus tries to remedy this somewhat by keeping track of what the user
21335 does and coming up with actions that would reverse the actions the user
21336 takes.  When the user then presses the @code{undo} key, Gnus will run
21337 the code to reverse the previous action, or the previous actions.
21338 However, not all actions are easily reversible, so Gnus currently offers
21339 a few key functions to be undoable.  These include killing groups,
21340 yanking groups, and changing the list of read articles of groups.
21341 That's it, really.  More functions may be added in the future, but each
21342 added function means an increase in data to be stored, so Gnus will
21343 never be totally undoable.
21344
21345 @findex gnus-undo-mode
21346 @vindex gnus-use-undo
21347 @findex gnus-undo
21348 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
21349 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21350 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
21351 command, which should feel kinda like the normal Emacs @code{undo}
21352 command.
21353
21354
21355 @node Predicate Specifiers
21356 @section Predicate Specifiers
21357 @cindex predicate specifiers
21358
21359 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
21360 form that allows flexible specification of predicates without having
21361 to type all that much.
21362
21363 These specifiers are lists consisting of functions, symbols and lists.
21364
21365 Here's an example:
21366
21367 @lisp
21368 (or gnus-article-unseen-p
21369     gnus-article-unread-p)
21370 @end lisp
21371
21372 The available symbols are @code{or}, @code{and} and @code{not}.  The
21373 functions all take one parameter.
21374
21375 @findex gnus-make-predicate
21376 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
21377 to create a function that can be called.  This input parameter to this
21378 function will be passed along to all the functions in the predicate
21379 specifier.
21380
21381
21382 @node Moderation
21383 @section Moderation
21384 @cindex moderation
21385
21386 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
21387 It is not included in the standard Gnus package.  Write a mail to
21388 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
21389 get a copy.
21390
21391 The moderation package is implemented as a minor mode for summary
21392 buffers.  Put
21393
21394 @lisp
21395 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
21396 @end lisp
21397
21398 in your @file{~/.gnus.el} file.
21399
21400 If you are the moderator of @samp{rec.zoofle}, this is how it's
21401 supposed to work:
21402
21403 @enumerate
21404 @item
21405 You split your incoming mail by matching on
21406 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
21407 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
21408
21409 @item
21410 You enter that group once in a while and post articles using the @kbd{e}
21411 (edit-and-post) or @kbd{s} (just send unedited) commands.
21412
21413 @item
21414 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
21415 articles that weren't approved by you, you can cancel them with the
21416 @kbd{c} command.
21417 @end enumerate
21418
21419 To use moderation mode in these two groups, say:
21420
21421 @lisp
21422 (setq gnus-moderated-list
21423       "^nnml:rec.zoofle$\\|^rec.zoofle$")
21424 @end lisp
21425
21426
21427 @node Image Enhancements
21428 @section Image Enhancements
21429
21430 XEmacs, as well as Emacs 21, is able to display pictures and stuff, so
21431 Gnus has taken advantage of that.
21432
21433 @menu
21434 * Picons::                      How to display pictures of what you're reading.
21435 * Smileys::                     Show all those happy faces the way they were meant to be shown.
21436 * X-Face::                      Display a funky, teensy black-and-white image.
21437 * XVarious::                    Other XEmacsy Gnusey variables.
21438 @end menu
21439
21440
21441 @node Picons
21442 @subsection Picons
21443
21444 @iftex
21445 @iflatex
21446 \include{picons}
21447 @end iflatex
21448 @end iftex
21449
21450 So@dots{}  You want to slow down your news reader even more!  This is a
21451 good way to do so.  Its also a great way to impress people staring
21452 over your shoulder as you read news.
21453
21454 What are Picons?  To quote directly from the Picons Web site:
21455
21456 @iftex
21457 @iflatex
21458 \margindex{}
21459 @end iflatex
21460 @end iftex
21461
21462 @quotation
21463 @dfn{Picons} is short for ``personal icons''.  They're small,
21464 constrained images used to represent users and domains on the net,
21465 organized into databases so that the appropriate image for a given
21466 e-mail address can be found.  Besides users and domains, there are picon
21467 databases for Usenet newsgroups and weather forecasts.  The picons are
21468 in either monochrome @code{XBM} format or color @code{XPM} and
21469 @code{GIF} formats.
21470 @end quotation
21471
21472 @vindex gnus-picon-databases
21473 For instructions on obtaining and installing the picons databases,
21474 point your Web browser at
21475 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
21476
21477 If you are using Debian GNU/Linux, saying @samp{apt-get install
21478 picons.*} will install the picons where Gnus can find them.
21479
21480 To enable displaying picons, simply make sure that
21481 @code{gnus-picon-databases} points to the directory containing the
21482 Picons databases.
21483
21484 The following variables offer control over where things are located.
21485
21486 @table @code
21487
21488 @item gnus-picon-databases
21489 @vindex gnus-picon-databases
21490 The location of the picons database.  This is a list of directories
21491 containing the @file{news}, @file{domains}, @file{users} (and so on)
21492 subdirectories.  Defaults to @code{("/usr/lib/picon"
21493 "/usr/local/faces")}.
21494
21495 @item gnus-picon-news-directories
21496 @vindex gnus-picon-news-directories
21497 List of subdirectories to search in @code{gnus-picon-databases} for
21498 newsgroups faces.  @code{("news")} is the default.
21499
21500 @item gnus-picon-user-directories
21501 @vindex gnus-picon-user-directories
21502 List of subdirectories to search in @code{gnus-picon-databases} for user
21503 faces.  @code{("users" "usenix" "local" "misc")} is the default.
21504
21505 @item gnus-picon-domain-directories
21506 @vindex gnus-picon-domain-directories
21507 List of subdirectories to search in @code{gnus-picon-databases} for
21508 domain name faces.  Defaults to @code{("domains")}.  Some people may
21509 want to add @samp{"unknown"} to this list.
21510
21511 @item gnus-picon-file-types
21512 @vindex gnus-picon-file-types
21513 Ordered list of suffixes on picon file names to try.  Defaults to
21514 @code{("xpm" "gif" "xbm")} minus those not builtin your Emacs.
21515
21516 @end table
21517
21518 @node Smileys
21519 @subsection Smileys
21520 @cindex smileys
21521
21522 @iftex
21523 @iflatex
21524 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
21525 \input{smiley}
21526 @end iflatex
21527 @end iftex
21528
21529 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
21530 currently the only package that uses Smiley, it is documented here.
21531
21532 In short---to use Smiley in Gnus, put the following in your
21533 @file{~/.gnus.el} file:
21534
21535 @lisp
21536 (setq gnus-treat-display-smileys t)
21537 @end lisp
21538
21539 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
21540 the like---to pictures and displays those instead of the text smiley
21541 faces.  The conversion is controlled by a list of regexps that matches
21542 text and maps that to file names.
21543
21544 @vindex smiley-regexp-alist
21545 The alist used is specified by the @code{smiley-regexp-alist}
21546 variable.  The first item in each element is the regexp to be matched;
21547 the second element is the regexp match group that is to be replaced by
21548 the picture; and the third element is the name of the file to be
21549 displayed.
21550
21551 The following variables customize where Smiley will look for these
21552 files:
21553
21554 @table @code
21555
21556 @item smiley-data-directory
21557 @vindex smiley-data-directory
21558 Where Smiley will look for smiley faces files.
21559
21560 @item gnus-smiley-file-types
21561 @vindex gnus-smiley-file-types
21562 List of suffixes on smiley file names to try.
21563
21564 @end table
21565
21566
21567 @node X-Face
21568 @subsection X-Face
21569 @cindex x-face
21570
21571 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21572 depth) image that's supposed to represent the author of the message.
21573 It seems to be supported by an ever-growing number of mail and news
21574 readers.
21575
21576 @cindex x-face
21577 @findex gnus-article-display-x-face
21578 @findex gnus-article-x-face-command
21579 @vindex gnus-article-x-face-command
21580 @vindex gnus-article-x-face-too-ugly
21581 @iftex
21582 @iflatex
21583 \include{xface}
21584 @end iflatex
21585 @end iftex
21586 @c @anchor{X-Face}
21587
21588 Decoding an @code{X-Face} header either requires an Emacs that has
21589 @samp{compface} support (which most XEmacs versions has), or that you
21590 have @samp{compface} installed on your system.  If either is true,
21591 Gnus will default to displaying @code{X-Face} headers.
21592
21593 The variable that controls this is the
21594 @code{gnus-article-x-face-command} variable.  If this variable is a
21595 string, this string will be executed in a sub-shell.  If it is a
21596 function, this function will be called with the face as the argument.
21597 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21598 the @code{From} header, the face will not be shown.
21599
21600 The default action under Emacs 20 is to fork off the @code{display}
21601 program@footnote{@code{display} is from the ImageMagick package.  For
21602 the @code{uncompface} and @code{icontopbm} programs look for a package
21603 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21604 view the face.
21605
21606 Under XEmacs or Emacs 21+ with suitable image support, the default
21607 action is to display the face before the @code{From} header.  (It's
21608 nicer if XEmacs has been compiled with @code{X-Face} support---that
21609 will make display somewhat faster.  If there's no native @code{X-Face}
21610 support, Gnus will try to convert the @code{X-Face} header using
21611 external programs from the @code{pbmplus} package and
21612 friends.@footnote{On a GNU/Linux system look for packages with names
21613 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21614
21615 (Note: @code{x-face} is used in the variable/function names, not
21616 @code{xface}).
21617
21618 Gnus provides a few convenience functions and variables to allow
21619 easier insertion of X-Face headers in outgoing messages.
21620
21621 @findex gnus-random-x-face
21622 @vindex gnus-convert-pbm-to-x-face-command
21623 @vindex gnus-x-face-directory
21624 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21625 @code{gnus-x-face-directory} and picks one at random, and then
21626 converts it to the X-Face format by using the
21627 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21628 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21629 header data as a string.
21630
21631 @findex gnus-insert-random-x-face-header
21632 @code{gnus-insert-random-x-face-header} calls
21633 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21634 randomly generated data.
21635
21636 @findex gnus-x-face-from-file
21637 @vindex gnus-convert-image-to-x-face-command
21638 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21639 converts the file to X-Face format by using the
21640 @code{gnus-convert-image-to-x-face-command} shell command.
21641
21642 Here's how you would typically use the first function.  Put something
21643 like the following in your @file{~/.gnus.el} file:
21644
21645 @lisp
21646 (setq message-required-news-headers
21647       (nconc message-required-news-headers
21648              (list '(X-Face . gnus-random-x-face))))
21649 @end lisp
21650
21651 Using the last function would be something like this:
21652
21653 @lisp
21654 (setq message-required-news-headers
21655       (nconc message-required-news-headers
21656              (list '(X-Face . (lambda ()
21657                                 (gnus-x-face-from-file
21658                                  "~/My-face.gif"))))))
21659 @end lisp
21660
21661
21662 @node XVarious
21663 @subsection Various XEmacs Variables
21664
21665 @table @code
21666 @item gnus-xmas-glyph-directory
21667 @vindex gnus-xmas-glyph-directory
21668 This is where Gnus will look for pictures.  Gnus will normally
21669 auto-detect this directory, but you may set it manually if you have an
21670 unusual directory structure.
21671
21672 @item gnus-xmas-logo-color-alist
21673 @vindex gnus-xmas-logo-color-alist
21674 This is an alist where the key is a type symbol and the values are the
21675 foreground and background color of the splash page glyph.
21676
21677 @item gnus-xmas-logo-color-style
21678 @vindex gnus-xmas-logo-color-style
21679 This is the key used to look up the color in the alist described above.
21680 Valid values include @code{flame}, @code{pine}, @code{moss},
21681 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
21682 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
21683
21684 @item gnus-xmas-modeline-glyph
21685 @vindex gnus-xmas-modeline-glyph
21686 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21687 default.
21688
21689 @end table
21690
21691 @subsubsection Toolbar
21692
21693 @table @code
21694
21695 @item gnus-use-toolbar
21696 @vindex gnus-use-toolbar
21697 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
21698 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
21699 @code{right-toolbar}, or @code{left-toolbar}.
21700
21701 @item gnus-group-toolbar
21702 @vindex gnus-group-toolbar
21703 The toolbar in the group buffer.
21704
21705 @item gnus-summary-toolbar
21706 @vindex gnus-summary-toolbar
21707 The toolbar in the summary buffer.
21708
21709 @item gnus-summary-mail-toolbar
21710 @vindex gnus-summary-mail-toolbar
21711 The toolbar in the summary buffer of mail groups.
21712
21713 @end table
21714
21715 @iftex
21716 @iflatex
21717 \margindex{}
21718 @end iflatex
21719 @end iftex
21720
21721
21722 @node Fuzzy Matching
21723 @section Fuzzy Matching
21724 @cindex fuzzy matching
21725
21726 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
21727 things like scoring, thread gathering and thread comparison.
21728
21729 As opposed to regular expression matching, fuzzy matching is very fuzzy.
21730 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
21731 means, and the implementation has changed over time.
21732
21733 Basically, it tries to remove all noise from lines before comparing.
21734 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21735 out of the strings before comparing the results.  This often leads to
21736 adequate results---even when faced with strings generated by text
21737 manglers masquerading as newsreaders.
21738
21739
21740 @node Thwarting Email Spam
21741 @section Thwarting Email Spam
21742 @cindex email spam
21743 @cindex spam
21744 @cindex UCE
21745 @cindex unsolicited commercial email
21746
21747 In these last days of the Usenet, commercial vultures are hanging about
21748 and grepping through news like crazy to find email addresses they can
21749 foist off their scams and products to.  As a reaction to this, many
21750 people have started putting nonsense addresses into their @code{From}
21751 lines.  I think this is counterproductive---it makes it difficult for
21752 people to send you legitimate mail in response to things you write, as
21753 well as making it difficult to see who wrote what.  This rewriting may
21754 perhaps be a bigger menace than the unsolicited commercial email itself
21755 in the end.
21756
21757 The biggest problem I have with email spam is that it comes in under
21758 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
21759 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
21760 mail group, only to find two pyramid schemes, seven advertisements
21761 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
21762 and one mail asking me to repent and find some god.
21763
21764 This is annoying.  Here's what you can do about it.
21765
21766 @menu
21767 * The problem of spam::         Some background, and some solutions
21768 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
21769 * SpamAssassin::                How to use external anti-spam tools.
21770 * Hashcash::                    Reduce spam by burning CPU time.
21771 * Filtering Spam Using The Spam ELisp Package::  
21772 * Filtering Spam Using Statistics with spam-stat::  
21773 @end menu
21774
21775 @node The problem of spam
21776 @subsection The problem of spam
21777 @cindex email spam
21778 @cindex spam filtering approaches
21779 @cindex filtering approaches, spam
21780 @cindex UCE
21781 @cindex unsolicited commercial email
21782
21783 First, some background on spam.
21784
21785 If you have access to e-mail, you are familiar with spam (technically
21786 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
21787 because e-mail delivery is very cheap compared to paper mail, so only
21788 a very small percentage of people need to respond to an UCE to make it
21789 worthwhile to the advertiser.  Ironically, one of the most common
21790 spams is the one offering a database of e-mail addresses for further
21791 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
21792 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
21793
21794 Spam comes from a wide variety of sources.  It is simply impossible to
21795 dispose of all spam without discarding useful messages.  A good
21796 example is the TMDA system, which requires senders
21797 unknown to you to confirm themselves as legitimate senders before
21798 their e-mail can reach you.  Without getting into the technical side
21799 of TMDA, a downside is clearly that e-mail from legitimate sources may
21800 be discarded if those sources can't or won't confirm themselves
21801 through the TMDA system.  Another problem with TMDA is that it
21802 requires its users to have a basic understanding of e-mail delivery
21803 and processing.
21804
21805 The simplest approach to filtering spam is filtering.  If you get 200
21806 spam messages per day from @samp{random-address@@vmadmin.com}, you
21807 block @samp{vmadmin.com}.  If you get 200 messages about
21808 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
21809 message.  This, unfortunately, is a great way to discard legitimate
21810 e-mail.  For instance, the very informative and useful RISKS digest
21811 has been blocked by overzealous mail filters because it
21812 @strong{contained} words that were common in spam messages.
21813 Nevertheless, in isolated cases, with great care, direct filtering of
21814 mail can be useful.
21815
21816 Another approach to filtering e-mail is the distributed spam
21817 processing, for instance DCC implements such a system.  In essence,
21818 @code{N} systems around the world agree that a machine @samp{X} in
21819 China, Ghana, or California is sending out spam e-mail, and these
21820 @code{N} systems enter @samp{X} or the spam e-mail from @samp{X} into
21821 a database.  The criteria for spam detection vary---it may be the
21822 number of messages sent, the content of the messages, and so on.  When
21823 a user of the distributed processing system wants to find out if a
21824 message is spam, he consults one of those @code{N} systems.
21825
21826 Distributed spam processing works very well against spammers that send
21827 a large number of messages at once, but it requires the user to set up
21828 fairly complicated checks.  There are commercial and free distributed
21829 spam processing systems.  Distributed spam processing has its risks as
21830 well.  For instance legitimate e-mail senders have been accused of
21831 sending spam, and their web sites have been shut down for some time
21832 because of the incident.
21833
21834 The statistical approach to spam filtering is also popular.  It is
21835 based on a statistical analysis of previous spam messages.  Usually
21836 the analysis is a simple word frequency count, with perhaps pairs of
21837 words or 3-word combinations thrown into the mix.  Statistical
21838 analysis of spam works very well in most of the cases, but it can
21839 classify legitimate e-mail as spam in some cases.  It takes time to
21840 run the analysis, the full message must be analyzed, and the user has
21841 to store the database of spam analyses.
21842
21843 @node Anti-Spam Basics
21844 @subsection Anti-Spam Basics
21845 @cindex email spam
21846 @cindex spam
21847 @cindex UCE
21848 @cindex unsolicited commercial email
21849
21850 One way of dealing with spam is having Gnus split out all spam into a
21851 @samp{spam} mail group (@pxref{Splitting Mail}).
21852
21853 First, pick one (1) valid mail address that you can be reached at, and
21854 put it in your @code{From} header of all your news articles.  (I've
21855 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
21856 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
21857 sysadmin whether your sendmail installation accepts keywords in the local
21858 part of the mail address.)
21859
21860 @lisp
21861 (setq message-default-news-headers
21862       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
21863 @end lisp
21864
21865 Then put the following split rule in @code{nnmail-split-fancy}
21866 (@pxref{Fancy Mail Splitting}):
21867
21868 @lisp
21869 (
21870  ...
21871  (to "larsi@@trym.ifi.uio.no"
21872       (| ("subject" "re:.*" "misc")
21873          ("references" ".*@@.*" "misc")
21874          "spam"))
21875  ...
21876 )
21877 @end lisp
21878
21879 This says that all mail to this address is suspect, but if it has a
21880 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
21881 header, it's probably ok.  All the rest goes to the @samp{spam} group.
21882 (This idea probably comes from Tim Pierce.)
21883
21884 In addition, many mail spammers talk directly to your @acronym{SMTP} server
21885 and do not include your email address explicitly in the @code{To}
21886 header.  Why they do this is unknown---perhaps it's to thwart this
21887 thwarting scheme?  In any case, this is trivial to deal with---you just
21888 put anything not addressed to you in the @samp{spam} group by ending
21889 your fancy split rule in this way:
21890
21891 @lisp
21892 (
21893  ...
21894  (to "larsi" "misc")
21895  "spam")
21896 @end lisp
21897
21898 In my experience, this will sort virtually everything into the right
21899 group.  You still have to check the @samp{spam} group from time to time to
21900 check for legitimate mail, though.  If you feel like being a good net
21901 citizen, you can even send off complaints to the proper authorities on
21902 each unsolicited commercial email---at your leisure.
21903
21904 If you are also a lazy net citizen, you will probably prefer complaining
21905 automatically with the @file{gnus-junk.el} package, available FOR FREE
21906 at @* @uref{http://stud2.tuwien.ac.at/~e9426626/gnus-junk.html}.
21907 Since most e-mail spam is sent automatically, this may reconcile the
21908 cosmic balance somewhat.
21909
21910 This works for me.  It allows people an easy way to contact me (they can
21911 just press @kbd{r} in the usual way), and I'm not bothered at all with
21912 spam.  It's a win-win situation.  Forging @code{From} headers to point
21913 to non-existent domains is yucky, in my opinion.
21914
21915
21916
21917 @node SpamAssassin
21918 @subsection SpamAssassin, Vipul's Razor, DCC, etc
21919 @cindex SpamAssassin
21920 @cindex Vipul's Razor
21921 @cindex DCC
21922
21923 The days where the hints in the previous section was sufficient in
21924 avoiding spam is coming to an end.  There are many tools out there
21925 that claim to reduce the amount of spam you get.  This section could
21926 easily become outdated fast, as new products replace old, but
21927 fortunately most of these tools seem to have similar interfaces.  Even
21928 though this section will use SpamAssassin as an example, it should be
21929 easy to adapt it to most other tools.
21930
21931 If the tool you are using is not installed on the mail server, you
21932 need to invoke it yourself.  Ideas on how to use the
21933 @code{:postscript} mail source parameter (@pxref{Mail Source
21934 Specifiers}) follows.
21935
21936 @lisp
21937 (setq mail-sources
21938       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
21939         (pop :user "jrl"
21940              :server "pophost"
21941              :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
21942 @end lisp
21943
21944 Once you managed to process your incoming spool somehow, thus making
21945 the mail contain e.g. a header indicating it is spam, you are ready to
21946 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
21947
21948 @lisp
21949 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
21950                              ...))
21951 @end lisp
21952
21953 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
21954
21955 @lisp
21956 (setq nnmail-split-methods 'nnmail-split-fancy
21957       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
21958                              ...))
21959 @end lisp
21960
21961 Some people might not like the idea of piping the mail through various
21962 programs using a @code{:prescript} (if some program is buggy, you
21963 might lose all mail).  If you are one of them, another solution is to
21964 call the external tools during splitting.  Example fancy split method:
21965
21966 @lisp
21967 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
21968                              ...))
21969 (defun kevin-spamassassin ()
21970   (save-excursion
21971     (let ((buf (or (get-buffer " *nnmail incoming*")
21972                    (get-buffer " *nnml move*"))))
21973       (if (not buf)
21974           (progn (message "Oops, cannot find message buffer") nil)
21975         (set-buffer buf)
21976         (if (eq 1 (call-process-region (point-min) (point-max)
21977                                        "spamc" nil nil nil "-c"))
21978             "spam")))))
21979 @end lisp
21980
21981 That is about it.  As some spam is likely to get through anyway, you
21982 might want to have a nifty function to call when you happen to read
21983 spam.  And here is the nifty function:
21984
21985 @lisp
21986  (defun my-gnus-raze-spam ()
21987   "Submit SPAM to Vipul's Razor, then mark it as expirable."
21988   (interactive)
21989   (gnus-summary-show-raw-article)
21990   (gnus-summary-save-in-pipe "razor-report -f -d")
21991   (gnus-summary-mark-as-expirable 1))
21992 @end lisp
21993
21994 @node Hashcash
21995 @subsection Hashcash
21996 @cindex hashcash
21997
21998 A novel technique to fight spam is to require senders to do something
21999 costly for each message they send.  This has the obvious drawback that
22000 you cannot rely on that everyone in the world uses this technique,
22001 since it is not part of the Internet standards, but it may be useful
22002 in smaller communities.
22003
22004 While the tools in the previous section work well in practice, they
22005 work only because the tools are constantly maintained and updated as
22006 new form of spam appears.  This means that a small percentage of spam
22007 will always get through.  It also means that somewhere, someone needs
22008 to read lots of spam to update these tools.  Hashcash avoids that, but
22009 instead requires that everyone you communicate with supports the
22010 scheme.  You can view the two approaches as pragmatic vs dogmatic.
22011 The approaches have their own advantages and disadvantages, but as
22012 often in the real world, a combination of them is stronger than either
22013 one of them separately.
22014
22015 @cindex X-Hashcash
22016 The ``something costly'' is to burn CPU time, more specifically to
22017 compute a hash collision up to a certain number of bits.  The
22018 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22019 header. For more details, and for the external application
22020 @code{hashcash} you need to install to use this feature, see
22021 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
22022 information can be found at @uref{http://www.camram.org/}.
22023
22024 If you wish to call hashcash for each message you send, say something
22025 like:
22026
22027 @lisp
22028 (require 'hashcash)
22029 (add-hook 'message-send-hook 'mail-add-payment)
22030 @end lisp
22031
22032 The @code{hashcash.el} library can be found at
22033 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}, or in the Gnus
22034 development contrib directory.
22035
22036 You will need to set up some additional variables as well:
22037
22038 @table @code
22039
22040 @item hashcash-default-payment
22041 @vindex hashcash-default-payment
22042 This variable indicates the default number of bits the hash collision
22043 should consist of.  By default this is 0, meaning nothing will be
22044 done.  Suggested useful values include 17 to 29.
22045
22046 @item hashcash-payment-alist
22047 @vindex hashcash-payment-alist
22048 Some receivers may require you to spend burn more CPU time than the
22049 default.  This variable contains a list of @samp{(@var{addr}
22050 @var{amount})} cells, where @var{addr} is the receiver (email address
22051 or newsgroup) and @var{amount} is the number of bits in the collision
22052 that is needed.  It can also contain @samp{(@var{addr} @var{string}
22053 @var{amount})} cells, where the @var{string} is the string to use
22054 (normally the email address or newsgroup name is used).
22055
22056 @item hashcash
22057 @vindex hashcash
22058 Where the @code{hashcash} binary is installed.
22059
22060 @end table
22061
22062 Currently there is no built in functionality in Gnus to verify
22063 hashcash cookies, it is expected that this is performed by your hand
22064 customized mail filtering scripts.  Improvements in this area would be
22065 a useful contribution, however.
22066
22067 @node Filtering Spam Using The Spam ELisp Package
22068 @subsection Filtering Spam Using The Spam ELisp Package
22069 @cindex spam filtering
22070 @cindex spam
22071
22072 The idea behind @code{spam.el} is to have a control center for spam detection
22073 and filtering in Gnus.  To that end, @code{spam.el} does two things: it
22074 filters incoming mail, and it analyzes mail known to be spam or ham.
22075 @emph{Ham} is the name used throughout @code{spam.el} to indicate
22076 non-spam messages.
22077
22078 So, what happens when you load @code{spam.el}?  First of all, you get
22079 the following keyboard commands:
22080
22081 @table @kbd
22082
22083 @item M-d
22084 @itemx M s x
22085 @itemx S x
22086 @kindex M-d
22087 @kindex S x
22088 @kindex M s x
22089 @findex gnus-summary-mark-as-spam
22090 @code{gnus-summary-mark-as-spam}.
22091
22092 Mark current article as spam, showing it with the @samp{$} mark.
22093 Whenever you see a spam article, make sure to mark its summary line
22094 with @kbd{M-d} before leaving the group.  This is done automatically
22095 for unread articles in @emph{spam} groups.
22096
22097 @item M s t
22098 @itemx S t
22099 @kindex M s t
22100 @kindex S t
22101 @findex spam-bogofilter-score
22102 @code{spam-bogofilter-score}.
22103
22104 You must have Bogofilter installed for that command to work properly.
22105
22106 @xref{Bogofilter}.
22107
22108 @end table
22109
22110 Also, when you load @code{spam.el}, you will be able to customize its
22111 variables.  Try @code{customize-group} on the @samp{spam} variable
22112 group.
22113
22114 The concepts of ham processors and spam processors are very important.
22115 Ham processors and spam processors for a group can be set with the
22116 @code{spam-process} group parameter, or the
22117 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
22118 mail known to be non-spam (@emph{ham}) and process it in some way so
22119 that later similar mail will also be considered non-spam.  Spam
22120 processors take mail known to be spam and process it so similar spam
22121 will be detected later.
22122
22123 Gnus learns from the spam you get.  You have to collect your spam in
22124 one or more spam groups, and set or customize the variable
22125 @code{spam-junk-mailgroups} as appropriate.  You can also declare
22126 groups to contain spam by setting their group parameter
22127 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
22128 by customizing the corresponding variable
22129 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
22130 parameter and the @code{gnus-spam-newsgroup-contents} variable can
22131 also be used to declare groups as @emph{ham} groups if you set their
22132 classification to @code{gnus-group-spam-classification-ham}.  If
22133 groups are not classified by means of @code{spam-junk-mailgroups},
22134 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
22135 considered @emph{unclassified}.  All groups are unclassified by
22136 default.
22137
22138 In spam groups, all messages are considered to be spam by default:
22139 they get the @samp{$} mark when you enter the group.  You must review
22140 these messages from time to time and remove the @samp{$} mark for
22141 every message that is not spam after all.  To remove the @samp{$}
22142 mark, you can use @kbd{M-u} to ``unread'' the article, or @kbd{d} for
22143 declaring it read the non-spam way.  When you leave a group, all
22144 spam-marked (@samp{$}) articles are sent to a spam processor which
22145 will study them as spam samples.
22146
22147 Messages may also be deleted in various other ways, and unless
22148 @code{spam-ham-marks} gets overridden below, marks @samp{R} and
22149 @samp{r} for default read or explicit delete, marks @samp{X} and
22150 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
22151 low scores, are all considered to be associated with articles which
22152 are not spam.  This assumption might be false, in particular if you
22153 use kill files or score files as means for detecting genuine spam, you
22154 should then adjust the @code{spam-ham-marks} variable.
22155
22156 @defvar spam-ham-marks
22157 You can customize this variable to be the list of marks you want to
22158 consider ham.  By default, the list contains the deleted, read,
22159 killed, kill-filed, and low-score marks.
22160 @end defvar
22161
22162 @defvar spam-spam-marks
22163 You can customize this variable to be the list of marks you want to
22164 consider spam.  By default, the list contains only the spam mark.
22165 @end defvar
22166
22167 When you leave @emph{any} group, regardless of its
22168 @code{spam-contents} classification, all spam-marked articles are sent
22169 to a spam processor, which will study these as spam samples.  If you
22170 explicit kill a lot, you might sometimes end up with articles marked
22171 @samp{K} which you never saw, and which might accidentally contain
22172 spam.  Best is to make sure that real spam is marked with @samp{$},
22173 and nothing else.
22174
22175 When you leave a @emph{spam} group, all spam-marked articles are
22176 marked as expired after processing with the spam processor.  This is
22177 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
22178 @strong{ham} articles in a spam group will be moved to a location
22179 determined by either the @code{ham-process-destination} group
22180 parameter or a match in the @code{gnus-ham-process-destinations}
22181 variable, which is a list of regular expressions matched with group
22182 names (it's easiest to customize this variable with
22183 @code{customize-variable gnus-ham-process-destinations}).  The ultimate
22184 location is a group name.  If the @code{ham-process-destination}
22185 parameter is not set, spam articles are only expired.
22186
22187 When you leave a @emph{ham} group, all ham-marked articles are sent to
22188 a ham processor, which will study these as non-spam samples.
22189
22190 When you leave a @emph{ham} or @emph{unclassified} group, all
22191 @strong{spam} articles are moved to a location determined by either
22192 the @code{spam-process-destination} group parameter or a match in the
22193 @code{gnus-spam-process-destinations} variable, which is a list of
22194 regular expressions matched with group names (it's easiest to
22195 customize this variable with @code{customize-variable
22196 gnus-spam-process-destinations}).  The ultimate location is a group
22197 name.  If the @code{spam-process-destination} parameter is not set,
22198 the spam articles are only expired.
22199
22200 To use the @code{spam.el} facilities for incoming mail filtering, you
22201 must add the following to your fancy split list
22202 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
22203
22204 @example
22205 (: spam-split)
22206 @end example
22207
22208 Note that the fancy split may be called @code{nnmail-split-fancy} or
22209 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
22210 nnimap back ends to retrieve your mail.
22211
22212 The @code{spam-split} function will process incoming mail and send the
22213 mail considered to be spam into the group name given by the variable
22214 @code{spam-split-group}.  By default that group name is @samp{spam},
22215 but you can customize it.
22216
22217 @emph{Note for IMAP users}
22218
22219 The boolean variable @code{nnimap-split-download-body} needs to be
22220 set, if you want to split based on the whole message instead of just
22221 the headers.  By default, the nnimap backend will only retrieve the
22222 message headers.  If you use @code{spam-check-bogofilter},
22223 @code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that
22224 can benefit from the full message body), you should set this variable.
22225 It is not set by default because it will slow @acronym{IMAP} down.
22226
22227 @xref{Splitting in IMAP}.
22228
22229 @emph{TODO: Currently, spam.el only supports insertion of articles
22230 into a backend.  There is no way to tell spam.el that an article is no
22231 longer spam or ham.}
22232
22233 @emph{TODO: spam.el needs to provide a uniform way of training all the
22234 statistical databases.  Some have that functionality built-in, others
22235 don't.}
22236
22237 The following are the methods you can use to control the behavior of
22238 @code{spam-split} and their corresponding spam and ham processors:
22239
22240 @menu
22241 * Blacklists and Whitelists::   
22242 * BBDB Whitelists::             
22243 * Blackholes::                  
22244 * Regular Expressions Header Matching::  
22245 * Bogofilter::                  
22246 * ifile spam filtering::        
22247 * spam-stat spam filtering::    
22248 * Extending the spam elisp package::  
22249 @end menu
22250
22251 @node Blacklists and Whitelists
22252 @subsubsection Blacklists and Whitelists
22253 @cindex spam filtering
22254 @cindex whitelists, spam filtering
22255 @cindex blacklists, spam filtering
22256 @cindex spam
22257
22258 @defvar spam-use-blacklist
22259
22260 Set this variable to @code{t} if you want to use blacklists when
22261 splitting incoming mail.  Messages whose senders are in the blacklist
22262 will be sent to the @code{spam-split-group}.  This is an explicit
22263 filter, meaning that it acts only on mail senders @emph{declared} to
22264 be spammers.
22265
22266 @end defvar
22267
22268 @defvar spam-use-whitelist
22269
22270 Set this variable to @code{t} if you want to use whitelists when
22271 splitting incoming mail.  Messages whose senders are not in the
22272 whitelist will be sent to the next spam-split rule.  This is an
22273 explicit filter, meaning that unless someone is in the whitelist, their
22274 messages are not assumed to be spam or ham.
22275
22276 @end defvar
22277
22278 @defvar spam-use-whitelist-exclusive
22279
22280 Set this variable to @code{t} if you want to use whitelists as an
22281 implicit filter, meaning that every message will be considered spam
22282 unless the sender is in the whitelist.  Use with care.
22283
22284 @end defvar
22285
22286 @defvar gnus-group-spam-exit-processor-blacklist
22287
22288 Add this symbol to a group's @code{spam-process} parameter by
22289 customizing the group parameters or the
22290 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22291 added to a group's @code{spam-process} parameter, the senders of
22292 spam-marked articles will be added to the blacklist.
22293
22294 @end defvar
22295
22296 @defvar gnus-group-ham-exit-processor-whitelist
22297
22298 Add this symbol to a group's @code{spam-process} parameter by
22299 customizing the group parameters or the
22300 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22301 added to a group's @code{spam-process} parameter, the senders of
22302 ham-marked articles in @emph{ham} groups will be added to the
22303 whitelist.  Note that this ham processor has no effect in @emph{spam}
22304 or @emph{unclassified} groups.
22305
22306 @end defvar
22307
22308 Blacklists are lists of regular expressions matching addresses you
22309 consider to be spam senders.  For instance, to block mail from any
22310 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
22311 blacklist.  You start out with an empty blacklist.  Blacklist entries
22312 use the Emacs regular expression syntax.
22313
22314 Conversely, whitelists tell Gnus what addresses are considered
22315 legitimate.  All messages from whitelisted addresses are considered
22316 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
22317 Emacs regular expression syntax.
22318
22319 The blacklist and whitelist file locations can be customized with the
22320 @code{spam-directory} variable (@file{~/News/spam} by default), or
22321 the @code{spam-whitelist} and @code{spam-blacklist} variables
22322 directly.  The whitelist and blacklist files will by default be in the
22323 @code{spam-directory} directory, named @file{whitelist} and
22324 @file{blacklist} respectively.
22325
22326 @node BBDB Whitelists
22327 @subsubsection BBDB Whitelists
22328 @cindex spam filtering
22329 @cindex BBDB whitelists, spam filtering
22330 @cindex BBDB, spam filtering
22331 @cindex spam
22332
22333 @defvar spam-use-BBDB
22334
22335 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
22336 Whitelists}), but uses the BBDB as the source of whitelisted
22337 addresses, without regular expressions.  You must have the BBDB loaded
22338 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
22339 not in the BBDB will be sent to the next spam-split rule.  This is an
22340 explicit filter, meaning that unless someone is in the BBDB, their
22341 messages are not assumed to be spam or ham.
22342
22343 @end defvar
22344
22345 @defvar spam-use-BBDB-exclusive
22346
22347 Set this variable to @code{t} if you want to use the BBDB as an
22348 implicit filter, meaning that every message will be considered spam
22349 unless the sender is in the BBDB.  Use with care.  Only sender
22350 addresses in the BBDB will be allowed through; all others will be
22351 classified as spammers.
22352
22353 @end defvar
22354
22355 @defvar gnus-group-ham-exit-processor-BBDB
22356
22357 Add this symbol to a group's @code{spam-process} parameter by
22358 customizing the group parameters or the
22359 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22360 added to a group's @code{spam-process} parameter, the senders of
22361 ham-marked articles in @emph{ham} groups will be added to the
22362 BBDB.  Note that this ham processor has no effect in @emph{spam}
22363 or @emph{unclassified} groups.
22364
22365 @end defvar
22366
22367 @node Blackholes
22368 @subsubsection Blackholes
22369 @cindex spam filtering
22370 @cindex blackholes, spam filtering
22371 @cindex spam
22372
22373 @defvar spam-use-blackholes
22374
22375 This option is disabled by default.  You can let Gnus consult the
22376 blackhole-type distributed spam processing systems (DCC, for instance)
22377 when you set this option.  The variable @code{spam-blackhole-servers}
22378 holds the list of blackhole servers Gnus will consult.  The current
22379 list is fairly comprehensive, but make sure to let us know if it
22380 contains outdated servers.
22381
22382 The blackhole check uses the @code{dig.el} package, but you can tell
22383 @code{spam.el} to use @code{dns.el} instead for better performance if
22384 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
22385 this time to set @code{spam-use-dig} to @code{nil} despite the
22386 possible performance improvements, because some users may be unable to
22387 use it, but you can try it and see if it works for you.
22388
22389 @end defvar
22390
22391 @defvar spam-blackhole-servers
22392
22393 The list of servers to consult for blackhole checks.
22394
22395 @end defvar
22396
22397 @defvar spam-blackhole-good-server-regex
22398
22399 A regular expression for IPs that should not be checked against the
22400 blackhole server list.  When set to @code{nil}, it has no effect.
22401
22402 @end defvar
22403
22404 @defvar spam-use-dig
22405
22406 Use the @code{dig.el} package instead of the @code{dns.el} package.
22407 The default setting of @code{t} is recommended.
22408
22409 @end defvar
22410
22411 Blackhole checks are done only on incoming mail.  There is no spam or
22412 ham processor for blackholes.
22413
22414 @node Regular Expressions Header Matching
22415 @subsubsection Regular Expressions Header Matching
22416 @cindex spam filtering
22417 @cindex regular expressions header matching, spam filtering
22418 @cindex spam
22419
22420 @defvar spam-use-regex-headers
22421
22422 This option is disabled by default.  You can let Gnus check the
22423 message headers against lists of regular expressions when you set this
22424 option.  The variables @code{spam-regex-headers-spam} and
22425 @code{spam-regex-headers-ham} hold the list of regular expressions.
22426 Gnus will check against the message headers to determine if the
22427 message is spam or ham, respectively.
22428
22429 @end defvar
22430
22431 @defvar spam-regex-headers-spam
22432
22433 The list of regular expressions that, when matched in the headers of
22434 the message, positively identify it as spam.
22435
22436 @end defvar
22437
22438 @defvar spam-regex-headers-ham
22439
22440 The list of regular expressions that, when matched in the headers of
22441 the message, positively identify it as ham.
22442
22443 @end defvar
22444
22445 Regular expression header checks are done only on incoming mail.
22446 There is no specific spam or ham processor for regular expressions.
22447
22448 @node Bogofilter
22449 @subsubsection Bogofilter
22450 @cindex spam filtering
22451 @cindex bogofilter, spam filtering
22452 @cindex spam
22453
22454 @defvar spam-use-bogofilter
22455
22456 Set this variable if you want @code{spam-split} to use Eric Raymond's
22457 speedy Bogofilter.
22458
22459 With a minimum of care for associating the @samp{$} mark for spam
22460 articles only, Bogofilter training all gets fairly automatic.  You
22461 should do this until you get a few hundreds of articles in each
22462 category, spam or not.  The command @kbd{S t} in summary mode, either
22463 for debugging or for curiosity, shows the @emph{spamicity} score of
22464 the current article (between 0.0 and 1.0).
22465
22466 Bogofilter determines if a message is spam based on an internal
22467 threshold, set at compilation time.  That threshold can't be
22468 customized.
22469
22470 If the @code{bogofilter} executable is not in your path, Bogofilter
22471 processing will be turned off.
22472
22473 You should not enable this if you use @code{spam-use-bogofilter-headers}.
22474
22475 @end defvar
22476
22477 @defvar spam-use-bogofilter-headers
22478
22479 Set this variable if you want @code{spam-split} to use Eric Raymond's
22480 speedy Bogofilter, looking only at the message headers.  It works
22481 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
22482 must be in the message already.  Normally you would do this with a
22483 procmail recipe or something similar; consult the Bogofilter
22484 installation documents for details.
22485
22486 You should not enable this if you use @code{spam-use-bogofilter}.
22487
22488 @end defvar
22489
22490 @defvar gnus-group-spam-exit-processor-bogofilter
22491 Add this symbol to a group's @code{spam-process} parameter by
22492 customizing the group parameters or the
22493 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22494 added to a group's @code{spam-process} parameter, spam-marked articles
22495 will be added to the Bogofilter spam database.
22496 @end defvar
22497
22498 @defvar gnus-group-ham-exit-processor-bogofilter
22499 Add this symbol to a group's @code{spam-process} parameter by
22500 customizing the group parameters or the
22501 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22502 added to a group's @code{spam-process} parameter, the ham-marked
22503 articles in @emph{ham} groups will be added to the Bogofilter database
22504 of non-spam messages.  Note that this ham processor has no effect in
22505 @emph{spam} or @emph{unclassified} groups.
22506 @end defvar
22507
22508 @defvar spam-bogofilter-database-directory
22509
22510 This is the directory where Bogofilter will store its databases.  It
22511 is not specified by default, so Bogofilter will use its own default
22512 database directory.
22513
22514 @end defvar
22515
22516 The Bogofilter mail classifier is similar to ifile in intent and
22517 purpose.  A ham and a spam processor are provided, plus the
22518 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
22519 variables to indicate to spam-split that Bogofilter should either be
22520 used, or has already been used on the article.  The 0.9.2.1 version of
22521 Bogofilter was used to test this functionality.
22522
22523 @node ifile spam filtering
22524 @subsubsection ifile spam filtering
22525 @cindex spam filtering
22526 @cindex ifile, spam filtering
22527 @cindex spam
22528
22529 @defvar spam-use-ifile
22530
22531 Enable this variable if you want @code{spam-split} to use ifile, a
22532 statistical analyzer similar to Bogofilter.
22533
22534 @end defvar
22535
22536 @defvar spam-ifile-all-categories
22537
22538 Enable this variable if you want @code{spam-use-ifile} to give you all
22539 the ifile categories, not just spam/non-spam.  If you use this, make
22540 sure you train ifile as described in its documentation.
22541
22542 @end defvar
22543
22544 @defvar spam-ifile-spam-category
22545
22546 This is the category of spam messages as far as ifile is concerned.
22547 The actual string used is irrelevant, but you probably want to leave
22548 the default value of @samp{spam}.
22549 @end defvar
22550
22551 @defvar spam-ifile-database-path
22552
22553 This is the filename for the ifile database.  It is not specified by
22554 default, so ifile will use its own default database name.
22555
22556 @end defvar
22557
22558 The ifile mail classifier is similar to Bogofilter in intent and
22559 purpose.  A ham and a spam processor are provided, plus the
22560 @code{spam-use-ifile} variable to indicate to spam-split that ifile
22561 should be used.  The 1.2.1 version of ifile was used to test this
22562 functionality.
22563
22564 @node spam-stat spam filtering
22565 @subsubsection spam-stat spam filtering
22566 @cindex spam filtering
22567 @cindex spam-stat, spam filtering
22568 @cindex spam-stat
22569 @cindex spam
22570
22571 @xref{Filtering Spam Using Statistics with spam-stat}.
22572
22573 @defvar spam-use-stat
22574
22575 Enable this variable if you want @code{spam-split} to use
22576 spam-stat.el, an Emacs Lisp statistical analyzer.
22577
22578 @end defvar
22579
22580 @defvar gnus-group-spam-exit-processor-stat
22581 Add this symbol to a group's @code{spam-process} parameter by
22582 customizing the group parameters or the
22583 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22584 added to a group's @code{spam-process} parameter, the spam-marked
22585 articles will be added to the spam-stat database of spam messages.
22586 @end defvar
22587
22588 @defvar gnus-group-ham-exit-processor-stat
22589 Add this symbol to a group's @code{spam-process} parameter by
22590 customizing the group parameters or the
22591 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22592 added to a group's @code{spam-process} parameter, the ham-marked
22593 articles in @emph{ham} groups will be added to the spam-stat database
22594 of non-spam messages.  Note that this ham processor has no effect in
22595 @emph{spam} or @emph{unclassified} groups.
22596 @end defvar
22597
22598 This enables spam.el to cooperate with spam-stat.el.  spam-stat.el
22599 provides an internal (Lisp-only) spam database, which unlike ifile or
22600 Bogofilter does not require external programs.  A spam and a ham
22601 processor, and the @code{spam-use-stat} variable for @code{spam-split}
22602 are provided.
22603
22604 @node Extending the spam elisp package
22605 @subsubsection Extending the spam elisp package
22606 @cindex spam filtering
22607 @cindex spam elisp package, extending
22608 @cindex extending the spam elisp package
22609
22610 Say you want to add a new back end called blackbox.  For filtering
22611 incoming mail, provide the following:
22612
22613 @enumerate
22614
22615 @item
22616 code
22617
22618 @lisp
22619 (defvar spam-use-blackbox nil
22620   "True if blackbox should be used.")
22621 @end lisp
22622
22623 Add
22624 @example
22625     (spam-use-blackbox   . spam-check-blackbox)
22626 @end example
22627 to @code{spam-list-of-checks}.
22628
22629 @item
22630 functionality
22631
22632 Write the @code{spam-check-blackbox} function.  It should return
22633 @samp{nil} or @code{spam-split-group}.  See the existing
22634 @code{spam-check-*} functions for examples of what you can do.
22635
22636 Make sure to add @code{spam-use-blackbox} to
22637 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
22638 mail analyzer that needs the full message body to operate.
22639
22640 @end enumerate
22641
22642 For processing spam and ham messages, provide the following:
22643
22644 @enumerate
22645
22646 @item
22647 code 
22648
22649 Note you don't have to provide a spam or a ham processor.  Only
22650 provide them if Blackbox supports spam or ham processing.
22651
22652 @lisp
22653 (defvar gnus-group-spam-exit-processor-blackbox "blackbox"
22654   "The Blackbox summary exit spam processor.
22655 Only applicable to spam groups.")
22656
22657 (defvar gnus-group-ham-exit-processor-blackbox "blackbox"
22658   "The whitelist summary exit ham processor.
22659 Only applicable to non-spam (unclassified and ham) groups.")
22660
22661 @end lisp
22662
22663 @item
22664 functionality
22665
22666 @lisp
22667 (defun spam-blackbox-register-spam-routine ()
22668   (spam-generic-register-routine
22669    ;; @r{the spam function}
22670    (lambda (article)
22671      (let ((from (spam-fetch-field-from-fast article)))
22672        (when (stringp from)
22673            (blackbox-do-something-with-this-spammer from))))
22674    ;; @r{the ham function}
22675    nil))
22676
22677 (defun spam-blackbox-register-ham-routine ()
22678   (spam-generic-register-routine
22679    ;; @r{the spam function}
22680    nil
22681    ;; @r{the ham function}
22682    (lambda (article)
22683      (let ((from (spam-fetch-field-from-fast article)))
22684        (when (stringp from)
22685            (blackbox-do-something-with-this-ham-sender from))))))
22686 @end lisp
22687
22688 Write the @code{blackbox-do-something-with-this-ham-sender} and
22689 @code{blackbox-do-something-with-this-spammer} functions.  You can add
22690 more complex code than fetching the message sender, but keep in mind
22691 that retrieving the whole message takes significantly longer than the
22692 sender through @code{spam-fetch-field-from-fast}, because the message
22693 senders are kept in memory by Gnus.
22694
22695 @end enumerate
22696
22697
22698 @node Filtering Spam Using Statistics with spam-stat
22699 @subsection Filtering Spam Using Statistics with spam-stat
22700 @cindex Paul Graham
22701 @cindex Graham, Paul
22702 @cindex naive Bayesian spam filtering
22703 @cindex Bayesian spam filtering, naive
22704 @cindex spam filtering, naive Bayesian
22705
22706 Paul Graham has written an excellent essay about spam filtering using
22707 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
22708 Spam}.  In it he describes the inherent deficiency of rule-based
22709 filtering as used by SpamAssassin, for example: Somebody has to write
22710 the rules, and everybody else has to install these rules.  You are
22711 always late.  It would be much better, he argues, to filter mail based
22712 on whether it somehow resembles spam or non-spam.  One way to measure
22713 this is word distribution.  He then goes on to describe a solution
22714 that checks whether a new mail resembles any of your other spam mails
22715 or not.
22716
22717 The basic idea is this:  Create a two collections of your mail, one
22718 with spam, one with non-spam.  Count how often each word appears in
22719 either collection, weight this by the total number of mails in the
22720 collections, and store this information in a dictionary.  For every
22721 word in a new mail, determine its probability to belong to a spam or a
22722 non-spam mail.  Use the 15 most conspicuous words, compute the total
22723 probability of the mail being spam.  If this probability is higher
22724 than a certain threshold, the mail is considered to be spam.
22725
22726 Gnus supports this kind of filtering.  But it needs some setting up.
22727 First, you need two collections of your mail, one with spam, one with
22728 non-spam.  Then you need to create a dictionary using these two
22729 collections, and save it.  And last but not least, you need to use
22730 this dictionary in your fancy mail splitting rules.
22731
22732 @menu
22733 * Creating a spam-stat dictionary::  
22734 * Splitting mail using spam-stat::  
22735 * Low-level interface to the spam-stat dictionary::  
22736 @end menu
22737
22738 @node Creating a spam-stat dictionary
22739 @subsubsection Creating a spam-stat dictionary
22740
22741 Before you can begin to filter spam based on statistics, you must
22742 create these statistics based on two mail collections, one with spam,
22743 one with non-spam.  These statistics are then stored in a dictionary
22744 for later use.  In order for these statistics to be meaningful, you
22745 need several hundred emails in both collections.
22746
22747 Gnus currently supports only the nnml back end for automated dictionary
22748 creation.  The nnml back end stores all mails in a directory, one file
22749 per mail.  Use the following:
22750
22751 @defun spam-stat-process-spam-directory
22752 Create spam statistics for every file in this directory.  Every file
22753 is treated as one spam mail.
22754 @end defun
22755
22756 @defun spam-stat-process-non-spam-directory
22757 Create non-spam statistics for every file in this directory.  Every
22758 file is treated as one non-spam mail.
22759 @end defun
22760
22761 Usually you would call @code{spam-stat-process-spam-directory} on a
22762 directory such as @file{~/Mail/mail/spam} (this usually corresponds
22763 the the group @samp{nnml:mail.spam}), and you would call
22764 @code{spam-stat-process-non-spam-directory} on a directory such as
22765 @file{~/Mail/mail/misc} (this usually corresponds the the group
22766 @samp{nnml:mail.misc}).
22767
22768 When you are using @acronym{IMAP}, you won't have the mails available
22769 locally, so that will not work.  One solution is to use the Gnus Agent
22770 to cache the articles.  Then you can use directories such as
22771 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
22772 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
22773
22774 @defvar spam-stat
22775 This variable holds the hash-table with all the statistics---the
22776 dictionary we have been talking about.  For every word in either
22777 collection, this hash-table stores a vector describing how often the
22778 word appeared in spam and often it appeared in non-spam mails.
22779 @end defvar
22780
22781 If you want to regenerate the statistics from scratch, you need to
22782 reset the dictionary.
22783
22784 @defun spam-stat-reset
22785 Reset the @code{spam-stat} hash-table, deleting all the statistics.
22786 @end defun
22787
22788 When you are done, you must save the dictionary.  The dictionary may
22789 be rather large.  If you will not update the dictionary incrementally
22790 (instead, you will recreate it once a month, for example), then you
22791 can reduce the size of the dictionary by deleting all words that did
22792 not appear often enough or that do not clearly belong to only spam or
22793 only non-spam mails.
22794
22795 @defun spam-stat-reduce-size
22796 Reduce the size of the dictionary.  Use this only if you do not want
22797 to update the dictionary incrementally.
22798 @end defun
22799
22800 @defun spam-stat-save
22801 Save the dictionary.
22802 @end defun
22803
22804 @defvar spam-stat-file
22805 The filename used to store the dictionary.  This defaults to
22806 @file{~/.spam-stat.el}.
22807 @end defvar
22808
22809 @node Splitting mail using spam-stat
22810 @subsubsection Splitting mail using spam-stat
22811
22812 In order to use @code{spam-stat} to split your mail, you need to add the
22813 following to your @file{~/.gnus.el} file:
22814
22815 @lisp
22816 (require 'spam-stat)
22817 (spam-stat-load)
22818 @end lisp
22819
22820 This will load the necessary Gnus code, and the dictionary you
22821 created.
22822
22823 Next, you need to adapt your fancy splitting rules:  You need to
22824 determine how to use @code{spam-stat}.  The following examples are for
22825 the nnml back end.  Using the nnimap back end works just as well.  Just
22826 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
22827
22828 In the simplest case, you only have two groups, @samp{mail.misc} and
22829 @samp{mail.spam}.  The following expression says that mail is either
22830 spam or it should go into @samp{mail.misc}.  If it is spam, then
22831 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
22832
22833 @lisp
22834 (setq nnmail-split-fancy
22835       `(| (: spam-stat-split-fancy)
22836           "mail.misc"))
22837 @end lisp
22838
22839 @defvar spam-stat-split-fancy-spam-group
22840 The group to use for spam.  Default is @samp{mail.spam}.
22841 @end defvar
22842
22843 If you also filter mail with specific subjects into other groups, use
22844 the following expression.  Only mails not matching the regular
22845 expression are considered potential spam.
22846
22847 @lisp
22848 (setq nnmail-split-fancy
22849       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
22850           (: spam-stat-split-fancy)
22851           "mail.misc"))
22852 @end lisp
22853
22854 If you want to filter for spam first, then you must be careful when
22855 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
22856 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
22857 non-spam, therefore both should be in your collection of non-spam
22858 mails, when creating the dictionary!
22859
22860 @lisp
22861 (setq nnmail-split-fancy
22862       `(| (: spam-stat-split-fancy)
22863           ("Subject" "\\bspam-stat\\b" "mail.emacs")
22864           "mail.misc"))
22865 @end lisp
22866
22867 You can combine this with traditional filtering.  Here, we move all
22868 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
22869 @code{spam-stat-split-fancy} will never see them, the mails in
22870 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
22871 nor in your collection of non-spam mails, when creating the
22872 dictionary!
22873
22874 @lisp
22875 (setq nnmail-split-fancy
22876       `(| ("Content-Type" "text/html" "mail.spam.filtered")
22877           (: spam-stat-split-fancy)
22878           ("Subject" "\\bspam-stat\\b" "mail.emacs")
22879           "mail.misc"))
22880 @end lisp
22881
22882
22883 @node Low-level interface to the spam-stat dictionary
22884 @subsubsection Low-level interface to the spam-stat dictionary
22885
22886 The main interface to using @code{spam-stat}, are the following functions:
22887
22888 @defun spam-stat-buffer-is-spam
22889 Called in a buffer, that buffer is considered to be a new spam mail.
22890 Use this for new mail that has not been processed before.
22891 @end defun
22892
22893 @defun spam-stat-buffer-is-no-spam
22894 Called in a buffer, that buffer is considered to be a new non-spam
22895 mail.  Use this for new mail that has not been processed before.
22896 @end defun
22897
22898 @defun spam-stat-buffer-change-to-spam
22899 Called in a buffer, that buffer is no longer considered to be normal
22900 mail but spam.  Use this to change the status of a mail that has
22901 already been processed as non-spam.
22902 @end defun
22903
22904 @defun spam-stat-buffer-change-to-non-spam
22905 Called in a buffer, that buffer is no longer considered to be spam but
22906 normal mail.  Use this to change the status of a mail that has already
22907 been processed as spam.
22908 @end defun
22909
22910 @defun spam-stat-save
22911 Save the hash table to the file.  The filename used is stored in the
22912 variable @code{spam-stat-file}.
22913 @end defun
22914
22915 @defun spam-stat-load
22916 Load the hash table from a file.  The filename used is stored in the
22917 variable @code{spam-stat-file}.
22918 @end defun
22919
22920 @defun spam-stat-score-word
22921 Return the spam score for a word.
22922 @end defun
22923
22924 @defun spam-stat-score-buffer
22925 Return the spam score for a buffer.
22926 @end defun
22927
22928 @defun spam-stat-split-fancy
22929 Use this function for fancy mail splitting.  Add the rule @samp{(:
22930 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
22931 @end defun
22932
22933 Make sure you load the dictionary before using it.  This requires the
22934 following in your @file{~/.gnus.el} file:
22935
22936 @lisp
22937 (require 'spam-stat)
22938 (spam-stat-load)
22939 @end lisp
22940
22941 Typical test will involve calls to the following functions:
22942
22943 @example
22944 Reset: (setq spam-stat (make-hash-table :test 'equal))
22945 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
22946 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
22947 Save table: (spam-stat-save)
22948 File size: (nth 7 (file-attributes spam-stat-file))
22949 Number of words: (hash-table-count spam-stat)
22950 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
22951 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
22952 Reduce table size: (spam-stat-reduce-size)
22953 Save table: (spam-stat-save)
22954 File size: (nth 7 (file-attributes spam-stat-file))
22955 Number of words: (hash-table-count spam-stat)
22956 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
22957 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
22958 @end example
22959
22960 Here is how you would create your dictionary:
22961
22962 @example
22963 Reset: (setq spam-stat (make-hash-table :test 'equal))
22964 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
22965 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
22966 Repeat for any other non-spam group you need...
22967 Reduce table size: (spam-stat-reduce-size)
22968 Save table: (spam-stat-save)
22969 @end example
22970
22971 @node Various Various
22972 @section Various Various
22973 @cindex mode lines
22974 @cindex highlights
22975
22976 @table @code
22977
22978 @item gnus-home-directory
22979 @vindex gnus-home-directory
22980 All Gnus file and directory variables will be initialized from this
22981 variable, which defaults to @file{~/}.
22982
22983 @item gnus-directory
22984 @vindex gnus-directory
22985 Most Gnus storage file and directory variables will be initialized from
22986 this variable, which defaults to the @env{SAVEDIR} environment
22987 variable, or @file{~/News/} if that variable isn't set.
22988
22989 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
22990 This means that other directory variables that are initialized from this
22991 variable won't be set properly if you set this variable in
22992 @file{~/.gnus.el}.  Set this variable in @file{.emacs} instead.
22993
22994 @item gnus-default-directory
22995 @vindex gnus-default-directory
22996 Not related to the above variable at all---this variable says what the
22997 default directory of all Gnus buffers should be.  If you issue commands
22998 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
22999 default directory.  If this variable is @code{nil} (which is the
23000 default), the default directory will be the default directory of the
23001 buffer you were in when you started Gnus.
23002
23003 @item gnus-verbose
23004 @vindex gnus-verbose
23005 This variable is an integer between zero and ten.  The higher the value,
23006 the more messages will be displayed.  If this variable is zero, Gnus
23007 will never flash any messages, if it is seven (which is the default),
23008 most important messages will be shown, and if it is ten, Gnus won't ever
23009 shut up, but will flash so many messages it will make your head swim.
23010
23011 @item gnus-verbose-backends
23012 @vindex gnus-verbose-backends
23013 This variable works the same way as @code{gnus-verbose}, but it applies
23014 to the Gnus back ends instead of Gnus proper.
23015
23016 @item nnheader-max-head-length
23017 @vindex nnheader-max-head-length
23018 When the back ends read straight heads of articles, they all try to read
23019 as little as possible.  This variable (default 4096) specifies
23020 the absolute max length the back ends will try to read before giving up
23021 on finding a separator line between the head and the body.  If this
23022 variable is @code{nil}, there is no upper read bound.  If it is
23023 @code{t}, the back ends won't try to read the articles piece by piece,
23024 but read the entire articles.  This makes sense with some versions of
23025 @code{ange-ftp} or @code{efs}.
23026
23027 @item nnheader-head-chop-length
23028 @vindex nnheader-head-chop-length
23029 This variable (default 2048) says how big a piece of each article to
23030 read when doing the operation described above.
23031
23032 @item nnheader-file-name-translation-alist
23033 @vindex nnheader-file-name-translation-alist
23034 @cindex file names
23035 @cindex invalid characters in file names
23036 @cindex characters in file names
23037 This is an alist that says how to translate characters in file names.
23038 For instance, if @samp{:} is invalid as a file character in file names
23039 on your system (you OS/2 user you), you could say something like:
23040
23041 @lisp
23042 (setq nnheader-file-name-translation-alist
23043       '((?: . ?_)))
23044 @end lisp
23045
23046 In fact, this is the default value for this variable on OS/2 and MS
23047 Windows (phooey) systems.
23048
23049 @item gnus-hidden-properties
23050 @vindex gnus-hidden-properties
23051 This is a list of properties to use to hide ``invisible'' text.  It is
23052 @code{(invisible t intangible t)} by default on most systems, which
23053 makes invisible text invisible and intangible.
23054
23055 @item gnus-parse-headers-hook
23056 @vindex gnus-parse-headers-hook
23057 A hook called before parsing headers.  It can be used, for instance, to
23058 gather statistics on the headers fetched, or perhaps you'd like to prune
23059 some headers.  I don't see why you'd want that, though.
23060
23061 @item gnus-shell-command-separator
23062 @vindex gnus-shell-command-separator
23063 String used to separate two shell commands.  The default is @samp{;}.
23064
23065 @item gnus-invalid-group-regexp
23066 @vindex gnus-invalid-group-regexp
23067
23068 Regexp to match ``invalid'' group names when querying user for a group
23069 name.  The default value catches some @strong{really} invalid group
23070 names who could possibly mess up Gnus internally (like allowing
23071 @samp{:} in a group name, which is normally used to delimit method and
23072 group).
23073
23074 @acronym{IMAP} users might want to allow @samp{/} in group names though.
23075
23076
23077 @end table
23078
23079 @node The End
23080 @chapter The End
23081
23082 Well, that's the manual---you can get on with your life now.  Keep in
23083 touch.  Say hello to your cats from me.
23084
23085 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
23086
23087 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
23088
23089 @quotation
23090 @strong{Te Deum}
23091
23092 @sp 1
23093 Not because of victories @*
23094 I sing,@*
23095 having none,@*
23096 but for the common sunshine,@*
23097 the breeze,@*
23098 the largess of the spring.
23099
23100 @sp 1
23101 Not for victory@*
23102 but for the day's work done@*
23103 as well as I was able;@*
23104 not for a seat upon the dais@*
23105 but at the common table.@*
23106 @end quotation
23107
23108
23109 @node Appendices
23110 @chapter Appendices
23111
23112 @menu
23113 * XEmacs::                      Requirements for installing under XEmacs.
23114 * History::                     How Gnus got where it is today.
23115 * On Writing Manuals::          Why this is not a beginner's guide.
23116 * Terminology::                 We use really difficult, like, words here.
23117 * Customization::               Tailoring Gnus to your needs.
23118 * Troubleshooting::             What you might try if things do not work.
23119 * Gnus Reference Guide::        Rilly, rilly technical stuff.
23120 * Emacs for Heathens::          A short introduction to Emacsian terms.
23121 * Frequently Asked Questions::
23122 @end menu
23123
23124
23125 @node XEmacs
23126 @section XEmacs
23127 @cindex XEmacs
23128 @cindex Installing under XEmacs
23129
23130 XEmacs is distributed as a collection of packages.  You should install
23131 whatever packages the Gnus XEmacs package requires.  The current
23132 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
23133 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
23134 @samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
23135 @samp{misc-games} package is required for Morse decoding.
23136
23137
23138 @node History
23139 @section History
23140
23141 @cindex history
23142 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
23143 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
23144
23145 If you want to investigate the person responsible for this outrage,
23146 you can point your (feh!) web browser to
23147 @uref{http://quimby.gnus.org/}.  This is also the primary
23148 distribution point for the new and spiffy versions of Gnus, and is
23149 known as The Site That Destroys Newsrcs And Drives People Mad.
23150
23151 During the first extended alpha period of development, the new Gnus was
23152 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
23153 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
23154 (Besides, the ``Gnus'' in this abbreviation should probably be
23155 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
23156 appropriate name, don't you think?)
23157
23158 In any case, after spending all that energy on coming up with a new and
23159 spunky name, we decided that the name was @emph{too} spunky, so we
23160 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
23161 ``@sc{gnus}''.  New vs. old.
23162
23163 @menu
23164 * Gnus Versions::               What Gnus versions have been released.
23165 * Other Gnus Versions::         Other Gnus versions that also have been released.
23166 * Why?::                        What's the point of Gnus?
23167 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
23168 * Conformity::                  Gnus tries to conform to all standards.
23169 * Emacsen::                     Gnus can be run on a few modern Emacsen.
23170 * Gnus Development::            How Gnus is developed.
23171 * Contributors::                Oodles of people.
23172 * New Features::                Pointers to some of the new stuff in Gnus.
23173 @end menu
23174
23175
23176 @node Gnus Versions
23177 @subsection Gnus Versions
23178 @cindex ding Gnus
23179 @cindex September Gnus
23180 @cindex Red Gnus
23181 @cindex Quassia Gnus
23182 @cindex Pterodactyl Gnus
23183 @cindex Oort Gnus
23184 @cindex No Gnus
23185 @cindex Gnus versions
23186
23187 The first ``proper'' release of Gnus 5 was done in November 1995 when it
23188 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
23189 plus 15 Gnus 5.0 releases).
23190
23191 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
23192 releases)) was released under the name ``Gnus 5.2'' (40 releases).
23193
23194 On July 28th 1996 work on Red Gnus was begun, and it was released on
23195 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
23196
23197 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
23198 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
23199
23200 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
23201 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
23202 1999.
23203
23204 On the 26th of October 2000, Oort Gnus was begun.
23205
23206 If you happen upon a version of Gnus that has a prefixed name --
23207 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
23208 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
23209 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
23210 run.  Walk away, calmly, until you're out of its reach.  Find a proper
23211 released version of Gnus and snuggle up to that instead.
23212
23213
23214 @node Other Gnus Versions
23215 @subsection Other Gnus Versions
23216 @cindex Semi-gnus
23217
23218 In addition to the versions of Gnus which have had their releases
23219 coordinated by Lars, one major development has been Semi-gnus from
23220 Japan.  It's based on a library called @sc{semi}, which provides
23221 @acronym{MIME} capabilities.
23222
23223 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
23224 Collectively, they are called ``Semi-gnus'', and different strains are
23225 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
23226 @acronym{MIME} and multilingualization things, especially important for
23227 Japanese users.
23228
23229
23230 @node Why?
23231 @subsection Why?
23232
23233 What's the point of Gnus?
23234
23235 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
23236 newsreader, that lets you do anything you can think of.  That was my
23237 original motivation, but while working on Gnus, it has become clear to
23238 me that this generation of newsreaders really belong in the stone age.
23239 Newsreaders haven't developed much since the infancy of the net.  If the
23240 volume continues to rise with the current rate of increase, all current
23241 newsreaders will be pretty much useless.  How do you deal with
23242 newsgroups that have thousands of new articles each day?  How do you
23243 keep track of millions of people who post?
23244
23245 Gnus offers no real solutions to these questions, but I would very much
23246 like to see Gnus being used as a testing ground for new methods of
23247 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
23248 to separate the newsreader from the back ends, Gnus now offers a simple
23249 interface for anybody who wants to write new back ends for fetching mail
23250 and news from different sources.  I have added hooks for customizations
23251 everywhere I could imagine it being useful.  By doing so, I'm inviting
23252 every one of you to explore and invent.
23253
23254 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
23255 @kbd{C-u 100 M-x all-hail-xemacs}.
23256
23257
23258 @node Compatibility
23259 @subsection Compatibility
23260
23261 @cindex compatibility
23262 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
23263 bindings have been kept.  More key bindings have been added, of course,
23264 but only in one or two obscure cases have old bindings been changed.
23265
23266 Our motto is:
23267 @quotation
23268 @cartouche
23269 @center In a cloud bones of steel.
23270 @end cartouche
23271 @end quotation
23272
23273 All commands have kept their names.  Some internal functions have changed
23274 their names.
23275
23276 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
23277 Articles}.
23278
23279 One major compatibility question is the presence of several summary
23280 buffers.  All variables relevant while reading a group are
23281 buffer-local to the summary buffer they belong in.  Although many
23282 important variables have their values copied into their global
23283 counterparts whenever a command is executed in the summary buffer, this
23284 change might lead to incorrect values being used unless you are careful.
23285
23286 All code that relies on knowledge of @sc{gnus} internals will probably
23287 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
23288 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
23289 maintains a hash table that points to the entries in this alist (which
23290 speeds up many functions), and changing the alist directly will lead to
23291 peculiar results.
23292
23293 @cindex hilit19
23294 @cindex highlighting
23295 Old hilit19 code does not work at all.  In fact, you should probably
23296 remove all hilit code from all Gnus hooks
23297 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
23298 Gnus provides various integrated functions for highlighting.  These are
23299 faster and more accurate.  To make life easier for everybody, Gnus will
23300 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
23301 Away!
23302
23303 Packages like @code{expire-kill} will no longer work.  As a matter of
23304 fact, you should probably remove all old @sc{gnus} packages (and other
23305 code) when you start using Gnus.  More likely than not, Gnus already
23306 does what you have written code to make @sc{gnus} do.  (Snicker.)
23307
23308 Even though old methods of doing things are still supported, only the
23309 new methods are documented in this manual.  If you detect a new method of
23310 doing something while reading this manual, that does not mean you have
23311 to stop doing it the old way.
23312
23313 Gnus understands all @sc{gnus} startup files.
23314
23315 @kindex M-x gnus-bug
23316 @findex gnus-bug
23317 @cindex reporting bugs
23318 @cindex bugs
23319 Overall, a casual user who hasn't written much code that depends on
23320 @sc{gnus} internals should suffer no problems.  If problems occur,
23321 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
23322
23323 @vindex gnus-bug-create-help-buffer
23324 If you are in the habit of sending bug reports @emph{very} often, you
23325 may find the helpful help buffer annoying after a while.  If so, set
23326 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
23327 up at you.
23328
23329
23330 @node Conformity
23331 @subsection Conformity
23332
23333 No rebels without a clue here, ma'am.  We conform to all standards known
23334 to (wo)man.  Except for those standards and/or conventions we disagree
23335 with, of course.
23336
23337 @table @strong
23338
23339 @item RFC (2)822
23340 @cindex RFC 822
23341 @cindex RFC 2822
23342 There are no known breaches of this standard.
23343
23344 @item RFC 1036
23345 @cindex RFC 1036
23346 There are no known breaches of this standard, either.
23347
23348 @item Son-of-RFC 1036
23349 @cindex Son-of-RFC 1036
23350 We do have some breaches to this one.
23351
23352 @table @emph
23353
23354 @item X-Newsreader
23355 @itemx User-Agent
23356 These are considered to be ``vanity headers'', while I consider them
23357 to be consumer information.  After seeing so many badly formatted
23358 articles coming from @code{tin} and @code{Netscape} I know not to use
23359 either of those for posting articles.  I would not have known that if
23360 it wasn't for the @code{X-Newsreader} header.
23361 @end table
23362
23363 @item USEFOR
23364 @cindex USEFOR
23365 USEFOR is an IETF working group writing a successor to RFC 1036, based
23366 on Son-of-RFC 1036.  They have produced a number of drafts proposing
23367 various changes to the format of news articles.  The Gnus towers will
23368 look into implementing the changes when the draft is accepted as an RFC.
23369
23370 @item MIME - RFC 2045-2049 etc
23371 @cindex MIME
23372 All the various @acronym{MIME} RFCs are supported.
23373
23374 @item Disposition Notifications - RFC 2298
23375 Message Mode is able to request notifications from the receiver.
23376
23377 @item PGP - RFC 1991 and RFC 2440
23378 @cindex RFC 1991
23379 @cindex RFC 2440
23380 RFC 1991 is the original @acronym{PGP} message specification,
23381 published as a Information RFC.  RFC 2440 was the follow-up, now
23382 called Open PGP, and put on the Standards Track.  Both document a
23383 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
23384 encoding (signing and encryption) and decoding (verification and
23385 decryption).
23386
23387 @item PGP/MIME - RFC 2015/3156
23388 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
23389 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
23390 Gnus supports both encoding and decoding.
23391
23392 @item S/MIME - RFC 2633
23393 RFC 2633 describes the @acronym{S/MIME} format.
23394
23395 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
23396 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
23397 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
23398 authentication for @acronym{IMAP}. RFC 2086 describes access control
23399 lists (ACLs) for @acronym{IMAP}. RFC 2359 describes a @acronym{IMAP}
23400 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
23401 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
23402 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
23403
23404 @end table
23405
23406 If you ever notice Gnus acting non-compliant with regards to the texts
23407 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
23408 know.
23409
23410
23411 @node Emacsen
23412 @subsection Emacsen
23413 @cindex Emacsen
23414 @cindex XEmacs
23415 @cindex Mule
23416 @cindex Emacs
23417
23418 Gnus should work on :
23419
23420 @itemize @bullet
23421
23422 @item
23423 Emacs 20.3 and up.
23424
23425 @item
23426 XEmacs 20.4 and up.
23427
23428 @end itemize
23429
23430 This Gnus version will absolutely not work on any Emacsen older than
23431 that.  Not reliably, at least.  Older versions of Gnus may work on older
23432 Emacs versions.
23433
23434 There are some vague differences between Gnus on the various
23435 platforms---XEmacs features more graphics (a logo and a toolbar)---but
23436 other than that, things should look pretty much the same under all
23437 Emacsen.
23438
23439
23440 @node Gnus Development
23441 @subsection Gnus Development
23442
23443 Gnus is developed in a two-phased cycle.  The first phase involves much
23444 discussion on the @samp{ding@@gnus.org} mailing list, where people
23445 propose changes and new features, post patches and new back ends.  This
23446 phase is called the @dfn{alpha} phase, since the Gnusae released in this
23447 phase are @dfn{alpha releases}, or (perhaps more commonly in other
23448 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
23449 unstable and should not be used by casual users.  Gnus alpha releases
23450 have names like ``Red Gnus'' and ``Quassia Gnus''.
23451
23452 After futzing around for 50-100 alpha releases, Gnus is declared
23453 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
23454 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
23455 supposed to be able to use these, and these are mostly discussed on the
23456 @samp{gnu.emacs.gnus} newsgroup.
23457
23458 @cindex Incoming*
23459 @vindex mail-source-delete-incoming
23460 Some variable defaults differ between alpha Gnusae and released Gnusae.
23461 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
23462 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
23463 lossage of mail if an alpha release hiccups while handling the mail.
23464
23465 The division of discussion between the ding mailing list and the Gnus
23466 newsgroup is not purely based on publicity concerns.  It's true that
23467 having people write about the horrible things that an alpha Gnus release
23468 can do (sometimes) in a public forum may scare people off, but more
23469 importantly, talking about new experimental features that have been
23470 introduced may confuse casual users.  New features are frequently
23471 introduced, fiddled with, and judged to be found wanting, and then
23472 either discarded or totally rewritten.  People reading the mailing list
23473 usually keep up with these rapid changes, while people on the newsgroup
23474 can't be assumed to do so.
23475
23476
23477
23478 @node Contributors
23479 @subsection Contributors
23480 @cindex contributors
23481
23482 The new Gnus version couldn't have been done without the help of all the
23483 people on the (ding) mailing list.  Every day for over a year I have
23484 gotten billions of nice bug reports from them, filling me with joy,
23485 every single one of them.  Smooches.  The people on the list have been
23486 tried beyond endurance, what with my ``oh, that's a neat idea <type
23487 type>, yup, I'll release it right away <ship off> no wait, that doesn't
23488 work at all <type type>, yup, I'll ship that one off right away <ship
23489 off> no, wait, that absolutely does not work'' policy for releases.
23490 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
23491 ``worser''? ``much worser''?  ``worsest''?)
23492
23493 I would like to take this opportunity to thank the Academy for@dots{}  oops,
23494 wrong show.
23495
23496 @itemize @bullet
23497
23498 @item
23499 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
23500
23501 @item
23502 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
23503 nnwarchive and many, many other things connected with @acronym{MIME} and
23504 other types of en/decoding, as well as general bug fixing, new
23505 functionality and stuff.
23506
23507 @item
23508 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
23509 well as numerous other things).
23510
23511 @item
23512 Luis Fernandes---design and graphics.
23513
23514 @item
23515 Joe Reiss---creator of the smiley faces.
23516
23517 @item
23518 Justin Sheehy--the @acronym{FAQ} maintainer.
23519
23520 @item
23521 Erik Naggum---help, ideas, support, code and stuff.
23522
23523 @item
23524 Wes Hardaker---@file{gnus-picon.el} and the manual section on
23525 @dfn{picons} (@pxref{Picons}).
23526
23527 @item
23528 Kim-Minh Kaplan---further work on the picon code.
23529
23530 @item
23531 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
23532 (@pxref{GroupLens}).
23533
23534 @item
23535 Sudish Joseph---innumerable bug fixes.
23536
23537 @item
23538 Ilja Weis---@file{gnus-topic.el}.
23539
23540 @item
23541 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
23542
23543 @item
23544 Vladimir Alexiev---the refcard and reference booklets.
23545
23546 @item
23547 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
23548 distribution by Felix Lee and JWZ.
23549
23550 @item
23551 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
23552
23553 @item
23554 Peter Mutsaers---orphan article scoring code.
23555
23556 @item
23557 Ken Raeburn---POP mail support.
23558
23559 @item
23560 Hallvard B Furuseth---various bits and pieces, especially dealing with
23561 .newsrc files.
23562
23563 @item
23564 Brian Edmonds---@file{gnus-bbdb.el}.
23565
23566 @item
23567 David Moore---rewrite of @file{nnvirtual.el} and many other things.
23568
23569 @item
23570 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
23571
23572 @item
23573 François Pinard---many, many interesting and thorough bug reports, as
23574 well as autoconf support.
23575
23576 @end itemize
23577
23578 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
23579 Borges, and Jost Krieger proof-reading parts of the manual.
23580
23581 The following people have contributed many patches and suggestions:
23582
23583 Christopher Davis,
23584 Andrew Eskilsson,
23585 Kai Grossjohann,
23586 Kevin Greiner,
23587 Jesper Harder,
23588 Paul Jarc,
23589 Simon Josefsson,
23590 David KÃ¥gedal,
23591 Richard Pieri,
23592 Fabrice Popineau,
23593 Daniel Quinlan,
23594 Michael Shields,
23595 Reiner Steib,
23596 Jason L. Tibbitts, III,
23597 Jack Vinson,
23598 Katsumi Yamaoka, @c Yamaoka
23599 and
23600 Teodor Zlatanov.
23601
23602 Also thanks to the following for patches and stuff:
23603
23604 Jari Aalto,
23605 Adrian Aichner,
23606 Vladimir Alexiev,
23607 Russ Allbery,
23608 Peter Arius,
23609 Matt Armstrong,
23610 Marc Auslander,
23611 Miles Bader,
23612 Alexei V. Barantsev,
23613 Frank Bennett,
23614 Robert Bihlmeyer,
23615 Chris Bone,
23616 Mark Borges,
23617 Mark Boyns,
23618 Lance A. Brown,
23619 Rob Browning,
23620 Kees de Bruin,
23621 Martin Buchholz,
23622 Joe Buehler,
23623 Kevin Buhr,
23624 Alastair Burt,
23625 Joao Cachopo,
23626 Zlatko Calusic,
23627 Massimo Campostrini,
23628 Castor,
23629 David Charlap,
23630 Dan Christensen,
23631 Kevin Christian,
23632 Jae-you Chung, @c ?
23633 James H. Cloos, Jr.,
23634 Laura Conrad,
23635 Michael R. Cook,
23636 Glenn Coombs,
23637 Andrew J. Cosgriff,
23638 Neil Crellin,
23639 Frank D. Cringle,
23640 Geoffrey T. Dairiki,
23641 Andre Deparade,
23642 Ulrik Dickow,
23643 Dave Disser,
23644 Rui-Tao Dong, @c ?
23645 Joev Dubach,
23646 Michael Welsh Duggan,
23647 Dave Edmondson,
23648 Paul Eggert,
23649 Mark W. Eichin,
23650 Karl Eichwalder,
23651 Enami Tsugutomo, @c Enami
23652 Michael Ernst,
23653 Luc Van Eycken,
23654 Sam Falkner,
23655 Nelson Jose dos Santos Ferreira,
23656 Sigbjorn Finne,
23657 Sven Fischer,
23658 Paul Fisher,
23659 Decklin Foster,
23660 Gary D. Foster,
23661 Paul Franklin,
23662 Guy Geens,
23663 Arne Georg Gleditsch,
23664 David S. Goldberg,
23665 Michelangelo Grigni,
23666 Dale Hagglund,
23667 D. Hall,
23668 Magnus Hammerin,
23669 Kenichi Handa, @c Handa
23670 Raja R. Harinath,
23671 Yoshiki Hayashi, @c Hayashi
23672 P. E. Jareth Hein,
23673 Hisashige Kenji, @c Hisashige
23674 Scott Hofmann,
23675 Marc Horowitz,
23676 Gunnar Horrigmo,
23677 Richard Hoskins,
23678 Brad Howes,
23679 Miguel de Icaza,
23680 François Felix Ingrand,
23681 Tatsuya Ichikawa, @c Ichikawa
23682 Ishikawa Ichiro, @c Ishikawa
23683 Lee Iverson,
23684 Iwamuro Motonori, @c Iwamuro
23685 Rajappa Iyer,
23686 Andreas Jaeger,
23687 Adam P. Jenkins,
23688 Randell Jesup,
23689 Fred Johansen,
23690 Gareth Jones,
23691 Greg Klanderman,
23692 Karl Kleinpaste,
23693 Michael Klingbeil,
23694 Peter Skov Knudsen,
23695 Shuhei Kobayashi, @c Kobayashi
23696 Petr Konecny,
23697 Koseki Yoshinori, @c Koseki
23698 Thor Kristoffersen,
23699 Jens Lautenbacher,
23700 Martin Larose,
23701 Seokchan Lee, @c Lee
23702 Joerg Lenneis,
23703 Carsten Leonhardt,
23704 James LewisMoss,
23705 Christian Limpach,
23706 Markus Linnala,
23707 Dave Love,
23708 Mike McEwan,
23709 Tonny Madsen,
23710 Shlomo Mahlab,
23711 Nat Makarevitch,
23712 Istvan Marko,
23713 David Martin,
23714 Jason R. Mastaler,
23715 Gordon Matzigkeit,
23716 Timo Metzemakers,
23717 Richard Mlynarik,
23718 Lantz Moore,
23719 Morioka Tomohiko, @c Morioka
23720 Erik Toubro Nielsen,
23721 Hrvoje Niksic,
23722 Andy Norman,
23723 Fred Oberhauser,
23724 C. R. Oldham,
23725 Alexandre Oliva,
23726 Ken Olstad,
23727 Masaharu Onishi, @c Onishi
23728 Hideki Ono, @c Ono
23729 Ettore Perazzoli,
23730 William Perry,
23731 Stephen Peters,
23732 Jens-Ulrik Holger Petersen,
23733 Ulrich Pfeifer,
23734 Matt Pharr,
23735 Andy Piper,
23736 John McClary Prevost,
23737 Bill Pringlemeir,
23738 Mike Pullen,
23739 Jim Radford,
23740 Colin Rafferty,
23741 Lasse Rasinen,
23742 Lars Balker Rasmussen,
23743 Joe Reiss,
23744 Renaud Rioboo,
23745 Roland B. Roberts,
23746 Bart Robinson,
23747 Christian von Roques,
23748 Markus Rost,
23749 Jason Rumney,
23750 Wolfgang Rupprecht,
23751 Jay Sachs,
23752 Dewey M. Sasser,
23753 Conrad Sauerwald,
23754 Loren Schall,
23755 Dan Schmidt,
23756 Ralph Schleicher,
23757 Philippe Schnoebelen,
23758 Andreas Schwab,
23759 Randal L. Schwartz,
23760 Danny Siu,
23761 Matt Simmons,
23762 Paul D. Smith,
23763 Jeff Sparkes,
23764 Toby Speight,
23765 Michael Sperber,
23766 Darren Stalder,
23767 Richard Stallman,
23768 Greg Stark,
23769 Sam Steingold,
23770 Paul Stevenson,
23771 Jonas Steverud,
23772 Paul Stodghill,
23773 Kiyokazu Suto, @c Suto
23774 Kurt Swanson,
23775 Samuel Tardieu,
23776 Teddy,
23777 Chuck Thompson,
23778 Tozawa Akihiko, @c Tozawa
23779 Philippe Troin,
23780 James Troup,
23781 Trung Tran-Duc,
23782 Jack Twilley,
23783 Aaron M. Ucko,
23784 Aki Vehtari,
23785 Didier Verna,
23786 Vladimir Volovich,
23787 Jan Vroonhof,
23788 Stefan Waldherr,
23789 Pete Ware,
23790 Barry A. Warsaw,
23791 Christoph Wedler,
23792 Joe Wells,
23793 Lee Willis,
23794 and
23795 Lloyd Zusman.
23796
23797
23798 For a full overview of what each person has done, the ChangeLogs
23799 included in the Gnus alpha distributions should give ample reading
23800 (550kB and counting).
23801
23802 Apologies to everybody that I've forgotten, of which there are many, I'm
23803 sure.
23804
23805 Gee, that's quite a list of people.  I guess that must mean that there
23806 actually are people who are using Gnus.  Who'd'a thunk it!
23807
23808
23809 @node New Features
23810 @subsection New Features
23811 @cindex new features
23812
23813 @menu
23814 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
23815 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
23816 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
23817 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
23818 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
23819 @end menu
23820
23821 These lists are, of course, just @emph{short} overviews of the
23822 @emph{most} important new features.  No, really.  There are tons more.
23823 Yes, we have feeping creaturism in full effect.
23824
23825 @node ding Gnus
23826 @subsubsection (ding) Gnus
23827
23828 New features in Gnus 5.0/5.1:
23829
23830 @itemize @bullet
23831
23832 @item
23833 The look of all buffers can be changed by setting format-like variables
23834 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
23835
23836 @item
23837 Local spool and several @acronym{NNTP} servers can be used at once
23838 (@pxref{Select Methods}).
23839
23840 @item
23841 You can combine groups into virtual groups (@pxref{Virtual Groups}).
23842
23843 @item
23844 You can read a number of different mail formats (@pxref{Getting Mail}).
23845 All the mail back ends implement a convenient mail expiry scheme
23846 (@pxref{Expiring Mail}).
23847
23848 @item
23849 Gnus can use various strategies for gathering threads that have lost
23850 their roots (thereby gathering loose sub-threads into one thread) or it
23851 can go back and retrieve enough headers to build a complete thread
23852 (@pxref{Customizing Threading}).
23853
23854 @item
23855 Killed groups can be displayed in the group buffer, and you can read
23856 them as well (@pxref{Listing Groups}).
23857
23858 @item
23859 Gnus can do partial group updates---you do not have to retrieve the
23860 entire active file just to check for new articles in a few groups
23861 (@pxref{The Active File}).
23862
23863 @item
23864 Gnus implements a sliding scale of subscribedness to groups
23865 (@pxref{Group Levels}).
23866
23867 @item
23868 You can score articles according to any number of criteria
23869 (@pxref{Scoring}).  You can even get Gnus to find out how to score
23870 articles for you (@pxref{Adaptive Scoring}).
23871
23872 @item
23873 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
23874 manner, so it should be difficult to lose much data on what you have
23875 read if your machine should go down (@pxref{Auto Save}).
23876
23877 @item
23878 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
23879 cluttering up the @file{.emacs} file.
23880
23881 @item
23882 You can set the process mark on both groups and articles and perform
23883 operations on all the marked items (@pxref{Process/Prefix}).
23884
23885 @item
23886 You can grep through a subset of groups and create a group from the
23887 results (@pxref{Kibozed Groups}).
23888
23889 @item
23890 You can list subsets of groups according to, well, anything
23891 (@pxref{Listing Groups}).
23892
23893 @item
23894 You can browse foreign servers and subscribe to groups from those
23895 servers (@pxref{Browse Foreign Server}).
23896
23897 @item
23898 Gnus can fetch articles, asynchronously, on a second connection to the
23899 server (@pxref{Asynchronous Fetching}).
23900
23901 @item
23902 You can cache articles locally (@pxref{Article Caching}).
23903
23904 @item
23905 The uudecode functions have been expanded and generalized
23906 (@pxref{Decoding Articles}).
23907
23908 @item
23909 You can still post uuencoded articles, which was a little-known feature
23910 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
23911
23912 @item
23913 Fetching parents (and other articles) now actually works without
23914 glitches (@pxref{Finding the Parent}).
23915
23916 @item
23917 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
23918
23919 @item
23920 Digests (and other files) can be used as the basis for groups
23921 (@pxref{Document Groups}).
23922
23923 @item
23924 Articles can be highlighted and customized (@pxref{Customizing
23925 Articles}).
23926
23927 @item
23928 URLs and other external references can be buttonized (@pxref{Article
23929 Buttons}).
23930
23931 @item
23932 You can do lots of strange stuff with the Gnus window & frame
23933 configuration (@pxref{Window Layout}).
23934
23935 @item
23936 You can click on buttons instead of using the keyboard
23937 (@pxref{Buttons}).
23938
23939 @end itemize
23940
23941
23942 @node September Gnus
23943 @subsubsection September Gnus
23944
23945 @iftex
23946 @iflatex
23947 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
23948 @end iflatex
23949 @end iftex
23950
23951 New features in Gnus 5.2/5.3:
23952
23953 @itemize @bullet
23954
23955 @item
23956 A new message composition mode is used.  All old customization variables
23957 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
23958 now obsolete.
23959
23960 @item
23961 Gnus is now able to generate @dfn{sparse} threads---threads where
23962 missing articles are represented by empty nodes (@pxref{Customizing
23963 Threading}).
23964
23965 @lisp
23966 (setq gnus-build-sparse-threads 'some)
23967 @end lisp
23968
23969 @item
23970 Outgoing articles are stored on a special archive server
23971 (@pxref{Archived Messages}).
23972
23973 @item
23974 Partial thread regeneration now happens when articles are
23975 referred.
23976
23977 @item
23978 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
23979
23980 @item
23981 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
23982
23983 @item
23984 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
23985
23986 @lisp
23987 (setq gnus-use-trees t)
23988 @end lisp
23989
23990 @item
23991 An @code{nn}-like pick-and-read minor mode is available for the summary
23992 buffers (@pxref{Pick and Read}).
23993
23994 @lisp
23995 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
23996 @end lisp
23997
23998 @item
23999 In binary groups you can use a special binary minor mode (@pxref{Binary
24000 Groups}).
24001
24002 @item
24003 Groups can be grouped in a folding topic hierarchy (@pxref{Group
24004 Topics}).
24005
24006 @lisp
24007 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
24008 @end lisp
24009
24010 @item
24011 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
24012
24013 @item
24014 Groups can now have a score, and bubbling based on entry frequency
24015 is possible (@pxref{Group Score}).
24016
24017 @lisp
24018 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
24019 @end lisp
24020
24021 @item
24022 Groups can be process-marked, and commands can be performed on
24023 groups of groups (@pxref{Marking Groups}).
24024
24025 @item
24026 Caching is possible in virtual groups.
24027
24028 @item
24029 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
24030 news batches, ClariNet briefs collections, and just about everything
24031 else (@pxref{Document Groups}).
24032
24033 @item
24034 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
24035 (@pxref{SOUP}).
24036
24037 @item
24038 The Gnus cache is much faster.
24039
24040 @item
24041 Groups can be sorted according to many criteria (@pxref{Sorting
24042 Groups}).
24043
24044 @item
24045 New group parameters have been introduced to set list-addresses and
24046 expiry times (@pxref{Group Parameters}).
24047
24048 @item
24049 All formatting specs allow specifying faces to be used
24050 (@pxref{Formatting Fonts}).
24051
24052 @item
24053 There are several more commands for setting/removing/acting on process
24054 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
24055
24056 @item
24057 The summary buffer can be limited to show parts of the available
24058 articles based on a wide range of criteria.  These commands have been
24059 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
24060
24061 @item
24062 Articles can be made persistent with the @kbd{*} command
24063 (@pxref{Persistent Articles}).
24064
24065 @item
24066 All functions for hiding article elements are now toggles.
24067
24068 @item
24069 Article headers can be buttonized (@pxref{Article Washing}).
24070
24071 @item
24072 All mail back ends support fetching articles by @code{Message-ID}.
24073
24074 @item
24075 Duplicate mail can now be treated properly (@pxref{Duplicates}).
24076
24077 @item
24078 All summary mode commands are available directly from the article
24079 buffer (@pxref{Article Keymap}).
24080
24081 @item
24082 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
24083 Layout}).
24084
24085 @item
24086 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
24087 @iftex
24088 @iflatex
24089 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
24090 @end iflatex
24091 @end iftex
24092
24093 @item
24094 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
24095
24096 @lisp
24097 (setq gnus-use-nocem t)
24098 @end lisp
24099
24100 @item
24101 Groups can be made permanently visible (@pxref{Listing Groups}).
24102
24103 @lisp
24104 (setq gnus-permanently-visible-groups "^nnml:")
24105 @end lisp
24106
24107 @item
24108 Many new hooks have been introduced to make customizing easier.
24109
24110 @item
24111 Gnus respects the @code{Mail-Copies-To} header.
24112
24113 @item
24114 Threads can be gathered by looking at the @code{References} header
24115 (@pxref{Customizing Threading}).
24116
24117 @lisp
24118 (setq gnus-summary-thread-gathering-function
24119       'gnus-gather-threads-by-references)
24120 @end lisp
24121
24122 @item
24123 Read articles can be stored in a special backlog buffer to avoid
24124 refetching (@pxref{Article Backlog}).
24125
24126 @lisp
24127 (setq gnus-keep-backlog 50)
24128 @end lisp
24129
24130 @item
24131 A clean copy of the current article is always stored in a separate
24132 buffer to allow easier treatment.
24133
24134 @item
24135 Gnus can suggest where to save articles (@pxref{Saving Articles}).
24136
24137 @item
24138 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
24139 Articles}).
24140
24141 @lisp
24142 (setq gnus-prompt-before-saving t)
24143 @end lisp
24144
24145 @item
24146 @code{gnus-uu} can view decoded files asynchronously while fetching
24147 articles (@pxref{Other Decode Variables}).
24148
24149 @lisp
24150 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
24151 @end lisp
24152
24153 @item
24154 Filling in the article buffer now works properly on cited text
24155 (@pxref{Article Washing}).
24156
24157 @item
24158 Hiding cited text adds buttons to toggle hiding, and how much
24159 cited text to hide is now customizable (@pxref{Article Hiding}).
24160
24161 @lisp
24162 (setq gnus-cited-lines-visible 2)
24163 @end lisp
24164
24165 @item
24166 Boring headers can be hidden (@pxref{Article Hiding}).
24167
24168 @item
24169 Default scoring values can now be set from the menu bar.
24170
24171 @item
24172 Further syntax checking of outgoing articles have been added.
24173
24174 @end itemize
24175
24176
24177 @node Red Gnus
24178 @subsubsection Red Gnus
24179
24180 New features in Gnus 5.4/5.5:
24181
24182 @iftex
24183 @iflatex
24184 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
24185 @end iflatex
24186 @end iftex
24187
24188 @itemize @bullet
24189
24190 @item
24191 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
24192
24193 @item
24194 Article prefetching functionality has been moved up into
24195 Gnus (@pxref{Asynchronous Fetching}).
24196
24197 @item
24198 Scoring can now be performed with logical operators like @code{and},
24199 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
24200 Scoring}).
24201
24202 @item
24203 Article washing status can be displayed in the
24204 article mode line (@pxref{Misc Article}).
24205
24206 @item
24207 @file{gnus.el} has been split into many smaller files.
24208
24209 @item
24210 Suppression of duplicate articles based on Message-ID can be done
24211 (@pxref{Duplicate Suppression}).
24212
24213 @lisp
24214 (setq gnus-suppress-duplicates t)
24215 @end lisp
24216
24217 @item
24218 New variables for specifying what score and adapt files are to be
24219 considered home score and adapt files (@pxref{Home Score File}) have
24220 been added.
24221
24222 @item
24223 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
24224 Server Internals}).
24225
24226 @item
24227 Groups can inherit group parameters from parent topics (@pxref{Topic
24228 Parameters}).
24229
24230 @item
24231 Article editing has been revamped and is now actually usable.
24232
24233 @item
24234 Signatures can be recognized in more intelligent fashions
24235 (@pxref{Article Signature}).
24236
24237 @item
24238 Summary pick mode has been made to look more @code{nn}-like.  Line
24239 numbers are displayed and the @kbd{.} command can be used to pick
24240 articles (@code{Pick and Read}).
24241
24242 @item
24243 Commands for moving the @file{.newsrc.eld} from one server to
24244 another have been added (@pxref{Changing Servers}).
24245
24246 @item
24247 There's a way now to specify that ``uninteresting'' fields be suppressed
24248 when generating lines in buffers (@pxref{Advanced Formatting}).
24249
24250 @item
24251 Several commands in the group buffer can be undone with @kbd{C-M-_}
24252 (@pxref{Undo}).
24253
24254 @item
24255 Scoring can be done on words using the new score type @code{w}
24256 (@pxref{Score File Format}).
24257
24258 @item
24259 Adaptive scoring can be done on a Subject word-by-word basis
24260 (@pxref{Adaptive Scoring}).
24261
24262 @lisp
24263 (setq gnus-use-adaptive-scoring '(word))
24264 @end lisp
24265
24266 @item
24267 Scores can be decayed (@pxref{Score Decays}).
24268
24269 @lisp
24270 (setq gnus-decay-scores t)
24271 @end lisp
24272
24273 @item
24274 Scoring can be performed using a regexp on the Date header.  The Date is
24275 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
24276
24277 @item
24278 A new command has been added to remove all data on articles from
24279 the native server (@pxref{Changing Servers}).
24280
24281 @item
24282 A new command for reading collections of documents
24283 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
24284 (@pxref{Really Various Summary Commands}).
24285
24286 @item
24287 Process mark sets can be pushed and popped (@pxref{Setting Process
24288 Marks}).
24289
24290 @item
24291 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
24292 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
24293
24294 @item
24295 A new back end for reading searches from Web search engines
24296 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
24297 (@pxref{Web Searches}).
24298
24299 @item
24300 Groups inside topics can now be sorted using the standard sorting
24301 functions, and each topic can be sorted independently (@pxref{Topic
24302 Sorting}).
24303
24304 @item
24305 Subsets of the groups can be sorted independently (@code{Sorting
24306 Groups}).
24307
24308 @item
24309 Cached articles can be pulled into the groups (@pxref{Summary Generation
24310 Commands}).
24311 @iftex
24312 @iflatex
24313 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
24314 @end iflatex
24315 @end iftex
24316
24317 @item
24318 Score files are now applied in a more reliable order (@pxref{Score
24319 Variables}).
24320
24321 @item
24322 Reports on where mail messages end up can be generated (@pxref{Splitting
24323 Mail}).
24324
24325 @item
24326 More hooks and functions have been added to remove junk from incoming
24327 mail before saving the mail (@pxref{Washing Mail}).
24328
24329 @item
24330 Emphasized text can be properly fontisized:
24331
24332 @end itemize
24333
24334
24335 @node Quassia Gnus
24336 @subsubsection Quassia Gnus
24337
24338 New features in Gnus 5.6:
24339
24340 @itemize @bullet
24341
24342 @item
24343 New functionality for using Gnus as an offline newsreader has been
24344 added.  A plethora of new commands and modes have been added.  See
24345 @pxref{Gnus Unplugged} for the full story.
24346
24347 @item
24348  The @code{nndraft} back end has returned, but works differently than
24349 before.  All Message buffers are now also articles in the @code{nndraft}
24350 group, which is created automatically.
24351
24352 @item
24353 @code{gnus-alter-header-function} can now be used to alter header
24354 values.
24355
24356 @item
24357  @code{gnus-summary-goto-article} now accept Message-ID's.
24358
24359 @item
24360  A new Message command for deleting text in the body of a message
24361 outside the region: @kbd{C-c C-v}.
24362
24363 @item
24364  You can now post to component group in @code{nnvirtual} groups with
24365 @kbd{C-u C-c C-c}.
24366
24367 @item
24368  @code{nntp-rlogin-program}---new variable to ease customization.
24369
24370 @item
24371  @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
24372 re-highlighting of the article buffer.
24373
24374 @item
24375  New element in @code{gnus-boring-article-headers}---@code{long-to}.
24376
24377 @item
24378  @kbd{M-i} symbolic prefix command.  See the section ``Symbolic
24379 Prefixes'' in the Gnus manual for details.
24380
24381 @item
24382  @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
24383 @kbd{a} to add the score rule to the @file{all.SCORE} file.
24384
24385 @item
24386  @code{gnus-simplify-subject-functions} variable to allow greater
24387 control over simplification.
24388
24389 @item
24390  @kbd{A T}---new command for fetching the current thread.
24391
24392 @item
24393  @kbd{/ T}---new command for including the current thread in the
24394 limit.
24395
24396 @item
24397  @kbd{M-RET} is a new Message command for breaking cited text.
24398
24399 @item
24400  @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
24401
24402 @item
24403  The @code{custom-face-lookup} function has been removed.
24404 If you used this function in your initialization files, you must
24405 rewrite them to use @code{face-spec-set} instead.
24406
24407 @item
24408  Canceling now uses the current select method.  Symbolic prefix
24409 @kbd{a} forces normal posting method.
24410
24411 @item
24412  New command to translate M******** sm*rtq**t*s into proper
24413 text---@kbd{W d}.
24414
24415 @item
24416  For easier debugging of @code{nntp}, you can set
24417 @code{nntp-record-commands} to a non-@code{nil} value.
24418
24419 @item
24420  @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
24421 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
24422
24423 @item
24424  A command for editing group parameters from the summary buffer
24425 has been added.
24426
24427 @item
24428  A history of where mails have been split is available.
24429
24430 @item
24431  A new article date command has been added---@code{article-date-iso8601}.
24432
24433 @item
24434  Subjects can be simplified when threading by setting
24435 @code{gnus-score-thread-simplify}.
24436
24437 @item
24438  A new function for citing in Message has been
24439 added---@code{message-cite-original-without-signature}.
24440
24441 @item
24442  @code{article-strip-all-blank-lines}---new article command.
24443
24444 @item
24445  A new Message command to kill to the end of the article has
24446 been added.
24447
24448 @item
24449  A minimum adaptive score can be specified by using the
24450 @code{gnus-adaptive-word-minimum} variable.
24451
24452 @item
24453  The ``lapsed date'' article header can be kept continually
24454 updated by the @code{gnus-start-date-timer} command.
24455
24456 @item
24457  Web listserv archives can be read with the @code{nnlistserv} back end.
24458
24459 @item
24460  Old dejanews archives can now be read by @code{nnweb}.
24461
24462 @end itemize
24463
24464 @node Pterodactyl Gnus
24465 @subsubsection Pterodactyl Gnus
24466
24467 New features in Gnus 5.8:
24468
24469 @itemize @bullet
24470
24471 @item
24472 The mail-fetching functions have changed.  See the manual for the
24473 many details.  In particular, all procmail fetching variables are gone.
24474
24475 If you used procmail like in
24476
24477 @lisp
24478 (setq nnmail-use-procmail t)
24479 (setq nnmail-spool-file 'procmail)
24480 (setq nnmail-procmail-directory "~/mail/incoming/")
24481 (setq nnmail-procmail-suffix "\\.in")
24482 @end lisp
24483
24484 this now has changed to
24485
24486 @lisp
24487 (setq mail-sources
24488       '((directory :path "~/mail/incoming/"
24489                    :suffix ".in")))
24490 @end lisp
24491
24492 More information is available in the info doc at Select Methods ->
24493 Getting Mail -> Mail Sources
24494
24495 @item
24496 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
24497 Gnus, and adds a slew of new commands.  See the manual for details.
24498
24499 @item
24500 Gnus has also been multilingualized.  This also affects too
24501 many parts of Gnus to summarize here, and adds many new variables.
24502
24503 @item
24504 @code{gnus-auto-select-first} can now be a function to be
24505 called to position point.
24506
24507 @item
24508 The user can now decide which extra headers should be included in
24509 summary buffers and @acronym{NOV} files.
24510
24511 @item
24512 @code{gnus-article-display-hook} has been removed.  Instead, a number
24513 of variables starting with @code{gnus-treat-} have been added.
24514
24515 @item
24516 The Gnus posting styles have been redone again and now works in a
24517 subtly different manner.
24518
24519 @item
24520 New web-based back ends have been added: @code{nnslashdot},
24521 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
24522 again, to keep up with ever-changing layouts.
24523
24524 @item
24525 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
24526
24527 @end itemize
24528
24529 @iftex
24530
24531 @page
24532 @node The Manual
24533 @section The Manual
24534 @cindex colophon
24535 @cindex manual
24536
24537 This manual was generated from a TeXinfo file and then run through
24538 either @code{texi2dvi}
24539 @iflatex
24540 or my own home-brewed TeXinfo to \LaTeX\ transformer,
24541 and then run through @code{latex} and @code{dvips}
24542 @end iflatex
24543 to get what you hold in your hands now.
24544
24545 The following conventions have been used:
24546
24547 @enumerate
24548
24549 @item
24550 This is a @samp{string}
24551
24552 @item
24553 This is a @kbd{keystroke}
24554
24555 @item
24556 This is a @file{file}
24557
24558 @item
24559 This is a @code{symbol}
24560
24561 @end enumerate
24562
24563 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
24564 mean:
24565
24566 @lisp
24567 (setq flargnoze "yes")
24568 @end lisp
24569
24570 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
24571
24572 @lisp
24573 (setq flumphel 'yes)
24574 @end lisp
24575
24576 @samp{yes} and @code{yes} are two @emph{very} different things---don't
24577 ever get them confused.
24578
24579 @iflatex
24580 @c @head
24581 Of course, everything in this manual is of vital interest, so you should
24582 read it all.  Several times.  However, if you feel like skimming the
24583 manual, look for that gnu head you should see in the margin over
24584 there---it means that what's being discussed is of more importance than
24585 the rest of the stuff.  (On the other hand, if everything is infinitely
24586 important, how can anything be more important than that?  Just one more
24587 of the mysteries of this world, I guess.)
24588 @end iflatex
24589
24590 @end iftex
24591
24592
24593 @node On Writing Manuals
24594 @section On Writing Manuals
24595
24596 I guess most manuals are written after-the-fact; documenting a program
24597 that's already there.  This is not how this manual is written.  When
24598 implementing something, I write the manual entry for that something
24599 straight away.  I then see that it's difficult to explain the
24600 functionality, so I write how it's supposed to be, and then I change the
24601 implementation.  Writing the documentation and writing the code goes
24602 hand in hand.
24603
24604 This, of course, means that this manual has no, or little, flow.  It
24605 documents absolutely everything in Gnus, but often not where you're
24606 looking for it.  It is a reference manual, and not a guide to how to get
24607 started with Gnus.
24608
24609 That would be a totally different book, that should be written using the
24610 reference manual as source material.  It would look quite differently.
24611
24612
24613 @page
24614 @node Terminology
24615 @section Terminology
24616
24617 @cindex terminology
24618 @table @dfn
24619
24620 @item news
24621 @cindex news
24622 This is what you are supposed to use this thing for---reading news.
24623 News is generally fetched from a nearby @acronym{NNTP} server, and is
24624 generally publicly available to everybody.  If you post news, the entire
24625 world is likely to read just what you have written, and they'll all
24626 snigger mischievously.  Behind your back.
24627
24628 @item mail
24629 @cindex mail
24630 Everything that's delivered to you personally is mail.  Some news/mail
24631 readers (like Gnus) blur the distinction between mail and news, but
24632 there is a difference.  Mail is private.  News is public.  Mailing is
24633 not posting, and replying is not following up.
24634
24635 @item reply
24636 @cindex reply
24637 Send a mail to the person who has written what you are reading.
24638
24639 @item follow up
24640 @cindex follow up
24641 Post an article to the current newsgroup responding to the article you
24642 are reading.
24643
24644 @item back end
24645 @cindex back end
24646 Gnus considers mail and news to be mostly the same, really.  The only
24647 difference is how to access the actual articles.  News articles are
24648 commonly fetched via the protocol @acronym{NNTP}, whereas mail
24649 messages could be read from a file on the local disk.  The internal
24650 architecture of Gnus thus comprises a `front end' and a number of
24651 `back ends'.  Internally, when you enter a group (by hitting
24652 @key{RET}, say), you thereby invoke a function in the front end in
24653 Gnus.  The front end then `talks' to a back end and says things like
24654 ``Give me the list of articles in the foo group'' or ``Show me article
24655 number 4711''.
24656
24657 So a back end mainly defines either a protocol (the @code{nntp} back
24658 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
24659 accesses mail via @acronym{IMAP}) or a file format and directory
24660 layout (the @code{nnspool} back end accesses news via the common
24661 `spool directory' format, the @code{nnml} back end access mail via a
24662 file format and directory layout that's quite similar).
24663
24664 Gnus does not handle the underlying media, so to speak---this is all
24665 done by the back ends.  A back end is a collection of functions to
24666 access the articles.
24667
24668 However, sometimes the term `back end' is also used where `server'
24669 would have been more appropriate.  And then there is the term `select
24670 method' which can mean either.  The Gnus terminology can be quite
24671 confusing.
24672
24673 @item native
24674 @cindex native
24675 Gnus will always use one method (and back end) as the @dfn{native}, or
24676 default, way of getting news.
24677
24678 @item foreign
24679 @cindex foreign
24680 You can also have any number of foreign groups active at the same time.
24681 These are groups that use non-native non-secondary back ends for getting
24682 news.
24683
24684 @item secondary
24685 @cindex secondary
24686 Secondary back ends are somewhere half-way between being native and being
24687 foreign, but they mostly act like they are native.
24688
24689 @item article
24690 @cindex article
24691 A message that has been posted as news.
24692
24693 @item mail message
24694 @cindex mail message
24695 A message that has been mailed.
24696
24697 @item message
24698 @cindex message
24699 A mail message or news article
24700
24701 @item head
24702 @cindex head
24703 The top part of a message, where administrative information (etc.) is
24704 put.
24705
24706 @item body
24707 @cindex body
24708 The rest of an article.  Everything not in the head is in the
24709 body.
24710
24711 @item header
24712 @cindex header
24713 A line from the head of an article.
24714
24715 @item headers
24716 @cindex headers
24717 A collection of such lines, or a collection of heads.  Or even a
24718 collection of @acronym{NOV} lines.
24719
24720 @item @acronym{NOV}
24721 @cindex nov
24722 When Gnus enters a group, it asks the back end for the headers of all
24723 unread articles in the group.  Most servers support the News OverView
24724 format, which is more compact and much faster to read and parse than the
24725 normal @sc{head} format.
24726
24727 @item level
24728 @cindex levels
24729 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
24730 that have a lower level are ``more'' subscribed than the groups with a
24731 higher level.  In fact, groups on levels 1-5 are considered
24732 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
24733 are @dfn{killed}.  Commands for listing groups and scanning for new
24734 articles will all use the numeric prefix as @dfn{working level}.
24735
24736 @item killed groups
24737 @cindex killed groups
24738 No information on killed groups is stored or updated, which makes killed
24739 groups much easier to handle than subscribed groups.
24740
24741 @item zombie groups
24742 @cindex zombie groups
24743 Just like killed groups, only slightly less dead.
24744
24745 @item active file
24746 @cindex active file
24747 The news server has to keep track of what articles it carries, and what
24748 groups exist.  All this information in stored in the active file, which
24749 is rather large, as you might surmise.
24750
24751 @item bogus groups
24752 @cindex bogus groups
24753 A group that exists in the @file{.newsrc} file, but isn't known to the
24754 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
24755 This means that the group probably doesn't exist (any more).
24756
24757 @item activating
24758 @cindex activating groups
24759 The act of asking the server for info on a group and computing the
24760 number of unread articles is called @dfn{activating the group}.
24761 Un-activated groups are listed with @samp{*} in the group buffer.
24762
24763 @item server
24764 @cindex server
24765 A machine one can connect to and get news (or mail) from.
24766
24767 @item select method
24768 @cindex select method
24769 A structure that specifies the back end, the server and the virtual
24770 server settings.
24771
24772 @item virtual server
24773 @cindex virtual server
24774 A named select method.  Since a select method defines all there is to
24775 know about connecting to a (physical) server, taking the thing as a
24776 whole is a virtual server.
24777
24778 @item washing
24779 @cindex washing
24780 Taking a buffer and running it through a filter of some sort.  The
24781 result will (more often than not) be cleaner and more pleasing than the
24782 original.
24783
24784 @item ephemeral groups
24785 @cindex ephemeral groups
24786 @cindex temporary groups
24787 Most groups store data on what articles you have read.  @dfn{Ephemeral}
24788 groups are groups that will have no data stored---when you exit the
24789 group, it'll disappear into the aether.
24790
24791 @item solid groups
24792 @cindex solid groups
24793 This is the opposite of ephemeral groups.  All groups listed in the
24794 group buffer are solid groups.
24795
24796 @item sparse articles
24797 @cindex sparse articles
24798 These are article placeholders shown in the summary buffer when
24799 @code{gnus-build-sparse-threads} has been switched on.
24800
24801 @item threading
24802 @cindex threading
24803 To put responses to articles directly after the articles they respond
24804 to---in a hierarchical fashion.
24805
24806 @item root
24807 @cindex root
24808 @cindex thread root
24809 The first article in a thread is the root.  It is the ancestor of all
24810 articles in the thread.
24811
24812 @item parent
24813 @cindex parent
24814 An article that has responses.
24815
24816 @item child
24817 @cindex child
24818 An article that responds to a different article---its parent.
24819
24820 @item digest
24821 @cindex digest
24822 A collection of messages in one file.  The most common digest format is
24823 specified by RFC 1153.
24824
24825 @end table
24826
24827
24828 @page
24829 @node Customization
24830 @section Customization
24831 @cindex general customization
24832
24833 All variables are properly documented elsewhere in this manual.  This
24834 section is designed to give general pointers on how to customize Gnus
24835 for some quite common situations.
24836
24837 @menu
24838 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
24839 * Slow Terminal Connection::    You run a remote Emacs.
24840 * Little Disk Space::           You feel that having large setup files is icky.
24841 * Slow Machine::                You feel like buying a faster machine.
24842 @end menu
24843
24844
24845 @node Slow/Expensive Connection
24846 @subsection Slow/Expensive NNTP Connection
24847
24848 If you run Emacs on a machine locally, and get your news from a machine
24849 over some very thin strings, you want to cut down on the amount of data
24850 Gnus has to get from the @acronym{NNTP} server.
24851
24852 @table @code
24853
24854 @item gnus-read-active-file
24855 Set this to @code{nil}, which will inhibit Gnus from requesting the
24856 entire active file from the server.  This file is often v.  large.  You
24857 also have to set @code{gnus-check-new-newsgroups} and
24858 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
24859 doesn't suddenly decide to fetch the active file anyway.
24860
24861 @item gnus-nov-is-evil
24862 This one has to be @code{nil}.  If not, grabbing article headers from
24863 the @acronym{NNTP} server will not be very fast.  Not all @acronym{NNTP} servers
24864 support @sc{xover}; Gnus will detect this by itself.
24865 @end table
24866
24867
24868 @node Slow Terminal Connection
24869 @subsection Slow Terminal Connection
24870
24871 Let's say you use your home computer for dialing up the system that runs
24872 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
24873 possible) the amount of data sent over the wires.
24874
24875 @table @code
24876
24877 @item gnus-auto-center-summary
24878 Set this to @code{nil} to inhibit Gnus from re-centering the summary
24879 buffer all the time.  If it is @code{vertical}, do only vertical
24880 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
24881 horizontal and vertical recentering.
24882
24883 @item gnus-visible-headers
24884 Cut down on the headers included in the articles to the
24885 minimum.  You can, in fact, make do without them altogether---most of the
24886 useful data is in the summary buffer, anyway.  Set this variable to
24887 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
24888
24889 Set this hook to all the available hiding commands:
24890 @lisp
24891 (setq gnus-treat-hide-headers 'head
24892       gnus-treat-hide-signature t
24893       gnus-treat-hide-citation t)
24894 @end lisp
24895
24896 @item gnus-use-full-window
24897 By setting this to @code{nil}, you can make all the windows smaller.
24898 While this doesn't really cut down much generally, it means that you
24899 have to see smaller portions of articles before deciding that you didn't
24900 want to read them anyway.
24901
24902 @item gnus-thread-hide-subtree
24903 If this is non-@code{nil}, all threads in the summary buffer will be
24904 hidden initially.
24905
24906
24907 @item gnus-updated-mode-lines
24908 If this is @code{nil}, Gnus will not put information in the buffer mode
24909 lines, which might save some time.
24910 @end table
24911
24912
24913 @node Little Disk Space
24914 @subsection Little Disk Space
24915 @cindex disk space
24916
24917 The startup files can get rather large, so you may want to cut their
24918 sizes a bit if you are running out of space.
24919
24920 @table @code
24921
24922 @item gnus-save-newsrc-file
24923 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
24924 only save @file{.newsrc.eld}.  This means that you will not be able to
24925 use any other newsreaders than Gnus.  This variable is @code{t} by
24926 default.
24927
24928 @item gnus-read-newsrc-file
24929 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
24930 only read @file{.newsrc.eld}.  This means that you will not be able to
24931 use any other newsreaders than Gnus.  This variable is @code{t} by
24932 default.
24933
24934 @item gnus-save-killed-list
24935 If this is @code{nil}, Gnus will not save the list of dead groups.  You
24936 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
24937 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
24938 variable to @code{nil}.  This variable is @code{t} by default.
24939
24940 @end table
24941
24942
24943 @node Slow Machine
24944 @subsection Slow Machine
24945 @cindex slow machine
24946
24947 If you have a slow machine, or are just really impatient, there are a
24948 few things you can do to make Gnus run faster.
24949
24950 Set @code{gnus-check-new-newsgroups} and
24951 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
24952
24953 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
24954 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
24955 summary buffer faster.
24956
24957
24958 @page
24959 @node Troubleshooting
24960 @section Troubleshooting
24961 @cindex troubleshooting
24962
24963 Gnus works @emph{so} well straight out of the box---I can't imagine any
24964 problems, really.
24965
24966 Ahem.
24967
24968 @enumerate
24969
24970 @item
24971 Make sure your computer is switched on.
24972
24973 @item
24974 Make sure that you really load the current Gnus version.  If you have
24975 been running @sc{gnus}, you need to exit Emacs and start it up again before
24976 Gnus will work.
24977
24978 @item
24979 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
24980 like @samp{Gnus v5.46; nntp 4.0} you have the right files loaded.  If,
24981 on the other hand, you get something like @samp{NNTP 3.x} or @samp{nntp
24982 flee}, you have some old @file{.el} files lying around.  Delete these.
24983
24984 @item
24985 Read the help group (@kbd{G h} in the group buffer) for a
24986 @acronym{FAQ} and a how-to.
24987
24988 @item
24989 @vindex max-lisp-eval-depth
24990 Gnus works on many recursive structures, and in some extreme (and very
24991 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
24992 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
24993 something like that.
24994 @end enumerate
24995
24996 If all else fails, report the problem as a bug.
24997
24998 @cindex bugs
24999 @cindex reporting bugs
25000
25001 @kindex M-x gnus-bug
25002 @findex gnus-bug
25003 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
25004 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
25005 me the backtrace.  I will fix bugs, but I can only fix them if you send
25006 me a precise description as to how to reproduce the bug.
25007
25008 You really can never be too detailed in a bug report.  Always use the
25009 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
25010 a 10Kb mail each time you use it, and even if you have sent me your
25011 environment 500 times before.  I don't care.  I want the full info each
25012 time.
25013
25014 It is also important to remember that I have no memory whatsoever.  If
25015 you send a bug report, and I send you a reply, and then you just send
25016 back ``No, it's not! Moron!'', I will have no idea what you are
25017 insulting me about.  Always over-explain everything.  It's much easier
25018 for all of us---if I don't have all the information I need, I will just
25019 mail you and ask for more info, and everything takes more time.
25020
25021 If the problem you're seeing is very visual, and you can't quite explain
25022 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
25023 it somewhere it can be reached, and include the URL of the picture in
25024 the bug report.
25025
25026 @cindex patches
25027 If you would like to contribute a patch to fix bugs or make
25028 improvements, please produce the patch using @samp{diff -u}.
25029
25030 @cindex edebug
25031 If you want to debug your problem further before reporting, possibly
25032 in order to solve the problem yourself and send a patch, you can use
25033 edebug.  Debugging lisp code is documented in the Elisp manual
25034 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
25035 Lisp Reference Manual}).  To get you started with edebug, consider if
25036 you discover some weird behaviour when pressing @kbd{c}, the first
25037 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
25038 the documentation buffer that leads you to the function definition,
25039 then press @kbd{M-x edebug-defun RET} with point inside that function,
25040 return to Gnus and press @kbd{c} to invoke the code.  You will be
25041 placed in the lisp buffer and can single step using @kbd{SPC} and
25042 evaluate expressions using @kbd{M-:} or inspect variables using
25043 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
25044 @kbd{c} or @kbd{g}.
25045
25046 @cindex elp
25047 @cindex profile
25048 @cindex slow
25049 Sometimes, a problem do not directly generate a elisp error but
25050 manifests itself by causing Gnus to be very slow.  In these cases, you
25051 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
25052 slow, and then try to analyze the backtrace (repeating the procedure
25053 helps isolating the real problem areas).  A fancier approach is to use
25054 the elisp profiler, ELP.  The profiler is (or should be) fully
25055 documented elsewhere, but to get you started there are a few steps
25056 that need to be followed.  First, instrument the part of Gnus you are
25057 interested in for profiling, e.g. @kbd{M-x elp-instrument-package RET
25058 gnus} or @kbd{M-x elp-instrument-package RET message}.  Then perform
25059 the operation that is slow and press @kbd{M-x elp-results}.  You will
25060 then see which operations that takes time, and can debug them further.
25061 If the entire operation takes much longer than the time spent in the
25062 slowest function in the profiler output, you probably profiled the
25063 wrong part of Gnus.  To reset profiling statistics, use @kbd{M-x
25064 elp-reset-all}.  @kbd{M-x elp-restore-all} is supposed to remove
25065 profiling, but given the complexities and dynamic code generation in
25066 Gnus, it might not always work perfectly.
25067
25068 If you just need help, you are better off asking on
25069 @samp{gnu.emacs.gnus}.  I'm not very helpful.
25070
25071 @cindex gnu.emacs.gnus
25072 @cindex ding mailing list
25073 You can also ask on the ding mailing list---@email{ding@@gnus.org}.
25074 Write to @email{ding-request@@gnus.org} to subscribe.
25075
25076
25077 @page
25078 @node Gnus Reference Guide
25079 @section Gnus Reference Guide
25080
25081 It is my hope that other people will figure out smart stuff that Gnus
25082 can do, and that other people will write those smart things as well.  To
25083 facilitate that I thought it would be a good idea to describe the inner
25084 workings of Gnus.  And some of the not-so-inner workings, while I'm at
25085 it.
25086
25087 You can never expect the internals of a program not to change, but I
25088 will be defining (in some details) the interface between Gnus and its
25089 back ends (this is written in stone), the format of the score files
25090 (ditto), data structures (some are less likely to change than others)
25091 and general methods of operation.
25092
25093 @menu
25094 * Gnus Utility Functions::      Common functions and variable to use.
25095 * Back End Interface::          How Gnus communicates with the servers.
25096 * Score File Syntax::           A BNF definition of the score file standard.
25097 * Headers::                     How Gnus stores headers internally.
25098 * Ranges::                      A handy format for storing mucho numbers.
25099 * Group Info::                  The group info format.
25100 * Extended Interactive::        Symbolic prefixes and stuff.
25101 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
25102 * Various File Formats::        Formats of files that Gnus use.
25103 @end menu
25104
25105
25106 @node Gnus Utility Functions
25107 @subsection Gnus Utility Functions
25108 @cindex Gnus utility functions
25109 @cindex utility functions
25110 @cindex functions
25111 @cindex internal variables
25112
25113 When writing small functions to be run from hooks (and stuff), it's
25114 vital to have access to the Gnus internal functions and variables.
25115 Below is a list of the most common ones.
25116
25117 @table @code
25118
25119 @item gnus-newsgroup-name
25120 @vindex gnus-newsgroup-name
25121 This variable holds the name of the current newsgroup.
25122
25123 @item gnus-find-method-for-group
25124 @findex gnus-find-method-for-group
25125 A function that returns the select method for @var{group}.
25126
25127 @item gnus-group-real-name
25128 @findex gnus-group-real-name
25129 Takes a full (prefixed) Gnus group name, and returns the unprefixed
25130 name.
25131
25132 @item gnus-group-prefixed-name
25133 @findex gnus-group-prefixed-name
25134 Takes an unprefixed group name and a select method, and returns the full
25135 (prefixed) Gnus group name.
25136
25137 @item gnus-get-info
25138 @findex gnus-get-info
25139 Returns the group info list for @var{group}.
25140
25141 @item gnus-group-unread
25142 @findex gnus-group-unread
25143 The number of unread articles in @var{group}, or @code{t} if that is
25144 unknown.
25145
25146 @item gnus-active
25147 @findex gnus-active
25148 The active entry for @var{group}.
25149
25150 @item gnus-set-active
25151 @findex gnus-set-active
25152 Set the active entry for @var{group}.
25153
25154 @item gnus-add-current-to-buffer-list
25155 @findex gnus-add-current-to-buffer-list
25156 Adds the current buffer to the list of buffers to be killed on Gnus
25157 exit.
25158
25159 @item gnus-continuum-version
25160 @findex gnus-continuum-version
25161 Takes a Gnus version string as a parameter and returns a floating point
25162 number.  Earlier versions will always get a lower number than later
25163 versions.
25164
25165 @item gnus-group-read-only-p
25166 @findex gnus-group-read-only-p
25167 Says whether @var{group} is read-only or not.
25168
25169 @item gnus-news-group-p
25170 @findex gnus-news-group-p
25171 Says whether @var{group} came from a news back end.
25172
25173 @item gnus-ephemeral-group-p
25174 @findex gnus-ephemeral-group-p
25175 Says whether @var{group} is ephemeral or not.
25176
25177 @item gnus-server-to-method
25178 @findex gnus-server-to-method
25179 Returns the select method corresponding to @var{server}.
25180
25181 @item gnus-server-equal
25182 @findex gnus-server-equal
25183 Says whether two virtual servers are equal.
25184
25185 @item gnus-group-native-p
25186 @findex gnus-group-native-p
25187 Says whether @var{group} is native or not.
25188
25189 @item gnus-group-secondary-p
25190 @findex gnus-group-secondary-p
25191 Says whether @var{group} is secondary or not.
25192
25193 @item gnus-group-foreign-p
25194 @findex gnus-group-foreign-p
25195 Says whether @var{group} is foreign or not.
25196
25197 @item group-group-find-parameter
25198 @findex group-group-find-parameter
25199 Returns the parameter list of @var{group}.  If given a second parameter,
25200 returns the value of that parameter for @var{group}.
25201
25202 @item gnus-group-set-parameter
25203 @findex gnus-group-set-parameter
25204 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
25205
25206 @item gnus-narrow-to-body
25207 @findex gnus-narrow-to-body
25208 Narrows the current buffer to the body of the article.
25209
25210 @item gnus-check-backend-function
25211 @findex gnus-check-backend-function
25212 Takes two parameters, @var{function} and @var{group}.  If the back end
25213 @var{group} comes from supports @var{function}, return non-@code{nil}.
25214
25215 @lisp
25216 (gnus-check-backend-function "request-scan" "nnml:misc")
25217 @result{} t
25218 @end lisp
25219
25220 @item gnus-read-method
25221 @findex gnus-read-method
25222 Prompts the user for a select method.
25223
25224 @end table
25225
25226
25227 @node Back End Interface
25228 @subsection Back End Interface
25229
25230 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
25231 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
25232 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
25233 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
25234 examples of the latter we have @code{nntp-port-number} and
25235 @code{nnmbox-directory}.
25236
25237 When Gnus asks for information from a back end---say @code{nntp}---on
25238 something, it will normally include a virtual server name in the
25239 function parameters.  (If not, the back end should use the ``current''
25240 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
25241 server as its only (optional) parameter.  If this virtual server hasn't
25242 been opened, the function should fail.
25243
25244 Note that a virtual server name has no relation to some physical server
25245 name.  Take this example:
25246
25247 @lisp
25248 (nntp "odd-one"
25249       (nntp-address "ifi.uio.no")
25250       (nntp-port-number 4324))
25251 @end lisp
25252
25253 Here the virtual server name is @samp{odd-one} while the name of
25254 the physical server is @samp{ifi.uio.no}.
25255
25256 The back ends should be able to switch between several virtual servers.
25257 The standard back ends implement this by keeping an alist of virtual
25258 server environments that they pull down/push up when needed.
25259
25260 There are two groups of interface functions: @dfn{required functions},
25261 which must be present, and @dfn{optional functions}, which Gnus will
25262 always check for presence before attempting to call 'em.
25263
25264 All these functions are expected to return data in the buffer
25265 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
25266 unfortunately named, but we'll have to live with it.  When I talk about
25267 @dfn{resulting data}, I always refer to the data in that buffer.  When I
25268 talk about @dfn{return value}, I talk about the function value returned by
25269 the function call.  Functions that fail should return @code{nil} as the
25270 return value.
25271
25272 Some back ends could be said to be @dfn{server-forming} back ends, and
25273 some might be said not to be.  The latter are back ends that generally
25274 only operate on one group at a time, and have no concept of ``server''
25275 ---they have a group, and they deliver info on that group and nothing
25276 more.
25277
25278 Gnus identifies each message by way of group name and article number.  A
25279 few remarks about these article numbers might be useful.  First of all,
25280 the numbers are positive integers.  Secondly, it is normally not
25281 possible for later articles to `re-use' older article numbers without
25282 confusing Gnus.  That is, if a group has ever contained a message
25283 numbered 42, then no other message may get that number, or Gnus will get
25284 mightily confused.@footnote{See the function
25285 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
25286 Third, article numbers must be assigned in order of arrival in the
25287 group; this is not necessarily the same as the date of the message.
25288
25289 The previous paragraph already mentions all the `hard' restrictions that
25290 article numbers must fulfill.  But it seems that it might be useful to
25291 assign @emph{consecutive} article numbers, for Gnus gets quite confused
25292 if there are holes in the article numbering sequence.  However, due to
25293 the `no-reuse' restriction, holes cannot be avoided altogether.  It's
25294 also useful for the article numbers to start at 1 to avoid running out
25295 of numbers as long as possible.
25296
25297 Note that by convention, backends are named @code{nnsomething}, but
25298 Gnus also comes with some @code{nnnotbackends}, such as
25299 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
25300
25301 In the examples and definitions I will refer to the imaginary back end
25302 @code{nnchoke}.
25303
25304 @cindex @code{nnchoke}
25305
25306 @menu
25307 * Required Back End Functions::  Functions that must be implemented.
25308 * Optional Back End Functions::  Functions that need not be implemented.
25309 * Error Messaging::             How to get messages and report errors.
25310 * Writing New Back Ends::       Extending old back ends.
25311 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
25312 * Mail-like Back Ends::         Some tips on mail back ends.
25313 @end menu
25314
25315
25316 @node Required Back End Functions
25317 @subsubsection Required Back End Functions
25318
25319 @table @code
25320
25321 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
25322
25323 @var{articles} is either a range of article numbers or a list of
25324 @code{Message-ID}s.  Current back ends do not fully support either---only
25325 sequences (lists) of article numbers, and most back ends do not support
25326 retrieval of @code{Message-ID}s.  But they should try for both.
25327
25328 The result data should either be HEADs or @acronym{NOV} lines, and the result
25329 value should either be @code{headers} or @code{nov} to reflect this.
25330 This might later be expanded to @code{various}, which will be a mixture
25331 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
25332
25333 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
25334 headers'', in some meaning of the word.  This is generally done by
25335 fetching (at most) @var{fetch-old} extra headers less than the smallest
25336 article number in @code{articles}, and filling the gaps as well.  The
25337 presence of this parameter can be ignored if the back end finds it
25338 cumbersome to follow the request.  If this is non-@code{nil} and not a
25339 number, do maximum fetches.
25340
25341 Here's an example HEAD:
25342
25343 @example
25344 221 1056 Article retrieved.
25345 Path: ifi.uio.no!sturles
25346 From: sturles@@ifi.uio.no (Sturle Sunde)
25347 Newsgroups: ifi.discussion
25348 Subject: Re: Something very droll
25349 Date: 27 Oct 1994 14:02:57 +0100
25350 Organization: Dept. of Informatics, University of Oslo, Norway
25351 Lines: 26
25352 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
25353 References: <38jdmq$4qu@@visbur.ifi.uio.no>
25354 NNTP-Posting-Host: holmenkollen.ifi.uio.no
25355 .
25356 @end example
25357
25358 So a @code{headers} return value would imply that there's a number of
25359 these in the data buffer.
25360
25361 Here's a BNF definition of such a buffer:
25362
25363 @example
25364 headers        = *head
25365 head           = error / valid-head
25366 error-message  = [ "4" / "5" ] 2number " " <error message> eol
25367 valid-head     = valid-message *header "." eol
25368 valid-message  = "221 " <number> " Article retrieved." eol
25369 header         = <text> eol
25370 @end example
25371
25372 @cindex BNF
25373 (The version of BNF used here is the one used in RFC822.)
25374
25375 If the return value is @code{nov}, the data buffer should contain
25376 @dfn{network overview database} lines.  These are basically fields
25377 separated by tabs.
25378
25379 @example
25380 nov-buffer = *nov-line
25381 nov-line   = field 7*8[ <TAB> field ] eol
25382 field      = <text except TAB>
25383 @end example
25384
25385 For a closer look at what should be in those fields,
25386 @pxref{Headers}.
25387
25388
25389 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
25390
25391 @var{server} is here the virtual server name.  @var{definitions} is a
25392 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
25393
25394 If the server can't be opened, no error should be signaled.  The back end
25395 may then choose to refuse further attempts at connecting to this
25396 server.  In fact, it should do so.
25397
25398 If the server is opened already, this function should return a
25399 non-@code{nil} value.  There should be no data returned.
25400
25401
25402 @item (nnchoke-close-server &optional SERVER)
25403
25404 Close connection to @var{server} and free all resources connected
25405 to it.  Return @code{nil} if the server couldn't be closed for some
25406 reason.
25407
25408 There should be no data returned.
25409
25410
25411 @item (nnchoke-request-close)
25412
25413 Close connection to all servers and free all resources that the back end
25414 have reserved.  All buffers that have been created by that back end
25415 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
25416 function is generally only called when Gnus is shutting down.
25417
25418 There should be no data returned.
25419
25420
25421 @item (nnchoke-server-opened &optional SERVER)
25422
25423 If @var{server} is the current virtual server, and the connection to the
25424 physical server is alive, then this function should return a
25425 non-@code{nil} vlue.  This function should under no circumstances
25426 attempt to reconnect to a server we have lost connection to.
25427
25428 There should be no data returned.
25429
25430
25431 @item (nnchoke-status-message &optional SERVER)
25432
25433 This function should return the last error message from @var{server}.
25434
25435 There should be no data returned.
25436
25437
25438 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
25439
25440 The result data from this function should be the article specified by
25441 @var{article}.  This might either be a @code{Message-ID} or a number.
25442 It is optional whether to implement retrieval by @code{Message-ID}, but
25443 it would be nice if that were possible.
25444
25445 If @var{to-buffer} is non-@code{nil}, the result data should be returned
25446 in this buffer instead of the normal data buffer.  This is to make it
25447 possible to avoid copying large amounts of data from one buffer to
25448 another, while Gnus mainly requests articles to be inserted directly
25449 into its article buffer.
25450
25451 If it is at all possible, this function should return a cons cell where
25452 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
25453 the article number.  This will enable Gnus to find out what the real
25454 group and article numbers are when fetching articles by
25455 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
25456 on successful article retrieval.
25457
25458
25459 @item (nnchoke-request-group GROUP &optional SERVER FAST)
25460
25461 Get data on @var{group}.  This function also has the side effect of
25462 making @var{group} the current group.
25463
25464 If @var{fast}, don't bother to return useful data, just make @var{group}
25465 the current group.
25466
25467 Here's an example of some result data and a definition of the same:
25468
25469 @example
25470 211 56 1000 1059 ifi.discussion
25471 @end example
25472
25473 The first number is the status, which should be 211.  Next is the
25474 total number of articles in the group, the lowest article number, the
25475 highest article number, and finally the group name.  Note that the total
25476 number of articles may be less than one might think while just
25477 considering the highest and lowest article numbers, but some articles
25478 may have been canceled.  Gnus just discards the total-number, so
25479 whether one should take the bother to generate it properly (if that is a
25480 problem) is left as an exercise to the reader.  If the group contains no
25481 articles, the lowest article number should be reported as 1 and the
25482 highest as 0.
25483
25484 @example
25485 group-status = [ error / info ] eol
25486 error        = [ "4" / "5" ] 2<number> " " <Error message>
25487 info         = "211 " 3* [ <number> " " ] <string>
25488 @end example
25489
25490
25491 @item (nnchoke-close-group GROUP &optional SERVER)
25492
25493 Close @var{group} and free any resources connected to it.  This will be
25494 a no-op on most back ends.
25495
25496 There should be no data returned.
25497
25498
25499 @item (nnchoke-request-list &optional SERVER)
25500
25501 Return a list of all groups available on @var{server}.  And that means
25502 @emph{all}.
25503
25504 Here's an example from a server that only carries two groups:
25505
25506 @example
25507 ifi.test 0000002200 0000002000 y
25508 ifi.discussion 3324 3300 n
25509 @end example
25510
25511 On each line we have a group name, then the highest article number in
25512 that group, the lowest article number, and finally a flag.  If the group
25513 contains no articles, the lowest article number should be reported as 1
25514 and the highest as 0.
25515
25516 @example
25517 active-file = *active-line
25518 active-line = name " " <number> " " <number> " " flags eol
25519 name        = <string>
25520 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
25521 @end example
25522
25523 The flag says whether the group is read-only (@samp{n}), is moderated
25524 (@samp{m}), is dead (@samp{x}), is aliased to some other group
25525 (@samp{=other-group}) or none of the above (@samp{y}).
25526
25527
25528 @item (nnchoke-request-post &optional SERVER)
25529
25530 This function should post the current buffer.  It might return whether
25531 the posting was successful or not, but that's not required.  If, for
25532 instance, the posting is done asynchronously, it has generally not been
25533 completed by the time this function concludes.  In that case, this
25534 function should set up some kind of sentinel to beep the user loud and
25535 clear if the posting could not be completed.
25536
25537 There should be no result data from this function.
25538
25539 @end table
25540
25541
25542 @node Optional Back End Functions
25543 @subsubsection Optional Back End Functions
25544
25545 @table @code
25546
25547 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
25548
25549 @var{groups} is a list of groups, and this function should request data
25550 on all those groups.  How it does it is of no concern to Gnus, but it
25551 should attempt to do this in a speedy fashion.
25552
25553 The return value of this function can be either @code{active} or
25554 @code{group}, which says what the format of the result data is.  The
25555 former is in the same format as the data from
25556 @code{nnchoke-request-list}, while the latter is a buffer full of lines
25557 in the same format as @code{nnchoke-request-group} gives.
25558
25559 @example
25560 group-buffer = *active-line / *group-status
25561 @end example
25562
25563
25564 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
25565
25566 A Gnus group info (@pxref{Group Info}) is handed to the back end for
25567 alterations.  This comes in handy if the back end really carries all
25568 the information (as is the case with virtual and imap groups).  This
25569 function should destructively alter the info to suit its needs, and
25570 should return a non-@code{nil} value.
25571
25572 There should be no result data from this function.
25573
25574
25575 @item (nnchoke-request-type GROUP &optional ARTICLE)
25576
25577 When the user issues commands for ``sending news'' (@kbd{F} in the
25578 summary buffer, for instance), Gnus has to know whether the article the
25579 user is following up on is news or mail.  This function should return
25580 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
25581 is mail and @code{unknown} if the type can't be decided.  (The
25582 @var{article} parameter is necessary in @code{nnvirtual} groups which
25583 might very well combine mail groups and news groups.)  Both @var{group}
25584 and @var{article} may be @code{nil}.
25585
25586 There should be no result data from this function.
25587
25588
25589 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
25590
25591 Set/remove/add marks on articles.  Normally Gnus handles the article
25592 marks (such as read, ticked, expired etc) internally, and store them in
25593 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
25594 all information about the articles on the server, so Gnus need to
25595 propagate the mark information to the server.
25596
25597 @var{action} is a list of mark setting requests, having this format:
25598
25599 @example
25600 (RANGE ACTION MARK)
25601 @end example
25602
25603 @var{range} is a range of articles you wish to update marks on.
25604 @var{action} is @code{add} or @code{del}, used to add marks or remove
25605 marks (preserving all marks not mentioned).  @var{mark} is a list of
25606 marks; where each mark is a symbol.  Currently used marks are
25607 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
25608 @code{dormant}, @code{save}, @code{download}, @code{unsend},
25609 @code{forward} and @code{recent}, but your back end should, if
25610 possible, not limit itself to these.
25611
25612 Given contradictory actions, the last action in the list should be the
25613 effective one.  That is, if your action contains a request to add the
25614 @code{tick} mark on article 1 and, later in the list, a request to
25615 remove the mark on the same article, the mark should in fact be removed.
25616
25617 An example action list:
25618
25619 @example
25620 (((5 12 30) 'del '(tick))
25621  ((10 . 90) 'add '(read expire))
25622  ((92 94) 'del '(read)))
25623 @end example
25624
25625 The function should return a range of articles it wasn't able to set the
25626 mark on (currently not used for anything).
25627
25628 There should be no result data from this function.
25629
25630 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
25631
25632 If the user tries to set a mark that the back end doesn't like, this
25633 function may change the mark.  Gnus will use whatever this function
25634 returns as the mark for @var{article} instead of the original
25635 @var{mark}.  If the back end doesn't care, it must return the original
25636 @var{mark}, and not @code{nil} or any other type of garbage.
25637
25638 The only use for this I can see is what @code{nnvirtual} does with
25639 it---if a component group is auto-expirable, marking an article as read
25640 in the virtual group should result in the article being marked as
25641 expirable.
25642
25643 There should be no result data from this function.
25644
25645
25646 @item (nnchoke-request-scan &optional GROUP SERVER)
25647
25648 This function may be called at any time (by Gnus or anything else) to
25649 request that the back end check for incoming articles, in one way or
25650 another.  A mail back end will typically read the spool file or query
25651 the @acronym{POP} server when this function is invoked.  The
25652 @var{group} doesn't have to be heeded---if the back end decides that
25653 it is too much work just scanning for a single group, it may do a
25654 total scan of all groups.  It would be nice, however, to keep things
25655 local if that's practical.
25656
25657 There should be no result data from this function.
25658
25659
25660 @item (nnchoke-request-group-description GROUP &optional SERVER)
25661
25662 The result data from this function should be a description of
25663 @var{group}.
25664
25665 @example
25666 description-line = name <TAB> description eol
25667 name             = <string>
25668 description      = <text>
25669 @end example
25670
25671 @item (nnchoke-request-list-newsgroups &optional SERVER)
25672
25673 The result data from this function should be the description of all
25674 groups available on the server.
25675
25676 @example
25677 description-buffer = *description-line
25678 @end example
25679
25680
25681 @item (nnchoke-request-newgroups DATE &optional SERVER)
25682
25683 The result data from this function should be all groups that were
25684 created after @samp{date}, which is in normal human-readable date format
25685 (i.e., the date format used in mail and news headers, and returned by
25686 the function @code{message-make-date} by default).  The data should be
25687 in the active buffer format.
25688
25689 It is okay for this function to return `too many' groups; some back ends
25690 might find it cheaper to return the full list of groups, rather than
25691 just the new groups.  But don't do this for back ends with many groups.
25692 Normally, if the user creates the groups herself, there won't be too
25693 many groups, so @code{nnml} and the like are probably safe.  But for
25694 back ends like @code{nntp}, where the groups have been created by the
25695 server, it is quite likely that there can be many groups.
25696
25697
25698 @item (nnchoke-request-create-group GROUP &optional SERVER)
25699
25700 This function should create an empty group with name @var{group}.
25701
25702 There should be no return data.
25703
25704
25705 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
25706
25707 This function should run the expiry process on all articles in the
25708 @var{articles} range (which is currently a simple list of article
25709 numbers.)  It is left up to the back end to decide how old articles
25710 should be before they are removed by this function.  If @var{force} is
25711 non-@code{nil}, all @var{articles} should be deleted, no matter how new
25712 they are.
25713
25714 This function should return a list of articles that it did not/was not
25715 able to delete.
25716
25717 There should be no result data returned.
25718
25719
25720 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
25721
25722 This function should move @var{article} (which is a number) from
25723 @var{group} by calling @var{accept-form}.
25724
25725 This function should ready the article in question for moving by
25726 removing any header lines it has added to the article, and generally
25727 should ``tidy up'' the article.  Then it should @code{eval}
25728 @var{accept-form} in the buffer where the ``tidy'' article is.  This
25729 will do the actual copying.  If this @code{eval} returns a
25730 non-@code{nil} value, the article should be removed.
25731
25732 If @var{last} is @code{nil}, that means that there is a high likelihood
25733 that there will be more requests issued shortly, so that allows some
25734 optimizations.
25735
25736 The function should return a cons where the @code{car} is the group name and
25737 the @code{cdr} is the article number that the article was entered as.
25738
25739 There should be no data returned.
25740
25741
25742 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
25743
25744 This function takes the current buffer and inserts it into @var{group}.
25745 If @var{last} in @code{nil}, that means that there will be more calls to
25746 this function in short order.
25747
25748 The function should return a cons where the @code{car} is the group name and
25749 the @code{cdr} is the article number that the article was entered as.
25750
25751 The group should exist before the backend is asked to accept the
25752 article for that group.
25753
25754 There should be no data returned.
25755
25756
25757 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
25758
25759 This function should remove @var{article} (which is a number) from
25760 @var{group} and insert @var{buffer} there instead.
25761
25762 There should be no data returned.
25763
25764
25765 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
25766
25767 This function should delete @var{group}.  If @var{force}, it should
25768 really delete all the articles in the group, and then delete the group
25769 itself.  (If there is such a thing as ``the group itself''.)
25770
25771 There should be no data returned.
25772
25773
25774 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
25775
25776 This function should rename @var{group} into @var{new-name}.  All
25777 articles in @var{group} should move to @var{new-name}.
25778
25779 There should be no data returned.
25780
25781 @end table
25782
25783
25784 @node Error Messaging
25785 @subsubsection Error Messaging
25786
25787 @findex nnheader-report
25788 @findex nnheader-get-report
25789 The back ends should use the function @code{nnheader-report} to report
25790 error conditions---they should not raise errors when they aren't able to
25791 perform a request.  The first argument to this function is the back end
25792 symbol, and the rest are interpreted as arguments to @code{format} if
25793 there are multiple of them, or just a string if there is one of them.
25794 This function must always returns @code{nil}.
25795
25796 @lisp
25797 (nnheader-report 'nnchoke "You did something totally bogus")
25798
25799 (nnheader-report 'nnchoke "Could not request group %s" group)
25800 @end lisp
25801
25802 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
25803 @code{nil} back from a server, and this function returns the most
25804 recently reported message for the back end in question.  This function
25805 takes one argument---the server symbol.
25806
25807 Internally, these functions access @var{back-end}@code{-status-string},
25808 so the @code{nnchoke} back end will have its error message stored in
25809 @code{nnchoke-status-string}.
25810
25811
25812 @node Writing New Back Ends
25813 @subsubsection Writing New Back Ends
25814
25815 Many back ends are quite similar.  @code{nnml} is just like
25816 @code{nnspool}, but it allows you to edit the articles on the server.
25817 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
25818 and it doesn't maintain overview databases.  @code{nndir} is just like
25819 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
25820 editing articles.
25821
25822 It would make sense if it were possible to ``inherit'' functions from
25823 back ends when writing new back ends.  And, indeed, you can do that if you
25824 want to.  (You don't have to if you don't want to, of course.)
25825
25826 All the back ends declare their public variables and functions by using a
25827 package called @code{nnoo}.
25828
25829 To inherit functions from other back ends (and allow other back ends to
25830 inherit functions from the current back end), you should use the
25831 following macros:
25832
25833 @table @code
25834
25835 @item nnoo-declare
25836 This macro declares the first parameter to be a child of the subsequent
25837 parameters.  For instance:
25838
25839 @lisp
25840 (nnoo-declare nndir
25841   nnml nnmh)
25842 @end lisp
25843
25844 @code{nndir} has declared here that it intends to inherit functions from
25845 both @code{nnml} and @code{nnmh}.
25846
25847 @item defvoo
25848 This macro is equivalent to @code{defvar}, but registers the variable as
25849 a public server variable.  Most state-oriented variables should be
25850 declared with @code{defvoo} instead of @code{defvar}.
25851
25852 In addition to the normal @code{defvar} parameters, it takes a list of
25853 variables in the parent back ends to map the variable to when executing
25854 a function in those back ends.
25855
25856 @lisp
25857 (defvoo nndir-directory nil
25858   "Where nndir will look for groups."
25859   nnml-current-directory nnmh-current-directory)
25860 @end lisp
25861
25862 This means that @code{nnml-current-directory} will be set to
25863 @code{nndir-directory} when an @code{nnml} function is called on behalf
25864 of @code{nndir}.  (The same with @code{nnmh}.)
25865
25866 @item nnoo-define-basics
25867 This macro defines some common functions that almost all back ends should
25868 have.
25869
25870 @lisp
25871 (nnoo-define-basics nndir)
25872 @end lisp
25873
25874 @item deffoo
25875 This macro is just like @code{defun} and takes the same parameters.  In
25876 addition to doing the normal @code{defun} things, it registers the
25877 function as being public so that other back ends can inherit it.
25878
25879 @item nnoo-map-functions
25880 This macro allows mapping of functions from the current back end to
25881 functions from the parent back ends.
25882
25883 @lisp
25884 (nnoo-map-functions nndir
25885   (nnml-retrieve-headers 0 nndir-current-group 0 0)
25886   (nnmh-request-article 0 nndir-current-group 0 0))
25887 @end lisp
25888
25889 This means that when @code{nndir-retrieve-headers} is called, the first,
25890 third, and fourth parameters will be passed on to
25891 @code{nnml-retrieve-headers}, while the second parameter is set to the
25892 value of @code{nndir-current-group}.
25893
25894 @item nnoo-import
25895 This macro allows importing functions from back ends.  It should be the
25896 last thing in the source file, since it will only define functions that
25897 haven't already been defined.
25898
25899 @lisp
25900 (nnoo-import nndir
25901   (nnmh
25902    nnmh-request-list
25903    nnmh-request-newgroups)
25904   (nnml))
25905 @end lisp
25906
25907 This means that calls to @code{nndir-request-list} should just be passed
25908 on to @code{nnmh-request-list}, while all public functions from
25909 @code{nnml} that haven't been defined in @code{nndir} yet should be
25910 defined now.
25911
25912 @end table
25913
25914 Below is a slightly shortened version of the @code{nndir} back end.
25915
25916 @lisp
25917 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
25918 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
25919
25920 ;;; @r{Code:}
25921
25922 (require 'nnheader)
25923 (require 'nnmh)
25924 (require 'nnml)
25925 (require 'nnoo)
25926 (eval-when-compile (require 'cl))
25927
25928 (nnoo-declare nndir
25929   nnml nnmh)
25930
25931 (defvoo nndir-directory nil
25932   "Where nndir will look for groups."
25933   nnml-current-directory nnmh-current-directory)
25934
25935 (defvoo nndir-nov-is-evil nil
25936   "*Non-nil means that nndir will never retrieve NOV headers."
25937   nnml-nov-is-evil)
25938
25939 (defvoo nndir-current-group ""
25940   nil
25941   nnml-current-group nnmh-current-group)
25942 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
25943 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
25944
25945 (defvoo nndir-status-string "" nil nnmh-status-string)
25946 (defconst nndir-version "nndir 1.0")
25947
25948 ;;; @r{Interface functions.}
25949
25950 (nnoo-define-basics nndir)
25951
25952 (deffoo nndir-open-server (server &optional defs)
25953   (setq nndir-directory
25954         (or (cadr (assq 'nndir-directory defs))
25955             server))
25956   (unless (assq 'nndir-directory defs)
25957     (push `(nndir-directory ,server) defs))
25958   (push `(nndir-current-group
25959           ,(file-name-nondirectory
25960             (directory-file-name nndir-directory)))
25961         defs)
25962   (push `(nndir-top-directory
25963           ,(file-name-directory (directory-file-name nndir-directory)))
25964         defs)
25965   (nnoo-change-server 'nndir server defs))
25966
25967 (nnoo-map-functions nndir
25968   (nnml-retrieve-headers 0 nndir-current-group 0 0)
25969   (nnmh-request-article 0 nndir-current-group 0 0)
25970   (nnmh-request-group nndir-current-group 0 0)
25971   (nnmh-close-group nndir-current-group 0))
25972
25973 (nnoo-import nndir
25974   (nnmh
25975    nnmh-status-message
25976    nnmh-request-list
25977    nnmh-request-newgroups))
25978
25979 (provide 'nndir)
25980 @end lisp
25981
25982
25983 @node Hooking New Back Ends Into Gnus
25984 @subsubsection Hooking New Back Ends Into Gnus
25985
25986 @vindex gnus-valid-select-methods
25987 @findex gnus-declare-backend
25988 Having Gnus start using your new back end is rather easy---you just
25989 declare it with the @code{gnus-declare-backend} functions.  This will
25990 enter the back end into the @code{gnus-valid-select-methods} variable.
25991
25992 @code{gnus-declare-backend} takes two parameters---the back end name and
25993 an arbitrary number of @dfn{abilities}.
25994
25995 Here's an example:
25996
25997 @lisp
25998 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
25999 @end lisp
26000
26001 The above line would then go in the @file{nnchoke.el} file.
26002
26003 The abilities can be:
26004
26005 @table @code
26006 @item mail
26007 This is a mailish back end---followups should (probably) go via mail.
26008 @item post
26009 This is a newsish back end---followups should (probably) go via news.
26010 @item post-mail
26011 This back end supports both mail and news.
26012 @item none
26013 This is neither a post nor mail back end---it's something completely
26014 different.
26015 @item respool
26016 It supports respooling---or rather, it is able to modify its source
26017 articles and groups.
26018 @item address
26019 The name of the server should be in the virtual server name.  This is
26020 true for almost all back ends.
26021 @item prompt-address
26022 The user should be prompted for an address when doing commands like
26023 @kbd{B} in the group buffer.  This is true for back ends like
26024 @code{nntp}, but not @code{nnmbox}, for instance.
26025 @end table
26026
26027
26028 @node Mail-like Back Ends
26029 @subsubsection Mail-like Back Ends
26030
26031 One of the things that separate the mail back ends from the rest of the
26032 back ends is the heavy dependence by most of the mail back ends on
26033 common functions in @file{nnmail.el}.  For instance, here's the
26034 definition of @code{nnml-request-scan}:
26035
26036 @lisp
26037 (deffoo nnml-request-scan (&optional group server)
26038   (setq nnml-article-file-alist nil)
26039   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
26040 @end lisp
26041
26042 It simply calls @code{nnmail-get-new-mail} with a few parameters,
26043 and @code{nnmail} takes care of all the moving and splitting of the
26044 mail.
26045
26046 This function takes four parameters.
26047
26048 @table @var
26049 @item method
26050 This should be a symbol to designate which back end is responsible for
26051 the call.
26052
26053 @item exit-function
26054 This function should be called after the splitting has been performed.
26055
26056 @item temp-directory
26057 Where the temporary files should be stored.
26058
26059 @item group
26060 This optional argument should be a group name if the splitting is to be
26061 performed for one group only.
26062 @end table
26063
26064 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
26065 save each article.  @var{back-end}@code{-active-number} will be called to
26066 find the article number assigned to this article.
26067
26068 The function also uses the following variables:
26069 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
26070 this back end); and @var{back-end}@code{-group-alist} and
26071 @var{back-end}@code{-active-file} to generate the new active file.
26072 @var{back-end}@code{-group-alist} should be a group-active alist, like
26073 this:
26074
26075 @example
26076 (("a-group" (1 . 10))
26077  ("some-group" (34 . 39)))
26078 @end example
26079
26080
26081 @node Score File Syntax
26082 @subsection Score File Syntax
26083
26084 Score files are meant to be easily parseable, but yet extremely
26085 mallable.   It was decided that something that had the same read syntax
26086 as an Emacs Lisp list would fit that spec.
26087
26088 Here's a typical score file:
26089
26090 @lisp
26091 (("summary"
26092   ("win95" -10000 nil s)
26093   ("Gnus"))
26094  ("from"
26095   ("Lars" -1000))
26096  (mark -100))
26097 @end lisp
26098
26099 BNF definition of a score file:
26100
26101 @example
26102 score-file      = "" / "(" *element ")"
26103 element         = rule / atom
26104 rule            = string-rule / number-rule / date-rule
26105 string-rule     = "(" quote string-header quote space *string-match ")"
26106 number-rule     = "(" quote number-header quote space *number-match ")"
26107 date-rule       = "(" quote date-header quote space *date-match ")"
26108 quote           = <ascii 34>
26109 string-header   = "subject" / "from" / "references" / "message-id" /
26110                   "xref" / "body" / "head" / "all" / "followup"
26111 number-header   = "lines" / "chars"
26112 date-header     = "date"
26113 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
26114                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
26115 score           = "nil" / <integer>
26116 date            = "nil" / <natural number>
26117 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
26118                   "r" / "regex" / "R" / "Regex" /
26119                   "e" / "exact" / "E" / "Exact" /
26120                   "f" / "fuzzy" / "F" / "Fuzzy"
26121 number-match    = "(" <integer> [ "" / [ space score [ "" /
26122                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
26123 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
26124 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
26125                   space date [ "" / [ space date-match-t ] ] ] ] ")"
26126 date-match-t    = "nil" / "at" / "before" / "after"
26127 atom            = "(" [ required-atom / optional-atom ] ")"
26128 required-atom   = mark / expunge / mark-and-expunge / files /
26129                   exclude-files / read-only / touched
26130 optional-atom   = adapt / local / eval
26131 mark            = "mark" space nil-or-number
26132 nil-or-number   = "nil" / <integer>
26133 expunge         = "expunge" space nil-or-number
26134 mark-and-expunge = "mark-and-expunge" space nil-or-number
26135 files           = "files" *[ space <string> ]
26136 exclude-files   = "exclude-files" *[ space <string> ]
26137 read-only       = "read-only" [ space "nil" / space "t" ]
26138 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
26139 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
26140 local           = "local" *[ space "(" <string> space <form> ")" ]
26141 eval            = "eval" space <form>
26142 space           = *[ " " / <TAB> / <NEWLINE> ]
26143 @end example
26144
26145 Any unrecognized elements in a score file should be ignored, but not
26146 discarded.
26147
26148 As you can see, white space is needed, but the type and amount of white
26149 space is irrelevant.  This means that formatting of the score file is
26150 left up to the programmer---if it's simpler to just spew it all out on
26151 one looong line, then that's ok.
26152
26153 The meaning of the various atoms are explained elsewhere in this
26154 manual (@pxref{Score File Format}).
26155
26156
26157 @node Headers
26158 @subsection Headers
26159
26160 Internally Gnus uses a format for storing article headers that
26161 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
26162 almost suspect that the author looked at the @acronym{NOV} specification and
26163 just shamelessly @emph{stole} the entire thing, and one would be right.
26164
26165 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
26166 RFC 1036 to talk about lines in the head of an article (e.g.,
26167 @code{From}).  It is used by many people as a synonym for
26168 ``head''---``the header and the body''.  (That should be avoided, in my
26169 opinion.)  And Gnus uses a format internally that it calls ``header'',
26170 which is what I'm talking about here.  This is a 9-element vector,
26171 basically, with each header (ouch) having one slot.
26172
26173 These slots are, in order: @code{number}, @code{subject}, @code{from},
26174 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
26175 @code{xref}, and @code{extra}.  There are macros for accessing and
26176 setting these slots---they all have predictable names beginning with
26177 @code{mail-header-} and @code{mail-header-set-}, respectively.
26178
26179 All these slots contain strings, except the @code{extra} slot, which
26180 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
26181
26182
26183 @node Ranges
26184 @subsection Ranges
26185
26186 @sc{gnus} introduced a concept that I found so useful that I've started
26187 using it a lot and have elaborated on it greatly.
26188
26189 The question is simple: If you have a large amount of objects that are
26190 identified by numbers (say, articles, to take a @emph{wild} example)
26191 that you want to qualify as being ``included'', a normal sequence isn't
26192 very useful.  (A 200,000 length sequence is a bit long-winded.)
26193
26194 The solution is as simple as the question: You just collapse the
26195 sequence.
26196
26197 @example
26198 (1 2 3 4 5 6 10 11 12)
26199 @end example
26200
26201 is transformed into
26202
26203 @example
26204 ((1 . 6) (10 . 12))
26205 @end example
26206
26207 To avoid having those nasty @samp{(13 . 13)} elements to denote a
26208 lonesome object, a @samp{13} is a valid element:
26209
26210 @example
26211 ((1 . 6) 7 (10 . 12))
26212 @end example
26213
26214 This means that comparing two ranges to find out whether they are equal
26215 is slightly tricky:
26216
26217 @example
26218 ((1 . 5) 7 8 (10 . 12))
26219 @end example
26220
26221 and
26222
26223 @example
26224 ((1 . 5) (7 . 8) (10 . 12))
26225 @end example
26226
26227 are equal.  In fact, any non-descending list is a range:
26228
26229 @example
26230 (1 2 3 4 5)
26231 @end example
26232
26233 is a perfectly valid range, although a pretty long-winded one.  This is
26234 also valid:
26235
26236 @example
26237 (1 . 5)
26238 @end example
26239
26240 and is equal to the previous range.
26241
26242 Here's a BNF definition of ranges.  Of course, one must remember the
26243 semantic requirement that the numbers are non-descending.  (Any number
26244 of repetition of the same number is allowed, but apt to disappear in
26245 range handling.)
26246
26247 @example
26248 range           = simple-range / normal-range
26249 simple-range    = "(" number " . " number ")"
26250 normal-range    = "(" start-contents ")"
26251 contents        = "" / simple-range *[ " " contents ] /
26252                   number *[ " " contents ]
26253 @end example
26254
26255 Gnus currently uses ranges to keep track of read articles and article
26256 marks.  I plan on implementing a number of range operators in C if The
26257 Powers That Be are willing to let me.  (I haven't asked yet, because I
26258 need to do some more thinking on what operators I need to make life
26259 totally range-based without ever having to convert back to normal
26260 sequences.)
26261
26262
26263 @node Group Info
26264 @subsection Group Info
26265
26266 Gnus stores all permanent info on groups in a @dfn{group info} list.
26267 This list is from three to six elements (or more) long and exhaustively
26268 describes the group.
26269
26270 Here are two example group infos; one is a very simple group while the
26271 second is a more complex one:
26272
26273 @example
26274 ("no.group" 5 ((1 . 54324)))
26275
26276 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
26277                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
26278                 (nnml "")
26279                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
26280 @end example
26281
26282 The first element is the @dfn{group name}---as Gnus knows the group,
26283 anyway.  The second element is the @dfn{subscription level}, which
26284 normally is a small integer.  (It can also be the @dfn{rank}, which is a
26285 cons cell where the @code{car} is the level and the @code{cdr} is the
26286 score.)  The third element is a list of ranges of read articles.  The
26287 fourth element is a list of lists of article marks of various kinds.
26288 The fifth element is the select method (or virtual server, if you like).
26289 The sixth element is a list of @dfn{group parameters}, which is what
26290 this section is about.
26291
26292 Any of the last three elements may be missing if they are not required.
26293 In fact, the vast majority of groups will normally only have the first
26294 three elements, which saves quite a lot of cons cells.
26295
26296 Here's a BNF definition of the group info format:
26297
26298 @example
26299 info          = "(" group space ralevel space read
26300                 [ "" / [ space marks-list [ "" / [ space method [ "" /
26301                 space parameters ] ] ] ] ] ")"
26302 group         = quote <string> quote
26303 ralevel       = rank / level
26304 level         = <integer in the range of 1 to inf>
26305 rank          = "(" level "." score ")"
26306 score         = <integer in the range of 1 to inf>
26307 read          = range
26308 marks-lists   = nil / "(" *marks ")"
26309 marks         = "(" <string> range ")"
26310 method        = "(" <string> *elisp-forms ")"
26311 parameters    = "(" *elisp-forms ")"
26312 @end example
26313
26314 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
26315 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
26316 in pseudo-BNF.
26317
26318 If you have a Gnus info and want to access the elements, Gnus offers a
26319 series of macros for getting/setting these elements.
26320
26321 @table @code
26322 @item gnus-info-group
26323 @itemx gnus-info-set-group
26324 @findex gnus-info-group
26325 @findex gnus-info-set-group
26326 Get/set the group name.
26327
26328 @item gnus-info-rank
26329 @itemx gnus-info-set-rank
26330 @findex gnus-info-rank
26331 @findex gnus-info-set-rank
26332 Get/set the group rank (@pxref{Group Score}).
26333
26334 @item gnus-info-level
26335 @itemx gnus-info-set-level
26336 @findex gnus-info-level
26337 @findex gnus-info-set-level
26338 Get/set the group level.
26339
26340 @item gnus-info-score
26341 @itemx gnus-info-set-score
26342 @findex gnus-info-score
26343 @findex gnus-info-set-score
26344 Get/set the group score (@pxref{Group Score}).
26345
26346 @item gnus-info-read
26347 @itemx gnus-info-set-read
26348 @findex gnus-info-read
26349 @findex gnus-info-set-read
26350 Get/set the ranges of read articles.
26351
26352 @item gnus-info-marks
26353 @itemx gnus-info-set-marks
26354 @findex gnus-info-marks
26355 @findex gnus-info-set-marks
26356 Get/set the lists of ranges of marked articles.
26357
26358 @item gnus-info-method
26359 @itemx gnus-info-set-method
26360 @findex gnus-info-method
26361 @findex gnus-info-set-method
26362 Get/set the group select method.
26363
26364 @item gnus-info-params
26365 @itemx gnus-info-set-params
26366 @findex gnus-info-params
26367 @findex gnus-info-set-params
26368 Get/set the group parameters.
26369 @end table
26370
26371 All the getter functions take one parameter---the info list.  The setter
26372 functions take two parameters---the info list and the new value.
26373
26374 The last three elements in the group info aren't mandatory, so it may be
26375 necessary to extend the group info before setting the element.  If this
26376 is necessary, you can just pass on a non-@code{nil} third parameter to
26377 the three final setter functions to have this happen automatically.
26378
26379
26380 @node Extended Interactive
26381 @subsection Extended Interactive
26382 @cindex interactive
26383 @findex gnus-interactive
26384
26385 Gnus extends the standard Emacs @code{interactive} specification
26386 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
26387 Prefixes}).  Here's an example of how this is used:
26388
26389 @lisp
26390 (defun gnus-summary-increase-score (&optional score symp)
26391   (interactive (gnus-interactive "P\ny"))
26392   ...
26393   )
26394 @end lisp
26395
26396 The best thing to do would have been to implement
26397 @code{gnus-interactive} as a macro which would have returned an
26398 @code{interactive} form, but this isn't possible since Emacs checks
26399 whether a function is interactive or not by simply doing an @code{assq}
26400 on the lambda form.  So, instead we have @code{gnus-interactive}
26401 function that takes a string and returns values that are usable to
26402 @code{interactive}.
26403
26404 This function accepts (almost) all normal @code{interactive} specs, but
26405 adds a few more.
26406
26407 @table @samp
26408 @item y
26409 @vindex gnus-current-prefix-symbol
26410 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
26411 variable.
26412
26413 @item Y
26414 @vindex gnus-current-prefix-symbols
26415 A list of the current symbolic prefixes---the
26416 @code{gnus-current-prefix-symbol} variable.
26417
26418 @item A
26419 The current article number---the @code{gnus-summary-article-number}
26420 function.
26421
26422 @item H
26423 The current article header---the @code{gnus-summary-article-header}
26424 function.
26425
26426 @item g
26427 The current group name---the @code{gnus-group-group-name}
26428 function.
26429
26430 @end table
26431
26432
26433 @node Emacs/XEmacs Code
26434 @subsection Emacs/XEmacs Code
26435 @cindex XEmacs
26436 @cindex Emacsen
26437
26438 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
26439 platforms must be the primary one.  I chose Emacs.  Not because I don't
26440 like XEmacs or Mule, but because it comes first alphabetically.
26441
26442 This means that Gnus will byte-compile under Emacs with nary a warning,
26443 while XEmacs will pump out gigabytes of warnings while byte-compiling.
26444 As I use byte-compilation warnings to help me root out trivial errors in
26445 Gnus, that's very useful.
26446
26447 I've also consistently used Emacs function interfaces, but have used
26448 Gnusey aliases for the functions.  To take an example:  Emacs defines a
26449 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
26450 function.  I then define a function called @code{gnus-run-at-time} that
26451 takes the same parameters as the Emacs @code{run-at-time}.  When running
26452 Gnus under Emacs, the former function is just an alias for the latter.
26453 However, when running under XEmacs, the former is an alias for the
26454 following function:
26455
26456 @lisp
26457 (defun gnus-xmas-run-at-time (time repeat function &rest args)
26458   (start-itimer
26459    "gnus-run-at-time"
26460    `(lambda ()
26461       (,function ,@@args))
26462    time repeat))
26463 @end lisp
26464
26465 This sort of thing has been done for bunches of functions.  Gnus does
26466 not redefine any native Emacs functions while running under XEmacs---it
26467 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
26468 all over.
26469
26470 In the cases where the XEmacs function interface was obviously cleaner,
26471 I used it instead.  For example @code{gnus-region-active-p} is an alias
26472 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
26473
26474 Of course, I could have chosen XEmacs as my native platform and done
26475 mapping functions the other way around.  But I didn't.  The performance
26476 hit these indirections impose on Gnus under XEmacs should be slight.
26477
26478
26479 @node Various File Formats
26480 @subsection Various File Formats
26481
26482 @menu
26483 * Active File Format::          Information on articles and groups available.
26484 * Newsgroups File Format::      Group descriptions.
26485 @end menu
26486
26487
26488 @node Active File Format
26489 @subsubsection Active File Format
26490
26491 The active file lists all groups available on the server in
26492 question.  It also lists the highest and lowest current article numbers
26493 in each group.
26494
26495 Here's an excerpt from a typical active file:
26496
26497 @example
26498 soc.motss 296030 293865 y
26499 alt.binaries.pictures.fractals 3922 3913 n
26500 comp.sources.unix 1605 1593 m
26501 comp.binaries.ibm.pc 5097 5089 y
26502 no.general 1000 900 y
26503 @end example
26504
26505 Here's a pseudo-BNF definition of this file:
26506
26507 @example
26508 active      = *group-line
26509 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
26510 group       = <non-white-space string>
26511 spc         = " "
26512 high-number = <non-negative integer>
26513 low-number  = <positive integer>
26514 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
26515 @end example
26516
26517 For a full description of this file, see the manual pages for
26518 @samp{innd}, in particular @samp{active(5)}.
26519
26520
26521 @node Newsgroups File Format
26522 @subsubsection Newsgroups File Format
26523
26524 The newsgroups file lists groups along with their descriptions.  Not all
26525 groups on the server have to be listed,  and not all groups in the file
26526 have to exist on the server.  The file is meant purely as information to
26527 the user.
26528
26529 The format is quite simple; a group name, a tab, and the description.
26530 Here's the definition:
26531
26532 @example
26533 newsgroups    = *line
26534 line          = group tab description <NEWLINE>
26535 group         = <non-white-space string>
26536 tab           = <TAB>
26537 description   = <string>
26538 @end example
26539
26540
26541 @page
26542 @node Emacs for Heathens
26543 @section Emacs for Heathens
26544
26545 Believe it or not, but some people who use Gnus haven't really used
26546 Emacs much before they embarked on their journey on the Gnus Love Boat.
26547 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
26548 region'', and ``set @code{gnus-flargblossen} to an alist where the key
26549 is a regexp that is used for matching on the group name'' are magical
26550 phrases with little or no meaning, then this appendix is for you.  If
26551 you are already familiar with Emacs, just ignore this and go fondle your
26552 cat instead.
26553
26554 @menu
26555 * Keystrokes::                  Entering text and executing commands.
26556 * Emacs Lisp::                  The built-in Emacs programming language.
26557 @end menu
26558
26559
26560 @node Keystrokes
26561 @subsection Keystrokes
26562
26563 @itemize @bullet
26564 @item
26565 Q: What is an experienced Emacs user?
26566
26567 @item
26568 A: A person who wishes that the terminal had pedals.
26569 @end itemize
26570
26571 Yes, when you use Emacs, you are apt to use the control key, the shift
26572 key and the meta key a lot.  This is very annoying to some people
26573 (notably @code{vi}le users), and the rest of us just love the hell out
26574 of it.  Just give up and submit.  Emacs really does stand for
26575 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
26576 may have heard from other disreputable sources (like the Emacs author).
26577
26578 The shift keys are normally located near your pinky fingers, and are
26579 normally used to get capital letters and stuff.  You probably use it all
26580 the time.  The control key is normally marked ``CTRL'' or something like
26581 that.  The meta key is, funnily enough, never marked as such on any
26582 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
26583 which is the meta key on this keyboard.  It's usually located somewhere
26584 to the left hand side of the keyboard, usually on the bottom row.
26585
26586 Now, us Emacs people don't say ``press the meta-control-m key'',
26587 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
26588 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
26589 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
26590 down the control key, and hold it down while you press @kbd{k}''.
26591 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
26592 the control key and then press @kbd{k}''.  Simple, ay?
26593
26594 This is somewhat complicated by the fact that not all keyboards have a
26595 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
26596 means ``press escape, release escape, press @kbd{k}''.  That's much more
26597 work than if you have a meta key, so if that's the case, I respectfully
26598 suggest you get a real keyboard with a meta key.  You can't live without
26599 it.
26600
26601
26602
26603 @node Emacs Lisp
26604 @subsection Emacs Lisp
26605
26606 Emacs is the King of Editors because it's really a Lisp interpreter.
26607 Each and every key you tap runs some Emacs Lisp code snippet, and since
26608 Emacs Lisp is an interpreted language, that means that you can configure
26609 any key to run any arbitrary code.  You just, like, do it.
26610
26611 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
26612 functions.  (These are byte-compiled for speed, but it's still
26613 interpreted.)  If you decide that you don't like the way Gnus does
26614 certain things, it's trivial to have it do something a different way.
26615 (Well, at least if you know how to write Lisp code.)  However, that's
26616 beyond the scope of this manual, so we are simply going to talk about
26617 some common constructs that you normally use in your @file{.emacs} file
26618 to customize Gnus.
26619
26620 If you want to set the variable @code{gnus-florgbnize} to four (4), you
26621 write the following:
26622
26623 @lisp
26624 (setq gnus-florgbnize 4)
26625 @end lisp
26626
26627 This function (really ``special form'') @code{setq} is the one that can
26628 set a variable to some value.  This is really all you need to know.  Now
26629 you can go and fill your @file{.emacs} file with lots of these to change
26630 how Gnus works.
26631
26632 If you have put that thing in your @file{.emacs} file, it will be read
26633 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
26634 start Emacs.  If you want to change the variable right away, simply say
26635 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
26636 previous ``form'', which is a simple @code{setq} statement here.
26637
26638 Go ahead---just try it, if you're located at your Emacs.  After you
26639 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
26640 is the return value of the form you @code{eval}ed.
26641
26642 Some pitfalls:
26643
26644 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
26645 that means:
26646
26647 @lisp
26648 (setq gnus-read-active-file 'some)
26649 @end lisp
26650
26651 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
26652 @samp{nntp.ifi.uio.no}'', that means:
26653
26654 @lisp
26655 (setq gnus-nntp-server "nntp.ifi.uio.no")
26656 @end lisp
26657
26658 So be careful not to mix up strings (the latter) with symbols (the
26659 former).  The manual is unambiguous, but it can be confusing.
26660
26661 @page
26662 @include gnus-faq.texi
26663
26664 @node Index
26665 @chapter Index
26666 @printindex cp
26667
26668 @node Key Index
26669 @chapter Key Index
26670 @printindex ky
26671
26672 @summarycontents
26673 @contents
26674 @bye
26675
26676 @iftex
26677 @iflatex
26678 \end{document}
26679 @end iflatex
26680 @end iftex
26681
26682 @c Local Variables:
26683 @c mode: texinfo
26684 @c coding: iso-8859-1
26685 @c End:
26686 % LocalWords:  BNF mucho detailmenu cindex kindex kbd
26687 % LocalWords:  findex Gnusae vindex dfn dfn samp nntp setq nnspool nntpserver
26688 % LocalWords:  nnmbox newusers Blllrph NEWGROUPS dingnusdingnusdingnus
26689 % LocalWords:  pre fab rec comp nnslashdot regex ga ga sci nnml nnbabyl nnmh
26690 % LocalWords:  nnfolder emph looong eld newsreaders defun init elc pxref