Implement the nnimap article expunging interface method, and make it more general
[gnus] / texi / gnus.texi
1 \input texinfo
2
3 @setfilename gnus
4 @settitle Gnus Manual
5 @syncodeindex fn cp
6 @syncodeindex vr cp
7 @syncodeindex pg cp
8
9 @documentencoding ISO-8859-1
10
11 @copying
12 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
13 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
14
15 @quotation
16 Permission is granted to copy, distribute and/or modify this document
17 under the terms of the GNU Free Documentation License, Version 1.3 or
18 any later version published by the Free Software Foundation; with no
19 Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
20 and with the Back-Cover Texts as in (a) below.  A copy of the license
21 is included in the section entitled ``GNU Free Documentation License''.
22
23 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
24 modify this GNU manual.  Buying copies from the FSF supports it in
25 developing GNU and promoting software freedom.''
26 @end quotation
27 @end copying
28
29 @iftex
30 @iflatex
31 \documentclass[twoside,a4paper,openright,11pt]{book}
32 \usepackage[latin1]{inputenc}
33 \usepackage{pagestyle}
34 \usepackage{epsfig}
35 \usepackage{pixidx}
36 \input{gnusconfig.tex}
37
38 \ifx\pdfoutput\undefined
39 \else
40 \usepackage[pdftex,bookmarks,colorlinks=true]{hyperref}
41 \usepackage{thumbpdf}
42 \pdfcompresslevel=9
43 \fi
44
45 \makeindex
46 \begin{document}
47
48 % Adjust ../Makefile.in if you change the following line:
49 \newcommand{\gnusversionname}{No Gnus v0.11}
50 \newcommand{\gnuschaptername}{}
51 \newcommand{\gnussectionname}{}
52
53 \newcommand{\gnusbackslash}{/}
54
55 \newcommand{\gnusref}[1]{``#1'' on page \pageref{#1}}
56 \ifx\pdfoutput\undefined
57 \newcommand{\gnusuref}[1]{\gnustt{#1}}
58 \else
59 \newcommand{\gnusuref}[1]{\href{#1}{\gnustt{#1}}}
60 \fi
61 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
62 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
63
64 \newcommand{\gnuskindex}[1]{\index{#1}}
65 \newcommand{\gnusindex}[1]{\index{#1}}
66
67 \newcommand{\gnustt}[1]{{\gnusselectttfont{}#1}}
68 \newcommand{\gnuscode}[1]{\gnustt{#1}}
69 \newcommand{\gnusasis}[1]{\gnustt{#1}}
70 \newcommand{\gnusurl}[1]{\gnustt{#1}}
71 \newcommand{\gnuscommand}[1]{\gnustt{#1}}
72 \newcommand{\gnusenv}[1]{\gnustt{#1}}
73 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
74 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
75 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
76 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
77 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
78 \newcommand{\gnusdfn}[1]{\textit{#1}}
79 \newcommand{\gnusi}[1]{\textit{#1}}
80 \newcommand{\gnusr}[1]{\textrm{#1}}
81 \newcommand{\gnusstrong}[1]{\textbf{#1}}
82 \newcommand{\gnusemph}[1]{\textit{#1}}
83 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
84 \newcommand{\gnussc}[1]{\textsc{#1}}
85 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
86 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
87 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
88 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
89 \newcommand{\gnusacronym}[1]{\textsc{#1}}
90 \newcommand{\gnusemail}[1]{\textit{#1}}
91
92 \newcommand{\gnusbullet}{{${\bullet}$}}
93 \newcommand{\gnusdollar}{\$}
94 \newcommand{\gnusampersand}{\&}
95 \newcommand{\gnuspercent}{\%}
96 \newcommand{\gnushash}{\#}
97 \newcommand{\gnushat}{\symbol{"5E}}
98 \newcommand{\gnusunderline}{\symbol{"5F}}
99 \newcommand{\gnusnot}{$\neg$}
100 \newcommand{\gnustilde}{\symbol{"7E}}
101 \newcommand{\gnusless}{{$<$}}
102 \newcommand{\gnusgreater}{{$>$}}
103 \newcommand{\gnusbraceleft}{{$>$}}
104 \newcommand{\gnusbraceright}{{$>$}}
105
106 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
107 \newcommand{\gnusinteresting}{
108 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
109 }
110
111 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
112
113 \newcommand{\gnuspagechapter}[1]{
114 {\mbox{}}
115 }
116
117 \newdimen{\gnusdimen}
118 \gnusdimen 0pt
119
120 \newcommand{\gnuschapter}[2]{
121 \gnuscleardoublepage
122 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
123 \chapter{#2}
124 \renewcommand{\gnussectionname}{}
125 \renewcommand{\gnuschaptername}{#2}
126 \thispagestyle{empty}
127 \hspace*{-2cm}
128 \begin{picture}(500,500)(0,0)
129 \put(480,350){\makebox(0,0)[tr]{#1}}
130 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
131 \end{picture}
132 \clearpage
133 }
134
135 \newcommand{\gnusfigure}[3]{
136 \begin{figure}
137 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
138 #3
139 \end{picture}
140 \caption{#1}
141 \end{figure}
142 }
143
144 \newcommand{\gnusicon}[1]{
145 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
146 }
147
148 \newcommand{\gnuspicon}[1]{
149 \margindex{\epsfig{figure=#1,width=2cm}}
150 }
151
152 \newcommand{\gnusxface}[2]{
153 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
154 }
155
156 \newcommand{\gnussmiley}[2]{
157 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
158 }
159
160 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
161
162 \newcommand{\gnussection}[1]{
163 \renewcommand{\gnussectionname}{#1}
164 \section{#1}
165 }
166
167 \newenvironment{codelist}%
168 {\begin{list}{}{
169 }
170 }{\end{list}}
171
172 \newenvironment{asislist}%
173 {\begin{list}{}{
174 }
175 }{\end{list}}
176
177 \newenvironment{kbdlist}%
178 {\begin{list}{}{
179 \labelwidth=0cm
180 }
181 }{\end{list}}
182
183 \newenvironment{dfnlist}%
184 {\begin{list}{}{
185 }
186 }{\end{list}}
187
188 \newenvironment{stronglist}%
189 {\begin{list}{}{
190 }
191 }{\end{list}}
192
193 \newenvironment{samplist}%
194 {\begin{list}{}{
195 }
196 }{\end{list}}
197
198 \newenvironment{varlist}%
199 {\begin{list}{}{
200 }
201 }{\end{list}}
202
203 \newenvironment{emphlist}%
204 {\begin{list}{}{
205 }
206 }{\end{list}}
207
208 \newlength\gnusheadtextwidth
209 \setlength{\gnusheadtextwidth}{\headtextwidth}
210 \addtolength{\gnusheadtextwidth}{1cm}
211
212 \newpagestyle{gnuspreamble}%
213 {
214 {
215 \ifodd\count0
216 {
217 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
218 }
219 \else
220 {
221 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
222 }
223 }
224 \fi
225 }
226 }
227 {
228 \ifodd\count0
229 \mbox{} \hfill
230 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
231 \else
232 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
233 \hfill \mbox{}
234 \fi
235 }
236
237 \newpagestyle{gnusindex}%
238 {
239 {
240 \ifodd\count0
241 {
242 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
243 }
244 \else
245 {
246 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
247 }
248 \fi
249 }
250 }
251 {
252 \ifodd\count0
253 \mbox{} \hfill
254 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
255 \else
256 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
257 \hfill \mbox{}
258 \fi
259 }
260
261 \newpagestyle{gnus}%
262 {
263 {
264 \ifodd\count0
265 {
266 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
267 }
268 \else
269 {
270 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
271 }
272 \fi
273 }
274 }
275 {
276 \ifodd\count0
277 \mbox{} \hfill
278 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
279 \else
280 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
281 \hfill \mbox{}
282 \fi
283 }
284
285 \pagenumbering{roman}
286 \pagestyle{gnuspreamble}
287
288 @end iflatex
289 @end iftex
290
291 @iftex
292 @iflatex
293
294 \begin{titlepage}
295 {
296
297 %\addtolength{\oddsidemargin}{-5cm}
298 %\addtolength{\evensidemargin}{-5cm}
299 \parindent=0cm
300 \addtolength{\textheight}{2cm}
301
302 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
303 \rule{15cm}{1mm}\\
304 \vfill
305 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
306 \vfill
307 \rule{15cm}{1mm}\\
308 \gnusauthor{by Lars Magne Ingebrigtsen}
309 \newpage
310 }
311
312 \mbox{}
313 \vfill
314
315 \thispagestyle{empty}
316
317 @c @insertcopying
318 \newpage
319 \end{titlepage}
320 @end iflatex
321 @end iftex
322
323 @dircategory Emacs
324 @direntry
325 * Gnus: (gnus).                 The newsreader Gnus.
326 @end direntry
327 @iftex
328 @finalout
329 @end iftex
330
331
332 @titlepage
333 @title Gnus Manual
334
335 @author by Lars Magne Ingebrigtsen
336 @page
337 @vskip 0pt plus 1filll
338 @insertcopying
339 @end titlepage
340
341 @summarycontents
342 @contents
343
344 @node Top
345 @top The Gnus Newsreader
346
347 @ifinfo
348
349 You can read news (and mail) from within Emacs by using Gnus.  The news
350 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
351 spool or your mbox file.  All at the same time, if you want to push your
352 luck.
353
354 @c Adjust ../Makefile.in if you change the following line:
355 This manual corresponds to No Gnus v0.11.
356
357 @ifnottex
358 @insertcopying
359 @end ifnottex
360
361 @end ifinfo
362
363 @iftex
364
365 @iflatex
366 \tableofcontents
367 \gnuscleardoublepage
368 @end iflatex
369
370 Gnus is the advanced, self-documenting, customizable, extensible
371 unreal-time newsreader for GNU Emacs.
372
373 Oops.  That sounds oddly familiar, so let's start over again to avoid
374 being accused of plagiarism:
375
376 Gnus is a message-reading laboratory.  It will let you look at just
377 about anything as if it were a newsgroup.  You can read mail with it,
378 you can browse directories with it, you can @code{ftp} with it---you
379 can even read news with it!
380
381 Gnus tries to empower people who read news the same way Emacs empowers
382 people who edit text.  Gnus sets no limits to what the user should be
383 allowed to do.  Users are encouraged to extend Gnus to make it behave
384 like they want it to behave.  A program should not control people;
385 people should be empowered to do what they want by using (or abusing)
386 the program.
387
388 @c Adjust ../Makefile.in if you change the following line:
389 This manual corresponds to No Gnus v0.11.
390
391 @heading Other related manuals
392 @itemize
393 @item Message manual: Composing messages
394 @item Emacs-MIME:     Composing messages; @acronym{MIME}-specific parts.
395 @item Sieve:          Managing Sieve scripts in Emacs.
396 @item PGG:            @acronym{PGP/MIME} with Gnus.
397 @item SASL:           @acronym{SASL} authentication in Emacs.
398 @end itemize
399
400 @end iftex
401
402 @menu
403 * Starting Up::              Finding news can be a pain.
404 * Group Buffer::             Selecting, subscribing and killing groups.
405 * Summary Buffer::           Reading, saving and posting articles.
406 * Article Buffer::           Displaying and handling articles.
407 * Composing Messages::       Information on sending mail and news.
408 * Select Methods::           Gnus reads all messages from various select methods.
409 * Scoring::                  Assigning values to articles.
410 * Various::                  General purpose settings.
411 * The End::                  Farewell and goodbye.
412 * Appendices::               Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
413 * GNU Free Documentation License:: The license for this documentation.
414 * Index::                    Variable, function and concept index.
415 * Key Index::                Key Index.
416
417 Other related manuals
418
419 * Message:(message).         Composing messages.
420 * Emacs-MIME:(emacs-mime).   Composing messages; @acronym{MIME}-specific parts.
421 * Sieve:(sieve).             Managing Sieve scripts in Emacs.
422 * PGG:(pgg).                 @acronym{PGP/MIME} with Gnus.
423 * SASL:(sasl).               @acronym{SASL} authentication in Emacs.
424
425 @detailmenu
426  --- The Detailed Node Listing ---
427
428 Starting Gnus
429
430 * Finding the News::            Choosing a method for getting news.
431 * The First Time::              What does Gnus do the first time you start it?
432 * The Server is Down::          How can I read my mail then?
433 * Slave Gnusae::                You can have more than one Gnus active at a time.
434 * Fetching a Group::            Starting Gnus just to read a group.
435 * New Groups::                  What is Gnus supposed to do with new groups?
436 * Changing Servers::            You may want to move from one server to another.
437 * Startup Files::               Those pesky startup files---@file{.newsrc}.
438 * Auto Save::                   Recovering from a crash.
439 * The Active File::             Reading the active file over a slow line Takes Time.
440 * Startup Variables::           Other variables you might change.
441
442 New Groups
443
444 * Checking New Groups::         Determining what groups are new.
445 * Subscription Methods::        What Gnus should do with new groups.
446 * Filtering New Groups::        Making Gnus ignore certain new groups.
447
448 Group Buffer
449
450 * Group Buffer Format::         Information listed and how you can change it.
451 * Group Maneuvering::           Commands for moving in the group buffer.
452 * Selecting a Group::           Actually reading news.
453 * Subscription Commands::       Unsubscribing, killing, subscribing.
454 * Group Data::                  Changing the info for a group.
455 * Group Levels::                Levels? What are those, then?
456 * Group Score::                 A mechanism for finding out what groups you like.
457 * Marking Groups::              You can mark groups for later processing.
458 * Foreign Groups::              Creating and editing groups.
459 * Group Parameters::            Each group may have different parameters set.
460 * Listing Groups::              Gnus can list various subsets of the groups.
461 * Sorting Groups::              Re-arrange the group order.
462 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
463 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
464 * Exiting Gnus::                Stop reading news and get some work done.
465 * Group Topics::                A folding group mode divided into topics.
466 * Non-ASCII Group Names::       Accessing groups of non-English names.
467 * Misc Group Stuff::            Other stuff that you can to do.
468
469 Group Buffer Format
470
471 * Group Line Specification::    Deciding how the group buffer is to look.
472 * Group Mode Line Specification::  The group buffer mode line.
473 * Group Highlighting::          Having nice colors in the group buffer.
474
475 Group Topics
476
477 * Topic Commands::              Interactive E-Z commands.
478 * Topic Variables::             How to customize the topics the Lisp Way.
479 * Topic Sorting::               Sorting each topic individually.
480 * Topic Topology::              A map of the world.
481 * Topic Parameters::            Parameters that apply to all groups in a topic.
482
483 Misc Group Stuff
484
485 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
486 * Group Information::           Information and help on groups and Gnus.
487 * Group Timestamp::             Making Gnus keep track of when you last read a group.
488 * File Commands::               Reading and writing the Gnus files.
489 * Sieve Commands::              Managing Sieve scripts.
490
491 Summary Buffer
492
493 * Summary Buffer Format::       Deciding how the summary buffer is to look.
494 * Summary Maneuvering::         Moving around the summary buffer.
495 * Choosing Articles::           Reading articles.
496 * Paging the Article::          Scrolling the current article.
497 * Reply Followup and Post::     Posting articles.
498 * Delayed Articles::            Send articles at a later time.
499 * Marking Articles::            Marking articles as read, expirable, etc.
500 * Limiting::                    You can limit the summary buffer.
501 * Threading::                   How threads are made.
502 * Sorting the Summary Buffer::  How articles and threads are sorted.
503 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
504 * Article Caching::             You may store articles in a cache.
505 * Persistent Articles::         Making articles expiry-resistant.
506 * Sticky Articles::             Article buffers that are not reused.
507 * Article Backlog::             Having already read articles hang around.
508 * Saving Articles::             Ways of customizing article saving.
509 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
510 * Article Treatment::           The article buffer can be mangled at will.
511 * MIME Commands::               Doing MIMEy things with the articles.
512 * Charsets::                    Character set issues.
513 * Article Commands::            Doing various things with the article buffer.
514 * Summary Sorting::             Sorting the summary buffer in various ways.
515 * Finding the Parent::          No child support? Get the parent.
516 * Alternative Approaches::      Reading using non-default summaries.
517 * Tree Display::                A more visual display of threads.
518 * Mail Group Commands::         Some commands can only be used in mail groups.
519 * Various Summary Stuff::       What didn't fit anywhere else.
520 * Exiting the Summary Buffer::  Returning to the Group buffer,
521                                 or reselecting the current group.
522 * Crosspost Handling::          How crossposted articles are dealt with.
523 * Duplicate Suppression::       An alternative when crosspost handling fails.
524 * Security::                    Decrypt and Verify.
525 * Mailing List::                Mailing list minor mode.
526
527 Summary Buffer Format
528
529 * Summary Buffer Lines::        You can specify how summary lines should look.
530 * To From Newsgroups::          How to not display your own name.
531 * Summary Buffer Mode Line::    You can say how the mode line should look.
532 * Summary Highlighting::        Making the summary buffer all pretty and nice.
533
534 Choosing Articles
535
536 * Choosing Commands::           Commands for choosing articles.
537 * Choosing Variables::          Variables that influence these commands.
538
539 Reply, Followup and Post
540
541 * Summary Mail Commands::       Sending mail.
542 * Summary Post Commands::       Sending news.
543 * Summary Message Commands::    Other Message-related commands.
544 * Canceling and Superseding::
545
546 Marking Articles
547
548 * Unread Articles::             Marks for unread articles.
549 * Read Articles::               Marks for read articles.
550 * Other Marks::                 Marks that do not affect readedness.
551 * Setting Marks::               How to set and remove marks.
552 * Generic Marking Commands::    How to customize the marking.
553 * Setting Process Marks::       How to mark articles for later processing.
554
555 Threading
556
557 * Customizing Threading::       Variables you can change to affect the threading.
558 * Thread Commands::             Thread based commands in the summary buffer.
559
560 Customizing Threading
561
562 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
563 * Filling In Threads::          Making the threads displayed look fuller.
564 * More Threading::              Even more variables for fiddling with threads.
565 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
566
567 Decoding Articles
568
569 * Uuencoded Articles::          Uudecode articles.
570 * Shell Archives::              Unshar articles.
571 * PostScript Files::            Split PostScript.
572 * Other Files::                 Plain save and binhex.
573 * Decoding Variables::          Variables for a happy decoding.
574 * Viewing Files::               You want to look at the result of the decoding?
575
576 Decoding Variables
577
578 * Rule Variables::              Variables that say how a file is to be viewed.
579 * Other Decode Variables::      Other decode variables.
580 * Uuencoding and Posting::      Variables for customizing uuencoding.
581
582 Article Treatment
583
584 * Article Highlighting::        You want to make the article look like fruit salad.
585 * Article Fontisizing::         Making emphasized text look nice.
586 * Article Hiding::              You also want to make certain info go away.
587 * Article Washing::             Lots of way-neat functions to make life better.
588 * Article Header::              Doing various header transformations.
589 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
590 * Article Button Levels::       Controlling appearance of buttons.
591 * Article Date::                Grumble, UT!
592 * Article Display::             Display various stuff---X-Face, Picons, Smileys
593 * Article Signature::           What is a signature?
594 * Article Miscellanea::         Various other stuff.
595
596 Alternative Approaches
597
598 * Pick and Read::               First mark articles and then read them.
599 * Binary Groups::               Auto-decode all articles.
600
601 Various Summary Stuff
602
603 * Summary Group Information::   Information oriented commands.
604 * Searching for Articles::      Multiple article commands.
605 * Summary Generation Commands::
606 * Really Various Summary Commands::  Those pesky non-conformant commands.
607
608 Article Buffer
609
610 * Hiding Headers::              Deciding what headers should be displayed.
611 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
612 * Customizing Articles::        Tailoring the look of the articles.
613 * Article Keymap::              Keystrokes available in the article buffer.
614 * Misc Article::                Other stuff.
615
616 Composing Messages
617
618 * Mail::                        Mailing and replying.
619 * Posting Server::              What server should you post and mail via?
620 * POP before SMTP::             You cannot send a mail unless you read a mail.
621 * Mail and Post::               Mailing and posting at the same time.
622 * Archived Messages::           Where Gnus stores the messages you've sent.
623 * Posting Styles::              An easier way to specify who you are.
624 * Drafts::                      Postponing messages and rejected messages.
625 * Rejected Articles::           What happens if the server doesn't like your article?
626 * Signing and encrypting::      How to compose secure messages.
627
628 Select Methods
629
630 * Server Buffer::               Making and editing virtual servers.
631 * Getting News::                Reading USENET news with Gnus.
632 * Getting Mail::                Reading your personal mail with Gnus.
633 * Browsing the Web::            Getting messages from a plethora of Web sources.
634 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
635 * Other Sources::               Reading directories, files.
636 * Combined Groups::             Combining groups into one group.
637 * Email Based Diary::           Using mails to manage diary events in Gnus.
638 * Gnus Unplugged::              Reading news and mail offline.
639
640 Server Buffer
641
642 * Server Buffer Format::        You can customize the look of this buffer.
643 * Server Commands::             Commands to manipulate servers.
644 * Example Methods::             Examples server specifications.
645 * Creating a Virtual Server::   An example session.
646 * Server Variables::            Which variables to set.
647 * Servers and Methods::         You can use server names as select methods.
648 * Unavailable Servers::         Some servers you try to contact may be down.
649
650 Getting News
651
652 * NNTP::                        Reading news from an @acronym{NNTP} server.
653 * News Spool::                  Reading news from the local spool.
654
655 @acronym{NNTP}
656
657 * Direct Functions::            Connecting directly to the server.
658 * Indirect Functions::          Connecting indirectly to the server.
659 * Common Variables::            Understood by several connection functions.
660 * NNTP marks::                  Storing marks for @acronym{NNTP} servers.
661
662 Getting Mail
663
664 * Mail in a Newsreader::        Important introductory notes.
665 * Getting Started Reading Mail::  A simple cookbook example.
666 * Splitting Mail::              How to create mail groups.
667 * Mail Sources::                How to tell Gnus where to get mail from.
668 * Mail Back End Variables::     Variables for customizing mail handling.
669 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
670 * Group Mail Splitting::        Use group customize to drive mail splitting.
671 * Incorporating Old Mail::      What about the old mail you have?
672 * Expiring Mail::               Getting rid of unwanted mail.
673 * Washing Mail::                Removing cruft from the mail you get.
674 * Duplicates::                  Dealing with duplicated mail.
675 * Not Reading Mail::            Using mail back ends for reading other files.
676 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
677
678 Mail Sources
679
680 * Mail Source Specifiers::      How to specify what a mail source is.
681 * Mail Source Customization::   Some variables that influence things.
682 * Fetching Mail::               Using the mail source specifiers.
683
684 Choosing a Mail Back End
685
686 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
687 * Babyl::                       Babyl was used by older versions of Rmail.
688 * Mail Spool::                  Store your mail in a private spool?
689 * MH Spool::                    An mhspool-like back end.
690 * Maildir::                     Another one-file-per-message format.
691 * Mail Folders::                Having one file for each group.
692 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
693
694 Browsing the Web
695
696 * Archiving Mail::
697 * Web Searches::                Creating groups from articles that match a string.
698 * RSS::                         Reading RDF site summary.
699 * Customizing W3::              Doing stuff to Emacs/W3 from Gnus.
700
701 @acronym{IMAP}
702
703 * Splitting in IMAP::           Splitting mail with nnimap.
704 * Expiring in IMAP::            Expiring mail with nnimap.
705 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
706 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
707 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
708 * Debugging IMAP::              What to do when things don't work.
709
710 Other Sources
711
712 * Directory Groups::            You can read a directory as if it was a newsgroup.
713 * Anything Groups::             Dired?  Who needs dired?
714 * Document Groups::             Single files can be the basis of a group.
715 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
716
717 Document Groups
718
719 * Document Server Internals::   How to add your own document types.
720
721 Combined Groups
722
723 * Virtual Groups::              Combining articles from many groups.
724
725 Email Based Diary
726
727 * The NNDiary Back End::        Basic setup and usage.
728 * The Gnus Diary Library::      Utility toolkit on top of nndiary.
729 * Sending or Not Sending::      A final note on sending diary messages.
730
731 The NNDiary Back End
732
733 * Diary Messages::              What makes a message valid for nndiary.
734 * Running NNDiary::             NNDiary has two modes of operation.
735 * Customizing NNDiary::         Bells and whistles.
736
737 The Gnus Diary Library
738
739 * Diary Summary Line Format::           A nicer summary buffer line format.
740 * Diary Articles Sorting::              A nicer way to sort messages.
741 * Diary Headers Generation::            Not doing it manually.
742 * Diary Group Parameters::              Not handling them manually.
743
744 Gnus Unplugged
745
746 * Agent Basics::                How it all is supposed to work.
747 * Agent Categories::            How to tell the Gnus Agent what to download.
748 * Agent Commands::              New commands for all the buffers.
749 * Agent Visuals::               Ways that the agent may effect your summary buffer.
750 * Agent as Cache::              The Agent is a big cache too.
751 * Agent Expiry::                How to make old articles go away.
752 * Agent Regeneration::          How to recover from lost connections and other accidents.
753 * Agent and flags::             How the Agent maintains flags.
754 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
755 * Outgoing Messages::           What happens when you post/mail something?
756 * Agent Variables::             Customizing is fun.
757 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
758 * Batching Agents::             How to fetch news from a @code{cron} job.
759 * Agent Caveats::               What you think it'll do and what it does.
760
761 Agent Categories
762
763 * Category Syntax::             What a category looks like.
764 * Category Buffer::             A buffer for maintaining categories.
765 * Category Variables::          Customize'r'Us.
766
767 Agent Commands
768
769 * Group Agent Commands::        Configure groups and fetch their contents.
770 * Summary Agent Commands::      Manually select then fetch specific articles.
771 * Server Agent Commands::       Select the servers that are supported by the agent.
772
773 Scoring
774
775 * Summary Score Commands::      Adding score entries for the current group.
776 * Group Score Commands::        General score commands.
777 * Score Variables::             Customize your scoring.  (My, what terminology).
778 * Score File Format::           What a score file may contain.
779 * Score File Editing::          You can edit score files by hand as well.
780 * Adaptive Scoring::            Big Sister Gnus knows what you read.
781 * Home Score File::             How to say where new score entries are to go.
782 * Followups To Yourself::       Having Gnus notice when people answer you.
783 * Scoring On Other Headers::    Scoring on non-standard headers.
784 * Scoring Tips::                How to score effectively.
785 * Reverse Scoring::             That problem child of old is not problem.
786 * Global Score Files::          Earth-spanning, ear-splitting score files.
787 * Kill Files::                  They are still here, but they can be ignored.
788 * Converting Kill Files::       Translating kill files to score files.
789 * Advanced Scoring::            Using logical expressions to build score rules.
790 * Score Decays::                It can be useful to let scores wither away.
791
792 Advanced Scoring
793
794 * Advanced Scoring Syntax::     A definition.
795 * Advanced Scoring Examples::   What they look like.
796 * Advanced Scoring Tips::       Getting the most out of it.
797
798 Various
799
800 * Process/Prefix::              A convention used by many treatment commands.
801 * Interactive::                 Making Gnus ask you many questions.
802 * Symbolic Prefixes::           How to supply some Gnus functions with options.
803 * Formatting Variables::        You can specify what buffers should look like.
804 * Window Layout::               Configuring the Gnus buffer windows.
805 * Faces and Fonts::             How to change how faces look.
806 * Compilation::                 How to speed Gnus up.
807 * Mode Lines::                  Displaying information in the mode lines.
808 * Highlighting and Menus::      Making buffers look all nice and cozy.
809 * Buttons::                     Get tendinitis in ten easy steps!
810 * Daemons::                     Gnus can do things behind your back.
811 * NoCeM::                       How to avoid spam and other fatty foods.
812 * Undo::                        Some actions can be undone.
813 * Predicate Specifiers::        Specifying predicates.
814 * Moderation::                  What to do if you're a moderator.
815 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
816 * Fuzzy Matching::              What's the big fuzz?
817 * Thwarting Email Spam::        Simple ways to avoid unsolicited commercial email.
818 * Spam Package::                A package for filtering and processing spam.
819 * The Gnus Registry::           A package for tracking messages by Message-ID.
820 * Other modes::                 Interaction with other modes.
821 * Various Various::             Things that are really various.
822
823 Formatting Variables
824
825 * Formatting Basics::           A formatting variable is basically a format string.
826 * Mode Line Formatting::        Some rules about mode line formatting variables.
827 * Advanced Formatting::         Modifying output in various ways.
828 * User-Defined Specs::          Having Gnus call your own functions.
829 * Formatting Fonts::            Making the formatting look colorful and nice.
830 * Positioning Point::           Moving point to a position after an operation.
831 * Tabulation::                  Tabulating your output.
832 * Wide Characters::             Dealing with wide characters.
833
834 Image Enhancements
835
836 * X-Face::                      Display a funky, teensy black-and-white image.
837 * Face::                        Display a funkier, teensier colored image.
838 * Smileys::                     Show all those happy faces the way they were
839                                   meant to be shown.
840 * Picons::                      How to display pictures of what you're reading.
841 * XVarious::                    Other XEmacsy Gnusey variables.
842
843 Thwarting Email Spam
844
845 * The problem of spam::         Some background, and some solutions
846 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
847 * SpamAssassin::                How to use external anti-spam tools.
848 * Hashcash::                    Reduce spam by burning CPU time.
849
850 Spam Package
851
852 * Spam Package Introduction::
853 * Filtering Incoming Mail::
854 * Detecting Spam in Groups::
855 * Spam and Ham Processors::
856 * Spam Package Configuration Examples::
857 * Spam Back Ends::
858 * Extending the Spam package::
859 * Spam Statistics Package::
860
861 Spam Statistics Package
862
863 * Creating a spam-stat dictionary::
864 * Splitting mail using spam-stat::
865 * Low-level interface to the spam-stat dictionary::
866
867 Appendices
868
869 * XEmacs::                      Requirements for installing under XEmacs.
870 * History::                     How Gnus got where it is today.
871 * On Writing Manuals::          Why this is not a beginner's guide.
872 * Terminology::                 We use really difficult, like, words here.
873 * Customization::               Tailoring Gnus to your needs.
874 * Troubleshooting::             What you might try if things do not work.
875 * Gnus Reference Guide::        Rilly, rilly technical stuff.
876 * Emacs for Heathens::          A short introduction to Emacsian terms.
877 * Frequently Asked Questions::  The Gnus FAQ
878
879 History
880
881 * Gnus Versions::               What Gnus versions have been released.
882 * Other Gnus Versions::         Other Gnus versions that also have been released.
883 * Why?::                        What's the point of Gnus?
884 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
885 * Conformity::                  Gnus tries to conform to all standards.
886 * Emacsen::                     Gnus can be run on a few modern Emacsen.
887 * Gnus Development::            How Gnus is developed.
888 * Contributors::                Oodles of people.
889 * New Features::                Pointers to some of the new stuff in Gnus.
890
891 New Features
892
893 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
894 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
895 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
896 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
897 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
898 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10/5.11.
899 * No Gnus::                     Very punny.
900
901 Customization
902
903 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
904 * Slow Terminal Connection::    You run a remote Emacs.
905 * Little Disk Space::           You feel that having large setup files is icky.
906 * Slow Machine::                You feel like buying a faster machine.
907
908 Gnus Reference Guide
909
910 * Gnus Utility Functions::      Common functions and variable to use.
911 * Back End Interface::          How Gnus communicates with the servers.
912 * Score File Syntax::           A BNF definition of the score file standard.
913 * Headers::                     How Gnus stores headers internally.
914 * Ranges::                      A handy format for storing mucho numbers.
915 * Group Info::                  The group info format.
916 * Extended Interactive::        Symbolic prefixes and stuff.
917 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
918 * Various File Formats::        Formats of files that Gnus use.
919
920 Back End Interface
921
922 * Required Back End Functions::  Functions that must be implemented.
923 * Optional Back End Functions::  Functions that need not be implemented.
924 * Error Messaging::             How to get messages and report errors.
925 * Writing New Back Ends::       Extending old back ends.
926 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
927 * Mail-like Back Ends::         Some tips on mail back ends.
928
929 Various File Formats
930
931 * Active File Format::          Information on articles and groups available.
932 * Newsgroups File Format::      Group descriptions.
933
934 Emacs for Heathens
935
936 * Keystrokes::                  Entering text and executing commands.
937 * Emacs Lisp::                  The built-in Emacs programming language.
938
939 @end detailmenu
940 @end menu
941
942 @node Starting Up
943 @chapter Starting Gnus
944 @cindex starting up
945
946 If you haven't used Emacs much before using Gnus, read @ref{Emacs for
947 Heathens} first.
948
949 @kindex M-x gnus
950 @findex gnus
951 If your system administrator has set things up properly, starting Gnus
952 and reading news is extremely easy---you just type @kbd{M-x gnus} in
953 your Emacs.  If not, you should customize the variable
954 @code{gnus-select-method} as described in @ref{Finding the News}.  For a
955 minimal setup for posting should also customize the variables
956 @code{user-full-name} and @code{user-mail-address}.
957
958 @findex gnus-other-frame
959 @kindex M-x gnus-other-frame
960 If you want to start Gnus in a different frame, you can use the command
961 @kbd{M-x gnus-other-frame} instead.
962
963 If things do not go smoothly at startup, you have to twiddle some
964 variables in your @file{~/.gnus.el} file.  This file is similar to
965 @file{~/.emacs}, but is read when Gnus starts.
966
967 If you puzzle at any terms used in this manual, please refer to the
968 terminology section (@pxref{Terminology}).
969
970 @menu
971 * Finding the News::      Choosing a method for getting news.
972 * The First Time::        What does Gnus do the first time you start it?
973 * The Server is Down::    How can I read my mail then?
974 * Slave Gnusae::          You can have more than one Gnus active at a time.
975 * New Groups::            What is Gnus supposed to do with new groups?
976 * Changing Servers::      You may want to move from one server to another.
977 * Startup Files::         Those pesky startup files---@file{.newsrc}.
978 * Auto Save::             Recovering from a crash.
979 * The Active File::       Reading the active file over a slow line Takes Time.
980 * Startup Variables::     Other variables you might change.
981 @end menu
982
983
984 @node Finding the News
985 @section Finding the News
986 @cindex finding news
987
988 First of all, you should know that there is a special buffer called
989 @code{*Server*} that lists all the servers Gnus knows about.  You can
990 press @kbd{^} from the Group buffer to see it.  In the Server buffer,
991 you can press @kbd{RET} on a defined server to see all the groups it
992 serves (subscribed or not!).  You can also add or delete servers, edit
993 a foreign server's definition, agentize or de-agentize a server, and
994 do many other neat things.  @xref{Server Buffer}.  
995 @xref{Foreign Groups}.  @xref{Agent Basics}.
996
997 @vindex gnus-select-method
998 @c @head
999 The @code{gnus-select-method} variable says where Gnus should look for
1000 news.  This variable should be a list where the first element says
1001 @dfn{how} and the second element says @dfn{where}.  This method is your
1002 native method.  All groups not fetched with this method are
1003 foreign groups.
1004
1005 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
1006 you want to get your daily dosage of news from, you'd say:
1007
1008 @lisp
1009 (setq gnus-select-method '(nntp "news.somewhere.edu"))
1010 @end lisp
1011
1012 If you want to read directly from the local spool, say:
1013
1014 @lisp
1015 (setq gnus-select-method '(nnspool ""))
1016 @end lisp
1017
1018 If you can use a local spool, you probably should, as it will almost
1019 certainly be much faster.  But do not use the local spool if your
1020 server is running Leafnode (which is a simple, standalone private news
1021 server); in this case, use @code{(nntp "localhost")}.
1022
1023 @vindex gnus-nntpserver-file
1024 @cindex NNTPSERVER
1025 @cindex @acronym{NNTP} server
1026 If this variable is not set, Gnus will take a look at the
1027 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1028 Gnus will see whether @code{gnus-nntpserver-file}
1029 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1030 If that fails as well, Gnus will try to use the machine running Emacs
1031 as an @acronym{NNTP} server.  That's a long shot, though.
1032
1033 @vindex gnus-nntp-server
1034 If @code{gnus-nntp-server} is set, this variable will override
1035 @code{gnus-select-method}.  You should therefore set
1036 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1037
1038 @vindex gnus-secondary-servers
1039 @vindex gnus-nntp-server
1040 You can also make Gnus prompt you interactively for the name of an
1041 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1042 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1043 in the @code{gnus-secondary-servers} list (if any).  You can also just
1044 type in the name of any server you feel like visiting.  (Note that this
1045 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1046 gnus} later in the same Emacs session, Gnus will contact the same
1047 server.)
1048
1049 @findex gnus-group-browse-foreign-server
1050 @kindex B (Group)
1051 However, if you use one @acronym{NNTP} server regularly and are just
1052 interested in a couple of groups from a different server, you would be
1053 better served by using the @kbd{B} command in the group buffer.  It will
1054 let you have a look at what groups are available, and you can subscribe
1055 to any of the groups you want to.  This also makes @file{.newsrc}
1056 maintenance much tidier.  @xref{Foreign Groups}.
1057
1058 @vindex gnus-secondary-select-methods
1059 @c @head
1060 A slightly different approach to foreign groups is to set the
1061 @code{gnus-secondary-select-methods} variable.  The select methods
1062 listed in this variable are in many ways just as native as the
1063 @code{gnus-select-method} server.  They will also be queried for active
1064 files during startup (if that's required), and new newsgroups that
1065 appear on these servers will be subscribed (or not) just as native
1066 groups are.
1067
1068 For instance, if you use the @code{nnmbox} back end to read your mail,
1069 you would typically set this variable to
1070
1071 @lisp
1072 (setq gnus-secondary-select-methods '((nnmbox "")))
1073 @end lisp
1074
1075 Note: the @acronym{NNTP} back end stores marks in marks files
1076 (@pxref{NNTP marks}).  This feature makes it easy to share marks between
1077 several Gnus installations, but may slow down things a bit when fetching
1078 new articles.  @xref{NNTP marks}, for more information.
1079
1080
1081 @node The First Time
1082 @section The First Time
1083 @cindex first time usage
1084
1085 If no startup files exist (@pxref{Startup Files}), Gnus will try to
1086 determine what groups should be subscribed by default.
1087
1088 @vindex gnus-default-subscribed-newsgroups
1089 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1090 will subscribe you to just those groups in that list, leaving the rest
1091 killed.  Your system administrator should have set this variable to
1092 something useful.
1093
1094 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1095 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1096 here as @dfn{whatever Lars thinks you should read}.)
1097
1098 You'll also be subscribed to the Gnus documentation group, which should
1099 help you with most common problems.
1100
1101 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1102 use the normal functions for handling new groups, and not do anything
1103 special.
1104
1105
1106 @node The Server is Down
1107 @section The Server is Down
1108 @cindex server errors
1109
1110 If the default server is down, Gnus will understandably have some
1111 problems starting.  However, if you have some mail groups in addition to
1112 the news groups, you may want to start Gnus anyway.
1113
1114 Gnus, being the trusting sort of program, will ask whether to proceed
1115 without a native select method if that server can't be contacted.  This
1116 will happen whether the server doesn't actually exist (i.e., you have
1117 given the wrong address) or the server has just momentarily taken ill
1118 for some reason or other.  If you decide to continue and have no foreign
1119 groups, you'll find it difficult to actually do anything in the group
1120 buffer.  But, hey, that's your problem.  Blllrph!
1121
1122 @findex gnus-no-server
1123 @kindex M-x gnus-no-server
1124 @c @head
1125 If you know that the server is definitely down, or you just want to read
1126 your mail without bothering with the server at all, you can use the
1127 @code{gnus-no-server} command to start Gnus.  That might come in handy
1128 if you're in a hurry as well.  This command will not attempt to contact
1129 your primary server---instead, it will just activate all groups on level
1130 1 and 2.  (You should preferably keep no native groups on those two
1131 levels.) Also @pxref{Group Levels}.
1132
1133
1134 @node Slave Gnusae
1135 @section Slave Gnusae
1136 @cindex slave
1137
1138 You might want to run more than one Emacs with more than one Gnus at the
1139 same time.  If you are using different @file{.newsrc} files (e.g., if you
1140 are using the two different Gnusae to read from two different servers),
1141 that is no problem whatsoever.  You just do it.
1142
1143 The problem appears when you want to run two Gnusae that use the same
1144 @file{.newsrc} file.
1145
1146 To work around that problem some, we here at the Think-Tank at the Gnus
1147 Towers have come up with a new concept: @dfn{Masters} and
1148 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1149 taken out a copyright on those words.  If you wish to use those words in
1150 conjunction with each other, you have to send $1 per usage instance to
1151 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1152 Applications}) will be much more expensive, of course.)
1153
1154 @findex gnus-slave
1155 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1156 however you do it).  Each subsequent slave Gnusae should be started with
1157 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1158 files, but instead save @dfn{slave files} that contain information only
1159 on what groups have been read in the slave session.  When a master Gnus
1160 starts, it will read (and delete) these slave files, incorporating all
1161 information from them.  (The slave files will be read in the sequence
1162 they were created, so the latest changes will have precedence.)
1163
1164 Information from the slave files has, of course, precedence over the
1165 information in the normal (i.e., master) @file{.newsrc} file.
1166
1167 If the @file{.newsrc*} files have not been saved in the master when the
1168 slave starts, you may be prompted as to whether to read an auto-save
1169 file.  If you answer ``yes'', the unsaved changes to the master will be
1170 incorporated into the slave.  If you answer ``no'', the slave may see some
1171 messages as unread that have been read in the master.
1172
1173
1174
1175 @node New Groups
1176 @section New Groups
1177 @cindex new groups
1178 @cindex subscription
1179
1180 @vindex gnus-check-new-newsgroups
1181 If you are satisfied that you really never want to see any new groups,
1182 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1183 also save you some time at startup.  Even if this variable is
1184 @code{nil}, you can always subscribe to the new groups just by pressing
1185 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1186 is @code{ask-server} by default.  If you set this variable to
1187 @code{always}, then Gnus will query the back ends for new groups even
1188 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1189
1190 @menu
1191 * Checking New Groups::         Determining what groups are new.
1192 * Subscription Methods::        What Gnus should do with new groups.
1193 * Filtering New Groups::        Making Gnus ignore certain new groups.
1194 @end menu
1195
1196
1197 @node Checking New Groups
1198 @subsection Checking New Groups
1199
1200 Gnus normally determines whether a group is new or not by comparing the
1201 list of groups from the active file(s) with the lists of subscribed and
1202 dead groups.  This isn't a particularly fast method.  If
1203 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1204 server for new groups since the last time.  This is both faster and
1205 cheaper.  This also means that you can get rid of the list of killed
1206 groups altogether, so you may set @code{gnus-save-killed-list} to
1207 @code{nil}, which will save time both at startup, at exit, and all over.
1208 Saves disk space, too.  Why isn't this the default, then?
1209 Unfortunately, not all servers support this command.
1210
1211 I bet I know what you're thinking now: How do I find out whether my
1212 server supports @code{ask-server}?  No?  Good, because I don't have a
1213 fail-safe answer.  I would suggest just setting this variable to
1214 @code{ask-server} and see whether any new groups appear within the next
1215 few days.  If any do, then it works.  If none do, then it doesn't
1216 work.  I could write a function to make Gnus guess whether the server
1217 supports @code{ask-server}, but it would just be a guess.  So I won't.
1218 You could @code{telnet} to the server and say @code{HELP} and see
1219 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1220 it does, then it might work.  (But there are servers that lists
1221 @samp{NEWGROUPS} without supporting the function properly.)
1222
1223 This variable can also be a list of select methods.  If so, Gnus will
1224 issue an @code{ask-server} command to each of the select methods, and
1225 subscribe them (or not) using the normal methods.  This might be handy
1226 if you are monitoring a few servers for new groups.  A side effect is
1227 that startup will take much longer, so you can meditate while waiting.
1228 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1229
1230
1231 @node Subscription Methods
1232 @subsection Subscription Methods
1233
1234 @vindex gnus-subscribe-newsgroup-method
1235 What Gnus does when it encounters a new group is determined by the
1236 @code{gnus-subscribe-newsgroup-method} variable.
1237
1238 This variable should contain a function.  This function will be called
1239 with the name of the new group as the only parameter.
1240
1241 Some handy pre-fab functions are:
1242
1243 @table @code
1244
1245 @item gnus-subscribe-zombies
1246 @vindex gnus-subscribe-zombies
1247 Make all new groups zombies.  This is the default.  You can browse the
1248 zombies later (with @kbd{A z}) and either kill them all off properly
1249 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1250
1251 @item gnus-subscribe-randomly
1252 @vindex gnus-subscribe-randomly
1253 Subscribe all new groups in arbitrary order.  This really means that all
1254 new groups will be added at ``the top'' of the group buffer.
1255
1256 @item gnus-subscribe-alphabetically
1257 @vindex gnus-subscribe-alphabetically
1258 Subscribe all new groups in alphabetical order.
1259
1260 @item gnus-subscribe-hierarchically
1261 @vindex gnus-subscribe-hierarchically
1262 Subscribe all new groups hierarchically.  The difference between this
1263 function and @code{gnus-subscribe-alphabetically} is slight.
1264 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1265 alphabetical fashion, while this function will enter groups into its
1266 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1267 @samp{comp} hierarchy, this function will not mess that configuration
1268 up.  Or something like that.
1269
1270 @item gnus-subscribe-interactively
1271 @vindex gnus-subscribe-interactively
1272 Subscribe new groups interactively.  This means that Gnus will ask
1273 you about @strong{all} new groups.  The groups you choose to subscribe
1274 to will be subscribed hierarchically.
1275
1276 @item gnus-subscribe-killed
1277 @vindex gnus-subscribe-killed
1278 Kill all new groups.
1279
1280 @item gnus-subscribe-topics
1281 @vindex gnus-subscribe-topics
1282 Put the groups into the topic that has a matching @code{subscribe} topic
1283 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1284 topic parameter that looks like
1285
1286 @example
1287 "nnml"
1288 @end example
1289
1290 will mean that all groups that match that regex will be subscribed under
1291 that topic.
1292
1293 If no topics match the groups, the groups will be subscribed in the
1294 top-level topic.
1295
1296 @end table
1297
1298 @vindex gnus-subscribe-hierarchical-interactive
1299 A closely related variable is
1300 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1301 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1302 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1303 will ask you for each sub-hierarchy whether you want to descend the
1304 hierarchy or not.
1305
1306 One common mistake is to set the variable a few paragraphs above
1307 (@code{gnus-subscribe-newsgroup-method}) to
1308 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1309 will not work.  This is ga-ga.  So don't do it.
1310
1311
1312 @node Filtering New Groups
1313 @subsection Filtering New Groups
1314
1315 A nice and portable way to control which new newsgroups should be
1316 subscribed (or ignored) is to put an @dfn{options} line at the start of
1317 the @file{.newsrc} file.  Here's an example:
1318
1319 @example
1320 options -n !alt.all !rec.all sci.all
1321 @end example
1322
1323 @vindex gnus-subscribe-options-newsgroup-method
1324 This line obviously belongs to a serious-minded intellectual scientific
1325 person (or she may just be plain old boring), because it says that all
1326 groups that have names beginning with @samp{alt} and @samp{rec} should
1327 be ignored, and all groups with names beginning with @samp{sci} should
1328 be subscribed.  Gnus will not use the normal subscription method for
1329 subscribing these groups.
1330 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1331 variable defaults to @code{gnus-subscribe-alphabetically}.
1332
1333 @vindex gnus-options-not-subscribe
1334 @vindex gnus-options-subscribe
1335 If you don't want to mess with your @file{.newsrc} file, you can just
1336 set the two variables @code{gnus-options-subscribe} and
1337 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1338 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1339 and if the new group matches the former, it will be unconditionally
1340 subscribed, and if it matches the latter, it will be ignored.
1341
1342 @vindex gnus-auto-subscribed-groups
1343 Yet another variable that meddles here is
1344 @code{gnus-auto-subscribed-groups}.  It works exactly like
1345 @code{gnus-options-subscribe}, and is therefore really superfluous,
1346 but I thought it would be nice to have two of these.  This variable is
1347 more meant for setting some ground rules, while the other variable is
1348 used more for user fiddling.  By default this variable makes all new
1349 groups that come from mail back ends (@code{nnml}, @code{nnbabyl},
1350 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1351 subscribed.  If you don't like that, just set this variable to
1352 @code{nil}.
1353
1354 New groups that match this regexp are subscribed using
1355 @code{gnus-subscribe-options-newsgroup-method}.
1356
1357
1358 @node Changing Servers
1359 @section Changing Servers
1360 @cindex changing servers
1361
1362 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1363 This happens very rarely, but perhaps you change jobs, or one server is
1364 very flaky and you want to use another.
1365
1366 Changing the server is pretty easy, right?  You just change
1367 @code{gnus-select-method} to point to the new server?
1368
1369 @emph{Wrong!}
1370
1371 Article numbers are not (in any way) kept synchronized between different
1372 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1373 you have read is by keeping track of article numbers.  So when you
1374 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1375 worthless.
1376
1377 @kindex M-x gnus-group-clear-data-on-native-groups
1378 @findex gnus-group-clear-data-on-native-groups
1379 You can use the @kbd{M-x gnus-group-clear-data-on-native-groups}
1380 command to clear out all data that you have on your native groups.
1381 Use with caution.
1382
1383 @kindex M-x gnus-group-clear-data
1384 @findex gnus-group-clear-data
1385 Clear the data from the current group only---nix out marks and the
1386 list of read articles (@code{gnus-group-clear-data}).
1387
1388 After changing servers, you @strong{must} move the cache hierarchy away,
1389 since the cached articles will have wrong article numbers, which will
1390 affect which articles Gnus thinks are read.
1391 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1392 to have it done automatically; for @code{gnus-group-clear-data}, you
1393 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1394 cache for all groups).
1395
1396
1397 @node Startup Files
1398 @section Startup Files
1399 @cindex startup files
1400 @cindex .newsrc
1401 @cindex .newsrc.el
1402 @cindex .newsrc.eld
1403
1404 Most common Unix news readers use a shared startup file called
1405 @file{.newsrc}.  This file contains all the information about what
1406 groups are subscribed, and which articles in these groups have been
1407 read.
1408
1409 Things got a bit more complicated with @sc{gnus}.  In addition to
1410 keeping the @file{.newsrc} file updated, it also used a file called
1411 @file{.newsrc.el} for storing all the information that didn't fit into
1412 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1413 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1414 files was the most recently saved, which enabled people to swap between
1415 @sc{gnus} and other newsreaders.
1416
1417 That was kinda silly, so Gnus went one better: In addition to the
1418 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1419 @file{.newsrc.eld}.  It will read whichever of these files that are most
1420 recent, but it will never write a @file{.newsrc.el} file.  You should
1421 never delete the @file{.newsrc.eld} file---it contains much information
1422 not stored in the @file{.newsrc} file.
1423
1424 @vindex gnus-save-newsrc-file
1425 @vindex gnus-read-newsrc-file
1426 You can turn off writing the @file{.newsrc} file by setting
1427 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1428 the file and save some space, as well as exiting from Gnus faster.
1429 However, this will make it impossible to use other newsreaders than
1430 Gnus.  But hey, who would want to, right?  Similarly, setting
1431 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1432 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which can be
1433 convenient if you use a different news reader occasionally, and you
1434 want to read a different subset of the available groups with that
1435 news reader.
1436
1437 @vindex gnus-save-killed-list
1438 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1439 will not save the list of killed groups to the startup file.  This will
1440 save both time (when starting and quitting) and space (on disk).  It
1441 will also mean that Gnus has no record of what groups are new or old,
1442 so the automatic new groups subscription methods become meaningless.
1443 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1444 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1445 Groups}).  This variable can also be a regular expression.  If that's
1446 the case, remove all groups that do not match this regexp before
1447 saving.  This can be useful in certain obscure situations that involve
1448 several servers where not all servers support @code{ask-server}.
1449
1450 @vindex gnus-startup-file
1451 @vindex gnus-backup-startup-file
1452 @vindex version-control
1453 The @code{gnus-startup-file} variable says where the startup files are.
1454 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1455 file being whatever that one is, with a @samp{.eld} appended.
1456 If you want version control for this file, set
1457 @code{gnus-backup-startup-file}.  It respects the same values as the
1458 @code{version-control} variable.
1459
1460 @vindex gnus-save-newsrc-hook
1461 @vindex gnus-save-quick-newsrc-hook
1462 @vindex gnus-save-standard-newsrc-hook
1463 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1464 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1465 saving the @file{.newsrc.eld} file, and
1466 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1467 @file{.newsrc} file.  The latter two are commonly used to turn version
1468 control on or off.  Version control is on by default when saving the
1469 startup files.  If you want to turn backup creation off, say something like:
1470
1471 @lisp
1472 (defun turn-off-backup ()
1473   (set (make-local-variable 'backup-inhibited) t))
1474
1475 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1476 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1477 @end lisp
1478
1479 @vindex gnus-init-file
1480 @vindex gnus-site-init-file
1481 When Gnus starts, it will read the @code{gnus-site-init-file}
1482 (@file{.../site-lisp/gnus-init} by default) and @code{gnus-init-file}
1483 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1484 and can be used to avoid cluttering your @file{~/.emacs} and
1485 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1486 with the same names as these, but with @file{.elc} and @file{.el}
1487 suffixes.  In other words, if you have set @code{gnus-init-file} to
1488 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1489 and finally @file{~/.gnus} (in this order).  If Emacs was invoked with
1490 the @option{-q} or @option{--no-init-file} options (@pxref{Initial
1491 Options, ,Initial Options, emacs, The Emacs Manual}), Gnus doesn't read
1492 @code{gnus-init-file}.
1493
1494
1495 @node Auto Save
1496 @section Auto Save
1497 @cindex dribble file
1498 @cindex auto-save
1499
1500 Whenever you do something that changes the Gnus data (reading articles,
1501 catching up, killing/subscribing groups), the change is added to a
1502 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1503 Emacs way.  If your Emacs should crash before you have saved the
1504 @file{.newsrc} files, all changes you have made can be recovered from
1505 this file.
1506
1507 If Gnus detects this file at startup, it will ask the user whether to
1508 read it.  The auto save file is deleted whenever the real startup file is
1509 saved.
1510
1511 @vindex gnus-use-dribble-file
1512 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1513 maintain a dribble buffer.  The default is @code{t}.
1514
1515 @vindex gnus-dribble-directory
1516 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1517 this variable is @code{nil}, which it is by default, Gnus will dribble
1518 into the directory where the @file{.newsrc} file is located.  (This is
1519 normally the user's home directory.)  The dribble file will get the same
1520 file permissions as the @file{.newsrc} file.
1521
1522 @vindex gnus-always-read-dribble-file
1523 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1524 read the dribble file on startup without querying the user.
1525
1526
1527 @node The Active File
1528 @section The Active File
1529 @cindex active file
1530 @cindex ignored groups
1531
1532 When Gnus starts, or indeed whenever it tries to determine whether new
1533 articles have arrived, it reads the active file.  This is a very large
1534 file that lists all the active groups and articles on the server.
1535
1536 @vindex gnus-ignored-newsgroups
1537 Before examining the active file, Gnus deletes all lines that match the
1538 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1539 any groups with bogus names, but you can use this variable to make Gnus
1540 ignore hierarchies you aren't ever interested in.  However, this is not
1541 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1542 Groups} for an overview of other variables that can be used instead.
1543
1544 @c This variable is
1545 @c @code{nil} by default, and will slow down active file handling somewhat
1546 @c if you set it to anything else.
1547
1548 @vindex gnus-read-active-file
1549 @c @head
1550 The active file can be rather Huge, so if you have a slow network, you
1551 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1552 reading the active file.  This variable is @code{some} by default.
1553
1554 Gnus will try to make do by getting information just on the groups that
1555 you actually subscribe to.
1556
1557 Note that if you subscribe to lots and lots of groups, setting this
1558 variable to @code{nil} will probably make Gnus slower, not faster.  At
1559 present, having this variable @code{nil} will slow Gnus down
1560 considerably, unless you read news over a 2400 baud modem.
1561
1562 This variable can also have the value @code{some}.  Gnus will then
1563 attempt to read active info only on the subscribed groups.  On some
1564 servers this is quite fast (on sparkling, brand new INN servers that
1565 support the @code{LIST ACTIVE group} command), on others this isn't fast
1566 at all.  In any case, @code{some} should be faster than @code{nil}, and
1567 is certainly faster than @code{t} over slow lines.
1568
1569 Some news servers (old versions of Leafnode and old versions of INN, for
1570 instance) do not support the @code{LIST ACTIVE group}.  For these
1571 servers, @code{nil} is probably the most efficient value for this
1572 variable.
1573
1574 If this variable is @code{nil}, Gnus will ask for group info in total
1575 lock-step, which isn't very fast.  If it is @code{some} and you use an
1576 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1577 read all the replies in one swoop.  This will normally result in better
1578 performance, but if the server does not support the aforementioned
1579 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1580
1581 If you think that starting up Gnus takes too long, try all the three
1582 different values for this variable and see what works best for you.
1583
1584 In any case, if you use @code{some} or @code{nil}, you should definitely
1585 kill all groups that you aren't interested in to speed things up.
1586
1587 Note that this variable also affects active file retrieval from
1588 secondary select methods.
1589
1590
1591 @node Startup Variables
1592 @section Startup Variables
1593
1594 @table @code
1595
1596 @item gnus-load-hook
1597 @vindex gnus-load-hook
1598 A hook run while Gnus is being loaded.  Note that this hook will
1599 normally be run just once in each Emacs session, no matter how many
1600 times you start Gnus.
1601
1602 @item gnus-before-startup-hook
1603 @vindex gnus-before-startup-hook
1604 A hook called as the first thing when Gnus is started.
1605
1606 @item gnus-startup-hook
1607 @vindex gnus-startup-hook
1608 A hook run as the very last thing after starting up Gnus
1609
1610 @item gnus-started-hook
1611 @vindex gnus-started-hook
1612 A hook that is run as the very last thing after starting up Gnus
1613 successfully.
1614
1615 @item gnus-setup-news-hook
1616 @vindex gnus-setup-news-hook
1617 A hook that is run after reading the @file{.newsrc} file(s), but before
1618 generating the group buffer.
1619
1620 @item gnus-check-bogus-newsgroups
1621 @vindex gnus-check-bogus-newsgroups
1622 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1623 startup.  A @dfn{bogus group} is a group that you have in your
1624 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1625 bogus groups can take quite a while, so to save time and resources it's
1626 best to leave this option off, and do the checking for bogus groups once
1627 in a while from the group buffer instead (@pxref{Group Maintenance}).
1628
1629 @item gnus-inhibit-startup-message
1630 @vindex gnus-inhibit-startup-message
1631 If non-@code{nil}, the startup message won't be displayed.  That way,
1632 your boss might not notice as easily that you are reading news instead
1633 of doing your job.  Note that this variable is used before
1634 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1635
1636 @item gnus-no-groups-message
1637 @vindex gnus-no-groups-message
1638 Message displayed by Gnus when no groups are available.
1639
1640 @item gnus-play-startup-jingle
1641 @vindex gnus-play-startup-jingle
1642 If non-@code{nil}, play the Gnus jingle at startup.
1643
1644 @item gnus-startup-jingle
1645 @vindex gnus-startup-jingle
1646 Jingle to be played if the above variable is non-@code{nil}.  The
1647 default is @samp{Tuxedomoon.Jingle4.au}.
1648
1649 @end table
1650
1651
1652 @node Group Buffer
1653 @chapter Group Buffer
1654 @cindex group buffer
1655
1656 @c Alex Schroeder suggests to rearrange this as follows:
1657 @c
1658 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1659 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1660 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1661 @c   7. Group Score, 8. Group Buffer Format
1662 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1663 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1664 @c <kensanata> First, "Gnus considers groups... (default 9)."
1665 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1666 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1667 @c <kensanata> Then expand the next paragraph or add some more to it.
1668 @c    This short one sentence explains levels 1 and 2, therefore I understand
1669 @c    that I should keep important news at 3 and boring news at 4.
1670 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1671 @c    Maybe keep those that you don't want to read temporarily at 6,
1672 @c    those that you never want to read at 8, those that offend your
1673 @c    human rights at 9...
1674
1675
1676 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1677 is the first buffer shown when Gnus starts, and will never be killed as
1678 long as Gnus is active.
1679
1680 @iftex
1681 @iflatex
1682 \gnusfigure{The Group Buffer}{320}{
1683 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1684 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1685 \put(120,38){\vector(1,2){10}}
1686 \put(40,60){\makebox(0,0)[r]{Mode line}}
1687 \put(40,58){\vector(1,0){30}}
1688 \put(200,28){\makebox(0,0)[t]{Native select method}}
1689 \put(200,26){\vector(-1,2){15}}
1690 }
1691 @end iflatex
1692 @end iftex
1693
1694 @menu
1695 * Group Buffer Format::         Information listed and how you can change it.
1696 * Group Maneuvering::           Commands for moving in the group buffer.
1697 * Selecting a Group::           Actually reading news.
1698 * Subscription Commands::       Unsubscribing, killing, subscribing.
1699 * Group Data::                  Changing the info for a group.
1700 * Group Levels::                Levels? What are those, then?
1701 * Group Score::                 A mechanism for finding out what groups you like.
1702 * Marking Groups::              You can mark groups for later processing.
1703 * Foreign Groups::              Creating and editing groups.
1704 * Group Parameters::            Each group may have different parameters set.
1705 * Listing Groups::              Gnus can list various subsets of the groups.
1706 * Sorting Groups::              Re-arrange the group order.
1707 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1708 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1709 * Exiting Gnus::                Stop reading news and get some work done.
1710 * Group Topics::                A folding group mode divided into topics.
1711 * Non-ASCII Group Names::       Accessing groups of non-English names.
1712 * Searching::                   Mail search engines.
1713 * Misc Group Stuff::            Other stuff that you can to do.
1714 @end menu
1715
1716
1717 @node Group Buffer Format
1718 @section Group Buffer Format
1719
1720 @menu
1721 * Group Line Specification::    Deciding how the group buffer is to look.
1722 * Group Mode Line Specification::  The group buffer mode line.
1723 * Group Highlighting::          Having nice colors in the group buffer.
1724 @end menu
1725
1726 You can customize the Group Mode tool bar, see @kbd{M-x
1727 customize-apropos RET gnus-group-tool-bar}.  This feature is only
1728 available in Emacs.
1729
1730 The tool bar icons are now (de)activated correctly depending on the
1731 cursor position.  Therefore, moving around in the Group Buffer is
1732 slower.  You can disable this via the variable
1733 @code{gnus-group-update-tool-bar}.  Its default value depends on your
1734 Emacs version.
1735
1736 @node Group Line Specification
1737 @subsection Group Line Specification
1738 @cindex group buffer format
1739
1740 The default format of the group buffer is nice and dull, but you can
1741 make it as exciting and ugly as you feel like.
1742
1743 Here's a couple of example group lines:
1744
1745 @example
1746      25: news.announce.newusers
1747  *    0: alt.fan.andrea-dworkin
1748 @end example
1749
1750 Quite simple, huh?
1751
1752 You can see that there are 25 unread articles in
1753 @samp{news.announce.newusers}.  There are no unread articles, but some
1754 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1755 asterisk at the beginning of the line?).
1756
1757 @vindex gnus-group-line-format
1758 You can change that format to whatever you want by fiddling with the
1759 @code{gnus-group-line-format} variable.  This variable works along the
1760 lines of a @code{format} specification, which is pretty much the same as
1761 a @code{printf} specifications, for those of you who use (feh!) C.
1762 @xref{Formatting Variables}.
1763
1764 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1765
1766 There should always be a colon on the line; the cursor always moves to
1767 the colon after performing an operation.  @xref{Positioning
1768 Point}.  Nothing else is required---not even the group name.  All
1769 displayed text is just window dressing, and is never examined by Gnus.
1770 Gnus stores all real information it needs using text properties.
1771
1772 (Note that if you make a really strange, wonderful, spreadsheet-like
1773 layout, everybody will believe you are hard at work with the accounting
1774 instead of wasting time reading news.)
1775
1776 Here's a list of all available format characters:
1777
1778 @table @samp
1779
1780 @item M
1781 An asterisk if the group only has marked articles.
1782
1783 @item S
1784 Whether the group is subscribed.
1785
1786 @item L
1787 Level of subscribedness.
1788
1789 @item N
1790 Number of unread articles.
1791
1792 @item I
1793 Number of dormant articles.
1794
1795 @item T
1796 Number of ticked articles.
1797
1798 @item R
1799 Number of read articles.
1800
1801 @item U
1802 Number of unseen articles.
1803
1804 @item t
1805 Estimated total number of articles.  (This is really @var{max-number}
1806 minus @var{min-number} plus 1.)
1807
1808 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1809 efficient access to @var{max-number} and @var{min-number} but getting
1810 the true unread message count is not possible efficiently.  For
1811 hysterical raisins, even the mail back ends, where the true number of
1812 unread messages might be available efficiently, use the same limited
1813 interface.  To remove this restriction from Gnus means that the back
1814 end interface has to be changed, which is not an easy job.
1815
1816 The nnml backend (@pxref{Mail Spool}) has a feature called ``group
1817 compaction'' which circumvents this deficiency: the idea is to
1818 renumber all articles from 1, removing all gaps between numbers, hence
1819 getting a correct total count.  Other backends may support this in the
1820 future.  In order to keep your total article count relatively up to
1821 date, you might want to compact your groups (or even directly your
1822 server) from time to time. @xref{Misc Group Stuff}, @xref{Server Commands}.
1823
1824 @item y
1825 Number of unread, unticked, non-dormant articles.
1826
1827 @item i
1828 Number of ticked and dormant articles.
1829
1830 @item g
1831 Full group name.
1832
1833 @item G
1834 Group name.
1835
1836 @item C
1837 Group comment (@pxref{Group Parameters}) or group name if there is no
1838 comment element in the group parameters.
1839
1840 @item D
1841 Newsgroup description.  You need to read the group descriptions
1842 before these will appear, and to do that, you either have to set
1843 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1844 command.
1845
1846 @item o
1847 @samp{m} if moderated.
1848
1849 @item O
1850 @samp{(m)} if moderated.
1851
1852 @item s
1853 Select method.
1854
1855 @item B
1856 If the summary buffer for the group is open or not.
1857
1858 @item n
1859 Select from where.
1860
1861 @item z
1862 A string that looks like @samp{<%s:%n>} if a foreign select method is
1863 used.
1864
1865 @item P
1866 Indentation based on the level of the topic (@pxref{Group Topics}).
1867
1868 @item c
1869 @vindex gnus-group-uncollapsed-levels
1870 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1871 variable says how many levels to leave at the end of the group name.
1872 The default is 1---this will mean that group names like
1873 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1874
1875 @item m
1876 @vindex gnus-new-mail-mark
1877 @cindex %
1878 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1879 the group lately.
1880
1881 @item p
1882 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1883
1884 @item d
1885 A string that says when you last read the group (@pxref{Group
1886 Timestamp}).
1887
1888 @item F
1889 The disk space used by the articles fetched by both the cache and
1890 agent.  The value is automatically scaled to bytes(B), kilobytes(K),
1891 megabytes(M), or gigabytes(G) to minimize the column width.  A format
1892 of %7F is sufficient for a fixed-width column.
1893
1894 @item u
1895 User defined specifier.  The next character in the format string should
1896 be a letter.  Gnus will call the function
1897 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1898 following @samp{%u}.  The function will be passed a single dummy
1899 parameter as argument.  The function should return a string, which will
1900 be inserted into the buffer just like information from any other
1901 specifier.
1902 @end table
1903
1904 @cindex *
1905 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1906 if no info is available---for instance, if it is a non-activated foreign
1907 group, or a bogus native group.
1908
1909
1910 @node Group Mode Line Specification
1911 @subsection Group Mode Line Specification
1912 @cindex group mode line
1913
1914 @vindex gnus-group-mode-line-format
1915 The mode line can be changed by setting
1916 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1917 doesn't understand that many format specifiers:
1918
1919 @table @samp
1920 @item S
1921 The native news server.
1922 @item M
1923 The native select method.
1924 @end table
1925
1926
1927 @node Group Highlighting
1928 @subsection Group Highlighting
1929 @cindex highlighting
1930 @cindex group highlighting
1931
1932 @vindex gnus-group-highlight
1933 Highlighting in the group buffer is controlled by the
1934 @code{gnus-group-highlight} variable.  This is an alist with elements
1935 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1936 something non-@code{nil}, the @var{face} will be used on the line.
1937
1938 Here's an example value for this variable that might look nice if the
1939 background is dark:
1940
1941 @lisp
1942 (cond (window-system
1943        (setq custom-background-mode 'light)
1944        (defface my-group-face-1
1945          '((t (:foreground "Red" :bold t))) "First group face")
1946        (defface my-group-face-2
1947          '((t (:foreground "DarkSeaGreen4" :bold t)))
1948          "Second group face")
1949        (defface my-group-face-3
1950          '((t (:foreground "Green4" :bold t))) "Third group face")
1951        (defface my-group-face-4
1952          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1953        (defface my-group-face-5
1954          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1955
1956 (setq gnus-group-highlight
1957       '(((> unread 200) . my-group-face-1)
1958         ((and (< level 3) (zerop unread)) . my-group-face-2)
1959         ((< level 3) . my-group-face-3)
1960         ((zerop unread) . my-group-face-4)
1961         (t . my-group-face-5)))
1962 @end lisp
1963
1964 Also @pxref{Faces and Fonts}.
1965
1966 Variables that are dynamically bound when the forms are evaluated
1967 include:
1968
1969 @table @code
1970 @item group
1971 The group name.
1972 @item unread
1973 The number of unread articles in the group.
1974 @item method
1975 The select method.
1976 @item mailp
1977 Whether the group is a mail group.
1978 @item level
1979 The level of the group.
1980 @item score
1981 The score of the group.
1982 @item ticked
1983 The number of ticked articles in the group.
1984 @item total
1985 The total number of articles in the group.  Or rather,
1986 @var{max-number} minus @var{min-number} plus one.
1987 @item topic
1988 When using the topic minor mode, this variable is bound to the current
1989 topic being inserted.
1990 @end table
1991
1992 When the forms are @code{eval}ed, point is at the beginning of the line
1993 of the group in question, so you can use many of the normal Gnus
1994 functions for snarfing info on the group.
1995
1996 @vindex gnus-group-update-hook
1997 @findex gnus-group-highlight-line
1998 @code{gnus-group-update-hook} is called when a group line is changed.
1999 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
2000 calls @code{gnus-group-highlight-line} by default.
2001
2002
2003 @node Group Maneuvering
2004 @section Group Maneuvering
2005 @cindex group movement
2006
2007 All movement commands understand the numeric prefix and will behave as
2008 expected, hopefully.
2009
2010 @table @kbd
2011
2012 @item n
2013 @kindex n (Group)
2014 @findex gnus-group-next-unread-group
2015 Go to the next group that has unread articles
2016 (@code{gnus-group-next-unread-group}).
2017
2018 @item p
2019 @itemx DEL
2020 @kindex DEL (Group)
2021 @kindex p (Group)
2022 @findex gnus-group-prev-unread-group
2023 Go to the previous group that has unread articles
2024 (@code{gnus-group-prev-unread-group}).
2025
2026 @item N
2027 @kindex N (Group)
2028 @findex gnus-group-next-group
2029 Go to the next group (@code{gnus-group-next-group}).
2030
2031 @item P
2032 @kindex P (Group)
2033 @findex gnus-group-prev-group
2034 Go to the previous group (@code{gnus-group-prev-group}).
2035
2036 @item M-n
2037 @kindex M-n (Group)
2038 @findex gnus-group-next-unread-group-same-level
2039 Go to the next unread group on the same (or lower) level
2040 (@code{gnus-group-next-unread-group-same-level}).
2041
2042 @item M-p
2043 @kindex M-p (Group)
2044 @findex gnus-group-prev-unread-group-same-level
2045 Go to the previous unread group on the same (or lower) level
2046 (@code{gnus-group-prev-unread-group-same-level}).
2047 @end table
2048
2049 Three commands for jumping to groups:
2050
2051 @table @kbd
2052
2053 @item j
2054 @kindex j (Group)
2055 @findex gnus-group-jump-to-group
2056 Jump to a group (and make it visible if it isn't already)
2057 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2058 like living groups.
2059
2060 @item ,
2061 @kindex , (Group)
2062 @findex gnus-group-best-unread-group
2063 Jump to the unread group with the lowest level
2064 (@code{gnus-group-best-unread-group}).
2065
2066 @item .
2067 @kindex . (Group)
2068 @findex gnus-group-first-unread-group
2069 Jump to the first group with unread articles
2070 (@code{gnus-group-first-unread-group}).
2071 @end table
2072
2073 @vindex gnus-group-goto-unread
2074 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2075 commands will move to the next group, not the next unread group.  Even
2076 the commands that say they move to the next unread group.  The default
2077 is @code{t}.
2078
2079 @vindex gnus-summary-next-group-on-exit
2080 If @code{gnus-summary-next-group-on-exit} is @code{t}, when a summary is
2081 exited, the point in the group buffer is moved to the next unread group.
2082 Otherwise, the point is set to the group just exited.  The default is
2083 @code{t}.
2084
2085 @node Selecting a Group
2086 @section Selecting a Group
2087 @cindex group selection
2088
2089 @table @kbd
2090
2091 @item SPACE
2092 @kindex SPACE (Group)
2093 @findex gnus-group-read-group
2094 Select the current group, switch to the summary buffer and display the
2095 first unread article (@code{gnus-group-read-group}).  If there are no
2096 unread articles in the group, or if you give a non-numerical prefix to
2097 this command, Gnus will offer to fetch all the old articles in this
2098 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2099 determines the number of articles Gnus will fetch.  If @var{n} is
2100 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2101 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2102
2103 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2104 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2105 - 4 2 SPC} fetches the 42 oldest ones.
2106
2107 When you are in the group (in the Summary buffer), you can type
2108 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2109 ones.
2110
2111 @item RET
2112 @kindex RET (Group)
2113 @findex gnus-group-select-group
2114 Select the current group and switch to the summary buffer
2115 (@code{gnus-group-select-group}).  Takes the same arguments as
2116 @code{gnus-group-read-group}---the only difference is that this command
2117 does not display the first unread article automatically upon group
2118 entry.
2119
2120 @item M-RET
2121 @kindex M-RET (Group)
2122 @findex gnus-group-quick-select-group
2123 This does the same as the command above, but tries to do it with the
2124 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2125 scoring/killing will be performed, there will be no highlights and no
2126 expunging.  This might be useful if you're in a real hurry and have to
2127 enter some humongous group.  If you give a 0 prefix to this command
2128 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2129 which is useful if you want to toggle threading before generating the
2130 summary buffer (@pxref{Summary Generation Commands}).
2131
2132 @item M-SPACE
2133 @kindex M-SPACE (Group)
2134 @findex gnus-group-visible-select-group
2135 This is yet one more command that does the same as the @kbd{RET}
2136 command, but this one does it without expunging and hiding dormants
2137 (@code{gnus-group-visible-select-group}).
2138
2139 @item C-M-RET
2140 @kindex C-M-RET (Group)
2141 @findex gnus-group-select-group-ephemerally
2142 Finally, this command selects the current group ephemerally without
2143 doing any processing of its contents
2144 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2145 turned off.  Everything you do in the group after selecting it in this
2146 manner will have no permanent effects.
2147
2148 @end table
2149
2150 @vindex gnus-large-newsgroup
2151 The @code{gnus-large-newsgroup} variable says what Gnus should
2152 consider to be a big group.  If it is @code{nil}, no groups are
2153 considered big.  The default value is 200.  If the group has more
2154 (unread and/or ticked) articles than this, Gnus will query the user
2155 before entering the group.  The user can then specify how many
2156 articles should be fetched from the server.  If the user specifies a
2157 negative number (@var{-n}), the @var{n} oldest articles will be
2158 fetched.  If it is positive, the @var{n} articles that have arrived
2159 most recently will be fetched.
2160
2161 @vindex gnus-large-ephemeral-newsgroup
2162 @code{gnus-large-ephemeral-newsgroup} is the same as
2163 @code{gnus-large-newsgroup}, but is only used for ephemeral
2164 newsgroups.
2165
2166 @vindex gnus-newsgroup-maximum-articles
2167 In groups in some news servers, there might be a big gap between a few
2168 very old articles that will never be expired and the recent ones.  In
2169 such a case, the server will return the data like @code{(1 . 30000000)}
2170 for the @code{LIST ACTIVE group} command, for example.  Even if there
2171 are actually only the articles 1-10 and 29999900-30000000, Gnus doesn't
2172 know it at first and prepares for getting 30000000 articles.  However,
2173 it will consume hundreds megabytes of memories and might make Emacs get
2174 stuck as the case may be.  If you use such news servers, set the
2175 variable @code{gnus-newsgroup-maximum-articles} to a positive number.
2176 The value means that Gnus ignores articles other than this number of the
2177 latest ones in every group.  For instance, the value 10000 makes Gnus
2178 get only the articles 29990001-30000000 (if the latest article number is
2179 30000000 in a group).  Note that setting this variable to a number might
2180 prevent you from reading very old articles.  The default value of the
2181 variable @code{gnus-newsgroup-maximum-articles} is @code{nil}, which
2182 means Gnus never ignores old articles.
2183
2184 @vindex gnus-select-group-hook
2185 @vindex gnus-auto-select-first
2186 @vindex gnus-auto-select-subject
2187 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2188 automatically when entering a group with the @kbd{SPACE} command.
2189 Which article this is controlled by the
2190 @code{gnus-auto-select-subject} variable.  Valid values for this
2191 variable are:
2192
2193 @table @code
2194
2195 @item unread
2196 Place point on the subject line of the first unread article.
2197
2198 @item first
2199 Place point on the subject line of the first article.
2200
2201 @item unseen
2202 Place point on the subject line of the first unseen article.
2203
2204 @item unseen-or-unread
2205 Place point on the subject line of the first unseen article, and if
2206 there is no such article, place point on the subject line of the first
2207 unread article.
2208
2209 @item best
2210 Place point on the subject line of the highest-scored unread article.
2211
2212 @end table
2213
2214 This variable can also be a function.  In that case, that function
2215 will be called to place point on a subject line.
2216
2217 If you want to prevent automatic selection in some group (say, in a
2218 binary group with Huge articles) you can set the
2219 @code{gnus-auto-select-first} variable to @code{nil} in
2220 @code{gnus-select-group-hook}, which is called when a group is
2221 selected.
2222
2223
2224 @node Subscription Commands
2225 @section Subscription Commands
2226 @cindex subscription
2227
2228 @table @kbd
2229
2230 @item S t
2231 @itemx u
2232 @kindex S t (Group)
2233 @kindex u (Group)
2234 @findex gnus-group-unsubscribe-current-group
2235 @c @icon{gnus-group-unsubscribe}
2236 Toggle subscription to the current group
2237 (@code{gnus-group-unsubscribe-current-group}).
2238
2239 @item S s
2240 @itemx U
2241 @kindex S s (Group)
2242 @kindex U (Group)
2243 @findex gnus-group-unsubscribe-group
2244 Prompt for a group to subscribe, and then subscribe it.  If it was
2245 subscribed already, unsubscribe it instead
2246 (@code{gnus-group-unsubscribe-group}).
2247
2248 @item S k
2249 @itemx C-k
2250 @kindex S k (Group)
2251 @kindex C-k (Group)
2252 @findex gnus-group-kill-group
2253 @c @icon{gnus-group-kill-group}
2254 Kill the current group (@code{gnus-group-kill-group}).
2255
2256 @item S y
2257 @itemx C-y
2258 @kindex S y (Group)
2259 @kindex C-y (Group)
2260 @findex gnus-group-yank-group
2261 Yank the last killed group (@code{gnus-group-yank-group}).
2262
2263 @item C-x C-t
2264 @kindex C-x C-t (Group)
2265 @findex gnus-group-transpose-groups
2266 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2267 really a subscription command, but you can use it instead of a
2268 kill-and-yank sequence sometimes.
2269
2270 @item S w
2271 @itemx C-w
2272 @kindex S w (Group)
2273 @kindex C-w (Group)
2274 @findex gnus-group-kill-region
2275 Kill all groups in the region (@code{gnus-group-kill-region}).
2276
2277 @item S z
2278 @kindex S z (Group)
2279 @findex gnus-group-kill-all-zombies
2280 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2281
2282 @item S C-k
2283 @kindex S C-k (Group)
2284 @findex gnus-group-kill-level
2285 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2286 These groups can't be yanked back after killing, so this command should
2287 be used with some caution.  The only time where this command comes in
2288 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2289 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2290 kill off all unsubscribed groups that do not have message numbers in the
2291 @file{.newsrc} file.
2292
2293 @end table
2294
2295 Also @pxref{Group Levels}.
2296
2297
2298 @node Group Data
2299 @section Group Data
2300
2301 @table @kbd
2302
2303 @item c
2304 @kindex c (Group)
2305 @findex gnus-group-catchup-current
2306 @vindex gnus-group-catchup-group-hook
2307 @c @icon{gnus-group-catchup-current}
2308 Mark all unticked articles in this group as read
2309 (@code{gnus-group-catchup-current}).
2310 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2311 the group buffer.
2312
2313 @item C
2314 @kindex C (Group)
2315 @findex gnus-group-catchup-current-all
2316 Mark all articles in this group, even the ticked ones, as read
2317 (@code{gnus-group-catchup-current-all}).
2318
2319 @item M-c
2320 @kindex M-c (Group)
2321 @findex gnus-group-clear-data
2322 Clear the data from the current group---nix out marks and the list of
2323 read articles (@code{gnus-group-clear-data}).
2324
2325 @item M-x gnus-group-clear-data-on-native-groups
2326 @kindex M-x gnus-group-clear-data-on-native-groups
2327 @findex gnus-group-clear-data-on-native-groups
2328 If you have switched from one @acronym{NNTP} server to another, all your marks
2329 and read ranges have become worthless.  You can use this command to
2330 clear out all data that you have on your native groups.  Use with
2331 caution.
2332
2333 @end table
2334
2335
2336 @node Group Levels
2337 @section Group Levels
2338 @cindex group level
2339 @cindex level
2340
2341 All groups have a level of @dfn{subscribedness}.  For instance, if a
2342 group is on level 2, it is more subscribed than a group on level 5.  You
2343 can ask Gnus to just list groups on a given level or lower
2344 (@pxref{Listing Groups}), or to just check for new articles in groups on
2345 a given level or lower (@pxref{Scanning New Messages}).
2346
2347 Remember:  The higher the level of the group, the less important it is.
2348
2349 @table @kbd
2350
2351 @item S l
2352 @kindex S l (Group)
2353 @findex gnus-group-set-current-level
2354 Set the level of the current group.  If a numeric prefix is given, the
2355 next @var{n} groups will have their levels set.  The user will be
2356 prompted for a level.
2357 @end table
2358
2359 @vindex gnus-level-killed
2360 @vindex gnus-level-zombie
2361 @vindex gnus-level-unsubscribed
2362 @vindex gnus-level-subscribed
2363 Gnus considers groups from levels 1 to
2364 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2365 @code{gnus-level-subscribed} (exclusive) and
2366 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2367 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2368 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2369 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2370 same, but zombie and killed groups have no information on what articles
2371 you have read, etc, stored.  This distinction between dead and living
2372 groups isn't done because it is nice or clever, it is done purely for
2373 reasons of efficiency.
2374
2375 It is recommended that you keep all your mail groups (if any) on quite
2376 low levels (e.g. 1 or 2).
2377
2378 Maybe the following description of the default behavior of Gnus helps to
2379 understand what these levels are all about.  By default, Gnus shows you
2380 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2381 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2382 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2383 groups are hidden, in a way.
2384
2385 Zombie and killed groups are similar to unsubscribed groups in that they
2386 are hidden by default.  But they are different from subscribed and
2387 unsubscribed groups in that Gnus doesn't ask the news server for
2388 information (number of messages, number of unread messages) on zombie
2389 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2390 aren't interested in.  If most groups are killed, Gnus is faster.
2391
2392 Why does Gnus distinguish between zombie and killed groups?  Well, when
2393 a new group arrives on the server, Gnus by default makes it a zombie
2394 group.  This means that you are normally not bothered with new groups,
2395 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2396 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2397 list of killed groups.)
2398
2399 If you want to play with the level variables, you should show some care.
2400 Set them once, and don't touch them ever again.  Better yet, don't touch
2401 them at all unless you know exactly what you're doing.
2402
2403 @vindex gnus-level-default-unsubscribed
2404 @vindex gnus-level-default-subscribed
2405 Two closely related variables are @code{gnus-level-default-subscribed}
2406 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2407 which are the levels that new groups will be put on if they are
2408 (un)subscribed.  These two variables should, of course, be inside the
2409 relevant valid ranges.
2410
2411 @vindex gnus-keep-same-level
2412 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2413 will only move to groups of the same level (or lower).  In
2414 particular, going from the last article in one group to the next group
2415 will go to the next group of the same level (or lower).  This might be
2416 handy if you want to read the most important groups before you read the
2417 rest.
2418
2419 If this variable is @code{best}, Gnus will make the next newsgroup the
2420 one with the best level.
2421
2422 @vindex gnus-group-default-list-level
2423 All groups with a level less than or equal to
2424 @code{gnus-group-default-list-level} will be listed in the group buffer
2425 by default.
2426
2427 @vindex gnus-group-list-inactive-groups
2428 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2429 groups will be listed along with the unread groups.  This variable is
2430 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2431 listed.
2432
2433 @vindex gnus-group-use-permanent-levels
2434 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2435 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2436 use this level as the ``work'' level.
2437
2438 @vindex gnus-activate-level
2439 Gnus will normally just activate (i. e., query the server about) groups
2440 on level @code{gnus-activate-level} or less.  If you don't want to
2441 activate unsubscribed groups, for instance, you might set this variable
2442 to 5.  The default is 6.
2443
2444
2445 @node Group Score
2446 @section Group Score
2447 @cindex group score
2448 @cindex group rank
2449 @cindex rank
2450
2451 You would normally keep important groups on high levels, but that scheme
2452 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2453 group buffer according to how often you read groups, perhaps?  Within
2454 reason?
2455
2456 This is what @dfn{group score} is for.  You can have Gnus assign a score
2457 to each group through the mechanism described below.  You can then sort
2458 the group buffer based on this score.  Alternatively, you can sort on
2459 score and then level.  (Taken together, the level and the score is
2460 called the @dfn{rank} of the group.  A group that is on level 4 and has
2461 a score of 1 has a higher rank than a group on level 5 that has a score
2462 of 300.  (The level is the most significant part and the score is the
2463 least significant part.))
2464
2465 @findex gnus-summary-bubble-group
2466 If you want groups you read often to get higher scores than groups you
2467 read seldom you can add the @code{gnus-summary-bubble-group} function to
2468 the @code{gnus-summary-exit-hook} hook.  This will result (after
2469 sorting) in a bubbling sort of action.  If you want to see that in
2470 action after each summary exit, you can add
2471 @code{gnus-group-sort-groups-by-rank} or
2472 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2473 slow things down somewhat.
2474
2475
2476 @node Marking Groups
2477 @section Marking Groups
2478 @cindex marking groups
2479
2480 If you want to perform some command on several groups, and they appear
2481 subsequently in the group buffer, you would normally just give a
2482 numerical prefix to the command.  Most group commands will then do your
2483 bidding on those groups.
2484
2485 However, if the groups are not in sequential order, you can still
2486 perform a command on several groups.  You simply mark the groups first
2487 with the process mark and then execute the command.
2488
2489 @table @kbd
2490
2491 @item #
2492 @kindex # (Group)
2493 @itemx M m
2494 @kindex M m (Group)
2495 @findex gnus-group-mark-group
2496 Set the mark on the current group (@code{gnus-group-mark-group}).
2497
2498 @item M-#
2499 @kindex M-# (Group)
2500 @itemx M u
2501 @kindex M u (Group)
2502 @findex gnus-group-unmark-group
2503 Remove the mark from the current group
2504 (@code{gnus-group-unmark-group}).
2505
2506 @item M U
2507 @kindex M U (Group)
2508 @findex gnus-group-unmark-all-groups
2509 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2510
2511 @item M w
2512 @kindex M w (Group)
2513 @findex gnus-group-mark-region
2514 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2515
2516 @item M b
2517 @kindex M b (Group)
2518 @findex gnus-group-mark-buffer
2519 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2520
2521 @item M r
2522 @kindex M r (Group)
2523 @findex gnus-group-mark-regexp
2524 Mark all groups that match some regular expression
2525 (@code{gnus-group-mark-regexp}).
2526 @end table
2527
2528 Also @pxref{Process/Prefix}.
2529
2530 @findex gnus-group-universal-argument
2531 If you want to execute some command on all groups that have been marked
2532 with the process mark, you can use the @kbd{M-&}
2533 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2534 the command to be executed.
2535
2536
2537 @node Foreign Groups
2538 @section Foreign Groups
2539 @cindex foreign groups
2540
2541 Below are some group mode commands for making and editing general foreign
2542 groups, as well as commands to ease the creation of a few
2543 special-purpose groups.  All these commands insert the newly created
2544 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2545 consulted.
2546
2547 Changes from the group editing commands are stored in
2548 @file{~/.newsrc.eld} (@code{gnus-startup-file}).  An alternative is the
2549 variable @code{gnus-parameters}, @xref{Group Parameters}.
2550
2551 @table @kbd
2552
2553 @item G m
2554 @kindex G m (Group)
2555 @findex gnus-group-make-group
2556 @cindex making groups
2557 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2558 for a name, a method and possibly an @dfn{address}.  For an easier way
2559 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2560
2561 @item G M
2562 @kindex G M (Group)
2563 @findex gnus-group-read-ephemeral-group
2564 Make an ephemeral group (@code{gnus-group-read-ephemeral-group}).  Gnus
2565 will prompt you for a name, a method and an @dfn{address}.
2566
2567 @item G r
2568 @kindex G r (Group)
2569 @findex gnus-group-rename-group
2570 @cindex renaming groups
2571 Rename the current group to something else
2572 (@code{gnus-group-rename-group}).  This is valid only on some
2573 groups---mail groups mostly.  This command might very well be quite slow
2574 on some back ends.
2575
2576 @item G c
2577 @kindex G c (Group)
2578 @cindex customizing
2579 @findex gnus-group-customize
2580 Customize the group parameters (@code{gnus-group-customize}).
2581
2582 @item G e
2583 @kindex G e (Group)
2584 @findex gnus-group-edit-group-method
2585 @cindex renaming groups
2586 Enter a buffer where you can edit the select method of the current
2587 group (@code{gnus-group-edit-group-method}).
2588
2589 @item G p
2590 @kindex G p (Group)
2591 @findex gnus-group-edit-group-parameters
2592 Enter a buffer where you can edit the group parameters
2593 (@code{gnus-group-edit-group-parameters}).
2594
2595 @item G E
2596 @kindex G E (Group)
2597 @findex gnus-group-edit-group
2598 Enter a buffer where you can edit the group info
2599 (@code{gnus-group-edit-group}).
2600
2601 @item G d
2602 @kindex G d (Group)
2603 @findex gnus-group-make-directory-group
2604 @cindex nndir
2605 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2606 for a directory name (@code{gnus-group-make-directory-group}).
2607
2608 @item G h
2609 @kindex G h (Group)
2610 @cindex help group
2611 @findex gnus-group-make-help-group
2612 Make the Gnus help group (@code{gnus-group-make-help-group}).
2613
2614 @item G a
2615 @kindex G a (Group)
2616 @cindex (ding) archive
2617 @cindex archive group
2618 @findex gnus-group-make-archive-group
2619 @vindex gnus-group-archive-directory
2620 @vindex gnus-group-recent-archive-directory
2621 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2622 default a group pointing to the most recent articles will be created
2623 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2624 group will be created from @code{gnus-group-archive-directory}.
2625
2626 @item G D
2627 @kindex G D (Group)
2628 @findex gnus-group-enter-directory
2629 @cindex nneething
2630 Read an arbitrary directory as if it were a newsgroup with the
2631 @code{nneething} back end (@code{gnus-group-enter-directory}).
2632 @xref{Anything Groups}.
2633
2634 @item G f
2635 @kindex G f (Group)
2636 @findex gnus-group-make-doc-group
2637 @cindex ClariNet Briefs
2638 @cindex nndoc
2639 Make a group based on some file or other
2640 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2641 command, you will be prompted for a file name and a file type.
2642 Currently supported types are @code{mbox}, @code{babyl},
2643 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2644 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2645 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2646 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2647 you run this command without a prefix, Gnus will guess at the file
2648 type.  @xref{Document Groups}.
2649
2650 @item G u
2651 @kindex G u (Group)
2652 @vindex gnus-useful-groups
2653 @findex gnus-group-make-useful-group
2654 Create one of the groups mentioned in @code{gnus-useful-groups}
2655 (@code{gnus-group-make-useful-group}).
2656
2657 @item G w
2658 @kindex G w (Group)
2659 @findex gnus-group-make-web-group
2660 @cindex Google
2661 @cindex nnweb
2662 @cindex gmane
2663 Make an ephemeral group based on a web search
2664 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2665 command, make a solid group instead.  You will be prompted for the
2666 search engine type and the search string.  Valid search engine types
2667 include @code{google}, @code{dejanews}, and @code{gmane}.
2668 @xref{Web Searches}.
2669
2670 If you use the @code{google} search engine, you can limit the search
2671 to a particular group by using a match string like
2672 @samp{shaving group:alt.sysadmin.recovery}.
2673
2674 @item G R
2675 @kindex G R (Group)
2676 @findex gnus-group-make-rss-group
2677 Make a group based on an @acronym{RSS} feed
2678 (@code{gnus-group-make-rss-group}).  You will be prompted for an URL.
2679 @xref{RSS}.
2680
2681 @item G DEL
2682 @kindex G DEL (Group)
2683 @findex gnus-group-delete-group
2684 This function will delete the current group
2685 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2686 actually delete all the articles in the group, and forcibly remove the
2687 group itself from the face of the Earth.  Use a prefix only if you are
2688 absolutely sure of what you are doing.  This command can't be used on
2689 read-only groups (like @code{nntp} groups), though.
2690
2691 @item G V
2692 @kindex G V (Group)
2693 @findex gnus-group-make-empty-virtual
2694 Make a new, fresh, empty @code{nnvirtual} group
2695 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2696
2697 @item G v
2698 @kindex G v (Group)
2699 @findex gnus-group-add-to-virtual
2700 Add the current group to an @code{nnvirtual} group
2701 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2702 @end table
2703
2704 @xref{Select Methods}, for more information on the various select
2705 methods.
2706
2707 @vindex gnus-activate-foreign-newsgroups
2708 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2709 Gnus will check all foreign groups with this level or lower at startup.
2710 This might take quite a while, especially if you subscribe to lots of
2711 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2712 @code{gnus-activate-level} also affects activation of foreign
2713 newsgroups.
2714
2715
2716 The following commands create ephemeral groups.  They can be called not
2717 only from the Group buffer, but in any Gnus buffer.
2718
2719 @table @code
2720 @item gnus-read-ephemeral-gmane-group
2721 @findex gnus-read-ephemeral-gmane-group
2722 @vindex gnus-gmane-group-download-format
2723 Read an ephemeral group on Gmane.org.  The articles are downloaded via
2724 HTTP using the URL specified by @code{gnus-gmane-group-download-format}.
2725 Gnus will prompt you for a group name, the start article number and an
2726 the article range.
2727
2728 @item gnus-read-ephemeral-gmane-group-url
2729 @findex gnus-read-ephemeral-gmane-group-url
2730 This command is similar to @code{gnus-read-ephemeral-gmane-group}, but
2731 the group name and the article number and range are constructed from a
2732 given @acronym{URL}.  Supported @acronym{URL} formats include e.g.
2733 @url{http://thread.gmane.org/gmane.foo.bar/12300/focus=12399},
2734 @url{http://thread.gmane.org/gmane.foo.bar/12345/},
2735 @url{http://article.gmane.org/gmane.foo.bar/12345/},
2736 @url{http://permalink.gmane.org/gmane.foo.bar/12345/}, and
2737 @url{http://news.gmane.org/group/gmane.foo.bar/thread=12345}.
2738
2739 @item gnus-read-ephemeral-emacs-bug-group
2740 @findex gnus-read-ephemeral-emacs-bug-group
2741 Read an Emacs bug report in an ephemeral group.  Gnus will prompt for a
2742 bug number.  The default is the number at point.  The @acronym{URL} is
2743 specified in @code{gnus-bug-group-download-format-alist}.
2744
2745 @item gnus-read-ephemeral-debian-bug-group
2746 @findex gnus-read-ephemeral-debian-bug-group
2747 Read a Debian bug report in an ephemeral group.  Analog to
2748 @code{gnus-read-ephemeral-emacs-bug-group}.
2749 @end table
2750
2751 Some of these command are also useful for article buttons, @xref{Article
2752 Buttons}.
2753
2754 Here is an example:
2755 @lisp
2756 (require 'gnus-art)
2757 (add-to-list
2758  'gnus-button-alist
2759  '("#\\([0-9]+\\)\\>" 1
2760    (string-match "\\<emacs\\>" (or gnus-newsgroup-name ""))
2761    gnus-read-ephemeral-emacs-bug-group 1))
2762 @end lisp
2763
2764
2765 @node Group Parameters
2766 @section Group Parameters
2767 @cindex group parameters
2768
2769 The group parameters store information local to a particular group.
2770
2771 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2772 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2773 presents you with a Customize-like interface.  The latter helps avoid
2774 silly Lisp errors.)  You might also be interested in reading about topic
2775 parameters (@pxref{Topic Parameters}).
2776 Additionally, you can set group parameters via the
2777 @code{gnus-parameters} variable, see below.
2778
2779 Here's an example group parameter list:
2780
2781 @example
2782 ((to-address . "ding@@gnus.org")
2783  (auto-expire . t))
2784 @end example
2785
2786 We see that each element consists of a ``dotted pair''---the thing before
2787 the dot is the key, while the thing after the dot is the value.  All the
2788 parameters have this form @emph{except} local variable specs, which are
2789 not dotted pairs, but proper lists.
2790
2791 Some parameters have correspondent customizable variables, each of which
2792 is an alist of regexps and values.
2793
2794 The following group parameters can be used:
2795
2796 @table @code
2797 @item to-address
2798 @cindex to-address
2799 Address used by when doing followups and new posts.
2800
2801 @example
2802 (to-address . "some@@where.com")
2803 @end example
2804
2805 This is primarily useful in mail groups that represent closed mailing
2806 lists---mailing lists where it's expected that everybody that writes to
2807 the mailing list is subscribed to it.  Since using this parameter
2808 ensures that the mail only goes to the mailing list itself, it means
2809 that members won't receive two copies of your followups.
2810
2811 Using @code{to-address} will actually work whether the group is foreign
2812 or not.  Let's say there's a group on the server that is called
2813 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2814 the articles from a mail-to-news gateway.  Posting directly to this
2815 group is therefore impossible---you have to send mail to the mailing
2816 list address instead.
2817
2818 See also @code{gnus-parameter-to-address-alist}.
2819
2820 @item to-list
2821 @cindex to-list
2822 Address used when doing @kbd{a} in that group.
2823
2824 @example
2825 (to-list . "some@@where.com")
2826 @end example
2827
2828 It is totally ignored
2829 when doing a followup---except that if it is present in a news group,
2830 you'll get mail group semantics when doing @kbd{f}.
2831
2832 If you do an @kbd{a} command in a mail group and you have neither a
2833 @code{to-list} group parameter nor a @code{to-address} group parameter,
2834 then a @code{to-list} group parameter will be added automatically upon
2835 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2836 @vindex gnus-add-to-list
2837
2838 @findex gnus-mailing-list-mode
2839 @cindex mail list groups
2840 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2841 entering summary buffer.
2842
2843 See also @code{gnus-parameter-to-list-alist}.
2844
2845 @anchor{subscribed}
2846 @item subscribed
2847 @cindex subscribed
2848 @cindex Mail-Followup-To
2849 @findex gnus-find-subscribed-addresses
2850 If this parameter is set to @code{t}, Gnus will consider the
2851 to-address and to-list parameters for this group as addresses of
2852 mailing lists you are subscribed to.  Giving Gnus this information is
2853 (only) a first step in getting it to generate correct Mail-Followup-To
2854 headers for your posts to these lists.  The second step is to put the
2855 following in your @file{.gnus.el}
2856
2857 @lisp
2858 (setq message-subscribed-address-functions
2859       '(gnus-find-subscribed-addresses))
2860 @end lisp
2861
2862 @xref{Mailing Lists, ,Mailing Lists, message, The Message Manual}, for
2863 a complete treatment of available MFT support.
2864
2865 @item visible
2866 @cindex visible
2867 If the group parameter list has the element @code{(visible . t)},
2868 that group will always be visible in the Group buffer, regardless
2869 of whether it has any unread articles.
2870
2871 This parameter cannot be set via @code{gnus-parameters}. See
2872 @code{gnus-permanently-visible-groups} as an alternative.
2873
2874 @item broken-reply-to
2875 @cindex broken-reply-to
2876 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2877 headers in this group are to be ignored, and for the header to be hidden
2878 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2879 can be useful if you're reading a mailing list group where the listserv
2880 has inserted @code{Reply-To} headers that point back to the listserv
2881 itself.  That is broken behavior.  So there!
2882
2883 @item to-group
2884 @cindex to-group
2885 Elements like @code{(to-group . "some.group.name")} means that all
2886 posts in that group will be sent to @code{some.group.name}.
2887
2888 @item newsgroup
2889 @cindex newsgroup
2890 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2891 will treat all responses as if they were responses to news articles.
2892 This can be useful if you have a mail group that's really a mirror of a
2893 news group.
2894
2895 @item gcc-self
2896 @cindex gcc-self
2897 If @code{(gcc-self . t)} is present in the group parameter list, newly
2898 composed messages will be @code{Gcc}'d to the current group.  If
2899 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2900 generated, if @code{(gcc-self . "string")} is present, this string will
2901 be inserted literally as a @code{gcc} header.  This parameter takes
2902 precedence over any default @code{Gcc} rules as described later
2903 (@pxref{Archived Messages}).
2904
2905 @strong{Caveat}: Adding @code{(gcc-self . t)} to the parameter list of
2906 @code{nntp} groups (or the like) isn't valid.  An @code{nntp} server
2907 doesn't accept articles.
2908
2909 @item auto-expire
2910 @cindex auto-expire
2911 @cindex expiring mail
2912 If the group parameter has an element that looks like @code{(auto-expire
2913 . t)}, all articles read will be marked as expirable.  For an
2914 alternative approach, @pxref{Expiring Mail}.
2915
2916 See also @code{gnus-auto-expirable-newsgroups}.
2917
2918 @item total-expire
2919 @cindex total-expire
2920 @cindex expiring mail
2921 If the group parameter has an element that looks like
2922 @code{(total-expire . t)}, all read articles will be put through the
2923 expiry process, even if they are not marked as expirable.  Use with
2924 caution.  Unread, ticked and dormant articles are not eligible for
2925 expiry.
2926
2927 See also @code{gnus-total-expirable-newsgroups}.
2928
2929 @item expiry-wait
2930 @cindex expiry-wait
2931 @vindex nnmail-expiry-wait-function
2932 If the group parameter has an element that looks like
2933 @code{(expiry-wait . 10)}, this value will override any
2934 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2935 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2936 can either be a number of days (not necessarily an integer) or the
2937 symbols @code{never} or @code{immediate}.
2938
2939 @item expiry-target
2940 @cindex expiry-target
2941 Where expired messages end up.  This parameter overrides
2942 @code{nnmail-expiry-target}.
2943
2944 @item score-file
2945 @cindex score file group parameter
2946 Elements that look like @code{(score-file . "file")} will make
2947 @file{file} into the current score file for the group in question.  All
2948 interactive score entries will be put into this file.
2949
2950 @item adapt-file
2951 @cindex adapt file group parameter
2952 Elements that look like @code{(adapt-file . "file")} will make
2953 @file{file} into the current adaptive file for the group in question.
2954 All adaptive score entries will be put into this file.
2955
2956 @item admin-address
2957 @cindex admin-address
2958 When unsubscribing from a mailing list you should never send the
2959 unsubscription notice to the mailing list itself.  Instead, you'd send
2960 messages to the administrative address.  This parameter allows you to
2961 put the admin address somewhere convenient.
2962
2963 @item display
2964 @cindex display
2965 Elements that look like @code{(display . MODE)} say which articles to
2966 display on entering the group.  Valid values are:
2967
2968 @table @code
2969 @item all
2970 Display all articles, both read and unread.
2971
2972 @item an integer
2973 Display the last @var{integer} articles in the group.  This is the same as
2974 entering the group with @kbd{C-u @var{integer}}.
2975
2976 @item default
2977 Display the default visible articles, which normally includes unread and
2978 ticked articles.
2979
2980 @item an array
2981 Display articles that satisfy a predicate.
2982
2983 Here are some examples:
2984
2985 @table @code
2986 @item [unread]
2987 Display only unread articles.
2988
2989 @item [not expire]
2990 Display everything except expirable articles.
2991
2992 @item [and (not reply) (not expire)]
2993 Display everything except expirable and articles you've already
2994 responded to.
2995 @end table
2996
2997 The available operators are @code{not}, @code{and} and @code{or}.
2998 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2999 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
3000 @code{killed}, @code{bookmark}, @code{score}, @code{save},
3001 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
3002
3003 @end table
3004
3005 The @code{display} parameter works by limiting the summary buffer to
3006 the subset specified.  You can pop the limit by using the @kbd{/ w}
3007 command (@pxref{Limiting}).
3008
3009 @item comment
3010 @cindex comment
3011 Elements that look like @code{(comment . "This is a comment")} are
3012 arbitrary comments on the group.  You can display comments in the
3013 group line (@pxref{Group Line Specification}).
3014
3015 @item charset
3016 @cindex charset
3017 Elements that look like @code{(charset . iso-8859-1)} will make
3018 @code{iso-8859-1} the default charset; that is, the charset that will be
3019 used for all articles that do not specify a charset.
3020
3021 See also @code{gnus-group-charset-alist}.
3022
3023 @item ignored-charsets
3024 @cindex ignored-charset
3025 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
3026 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
3027 default charset will be used for decoding articles.
3028
3029 See also @code{gnus-group-ignored-charsets-alist}.
3030
3031 @item posting-style
3032 @cindex posting-style
3033 You can store additional posting style information for this group
3034 here (@pxref{Posting Styles}).  The format is that of an entry in the
3035 @code{gnus-posting-styles} alist, except that there's no regexp matching
3036 the group name (of course).  Style elements in this group parameter will
3037 take precedence over the ones found in @code{gnus-posting-styles}.
3038
3039 For instance, if you want a funky name and signature in this group only,
3040 instead of hacking @code{gnus-posting-styles}, you could put something
3041 like this in the group parameters:
3042
3043 @example
3044 (posting-style
3045   (name "Funky Name")
3046   ("X-My-Header" "Funky Value")
3047   (signature "Funky Signature"))
3048 @end example
3049
3050 If you're using topics to organize your group buffer
3051 (@pxref{Group Topics}), note that posting styles can also be set in
3052 the topics parameters. Posting styles in topic parameters apply to all
3053 groups in this topic. More precisely, the posting-style settings for a
3054 group result from the hierarchical merging of all posting-style
3055 entries in the parameters of this group and all the topics it belongs
3056 to.
3057
3058
3059 @item post-method
3060 @cindex post-method
3061 If it is set, the value is used as the method for posting message
3062 instead of @code{gnus-post-method}.
3063
3064 @item mail-source
3065 @cindex mail-source
3066 If it is set, and the setting of @code{mail-sources} includes a
3067 @code{group} mail source (@pxref{Mail Sources}), the value is a
3068 mail source for this group.
3069
3070 @item banner
3071 @cindex banner
3072 An item like @code{(banner . @var{regexp})} causes any part of an article
3073 that matches the regular expression @var{regexp} to be stripped.  Instead of
3074 @var{regexp}, you can also use the symbol @code{signature} which strips the
3075 last signature or any of the elements of the alist
3076 @code{gnus-article-banner-alist}.
3077
3078 @item sieve
3079 @cindex sieve
3080 This parameter contains a Sieve test that should match incoming mail
3081 that should be placed in this group.  From this group parameter, a
3082 Sieve @samp{IF} control structure is generated, having the test as the
3083 condition and @samp{fileinto "group.name";} as the body.
3084
3085 For example, if the @samp{INBOX.list.sieve} group has the @code{(sieve
3086 address "sender" "sieve-admin@@extundo.com")} group parameter, when
3087 translating the group parameter into a Sieve script (@pxref{Sieve
3088 Commands}) the following Sieve code is generated:
3089
3090 @example
3091 if address "sender" "sieve-admin@@extundo.com" @{
3092         fileinto "INBOX.list.sieve";
3093 @}
3094 @end example
3095
3096 To generate tests for multiple email-addresses use a group parameter
3097 like @code{(sieve address "sender" ("name@@one.org" else@@two.org"))}.
3098 When generating a sieve script (@pxref{Sieve Commands}) Sieve code
3099 like the following is generated:
3100
3101 @example
3102 if address "sender" ["name@@one.org", "else@@two.org"] @{
3103         fileinto "INBOX.list.sieve";
3104 @}
3105 @end example
3106
3107 See @pxref{Sieve Commands} for commands and variables that might be of
3108 interest in relation to the sieve parameter.
3109
3110 The Sieve language is described in RFC 3028.  @xref{Top, Emacs Sieve,
3111 Top, sieve, Emacs Sieve}.
3112
3113 @item (agent parameters)
3114 If the agent has been enabled, you can set any of the its parameters
3115 to control the behavior of the agent in individual groups. See Agent
3116 Parameters in @ref{Category Syntax}.  Most users will choose to set
3117 agent parameters in either an agent category or group topic to
3118 minimize the configuration effort.
3119
3120 @item (@var{variable} @var{form})
3121 You can use the group parameters to set variables local to the group you
3122 are entering.  If you want to turn threading off in @samp{news.answers},
3123 you could put @code{(gnus-show-threads nil)} in the group parameters of
3124 that group.  @code{gnus-show-threads} will be made into a local variable
3125 in the summary buffer you enter, and the form @code{nil} will be
3126 @code{eval}ed there.
3127
3128 Note that this feature sets the variable locally to the summary buffer
3129 if and only if @var{variable} has been bound as a variable.  Otherwise,
3130 only evaluating the form will take place.  So, you may want to bind the
3131 variable in advance using @code{defvar} or other if the result of the
3132 form needs to be set to it.
3133
3134 But some variables are evaluated in the article buffer, or in the
3135 message buffer (of a reply or followup or otherwise newly created
3136 message).  As a workaround, it might help to add the variable in
3137 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
3138 Stuff}.  So if you want to set @code{message-from-style} via the group
3139 parameters, then you may need the following statement elsewhere in your
3140 @file{~/.gnus.el} file:
3141
3142 @lisp
3143 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
3144 @end lisp
3145
3146 @vindex gnus-list-identifiers
3147 A use for this feature is to remove a mailing list identifier tag in
3148 the subject fields of articles.  E.g. if the news group
3149
3150 @example
3151 nntp+news.gnus.org:gmane.text.docbook.apps
3152 @end example
3153
3154 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
3155 tag can be removed from the article subjects in the summary buffer for
3156 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
3157 into the group parameters for the group.
3158
3159 This can also be used as a group-specific hook function.  If you want to
3160 hear a beep when you enter a group, you could put something like
3161 @code{(dummy-variable (ding))} in the parameters of that group.  If
3162 @code{dummy-variable} has been bound (see above), it will be set to the
3163 (meaningless) result of the @code{(ding)} form.
3164
3165 Alternatively, since the VARIABLE becomes local to the group, this
3166 pattern can be used to temporarily change a hook.  For example, if the
3167 following is added to a group parameter
3168
3169 @lisp
3170 (gnus-summary-prepared-hook
3171   '(lambda nil (local-set-key "d" (local-key-binding "n"))))
3172 @end lisp
3173
3174 when the group is entered, the 'd' key will not mark the article as
3175 expired.
3176
3177 @end table
3178
3179 @vindex gnus-parameters
3180 Group parameters can be set via the @code{gnus-parameters} variable too.
3181 But some variables, such as @code{visible}, have no effect (For this
3182 case see @code{gnus-permanently-visible-groups} as an alternative.).
3183 For example:
3184
3185 @lisp
3186 (setq gnus-parameters
3187       '(("mail\\..*"
3188          (gnus-show-threads nil)
3189          (gnus-use-scoring nil)
3190          (gnus-summary-line-format
3191           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3192          (gcc-self . t)
3193          (display . all))
3194
3195         ("^nnimap:\\(foo.bar\\)$"
3196          (to-group . "\\1"))
3197
3198         ("mail\\.me"
3199          (gnus-use-scoring  t))
3200
3201         ("list\\..*"
3202          (total-expire . t)
3203          (broken-reply-to . t))))
3204 @end lisp
3205
3206 String value of parameters will be subjected to regexp substitution, as
3207 the @code{to-group} example shows.
3208
3209 @vindex gnus-parameters-case-fold-search
3210 By default, whether comparing the group name and one of those regexps
3211 specified in @code{gnus-parameters} is done in a case-sensitive manner
3212 or a case-insensitive manner depends on the value of
3213 @code{case-fold-search} at the time when the comparison is done.  The
3214 value of @code{case-fold-search} is typically @code{t}; it means, for
3215 example, the element @code{("INBOX\\.FOO" (total-expire . t))} might be
3216 applied to both the @samp{INBOX.FOO} group and the @samp{INBOX.foo}
3217 group.  If you want to make those regexps always case-sensitive, set the
3218 value of the @code{gnus-parameters-case-fold-search} variable to
3219 @code{nil}.  Otherwise, set it to @code{t} if you want to compare them
3220 always in a case-insensitive manner.
3221
3222 You can define different sorting to different groups via
3223 @code{gnus-parameters}.  Here is an example to sort an @acronym{NNTP}
3224 group by reverse date to see the latest news at the top and an
3225 @acronym{RSS} group by subject.  In this example, the first group is the
3226 Debian daily news group @code{gmane.linux.debian.user.news} from
3227 news.gmane.org.  The @acronym{RSS} group corresponds to the Debian
3228 weekly news RSS feed
3229 @url{http://packages.debian.org/unstable/newpkg_main.en.rdf},
3230 @xref{RSS}.
3231
3232 @lisp
3233 (setq
3234  gnus-parameters
3235  '(("nntp.*gmane\\.debian\\.user\\.news"
3236     (gnus-show-threads nil)
3237     (gnus-article-sort-functions '((not gnus-article-sort-by-date)))
3238     (gnus-use-adaptive-scoring nil)
3239     (gnus-use-scoring nil))
3240    ("nnrss.*debian"
3241     (gnus-show-threads nil)
3242     (gnus-article-sort-functions 'gnus-article-sort-by-subject)
3243     (gnus-use-adaptive-scoring nil)
3244     (gnus-use-scoring t)
3245     (gnus-score-find-score-files-function 'gnus-score-find-single)
3246     (gnus-summary-line-format "%U%R%z%d %I%(%[ %s %]%)\n"))))
3247 @end lisp
3248
3249
3250 @node Listing Groups
3251 @section Listing Groups
3252 @cindex group listing
3253
3254 These commands all list various slices of the groups available.
3255
3256 @table @kbd
3257
3258 @item l
3259 @itemx A s
3260 @kindex A s (Group)
3261 @kindex l (Group)
3262 @findex gnus-group-list-groups
3263 List all groups that have unread articles
3264 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3265 command will list only groups of level ARG and lower.  By default, it
3266 only lists groups of level five (i.e.,
3267 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3268 groups).
3269
3270 @item L
3271 @itemx A u
3272 @kindex A u (Group)
3273 @kindex L (Group)
3274 @findex gnus-group-list-all-groups
3275 List all groups, whether they have unread articles or not
3276 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3277 this command will list only groups of level ARG and lower.  By default,
3278 it lists groups of level seven or lower (i.e., just subscribed and
3279 unsubscribed groups).
3280
3281 @item A l
3282 @kindex A l (Group)
3283 @findex gnus-group-list-level
3284 List all unread groups on a specific level
3285 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3286 with no unread articles.
3287
3288 @item A k
3289 @kindex A k (Group)
3290 @findex gnus-group-list-killed
3291 List all killed groups (@code{gnus-group-list-killed}).  If given a
3292 prefix argument, really list all groups that are available, but aren't
3293 currently (un)subscribed.  This could entail reading the active file
3294 from the server.
3295
3296 @item A z
3297 @kindex A z (Group)
3298 @findex gnus-group-list-zombies
3299 List all zombie groups (@code{gnus-group-list-zombies}).
3300
3301 @item A m
3302 @kindex A m (Group)
3303 @findex gnus-group-list-matching
3304 List all unread, subscribed groups with names that match a regexp
3305 (@code{gnus-group-list-matching}).
3306
3307 @item A M
3308 @kindex A M (Group)
3309 @findex gnus-group-list-all-matching
3310 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3311
3312 @item A A
3313 @kindex A A (Group)
3314 @findex gnus-group-list-active
3315 List absolutely all groups in the active file(s) of the
3316 server(s) you are connected to (@code{gnus-group-list-active}).  This
3317 might very well take quite a while.  It might actually be a better idea
3318 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3319 thing to match on.  Also note that this command may list groups that
3320 don't exist (yet)---these will be listed as if they were killed groups.
3321 Take the output with some grains of salt.
3322
3323 @item A a
3324 @kindex A a (Group)
3325 @findex gnus-group-apropos
3326 List all groups that have names that match a regexp
3327 (@code{gnus-group-apropos}).
3328
3329 @item A d
3330 @kindex A d (Group)
3331 @findex gnus-group-description-apropos
3332 List all groups that have names or descriptions that match a regexp
3333 (@code{gnus-group-description-apropos}).
3334
3335 @item A c
3336 @kindex A c (Group)
3337 @findex gnus-group-list-cached
3338 List all groups with cached articles (@code{gnus-group-list-cached}).
3339
3340 @item A ?
3341 @kindex A ? (Group)
3342 @findex gnus-group-list-dormant
3343 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3344
3345 @item A /
3346 @kindex A / (Group)
3347 @findex gnus-group-list-limit
3348 List groups limited within the current selection
3349 (@code{gnus-group-list-limit}).
3350
3351 @item A f
3352 @kindex A f (Group)
3353 @findex gnus-group-list-flush
3354 Flush groups from the current selection (@code{gnus-group-list-flush}).
3355
3356 @item A p
3357 @kindex A p (Group)
3358 @findex gnus-group-list-plus
3359 List groups plus the current selection (@code{gnus-group-list-plus}).
3360
3361 @end table
3362
3363 @vindex gnus-permanently-visible-groups
3364 @cindex visible group parameter
3365 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3366 always be shown, whether they have unread articles or not.  You can also
3367 add the @code{visible} element to the group parameters in question to
3368 get the same effect.
3369
3370 @vindex gnus-list-groups-with-ticked-articles
3371 Groups that have just ticked articles in it are normally listed in the
3372 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3373 @code{nil}, these groups will be treated just like totally empty
3374 groups.  It is @code{t} by default.
3375
3376
3377 @node Sorting Groups
3378 @section Sorting Groups
3379 @cindex sorting groups
3380
3381 @kindex C-c C-s (Group)
3382 @findex gnus-group-sort-groups
3383 @vindex gnus-group-sort-function
3384 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3385 group buffer according to the function(s) given by the
3386 @code{gnus-group-sort-function} variable.  Available sorting functions
3387 include:
3388
3389 @table @code
3390
3391 @item gnus-group-sort-by-alphabet
3392 @findex gnus-group-sort-by-alphabet
3393 Sort the group names alphabetically.  This is the default.
3394
3395 @item gnus-group-sort-by-real-name
3396 @findex gnus-group-sort-by-real-name
3397 Sort the group alphabetically on the real (unprefixed) group names.
3398
3399 @item gnus-group-sort-by-level
3400 @findex gnus-group-sort-by-level
3401 Sort by group level.
3402
3403 @item gnus-group-sort-by-score
3404 @findex gnus-group-sort-by-score
3405 Sort by group score.  @xref{Group Score}.
3406
3407 @item gnus-group-sort-by-rank
3408 @findex gnus-group-sort-by-rank
3409 Sort by group score and then the group level.  The level and the score
3410 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3411
3412 @item gnus-group-sort-by-unread
3413 @findex gnus-group-sort-by-unread
3414 Sort by number of unread articles.
3415
3416 @item gnus-group-sort-by-method
3417 @findex gnus-group-sort-by-method
3418 Sort alphabetically on the select method.
3419
3420 @item gnus-group-sort-by-server
3421 @findex gnus-group-sort-by-server
3422 Sort alphabetically on the Gnus server name.
3423
3424
3425 @end table
3426
3427 @code{gnus-group-sort-function} can also be a list of sorting
3428 functions.  In that case, the most significant sort key function must be
3429 the last one.
3430
3431
3432 There are also a number of commands for sorting directly according to
3433 some sorting criteria:
3434
3435 @table @kbd
3436 @item G S a
3437 @kindex G S a (Group)
3438 @findex gnus-group-sort-groups-by-alphabet
3439 Sort the group buffer alphabetically by group name
3440 (@code{gnus-group-sort-groups-by-alphabet}).
3441
3442 @item G S u
3443 @kindex G S u (Group)
3444 @findex gnus-group-sort-groups-by-unread
3445 Sort the group buffer by the number of unread articles
3446 (@code{gnus-group-sort-groups-by-unread}).
3447
3448 @item G S l
3449 @kindex G S l (Group)
3450 @findex gnus-group-sort-groups-by-level
3451 Sort the group buffer by group level
3452 (@code{gnus-group-sort-groups-by-level}).
3453
3454 @item G S v
3455 @kindex G S v (Group)
3456 @findex gnus-group-sort-groups-by-score
3457 Sort the group buffer by group score
3458 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3459
3460 @item G S r
3461 @kindex G S r (Group)
3462 @findex gnus-group-sort-groups-by-rank
3463 Sort the group buffer by group rank
3464 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3465
3466 @item G S m
3467 @kindex G S m (Group)
3468 @findex gnus-group-sort-groups-by-method
3469 Sort the group buffer alphabetically by back end name@*
3470 (@code{gnus-group-sort-groups-by-method}).
3471
3472 @item G S n
3473 @kindex G S n (Group)
3474 @findex gnus-group-sort-groups-by-real-name
3475 Sort the group buffer alphabetically by real (unprefixed) group name
3476 (@code{gnus-group-sort-groups-by-real-name}).
3477
3478 @end table
3479
3480 All the commands below obey the process/prefix convention
3481 (@pxref{Process/Prefix}).
3482
3483 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3484 commands will sort in reverse order.
3485
3486 You can also sort a subset of the groups:
3487
3488 @table @kbd
3489 @item G P a
3490 @kindex G P a (Group)
3491 @findex gnus-group-sort-selected-groups-by-alphabet
3492 Sort the groups alphabetically by group name
3493 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3494
3495 @item G P u
3496 @kindex G P u (Group)
3497 @findex gnus-group-sort-selected-groups-by-unread
3498 Sort the groups by the number of unread articles
3499 (@code{gnus-group-sort-selected-groups-by-unread}).
3500
3501 @item G P l
3502 @kindex G P l (Group)
3503 @findex gnus-group-sort-selected-groups-by-level
3504 Sort the groups by group level
3505 (@code{gnus-group-sort-selected-groups-by-level}).
3506
3507 @item G P v
3508 @kindex G P v (Group)
3509 @findex gnus-group-sort-selected-groups-by-score
3510 Sort the groups by group score
3511 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3512
3513 @item G P r
3514 @kindex G P r (Group)
3515 @findex gnus-group-sort-selected-groups-by-rank
3516 Sort the groups by group rank
3517 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3518
3519 @item G P m
3520 @kindex G P m (Group)
3521 @findex gnus-group-sort-selected-groups-by-method
3522 Sort the groups alphabetically by back end name@*
3523 (@code{gnus-group-sort-selected-groups-by-method}).
3524
3525 @item G P n
3526 @kindex G P n (Group)
3527 @findex gnus-group-sort-selected-groups-by-real-name
3528 Sort the groups alphabetically by real (unprefixed) group name
3529 (@code{gnus-group-sort-selected-groups-by-real-name}).
3530
3531 @item G P s
3532 @kindex G P s (Group)
3533 @findex gnus-group-sort-selected-groups
3534 Sort the groups according to @code{gnus-group-sort-function}.
3535
3536 @end table
3537
3538 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3539 move groups around.
3540
3541
3542 @node Group Maintenance
3543 @section Group Maintenance
3544 @cindex bogus groups
3545
3546 @table @kbd
3547 @item b
3548 @kindex b (Group)
3549 @findex gnus-group-check-bogus-groups
3550 Find bogus groups and delete them
3551 (@code{gnus-group-check-bogus-groups}).
3552
3553 @item F
3554 @kindex F (Group)
3555 @findex gnus-group-find-new-groups
3556 Find new groups and process them (@code{gnus-group-find-new-groups}).
3557 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3558 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3559 to query the server for new groups, and subscribe the new groups as
3560 zombies.
3561
3562 @item C-c C-x
3563 @kindex C-c C-x (Group)
3564 @findex gnus-group-expire-articles
3565 @cindex expiring mail
3566 Run all expirable articles in the current group through the expiry
3567 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3568 all expirable articles in the group that have been around for a while.
3569 (@pxref{Expiring Mail}).
3570
3571 @item C-c C-M-x
3572 @kindex C-c C-M-x (Group)
3573 @findex gnus-group-expire-all-groups
3574 @cindex expiring mail
3575 Run all expirable articles in all groups through the expiry process
3576 (@code{gnus-group-expire-all-groups}).
3577
3578 @end table
3579
3580
3581 @node Browse Foreign Server
3582 @section Browse Foreign Server
3583 @cindex foreign servers
3584 @cindex browsing servers
3585
3586 @table @kbd
3587 @item B
3588 @kindex B (Group)
3589 @findex gnus-group-browse-foreign-server
3590 You will be queried for a select method and a server name.  Gnus will
3591 then attempt to contact this server and let you browse the groups there
3592 (@code{gnus-group-browse-foreign-server}).
3593 @end table
3594
3595 @findex gnus-browse-mode
3596 A new buffer with a list of available groups will appear.  This buffer
3597 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3598 a lot) like a normal group buffer.
3599
3600 Here's a list of keystrokes available in the browse mode:
3601
3602 @table @kbd
3603 @item n
3604 @kindex n (Browse)
3605 @findex gnus-group-next-group
3606 Go to the next group (@code{gnus-group-next-group}).
3607
3608 @item p
3609 @kindex p (Browse)
3610 @findex gnus-group-prev-group
3611 Go to the previous group (@code{gnus-group-prev-group}).
3612
3613 @item SPACE
3614 @kindex SPACE (Browse)
3615 @findex gnus-browse-read-group
3616 Enter the current group and display the first article
3617 (@code{gnus-browse-read-group}).
3618
3619 @item RET
3620 @kindex RET (Browse)
3621 @findex gnus-browse-select-group
3622 Enter the current group (@code{gnus-browse-select-group}).
3623
3624 @item u
3625 @kindex u (Browse)
3626 @findex gnus-browse-unsubscribe-current-group
3627 Unsubscribe to the current group, or, as will be the case here,
3628 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3629
3630 @item l
3631 @itemx q
3632 @kindex q (Browse)
3633 @kindex l (Browse)
3634 @findex gnus-browse-exit
3635 Exit browse mode (@code{gnus-browse-exit}).
3636
3637 @item d
3638 @kindex d (Browse)
3639 @findex gnus-browse-describe-group
3640 Describe the current group (@code{gnus-browse-describe-group}).
3641
3642 @item ?
3643 @kindex ? (Browse)
3644 @findex gnus-browse-describe-briefly
3645 Describe browse mode briefly (well, there's not much to describe, is
3646 there) (@code{gnus-browse-describe-briefly}).
3647 @end table
3648
3649
3650 @node Exiting Gnus
3651 @section Exiting Gnus
3652 @cindex exiting Gnus
3653
3654 Yes, Gnus is ex(c)iting.
3655
3656 @table @kbd
3657 @item z
3658 @kindex z (Group)
3659 @findex gnus-group-suspend
3660 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3661 but it kills all buffers except the Group buffer.  I'm not sure why this
3662 is a gain, but then who am I to judge?
3663
3664 @item q
3665 @kindex q (Group)
3666 @findex gnus-group-exit
3667 @c @icon{gnus-group-exit}
3668 Quit Gnus (@code{gnus-group-exit}).
3669
3670 @item Q
3671 @kindex Q (Group)
3672 @findex gnus-group-quit
3673 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3674 The dribble file will be saved, though (@pxref{Auto Save}).
3675 @end table
3676
3677 @vindex gnus-exit-gnus-hook
3678 @vindex gnus-suspend-gnus-hook
3679 @vindex gnus-after-exiting-gnus-hook
3680 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3681 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3682 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3683 exiting Gnus.
3684
3685 Note:
3686
3687 @quotation
3688 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3689 numbly heavy and herself fall into a hazy trance as the boy sitting
3690 behind her drew repeated lines with his pencil across the back of her
3691 plastic chair.
3692 @end quotation
3693
3694
3695 @node Group Topics
3696 @section Group Topics
3697 @cindex topics
3698
3699 If you read lots and lots of groups, it might be convenient to group
3700 them hierarchically according to topics.  You put your Emacs groups over
3701 here, your sex groups over there, and the rest (what, two groups or so?)
3702 you put in some misc section that you never bother with anyway.  You can
3703 even group the Emacs sex groups as a sub-topic to either the Emacs
3704 groups or the sex groups---or both!  Go wild!
3705
3706 @iftex
3707 @iflatex
3708 \gnusfigure{Group Topics}{400}{
3709 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3710 }
3711 @end iflatex
3712 @end iftex
3713
3714 Here's an example:
3715
3716 @example
3717 Gnus
3718   Emacs -- I wuw it!
3719      3: comp.emacs
3720      2: alt.religion.emacs
3721     Naughty Emacs
3722      452: alt.sex.emacs
3723        0: comp.talk.emacs.recovery
3724   Misc
3725      8: comp.binaries.fractals
3726     13: comp.sources.unix
3727 @end example
3728
3729 @findex gnus-topic-mode
3730 @kindex t (Group)
3731 To get this @emph{fab} functionality you simply turn on (ooh!) the
3732 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3733 is a toggling command.)
3734
3735 Go ahead, just try it.  I'll still be here when you get back.  La de
3736 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3737 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3738 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3739 Hot and bothered?
3740
3741 If you want this permanently enabled, you should add that minor mode to
3742 the hook for the group mode.  Put the following line in your
3743 @file{~/.gnus.el} file:
3744
3745 @lisp
3746 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3747 @end lisp
3748
3749 @menu
3750 * Topic Commands::              Interactive E-Z commands.
3751 * Topic Variables::             How to customize the topics the Lisp Way.
3752 * Topic Sorting::               Sorting each topic individually.
3753 * Topic Topology::              A map of the world.
3754 * Topic Parameters::            Parameters that apply to all groups in a topic.
3755 @end menu
3756
3757
3758 @node Topic Commands
3759 @subsection Topic Commands
3760 @cindex topic commands
3761
3762 When the topic minor mode is turned on, a new @kbd{T} submap will be
3763 available.  In addition, a few of the standard keys change their
3764 definitions slightly.
3765
3766 In general, the following kinds of operations are possible on topics.
3767 First of all, you want to create topics.  Secondly, you want to put
3768 groups in topics and to move them around until you have an order you
3769 like.  The third kind of operation is to show/hide parts of the whole
3770 shebang.  You might want to hide a topic including its subtopics and
3771 groups, to get a better overview of the other groups.
3772
3773 Here is a list of the basic keys that you might need to set up topics
3774 the way you like.
3775
3776 @table @kbd
3777
3778 @item T n
3779 @kindex T n (Topic)
3780 @findex gnus-topic-create-topic
3781 Prompt for a new topic name and create it
3782 (@code{gnus-topic-create-topic}).
3783
3784 @item T TAB
3785 @itemx TAB
3786 @kindex T TAB (Topic)
3787 @kindex TAB (Topic)
3788 @findex gnus-topic-indent
3789 ``Indent'' the current topic so that it becomes a sub-topic of the
3790 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3791 ``un-indent'' the topic instead.
3792
3793 @item M-TAB
3794 @kindex M-TAB (Topic)
3795 @findex gnus-topic-unindent
3796 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3797 parent of its current parent (@code{gnus-topic-unindent}).
3798
3799 @end table
3800
3801 The following two keys can be used to move groups and topics around.
3802 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3803 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3804 kill and yank rather than cut and paste.
3805
3806 @table @kbd
3807
3808 @item C-k
3809 @kindex C-k (Topic)
3810 @findex gnus-topic-kill-group
3811 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3812 topic will be removed along with the topic.
3813
3814 @item C-y
3815 @kindex C-y (Topic)
3816 @findex gnus-topic-yank-group
3817 Yank the previously killed group or topic
3818 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3819 before all groups.
3820
3821 So, to move a topic to the beginning of the list of topics, just hit
3822 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3823 move the cursor to the beginning of the buffer (just below the ``Gnus''
3824 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3825 paste.  Like I said -- E-Z.
3826
3827 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3828 you can move topics around as well as groups.
3829
3830 @end table
3831
3832 After setting up the topics the way you like them, you might wish to
3833 hide a topic, or to show it again.  That's why we have the following
3834 key.
3835
3836 @table @kbd
3837
3838 @item RET
3839 @kindex RET (Topic)
3840 @findex gnus-topic-select-group
3841 @itemx SPACE
3842 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3843 When you perform this command on a group, you'll enter the group, as
3844 usual.  When done on a topic line, the topic will be folded (if it was
3845 visible) or unfolded (if it was folded already).  So it's basically a
3846 toggling command on topics.  In addition, if you give a numerical
3847 prefix, group on that level (and lower) will be displayed.
3848
3849 @end table
3850
3851 Now for a list of other commands, in no particular order.
3852
3853 @table @kbd
3854
3855 @item T m
3856 @kindex T m (Topic)
3857 @findex gnus-topic-move-group
3858 Move the current group to some other topic
3859 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3860 convention (@pxref{Process/Prefix}).
3861
3862 @item T j
3863 @kindex T j (Topic)
3864 @findex gnus-topic-jump-to-topic
3865 Go to a topic (@code{gnus-topic-jump-to-topic}).
3866
3867 @item T c
3868 @kindex T c (Topic)
3869 @findex gnus-topic-copy-group
3870 Copy the current group to some other topic
3871 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3872 convention (@pxref{Process/Prefix}).
3873
3874 @item T h
3875 @kindex T h (Topic)
3876 @findex gnus-topic-hide-topic
3877 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3878 a prefix, hide the topic permanently.
3879
3880 @item T s
3881 @kindex T s (Topic)
3882 @findex gnus-topic-show-topic
3883 Show the current topic (@code{gnus-topic-show-topic}).  If given
3884 a prefix, show the topic permanently.
3885
3886 @item T D
3887 @kindex T D (Topic)
3888 @findex gnus-topic-remove-group
3889 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3890 This command is mainly useful if you have the same group in several
3891 topics and wish to remove it from one of the topics.  You may also
3892 remove a group from all topics, but in that case, Gnus will add it to
3893 the root topic the next time you start Gnus.  In fact, all new groups
3894 (which, naturally, don't belong to any topic) will show up in the root
3895 topic.
3896
3897 This command uses the process/prefix convention
3898 (@pxref{Process/Prefix}).
3899
3900 @item T M
3901 @kindex T M (Topic)
3902 @findex gnus-topic-move-matching
3903 Move all groups that match some regular expression to a topic
3904 (@code{gnus-topic-move-matching}).
3905
3906 @item T C
3907 @kindex T C (Topic)
3908 @findex gnus-topic-copy-matching
3909 Copy all groups that match some regular expression to a topic
3910 (@code{gnus-topic-copy-matching}).
3911
3912 @item T H
3913 @kindex T H (Topic)
3914 @findex gnus-topic-toggle-display-empty-topics
3915 Toggle hiding empty topics
3916 (@code{gnus-topic-toggle-display-empty-topics}).
3917
3918 @item T #
3919 @kindex T # (Topic)
3920 @findex gnus-topic-mark-topic
3921 Mark all groups in the current topic with the process mark
3922 (@code{gnus-topic-mark-topic}).  This command works recursively on
3923 sub-topics unless given a prefix.
3924
3925 @item T M-#
3926 @kindex T M-# (Topic)
3927 @findex gnus-topic-unmark-topic
3928 Remove the process mark from all groups in the current topic
3929 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3930 sub-topics unless given a prefix.
3931
3932 @item C-c C-x
3933 @kindex C-c C-x (Topic)
3934 @findex gnus-topic-expire-articles
3935 @cindex expiring mail
3936 Run all expirable articles in the current group or topic through the
3937 expiry process (if any)
3938 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3939
3940 @item T r
3941 @kindex T r (Topic)
3942 @findex gnus-topic-rename
3943 Rename a topic (@code{gnus-topic-rename}).
3944
3945 @item T DEL
3946 @kindex T DEL (Topic)
3947 @findex gnus-topic-delete
3948 Delete an empty topic (@code{gnus-topic-delete}).
3949
3950 @item A T
3951 @kindex A T (Topic)
3952 @findex gnus-topic-list-active
3953 List all groups that Gnus knows about in a topics-ified way
3954 (@code{gnus-topic-list-active}).
3955
3956 @item T M-n
3957 @kindex T M-n (Topic)
3958 @findex gnus-topic-goto-next-topic
3959 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3960
3961 @item T M-p
3962 @kindex T M-p (Topic)
3963 @findex gnus-topic-goto-previous-topic
3964 Go to the previous topic (@code{gnus-topic-goto-previous-topic}).
3965
3966 @item G p
3967 @kindex G p (Topic)
3968 @findex gnus-topic-edit-parameters
3969 @cindex group parameters
3970 @cindex topic parameters
3971 @cindex parameters
3972 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3973 @xref{Topic Parameters}.
3974
3975 @end table
3976
3977
3978 @node Topic Variables
3979 @subsection Topic Variables
3980 @cindex topic variables
3981
3982 The previous section told you how to tell Gnus which topics to display.
3983 This section explains how to tell Gnus what to display about each topic.
3984
3985 @vindex gnus-topic-line-format
3986 The topic lines themselves are created according to the
3987 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3988 Valid elements are:
3989
3990 @table @samp
3991 @item i
3992 Indentation.
3993 @item n
3994 Topic name.
3995 @item v
3996 Visibility.
3997 @item l
3998 Level.
3999 @item g
4000 Number of groups in the topic.
4001 @item a
4002 Number of unread articles in the topic.
4003 @item A
4004 Number of unread articles in the topic and all its subtopics.
4005 @end table
4006
4007 @vindex gnus-topic-indent-level
4008 Each sub-topic (and the groups in the sub-topics) will be indented with
4009 @code{gnus-topic-indent-level} times the topic level number of spaces.
4010 The default is 2.
4011
4012 @vindex gnus-topic-mode-hook
4013 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
4014
4015 @vindex gnus-topic-display-empty-topics
4016 The @code{gnus-topic-display-empty-topics} says whether to display even
4017 topics that have no unread articles in them.  The default is @code{t}.
4018
4019
4020 @node Topic Sorting
4021 @subsection Topic Sorting
4022 @cindex topic sorting
4023
4024 You can sort the groups in each topic individually with the following
4025 commands:
4026
4027
4028 @table @kbd
4029 @item T S a
4030 @kindex T S a (Topic)
4031 @findex gnus-topic-sort-groups-by-alphabet
4032 Sort the current topic alphabetically by group name
4033 (@code{gnus-topic-sort-groups-by-alphabet}).
4034
4035 @item T S u
4036 @kindex T S u (Topic)
4037 @findex gnus-topic-sort-groups-by-unread
4038 Sort the current topic by the number of unread articles
4039 (@code{gnus-topic-sort-groups-by-unread}).
4040
4041 @item T S l
4042 @kindex T S l (Topic)
4043 @findex gnus-topic-sort-groups-by-level
4044 Sort the current topic by group level
4045 (@code{gnus-topic-sort-groups-by-level}).
4046
4047 @item T S v
4048 @kindex T S v (Topic)
4049 @findex gnus-topic-sort-groups-by-score
4050 Sort the current topic by group score
4051 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
4052
4053 @item T S r
4054 @kindex T S r (Topic)
4055 @findex gnus-topic-sort-groups-by-rank
4056 Sort the current topic by group rank
4057 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
4058
4059 @item T S m
4060 @kindex T S m (Topic)
4061 @findex gnus-topic-sort-groups-by-method
4062 Sort the current topic alphabetically by back end name
4063 (@code{gnus-topic-sort-groups-by-method}).
4064
4065 @item T S e
4066 @kindex T S e (Topic)
4067 @findex gnus-topic-sort-groups-by-server
4068 Sort the current topic alphabetically by server name
4069 (@code{gnus-topic-sort-groups-by-server}).
4070
4071 @item T S s
4072 @kindex T S s (Topic)
4073 @findex gnus-topic-sort-groups
4074 Sort the current topic according to the function(s) given by the
4075 @code{gnus-group-sort-function} variable
4076 (@code{gnus-topic-sort-groups}).
4077
4078 @end table
4079
4080 When given a prefix argument, all these commands will sort in reverse
4081 order.  @xref{Sorting Groups}, for more information about group
4082 sorting.
4083
4084
4085 @node Topic Topology
4086 @subsection Topic Topology
4087 @cindex topic topology
4088 @cindex topology
4089
4090 So, let's have a look at an example group buffer:
4091
4092 @example
4093 @group
4094 Gnus
4095   Emacs -- I wuw it!
4096      3: comp.emacs
4097      2: alt.religion.emacs
4098     Naughty Emacs
4099      452: alt.sex.emacs
4100        0: comp.talk.emacs.recovery
4101   Misc
4102      8: comp.binaries.fractals
4103     13: comp.sources.unix
4104 @end group
4105 @end example
4106
4107 So, here we have one top-level topic (@samp{Gnus}), two topics under
4108 that, and one sub-topic under one of the sub-topics.  (There is always
4109 just one (1) top-level topic).  This topology can be expressed as
4110 follows:
4111
4112 @lisp
4113 (("Gnus" visible)
4114  (("Emacs -- I wuw it!" visible)
4115   (("Naughty Emacs" visible)))
4116  (("Misc" visible)))
4117 @end lisp
4118
4119 @vindex gnus-topic-topology
4120 This is in fact how the variable @code{gnus-topic-topology} would look
4121 for the display above.  That variable is saved in the @file{.newsrc.eld}
4122 file, and shouldn't be messed with manually---unless you really want
4123 to.  Since this variable is read from the @file{.newsrc.eld} file,
4124 setting it in any other startup files will have no effect.
4125
4126 This topology shows what topics are sub-topics of what topics (right),
4127 and which topics are visible.  Two settings are currently
4128 allowed---@code{visible} and @code{invisible}.
4129
4130
4131 @node Topic Parameters
4132 @subsection Topic Parameters
4133 @cindex topic parameters
4134
4135 All groups in a topic will inherit group parameters from the parent
4136 (and ancestor) topic parameters.  All valid group parameters are valid
4137 topic parameters (@pxref{Group Parameters}).  When the agent is
4138 enabled, all agent parameters (See Agent Parameters in @ref{Category
4139 Syntax}) are also valid topic parameters.
4140
4141 In addition, the following parameters are only valid as topic
4142 parameters:
4143
4144 @table @code
4145 @item subscribe
4146 When subscribing new groups by topic (@pxref{Subscription Methods}), the
4147 @code{subscribe} topic parameter says what groups go in what topic.  Its
4148 value should be a regexp to match the groups that should go in that
4149 topic.
4150
4151 @item subscribe-level
4152 When subscribing new groups by topic (see the @code{subscribe} parameter),
4153 the group will be subscribed with the level specified in the
4154 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
4155
4156 @end table
4157
4158 Group parameters (of course) override topic parameters, and topic
4159 parameters in sub-topics override topic parameters in super-topics.  You
4160 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
4161 verb, although you may feel free to disagree with me here.)
4162
4163 @example
4164 @group
4165 Gnus
4166   Emacs
4167      3: comp.emacs
4168      2: alt.religion.emacs
4169    452: alt.sex.emacs
4170     Relief
4171      452: alt.sex.emacs
4172        0: comp.talk.emacs.recovery
4173   Misc
4174      8: comp.binaries.fractals
4175     13: comp.sources.unix
4176    452: alt.sex.emacs
4177 @end group
4178 @end example
4179
4180 The @samp{Emacs} topic has the topic parameter @code{(score-file
4181 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
4182 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
4183 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
4184 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
4185 . "religion.SCORE")}.
4186
4187 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
4188 will get the @file{relief.SCORE} home score file.  If you enter the same
4189 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
4190 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
4191 get the @file{religion.SCORE} home score file.
4192
4193 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
4194 there are some problems, especially with the @code{total-expiry}
4195 parameter.  Say you have a mail group in two topics; one with
4196 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
4197 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
4198 of these topics you mean to expire articles from, so anything may
4199 happen.  In fact, I hereby declare that it is @dfn{undefined} what
4200 happens.  You just have to be careful if you do stuff like that.
4201
4202
4203 @node Non-ASCII Group Names
4204 @section Accessing groups of non-English names
4205 @cindex non-ascii group names
4206
4207 There are some news servers that provide groups of which the names are
4208 expressed with their native languages in the world.  For instance, in a
4209 certain news server there are some newsgroups of which the names are
4210 spelled in Chinese, where people are talking in Chinese.  You can, of
4211 course, subscribe to such news groups using Gnus.  Currently Gnus
4212 supports non-@acronym{ASCII} group names not only with the @code{nntp}
4213 back end but also with the @code{nnml} back end and the @code{nnrss}
4214 back end.
4215
4216 Every such group name is encoded by a certain charset in the server
4217 side (in an @acronym{NNTP} server its administrator determines the
4218 charset, but for groups in the other back ends it is determined by you).
4219 Gnus has to display the decoded ones for you in the group buffer and the
4220 article buffer, and needs to use the encoded ones when communicating
4221 with servers.  However, Gnus doesn't know what charset is used for each
4222 non-@acronym{ASCII} group name.  The following two variables are just
4223 the ones for telling Gnus what charset should be used for each group:
4224
4225 @table @code
4226 @item gnus-group-name-charset-method-alist
4227 @vindex gnus-group-name-charset-method-alist
4228 An alist of select methods and charsets.  The default value is
4229 @code{nil}.  The names of groups in the server specified by that select
4230 method are all supposed to use the corresponding charset.  For example:
4231
4232 @lisp
4233 (setq gnus-group-name-charset-method-alist
4234       '(((nntp "news.com.cn") . cn-gb-2312)))
4235 @end lisp
4236
4237 Charsets specified for groups with this variable are preferred to the
4238 ones specified for the same groups with the
4239 @code{gnus-group-name-charset-group-alist} variable (see below).
4240
4241 A select method can be very long, like:
4242
4243 @lisp
4244 (nntp "gmane"
4245       (nntp-address "news.gmane.org")
4246       (nntp-end-of-line "\n")
4247       (nntp-open-connection-function
4248        nntp-open-via-rlogin-and-telnet)
4249       (nntp-via-rlogin-command "ssh")
4250       (nntp-via-rlogin-command-switches
4251        ("-C" "-t" "-e" "none"))
4252       (nntp-via-address @dots{}))
4253 @end lisp
4254
4255 In that case, you can truncate it into @code{(nntp "gmane")} in this
4256 variable.  That is, it is enough to contain only the back end name and
4257 the server name.
4258
4259 @item gnus-group-name-charset-group-alist
4260 @cindex UTF-8 group names
4261 @vindex gnus-group-name-charset-group-alist
4262 An alist of regexp of group name and the charset for group names.
4263 @code{((".*" . utf-8))} is the default value if UTF-8 is supported,
4264 otherwise the default is @code{nil}.  For example:
4265
4266 @lisp
4267 (setq gnus-group-name-charset-group-alist
4268       '(("\\.com\\.cn:" . cn-gb-2312)
4269         (".*" . utf-8)))
4270 @end lisp
4271
4272 Note that this variable is ignored if the match is made with
4273 @code{gnus-group-name-charset-method-alist}.
4274 @end table
4275
4276 Those two variables are used also to determine the charset for encoding
4277 and decoding non-@acronym{ASCII} group names that are in the back ends
4278 other than @code{nntp}.  It means that it is you who determine it.  If
4279 you do nothing, the charset used for group names in those back ends will
4280 all be @code{utf-8} because of the last element of
4281 @code{gnus-group-name-charset-group-alist}.
4282
4283 There is one more important variable for non-@acronym{ASCII} group
4284 names:
4285
4286 @table @code
4287 @item nnmail-pathname-coding-system
4288 @vindex nnmail-pathname-coding-system
4289 The value of this variable should be a coding system or @code{nil}.  The
4290 default is @code{nil} in Emacs, or is the aliasee of the coding system
4291 named @code{file-name} (a certain coding system of which an alias is
4292 @code{file-name}) in XEmacs.
4293
4294 The @code{nnml} back end, the @code{nnrss} back end, the @acronym{NNTP}
4295 marks feature (@pxref{NNTP marks}), the agent, and the cache use
4296 non-@acronym{ASCII} group names in those files and directories.  This
4297 variable overrides the value of @code{file-name-coding-system} which
4298 specifies the coding system used when encoding and decoding those file
4299 names and directory names.
4300
4301 In XEmacs (with the @code{mule} feature), @code{file-name-coding-system}
4302 is the only means to specify the coding system used to encode and decode
4303 file names.  On the other hand, Emacs uses the value of
4304 @code{default-file-name-coding-system} if @code{file-name-coding-system}
4305 is @code{nil} or it is bound to the value of
4306 @code{nnmail-pathname-coding-system} which is @code{nil}.
4307
4308 Normally the value of @code{default-file-name-coding-system} in Emacs or
4309 @code{nnmail-pathname-coding-system} in XEmacs is initialized according
4310 to the locale, so you will need to do nothing if the value is suitable
4311 to encode and decode non-@acronym{ASCII} group names.
4312
4313 The value of this variable (or @code{default-file-name-coding-system})
4314 does not necessarily need to be the same value that is determined by
4315 @code{gnus-group-name-charset-method-alist} and
4316 @code{gnus-group-name-charset-group-alist}.
4317
4318 If @code{default-file-name-coding-system} or this variable is
4319 initialized by default to @code{iso-latin-1} for example, although you
4320 want to subscribe to the groups spelled in Chinese, that is the most
4321 typical case where you have to customize
4322 @code{nnmail-pathname-coding-system}.  The @code{utf-8} coding system is
4323 a good candidate for it.  Otherwise, you may change the locale in your
4324 system so that @code{default-file-name-coding-system} or this variable
4325 may be initialized to an appropriate value.
4326 @end table
4327
4328 Note that when you copy or move articles from a non-@acronym{ASCII}
4329 group to another group, the charset used to encode and decode group
4330 names should be the same in both groups.  Otherwise the Newsgroups
4331 header will be displayed incorrectly in the article buffer.
4332
4333
4334 @node Searching
4335 @section Searching
4336
4337 @menu
4338 * nnir::                     Searching on IMAP, with swish, namazu, etc.
4339 * nnmairix::                 Searching maildir, MH or mbox with Mairix.
4340 @end menu
4341
4342 @cindex Searching
4343
4344 FIXME: This node is a stub.
4345
4346 FIXME: Add a brief overview of Gnus search capabilities.  A brief
4347 comparison of nnir, nnmairix, contrib/gnus-namazu would be nice
4348 as well.
4349
4350 FIXME: Explain difference to @ref{Searching for Articles}, add reference
4351 and back-reference.
4352
4353 @node nnir
4354 @subsection nnir
4355
4356 FIXME: As a first step, convert the commentary of @file{nnir} to texi.
4357 @cindex nnir
4358
4359 @node nnmairix
4360 @subsection nnmairix
4361
4362 @cindex mairix
4363 @cindex nnmairix
4364 This paragraph describes how to set up mairix and the back end
4365 @code{nnmairix} for indexing and searching your mail from within
4366 Gnus.  Additionally, you can create permanent ``smart'' groups which are
4367 bound to mairix searches and are automatically updated.
4368
4369 @menu
4370 * About mairix::                About the mairix mail search engine
4371 * nnmairix requirements::       What you will need for using nnmairix
4372 * What nnmairix does::          What does nnmairix actually do?
4373 * Setting up mairix::           Set up your mairix installation
4374 * Configuring nnmairix::        Set up the nnmairix back end
4375 * nnmairix keyboard shortcuts:: List of available keyboard shortcuts
4376 * Propagating marks::           How to propagate marks from nnmairix groups
4377 * nnmairix tips and tricks::    Some tips, tricks and examples
4378 * nnmairix caveats::            Some more stuff you might want to know
4379 @end menu
4380
4381 @c FIXME: The markup in this section might need improvement.
4382 @c E.g. adding @samp, @var, @file, @command, etc.
4383 @c Cf. (info "(texinfo)Indicating")
4384
4385 @node About mairix
4386 @subsubsection About mairix
4387
4388 Mairix is a tool for indexing and searching words in locally stored
4389 mail.  It was written by Richard Curnow and is licensed under the
4390 GPL.  Mairix comes with most popular GNU/Linux distributions, but it also
4391 runs under Windows (with cygwin), Mac OS X and Solaris.  The homepage can
4392 be found at
4393 @uref{http://www.rpcurnow.force9.co.uk/mairix/index.html}
4394
4395 Though mairix might not be as flexible as other search tools like
4396 swish++ or namazu, which you can use via the @code{nnir} back end, it
4397 has the prime advantage of being incredibly fast.  On current systems, it
4398 can easily search through headers and message bodies of thousands and
4399 thousands of mails in well under a second.  Building the database
4400 necessary for searching might take a minute or two, but only has to be
4401 done once fully.  Afterwards, the updates are done incrementally and
4402 therefore are really fast, too.  Additionally, mairix is very easy to set
4403 up.
4404
4405 For maximum speed though, mairix should be used with mails stored in
4406 @code{Maildir} or @code{MH} format (this includes the @code{nnml} back
4407 end), although it also works with mbox.  Mairix presents the search
4408 results by populating a @emph{virtual} maildir/MH folder with symlinks
4409 which point to the ``real'' message files (if mbox is used, copies are
4410 made).  Since mairix already presents search results in such a virtual
4411 mail folder, it is very well suited for using it as an external program
4412 for creating @emph{smart} mail folders, which represent certain mail
4413 searches.
4414
4415 @node nnmairix requirements
4416 @subsubsection nnmairix requirements
4417
4418 Mairix searches local mail---that means, mairix absolutely must have
4419 direct access to your mail folders.  If your mail resides on another
4420 server (e.g. an @acronym{IMAP} server) and you happen to have shell
4421 access, @code{nnmairix} supports running mairix remotely, e.g. via ssh.
4422
4423 Additionally, @code{nnmairix} only supports the following Gnus back
4424 ends: @code{nnml}, @code{nnmaildir}, and @code{nnimap}.  You must use
4425 one of these back ends for using @code{nnmairix}.  Other back ends, like
4426 @code{nnmbox}, @code{nnfolder} or @code{nnmh}, won't work.
4427
4428 If you absolutely must use mbox and still want to use @code{nnmairix},
4429 you can set up a local @acronym{IMAP} server, which you then access via
4430 @code{nnimap}.  This is a rather massive setup for accessing some mbox
4431 files, so just change to MH or Maildir already...  However, if you're
4432 really, really passionate about using mbox, you might want to look into
4433 the package @file{mairix.el}, which comes with Emacs 23.
4434
4435 @node What nnmairix does
4436 @subsubsection What nnmairix does
4437
4438 The back end @code{nnmairix} enables you to call mairix from within Gnus,
4439 either to query mairix with a search term or to update the
4440 database.  While visiting a message in the summary buffer, you can use
4441 several pre-defined shortcuts for calling mairix, e.g. to quickly
4442 search for all mails from the sender of the current message or to
4443 display the whole thread associated with the message, even if the
4444 mails are in different folders.
4445
4446 Additionally, you can create permanent @code{nnmairix} groups which are bound
4447 to certain mairix searches.  This way, you can easily create a group
4448 containing mails from a certain sender, with a certain subject line or
4449 even for one specific thread based on the Message-ID.  If you check for
4450 new mail in these folders (e.g. by pressing @kbd{g} or @kbd{M-g}), they
4451 automatically update themselves by calling mairix.
4452
4453 You might ask why you need @code{nnmairix} at all, since mairix already
4454 creates the group, populates it with links to the mails so that you can
4455 then access it with Gnus, right?  Well, this @emph{might} work, but often
4456 does not---at least not without problems.  Most probably you will get
4457 strange article counts, and sometimes you might see mails which Gnus
4458 claims have already been canceled and are inaccessible.  This is due to
4459 the fact that Gnus isn't really amused when things are happening behind
4460 its back.  Another problem can be the mail back end itself, e.g. if you
4461 use mairix with an @acronym{IMAP} server (I had Dovecot complaining
4462 about corrupt index files when mairix changed the contents of the search
4463 group).  Using @code{nnmairix} should circumvent these problems.
4464
4465 @code{nnmairix} is not really a mail back end---it's actually more like
4466 a wrapper, sitting between a ``real'' mail back end where mairix stores
4467 the searches and the Gnus front end.  You can choose between three
4468 different mail back ends for the mairix folders: @code{nnml},
4469 @code{nnmaildir} or @code{nnimap}.  @code{nnmairix} will call the mairix
4470 binary so that the search results are stored in folders named
4471 @code{zz_mairix-<NAME>-<NUMBER>} on this mail back end, but it will
4472 present these folders in the Gnus front end only with @code{<NAME>}.
4473 You can use an existing mail back end where you already store your mail,
4474 but if you're uncomfortable with @code{nnmairix} creating new mail
4475 groups alongside your other mail, you can also create e.g. a new
4476 @code{nnmaildir} or @code{nnml} server exclusively for mairix, but then
4477 make sure those servers do not accidentally receive your new mail
4478 (@pxref{nnmairix caveats}).  A special case exists if you want to use
4479 mairix remotely on an IMAP server with @code{nnimap}---here the mairix
4480 folders and your other mail must be on the same @code{nnimap} back end.
4481
4482 @node Setting up mairix
4483 @subsubsection Setting up mairix
4484
4485 First: create a backup of your mail folders (@pxref{nnmairix caveats}).
4486
4487 Setting up mairix is easy: simply create a @file{.mairixrc} file with
4488 (at least) the following entries:
4489
4490 @example
4491 # Your Maildir/MH base folder
4492 base=~/Maildir
4493 @end example
4494
4495 This is the base folder for your mails.  All the following directories
4496 are relative to this base folder.  If you want to use @code{nnmairix}
4497 with @code{nnimap}, this base directory has to point to the mail
4498 directory where the @acronym{IMAP} server stores the mail folders!
4499
4500 @example
4501 maildir= ... your maildir folders which should be indexed ...
4502 mh= ... your nnml/mh folders which should be indexed ...
4503 mbox = ... your mbox files which should be indexed ...
4504 @end example
4505
4506 This specifies all your mail folders and mbox files (relative to the
4507 base directory!) you want to index with mairix.  Note that the
4508 @code{nnml} back end saves mails in MH format, so you have to put those
4509 directories in the @code{mh} line.  See the example at the end of this
4510 section and mairixrc's man-page for further details.
4511
4512 @example
4513 omit=zz_mairix-*
4514 @end example
4515
4516 @vindex nnmairix-group-prefix
4517 This should make sure that you don't accidentally index the mairix
4518 search results.  You can change the prefix of these folders with the
4519 variable @code{nnmairix-group-prefix}.
4520
4521 @example
4522 mformat= ... 'maildir' or 'mh' ...
4523 database= ... location of database file ...
4524 @end example
4525
4526 The @code{format} setting specifies the output format for the mairix
4527 search folder.  Set this to @code{mh} if you want to access search results
4528 with @code{nnml}.  Otherwise choose @code{maildir}.
4529
4530 To summarize, here is my shortened @file{.mairixrc} file as an example:
4531
4532 @example
4533 base=~/Maildir
4534 maildir=.personal:.work:.logcheck:.sent
4535 mh=../Mail/nnml/*...
4536 mbox=../mboxmail/mailarchive_year*
4537 mformat=maildir
4538 omit=zz_mairix-*
4539 database=~/.mairixdatabase
4540 @end example
4541
4542 In this case, the base directory is @file{~/Maildir}, where all my Maildir
4543 folders are stored.  As you can see, the folders are separated by
4544 colons.  If you wonder why every folder begins with a dot: this is
4545 because I use Dovecot as @acronym{IMAP} server, which again uses
4546 @code{Maildir++} folders.  For testing nnmairix, I also have some
4547 @code{nnml} mail, which is saved in @file{~/Mail/nnml}.  Since this has
4548 to be specified relative to the @code{base} directory, the @code{../Mail}
4549 notation is needed.  Note that the line ends in @code{*...}, which means
4550 to recursively scan all files under this directory.  Without the three
4551 dots, the wildcard @code{*} will not work recursively.  I also have some
4552 old mbox files with archived mail lying around in @file{~/mboxmail}.
4553 The other lines should be obvious.
4554
4555 See the man page for @code{mairixrc} for details and further options,
4556 especially regarding wildcard usage, which may be a little different
4557 than you are used to.
4558
4559 Now simply call @code{mairix} to create the index for the first time.
4560 Note that this may take a few minutes, but every following index will do
4561 the updates incrementally and hence is very fast.
4562
4563 @node Configuring nnmairix
4564 @subsubsection Configuring nnmairix
4565
4566 In group mode, type @kbd{G b c}
4567 (@code{nnmairix-create-server-and-default-group}).  This will ask you for all
4568 necessary information and create a @code{nnmairix} server as a foreign
4569 server.  You will have to specify the following:
4570
4571 @itemize @bullet
4572
4573 @item
4574 The @strong{name} of the @code{nnmairix} server---choose whatever you
4575 want.
4576
4577 @item
4578 The name of the @strong{back end server} where mairix should store its
4579 searches.  This must be a full server name, like @code{nnml:mymail}.
4580 Just hit @kbd{TAB} to see the available servers.  Currently, servers
4581 which are accessed through @code{nnmaildir}, @code{nnimap} and
4582 @code{nnml} are supported.  As explained above, for locally stored
4583 mails, this can be an existing server where you store your mails.
4584 However, you can also create e.g. a new @code{nnmaildir} or @code{nnml}
4585 server exclusively for @code{nnmairix} in your secondary select methods
4586 (@pxref{Finding the News}).  If you use a secondary @code{nnml} server
4587 just for mairix, make sure that you explicitly set the server variable
4588 @code{nnml-get-new-mail} to @code{nil}, or you might loose mail
4589 (@pxref{nnmairix caveats}).  If you want to use mairix remotely on an
4590 @acronym{IMAP} server, you have to choose the corresponding
4591 @code{nnimap} server here.
4592
4593 @item
4594 @vindex nnmairix-mairix-search-options
4595 The @strong{command} to call the mairix binary.  This will usually just
4596 be @code{mairix}, but you can also choose something like @code{ssh
4597 SERVER mairix} if you want to call mairix remotely, e.g. on your
4598 @acronym{IMAP} server.  If you want to add some default options to
4599 mairix, you could do this here, but better use the variable
4600 @code{nnmairix-mairix-search-options} instead.
4601
4602 @item
4603 The name of the @strong{default search group}.  This will be the group
4604 where all temporary mairix searches are stored, i.e. all searches which
4605 are not bound to permanent @code{nnmairix} groups.  Choose whatever you
4606 like.
4607
4608 @item
4609 If the mail back end is @code{nnimap} or @code{nnmaildir}, you will be
4610 asked if you work with @strong{Maildir++}, i.e. with hidden maildir
4611 folders (=beginning with a dot).  For example, you have to answer
4612 @samp{yes} here if you work with the Dovecot @acronym{IMAP}
4613 server.  Otherwise, you should answer @samp{no} here.
4614
4615 @end itemize
4616
4617 @node nnmairix keyboard shortcuts
4618 @subsubsection nnmairix keyboard shortcuts
4619
4620 In group mode:
4621
4622 @table @kbd
4623
4624 @item G b c
4625 @kindex G b c (Group)
4626 @findex nnmairix-create-server-and-default-group
4627 Creates @code{nnmairix} server and default search group for this server
4628 (@code{nnmairix-create-server-and-default-group}).  You should have done
4629 this by now (@pxref{Configuring nnmairix}).
4630
4631 @item G b s
4632 @kindex G b s (Group)
4633 @findex nnmairix-search
4634 Prompts for query which is then sent to the mairix binary.  Search
4635 results are put into the default search group which is automatically
4636 displayed (@code{nnmairix-search}).
4637
4638 @item G b m
4639 @kindex G b m (Group)
4640 @findex nnmairix-widget-search
4641 Allows you to create a mairix search or a permanent group more
4642 comfortably using graphical widgets, similar to a customization
4643 group.  Just try it to see how it works (@code{nnmairix-widget-search}).
4644
4645 @item G b i
4646 @kindex G b i (Group)
4647 @findex nnmairix-search-interactive
4648 Another command for creating a mairix query more comfortably, but uses
4649 only the minibuffer (@code{nnmairix-search-interactive}).
4650
4651 @item G b g
4652 @kindex G b g (Group)
4653 @findex nnmairix-create-search-group
4654 Creates a permanent group which is associated with a search query
4655 (@code{nnmairix-create-search-group}).  The @code{nnmairix} back end
4656 automatically calls mairix when you update this group with @kbd{g} or
4657 @kbd{M-g}.
4658
4659 @item G b q
4660 @kindex G b q (Group)
4661 @findex nnmairix-group-change-query-this-group
4662 Changes the search query for the @code{nnmairix} group under cursor
4663 (@code{nnmairix-group-change-query-this-group}).
4664
4665 @item G b t
4666 @kindex G b t (Group)
4667 @findex nnmairix-group-toggle-threads-this-group
4668 Toggles the 'threads' parameter for the @code{nnmairix} group under cursor,
4669 i.e.  if you want see the whole threads of the found messages
4670 (@code{nnmairix-group-toggle-threads-this-group}).
4671
4672 @item G b u
4673 @kindex G b u (Group)
4674 @findex nnmairix-update-database
4675 @vindex nnmairix-mairix-update-options
4676 Calls mairix binary for updating the database
4677 (@code{nnmairix-update-database}).  The default parameters are @code{-F}
4678 and @code{-Q} for making this as fast as possible (see variable
4679 @code{nnmairix-mairix-update-options} for defining these default
4680 options).
4681
4682 @item G b r
4683 @kindex G b r (Group)
4684 @findex nnmairix-group-toggle-readmarks-this-group
4685 Keep articles in this @code{nnmairix} group always read or unread, or leave the
4686 marks unchanged (@code{nnmairix-group-toggle-readmarks-this-group}).
4687
4688 @item G b d
4689 @kindex G b d (Group)
4690 @findex nnmairix-group-delete-recreate-this-group
4691 Recreate @code{nnmairix} group on the ``real'' mail back end
4692 (@code{nnmairix-group-delete-recreate-this-group}).  You can do this if
4693 you always get wrong article counts with a @code{nnmairix} group.
4694
4695 @item G b a
4696 @kindex G b a (Group)
4697 @findex nnmairix-group-toggle-allowfast-this-group
4698 Toggles the @code{allow-fast} parameters for group under cursor
4699 (@code{nnmairix-group-toggle-allowfast-this-group}).  The default
4700 behavior of @code{nnmairix} is to do a mairix search every time you
4701 update or enter the group.  With the @code{allow-fast} parameter set,
4702 mairix will only be called when you explicitly update the group, but not
4703 upon entering.  This makes entering the group faster, but it may also
4704 lead to dangling symlinks if something changed between updating and
4705 entering the group which is not yet in the mairix database.
4706
4707 @item G b p
4708 @kindex G b p (Group)
4709 @findex nnmairix-group-toggle-propmarks-this-group
4710 Toggle marks propagation for this group
4711 (@code{nnmairix-group-toggle-propmarks-this-group}).  (@pxref{Propagating
4712 marks}).
4713
4714 @item G b o
4715 @kindex G b o (Group)
4716 @findex nnmairix-propagate-marks
4717 Manually propagate marks (@code{nnmairix-propagate-marks}); needed only when
4718 @code{nnmairix-propagate-marks-upon-close} is set to @code{nil}.
4719
4720 @end table
4721
4722 In summary mode:
4723
4724 @table @kbd
4725
4726 @item $ m
4727 @kindex $ m (Summary)
4728 @findex nnmairix-widget-search-from-this-article
4729 Allows you to create a mairix query or group based on the current
4730 message using graphical widgets (same as @code{nnmairix-widget-search})
4731 (@code{nnmairix-widget-search-from-this-article}).
4732
4733 @item $ g
4734 @kindex $ g (Summary)
4735 @findex nnmairix-create-search-group-from-message
4736 Interactively creates a new search group with query based on the current
4737 message, but uses the minibuffer instead of graphical widgets
4738 (@code{nnmairix-create-search-group-from-message}).
4739
4740 @item $ t
4741 @kindex $ t (Summary)
4742 @findex nnmairix-search-thread-this-article
4743 Searches thread for the current article
4744 (@code{nnmairix-search-thread-this-article}).  This is effectively a
4745 shortcut for calling @code{nnmairix-search} with @samp{m:msgid} of the
4746 current article and enabled threads.
4747
4748 @item $ f
4749 @kindex $ f (Summary)
4750 @findex nnmairix-search-from-this-article
4751 Searches all messages from sender of the current article
4752 (@code{nnmairix-search-from-this-article}).  This is a shortcut for
4753 calling @code{nnmairix-search} with @samp{f:From}.
4754
4755 @item $ o
4756 @kindex $ o (Summary)
4757 @findex nnmairix-goto-original-article
4758 (Only in @code{nnmairix} groups!) Tries determine the group this article
4759 originally came from and displays the article in this group, so that
4760 e.g. replying to this article the correct posting styles/group
4761 parameters are applied (@code{nnmairix-goto-original-article}).  This
4762 function will use the registry if available, but can also parse the
4763 article file name as a fallback method.
4764
4765 @item $ u
4766 @kindex $ u (Summary)
4767 @findex nnmairix-remove-tick-mark-original-article
4768 Remove possibly existing tick mark from original article
4769 (@code{nnmairix-remove-tick-mark-original-article}).  (@pxref{nnmairix
4770 tips and tricks}).
4771
4772 @end table
4773
4774 @node Propagating marks
4775 @subsubsection Propagating marks
4776
4777 First of: you really need a patched mairix binary for using the marks
4778 propagation feature efficiently. Otherwise, you would have to update
4779 the mairix database all the time. You can get the patch at
4780
4781 @uref{http://www.randomsample.de/mairix-maildir-patch.tar}
4782
4783 You need the mairix v0.21 source code for this patch; everything else
4784 is explained in the accompanied readme file. If you don't want to use
4785 marks propagation, you don't have to apply these patches, but they also
4786 fix some annoyances regarding changing maildir flags, so it might still
4787 be useful to you.
4788
4789 With the patched mairix binary, you can use @code{nnmairix} as an
4790 alternative to mail splitting (@pxref{Fancy Mail Splitting}). For
4791 example, instead of splitting all mails from @samp{david@@foobar.com}
4792 into a group, you can simply create a search group with the query
4793 @samp{f:david@@foobar.com}. This is actually what ``smart folders'' are
4794 all about: simply put everything in one mail folder and dynamically
4795 create searches instead of splitting. This is more flexible, since you
4796 can dynamically change your folders any time you want to. This also
4797 implies that you will usually read your mails in the @code{nnmairix}
4798 groups instead of your ``real'' mail groups.
4799
4800 There is one problem, though: say you got a new mail from
4801 @samp{david@@foobar.com}; it will now show up in two groups, the
4802 ``real'' group (your INBOX, for example) and in the @code{nnmairix}
4803 search group (provided you have updated the mairix database). Now you
4804 enter the @code{nnmairix} group and read the mail. The mail will be
4805 marked as read, but only in the @code{nnmairix} group---in the ``real''
4806 mail group it will be still shown as unread.
4807
4808 You could now catch up the mail group (@pxref{Group Data}), but this is
4809 tedious and error prone, since you may overlook mails you don't have
4810 created @code{nnmairix} groups for. Of course, you could first use
4811 @code{nnmairix-goto-original-article} (@pxref{nnmairix keyboard
4812 shortcuts}) and then read the mail in the original group, but that's
4813 even more cumbersome.
4814
4815 Clearly, the easiest way would be if marks could somehow be
4816 automatically set for the original article. This is exactly what
4817 @emph{marks propagation} is about.
4818
4819 Marks propagation is deactivated by default. You can activate it for a
4820 certain @code{nnmairix} group with
4821 @code{nnmairix-group-toggle-propmarks-this-group} (bound to @kbd{G b
4822 p}). This function will warn you if you try to use it with your default
4823 search group; the reason is that the default search group is used for
4824 temporary searches, and it's easy to accidentally propagate marks from
4825 this group. However, you can ignore this warning if you really want to.
4826
4827 With marks propagation enabled, all the marks you set in a @code{nnmairix}
4828 group should now be propagated to the original article. For example,
4829 you can now tick an article (by default with @kbd{!}) and this mark should
4830 magically be set for the original article, too.
4831
4832 A few more remarks which you may or may not want to know:
4833
4834 @vindex nnmairix-propagate-marks-upon-close
4835 Marks will not be set immediately, but only upon closing a group. This
4836 not only makes marks propagation faster, it also avoids problems with
4837 dangling symlinks when dealing with maildir files (since changing flags
4838 will change the file name). You can also control when to propagate marks
4839 via @code{nnmairix-propagate-marks-upon-close} (see the doc-string for
4840 details).
4841
4842 Obviously, @code{nnmairix} will have to look up the original group for every
4843 article you want to set marks for. If available, @code{nnmairix} will first use
4844 the registry for determining the original group. The registry is very
4845 fast, hence you should really, really enable the registry when using
4846 marks propagation. If you don't have to worry about RAM and disc space,
4847 set @code{gnus-registry-max-entries} to a large enough value; to be on
4848 the safe side, choose roughly the amount of mails you index with mairix.
4849
4850 @vindex nnmairix-only-use-registry
4851 If you don't want to use the registry or the registry hasn't seen the
4852 original article yet, @code{nnmairix} will use an additional mairix
4853 search for determining the file name of the article. This, of course, is
4854 way slower than the registry---if you set hundreds or even thousands of
4855 marks this way, it might take some time. You can avoid this situation by
4856 setting @code{nnmairix-only-use-registry} to t.
4857
4858 Maybe you also want to propagate marks the other way round, i.e. if you
4859 tick an article in a "real" mail group, you'd like to have the same
4860 article in a @code{nnmairix} group ticked, too. For several good
4861 reasons, this can only be done efficiently if you use maildir. To
4862 immediately contradict myself, let me mention that it WON'T work with
4863 @code{nnmaildir}, since @code{nnmaildir} stores the marks externally and
4864 not in the file name. Therefore, propagating marks to @code{nnmairix}
4865 groups will usually only work if you use an IMAP server which uses
4866 maildir as its file format.
4867
4868 @vindex nnmairix-propagate-marks-to-nnmairix-groups
4869 If you work with this setup, just set
4870 @code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t} and see what
4871 happens. If you don't like what you see, just set it to @code{nil} again. One
4872 problem might be that you get a wrong number of unread articles; this
4873 usually happens when you delete or expire articles in the original
4874 groups. When this happens, you can recreate the @code{nnmairix} group on the
4875 back end using @kbd{G b d}.
4876
4877 @node nnmairix tips and tricks
4878 @subsubsection nnmairix tips and tricks
4879
4880 @itemize
4881 @item
4882 Checking Mail
4883
4884 @findex nnmairix-update-groups
4885 I put all my important mail groups at group level 1. The mairix groups
4886 have group level 5, so they do not get checked at start up (@pxref{Group
4887 Levels}).
4888
4889 I use the following to check for mails:
4890
4891 @lisp
4892 (defun my-check-mail-mairix-update (level)
4893   (interactive "P")
4894   ;; if no prefix given, set level=1
4895   (gnus-group-get-new-news (or level 1))
4896   (nnmairix-update-groups "mairixsearch" t t)
4897   (gnus-group-list-groups))
4898
4899 (define-key gnus-group-mode-map "g" 'my-check-mail-mairix-update)
4900 @end lisp
4901
4902 Instead of @samp{"mairixsearch"} use the name of your @code{nnmairix}
4903 server. See the doc string for @code{nnmairix-update-groups} for
4904 details.
4905
4906 @item
4907 Example: search group for ticked articles
4908
4909 For example, you can create a group for all ticked articles, where the
4910 articles always stay unread:
4911
4912 Hit @kbd{G b g}, enter group name (e.g. @samp{important}), use
4913 @samp{F:f} as query and do not include threads.
4914
4915 Now activate marks propagation for this group by using @kbd{G b p}. Then
4916 activate the always-unread feature by using @kbd{G b r} twice.
4917
4918 So far so good---but how do you remove the tick marks in the @code{nnmairix}
4919 group?  There are two options: You may simply use
4920 @code{nnmairix-remove-tick-mark-original-article} (bound to @kbd{$ u}) to remove
4921 tick marks from the original article. The other possibility is to set
4922 @code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t}, but see the above
4923 comments about this option.  If it works for you, the tick marks should
4924 also exist in the @code{nnmairix} group and you can remove them as usual,
4925 e.g. by marking an article as read.
4926
4927 When you have removed a tick mark from the original article, this
4928 article should vanish from the @code{nnmairix} group after you have updated the
4929 mairix database and updated the group.  Fortunately, there is a function
4930 for doing exactly that: @code{nnmairix-update-groups}. See the previous code
4931 snippet and the doc string for details.
4932
4933 @item
4934 Dealing with auto-subscription of mail groups
4935
4936 As described before, all @code{nnmairix} groups are in fact stored on
4937 the mail back end in the form @samp{zz_mairix-<NAME>-<NUMBER>}. You can
4938 see them when you enter the back end server in the server buffer. You
4939 should not subscribe these groups! Unfortunately, these groups will
4940 usually get @emph{auto-subscribed} when you use @code{nnmaildir} or
4941 @code{nnml}, i.e. you will suddenly see groups of the form
4942 @samp{zz_mairix*} pop up in your group buffer. If this happens to you,
4943 simply kill these groups with C-k.  For avoiding this, turn off
4944 auto-subscription completely by setting the variable
4945 @code{gnus-auto-subscribed-groups} to @code{nil} (@pxref{Filtering New
4946 Groups}), or if you like to keep this feature use the following kludge
4947 for turning it off for all groups beginning with @samp{zz_}:
4948
4949 @lisp
4950 (setq gnus-auto-subscribed-groups
4951       "^\\(nnml\\|nnfolder\\|nnmbox\\|nnmh\\|nnbabyl\\|nnmaildir\\).*:\\([^z]\\|z$\\|\\z[^z]\\|zz$\\|zz[^_]\\|zz_$\\).*")
4952 @end lisp
4953
4954 @end itemize
4955
4956 @node nnmairix caveats
4957 @subsubsection nnmairix caveats
4958
4959 @itemize
4960 @item
4961 You can create a secondary @code{nnml} server just for nnmairix, but then
4962 you have to explicitly set the corresponding server variable
4963 @code{nnml-get-new-mail} to @code{nil}.  Otherwise, new mail might get
4964 put into this secondary server (and would never show up again).  Here's
4965 an example server definition:
4966
4967 @lisp
4968 (nnml "mairix" (nnml-directory "mairix") (nnml-get-new-mail nil))
4969 @end lisp
4970
4971 (The @code{nnmaildir} back end also has a server variabe
4972 @code{get-new-mail}, but its default value is @code{nil}, so you don't
4973 have to explicitly set it if you use a @code{nnmaildir} server just for
4974 mairix.)
4975
4976 @item
4977 If you use the Gnus registry: don't use the registry with
4978 @code{nnmairix} groups (put them in
4979 @code{gnus-registry-unfollowed-groups}).  Be @emph{extra careful} if
4980 you use @code{gnus-registry-split-fancy-with-parent}; mails which are
4981 split into @code{nnmairix} groups are usually gone for good as soon as
4982 you check the group for new mail (yes, it has happened to me...).
4983
4984 @item
4985 Therefore: @emph{Never ever} put ``real'' mails into @code{nnmairix}
4986 groups (you shouldn't be able to, anyway).
4987
4988 @item
4989 If you use the Gnus agent (@pxref{Gnus Unplugged}): don't agentize
4990 @code{nnmairix} groups (though I have no idea what happens if you do).
4991
4992 @item
4993 mairix does only support us-ascii characters.
4994
4995 @item
4996 @code{nnmairix} uses a rather brute force method to force Gnus to
4997 completely reread the group on the mail back end after mairix was
4998 called---it simply deletes and re-creates the group on the mail
4999 back end. So far, this has worked for me without any problems, and I
5000 don't see how @code{nnmairix} could delete other mail groups than its
5001 own, but anyway: you really should have a backup of your mail
5002 folders.
5003
5004 @item
5005 All necessary information is stored in the group parameters
5006 (@pxref{Group Parameters}). This has the advantage that no active file
5007 is needed, but also implies that when you kill a @code{nnmairix} group,
5008 it is gone for good.
5009
5010 @item
5011 @findex nnmairix-purge-old-groups
5012 If you create and kill a lot of @code{nnmairix} groups, the
5013 ``zz_mairix-*'' groups will accumulate on the mail back end server. To
5014 delete old groups which are no longer needed, call
5015 @code{nnmairix-purge-old-groups}. Note that this assumes that you don't
5016 save any ``real'' mail in folders of the form
5017 @code{zz_mairix-<NAME>-<NUMBER>}. You can change the prefix of
5018 @code{nnmairix} groups by changing the variable
5019 @code{nnmairix-group-prefix}.
5020
5021 @item
5022 The following only applies if you @emph{don't} use the mentioned patch
5023 for mairix (@pxref{Propagating marks}):
5024
5025 A problem can occur when using @code{nnmairix} with maildir folders and
5026 comes with the fact that maildir stores mail flags like @samp{Seen} or
5027 @samp{Replied} by appending chars @samp{S} and @samp{R} to the message
5028 file name, respectively. This implies that currently you would have to
5029 update the mairix database not only when new mail arrives, but also when
5030 mail flags are changing. The same applies to new mails which are indexed
5031 while they are still in the @samp{new} folder but then get moved to
5032 @samp{cur} when Gnus has seen the mail. If you don't update the database
5033 after this has happened, a mairix query can lead to symlinks pointing to
5034 non-existing files. In Gnus, these messages will usually appear with
5035 ``(none)'' entries in the header and can't be accessed. If this happens
5036 to you, using @kbd{G b u} and updating the group will usually fix this.
5037
5038 @end itemize
5039
5040 @node Misc Group Stuff
5041 @section Misc Group Stuff
5042
5043 @menu
5044 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
5045 * Group Information::           Information and help on groups and Gnus.
5046 * Group Timestamp::             Making Gnus keep track of when you last read a group.
5047 * File Commands::               Reading and writing the Gnus files.
5048 * Sieve Commands::              Managing Sieve scripts.
5049 @end menu
5050
5051 @table @kbd
5052
5053 @item v
5054 @kindex v (Group)
5055 @cindex keys, reserved for users (Group)
5056 The key @kbd{v} is reserved for users.  You can bind it to some
5057 command or better use it as a prefix key.  For example:
5058
5059 @lisp
5060 (define-key gnus-group-mode-map (kbd "v j d")
5061   (lambda ()
5062     (interactive)
5063     (gnus-group-jump-to-group "nndraft:drafts")))
5064 @end lisp
5065
5066 On keys reserved for users in Emacs and on keybindings in general
5067 @xref{Keymaps, Keymaps, , emacs, The Emacs Editor}.
5068
5069 @item ^
5070 @kindex ^ (Group)
5071 @findex gnus-group-enter-server-mode
5072 Enter the server buffer (@code{gnus-group-enter-server-mode}).
5073 @xref{Server Buffer}.
5074
5075 @item a
5076 @kindex a (Group)
5077 @findex gnus-group-post-news
5078 Start composing a message (a news by default)
5079 (@code{gnus-group-post-news}).  If given a prefix, post to the group
5080 under the point.  If the prefix is 1, prompt for a group to post to.
5081 Contrary to what the name of this function suggests, the prepared
5082 article might be a mail instead of a news, if a mail group is specified
5083 with the prefix argument.  @xref{Composing Messages}.
5084
5085 @item m
5086 @kindex m (Group)
5087 @findex gnus-group-mail
5088 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
5089 use the posting style of the group under the point.  If the prefix is 1,
5090 prompt for a group name to find the posting style.
5091 @xref{Composing Messages}.
5092
5093 @item i
5094 @kindex i (Group)
5095 @findex gnus-group-news
5096 Start composing a news (@code{gnus-group-news}).  If given a prefix,
5097 post to the group under the point.  If the prefix is 1, prompt
5098 for group to post to.  @xref{Composing Messages}.
5099
5100 This function actually prepares a news even when using mail groups.
5101 This is useful for ``posting'' messages to mail groups without actually
5102 sending them over the network: they're just saved directly to the group
5103 in question.  The corresponding back end must have a request-post method
5104 for this to work though.
5105
5106 @item G z
5107 @kindex G z (Group)
5108 @findex gnus-group-compact-group
5109
5110 Compact the group under point (@code{gnus-group-compact-group}).
5111 Currently implemented only in nnml (@pxref{Mail Spool}).  This removes
5112 gaps between article numbers, hence getting a correct total article
5113 count.
5114
5115 @end table
5116
5117 Variables for the group buffer:
5118
5119 @table @code
5120
5121 @item gnus-group-mode-hook
5122 @vindex gnus-group-mode-hook
5123 is called after the group buffer has been
5124 created.
5125
5126 @item gnus-group-prepare-hook
5127 @vindex gnus-group-prepare-hook
5128 is called after the group buffer is
5129 generated.  It may be used to modify the buffer in some strange,
5130 unnatural way.
5131
5132 @item gnus-group-prepared-hook
5133 @vindex gnus-group-prepare-hook
5134 is called as the very last thing after the group buffer has been
5135 generated.  It may be used to move point around, for instance.
5136
5137 @item gnus-permanently-visible-groups
5138 @vindex gnus-permanently-visible-groups
5139 Groups matching this regexp will always be listed in the group buffer,
5140 whether they are empty or not.
5141
5142 @end table
5143
5144 @node Scanning New Messages
5145 @subsection Scanning New Messages
5146 @cindex new messages
5147 @cindex scanning new news
5148
5149 @table @kbd
5150
5151 @item g
5152 @kindex g (Group)
5153 @findex gnus-group-get-new-news
5154 @c @icon{gnus-group-get-new-news}
5155 Check the server(s) for new articles.  If the numerical prefix is used,
5156 this command will check only groups of level @var{arg} and lower
5157 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
5158 command will force a total re-reading of the active file(s) from the
5159 back end(s).
5160
5161 @item M-g
5162 @kindex M-g (Group)
5163 @findex gnus-group-get-new-news-this-group
5164 @vindex gnus-goto-next-group-when-activating
5165 @c @icon{gnus-group-get-new-news-this-group}
5166 Check whether new articles have arrived in the current group
5167 (@code{gnus-group-get-new-news-this-group}).
5168 @code{gnus-goto-next-group-when-activating} says whether this command is
5169 to move point to the next group or not.  It is @code{t} by default.
5170
5171 @findex gnus-activate-all-groups
5172 @cindex activating groups
5173 @item C-c M-g
5174 @kindex C-c M-g (Group)
5175 Activate absolutely all groups (@code{gnus-activate-all-groups}).
5176
5177 @item R
5178 @kindex R (Group)
5179 @cindex restarting
5180 @findex gnus-group-restart
5181 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
5182 file(s), closes the connection to all servers, clears up all run-time
5183 Gnus variables, and then starts Gnus all over again.
5184
5185 @end table
5186
5187 @vindex gnus-get-new-news-hook
5188 @code{gnus-get-new-news-hook} is run just before checking for new news.
5189
5190 @vindex gnus-after-getting-new-news-hook
5191 @code{gnus-after-getting-new-news-hook} is run after checking for new
5192 news.
5193
5194
5195 @node Group Information
5196 @subsection Group Information
5197 @cindex group information
5198 @cindex information on groups
5199
5200 @table @kbd
5201
5202
5203 @item H f
5204 @kindex H f (Group)
5205 @findex gnus-group-fetch-faq
5206 @vindex gnus-group-faq-directory
5207 @cindex FAQ
5208 @cindex ange-ftp
5209 Try to fetch the @acronym{FAQ} for the current group
5210 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
5211 from @code{gnus-group-faq-directory}, which is usually a directory on
5212 a remote machine.  This variable can also be a list of directories.
5213 In that case, giving a prefix to this command will allow you to choose
5214 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
5215 used for fetching the file.
5216
5217 If fetching from the first site is unsuccessful, Gnus will attempt to go
5218 through @code{gnus-group-faq-directory} and try to open them one by one.
5219
5220 @item H c
5221 @kindex H c (Group)
5222 @findex gnus-group-fetch-charter
5223 @vindex gnus-group-charter-alist
5224 @cindex charter
5225 Try to open the charter for the current group in a web browser
5226 (@code{gnus-group-fetch-charter}).  Query for a group if given a
5227 prefix argument.
5228
5229 Gnus will use @code{gnus-group-charter-alist} to find the location of
5230 the charter.  If no location is known, Gnus will fetch the control
5231 messages for the group, which in some cases includes the charter.
5232
5233 @item H C
5234 @kindex H C (Group)
5235 @findex gnus-group-fetch-control
5236 @vindex gnus-group-fetch-control-use-browse-url
5237 @cindex control message
5238 Fetch the control messages for the group from the archive at
5239 @code{ftp.isc.org} (@code{gnus-group-fetch-control}).  Query for a
5240 group if given a prefix argument.
5241
5242 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
5243 Gnus will open the control messages in a browser using
5244 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
5245 and displayed in an ephemeral group.
5246
5247 Note that the control messages are compressed.  To use this command
5248 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
5249 Files, ,Compressed Files, emacs, The Emacs Manual}).
5250
5251 @item H d
5252 @itemx C-c C-d
5253 @c @icon{gnus-group-describe-group}
5254 @kindex H d (Group)
5255 @kindex C-c C-d (Group)
5256 @cindex describing groups
5257 @cindex group description
5258 @findex gnus-group-describe-group
5259 Describe the current group (@code{gnus-group-describe-group}).  If given
5260 a prefix, force Gnus to re-read the description from the server.
5261
5262 @item M-d
5263 @kindex M-d (Group)
5264 @findex gnus-group-describe-all-groups
5265 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
5266 prefix, force Gnus to re-read the description file from the server.
5267
5268 @item H v
5269 @itemx V
5270 @kindex V (Group)
5271 @kindex H v (Group)
5272 @cindex version
5273 @findex gnus-version
5274 Display current Gnus version numbers (@code{gnus-version}).
5275
5276 @item ?
5277 @kindex ? (Group)
5278 @findex gnus-group-describe-briefly
5279 Give a very short help message (@code{gnus-group-describe-briefly}).
5280
5281 @item C-c C-i
5282 @kindex C-c C-i (Group)
5283 @cindex info
5284 @cindex manual
5285 @findex gnus-info-find-node
5286 Go to the Gnus info node (@code{gnus-info-find-node}).
5287 @end table
5288
5289
5290 @node Group Timestamp
5291 @subsection Group Timestamp
5292 @cindex timestamps
5293 @cindex group timestamps
5294
5295 It can be convenient to let Gnus keep track of when you last read a
5296 group.  To set the ball rolling, you should add
5297 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
5298
5299 @lisp
5300 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
5301 @end lisp
5302
5303 After doing this, each time you enter a group, it'll be recorded.
5304
5305 This information can be displayed in various ways---the easiest is to
5306 use the @samp{%d} spec in the group line format:
5307
5308 @lisp
5309 (setq gnus-group-line-format
5310       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
5311 @end lisp
5312
5313 This will result in lines looking like:
5314
5315 @example
5316 *        0: mail.ding                                19961002T012943
5317          0: custom                                   19961002T012713
5318 @end example
5319
5320 As you can see, the date is displayed in compact ISO 8601 format.  This
5321 may be a bit too much, so to just display the date, you could say
5322 something like:
5323
5324 @lisp
5325 (setq gnus-group-line-format
5326       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
5327 @end lisp
5328
5329 If you would like greater control of the time format, you can use a
5330 user-defined format spec.  Something like the following should do the
5331 trick:
5332
5333 @lisp
5334 (setq gnus-group-line-format
5335       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
5336 (defun gnus-user-format-function-d (headers)
5337   (let ((time (gnus-group-timestamp gnus-tmp-group)))
5338     (if time
5339         (format-time-string "%b %d  %H:%M" time)
5340       "")))
5341 @end lisp
5342
5343
5344 @node File Commands
5345 @subsection File Commands
5346 @cindex file commands
5347
5348 @table @kbd
5349
5350 @item r
5351 @kindex r (Group)
5352 @findex gnus-group-read-init-file
5353 @vindex gnus-init-file
5354 @cindex reading init file
5355 Re-read the init file (@code{gnus-init-file}, which defaults to
5356 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
5357
5358 @item s
5359 @kindex s (Group)
5360 @findex gnus-group-save-newsrc
5361 @cindex saving .newsrc
5362 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
5363 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
5364 file(s) whether Gnus thinks it is necessary or not.
5365
5366 @c @item Z
5367 @c @kindex Z (Group)
5368 @c @findex gnus-group-clear-dribble
5369 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
5370
5371 @end table
5372
5373
5374 @node Sieve Commands
5375 @subsection Sieve Commands
5376 @cindex group sieve commands
5377
5378 Sieve is a server-side mail filtering language.  In Gnus you can use
5379 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
5380 sieve rules that should apply to each group.  Gnus provides two
5381 commands to translate all these group parameters into a proper Sieve
5382 script that can be transfered to the server somehow.
5383
5384 @vindex gnus-sieve-file
5385 @vindex gnus-sieve-region-start
5386 @vindex gnus-sieve-region-end
5387 The generated Sieve script is placed in @code{gnus-sieve-file} (by
5388 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
5389 between two delimiters, @code{gnus-sieve-region-start} and
5390 @code{gnus-sieve-region-end}, so you may write additional Sieve code
5391 outside these delimiters that will not be removed the next time you
5392 regenerate the Sieve script.
5393
5394 @vindex gnus-sieve-crosspost
5395 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
5396 is generated.  If it is non-@code{nil} (the default) articles is
5397 placed in all groups that have matching rules, otherwise the article
5398 is only placed in the group with the first matching rule.  For
5399 example, the group parameter @samp{(sieve address "sender"
5400 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
5401 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
5402 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
5403 except that the line containing the call to @code{stop} is removed.)
5404
5405 @example
5406 if address "sender" "owner-ding@@hpc.uh.edu" @{
5407         fileinto "INBOX.ding";
5408         stop;
5409 @}
5410 @end example
5411
5412 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
5413
5414 @table @kbd
5415
5416 @item D g
5417 @kindex D g (Group)
5418 @findex gnus-sieve-generate
5419 @vindex gnus-sieve-file
5420 @cindex generating sieve script
5421 Regenerate a Sieve script from the @code{sieve} group parameters and
5422 put you into the @code{gnus-sieve-file} without saving it.
5423
5424 @item D u
5425 @kindex D u (Group)
5426 @findex gnus-sieve-update
5427 @vindex gnus-sieve-file
5428 @cindex updating sieve script
5429 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
5430 @code{sieve} group parameters, save the file and upload it to the
5431 server using the @code{sieveshell} program.
5432
5433 @end table
5434
5435
5436 @node Summary Buffer
5437 @chapter Summary Buffer
5438 @cindex summary buffer
5439
5440 A line for each article is displayed in the summary buffer.  You can
5441 move around, read articles, post articles and reply to articles.
5442
5443 The most common way to a summary buffer is to select a group from the
5444 group buffer (@pxref{Selecting a Group}).
5445
5446 You can have as many summary buffers open as you wish.
5447
5448 You can customize the Summary Mode tool bar, see @kbd{M-x
5449 customize-apropos RET gnus-summary-tool-bar}.  This feature is only
5450 available in Emacs.
5451
5452 @kindex v (Summary)
5453 @cindex keys, reserved for users (Summary)
5454 The key @kbd{v} is reserved for users.  You can bind it to some
5455 command or better use it as a prefix key.  For example:
5456 @lisp
5457 (define-key gnus-summary-mode-map (kbd "v -") "LrS") ;; lower subthread
5458 @end lisp
5459
5460 @menu
5461 * Summary Buffer Format::       Deciding how the summary buffer is to look.
5462 * Summary Maneuvering::         Moving around the summary buffer.
5463 * Choosing Articles::           Reading articles.
5464 * Paging the Article::          Scrolling the current article.
5465 * Reply Followup and Post::     Posting articles.
5466 * Delayed Articles::            Send articles at a later time.
5467 * Marking Articles::            Marking articles as read, expirable, etc.
5468 * Limiting::                    You can limit the summary buffer.
5469 * Threading::                   How threads are made.
5470 * Sorting the Summary Buffer::  How articles and threads are sorted.
5471 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
5472 * Article Caching::             You may store articles in a cache.
5473 * Persistent Articles::         Making articles expiry-resistant.
5474 * Sticky Articles::             Article buffers that are not reused.
5475 * Article Backlog::             Having already read articles hang around.
5476 * Saving Articles::             Ways of customizing article saving.
5477 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
5478 * Article Treatment::           The article buffer can be mangled at will.
5479 * MIME Commands::               Doing MIMEy things with the articles.
5480 * Charsets::                    Character set issues.
5481 * Article Commands::            Doing various things with the article buffer.
5482 * Summary Sorting::             Sorting the summary buffer in various ways.
5483 * Finding the Parent::          No child support? Get the parent.
5484 * Alternative Approaches::      Reading using non-default summaries.
5485 * Tree Display::                A more visual display of threads.
5486 * Mail Group Commands::         Some commands can only be used in mail groups.
5487 * Various Summary Stuff::       What didn't fit anywhere else.
5488 * Exiting the Summary Buffer::  Returning to the Group buffer,
5489                                 or reselecting the current group.
5490 * Crosspost Handling::          How crossposted articles are dealt with.
5491 * Duplicate Suppression::       An alternative when crosspost handling fails.
5492 * Security::                    Decrypt and Verify.
5493 * Mailing List::                Mailing list minor mode.
5494 @end menu
5495
5496
5497 @node Summary Buffer Format
5498 @section Summary Buffer Format
5499 @cindex summary buffer format
5500
5501 @iftex
5502 @iflatex
5503 \gnusfigure{The Summary Buffer}{180}{
5504 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
5505 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
5506 }
5507 @end iflatex
5508 @end iftex
5509
5510 @menu
5511 * Summary Buffer Lines::        You can specify how summary lines should look.
5512 * To From Newsgroups::          How to not display your own name.
5513 * Summary Buffer Mode Line::    You can say how the mode line should look.
5514 * Summary Highlighting::        Making the summary buffer all pretty and nice.
5515 @end menu
5516
5517 @findex mail-extract-address-components
5518 @findex gnus-extract-address-components
5519 @vindex gnus-extract-address-components
5520 Gnus will use the value of the @code{gnus-extract-address-components}
5521 variable as a function for getting the name and address parts of a
5522 @code{From} header.  Two pre-defined functions exist:
5523 @code{gnus-extract-address-components}, which is the default, quite
5524 fast, and too simplistic solution; and
5525 @code{mail-extract-address-components}, which works very nicely, but is
5526 slower.  The default function will return the wrong answer in 5% of the
5527 cases.  If this is unacceptable to you, use the other function instead:
5528
5529 @lisp
5530 (setq gnus-extract-address-components
5531       'mail-extract-address-components)
5532 @end lisp
5533
5534 @vindex gnus-summary-same-subject
5535 @code{gnus-summary-same-subject} is a string indicating that the current
5536 article has the same subject as the previous.  This string will be used
5537 with those specs that require it.  The default is @code{""}.
5538
5539
5540 @node Summary Buffer Lines
5541 @subsection Summary Buffer Lines
5542
5543 @vindex gnus-summary-line-format
5544 You can change the format of the lines in the summary buffer by changing
5545 the @code{gnus-summary-line-format} variable.  It works along the same
5546 lines as a normal @code{format} string, with some extensions
5547 (@pxref{Formatting Variables}).
5548
5549 There should always be a colon or a point position marker on the line;
5550 the cursor always moves to the point position marker or the colon after
5551 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
5552 possible to change this.  Just write a new function
5553 @code{gnus-goto-colon} which does whatever you like with the cursor.)
5554 @xref{Positioning Point}.
5555
5556 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
5557
5558 The following format specification characters and extended format
5559 specification(s) are understood:
5560
5561 @table @samp
5562 @item N
5563 Article number.
5564 @item S
5565 Subject string.  List identifiers stripped,
5566 @code{gnus-list-identifiers}.  @xref{Article Hiding}.
5567 @item s
5568 Subject if the article is the root of the thread or the previous article
5569 had a different subject, @code{gnus-summary-same-subject} otherwise.
5570 (@code{gnus-summary-same-subject} defaults to @code{""}.)
5571 @item F
5572 Full @code{From} header.
5573 @item n
5574 The name (from the @code{From} header).
5575 @item f
5576 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
5577 From Newsgroups}).
5578 @item a
5579 The name (from the @code{From} header).  This differs from the @code{n}
5580 spec in that it uses the function designated by the
5581 @code{gnus-extract-address-components} variable, which is slower, but
5582 may be more thorough.
5583 @item A
5584 The address (from the @code{From} header).  This works the same way as
5585 the @code{a} spec.
5586 @item L
5587 Number of lines in the article.
5588 @item c
5589 Number of characters in the article.  This specifier is not supported
5590 in some methods (like nnfolder).
5591 @item k
5592 Pretty-printed version of the number of characters in the article;
5593 for example, @samp{1.2k} or @samp{0.4M}.
5594 @item I
5595 Indentation based on thread level (@pxref{Customizing Threading}).
5596 @item B
5597 A complex trn-style thread tree, showing response-connecting trace
5598 lines.  A thread could be drawn like this:
5599
5600 @example
5601 >
5602 +->
5603 | +->
5604 | | \->
5605 | |   \->
5606 | \->
5607 +->
5608 \->
5609 @end example
5610
5611 You can customize the appearance with the following options.  Note
5612 that it is possible to make the thread display look really neat by
5613 replacing the default @acronym{ASCII} characters with graphic
5614 line-drawing glyphs.
5615 @table @code
5616 @item gnus-sum-thread-tree-root
5617 @vindex gnus-sum-thread-tree-root
5618 Used for the root of a thread.  If @code{nil}, use subject
5619 instead.  The default is @samp{> }.
5620
5621 @item gnus-sum-thread-tree-false-root
5622 @vindex gnus-sum-thread-tree-false-root
5623 Used for the false root of a thread (@pxref{Loose Threads}).  If
5624 @code{nil}, use subject instead.  The default is @samp{> }.
5625
5626 @item gnus-sum-thread-tree-single-indent
5627 @vindex gnus-sum-thread-tree-single-indent
5628 Used for a thread with just one message.  If @code{nil}, use subject
5629 instead.  The default is @samp{}.
5630
5631 @item gnus-sum-thread-tree-vertical
5632 @vindex gnus-sum-thread-tree-vertical
5633 Used for drawing a vertical line.  The default is @samp{| }.
5634
5635 @item gnus-sum-thread-tree-indent
5636 @vindex gnus-sum-thread-tree-indent
5637 Used for indenting.  The default is @samp{  }.
5638
5639 @item gnus-sum-thread-tree-leaf-with-other
5640 @vindex gnus-sum-thread-tree-leaf-with-other
5641 Used for a leaf with brothers.  The default is @samp{+-> }.
5642
5643 @item gnus-sum-thread-tree-single-leaf
5644 @vindex gnus-sum-thread-tree-single-leaf
5645 Used for a leaf without brothers.  The default is @samp{\-> }
5646
5647 @end table
5648
5649 @item T
5650 Nothing if the article is a root and lots of spaces if it isn't (it
5651 pushes everything after it off the screen).
5652 @item [
5653 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
5654 for adopted articles (@pxref{Customizing Threading}).
5655 @item ]
5656 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
5657 for adopted articles.
5658 @item >
5659 One space for each thread level.
5660 @item <
5661 Twenty minus thread level spaces.
5662 @item U
5663 Unread.  @xref{Read Articles}.
5664
5665 @item R
5666 This misleadingly named specifier is the @dfn{secondary mark}.  This
5667 mark will say whether the article has been replied to, has been cached,
5668 or has been saved.  @xref{Other Marks}.
5669
5670 @item i
5671 Score as a number (@pxref{Scoring}).
5672 @item z
5673 @vindex gnus-summary-zcore-fuzz
5674 Zcore, @samp{+} if above the default level and @samp{-} if below the
5675 default level.  If the difference between
5676 @code{gnus-summary-default-score} and the score is less than
5677 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
5678 @item V
5679 Total thread score.
5680 @item x
5681 @code{Xref}.
5682 @item D
5683 @code{Date}.
5684 @item d
5685 The @code{Date} in @code{DD-MMM} format.
5686 @item o
5687 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
5688 @item M
5689 @code{Message-ID}.
5690 @item r
5691 @code{References}.
5692 @item t
5693 Number of articles in the current sub-thread.  Using this spec will slow
5694 down summary buffer generation somewhat.
5695 @item e
5696 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
5697 article has any children.
5698 @item P
5699 The line number.
5700 @item O
5701 Download mark.
5702 @item *
5703 Desired cursor position (instead of after first colon).
5704 @item &user-date;
5705 Age sensitive date format.  Various date format is defined in
5706 @code{gnus-user-date-format-alist}.
5707 @item u
5708 User defined specifier.  The next character in the format string should
5709 be a letter.  Gnus will call the function
5710 @code{gnus-user-format-function-@var{x}}, where @var{x} is the letter
5711 following @samp{%u}.  The function will be passed the current header as
5712 argument.  The function should return a string, which will be inserted
5713 into the summary just like information from any other summary specifier.
5714 @end table
5715
5716 Text between @samp{%(} and @samp{%)} will be highlighted with
5717 @code{gnus-mouse-face} when the mouse point is placed inside the area.
5718 There can only be one such area.
5719
5720 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
5721 have to be handled with care.  For reasons of efficiency, Gnus will
5722 compute what column these characters will end up in, and ``hard-code''
5723 that.  This means that it is invalid to have these specs after a
5724 variable-length spec.  Well, you might not be arrested, but your summary
5725 buffer will look strange, which is bad enough.
5726
5727 The smart choice is to have these specs as far to the left as possible.
5728 (Isn't that the case with everything, though?  But I digress.)
5729
5730 This restriction may disappear in later versions of Gnus.
5731
5732
5733 @node To From Newsgroups
5734 @subsection To From Newsgroups
5735 @cindex To
5736 @cindex Newsgroups
5737
5738 In some groups (particularly in archive groups), the @code{From} header
5739 isn't very interesting, since all the articles there are written by
5740 you.  To display the information in the @code{To} or @code{Newsgroups}
5741 headers instead, you need to decide three things: What information to
5742 gather; where to display it; and when to display it.
5743
5744 @enumerate
5745 @item
5746 @vindex gnus-extra-headers
5747 The reading of extra header information is controlled by the
5748 @code{gnus-extra-headers}.  This is a list of header symbols.  For
5749 instance:
5750
5751 @lisp
5752 (setq gnus-extra-headers
5753       '(To Newsgroups X-Newsreader))
5754 @end lisp
5755
5756 This will result in Gnus trying to obtain these three headers, and
5757 storing it in header structures for later easy retrieval.
5758
5759 @item
5760 @findex gnus-extra-header
5761 The value of these extra headers can be accessed via the
5762 @code{gnus-extra-header} function.  Here's a format line spec that will
5763 access the @code{X-Newsreader} header:
5764
5765 @example
5766 "%~(form (gnus-extra-header 'X-Newsreader))@@"
5767 @end example
5768
5769 @item
5770 @vindex gnus-ignored-from-addresses
5771 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
5772 summary line spec returns the @code{To}, @code{Newsreader} or
5773 @code{From} header.  If this regexp matches the contents of the
5774 @code{From} header, the value of the @code{To} or @code{Newsreader}
5775 headers are used instead.
5776
5777 To distinguish regular articles from those where the @code{From} field
5778 has been swapped, a string is prefixed to the @code{To} or
5779 @code{Newsgroups} header in the summary line.  By default the string is
5780 @samp{-> } for @code{To} and @samp{=> } for @code{Newsgroups}, you can
5781 customize these strings with @code{gnus-summary-to-prefix} and
5782 @code{gnus-summary-newsgroup-prefix}.
5783
5784 @end enumerate
5785
5786 @vindex nnmail-extra-headers
5787 A related variable is @code{nnmail-extra-headers}, which controls when
5788 to include extra headers when generating overview (@acronym{NOV}) files.
5789 If you have old overview files, you should regenerate them after
5790 changing this variable, by entering the server buffer using @kbd{^},
5791 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
5792 regeneration.
5793
5794 @vindex gnus-summary-line-format
5795 You also have to instruct Gnus to display the data by changing the
5796 @code{%n} spec to the @code{%f} spec in the
5797 @code{gnus-summary-line-format} variable.
5798
5799 In summary, you'd typically put something like the following in
5800 @file{~/.gnus.el}:
5801
5802 @lisp
5803 (setq gnus-extra-headers
5804       '(To Newsgroups))
5805 (setq nnmail-extra-headers gnus-extra-headers)
5806 (setq gnus-summary-line-format
5807       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
5808 (setq gnus-ignored-from-addresses
5809       "Your Name Here")
5810 @end lisp
5811
5812 (The values listed above are the default values in Gnus.  Alter them
5813 to fit your needs.)
5814
5815 A note for news server administrators, or for users who wish to try to
5816 convince their news server administrator to provide some additional
5817 support:
5818
5819 The above is mostly useful for mail groups, where you have control over
5820 the @acronym{NOV} files that are created.  However, if you can persuade your
5821 nntp admin to add (in the usual implementation, notably INN):
5822
5823 @example
5824 Newsgroups:full
5825 @end example
5826
5827 to the end of her @file{overview.fmt} file, then you can use that just
5828 as you would the extra headers from the mail groups.
5829
5830
5831 @node Summary Buffer Mode Line
5832 @subsection Summary Buffer Mode Line
5833
5834 @vindex gnus-summary-mode-line-format
5835 You can also change the format of the summary mode bar (@pxref{Mode Line
5836 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
5837 like.  The default is @samp{Gnus: %%b [%A] %Z}.
5838
5839 Here are the elements you can play with:
5840
5841 @table @samp
5842 @item G
5843 Group name.
5844 @item p
5845 Unprefixed group name.
5846 @item A
5847 Current article number.
5848 @item z
5849 Current article score.
5850 @item V
5851 Gnus version.
5852 @item U
5853 Number of unread articles in this group.
5854 @item e
5855 Number of unread articles in this group that aren't displayed in the
5856 summary buffer.
5857 @item Z
5858 A string with the number of unread and unselected articles represented
5859 either as @samp{<%U(+%e) more>} if there are both unread and unselected
5860 articles, and just as @samp{<%U more>} if there are just unread articles
5861 and no unselected ones.
5862 @item g
5863 Shortish group name.  For instance, @samp{rec.arts.anime} will be
5864 shortened to @samp{r.a.anime}.
5865 @item S
5866 Subject of the current article.
5867 @item u
5868 User-defined spec (@pxref{User-Defined Specs}).
5869 @item s
5870 Name of the current score file (@pxref{Scoring}).
5871 @item d
5872 Number of dormant articles (@pxref{Unread Articles}).
5873 @item t
5874 Number of ticked articles (@pxref{Unread Articles}).
5875 @item r
5876 Number of articles that have been marked as read in this session.
5877 @item E
5878 Number of articles expunged by the score files.
5879 @end table
5880
5881
5882 @node Summary Highlighting
5883 @subsection Summary Highlighting
5884
5885 @table @code
5886
5887 @item gnus-visual-mark-article-hook
5888 @vindex gnus-visual-mark-article-hook
5889 This hook is run after selecting an article.  It is meant to be used for
5890 highlighting the article in some way.  It is not run if
5891 @code{gnus-visual} is @code{nil}.
5892
5893 @item gnus-summary-update-hook
5894 @vindex gnus-summary-update-hook
5895 This hook is called when a summary line is changed.  It is not run if
5896 @code{gnus-visual} is @code{nil}.
5897
5898 @item gnus-summary-selected-face
5899 @vindex gnus-summary-selected-face
5900 This is the face (or @dfn{font} as some people call it) used to
5901 highlight the current article in the summary buffer.
5902
5903 @item gnus-summary-highlight
5904 @vindex gnus-summary-highlight
5905 Summary lines are highlighted according to this variable, which is a
5906 list where the elements are of the format @code{(@var{form}
5907 . @var{face})}.  If you would, for instance, like ticked articles to be
5908 italic and high-scored articles to be bold, you could set this variable
5909 to something like
5910 @lisp
5911 (((eq mark gnus-ticked-mark) . italic)
5912  ((> score default) . bold))
5913 @end lisp
5914 As you may have guessed, if @var{form} returns a non-@code{nil} value,
5915 @var{face} will be applied to the line.
5916 @end table
5917
5918
5919 @node Summary Maneuvering
5920 @section Summary Maneuvering
5921 @cindex summary movement
5922
5923 All the straight movement commands understand the numeric prefix and
5924 behave pretty much as you'd expect.
5925
5926 None of these commands select articles.
5927
5928 @table @kbd
5929 @item G M-n
5930 @itemx M-n
5931 @kindex M-n (Summary)
5932 @kindex G M-n (Summary)
5933 @findex gnus-summary-next-unread-subject
5934 Go to the next summary line of an unread article
5935 (@code{gnus-summary-next-unread-subject}).
5936
5937 @item G M-p
5938 @itemx M-p
5939 @kindex M-p (Summary)
5940 @kindex G M-p (Summary)
5941 @findex gnus-summary-prev-unread-subject
5942 Go to the previous summary line of an unread article
5943 (@code{gnus-summary-prev-unread-subject}).
5944
5945 @item G g
5946 @kindex G g (Summary)
5947 @findex gnus-summary-goto-subject
5948 Ask for an article number and then go to the summary line of that article
5949 without displaying the article (@code{gnus-summary-goto-subject}).
5950 @end table
5951
5952 If Gnus asks you to press a key to confirm going to the next group, you
5953 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
5954 buffer, searching for the next group to read without actually returning
5955 to the group buffer.
5956
5957 Variables related to summary movement:
5958
5959 @table @code
5960
5961 @vindex gnus-auto-select-next
5962 @item gnus-auto-select-next
5963 If you issue one of the movement commands (like @kbd{n}) and there are
5964 no more unread articles after the current one, Gnus will offer to go to
5965 the next group.  If this variable is @code{t} and the next group is
5966 empty, Gnus will exit summary mode and return to the group buffer.  If
5967 this variable is neither @code{t} nor @code{nil}, Gnus will select the
5968 next group with unread articles.  As a special case, if this variable
5969 is @code{quietly}, Gnus will select the next group without asking for
5970 confirmation.  If this variable is @code{almost-quietly}, the same
5971 will happen only if you are located on the last article in the group.
5972 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
5973 command will go to the next group without confirmation.  Also
5974 @pxref{Group Levels}.
5975
5976 @item gnus-auto-select-same
5977 @vindex gnus-auto-select-same
5978 If non-@code{nil}, all the movement commands will try to go to the next
5979 article with the same subject as the current.  (@dfn{Same} here might
5980 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
5981 for details (@pxref{Customizing Threading}).)  If there are no more
5982 articles with the same subject, go to the first unread article.
5983
5984 This variable is not particularly useful if you use a threaded display.
5985
5986 @item gnus-summary-check-current
5987 @vindex gnus-summary-check-current
5988 If non-@code{nil}, all the ``unread'' movement commands will not proceed
5989 to the next (or previous) article if the current article is unread.
5990 Instead, they will choose the current article.
5991
5992 @item gnus-auto-center-summary
5993 @vindex gnus-auto-center-summary
5994 If non-@code{nil}, Gnus will keep the point in the summary buffer
5995 centered at all times.  This makes things quite tidy, but if you have a
5996 slow network connection, or simply do not like this un-Emacsism, you can
5997 set this variable to @code{nil} to get the normal Emacs scrolling
5998 action.  This will also inhibit horizontal re-centering of the summary
5999 buffer, which might make it more inconvenient to read extremely long
6000 threads.
6001
6002 This variable can also be a number.  In that case, center the window at
6003 the given number of lines from the top.
6004
6005 @item gnus-summary-stop-at-end-of-message
6006 @vindex gnus-summary-stop-at-end-of-message
6007 If non-@code{nil}, don't go to the next article when hitting
6008 @kbd{SPC}, and you're at the end of the article.
6009
6010 @end table
6011
6012
6013 @node Choosing Articles
6014 @section Choosing Articles
6015 @cindex selecting articles
6016
6017 @menu
6018 * Choosing Commands::           Commands for choosing articles.
6019 * Choosing Variables::          Variables that influence these commands.
6020 @end menu
6021
6022
6023 @node Choosing Commands
6024 @subsection Choosing Commands
6025
6026 None of the following movement commands understand the numeric prefix,
6027 and they all select and display an article.
6028
6029 If you want to fetch new articles or redisplay the group, see
6030 @ref{Exiting the Summary Buffer}.
6031
6032 @table @kbd
6033 @item SPACE
6034 @kindex SPACE (Summary)
6035 @findex gnus-summary-next-page
6036 Select the current article, or, if that one's read already, the next
6037 unread article (@code{gnus-summary-next-page}).
6038
6039 If you have an article window open already and you press @kbd{SPACE}
6040 again, the article will be scrolled.  This lets you conveniently
6041 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
6042
6043 @item G n
6044 @itemx n
6045 @kindex n (Summary)
6046 @kindex G n (Summary)
6047 @findex gnus-summary-next-unread-article
6048 @c @icon{gnus-summary-next-unread}
6049 Go to next unread article (@code{gnus-summary-next-unread-article}).
6050
6051 @item G p
6052 @itemx p
6053 @kindex p (Summary)
6054 @findex gnus-summary-prev-unread-article
6055 @c @icon{gnus-summary-prev-unread}
6056 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
6057
6058 @item G N
6059 @itemx N
6060 @kindex N (Summary)
6061 @kindex G N (Summary)
6062 @findex gnus-summary-next-article
6063 Go to the next article (@code{gnus-summary-next-article}).
6064
6065 @item G P
6066 @itemx P
6067 @kindex P (Summary)
6068 @kindex G P (Summary)
6069 @findex gnus-summary-prev-article
6070 Go to the previous article (@code{gnus-summary-prev-article}).
6071
6072 @item G C-n
6073 @kindex G C-n (Summary)
6074 @findex gnus-summary-next-same-subject
6075 Go to the next article with the same subject
6076 (@code{gnus-summary-next-same-subject}).
6077
6078 @item G C-p
6079 @kindex G C-p (Summary)
6080 @findex gnus-summary-prev-same-subject
6081 Go to the previous article with the same subject
6082 (@code{gnus-summary-prev-same-subject}).
6083
6084 @item G f
6085 @itemx .
6086 @kindex G f  (Summary)
6087 @kindex .  (Summary)
6088 @findex gnus-summary-first-unread-article
6089 Go to the first unread article
6090 (@code{gnus-summary-first-unread-article}).
6091
6092 @item G b
6093 @itemx ,
6094 @kindex G b (Summary)
6095 @kindex , (Summary)
6096 @findex gnus-summary-best-unread-article
6097 Go to the unread article with the highest score
6098 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
6099 go to the first unread article that has a score over the default score.
6100
6101 @item G l
6102 @itemx l
6103 @kindex l (Summary)
6104 @kindex G l (Summary)
6105 @findex gnus-summary-goto-last-article
6106 Go to the previous article read (@code{gnus-summary-goto-last-article}).
6107
6108 @item G o
6109 @kindex G o (Summary)
6110 @findex gnus-summary-pop-article
6111 @cindex history
6112 @cindex article history
6113 Pop an article off the summary history and go to this article
6114 (@code{gnus-summary-pop-article}).  This command differs from the
6115 command above in that you can pop as many previous articles off the
6116 history as you like, while @kbd{l} toggles the two last read articles.
6117 For a somewhat related issue (if you use these commands a lot),
6118 @pxref{Article Backlog}.
6119
6120 @item G j
6121 @itemx j
6122 @kindex j (Summary)
6123 @kindex G j (Summary)
6124 @findex gnus-summary-goto-article
6125 Ask for an article number or @code{Message-ID}, and then go to that
6126 article (@code{gnus-summary-goto-article}).
6127
6128 @end table
6129
6130
6131 @node Choosing Variables
6132 @subsection Choosing Variables
6133
6134 Some variables relevant for moving and selecting articles:
6135
6136 @table @code
6137 @item gnus-auto-extend-newsgroup
6138 @vindex gnus-auto-extend-newsgroup
6139 All the movement commands will try to go to the previous (or next)
6140 article, even if that article isn't displayed in the Summary buffer if
6141 this variable is non-@code{nil}.  Gnus will then fetch the article from
6142 the server and display it in the article buffer.
6143
6144 @item gnus-select-article-hook
6145 @vindex gnus-select-article-hook
6146 This hook is called whenever an article is selected.  The default is
6147 @code{nil}.  If you would like each article to be saved in the Agent as
6148 you read it, putting @code{gnus-agent-fetch-selected-article} on this
6149 hook will do so.
6150
6151 @item gnus-mark-article-hook
6152 @vindex gnus-mark-article-hook
6153 @findex gnus-summary-mark-unread-as-read
6154 @findex gnus-summary-mark-read-and-unread-as-read
6155 @findex gnus-unread-mark
6156 This hook is called whenever an article is selected.  It is intended to
6157 be used for marking articles as read.  The default value is
6158 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
6159 mark of almost any article you read to @code{gnus-read-mark}.  The only
6160 articles not affected by this function are ticked, dormant, and
6161 expirable articles.  If you'd instead like to just have unread articles
6162 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
6163 instead.  It will leave marks like @code{gnus-low-score-mark},
6164 @code{gnus-del-mark} (and so on) alone.
6165
6166 @end table
6167
6168
6169 @node Paging the Article
6170 @section Scrolling the Article
6171 @cindex article scrolling
6172
6173 @table @kbd
6174
6175 @item SPACE
6176 @kindex SPACE (Summary)
6177 @findex gnus-summary-next-page
6178 Pressing @kbd{SPACE} will scroll the current article forward one page,
6179 or, if you have come to the end of the current article, will choose the
6180 next article (@code{gnus-summary-next-page}).
6181
6182 @vindex gnus-article-boring-faces
6183 @vindex gnus-article-skip-boring
6184 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
6185 the article consists only of citations and signature, then it will be
6186 skipped; the next article will be shown instead.  You can customize
6187 what is considered uninteresting with
6188 @code{gnus-article-boring-faces}.  You can manually view the article's
6189 pages, no matter how boring, using @kbd{C-M-v}.
6190
6191 @item DEL
6192 @kindex DEL (Summary)
6193 @findex gnus-summary-prev-page
6194 Scroll the current article back one page (@code{gnus-summary-prev-page}).
6195
6196 @item RET
6197 @kindex RET (Summary)
6198 @findex gnus-summary-scroll-up
6199 Scroll the current article one line forward
6200 (@code{gnus-summary-scroll-up}).
6201
6202 @item M-RET
6203 @kindex M-RET (Summary)
6204 @findex gnus-summary-scroll-down
6205 Scroll the current article one line backward
6206 (@code{gnus-summary-scroll-down}).
6207
6208 @item A g
6209 @itemx g
6210 @kindex A g (Summary)
6211 @kindex g (Summary)
6212 @findex gnus-summary-show-article
6213 @vindex gnus-summary-show-article-charset-alist
6214 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
6215 given a prefix, fetch the current article, but don't run any of the
6216 article treatment functions.  This will give you a ``raw'' article, just
6217 the way it came from the server.
6218
6219 @cindex charset, view article with different charset
6220 If given a numerical prefix, you can do semi-manual charset stuff.
6221 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
6222 encoded in the @code{cn-gb-2312} charset.  If you have
6223
6224 @lisp
6225 (setq gnus-summary-show-article-charset-alist
6226       '((1 . cn-gb-2312)
6227         (2 . big5)))
6228 @end lisp
6229
6230 then you can say @kbd{C-u 1 g} to get the same effect.
6231
6232 @item A <
6233 @itemx <
6234 @kindex < (Summary)
6235 @kindex A < (Summary)
6236 @findex gnus-summary-beginning-of-article
6237 Scroll to the beginning of the article
6238 (@code{gnus-summary-beginning-of-article}).
6239
6240 @item A >
6241 @itemx >
6242 @kindex > (Summary)
6243 @kindex A > (Summary)
6244 @findex gnus-summary-end-of-article
6245 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
6246
6247 @item A s
6248 @itemx s
6249 @kindex A s (Summary)
6250 @kindex s (Summary)
6251 @findex gnus-summary-isearch-article
6252 Perform an isearch in the article buffer
6253 (@code{gnus-summary-isearch-article}).
6254
6255 @item h
6256 @kindex h (Summary)
6257 @findex gnus-summary-select-article-buffer
6258 Select the article buffer (@code{gnus-summary-select-article-buffer}).
6259
6260 @end table
6261
6262
6263 @node Reply Followup and Post
6264 @section Reply, Followup and Post
6265
6266 @menu
6267 * Summary Mail Commands::       Sending mail.
6268 * Summary Post Commands::       Sending news.
6269 * Summary Message Commands::    Other Message-related commands.
6270 * Canceling and Superseding::
6271 @end menu
6272
6273
6274 @node Summary Mail Commands
6275 @subsection Summary Mail Commands
6276 @cindex mail
6277 @cindex composing mail
6278
6279 Commands for composing a mail message:
6280
6281 @table @kbd
6282
6283 @item S r
6284 @itemx r
6285 @kindex S r (Summary)
6286 @kindex r (Summary)
6287 @findex gnus-summary-reply
6288 @c @icon{gnus-summary-mail-reply}
6289 @c @icon{gnus-summary-reply}
6290 Mail a reply to the author of the current article
6291 (@code{gnus-summary-reply}).
6292
6293 @item S R
6294 @itemx R
6295 @kindex R (Summary)
6296 @kindex S R (Summary)
6297 @findex gnus-summary-reply-with-original
6298 @c @icon{gnus-summary-reply-with-original}
6299 Mail a reply to the author of the current article and include the
6300 original message (@code{gnus-summary-reply-with-original}).  This
6301 command uses the process/prefix convention.
6302
6303 @item S w
6304 @kindex S w (Summary)
6305 @findex gnus-summary-wide-reply
6306 Mail a wide reply to the author of the current article
6307 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
6308 goes out to all people listed in the @code{To}, @code{From} (or
6309 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
6310 present, that's used instead.
6311
6312 @item S W
6313 @kindex S W (Summary)
6314 @findex gnus-summary-wide-reply-with-original
6315 Mail a wide reply to the current article and include the original
6316 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
6317 the process/prefix convention, but only uses the headers from the
6318 first article to determine the recipients.
6319
6320 @item S v
6321 @kindex S v (Summary)
6322 @findex gnus-summary-very-wide-reply
6323 Mail a very wide reply to the author of the current article
6324 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
6325 that goes out to all people listed in the @code{To}, @code{From} (or
6326 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
6327 articles.  This command uses the process/prefix convention.
6328
6329 @item S V
6330 @kindex S V (Summary)
6331 @findex gnus-summary-very-wide-reply-with-original
6332 Mail a very wide reply to the author of the current article and include the
6333 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
6334 command uses the process/prefix convention.
6335
6336 @item S B r
6337 @kindex S B r (Summary)
6338 @findex gnus-summary-reply-broken-reply-to
6339 Mail a reply to the author of the current article but ignore the
6340 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
6341 If you need this because a mailing list incorrectly sets a
6342 @code{Reply-To} header pointing to the list, you probably want to set
6343 the @code{broken-reply-to} group parameter instead, so things will work
6344 correctly.  @xref{Group Parameters}.
6345
6346 @item S B R
6347 @kindex S B R (Summary)
6348 @findex gnus-summary-reply-broken-reply-to-with-original
6349 Mail a reply to the author of the current article and include the
6350 original message but ignore the @code{Reply-To} field
6351 (@code{gnus-summary-reply-broken-reply-to-with-original}).
6352
6353 @item S o m
6354 @itemx C-c C-f
6355 @kindex S o m (Summary)
6356 @kindex C-c C-f (Summary)
6357 @findex gnus-summary-mail-forward
6358 @c @icon{gnus-summary-mail-forward}
6359 Forward the current article to some other person
6360 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
6361 is forwarded according to the value of (@code{message-forward-as-mime})
6362 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
6363 message and forward directly inline; if the prefix is 2, forward message
6364 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
6365 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
6366 directly inline; otherwise, the message is forwarded as no prefix given
6367 but use the flipped value of (@code{message-forward-as-mime}).  By
6368 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
6369 section.
6370
6371 @item S m
6372 @itemx m
6373 @kindex m (Summary)
6374 @kindex S m (Summary)
6375 @findex gnus-summary-mail-other-window
6376 @c @icon{gnus-summary-mail-originate}
6377 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
6378 the posting style of the current group.  If given a prefix, disable that.
6379 If the prefix is 1, prompt for a group name to find the posting style.
6380
6381 @item S i
6382 @kindex S i (Summary)
6383 @findex gnus-summary-news-other-window
6384 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
6385 post to the current group.  If given a prefix, disable that.  If the
6386 prefix is 1, prompt for a group to post to.
6387
6388 This function actually prepares a news even when using mail groups.
6389 This is useful for ``posting'' messages to mail groups without actually
6390 sending them over the network: they're just saved directly to the group
6391 in question.  The corresponding back end must have a request-post method
6392 for this to work though.
6393
6394 @item S D b
6395 @kindex S D b (Summary)
6396 @findex gnus-summary-resend-bounced-mail
6397 @cindex bouncing mail
6398 If you have sent a mail, but the mail was bounced back to you for some
6399 reason (wrong address, transient failure), you can use this command to
6400 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
6401 will be popped into a mail buffer where you can edit the headers before
6402 sending the mail off again.  If you give a prefix to this command, and
6403 the bounced mail is a reply to some other mail, Gnus will try to fetch
6404 that mail and display it for easy perusal of its headers.  This might
6405 very well fail, though.
6406
6407 @item S D r
6408 @kindex S D r (Summary)
6409 @findex gnus-summary-resend-message
6410 Not to be confused with the previous command,
6411 @code{gnus-summary-resend-message} will prompt you for an address to
6412 send the current message off to, and then send it to that place.  The
6413 headers of the message won't be altered---but lots of headers that say
6414 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
6415 means that you actually send a mail to someone that has a @code{To}
6416 header that (probably) points to yourself.  This will confuse people.
6417 So, natcherly you'll only do that if you're really eVIl.
6418
6419 This command is mainly used if you have several accounts and want to
6420 ship a mail to a different account of yours.  (If you're both
6421 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
6422 to the @code{root} account, you may want to resend it to
6423 @code{postmaster}.  Ordnung muss sein!
6424
6425 This command understands the process/prefix convention
6426 (@pxref{Process/Prefix}).
6427
6428 @item S D e
6429 @kindex S D e (Summary)
6430 @findex gnus-summary-resend-message-edit
6431
6432 Like the previous command, but will allow you to edit the message as
6433 if it were a new message before resending.
6434
6435 @item S O m
6436 @kindex S O m (Summary)
6437 @findex gnus-uu-digest-mail-forward
6438 Digest the current series (@pxref{Decoding Articles}) and forward the
6439 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
6440 uses the process/prefix convention (@pxref{Process/Prefix}).
6441
6442 @item S M-c
6443 @kindex S M-c (Summary)
6444 @findex gnus-summary-mail-crosspost-complaint
6445 @cindex crossposting
6446 @cindex excessive crossposting
6447 Send a complaint about excessive crossposting to the author of the
6448 current article (@code{gnus-summary-mail-crosspost-complaint}).
6449
6450 @findex gnus-crosspost-complaint
6451 This command is provided as a way to fight back against the current
6452 crossposting pandemic that's sweeping Usenet.  It will compose a reply
6453 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
6454 command understands the process/prefix convention
6455 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
6456
6457 @end table
6458
6459 Also @xref{Header Commands, ,Header Commands, message, The Message
6460 Manual}, for more information.
6461
6462
6463 @node Summary Post Commands
6464 @subsection Summary Post Commands
6465 @cindex post
6466 @cindex composing news
6467
6468 Commands for posting a news article:
6469
6470 @table @kbd
6471 @item S p
6472 @itemx a
6473 @kindex a (Summary)
6474 @kindex S p (Summary)
6475 @findex gnus-summary-post-news
6476 @c @icon{gnus-summary-post-news}
6477 Prepare for posting an article (@code{gnus-summary-post-news}).  By
6478 default, post to the current group.  If given a prefix, disable that.
6479 If the prefix is 1, prompt for another group instead.
6480
6481 @item S f
6482 @itemx f
6483 @kindex f (Summary)
6484 @kindex S f (Summary)
6485 @findex gnus-summary-followup
6486 @c @icon{gnus-summary-followup}
6487 Post a followup to the current article (@code{gnus-summary-followup}).
6488
6489 @item S F
6490 @itemx F
6491 @kindex S F (Summary)
6492 @kindex F (Summary)
6493 @c @icon{gnus-summary-followup-with-original}
6494 @findex gnus-summary-followup-with-original
6495 Post a followup to the current article and include the original message
6496 (@code{gnus-summary-followup-with-original}).  This command uses the
6497 process/prefix convention.
6498
6499 @item S n
6500 @kindex S n (Summary)
6501 @findex gnus-summary-followup-to-mail
6502 Post a followup to the current article via news, even if you got the
6503 message through mail (@code{gnus-summary-followup-to-mail}).
6504
6505 @item S N
6506 @kindex S N (Summary)
6507 @findex gnus-summary-followup-to-mail-with-original
6508 Post a followup to the current article via news, even if you got the
6509 message through mail and include the original message
6510 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
6511 the process/prefix convention.
6512
6513 @item S o p
6514 @kindex S o p (Summary)
6515 @findex gnus-summary-post-forward
6516 Forward the current article to a newsgroup
6517 (@code{gnus-summary-post-forward}).
6518  If no prefix is given, the message is forwarded according to the value
6519 of (@code{message-forward-as-mime}) and
6520 (@code{message-forward-show-mml}); if the prefix is 1, decode the
6521 message and forward directly inline; if the prefix is 2, forward message
6522 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
6523 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
6524 directly inline; otherwise, the message is forwarded as no prefix given
6525 but use the flipped value of (@code{message-forward-as-mime}).  By
6526 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
6527
6528 @item S O p
6529 @kindex S O p (Summary)
6530 @findex gnus-uu-digest-post-forward
6531 @cindex digests
6532 @cindex making digests
6533 Digest the current series and forward the result to a newsgroup
6534 (@code{gnus-uu-digest-post-forward}).  This command uses the
6535 process/prefix convention.
6536
6537 @item S u
6538 @kindex S u (Summary)
6539 @findex gnus-uu-post-news
6540 @c @icon{gnus-uu-post-news}
6541 Uuencode a file, split it into parts, and post it as a series
6542 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
6543 @end table
6544
6545 Also @xref{Header Commands, ,Header Commands, message, The Message
6546 Manual}, for more information.
6547
6548
6549 @node Summary Message Commands
6550 @subsection Summary Message Commands
6551
6552 @table @kbd
6553 @item S y
6554 @kindex S y (Summary)
6555 @findex gnus-summary-yank-message
6556 Yank the current article into an already existing Message composition
6557 buffer (@code{gnus-summary-yank-message}).  This command prompts for
6558 what message buffer you want to yank into, and understands the
6559 process/prefix convention (@pxref{Process/Prefix}).
6560
6561 @end table
6562
6563
6564 @node Canceling and Superseding
6565 @subsection Canceling Articles
6566 @cindex canceling articles
6567 @cindex superseding articles
6568
6569 Have you ever written something, and then decided that you really,
6570 really, really wish you hadn't posted that?
6571
6572 Well, you can't cancel mail, but you can cancel posts.
6573
6574 @findex gnus-summary-cancel-article
6575 @kindex C (Summary)
6576 @c @icon{gnus-summary-cancel-article}
6577 Find the article you wish to cancel (you can only cancel your own
6578 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
6579 c} (@code{gnus-summary-cancel-article}).  Your article will be
6580 canceled---machines all over the world will be deleting your article.
6581 This command uses the process/prefix convention (@pxref{Process/Prefix}).
6582
6583 Be aware, however, that not all sites honor cancels, so your article may
6584 live on here and there, while most sites will delete the article in
6585 question.
6586
6587 Gnus will use the ``current'' select method when canceling.  If you
6588 want to use the standard posting method, use the @samp{a} symbolic
6589 prefix (@pxref{Symbolic Prefixes}).
6590
6591 Gnus ensures that only you can cancel your own messages using a
6592 @code{Cancel-Lock} header (@pxref{Canceling News, Canceling News, ,
6593 message, Message Manual}).
6594
6595 If you discover that you have made some mistakes and want to do some
6596 corrections, you can post a @dfn{superseding} article that will replace
6597 your original article.
6598
6599 @findex gnus-summary-supersede-article
6600 @kindex S (Summary)
6601 Go to the original article and press @kbd{S s}
6602 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
6603 where you can edit the article all you want before sending it off the
6604 usual way.
6605
6606 The same goes for superseding as for canceling, only more so: Some
6607 sites do not honor superseding.  On those sites, it will appear that you
6608 have posted almost the same article twice.
6609
6610 If you have just posted the article, and change your mind right away,
6611 there is a trick you can use to cancel/supersede the article without
6612 waiting for the article to appear on your site first.  You simply return
6613 to the post buffer (which is called @code{*sent ...*}).  There you will
6614 find the article you just posted, with all the headers intact.  Change
6615 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
6616 header by substituting one of those words for the word
6617 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
6618 you would do normally.  The previous article will be
6619 canceled/superseded.
6620
6621 Just remember, kids: There is no 'c' in 'supersede'.
6622
6623 @node Delayed Articles
6624 @section Delayed Articles
6625 @cindex delayed sending
6626 @cindex send delayed
6627
6628 Sometimes, you might wish to delay the sending of a message.  For
6629 example, you might wish to arrange for a message to turn up just in time
6630 to remind your about the birthday of your Significant Other.  For this,
6631 there is the @code{gnus-delay} package.  Setup is simple:
6632
6633 @lisp
6634 (gnus-delay-initialize)
6635 @end lisp
6636
6637 @findex gnus-delay-article
6638 Normally, to send a message you use the @kbd{C-c C-c} command from
6639 Message mode.  To delay a message, use @kbd{C-c C-j}
6640 (@code{gnus-delay-article}) instead.  This will ask you for how long the
6641 message should be delayed.  Possible answers are:
6642
6643 @itemize @bullet
6644 @item
6645 A time span.  Consists of an integer and a letter.  For example,
6646 @code{42d} means to delay for 42 days.  Available letters are @code{m}
6647 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
6648 (months) and @code{Y} (years).
6649
6650 @item
6651 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
6652 delayed until that day, at a specific time (eight o'clock by default).
6653 See also @code{gnus-delay-default-hour}.
6654
6655 @item
6656 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
6657 stuff.  The deadline will be at that time today, except if that time has
6658 already passed, then it's at the given time tomorrow.  So if it's ten
6659 o'clock in the morning and you specify @code{11:15}, then the deadline
6660 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
6661 that means a time tomorrow.
6662 @end itemize
6663
6664 The action of the @code{gnus-delay-article} command is influenced by a
6665 couple of variables:
6666
6667 @table @code
6668 @item gnus-delay-default-hour
6669 @vindex gnus-delay-default-hour
6670 When you specify a specific date, the message will be due on that hour
6671 on the given date.  Possible values are integers 0 through 23.
6672
6673 @item gnus-delay-default-delay
6674 @vindex gnus-delay-default-delay
6675 This is a string and gives the default delay.  It can be of any of the
6676 formats described above.
6677
6678 @item gnus-delay-group
6679 @vindex gnus-delay-group
6680 Delayed articles will be kept in this group on the drafts server until
6681 they are due.  You probably don't need to change this.  The default
6682 value is @code{"delayed"}.
6683
6684 @item gnus-delay-header
6685 @vindex gnus-delay-header
6686 The deadline for each article will be stored in a header.  This variable
6687 is a string and gives the header name.  You probably don't need to
6688 change this.  The default value is @code{"X-Gnus-Delayed"}.
6689 @end table
6690
6691 The way delaying works is like this: when you use the
6692 @code{gnus-delay-article} command, you give a certain delay.  Gnus
6693 calculates the deadline of the message and stores it in the
6694 @code{X-Gnus-Delayed} header and puts the message in the
6695 @code{nndraft:delayed} group.
6696
6697 @findex gnus-delay-send-queue
6698 And whenever you get new news, Gnus looks through the group for articles
6699 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
6700 function for this.  By default, this function is added to the hook
6701 @code{gnus-get-new-news-hook}.  But of course, you can change this.
6702 Maybe you want to use the demon to send drafts?  Just tell the demon to
6703 execute the @code{gnus-delay-send-queue} function.
6704
6705 @table @code
6706 @item gnus-delay-initialize
6707 @findex gnus-delay-initialize
6708 By default, this function installs @code{gnus-delay-send-queue} in
6709 @code{gnus-get-new-news-hook}.  But it accepts the optional second
6710 argument @code{no-check}.  If it is non-@code{nil},
6711 @code{gnus-get-new-news-hook} is not changed.  The optional first
6712 argument is ignored.
6713
6714 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
6715 Presumably, you want to use the demon for sending due delayed articles.
6716 Just don't forget to set that up :-)
6717 @end table
6718
6719 When delaying an article with @kbd{C-c C-j}, Message mode will
6720 automatically add a @code{"Date"} header with the current time.  In
6721 many cases you probably want the @code{"Date"} header to reflect the
6722 time the message is sent instead.  To do this, you have to delete
6723 @code{Date} from @code{message-draft-headers}.
6724
6725
6726 @node Marking Articles
6727 @section Marking Articles
6728 @cindex article marking
6729 @cindex article ticking
6730 @cindex marks
6731
6732 There are several marks you can set on an article.
6733
6734 You have marks that decide the @dfn{readedness} (whoo, neato-keano
6735 neologism ohoy!) of the article.  Alphabetic marks generally mean
6736 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
6737
6738 In addition, you also have marks that do not affect readedness.
6739
6740 @ifinfo
6741 There's a plethora of commands for manipulating these marks.
6742 @end ifinfo
6743
6744 @menu
6745 * Unread Articles::             Marks for unread articles.
6746 * Read Articles::               Marks for read articles.
6747 * Other Marks::                 Marks that do not affect readedness.
6748 * Setting Marks::               How to set and remove marks.
6749 * Generic Marking Commands::    How to customize the marking.
6750 * Setting Process Marks::       How to mark articles for later processing.
6751 @end menu
6752
6753
6754 @node Unread Articles
6755 @subsection Unread Articles
6756
6757 The following marks mark articles as (kinda) unread, in one form or
6758 other.
6759
6760 @table @samp
6761 @item !
6762 @vindex gnus-ticked-mark
6763 Marked as ticked (@code{gnus-ticked-mark}).
6764
6765 @dfn{Ticked articles} are articles that will remain visible always.  If
6766 you see an article that you find interesting, or you want to put off
6767 reading it, or replying to it, until sometime later, you'd typically
6768 tick it.  However, articles can be expired (from news servers by the
6769 news server software, Gnus itself never expires ticked messages), so if
6770 you want to keep an article forever, you'll have to make it persistent
6771 (@pxref{Persistent Articles}).
6772
6773 @item ?
6774 @vindex gnus-dormant-mark
6775 Marked as dormant (@code{gnus-dormant-mark}).
6776
6777 @dfn{Dormant articles} will only appear in the summary buffer if there
6778 are followups to it.  If you want to see them even if they don't have
6779 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
6780 Otherwise (except for the visibility issue), they are just like ticked
6781 messages.
6782
6783 @item SPACE
6784 @vindex gnus-unread-mark
6785 Marked as unread (@code{gnus-unread-mark}).
6786
6787 @dfn{Unread articles} are articles that haven't been read at all yet.
6788 @end table
6789
6790
6791 @node Read Articles
6792 @subsection Read Articles
6793 @cindex expirable mark
6794
6795 All the following marks mark articles as read.
6796
6797 @table @samp
6798
6799 @item r
6800 @vindex gnus-del-mark
6801 These are articles that the user has marked as read with the @kbd{d}
6802 command manually, more or less (@code{gnus-del-mark}).
6803
6804 @item R
6805 @vindex gnus-read-mark
6806 Articles that have actually been read (@code{gnus-read-mark}).
6807
6808 @item O
6809 @vindex gnus-ancient-mark
6810 Articles that were marked as read in previous sessions and are now
6811 @dfn{old} (@code{gnus-ancient-mark}).
6812
6813 @item K
6814 @vindex gnus-killed-mark
6815 Marked as killed (@code{gnus-killed-mark}).
6816
6817 @item X
6818 @vindex gnus-kill-file-mark
6819 Marked as killed by kill files (@code{gnus-kill-file-mark}).
6820
6821 @item Y
6822 @vindex gnus-low-score-mark
6823 Marked as read by having too low a score (@code{gnus-low-score-mark}).
6824
6825 @item C
6826 @vindex gnus-catchup-mark
6827 Marked as read by a catchup (@code{gnus-catchup-mark}).
6828
6829 @item G
6830 @vindex gnus-canceled-mark
6831 Canceled article (@code{gnus-canceled-mark})
6832
6833 @item Q
6834 @vindex gnus-sparse-mark
6835 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
6836 Threading}.
6837
6838 @item M
6839 @vindex gnus-duplicate-mark
6840 Article marked as read by duplicate suppression
6841 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
6842
6843 @end table
6844
6845 All these marks just mean that the article is marked as read, really.
6846 They are interpreted differently when doing adaptive scoring, though.
6847
6848 One more special mark, though:
6849
6850 @table @samp
6851 @item E
6852 @vindex gnus-expirable-mark
6853 Marked as expirable (@code{gnus-expirable-mark}).
6854
6855 Marking articles as @dfn{expirable} (or have them marked as such
6856 automatically) doesn't make much sense in normal groups---a user doesn't
6857 control expiring of news articles, but in mail groups, for instance,
6858 articles marked as @dfn{expirable} can be deleted by Gnus at
6859 any time.
6860 @end table
6861
6862
6863 @node Other Marks
6864 @subsection Other Marks
6865 @cindex process mark
6866 @cindex bookmarks
6867
6868 There are some marks that have nothing to do with whether the article is
6869 read or not.
6870
6871 @itemize @bullet
6872
6873 @item
6874 You can set a bookmark in the current article.  Say you are reading a
6875 long thesis on cats' urinary tracts, and have to go home for dinner
6876 before you've finished reading the thesis.  You can then set a bookmark
6877 in the article, and Gnus will jump to this bookmark the next time it
6878 encounters the article.  @xref{Setting Marks}.
6879
6880 @item
6881 @vindex gnus-replied-mark
6882 All articles that you have replied to or made a followup to (i.e., have
6883 answered) will be marked with an @samp{A} in the second column
6884 (@code{gnus-replied-mark}).
6885
6886 @item
6887 @vindex gnus-forwarded-mark
6888 All articles that you have forwarded will be marked with an @samp{F} in
6889 the second column (@code{gnus-forwarded-mark}).
6890
6891 @item
6892 @vindex gnus-cached-mark
6893 Articles stored in the article cache will be marked with an @samp{*} in
6894 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
6895
6896 @item
6897 @vindex gnus-saved-mark
6898 Articles ``saved'' (in some manner or other; not necessarily
6899 religiously) are marked with an @samp{S} in the second column
6900 (@code{gnus-saved-mark}).
6901
6902 @item
6903 @vindex gnus-recent-mark
6904 Articles that according to the server haven't been shown to the user
6905 before are marked with a @samp{N} in the second column
6906 (@code{gnus-recent-mark}).  Note that not all servers support this
6907 mark, in which case it simply never appears.  Compare with
6908 @code{gnus-unseen-mark}.
6909
6910 @item
6911 @vindex gnus-unseen-mark
6912 Articles that haven't been seen before in Gnus by the user are marked
6913 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
6914 Compare with @code{gnus-recent-mark}.
6915
6916 @item
6917 @vindex gnus-downloaded-mark
6918 When using the Gnus agent (@pxref{Agent Basics}), articles may be
6919 downloaded for unplugged (offline) viewing.  If you are using the
6920 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
6921 (The variable @code{gnus-downloaded-mark} controls which character to
6922 use.)
6923
6924 @item
6925 @vindex gnus-undownloaded-mark
6926 When using the Gnus agent (@pxref{Agent Basics}), some articles might
6927 not have been downloaded.  Such articles cannot be viewed while you
6928 are unplugged (offline).  If you are using the @samp{%O} spec, these
6929 articles get the @samp{-} mark in that spec.  (The variable
6930 @code{gnus-undownloaded-mark} controls which character to use.)
6931
6932 @item
6933 @vindex gnus-downloadable-mark
6934 The Gnus agent (@pxref{Agent Basics}) downloads some articles
6935 automatically, but it is also possible to explicitly mark articles for
6936 download, even if they would not be downloaded automatically.  Such
6937 explicitly-marked articles get the @samp{%} mark in the first column.
6938 (The variable @code{gnus-downloadable-mark} controls which character to
6939 use.)
6940
6941 @item
6942 @vindex gnus-not-empty-thread-mark
6943 @vindex gnus-empty-thread-mark
6944 If the @samp{%e} spec is used, the presence of threads or not will be
6945 marked with @code{gnus-not-empty-thread-mark} and
6946 @code{gnus-empty-thread-mark} in the third column, respectively.
6947
6948 @item
6949 @vindex gnus-process-mark
6950 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
6951 variety of commands react to the presence of the process mark.  For
6952 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
6953 all articles that have been marked with the process mark.  Articles
6954 marked with the process mark have a @samp{#} in the second column.
6955
6956 @end itemize
6957
6958 You might have noticed that most of these ``non-readedness'' marks
6959 appear in the second column by default.  So if you have a cached, saved,
6960 replied article that you have process-marked, what will that look like?
6961
6962 Nothing much.  The precedence rules go as follows: process -> cache ->
6963 replied -> saved.  So if the article is in the cache and is replied,
6964 you'll only see the cache mark and not the replied mark.
6965
6966
6967 @node Setting Marks
6968 @subsection Setting Marks
6969 @cindex setting marks
6970
6971 All the marking commands understand the numeric prefix.
6972
6973 @table @kbd
6974 @item M c
6975 @itemx M-u
6976 @kindex M c (Summary)
6977 @kindex M-u (Summary)
6978 @findex gnus-summary-clear-mark-forward
6979 @cindex mark as unread
6980 Clear all readedness-marks from the current article
6981 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
6982 article as unread.
6983
6984 @item M t
6985 @itemx !
6986 @kindex ! (Summary)
6987 @kindex M t (Summary)
6988 @findex gnus-summary-tick-article-forward
6989 Tick the current article (@code{gnus-summary-tick-article-forward}).
6990 @xref{Article Caching}.
6991
6992 @item M ?
6993 @itemx ?
6994 @kindex ? (Summary)
6995 @kindex M ? (Summary)
6996 @findex gnus-summary-mark-as-dormant
6997 Mark the current article as dormant
6998 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
6999
7000 @item M d
7001 @itemx d
7002 @kindex M d (Summary)
7003 @kindex d (Summary)
7004 @findex gnus-summary-mark-as-read-forward
7005 Mark the current article as read
7006 (@code{gnus-summary-mark-as-read-forward}).
7007
7008 @item D
7009 @kindex D (Summary)
7010 @findex gnus-summary-mark-as-read-backward
7011 Mark the current article as read and move point to the previous line
7012 (@code{gnus-summary-mark-as-read-backward}).
7013
7014 @item M k
7015 @itemx k
7016 @kindex k (Summary)
7017 @kindex M k (Summary)
7018 @findex gnus-summary-kill-same-subject-and-select
7019 Mark all articles that have the same subject as the current one as read,
7020 and then select the next unread article
7021 (@code{gnus-summary-kill-same-subject-and-select}).
7022
7023 @item M K
7024 @itemx C-k
7025 @kindex M K (Summary)
7026 @kindex C-k (Summary)
7027 @findex gnus-summary-kill-same-subject
7028 Mark all articles that have the same subject as the current one as read
7029 (@code{gnus-summary-kill-same-subject}).
7030
7031 @item M C
7032 @kindex M C (Summary)
7033 @findex gnus-summary-catchup
7034 @c @icon{gnus-summary-catchup}
7035 Mark all unread articles as read (@code{gnus-summary-catchup}).
7036
7037 @item M C-c
7038 @kindex M C-c (Summary)
7039 @findex gnus-summary-catchup-all
7040 Mark all articles in the group as read---even the ticked and dormant
7041 articles (@code{gnus-summary-catchup-all}).
7042
7043 @item M H
7044 @kindex M H (Summary)
7045 @findex gnus-summary-catchup-to-here
7046 Catchup the current group to point (before the point)
7047 (@code{gnus-summary-catchup-to-here}).
7048
7049 @item M h
7050 @kindex M h (Summary)
7051 @findex gnus-summary-catchup-from-here
7052 Catchup the current group from point (after the point)
7053 (@code{gnus-summary-catchup-from-here}).
7054
7055 @item C-w
7056 @kindex C-w (Summary)
7057 @findex gnus-summary-mark-region-as-read
7058 Mark all articles between point and mark as read
7059 (@code{gnus-summary-mark-region-as-read}).
7060
7061 @item M V k
7062 @kindex M V k (Summary)
7063 @findex gnus-summary-kill-below
7064 Kill all articles with scores below the default score (or below the
7065 numeric prefix) (@code{gnus-summary-kill-below}).
7066
7067 @item M e
7068 @itemx E
7069 @kindex M e (Summary)
7070 @kindex E (Summary)
7071 @findex gnus-summary-mark-as-expirable
7072 Mark the current article as expirable
7073 (@code{gnus-summary-mark-as-expirable}).
7074
7075 @item M b
7076 @kindex M b (Summary)
7077 @findex gnus-summary-set-bookmark
7078 Set a bookmark in the current article
7079 (@code{gnus-summary-set-bookmark}).
7080
7081 @item M B
7082 @kindex M B (Summary)
7083 @findex gnus-summary-remove-bookmark
7084 Remove the bookmark from the current article
7085 (@code{gnus-summary-remove-bookmark}).
7086
7087 @item M V c
7088 @kindex M V c (Summary)
7089 @findex gnus-summary-clear-above
7090 Clear all marks from articles with scores over the default score (or
7091 over the numeric prefix) (@code{gnus-summary-clear-above}).
7092
7093 @item M V u
7094 @kindex M V u (Summary)
7095 @findex gnus-summary-tick-above
7096 Tick all articles with scores over the default score (or over the
7097 numeric prefix) (@code{gnus-summary-tick-above}).
7098
7099 @item M V m
7100 @kindex M V m (Summary)
7101 @findex gnus-summary-mark-above
7102 Prompt for a mark, and mark all articles with scores over the default
7103 score (or over the numeric prefix) with this mark
7104 (@code{gnus-summary-clear-above}).
7105 @end table
7106
7107 @vindex gnus-summary-goto-unread
7108 The @code{gnus-summary-goto-unread} variable controls what action should
7109 be taken after setting a mark.  If non-@code{nil}, point will move to
7110 the next/previous unread article.  If @code{nil}, point will just move
7111 one line up or down.  As a special case, if this variable is
7112 @code{never}, all the marking commands as well as other commands (like
7113 @kbd{SPACE}) will move to the next article, whether it is unread or not.
7114 The default is @code{t}.
7115
7116
7117 @node Generic Marking Commands
7118 @subsection Generic Marking Commands
7119
7120 Some people would like the command that ticks an article (@kbd{!}) go to
7121 the next article.  Others would like it to go to the next unread
7122 article.  Yet others would like it to stay on the current article.  And
7123 even though I haven't heard of anybody wanting it to go to the
7124 previous (unread) article, I'm sure there are people that want that as
7125 well.
7126
7127 Multiply these five behaviors with five different marking commands, and
7128 you get a potentially complex set of variable to control what each
7129 command should do.
7130
7131 To sidestep that mess, Gnus provides commands that do all these
7132 different things.  They can be found on the @kbd{M M} map in the summary
7133 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
7134 to list in this manual.
7135
7136 While you can use these commands directly, most users would prefer
7137 altering the summary mode keymap.  For instance, if you would like the
7138 @kbd{!} command to go to the next article instead of the next unread
7139 article, you could say something like:
7140
7141 @lisp
7142 @group
7143 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
7144 (defun my-alter-summary-map ()
7145   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
7146 @end group
7147 @end lisp
7148
7149 @noindent
7150 or
7151
7152 @lisp
7153 (defun my-alter-summary-map ()
7154   (local-set-key "!" "MM!n"))
7155 @end lisp
7156
7157
7158 @node Setting Process Marks
7159 @subsection Setting Process Marks
7160 @cindex setting process marks
7161
7162 Process marks are displayed as @code{#} in the summary buffer, and are
7163 used for marking articles in such a way that other commands will
7164 process these articles.  For instance, if you process mark four
7165 articles and then use the @kbd{*} command, Gnus will enter these four
7166 articles into the cache.  For more information,
7167 @pxref{Process/Prefix}.
7168
7169 @table @kbd
7170
7171 @item M P p
7172 @itemx #
7173 @kindex # (Summary)
7174 @kindex M P p (Summary)
7175 @findex gnus-summary-mark-as-processable
7176 Mark the current article with the process mark
7177 (@code{gnus-summary-mark-as-processable}).
7178 @findex gnus-summary-unmark-as-processable
7179
7180 @item M P u
7181 @itemx M-#
7182 @kindex M P u (Summary)
7183 @kindex M-# (Summary)
7184 Remove the process mark, if any, from the current article
7185 (@code{gnus-summary-unmark-as-processable}).
7186
7187 @item M P U
7188 @kindex M P U (Summary)
7189 @findex gnus-summary-unmark-all-processable
7190 Remove the process mark from all articles
7191 (@code{gnus-summary-unmark-all-processable}).
7192
7193 @item M P i
7194 @kindex M P i (Summary)
7195 @findex gnus-uu-invert-processable
7196 Invert the list of process marked articles
7197 (@code{gnus-uu-invert-processable}).
7198
7199 @item M P R
7200 @kindex M P R (Summary)
7201 @findex gnus-uu-mark-by-regexp
7202 Mark articles that have a @code{Subject} header that matches a regular
7203 expression (@code{gnus-uu-mark-by-regexp}).
7204
7205 @item M P G
7206 @kindex M P G (Summary)
7207 @findex gnus-uu-unmark-by-regexp
7208 Unmark articles that have a @code{Subject} header that matches a regular
7209 expression (@code{gnus-uu-unmark-by-regexp}).
7210
7211 @item M P r
7212 @kindex M P r (Summary)
7213 @findex gnus-uu-mark-region
7214 Mark articles in region (@code{gnus-uu-mark-region}).
7215
7216 @item M P g
7217 @kindex M P g (Summary)
7218 @findex gnus-uu-unmark-region
7219 Unmark articles in region (@code{gnus-uu-unmark-region}).
7220
7221 @item M P t
7222 @kindex M P t (Summary)
7223 @findex gnus-uu-mark-thread
7224 Mark all articles in the current (sub)thread
7225 (@code{gnus-uu-mark-thread}).
7226
7227 @item M P T
7228 @kindex M P T (Summary)
7229 @findex gnus-uu-unmark-thread
7230 Unmark all articles in the current (sub)thread
7231 (@code{gnus-uu-unmark-thread}).
7232
7233 @item M P v
7234 @kindex M P v (Summary)
7235 @findex gnus-uu-mark-over
7236 Mark all articles that have a score above the prefix argument
7237 (@code{gnus-uu-mark-over}).
7238
7239 @item M P s
7240 @kindex M P s (Summary)
7241 @findex gnus-uu-mark-series
7242 Mark all articles in the current series (@code{gnus-uu-mark-series}).
7243
7244 @item M P S
7245 @kindex M P S (Summary)
7246 @findex gnus-uu-mark-sparse
7247 Mark all series that have already had some articles marked
7248 (@code{gnus-uu-mark-sparse}).
7249
7250 @item M P a
7251 @kindex M P a (Summary)
7252 @findex gnus-uu-mark-all
7253 Mark all articles in series order (@code{gnus-uu-mark-all}).
7254
7255 @item M P b
7256 @kindex M P b (Summary)
7257 @findex gnus-uu-mark-buffer
7258 Mark all articles in the buffer in the order they appear
7259 (@code{gnus-uu-mark-buffer}).
7260
7261 @item M P k
7262 @kindex M P k (Summary)
7263 @findex gnus-summary-kill-process-mark
7264 Push the current process mark set onto the stack and unmark all articles
7265 (@code{gnus-summary-kill-process-mark}).
7266
7267 @item M P y
7268 @kindex M P y (Summary)
7269 @findex gnus-summary-yank-process-mark
7270 Pop the previous process mark set from the stack and restore it
7271 (@code{gnus-summary-yank-process-mark}).
7272
7273 @item M P w
7274 @kindex M P w (Summary)
7275 @findex gnus-summary-save-process-mark
7276 Push the current process mark set onto the stack
7277 (@code{gnus-summary-save-process-mark}).
7278
7279 @end table
7280
7281 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
7282 set process marks based on article body contents.
7283
7284
7285 @node Limiting
7286 @section Limiting
7287 @cindex limiting
7288
7289 It can be convenient to limit the summary buffer to just show some
7290 subset of the articles currently in the group.  The effect most limit
7291 commands have is to remove a few (or many) articles from the summary
7292 buffer.
7293
7294 Limiting commands work on subsets of the articles already fetched from
7295 the servers.  These commands don't query the server for additional
7296 articles.
7297
7298 @table @kbd
7299
7300 @item / /
7301 @itemx / s
7302 @kindex / / (Summary)
7303 @findex gnus-summary-limit-to-subject
7304 Limit the summary buffer to articles that match some subject
7305 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
7306 matching articles.
7307
7308 @item / a
7309 @kindex / a (Summary)
7310 @findex gnus-summary-limit-to-author
7311 Limit the summary buffer to articles that match some author
7312 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
7313 matching articles.
7314
7315 @item / R
7316 @kindex / R (Summary)
7317 @findex gnus-summary-limit-to-recipient
7318 Limit the summary buffer to articles that match some recipient
7319 (@code{gnus-summary-limit-to-recipient}).  If given a prefix, exclude
7320 matching articles.
7321
7322 @item / A
7323 @kindex / A (Summary)
7324 @findex gnus-summary-limit-to-address
7325 Limit the summary buffer to articles in which contents of From, To or Cc
7326 header match a given address (@code{gnus-summary-limit-to-address}).  If
7327 given a prefix, exclude matching articles.
7328
7329 @item / S
7330 @kindex / S (Summary)
7331 @findex gnus-summary-limit-to-singletons
7332 Limit the summary buffer to articles that aren't part of any displayed
7333 threads (@code{gnus-summary-limit-to-singletons}).  If given a prefix,
7334 limit to articles that are part of displayed threads.
7335
7336 @item / x
7337 @kindex / x (Summary)
7338 @findex gnus-summary-limit-to-extra
7339 Limit the summary buffer to articles that match one of the ``extra''
7340 headers (@pxref{To From Newsgroups})
7341 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
7342 matching articles.
7343
7344 @item / u
7345 @itemx x
7346 @kindex / u (Summary)
7347 @kindex x (Summary)
7348 @findex gnus-summary-limit-to-unread
7349 Limit the summary buffer to articles not marked as read
7350 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
7351 buffer to articles strictly unread.  This means that ticked and
7352 dormant articles will also be excluded.
7353
7354 @item / m
7355 @kindex / m (Summary)
7356 @findex gnus-summary-limit-to-marks
7357 Ask for a mark and then limit to all articles that have been marked
7358 with that mark (@code{gnus-summary-limit-to-marks}).
7359
7360 @item / t
7361 @kindex / t (Summary)
7362 @findex gnus-summary-limit-to-age
7363 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
7364 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
7365 articles younger than that number of days.
7366
7367 @item / n
7368 @kindex / n (Summary)
7369 @findex gnus-summary-limit-to-articles
7370 With prefix @samp{n}, limit the summary buffer to the next @samp{n}
7371 articles.  If not given a prefix, use the process marked articles
7372 instead.  (@code{gnus-summary-limit-to-articles}).
7373
7374 @item / w
7375 @kindex / w (Summary)
7376 @findex gnus-summary-pop-limit
7377 Pop the previous limit off the stack and restore it
7378 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
7379 the stack.
7380
7381 @item / .
7382 @kindex / . (Summary)
7383 @findex gnus-summary-limit-to-unseen
7384 Limit the summary buffer to the unseen articles
7385 (@code{gnus-summary-limit-to-unseen}).
7386
7387 @item / v
7388 @kindex / v (Summary)
7389 @findex gnus-summary-limit-to-score
7390 Limit the summary buffer to articles that have a score at or above some
7391 score (@code{gnus-summary-limit-to-score}).
7392
7393 @item / p
7394 @kindex / p (Summary)
7395 @findex gnus-summary-limit-to-display-predicate
7396 Limit the summary buffer to articles that satisfy the @code{display}
7397 group parameter predicate
7398 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
7399 Parameters}, for more on this predicate.
7400
7401 @item / r
7402 @kindex / r (Summary)
7403 @findex gnus-summary-limit-to-replied
7404 Limit the summary buffer to replied articles
7405 (@code{gnus-summary-limit-to-replied}).  If given a prefix, exclude
7406 replied articles.
7407
7408 @item / E
7409 @itemx M S
7410 @kindex M S (Summary)
7411 @kindex / E (Summary)
7412 @findex gnus-summary-limit-include-expunged
7413 Include all expunged articles in the limit
7414 (@code{gnus-summary-limit-include-expunged}).
7415
7416 @item / D
7417 @kindex / D (Summary)
7418 @findex gnus-summary-limit-include-dormant
7419 Include all dormant articles in the limit
7420 (@code{gnus-summary-limit-include-dormant}).
7421
7422 @item / *
7423 @kindex / * (Summary)
7424 @findex gnus-summary-limit-include-cached
7425 Include all cached articles in the limit
7426 (@code{gnus-summary-limit-include-cached}).
7427
7428 @item / d
7429 @kindex / d (Summary)
7430 @findex gnus-summary-limit-exclude-dormant
7431 Exclude all dormant articles from the limit
7432 (@code{gnus-summary-limit-exclude-dormant}).
7433
7434 @item / M
7435 @kindex / M (Summary)
7436 @findex gnus-summary-limit-exclude-marks
7437 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
7438
7439 @item / T
7440 @kindex / T (Summary)
7441 @findex gnus-summary-limit-include-thread
7442 Include all the articles in the current thread in the limit.
7443
7444 @item / c
7445 @kindex / c (Summary)
7446 @findex gnus-summary-limit-exclude-childless-dormant
7447 Exclude all dormant articles that have no children from the limit@*
7448 (@code{gnus-summary-limit-exclude-childless-dormant}).
7449
7450 @item / C
7451 @kindex / C (Summary)
7452 @findex gnus-summary-limit-mark-excluded-as-read
7453 Mark all excluded unread articles as read
7454 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
7455 also mark excluded ticked and dormant articles as read.
7456
7457 @item / b
7458 @kindex / b (Summary)
7459 @findex gnus-summary-limit-to-bodies
7460 Limit the summary buffer to articles that have bodies that match a
7461 certain regexp (@code{gnus-summary-limit-to-bodies}).  If given a
7462 prefix, reverse the limit.  This command is quite slow since it
7463 requires selecting each article to find the matches.
7464
7465 @item / h
7466 @kindex / h (Summary)
7467 @findex gnus-summary-limit-to-headers
7468 Like the previous command, only limit to headers instead
7469 (@code{gnus-summary-limit-to-headers}).
7470
7471 @end table
7472
7473
7474 The following commands aren't limiting commands, but use the @kbd{/}
7475 prefix as well.
7476
7477 @table @kbd
7478 @item / N
7479 @kindex / N (Summary)
7480 @findex gnus-summary-insert-new-articles
7481 Insert all new articles in the summary buffer.  It scans for new emails
7482 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
7483
7484 @item / o
7485 @kindex / o (Summary)
7486 @findex gnus-summary-insert-old-articles
7487 Insert all old articles in the summary buffer.  If given a numbered
7488 prefix, fetch this number of articles.
7489
7490 @end table
7491
7492
7493 @node Threading
7494 @section Threading
7495 @cindex threading
7496 @cindex article threading
7497
7498 Gnus threads articles by default.  @dfn{To thread} is to put responses
7499 to articles directly after the articles they respond to---in a
7500 hierarchical fashion.
7501
7502 Threading is done by looking at the @code{References} headers of the
7503 articles.  In a perfect world, this would be enough to build pretty
7504 trees, but unfortunately, the @code{References} header is often broken
7505 or simply missing.  Weird news propagation exacerbates the problem,
7506 so one has to employ other heuristics to get pleasing results.  A
7507 plethora of approaches exists, as detailed in horrible detail in
7508 @ref{Customizing Threading}.
7509
7510 First, a quick overview of the concepts:
7511
7512 @table @dfn
7513 @item root
7514 The top-most article in a thread; the first article in the thread.
7515
7516 @item thread
7517 A tree-like article structure.
7518
7519 @item sub-thread
7520 A small(er) section of this tree-like structure.
7521
7522 @item loose threads
7523 Threads often lose their roots due to article expiry, or due to the root
7524 already having been read in a previous session, and not displayed in the
7525 summary buffer.  We then typically have many sub-threads that really
7526 belong to one thread, but are without connecting roots.  These are
7527 called loose threads.
7528
7529 @item thread gathering
7530 An attempt to gather loose threads into bigger threads.
7531
7532 @item sparse threads
7533 A thread where the missing articles have been ``guessed'' at, and are
7534 displayed as empty lines in the summary buffer.
7535
7536 @end table
7537
7538
7539 @menu
7540 * Customizing Threading::       Variables you can change to affect the threading.
7541 * Thread Commands::             Thread based commands in the summary buffer.
7542 @end menu
7543
7544
7545 @node Customizing Threading
7546 @subsection Customizing Threading
7547 @cindex customizing threading
7548
7549 @menu
7550 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
7551 * Filling In Threads::          Making the threads displayed look fuller.
7552 * More Threading::              Even more variables for fiddling with threads.
7553 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
7554 @end menu
7555
7556
7557 @node Loose Threads
7558 @subsubsection Loose Threads
7559 @cindex <
7560 @cindex >
7561 @cindex loose threads
7562
7563 @table @code
7564 @item gnus-summary-make-false-root
7565 @vindex gnus-summary-make-false-root
7566 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
7567 and create a dummy root at the top.  (Wait a minute.  Root at the top?
7568 Yup.)  Loose subtrees occur when the real root has expired, or you've
7569 read or killed the root in a previous session.
7570
7571 When there is no real root of a thread, Gnus will have to fudge
7572 something.  This variable says what fudging method Gnus should use.
7573 There are four possible values:
7574
7575 @iftex
7576 @iflatex
7577 \gnusfigure{The Summary Buffer}{390}{
7578 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
7579 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
7580 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
7581 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
7582 }
7583 @end iflatex
7584 @end iftex
7585
7586 @cindex adopting articles
7587
7588 @table @code
7589
7590 @item adopt
7591 Gnus will make the first of the orphaned articles the parent.  This
7592 parent will adopt all the other articles.  The adopted articles will be
7593 marked as such by pointy brackets (@samp{<>}) instead of the standard
7594 square brackets (@samp{[]}).  This is the default method.
7595
7596 @item dummy
7597 @vindex gnus-summary-dummy-line-format
7598 @vindex gnus-summary-make-false-root-always
7599 Gnus will create a dummy summary line that will pretend to be the
7600 parent.  This dummy line does not correspond to any real article, so
7601 selecting it will just select the first real article after the dummy
7602 article.  @code{gnus-summary-dummy-line-format} is used to specify the
7603 format of the dummy roots.  It accepts only one format spec:  @samp{S},
7604 which is the subject of the article.  @xref{Formatting Variables}.
7605 If you want all threads to have a dummy root, even the non-gathered
7606 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
7607
7608 @item empty
7609 Gnus won't actually make any article the parent, but simply leave the
7610 subject field of all orphans except the first empty.  (Actually, it will
7611 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
7612 Buffer Format}).)
7613
7614 @item none
7615 Don't make any article parent at all.  Just gather the threads and
7616 display them after one another.
7617
7618 @item nil
7619 Don't gather loose threads.
7620 @end table
7621
7622 @item gnus-summary-gather-subject-limit
7623 @vindex gnus-summary-gather-subject-limit
7624 Loose threads are gathered by comparing subjects of articles.  If this
7625 variable is @code{nil}, Gnus requires an exact match between the
7626 subjects of the loose threads before gathering them into one big
7627 super-thread.  This might be too strict a requirement, what with the
7628 presence of stupid newsreaders that chop off long subject lines.  If
7629 you think so, set this variable to, say, 20 to require that only the
7630 first 20 characters of the subjects have to match.  If you set this
7631 variable to a really low number, you'll find that Gnus will gather
7632 everything in sight into one thread, which isn't very helpful.
7633
7634 @cindex fuzzy article gathering
7635 If you set this variable to the special value @code{fuzzy}, Gnus will
7636 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
7637 Matching}).
7638
7639 @item gnus-simplify-subject-fuzzy-regexp
7640 @vindex gnus-simplify-subject-fuzzy-regexp
7641 This can either be a regular expression or list of regular expressions
7642 that match strings that will be removed from subjects if fuzzy subject
7643 simplification is used.
7644
7645 @item gnus-simplify-ignored-prefixes
7646 @vindex gnus-simplify-ignored-prefixes
7647 If you set @code{gnus-summary-gather-subject-limit} to something as low
7648 as 10, you might consider setting this variable to something sensible:
7649
7650 @c Written by Michael Ernst <mernst@cs.rice.edu>
7651 @lisp
7652 (setq gnus-simplify-ignored-prefixes
7653       (concat
7654        "\\`\\[?\\("
7655        (mapconcat
7656         'identity
7657         '("looking"
7658           "wanted" "followup" "summary\\( of\\)?"
7659           "help" "query" "problem" "question"
7660           "answer" "reference" "announce"
7661           "How can I" "How to" "Comparison of"
7662           ;; ...
7663           )
7664         "\\|")
7665        "\\)\\s *\\("
7666        (mapconcat 'identity
7667                   '("for" "for reference" "with" "about")
7668                   "\\|")
7669        "\\)?\\]?:?[ \t]*"))
7670 @end lisp
7671
7672 All words that match this regexp will be removed before comparing two
7673 subjects.
7674
7675 @item gnus-simplify-subject-functions
7676 @vindex gnus-simplify-subject-functions
7677 If non-@code{nil}, this variable overrides
7678 @code{gnus-summary-gather-subject-limit}.  This variable should be a
7679 list of functions to apply to the @code{Subject} string iteratively to
7680 arrive at the simplified version of the string.
7681
7682 Useful functions to put in this list include:
7683
7684 @table @code
7685 @item gnus-simplify-subject-re
7686 @findex gnus-simplify-subject-re
7687 Strip the leading @samp{Re:}.
7688
7689 @item gnus-simplify-subject-fuzzy
7690 @findex gnus-simplify-subject-fuzzy
7691 Simplify fuzzily.
7692
7693 @item gnus-simplify-whitespace
7694 @findex gnus-simplify-whitespace
7695 Remove excessive whitespace.
7696
7697 @item gnus-simplify-all-whitespace
7698 @findex gnus-simplify-all-whitespace
7699 Remove all whitespace.
7700 @end table
7701
7702 You may also write your own functions, of course.
7703
7704
7705 @item gnus-summary-gather-exclude-subject
7706 @vindex gnus-summary-gather-exclude-subject
7707 Since loose thread gathering is done on subjects only, that might lead
7708 to many false hits, especially with certain common subjects like
7709 @samp{} and @samp{(none)}.  To make the situation slightly better,
7710 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
7711 what subjects should be excluded from the gathering process.@*
7712 The default is @samp{^ *$\\|^(none)$}.
7713
7714 @item gnus-summary-thread-gathering-function
7715 @vindex gnus-summary-thread-gathering-function
7716 Gnus gathers threads by looking at @code{Subject} headers.  This means
7717 that totally unrelated articles may end up in the same ``thread'', which
7718 is confusing.  An alternate approach is to look at all the
7719 @code{Message-ID}s in all the @code{References} headers to find matches.
7720 This will ensure that no gathered threads ever include unrelated
7721 articles, but it also means that people who have posted with broken
7722 newsreaders won't be gathered properly.  The choice is yours---plague or
7723 cholera:
7724
7725 @table @code
7726 @item gnus-gather-threads-by-subject
7727 @findex gnus-gather-threads-by-subject
7728 This function is the default gathering function and looks at
7729 @code{Subject}s exclusively.
7730
7731 @item gnus-gather-threads-by-references
7732 @findex gnus-gather-threads-by-references
7733 This function looks at @code{References} headers exclusively.
7734 @end table
7735
7736 If you want to test gathering by @code{References}, you could say
7737 something like:
7738
7739 @lisp
7740 (setq gnus-summary-thread-gathering-function
7741       'gnus-gather-threads-by-references)
7742 @end lisp
7743
7744 @end table
7745
7746
7747 @node Filling In Threads
7748 @subsubsection Filling In Threads
7749
7750 @table @code
7751 @item gnus-fetch-old-headers
7752 @vindex gnus-fetch-old-headers
7753 If non-@code{nil}, Gnus will attempt to build old threads by fetching
7754 more old headers---headers to articles marked as read.  If you would
7755 like to display as few summary lines as possible, but still connect as
7756 many loose threads as possible, you should set this variable to
7757 @code{some} or a number.  If you set it to a number, no more than that
7758 number of extra old headers will be fetched.  In either case, fetching
7759 old headers only works if the back end you are using carries overview
7760 files---this would normally be @code{nntp}, @code{nnspool},
7761 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
7762 the thread has been expired by the server, there's not much Gnus can
7763 do about that.
7764
7765 This variable can also be set to @code{invisible}.  This won't have any
7766 visible effects, but is useful if you use the @kbd{A T} command a lot
7767 (@pxref{Finding the Parent}).
7768
7769 The server has to support @acronym{NOV} for any of this to work.
7770
7771 @cindex Gmane, gnus-fetch-old-headers
7772 This feature can seriously impact performance it ignores all locally
7773 cached header entries.  Setting it to @code{t} for groups for a server
7774 that doesn't expire articles (such as news.gmane.org), leads to very
7775 slow summary generation.
7776
7777 @item gnus-fetch-old-ephemeral-headers
7778 @vindex gnus-fetch-old-ephemeral-headers
7779 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
7780 newsgroups.
7781
7782 @item gnus-build-sparse-threads
7783 @vindex gnus-build-sparse-threads
7784 Fetching old headers can be slow.  A low-rent similar effect can be
7785 gotten by setting this variable to @code{some}.  Gnus will then look at
7786 the complete @code{References} headers of all articles and try to string
7787 together articles that belong in the same thread.  This will leave
7788 @dfn{gaps} in the threading display where Gnus guesses that an article
7789 is missing from the thread.  (These gaps appear like normal summary
7790 lines.  If you select a gap, Gnus will try to fetch the article in
7791 question.)  If this variable is @code{t}, Gnus will display all these
7792 ``gaps'' without regard for whether they are useful for completing the
7793 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
7794 off sparse leaf nodes that don't lead anywhere.  This variable is
7795 @code{nil} by default.
7796
7797 @item gnus-read-all-available-headers
7798 @vindex gnus-read-all-available-headers
7799 This is a rather obscure variable that few will find useful.  It's
7800 intended for those non-news newsgroups where the back end has to fetch
7801 quite a lot to present the summary buffer, and where it's impossible to
7802 go back to parents of articles.  This is mostly the case in the
7803 web-based groups.
7804
7805 If you don't use those, then it's safe to leave this as the default
7806 @code{nil}.  If you want to use this variable, it should be a regexp
7807 that matches the group name, or @code{t} for all groups.
7808
7809 @end table
7810
7811
7812 @node More Threading
7813 @subsubsection More Threading
7814
7815 @table @code
7816 @item gnus-show-threads
7817 @vindex gnus-show-threads
7818 If this variable is @code{nil}, no threading will be done, and all of
7819 the rest of the variables here will have no effect.  Turning threading
7820 off will speed group selection up a bit, but it is sure to make reading
7821 slower and more awkward.
7822
7823 @item gnus-thread-hide-subtree
7824 @vindex gnus-thread-hide-subtree
7825 If non-@code{nil}, all threads will be hidden when the summary buffer is
7826 generated.
7827
7828 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
7829 Available predicates are @code{gnus-article-unread-p} and
7830 @code{gnus-article-unseen-p}.
7831
7832 Here's an example:
7833
7834 @lisp
7835 (setq gnus-thread-hide-subtree
7836       '(or gnus-article-unread-p
7837            gnus-article-unseen-p))
7838 @end lisp
7839
7840 (It's a pretty nonsensical example, since all unseen articles are also
7841 unread, but you get my drift.)
7842
7843
7844 @item gnus-thread-expunge-below
7845 @vindex gnus-thread-expunge-below
7846 All threads that have a total score (as defined by
7847 @code{gnus-thread-score-function}) less than this number will be
7848 expunged.  This variable is @code{nil} by default, which means that no
7849 threads are expunged.
7850
7851 @item gnus-thread-hide-killed
7852 @vindex gnus-thread-hide-killed
7853 if you kill a thread and this variable is non-@code{nil}, the subtree
7854 will be hidden.
7855
7856 @item gnus-thread-ignore-subject
7857 @vindex gnus-thread-ignore-subject
7858 Sometimes somebody changes the subject in the middle of a thread.  If
7859 this variable is non-@code{nil}, which is the default, the subject
7860 change is ignored.  If it is @code{nil}, a change in the subject will
7861 result in a new thread.
7862
7863 @item gnus-thread-indent-level
7864 @vindex gnus-thread-indent-level
7865 This is a number that says how much each sub-thread should be indented.
7866 The default is 4.
7867
7868 @item gnus-sort-gathered-threads-function
7869 @vindex gnus-sort-gathered-threads-function
7870 Sometimes, particularly with mailing lists, the order in which mails
7871 arrive locally is not necessarily the same as the order in which they
7872 arrived on the mailing list.  Consequently, when sorting sub-threads
7873 using the default @code{gnus-thread-sort-by-number}, responses can end
7874 up appearing before the article to which they are responding to.
7875 Setting this variable to an alternate value
7876 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
7877 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
7878 more logical sub-thread ordering in such instances.
7879
7880 @end table
7881
7882
7883 @node Low-Level Threading
7884 @subsubsection Low-Level Threading
7885
7886 @table @code
7887
7888 @item gnus-parse-headers-hook
7889 @vindex gnus-parse-headers-hook
7890 Hook run before parsing any headers.
7891
7892 @item gnus-alter-header-function
7893 @vindex gnus-alter-header-function
7894 If non-@code{nil}, this function will be called to allow alteration of
7895 article header structures.  The function is called with one parameter,
7896 the article header vector, which it may alter in any way.  For instance,
7897 if you have a mail-to-news gateway which alters the @code{Message-ID}s
7898 in systematic ways (by adding prefixes and such), you can use this
7899 variable to un-scramble the @code{Message-ID}s so that they are more
7900 meaningful.  Here's one example:
7901
7902 @lisp
7903 (setq gnus-alter-header-function 'my-alter-message-id)
7904
7905 (defun my-alter-message-id (header)
7906   (let ((id (mail-header-id header)))
7907     (when (string-match
7908            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
7909       (mail-header-set-id
7910        (concat (match-string 1 id) "@@" (match-string 2 id))
7911        header))))
7912 @end lisp
7913
7914 @end table
7915
7916
7917 @node Thread Commands
7918 @subsection Thread Commands
7919 @cindex thread commands
7920
7921 @table @kbd
7922
7923 @item T k
7924 @itemx C-M-k
7925 @kindex T k (Summary)
7926 @kindex C-M-k (Summary)
7927 @findex gnus-summary-kill-thread
7928 Mark all articles in the current (sub-)thread as read
7929 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
7930 remove all marks instead.  If the prefix argument is negative, tick
7931 articles instead.
7932
7933 @item T l
7934 @itemx C-M-l
7935 @kindex T l (Summary)
7936 @kindex C-M-l (Summary)
7937 @findex gnus-summary-lower-thread
7938 Lower the score of the current (sub-)thread
7939 (@code{gnus-summary-lower-thread}).
7940
7941 @item T i
7942 @kindex T i (Summary)
7943 @findex gnus-summary-raise-thread
7944 Increase the score of the current (sub-)thread
7945 (@code{gnus-summary-raise-thread}).
7946
7947 @item T #
7948 @kindex T # (Summary)
7949 @findex gnus-uu-mark-thread
7950 Set the process mark on the current (sub-)thread
7951 (@code{gnus-uu-mark-thread}).
7952
7953 @item T M-#
7954 @kindex T M-# (Summary)
7955 @findex gnus-uu-unmark-thread
7956 Remove the process mark from the current (sub-)thread
7957 (@code{gnus-uu-unmark-thread}).
7958
7959 @item T T
7960 @kindex T T (Summary)
7961 @findex gnus-summary-toggle-threads
7962 Toggle threading (@code{gnus-summary-toggle-threads}).
7963
7964 @item T s
7965 @kindex T s (Summary)
7966 @findex gnus-summary-show-thread
7967 Expose the (sub-)thread hidden under the current article, if any@*
7968 (@code{gnus-summary-show-thread}).
7969
7970 @item T h
7971 @kindex T h (Summary)
7972 @findex gnus-summary-hide-thread
7973 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
7974
7975 @item T S
7976 @kindex T S (Summary)
7977 @findex gnus-summary-show-all-threads
7978 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
7979
7980 @item T H
7981 @kindex T H (Summary)
7982 @findex gnus-summary-hide-all-threads
7983 Hide all threads (@code{gnus-summary-hide-all-threads}).
7984
7985 @item T t
7986 @kindex T t (Summary)
7987 @findex gnus-summary-rethread-current
7988 Re-thread the current article's thread
7989 (@code{gnus-summary-rethread-current}).  This works even when the
7990 summary buffer is otherwise unthreaded.
7991
7992 @item T ^
7993 @kindex T ^ (Summary)
7994 @findex gnus-summary-reparent-thread
7995 Make the current article the child of the marked (or previous) article
7996 (@code{gnus-summary-reparent-thread}).
7997
7998 @item T M-^
7999 @kindex T M-^ (Summary)
8000 @findex gnus-summary-reparent-children
8001 Make the current article the parent of the marked articles
8002 (@code{gnus-summary-reparent-children}).
8003
8004 @end table
8005
8006 The following commands are thread movement commands.  They all
8007 understand the numeric prefix.
8008
8009 @table @kbd
8010
8011 @item T n
8012 @kindex T n (Summary)
8013 @itemx C-M-f
8014 @kindex C-M-n (Summary)
8015 @itemx M-down
8016 @kindex M-down (Summary)
8017 @findex gnus-summary-next-thread
8018 Go to the next thread (@code{gnus-summary-next-thread}).
8019
8020 @item T p
8021 @kindex T p (Summary)
8022 @itemx C-M-b
8023 @kindex C-M-p (Summary)
8024 @itemx M-up
8025 @kindex M-up (Summary)
8026 @findex gnus-summary-prev-thread
8027 Go to the previous thread (@code{gnus-summary-prev-thread}).
8028
8029 @item T d
8030 @kindex T d (Summary)
8031 @findex gnus-summary-down-thread
8032 Descend the thread (@code{gnus-summary-down-thread}).
8033
8034 @item T u
8035 @kindex T u (Summary)
8036 @findex gnus-summary-up-thread
8037 Ascend the thread (@code{gnus-summary-up-thread}).
8038
8039 @item T o
8040 @kindex T o (Summary)
8041 @findex gnus-summary-top-thread
8042 Go to the top of the thread (@code{gnus-summary-top-thread}).
8043 @end table
8044
8045 @vindex gnus-thread-operation-ignore-subject
8046 If you ignore subject while threading, you'll naturally end up with
8047 threads that have several different subjects in them.  If you then issue
8048 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
8049 wish to kill the entire thread, but just those parts of the thread that
8050 have the same subject as the current article.  If you like this idea,
8051 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
8052 is non-@code{nil} (which it is by default), subjects will be ignored
8053 when doing thread commands.  If this variable is @code{nil}, articles in
8054 the same thread with different subjects will not be included in the
8055 operation in question.  If this variable is @code{fuzzy}, only articles
8056 that have subjects fuzzily equal will be included (@pxref{Fuzzy
8057 Matching}).
8058
8059
8060 @node Sorting the Summary Buffer
8061 @section Sorting the Summary Buffer
8062
8063 @findex gnus-thread-sort-by-total-score
8064 @findex gnus-thread-sort-by-date
8065 @findex gnus-thread-sort-by-score
8066 @findex gnus-thread-sort-by-subject
8067 @findex gnus-thread-sort-by-author
8068 @findex gnus-thread-sort-by-recipient
8069 @findex gnus-thread-sort-by-number
8070 @findex gnus-thread-sort-by-random
8071 @vindex gnus-thread-sort-functions
8072 @findex gnus-thread-sort-by-most-recent-number
8073 @findex gnus-thread-sort-by-most-recent-date
8074 If you are using a threaded summary display, you can sort the threads by
8075 setting @code{gnus-thread-sort-functions}, which can be either a single
8076 function, a list of functions, or a list containing functions and
8077 @code{(not some-function)} elements.
8078
8079 By default, sorting is done on article numbers.  Ready-made sorting
8080 predicate functions include @code{gnus-thread-sort-by-number},
8081 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-recipient},
8082 @code{gnus-thread-sort-by-subject},
8083 @code{gnus-thread-sort-by-date},
8084 @code{gnus-thread-sort-by-score},
8085 @code{gnus-thread-sort-by-most-recent-number},
8086 @code{gnus-thread-sort-by-most-recent-date},
8087 @code{gnus-thread-sort-by-random} and
8088 @code{gnus-thread-sort-by-total-score}.
8089
8090 Each function takes two threads and returns non-@code{nil} if the first
8091 thread should be sorted before the other.  Note that sorting really is
8092 normally done by looking only at the roots of each thread.
8093
8094 If you use more than one function, the primary sort key should be the
8095 last function in the list.  You should probably always include
8096 @code{gnus-thread-sort-by-number} in the list of sorting
8097 functions---preferably first.  This will ensure that threads that are
8098 equal with respect to the other sort criteria will be displayed in
8099 ascending article order.
8100
8101 If you would like to sort by reverse score, then by subject, and finally
8102 by number, you could do something like:
8103
8104 @lisp
8105 (setq gnus-thread-sort-functions
8106       '(gnus-thread-sort-by-number
8107         gnus-thread-sort-by-subject
8108         (not gnus-thread-sort-by-total-score)))
8109 @end lisp
8110
8111 The threads that have highest score will be displayed first in the
8112 summary buffer.  When threads have the same score, they will be sorted
8113 alphabetically.  The threads that have the same score and the same
8114 subject will be sorted by number, which is (normally) the sequence in
8115 which the articles arrived.
8116
8117 If you want to sort by score and then reverse arrival order, you could
8118 say something like:
8119
8120 @lisp
8121 (setq gnus-thread-sort-functions
8122       '((not gnus-thread-sort-by-number)
8123         gnus-thread-sort-by-score))
8124 @end lisp
8125
8126 @vindex gnus-thread-score-function
8127 The function in the @code{gnus-thread-score-function} variable (default
8128 @code{+}) is used for calculating the total score of a thread.  Useful
8129 functions might be @code{max}, @code{min}, or squared means, or whatever
8130 tickles your fancy.
8131
8132 @findex gnus-article-sort-functions
8133 @findex gnus-article-sort-by-date
8134 @findex gnus-article-sort-by-most-recent-date
8135 @findex gnus-article-sort-by-score
8136 @findex gnus-article-sort-by-subject
8137 @findex gnus-article-sort-by-author
8138 @findex gnus-article-sort-by-random
8139 @findex gnus-article-sort-by-number
8140 @findex gnus-article-sort-by-most-recent-number
8141 If you are using an unthreaded display for some strange reason or
8142 other, you have to fiddle with the @code{gnus-article-sort-functions}
8143 variable.  It is very similar to the
8144 @code{gnus-thread-sort-functions}, except that it uses slightly
8145 different functions for article comparison.  Available sorting
8146 predicate functions are @code{gnus-article-sort-by-number},
8147 @code{gnus-article-sort-by-author},
8148 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
8149 @code{gnus-article-sort-by-random}, and
8150 @code{gnus-article-sort-by-score}.
8151
8152 If you want to sort an unthreaded summary display by subject, you could
8153 say something like:
8154
8155 @lisp
8156 (setq gnus-article-sort-functions
8157       '(gnus-article-sort-by-number
8158         gnus-article-sort-by-subject))
8159 @end lisp
8160
8161 You can define group specific sorting via @code{gnus-parameters},
8162 @xref{Group Parameters}.
8163
8164
8165 @node Asynchronous Fetching
8166 @section Asynchronous Article Fetching
8167 @cindex asynchronous article fetching
8168 @cindex article pre-fetch
8169 @cindex pre-fetch
8170
8171 If you read your news from an @acronym{NNTP} server that's far away, the
8172 network latencies may make reading articles a chore.  You have to wait
8173 for a while after pressing @kbd{n} to go to the next article before the
8174 article appears.  Why can't Gnus just go ahead and fetch the article
8175 while you are reading the previous one?  Why not, indeed.
8176
8177 First, some caveats.  There are some pitfalls to using asynchronous
8178 article fetching, especially the way Gnus does it.
8179
8180 Let's say you are reading article 1, which is short, and article 2 is
8181 quite long, and you are not interested in reading that.  Gnus does not
8182 know this, so it goes ahead and fetches article 2.  You decide to read
8183 article 3, but since Gnus is in the process of fetching article 2, the
8184 connection is blocked.
8185
8186 To avoid these situations, Gnus will open two (count 'em two)
8187 connections to the server.  Some people may think this isn't a very nice
8188 thing to do, but I don't see any real alternatives.  Setting up that
8189 extra connection takes some time, so Gnus startup will be slower.
8190
8191 Gnus will fetch more articles than you will read.  This will mean that
8192 the link between your machine and the @acronym{NNTP} server will become more
8193 loaded than if you didn't use article pre-fetch.  The server itself will
8194 also become more loaded---both with the extra article requests, and the
8195 extra connection.
8196
8197 Ok, so now you know that you shouldn't really use this thing@dots{} unless
8198 you really want to.
8199
8200 @vindex gnus-asynchronous
8201 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
8202 happen automatically.
8203
8204 @vindex gnus-use-article-prefetch
8205 You can control how many articles are to be pre-fetched by setting
8206 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
8207 that when you read an article in the group, the back end will pre-fetch
8208 the next 30 articles.  If this variable is @code{t}, the back end will
8209 pre-fetch all the articles it can without bound.  If it is
8210 @code{nil}, no pre-fetching will be done.
8211
8212 @vindex gnus-async-prefetch-article-p
8213 @findex gnus-async-unread-p
8214 There are probably some articles that you don't want to pre-fetch---read
8215 articles, for instance.  The @code{gnus-async-prefetch-article-p}
8216 variable controls whether an article is to be pre-fetched.  This
8217 function should return non-@code{nil} when the article in question is
8218 to be pre-fetched.  The default is @code{gnus-async-unread-p}, which
8219 returns @code{nil} on read articles.  The function is called with an
8220 article data structure as the only parameter.
8221
8222 If, for instance, you wish to pre-fetch only unread articles shorter
8223 than 100 lines, you could say something like:
8224
8225 @lisp
8226 (defun my-async-short-unread-p (data)
8227   "Return non-nil for short, unread articles."
8228   (and (gnus-data-unread-p data)
8229        (< (mail-header-lines (gnus-data-header data))
8230           100)))
8231
8232 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
8233 @end lisp
8234
8235 These functions will be called many, many times, so they should
8236 preferably be short and sweet to avoid slowing down Gnus too much.
8237 It's probably a good idea to byte-compile things like this.
8238
8239 @vindex gnus-async-post-fetch-function
8240 @findex gnus-html-prefetch-images
8241 After an article has been prefetched, this
8242 @code{gnus-async-post-fetch-function} will be called.  The buffer will
8243 be narrowed to the region of the article that was fetched.  A useful
8244 value would be @code{gnus-html-prefetch-images}, which will prefetch
8245 and store images referenced in the article, so that you don't have to
8246 wait for them to be fetched when you read the article.  This is useful
8247 for @acronym{HTML} messages that have external images.
8248
8249 @vindex gnus-prefetched-article-deletion-strategy
8250 Articles have to be removed from the asynch buffer sooner or later.  The
8251 @code{gnus-prefetched-article-deletion-strategy} says when to remove
8252 articles.  This is a list that may contain the following elements:
8253
8254 @table @code
8255 @item read
8256 Remove articles when they are read.
8257
8258 @item exit
8259 Remove articles when exiting the group.
8260 @end table
8261
8262 The default value is @code{(read exit)}.
8263
8264 @c @vindex gnus-use-header-prefetch
8265 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
8266 @c from the next group.
8267
8268
8269 @node Article Caching
8270 @section Article Caching
8271 @cindex article caching
8272 @cindex caching
8273
8274 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
8275 consider turning article caching on.  Each article will then be stored
8276 locally under your home directory.  As you may surmise, this could
8277 potentially use @emph{huge} amounts of disk space, as well as eat up all
8278 your inodes so fast it will make your head swim.  In vodka.
8279
8280 Used carefully, though, it could be just an easier way to save articles.
8281
8282 @vindex gnus-use-long-file-name
8283 @vindex gnus-cache-directory
8284 @vindex gnus-use-cache
8285 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
8286 all articles ticked or marked as dormant will then be copied
8287 over to your local cache (@code{gnus-cache-directory}).  Whether this
8288 cache is flat or hierarchical is controlled by the
8289 @code{gnus-use-long-file-name} variable, as usual.
8290
8291 When re-selecting a ticked or dormant article, it will be fetched from the
8292 cache instead of from the server.  As articles in your cache will never
8293 expire, this might serve as a method of saving articles while still
8294 keeping them where they belong.  Just mark all articles you want to save
8295 as dormant, and don't worry.
8296
8297 When an article is marked as read, is it removed from the cache.
8298
8299 @vindex gnus-cache-remove-articles
8300 @vindex gnus-cache-enter-articles
8301 The entering/removal of articles from the cache is controlled by the
8302 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
8303 variables.  Both are lists of symbols.  The first is @code{(ticked
8304 dormant)} by default, meaning that ticked and dormant articles will be
8305 put in the cache.  The latter is @code{(read)} by default, meaning that
8306 articles marked as read are removed from the cache.  Possibly
8307 symbols in these two lists are @code{ticked}, @code{dormant},
8308 @code{unread} and @code{read}.
8309
8310 @findex gnus-jog-cache
8311 So where does the massive article-fetching and storing come into the
8312 picture?  The @code{gnus-jog-cache} command will go through all
8313 subscribed newsgroups, request all unread articles, score them, and
8314 store them in the cache.  You should only ever, ever ever ever, use this
8315 command if 1) your connection to the @acronym{NNTP} server is really, really,
8316 really slow and 2) you have a really, really, really huge disk.
8317 Seriously.  One way to cut down on the number of articles downloaded is
8318 to score unwanted articles down and have them marked as read.  They will
8319 not then be downloaded by this command.
8320
8321 @vindex gnus-uncacheable-groups
8322 @vindex gnus-cacheable-groups
8323 It is likely that you do not want caching on all groups.  For instance,
8324 if your @code{nnml} mail is located under your home directory, it makes no
8325 sense to cache it somewhere else under your home directory.  Unless you
8326 feel that it's neat to use twice as much space.
8327
8328 To limit the caching, you could set @code{gnus-cacheable-groups} to a
8329 regexp of groups to cache, @samp{^nntp} for instance, or set the
8330 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
8331 Both variables are @code{nil} by default.  If a group matches both
8332 variables, the group is not cached.
8333
8334 @findex gnus-cache-generate-nov-databases
8335 @findex gnus-cache-generate-active
8336 @vindex gnus-cache-active-file
8337 The cache stores information on what articles it contains in its active
8338 file (@code{gnus-cache-active-file}).  If this file (or any other parts
8339 of the cache) becomes all messed up for some reason or other, Gnus
8340 offers two functions that will try to set things right.  @kbd{M-x
8341 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
8342 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
8343 file.
8344
8345 @findex gnus-cache-move-cache
8346 @code{gnus-cache-move-cache} will move your whole
8347 @code{gnus-cache-directory} to some other location.  You get asked to
8348 where, isn't that cool?
8349
8350 @node Persistent Articles
8351 @section Persistent Articles
8352 @cindex persistent articles
8353
8354 Closely related to article caching, we have @dfn{persistent articles}.
8355 In fact, it's just a different way of looking at caching, and much more
8356 useful in my opinion.
8357
8358 Say you're reading a newsgroup, and you happen on to some valuable gem
8359 that you want to keep and treasure forever.  You'd normally just save it
8360 (using one of the many saving commands) in some file.  The problem with
8361 that is that it's just, well, yucky.  Ideally you'd prefer just having
8362 the article remain in the group where you found it forever; untouched by
8363 the expiry going on at the news server.
8364
8365 This is what a @dfn{persistent article} is---an article that just won't
8366 be deleted.  It's implemented using the normal cache functions, but
8367 you use two explicit commands for managing persistent articles:
8368
8369 @table @kbd
8370
8371 @item *
8372 @kindex * (Summary)
8373 @findex gnus-cache-enter-article
8374 Make the current article persistent (@code{gnus-cache-enter-article}).
8375
8376 @item M-*
8377 @kindex M-* (Summary)
8378 @findex gnus-cache-remove-article
8379 Remove the current article from the persistent articles
8380 (@code{gnus-cache-remove-article}).  This will normally delete the
8381 article.
8382 @end table
8383
8384 Both these commands understand the process/prefix convention.
8385
8386 To avoid having all ticked articles (and stuff) entered into the cache,
8387 you should set @code{gnus-use-cache} to @code{passive} if you're just
8388 interested in persistent articles:
8389
8390 @lisp
8391 (setq gnus-use-cache 'passive)
8392 @end lisp
8393
8394 @node Sticky Articles
8395 @section Sticky Articles
8396 @cindex sticky articles
8397
8398 When you select an article the current article buffer will be reused
8399 according to the value of the variable
8400 @code{gnus-single-article-buffer}.  If its value is non-@code{nil} (the
8401 default) all articles reuse the same article buffer.  Else each group
8402 has its own article buffer.
8403
8404 This implies that it's not possible to have more than one article buffer
8405 in a group at a time.  But sometimes you might want to display all the
8406 latest emails from your mother, your father, your aunt, your uncle and
8407 your 17 cousins to coordinate the next christmas party.
8408
8409 That's where sticky articles come in handy.  A sticky article buffer
8410 basically is a normal article buffer, but it won't be reused when you
8411 select another article.  You can make an article sticky with:
8412
8413 @table @kbd
8414 @item A S
8415 @kindex A S (Summary)
8416 @findex gnus-sticky-article
8417 Make the current article sticky.  If a prefix arg is given, ask for a
8418 name for this sticky article buffer.
8419 @end table
8420
8421 To close a sticky article buffer you can use these commands:
8422
8423 @table @kbd
8424 @item q
8425 @kindex q (Article)
8426 @findex bury-buffer
8427 Puts this sticky article buffer at the end of the list of all buffers.
8428
8429 @item k
8430 @kindex k (Article)
8431 @findex gnus-kill-sticky-article-buffer
8432 Kills this sticky article buffer.
8433 @end table
8434
8435 To kill all sticky article buffers you can use:
8436
8437 @defun gnus-kill-sticky-article-buffers ARG
8438 Kill all sticky article buffers.
8439 If a prefix ARG is given, ask for confirmation.
8440 @end defun
8441
8442 @node Article Backlog
8443 @section Article Backlog
8444 @cindex backlog
8445 @cindex article backlog
8446
8447 If you have a slow connection, but the idea of using caching seems
8448 unappealing to you (and it is, really), you can help the situation some
8449 by switching on the @dfn{backlog}.  This is where Gnus will buffer
8450 already read articles so that it doesn't have to re-fetch articles
8451 you've already read.  This only helps if you are in the habit of
8452 re-selecting articles you've recently read, of course.  If you never do
8453 that, turning the backlog on will slow Gnus down a little bit, and
8454 increase memory usage some.
8455
8456 @vindex gnus-keep-backlog
8457 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
8458 at most @var{n} old articles in a buffer for later re-fetching.  If this
8459 variable is non-@code{nil} and is not a number, Gnus will store
8460 @emph{all} read articles, which means that your Emacs will grow without
8461 bound before exploding and taking your machine down with you.  I put
8462 that in there just to keep y'all on your toes.
8463
8464 The default value is 20.
8465
8466
8467 @node Saving Articles
8468 @section Saving Articles
8469 @cindex saving articles
8470
8471 Gnus can save articles in a number of ways.  Below is the documentation
8472 for saving articles in a fairly straight-forward fashion (i.e., little
8473 processing of the article is done before it is saved).  For a different
8474 approach (uudecoding, unsharing) you should use @code{gnus-uu}
8475 (@pxref{Decoding Articles}).
8476
8477 For the commands listed here, the target is a file.  If you want to
8478 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
8479 command (@pxref{Mail Group Commands}).
8480
8481 @vindex gnus-save-all-headers
8482 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
8483 unwanted headers before saving the article.
8484
8485 @vindex gnus-saved-headers
8486 If the preceding variable is @code{nil}, all headers that match the
8487 @code{gnus-saved-headers} regexp will be kept, while the rest will be
8488 deleted before saving.
8489
8490 @table @kbd
8491
8492 @item O o
8493 @itemx o
8494 @kindex O o (Summary)
8495 @kindex o (Summary)
8496 @findex gnus-summary-save-article
8497 @c @icon{gnus-summary-save-article}
8498 Save the current article using the default article saver
8499 (@code{gnus-summary-save-article}).
8500
8501 @item O m
8502 @kindex O m (Summary)
8503 @findex gnus-summary-save-article-mail
8504 Save the current article in a Unix mail box (mbox) file
8505 (@code{gnus-summary-save-article-mail}).
8506
8507 @item O r
8508 @kindex O r (Summary)
8509 @findex gnus-summary-save-article-rmail
8510 Save the current article in Rmail format
8511 (@code{gnus-summary-save-article-rmail}).  This is mbox since Emacs 23,
8512 Babyl in older versions.
8513
8514 @item O f
8515 @kindex O f (Summary)
8516 @findex gnus-summary-save-article-file
8517 @c @icon{gnus-summary-save-article-file}
8518 Save the current article in plain file format
8519 (@code{gnus-summary-save-article-file}).
8520
8521 @item O F
8522 @kindex O F (Summary)
8523 @findex gnus-summary-write-article-file
8524 Write the current article in plain file format, overwriting any previous
8525 file contents (@code{gnus-summary-write-article-file}).
8526
8527 @item O b
8528 @kindex O b (Summary)
8529 @findex gnus-summary-save-article-body-file
8530 Save the current article body in plain file format
8531 (@code{gnus-summary-save-article-body-file}).
8532
8533 @item O h
8534 @kindex O h (Summary)
8535 @findex gnus-summary-save-article-folder
8536 Save the current article in mh folder format
8537 (@code{gnus-summary-save-article-folder}).
8538
8539 @item O v
8540 @kindex O v (Summary)
8541 @findex gnus-summary-save-article-vm
8542 Save the current article in a VM folder
8543 (@code{gnus-summary-save-article-vm}).
8544
8545 @item O p
8546 @itemx |
8547 @kindex O p (Summary)
8548 @kindex | (Summary)
8549 @findex gnus-summary-pipe-output
8550 @vindex gnus-summary-pipe-output-default-command
8551 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
8552 the current article to a process (@code{gnus-summary-pipe-output}).
8553 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
8554 complete headers in the piped output.  The symbolic prefix @code{r} is
8555 special; it lets this command pipe a raw article including all headers.
8556 The @code{gnus-summary-pipe-output-default-command} variable can be set
8557 to a string containing the default command and options (default
8558 @code{nil}).
8559
8560 @item O P
8561 @kindex O P (Summary)
8562 @findex gnus-summary-muttprint
8563 @vindex gnus-summary-muttprint-program
8564 Save the current article into muttprint.  That is, print it using the
8565 external program @uref{http://muttprint.sourceforge.net/,
8566 Muttprint}.  The program name and options to use is controlled by the
8567 variable @code{gnus-summary-muttprint-program}.
8568 (@code{gnus-summary-muttprint}).
8569
8570 @end table
8571
8572 @vindex gnus-prompt-before-saving
8573 All these commands use the process/prefix convention
8574 (@pxref{Process/Prefix}).  If you save bunches of articles using these
8575 functions, you might get tired of being prompted for files to save each
8576 and every article in.  The prompting action is controlled by
8577 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
8578 default, giving you that excessive prompting action you know and
8579 loathe.  If you set this variable to @code{t} instead, you'll be prompted
8580 just once for each series of articles you save.  If you like to really
8581 have Gnus do all your thinking for you, you can even set this variable
8582 to @code{nil}, which means that you will never be prompted for files to
8583 save articles in.  Gnus will simply save all the articles in the default
8584 files.
8585
8586
8587 @vindex gnus-default-article-saver
8588 You can customize the @code{gnus-default-article-saver} variable to make
8589 Gnus do what you want it to.  You can use any of the eight ready-made
8590 functions below, or you can create your own.
8591
8592 @table @code
8593
8594 @item gnus-summary-save-in-rmail
8595 @findex gnus-summary-save-in-rmail
8596 @vindex gnus-rmail-save-name
8597 @findex gnus-plain-save-name
8598 This is the default format, that used by the Rmail package.  Since Emacs
8599 23, Rmail uses standard mbox format.  Before this, it used the
8600 @dfn{Babyl} format.  Accordingly, this command writes mbox format since
8601 Emacs 23, unless appending to an existing Babyl file.  In older versions
8602 of Emacs, it always uses Babyl format.  Uses the function in the
8603 @code{gnus-rmail-save-name} variable to get a file name to save the
8604 article in.  The default is @code{gnus-plain-save-name}.
8605
8606 @item gnus-summary-save-in-mail
8607 @findex gnus-summary-save-in-mail
8608 @vindex gnus-mail-save-name
8609 Save in a Unix mail (mbox) file.  Uses the function in the
8610 @code{gnus-mail-save-name} variable to get a file name to save the
8611 article in.  The default is @code{gnus-plain-save-name}.
8612
8613 @item gnus-summary-save-in-file
8614 @findex gnus-summary-save-in-file
8615 @vindex gnus-file-save-name
8616 @findex gnus-numeric-save-name
8617 Append the article straight to an ordinary file.  Uses the function in
8618 the @code{gnus-file-save-name} variable to get a file name to save the
8619 article in.  The default is @code{gnus-numeric-save-name}.
8620
8621 @item gnus-summary-write-to-file
8622 @findex gnus-summary-write-to-file
8623 Write the article straight to an ordinary file.  The file is
8624 overwritten if it exists.  Uses the function in the
8625 @code{gnus-file-save-name} variable to get a file name to save the
8626 article in.  The default is @code{gnus-numeric-save-name}.
8627
8628 @item gnus-summary-save-body-in-file
8629 @findex gnus-summary-save-body-in-file
8630 Append the article body to an ordinary file.  Uses the function in the
8631 @code{gnus-file-save-name} variable to get a file name to save the
8632 article in.  The default is @code{gnus-numeric-save-name}.
8633
8634 @item gnus-summary-write-body-to-file
8635 @findex gnus-summary-write-body-to-file
8636 Write the article body straight to an ordinary file.  The file is
8637 overwritten if it exists.  Uses the function in the
8638 @code{gnus-file-save-name} variable to get a file name to save the
8639 article in.  The default is @code{gnus-numeric-save-name}.
8640
8641 @item gnus-summary-save-in-folder
8642 @findex gnus-summary-save-in-folder
8643 @findex gnus-folder-save-name
8644 @findex gnus-Folder-save-name
8645 @vindex gnus-folder-save-name
8646 @cindex rcvstore
8647 @cindex MH folders
8648 Save the article to an MH folder using @code{rcvstore} from the MH
8649 library.  Uses the function in the @code{gnus-folder-save-name} variable
8650 to get a file name to save the article in.  The default is
8651 @code{gnus-folder-save-name}, but you can also use
8652 @code{gnus-Folder-save-name}, which creates capitalized names.
8653
8654 @item gnus-summary-save-in-vm
8655 @findex gnus-summary-save-in-vm
8656 Save the article in a VM folder.  You have to have the VM mail
8657 reader to use this setting.
8658
8659 @item gnus-summary-save-in-pipe
8660 @findex gnus-summary-save-in-pipe
8661 Pipe the article to a shell command.  This function takes optional two
8662 arguments COMMAND and RAW.  Valid values for COMMAND include:
8663
8664 @itemize @bullet
8665 @item a string@*
8666 The executable command name and possibly arguments.
8667 @item @code{nil}@*
8668 You will be prompted for the command in the minibuffer.
8669 @item the symbol @code{default}@*
8670 It will be replaced with the command which the variable
8671 @code{gnus-summary-pipe-output-default-command} holds or the command
8672 last used for saving.
8673 @end itemize
8674
8675 Non-@code{nil} value for RAW overrides @code{:decode} and
8676 @code{:headers} properties (see below) and the raw article including all
8677 headers will be piped.
8678 @end table
8679
8680 The symbol of each function may have the following properties:
8681
8682 @table @code
8683 @item :decode
8684 The value non-@code{nil} means save decoded articles.  This is
8685 meaningful only with @code{gnus-summary-save-in-file},
8686 @code{gnus-summary-save-body-in-file},
8687 @code{gnus-summary-write-to-file},
8688 @code{gnus-summary-write-body-to-file}, and
8689 @code{gnus-summary-save-in-pipe}.
8690
8691 @item :function
8692 The value specifies an alternative function which appends, not
8693 overwrites, articles to a file.  This implies that when saving many
8694 articles at a time, @code{gnus-prompt-before-saving} is bound to
8695 @code{t} and all articles are saved in a single file.  This is
8696 meaningful only with @code{gnus-summary-write-to-file} and
8697 @code{gnus-summary-write-body-to-file}.
8698
8699 @item :headers
8700 The value specifies the symbol of a variable of which the value
8701 specifies headers to be saved.  If it is omitted,
8702 @code{gnus-save-all-headers} and @code{gnus-saved-headers} control what
8703 headers should be saved.
8704 @end table
8705
8706 @vindex gnus-article-save-directory
8707 All of these functions, except for the last one, will save the article
8708 in the @code{gnus-article-save-directory}, which is initialized from the
8709 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
8710 default.
8711
8712 As you can see above, the functions use different functions to find a
8713 suitable name of a file to save the article in.  Below is a list of
8714 available functions that generate names:
8715
8716 @table @code
8717
8718 @item gnus-Numeric-save-name
8719 @findex gnus-Numeric-save-name
8720 File names like @file{~/News/Alt.andrea-dworkin/45}.
8721
8722 @item gnus-numeric-save-name
8723 @findex gnus-numeric-save-name
8724 File names like @file{~/News/alt.andrea-dworkin/45}.
8725
8726 @item gnus-Plain-save-name
8727 @findex gnus-Plain-save-name
8728 File names like @file{~/News/Alt.andrea-dworkin}.
8729
8730 @item gnus-plain-save-name
8731 @findex gnus-plain-save-name
8732 File names like @file{~/News/alt.andrea-dworkin}.
8733
8734 @item gnus-sender-save-name
8735 @findex gnus-sender-save-name
8736 File names like @file{~/News/larsi}.
8737 @end table
8738
8739 @vindex gnus-split-methods
8740 You can have Gnus suggest where to save articles by plonking a regexp into
8741 the @code{gnus-split-methods} alist.  For instance, if you would like to
8742 save articles related to Gnus in the file @file{gnus-stuff}, and articles
8743 related to VM in @file{vm-stuff}, you could set this variable to something
8744 like:
8745
8746 @lisp
8747 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
8748  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
8749  (my-choosing-function "../other-dir/my-stuff")
8750  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
8751 @end lisp
8752
8753 We see that this is a list where each element is a list that has two
8754 elements---the @dfn{match} and the @dfn{file}.  The match can either be
8755 a string (in which case it is used as a regexp to match on the article
8756 head); it can be a symbol (which will be called as a function with the
8757 group name as a parameter); or it can be a list (which will be
8758 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
8759 the @dfn{file} will be used as a default prompt.  In addition, the
8760 result of the operation itself will be used if the function or form
8761 called returns a string or a list of strings.
8762
8763 You basically end up with a list of file names that might be used when
8764 saving the current article.  (All ``matches'' will be used.)  You will
8765 then be prompted for what you really want to use as a name, with file
8766 name completion over the results from applying this variable.
8767
8768 This variable is @code{((gnus-article-archive-name))} by default, which
8769 means that Gnus will look at the articles it saves for an
8770 @code{Archive-name} line and use that as a suggestion for the file
8771 name.
8772
8773 Here's an example function to clean up file names somewhat.  If you have
8774 lots of mail groups called things like
8775 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
8776 these group names before creating the file name to save to.  The
8777 following will do just that:
8778
8779 @lisp
8780 (defun my-save-name (group)
8781   (when (string-match "^nnml:mail." group)
8782     (substring group (match-end 0))))
8783
8784 (setq gnus-split-methods
8785       '((gnus-article-archive-name)
8786         (my-save-name)))
8787 @end lisp
8788
8789
8790 @vindex gnus-use-long-file-name
8791 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
8792 @code{nil}, all the preceding functions will replace all periods
8793 (@samp{.}) in the group names with slashes (@samp{/})---which means that
8794 the functions will generate hierarchies of directories instead of having
8795 all the files in the top level directory
8796 (@file{~/News/alt/andrea-dworkin} instead of
8797 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
8798 on most systems.  However, for historical reasons, this is @code{nil} on
8799 Xenix and usg-unix-v machines by default.
8800
8801 This function also affects kill and score file names.  If this variable
8802 is a list, and the list contains the element @code{not-score}, long file
8803 names will not be used for score files, if it contains the element
8804 @code{not-save}, long file names will not be used for saving, and if it
8805 contains the element @code{not-kill}, long file names will not be used
8806 for kill files.
8807
8808 If you'd like to save articles in a hierarchy that looks something like
8809 a spool, you could
8810
8811 @lisp
8812 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
8813 (setq gnus-default-article-saver
8814       'gnus-summary-save-in-file)          ; @r{no encoding}
8815 @end lisp
8816
8817 Then just save with @kbd{o}.  You'd then read this hierarchy with
8818 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
8819 the top level directory as the argument (@file{~/News/}).  Then just walk
8820 around to the groups/directories with @code{nneething}.
8821
8822
8823 @node Decoding Articles
8824 @section Decoding Articles
8825 @cindex decoding articles
8826
8827 Sometime users post articles (or series of articles) that have been
8828 encoded in some way or other.  Gnus can decode them for you.
8829
8830 @menu
8831 * Uuencoded Articles::          Uudecode articles.
8832 * Shell Archives::              Unshar articles.
8833 * PostScript Files::            Split PostScript.
8834 * Other Files::                 Plain save and binhex.
8835 * Decoding Variables::          Variables for a happy decoding.
8836 * Viewing Files::               You want to look at the result of the decoding?
8837 @end menu
8838
8839 @cindex series
8840 @cindex article series
8841 All these functions use the process/prefix convention
8842 (@pxref{Process/Prefix}) for finding out what articles to work on, with
8843 the extension that a ``single article'' means ``a single series''.  Gnus
8844 can find out by itself what articles belong to a series, decode all the
8845 articles and unpack/view/save the resulting file(s).
8846
8847 Gnus guesses what articles are in the series according to the following
8848 simplish rule: The subjects must be (nearly) identical, except for the
8849 last two numbers of the line.  (Spaces are largely ignored, however.)
8850
8851 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
8852 will find all the articles that match the regexp @samp{^cat.gif
8853 ([0-9]+/[0-9]+).*$}.
8854
8855 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
8856 series}, will not be properly recognized by any of the automatic viewing
8857 commands, and you have to mark the articles manually with @kbd{#}.
8858
8859
8860 @node Uuencoded Articles
8861 @subsection Uuencoded Articles
8862 @cindex uudecode
8863 @cindex uuencoded articles
8864
8865 @table @kbd
8866
8867 @item X u
8868 @kindex X u (Summary)
8869 @findex gnus-uu-decode-uu
8870 @c @icon{gnus-uu-decode-uu}
8871 Uudecodes the current series (@code{gnus-uu-decode-uu}).
8872
8873 @item X U
8874 @kindex X U (Summary)
8875 @findex gnus-uu-decode-uu-and-save
8876 Uudecodes and saves the current series
8877 (@code{gnus-uu-decode-uu-and-save}).
8878
8879 @item X v u
8880 @kindex X v u (Summary)
8881 @findex gnus-uu-decode-uu-view
8882 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
8883
8884 @item X v U
8885 @kindex X v U (Summary)
8886 @findex gnus-uu-decode-uu-and-save-view
8887 Uudecodes, views and saves the current series
8888 (@code{gnus-uu-decode-uu-and-save-view}).
8889
8890 @end table
8891
8892 Remember that these all react to the presence of articles marked with
8893 the process mark.  If, for instance, you'd like to decode and save an
8894 entire newsgroup, you'd typically do @kbd{M P a}
8895 (@code{gnus-uu-mark-all}) and then @kbd{X U}
8896 (@code{gnus-uu-decode-uu-and-save}).
8897
8898 All this is very much different from how @code{gnus-uu} worked with
8899 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
8900 the sun.  This version of @code{gnus-uu} generally assumes that you mark
8901 articles in some way (@pxref{Setting Process Marks}) and then press
8902 @kbd{X u}.
8903
8904 @vindex gnus-uu-notify-files
8905 Note: When trying to decode articles that have names matching
8906 @code{gnus-uu-notify-files}, which is hard-coded to
8907 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
8908 automatically post an article on @samp{comp.unix.wizards} saying that
8909 you have just viewed the file in question.  This feature can't be turned
8910 off.
8911
8912
8913 @node Shell Archives
8914 @subsection Shell Archives
8915 @cindex unshar
8916 @cindex shell archives
8917 @cindex shared articles
8918
8919 Shell archives (``shar files'') used to be a popular way to distribute
8920 sources, but it isn't used all that much today.  In any case, we have
8921 some commands to deal with these:
8922
8923 @table @kbd
8924
8925 @item X s
8926 @kindex X s (Summary)
8927 @findex gnus-uu-decode-unshar
8928 Unshars the current series (@code{gnus-uu-decode-unshar}).
8929
8930 @item X S
8931 @kindex X S (Summary)
8932 @findex gnus-uu-decode-unshar-and-save
8933 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
8934
8935 @item X v s
8936 @kindex X v s (Summary)
8937 @findex gnus-uu-decode-unshar-view
8938 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
8939
8940 @item X v S
8941 @kindex X v S (Summary)
8942 @findex gnus-uu-decode-unshar-and-save-view
8943 Unshars, views and saves the current series
8944 (@code{gnus-uu-decode-unshar-and-save-view}).
8945 @end table
8946
8947
8948 @node PostScript Files
8949 @subsection PostScript Files
8950 @cindex PostScript
8951
8952 @table @kbd
8953
8954 @item X p
8955 @kindex X p (Summary)
8956 @findex gnus-uu-decode-postscript
8957 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
8958
8959 @item X P
8960 @kindex X P (Summary)
8961 @findex gnus-uu-decode-postscript-and-save
8962 Unpack and save the current PostScript series
8963 (@code{gnus-uu-decode-postscript-and-save}).
8964
8965 @item X v p
8966 @kindex X v p (Summary)
8967 @findex gnus-uu-decode-postscript-view
8968 View the current PostScript series
8969 (@code{gnus-uu-decode-postscript-view}).
8970
8971 @item X v P
8972 @kindex X v P (Summary)
8973 @findex gnus-uu-decode-postscript-and-save-view
8974 View and save the current PostScript series
8975 (@code{gnus-uu-decode-postscript-and-save-view}).
8976 @end table
8977
8978
8979 @node Other Files
8980 @subsection Other Files
8981
8982 @table @kbd
8983 @item X o
8984 @kindex X o (Summary)
8985 @findex gnus-uu-decode-save
8986 Save the current series
8987 (@code{gnus-uu-decode-save}).
8988
8989 @item X b
8990 @kindex X b (Summary)
8991 @findex gnus-uu-decode-binhex
8992 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
8993 doesn't really work yet.
8994
8995 @item X Y
8996 @kindex X Y (Summary)
8997 @findex gnus-uu-decode-yenc
8998 yEnc-decode the current series and save it (@code{gnus-uu-decode-yenc}).
8999 @end table
9000
9001
9002 @node Decoding Variables
9003 @subsection Decoding Variables
9004
9005 Adjective, not verb.
9006
9007 @menu
9008 * Rule Variables::              Variables that say how a file is to be viewed.
9009 * Other Decode Variables::      Other decode variables.
9010 * Uuencoding and Posting::      Variables for customizing uuencoding.
9011 @end menu
9012
9013
9014 @node Rule Variables
9015 @subsubsection Rule Variables
9016 @cindex rule variables
9017
9018 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
9019 variables are of the form
9020
9021 @lisp
9022       (list '(regexp1 command2)
9023             '(regexp2 command2)
9024             ...)
9025 @end lisp
9026
9027 @table @code
9028
9029 @item gnus-uu-user-view-rules
9030 @vindex gnus-uu-user-view-rules
9031 @cindex sox
9032 This variable is consulted first when viewing files.  If you wish to use,
9033 for instance, @code{sox} to convert an @file{.au} sound file, you could
9034 say something like:
9035 @lisp
9036 (setq gnus-uu-user-view-rules
9037       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
9038 @end lisp
9039
9040 @item gnus-uu-user-view-rules-end
9041 @vindex gnus-uu-user-view-rules-end
9042 This variable is consulted if Gnus couldn't make any matches from the
9043 user and default view rules.
9044
9045 @item gnus-uu-user-archive-rules
9046 @vindex gnus-uu-user-archive-rules
9047 This variable can be used to say what commands should be used to unpack
9048 archives.
9049 @end table
9050
9051
9052 @node Other Decode Variables
9053 @subsubsection Other Decode Variables
9054
9055 @table @code
9056 @vindex gnus-uu-grabbed-file-functions
9057
9058 @item gnus-uu-grabbed-file-functions
9059 All functions in this list will be called right after each file has been
9060 successfully decoded---so that you can move or view files right away,
9061 and don't have to wait for all files to be decoded before you can do
9062 anything.  Ready-made functions you can put in this list are:
9063
9064 @table @code
9065
9066 @item gnus-uu-grab-view
9067 @findex gnus-uu-grab-view
9068 View the file.
9069
9070 @item gnus-uu-grab-move
9071 @findex gnus-uu-grab-move
9072 Move the file (if you're using a saving function.)
9073 @end table
9074
9075 @item gnus-uu-be-dangerous
9076 @vindex gnus-uu-be-dangerous
9077 Specifies what to do if unusual situations arise during decoding.  If
9078 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
9079 that didn't work, and overwrite existing files.  Otherwise, ask each
9080 time.
9081
9082 @item gnus-uu-ignore-files-by-name
9083 @vindex gnus-uu-ignore-files-by-name
9084 Files with name matching this regular expression won't be viewed.
9085
9086 @item gnus-uu-ignore-files-by-type
9087 @vindex gnus-uu-ignore-files-by-type
9088 Files with a @acronym{MIME} type matching this variable won't be viewed.
9089 Note that Gnus tries to guess what type the file is based on the name.
9090 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
9091 kludgey.
9092
9093 @item gnus-uu-tmp-dir
9094 @vindex gnus-uu-tmp-dir
9095 Where @code{gnus-uu} does its work.
9096
9097 @item gnus-uu-do-not-unpack-archives
9098 @vindex gnus-uu-do-not-unpack-archives
9099 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
9100 looking for files to display.
9101
9102 @item gnus-uu-view-and-save
9103 @vindex gnus-uu-view-and-save
9104 Non-@code{nil} means that the user will always be asked to save a file
9105 after viewing it.
9106
9107 @item gnus-uu-ignore-default-view-rules
9108 @vindex gnus-uu-ignore-default-view-rules
9109 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
9110 rules.
9111
9112 @item gnus-uu-ignore-default-archive-rules
9113 @vindex gnus-uu-ignore-default-archive-rules
9114 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
9115 unpacking commands.
9116
9117 @item gnus-uu-kill-carriage-return
9118 @vindex gnus-uu-kill-carriage-return
9119 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
9120 from articles.
9121
9122 @item gnus-uu-unmark-articles-not-decoded
9123 @vindex gnus-uu-unmark-articles-not-decoded
9124 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
9125 decoded articles as unread.
9126
9127 @item gnus-uu-correct-stripped-uucode
9128 @vindex gnus-uu-correct-stripped-uucode
9129 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
9130 uuencoded files that have had trailing spaces deleted.
9131
9132 @item gnus-uu-pre-uudecode-hook
9133 @vindex gnus-uu-pre-uudecode-hook
9134 Hook run before sending a message to @code{uudecode}.
9135
9136 @item gnus-uu-view-with-metamail
9137 @vindex gnus-uu-view-with-metamail
9138 @cindex metamail
9139 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
9140 commands defined by the rule variables and just fudge a @acronym{MIME}
9141 content type based on the file name.  The result will be fed to
9142 @code{metamail} for viewing.
9143
9144 @item gnus-uu-save-in-digest
9145 @vindex gnus-uu-save-in-digest
9146 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
9147 decoding, will save in digests.  If this variable is @code{nil},
9148 @code{gnus-uu} will just save everything in a file without any
9149 embellishments.  The digesting almost conforms to RFC 1153---no easy way
9150 to specify any meaningful volume and issue numbers were found, so I
9151 simply dropped them.
9152
9153 @end table
9154
9155
9156 @node Uuencoding and Posting
9157 @subsubsection Uuencoding and Posting
9158
9159 @table @code
9160
9161 @item gnus-uu-post-include-before-composing
9162 @vindex gnus-uu-post-include-before-composing
9163 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
9164 before you compose the article.  If this variable is @code{t}, you can
9165 either include an encoded file with @kbd{C-c C-i} or have one included
9166 for you when you post the article.
9167
9168 @item gnus-uu-post-length
9169 @vindex gnus-uu-post-length
9170 Maximum length of an article.  The encoded file will be split into how
9171 many articles it takes to post the entire file.
9172
9173 @item gnus-uu-post-threaded
9174 @vindex gnus-uu-post-threaded
9175 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
9176 thread.  This may not be smart, as no other decoder I have seen is able
9177 to follow threads when collecting uuencoded articles.  (Well, I have
9178 seen one package that does that---@code{gnus-uu}, but somehow, I don't
9179 think that counts@dots{}) Default is @code{nil}.
9180
9181 @item gnus-uu-post-separate-description
9182 @vindex gnus-uu-post-separate-description
9183 Non-@code{nil} means that the description will be posted in a separate
9184 article.  The first article will typically be numbered (0/x).  If this
9185 variable is @code{nil}, the description the user enters will be included
9186 at the beginning of the first article, which will be numbered (1/x).
9187 Default is @code{t}.
9188
9189 @end table
9190
9191
9192 @node Viewing Files
9193 @subsection Viewing Files
9194 @cindex viewing files
9195 @cindex pseudo-articles
9196
9197 After decoding, if the file is some sort of archive, Gnus will attempt
9198 to unpack the archive and see if any of the files in the archive can be
9199 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
9200 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
9201 uncompress and de-tar the main file, and then view the two pictures.
9202 This unpacking process is recursive, so if the archive contains archives
9203 of archives, it'll all be unpacked.
9204
9205 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
9206 extracted file into the summary buffer.  If you go to these
9207 ``articles'', you will be prompted for a command to run (usually Gnus
9208 will make a suggestion), and then the command will be run.
9209
9210 @vindex gnus-view-pseudo-asynchronously
9211 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
9212 until the viewing is done before proceeding.
9213
9214 @vindex gnus-view-pseudos
9215 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
9216 the pseudo-articles into the summary buffer, but view them
9217 immediately.  If this variable is @code{not-confirm}, the user won't even
9218 be asked for a confirmation before viewing is done.
9219
9220 @vindex gnus-view-pseudos-separately
9221 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
9222 pseudo-article will be created for each file to be viewed.  If
9223 @code{nil}, all files that use the same viewing command will be given as
9224 a list of parameters to that command.
9225
9226 @vindex gnus-insert-pseudo-articles
9227 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
9228 pseudo-articles when decoding.  It is @code{t} by default.
9229
9230 So; there you are, reading your @emph{pseudo-articles} in your
9231 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
9232 Why isn't anything real anymore? How did we get here?
9233
9234
9235 @node Article Treatment
9236 @section Article Treatment
9237
9238 Reading through this huge manual, you may have quite forgotten that the
9239 object of newsreaders is to actually, like, read what people have
9240 written.  Reading articles.  Unfortunately, people are quite bad at
9241 writing, so there are tons of functions and variables to make reading
9242 these articles easier.
9243
9244 @menu
9245 * Article Highlighting::        You want to make the article look like fruit salad.
9246 * Article Fontisizing::         Making emphasized text look nice.
9247 * Article Hiding::              You also want to make certain info go away.
9248 * Article Washing::             Lots of way-neat functions to make life better.
9249 * Article Header::              Doing various header transformations.
9250 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
9251 * Article Button Levels::       Controlling appearance of buttons.
9252 * Article Date::                Grumble, UT!
9253 * Article Display::             Display various stuff---X-Face, Picons, Smileys
9254 * Article Signature::           What is a signature?
9255 * Article Miscellanea::         Various other stuff.
9256 @end menu
9257
9258
9259 @node Article Highlighting
9260 @subsection Article Highlighting
9261 @cindex highlighting
9262
9263 Not only do you want your article buffer to look like fruit salad, but
9264 you want it to look like technicolor fruit salad.
9265
9266 @table @kbd
9267
9268 @item W H a
9269 @kindex W H a (Summary)
9270 @findex gnus-article-highlight
9271 @findex gnus-article-maybe-highlight
9272 Do much highlighting of the current article
9273 (@code{gnus-article-highlight}).  This function highlights header, cited
9274 text, the signature, and adds buttons to the body and the head.
9275
9276 @item W H h
9277 @kindex W H h (Summary)
9278 @findex gnus-article-highlight-headers
9279 @vindex gnus-header-face-alist
9280 Highlight the headers (@code{gnus-article-highlight-headers}).  The
9281 highlighting will be done according to the @code{gnus-header-face-alist}
9282 variable, which is a list where each element has the form
9283 @code{(@var{regexp} @var{name} @var{content})}.
9284 @var{regexp} is a regular expression for matching the
9285 header, @var{name} is the face used for highlighting the header name
9286 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
9287 the header value.  The first match made will be used.  Note that
9288 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
9289
9290 @item W H c
9291 @kindex W H c (Summary)
9292 @findex gnus-article-highlight-citation
9293 Highlight cited text (@code{gnus-article-highlight-citation}).
9294
9295 Some variables to customize the citation highlights:
9296
9297 @table @code
9298 @vindex gnus-cite-parse-max-size
9299
9300 @item gnus-cite-parse-max-size
9301 If the article size in bytes is bigger than this variable (which is
9302 25000 by default), no citation highlighting will be performed.
9303
9304 @item gnus-cite-max-prefix
9305 @vindex gnus-cite-max-prefix
9306 Maximum possible length for a citation prefix (default 20).
9307
9308 @item gnus-cite-face-list
9309 @vindex gnus-cite-face-list
9310 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
9311 When there are citations from multiple articles in the same message,
9312 Gnus will try to give each citation from each article its own face.
9313 This should make it easier to see who wrote what.
9314
9315 @item gnus-supercite-regexp
9316 @vindex gnus-supercite-regexp
9317 Regexp matching normal Supercite attribution lines.
9318
9319 @item gnus-supercite-secondary-regexp
9320 @vindex gnus-supercite-secondary-regexp
9321 Regexp matching mangled Supercite attribution lines.
9322
9323 @item gnus-cite-minimum-match-count
9324 @vindex gnus-cite-minimum-match-count
9325 Minimum number of identical prefixes we have to see before we believe
9326 that it's a citation.
9327
9328 @item gnus-cite-attribution-prefix
9329 @vindex gnus-cite-attribution-prefix
9330 Regexp matching the beginning of an attribution line.
9331
9332 @item gnus-cite-attribution-suffix
9333 @vindex gnus-cite-attribution-suffix
9334 Regexp matching the end of an attribution line.
9335
9336 @item gnus-cite-attribution-face
9337 @vindex gnus-cite-attribution-face
9338 Face used for attribution lines.  It is merged with the face for the
9339 cited text belonging to the attribution.
9340
9341 @item gnus-cite-ignore-quoted-from
9342 @vindex gnus-cite-ignore-quoted-from
9343 If non-@code{nil}, no citation highlighting will be performed on lines
9344 beginning with @samp{>From }.  Those lines may have been quoted by MTAs
9345 in order not to mix up with the envelope From line.  The default value
9346 is @code{t}.
9347
9348 @end table
9349
9350
9351 @item W H s
9352 @kindex W H s (Summary)
9353 @vindex gnus-signature-separator
9354 @vindex gnus-signature-face
9355 @findex gnus-article-highlight-signature
9356 Highlight the signature (@code{gnus-article-highlight-signature}).
9357 Everything after @code{gnus-signature-separator} (@pxref{Article
9358 Signature}) in an article will be considered a signature and will be
9359 highlighted with @code{gnus-signature-face}, which is @code{italic} by
9360 default.
9361
9362 @end table
9363
9364 @xref{Customizing Articles}, for how to highlight articles automatically.
9365
9366
9367 @node Article Fontisizing
9368 @subsection Article Fontisizing
9369 @cindex emphasis
9370 @cindex article emphasis
9371
9372 @findex gnus-article-emphasize
9373 @kindex W e (Summary)
9374 People commonly add emphasis to words in news articles by writing things
9375 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
9376 this look nicer by running the article through the @kbd{W e}
9377 (@code{gnus-article-emphasize}) command.
9378
9379 @vindex gnus-emphasis-alist
9380 How the emphasis is computed is controlled by the
9381 @code{gnus-emphasis-alist} variable.  This is an alist where the first
9382 element is a regular expression to be matched.  The second is a number
9383 that says what regular expression grouping is used to find the entire
9384 emphasized word.  The third is a number that says what regexp grouping
9385 should be displayed and highlighted.  (The text between these two
9386 groupings will be hidden.)  The fourth is the face used for
9387 highlighting.
9388
9389 @lisp
9390 (setq gnus-emphasis-alist
9391       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
9392         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
9393 @end lisp
9394
9395 @cindex slash
9396 @cindex asterisk
9397 @cindex underline
9398 @cindex /
9399 @cindex *
9400
9401 @vindex gnus-emphasis-underline
9402 @vindex gnus-emphasis-bold
9403 @vindex gnus-emphasis-italic
9404 @vindex gnus-emphasis-underline-bold
9405 @vindex gnus-emphasis-underline-italic
9406 @vindex gnus-emphasis-bold-italic
9407 @vindex gnus-emphasis-underline-bold-italic
9408 By default, there are seven rules, and they use the following faces:
9409 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
9410 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
9411 @code{gnus-emphasis-underline-italic},
9412 @code{gnus-emphasis-underline-bold}, and
9413 @code{gnus-emphasis-underline-bold-italic}.
9414
9415 If you want to change these faces, you can either use @kbd{M-x
9416 customize}, or you can use @code{copy-face}.  For instance, if you want
9417 to make @code{gnus-emphasis-italic} use a red face instead, you could
9418 say something like:
9419
9420 @lisp
9421 (copy-face 'red 'gnus-emphasis-italic)
9422 @end lisp
9423
9424 @vindex gnus-group-highlight-words-alist
9425
9426 If you want to highlight arbitrary words, you can use the
9427 @code{gnus-group-highlight-words-alist} variable, which uses the same
9428 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
9429 parameter (@pxref{Group Parameters}) can also be used.
9430
9431 @xref{Customizing Articles}, for how to fontize articles automatically.
9432
9433
9434 @node Article Hiding
9435 @subsection Article Hiding
9436 @cindex article hiding
9437
9438 Or rather, hiding certain things in each article.  There usually is much
9439 too much cruft in most articles.
9440
9441 @table @kbd
9442
9443 @item W W a
9444 @kindex W W a (Summary)
9445 @findex gnus-article-hide
9446 Do quite a lot of hiding on the article buffer
9447 (@kbd{gnus-article-hide}).  In particular, this function will hide
9448 headers, @acronym{PGP}, cited text and the signature.
9449
9450 @item W W h
9451 @kindex W W h (Summary)
9452 @findex gnus-article-hide-headers
9453 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
9454 Headers}.
9455
9456 @item W W b
9457 @kindex W W b (Summary)
9458 @findex gnus-article-hide-boring-headers
9459 Hide headers that aren't particularly interesting
9460 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
9461
9462 @item W W s
9463 @kindex W W s (Summary)
9464 @findex gnus-article-hide-signature
9465 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
9466 Signature}.
9467
9468 @item W W l
9469 @kindex W W l (Summary)
9470 @findex gnus-article-hide-list-identifiers
9471 @vindex gnus-list-identifiers
9472 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
9473 are strings some mailing list servers add to the beginning of all
9474 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
9475 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
9476 may not contain @code{\\(..\\)}.
9477
9478 @table @code
9479
9480 @item gnus-list-identifiers
9481 @vindex gnus-list-identifiers
9482 A regular expression that matches list identifiers to be removed from
9483 subject.  This can also be a list of regular expressions.
9484
9485 @end table
9486
9487 @item W W P
9488 @kindex W W P (Summary)
9489 @findex gnus-article-hide-pem
9490 Hide @acronym{PEM} (privacy enhanced messages) cruft
9491 (@code{gnus-article-hide-pem}).
9492
9493 @item W W B
9494 @kindex W W B (Summary)
9495 @findex gnus-article-strip-banner
9496 @vindex gnus-article-banner-alist
9497 @vindex gnus-article-address-banner-alist
9498 @cindex banner
9499 @cindex OneList
9500 @cindex stripping advertisements
9501 @cindex advertisements
9502 Strip the banner specified by the @code{banner} group parameter
9503 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
9504 annoying banners and/or signatures that some mailing lists and moderated
9505 groups adds to all the messages.  The way to use this function is to add
9506 the @code{banner} group parameter (@pxref{Group Parameters}) to the
9507 group you want banners stripped from.  The parameter either be a string,
9508 which will be interpreted as a regular expression matching text to be
9509 removed, or the symbol @code{signature}, meaning that the (last)
9510 signature should be removed, or other symbol, meaning that the
9511 corresponding regular expression in @code{gnus-article-banner-alist} is
9512 used.
9513
9514 Regardless of a group, you can hide things like advertisements only when
9515 the sender of an article has a certain mail address specified in
9516 @code{gnus-article-address-banner-alist}.
9517
9518 @table @code
9519
9520 @item gnus-article-address-banner-alist
9521 @vindex gnus-article-address-banner-alist
9522 Alist of mail addresses and banners.  Each element has the form
9523 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
9524 matching a mail address in the From header, @var{banner} is one of a
9525 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
9526 a regexp and @code{nil}.  If @var{address} matches author's mail
9527 address, it will remove things like advertisements.  For example, if a
9528 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
9529 banner something like @samp{Do You Yoo-hoo!?} in all articles he
9530 sends, you can use the following element to remove them:
9531
9532 @lisp
9533 ("@@yoo-hoo\\.co\\.jp\\'" .
9534  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
9535 @end lisp
9536
9537 @end table
9538
9539 @item W W c
9540 @kindex W W c (Summary)
9541 @findex gnus-article-hide-citation
9542 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
9543 customizing the hiding:
9544
9545 @table @code
9546
9547 @item gnus-cited-opened-text-button-line-format
9548 @itemx gnus-cited-closed-text-button-line-format
9549 @vindex gnus-cited-closed-text-button-line-format
9550 @vindex gnus-cited-opened-text-button-line-format
9551 Gnus adds buttons to show where the cited text has been hidden, and to
9552 allow toggle hiding the text.  The format of the variable is specified
9553 by these format-like variable (@pxref{Formatting Variables}).  These
9554 specs are valid:
9555
9556 @table @samp
9557 @item b
9558 Starting point of the hidden text.
9559 @item e
9560 Ending point of the hidden text.
9561 @item l
9562 Number of characters in the hidden region.
9563 @item n
9564 Number of lines of hidden text.
9565 @end table
9566
9567 @item gnus-cited-lines-visible
9568 @vindex gnus-cited-lines-visible
9569 The number of lines at the beginning of the cited text to leave
9570 shown.  This can also be a cons cell with the number of lines at the top
9571 and bottom of the text, respectively, to remain visible.
9572
9573 @end table
9574
9575 @item W W C-c
9576 @kindex W W C-c (Summary)
9577 @findex gnus-article-hide-citation-maybe
9578
9579 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
9580 following two variables:
9581
9582 @table @code
9583 @item gnus-cite-hide-percentage
9584 @vindex gnus-cite-hide-percentage
9585 If the cited text is of a bigger percentage than this variable (default
9586 50), hide the cited text.
9587
9588 @item gnus-cite-hide-absolute
9589 @vindex gnus-cite-hide-absolute
9590 The cited text must have at least this length (default 10) before it
9591 is hidden.
9592 @end table
9593
9594 @item W W C
9595 @kindex W W C (Summary)
9596 @findex gnus-article-hide-citation-in-followups
9597 Hide cited text in articles that aren't roots
9598 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
9599 useful as an interactive command, but might be a handy function to stick
9600 have happen automatically (@pxref{Customizing Articles}).
9601
9602 @end table
9603
9604 All these ``hiding'' commands are toggles, but if you give a negative
9605 prefix to these commands, they will show what they have previously
9606 hidden.  If you give a positive prefix, they will always hide.
9607
9608 Also @pxref{Article Highlighting} for further variables for
9609 citation customization.
9610
9611 @xref{Customizing Articles}, for how to hide article elements
9612 automatically.
9613
9614
9615 @node Article Washing
9616 @subsection Article Washing
9617 @cindex washing
9618 @cindex article washing
9619
9620 We call this ``article washing'' for a really good reason.  Namely, the
9621 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
9622
9623 @dfn{Washing} is defined by us as ``changing something from something to
9624 something else'', but normally results in something looking better.
9625 Cleaner, perhaps.
9626
9627 @xref{Customizing Articles}, if you want to change how Gnus displays
9628 articles by default.
9629
9630 @table @kbd
9631
9632 @item C-u g
9633 This is not really washing, it's sort of the opposite of washing.  If
9634 you type this, you see the article exactly as it exists on disk or on
9635 the server.
9636
9637 @item g
9638 Force redisplaying of the current article
9639 (@code{gnus-summary-show-article}).  This is also not really washing.
9640 If you type this, you see the article without any previously applied
9641 interactive Washing functions but with all default treatments
9642 (@pxref{Customizing Articles}).
9643
9644 @item W l
9645 @kindex W l (Summary)
9646 @findex gnus-summary-stop-page-breaking
9647 Remove page breaks from the current article
9648 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
9649 delimiters.
9650
9651 @item W r
9652 @kindex W r (Summary)
9653 @findex gnus-summary-caesar-message
9654 @c @icon{gnus-summary-caesar-message}
9655 Do a Caesar rotate (rot13) on the article buffer
9656 (@code{gnus-summary-caesar-message}).
9657 Unreadable articles that tell you to read them with Caesar rotate or rot13.
9658 (Typically offensive jokes and such.)
9659
9660 It's commonly called ``rot13'' because each letter is rotated 13
9661 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
9662 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
9663 is rumored to have employed this form of, uh, somewhat weak encryption.
9664
9665 @item W m
9666 @kindex W m (Summary)
9667 @findex gnus-summary-morse-message
9668 Morse decode the article buffer (@code{gnus-summary-morse-message}).
9669
9670 @item W i
9671 @kindex W i (Summary)
9672 @findex gnus-summary-idna-message
9673 Decode IDNA encoded domain names in the current articles.  IDNA
9674 encoded domain names looks like @samp{xn--bar}.  If a string remain
9675 unencoded after running invoking this, it is likely an invalid IDNA
9676 string (@samp{xn--bar} is invalid).  You must have GNU Libidn
9677 (@url{http://www.gnu.org/software/libidn/}) installed for this command
9678 to work.
9679
9680 @item W t
9681 @item t
9682 @kindex W t (Summary)
9683 @kindex t (Summary)
9684 @findex gnus-summary-toggle-header
9685 Toggle whether to display all headers in the article buffer
9686 (@code{gnus-summary-toggle-header}).
9687
9688 @item W v
9689 @kindex W v (Summary)
9690 @findex gnus-summary-verbose-headers
9691 Toggle whether to display all headers in the article buffer permanently
9692 (@code{gnus-summary-verbose-headers}).
9693
9694 @item W o
9695 @kindex W o (Summary)
9696 @findex gnus-article-treat-overstrike
9697 Treat overstrike (@code{gnus-article-treat-overstrike}).
9698
9699 @item W d
9700 @kindex W d (Summary)
9701 @findex gnus-article-treat-dumbquotes
9702 @vindex gnus-article-dumbquotes-map
9703 @cindex Smartquotes
9704 @cindex M****s*** sm*rtq**t*s
9705 @cindex Latin 1
9706 Treat M****s*** sm*rtq**t*s according to
9707 @code{gnus-article-dumbquotes-map}
9708 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
9709 whether a character is a sm*rtq**t* or not, so it should only be used
9710 interactively.
9711
9712 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
9713 an attempt to provide more quoting characters.  If you see something
9714 like @code{\222} or @code{\264} where you're expecting some kind of
9715 apostrophe or quotation mark, then try this wash.
9716
9717 @item W Y f
9718 @kindex W Y f (Summary)
9719 @findex gnus-article-outlook-deuglify-article
9720 @cindex Outlook Express
9721 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
9722 unwrap lines, repair attribution and rearrange citation.
9723 (@code{gnus-article-outlook-deuglify-article}).
9724
9725 @item W Y u
9726 @kindex W Y u (Summary)
9727 @findex gnus-article-outlook-unwrap-lines
9728 @vindex gnus-outlook-deuglify-unwrap-min
9729 @vindex gnus-outlook-deuglify-unwrap-max
9730 Unwrap lines that appear to be wrapped citation lines.  You can control
9731 what lines will be unwrapped by frobbing
9732 @code{gnus-outlook-deuglify-unwrap-min} and
9733 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
9734 maximum length of an unwrapped citation line.
9735 (@code{gnus-article-outlook-unwrap-lines}).
9736
9737 @item W Y a
9738 @kindex W Y a (Summary)
9739 @findex gnus-article-outlook-repair-attribution
9740 Repair a broken attribution line.@*
9741 (@code{gnus-article-outlook-repair-attribution}).
9742
9743 @item W Y c
9744 @kindex W Y c (Summary)
9745 @findex gnus-article-outlook-rearrange-citation
9746 Repair broken citations by rearranging the text.
9747 (@code{gnus-article-outlook-rearrange-citation}).
9748
9749 @item W w
9750 @kindex W w (Summary)
9751 @findex gnus-article-fill-cited-article
9752 Do word wrap (@code{gnus-article-fill-cited-article}).
9753
9754 You can give the command a numerical prefix to specify the width to use
9755 when filling.
9756
9757 @item W Q
9758 @kindex W Q (Summary)
9759 @findex gnus-article-fill-long-lines
9760 Fill long lines (@code{gnus-article-fill-long-lines}).
9761
9762 @item W C
9763 @kindex W C (Summary)
9764 @findex gnus-article-capitalize-sentences
9765 Capitalize the first word in each sentence
9766 (@code{gnus-article-capitalize-sentences}).
9767
9768 @item W c
9769 @kindex W c (Summary)
9770 @findex gnus-article-remove-cr
9771 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
9772 (this takes care of DOS line endings), and then translate any remaining
9773 CRs into LF (this takes care of Mac line endings)
9774 (@code{gnus-article-remove-cr}).
9775
9776 @item W q
9777 @kindex W q (Summary)
9778 @findex gnus-article-de-quoted-unreadable
9779 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
9780 Quoted-Printable is one common @acronym{MIME} encoding employed when
9781 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
9782 makes strings like @samp{d@'ej@`a vu} look like @samp{d=E9j=E0 vu},
9783 which doesn't look very readable to me.  Note that this is usually
9784 done automatically by Gnus if the message in question has a
9785 @code{Content-Transfer-Encoding} header that says that this encoding
9786 has been done.  If a prefix is given, a charset will be asked for.
9787
9788 @item W 6
9789 @kindex W 6 (Summary)
9790 @findex gnus-article-de-base64-unreadable
9791 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
9792 one common @acronym{MIME} encoding employed when sending
9793 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
9794 usually done automatically by Gnus if the message in question has a
9795 @code{Content-Transfer-Encoding} header that says that this encoding
9796 has been done.  If a prefix is given, a charset will be asked for.
9797
9798 @item W Z
9799 @kindex W Z (Summary)
9800 @findex gnus-article-decode-HZ
9801 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
9802 common encoding employed when sending Chinese articles.  It typically
9803 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
9804
9805 @item W A
9806 @kindex W A (Summary)
9807 @findex gnus-article-treat-ansi-sequences
9808 @cindex @acronym{ANSI} control sequences
9809 Translate @acronym{ANSI} SGR control sequences into overlays or
9810 extents (@code{gnus-article-treat-ansi-sequences}).  @acronym{ANSI}
9811 sequences are used in some Chinese hierarchies for highlighting.
9812
9813 @item W u
9814 @kindex W u (Summary)
9815 @findex gnus-article-unsplit-urls
9816 Remove newlines from within URLs.  Some mailers insert newlines into
9817 outgoing email messages to keep lines short.  This reformatting can
9818 split long URLs onto multiple lines.  Repair those URLs by removing
9819 the newlines (@code{gnus-article-unsplit-urls}).
9820
9821 @item W h
9822 @kindex W h (Summary)
9823 @findex gnus-article-wash-html
9824 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
9825 usually done automatically by Gnus if the message in question has a
9826 @code{Content-Type} header that says that the message is @acronym{HTML}.
9827
9828 If a prefix is given, a charset will be asked for.  If it is a number,
9829 the charset defined in @code{gnus-summary-show-article-charset-alist}
9830 (@pxref{Paging the Article}) will be used.
9831
9832 @vindex gnus-article-wash-function
9833 The default is to use the function specified by
9834 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
9835 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
9836 @acronym{HTML}, but this is controlled by the
9837 @code{gnus-article-wash-function} variable.  Pre-defined functions you
9838 can use include:
9839
9840 @table @code
9841 @item gnus-article-html
9842 Use Gnus rendered based on w3m.
9843
9844 @item w3
9845 Use Emacs/W3.
9846
9847 @item w3m
9848 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
9849
9850 @item w3m-standalone
9851 Use @uref{http://w3m.sourceforge.net/, w3m}.
9852
9853 @item links
9854 Use @uref{http://links.sf.net/, Links}.
9855
9856 @item lynx
9857 Use @uref{http://lynx.isc.org/, Lynx}.
9858
9859 @item html2text
9860 Use html2text---a simple @acronym{HTML} converter included with Gnus.
9861
9862 @end table
9863
9864 @item W b
9865 @kindex W b (Summary)
9866 @findex gnus-article-add-buttons
9867 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
9868 @xref{Article Buttons}.
9869
9870 @item W B
9871 @kindex W B (Summary)
9872 @findex gnus-article-add-buttons-to-head
9873 Add clickable buttons to the article headers
9874 (@code{gnus-article-add-buttons-to-head}).
9875
9876 @item W p
9877 @kindex W p (Summary)
9878 @findex gnus-article-verify-x-pgp-sig
9879 Verify a signed control message
9880 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
9881 @code{newgroup} and @code{checkgroups} are usually signed by the
9882 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
9883 the maintainer to your keyring to verify the
9884 message.@footnote{@acronym{PGP} keys for many hierarchies are
9885 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
9886
9887 @item W s
9888 @kindex W s (Summary)
9889 @findex gnus-summary-force-verify-and-decrypt
9890 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
9891 @acronym{S/MIME}) message
9892 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
9893
9894 @item W a
9895 @kindex W a (Summary)
9896 @findex gnus-article-strip-headers-in-body
9897 Strip headers like the @code{X-No-Archive} header from the beginning of
9898 article bodies (@code{gnus-article-strip-headers-in-body}).
9899
9900 @item W E l
9901 @kindex W E l (Summary)
9902 @findex gnus-article-strip-leading-blank-lines
9903 Remove all blank lines from the beginning of the article
9904 (@code{gnus-article-strip-leading-blank-lines}).
9905
9906 @item W E m
9907 @kindex W E m (Summary)
9908 @findex gnus-article-strip-multiple-blank-lines
9909 Replace all blank lines with empty lines and then all multiple empty
9910 lines with a single empty line.
9911 (@code{gnus-article-strip-multiple-blank-lines}).
9912
9913 @item W E t
9914 @kindex W E t (Summary)
9915 @findex gnus-article-remove-trailing-blank-lines
9916 Remove all blank lines at the end of the article
9917 (@code{gnus-article-remove-trailing-blank-lines}).
9918
9919 @item W E a
9920 @kindex W E a (Summary)
9921 @findex gnus-article-strip-blank-lines
9922 Do all the three commands above
9923 (@code{gnus-article-strip-blank-lines}).
9924
9925 @item W E A
9926 @kindex W E A (Summary)
9927 @findex gnus-article-strip-all-blank-lines
9928 Remove all blank lines
9929 (@code{gnus-article-strip-all-blank-lines}).
9930
9931 @item W E s
9932 @kindex W E s (Summary)
9933 @findex gnus-article-strip-leading-space
9934 Remove all white space from the beginning of all lines of the article
9935 body (@code{gnus-article-strip-leading-space}).
9936
9937 @item W E e
9938 @kindex W E e (Summary)
9939 @findex gnus-article-strip-trailing-space
9940 Remove all white space from the end of all lines of the article
9941 body (@code{gnus-article-strip-trailing-space}).
9942
9943 @end table
9944
9945 @xref{Customizing Articles}, for how to wash articles automatically.
9946
9947
9948 @node Article Header
9949 @subsection Article Header
9950
9951 These commands perform various transformations of article header.
9952
9953 @table @kbd
9954
9955 @item W G u
9956 @kindex W G u (Summary)
9957 @findex gnus-article-treat-unfold-headers
9958 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
9959
9960 @item W G n
9961 @kindex W G n (Summary)
9962 @findex gnus-article-treat-fold-newsgroups
9963 Fold the @code{Newsgroups} and @code{Followup-To} headers
9964 (@code{gnus-article-treat-fold-newsgroups}).
9965
9966 @item W G f
9967 @kindex W G f (Summary)
9968 @findex gnus-article-treat-fold-headers
9969 Fold all the message headers
9970 (@code{gnus-article-treat-fold-headers}).
9971
9972 @item W E w
9973 @kindex W E w (Summary)
9974 @findex gnus-article-remove-leading-whitespace
9975 Remove excessive whitespace from all headers
9976 (@code{gnus-article-remove-leading-whitespace}).
9977
9978 @end table
9979
9980
9981 @node Article Buttons
9982 @subsection Article Buttons
9983 @cindex buttons
9984
9985 People often include references to other stuff in articles, and it would
9986 be nice if Gnus could just fetch whatever it is that people talk about
9987 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
9988 button on these references.
9989
9990 @vindex gnus-button-man-handler
9991 Gnus adds @dfn{buttons} to certain standard references by default:
9992 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
9993 Emacs or Gnus related references.  This is controlled by two variables,
9994 one that handles article bodies and one that handles article heads:
9995
9996 @table @code
9997
9998 @item gnus-button-alist
9999 @vindex gnus-button-alist
10000 This is an alist where each entry has this form:
10001
10002 @lisp
10003 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
10004 @end lisp
10005
10006 @table @var
10007
10008 @item regexp
10009 All text that match this regular expression (case insensitive) will be
10010 considered an external reference.  Here's a typical regexp that matches
10011 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
10012 variable containing a regexp, useful variables to use include
10013 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
10014
10015 @item button-par
10016 Gnus has to know which parts of the matches is to be highlighted.  This
10017 is a number that says what sub-expression of the regexp is to be
10018 highlighted.  If you want it all highlighted, you use 0 here.
10019
10020 @item use-p
10021 This form will be @code{eval}ed, and if the result is non-@code{nil},
10022 this is considered a match.  This is useful if you want extra sifting to
10023 avoid false matches.  Often variables named
10024 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
10025 Levels}, but any other form may be used too.
10026
10027 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
10028
10029 @item function
10030 This function will be called when you click on this button.
10031
10032 @item data-par
10033 As with @var{button-par}, this is a sub-expression number, but this one
10034 says which part of the match is to be sent as data to @var{function}.
10035
10036 @end table
10037
10038 So the full entry for buttonizing URLs is then
10039
10040 @lisp
10041 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
10042 @end lisp
10043
10044 @item gnus-header-button-alist
10045 @vindex gnus-header-button-alist
10046 This is just like the other alist, except that it is applied to the
10047 article head only, and that each entry has an additional element that is
10048 used to say what headers to apply the buttonize coding to:
10049
10050 @lisp
10051 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
10052 @end lisp
10053
10054 @var{header} is a regular expression.
10055 @end table
10056
10057 @subsubsection Related variables and functions
10058
10059 @table @code
10060 @item gnus-button-@var{*}-level
10061 @xref{Article Button Levels}.
10062
10063 @c Stuff related to gnus-button-browse-level
10064
10065 @item gnus-button-url-regexp
10066 @vindex gnus-button-url-regexp
10067 A regular expression that matches embedded URLs.  It is used in the
10068 default values of the variables above.
10069
10070 @c Stuff related to gnus-button-man-level
10071
10072 @item gnus-button-man-handler
10073 @vindex gnus-button-man-handler
10074 The function to use for displaying man pages.  It must take at least one
10075 argument with a string naming the man page.
10076
10077 @c Stuff related to gnus-button-message-level
10078
10079 @item gnus-button-mid-or-mail-regexp
10080 @vindex gnus-button-mid-or-mail-regexp
10081 Regular expression that matches a message ID or a mail address.
10082
10083 @item gnus-button-prefer-mid-or-mail
10084 @vindex gnus-button-prefer-mid-or-mail
10085 This variable determines what to do when the button on a string as
10086 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
10087 message ID or a mail address.  If it is one of the symbols @code{mid} or
10088 @code{mail}, Gnus will always assume that the string is a message ID or
10089 a mail address, respectively.  If this variable is set to the symbol
10090 @code{ask}, always query the user what to do.  If it is a function, this
10091 function will be called with the string as its only argument.  The
10092 function must return @code{mid}, @code{mail}, @code{invalid} or
10093 @code{ask}.  The default value is the function
10094 @code{gnus-button-mid-or-mail-heuristic}.
10095
10096 @item gnus-button-mid-or-mail-heuristic
10097 @findex gnus-button-mid-or-mail-heuristic
10098 Function that guesses whether its argument is a message ID or a mail
10099 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
10100 it's a mail address, @code{ask} if unsure and @code{invalid} if the
10101 string is invalid.
10102
10103 @item gnus-button-mid-or-mail-heuristic-alist
10104 @vindex gnus-button-mid-or-mail-heuristic-alist
10105 An alist of @code{(RATE . REGEXP)} pairs used by the function
10106 @code{gnus-button-mid-or-mail-heuristic}.
10107
10108 @c Stuff related to gnus-button-tex-level
10109
10110 @item gnus-button-ctan-handler
10111 @findex gnus-button-ctan-handler
10112 The function to use for displaying CTAN links.  It must take one
10113 argument, the string naming the URL.
10114
10115 @item gnus-ctan-url
10116 @vindex gnus-ctan-url
10117 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
10118 by @code{gnus-button-ctan-handler}.
10119
10120 @c Misc stuff
10121
10122 @item gnus-article-button-face
10123 @vindex gnus-article-button-face
10124 Face used on buttons.
10125
10126 @item gnus-article-mouse-face
10127 @vindex gnus-article-mouse-face
10128 Face used when the mouse cursor is over a button.
10129
10130 @end table
10131
10132 @xref{Customizing Articles}, for how to buttonize articles automatically.
10133
10134
10135 @node Article Button Levels
10136 @subsection Article button levels
10137 @cindex button levels
10138 The higher the value of the variables @code{gnus-button-@var{*}-level},
10139 the more buttons will appear.  If the level is zero, no corresponding
10140 buttons are displayed.  With the default value (which is 5) you should
10141 already see quite a lot of buttons.  With higher levels, you will see
10142 more buttons, but you may also get more false positives.  To avoid them,
10143 you can set the variables @code{gnus-button-@var{*}-level} local to
10144 specific groups (@pxref{Group Parameters}).  Here's an example for the
10145 variable @code{gnus-parameters}:
10146
10147 @lisp
10148 ;; @r{increase @code{gnus-button-*-level} in some groups:}
10149 (setq gnus-parameters
10150       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
10151         ("\\<unix\\>"               (gnus-button-man-level 10))
10152         ("\\<tex\\>"                (gnus-button-tex-level 10))))
10153 @end lisp
10154
10155 @table @code
10156
10157 @item gnus-button-browse-level
10158 @vindex gnus-button-browse-level
10159 Controls the display of references to message IDs, mail addresses and
10160 news URLs.  Related variables and functions include
10161 @code{gnus-button-url-regexp}, @code{browse-url}, and
10162 @code{browse-url-browser-function}.
10163
10164 @item gnus-button-emacs-level
10165 @vindex gnus-button-emacs-level
10166 Controls the display of Emacs or Gnus references.  Related functions are
10167 @code{gnus-button-handle-custom},
10168 @code{gnus-button-handle-describe-function},
10169 @code{gnus-button-handle-describe-variable},
10170 @code{gnus-button-handle-symbol},
10171 @code{gnus-button-handle-describe-key},
10172 @code{gnus-button-handle-apropos},
10173 @code{gnus-button-handle-apropos-command},
10174 @code{gnus-button-handle-apropos-variable},
10175 @code{gnus-button-handle-apropos-documentation}, and
10176 @code{gnus-button-handle-library}.
10177
10178 @item gnus-button-man-level
10179 @vindex gnus-button-man-level
10180 Controls the display of references to (Unix) man pages.
10181 See @code{gnus-button-man-handler}.
10182
10183 @item gnus-button-message-level
10184 @vindex gnus-button-message-level
10185 Controls the display of message IDs, mail addresses and news URLs.
10186 Related variables and functions include
10187 @code{gnus-button-mid-or-mail-regexp},
10188 @code{gnus-button-prefer-mid-or-mail},
10189 @code{gnus-button-mid-or-mail-heuristic}, and
10190 @code{gnus-button-mid-or-mail-heuristic-alist}.
10191
10192 @item gnus-button-tex-level
10193 @vindex gnus-button-tex-level
10194 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
10195 URLs.  See the variables @code{gnus-ctan-url},
10196 @code{gnus-button-ctan-handler},
10197 @code{gnus-button-ctan-directory-regexp}, and
10198 @code{gnus-button-handle-ctan-bogus-regexp}.
10199
10200 @end table
10201
10202
10203 @node Article Date
10204 @subsection Article Date
10205
10206 The date is most likely generated in some obscure timezone you've never
10207 heard of, so it's quite nice to be able to find out what the time was
10208 when the article was sent.
10209
10210 @table @kbd
10211
10212 @item W T u
10213 @kindex W T u (Summary)
10214 @findex gnus-article-date-ut
10215 Display the date in UT (aka. GMT, aka ZULU)
10216 (@code{gnus-article-date-ut}).
10217
10218 @item W T i
10219 @kindex W T i (Summary)
10220 @findex gnus-article-date-iso8601
10221 @cindex ISO 8601
10222 Display the date in international format, aka. ISO 8601
10223 (@code{gnus-article-date-iso8601}).
10224
10225 @item W T l
10226 @kindex W T l (Summary)
10227 @findex gnus-article-date-local
10228 Display the date in the local timezone (@code{gnus-article-date-local}).
10229
10230 @item W T p
10231 @kindex W T p (Summary)
10232 @findex gnus-article-date-english
10233 Display the date in a format that's easily pronounceable in English
10234 (@code{gnus-article-date-english}).
10235
10236 @item W T s
10237 @kindex W T s (Summary)
10238 @vindex gnus-article-time-format
10239 @findex gnus-article-date-user
10240 @findex format-time-string
10241 Display the date using a user-defined format
10242 (@code{gnus-article-date-user}).  The format is specified by the
10243 @code{gnus-article-time-format} variable, and is a string that's passed
10244 to @code{format-time-string}.  See the documentation of that variable
10245 for a list of possible format specs.
10246
10247 @item W T e
10248 @kindex W T e (Summary)
10249 @findex gnus-article-date-lapsed
10250 @findex gnus-start-date-timer
10251 @findex gnus-stop-date-timer
10252 Say how much time has elapsed between the article was posted and now
10253 (@code{gnus-article-date-lapsed}).  It looks something like:
10254
10255 @example
10256 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
10257 @end example
10258
10259 @vindex gnus-article-date-lapsed-new-header
10260 The value of @code{gnus-article-date-lapsed-new-header} determines
10261 whether this header will just be added below the old Date one, or will
10262 replace it.
10263
10264 An advantage of using Gnus to read mail is that it converts simple bugs
10265 into wonderful absurdities.
10266
10267 If you want to have this line updated continually, you can put
10268
10269 @lisp
10270 (gnus-start-date-timer)
10271 @end lisp
10272
10273 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
10274 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
10275 command.
10276
10277 @item W T o
10278 @kindex W T o (Summary)
10279 @findex gnus-article-date-original
10280 Display the original date (@code{gnus-article-date-original}).  This can
10281 be useful if you normally use some other conversion function and are
10282 worried that it might be doing something totally wrong.  Say, claiming
10283 that the article was posted in 1854.  Although something like that is
10284 @emph{totally} impossible.  Don't you trust me? *titter*
10285
10286 @end table
10287
10288 @xref{Customizing Articles}, for how to display the date in your
10289 preferred format automatically.
10290
10291
10292 @node Article Display
10293 @subsection Article Display
10294 @cindex picons
10295 @cindex x-face
10296 @cindex smileys
10297
10298 These commands add various frivolous display gimmicks to the article
10299 buffer in Emacs versions that support them.
10300
10301 @code{X-Face} headers are small black-and-white images supplied by the
10302 message headers (@pxref{X-Face}).
10303
10304 @code{Face} headers are small colored images supplied by the message
10305 headers (@pxref{Face}).
10306
10307 Smileys are those little @samp{:-)} symbols that people like to litter
10308 their messages with (@pxref{Smileys}).
10309
10310 Picons, on the other hand, reside on your own system, and Gnus will
10311 try to match the headers to what you have (@pxref{Picons}).
10312
10313 All these functions are toggles---if the elements already exist,
10314 they'll be removed.
10315
10316 @table @kbd
10317 @item W D x
10318 @kindex W D x (Summary)
10319 @findex gnus-article-display-x-face
10320 Display an @code{X-Face} in the @code{From} header.
10321 (@code{gnus-article-display-x-face}).
10322
10323 @item W D d
10324 @kindex W D d (Summary)
10325 @findex gnus-article-display-face
10326 Display a @code{Face} in the @code{From} header.
10327 (@code{gnus-article-display-face}).
10328
10329 @item W D s
10330 @kindex W D s (Summary)
10331 @findex gnus-treat-smiley
10332 Display smileys (@code{gnus-treat-smiley}).
10333
10334 @item W D f
10335 @kindex W D f (Summary)
10336 @findex gnus-treat-from-picon
10337 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
10338
10339 @item W D m
10340 @kindex W D m (Summary)
10341 @findex gnus-treat-mail-picon
10342 Piconify all mail headers (i. e., @code{Cc}, @code{To})
10343 (@code{gnus-treat-mail-picon}).
10344
10345 @item W D n
10346 @kindex W D n (Summary)
10347 @findex gnus-treat-newsgroups-picon
10348 Piconify all news headers (i. e., @code{Newsgroups} and
10349 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
10350
10351 @item W D D
10352 @kindex W D D (Summary)
10353 @findex gnus-article-remove-images
10354 Remove all images from the article buffer
10355 (@code{gnus-article-remove-images}).
10356
10357 @item W D W
10358 @kindex W D W (Summary)
10359 @findex gnus-html-show-images
10360 If you're reading an @acronym{HTML} article rendered with
10361 @code{gnus-article-html}, then you can insert any blocked images in
10362 the buffer with this command.
10363 (@code{gnus-html-show-images}).
10364
10365 @end table
10366
10367
10368
10369 @node Article Signature
10370 @subsection Article Signature
10371 @cindex signatures
10372 @cindex article signature
10373
10374 @vindex gnus-signature-separator
10375 Each article is divided into two parts---the head and the body.  The
10376 body can be divided into a signature part and a text part.  The variable
10377 that says what is to be considered a signature is
10378 @code{gnus-signature-separator}.  This is normally the standard
10379 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
10380 non-standard signature separators, so this variable can also be a list
10381 of regular expressions to be tested, one by one.  (Searches are done
10382 from the end of the body towards the beginning.)  One likely value is:
10383
10384 @lisp
10385 (setq gnus-signature-separator
10386       '("^-- $"         ; @r{The standard}
10387         "^-- *$"        ; @r{A common mangling}
10388         "^-------*$"    ; @r{Many people just use a looong}
10389                         ; @r{line of dashes.  Shame!}
10390         "^ *--------*$" ; @r{Double-shame!}
10391         "^________*$"   ; @r{Underscores are also popular}
10392         "^========*$")) ; @r{Pervert!}
10393 @end lisp
10394
10395 The more permissive you are, the more likely it is that you'll get false
10396 positives.
10397
10398 @vindex gnus-signature-limit
10399 @code{gnus-signature-limit} provides a limit to what is considered a
10400 signature when displaying articles.
10401
10402 @enumerate
10403 @item
10404 If it is an integer, no signature may be longer (in characters) than
10405 that integer.
10406 @item
10407 If it is a floating point number, no signature may be longer (in lines)
10408 than that number.
10409 @item
10410 If it is a function, the function will be called without any parameters,
10411 and if it returns @code{nil}, there is no signature in the buffer.
10412 @item
10413 If it is a string, it will be used as a regexp.  If it matches, the text
10414 in question is not a signature.
10415 @end enumerate
10416
10417 This variable can also be a list where the elements may be of the types
10418 listed above.  Here's an example:
10419
10420 @lisp
10421 (setq gnus-signature-limit
10422       '(200.0 "^---*Forwarded article"))
10423 @end lisp
10424
10425 This means that if there are more than 200 lines after the signature
10426 separator, or the text after the signature separator is matched by
10427 the regular expression @samp{^---*Forwarded article}, then it isn't a
10428 signature after all.
10429
10430
10431 @node Article Miscellanea
10432 @subsection Article Miscellanea
10433
10434 @table @kbd
10435 @item A t
10436 @kindex A t (Summary)
10437 @findex gnus-article-babel
10438 Translate the article from one language to another
10439 (@code{gnus-article-babel}).
10440
10441 @end table
10442
10443
10444 @node MIME Commands
10445 @section MIME Commands
10446 @cindex MIME decoding
10447 @cindex attachments
10448 @cindex viewing attachments
10449
10450 The following commands all understand the numerical prefix.  For
10451 instance, @kbd{3 K v} means ``view the third @acronym{MIME} part''.
10452
10453 @table @kbd
10454 @item b
10455 @itemx K v
10456 @kindex b (Summary)
10457 @kindex K v (Summary)
10458 View the @acronym{MIME} part.
10459
10460 @item K o
10461 @kindex K o (Summary)
10462 Save the @acronym{MIME} part.
10463
10464 @item K O
10465 @kindex K O (Summary)
10466 Prompt for a file name, then save the @acronym{MIME} part and strip it
10467 from the article.  The stripped @acronym{MIME} object will be referred
10468 via the message/external-body @acronym{MIME} type.
10469
10470 @item K r
10471 @kindex K r (Summary)
10472 Replace the @acronym{MIME} part with an external body.
10473
10474 @item K d
10475 @kindex K d (Summary)
10476 Delete the @acronym{MIME} part and add some information about the
10477 removed part.
10478
10479 @item K c
10480 @kindex K c (Summary)
10481 Copy the @acronym{MIME} part.
10482
10483 @item K e
10484 @kindex K e (Summary)
10485 View the @acronym{MIME} part externally.
10486
10487 @item K i
10488 @kindex K i (Summary)
10489 View the @acronym{MIME} part internally.
10490
10491 @item K |
10492 @kindex K | (Summary)
10493 Pipe the @acronym{MIME} part to an external command.
10494 @end table
10495
10496 The rest of these @acronym{MIME} commands do not use the numerical prefix in
10497 the same manner:
10498
10499 @table @kbd
10500 @item K H
10501 @kindex K H (Summary)
10502 @findex gnus-article-browse-html-article
10503 View @samp{text/html} parts of the current article with a WWW browser.
10504 Inline images embedded in a message using the @code{cid} scheme, as they
10505 are generally considered to be safe, will be processed properly.  The
10506 message header is added to the beginning of every @acronym{HTML} part
10507 unless the prefix argument is given.
10508
10509 Warning: Spammers use links to images (using the @code{http} scheme) in
10510 @acronym{HTML} articles to verify whether you have read the message.  As
10511 this command passes the @acronym{HTML} content to the browser without
10512 eliminating these ``web bugs'' you should only use it for mails from
10513 trusted senders.
10514
10515 If you always want to display @acronym{HTML} parts in the browser, set
10516 @code{mm-text-html-renderer} to @code{nil}.
10517
10518 This command creates temporary files to pass @acronym{HTML} contents
10519 including images if any to the browser, and deletes them when exiting
10520 the group (if you want).
10521
10522 @item K b
10523 @kindex K b (Summary)
10524 Make all the @acronym{MIME} parts have buttons in front of them.  This is
10525 mostly useful if you wish to save (or perform other actions) on inlined
10526 parts.
10527
10528 @item K m
10529 @kindex K m (Summary)
10530 @findex gnus-summary-repair-multipart
10531 Some multipart messages are transmitted with missing or faulty headers.
10532 This command will attempt to ``repair'' these messages so that they can
10533 be viewed in a more pleasant manner
10534 (@code{gnus-summary-repair-multipart}).
10535
10536 @item X m
10537 @kindex X m (Summary)
10538 @findex gnus-summary-save-parts
10539 Save all parts matching a @acronym{MIME} type to a directory
10540 (@code{gnus-summary-save-parts}).  Understands the process/prefix
10541 convention (@pxref{Process/Prefix}).
10542
10543 @item M-t
10544 @kindex M-t (Summary)
10545 @findex gnus-summary-toggle-display-buttonized
10546 Toggle the buttonized display of the article buffer
10547 (@code{gnus-summary-toggle-display-buttonized}).
10548
10549 @item W M w
10550 @kindex W M w (Summary)
10551 @findex gnus-article-decode-mime-words
10552 Decode RFC 2047-encoded words in the article headers
10553 (@code{gnus-article-decode-mime-words}).
10554
10555 @item W M c
10556 @kindex W M c (Summary)
10557 @findex gnus-article-decode-charset
10558 Decode encoded article bodies as well as charsets
10559 (@code{gnus-article-decode-charset}).
10560
10561 This command looks in the @code{Content-Type} header to determine the
10562 charset.  If there is no such header in the article, you can give it a
10563 prefix, which will prompt for the charset to decode as.  In regional
10564 groups where people post using some common encoding (but do not
10565 include @acronym{MIME} headers), you can set the @code{charset} group/topic
10566 parameter to the required charset (@pxref{Group Parameters}).
10567
10568 @item W M v
10569 @kindex W M v (Summary)
10570 @findex gnus-mime-view-all-parts
10571 View all the @acronym{MIME} parts in the current article
10572 (@code{gnus-mime-view-all-parts}).
10573
10574 @end table
10575
10576 Relevant variables:
10577
10578 @table @code
10579 @item gnus-ignored-mime-types
10580 @vindex gnus-ignored-mime-types
10581 This is a list of regexps.  @acronym{MIME} types that match a regexp from
10582 this list will be completely ignored by Gnus.  The default value is
10583 @code{nil}.
10584
10585 To have all Vcards be ignored, you'd say something like this:
10586
10587 @lisp
10588 (setq gnus-ignored-mime-types
10589       '("text/x-vcard"))
10590 @end lisp
10591
10592 @item gnus-article-loose-mime
10593 @vindex gnus-article-loose-mime
10594 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
10595 before interpreting the message as a @acronym{MIME} message.  This helps
10596 when reading messages from certain broken mail user agents.  The
10597 default is @code{t}.
10598
10599 @item gnus-article-emulate-mime
10600 @vindex gnus-article-emulate-mime
10601 @cindex uuencode
10602 @cindex yEnc
10603 There are other, non-@acronym{MIME} encoding methods used.  The most common
10604 is @samp{uuencode}, but yEncode is also getting to be popular.  If
10605 this variable is non-@code{nil}, Gnus will look in message bodies to
10606 see if it finds these encodings, and if so, it'll run them through the
10607 Gnus @acronym{MIME} machinery.  The default is @code{t}.  Only
10608 single-part yEnc encoded attachments can be decoded.  There's no support
10609 for encoding in Gnus.
10610
10611 @item gnus-unbuttonized-mime-types
10612 @vindex gnus-unbuttonized-mime-types
10613 This is a list of regexps.  @acronym{MIME} types that match a regexp from
10614 this list won't have @acronym{MIME} buttons inserted unless they aren't
10615 displayed or this variable is overridden by
10616 @code{gnus-buttonized-mime-types}.  The default value is
10617 @code{(".*/.*")}.  This variable is only used when
10618 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
10619
10620 @item gnus-buttonized-mime-types
10621 @vindex gnus-buttonized-mime-types
10622 This is a list of regexps.  @acronym{MIME} types that match a regexp from
10623 this list will have @acronym{MIME} buttons inserted unless they aren't
10624 displayed.  This variable overrides
10625 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
10626 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
10627 is @code{nil}.
10628
10629 To see e.g. security buttons but no other buttons, you could set this
10630 variable to @code{("multipart/signed")} and leave
10631 @code{gnus-unbuttonized-mime-types} at the default value.
10632
10633 You could also add @code{"multipart/alternative"} to this list to
10634 display radio buttons that allow you to choose one of two media types
10635 those mails include.  See also @code{mm-discouraged-alternatives}
10636 (@pxref{Display Customization, ,Display Customization, emacs-mime, The
10637 Emacs MIME Manual}).
10638
10639 @item gnus-inhibit-mime-unbuttonizing
10640 @vindex gnus-inhibit-mime-unbuttonizing
10641 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
10642 default value is @code{nil}.
10643
10644 @item gnus-article-mime-part-function
10645 @vindex gnus-article-mime-part-function
10646 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
10647 handle as the parameter.  The function is meant to be used to allow
10648 users to gather information from the article (e. g., add Vcard info to
10649 the bbdb database) or to do actions based on parts (e. g., automatically
10650 save all jpegs into some directory).
10651
10652 Here's an example function the does the latter:
10653
10654 @lisp
10655 (defun my-save-all-jpeg-parts (handle)
10656   (when (equal (car (mm-handle-type handle)) "image/jpeg")
10657     (with-temp-buffer
10658       (insert (mm-get-part handle))
10659       (write-region (point-min) (point-max)
10660                     (read-file-name "Save jpeg to: ")))))
10661 (setq gnus-article-mime-part-function
10662       'my-save-all-jpeg-parts)
10663 @end lisp
10664
10665 @vindex gnus-mime-multipart-functions
10666 @item gnus-mime-multipart-functions
10667 Alist of @acronym{MIME} multipart types and functions to handle them.
10668
10669 @vindex gnus-mime-display-multipart-alternative-as-mixed
10670 @item gnus-mime-display-multipart-alternative-as-mixed
10671 Display "multipart/alternative" parts as "multipart/mixed".
10672
10673 @vindex gnus-mime-display-multipart-related-as-mixed
10674 @item gnus-mime-display-multipart-related-as-mixed
10675 Display "multipart/related" parts as "multipart/mixed".
10676
10677 If displaying @samp{text/html} is discouraged, see
10678 @code{mm-discouraged-alternatives}, images or other material inside a
10679 "multipart/related" part might be overlooked when this variable is
10680 @code{nil}.  @ref{Display Customization, Display Customization, ,
10681 emacs-mime, Emacs-Mime Manual}.
10682
10683 @vindex gnus-mime-display-multipart-as-mixed
10684 @item gnus-mime-display-multipart-as-mixed
10685 Display "multipart" parts as "multipart/mixed".  If @code{t}, it
10686 overrides @code{nil} values of
10687 @code{gnus-mime-display-multipart-alternative-as-mixed} and
10688 @code{gnus-mime-display-multipart-related-as-mixed}.
10689
10690 @vindex mm-file-name-rewrite-functions
10691 @item mm-file-name-rewrite-functions
10692 List of functions used for rewriting file names of @acronym{MIME} parts.
10693 Each function takes a file name as input and returns a file name.
10694
10695 Ready-made functions include@*
10696 @code{mm-file-name-delete-whitespace},
10697 @code{mm-file-name-trim-whitespace},
10698 @code{mm-file-name-collapse-whitespace}, and
10699 @code{mm-file-name-replace-whitespace}.  The later uses the value of
10700 the variable @code{mm-file-name-replace-whitespace} to replace each
10701 whitespace character in a file name with that string; default value
10702 is @code{"_"} (a single underscore).
10703 @findex mm-file-name-delete-whitespace
10704 @findex mm-file-name-trim-whitespace
10705 @findex mm-file-name-collapse-whitespace
10706 @findex mm-file-name-replace-whitespace
10707 @vindex mm-file-name-replace-whitespace
10708
10709 The standard functions @code{capitalize}, @code{downcase},
10710 @code{upcase}, and @code{upcase-initials} may be useful, too.
10711
10712 Everybody knows that whitespace characters in file names are evil,
10713 except those who don't know.  If you receive lots of attachments from
10714 such unenlightened users, you can make live easier by adding
10715
10716 @lisp
10717 (setq mm-file-name-rewrite-functions
10718       '(mm-file-name-trim-whitespace
10719         mm-file-name-collapse-whitespace
10720         mm-file-name-replace-whitespace))
10721 @end lisp
10722
10723 @noindent
10724 to your @file{~/.gnus.el} file.
10725
10726 @end table
10727
10728
10729 @node Charsets
10730 @section Charsets
10731 @cindex charsets
10732
10733 People use different charsets, and we have @acronym{MIME} to let us know what
10734 charsets they use.  Or rather, we wish we had.  Many people use
10735 newsreaders and mailers that do not understand or use @acronym{MIME}, and
10736 just send out messages without saying what character sets they use.  To
10737 help a bit with this, some local news hierarchies have policies that say
10738 what character set is the default.  For instance, the @samp{fj}
10739 hierarchy uses @code{iso-2022-jp}.
10740
10741 @vindex gnus-group-charset-alist
10742 This knowledge is encoded in the @code{gnus-group-charset-alist}
10743 variable, which is an alist of regexps (use the first item to match full
10744 group names) and default charsets to be used when reading these groups.
10745
10746 @vindex gnus-newsgroup-ignored-charsets
10747 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
10748 aren't.  These blithely mark messages as being in @code{iso-8859-1}
10749 even if they really are in @code{koi-8}.  To help here, the
10750 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
10751 charsets that are listed here will be ignored.  The variable can be
10752 set on a group-by-group basis using the group parameters (@pxref{Group
10753 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
10754 which includes values some agents insist on having in there.
10755
10756 @vindex gnus-group-posting-charset-alist
10757 When posting, @code{gnus-group-posting-charset-alist} is used to
10758 determine which charsets should not be encoded using the @acronym{MIME}
10759 encodings.  For instance, some hierarchies discourage using
10760 quoted-printable header encoding.
10761
10762 This variable is an alist of regexps and permitted unencoded charsets
10763 for posting.  Each element of the alist has the form @code{(}@var{test
10764 header body-list}@code{)}, where:
10765
10766 @table @var
10767 @item test
10768 is either a regular expression matching the newsgroup header or a
10769 variable to query,
10770 @item header
10771 is the charset which may be left unencoded in the header (@code{nil}
10772 means encode all charsets),
10773 @item body-list
10774 is a list of charsets which may be encoded using 8bit content-transfer
10775 encoding in the body, or one of the special values @code{nil} (always
10776 encode using quoted-printable) or @code{t} (always use 8bit).
10777 @end table
10778
10779 @cindex Russian
10780 @cindex koi8-r
10781 @cindex koi8-u
10782 @cindex iso-8859-5
10783 @cindex coding system aliases
10784 @cindex preferred charset
10785
10786 @xref{Encoding Customization, , Encoding Customization, emacs-mime,
10787 The Emacs MIME Manual}, for additional variables that control which
10788 MIME charsets are used when sending messages.
10789
10790 Other charset tricks that may be useful, although not Gnus-specific:
10791
10792 If there are several @acronym{MIME} charsets that encode the same Emacs
10793 charset, you can choose what charset to use by saying the following:
10794
10795 @lisp
10796 (put-charset-property 'cyrillic-iso8859-5
10797                       'preferred-coding-system 'koi8-r)
10798 @end lisp
10799
10800 This means that Russian will be encoded using @code{koi8-r} instead of
10801 the default @code{iso-8859-5} @acronym{MIME} charset.
10802
10803 If you want to read messages in @code{koi8-u}, you can cheat and say
10804
10805 @lisp
10806 (define-coding-system-alias 'koi8-u 'koi8-r)
10807 @end lisp
10808
10809 This will almost do the right thing.
10810
10811 And finally, to read charsets like @code{windows-1251}, you can say
10812 something like
10813
10814 @lisp
10815 (codepage-setup 1251)
10816 (define-coding-system-alias 'windows-1251 'cp1251)
10817 @end lisp
10818
10819
10820 @node Article Commands
10821 @section Article Commands
10822
10823 @table @kbd
10824
10825 @item A P
10826 @cindex PostScript
10827 @cindex printing
10828 @kindex A P (Summary)
10829 @vindex gnus-ps-print-hook
10830 @findex gnus-summary-print-article
10831 Generate and print a PostScript image of the article buffer
10832 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
10833 be run just before printing the buffer.  An alternative way to print
10834 article is to use Muttprint (@pxref{Saving Articles}).
10835
10836 @end table
10837
10838
10839 @node Summary Sorting
10840 @section Summary Sorting
10841 @cindex summary sorting
10842
10843 You can have the summary buffer sorted in various ways, even though I
10844 can't really see why you'd want that.
10845
10846 @table @kbd
10847
10848 @item C-c C-s C-n
10849 @kindex C-c C-s C-n (Summary)
10850 @findex gnus-summary-sort-by-number
10851 Sort by article number (@code{gnus-summary-sort-by-number}).
10852
10853 @item C-c C-s C-m C-n
10854 @kindex C-c C-s C-n (Summary)
10855 @findex gnus-summary-sort-by-most-recent-number
10856 Sort by most recent article number
10857 (@code{gnus-summary-sort-by-most-recent-number}).
10858
10859 @item C-c C-s C-a
10860 @kindex C-c C-s C-a (Summary)
10861 @findex gnus-summary-sort-by-author
10862 Sort by author (@code{gnus-summary-sort-by-author}).
10863
10864 @item C-c C-s C-t
10865 @kindex C-c C-s C-t (Summary)
10866 @findex gnus-summary-sort-by-recipient
10867 Sort by recipient (@code{gnus-summary-sort-by-recipient}).
10868
10869 @item C-c C-s C-s
10870 @kindex C-c C-s C-s (Summary)
10871 @findex gnus-summary-sort-by-subject
10872 Sort by subject (@code{gnus-summary-sort-by-subject}).
10873
10874 @item C-c C-s C-d
10875 @kindex C-c C-s C-d (Summary)
10876 @findex gnus-summary-sort-by-date
10877 Sort by date (@code{gnus-summary-sort-by-date}).
10878
10879 @item C-c C-s C-m C-d
10880 @kindex C-c C-s C-m C-d (Summary)
10881 @findex gnus-summary-sort-by-most-recent-date
10882 Sort by most recent date (@code{gnus-summary-sort-by-most-recent-date}).
10883
10884 @item C-c C-s C-l
10885 @kindex C-c C-s C-l (Summary)
10886 @findex gnus-summary-sort-by-lines
10887 Sort by lines (@code{gnus-summary-sort-by-lines}).
10888
10889 @item C-c C-s C-c
10890 @kindex C-c C-s C-c (Summary)
10891 @findex gnus-summary-sort-by-chars
10892 Sort by article length (@code{gnus-summary-sort-by-chars}).
10893
10894 @item C-c C-s C-i
10895 @kindex C-c C-s C-i (Summary)
10896 @findex gnus-summary-sort-by-score
10897 Sort by score (@code{gnus-summary-sort-by-score}).
10898
10899 @item C-c C-s C-r
10900 @kindex C-c C-s C-r (Summary)
10901 @findex gnus-summary-sort-by-random
10902 Randomize (@code{gnus-summary-sort-by-random}).
10903
10904 @item C-c C-s C-o
10905 @kindex C-c C-s C-o (Summary)
10906 @findex gnus-summary-sort-by-original
10907 Sort using the default sorting method
10908 (@code{gnus-summary-sort-by-original}).
10909 @end table
10910
10911 These functions will work both when you use threading and when you don't
10912 use threading.  In the latter case, all summary lines will be sorted,
10913 line by line.  In the former case, sorting will be done on a
10914 root-by-root basis, which might not be what you were looking for.  To
10915 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
10916 Commands}).
10917
10918 If a prefix argument if given, the sort order is reversed.
10919
10920
10921 @node Finding the Parent
10922 @section Finding the Parent
10923 @cindex parent articles
10924 @cindex referring articles
10925
10926 @table @kbd
10927 @item ^
10928 @kindex ^ (Summary)
10929 @findex gnus-summary-refer-parent-article
10930 If you'd like to read the parent of the current article, and it is not
10931 displayed in the summary buffer, you might still be able to.  That is,
10932 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
10933 and the @code{References} in the current article are not mangled, you
10934 can just press @kbd{^} or @kbd{A r}
10935 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
10936 you'll get the parent.  If the parent is already displayed in the
10937 summary buffer, point will just move to this article.
10938
10939 If given a positive numerical prefix, fetch that many articles back into
10940 the ancestry.  If given a negative numerical prefix, fetch just that
10941 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
10942 grandparent and the grandgrandparent of the current article.  If you say
10943 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
10944 article.
10945
10946 @item A R (Summary)
10947 @findex gnus-summary-refer-references
10948 @kindex A R (Summary)
10949 Fetch all articles mentioned in the @code{References} header of the
10950 article (@code{gnus-summary-refer-references}).
10951
10952 @item A T (Summary)
10953 @findex gnus-summary-refer-thread
10954 @kindex A T (Summary)
10955 Display the full thread where the current article appears
10956 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
10957 headers in the current group to work, so it usually takes a while.  If
10958 you do it often, you may consider setting @code{gnus-fetch-old-headers}
10959 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
10960 visible effects normally, but it'll make this command work a whole lot
10961 faster.  Of course, it'll make group entry somewhat slow.
10962
10963 @vindex gnus-refer-thread-limit
10964 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
10965 articles before the first displayed in the current group) headers to
10966 fetch when doing this command.  The default is 200.  If @code{t}, all
10967 the available headers will be fetched.  This variable can be overridden
10968 by giving the @kbd{A T} command a numerical prefix.
10969
10970 @item M-^ (Summary)
10971 @findex gnus-summary-refer-article
10972 @kindex M-^ (Summary)
10973 @cindex Message-ID
10974 @cindex fetching by Message-ID
10975 You can also ask Gnus for an arbitrary article, no matter what group it
10976 belongs to.  @kbd{M-^} (@code{gnus-summary-refer-article}) will ask you
10977 for a @code{Message-ID}, which is one of those long, hard-to-read
10978 thingies that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.
10979 You have to get it all exactly right.  No fuzzy searches, I'm afraid.
10980
10981 Gnus looks for the @code{Message-ID} in the headers that have already
10982 been fetched, but also tries all the select methods specified by
10983 @code{gnus-refer-article-method} if it is not found.
10984 @end table
10985
10986 @vindex gnus-refer-article-method
10987 If the group you are reading is located on a back end that does not
10988 support fetching by @code{Message-ID} very well (like @code{nnspool}),
10989 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
10990 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
10991 updating the spool you are reading from, but that's not really
10992 necessary.
10993
10994 It can also be a list of select methods, as well as the special symbol
10995 @code{current}, which means to use the current select method.  If it
10996 is a list, Gnus will try all the methods in the list until it finds a
10997 match.
10998
10999 Here's an example setting that will first try the current method, and
11000 then ask Google if that fails:
11001
11002 @lisp
11003 (setq gnus-refer-article-method
11004       '(current
11005         (nnweb "google" (nnweb-type google))))
11006 @end lisp
11007
11008 Most of the mail back ends support fetching by @code{Message-ID}, but
11009 do not do a particularly excellent job at it.  That is, @code{nnmbox},
11010 @code{nnbabyl}, @code{nnmaildir}, @code{nnml}, are able to locate
11011 articles from any groups, while @code{nnfolder}, and @code{nnimap} are
11012 only able to locate articles that have been posted to the current
11013 group.  (Anything else would be too time consuming.)  @code{nnmh} does
11014 not support this at all.
11015
11016
11017 @node Alternative Approaches
11018 @section Alternative Approaches
11019
11020 Different people like to read news using different methods.  This being
11021 Gnus, we offer a small selection of minor modes for the summary buffers.
11022
11023 @menu
11024 * Pick and Read::               First mark articles and then read them.
11025 * Binary Groups::               Auto-decode all articles.
11026 @end menu
11027
11028
11029 @node Pick and Read
11030 @subsection Pick and Read
11031 @cindex pick and read
11032
11033 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
11034 a two-phased reading interface.  The user first marks in a summary
11035 buffer the articles she wants to read.  Then she starts reading the
11036 articles with just an article buffer displayed.
11037
11038 @findex gnus-pick-mode
11039 @kindex M-x gnus-pick-mode
11040 Gnus provides a summary buffer minor mode that allows
11041 this---@code{gnus-pick-mode}.  This basically means that a few process
11042 mark commands become one-keystroke commands to allow easy marking, and
11043 it provides one additional command for switching to the summary buffer.
11044
11045 Here are the available keystrokes when using pick mode:
11046
11047 @table @kbd
11048 @item .
11049 @kindex . (Pick)
11050 @findex gnus-pick-article-or-thread
11051 Pick the article or thread on the current line
11052 (@code{gnus-pick-article-or-thread}).  If the variable
11053 @code{gnus-thread-hide-subtree} is true, then this key selects the
11054 entire thread when used at the first article of the thread.  Otherwise,
11055 it selects just the article.  If given a numerical prefix, go to that
11056 thread or article and pick it.  (The line number is normally displayed
11057 at the beginning of the summary pick lines.)
11058
11059 @item SPACE
11060 @kindex SPACE (Pick)
11061 @findex gnus-pick-next-page
11062 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
11063 at the end of the buffer, start reading the picked articles.
11064
11065 @item u
11066 @kindex u (Pick)
11067 @findex gnus-pick-unmark-article-or-thread.
11068 Unpick the thread or article
11069 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
11070 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
11071 thread if used at the first article of the thread.  Otherwise it unpicks
11072 just the article.  You can give this key a numerical prefix to unpick
11073 the thread or article at that line.
11074
11075 @item RET
11076 @kindex RET (Pick)
11077 @findex gnus-pick-start-reading
11078 @vindex gnus-pick-display-summary
11079 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
11080 given a prefix, mark all unpicked articles as read first.  If
11081 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
11082 will still be visible when you are reading.
11083
11084 @end table
11085
11086 All the normal summary mode commands are still available in the
11087 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
11088 which is mapped to the same function
11089 @code{gnus-summary-tick-article-forward}.
11090
11091 If this sounds like a good idea to you, you could say:
11092
11093 @lisp
11094 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
11095 @end lisp
11096
11097 @vindex gnus-pick-mode-hook
11098 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
11099
11100 @vindex gnus-mark-unpicked-articles-as-read
11101 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
11102 all unpicked articles as read.  The default is @code{nil}.
11103
11104 @vindex gnus-summary-pick-line-format
11105 The summary line format in pick mode is slightly different from the
11106 standard format.  At the beginning of each line the line number is
11107 displayed.  The pick mode line format is controlled by the
11108 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
11109 Variables}).  It accepts the same format specs that
11110 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
11111
11112
11113 @node Binary Groups
11114 @subsection Binary Groups
11115 @cindex binary groups
11116
11117 @findex gnus-binary-mode
11118 @kindex M-x gnus-binary-mode
11119 If you spend much time in binary groups, you may grow tired of hitting
11120 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
11121 is a minor mode for summary buffers that makes all ordinary Gnus article
11122 selection functions uudecode series of articles and display the result
11123 instead of just displaying the articles the normal way.
11124
11125 @kindex g (Binary)
11126 @findex gnus-binary-show-article
11127 The only way, in fact, to see the actual articles is the @kbd{g}
11128 command, when you have turned on this mode
11129 (@code{gnus-binary-show-article}).
11130
11131 @vindex gnus-binary-mode-hook
11132 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
11133
11134
11135 @node Tree Display
11136 @section Tree Display
11137 @cindex trees
11138
11139 @vindex gnus-use-trees
11140 If you don't like the normal Gnus summary display, you might try setting
11141 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
11142 additional @dfn{tree buffer}.  You can execute all summary mode commands
11143 in the tree buffer.
11144
11145 There are a few variables to customize the tree display, of course:
11146
11147 @table @code
11148 @item gnus-tree-mode-hook
11149 @vindex gnus-tree-mode-hook
11150 A hook called in all tree mode buffers.
11151
11152 @item gnus-tree-mode-line-format
11153 @vindex gnus-tree-mode-line-format
11154 A format string for the mode bar in the tree mode buffers (@pxref{Mode
11155 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
11156 of valid specs, @pxref{Summary Buffer Mode Line}.
11157
11158 @item gnus-selected-tree-face
11159 @vindex gnus-selected-tree-face
11160 Face used for highlighting the selected article in the tree buffer.  The
11161 default is @code{modeline}.
11162
11163 @item gnus-tree-line-format
11164 @vindex gnus-tree-line-format
11165 A format string for the tree nodes.  The name is a bit of a misnomer,
11166 though---it doesn't define a line, but just the node.  The default value
11167 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
11168 the name of the poster.  It is vital that all nodes are of the same
11169 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
11170
11171 Valid specs are:
11172
11173 @table @samp
11174 @item n
11175 The name of the poster.
11176 @item f
11177 The @code{From} header.
11178 @item N
11179 The number of the article.
11180 @item [
11181 The opening bracket.
11182 @item ]
11183 The closing bracket.
11184 @item s
11185 The subject.
11186 @end table
11187
11188 @xref{Formatting Variables}.
11189
11190 Variables related to the display are:
11191
11192 @table @code
11193 @item gnus-tree-brackets
11194 @vindex gnus-tree-brackets
11195 This is used for differentiating between ``real'' articles and
11196 ``sparse'' articles.  The format is
11197 @example
11198 ((@var{real-open} . @var{real-close})
11199  (@var{sparse-open} . @var{sparse-close})
11200  (@var{dummy-open} . @var{dummy-close}))
11201 @end example
11202 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
11203
11204 @item gnus-tree-parent-child-edges
11205 @vindex gnus-tree-parent-child-edges
11206 This is a list that contains the characters used for connecting parent
11207 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
11208
11209 @end table
11210
11211 @item gnus-tree-minimize-window
11212 @vindex gnus-tree-minimize-window
11213 If this variable is non-@code{nil}, Gnus will try to keep the tree
11214 buffer as small as possible to allow more room for the other Gnus
11215 windows.  If this variable is a number, the tree buffer will never be
11216 higher than that number.  The default is @code{t}.  Note that if you
11217 have several windows displayed side-by-side in a frame and the tree
11218 buffer is one of these, minimizing the tree window will also resize all
11219 other windows displayed next to it.
11220
11221 You may also wish to add the following hook to keep the window minimized
11222 at all times:
11223
11224 @lisp
11225 (add-hook 'gnus-configure-windows-hook
11226           'gnus-tree-perhaps-minimize)
11227 @end lisp
11228
11229 @item gnus-generate-tree-function
11230 @vindex gnus-generate-tree-function
11231 @findex gnus-generate-horizontal-tree
11232 @findex gnus-generate-vertical-tree
11233 The function that actually generates the thread tree.  Two predefined
11234 functions are available: @code{gnus-generate-horizontal-tree} and
11235 @code{gnus-generate-vertical-tree} (which is the default).
11236
11237 @end table
11238
11239 Here's an example from a horizontal tree buffer:
11240
11241 @example
11242 @{***@}-(***)-[odd]-[Gun]
11243      |      \[Jan]
11244      |      \[odd]-[Eri]
11245      |      \(***)-[Eri]
11246      |            \[odd]-[Paa]
11247      \[Bjo]
11248      \[Gun]
11249      \[Gun]-[Jor]
11250 @end example
11251
11252 Here's the same thread displayed in a vertical tree buffer:
11253
11254 @example
11255 @group
11256 @{***@}
11257   |--------------------------\-----\-----\
11258 (***)                         [Bjo] [Gun] [Gun]
11259   |--\-----\-----\                          |
11260 [odd] [Jan] [odd] (***)                   [Jor]
11261   |           |     |--\
11262 [Gun]       [Eri] [Eri] [odd]
11263                           |
11264                         [Paa]
11265 @end group
11266 @end example
11267
11268 If you're using horizontal trees, it might be nice to display the trees
11269 side-by-side with the summary buffer.  You could add something like the
11270 following to your @file{~/.gnus.el} file:
11271
11272 @lisp
11273 (setq gnus-use-trees t
11274       gnus-generate-tree-function 'gnus-generate-horizontal-tree
11275       gnus-tree-minimize-window nil)
11276 (gnus-add-configuration
11277  '(article
11278    (vertical 1.0
11279              (horizontal 0.25
11280                          (summary 0.75 point)
11281                          (tree 1.0))
11282              (article 1.0))))
11283 @end lisp
11284
11285 @xref{Window Layout}.
11286
11287
11288 @node Mail Group Commands
11289 @section Mail Group Commands
11290 @cindex mail group commands
11291
11292 Some commands only make sense in mail groups.  If these commands are
11293 invalid in the current group, they will raise a hell and let you know.
11294
11295 All these commands (except the expiry and edit commands) use the
11296 process/prefix convention (@pxref{Process/Prefix}).
11297
11298 @table @kbd
11299
11300 @item B e
11301 @kindex B e (Summary)
11302 @findex gnus-summary-expire-articles
11303 @cindex expiring mail
11304 Run all expirable articles in the current group through the expiry
11305 process (@code{gnus-summary-expire-articles}).  That is, delete all
11306 expirable articles in the group that have been around for a while.
11307 (@pxref{Expiring Mail}).
11308
11309 @item B C-M-e
11310 @kindex B C-M-e (Summary)
11311 @findex gnus-summary-expire-articles-now
11312 @cindex expiring mail
11313 Delete all the expirable articles in the group
11314 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
11315 articles eligible for expiry in the current group will
11316 disappear forever into that big @file{/dev/null} in the sky.
11317
11318 @item B DEL
11319 @kindex B DEL (Summary)
11320 @cindex deleting mail
11321 @findex gnus-summary-delete-article
11322 @c @icon{gnus-summary-mail-delete}
11323 Delete the mail article.  This is ``delete'' as in ``delete it from your
11324 disk forever and ever, never to return again.'' Use with caution.
11325 (@code{gnus-summary-delete-article}).
11326
11327 @item B m
11328 @kindex B m (Summary)
11329 @cindex move mail
11330 @findex gnus-summary-move-article
11331 @vindex gnus-preserve-marks
11332 Move the article from one mail group to another
11333 (@code{gnus-summary-move-article}).  Marks will be preserved if
11334 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
11335
11336 @item B c
11337 @kindex B c (Summary)
11338 @cindex copy mail
11339 @findex gnus-summary-copy-article
11340 @c @icon{gnus-summary-mail-copy}
11341 Copy the article from one group (mail group or not) to a mail group
11342 (@code{gnus-summary-copy-article}).  Marks will be preserved if
11343 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
11344
11345 @item B B
11346 @kindex B B (Summary)
11347 @cindex crosspost mail
11348 @findex gnus-summary-crosspost-article
11349 Crosspost the current article to some other group
11350 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
11351 the article in the other group, and the Xref headers of the article will
11352 be properly updated.
11353
11354 @item B i
11355 @kindex B i (Summary)
11356 @findex gnus-summary-import-article
11357 Import an arbitrary file into the current mail newsgroup
11358 (@code{gnus-summary-import-article}).  You will be prompted for a file
11359 name, a @code{From} header and a @code{Subject} header.
11360
11361 @item B I
11362 @kindex B I (Summary)
11363 @findex gnus-summary-create-article
11364 Create an empty article in the current mail newsgroups
11365 (@code{gnus-summary-create-article}).  You will be prompted for a
11366 @code{From} header and a @code{Subject} header.
11367
11368 @item B r
11369 @kindex B r (Summary)
11370 @findex gnus-summary-respool-article
11371 @vindex gnus-summary-respool-default-method
11372 Respool the mail article (@code{gnus-summary-respool-article}).
11373 @code{gnus-summary-respool-default-method} will be used as the default
11374 select method when respooling.  This variable is @code{nil} by default,
11375 which means that the current group select method will be used instead.
11376 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
11377 (which is the default).
11378
11379 @item B w
11380 @itemx e
11381 @kindex B w (Summary)
11382 @kindex e (Summary)
11383 @findex gnus-summary-edit-article
11384 @kindex C-c C-c (Article)
11385 @findex gnus-summary-edit-article-done
11386 Edit the current article (@code{gnus-summary-edit-article}).  To finish
11387 editing and make the changes permanent, type @kbd{C-c C-c}
11388 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
11389 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
11390
11391 @item B q
11392 @kindex B q (Summary)
11393 @findex gnus-summary-respool-query
11394 If you want to re-spool an article, you might be curious as to what group
11395 the article will end up in before you do the re-spooling.  This command
11396 will tell you (@code{gnus-summary-respool-query}).
11397
11398 @item B t
11399 @kindex B t (Summary)
11400 @findex gnus-summary-respool-trace
11401 Similarly, this command will display all fancy splitting patterns used
11402 when respooling, if any (@code{gnus-summary-respool-trace}).
11403
11404 @item B p
11405 @kindex B p (Summary)
11406 @findex gnus-summary-article-posted-p
11407 Some people have a tendency to send you ``courtesy'' copies when they
11408 follow up to articles you have posted.  These usually have a
11409 @code{Newsgroups} header in them, but not always.  This command
11410 (@code{gnus-summary-article-posted-p}) will try to fetch the current
11411 article from your news server (or rather, from
11412 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
11413 report back whether it found the article or not.  Even if it says that
11414 it didn't find the article, it may have been posted anyway---mail
11415 propagation is much faster than news propagation, and the news copy may
11416 just not have arrived yet.
11417
11418 @item K E
11419 @kindex K E (Summary)
11420 @findex gnus-article-encrypt-body
11421 @vindex gnus-article-encrypt-protocol
11422 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
11423 The body is encrypted with the encryption protocol specified by the
11424 variable @code{gnus-article-encrypt-protocol}.
11425
11426 @end table
11427
11428 @vindex gnus-move-split-methods
11429 @cindex moving articles
11430 If you move (or copy) articles regularly, you might wish to have Gnus
11431 suggest where to put the articles.  @code{gnus-move-split-methods} is a
11432 variable that uses the same syntax as @code{gnus-split-methods}
11433 (@pxref{Saving Articles}).  You may customize that variable to create
11434 suggestions you find reasonable.  (Note that
11435 @code{gnus-move-split-methods} uses group names where
11436 @code{gnus-split-methods} uses file names.)
11437
11438 @lisp
11439 (setq gnus-move-split-methods
11440       '(("^From:.*Lars Magne" "nnml:junk")
11441         ("^Subject:.*gnus" "nnfolder:important")
11442         (".*" "nnml:misc")))
11443 @end lisp
11444
11445
11446 @node Various Summary Stuff
11447 @section Various Summary Stuff
11448
11449 @menu
11450 * Summary Group Information::   Information oriented commands.
11451 * Searching for Articles::      Multiple article commands.
11452 * Summary Generation Commands::
11453 * Really Various Summary Commands::  Those pesky non-conformant commands.
11454 @end menu
11455
11456 @table @code
11457 @vindex gnus-summary-display-while-building
11458 @item gnus-summary-display-while-building
11459 If non-@code{nil}, show and update the summary buffer as it's being
11460 built.  If @code{t}, update the buffer after every line is inserted.
11461 If the value is an integer, @var{n}, update the display every @var{n}
11462 lines.  The default is @code{nil}.
11463
11464 @vindex gnus-summary-display-arrow
11465 @item gnus-summary-display-arrow
11466 If non-@code{nil}, display an arrow in the fringe to indicate the
11467 current article.
11468
11469 @vindex gnus-summary-mode-hook
11470 @item gnus-summary-mode-hook
11471 This hook is called when creating a summary mode buffer.
11472
11473 @vindex gnus-summary-generate-hook
11474 @item gnus-summary-generate-hook
11475 This is called as the last thing before doing the threading and the
11476 generation of the summary buffer.  It's quite convenient for customizing
11477 the threading variables based on what data the newsgroup has.  This hook
11478 is called from the summary buffer after most summary buffer variables
11479 have been set.
11480
11481 @vindex gnus-summary-prepare-hook
11482 @item gnus-summary-prepare-hook
11483 It is called after the summary buffer has been generated.  You might use
11484 it to, for instance, highlight lines or modify the look of the buffer in
11485 some other ungodly manner.  I don't care.
11486
11487 @vindex gnus-summary-prepared-hook
11488 @item gnus-summary-prepared-hook
11489 A hook called as the very last thing after the summary buffer has been
11490 generated.
11491
11492 @vindex gnus-summary-ignore-duplicates
11493 @item gnus-summary-ignore-duplicates
11494 When Gnus discovers two articles that have the same @code{Message-ID},
11495 it has to do something drastic.  No articles are allowed to have the
11496 same @code{Message-ID}, but this may happen when reading mail from some
11497 sources.  Gnus allows you to customize what happens with this variable.
11498 If it is @code{nil} (which is the default), Gnus will rename the
11499 @code{Message-ID} (for display purposes only) and display the article as
11500 any other article.  If this variable is @code{t}, it won't display the
11501 article---it'll be as if it never existed.
11502
11503 @vindex gnus-alter-articles-to-read-function
11504 @item gnus-alter-articles-to-read-function
11505 This function, which takes two parameters (the group name and the list
11506 of articles to be selected), is called to allow the user to alter the
11507 list of articles to be selected.
11508
11509 For instance, the following function adds the list of cached articles to
11510 the list in one particular group:
11511
11512 @lisp
11513 (defun my-add-cached-articles (group articles)
11514   (if (string= group "some.group")
11515       (append gnus-newsgroup-cached articles)
11516     articles))
11517 @end lisp
11518
11519 @vindex gnus-newsgroup-variables
11520 @item gnus-newsgroup-variables
11521 A list of newsgroup (summary buffer) local variables, or cons of
11522 variables and their default expressions to be evalled (when the default
11523 values are not @code{nil}), that should be made global while the summary
11524 buffer is active.
11525
11526 Note: The default expressions will be evaluated (using function
11527 @code{eval}) before assignment to the local variable rather than just
11528 assigned to it.  If the default expression is the symbol @code{global},
11529 that symbol will not be evaluated but the global value of the local
11530 variable will be used instead.
11531
11532 These variables can be used to set variables in the group parameters
11533 while still allowing them to affect operations done in other
11534 buffers.  For example:
11535
11536 @lisp
11537 (setq gnus-newsgroup-variables
11538       '(message-use-followup-to
11539         (gnus-visible-headers .
11540  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
11541 @end lisp
11542
11543 Also @pxref{Group Parameters}.
11544
11545 @vindex gnus-propagate-marks
11546 @item gnus-propagate-marks
11547 If non-@code{nil}, propagate marks to the backends for possible
11548 storing.  @xref{NNTP marks}, and friends, for a more fine-grained
11549 sieve.
11550
11551 @end table
11552
11553
11554 @node Summary Group Information
11555 @subsection Summary Group Information
11556
11557 @table @kbd
11558
11559 @item H f
11560 @kindex H f (Summary)
11561 @findex gnus-summary-fetch-faq
11562 @vindex gnus-group-faq-directory
11563 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
11564 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
11565 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
11566 is usually a directory on a remote machine.  This variable can also be
11567 a list of directories.  In that case, giving a prefix to this command
11568 will allow you to choose between the various sites.  @code{ange-ftp}
11569 or @code{efs} will probably be used for fetching the file.
11570
11571 @item H d
11572 @kindex H d (Summary)
11573 @findex gnus-summary-describe-group
11574 Give a brief description of the current group
11575 (@code{gnus-summary-describe-group}).  If given a prefix, force
11576 rereading the description from the server.
11577
11578 @item H h
11579 @kindex H h (Summary)
11580 @findex gnus-summary-describe-briefly
11581 Give an extremely brief description of the most important summary
11582 keystrokes (@code{gnus-summary-describe-briefly}).
11583
11584 @item H i
11585 @kindex H i (Summary)
11586 @findex gnus-info-find-node
11587 Go to the Gnus info node (@code{gnus-info-find-node}).
11588 @end table
11589
11590
11591 @node Searching for Articles
11592 @subsection Searching for Articles
11593
11594 @table @kbd
11595
11596 @item M-s
11597 @kindex M-s (Summary)
11598 @findex gnus-summary-search-article-forward
11599 Search through all subsequent (raw) articles for a regexp
11600 (@code{gnus-summary-search-article-forward}).
11601
11602 @item M-r
11603 @kindex M-r (Summary)
11604 @findex gnus-summary-search-article-backward
11605 Search through all previous (raw) articles for a regexp
11606 (@code{gnus-summary-search-article-backward}).
11607
11608 @item M-S
11609 @kindex M-S (Summary)
11610 @findex gnus-summary-repeat-search-article-forward
11611 Repeat the previous search forwards
11612 (@code{gnus-summary-repeat-search-article-forward}).
11613
11614 @item M-R
11615 @kindex M-R (Summary)
11616 @findex gnus-summary-repeat-search-article-backward
11617 Repeat the previous search backwards
11618 (@code{gnus-summary-repeat-search-article-backward}).
11619
11620 @item &
11621 @kindex & (Summary)
11622 @findex gnus-summary-execute-command
11623 This command will prompt you for a header, a regular expression to match
11624 on this field, and a command to be executed if the match is made
11625 (@code{gnus-summary-execute-command}).  If the header is an empty
11626 string, the match is done on the entire article.  If given a prefix,
11627 search backward instead.
11628
11629 For instance, @kbd{& RET some.*string RET #} will put the process mark on
11630 all articles that have heads or bodies that match @samp{some.*string}.
11631
11632 @item M-&
11633 @kindex M-& (Summary)
11634 @findex gnus-summary-universal-argument
11635 Perform any operation on all articles that have been marked with
11636 the process mark (@code{gnus-summary-universal-argument}).
11637 @end table
11638
11639 @node Summary Generation Commands
11640 @subsection Summary Generation Commands
11641
11642 @table @kbd
11643
11644 @item Y g
11645 @kindex Y g (Summary)
11646 @findex gnus-summary-prepare
11647 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
11648
11649 @item Y c
11650 @kindex Y c (Summary)
11651 @findex gnus-summary-insert-cached-articles
11652 Pull all cached articles (for the current group) into the summary buffer
11653 (@code{gnus-summary-insert-cached-articles}).
11654
11655 @item Y d
11656 @kindex Y d (Summary)
11657 @findex gnus-summary-insert-dormant-articles
11658 Pull all dormant articles (for the current group) into the summary buffer
11659 (@code{gnus-summary-insert-dormant-articles}).
11660
11661 @item Y t
11662 @kindex Y t (Summary)
11663 @findex gnus-summary-insert-ticked-articles
11664 Pull all ticked articles (for the current group) into the summary buffer
11665 (@code{gnus-summary-insert-ticked-articles}).
11666
11667 @end table
11668
11669
11670 @node Really Various Summary Commands
11671 @subsection Really Various Summary Commands
11672
11673 @table @kbd
11674
11675 @item A D
11676 @itemx C-d
11677 @kindex C-d (Summary)
11678 @kindex A D (Summary)
11679 @findex gnus-summary-enter-digest-group
11680 If the current article is a collection of other articles (for instance,
11681 a digest), you might use this command to enter a group based on the that
11682 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
11683 guess what article type is currently displayed unless you give a prefix
11684 to this command, which forces a ``digest'' interpretation.  Basically,
11685 whenever you see a message that is a collection of other messages of
11686 some format, you @kbd{C-d} and read these messages in a more convenient
11687 fashion.
11688
11689 @vindex gnus-auto-select-on-ephemeral-exit
11690 The variable @code{gnus-auto-select-on-ephemeral-exit} controls what
11691 article should be selected after exiting a digest group.  Valid values
11692 include:
11693
11694 @table @code
11695 @item next
11696 Select the next article.
11697
11698 @item next-unread
11699 Select the next unread article.
11700
11701 @item next-noselect
11702 Move the cursor to the next article.  This is the default.
11703
11704 @item next-unread-noselect
11705 Move the cursor to the next unread article.
11706 @end table
11707
11708 If it has any other value or there is no next (unread) article, the
11709 article selected before entering to the digest group will appear.
11710
11711 @item C-M-d
11712 @kindex C-M-d (Summary)
11713 @findex gnus-summary-read-document
11714 This command is very similar to the one above, but lets you gather
11715 several documents into one biiig group
11716 (@code{gnus-summary-read-document}).  It does this by opening several
11717 @code{nndoc} groups for each document, and then opening an
11718 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
11719 command understands the process/prefix convention
11720 (@pxref{Process/Prefix}).
11721
11722 @item C-t
11723 @kindex C-t (Summary)
11724 @findex gnus-summary-toggle-truncation
11725 Toggle truncation of summary lines
11726 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
11727 line centering function in the summary buffer, so it's not a good idea
11728 to have truncation switched off while reading articles.
11729
11730 @item =
11731 @kindex = (Summary)
11732 @findex gnus-summary-expand-window
11733 Expand the summary buffer window (@code{gnus-summary-expand-window}).
11734 If given a prefix, force an @code{article} window configuration.
11735
11736 @item C-M-e
11737 @kindex C-M-e (Summary)
11738 @findex gnus-summary-edit-parameters
11739 Edit the group parameters (@pxref{Group Parameters}) of the current
11740 group (@code{gnus-summary-edit-parameters}).
11741
11742 @item C-M-a
11743 @kindex C-M-a (Summary)
11744 @findex gnus-summary-customize-parameters
11745 Customize the group parameters (@pxref{Group Parameters}) of the current
11746 group (@code{gnus-summary-customize-parameters}).
11747
11748 @end table
11749
11750
11751 @node Exiting the Summary Buffer
11752 @section Exiting the Summary Buffer
11753 @cindex summary exit
11754 @cindex exiting groups
11755
11756 Exiting from the summary buffer will normally update all info on the
11757 group and return you to the group buffer.
11758
11759 @table @kbd
11760
11761 @item Z Z
11762 @itemx Z Q
11763 @itemx q
11764 @kindex Z Z (Summary)
11765 @kindex Z Q (Summary)
11766 @kindex q (Summary)
11767 @findex gnus-summary-exit
11768 @vindex gnus-summary-exit-hook
11769 @vindex gnus-summary-prepare-exit-hook
11770 @vindex gnus-group-no-more-groups-hook
11771 @c @icon{gnus-summary-exit}
11772 Exit the current group and update all information on the group
11773 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
11774 called before doing much of the exiting, which calls
11775 @code{gnus-summary-expire-articles} by default.
11776 @code{gnus-summary-exit-hook} is called after finishing the exit
11777 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
11778 group mode having no more (unread) groups.
11779
11780 @item Z E
11781 @itemx Q
11782 @kindex Z E (Summary)
11783 @kindex Q (Summary)
11784 @findex gnus-summary-exit-no-update
11785 Exit the current group without updating any information on the group
11786 (@code{gnus-summary-exit-no-update}).
11787
11788 @item Z c
11789 @itemx c
11790 @kindex Z c (Summary)
11791 @kindex c (Summary)
11792 @findex gnus-summary-catchup-and-exit
11793 @c @icon{gnus-summary-catchup-and-exit}
11794 Mark all unticked articles in the group as read and then exit
11795 (@code{gnus-summary-catchup-and-exit}).
11796
11797 @item Z C
11798 @kindex Z C (Summary)
11799 @findex gnus-summary-catchup-all-and-exit
11800 Mark all articles, even the ticked ones, as read and then exit
11801 (@code{gnus-summary-catchup-all-and-exit}).
11802
11803 @item Z n
11804 @kindex Z n (Summary)
11805 @findex gnus-summary-catchup-and-goto-next-group
11806 Mark all articles as read and go to the next group
11807 (@code{gnus-summary-catchup-and-goto-next-group}).
11808
11809 @item Z p
11810 @kindex Z p (Summary)
11811 @findex gnus-summary-catchup-and-goto-prev-group
11812 Mark all articles as read and go to the previous group
11813 (@code{gnus-summary-catchup-and-goto-prev-group}).
11814
11815 @item Z R
11816 @itemx C-x C-s
11817 @kindex Z R (Summary)
11818 @kindex C-x C-s (Summary)
11819 @findex gnus-summary-reselect-current-group
11820 Exit this group, and then enter it again
11821 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
11822 all articles, both read and unread.
11823
11824 @item Z G
11825 @itemx M-g
11826 @kindex Z G (Summary)
11827 @kindex M-g (Summary)
11828 @findex gnus-summary-rescan-group
11829 @c @icon{gnus-summary-mail-get}
11830 Exit the group, check for new articles in the group, and select the
11831 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
11832 articles, both read and unread.
11833
11834 @item Z N
11835 @kindex Z N (Summary)
11836 @findex gnus-summary-next-group
11837 Exit the group and go to the next group
11838 (@code{gnus-summary-next-group}).
11839
11840 @item Z P
11841 @kindex Z P (Summary)
11842 @findex gnus-summary-prev-group
11843 Exit the group and go to the previous group
11844 (@code{gnus-summary-prev-group}).
11845
11846 @item Z s
11847 @kindex Z s (Summary)
11848 @findex gnus-summary-save-newsrc
11849 Save the current number of read/marked articles in the dribble buffer
11850 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
11851 given a prefix, also save the @file{.newsrc} file(s).  Using this
11852 command will make exit without updating (the @kbd{Q} command) worthless.
11853 @end table
11854
11855 @vindex gnus-exit-group-hook
11856 @code{gnus-exit-group-hook} is called when you exit the current group
11857 with an ``updating'' exit.  For instance @kbd{Q}
11858 (@code{gnus-summary-exit-no-update}) does not call this hook.
11859
11860 @findex gnus-summary-wake-up-the-dead
11861 @findex gnus-dead-summary-mode
11862 @vindex gnus-kill-summary-on-exit
11863 If you're in the habit of exiting groups, and then changing your mind
11864 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
11865 If you do that, Gnus won't kill the summary buffer when you exit it.
11866 (Quelle surprise!)  Instead it will change the name of the buffer to
11867 something like @samp{*Dead Summary ... *} and install a minor mode
11868 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
11869 buffer, you'll find that all keys are mapped to a function called
11870 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
11871 summary buffer will result in a live, normal summary buffer.
11872
11873 There will never be more than one dead summary buffer at any one time.
11874
11875 @vindex gnus-use-cross-reference
11876 The data on the current group will be updated (which articles you have
11877 read, which articles you have replied to, etc.) when you exit the
11878 summary buffer.  If the @code{gnus-use-cross-reference} variable is
11879 @code{t} (which is the default), articles that are cross-referenced to
11880 this group and are marked as read, will also be marked as read in the
11881 other subscribed groups they were cross-posted to.  If this variable is
11882 neither @code{nil} nor @code{t}, the article will be marked as read in
11883 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
11884
11885
11886 @node Crosspost Handling
11887 @section Crosspost Handling
11888
11889 @cindex velveeta
11890 @cindex spamming
11891 Marking cross-posted articles as read ensures that you'll never have to
11892 read the same article more than once.  Unless, of course, somebody has
11893 posted it to several groups separately.  Posting the same article to
11894 several groups (not cross-posting) is called @dfn{spamming}, and you are
11895 by law required to send nasty-grams to anyone who perpetrates such a
11896 heinous crime.  You may want to try NoCeM handling to filter out spam
11897 (@pxref{NoCeM}).
11898
11899 Remember: Cross-posting is kinda ok, but posting the same article
11900 separately to several groups is not.  Massive cross-posting (aka.
11901 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
11902 @code{gnus-summary-mail-crosspost-complaint} command to complain about
11903 excessive crossposting (@pxref{Summary Mail Commands}).
11904
11905 @cindex cross-posting
11906 @cindex Xref
11907 @cindex @acronym{NOV}
11908 One thing that may cause Gnus to not do the cross-posting thing
11909 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
11910 (which is very nice, because it speeds things up considerably) which
11911 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
11912 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
11913 even with @sc{xover} by registering the @code{Xref} lines of all
11914 articles you actually read, but if you kill the articles, or just mark
11915 them as read without reading them, Gnus will not get a chance to snoop
11916 the @code{Xref} lines out of these articles, and will be unable to use
11917 the cross reference mechanism.
11918
11919 @cindex LIST overview.fmt
11920 @cindex overview.fmt
11921 To check whether your @acronym{NNTP} server includes the @code{Xref} header
11922 in its overview files, try @samp{telnet your.nntp.server nntp},
11923 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
11924 overview.fmt}.  This may not work, but if it does, and the last line you
11925 get does not read @samp{Xref:full}, then you should shout and whine at
11926 your news admin until she includes the @code{Xref} header in the
11927 overview files.
11928
11929 If you want Gnus to get the @code{Xref}s right all the time, you have to
11930 set @code{nntp-nov-is-evil} to @code{t}, which slows things down
11931 considerably.  Also @pxref{Slow/Expensive Connection}.
11932
11933 C'est la vie.
11934
11935 For an alternative approach, @pxref{Duplicate Suppression}.
11936
11937
11938 @node Duplicate Suppression
11939 @section Duplicate Suppression
11940
11941 By default, Gnus tries to make sure that you don't have to read the same
11942 article more than once by utilizing the crossposting mechanism
11943 (@pxref{Crosspost Handling}).  However, that simple and efficient
11944 approach may not work satisfactory for some users for various
11945 reasons.
11946
11947 @enumerate
11948 @item
11949 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
11950 is evil and not very common.
11951
11952 @item
11953 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
11954 @file{.overview} data bases.  This is evil and all too common, alas.
11955
11956 @item
11957 You may be reading the same group (or several related groups) from
11958 different @acronym{NNTP} servers.
11959
11960 @item
11961 You may be getting mail that duplicates articles posted to groups.
11962 @end enumerate
11963
11964 I'm sure there are other situations where @code{Xref} handling fails as
11965 well, but these four are the most common situations.
11966
11967 If, and only if, @code{Xref} handling fails for you, then you may
11968 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
11969 will remember the @code{Message-ID}s of all articles you have read or
11970 otherwise marked as read, and then, as if by magic, mark them as read
11971 all subsequent times you see them---in @emph{all} groups.  Using this
11972 mechanism is quite likely to be somewhat inefficient, but not overly
11973 so.  It's certainly preferable to reading the same articles more than
11974 once.
11975
11976 Duplicate suppression is not a very subtle instrument.  It's more like a
11977 sledge hammer than anything else.  It works in a very simple
11978 fashion---if you have marked an article as read, it adds this Message-ID
11979 to a cache.  The next time it sees this Message-ID, it will mark the
11980 article as read with the @samp{M} mark.  It doesn't care what group it
11981 saw the article in.
11982
11983 @table @code
11984 @item gnus-suppress-duplicates
11985 @vindex gnus-suppress-duplicates
11986 If non-@code{nil}, suppress duplicates.
11987
11988 @item gnus-save-duplicate-list
11989 @vindex gnus-save-duplicate-list
11990 If non-@code{nil}, save the list of duplicates to a file.  This will
11991 make startup and shutdown take longer, so the default is @code{nil}.
11992 However, this means that only duplicate articles read in a single Gnus
11993 session are suppressed.
11994
11995 @item gnus-duplicate-list-length
11996 @vindex gnus-duplicate-list-length
11997 This variable says how many @code{Message-ID}s to keep in the duplicate
11998 suppression list.  The default is 10000.
11999
12000 @item gnus-duplicate-file
12001 @vindex gnus-duplicate-file
12002 The name of the file to store the duplicate suppression list in.  The
12003 default is @file{~/News/suppression}.
12004 @end table
12005
12006 If you have a tendency to stop and start Gnus often, setting
12007 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
12008 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
12009 the other hand, saving the list makes startup and shutdown much slower,
12010 so that means that if you stop and start Gnus often, you should set
12011 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
12012 to you to figure out, I think.
12013
12014 @node Security
12015 @section Security
12016
12017 Gnus is able to verify signed messages or decrypt encrypted messages.
12018 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
12019 and @acronym{S/MIME}, however you need some external programs to get
12020 things to work:
12021
12022 @enumerate
12023 @item
12024 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
12025 install an OpenPGP implementation such as GnuPG.  The Lisp interface
12026 to GnuPG included with Emacs is called EasyPG (@pxref{Top, ,EasyPG,
12027 epa, EasyPG Assistant user's manual}), but PGG (@pxref{Top, ,PGG, pgg,
12028 PGG Manual}), Mailcrypt, and gpg.el are also supported.
12029
12030 @item
12031 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
12032 or newer is recommended.
12033
12034 @end enumerate
12035
12036 The variables that control security functionality on reading/composing
12037 messages include:
12038
12039 @table @code
12040 @item mm-verify-option
12041 @vindex mm-verify-option
12042 Option of verifying signed parts.  @code{never}, not verify;
12043 @code{always}, always verify; @code{known}, only verify known
12044 protocols.  Otherwise, ask user.
12045
12046 @item mm-decrypt-option
12047 @vindex mm-decrypt-option
12048 Option of decrypting encrypted parts.  @code{never}, no decryption;
12049 @code{always}, always decrypt; @code{known}, only decrypt known
12050 protocols.  Otherwise, ask user.
12051
12052 @item mm-sign-option
12053 @vindex mm-sign-option
12054 Option of creating signed parts.  @code{nil}, use default signing
12055 keys; @code{guided}, ask user to select signing keys from the menu.
12056
12057 @item mm-encrypt-option
12058 @vindex mm-encrypt-option
12059 Option of creating encrypted parts.  @code{nil}, use the first
12060 public-key matching the @samp{From:} header as the recipient;
12061 @code{guided}, ask user to select recipient keys from the menu.
12062
12063 @item mml1991-use
12064 @vindex mml1991-use
12065 Symbol indicating elisp interface to OpenPGP implementation for
12066 @acronym{PGP} messages.  The default is @code{epg}, but @code{pgg},
12067 @code{mailcrypt}, and @code{gpg} are also supported although
12068 deprecated.  By default, Gnus uses the first available interface in
12069 this order.
12070
12071 @item mml2015-use
12072 @vindex mml2015-use
12073 Symbol indicating elisp interface to OpenPGP implementation for
12074 @acronym{PGP/MIME} messages.  The default is @code{epg}, but
12075 @code{pgg}, @code{mailcrypt}, and @code{gpg} are also supported
12076 although deprecated.  By default, Gnus uses the first available
12077 interface in this order.
12078
12079 @end table
12080
12081 By default the buttons that display security information are not
12082 shown, because they clutter reading the actual e-mail.  You can type
12083 @kbd{K b} manually to display the information.  Use the
12084 @code{gnus-buttonized-mime-types} and
12085 @code{gnus-unbuttonized-mime-types} variables to control this
12086 permanently.  @ref{MIME Commands} for further details, and hints on
12087 how to customize these variables to always display security
12088 information.
12089
12090 @cindex snarfing keys
12091 @cindex importing PGP keys
12092 @cindex PGP key ring import
12093 Snarfing OpenPGP keys (i.e., importing keys from articles into your
12094 key ring) is not supported explicitly through a menu item or command,
12095 rather Gnus do detect and label keys as @samp{application/pgp-keys},
12096 allowing you to specify whatever action you think is appropriate
12097 through the usual @acronym{MIME} infrastructure.  You can use a
12098 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
12099 Emacs MIME Manual}) such as the following to import keys using GNU
12100 Privacy Guard when you click on the @acronym{MIME} button
12101 (@pxref{Using MIME}).
12102
12103 @example
12104 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
12105 @end example
12106 @noindent
12107 This happens to also be the default action defined in
12108 @code{mailcap-mime-data}.
12109
12110 More information on how to set things for sending outgoing signed and
12111 encrypted messages up can be found in the message manual
12112 (@pxref{Security, ,Security, message, Message Manual}).
12113
12114 @node Mailing List
12115 @section Mailing List
12116 @cindex mailing list
12117 @cindex RFC 2396
12118
12119 @kindex A M (summary)
12120 @findex gnus-mailing-list-insinuate
12121 Gnus understands some mailing list fields of RFC 2369.  To enable it,
12122 add a @code{to-list} group parameter (@pxref{Group Parameters}),
12123 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
12124 summary buffer.
12125
12126 That enables the following commands to the summary buffer:
12127
12128 @table @kbd
12129
12130 @item C-c C-n h
12131 @kindex C-c C-n h (Summary)
12132 @findex gnus-mailing-list-help
12133 Send a message to fetch mailing list help, if List-Help field exists.
12134
12135 @item C-c C-n s
12136 @kindex C-c C-n s (Summary)
12137 @findex gnus-mailing-list-subscribe
12138 Send a message to subscribe the mailing list, if List-Subscribe field exists.
12139
12140 @item C-c C-n u
12141 @kindex C-c C-n u (Summary)
12142 @findex gnus-mailing-list-unsubscribe
12143 Send a message to unsubscribe the mailing list, if List-Unsubscribe
12144 field exists.
12145
12146 @item C-c C-n p
12147 @kindex C-c C-n p (Summary)
12148 @findex gnus-mailing-list-post
12149 Post to the mailing list, if List-Post field exists.
12150
12151 @item C-c C-n o
12152 @kindex C-c C-n o (Summary)
12153 @findex gnus-mailing-list-owner
12154 Send a message to the mailing list owner, if List-Owner field exists.
12155
12156 @item C-c C-n a
12157 @kindex C-c C-n a (Summary)
12158 @findex gnus-mailing-list-archive
12159 Browse the mailing list archive, if List-Archive field exists.
12160
12161 @end table
12162
12163
12164 @node Article Buffer
12165 @chapter Article Buffer
12166 @cindex article buffer
12167
12168 The articles are displayed in the article buffer, of which there is only
12169 one.  All the summary buffers share the same article buffer unless you
12170 tell Gnus otherwise.
12171
12172 @menu
12173 * Hiding Headers::              Deciding what headers should be displayed.
12174 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
12175 * HTML::                        Reading @acronym{HTML} messages.
12176 * Customizing Articles::        Tailoring the look of the articles.
12177 * Article Keymap::              Keystrokes available in the article buffer.
12178 * Misc Article::                Other stuff.
12179 @end menu
12180
12181
12182 @node Hiding Headers
12183 @section Hiding Headers
12184 @cindex hiding headers
12185 @cindex deleting headers
12186
12187 The top section of each article is the @dfn{head}.  (The rest is the
12188 @dfn{body}, but you may have guessed that already.)
12189
12190 @vindex gnus-show-all-headers
12191 There is a lot of useful information in the head: the name of the person
12192 who wrote the article, the date it was written and the subject of the
12193 article.  That's well and nice, but there's also lots of information
12194 most people do not want to see---what systems the article has passed
12195 through before reaching you, the @code{Message-ID}, the
12196 @code{References}, etc. ad nauseam---and you'll probably want to get rid
12197 of some of those lines.  If you want to keep all those lines in the
12198 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
12199
12200 Gnus provides you with two variables for sifting headers:
12201
12202 @table @code
12203
12204 @item gnus-visible-headers
12205 @vindex gnus-visible-headers
12206 If this variable is non-@code{nil}, it should be a regular expression
12207 that says what headers you wish to keep in the article buffer.  All
12208 headers that do not match this variable will be hidden.
12209
12210 For instance, if you only want to see the name of the person who wrote
12211 the article and the subject, you'd say:
12212
12213 @lisp
12214 (setq gnus-visible-headers "^From:\\|^Subject:")
12215 @end lisp
12216
12217 This variable can also be a list of regexps to match headers to
12218 remain visible.
12219
12220 @item gnus-ignored-headers
12221 @vindex gnus-ignored-headers
12222 This variable is the reverse of @code{gnus-visible-headers}.  If this
12223 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
12224 should be a regular expression that matches all lines that you want to
12225 hide.  All lines that do not match this variable will remain visible.
12226
12227 For instance, if you just want to get rid of the @code{References} line
12228 and the @code{Xref} line, you might say:
12229
12230 @lisp
12231 (setq gnus-ignored-headers "^References:\\|^Xref:")
12232 @end lisp
12233
12234 This variable can also be a list of regexps to match headers to
12235 be removed.
12236
12237 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
12238 variable will have no effect.
12239
12240 @end table
12241
12242 @vindex gnus-sorted-header-list
12243 Gnus can also sort the headers for you.  (It does this by default.)  You
12244 can control the sorting by setting the @code{gnus-sorted-header-list}
12245 variable.  It is a list of regular expressions that says in what order
12246 the headers are to be displayed.
12247
12248 For instance, if you want the name of the author of the article first,
12249 and then the subject, you might say something like:
12250
12251 @lisp
12252 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
12253 @end lisp
12254
12255 Any headers that are to remain visible, but are not listed in this
12256 variable, will be displayed in random order after all the headers listed in this variable.
12257
12258 @findex gnus-article-hide-boring-headers
12259 @vindex gnus-boring-article-headers
12260 You can hide further boring headers by setting
12261 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
12262 does depends on the @code{gnus-boring-article-headers} variable.  It's a
12263 list, but this list doesn't actually contain header names.  Instead it
12264 lists various @dfn{boring conditions} that Gnus can check and remove
12265 from sight.
12266
12267 These conditions are:
12268 @table @code
12269 @item empty
12270 Remove all empty headers.
12271 @item followup-to
12272 Remove the @code{Followup-To} header if it is identical to the
12273 @code{Newsgroups} header.
12274 @item reply-to
12275 Remove the @code{Reply-To} header if it lists the same addresses as
12276 the @code{From} header, or if the @code{broken-reply-to} group
12277 parameter is set.
12278 @item newsgroups
12279 Remove the @code{Newsgroups} header if it only contains the current group
12280 name.
12281 @item to-address
12282 Remove the @code{To} header if it only contains the address identical to
12283 the current group's @code{to-address} parameter.
12284 @item to-list
12285 Remove the @code{To} header if it only contains the address identical to
12286 the current group's @code{to-list} parameter.
12287 @item cc-list
12288 Remove the @code{Cc} header if it only contains the address identical to
12289 the current group's @code{to-list} parameter.
12290 @item date
12291 Remove the @code{Date} header if the article is less than three days
12292 old.
12293 @item long-to
12294 Remove the @code{To} and/or @code{Cc} header if it is very long.
12295 @item many-to
12296 Remove all @code{To} and/or @code{Cc} headers if there are more than one.
12297 @end table
12298
12299 To include these three elements, you could say something like:
12300
12301 @lisp
12302 (setq gnus-boring-article-headers
12303       '(empty followup-to reply-to))
12304 @end lisp
12305
12306 This is also the default value for this variable.
12307
12308
12309 @node Using MIME
12310 @section Using MIME
12311 @cindex @acronym{MIME}
12312
12313 Mime is a standard for waving your hands through the air, aimlessly,
12314 while people stand around yawning.
12315
12316 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
12317 while all newsreaders die of fear.
12318
12319 @acronym{MIME} may specify what character set the article uses, the encoding
12320 of the characters, and it also makes it possible to embed pictures and
12321 other naughty stuff in innocent-looking articles.
12322
12323 @vindex gnus-display-mime-function
12324 @findex gnus-display-mime
12325 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
12326 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
12327 default, which creates a bundle of clickable buttons that can be used to
12328 display, save and manipulate the @acronym{MIME} objects.
12329
12330 The following commands are available when you have placed point over a
12331 @acronym{MIME} button:
12332
12333 @table @kbd
12334 @findex gnus-article-press-button
12335 @item RET (Article)
12336 @kindex RET (Article)
12337 @itemx BUTTON-2 (Article)
12338 Toggle displaying of the @acronym{MIME} object
12339 (@code{gnus-article-press-button}).  If built-in viewers can not display
12340 the object, Gnus resorts to external viewers in the @file{mailcap}
12341 files.  If a viewer has the @samp{copiousoutput} specification, the
12342 object is displayed inline.
12343
12344 @findex gnus-mime-view-part
12345 @item M-RET (Article)
12346 @kindex M-RET (Article)
12347 @itemx v (Article)
12348 Prompt for a method, and then view the @acronym{MIME} object using this
12349 method (@code{gnus-mime-view-part}).
12350
12351 @findex gnus-mime-view-part-as-type
12352 @item t (Article)
12353 @kindex t (Article)
12354 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
12355 (@code{gnus-mime-view-part-as-type}).
12356
12357 @findex gnus-mime-view-part-as-charset
12358 @item C (Article)
12359 @kindex C (Article)
12360 Prompt for a charset, and then view the @acronym{MIME} object using this
12361 charset (@code{gnus-mime-view-part-as-charset}).
12362
12363 @findex gnus-mime-save-part
12364 @item o (Article)
12365 @kindex o (Article)
12366 Prompt for a file name, and then save the @acronym{MIME} object
12367 (@code{gnus-mime-save-part}).
12368
12369 @findex gnus-mime-save-part-and-strip
12370 @item C-o (Article)
12371 @kindex C-o (Article)
12372 Prompt for a file name, then save the @acronym{MIME} object and strip it from
12373 the article.  Then proceed to article editing, where a reasonable
12374 suggestion is being made on how the altered article should look
12375 like.  The stripped @acronym{MIME} object will be referred via the
12376 message/external-body @acronym{MIME} type.
12377 (@code{gnus-mime-save-part-and-strip}).
12378
12379 @findex gnus-mime-replace-part
12380 @item r (Article)
12381 @kindex r (Article)
12382 Prompt for a file name, replace the @acronym{MIME} object with an
12383 external body refering to the file via the message/external-body
12384 @acronym{MIME} type.  (@code{gnus-mime-replace-part}).
12385
12386 @findex gnus-mime-delete-part
12387 @item d (Article)
12388 @kindex d (Article)
12389 Delete the @acronym{MIME} object from the article and replace it with some
12390 information about the removed @acronym{MIME} object
12391 (@code{gnus-mime-delete-part}).
12392
12393 @c FIXME: gnus-auto-select-part should be documented here
12394
12395 @findex gnus-mime-copy-part
12396 @item c (Article)
12397 @kindex c (Article)
12398 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
12399 (@code{gnus-mime-copy-part}).  If given a prefix, copy the raw contents
12400 without decoding.  If given a numerical prefix, you can do semi-manual
12401 charset stuff (see @code{gnus-summary-show-article-charset-alist} in
12402 @ref{Paging the Article}).  Compressed files like @file{.gz} and
12403 @file{.bz2} are automatically decompressed if
12404 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
12405 Accessing Compressed Files, emacs, The Emacs Editor}).
12406
12407 @findex gnus-mime-print-part
12408 @item p (Article)
12409 @kindex p (Article)
12410 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
12411 command respects the @samp{print=} specifications in the
12412 @file{.mailcap} file.
12413
12414 @findex gnus-mime-inline-part
12415 @item i (Article)
12416 @kindex i (Article)
12417 Insert the contents of the @acronym{MIME} object into the buffer
12418 (@code{gnus-mime-inline-part}) as @samp{text/plain}.  If given a prefix, insert
12419 the raw contents without decoding.  If given a numerical prefix, you can
12420 do semi-manual charset stuff (see
12421 @code{gnus-summary-show-article-charset-alist} in @ref{Paging the
12422 Article}).  Compressed files like @file{.gz} and @file{.bz2} are
12423 automatically decompressed depending on @code{jka-compr} regardless of
12424 @code{auto-compression-mode} (@pxref{Compressed Files,, Accessing
12425 Compressed Files, emacs, The Emacs Editor}).
12426
12427 @findex gnus-mime-view-part-internally
12428 @item E (Article)
12429 @kindex E (Article)
12430 View the @acronym{MIME} object with an internal viewer.  If no internal
12431 viewer is available, use an external viewer
12432 (@code{gnus-mime-view-part-internally}).
12433
12434 @findex gnus-mime-view-part-externally
12435 @item e (Article)
12436 @kindex e (Article)
12437 View the @acronym{MIME} object with an external viewer.
12438 (@code{gnus-mime-view-part-externally}).
12439
12440 @findex gnus-mime-pipe-part
12441 @item | (Article)
12442 @kindex | (Article)
12443 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
12444
12445 @findex gnus-mime-action-on-part
12446 @item . (Article)
12447 @kindex . (Article)
12448 Interactively run an action on the @acronym{MIME} object
12449 (@code{gnus-mime-action-on-part}).
12450
12451 @end table
12452
12453 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
12454 determines which parts to do this with is described in the Emacs
12455 @acronym{MIME} manual.
12456
12457 It might be best to just use the toggling functions from the article
12458 buffer to avoid getting nasty surprises.  (For instance, you enter the
12459 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
12460 decoded the sound file in the article and some horrible sing-a-long song
12461 comes screaming out your speakers, and you can't find the volume button,
12462 because there isn't one, and people are starting to look at you, and you
12463 try to stop the program, but you can't, and you can't find the program
12464 to control the volume, and everybody else in the room suddenly decides
12465 to look at you disdainfully, and you'll feel rather stupid.)
12466
12467 Any similarity to real events and people is purely coincidental.  Ahem.
12468
12469 Also @pxref{MIME Commands}.
12470
12471
12472 @node HTML
12473 @section @acronym{HTML}
12474 @cindex @acronym{HTML}
12475
12476 If you have @code{w3m} installed on your system, Gnus can display
12477 @acronym{HTML} articles in the article buffer.  There are many Gnus
12478 add-ons for doing this, using various approaches, but there's one
12479 (sort of) built-in method that's used by default.
12480
12481 For a complete overview, consult @xref{Display Customization,
12482 ,Display Customization, emacs-mime, The Emacs MIME Manual}.  This
12483 section only describes the default method.
12484
12485 @table @code
12486 @item mm-text-html-renderer
12487 @vindex mm-text-html-renderer
12488 If set to @code{gnus-article-html}, Gnus will use the built-in method,
12489 that's based on @code{curl} and @code{w3m}.
12490
12491 @item gnus-blocked-images
12492 @vindex gnus-blocked-images
12493 Images that have @acronym{URL}s that match this regexp won't be
12494 fetched and displayed.  For instance, do block all @acronym{URL}s that
12495 have the string ``ads'' in them, do the following:
12496
12497 @lisp
12498 (setq gnus-blocked-images "ads")
12499 @end lisp
12500
12501 The default is to block all external images.
12502
12503 @item gnus-html-cache-directory
12504 @vindex gnus-html-cache-directory
12505 Gnus will download and cache images according to how
12506 @code{gnus-blocked-images} is set.  These images will be stored in
12507 this directory.
12508
12509 @item gnus-html-cache-size
12510 @vindex gnus-html-cache-size
12511 When @code{gnus-html-cache-size} bytes have been used in that
12512 directory, the oldest files will be deleted.  The default is 500MB.
12513
12514 @item gnus-html-frame-width
12515 @vindex gnus-html-frame-width
12516 The width to use when rendering HTML.  The default is 70.
12517
12518 @item gnus-max-image-proportion
12519 @vindex gnus-max-image-proportion
12520 How big pictures displayed are in relation to the window they're in.
12521 A value of 0.7 (the default) means that they are allowed to take up
12522 70% of the width and height of the window.  If they are larger than
12523 this, and Emacs supports it, then the images will be rescaled down to
12524 fit these criteria.
12525
12526 @end table
12527
12528 To use this, make sure that you have @code{w3m} and @code{curl}
12529 installed.  If you have, then Gnus should display @acronym{HTML}
12530 automatically. 
12531
12532
12533
12534 @node Customizing Articles
12535 @section Customizing Articles
12536 @cindex article customization
12537
12538 A slew of functions for customizing how the articles are to look like
12539 exist.  You can call these functions interactively
12540 (@pxref{Article Washing}), or you can have them
12541 called automatically when you select the articles.
12542
12543 To have them called automatically, you should set the corresponding
12544 ``treatment'' variable.  For instance, to have headers hidden, you'd set
12545 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
12546 be set, but first we discuss the values these variables can have.
12547
12548 Note: Some values, while valid, make little sense.  Check the list below
12549 for sensible values.
12550
12551 @enumerate
12552 @item
12553 @code{nil}: Don't do this treatment.
12554
12555 @item
12556 @code{t}: Do this treatment on all body parts.
12557
12558 @item
12559 @code{head}: Do the treatment on the headers.
12560
12561 @item
12562 @code{first}: Do this treatment on the first body part.
12563
12564 @item
12565 @code{last}: Do this treatment on the last body part.
12566
12567 @item
12568 An integer: Do this treatment on all body parts that have a length less
12569 than this number.
12570
12571 @item
12572 A list of strings: Do this treatment on all body parts that are in
12573 articles that are read in groups that have names that match one of the
12574 regexps in the list.
12575
12576 @item
12577 A list where the first element is not a string:
12578
12579 The list is evaluated recursively.  The first element of the list is a
12580 predicate.  The following predicates are recognized: @code{or},
12581 @code{and}, @code{not} and @code{typep}.  Here's an example:
12582
12583 @lisp
12584 (or last
12585     (typep "text/x-vcard"))
12586 @end lisp
12587
12588 @end enumerate
12589
12590 You may have noticed that the word @dfn{part} is used here.  This refers
12591 to the fact that some messages are @acronym{MIME} multipart articles that may
12592 be divided into several parts.  Articles that are not multiparts are
12593 considered to contain just a single part.
12594
12595 @vindex gnus-article-treat-types
12596 Are the treatments applied to all sorts of multipart parts?  Yes, if you
12597 want to, but by default, only @samp{text/plain} parts are given the
12598 treatment.  This is controlled by the @code{gnus-article-treat-types}
12599 variable, which is a list of regular expressions that are matched to the
12600 type of the part.  This variable is ignored if the value of the
12601 controlling variable is a predicate list, as described above.
12602
12603 @ifinfo
12604 @c Avoid sort of redundant entries in the same section for the printed
12605 @c manual, but add them in info to allow `i gnus-treat-foo-bar RET' or
12606 @c `i foo-bar'.
12607 @vindex gnus-treat-buttonize
12608 @vindex gnus-treat-buttonize-head
12609 @vindex gnus-treat-capitalize-sentences
12610 @vindex gnus-treat-overstrike
12611 @vindex gnus-treat-strip-cr
12612 @vindex gnus-treat-strip-headers-in-body
12613 @vindex gnus-treat-strip-leading-blank-lines
12614 @vindex gnus-treat-strip-multiple-blank-lines
12615 @vindex gnus-treat-strip-pem
12616 @vindex gnus-treat-strip-trailing-blank-lines
12617 @vindex gnus-treat-unsplit-urls
12618 @vindex gnus-treat-wash-html
12619 @vindex gnus-treat-date-english
12620 @vindex gnus-treat-date-iso8601
12621 @vindex gnus-treat-date-lapsed
12622 @vindex gnus-treat-date-local
12623 @vindex gnus-treat-date-original
12624 @vindex gnus-treat-date-user-defined
12625 @vindex gnus-treat-date-ut
12626 @vindex gnus-treat-from-picon
12627 @vindex gnus-treat-mail-picon
12628 @vindex gnus-treat-newsgroups-picon
12629 @vindex gnus-treat-display-smileys
12630 @vindex gnus-treat-body-boundary
12631 @vindex gnus-treat-display-x-face
12632 @vindex gnus-treat-display-face
12633 @vindex gnus-treat-emphasize
12634 @vindex gnus-treat-fill-article
12635 @vindex gnus-treat-fill-long-lines
12636 @vindex gnus-treat-hide-boring-headers
12637 @vindex gnus-treat-hide-citation
12638 @vindex gnus-treat-hide-citation-maybe
12639 @vindex gnus-treat-hide-headers
12640 @vindex gnus-treat-hide-signature
12641 @vindex gnus-treat-strip-banner
12642 @vindex gnus-treat-strip-list-identifiers
12643 @vindex gnus-treat-highlight-citation
12644 @vindex gnus-treat-highlight-headers
12645 @vindex gnus-treat-highlight-signature
12646 @vindex gnus-treat-play-sounds
12647 @vindex gnus-treat-translate
12648 @vindex gnus-treat-x-pgp-sig
12649 @vindex gnus-treat-unfold-headers
12650 @vindex gnus-treat-fold-headers
12651 @vindex gnus-treat-fold-newsgroups
12652 @vindex gnus-treat-leading-whitespace
12653 @end ifinfo
12654
12655 The following treatment options are available.  The easiest way to
12656 customize this is to examine the @code{gnus-article-treat} customization
12657 group.  Values in parenthesis are suggested sensible values.  Others are
12658 possible but those listed are probably sufficient for most people.
12659
12660 @table @code
12661 @item gnus-treat-buttonize (t, integer)
12662 @item gnus-treat-buttonize-head (head)
12663
12664 @xref{Article Buttons}.
12665
12666 @item gnus-treat-capitalize-sentences (t, integer)
12667 @item gnus-treat-overstrike (t, integer)
12668 @item gnus-treat-strip-cr (t, integer)
12669 @item gnus-treat-strip-headers-in-body (t, integer)
12670 @item gnus-treat-strip-leading-blank-lines (t, first, integer)
12671 @item gnus-treat-strip-multiple-blank-lines (t, integer)
12672 @item gnus-treat-strip-pem (t, last, integer)
12673 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
12674 @item gnus-treat-unsplit-urls (t, integer)
12675 @item gnus-treat-wash-html (t, integer)
12676
12677 @xref{Article Washing}.
12678
12679 @item gnus-treat-date-english (head)
12680 @item gnus-treat-date-iso8601 (head)
12681 @item gnus-treat-date-lapsed (head)
12682 @item gnus-treat-date-local (head)
12683 @item gnus-treat-date-original (head)
12684 @item gnus-treat-date-user-defined (head)
12685 @item gnus-treat-date-ut (head)
12686
12687 @xref{Article Date}.
12688
12689 @item gnus-treat-from-picon (head)
12690 @item gnus-treat-mail-picon (head)
12691 @item gnus-treat-newsgroups-picon (head)
12692
12693 @xref{Picons}.
12694
12695 @item gnus-treat-display-smileys (t, integer)
12696
12697 @item gnus-treat-body-boundary (head)
12698
12699 @vindex gnus-body-boundary-delimiter
12700 Adds a delimiter between header and body, the string used as delimiter
12701 is controlled by @code{gnus-body-boundary-delimiter}.
12702
12703 @xref{Smileys}.
12704
12705 @vindex gnus-treat-display-x-face
12706 @item gnus-treat-display-x-face (head)
12707
12708 @xref{X-Face}.
12709
12710 @vindex gnus-treat-display-face
12711 @item gnus-treat-display-face (head)
12712
12713 @xref{Face}.
12714
12715 @vindex gnus-treat-emphasize
12716 @item gnus-treat-emphasize (t, head, integer)
12717 @vindex gnus-treat-fill-article
12718 @item gnus-treat-fill-article (t, integer)
12719 @vindex gnus-treat-fill-long-lines
12720 @item gnus-treat-fill-long-lines (t, integer)
12721 @vindex gnus-treat-hide-boring-headers
12722 @item gnus-treat-hide-boring-headers (head)
12723 @vindex gnus-treat-hide-citation
12724 @item gnus-treat-hide-citation (t, integer)
12725 @vindex gnus-treat-hide-citation-maybe
12726 @item gnus-treat-hide-citation-maybe (t, integer)
12727 @vindex gnus-treat-hide-headers
12728 @item gnus-treat-hide-headers (head)
12729 @vindex gnus-treat-hide-signature
12730 @item gnus-treat-hide-signature (t, last)
12731 @vindex gnus-treat-strip-banner
12732 @item gnus-treat-strip-banner (t, last)
12733 @vindex gnus-treat-strip-list-identifiers
12734 @item gnus-treat-strip-list-identifiers (head)
12735
12736 @xref{Article Hiding}.
12737
12738 @vindex gnus-treat-highlight-citation
12739 @item gnus-treat-highlight-citation (t, integer)
12740 @vindex gnus-treat-highlight-headers
12741 @item gnus-treat-highlight-headers (head)
12742 @vindex gnus-treat-highlight-signature
12743 @item gnus-treat-highlight-signature (t, last, integer)
12744
12745 @xref{Article Highlighting}.
12746
12747 @vindex gnus-treat-play-sounds
12748 @item gnus-treat-play-sounds
12749 @vindex gnus-treat-translate
12750 @item gnus-treat-translate
12751 @item gnus-treat-ansi-sequences (t)
12752 @vindex gnus-treat-x-pgp-sig
12753 @item gnus-treat-x-pgp-sig (head)
12754
12755 @vindex gnus-treat-unfold-headers
12756 @item gnus-treat-unfold-headers (head)
12757 @vindex gnus-treat-fold-headers
12758 @item gnus-treat-fold-headers (head)
12759 @vindex gnus-treat-fold-newsgroups
12760 @item gnus-treat-fold-newsgroups (head)
12761 @vindex gnus-treat-leading-whitespace
12762 @item gnus-treat-leading-whitespace (head)
12763
12764 @xref{Article Header}.
12765
12766
12767 @end table
12768
12769 @vindex gnus-part-display-hook
12770 You can, of course, write your own functions to be called from
12771 @code{gnus-part-display-hook}.  The functions are called narrowed to the
12772 part, and you can do anything you like, pretty much.  There is no
12773 information that you have to keep in the buffer---you can change
12774 everything.
12775
12776
12777 @node Article Keymap
12778 @section Article Keymap
12779
12780 Most of the keystrokes in the summary buffer can also be used in the
12781 article buffer.  They should behave as if you typed them in the summary
12782 buffer, which means that you don't actually have to have a summary
12783 buffer displayed while reading.  You can do it all from the article
12784 buffer.
12785
12786 @kindex v (Article)
12787 @cindex keys, reserved for users (Article)
12788 The key @kbd{v} is reserved for users.  You can bind it to some
12789 command or better use it as a prefix key.
12790
12791 A few additional keystrokes are available:
12792
12793 @table @kbd
12794
12795 @item SPACE
12796 @kindex SPACE (Article)
12797 @findex gnus-article-next-page
12798 Scroll forwards one page (@code{gnus-article-next-page}).
12799 This is exactly the same as @kbd{h SPACE h}.
12800
12801 @item DEL
12802 @kindex DEL (Article)
12803 @findex gnus-article-prev-page
12804 Scroll backwards one page (@code{gnus-article-prev-page}).
12805 This is exactly the same as @kbd{h DEL h}.
12806
12807 @item C-c ^
12808 @kindex C-c ^ (Article)
12809 @findex gnus-article-refer-article
12810 If point is in the neighborhood of a @code{Message-ID} and you press
12811 @kbd{C-c ^}, Gnus will try to get that article from the server
12812 (@code{gnus-article-refer-article}).
12813
12814 @item C-c C-m
12815 @kindex C-c C-m (Article)
12816 @findex gnus-article-mail
12817 Send a reply to the address near point (@code{gnus-article-mail}).  If
12818 given a prefix, include the mail.
12819
12820 @item s
12821 @kindex s (Article)
12822 @findex gnus-article-show-summary
12823 Reconfigure the buffers so that the summary buffer becomes visible
12824 (@code{gnus-article-show-summary}).
12825
12826 @item ?
12827 @kindex ? (Article)
12828 @findex gnus-article-describe-briefly
12829 Give a very brief description of the available keystrokes
12830 (@code{gnus-article-describe-briefly}).
12831
12832 @item TAB
12833 @kindex TAB (Article)
12834 @findex gnus-article-next-button
12835 Go to the next button, if any (@code{gnus-article-next-button}).  This
12836 only makes sense if you have buttonizing turned on.
12837
12838 @item M-TAB
12839 @kindex M-TAB (Article)
12840 @findex gnus-article-prev-button
12841 Go to the previous button, if any (@code{gnus-article-prev-button}).
12842
12843 @item R
12844 @kindex R (Article)
12845 @findex gnus-article-reply-with-original
12846 Send a reply to the current article and yank the current article
12847 (@code{gnus-article-reply-with-original}).  If the region is active,
12848 only yank the text in the region.
12849
12850 @item S W
12851 @kindex S W (Article)
12852 @findex gnus-article-wide-reply-with-original
12853 Send a wide reply to the current article and yank the current article
12854 (@code{gnus-article-wide-reply-with-original}).  If the region is
12855 active, only yank the text in the region.
12856
12857 @item F
12858 @kindex F (Article)
12859 @findex gnus-article-followup-with-original
12860 Send a followup to the current article and yank the current article
12861 (@code{gnus-article-followup-with-original}).  If the region is active,
12862 only yank the text in the region.
12863
12864
12865 @end table
12866
12867
12868 @node Misc Article
12869 @section Misc Article
12870
12871 @table @code
12872
12873 @item gnus-single-article-buffer
12874 @vindex gnus-single-article-buffer
12875 @cindex article buffers, several
12876 If non-@code{nil}, use the same article buffer for all the groups.
12877 (This is the default.)  If @code{nil}, each group will have its own
12878 article buffer.
12879
12880 @vindex gnus-article-decode-hook
12881 @item gnus-article-decode-hook
12882 @cindex @acronym{MIME}
12883 Hook used to decode @acronym{MIME} articles.  The default value is
12884 @code{(article-decode-charset article-decode-encoded-words)}
12885
12886 @vindex gnus-article-prepare-hook
12887 @item gnus-article-prepare-hook
12888 This hook is called right after the article has been inserted into the
12889 article buffer.  It is mainly intended for functions that do something
12890 depending on the contents; it should probably not be used for changing
12891 the contents of the article buffer.
12892
12893 @item gnus-article-mode-hook
12894 @vindex gnus-article-mode-hook
12895 Hook called in article mode buffers.
12896
12897 @item gnus-article-mode-syntax-table
12898 @vindex gnus-article-mode-syntax-table
12899 Syntax table used in article buffers.  It is initialized from
12900 @code{text-mode-syntax-table}.
12901
12902 @vindex gnus-article-over-scroll
12903 @item gnus-article-over-scroll
12904 If non-@code{nil}, allow scrolling the article buffer even when there
12905 no more new text to scroll in.  The default is @code{nil}.
12906
12907 @vindex gnus-article-mode-line-format
12908 @item gnus-article-mode-line-format
12909 This variable is a format string along the same lines as
12910 @code{gnus-summary-mode-line-format} (@pxref{Summary Buffer Mode
12911 Line}).  It accepts the same format specifications as that variable,
12912 with two extensions:
12913
12914 @table @samp
12915
12916 @item w
12917 The @dfn{wash status} of the article.  This is a short string with one
12918 character for each possible article wash operation that may have been
12919 performed.  The characters and their meaning:
12920
12921 @table @samp
12922
12923 @item c
12924 Displayed when cited text may be hidden in the article buffer.
12925
12926 @item h
12927 Displayed when headers are hidden in the article buffer.
12928
12929 @item p
12930 Displayed when article is digitally signed or encrypted, and Gnus has
12931 hidden the security headers.  (N.B. does not tell anything about
12932 security status, i.e. good or bad signature.)
12933
12934 @item s
12935 Displayed when the signature has been hidden in the Article buffer.
12936
12937 @item o
12938 Displayed when Gnus has treated overstrike characters in the article buffer.
12939
12940 @item e
12941 Displayed when Gnus has treated emphasized strings in the article buffer.
12942
12943 @end table
12944
12945 @item m
12946 The number of @acronym{MIME} parts in the article.
12947
12948 @end table
12949
12950 @vindex gnus-break-pages
12951
12952 @item gnus-break-pages
12953 Controls whether @dfn{page breaking} is to take place.  If this variable
12954 is non-@code{nil}, the articles will be divided into pages whenever a
12955 page delimiter appears in the article.  If this variable is @code{nil},
12956 paging will not be done.
12957
12958 @item gnus-page-delimiter
12959 @vindex gnus-page-delimiter
12960 This is the delimiter mentioned above.  By default, it is @samp{^L}
12961 (formfeed).
12962
12963 @cindex IDNA
12964 @cindex internationalized domain names
12965 @vindex gnus-use-idna
12966 @item gnus-use-idna
12967 This variable controls whether Gnus performs IDNA decoding of
12968 internationalized domain names inside @samp{From}, @samp{To} and
12969 @samp{Cc} headers.  @xref{IDNA, ,IDNA,message, The Message Manual},
12970 for how to compose such messages.  This requires
12971 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
12972 variable is only enabled if you have installed it.
12973
12974 @end table
12975
12976
12977 @node Composing Messages
12978 @chapter Composing Messages
12979 @cindex composing messages
12980 @cindex messages
12981 @cindex mail
12982 @cindex sending mail
12983 @cindex reply
12984 @cindex followup
12985 @cindex post
12986 @cindex using gpg
12987 @cindex using s/mime
12988 @cindex using smime
12989
12990 @kindex C-c C-c (Post)
12991 All commands for posting and mailing will put you in a message buffer
12992 where you can edit the article all you like, before you send the
12993 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
12994 Message Manual}.  Where the message will be posted/mailed to depends
12995 on your setup (@pxref{Posting Server}).
12996
12997 @menu
12998 * Mail::                        Mailing and replying.
12999 * Posting Server::              What server should you post and mail via?
13000 * POP before SMTP::             You cannot send a mail unless you read a mail.
13001 * Mail and Post::               Mailing and posting at the same time.
13002 * Archived Messages::           Where Gnus stores the messages you've sent.
13003 * Posting Styles::              An easier way to specify who you are.
13004 * Drafts::                      Postponing messages and rejected messages.
13005 * Rejected Articles::           What happens if the server doesn't like your article?
13006 * Signing and encrypting::      How to compose secure messages.
13007 @end menu
13008
13009 Also @pxref{Canceling and Superseding} for information on how to
13010 remove articles you shouldn't have posted.
13011
13012
13013 @node Mail
13014 @section Mail
13015
13016 Variables for customizing outgoing mail:
13017
13018 @table @code
13019 @item gnus-uu-digest-headers
13020 @vindex gnus-uu-digest-headers
13021 List of regexps to match headers included in digested messages.  The
13022 headers will be included in the sequence they are matched.  If
13023 @code{nil} include all headers.
13024
13025 @item gnus-add-to-list
13026 @vindex gnus-add-to-list
13027 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
13028 that have none when you do a @kbd{a}.
13029
13030 @item gnus-confirm-mail-reply-to-news
13031 @vindex gnus-confirm-mail-reply-to-news
13032 If non-@code{nil}, Gnus will ask you for a confirmation when you are
13033 about to reply to news articles by mail.  If it is @code{nil}, nothing
13034 interferes in what you want to do.  This can also be a function
13035 receiving the group name as the only parameter which should return
13036 non-@code{nil} if a confirmation is needed, or a regular expression
13037 matching group names, where confirmation should be asked for.
13038
13039 If you find yourself never wanting to reply to mail, but occasionally
13040 press @kbd{R} anyway, this variable might be for you.
13041
13042 @item gnus-confirm-treat-mail-like-news
13043 @vindex gnus-confirm-treat-mail-like-news
13044 If non-@code{nil}, Gnus also requests confirmation according to
13045 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
13046 useful for treating mailing lists like newsgroups.
13047
13048 @end table
13049
13050
13051 @node Posting Server
13052 @section Posting Server
13053
13054 When you press those magical @kbd{C-c C-c} keys to ship off your latest
13055 (extremely intelligent, of course) article, where does it go?
13056
13057 Thank you for asking.  I hate you.
13058
13059 It can be quite complicated.
13060
13061 @vindex gnus-post-method
13062 When posting news, Message usually invokes @code{message-send-news}
13063 (@pxref{News Variables, , News Variables, message, Message Manual}).
13064 Normally, Gnus will post using the same select method as you're
13065 reading from (which might be convenient if you're reading lots of
13066 groups from different private servers).  However.  If the server
13067 you're reading from doesn't allow posting, just reading, you probably
13068 want to use some other server to post your (extremely intelligent and
13069 fabulously interesting) articles.  You can then set the
13070 @code{gnus-post-method} to some other method:
13071
13072 @lisp
13073 (setq gnus-post-method '(nnspool ""))
13074 @end lisp
13075
13076 Now, if you've done this, and then this server rejects your article, or
13077 this server is down, what do you do then?  To override this variable you
13078 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
13079 the ``current'' server, to get back the default behavior, for posting.
13080
13081 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
13082 Gnus will prompt you for what method to use for posting.
13083
13084 You can also set @code{gnus-post-method} to a list of select methods.
13085 If that's the case, Gnus will always prompt you for what method to use
13086 for posting.
13087
13088 Finally, if you want to always post using the native select method,
13089 you can set this variable to @code{native}.
13090
13091 @vindex message-send-mail-function
13092 When sending mail, Message invokes the function specified by the
13093 variable @code{message-send-mail-function}.  Gnus tries to set it to a
13094 value suitable for your system.
13095 @xref{Mail Variables, ,Mail Variables,message,Message manual}, for more
13096 information.
13097
13098 @node POP before SMTP
13099 @section POP before SMTP
13100 @cindex pop before smtp
13101 @findex message-smtpmail-send-it
13102 @findex mail-source-touch-pop
13103
13104 Does your @acronym{ISP} require the @acronym{POP}-before-@acronym{SMTP}
13105 authentication?  It is whether you need to connect to the @acronym{POP}
13106 mail server within a certain time before sending mails.  If so, there is
13107 a convenient way.  To do that, put the following lines in your
13108 @file{~/.gnus.el} file:
13109
13110 @lisp
13111 (setq message-send-mail-function 'message-smtpmail-send-it)
13112 (add-hook 'message-send-mail-hook 'mail-source-touch-pop)
13113 @end lisp
13114
13115 @noindent
13116 It means to let Gnus connect to the @acronym{POP} mail server in advance
13117 whenever you send a mail.  The @code{mail-source-touch-pop} function
13118 does only a @acronym{POP} authentication according to the value of
13119 @code{mail-sources} without fetching mails, just before sending a mail.
13120 Note that you have to use @code{message-smtpmail-send-it} which runs
13121 @code{message-send-mail-hook} rather than @code{smtpmail-send-it} and
13122 set the value of @code{mail-sources} for a @acronym{POP} connection
13123 correctly.  @xref{Mail Sources}.
13124
13125 If you have two or more @acronym{POP} mail servers set in
13126 @code{mail-sources}, you may want to specify one of them to
13127 @code{mail-source-primary-source} as the @acronym{POP} mail server to be
13128 used for the @acronym{POP}-before-@acronym{SMTP} authentication.  If it
13129 is your primary @acronym{POP} mail server (i.e., you are fetching mails
13130 mainly from that server), you can set it permanently as follows:
13131
13132 @lisp
13133 (setq mail-source-primary-source
13134       '(pop :server "pop3.mail.server"
13135             :password "secret"))
13136 @end lisp
13137
13138 @noindent
13139 Otherwise, bind it dynamically only when performing the
13140 @acronym{POP}-before-@acronym{SMTP} authentication as follows:
13141
13142 @lisp
13143 (add-hook 'message-send-mail-hook
13144           (lambda ()
13145             (let ((mail-source-primary-source
13146                    '(pop :server "pop3.mail.server"
13147                          :password "secret")))
13148               (mail-source-touch-pop))))
13149 @end lisp
13150
13151 @node Mail and Post
13152 @section Mail and Post
13153
13154 Here's a list of variables relevant to both mailing and
13155 posting:
13156
13157 @table @code
13158 @item gnus-mailing-list-groups
13159 @findex gnus-mailing-list-groups
13160 @cindex mailing lists
13161
13162 If your news server offers groups that are really mailing lists
13163 gatewayed to the @acronym{NNTP} server, you can read those groups without
13164 problems, but you can't post/followup to them without some difficulty.
13165 One solution is to add a @code{to-address} to the group parameters
13166 (@pxref{Group Parameters}).  An easier thing to do is set the
13167 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
13168 really are mailing lists.  Then, at least, followups to the mailing
13169 lists will work most of the time.  Posting to these groups (@kbd{a}) is
13170 still a pain, though.
13171
13172 @item gnus-user-agent
13173 @vindex gnus-user-agent
13174 @cindex User-Agent
13175
13176 This variable controls which information should be exposed in the
13177 User-Agent header.  It can be a list of symbols or a string.  Valid
13178 symbols are @code{gnus} (show Gnus version) and @code{emacs} (show Emacs
13179 version).  In addition to the Emacs version, you can add @code{codename}
13180 (show (S)XEmacs codename) or either @code{config} (show system
13181 configuration) or @code{type} (show system type).  If you set it to a
13182 string, be sure to use a valid format, see RFC 2616.
13183
13184 @end table
13185
13186 You may want to do spell-checking on messages that you send out.  Or, if
13187 you don't want to spell-check by hand, you could add automatic
13188 spell-checking via the @code{ispell} package:
13189
13190 @cindex ispell
13191 @findex ispell-message
13192 @lisp
13193 (add-hook 'message-send-hook 'ispell-message)
13194 @end lisp
13195
13196 If you want to change the @code{ispell} dictionary based on what group
13197 you're in, you could say something like the following:
13198
13199 @lisp
13200 (add-hook 'gnus-select-group-hook
13201           (lambda ()
13202             (cond
13203              ((string-match
13204                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
13205               (ispell-change-dictionary "deutsch"))
13206              (t
13207               (ispell-change-dictionary "english")))))
13208 @end lisp
13209
13210 Modify to suit your needs.
13211
13212 @vindex gnus-message-highlight-citation
13213 If @code{gnus-message-highlight-citation} is t, different levels of
13214 citations are highlighted like in Gnus article buffers also in message
13215 mode buffers.
13216
13217 @node Archived Messages
13218 @section Archived Messages
13219 @cindex archived messages
13220 @cindex sent messages
13221
13222 Gnus provides a few different methods for storing the mail and news you
13223 send.  The default method is to use the @dfn{archive virtual server} to
13224 store the messages.  If you want to disable this completely, the
13225 @code{gnus-message-archive-group} variable should be @code{nil}, which
13226 is the default.
13227
13228 For archiving interesting messages in a group you read, see the
13229 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
13230 Group Commands}).
13231
13232 @vindex gnus-message-archive-method
13233 @code{gnus-message-archive-method} says what virtual server Gnus is to
13234 use to store sent messages.  The default is @code{"archive"}, and when
13235 actually being used it is expanded into:
13236
13237 @lisp
13238 (nnfolder "archive"
13239           (nnfolder-directory   "~/Mail/archive")
13240           (nnfolder-active-file "~/Mail/archive/active")
13241           (nnfolder-get-new-mail nil)
13242           (nnfolder-inhibit-expiry t))
13243 @end lisp
13244
13245 @quotation
13246 @vindex gnus-update-message-archive-method
13247 Note: a server like this is saved in the @file{~/.newsrc.eld} file first
13248 so that it may be used as a real method of the server which is named
13249 @code{"archive"} (that is, for the case where
13250 @code{gnus-message-archive-method} is set to @code{"archive"}) ever
13251 since.  If it once has been saved, it will never be updated by default
13252 even if you change the value of @code{gnus-message-archive-method}
13253 afterward.  Therefore, the server @code{"archive"} doesn't necessarily
13254 mean the @code{nnfolder} server like this at all times.  If you want the
13255 saved method to reflect always the value of
13256 @code{gnus-message-archive-method}, set the
13257 @code{gnus-update-message-archive-method} variable to a non-@code{nil}
13258 value.  The default value of this variable is @code{nil}.
13259 @end quotation
13260
13261 You can, however, use any mail select method (@code{nnml},
13262 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
13263 for doing this sort of thing, though.  If you don't like the default
13264 directory chosen, you could say something like:
13265
13266 @lisp
13267 (setq gnus-message-archive-method
13268       '(nnfolder "archive"
13269                  (nnfolder-inhibit-expiry t)
13270                  (nnfolder-active-file "~/News/sent-mail/active")
13271                  (nnfolder-directory "~/News/sent-mail/")))
13272 @end lisp
13273
13274 @vindex gnus-message-archive-group
13275 @cindex Gcc
13276 Gnus will insert @code{Gcc} headers in all outgoing messages that point
13277 to one or more group(s) on that server.  Which group to use is
13278 determined by the @code{gnus-message-archive-group} variable.
13279
13280 This variable can be used to do the following:
13281
13282 @table @asis
13283 @item a string
13284 Messages will be saved in that group.
13285
13286 Note that you can include a select method in the group name, then the
13287 message will not be stored in the select method given by
13288 @code{gnus-message-archive-method}, but in the select method specified
13289 by the group name, instead.  Suppose @code{gnus-message-archive-method}
13290 has the default value shown above.  Then setting
13291 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
13292 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
13293 value @code{"nnml:foo"}, then outgoing messages will be stored in
13294 @samp{nnml:foo}.
13295
13296 @item a list of strings
13297 Messages will be saved in all those groups.
13298
13299 @item an alist of regexps, functions and forms
13300 When a key ``matches'', the result is used.
13301
13302 @item @code{nil}
13303 No message archiving will take place.  This is the default.
13304 @end table
13305
13306 Let's illustrate:
13307
13308 Just saving to a single group called @samp{MisK}:
13309 @lisp
13310 (setq gnus-message-archive-group "MisK")
13311 @end lisp
13312
13313 Saving to two groups, @samp{MisK} and @samp{safe}:
13314 @lisp
13315 (setq gnus-message-archive-group '("MisK" "safe"))
13316 @end lisp
13317
13318 Save to different groups based on what group you are in:
13319 @lisp
13320 (setq gnus-message-archive-group
13321       '(("^alt" "sent-to-alt")
13322         ("mail" "sent-to-mail")
13323         (".*" "sent-to-misc")))
13324 @end lisp
13325
13326 More complex stuff:
13327 @lisp
13328 (setq gnus-message-archive-group
13329       '((if (message-news-p)
13330             "misc-news"
13331           "misc-mail")))
13332 @end lisp
13333
13334 How about storing all news messages in one file, but storing all mail
13335 messages in one file per month:
13336
13337 @lisp
13338 (setq gnus-message-archive-group
13339       '((if (message-news-p)
13340             "misc-news"
13341           (concat "mail." (format-time-string "%Y-%m")))))
13342 @end lisp
13343
13344 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
13345 @c use a different value for @code{gnus-message-archive-group} there.)
13346
13347 Now, when you send a message off, it will be stored in the appropriate
13348 group.  (If you want to disable storing for just one particular message,
13349 you can just remove the @code{Gcc} header that has been inserted.)  The
13350 archive group will appear in the group buffer the next time you start
13351 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
13352 enter it and read the articles in it just like you'd read any other
13353 group.  If the group gets really big and annoying, you can simply rename
13354 if (using @kbd{G r} in the group buffer) to something
13355 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
13356 continue to be stored in the old (now empty) group.
13357
13358 That's the default method of archiving sent messages.  Gnus offers a
13359 different way for the people who don't like the default method.  In that
13360 case you should set @code{gnus-message-archive-group} to @code{nil};
13361 this will disable archiving.
13362
13363 @table @code
13364 @item gnus-outgoing-message-group
13365 @vindex gnus-outgoing-message-group
13366 All outgoing messages will be put in this group.  If you want to store
13367 all your outgoing mail and articles in the group @samp{nnml:archive},
13368 you set this variable to that value.  This variable can also be a list of
13369 group names.
13370
13371 If you want to have greater control over what group to put each
13372 message in, you can set this variable to a function that checks the
13373 current newsgroup name and then returns a suitable group name (or list
13374 of names).
13375
13376 This variable can be used instead of @code{gnus-message-archive-group},
13377 but the latter is the preferred method.
13378
13379 @item gnus-gcc-mark-as-read
13380 @vindex gnus-gcc-mark-as-read
13381 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
13382
13383 @item gnus-gcc-externalize-attachments
13384 @vindex gnus-gcc-externalize-attachments
13385 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
13386 and matches the Gcc group name, attach files as external parts; if it is
13387 @code{all}, attach local files as external parts; if it is other
13388 non-@code{nil}, the behavior is the same as @code{all}, but it may be
13389 changed in the future.
13390
13391 @end table
13392
13393
13394 @node Posting Styles
13395 @section Posting Styles
13396 @cindex posting styles
13397 @cindex styles
13398
13399 All them variables, they make my head swim.
13400
13401 So what if you want a different @code{Organization} and signature based
13402 on what groups you post to?  And you post both from your home machine
13403 and your work machine, and you want different @code{From} lines, and so
13404 on?
13405
13406 @vindex gnus-posting-styles
13407 One way to do stuff like that is to write clever hooks that change the
13408 variables you need to have changed.  That's a bit boring, so somebody
13409 came up with the bright idea of letting the user specify these things in
13410 a handy alist.  Here's an example of a @code{gnus-posting-styles}
13411 variable:
13412
13413 @lisp
13414 ((".*"
13415   (signature "Peace and happiness")
13416   (organization "What me?"))
13417  ("^comp"
13418   (signature "Death to everybody"))
13419  ("comp.emacs.i-love-it"
13420   (organization "Emacs is it")))
13421 @end lisp
13422
13423 As you might surmise from this example, this alist consists of several
13424 @dfn{styles}.  Each style will be applicable if the first element
13425 ``matches'', in some form or other.  The entire alist will be iterated
13426 over, from the beginning towards the end, and each match will be
13427 applied, which means that attributes in later styles that match override
13428 the same attributes in earlier matching styles.  So
13429 @samp{comp.programming.literate} will have the @samp{Death to everybody}
13430 signature and the @samp{What me?} @code{Organization} header.
13431
13432 The first element in each style is called the @code{match}.  If it's a
13433 string, then Gnus will try to regexp match it against the group name.
13434 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
13435 will look in the original article for a header whose name is
13436 @var{match} and compare that @var{regexp}.  @var{match} and
13437 @var{regexp} are strings.  (The original article is the one you are
13438 replying or following up to.  If you are not composing a reply or a
13439 followup, then there is nothing to match against.)  If the
13440 @code{match} is a function symbol, that function will be called with
13441 no arguments.  If it's a variable symbol, then the variable will be
13442 referenced.  If it's a list, then that list will be @code{eval}ed.  In
13443 any case, if this returns a non-@code{nil} value, then the style is
13444 said to @dfn{match}.
13445
13446 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
13447 attribute consists of a @code{(@var{name} @var{value})} pair.  In
13448 addition, you can also use the @code{(@var{name} :file @var{value})}
13449 form or the @code{(@var{name} :value @var{value})} form.  Where
13450 @code{:file} signifies @var{value} represents a file name and its
13451 contents should be used as the attribute value, @code{:value} signifies
13452 @var{value} does not represent a file name explicitly.  The attribute
13453 name can be one of:
13454
13455 @itemize @bullet
13456 @item @code{signature}
13457 @item @code{signature-file}
13458 @item @code{x-face-file}
13459 @item @code{address}, overriding @code{user-mail-address}
13460 @item @code{name}, overriding @code{(user-full-name)}
13461 @item @code{body}
13462 @end itemize
13463
13464 Note that the @code{signature-file} attribute honors the variable
13465 @code{message-signature-directory}.
13466
13467 The attribute name can also be a string or a symbol.  In that case,
13468 this will be used as a header name, and the value will be inserted in
13469 the headers of the article; if the value is @code{nil}, the header
13470 name will be removed.  If the attribute name is @code{eval}, the form
13471 is evaluated, and the result is thrown away.
13472
13473 The attribute value can be a string (used verbatim), a function with
13474 zero arguments (the return value will be used), a variable (its value
13475 will be used) or a list (it will be @code{eval}ed and the return value
13476 will be used).  The functions and sexps are called/@code{eval}ed in the
13477 message buffer that is being set up.  The headers of the current article
13478 are available through the @code{message-reply-headers} variable, which
13479 is a vector of the following headers: number subject from date id
13480 references chars lines xref extra.
13481
13482 @vindex message-reply-headers
13483
13484 If you wish to check whether the message you are about to compose is
13485 meant to be a news article or a mail message, you can check the values
13486 of the @code{message-news-p} and @code{message-mail-p} functions.
13487
13488 @findex message-mail-p
13489 @findex message-news-p
13490
13491 So here's a new example:
13492
13493 @lisp
13494 (setq gnus-posting-styles
13495       '((".*"
13496          (signature-file "~/.signature")
13497          (name "User Name")
13498          (x-face-file "~/.xface")
13499          (x-url (getenv "WWW_HOME"))
13500          (organization "People's Front Against MWM"))
13501         ("^rec.humor"
13502          (signature my-funny-signature-randomizer))
13503         ((equal (system-name) "gnarly")  ;; @r{A form}
13504          (signature my-quote-randomizer))
13505         (message-news-p        ;; @r{A function symbol}
13506          (signature my-news-signature))
13507         (window-system         ;; @r{A value symbol}
13508          ("X-Window-System" (format "%s" window-system)))
13509         ;; @r{If I'm replying to Larsi, set the Organization header.}
13510         ((header "from" "larsi.*org")
13511          (Organization "Somewhere, Inc."))
13512         ((posting-from-work-p) ;; @r{A user defined function}
13513          (signature-file "~/.work-signature")
13514          (address "user@@bar.foo")
13515          (body "You are fired.\n\nSincerely, your boss.")
13516          (organization "Important Work, Inc"))
13517         ("nnml:.*"
13518          (From (with-current-buffer gnus-article-buffer
13519                  (message-fetch-field "to"))))
13520         ("^nn.+:"
13521          (signature-file "~/.mail-signature"))))
13522 @end lisp
13523
13524 The @samp{nnml:.*} rule means that you use the @code{To} address as the
13525 @code{From} address in all your outgoing replies, which might be handy
13526 if you fill many roles.
13527 You may also use @code{message-alternative-emails} instead.
13528 @xref{Message Headers, ,Message Headers, message, Message Manual}.
13529
13530 @node Drafts
13531 @section Drafts
13532 @cindex drafts
13533
13534 If you are writing a message (mail or news) and suddenly remember that
13535 you have a steak in the oven (or some pesto in the food processor, you
13536 craaazy vegetarians), you'll probably wish there was a method to save
13537 the message you are writing so that you can continue editing it some
13538 other day, and send it when you feel its finished.
13539
13540 Well, don't worry about it.  Whenever you start composing a message of
13541 some sort using the Gnus mail and post commands, the buffer you get will
13542 automatically associate to an article in a special @dfn{draft} group.
13543 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
13544 article will be saved there.  (Auto-save files also go to the draft
13545 group.)
13546
13547 @cindex nndraft
13548 @vindex nndraft-directory
13549 The draft group is a special group (which is implemented as an
13550 @code{nndraft} group, if you absolutely have to know) called
13551 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
13552 @code{nndraft} is to store its files.  What makes this group special is
13553 that you can't tick any articles in it or mark any articles as
13554 read---all articles in the group are permanently unread.
13555
13556 If the group doesn't exist, it will be created and you'll be subscribed
13557 to it.  The only way to make it disappear from the Group buffer is to
13558 unsubscribe it.  The special properties of the draft group comes from
13559 a group property (@pxref{Group Parameters}), and if lost the group
13560 behaves like any other group.  This means the commands below will not
13561 be available.  To restore the special properties of the group, the
13562 simplest way is to kill the group, using @kbd{C-k}, and restart
13563 Gnus.  The group is automatically created again with the
13564 correct parameters.  The content of the group is not lost.
13565
13566 @c @findex gnus-dissociate-buffer-from-draft
13567 @c @kindex C-c M-d (Mail)
13568 @c @kindex C-c M-d (Post)
13569 @c @findex gnus-associate-buffer-with-draft
13570 @c @kindex C-c C-d (Mail)
13571 @c @kindex C-c C-d (Post)
13572 @c If you're writing some super-secret message that you later want to
13573 @c encode with PGP before sending, you may wish to turn the auto-saving
13574 @c (and association with the draft group) off.  You never know who might be
13575 @c interested in reading all your extremely valuable and terribly horrible
13576 @c and interesting secrets.  The @kbd{C-c M-d}
13577 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
13578 @c If you change your mind and want to turn the auto-saving back on again,
13579 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
13580 @c
13581 @c @vindex gnus-use-draft
13582 @c To leave association with the draft group off by default, set
13583 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
13584
13585 @findex gnus-draft-edit-message
13586 @kindex D e (Draft)
13587 When you want to continue editing the article, you simply enter the
13588 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
13589 that.  You will be placed in a buffer where you left off.
13590
13591 Rejected articles will also be put in this draft group (@pxref{Rejected
13592 Articles}).
13593
13594 @findex gnus-draft-send-all-messages
13595 @kindex D s (Draft)
13596 @findex gnus-draft-send-message
13597 @kindex D S (Draft)
13598 If you have lots of rejected messages you want to post (or mail) without
13599 doing further editing, you can use the @kbd{D s} command
13600 (@code{gnus-draft-send-message}).  This command understands the
13601 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
13602 command (@code{gnus-draft-send-all-messages}) will ship off all messages
13603 in the buffer.
13604
13605 @findex gnus-draft-toggle-sending
13606 @kindex D t (Draft)
13607 If you have some messages that you wish not to send, you can use the
13608 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
13609 as unsendable.  This is a toggling command.
13610
13611 Finally, if you want to delete a draft, use the normal @kbd{B DEL}
13612 command (@pxref{Mail Group Commands}).
13613
13614
13615 @node Rejected Articles
13616 @section Rejected Articles
13617 @cindex rejected articles
13618
13619 Sometimes a news server will reject an article.  Perhaps the server
13620 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
13621 @emph{there be demons}.  Perhaps you have included too much cited text.
13622 Perhaps the disk is full.  Perhaps the server is down.
13623
13624 These situations are, of course, totally beyond the control of Gnus.
13625 (Gnus, of course, loves the way you look, always feels great, has angels
13626 fluttering around inside of it, doesn't care about how much cited text
13627 you include, never runs full and never goes down.)  So Gnus saves these
13628 articles until some later time when the server feels better.
13629
13630 The rejected articles will automatically be put in a special draft group
13631 (@pxref{Drafts}).  When the server comes back up again, you'd then
13632 typically enter that group and send all the articles off.
13633
13634 @node Signing and encrypting
13635 @section Signing and encrypting
13636 @cindex using gpg
13637 @cindex using s/mime
13638 @cindex using smime
13639
13640 Gnus can digitally sign and encrypt your messages, using vanilla
13641 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
13642 decoding such messages, see the @code{mm-verify-option} and
13643 @code{mm-decrypt-option} options (@pxref{Security}).
13644
13645 @vindex gnus-message-replysign
13646 @vindex gnus-message-replyencrypt
13647 @vindex gnus-message-replysignencrypted
13648 Often, you would like to sign replies to people who send you signed
13649 messages.  Even more often, you might want to encrypt messages which
13650 are in reply to encrypted messages.  Gnus offers
13651 @code{gnus-message-replysign} to enable the former, and
13652 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
13653 @code{gnus-message-replysignencrypted} (on by default) will sign
13654 automatically encrypted messages.
13655
13656 Instructing @acronym{MML} to perform security operations on a
13657 @acronym{MIME} part is done using the @kbd{C-c C-m s} key map for
13658 signing and the @kbd{C-c C-m c} key map for encryption, as follows.
13659
13660 @table @kbd
13661
13662 @item C-c C-m s s
13663 @kindex C-c C-m s s (Message)
13664 @findex mml-secure-message-sign-smime
13665
13666 Digitally sign current message using @acronym{S/MIME}.
13667
13668 @item C-c C-m s o
13669 @kindex C-c C-m s o (Message)
13670 @findex mml-secure-message-sign-pgp
13671
13672 Digitally sign current message using @acronym{PGP}.
13673
13674 @item C-c C-m s p
13675 @kindex C-c C-m s p (Message)
13676 @findex mml-secure-message-sign-pgp
13677
13678 Digitally sign current message using @acronym{PGP/MIME}.
13679
13680 @item C-c C-m c s
13681 @kindex C-c C-m c s (Message)
13682 @findex mml-secure-message-encrypt-smime
13683
13684 Digitally encrypt current message using @acronym{S/MIME}.
13685
13686 @item C-c C-m c o
13687 @kindex C-c C-m c o (Message)
13688 @findex mml-secure-message-encrypt-pgp
13689
13690 Digitally encrypt current message using @acronym{PGP}.
13691
13692 @item C-c C-m c p
13693 @kindex C-c C-m c p (Message)
13694 @findex mml-secure-message-encrypt-pgpmime
13695
13696 Digitally encrypt current message using @acronym{PGP/MIME}.
13697
13698 @item C-c C-m C-n
13699 @kindex C-c C-m C-n (Message)
13700 @findex mml-unsecure-message
13701 Remove security related @acronym{MML} tags from message.
13702
13703 @end table
13704
13705 @xref{Security, ,Security, message, Message Manual}, for more information.
13706
13707 @node Select Methods
13708 @chapter Select Methods
13709 @cindex foreign groups
13710 @cindex select methods
13711
13712 A @dfn{foreign group} is a group not read by the usual (or
13713 default) means.  It could be, for instance, a group from a different
13714 @acronym{NNTP} server, it could be a virtual group, or it could be your own
13715 personal mail group.
13716
13717 A foreign group (or any group, really) is specified by a @dfn{name} and
13718 a @dfn{select method}.  To take the latter first, a select method is a
13719 list where the first element says what back end to use (e.g. @code{nntp},
13720 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
13721 name}.  There may be additional elements in the select method, where the
13722 value may have special meaning for the back end in question.
13723
13724 One could say that a select method defines a @dfn{virtual server}---so
13725 we do just that (@pxref{Server Buffer}).
13726
13727 The @dfn{name} of the group is the name the back end will recognize the
13728 group as.
13729
13730 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
13731 @samp{some.where.edu} will have the name @samp{soc.motss} and select
13732 method @code{(nntp "some.where.edu")}.  Gnus will call this group
13733 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
13734 back end just knows this group as @samp{soc.motss}.
13735
13736 The different methods all have their peculiarities, of course.
13737
13738 @menu
13739 * Server Buffer::               Making and editing virtual servers.
13740 * Getting News::                Reading USENET news with Gnus.
13741 * Getting Mail::                Reading your personal mail with Gnus.
13742 * Browsing the Web::            Getting messages from a plethora of Web sources.
13743 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
13744 * Other Sources::               Reading directories, files.
13745 * Combined Groups::             Combining groups into one group.
13746 * Email Based Diary::           Using mails to manage diary events in Gnus.
13747 * Gnus Unplugged::              Reading news and mail offline.
13748 @end menu
13749
13750
13751 @node Server Buffer
13752 @section Server Buffer
13753
13754 Traditionally, a @dfn{server} is a machine or a piece of software that
13755 one connects to, and then requests information from.  Gnus does not
13756 connect directly to any real servers, but does all transactions through
13757 one back end or other.  But that's just putting one layer more between
13758 the actual media and Gnus, so we might just as well say that each
13759 back end represents a virtual server.
13760
13761 For instance, the @code{nntp} back end may be used to connect to several
13762 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
13763 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
13764 use, and what parameters to set by specifying a @dfn{select method}.
13765
13766 These select method specifications can sometimes become quite
13767 complicated---say, for instance, that you want to read from the
13768 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
13769 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
13770 Anyway, if you had to specify that for each group that used this
13771 server, that would be too much work, so Gnus offers a way of naming
13772 select methods, which is what you do in the server buffer.
13773
13774 To enter the server buffer, use the @kbd{^}
13775 (@code{gnus-group-enter-server-mode}) command in the group buffer.
13776
13777 @menu
13778 * Server Buffer Format::        You can customize the look of this buffer.
13779 * Server Commands::             Commands to manipulate servers.
13780 * Example Methods::             Examples server specifications.
13781 * Creating a Virtual Server::   An example session.
13782 * Server Variables::            Which variables to set.
13783 * Servers and Methods::         You can use server names as select methods.
13784 * Unavailable Servers::         Some servers you try to contact may be down.
13785 @end menu
13786
13787 @vindex gnus-server-mode-hook
13788 @code{gnus-server-mode-hook} is run when creating the server buffer.
13789
13790
13791 @node Server Buffer Format
13792 @subsection Server Buffer Format
13793 @cindex server buffer format
13794
13795 @vindex gnus-server-line-format
13796 You can change the look of the server buffer lines by changing the
13797 @code{gnus-server-line-format} variable.  This is a @code{format}-like
13798 variable, with some simple extensions:
13799
13800 @table @samp
13801
13802 @item h
13803 How the news is fetched---the back end name.
13804
13805 @item n
13806 The name of this server.
13807
13808 @item w
13809 Where the news is to be fetched from---the address.
13810
13811 @item s
13812 The opened/closed/denied status of the server.
13813
13814 @item a
13815 Whether this server is agentized.
13816 @end table
13817
13818 @vindex gnus-server-mode-line-format
13819 The mode line can also be customized by using the
13820 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
13821 Formatting}).  The following specs are understood:
13822
13823 @table @samp
13824 @item S
13825 Server name.
13826
13827 @item M
13828 Server method.
13829 @end table
13830
13831 Also @pxref{Formatting Variables}.
13832
13833
13834 @node Server Commands
13835 @subsection Server Commands
13836 @cindex server commands
13837
13838 @table @kbd
13839
13840 @item v
13841 @kindex v (Server)
13842 @cindex keys, reserved for users (Server)
13843 The key @kbd{v} is reserved for users.  You can bind it to some
13844 command or better use it as a prefix key.
13845
13846 @item a
13847 @kindex a (Server)
13848 @findex gnus-server-add-server
13849 Add a new server (@code{gnus-server-add-server}).
13850
13851 @item e
13852 @kindex e (Server)
13853 @findex gnus-server-edit-server
13854 Edit a server (@code{gnus-server-edit-server}).
13855
13856 @item SPACE
13857 @kindex SPACE (Server)
13858 @findex gnus-server-read-server
13859 Browse the current server (@code{gnus-server-read-server}).
13860
13861 @item q
13862 @kindex q (Server)
13863 @findex gnus-server-exit
13864 Return to the group buffer (@code{gnus-server-exit}).
13865
13866 @item k
13867 @kindex k (Server)
13868 @findex gnus-server-kill-server
13869 Kill the current server (@code{gnus-server-kill-server}).
13870
13871 @item y
13872 @kindex y (Server)
13873 @findex gnus-server-yank-server
13874 Yank the previously killed server (@code{gnus-server-yank-server}).
13875
13876 @item c
13877 @kindex c (Server)
13878 @findex gnus-server-copy-server
13879 Copy the current server (@code{gnus-server-copy-server}).
13880
13881 @item l
13882 @kindex l (Server)
13883 @findex gnus-server-list-servers
13884 List all servers (@code{gnus-server-list-servers}).
13885
13886 @item s
13887 @kindex s (Server)
13888 @findex gnus-server-scan-server
13889 Request that the server scan its sources for new articles
13890 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
13891 servers.
13892
13893 @item g
13894 @kindex g (Server)
13895 @findex gnus-server-regenerate-server
13896 Request that the server regenerate all its data structures
13897 (@code{gnus-server-regenerate-server}).  This can be useful if you have
13898 a mail back end that has gotten out of sync.
13899
13900 @item z
13901 @kindex z (Server)
13902 @findex gnus-server-compact-server
13903
13904 Compact all groups in the server under point
13905 (@code{gnus-server-compact-server}).  Currently implemented only in
13906 nnml (@pxref{Mail Spool}).  This removes gaps between article numbers,
13907 hence getting a correct total article count.
13908
13909 @end table
13910
13911
13912 @node Example Methods
13913 @subsection Example Methods
13914
13915 Most select methods are pretty simple and self-explanatory:
13916
13917 @lisp
13918 (nntp "news.funet.fi")
13919 @end lisp
13920
13921 Reading directly from the spool is even simpler:
13922
13923 @lisp
13924 (nnspool "")
13925 @end lisp
13926
13927 As you can see, the first element in a select method is the name of the
13928 back end, and the second is the @dfn{address}, or @dfn{name}, if you
13929 will.
13930
13931 After these two elements, there may be an arbitrary number of
13932 @code{(@var{variable} @var{form})} pairs.
13933
13934 To go back to the first example---imagine that you want to read from
13935 port 15 on that machine.  This is what the select method should
13936 look like then:
13937
13938 @lisp
13939 (nntp "news.funet.fi" (nntp-port-number 15))
13940 @end lisp
13941
13942 You should read the documentation to each back end to find out what
13943 variables are relevant, but here's an @code{nnmh} example:
13944
13945 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
13946 you have two structures that you wish to access: One is your private
13947 mail spool, and the other is a public one.  Here's the possible spec for
13948 your private mail:
13949
13950 @lisp
13951 (nnmh "private" (nnmh-directory "~/private/mail/"))
13952 @end lisp
13953
13954 (This server is then called @samp{private}, but you may have guessed
13955 that.)
13956
13957 Here's the method for a public spool:
13958
13959 @lisp
13960 (nnmh "public"
13961       (nnmh-directory "/usr/information/spool/")
13962       (nnmh-get-new-mail nil))
13963 @end lisp
13964
13965 @cindex proxy
13966 @cindex firewall
13967
13968 If you are behind a firewall and only have access to the @acronym{NNTP}
13969 server from the firewall machine, you can instruct Gnus to @code{rlogin}
13970 on the firewall machine and connect with
13971 @uref{http://netcat.sourceforge.net/, netcat} from there to the
13972 @acronym{NNTP} server.
13973 Doing this can be rather fiddly, but your virtual server definition
13974 should probably look something like this:
13975
13976 @lisp
13977 (nntp "firewall"
13978       (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)
13979       (nntp-via-address "the.firewall.machine")
13980       (nntp-address "the.real.nntp.host"))
13981 @end lisp
13982
13983 If you want to use the wonderful @code{ssh} program to provide a
13984 compressed connection over the modem line, you could add the following
13985 configuration to the example above:
13986
13987 @lisp
13988       (nntp-via-rlogin-command "ssh")
13989 @end lisp
13990
13991 See also @code{nntp-via-rlogin-command-switches}.  Here's an example for
13992 an indirect connection:
13993
13994 @lisp
13995 (setq gnus-select-method
13996       '(nntp "indirect"
13997              (nntp-address "news.server.example")
13998              (nntp-via-user-name "intermediate_user_name")
13999              (nntp-via-address "intermediate.host.example")
14000              (nntp-via-rlogin-command "ssh")
14001              (nntp-via-rlogin-command-switches ("-C"))
14002              (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)))
14003 @end lisp
14004
14005 This means that you have to have set up @code{ssh-agent} correctly to
14006 provide automatic authorization, of course.
14007
14008 If you're behind a firewall, but have direct access to the outside world
14009 through a wrapper command like "runsocks", you could open a socksified
14010 netcat connection to the news server as follows:
14011
14012 @lisp
14013 (nntp "outside"
14014       (nntp-pre-command "runsocks")
14015       (nntp-open-connection-function nntp-open-netcat-stream)
14016       (nntp-address "the.news.server"))
14017 @end lisp
14018
14019
14020 @node Creating a Virtual Server
14021 @subsection Creating a Virtual Server
14022
14023 If you're saving lots of articles in the cache by using persistent
14024 articles, you may want to create a virtual server to read the cache.
14025
14026 First you need to add a new server.  The @kbd{a} command does that.  It
14027 would probably be best to use @code{nnml} to read the cache.  You
14028 could also use @code{nnspool} or @code{nnmh}, though.
14029
14030 Type @kbd{a nnml RET cache RET}.
14031
14032 You should now have a brand new @code{nnml} virtual server called
14033 @samp{cache}.  You now need to edit it to have the right definitions.
14034 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
14035 will contain the following:
14036
14037 @lisp
14038 (nnml "cache")
14039 @end lisp
14040
14041 Change that to:
14042
14043 @lisp
14044 (nnml "cache"
14045          (nnml-directory "~/News/cache/")
14046          (nnml-active-file "~/News/cache/active"))
14047 @end lisp
14048
14049 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
14050 @kbd{RET} over this virtual server, you should be entered into a browse
14051 buffer, and you should be able to enter any of the groups displayed.
14052
14053
14054 @node Server Variables
14055 @subsection Server Variables
14056 @cindex server variables
14057 @cindex server parameters
14058
14059 One sticky point when defining variables (both on back ends and in Emacs
14060 in general) is that some variables are typically initialized from other
14061 variables when the definition of the variables is being loaded.  If you
14062 change the ``base'' variable after the variables have been loaded, you
14063 won't change the ``derived'' variables.
14064
14065 This typically affects directory and file variables.  For instance,
14066 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
14067 directory variables are initialized from that variable, so
14068 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
14069 new virtual @code{nnml} server, it will @emph{not} suffice to set just
14070 @code{nnml-directory}---you have to explicitly set all the file
14071 variables to be what you want them to be.  For a complete list of
14072 variables for each back end, see each back end's section later in this
14073 manual, but here's an example @code{nnml} definition:
14074
14075 @lisp
14076 (nnml "public"
14077       (nnml-directory "~/my-mail/")
14078       (nnml-active-file "~/my-mail/active")
14079       (nnml-newsgroups-file "~/my-mail/newsgroups"))
14080 @end lisp
14081
14082 Server variables are often called @dfn{server parameters}.
14083
14084 @node Servers and Methods
14085 @subsection Servers and Methods
14086
14087 Wherever you would normally use a select method
14088 (e.g. @code{gnus-secondary-select-method}, in the group select method,
14089 when browsing a foreign server) you can use a virtual server name
14090 instead.  This could potentially save lots of typing.  And it's nice all
14091 over.
14092
14093
14094 @node Unavailable Servers
14095 @subsection Unavailable Servers
14096
14097 If a server seems to be unreachable, Gnus will mark that server as
14098 @code{denied}.  That means that any subsequent attempt to make contact
14099 with that server will just be ignored.  ``It can't be opened,'' Gnus
14100 will tell you, without making the least effort to see whether that is
14101 actually the case or not.
14102
14103 That might seem quite naughty, but it does make sense most of the time.
14104 Let's say you have 10 groups subscribed to on server
14105 @samp{nephelococcygia.com}.  This server is located somewhere quite far
14106 away from you and the machine is quite slow, so it takes 1 minute just
14107 to find out that it refuses connection to you today.  If Gnus were to
14108 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
14109 attempt to do that.  Once it has gotten a single ``connection refused'',
14110 it will regard that server as ``down''.
14111
14112 So, what happens if the machine was only feeling unwell temporarily?
14113 How do you test to see whether the machine has come up again?
14114
14115 You jump to the server buffer (@pxref{Server Buffer}) and poke it
14116 with the following commands:
14117
14118 @table @kbd
14119
14120 @item O
14121 @kindex O (Server)
14122 @findex gnus-server-open-server
14123 Try to establish connection to the server on the current line
14124 (@code{gnus-server-open-server}).
14125
14126 @item C
14127 @kindex C (Server)
14128 @findex gnus-server-close-server
14129 Close the connection (if any) to the server
14130 (@code{gnus-server-close-server}).
14131
14132 @item D
14133 @kindex D (Server)
14134 @findex gnus-server-deny-server
14135 Mark the current server as unreachable
14136 (@code{gnus-server-deny-server}).
14137
14138 @item M-o
14139 @kindex M-o (Server)
14140 @findex gnus-server-open-all-servers
14141 Open the connections to all servers in the buffer
14142 (@code{gnus-server-open-all-servers}).
14143
14144 @item M-c
14145 @kindex M-c (Server)
14146 @findex gnus-server-close-all-servers
14147 Close the connections to all servers in the buffer
14148 (@code{gnus-server-close-all-servers}).
14149
14150 @item R
14151 @kindex R (Server)
14152 @findex gnus-server-remove-denials
14153 Remove all marks to whether Gnus was denied connection from any servers
14154 (@code{gnus-server-remove-denials}).
14155
14156 @item L
14157 @kindex L (Server)
14158 @findex gnus-server-offline-server
14159 Set server status to offline (@code{gnus-server-offline-server}).
14160
14161 @end table
14162
14163
14164 @node Getting News
14165 @section Getting News
14166 @cindex reading news
14167 @cindex news back ends
14168
14169 A newsreader is normally used for reading news.  Gnus currently provides
14170 only two methods of getting news---it can read from an @acronym{NNTP} server,
14171 or it can read from a local spool.
14172
14173 @menu
14174 * NNTP::                        Reading news from an @acronym{NNTP} server.
14175 * News Spool::                  Reading news from the local spool.
14176 @end menu
14177
14178
14179 @node NNTP
14180 @subsection NNTP
14181 @cindex nntp
14182
14183 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
14184 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
14185 server as the, uhm, address.
14186
14187 If the @acronym{NNTP} server is located at a non-standard port, setting the
14188 third element of the select method to this port number should allow you
14189 to connect to the right port.  You'll have to edit the group info for
14190 that (@pxref{Foreign Groups}).
14191
14192 The name of the foreign group can be the same as a native group.  In
14193 fact, you can subscribe to the same group from as many different servers
14194 you feel like.  There will be no name collisions.
14195
14196 The following variables can be used to create a virtual @code{nntp}
14197 server:
14198
14199 @table @code
14200
14201 @item nntp-server-opened-hook
14202 @vindex nntp-server-opened-hook
14203 @cindex @sc{mode reader}
14204 @cindex authinfo
14205 @cindex authentication
14206 @cindex nntp authentication
14207 @findex nntp-send-authinfo
14208 @findex nntp-send-mode-reader
14209 is run after a connection has been made.  It can be used to send
14210 commands to the @acronym{NNTP} server after it has been contacted.  By
14211 default it sends the command @code{MODE READER} to the server with the
14212 @code{nntp-send-mode-reader} function.  This function should always be
14213 present in this hook.
14214
14215 @item nntp-authinfo-function
14216 @vindex nntp-authinfo-function
14217 @findex nntp-send-authinfo
14218 @vindex nntp-authinfo-file
14219 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
14220 server.  The default function is @code{nntp-send-authinfo}, which looks
14221 through your @file{~/.authinfo} (or whatever you've set the
14222 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
14223 are found, it will prompt you for a login name and a password.  The
14224 format of the @file{~/.authinfo} file is (almost) the same as the
14225 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
14226 manual page, but here are the salient facts:
14227
14228 @enumerate
14229 @item
14230 The file contains one or more line, each of which define one server.
14231
14232 @item
14233 Each line may contain an arbitrary number of token/value pairs.
14234
14235 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
14236 @samp{default}.  In addition Gnus introduces two new tokens, not present
14237 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
14238 @samp{force}.  (This is the only way the @file{.authinfo} file format
14239 deviates from the @file{.netrc} file format.)  @samp{port} is used to
14240 indicate what port on the server the credentials apply to and
14241 @samp{force} is explained below.
14242
14243 @end enumerate
14244
14245 Here's an example file:
14246
14247 @example
14248 machine news.uio.no login larsi password geheimnis
14249 machine nntp.ifi.uio.no login larsi force yes
14250 @end example
14251
14252 The token/value pairs may appear in any order; @samp{machine} doesn't
14253 have to be first, for instance.
14254
14255 In this example, both login name and password have been supplied for the
14256 former server, while the latter has only the login name listed, and the
14257 user will be prompted for the password.  The latter also has the
14258 @samp{force} tag, which means that the authinfo will be sent to the
14259 @var{nntp} server upon connection; the default (i.e., when there is not
14260 @samp{force} tag) is to not send authinfo to the @var{nntp} server
14261 until the @var{nntp} server asks for it.
14262
14263 You can also add @samp{default} lines that will apply to all servers
14264 that don't have matching @samp{machine} lines.
14265
14266 @example
14267 default force yes
14268 @end example
14269
14270 This will force sending @samp{AUTHINFO} commands to all servers not
14271 previously mentioned.
14272
14273 Remember to not leave the @file{~/.authinfo} file world-readable.
14274
14275 @item nntp-server-action-alist
14276 @vindex nntp-server-action-alist
14277 This is a list of regexps to match on server types and actions to be
14278 taken when matches are made.  For instance, if you want Gnus to beep
14279 every time you connect to innd, you could say something like:
14280
14281 @lisp
14282 (setq nntp-server-action-alist
14283       '(("innd" (ding))))
14284 @end lisp
14285
14286 You probably don't want to do that, though.
14287
14288 The default value is
14289
14290 @lisp
14291 '(("nntpd 1\\.5\\.11t"
14292    (remove-hook 'nntp-server-opened-hook
14293                 'nntp-send-mode-reader)))
14294 @end lisp
14295
14296 This ensures that Gnus doesn't send the @code{MODE READER} command to
14297 nntpd 1.5.11t, since that command chokes that server, I've been told.
14298
14299 @item nntp-maximum-request
14300 @vindex nntp-maximum-request
14301 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
14302 will collect headers by sending a series of @code{head} commands.  To
14303 speed things up, the back end sends lots of these commands without
14304 waiting for reply, and then reads all the replies.  This is controlled
14305 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
14306 your network is buggy, you should set this to 1.
14307
14308 @item nntp-connection-timeout
14309 @vindex nntp-connection-timeout
14310 If you have lots of foreign @code{nntp} groups that you connect to
14311 regularly, you're sure to have problems with @acronym{NNTP} servers not
14312 responding properly, or being too loaded to reply within reasonable
14313 time.  This is can lead to awkward problems, which can be helped
14314 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
14315 that says how many seconds the @code{nntp} back end should wait for a
14316 connection before giving up.  If it is @code{nil}, which is the default,
14317 no timeouts are done.
14318
14319 @item nntp-nov-is-evil
14320 @vindex nntp-nov-is-evil
14321 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
14322 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
14323 can be used.
14324
14325 @item nntp-xover-commands
14326 @vindex nntp-xover-commands
14327 @cindex @acronym{NOV}
14328 @cindex XOVER
14329 List of strings used as commands to fetch @acronym{NOV} lines from a
14330 server.  The default value of this variable is @code{("XOVER"
14331 "XOVERVIEW")}.
14332
14333 @item nntp-nov-gap
14334 @vindex nntp-nov-gap
14335 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
14336 the server.  The server responds with one huge list of lines.  However,
14337 if you have read articles 2-5000 in the group, and only want to read
14338 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
14339 lines that you will not need.  This variable says how
14340 big a gap between two consecutive articles is allowed to be before the
14341 @code{XOVER} request is split into several request.  Note that if your
14342 network is fast, setting this variable to a really small number means
14343 that fetching will probably be slower.  If this variable is @code{nil},
14344 @code{nntp} will never split requests.  The default is 5.
14345
14346 @item nntp-xref-number-is-evil
14347 @vindex nntp-xref-number-is-evil
14348 When Gnus refers to an article having the @code{Message-ID} that a user
14349 specifies or having the @code{Message-ID} of the parent article of the
14350 current one (@pxref{Finding the Parent}), Gnus sends a @code{HEAD}
14351 command to the @acronym{NNTP} server to know where it is, and the server
14352 returns the data containing the pairs of a group and an article number
14353 in the @code{Xref} header.  Gnus normally uses the article number to
14354 refer to the article if the data shows that that article is in the
14355 current group, while it uses the @code{Message-ID} otherwise.  However,
14356 some news servers, e.g., ones running Diablo, run multiple engines
14357 having the same articles but article numbers are not kept synchronized
14358 between them.  In that case, the article number that appears in the
14359 @code{Xref} header varies by which engine is chosen, so you cannot refer
14360 to the parent article that is in the current group, for instance.  If
14361 you connect to such a server, set this variable to a non-@code{nil}
14362 value, and Gnus never uses article numbers.  For example:
14363
14364 @lisp
14365 (setq gnus-select-method
14366       '(nntp "newszilla"
14367              (nntp-address "newszilla.example.com")
14368              (nntp-xref-number-is-evil t)
14369              @dots{}))
14370 @end lisp
14371
14372 The default value of this server variable is @code{nil}.
14373
14374 @item nntp-prepare-server-hook
14375 @vindex nntp-prepare-server-hook
14376 A hook run before attempting to connect to an @acronym{NNTP} server.
14377
14378 @item nntp-record-commands
14379 @vindex nntp-record-commands
14380 If non-@code{nil}, @code{nntp} will log all commands it sends to the
14381 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
14382 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
14383 that doesn't seem to work.
14384
14385 @item nntp-open-connection-function
14386 @vindex nntp-open-connection-function
14387 It is possible to customize how the connection to the nntp server will
14388 be opened.  If you specify an @code{nntp-open-connection-function}
14389 parameter, Gnus will use that function to establish the connection.
14390 Seven pre-made functions are supplied.  These functions can be grouped
14391 in two categories: direct connection functions (four pre-made), and
14392 indirect ones (three pre-made).
14393
14394 @item nntp-never-echoes-commands
14395 @vindex nntp-never-echoes-commands
14396 Non-@code{nil} means the nntp server never echoes commands.  It is
14397 reported that some nntps server doesn't echo commands.  So, you may want
14398 to set this to non-@code{nil} in the method for such a server setting
14399 @code{nntp-open-connection-function} to @code{nntp-open-ssl-stream} for
14400 example.  The default value is @code{nil}.  Note that the
14401 @code{nntp-open-connection-functions-never-echo-commands} variable
14402 overrides the @code{nil} value of this variable.
14403
14404 @item nntp-open-connection-functions-never-echo-commands
14405 @vindex nntp-open-connection-functions-never-echo-commands
14406 List of functions that never echo commands.  Add or set a function which
14407 you set to @code{nntp-open-connection-function} to this list if it does
14408 not echo commands.  Note that a non-@code{nil} value of the
14409 @code{nntp-never-echoes-commands} variable overrides this variable.  The
14410 default value is @code{(nntp-open-network-stream)}.
14411
14412 @item nntp-prepare-post-hook
14413 @vindex nntp-prepare-post-hook
14414 A hook run just before posting an article.  If there is no
14415 @code{Message-ID} header in the article and the news server provides the
14416 recommended ID, it will be added to the article before running this
14417 hook.  It is useful to make @code{Cancel-Lock} headers even if you
14418 inhibit Gnus to add a @code{Message-ID} header, you could say:
14419
14420 @lisp
14421 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
14422 @end lisp
14423
14424 Note that not all servers support the recommended ID.  This works for
14425 INN versions 2.3.0 and later, for instance.
14426
14427 @end table
14428
14429 @menu
14430 * Direct Functions::            Connecting directly to the server.
14431 * Indirect Functions::          Connecting indirectly to the server.
14432 * Common Variables::            Understood by several connection functions.
14433 * NNTP marks::                  Storing marks for @acronym{NNTP} servers.
14434 @end menu
14435
14436
14437 @node Direct Functions
14438 @subsubsection Direct Functions
14439 @cindex direct connection functions
14440
14441 These functions are called direct because they open a direct connection
14442 between your machine and the @acronym{NNTP} server.  The behavior of these
14443 functions is also affected by commonly understood variables
14444 (@pxref{Common Variables}).
14445
14446 @table @code
14447 @findex nntp-open-network-stream
14448 @item nntp-open-network-stream
14449 This is the default, and simply connects to some port or other on the
14450 remote system.
14451
14452 @findex nntp-open-tls-stream
14453 @item nntp-open-tls-stream
14454 Opens a connection to a server over a @dfn{secure} channel.  To use
14455 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
14456 installed.  You then define a server as follows:
14457
14458 @lisp
14459 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
14460 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
14461 ;;
14462 (nntp "snews.bar.com"
14463       (nntp-open-connection-function nntp-open-tls-stream)
14464       (nntp-port-number 563)
14465       (nntp-address "snews.bar.com"))
14466 @end lisp
14467
14468 @findex nntp-open-ssl-stream
14469 @item nntp-open-ssl-stream
14470 Opens a connection to a server over a @dfn{secure} channel.  To use
14471 this you must have @uref{http://www.openssl.org, OpenSSL} or
14472 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
14473 then define a server as follows:
14474
14475 @lisp
14476 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
14477 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
14478 ;;
14479 (nntp "snews.bar.com"
14480       (nntp-open-connection-function nntp-open-ssl-stream)
14481       (nntp-port-number 563)
14482       (nntp-address "snews.bar.com"))
14483 @end lisp
14484
14485 @findex nntp-open-netcat-stream
14486 @item nntp-open-netcat-stream
14487 Opens a connection to an @acronym{NNTP} server using the @code{netcat}
14488 program.  You might wonder why this function exists, since we have
14489 the default @code{nntp-open-network-stream} which would do the job.  (One
14490 of) the reason(s) is that if you are behind a firewall but have direct
14491 connections to the outside world thanks to a command wrapper like
14492 @code{runsocks}, you can use it like this:
14493
14494 @lisp
14495 (nntp "socksified"
14496       (nntp-pre-command "runsocks")
14497       (nntp-open-connection-function nntp-open-netcat-stream)
14498       (nntp-address "the.news.server"))
14499 @end lisp
14500
14501 With the default method, you would need to wrap your whole Emacs
14502 session, which is not a good idea.
14503
14504 @findex nntp-open-telnet-stream
14505 @item nntp-open-telnet-stream
14506 Like @code{nntp-open-netcat-stream}, but uses @code{telnet} rather than
14507 @code{netcat}.  @code{telnet} is a bit less robust because of things
14508 like line-end-conversion, but sometimes netcat is simply
14509 not available.  The previous example would turn into:
14510
14511 @lisp
14512 (nntp "socksified"
14513       (nntp-pre-command "runsocks")
14514       (nntp-open-connection-function nntp-open-telnet-stream)
14515       (nntp-address "the.news.server")
14516       (nntp-end-of-line "\n"))
14517 @end lisp
14518 @end table
14519
14520
14521 @node Indirect Functions
14522 @subsubsection Indirect Functions
14523 @cindex indirect connection functions
14524
14525 These functions are called indirect because they connect to an
14526 intermediate host before actually connecting to the @acronym{NNTP} server.
14527 All of these functions and related variables are also said to belong to
14528 the ``via'' family of connection: they're all prefixed with ``via'' to make
14529 things cleaner.  The behavior of these functions is also affected by
14530 commonly understood variables (@pxref{Common Variables}).
14531
14532 @table @code
14533 @item nntp-open-via-rlogin-and-netcat
14534 @findex nntp-open-via-rlogin-and-netcat
14535 Does an @samp{rlogin} on a remote system, and then uses @code{netcat} to connect
14536 to the real @acronym{NNTP} server from there.  This is useful for instance if
14537 you need to connect to a firewall machine first.
14538
14539 @code{nntp-open-via-rlogin-and-netcat}-specific variables:
14540
14541 @table @code
14542 @item nntp-via-rlogin-command
14543 @vindex nntp-via-rlogin-command
14544 Command used to log in on the intermediate host.  The default is
14545 @samp{rsh}, but @samp{ssh} is a popular alternative.
14546
14547 @item nntp-via-rlogin-command-switches
14548 @vindex nntp-via-rlogin-command-switches
14549 List of strings to be used as the switches to
14550 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
14551 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
14552 @samp{("-C")} in order to compress all data connections.
14553 @end table
14554
14555 @item nntp-open-via-rlogin-and-telnet
14556 @findex nntp-open-via-rlogin-and-telnet
14557 Does essentially the same, but uses @code{telnet} instead of @samp{netcat}
14558 to connect to the real @acronym{NNTP} server from the intermediate host.
14559 @code{telnet} is a bit less robust because of things like
14560 line-end-conversion, but sometimes @code{netcat} is simply not available.
14561
14562 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
14563
14564 @table @code
14565 @item nntp-telnet-command
14566 @vindex nntp-telnet-command
14567 Command used to connect to the real @acronym{NNTP} server from the
14568 intermediate host.  The default is @samp{telnet}.
14569
14570 @item nntp-telnet-switches
14571 @vindex nntp-telnet-switches
14572 List of strings to be used as the switches to the
14573 @code{nntp-telnet-command} command.  The default is @code{("-8")}.
14574
14575 @item nntp-via-rlogin-command
14576 @vindex nntp-via-rlogin-command
14577 Command used to log in on the intermediate host.  The default is
14578 @samp{rsh}, but @samp{ssh} is a popular alternative.
14579
14580 @item nntp-via-rlogin-command-switches
14581 @vindex nntp-via-rlogin-command-switches
14582 List of strings to be used as the switches to
14583 @code{nntp-via-rlogin-command}.  If you use @samp{ssh},  you may need to set
14584 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
14585 the telnet command requires a pseudo-tty allocation on an intermediate
14586 host.  The default is @code{nil}.
14587 @end table
14588
14589 Note that you may want to change the value for @code{nntp-end-of-line}
14590 to @samp{\n} (@pxref{Common Variables}).
14591
14592 @item nntp-open-via-telnet-and-telnet
14593 @findex nntp-open-via-telnet-and-telnet
14594 Does essentially the same, but uses @samp{telnet} instead of
14595 @samp{rlogin} to connect to the intermediate host.
14596
14597 @code{nntp-open-via-telnet-and-telnet}-specific variables:
14598
14599 @table @code
14600 @item nntp-via-telnet-command
14601 @vindex nntp-via-telnet-command
14602 Command used to @code{telnet} the intermediate host.  The default is
14603 @samp{telnet}.
14604
14605 @item nntp-via-telnet-switches
14606 @vindex nntp-via-telnet-switches
14607 List of strings to be used as the switches to the
14608 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
14609
14610 @item nntp-via-user-password
14611 @vindex nntp-via-user-password
14612 Password to use when logging in on the intermediate host.
14613
14614 @item nntp-via-envuser
14615 @vindex nntp-via-envuser
14616 If non-@code{nil}, the intermediate @code{telnet} session (client and
14617 server both) will support the @code{ENVIRON} option and not prompt for
14618 login name.  This works for Solaris @code{telnet}, for instance.
14619
14620 @item nntp-via-shell-prompt
14621 @vindex nntp-via-shell-prompt
14622 Regexp matching the shell prompt on the intermediate host.  The default
14623 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
14624
14625 @end table
14626
14627 Note that you may want to change the value for @code{nntp-end-of-line}
14628 to @samp{\n} (@pxref{Common Variables}).
14629 @end table
14630
14631
14632 Here are some additional variables that are understood by all the above
14633 functions:
14634
14635 @table @code
14636
14637 @item nntp-via-user-name
14638 @vindex nntp-via-user-name
14639 User name to use when connecting to the intermediate host.
14640
14641 @item nntp-via-address
14642 @vindex nntp-via-address
14643 Address of the intermediate host to connect to.
14644
14645 @end table
14646
14647
14648 @node Common Variables
14649 @subsubsection Common Variables
14650
14651 The following variables affect the behavior of all, or several of the
14652 pre-made connection functions.  When not specified, all functions are
14653 affected (the values of the following variables will be used as the
14654 default if each virtual @code{nntp} server doesn't specify those server
14655 variables individually).
14656
14657 @table @code
14658
14659 @item nntp-pre-command
14660 @vindex nntp-pre-command
14661 A command wrapper to use when connecting through a non native
14662 connection function (all except @code{nntp-open-network-stream},
14663 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}).  This is
14664 where you would put a @samp{SOCKS} wrapper for instance.
14665
14666 @item nntp-address
14667 @vindex nntp-address
14668 The address of the @acronym{NNTP} server.
14669
14670 @item nntp-port-number
14671 @vindex nntp-port-number
14672 Port number to connect to the @acronym{NNTP} server.  The default is
14673 @samp{nntp}.  If you use @acronym{NNTP} over
14674 @acronym{TLS}/@acronym{SSL}, you may want to use integer ports rather
14675 than named ports (i.e, use @samp{563} instead of @samp{snews} or
14676 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
14677 not work with named ports.
14678
14679 @item nntp-end-of-line
14680 @vindex nntp-end-of-line
14681 String to use as end-of-line marker when talking to the @acronym{NNTP}
14682 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
14683 using a non native telnet connection function.
14684
14685 @item nntp-netcat-command
14686 @vindex nntp-netcat-command
14687 Command to use when connecting to the @acronym{NNTP} server through
14688 @samp{netcat}.  This is @emph{not} for an intermediate host.  This is
14689 just for the real @acronym{NNTP} server.  The default is
14690 @samp{nc}.
14691
14692 @item nntp-netcat-switches
14693 @vindex nntp-netcat-switches
14694 A list of switches to pass to @code{nntp-netcat-command}.  The default
14695 is @samp{()}.
14696
14697 @end table
14698
14699 @node NNTP marks
14700 @subsubsection NNTP marks
14701 @cindex storing NNTP marks
14702
14703 Gnus stores marks (@pxref{Marking Articles}) for @acronym{NNTP}
14704 servers in marks files.  A marks file records what marks you have set
14705 in a group and each file is specific to the corresponding server.
14706 Marks files are stored in @file{~/News/marks}
14707 (@code{nntp-marks-directory}) under a classic hierarchy resembling
14708 that of a news server, for example marks for the group
14709 @samp{gmane.discuss} on the news.gmane.org server will be stored in
14710 the file @file{~/News/marks/news.gmane.org/gmane/discuss/.marks}.
14711
14712 Marks files are useful because you can copy the @file{~/News/marks}
14713 directory (using rsync, scp or whatever) to another Gnus installation,
14714 and it will realize what articles you have read and marked.  The data
14715 in @file{~/News/marks} has priority over the same data in
14716 @file{~/.newsrc.eld}.
14717
14718 Note that marks files are very much server-specific: Gnus remembers
14719 the article numbers so if you don't use the same servers on both
14720 installations things are most likely to break (most @acronym{NNTP}
14721 servers do not use the same article numbers as any other server).
14722 However, if you use servers A, B, C on one installation and servers A,
14723 D, E on the other, you can sync the marks files for A and then you'll
14724 get synchronization for that server between the two installations.
14725
14726 Using @acronym{NNTP} marks can possibly incur a performance penalty so
14727 if Gnus feels sluggish, try setting the @code{nntp-marks-is-evil}
14728 variable to @code{t}.  Marks will then be stored in @file{~/.newsrc.eld}.
14729
14730 Related variables:
14731
14732 @table @code
14733
14734 @item nntp-marks-is-evil
14735 @vindex nntp-marks-is-evil
14736 If non-@code{nil}, this back end will ignore any marks files.  The
14737 default is @code{nil}.
14738
14739 @item nntp-marks-directory
14740 @vindex nntp-marks-directory
14741 The directory where marks for nntp groups will be stored.
14742
14743 @end table
14744
14745
14746 @node News Spool
14747 @subsection News Spool
14748 @cindex nnspool
14749 @cindex news spool
14750
14751 Subscribing to a foreign group from the local spool is extremely easy,
14752 and might be useful, for instance, to speed up reading groups that
14753 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
14754 instance.
14755
14756 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
14757 anything else) as the address.
14758
14759 If you have access to a local spool, you should probably use that as the
14760 native select method (@pxref{Finding the News}).  It is normally faster
14761 than using an @code{nntp} select method, but might not be.  It depends.
14762 You just have to try to find out what's best at your site.
14763
14764 @table @code
14765
14766 @item nnspool-inews-program
14767 @vindex nnspool-inews-program
14768 Program used to post an article.
14769
14770 @item nnspool-inews-switches
14771 @vindex nnspool-inews-switches
14772 Parameters given to the inews program when posting an article.
14773
14774 @item nnspool-spool-directory
14775 @vindex nnspool-spool-directory
14776 Where @code{nnspool} looks for the articles.  This is normally
14777 @file{/usr/spool/news/}.
14778
14779 @item nnspool-nov-directory
14780 @vindex nnspool-nov-directory
14781 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
14782 @file{/usr/spool/news/over.view/}.
14783
14784 @item nnspool-lib-dir
14785 @vindex nnspool-lib-dir
14786 Where the news lib dir is (@file{/usr/lib/news/} by default).
14787
14788 @item nnspool-active-file
14789 @vindex nnspool-active-file
14790 The name of the active file.
14791
14792 @item nnspool-newsgroups-file
14793 @vindex nnspool-newsgroups-file
14794 The name of the group descriptions file.
14795
14796 @item nnspool-history-file
14797 @vindex nnspool-history-file
14798 The name of the news history file.
14799
14800 @item nnspool-active-times-file
14801 @vindex nnspool-active-times-file
14802 The name of the active date file.
14803
14804 @item nnspool-nov-is-evil
14805 @vindex nnspool-nov-is-evil
14806 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
14807 that it finds.
14808
14809 @item nnspool-sift-nov-with-sed
14810 @vindex nnspool-sift-nov-with-sed
14811 @cindex sed
14812 If non-@code{nil}, which is the default, use @code{sed} to get the
14813 relevant portion from the overview file.  If @code{nil},
14814 @code{nnspool} will load the entire file into a buffer and process it
14815 there.
14816
14817 @end table
14818
14819
14820 @node Getting Mail
14821 @section Getting Mail
14822 @cindex reading mail
14823 @cindex mail
14824
14825 Reading mail with a newsreader---isn't that just plain WeIrD? But of
14826 course.
14827
14828 @menu
14829 * Mail in a Newsreader::        Important introductory notes.
14830 * Getting Started Reading Mail::  A simple cookbook example.
14831 * Splitting Mail::              How to create mail groups.
14832 * Mail Sources::                How to tell Gnus where to get mail from.
14833 * Mail Back End Variables::     Variables for customizing mail handling.
14834 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
14835 * Group Mail Splitting::        Use group customize to drive mail splitting.
14836 * Incorporating Old Mail::      What about the old mail you have?
14837 * Expiring Mail::               Getting rid of unwanted mail.
14838 * Washing Mail::                Removing cruft from the mail you get.
14839 * Duplicates::                  Dealing with duplicated mail.
14840 * Not Reading Mail::            Using mail back ends for reading other files.
14841 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
14842 @end menu
14843
14844
14845 @node Mail in a Newsreader
14846 @subsection Mail in a Newsreader
14847
14848 If you are used to traditional mail readers, but have decided to switch
14849 to reading mail with Gnus, you may find yourself experiencing something
14850 of a culture shock.
14851
14852 Gnus does not behave like traditional mail readers.  If you want to make
14853 it behave that way, you can, but it's an uphill battle.
14854
14855 Gnus, by default, handles all its groups using the same approach.  This
14856 approach is very newsreaderly---you enter a group, see the new/unread
14857 messages, and when you read the messages, they get marked as read, and
14858 you don't see them any more.  (Unless you explicitly ask for them.)
14859
14860 In particular, you do not do anything explicitly to delete messages.
14861
14862 Does this mean that all the messages that have been marked as read are
14863 deleted?  How awful!
14864
14865 But, no, it means that old messages are @dfn{expired} according to some
14866 scheme or other.  For news messages, the expire process is controlled by
14867 the news administrator; for mail, the expire process is controlled by
14868 you.  The expire process for mail is covered in depth in @ref{Expiring
14869 Mail}.
14870
14871 What many Gnus users find, after using it a while for both news and
14872 mail, is that the transport mechanism has very little to do with how
14873 they want to treat a message.
14874
14875 Many people subscribe to several mailing lists.  These are transported
14876 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
14877 answering, or even reading these messages very carefully.  We may not
14878 need to save them because if we should need to read one again, they are
14879 archived somewhere else.
14880
14881 Some people have local news groups which have only a handful of readers.
14882 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
14883 to read and answer a large fraction of the messages very carefully in
14884 order to do our work.  And there may not be an archive, so we may need
14885 to save the interesting messages the same way we would personal mail.
14886
14887 The important distinction turns out to be not the transport mechanism,
14888 but other factors such as how interested we are in the subject matter,
14889 or how easy it is to retrieve the message if we need to read it again.
14890
14891 Gnus provides many options for sorting mail into ``groups'' which behave
14892 like newsgroups, and for treating each group (whether mail or news)
14893 differently.
14894
14895 Some users never get comfortable using the Gnus (ahem) paradigm and wish
14896 that Gnus should grow up and be a male, er, mail reader.  It is possible
14897 to whip Gnus into a more mailreaderly being, but, as said before, it's
14898 not easy.  People who prefer proper mail readers should try @sc{vm}
14899 instead, which is an excellent, and proper, mail reader.
14900
14901 I don't mean to scare anybody off, but I want to make it clear that you
14902 may be required to learn a new way of thinking about messages.  After
14903 you've been subjected to The Gnus Way, you will come to love it.  I can
14904 guarantee it.  (At least the guy who sold me the Emacs Subliminal
14905 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
14906 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
14907 You Do.)
14908
14909
14910 @node Getting Started Reading Mail
14911 @subsection Getting Started Reading Mail
14912
14913 It's quite easy to use Gnus to read your new mail.  You just plonk the
14914 mail back end of your choice into @code{gnus-secondary-select-methods},
14915 and things will happen automatically.
14916
14917 For instance, if you want to use @code{nnml} (which is a ``one file per
14918 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
14919
14920 @lisp
14921 (setq gnus-secondary-select-methods '((nnml "")))
14922 @end lisp
14923
14924 Now, the next time you start Gnus, this back end will be queried for new
14925 articles, and it will move all the messages in your spool file to its
14926 directory, which is @file{~/Mail/} by default.  The new group that will
14927 be created (@samp{mail.misc}) will be subscribed, and you can read it
14928 like any other group.
14929
14930 You will probably want to split the mail into several groups, though:
14931
14932 @lisp
14933 (setq nnmail-split-methods
14934       '(("junk" "^From:.*Lars Ingebrigtsen")
14935         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
14936         ("other" "")))
14937 @end lisp
14938
14939 This will result in three new @code{nnml} mail groups being created:
14940 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
14941 mail that doesn't fit into the first two groups will be placed in the
14942 last group.
14943
14944 This should be sufficient for reading mail with Gnus.  You might want to
14945 give the other sections in this part of the manual a perusal, though.
14946 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
14947
14948
14949 @node Splitting Mail
14950 @subsection Splitting Mail
14951 @cindex splitting mail
14952 @cindex mail splitting
14953 @cindex mail filtering (splitting)
14954
14955 @vindex nnmail-split-methods
14956 The @code{nnmail-split-methods} variable says how the incoming mail is
14957 to be split into groups.
14958
14959 @lisp
14960 (setq nnmail-split-methods
14961   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
14962     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
14963     ("mail.other" "")))
14964 @end lisp
14965
14966 This variable is a list of lists, where the first element of each of
14967 these lists is the name of the mail group (they do not have to be called
14968 something beginning with @samp{mail}, by the way), and the second
14969 element is a regular expression used on the header of each mail to
14970 determine if it belongs in this mail group.  The first string may
14971 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
14972 insert sub-expressions from the matched text.  For instance:
14973
14974 @lisp
14975 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
14976 @end lisp
14977
14978 @noindent
14979 In that case, @code{nnmail-split-lowercase-expanded} controls whether
14980 the inserted text should be made lowercase.  @xref{Fancy Mail Splitting}.
14981
14982 The second element can also be a function.  In that case, it will be
14983 called narrowed to the headers with the first element of the rule as the
14984 argument.  It should return a non-@code{nil} value if it thinks that the
14985 mail belongs in that group.
14986
14987 @cindex @samp{bogus} group
14988 The last of these groups should always be a general one, and the regular
14989 expression should @emph{always} be @samp{""} so that it matches any mails
14990 that haven't been matched by any of the other regexps.  (These rules are
14991 processed from the beginning of the alist toward the end.  The first rule
14992 to make a match will ``win'', unless you have crossposting enabled.  In
14993 that case, all matching rules will ``win''.)  If no rule matched, the mail
14994 will end up in the @samp{bogus} group.  When new groups are created by
14995 splitting mail, you may want to run @code{gnus-group-find-new-groups} to
14996 see the new groups.  This also applies to the @samp{bogus} group.
14997
14998 If you like to tinker with this yourself, you can set this variable to a
14999 function of your choice.  This function will be called without any
15000 arguments in a buffer narrowed to the headers of an incoming mail
15001 message.  The function should return a list of group names that it
15002 thinks should carry this mail message.
15003
15004 Note that the mail back ends are free to maul the poor, innocent,
15005 incoming headers all they want to.  They all add @code{Lines} headers;
15006 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
15007 @code{From<SPACE>} line to something else.
15008
15009 @vindex nnmail-crosspost
15010 The mail back ends all support cross-posting.  If several regexps match,
15011 the mail will be ``cross-posted'' to all those groups.
15012 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
15013 that no articles are crossposted to the general (@samp{""}) group.
15014
15015 @vindex nnmail-crosspost-link-function
15016 @cindex crosspost
15017 @cindex links
15018 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
15019 the crossposted articles.  However, not all file systems support hard
15020 links.  If that's the case for you, set
15021 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
15022 variable is @code{add-name-to-file} by default.)
15023
15024 @kindex M-x nnmail-split-history
15025 @findex nnmail-split-history
15026 If you wish to see where the previous mail split put the messages, you
15027 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
15028 where re-spooling messages would put the messages, you can use
15029 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
15030 Group Commands}).
15031
15032 @vindex nnmail-split-header-length-limit
15033 Header lines longer than the value of
15034 @code{nnmail-split-header-length-limit} are excluded from the split
15035 function.
15036
15037 @vindex nnmail-mail-splitting-decodes
15038 @vindex nnmail-mail-splitting-charset
15039 By default, splitting does not decode headers, so you can not match on
15040 non-@acronym{ASCII} strings.  But it is useful if you want to match
15041 articles based on the raw header data.  To enable it, set the
15042 @code{nnmail-mail-splitting-decodes} variable to a non-@code{nil} value.
15043 In addition, the value of the @code{nnmail-mail-splitting-charset}
15044 variable is used for decoding non-@acronym{MIME} encoded string when
15045 @code{nnmail-mail-splitting-decodes} is non-@code{nil}.  The default
15046 value is @code{nil} which means not to decode non-@acronym{MIME} encoded
15047 string.  A suitable value for you will be @code{undecided} or be the
15048 charset used normally in mails you are interested in.
15049
15050 @vindex nnmail-resplit-incoming
15051 By default, splitting is performed on all incoming messages.  If you
15052 specify a @code{directory} entry for the variable @code{mail-sources}
15053 (@pxref{Mail Source Specifiers}), however, then splitting does
15054 @emph{not} happen by default.  You can set the variable
15055 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
15056 splitting happen even in this case.  (This variable has no effect on
15057 other kinds of entries.)
15058
15059 Gnus gives you all the opportunity you could possibly want for shooting
15060 yourself in the foot.  Let's say you create a group that will contain
15061 all the mail you get from your boss.  And then you accidentally
15062 unsubscribe from the group.  Gnus will still put all the mail from your
15063 boss in the unsubscribed group, and so, when your boss mails you ``Have
15064 that report ready by Monday or you're fired!'', you'll never see it and,
15065 come Tuesday, you'll still believe that you're gainfully employed while
15066 you really should be out collecting empty bottles to save up for next
15067 month's rent money.
15068
15069
15070 @node Mail Sources
15071 @subsection Mail Sources
15072
15073 Mail can be gotten from many different sources---the mail spool, from
15074 a @acronym{POP} mail server, from a procmail directory, or from a
15075 maildir, for instance.
15076
15077 @menu
15078 * Mail Source Specifiers::      How to specify what a mail source is.
15079 * Mail Source Customization::   Some variables that influence things.
15080 * Fetching Mail::               Using the mail source specifiers.
15081 @end menu
15082
15083
15084 @node Mail Source Specifiers
15085 @subsubsection Mail Source Specifiers
15086 @cindex POP
15087 @cindex mail server
15088 @cindex procmail
15089 @cindex mail spool
15090 @cindex mail source
15091
15092 You tell Gnus how to fetch mail by setting @code{mail-sources}
15093 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
15094
15095 Here's an example:
15096
15097 @lisp
15098 (pop :server "pop3.mailserver.com" :user "myname")
15099 @end lisp
15100
15101 As can be observed, a mail source specifier is a list where the first
15102 element is a @dfn{mail source type}, followed by an arbitrary number of
15103 @dfn{keywords}.  Keywords that are not explicitly specified are given
15104 default values.
15105
15106 The @code{mail-sources} is global for all mail groups.  You can specify
15107 an additional mail source for a particular group by including the
15108 @code{group} mail specifier in @code{mail-sources}, and setting a
15109 @code{mail-source} group parameter (@pxref{Group Parameters}) specifying
15110 a single mail source.  When this is used, @code{mail-sources} is
15111 typically just @code{(group)}; the @code{mail-source} parameter for a
15112 group might look like this:
15113
15114 @lisp
15115 (mail-source . (file :path "home/user/spools/foo.spool"))
15116 @end lisp
15117
15118 This means that the group's (and only this group's) messages will be
15119 fetched from the spool file @samp{/user/spools/foo.spool}.
15120
15121 The following mail source types are available:
15122
15123 @table @code
15124 @item file
15125 Get mail from a single file; typically from the mail spool.
15126
15127 Keywords:
15128
15129 @table @code
15130 @item :path
15131 The file name.  Defaults to the value of the @env{MAIL}
15132 environment variable or the value of @code{rmail-spool-directory}
15133 (usually something like @file{/usr/mail/spool/user-name}).
15134
15135 @item :prescript
15136 @itemx :postscript
15137 Script run before/after fetching mail.
15138 @end table
15139
15140 An example file mail source:
15141
15142 @lisp
15143 (file :path "/usr/spool/mail/user-name")
15144 @end lisp
15145
15146 Or using the default file name:
15147
15148 @lisp
15149 (file)
15150 @end lisp
15151
15152 If the mail spool file is not located on the local machine, it's best
15153 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
15154 You can not use ange-ftp file names here---it has no way to lock the
15155 mail spool while moving the mail.
15156
15157 If it's impossible to set up a proper server, you can use ssh instead.
15158
15159 @lisp
15160 (setq mail-sources
15161       '((file :prescript "ssh host bin/getmail >%t")))
15162 @end lisp
15163
15164 The @samp{getmail} script would look something like the following:
15165
15166 @example
15167 #!/bin/sh
15168 #  getmail - move mail from spool to stdout
15169 #  flu@@iki.fi
15170
15171 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
15172 TMP=$HOME/Mail/tmp
15173 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
15174 @end example
15175
15176 Alter this script to fit the @samp{movemail} and temporary
15177 file you want to use.
15178
15179
15180 @item directory
15181 @vindex nnmail-scan-directory-mail-source-once
15182 Get mail from several files in a directory.  This is typically used
15183 when you have procmail split the incoming mail into several files.
15184 That is, there is a one-to-one correspondence between files in that
15185 directory and groups, so that mail from the file @file{foo.bar.spool}
15186 will be put in the group @code{foo.bar}.  (You can change the suffix
15187 to be used instead of @code{.spool}.)  Setting
15188 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
15189 Gnus to scan the mail source only once.  This is particularly useful
15190 if you want to scan mail groups at a specified level.
15191
15192 @vindex nnmail-resplit-incoming
15193 There is also the variable @code{nnmail-resplit-incoming}, if you set
15194 that to a non-@code{nil} value, then the normal splitting process is
15195 applied to all the files from the directory, @ref{Splitting Mail}.
15196
15197 Keywords:
15198
15199 @table @code
15200 @item :path
15201 The name of the directory where the files are.  There is no default
15202 value.
15203
15204 @item :suffix
15205 Only files ending with this suffix are used.  The default is
15206 @samp{.spool}.
15207
15208 @item :predicate
15209 Only files that have this predicate return non-@code{nil} are returned.
15210 The default is @code{identity}.  This is used as an additional
15211 filter---only files that have the right suffix @emph{and} satisfy this
15212 predicate are considered.
15213
15214 @item :prescript
15215 @itemx :postscript
15216 Script run before/after fetching mail.
15217
15218 @end table
15219
15220 An example directory mail source:
15221
15222 @lisp
15223 (directory :path "/home/user-name/procmail-dir/"
15224            :suffix ".prcml")
15225 @end lisp
15226
15227 @item pop
15228 Get mail from a @acronym{POP} server.
15229
15230 Keywords:
15231
15232 @table @code
15233 @item :server
15234 The name of the @acronym{POP} server.  The default is taken from the
15235 @env{MAILHOST} environment variable.
15236
15237 @item :port
15238 The port number of the @acronym{POP} server.  This can be a number (eg,
15239 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
15240 string, it should be a service name as listed in @file{/etc/services} on
15241 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
15242 need to specify it as @samp{"pop-3"} instead.
15243
15244 @item :user
15245 The user name to give to the @acronym{POP} server.  The default is the login
15246 name.
15247
15248 @item :password
15249 The password to give to the @acronym{POP} server.  If not specified,
15250 the user is prompted.
15251
15252 @item :program
15253 The program to use to fetch mail from the @acronym{POP} server.  This
15254 should be a @code{format}-like string.  Here's an example:
15255
15256 @example
15257 fetchmail %u@@%s -P %p %t
15258 @end example
15259
15260 The valid format specifier characters are:
15261
15262 @table @samp
15263 @item t
15264 The name of the file the mail is to be moved to.  This must always be
15265 included in this string.
15266
15267 @item s
15268 The name of the server.
15269
15270 @item P
15271 The port number of the server.
15272
15273 @item u
15274 The user name to use.
15275
15276 @item p
15277 The password to use.
15278 @end table
15279
15280 The values used for these specs are taken from the values you give the
15281 corresponding keywords.
15282
15283 @item :prescript
15284 A script to be run before fetching the mail.  The syntax is the same as
15285 the @code{:program} keyword.  This can also be a function to be run.
15286
15287 @item :postscript
15288 A script to be run after fetching the mail.  The syntax is the same as
15289 the @code{:program} keyword.  This can also be a function to be run.
15290
15291 @item :function
15292 The function to use to fetch mail from the @acronym{POP} server.  The
15293 function is called with one parameter---the name of the file where the
15294 mail should be moved to.
15295
15296 @item :authentication
15297 This can be either the symbol @code{password} or the symbol @code{apop}
15298 and says what authentication scheme to use.  The default is
15299 @code{password}.
15300
15301 @end table
15302
15303 @vindex pop3-movemail
15304 @vindex pop3-leave-mail-on-server
15305 If the @code{:program} and @code{:function} keywords aren't specified,
15306 @code{pop3-movemail} will be used.  If @code{pop3-leave-mail-on-server}
15307 is non-@code{nil} the mail is to be left on the @acronym{POP} server
15308 after fetching when using @code{pop3-movemail}.  Note that POP servers
15309 maintain no state information between sessions, so what the client
15310 believes is there and what is actually there may not match up.  If they
15311 do not, then you may get duplicate mails or the whole thing can fall
15312 apart and leave you with a corrupt mailbox.
15313
15314 Here are some examples for getting mail from a @acronym{POP} server.
15315 Fetch from the default @acronym{POP} server, using the default user
15316 name, and default fetcher:
15317
15318 @lisp
15319 (pop)
15320 @end lisp
15321
15322 Fetch from a named server with a named user and password:
15323
15324 @lisp
15325 (pop :server "my.pop.server"
15326      :user "user-name" :password "secret")
15327 @end lisp
15328
15329 Use @samp{movemail} to move the mail:
15330
15331 @lisp
15332 (pop :program "movemail po:%u %t %p")
15333 @end lisp
15334
15335 @item maildir
15336 Get mail from a maildir.  This is a type of mailbox that is supported by
15337 at least qmail and postfix, where each file in a special directory
15338 contains exactly one mail.
15339
15340 Keywords:
15341
15342 @table @code
15343 @item :path
15344 The name of the directory where the mails are stored.  The default is
15345 taken from the @env{MAILDIR} environment variable or
15346 @file{~/Maildir/}.
15347 @item :subdirs
15348 The subdirectories of the Maildir.  The default is
15349 @samp{("new" "cur")}.
15350
15351 @c If you sometimes look at your mail through a pop3 daemon before fetching
15352 @c them with Gnus, you may also have to fetch your mails from the
15353 @c @code{cur} directory inside the maildir, like in the first example
15354 @c below.
15355
15356 You can also get mails from remote hosts (because maildirs don't suffer
15357 from locking problems).
15358
15359 @end table
15360
15361 Two example maildir mail sources:
15362
15363 @lisp
15364 (maildir :path "/home/user-name/Maildir/"
15365          :subdirs ("cur" "new"))
15366 @end lisp
15367
15368 @lisp
15369 (maildir :path "/user@@remotehost.org:~/Maildir/"
15370          :subdirs ("new"))
15371 @end lisp
15372
15373 @item imap
15374 Get mail from a @acronym{IMAP} server.  If you don't want to use
15375 @acronym{IMAP} as intended, as a network mail reading protocol (ie
15376 with nnimap), for some reason or other, Gnus let you treat it similar
15377 to a @acronym{POP} server and fetches articles from a given
15378 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
15379
15380 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
15381 may need external programs and libraries, @xref{IMAP}.
15382
15383 Keywords:
15384
15385 @table @code
15386 @item :server
15387 The name of the @acronym{IMAP} server.  The default is taken from the
15388 @env{MAILHOST} environment variable.
15389
15390 @item :port
15391 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
15392 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
15393
15394 @item :user
15395 The user name to give to the @acronym{IMAP} server.  The default is the login
15396 name.
15397
15398 @item :password
15399 The password to give to the @acronym{IMAP} server.  If not specified, the user is
15400 prompted.
15401
15402 @item :stream
15403 What stream to use for connecting to the server, this is one of the
15404 symbols in @code{imap-stream-alist}.  Right now, this means
15405 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
15406 @samp{ssl}, @samp{shell} or the default @samp{network}.
15407
15408 @item :authentication
15409 Which authenticator to use for authenticating to the server, this is
15410 one of the symbols in @code{imap-authenticator-alist}.  Right now,
15411 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
15412 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
15413
15414 @item :program
15415 When using the `shell' :stream, the contents of this variable is
15416 mapped into the @code{imap-shell-program} variable.  This should be a
15417 @code{format}-like string (or list of strings).  Here's an example:
15418
15419 @example
15420 ssh %s imapd
15421 @end example
15422
15423 Make sure nothing is interfering with the output of the program, e.g.,
15424 don't forget to redirect the error output to the void.  The valid format
15425 specifier characters are:
15426
15427 @table @samp
15428 @item s
15429 The name of the server.
15430
15431 @item l
15432 User name from @code{imap-default-user}.
15433
15434 @item p
15435 The port number of the server.
15436 @end table
15437
15438 The values used for these specs are taken from the values you give the
15439 corresponding keywords.
15440
15441 @item :mailbox
15442 The name of the mailbox to get mail from.  The default is @samp{INBOX}
15443 which normally is the mailbox which receives incoming mail.
15444
15445 @item :predicate
15446 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
15447 UNDELETED}, is probably the best choice for most people, but if you
15448 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
15449 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
15450 Then all articles in the mailbox is fetched, no matter what.  For a
15451 complete list of predicates, see RFC 2060 section 6.4.4.
15452
15453 @item :fetchflag
15454 How to flag fetched articles on the server, the default @samp{\Deleted}
15455 will mark them as deleted, an alternative would be @samp{\Seen} which
15456 would simply mark them as read.  These are the two most likely choices,
15457 but more flags are defined in RFC 2060 section 2.3.2.
15458
15459 @item :dontexpunge
15460 If non-@code{nil}, don't remove all articles marked as deleted in the
15461 mailbox after finishing the fetch.
15462
15463 @end table
15464
15465 An example @acronym{IMAP} mail source:
15466
15467 @lisp
15468 (imap :server "mail.mycorp.com"
15469       :stream kerberos4
15470       :fetchflag "\\Seen")
15471 @end lisp
15472
15473 @item webmail
15474 Get mail from a webmail server, such as @uref{http://www.hotmail.com/},
15475 @uref{http://webmail.netscape.com/}, @uref{http://www.netaddress.com/},
15476 @uref{http://mail.yahoo.com/}.
15477
15478 NOTE: Webmail largely depends on cookies.  A "one-line-cookie" patch is
15479 required for url "4.0pre.46".
15480
15481 WARNING: Mails may be lost.  NO WARRANTY.
15482
15483 Keywords:
15484
15485 @table @code
15486 @item :subtype
15487 The type of the webmail server.  The default is @code{hotmail}.  The
15488 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
15489
15490 @item :user
15491 The user name to give to the webmail server.  The default is the login
15492 name.
15493
15494 @item :password
15495 The password to give to the webmail server.  If not specified, the user is
15496 prompted.
15497
15498 @item :dontexpunge
15499 If non-@code{nil}, only fetch unread articles and don't move them to
15500 trash folder after finishing the fetch.
15501
15502 @end table
15503
15504 An example webmail source:
15505
15506 @lisp
15507 (webmail :subtype 'hotmail
15508          :user "user-name"
15509          :password "secret")
15510 @end lisp
15511
15512 @item group
15513 Get the actual mail source from the @code{mail-source} group parameter,
15514 @xref{Group Parameters}.
15515
15516 @end table
15517
15518 @table @dfn
15519 @item Common Keywords
15520 Common keywords can be used in any type of mail source.
15521
15522 Keywords:
15523
15524 @table @code
15525 @item :plugged
15526 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
15527 use directory source to get mail, you can specify it as in this
15528 example:
15529
15530 @lisp
15531 (setq mail-sources
15532       '((directory :path "/home/pavel/.Spool/"
15533                    :suffix ""
15534                    :plugged t)))
15535 @end lisp
15536
15537 Gnus will then fetch your mail even when you are unplugged.  This is
15538 useful when you use local mail and news.
15539
15540 @end table
15541 @end table
15542
15543 @subsubsection Function Interface
15544
15545 Some of the above keywords specify a Lisp function to be executed.
15546 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
15547 the value of the keyword while the function is executing.  For example,
15548 consider the following mail-source setting:
15549
15550 @lisp
15551 (setq mail-sources '((pop :user "jrl"
15552                           :server "pophost" :function fetchfunc)))
15553 @end lisp
15554
15555 While the function @code{fetchfunc} is executing, the symbol @code{user}
15556 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
15557 @code{"pophost"}.  The symbols @code{port}, @code{password},
15558 @code{program}, @code{prescript}, @code{postscript}, @code{function},
15559 and @code{authentication} are also bound (to their default values).
15560
15561 See above for a list of keywords for each type of mail source.
15562
15563
15564 @node Mail Source Customization
15565 @subsubsection Mail Source Customization
15566
15567 The following is a list of variables that influence how the mail is
15568 fetched.  You would normally not need to set or change any of these
15569 variables.
15570
15571 @table @code
15572 @item mail-source-crash-box
15573 @vindex mail-source-crash-box
15574 File where mail will be stored while processing it.  The default is@*
15575 @file{~/.emacs-mail-crash-box}.
15576
15577 @cindex Incoming*
15578 @item mail-source-delete-incoming
15579 @vindex mail-source-delete-incoming
15580 If non-@code{nil}, delete incoming files after handling them.  If
15581 @code{t}, delete the files immediately, if @code{nil}, never delete any
15582 files.  If a positive number, delete files older than number of days
15583 (the deletion will only happen when receiving new mail).  You may also
15584 set @code{mail-source-delete-incoming} to @code{nil} and call
15585 @code{mail-source-delete-old-incoming} from a hook or interactively.
15586 @code{mail-source-delete-incoming} defaults to @code{10} in alpha Gnusae
15587 and @code{2} in released Gnusae.  @xref{Gnus Development}.
15588
15589 @item mail-source-delete-old-incoming-confirm
15590 @vindex mail-source-delete-old-incoming-confirm
15591 If non-@code{nil}, ask for confirmation before deleting old incoming
15592 files.  This variable only applies when
15593 @code{mail-source-delete-incoming} is a positive number.
15594
15595 @item mail-source-ignore-errors
15596 @vindex mail-source-ignore-errors
15597 If non-@code{nil}, ignore errors when reading mail from a mail source.
15598
15599 @item mail-source-directory
15600 @vindex mail-source-directory
15601 Directory where incoming mail source files (if any) will be stored.  The
15602 default is @file{~/Mail/}.  At present, the only thing this is used for
15603 is to say where the incoming files will be stored if the variable
15604 @code{mail-source-delete-incoming} is @code{nil} or a number.
15605
15606 @item mail-source-incoming-file-prefix
15607 @vindex mail-source-incoming-file-prefix
15608 Prefix for file name for storing incoming mail.  The default is
15609 @file{Incoming}, in which case files will end up with names like
15610 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
15611 relevant if @code{mail-source-delete-incoming} is @code{nil} or a
15612 number.
15613
15614 @item mail-source-default-file-modes
15615 @vindex mail-source-default-file-modes
15616 All new mail files will get this file mode.  The default is 384.
15617
15618 @item mail-source-movemail-program
15619 @vindex mail-source-movemail-program
15620 If non-@code{nil}, name of program for fetching new mail.  If
15621 @code{nil}, @code{movemail} in @var{exec-directory}.
15622
15623 @end table
15624
15625
15626 @node Fetching Mail
15627 @subsubsection Fetching Mail
15628
15629 @vindex mail-sources
15630 The way to actually tell Gnus where to get new mail from is to set
15631 @code{mail-sources} to a list of mail source specifiers
15632 (@pxref{Mail Source Specifiers}).
15633
15634 If this variable is @code{nil}, the mail back ends will never attempt to
15635 fetch mail by themselves.
15636
15637 If you want to fetch mail both from your local spool as well as a
15638 @acronym{POP} mail server, you'd say something like:
15639
15640 @lisp
15641 (setq mail-sources
15642       '((file)
15643         (pop :server "pop3.mail.server"
15644              :password "secret")))
15645 @end lisp
15646
15647 Or, if you don't want to use any of the keyword defaults:
15648
15649 @lisp
15650 (setq mail-sources
15651       '((file :path "/var/spool/mail/user-name")
15652         (pop :server "pop3.mail.server"
15653              :user "user-name"
15654              :port "pop3"
15655              :password "secret")))
15656 @end lisp
15657
15658
15659 When you use a mail back end, Gnus will slurp all your mail from your
15660 inbox and plonk it down in your home directory.  Gnus doesn't move any
15661 mail if you're not using a mail back end---you have to do a lot of magic
15662 invocations first.  At the time when you have finished drawing the
15663 pentagram, lightened the candles, and sacrificed the goat, you really
15664 shouldn't be too surprised when Gnus moves your mail.
15665
15666
15667
15668 @node Mail Back End Variables
15669 @subsection Mail Back End Variables
15670
15671 These variables are (for the most part) pertinent to all the various
15672 mail back ends.
15673
15674 @table @code
15675 @vindex nnmail-read-incoming-hook
15676 @item nnmail-read-incoming-hook
15677 The mail back ends all call this hook after reading new mail.  You can
15678 use this hook to notify any mail watch programs, if you want to.
15679
15680 @vindex nnmail-split-hook
15681 @item nnmail-split-hook
15682 @findex gnus-article-decode-encoded-words
15683 @cindex RFC 1522 decoding
15684 @cindex RFC 2047 decoding
15685 Hook run in the buffer where the mail headers of each message is kept
15686 just before the splitting based on these headers is done.  The hook is
15687 free to modify the buffer contents in any way it sees fit---the buffer
15688 is discarded after the splitting has been done, and no changes performed
15689 in the buffer will show up in any files.
15690 @code{gnus-article-decode-encoded-words} is one likely function to add
15691 to this hook.
15692
15693 @vindex nnmail-pre-get-new-mail-hook
15694 @vindex nnmail-post-get-new-mail-hook
15695 @item nnmail-pre-get-new-mail-hook
15696 @itemx nnmail-post-get-new-mail-hook
15697 These are two useful hooks executed when treating new incoming
15698 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
15699 starting to handle the new mail) and
15700 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
15701 is done).  Here's and example of using these two hooks to change the
15702 default file modes the new mail files get:
15703
15704 @lisp
15705 (add-hook 'nnmail-pre-get-new-mail-hook
15706           (lambda () (set-default-file-modes 511)))
15707
15708 (add-hook 'nnmail-post-get-new-mail-hook
15709           (lambda () (set-default-file-modes 551)))
15710 @end lisp
15711
15712 @item nnmail-use-long-file-names
15713 @vindex nnmail-use-long-file-names
15714 If non-@code{nil}, the mail back ends will use long file and directory
15715 names.  Groups like @samp{mail.misc} will end up in directories
15716 (assuming use of @code{nnml} back end) or files (assuming use of
15717 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
15718 the same group will end up in @file{mail/misc}.
15719
15720 @item nnmail-delete-file-function
15721 @vindex nnmail-delete-file-function
15722 @findex delete-file
15723 Function called to delete files.  It is @code{delete-file} by default.
15724
15725 @item nnmail-cache-accepted-message-ids
15726 @vindex nnmail-cache-accepted-message-ids
15727 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
15728 the back end (via @code{Gcc}, for instance) into the mail duplication
15729 discovery cache.  The default is @code{nil}.
15730
15731 @item nnmail-cache-ignore-groups
15732 @vindex nnmail-cache-ignore-groups
15733 This can be a regular expression or a list of regular expressions.
15734 Group names that match any of the regular expressions will never be
15735 recorded in the @code{Message-ID} cache.
15736
15737 This can be useful, for example, when using Fancy Splitting
15738 (@pxref{Fancy Mail Splitting}) together with the function
15739 @code{nnmail-split-fancy-with-parent}.
15740
15741 @end table
15742
15743
15744 @node Fancy Mail Splitting
15745 @subsection Fancy Mail Splitting
15746 @cindex mail splitting
15747 @cindex fancy mail splitting
15748
15749 @vindex nnmail-split-fancy
15750 @findex nnmail-split-fancy
15751 If the rather simple, standard method for specifying how to split mail
15752 doesn't allow you to do what you want, you can set
15753 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
15754 play with the @code{nnmail-split-fancy} variable.
15755
15756 Let's look at an example value of this variable first:
15757
15758 @lisp
15759 ;; @r{Messages from the mailer daemon are not crossposted to any of}
15760 ;; @r{the ordinary groups.  Warnings are put in a separate group}
15761 ;; @r{from real errors.}
15762 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
15763                    "mail.misc"))
15764    ;; @r{Non-error messages are crossposted to all relevant}
15765    ;; @r{groups, but we don't crosspost between the group for the}
15766    ;; @r{(ding) list and the group for other (ding) related mail.}
15767    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
15768          ("subject" "ding" "ding.misc"))
15769       ;; @r{Other mailing lists@dots{}}
15770       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
15771       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
15772       ;; @r{Both lists below have the same suffix, so prevent}
15773       ;; @r{cross-posting to mkpkg.list of messages posted only to}
15774       ;; @r{the bugs- list, but allow cross-posting when the}
15775       ;; @r{message was really cross-posted.}
15776       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
15777       (any "mypackage@@somewhere" - "bugs-mypackage" "mypkg.list")
15778       ;; @r{People@dots{}}
15779       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
15780    ;; @r{Unmatched mail goes to the catch all group.}
15781    "misc.misc")
15782 @end lisp
15783
15784 This variable has the format of a @dfn{split}.  A split is a
15785 (possibly) recursive structure where each split may contain other
15786 splits.  Here are the possible split syntaxes:
15787
15788 @table @code
15789
15790 @item group
15791 If the split is a string, that will be taken as a group name.  Normal
15792 regexp match expansion will be done.  See below for examples.
15793
15794 @c Don't fold this line.
15795 @item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split} [@var{invert-partial}])
15796 The split can be a list containing at least three elements.  If the
15797 first element @var{field} (a regexp matching a header) contains
15798 @var{value} (also a regexp) then store the message as specified by
15799 @var{split}.
15800
15801 If @var{restrict} (yet another regexp) matches some string after
15802 @var{field} and before the end of the matched @var{value}, the
15803 @var{split} is ignored.  If none of the @var{restrict} clauses match,
15804 @var{split} is processed.
15805
15806 The last element @var{invert-partial} is optional.  If it is
15807 non-@code{nil}, the match-partial-words behavior controlled by the
15808 variable @code{nnmail-split-fancy-match-partial-words} (see below) is
15809 be inverted.  (New in Gnus 5.10.7)
15810
15811 @item (| @var{split} @dots{})
15812 If the split is a list, and the first element is @code{|} (vertical
15813 bar), then process each @var{split} until one of them matches.  A
15814 @var{split} is said to match if it will cause the mail message to be
15815 stored in one or more groups.
15816
15817 @item (& @var{split} @dots{})
15818 If the split is a list, and the first element is @code{&}, then
15819 process all @var{split}s in the list.
15820
15821 @item junk
15822 If the split is the symbol @code{junk}, then don't save (i.e., delete)
15823 this message.  Use with extreme caution.
15824
15825 @item (: @var{function} @var{arg1} @var{arg2} @dots{})
15826 If the split is a list, and the first element is @samp{:}, then the
15827 second element will be called as a function with @var{args} given as
15828 arguments.  The function should return a @var{split}.
15829
15830 @cindex body split
15831 For instance, the following function could be used to split based on the
15832 body of the messages:
15833
15834 @lisp
15835 (defun split-on-body ()
15836   (save-excursion
15837     (save-restriction
15838       (widen)
15839       (goto-char (point-min))
15840       (when (re-search-forward "Some.*string" nil t)
15841         "string.group"))))
15842 @end lisp
15843
15844 The buffer is narrowed to the header of the message in question when
15845 @var{function} is run.  That's why @code{(widen)} needs to be called
15846 after @code{save-excursion} and @code{save-restriction} in the example
15847 above.  Also note that with the nnimap backend, message bodies will
15848 not be downloaded by default.  You need to set
15849 @code{nnimap-split-download-body} to @code{t} to do that
15850 (@pxref{Splitting in IMAP}).
15851
15852 @item (! @var{func} @var{split})
15853 If the split is a list, and the first element is @code{!}, then
15854 @var{split} will be processed, and @var{func} will be called as a
15855 function with the result of @var{split} as argument.  @var{func}
15856 should return a split.
15857
15858 @item nil
15859 If the split is @code{nil}, it is ignored.
15860
15861 @end table
15862
15863 In these splits, @var{field} must match a complete field name.
15864
15865 Normally, @var{value} in these splits must match a complete @emph{word}
15866 according to the fundamental mode syntax table.  In other words, all
15867 @var{value}'s will be implicitly surrounded by @code{\<...\>} markers,
15868 which are word delimiters.  Therefore, if you use the following split,
15869 for example,
15870
15871 @example
15872 (any "joe" "joemail")
15873 @end example
15874
15875 @noindent
15876 messages sent from @samp{joedavis@@foo.org} will normally not be filed
15877 in @samp{joemail}.  If you want to alter this behavior, you can use any
15878 of the following three ways:
15879
15880 @enumerate
15881 @item
15882 @vindex nnmail-split-fancy-match-partial-words
15883 You can set the @code{nnmail-split-fancy-match-partial-words} variable
15884 to non-@code{nil} in order to ignore word boundaries and instead the
15885 match becomes more like a grep.  This variable controls whether partial
15886 words are matched during fancy splitting.  The default value is
15887 @code{nil}.
15888
15889 Note that it influences all @var{value}'s in your split rules.
15890
15891 @item
15892 @var{value} beginning with @code{.*} ignores word boundaries in front of
15893 a word.  Similarly, if @var{value} ends with @code{.*}, word boundaries
15894 in the rear of a word will be ignored.  For example, the @var{value}
15895 @code{"@@example\\.com"} does not match @samp{foo@@example.com} but
15896 @code{".*@@example\\.com"} does.
15897
15898 @item
15899 You can set the @var{invert-partial} flag in your split rules of the
15900 @samp{(@var{field} @var{value} @dots{})} types, aforementioned in this
15901 section.  If the flag is set, word boundaries on both sides of a word
15902 are ignored even if @code{nnmail-split-fancy-match-partial-words} is
15903 @code{nil}.  Contrarily, if the flag is set, word boundaries are not
15904 ignored even if @code{nnmail-split-fancy-match-partial-words} is
15905 non-@code{nil}.  (New in Gnus 5.10.7)
15906 @end enumerate
15907
15908 @vindex nnmail-split-abbrev-alist
15909 @var{field} and @var{value} can also be Lisp symbols, in that case
15910 they are expanded as specified by the variable
15911 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
15912 where the @sc{car} of a cell contains the key, and the @sc{cdr}
15913 contains the associated value.  Predefined entries in
15914 @code{nnmail-split-abbrev-alist} include:
15915
15916 @table @code
15917 @item from
15918 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
15919 @item to
15920 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
15921 @samp{Resent-To} and @samp{Resent-Cc} fields.
15922 @item any
15923 Is the union of the @code{from} and @code{to} entries.
15924 @end table
15925
15926 @vindex nnmail-split-fancy-syntax-table
15927 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
15928 when all this splitting is performed.
15929
15930 If you want to have Gnus create groups dynamically based on some
15931 information in the headers (i.e., do @code{replace-match}-like
15932 substitutions in the group names), you can say things like:
15933
15934 @example
15935 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
15936 @end example
15937
15938 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
15939 will be filed in @samp{mail.debian.foo}.
15940
15941 If the string contains the element @samp{\&}, then the previously
15942 matched string will be substituted.  Similarly, the elements @samp{\\1}
15943 up to @samp{\\9} will be substituted with the text matched by the
15944 groupings 1 through 9.
15945
15946 @vindex nnmail-split-lowercase-expanded
15947 Where @code{nnmail-split-lowercase-expanded} controls whether the
15948 lowercase of the matched string should be used for the substitution.
15949 Setting it as non-@code{nil} is useful to avoid the creation of multiple
15950 groups when users send to an address using different case
15951 (i.e. mailing-list@@domain vs Mailing-List@@Domain).  The default value
15952 is @code{t}.
15953
15954 @findex nnmail-split-fancy-with-parent
15955 @code{nnmail-split-fancy-with-parent} is a function which allows you to
15956 split followups into the same groups their parents are in.  Sometimes
15957 you can't make splitting rules for all your mail.  For example, your
15958 boss might send you personal mail regarding different projects you are
15959 working on, and as you can't tell your boss to put a distinguishing
15960 string into the subject line, you have to resort to manually moving the
15961 messages into the right group.  With this function, you only have to do
15962 it once per thread.
15963
15964 To use this feature, you have to set @code{nnmail-treat-duplicates}
15965 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
15966 value.  And then you can include @code{nnmail-split-fancy-with-parent}
15967 using the colon feature, like so:
15968 @lisp
15969 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
15970       nnmail-cache-accepted-message-ids t
15971       nnmail-split-fancy
15972       '(| (: nnmail-split-fancy-with-parent)
15973           ;; @r{other splits go here}
15974         ))
15975 @end lisp
15976
15977 This feature works as follows: when @code{nnmail-treat-duplicates} is
15978 non-@code{nil}, Gnus records the message id of every message it sees
15979 in the file specified by the variable
15980 @code{nnmail-message-id-cache-file}, together with the group it is in
15981 (the group is omitted for non-mail messages).  When mail splitting is
15982 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
15983 at the References (and In-Reply-To) header of each message to split
15984 and searches the file specified by @code{nnmail-message-id-cache-file}
15985 for the message ids.  When it has found a parent, it returns the
15986 corresponding group name unless the group name matches the regexp
15987 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
15988 recommended that you set @code{nnmail-message-id-cache-length} to a
15989 somewhat higher number than the default so that the message ids are
15990 still in the cache.  (A value of 5000 appears to create a file some
15991 300 kBytes in size.)
15992 @vindex nnmail-cache-accepted-message-ids
15993 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
15994 also records the message ids of moved articles, so that the followup
15995 messages goes into the new group.
15996
15997 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
15998 want certain groups to be recorded in the cache.  For example, if all
15999 outgoing messages are written to an ``outgoing'' group, you could set
16000 @code{nnmail-cache-ignore-groups} to match that group name.
16001 Otherwise, answers to all your messages would end up in the
16002 ``outgoing'' group.
16003
16004
16005 @node Group Mail Splitting
16006 @subsection Group Mail Splitting
16007 @cindex mail splitting
16008 @cindex group mail splitting
16009
16010 @findex gnus-group-split
16011 If you subscribe to dozens of mailing lists but you don't want to
16012 maintain mail splitting rules manually, group mail splitting is for you.
16013 You just have to set @code{to-list} and/or @code{to-address} in group
16014 parameters or group customization and set @code{nnmail-split-methods} to
16015 @code{gnus-group-split}.  This splitting function will scan all groups
16016 for those parameters and split mail accordingly, i.e., messages posted
16017 from or to the addresses specified in the parameters @code{to-list} or
16018 @code{to-address} of a mail group will be stored in that group.
16019
16020 Sometimes, mailing lists have multiple addresses, and you may want mail
16021 splitting to recognize them all: just set the @code{extra-aliases} group
16022 parameter to the list of additional addresses and it's done.  If you'd
16023 rather use a regular expression, set @code{split-regexp}.
16024
16025 All these parameters in a group will be used to create an
16026 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
16027 the @var{value} is a single regular expression that matches
16028 @code{to-list}, @code{to-address}, all of @code{extra-aliases} and all
16029 matches of @code{split-regexp}, and the @var{split} is the name of the
16030 group.  @var{restrict}s are also supported: just set the
16031 @code{split-exclude} parameter to a list of regular expressions.
16032
16033 If you can't get the right split to be generated using all these
16034 parameters, or you just need something fancier, you can set the
16035 parameter @code{split-spec} to an @code{nnmail-split-fancy} split.  In
16036 this case, all other aforementioned parameters will be ignored by
16037 @code{gnus-group-split}.  In particular, @code{split-spec} may be set to
16038 @code{nil}, in which case the group will be ignored by
16039 @code{gnus-group-split}.
16040
16041 @vindex gnus-group-split-default-catch-all-group
16042 @code{gnus-group-split} will do cross-posting on all groups that match,
16043 by defining a single @code{&} fancy split containing one split for each
16044 group.  If a message doesn't match any split, it will be stored in the
16045 group named in @code{gnus-group-split-default-catch-all-group}, unless
16046 some group has @code{split-spec} set to @code{catch-all}, in which case
16047 that group is used as the catch-all group.  Even though this variable is
16048 often used just to name a group, it may also be set to an arbitrarily
16049 complex fancy split (after all, a group name is a fancy split), and this
16050 may be useful to split mail that doesn't go to any mailing list to
16051 personal mail folders.  Note that this fancy split is added as the last
16052 element of a @code{|} split list that also contains a @code{&} split
16053 with the rules extracted from group parameters.
16054
16055 It's time for an example.  Assume the following group parameters have
16056 been defined:
16057
16058 @example
16059 nnml:mail.bar:
16060 ((to-address . "bar@@femail.com")
16061  (split-regexp . ".*@@femail\\.com"))
16062 nnml:mail.foo:
16063 ((to-list . "foo@@nowhere.gov")
16064  (extra-aliases "foo@@localhost" "foo-redist@@home")
16065  (split-exclude "bugs-foo" "rambling-foo")
16066  (admin-address . "foo-request@@nowhere.gov"))
16067 nnml:mail.others:
16068 ((split-spec . catch-all))
16069 @end example
16070
16071 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
16072 behave as if @code{nnmail-split-fancy} had been selected and variable
16073 @code{nnmail-split-fancy} had been set as follows:
16074
16075 @lisp
16076 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
16077       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
16078            - "bugs-foo" - "rambling-foo" "mail.foo"))
16079    "mail.others")
16080 @end lisp
16081
16082 @findex gnus-group-split-fancy
16083 If you'd rather not use group splitting for all your mail groups, you
16084 may use it for only some of them, by using @code{nnmail-split-fancy}
16085 splits like this:
16086
16087 @lisp
16088 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
16089 @end lisp
16090
16091 @var{groups} may be a regular expression or a list of group names whose
16092 parameters will be scanned to generate the output split.
16093 @var{no-crosspost} can be used to disable cross-posting; in this case, a
16094 single @code{|} split will be output.  @var{catch-all} is the fall back
16095 fancy split, used like @code{gnus-group-split-default-catch-all-group}.
16096 If @var{catch-all} is @code{nil}, or if @code{split-regexp} matches the
16097 empty string in any selected group, no catch-all split will be issued.
16098 Otherwise, if some group has @code{split-spec} set to @code{catch-all},
16099 this group will override the value of the @var{catch-all} argument.
16100
16101 @findex gnus-group-split-setup
16102 Unfortunately, scanning all groups and their parameters can be quite
16103 slow, especially considering that it has to be done for every message.
16104 But don't despair!  The function @code{gnus-group-split-setup} can be
16105 used to enable @code{gnus-group-split} in a much more efficient way.  It
16106 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
16107 @code{nnmail-split-fancy} to the split produced by
16108 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
16109 scanned once, no matter how many messages are split.
16110
16111 @findex gnus-group-split-update
16112 However, if you change group parameters, you'd have to update
16113 @code{nnmail-split-fancy} manually.  You can do it by running
16114 @code{gnus-group-split-update}.  If you'd rather have it updated
16115 automatically, just tell @code{gnus-group-split-setup} to do it for
16116 you.  For example, add to your @file{~/.gnus.el}:
16117
16118 @lisp
16119 (gnus-group-split-setup @var{auto-update} @var{catch-all})
16120 @end lisp
16121
16122 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
16123 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
16124 have to worry about updating @code{nnmail-split-fancy} again.  If you
16125 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
16126 @code{gnus-group-split-default-catch-all-group} will be set to its
16127 value.
16128
16129 @vindex gnus-group-split-updated-hook
16130 Because you may want to change @code{nnmail-split-fancy} after it is set
16131 by @code{gnus-group-split-update}, this function will run
16132 @code{gnus-group-split-updated-hook} just before finishing.
16133
16134 @node Incorporating Old Mail
16135 @subsection Incorporating Old Mail
16136 @cindex incorporating old mail
16137 @cindex import old mail
16138
16139 Most people have lots of old mail stored in various file formats.  If
16140 you have set up Gnus to read mail using one of the spiffy Gnus mail
16141 back ends, you'll probably wish to have that old mail incorporated into
16142 your mail groups.
16143
16144 Doing so can be quite easy.
16145
16146 To take an example: You're reading mail using @code{nnml}
16147 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
16148 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
16149 file filled with important, but old, mail.  You want to move it into
16150 your @code{nnml} groups.
16151
16152 Here's how:
16153
16154 @enumerate
16155 @item
16156 Go to the group buffer.
16157
16158 @item
16159 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
16160 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
16161
16162 @item
16163 Type @kbd{SPACE} to enter the newly created group.
16164
16165 @item
16166 Type @kbd{M P b} to process-mark all articles in this group's buffer
16167 (@pxref{Setting Process Marks}).
16168
16169 @item
16170 Type @kbd{B r} to respool all the process-marked articles, and answer
16171 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
16172 @end enumerate
16173
16174 All the mail messages in the mbox file will now also be spread out over
16175 all your @code{nnml} groups.  Try entering them and check whether things
16176 have gone without a glitch.  If things look ok, you may consider
16177 deleting the mbox file, but I wouldn't do that unless I was absolutely
16178 sure that all the mail has ended up where it should be.
16179
16180 Respooling is also a handy thing to do if you're switching from one mail
16181 back end to another.  Just respool all the mail in the old mail groups
16182 using the new mail back end.
16183
16184
16185 @node Expiring Mail
16186 @subsection Expiring Mail
16187 @cindex article expiry
16188 @cindex expiring mail
16189
16190 Traditional mail readers have a tendency to remove mail articles when
16191 you mark them as read, in some way.  Gnus takes a fundamentally
16192 different approach to mail reading.
16193
16194 Gnus basically considers mail just to be news that has been received in
16195 a rather peculiar manner.  It does not think that it has the power to
16196 actually change the mail, or delete any mail messages.  If you enter a
16197 mail group, and mark articles as ``read'', or kill them in some other
16198 fashion, the mail articles will still exist on the system.  I repeat:
16199 Gnus will not delete your old, read mail.  Unless you ask it to, of
16200 course.
16201
16202 To make Gnus get rid of your unwanted mail, you have to mark the
16203 articles as @dfn{expirable}.  (With the default key bindings, this means
16204 that you have to type @kbd{E}.)  This does not mean that the articles
16205 will disappear right away, however.  In general, a mail article will be
16206 deleted from your system if, 1) it is marked as expirable, AND 2) it is
16207 more than one week old.  If you do not mark an article as expirable, it
16208 will remain on your system until hell freezes over.  This bears
16209 repeating one more time, with some spurious capitalizations: IF you do
16210 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
16211
16212 You do not have to mark articles as expirable by hand.  Gnus provides
16213 two features, called ``auto-expire'' and ``total-expire'', that can help you
16214 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
16215 for you when you select an article.  And ``total-expire'' means that Gnus
16216 considers all articles as expirable that are read.  So, in addition to
16217 the articles marked @samp{E}, also the articles marked @samp{r},
16218 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
16219 expirable.
16220
16221 When should either auto-expire or total-expire be used?  Most people
16222 who are subscribed to mailing lists split each list into its own group
16223 and then turn on auto-expire or total-expire for those groups.
16224 (@xref{Splitting Mail}, for more information on splitting each list
16225 into its own group.)
16226
16227 Which one is better, auto-expire or total-expire?  It's not easy to
16228 answer.  Generally speaking, auto-expire is probably faster.  Another
16229 advantage of auto-expire is that you get more marks to work with: for
16230 the articles that are supposed to stick around, you can still choose
16231 between tick and dormant and read marks.  But with total-expire, you
16232 only have dormant and ticked to choose from.  The advantage of
16233 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
16234 Scoring}).  Auto-expire works with normal scoring but not with adaptive
16235 scoring.
16236
16237 @vindex gnus-auto-expirable-newsgroups
16238 Groups that match the regular expression
16239 @code{gnus-auto-expirable-newsgroups} will have all articles that you
16240 read marked as expirable automatically.  All articles marked as
16241 expirable have an @samp{E} in the first column in the summary buffer.
16242
16243 By default, if you have auto expiry switched on, Gnus will mark all the
16244 articles you read as expirable, no matter if they were read or unread
16245 before.  To avoid having articles marked as read marked as expirable
16246 automatically, you can put something like the following in your
16247 @file{~/.gnus.el} file:
16248
16249 @vindex gnus-mark-article-hook
16250 @lisp
16251 (remove-hook 'gnus-mark-article-hook
16252              'gnus-summary-mark-read-and-unread-as-read)
16253 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
16254 @end lisp
16255
16256 Note that making a group auto-expirable doesn't mean that all read
16257 articles are expired---only the articles marked as expirable
16258 will be expired.  Also note that using the @kbd{d} command won't make
16259 articles expirable---only semi-automatic marking of articles as read will
16260 mark the articles as expirable in auto-expirable groups.
16261
16262 Let's say you subscribe to a couple of mailing lists, and you want the
16263 articles you have read to disappear after a while:
16264
16265 @lisp
16266 (setq gnus-auto-expirable-newsgroups
16267       "mail.nonsense-list\\|mail.nice-list")
16268 @end lisp
16269
16270 Another way to have auto-expiry happen is to have the element
16271 @code{auto-expire} in the group parameters of the group.
16272
16273 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
16274 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
16275 don't really mix very well.
16276
16277 @vindex nnmail-expiry-wait
16278 The @code{nnmail-expiry-wait} variable supplies the default time an
16279 expirable article has to live.  Gnus starts counting days from when the
16280 message @emph{arrived}, not from when it was sent.  The default is seven
16281 days.
16282
16283 Gnus also supplies a function that lets you fine-tune how long articles
16284 are to live, based on what group they are in.  Let's say you want to
16285 have one month expiry period in the @samp{mail.private} group, a one day
16286 expiry period in the @samp{mail.junk} group, and a six day expiry period
16287 everywhere else:
16288
16289 @vindex nnmail-expiry-wait-function
16290 @lisp
16291 (setq nnmail-expiry-wait-function
16292       (lambda (group)
16293        (cond ((string= group "mail.private")
16294                31)
16295              ((string= group "mail.junk")
16296                1)
16297              ((string= group "important")
16298                'never)
16299              (t
16300                6))))
16301 @end lisp
16302
16303 The group names this function is fed are ``unadorned'' group
16304 names---no @samp{nnml:} prefixes and the like.
16305
16306 The @code{nnmail-expiry-wait} variable and
16307 @code{nnmail-expiry-wait-function} function can either be a number (not
16308 necessarily an integer) or one of the symbols @code{immediate} or
16309 @code{never}.
16310
16311 You can also use the @code{expiry-wait} group parameter to selectively
16312 change the expiry period (@pxref{Group Parameters}).
16313
16314 @vindex nnmail-expiry-target
16315 The normal action taken when expiring articles is to delete them.
16316 However, in some circumstances it might make more sense to move them
16317 to other groups instead of deleting them.  The variable
16318 @code{nnmail-expiry-target} (and the @code{expiry-target} group
16319 parameter) controls this.  The variable supplies a default value for
16320 all groups, which can be overridden for specific groups by the group
16321 parameter.  default value is @code{delete}, but this can also be a
16322 string (which should be the name of the group the message should be
16323 moved to), or a function (which will be called in a buffer narrowed to
16324 the message in question, and with the name of the group being moved
16325 from as its parameter) which should return a target---either a group
16326 name or @code{delete}.
16327
16328 Here's an example for specifying a group name:
16329 @lisp
16330 (setq nnmail-expiry-target "nnml:expired")
16331 @end lisp
16332
16333 @findex nnmail-fancy-expiry-target
16334 @vindex nnmail-fancy-expiry-targets
16335 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
16336 expire mail to groups according to the variable
16337 @code{nnmail-fancy-expiry-targets}.  Here's an example:
16338
16339 @lisp
16340  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
16341        nnmail-fancy-expiry-targets
16342        '((to-from "boss" "nnfolder:Work")
16343          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
16344          ("from" ".*" "nnfolder:Archive-%Y")))
16345 @end lisp
16346
16347 With this setup, any mail that has @code{IMPORTANT} in its Subject
16348 header and was sent in the year @code{YYYY} and month @code{MMM}, will
16349 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
16350 From or To header contains the string @code{boss}, it will get expired
16351 to @code{nnfolder:Work}.  All other mail will get expired to
16352 @code{nnfolder:Archive-YYYY}.
16353
16354 @vindex nnmail-keep-last-article
16355 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
16356 expire the final article in a mail newsgroup.  This is to make life
16357 easier for procmail users.
16358
16359 @vindex gnus-total-expirable-newsgroups
16360 By the way: That line up there, about Gnus never expiring non-expirable
16361 articles, is a lie.  If you put @code{total-expire} in the group
16362 parameters, articles will not be marked as expirable, but all read
16363 articles will be put through the expiry process.  Use with extreme
16364 caution.  Even more dangerous is the
16365 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
16366 this regexp will have all read articles put through the expiry process,
16367 which means that @emph{all} old mail articles in the groups in question
16368 will be deleted after a while.  Use with extreme caution, and don't come
16369 crying to me when you discover that the regexp you used matched the
16370 wrong group and all your important mail has disappeared.  Be a
16371 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
16372 with!  So there!
16373
16374 Most people make most of their mail groups total-expirable, though.
16375
16376 @vindex gnus-inhibit-user-auto-expire
16377 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
16378 commands will not mark an article as expirable, even if the group has
16379 auto-expire turned on.
16380
16381 @vindex gnus-mark-copied-or-moved-articles-as-expirable
16382 The expirable marks of articles will be removed when copying or moving
16383 them to a group in which auto-expire is not turned on.  This is for
16384 preventing articles from being expired unintentionally.  On the other
16385 hand, to a group that has turned auto-expire on, the expirable marks of
16386 articles that are copied or moved will not be changed by default.  I.e.,
16387 when copying or moving to such a group, articles that were expirable
16388 will be left expirable and ones that were not expirable will not be
16389 marked as expirable.  So, even though in auto-expire groups, some
16390 articles will never get expired (unless you read them again).  If you
16391 don't side with that behavior that unexpirable articles may be mixed
16392 into auto-expire groups, you can set
16393 @code{gnus-mark-copied-or-moved-articles-as-expirable} to a
16394 non-@code{nil} value.  In that case, articles that have been read will
16395 be marked as expirable automatically when being copied or moved to a
16396 group that has auto-expire turned on.  The default value is @code{nil}.
16397
16398
16399 @node Washing Mail
16400 @subsection Washing Mail
16401 @cindex mail washing
16402 @cindex list server brain damage
16403 @cindex incoming mail treatment
16404
16405 Mailers and list servers are notorious for doing all sorts of really,
16406 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
16407 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
16408 end of all lines passing through our server, so let's do that!!!!1!''
16409 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
16410 considered to be self-evident were not discussed.  So.  Here we are.
16411
16412 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
16413 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
16414 be shocked and dismayed by this, but I haven't got the energy.  It is to
16415 laugh.
16416
16417 Gnus provides a plethora of functions for washing articles while
16418 displaying them, but it might be nicer to do the filtering before
16419 storing the mail to disk.  For that purpose, we have three hooks and
16420 various functions that can be put in these hooks.
16421
16422 @table @code
16423 @item nnmail-prepare-incoming-hook
16424 @vindex nnmail-prepare-incoming-hook
16425 This hook is called before doing anything with the mail and is meant for
16426 grand, sweeping gestures.  It is called in a buffer that contains all
16427 the new, incoming mail.  Functions to be used include:
16428
16429 @table @code
16430 @item nnheader-ms-strip-cr
16431 @findex nnheader-ms-strip-cr
16432 Remove trailing carriage returns from each line.  This is default on
16433 Emacs running on MS machines.
16434
16435 @end table
16436
16437 @item nnmail-prepare-incoming-header-hook
16438 @vindex nnmail-prepare-incoming-header-hook
16439 This hook is called narrowed to each header.  It can be used when
16440 cleaning up the headers.  Functions that can be used include:
16441
16442 @table @code
16443 @item nnmail-remove-leading-whitespace
16444 @findex nnmail-remove-leading-whitespace
16445 Clear leading white space that ``helpful'' listservs have added to the
16446 headers to make them look nice.  Aaah.
16447
16448 (Note that this function works on both the header on the body of all
16449 messages, so it is a potentially dangerous function to use (if a body
16450 of a message contains something that looks like a header line).  So
16451 rather than fix the bug, it is of course the right solution to make it
16452 into a feature by documenting it.)
16453
16454 @item nnmail-remove-list-identifiers
16455 @findex nnmail-remove-list-identifiers
16456 Some list servers add an identifier---for example, @samp{(idm)}---to the
16457 beginning of all @code{Subject} headers.  I'm sure that's nice for
16458 people who use stone age mail readers.  This function will remove
16459 strings that match the @code{nnmail-list-identifiers} regexp, which can
16460 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
16461 @code{\\(..\\)}.
16462
16463 For instance, if you want to remove the @samp{(idm)} and the
16464 @samp{nagnagnag} identifiers:
16465
16466 @lisp
16467 (setq nnmail-list-identifiers
16468       '("(idm)" "nagnagnag"))
16469 @end lisp
16470
16471 This can also be done non-destructively with
16472 @code{gnus-list-identifiers}, @xref{Article Hiding}.
16473
16474 @item nnmail-remove-tabs
16475 @findex nnmail-remove-tabs
16476 Translate all @samp{TAB} characters into @samp{SPACE} characters.
16477
16478 @item nnmail-ignore-broken-references
16479 @findex nnmail-ignore-broken-references
16480 @c @findex nnmail-fix-eudora-headers
16481 @cindex Eudora
16482 @cindex Pegasus
16483 Some mail user agents (e.g. Eudora and Pegasus) produce broken
16484 @code{References} headers, but correct @code{In-Reply-To} headers.  This
16485 function will get rid of the @code{References} header if the headers
16486 contain a line matching the regular expression
16487 @code{nnmail-broken-references-mailers}.
16488
16489 @end table
16490
16491 @item nnmail-prepare-incoming-message-hook
16492 @vindex nnmail-prepare-incoming-message-hook
16493 This hook is called narrowed to each message.  Functions to be used
16494 include:
16495
16496 @table @code
16497 @item article-de-quoted-unreadable
16498 @findex article-de-quoted-unreadable
16499 Decode Quoted Readable encoding.
16500
16501 @end table
16502 @end table
16503
16504
16505 @node Duplicates
16506 @subsection Duplicates
16507
16508 @vindex nnmail-treat-duplicates
16509 @vindex nnmail-message-id-cache-length
16510 @vindex nnmail-message-id-cache-file
16511 @cindex duplicate mails
16512 If you are a member of a couple of mailing lists, you will sometimes
16513 receive two copies of the same mail.  This can be quite annoying, so
16514 @code{nnmail} checks for and treats any duplicates it might find.  To do
16515 this, it keeps a cache of old @code{Message-ID}s---
16516 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
16517 default.  The approximate maximum number of @code{Message-ID}s stored
16518 there is controlled by the @code{nnmail-message-id-cache-length}
16519 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
16520 stored.) If all this sounds scary to you, you can set
16521 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
16522 default), and @code{nnmail} won't delete duplicate mails.  Instead it
16523 will insert a warning into the head of the mail saying that it thinks
16524 that this is a duplicate of a different message.
16525
16526 This variable can also be a function.  If that's the case, the function
16527 will be called from a buffer narrowed to the message in question with
16528 the @code{Message-ID} as a parameter.  The function must return either
16529 @code{nil}, @code{warn}, or @code{delete}.
16530
16531 You can turn this feature off completely by setting the variable to
16532 @code{nil}.
16533
16534 If you want all the duplicate mails to be put into a special
16535 @dfn{duplicates} group, you could do that using the normal mail split
16536 methods:
16537
16538 @lisp
16539 (setq nnmail-split-fancy
16540       '(| ;; @r{Messages duplicates go to a separate group.}
16541         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
16542         ;; @r{Message from daemons, postmaster, and the like to another.}
16543         (any mail "mail.misc")
16544         ;; @r{Other rules.}
16545         [...] ))
16546 @end lisp
16547 @noindent
16548 Or something like:
16549 @lisp
16550 (setq nnmail-split-methods
16551       '(("duplicates" "^Gnus-Warning:.*duplicate")
16552         ;; @r{Other rules.}
16553         [...]))
16554 @end lisp
16555
16556 Here's a neat feature: If you know that the recipient reads her mail
16557 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
16558 @code{delete}, you can send her as many insults as you like, just by
16559 using a @code{Message-ID} of a mail that you know that she's already
16560 received.  Think of all the fun!  She'll never see any of it!  Whee!
16561
16562
16563 @node Not Reading Mail
16564 @subsection Not Reading Mail
16565
16566 If you start using any of the mail back ends, they have the annoying
16567 habit of assuming that you want to read mail with them.  This might not
16568 be unreasonable, but it might not be what you want.
16569
16570 If you set @code{mail-sources} and @code{nnmail-spool-file} to
16571 @code{nil}, none of the back ends will ever attempt to read incoming
16572 mail, which should help.
16573
16574 @vindex nnbabyl-get-new-mail
16575 @vindex nnmbox-get-new-mail
16576 @vindex nnml-get-new-mail
16577 @vindex nnmh-get-new-mail
16578 @vindex nnfolder-get-new-mail
16579 This might be too much, if, for instance, you are reading mail quite
16580 happily with @code{nnml} and just want to peek at some old (pre-Emacs
16581 23) Rmail file you have stashed away with @code{nnbabyl}.  All back ends have
16582 variables called back-end-@code{get-new-mail}.  If you want to disable
16583 the @code{nnbabyl} mail reading, you edit the virtual server for the
16584 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
16585
16586 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
16587 narrowed to the article to be saved before saving it when reading
16588 incoming mail.
16589
16590
16591 @node Choosing a Mail Back End
16592 @subsection Choosing a Mail Back End
16593
16594 Gnus will read the mail spool when you activate a mail group.  The mail
16595 file is first copied to your home directory.  What happens after that
16596 depends on what format you want to store your mail in.
16597
16598 There are six different mail back ends in the standard Gnus, and more
16599 back ends are available separately.  The mail back end most people use
16600 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
16601 Spool}).
16602
16603 @menu
16604 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
16605 * Babyl::                       Babyl was used by older versions of Rmail.
16606 * Mail Spool::                  Store your mail in a private spool?
16607 * MH Spool::                    An mhspool-like back end.
16608 * Maildir::                     Another one-file-per-message format.
16609 * Mail Folders::                Having one file for each group.
16610 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
16611 @end menu
16612
16613
16614 @node Unix Mail Box
16615 @subsubsection Unix Mail Box
16616 @cindex nnmbox
16617 @cindex unix mail box
16618
16619 @vindex nnmbox-active-file
16620 @vindex nnmbox-mbox-file
16621 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
16622 mail.  @code{nnmbox} will add extra headers to each mail article to say
16623 which group it belongs in.
16624
16625 Virtual server settings:
16626
16627 @table @code
16628 @item nnmbox-mbox-file
16629 @vindex nnmbox-mbox-file
16630 The name of the mail box in the user's home directory.  Default is
16631 @file{~/mbox}.
16632
16633 @item nnmbox-active-file
16634 @vindex nnmbox-active-file
16635 The name of the active file for the mail box.  Default is
16636 @file{~/.mbox-active}.
16637
16638 @item nnmbox-get-new-mail
16639 @vindex nnmbox-get-new-mail
16640 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
16641 into groups.  Default is @code{t}.
16642 @end table
16643
16644
16645 @node Babyl
16646 @subsubsection Babyl
16647 @cindex nnbabyl
16648
16649 @vindex nnbabyl-active-file
16650 @vindex nnbabyl-mbox-file
16651 The @dfn{nnbabyl} back end will use a Babyl mail box to store mail.
16652 @code{nnbabyl} will add extra headers to each mail article to say which
16653 group it belongs in.
16654
16655 Virtual server settings:
16656
16657 @table @code
16658 @item nnbabyl-mbox-file
16659 @vindex nnbabyl-mbox-file
16660 The name of the Babyl file.  The default is @file{~/RMAIL}
16661
16662 @item nnbabyl-active-file
16663 @vindex nnbabyl-active-file
16664 The name of the active file for the Babyl file.  The default is
16665 @file{~/.rmail-active}
16666
16667 @item nnbabyl-get-new-mail
16668 @vindex nnbabyl-get-new-mail
16669 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
16670 @code{t}
16671 @end table
16672
16673
16674 @node Mail Spool
16675 @subsubsection Mail Spool
16676 @cindex nnml
16677 @cindex mail @acronym{NOV} spool
16678
16679 The @dfn{nnml} spool mail format isn't compatible with any other known
16680 format.  It should be used with some caution.
16681
16682 @vindex nnml-directory
16683 If you use this back end, Gnus will split all incoming mail into files,
16684 one file for each mail, and put the articles into the corresponding
16685 directories under the directory specified by the @code{nnml-directory}
16686 variable.  The default value is @file{~/Mail/}.
16687
16688 You do not have to create any directories beforehand; Gnus will take
16689 care of all that.
16690
16691 If you have a strict limit as to how many files you are allowed to store
16692 in your account, you should not use this back end.  As each mail gets its
16693 own file, you might very well occupy thousands of inodes within a few
16694 weeks.  If this is no problem for you, and it isn't a problem for you
16695 having your friendly systems administrator walking around, madly,
16696 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
16697 know that this is probably the fastest format to use.  You do not have
16698 to trudge through a big mbox file just to read your new mail.
16699
16700 @code{nnml} is probably the slowest back end when it comes to article
16701 splitting.  It has to create lots of files, and it also generates
16702 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
16703 fastest back end when it comes to reading mail.
16704
16705 @cindex self contained nnml servers
16706 @cindex marks
16707 When the marks file is used (which it is by default), @code{nnml}
16708 servers have the property that you may backup them using @code{tar} or
16709 similar, and later be able to restore them into Gnus (by adding the
16710 proper @code{nnml} server) and have all your marks be preserved.  Marks
16711 for a group are usually stored in the @code{.marks} file (but see
16712 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
16713 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
16714 to restore the group (after restoring the backup into the nnml
16715 directory).
16716
16717 If for some reason you believe your @file{.marks} files are screwed
16718 up, you can just delete them all.  Gnus will then correctly regenerate
16719 them next time it starts.
16720
16721 Virtual server settings:
16722
16723 @table @code
16724 @item nnml-directory
16725 @vindex nnml-directory
16726 All @code{nnml} directories will be placed under this directory.  The
16727 default is the value of @code{message-directory} (whose default value
16728 is @file{~/Mail}).
16729
16730 @item nnml-active-file
16731 @vindex nnml-active-file
16732 The active file for the @code{nnml} server.  The default is
16733 @file{~/Mail/active}.
16734
16735 @item nnml-newsgroups-file
16736 @vindex nnml-newsgroups-file
16737 The @code{nnml} group descriptions file.  @xref{Newsgroups File
16738 Format}.  The default is @file{~/Mail/newsgroups}.
16739
16740 @item nnml-get-new-mail
16741 @vindex nnml-get-new-mail
16742 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
16743 @code{t}.
16744
16745 @item nnml-nov-is-evil
16746 @vindex nnml-nov-is-evil
16747 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
16748 default is @code{nil}.
16749
16750 @item nnml-nov-file-name
16751 @vindex nnml-nov-file-name
16752 The name of the @acronym{NOV} files.  The default is @file{.overview}.
16753
16754 @item nnml-prepare-save-mail-hook
16755 @vindex nnml-prepare-save-mail-hook
16756 Hook run narrowed to an article before saving.
16757
16758 @item nnml-marks-is-evil
16759 @vindex nnml-marks-is-evil
16760 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
16761 default is @code{nil}.
16762
16763 @item nnml-marks-file-name
16764 @vindex nnml-marks-file-name
16765 The name of the @dfn{marks} files.  The default is @file{.marks}.
16766
16767 @item nnml-use-compressed-files
16768 @vindex nnml-use-compressed-files
16769 If non-@code{nil}, @code{nnml} will allow using compressed message
16770 files.  This requires @code{auto-compression-mode} to be enabled
16771 (@pxref{Compressed Files, ,Compressed Files, emacs, The Emacs Manual}).
16772 If the value of @code{nnml-use-compressed-files} is a string, it is used
16773 as the file extension specifying the compression program.  You can set it
16774 to @samp{.bz2} if your Emacs supports it.  A value of @code{t} is
16775 equivalent to @samp{.gz}.
16776
16777 @item nnml-compressed-files-size-threshold
16778 @vindex nnml-compressed-files-size-threshold
16779 Default size threshold for compressed message files.  Message files with
16780 bodies larger than that many characters will be automatically compressed
16781 if @code{nnml-use-compressed-files} is non-@code{nil}.
16782
16783 @end table
16784
16785 @findex nnml-generate-nov-databases
16786 If your @code{nnml} groups and @acronym{NOV} files get totally out of
16787 whack, you can do a complete update by typing @kbd{M-x
16788 nnml-generate-nov-databases}.  This command will trawl through the
16789 entire @code{nnml} hierarchy, looking at each and every article, so it
16790 might take a while to complete.  A better interface to this
16791 functionality can be found in the server buffer (@pxref{Server
16792 Commands}).
16793
16794
16795 @node MH Spool
16796 @subsubsection MH Spool
16797 @cindex nnmh
16798 @cindex mh-e mail spool
16799
16800 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
16801 @acronym{NOV} databases and it doesn't keep an active file or marks
16802 file.  This makes @code{nnmh} a @emph{much} slower back end than
16803 @code{nnml}, but it also makes it easier to write procmail scripts
16804 for.
16805
16806 Virtual server settings:
16807
16808 @table @code
16809 @item nnmh-directory
16810 @vindex nnmh-directory
16811 All @code{nnmh} directories will be located under this directory.  The
16812 default is the value of @code{message-directory} (whose default is
16813 @file{~/Mail})
16814
16815 @item nnmh-get-new-mail
16816 @vindex nnmh-get-new-mail
16817 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
16818 @code{t}.
16819
16820 @item nnmh-be-safe
16821 @vindex nnmh-be-safe
16822 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
16823 sure that the articles in the folder are actually what Gnus thinks
16824 they are.  It will check date stamps and stat everything in sight, so
16825 setting this to @code{t} will mean a serious slow-down.  If you never
16826 use anything but Gnus to read the @code{nnmh} articles, you do not
16827 have to set this variable to @code{t}.  The default is @code{nil}.
16828 @end table
16829
16830
16831 @node Maildir
16832 @subsubsection Maildir
16833 @cindex nnmaildir
16834 @cindex maildir
16835
16836 @code{nnmaildir} stores mail in the maildir format, with each maildir
16837 corresponding to a group in Gnus.  This format is documented here:
16838 @uref{http://cr.yp.to/proto/maildir.html} and here:
16839 @uref{http://www.qmail.org/man/man5/maildir.html}.  @code{nnmaildir}
16840 also stores extra information in the @file{.nnmaildir/} directory
16841 within a maildir.
16842
16843 Maildir format was designed to allow concurrent deliveries and
16844 reading, without needing locks.  With other back ends, you would have
16845 your mail delivered to a spool of some kind, and then you would
16846 configure Gnus to split mail from that spool into your groups.  You
16847 can still do that with @code{nnmaildir}, but the more common
16848 configuration is to have your mail delivered directly to the maildirs
16849 that appear as group in Gnus.
16850
16851 @code{nnmaildir} is designed to be perfectly reliable: @kbd{C-g} will
16852 never corrupt its data in memory, and @code{SIGKILL} will never
16853 corrupt its data in the filesystem.
16854
16855 @code{nnmaildir} stores article marks and @acronym{NOV} data in each
16856 maildir.  So you can copy a whole maildir from one Gnus setup to
16857 another, and you will keep your marks.
16858
16859 Virtual server settings:
16860
16861 @table @code
16862 @item directory
16863 For each of your @code{nnmaildir} servers (it's very unlikely that
16864 you'd need more than one), you need to create a directory and populate
16865 it with maildirs or symlinks to maildirs (and nothing else; do not
16866 choose a directory already used for other purposes).  Each maildir
16867 will be represented in Gnus as a newsgroup on that server; the
16868 filename of the symlink will be the name of the group.  Any filenames
16869 in the directory starting with @samp{.} are ignored.  The directory is
16870 scanned when you first start Gnus, and each time you type @kbd{g} in
16871 the group buffer; if any maildirs have been removed or added,
16872 @code{nnmaildir} notices at these times.
16873
16874 The value of the @code{directory} parameter should be a Lisp form
16875 which is processed by @code{eval} and @code{expand-file-name} to get
16876 the path of the directory for this server.  The form is @code{eval}ed
16877 only when the server is opened; the resulting string is used until the
16878 server is closed.  (If you don't know about forms and @code{eval},
16879 don't worry---a simple string will work.)  This parameter is not
16880 optional; you must specify it.  I don't recommend using
16881 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
16882 use that directory by default for various things, and may get confused
16883 if @code{nnmaildir} uses it too.  @code{"~/.nnmaildir"} is a typical
16884 value.
16885
16886 @item target-prefix
16887 This should be a Lisp form which is processed by @code{eval} and
16888 @code{expand-file-name}.  The form is @code{eval}ed only when the
16889 server is opened; the resulting string is used until the server is
16890 closed.
16891
16892 When you create a group on an @code{nnmaildir} server, the maildir is
16893 created with @code{target-prefix} prepended to its name, and a symlink
16894 pointing to that maildir is created, named with the plain group name.
16895 So if @code{directory} is @code{"~/.nnmaildir"} and
16896 @code{target-prefix} is @code{"../maildirs/"}, then when you create
16897 the group @code{foo}, @code{nnmaildir} will create
16898 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
16899 @file{~/.nnmaildir/foo} as a symlink pointing to
16900 @file{../maildirs/foo}.
16901
16902 You can set @code{target-prefix} to a string without any slashes to
16903 create both maildirs and symlinks in the same @code{directory}; in
16904 this case, any maildirs found in @code{directory} whose names start
16905 with @code{target-prefix} will not be listed as groups (but the
16906 symlinks pointing to them will be).
16907
16908 As a special case, if @code{target-prefix} is @code{""} (the default),
16909 then when you create a group, the maildir will be created in
16910 @code{directory} without a corresponding symlink.  Beware that you
16911 cannot use @code{gnus-group-delete-group} on such groups without the
16912 @code{force} argument.
16913
16914 @item directory-files
16915 This should be a function with the same interface as
16916 @code{directory-files} (such as @code{directory-files} itself).  It is
16917 used to scan the server's @code{directory} for maildirs.  This
16918 parameter is optional; the default is
16919 @code{nnheader-directory-files-safe} if
16920 @code{nnheader-directory-files-is-safe} is @code{nil}, and
16921 @code{directory-files} otherwise.
16922 (@code{nnheader-directory-files-is-safe} is checked only once when the
16923 server is opened; if you want to check it each time the directory is
16924 scanned, you'll have to provide your own function that does that.)
16925
16926 @item get-new-mail
16927 If non-@code{nil}, then after scanning for new mail in the group
16928 maildirs themselves as usual, this server will also incorporate mail
16929 the conventional Gnus way, from @code{mail-sources} according to
16930 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
16931 value is @code{nil}.
16932
16933 Do @emph{not} use the same maildir both in @code{mail-sources} and as
16934 an @code{nnmaildir} group.  The results might happen to be useful, but
16935 that would be by chance, not by design, and the results might be
16936 different in the future.  If your split rules create new groups,
16937 remember to supply a @code{create-directory} server parameter.
16938 @end table
16939
16940 @subsubsection Group parameters
16941
16942 @code{nnmaildir} uses several group parameters.  It's safe to ignore
16943 all this; the default behavior for @code{nnmaildir} is the same as the
16944 default behavior for other mail back ends: articles are deleted after
16945 one week, etc.  Except for the expiry parameters, all this
16946 functionality is unique to @code{nnmaildir}, so you can ignore it if
16947 you're just trying to duplicate the behavior you already have with
16948 another back end.
16949
16950 If the value of any of these parameters is a vector, the first element
16951 is evaluated as a Lisp form and the result is used, rather than the
16952 original value.  If the value is not a vector, the value itself is
16953 evaluated as a Lisp form.  (This is why these parameters use names
16954 different from those of other, similar parameters supported by other
16955 back ends: they have different, though similar, meanings.)  (For
16956 numbers, strings, @code{nil}, and @code{t}, you can ignore the
16957 @code{eval} business again; for other values, remember to use an extra
16958 quote and wrap the value in a vector when appropriate.)
16959
16960 @table @code
16961 @item expire-age
16962 An integer specifying the minimum age, in seconds, of an article
16963 before it will be expired, or the symbol @code{never} to specify that
16964 articles should never be expired.  If this parameter is not set,
16965 @code{nnmaildir} falls back to the usual
16966 @code{nnmail-expiry-wait}(@code{-function}) variables (the
16967 @code{expiry-wait} group parameter overrides @code{nnmail-expiry-wait}
16968 and makes @code{nnmail-expiry-wait-function} ineffective).  If you
16969 wanted a value of 3 days, you could use something like @code{[(* 3 24
16970 60 60)]}; @code{nnmaildir} will evaluate the form and use the result.
16971 An article's age is measured starting from the article file's
16972 modification time.  Normally, this is the same as the article's
16973 delivery time, but editing an article makes it younger.  Moving an
16974 article (other than via expiry) may also make an article younger.
16975
16976 @item expire-group
16977 If this is set to a string such as a full Gnus group name, like
16978 @example
16979 "backend+server.address.string:group.name"
16980 @end example
16981 and if it is not the name of the same group that the parameter belongs
16982 to, then articles will be moved to the specified group during expiry
16983 before being deleted.  @emph{If this is set to an @code{nnmaildir}
16984 group, the article will be just as old in the destination group as it
16985 was in the source group.}  So be careful with @code{expire-age} in the
16986 destination group.  If this is set to the name of the same group that
16987 the parameter belongs to, then the article is not expired at all.  If
16988 you use the vector form, the first element is evaluated once for each
16989 article.  So that form can refer to
16990 @code{nnmaildir-article-file-name}, etc., to decide where to put the
16991 article.  @emph{Even if this parameter is not set, @code{nnmaildir}
16992 does not fall back to the @code{expiry-target} group parameter or the
16993 @code{nnmail-expiry-target} variable.}
16994
16995 @item read-only
16996 If this is set to @code{t}, @code{nnmaildir} will treat the articles
16997 in this maildir as read-only.  This means: articles are not renamed
16998 from @file{new/} into @file{cur/}; articles are only found in
16999 @file{new/}, not @file{cur/}; articles are never deleted; articles
17000 cannot be edited.  @file{new/} is expected to be a symlink to the
17001 @file{new/} directory of another maildir---e.g., a system-wide mailbox
17002 containing a mailing list of common interest.  Everything in the
17003 maildir outside @file{new/} is @emph{not} treated as read-only, so for
17004 a shared mailbox, you do still need to set up your own maildir (or
17005 have write permission to the shared mailbox); your maildir just won't
17006 contain extra copies of the articles.
17007
17008 @item directory-files
17009 A function with the same interface as @code{directory-files}.  It is
17010 used to scan the directories in the maildir corresponding to this
17011 group to find articles.  The default is the function specified by the
17012 server's @code{directory-files} parameter.
17013
17014 @item distrust-Lines:
17015 If non-@code{nil}, @code{nnmaildir} will always count the lines of an
17016 article, rather than use the @code{Lines:} header field.  If
17017 @code{nil}, the header field will be used if present.
17018
17019 @item always-marks
17020 A list of mark symbols, such as @code{['(read expire)]}.  Whenever
17021 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
17022 say that all articles have these marks, regardless of whether the
17023 marks stored in the filesystem say so.  This is a proof-of-concept
17024 feature that will probably be removed eventually; it ought to be done
17025 in Gnus proper, or abandoned if it's not worthwhile.
17026
17027 @item never-marks
17028 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
17029 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
17030 say that no articles have these marks, regardless of whether the marks
17031 stored in the filesystem say so.  @code{never-marks} overrides
17032 @code{always-marks}.  This is a proof-of-concept feature that will
17033 probably be removed eventually; it ought to be done in Gnus proper, or
17034 abandoned if it's not worthwhile.
17035
17036 @item nov-cache-size
17037 An integer specifying the size of the @acronym{NOV} memory cache.  To
17038 speed things up, @code{nnmaildir} keeps @acronym{NOV} data in memory
17039 for a limited number of articles in each group.  (This is probably not
17040 worthwhile, and will probably be removed in the future.)  This
17041 parameter's value is noticed only the first time a group is seen after
17042 the server is opened---i.e., when you first start Gnus, typically.
17043 The @acronym{NOV} cache is never resized until the server is closed
17044 and reopened.  The default is an estimate of the number of articles
17045 that would be displayed in the summary buffer: a count of articles
17046 that are either marked with @code{tick} or not marked with
17047 @code{read}, plus a little extra.
17048 @end table
17049
17050 @subsubsection Article identification
17051 Articles are stored in the @file{cur/} subdirectory of each maildir.
17052 Each article file is named like @code{uniq:info}, where @code{uniq}
17053 contains no colons.  @code{nnmaildir} ignores, but preserves, the
17054 @code{:info} part.  (Other maildir readers typically use this part of
17055 the filename to store marks.)  The @code{uniq} part uniquely
17056 identifies the article, and is used in various places in the
17057 @file{.nnmaildir/} subdirectory of the maildir to store information
17058 about the corresponding article.  The full pathname of an article is
17059 available in the variable @code{nnmaildir-article-file-name} after you
17060 request the article in the summary buffer.
17061
17062 @subsubsection NOV data
17063 An article identified by @code{uniq} has its @acronym{NOV} data (used
17064 to generate lines in the summary buffer) stored in
17065 @code{.nnmaildir/nov/uniq}.  There is no
17066 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
17067 need for it---an article's @acronym{NOV} data is updated automatically
17068 when the article or @code{nnmail-extra-headers} has changed.)  You can
17069 force @code{nnmaildir} to regenerate the @acronym{NOV} data for a
17070 single article simply by deleting the corresponding @acronym{NOV}
17071 file, but @emph{beware}: this will also cause @code{nnmaildir} to
17072 assign a new article number for this article, which may cause trouble
17073 with @code{seen} marks, the Agent, and the cache.
17074
17075 @subsubsection Article marks
17076 An article identified by @code{uniq} is considered to have the mark
17077 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
17078 When Gnus asks @code{nnmaildir} for a group's marks, @code{nnmaildir}
17079 looks for such files and reports the set of marks it finds.  When Gnus
17080 asks @code{nnmaildir} to store a new set of marks, @code{nnmaildir}
17081 creates and deletes the corresponding files as needed.  (Actually,
17082 rather than create a new file for each mark, it just creates hard
17083 links to @file{.nnmaildir/markfile}, to save inodes.)
17084
17085 You can invent new marks by creating a new directory in
17086 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
17087 your server, untar it later, and keep your marks.  You can add and
17088 remove marks yourself by creating and deleting mark files.  If you do
17089 this while Gnus is running and your @code{nnmaildir} server is open,
17090 it's best to exit all summary buffers for @code{nnmaildir} groups and
17091 type @kbd{s} in the group buffer first, and to type @kbd{g} or
17092 @kbd{M-g} in the group buffer afterwards.  Otherwise, Gnus might not
17093 pick up the changes, and might undo them.
17094
17095
17096 @node Mail Folders
17097 @subsubsection Mail Folders
17098 @cindex nnfolder
17099 @cindex mbox folders
17100 @cindex mail folders
17101
17102 @code{nnfolder} is a back end for storing each mail group in a
17103 separate file.  Each file is in the standard Un*x mbox format.
17104 @code{nnfolder} will add extra headers to keep track of article
17105 numbers and arrival dates.
17106
17107 @cindex self contained nnfolder servers
17108 @cindex marks
17109 When the marks file is used (which it is by default), @code{nnfolder}
17110 servers have the property that you may backup them using @code{tar} or
17111 similar, and later be able to restore them into Gnus (by adding the
17112 proper @code{nnfolder} server) and have all your marks be preserved.
17113 Marks for a group are usually stored in a file named as the mbox file
17114 with @code{.mrk} concatenated to it (but see
17115 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder}
17116 directory.  Individual @code{nnfolder} groups are also possible to
17117 backup, use @kbd{G m} to restore the group (after restoring the backup
17118 into the @code{nnfolder} directory).
17119
17120 Virtual server settings:
17121
17122 @table @code
17123 @item nnfolder-directory
17124 @vindex nnfolder-directory
17125 All the @code{nnfolder} mail boxes will be stored under this
17126 directory.  The default is the value of @code{message-directory}
17127 (whose default is @file{~/Mail})
17128
17129 @item nnfolder-active-file
17130 @vindex nnfolder-active-file
17131 The name of the active file.  The default is @file{~/Mail/active}.
17132
17133 @item nnfolder-newsgroups-file
17134 @vindex nnfolder-newsgroups-file
17135 The name of the group descriptions file.  @xref{Newsgroups File
17136 Format}.  The default is @file{~/Mail/newsgroups}
17137
17138 @item nnfolder-get-new-mail
17139 @vindex nnfolder-get-new-mail
17140 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The
17141 default is @code{t}
17142
17143 @item nnfolder-save-buffer-hook
17144 @vindex nnfolder-save-buffer-hook
17145 @cindex backup files
17146 Hook run before saving the folders.  Note that Emacs does the normal
17147 backup renaming of files even with the @code{nnfolder} buffers.  If
17148 you wish to switch this off, you could say something like the
17149 following in your @file{.emacs} file:
17150
17151 @lisp
17152 (defun turn-off-backup ()
17153   (set (make-local-variable 'backup-inhibited) t))
17154
17155 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
17156 @end lisp
17157
17158 @item nnfolder-delete-mail-hook
17159 @vindex nnfolder-delete-mail-hook
17160 Hook run in a buffer narrowed to the message that is to be deleted.
17161 This function can be used to copy the message to somewhere else, or to
17162 extract some information from it before removing it.
17163
17164 @item nnfolder-nov-is-evil
17165 @vindex nnfolder-nov-is-evil
17166 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
17167 default is @code{nil}.
17168
17169 @item nnfolder-nov-file-suffix
17170 @vindex nnfolder-nov-file-suffix
17171 The extension for @acronym{NOV} files.  The default is @file{.nov}.
17172
17173 @item nnfolder-nov-directory
17174 @vindex nnfolder-nov-directory
17175 The directory where the @acronym{NOV} files should be stored.  If
17176 @code{nil}, @code{nnfolder-directory} is used.
17177
17178 @item nnfolder-marks-is-evil
17179 @vindex nnfolder-marks-is-evil
17180 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
17181 default is @code{nil}.
17182
17183 @item nnfolder-marks-file-suffix
17184 @vindex nnfolder-marks-file-suffix
17185 The extension for @sc{marks} files.  The default is @file{.mrk}.
17186
17187 @item nnfolder-marks-directory
17188 @vindex nnfolder-marks-directory
17189 The directory where the @sc{marks} files should be stored.  If
17190 @code{nil}, @code{nnfolder-directory} is used.
17191
17192 @end table
17193
17194
17195 @findex nnfolder-generate-active-file
17196 @kindex M-x nnfolder-generate-active-file
17197 If you have lots of @code{nnfolder}-like files you'd like to read with
17198 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
17199 command to make @code{nnfolder} aware of all likely files in
17200 @code{nnfolder-directory}.  This only works if you use long file names,
17201 though.
17202
17203 @node Comparing Mail Back Ends
17204 @subsubsection Comparing Mail Back Ends
17205
17206 First, just for terminology, the @dfn{back end} is the common word for a
17207 low-level access method---a transport, if you will, by which something
17208 is acquired.  The sense is that one's mail has to come from somewhere,
17209 and so selection of a suitable back end is required in order to get that
17210 mail within spitting distance of Gnus.
17211
17212 The same concept exists for Usenet itself: Though access to articles is
17213 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
17214 in the world got at Usenet by running a reader on the machine where the
17215 articles lay (the machine which today we call an @acronym{NNTP} server), and
17216 access was by the reader stepping into the articles' directory spool
17217 area directly.  One can still select between either the @code{nntp} or
17218 @code{nnspool} back ends, to select between these methods, if one happens
17219 actually to live on the server (or can see its spool directly, anyway,
17220 via NFS).
17221
17222 The goal in selecting a mail back end is to pick one which
17223 simultaneously represents a suitable way of dealing with the original
17224 format plus leaving mail in a form that is convenient to use in the
17225 future.  Here are some high and low points on each:
17226
17227 @table @code
17228 @item nnmbox
17229
17230 UNIX systems have historically had a single, very common, and well-
17231 defined format.  All messages arrive in a single @dfn{spool file}, and
17232 they are delineated by a line whose regular expression matches
17233 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
17234 to make it clear in this instance that this is not the RFC-specified
17235 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
17236 historically from the Unix environment, it is simplest if one does not
17237 mess a great deal with the original mailbox format, so if one chooses
17238 this back end, Gnus' primary activity in getting mail from the real spool
17239 area to Gnus' preferred directory is simply to copy it, with no
17240 (appreciable) format change in the process.  It is the ``dumbest'' way
17241 to move mail into availability in the Gnus environment.  This makes it
17242 fast to move into place, but slow to parse, when Gnus has to look at
17243 what's where.
17244
17245 @item nnbabyl
17246
17247 Once upon a time, there was the DEC-10 and DEC-20, running operating
17248 systems called TOPS and related things, and the usual (only?) mail
17249 reading environment was a thing called Babyl.  I don't know what format
17250 was used for mail landing on the system, but Babyl had its own internal
17251 format to which mail was converted, primarily involving creating a
17252 spool-file-like entity with a scheme for inserting Babyl-specific
17253 headers and status bits above the top of each message in the file.
17254 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
17255 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
17256 to understand the mail files folks already had in existence.  Gnus (and
17257 VM, for that matter) continue to support this format because it's
17258 perceived as having some good qualities in those mailer-specific
17259 headers/status bits stuff.  Rmail itself still exists as well, of
17260 course, and is still maintained within Emacs.  Since Emacs 23, it
17261 uses standard mbox format rather than Babyl.
17262
17263 Both of the above forms leave your mail in a single file on your
17264 file system, and they must parse that entire file each time you take a
17265 look at your mail.
17266
17267 @item nnml
17268
17269 @code{nnml} is the back end which smells the most as though you were
17270 actually operating with an @code{nnspool}-accessed Usenet system.  (In
17271 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
17272 lo these years ago.)  One's mail is taken from the original spool file,
17273 and is then cut up into individual message files, 1:1.  It maintains a
17274 Usenet-style active file (analogous to what one finds in an INN- or
17275 CNews-based news system in (for instance) @file{/var/lib/news/active},
17276 or what is returned via the @samp{NNTP LIST} verb) and also creates
17277 @dfn{overview} files for efficient group entry, as has been defined for
17278 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
17279 due to the creation of lots of files, updates to the @code{nnml} active
17280 file, and additions to overview files on a per-message basis, but it is
17281 extremely fast on access because of what amounts to the indexing support
17282 provided by the active file and overviews.
17283
17284 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
17285 resource which defines available places in the file system to put new
17286 files.  Sysadmins take a dim view of heavy inode occupation within
17287 tight, shared file systems.  But if you live on a personal machine where
17288 the file system is your own and space is not at a premium, @code{nnml}
17289 wins big.
17290
17291 It is also problematic using this back end if you are living in a
17292 FAT16-based Windows world, since much space will be wasted on all these
17293 tiny files.
17294
17295 @item nnmh
17296
17297 The Rand MH mail-reading system has been around UNIX systems for a very
17298 long time; it operates by splitting one's spool file of messages into
17299 individual files, but with little or no indexing support---@code{nnmh}
17300 is considered to be semantically equivalent to ``@code{nnml} without
17301 active file or overviews''.  This is arguably the worst choice, because
17302 one gets the slowness of individual file creation married to the
17303 slowness of access parsing when learning what's new in one's groups.
17304
17305 @item nnfolder
17306
17307 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
17308 method described above) on a per-group basis.  That is, @code{nnmbox}
17309 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
17310 little bit of optimization to this so that each of one's mail groups has
17311 a Unix mail box file.  It's faster than @code{nnmbox} because each group
17312 can be parsed separately, and still provides the simple Unix mail box
17313 format requiring minimal effort in moving the mail around.  In addition,
17314 it maintains an ``active'' file making it much faster for Gnus to figure
17315 out how many messages there are in each separate group.
17316
17317 If you have groups that are expected to have a massive amount of
17318 messages, @code{nnfolder} is not the best choice, but if you receive
17319 only a moderate amount of mail, @code{nnfolder} is probably the most
17320 friendly mail back end all over.
17321
17322 @item nnmaildir
17323
17324 For configuring expiry and other things, @code{nnmaildir} uses
17325 incompatible group parameters, slightly different from those of other
17326 mail back ends.
17327
17328 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
17329 differences.  Each message is stored in a separate file, but the
17330 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
17331 also stores the equivalent of @code{nnml}'s overview files in one file
17332 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
17333 @code{df -i} to see how plentiful your inode supply is.)  If this slows
17334 you down or takes up very much space, consider switching to
17335 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
17336 file system.
17337
17338 Since maildirs don't require locking for delivery, the maildirs you use
17339 as groups can also be the maildirs your mail is directly delivered to.
17340 This means you can skip Gnus' mail splitting if your mail is already
17341 organized into different mailboxes during delivery.  A @code{directory}
17342 entry in @code{mail-sources} would have a similar effect, but would
17343 require one set of mailboxes for spooling deliveries (in mbox format,
17344 thus damaging message bodies), and another set to be used as groups (in
17345 whatever format you like).  A maildir has a built-in spool, in the
17346 @code{new/} subdirectory.  Beware that currently, mail moved from
17347 @code{new/} to @code{cur/} instead of via mail splitting will not
17348 undergo treatment such as duplicate checking.
17349
17350 @code{nnmaildir} stores article marks for a given group in the
17351 corresponding maildir, in a way designed so that it's easy to manipulate
17352 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
17353 else, and still have your marks.  @code{nnml} also stores marks, but
17354 it's not as easy to work with them from outside Gnus as with
17355 @code{nnmaildir}.
17356
17357 @code{nnmaildir} uses a significant amount of memory to speed things up.
17358 (It keeps in memory some of the things that @code{nnml} stores in files
17359 and that @code{nnmh} repeatedly parses out of message files.)  If this
17360 is a problem for you, you can set the @code{nov-cache-size} group
17361 parameter to something small (0 would probably not work, but 1 probably
17362 would) to make it use less memory.  This caching will probably be
17363 removed in the future.
17364
17365 Startup is likely to be slower with @code{nnmaildir} than with other
17366 back ends.  Everything else is likely to be faster, depending in part
17367 on your file system.
17368
17369 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
17370 to write an @code{nnmaildir}-derived back end.
17371
17372 @end table
17373
17374
17375 @node Browsing the Web
17376 @section Browsing the Web
17377 @cindex web
17378 @cindex browsing the web
17379 @cindex www
17380 @cindex http
17381
17382 Web-based discussion forums are getting more and more popular.  On many
17383 subjects, the web-based forums have become the most important forums,
17384 eclipsing the importance of mailing lists and news groups.  The reason
17385 is easy to understand---they are friendly to new users; you just point
17386 and click, and there's the discussion.  With mailing lists, you have to
17387 go through a cumbersome subscription procedure, and most people don't
17388 even know what a news group is.
17389
17390 The problem with this scenario is that web browsers are not very good at
17391 being newsreaders.  They do not keep track of what articles you've read;
17392 they do not allow you to score on subjects you're interested in; they do
17393 not allow off-line browsing; they require you to click around and drive
17394 you mad in the end.
17395
17396 So---if web browsers suck at reading discussion forums, why not use Gnus
17397 to do it instead?
17398
17399 Gnus has been getting a bit of a collection of back ends for providing
17400 interfaces to these sources.
17401
17402 @menu
17403 * Archiving Mail::
17404 * Web Searches::                Creating groups from articles that match a string.
17405 * RSS::                         Reading RDF site summary.
17406 * Customizing W3::              Doing stuff to Emacs/W3 from Gnus.
17407 @end menu
17408
17409 All the web sources require Emacs/W3 and the url library or those
17410 alternatives to work.
17411
17412 The main caveat with all these web sources is that they probably won't
17413 work for a very long time.  Gleaning information from the @acronym{HTML} data
17414 is guesswork at best, and when the layout is altered, the Gnus back end
17415 will fail.  If you have reasonably new versions of these back ends,
17416 though, you should be ok.
17417
17418 One thing all these Web methods have in common is that the Web sources
17419 are often down, unavailable or just plain too slow to be fun.  In those
17420 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
17421 Unplugged}) handle downloading articles, and then you can read them at
17422 leisure from your local disk.  No more World Wide Wait for you.
17423
17424 @node Archiving Mail
17425 @subsection Archiving Mail
17426 @cindex archiving mail
17427 @cindex backup of mail
17428
17429 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
17430 @code{nnmaildir}, now actually store the article marks with each group.
17431 For these servers, archiving and restoring a group while preserving
17432 marks is fairly simple.
17433
17434 (Preserving the group level and group parameters as well still
17435 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
17436 though.)
17437
17438 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
17439 server, take a recursive copy of the server directory.  There is no need
17440 to shut down Gnus, so archiving may be invoked by @code{cron} or
17441 similar.  You restore the data by restoring the directory tree, and
17442 adding a server definition pointing to that directory in Gnus.  The
17443 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
17444 might interfere with overwriting data, so you may want to shut down Gnus
17445 before you restore the data.
17446
17447 It is also possible to archive individual @code{nnml},
17448 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
17449 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
17450 directory.  For @code{nnfolder} you need to copy both the base folder
17451 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
17452 this example).  Restoring the group is done with @kbd{G m} from the Group
17453 buffer.  The last step makes Gnus notice the new directory.
17454 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
17455 is unnecessary in that case.
17456
17457 @node Web Searches
17458 @subsection Web Searches
17459 @cindex nnweb
17460 @cindex Google
17461 @cindex dejanews
17462 @cindex gmane
17463 @cindex Usenet searches
17464 @cindex searching the Usenet
17465
17466 It's, like, too neat to search the Usenet for articles that match a
17467 string, but it, like, totally @emph{sucks}, like, totally, to use one of
17468 those, like, Web browsers, and you, like, have to, rilly, like, look at
17469 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
17470 searches without having to use a browser.
17471
17472 The @code{nnweb} back end allows an easy interface to the mighty search
17473 engine.  You create an @code{nnweb} group, enter a search pattern, and
17474 then enter the group and read the articles like you would any normal
17475 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
17476 Groups}) will do this in an easy-to-use fashion.
17477
17478 @code{nnweb} groups don't really lend themselves to being solid
17479 groups---they have a very fleeting idea of article numbers.  In fact,
17480 each time you enter an @code{nnweb} group (not even changing the search
17481 pattern), you are likely to get the articles ordered in a different
17482 manner.  Not even using duplicate suppression (@pxref{Duplicate
17483 Suppression}) will help, since @code{nnweb} doesn't even know the
17484 @code{Message-ID} of the articles before reading them using some search
17485 engines (Google, for instance).  The only possible way to keep track
17486 of which articles you've read is by scoring on the @code{Date}
17487 header---mark all articles posted before the last date you read the
17488 group as read.
17489
17490 If the search engine changes its output substantially, @code{nnweb}
17491 won't be able to parse it and will fail.  One could hardly fault the Web
17492 providers if they were to do this---their @emph{raison d'@^etre} is to
17493 make money off of advertisements, not to provide services to the
17494 community.  Since @code{nnweb} washes the ads off all the articles, one
17495 might think that the providers might be somewhat miffed.  We'll see.
17496
17497 You must have the @code{url} and @code{W3} package or those alternatives
17498 (try @code{customize-group} on the @samp{mm-url} variable group)
17499 installed to be able to use @code{nnweb}.
17500
17501 Virtual server variables:
17502
17503 @table @code
17504 @item nnweb-type
17505 @vindex nnweb-type
17506 What search engine type is being used.  The currently supported types
17507 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
17508 @code{dejanews} is an alias to @code{google}.
17509
17510 @item nnweb-search
17511 @vindex nnweb-search
17512 The search string to feed to the search engine.
17513
17514 @item nnweb-max-hits
17515 @vindex nnweb-max-hits
17516 Advisory maximum number of hits per search to display.  The default is
17517 999.
17518
17519 @item nnweb-type-definition
17520 @vindex nnweb-type-definition
17521 Type-to-definition alist.  This alist says what @code{nnweb} should do
17522 with the various search engine types.  The following elements must be
17523 present:
17524
17525 @table @code
17526 @item article
17527 Function to decode the article and provide something that Gnus
17528 understands.
17529
17530 @item map
17531 Function to create an article number to message header and URL alist.
17532
17533 @item search
17534 Function to send the search string to the search engine.
17535
17536 @item address
17537 The address the aforementioned function should send the search string
17538 to.
17539
17540 @item id
17541 Format string URL to fetch an article by @code{Message-ID}.
17542 @end table
17543
17544 @end table
17545
17546
17547 @node RSS
17548 @subsection RSS
17549 @cindex nnrss
17550 @cindex RSS
17551
17552 Some web sites have an RDF Site Summary (@acronym{RSS}).
17553 @acronym{RSS} is a format for summarizing headlines from news related
17554 sites (such as BBC or CNN).  But basically anything list-like can be
17555 presented as an @acronym{RSS} feed: weblogs, changelogs or recent
17556 changes to a wiki (e.g. @url{http://cliki.net/recent-changes.rdf}).
17557
17558 @acronym{RSS} has a quite regular and nice interface, and it's
17559 possible to get the information Gnus needs to keep groups updated.
17560
17561 Note: you had better use Emacs which supports the @code{utf-8} coding
17562 system because @acronym{RSS} uses UTF-8 for encoding non-@acronym{ASCII}
17563 text by default.  It is also used by default for non-@acronym{ASCII}
17564 group names.
17565
17566 @kindex G R (Group)
17567 Use @kbd{G R} from the group buffer to subscribe to a feed---you will be
17568 prompted for the location, the title and the description of the feed.
17569 The title, which allows any characters, will be used for the group name
17570 and the name of the group data file.  The description can be omitted.
17571
17572 An easy way to get started with @code{nnrss} is to say something like
17573 the following in the group buffer: @kbd{B nnrss RET RET y}, then
17574 subscribe to groups.
17575
17576 The @code{nnrss} back end saves the group data file in
17577 @code{nnrss-directory} (see below) for each @code{nnrss} group.  File
17578 names containing non-@acronym{ASCII} characters will be encoded by the
17579 coding system specified with the @code{nnmail-pathname-coding-system}
17580 variable or other.  Also @xref{Non-ASCII Group Names}, for more
17581 information.
17582
17583 The @code{nnrss} back end generates @samp{multipart/alternative}
17584 @acronym{MIME} articles in which each contains a @samp{text/plain} part
17585 and a @samp{text/html} part.
17586
17587 @cindex OPML
17588 You can also use the following commands to import and export your
17589 subscriptions from a file in @acronym{OPML} format (Outline Processor
17590 Markup Language).
17591
17592 @defun nnrss-opml-import file
17593 Prompt for an @acronym{OPML} file, and subscribe to each feed in the
17594 file.
17595 @end defun
17596
17597 @defun nnrss-opml-export
17598 Write your current @acronym{RSS} subscriptions to a buffer in
17599 @acronym{OPML} format.
17600 @end defun
17601
17602 The following @code{nnrss} variables can be altered:
17603
17604 @table @code
17605 @item nnrss-directory
17606 @vindex nnrss-directory
17607 The directory where @code{nnrss} stores its files.  The default is
17608 @file{~/News/rss/}.
17609
17610 @item nnrss-file-coding-system
17611 @vindex nnrss-file-coding-system
17612 The coding system used when reading and writing the @code{nnrss} groups
17613 data files.  The default is the value of
17614 @code{mm-universal-coding-system} (which defaults to @code{emacs-mule}
17615 in Emacs or @code{escape-quoted} in XEmacs).
17616
17617 @item nnrss-ignore-article-fields
17618 @vindex nnrss-ignore-article-fields
17619 Some feeds update constantly article fields during their publications,
17620 e.g. to indicate the number of comments.  However, if there is
17621 a difference between the local article and the distant one, the latter
17622 is considered to be new.  To avoid this and discard some fields, set this
17623 variable to the list of fields to be ignored.  The default is
17624 @code{'(slash:comments)}.
17625
17626 @item nnrss-use-local
17627 @vindex nnrss-use-local
17628 @findex nnrss-generate-download-script
17629 If you set @code{nnrss-use-local} to @code{t}, @code{nnrss} will read
17630 the feeds from local files in @code{nnrss-directory}.  You can use
17631 the command @code{nnrss-generate-download-script} to generate a
17632 download script using @command{wget}.
17633
17634 @item nnrss-wash-html-in-text-plain-parts
17635 Non-@code{nil} means that @code{nnrss} renders text in @samp{text/plain}
17636 parts as @acronym{HTML}.  The function specified by the
17637 @code{mm-text-html-renderer} variable (@pxref{Display Customization,
17638 ,Display Customization, emacs-mime, The Emacs MIME Manual}) will be used
17639 to render text.  If it is @code{nil}, which is the default, text will
17640 simply be folded.  Leave it @code{nil} if you prefer to see
17641 @samp{text/html} parts.
17642 @end table
17643
17644 The following code may be helpful, if you want to show the description in
17645 the summary buffer.
17646
17647 @lisp
17648 (add-to-list 'nnmail-extra-headers nnrss-description-field)
17649 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
17650
17651 (defun gnus-user-format-function-X (header)
17652   (let ((descr
17653          (assq nnrss-description-field (mail-header-extra header))))
17654     (if descr (concat "\n\t" (cdr descr)) "")))
17655 @end lisp
17656
17657 The following code may be useful to open an nnrss url directly from the
17658 summary buffer.
17659
17660 @lisp
17661 (require 'browse-url)
17662
17663 (defun browse-nnrss-url (arg)
17664   (interactive "p")
17665   (let ((url (assq nnrss-url-field
17666                    (mail-header-extra
17667                     (gnus-data-header
17668                      (assq (gnus-summary-article-number)
17669                            gnus-newsgroup-data))))))
17670     (if url
17671         (progn
17672           (browse-url (cdr url))
17673           (gnus-summary-mark-as-read-forward 1))
17674       (gnus-summary-scroll-up arg))))
17675
17676 (eval-after-load "gnus"
17677   #'(define-key gnus-summary-mode-map
17678       (kbd "<RET>") 'browse-nnrss-url))
17679 (add-to-list 'nnmail-extra-headers nnrss-url-field)
17680 @end lisp
17681
17682 Even if you have added @samp{text/html} to the
17683 @code{mm-discouraged-alternatives} variable (@pxref{Display
17684 Customization, ,Display Customization, emacs-mime, The Emacs MIME
17685 Manual}) since you don't want to see @acronym{HTML} parts, it might be
17686 more useful especially in @code{nnrss} groups to display
17687 @samp{text/html} parts.  Here's an example of setting
17688 @code{mm-discouraged-alternatives} as a group parameter (@pxref{Group
17689 Parameters}) in order to display @samp{text/html} parts only in
17690 @code{nnrss} groups:
17691
17692 @lisp
17693 ;; @r{Set the default value of @code{mm-discouraged-alternatives}.}
17694 (eval-after-load "gnus-sum"
17695   '(add-to-list
17696     'gnus-newsgroup-variables
17697     '(mm-discouraged-alternatives
17698       . '("text/html" "image/.*"))))
17699
17700 ;; @r{Display @samp{text/html} parts in @code{nnrss} groups.}
17701 (add-to-list
17702  'gnus-parameters
17703  '("\\`nnrss:" (mm-discouraged-alternatives nil)))
17704 @end lisp
17705
17706
17707 @node Customizing W3
17708 @subsection Customizing W3
17709 @cindex W3
17710 @cindex html
17711 @cindex url
17712 @cindex Netscape
17713
17714 Gnus uses the url library to fetch web pages and Emacs/W3 (or those
17715 alternatives) to display web pages.  Emacs/W3 is documented in its own
17716 manual, but there are some things that may be more relevant for Gnus
17717 users.
17718
17719 For instance, a common question is how to make Emacs/W3 follow links
17720 using the @code{browse-url} functions (which will call some external web
17721 browser like Netscape).  Here's one way:
17722
17723 @lisp
17724 (eval-after-load "w3"
17725   '(progn
17726     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
17727     (defun w3-fetch (&optional url target)
17728       (interactive (list (w3-read-url-with-default)))
17729       (if (eq major-mode 'gnus-article-mode)
17730           (browse-url url)
17731         (w3-fetch-orig url target)))))
17732 @end lisp
17733
17734 Put that in your @file{.emacs} file, and hitting links in W3-rendered
17735 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
17736 follow the link.
17737
17738
17739 @node IMAP
17740 @section IMAP
17741 @cindex nnimap
17742 @cindex @acronym{IMAP}
17743
17744 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
17745 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
17746 server is much similar to connecting to a news server, you just
17747 specify the network address of the server.
17748
17749 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
17750 everything that @acronym{POP} can, it can hence be viewed as a
17751 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
17752 similar to @acronym{NNTP} being a news storage protocol---however,
17753 @acronym{IMAP} offers more features than @acronym{NNTP} because news
17754 is more or less read-only whereas mail is read-write.
17755
17756 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
17757 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
17758 the @acronym{IMAP} server and store them on the local disk.  This is
17759 not the usage described in this section---@xref{Mail Sources}.
17760
17761 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
17762 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
17763 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
17764 usage explained in this section.
17765
17766 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
17767 servers might look something like the following.  (Note that for
17768 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
17769 see below.)
17770
17771 @lisp
17772 (setq gnus-secondary-select-methods
17773       '((nnimap "simpleserver") ; @r{no special configuration}
17774         ; @r{perhaps a ssh port forwarded server:}
17775         (nnimap "dolk"
17776                 (nnimap-address "localhost")
17777                 (nnimap-server-port 1430))
17778         ; @r{a UW server running on localhost}
17779         (nnimap "barbar"
17780                 (nnimap-server-port 143)
17781                 (nnimap-address "localhost")
17782                 (nnimap-list-pattern ("INBOX" "mail/*")))
17783         ; @r{anonymous public cyrus server:}
17784         (nnimap "cyrus.andrew.cmu.edu"
17785                 (nnimap-authenticator anonymous)
17786                 (nnimap-list-pattern "archive.*")
17787                 (nnimap-stream network))
17788         ; @r{a ssl server on a non-standard port:}
17789         (nnimap "vic20"
17790                 (nnimap-address "vic20.somewhere.com")
17791                 (nnimap-server-port 9930)
17792                 (nnimap-stream ssl))))
17793 @end lisp
17794
17795 After defining the new server, you can subscribe to groups on the
17796 server using normal Gnus commands such as @kbd{U} in the Group Buffer
17797 (@pxref{Subscription Commands}) or via the Server Buffer
17798 (@pxref{Server Buffer}).
17799
17800 The following variables can be used to create a virtual @code{nnimap}
17801 server:
17802
17803 @table @code
17804
17805 @item nnimap-address
17806 @vindex nnimap-address
17807
17808 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
17809 server name if not specified.
17810
17811 @item nnimap-server-port
17812 @vindex nnimap-server-port
17813 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
17814
17815 Note that this should be an integer, example server specification:
17816
17817 @lisp
17818 (nnimap "mail.server.com"
17819         (nnimap-server-port 4711))
17820 @end lisp
17821
17822 @item nnimap-list-pattern
17823 @vindex nnimap-list-pattern
17824 String or list of strings of mailboxes to limit available groups to.
17825 This is used when the server has very many mailboxes and you're only
17826 interested in a few---some servers export your home directory via
17827 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
17828 @file{~/Mail/*} then.
17829
17830 The string can also be a cons of REFERENCE and the string as above, what
17831 REFERENCE is used for is server specific, but on the University of
17832 Washington server it's a directory that will be concatenated with the
17833 mailbox.
17834
17835 Example server specification:
17836
17837 @lisp
17838 (nnimap "mail.server.com"
17839         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
17840                                ("~friend/Mail/" . "list/*"))))
17841 @end lisp
17842
17843 @item nnimap-stream
17844 @vindex nnimap-stream
17845 The type of stream used to connect to your server.  By default, nnimap
17846 will detect and automatically use all of the below, with the exception
17847 of @acronym{TLS}/@acronym{SSL}.  (@acronym{IMAP} over
17848 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
17849 be automatically detected, but it's not widely deployed yet.)
17850
17851 Example server specification:
17852
17853 @lisp
17854 (nnimap "mail.server.com"
17855         (nnimap-stream ssl))
17856 @end lisp
17857
17858 Please note that the value of @code{nnimap-stream} is a symbol!
17859
17860 @itemize @bullet
17861 @item
17862 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5).  Requires the
17863 @samp{gsasl} or @samp{imtest} program.
17864 @item
17865 @dfn{kerberos4:} Connect with Kerberos 4.  Requires the @samp{imtest} program.
17866 @item
17867 @dfn{starttls:} Connect via the STARTTLS extension (similar to
17868 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
17869 @samp{starttls}.
17870 @item
17871 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
17872 @samp{gnutls-cli}).
17873 @item
17874 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
17875 @samp{openssl}) or SSLeay (@samp{s_client}).
17876 @item
17877 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
17878 @item
17879 @dfn{network:} Plain, TCP/IP network connection.
17880 @end itemize
17881
17882 @vindex imap-kerberos4-program
17883 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
17884 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
17885 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
17886 to make @code{imap.el} use a pty instead of a pipe when communicating
17887 with @samp{imtest}.  You will then suffer from a line length
17888 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
17889 indefinitely if you have many articles in a mailbox.  The variable
17890 @code{imap-kerberos4-program} contain parameters to pass to the imtest
17891 program.
17892
17893 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
17894 needed.  It is available from
17895 @uref{http://www.gnu.org/software/gnutls/}.
17896
17897 @vindex imap-gssapi-program
17898 This parameter specifies a list of command lines that invoke a GSSAPI
17899 authenticated @acronym{IMAP} stream in a subshell.  They are tried
17900 sequentially until a connection is made, or the list has been
17901 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
17902 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
17903 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
17904 tried.
17905
17906 @vindex imap-ssl-program
17907 For @acronym{SSL} connections, the OpenSSL program is available from
17908 @uref{http://www.openssl.org/}.  OpenSSL was formerly known as SSLeay,
17909 and nnimap support it too---although the most recent versions of
17910 SSLeay, 0.9.x, are known to have serious bugs making it
17911 useless.  Earlier versions, especially 0.8.x, of SSLeay are known to
17912 work.  The variable @code{imap-ssl-program} contain parameters to pass
17913 to OpenSSL/SSLeay.
17914
17915 @vindex imap-shell-program
17916 @vindex imap-shell-host
17917 For @acronym{IMAP} connections using the @code{shell} stream, the
17918 variable @code{imap-shell-program} specify what program to call.  Make
17919 sure nothing is interfering with the output of the program, e.g., don't
17920 forget to redirect the error output to the void.
17921
17922 @item nnimap-authenticator
17923 @vindex nnimap-authenticator
17924
17925 The authenticator used to connect to the server.  By default, nnimap
17926 will use the most secure authenticator your server is capable of.
17927
17928 Example server specification:
17929
17930 @lisp
17931 (nnimap "mail.server.com"
17932         (nnimap-authenticator anonymous))
17933 @end lisp
17934
17935 Please note that the value of @code{nnimap-authenticator} is a symbol!
17936
17937 @itemize @bullet
17938 @item
17939 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication.  Requires
17940 external program @code{gsasl} or @code{imtest}.
17941 @item
17942 @dfn{kerberos4:} Kerberos 4 authentication.  Requires external program
17943 @code{imtest}.
17944 @item
17945 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5.  Requires
17946 external library @code{digest-md5.el}.
17947 @item
17948 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
17949 @item
17950 @dfn{login:} Plain-text username/password via LOGIN.
17951 @item
17952 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
17953 @end itemize
17954
17955 @item nnimap-expunge-on-close
17956 @cindex expunging
17957 @vindex nnimap-expunge-on-close
17958 Unlike Parmenides the @acronym{IMAP} designers have decided things that
17959 don't exist actually do exist.  More specifically, @acronym{IMAP} has
17960 this concept of marking articles @code{Deleted} which doesn't actually
17961 delete them, and this (marking them @code{Deleted}, that is) is what
17962 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
17963 similar).
17964
17965 Since the articles aren't really removed when we mark them with the
17966 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
17967 running in circles yet?
17968
17969 Traditionally, nnimap has removed all articles marked as @code{Deleted}
17970 when closing a mailbox but this is now configurable by this server
17971 variable.
17972
17973 The possible options are:
17974
17975 @table @code
17976
17977 @item always
17978 The default behavior, delete all articles marked as ``Deleted'' when
17979 closing a mailbox.
17980 @item never
17981 Never actually delete articles.  Currently there is no way of showing
17982 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
17983 may allow you to do this.  If you ever want to run the EXPUNGE command
17984 manually, @xref{Expunging mailboxes}.
17985 @item ask
17986 When closing mailboxes, nnimap will ask if you wish to expunge deleted
17987 articles or not.
17988
17989 @end table
17990
17991 @item nnimap-importantize-dormant
17992 @vindex nnimap-importantize-dormant
17993
17994 If non-@code{nil} (the default), marks dormant articles as ticked (as
17995 well), for other @acronym{IMAP} clients.  Within Gnus, dormant articles will
17996 naturally still (only) be marked as dormant.  This is to make dormant
17997 articles stand out, just like ticked articles, in other @acronym{IMAP}
17998 clients.  (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
17999 has only one.)
18000
18001 Probably the only reason for frobbing this would be if you're trying
18002 enable per-user persistent dormant flags, using something like:
18003
18004 @lisp
18005 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
18006         (format "gnus-dormant-%s" (user-login-name)))
18007 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
18008         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
18009 @end lisp
18010
18011 In this case, you would not want the per-user dormant flag showing up
18012 as ticked for other users.
18013
18014 @item nnimap-expunge-search-string
18015 @cindex expunging
18016 @vindex nnimap-expunge-search-string
18017 @cindex expiring @acronym{IMAP} mail
18018
18019 This variable contain the @acronym{IMAP} search command sent to server when
18020 searching for articles eligible for expiring.  The default is
18021 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
18022 UID set and the second @code{%s} is replaced by a date.
18023
18024 Probably the only useful value to change this to is
18025 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
18026 messages instead of the internal article date.  See section 6.4.4 of
18027 RFC 2060 for more information on valid strings.
18028
18029 However, if @code{nnimap-search-uids-not-since-is-evil}
18030 is true, this variable has no effect since the search logic
18031 is reversed, as described below.
18032
18033 @item nnimap-authinfo-file
18034 @vindex nnimap-authinfo-file
18035
18036 A file containing credentials used to log in on servers.  The format is
18037 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
18038 variable @code{nntp-authinfo-file} for exact syntax; also see
18039 @ref{NNTP}.  An example of an .authinfo line for an IMAP server, is:
18040
18041 @example
18042 machine students.uio.no login larsi password geheimnis port imap
18043 @end example
18044
18045 Note that it should be @code{port imap}, or @code{port 143}, if you
18046 use a @code{nnimap-stream} of @code{tls} or @code{ssl}, even if the
18047 actual port number used is port 993 for secured IMAP.  For
18048 convenience, Gnus will accept @code{port imaps} as a synonym of
18049 @code{port imap}.
18050
18051 @item nnimap-need-unselect-to-notice-new-mail
18052 @vindex nnimap-need-unselect-to-notice-new-mail
18053
18054 Unselect mailboxes before looking for new mail in them.  Some servers
18055 seem to need this under some circumstances; it was reported that
18056 Courier 1.7.1 did.
18057
18058 @item nnimap-nov-is-evil
18059 @vindex nnimap-nov-is-evil
18060 @cindex Courier @acronym{IMAP} server
18061 @cindex @acronym{NOV}
18062
18063 Never generate or use a local @acronym{NOV} database. Defaults to the
18064 value of @code{gnus-agent}.
18065
18066 Using a @acronym{NOV} database usually makes header fetching much
18067 faster, but it uses the @code{UID SEARCH UID} command, which is very
18068 slow on some servers (notably some versions of Courier). Since the Gnus
18069 Agent caches the information in the @acronym{NOV} database without using
18070 the slow command, this variable defaults to true if the Agent is in use,
18071 and false otherwise.
18072
18073 @item nnimap-search-uids-not-since-is-evil
18074 @vindex nnimap-search-uids-not-since-is-evil
18075 @cindex Courier @acronym{IMAP} server
18076 @cindex expiring @acronym{IMAP} mail
18077
18078 Avoid the @code{UID SEARCH UID @var{message numbers} NOT SINCE
18079 @var{date}} command, which is slow on some @acronym{IMAP} servers
18080 (notably, some versions of Courier). Instead, use @code{UID SEARCH SINCE
18081 @var{date}} and prune the list of expirable articles within Gnus.
18082
18083 When Gnus expires your mail (@pxref{Expiring Mail}), it starts with a
18084 list of expirable articles and asks the IMAP server questions like ``Of
18085 these articles, which ones are older than a week?'' While this seems
18086 like a perfectly reasonable question, some IMAP servers take a long time
18087 to answer it, since they seemingly go looking into every old article to
18088 see if it is one of the expirable ones. Curiously, the question ``Of
18089 @emph{all} articles, which ones are newer than a week?'' seems to be
18090 much faster to answer, so setting this variable causes Gnus to ask this
18091 question and figure out the answer to the real question itself.
18092
18093 This problem can really sneak up on you: when you first configure Gnus,
18094 everything works fine, but once you accumulate a couple thousand
18095 messages, you start cursing Gnus for being so slow. On the other hand,
18096 if you get a lot of email within a week, setting this variable will
18097 cause a lot of network traffic between Gnus and the IMAP server.
18098
18099 @item nnimap-logout-timeout
18100 @vindex nnimap-logout-timeout
18101
18102 There is a case where a connection to a @acronym{IMAP} server is unable
18103 to close, when connecting to the server via a certain kind of network,
18104 e.g. @acronym{VPN}.  In that case, it will be observed that a connection
18105 between Emacs and the local network looks alive even if the server has
18106 closed a connection for some reason (typically, a timeout).
18107 Consequently, Emacs continues waiting for a response from the server for
18108 the @code{LOGOUT} command that Emacs sent, or hangs in other words.  If
18109 you are in such a network, setting this variable to a number of seconds
18110 will be helpful.  If it is set, a hung connection will be closed
18111 forcibly, after this number of seconds from the time Emacs sends the
18112 @code{LOGOUT} command.  It should not be too small value but too large
18113 value will be inconvenient too.  Perhaps the value 1.0 will be a good
18114 candidate but it might be worth trying some other values.
18115
18116 Example server specification:
18117
18118 @lisp
18119 (nnimap "mail.server.com"
18120         (nnimap-logout-timeout 1.0))
18121 @end lisp
18122
18123 @end table
18124
18125 @menu
18126 * Splitting in IMAP::           Splitting mail with nnimap.
18127 * Expiring in IMAP::            Expiring mail with nnimap.
18128 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
18129 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
18130 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
18131 * Debugging IMAP::              What to do when things don't work.
18132 @end menu
18133
18134
18135
18136 @node Splitting in IMAP
18137 @subsection Splitting in IMAP
18138 @cindex splitting imap mail
18139
18140 Splitting is something Gnus users have loved and used for years, and now
18141 the rest of the world is catching up.  Yeah, dream on, not many
18142 @acronym{IMAP} servers have server side splitting and those that have
18143 splitting seem to use some non-standard protocol.  This means that
18144 @acronym{IMAP} support for Gnus has to do its own splitting.
18145
18146 And it does.
18147
18148 (Incidentally, people seem to have been dreaming on, and Sieve has
18149 gaining a market share and is supported by several IMAP servers.
18150 Fortunately, Gnus support it too, @xref{Sieve Commands}.)
18151
18152 Here are the variables of interest:
18153
18154 @table @code
18155
18156 @item nnimap-split-crosspost
18157 @cindex splitting, crosspost
18158 @cindex crosspost
18159 @vindex nnimap-split-crosspost
18160
18161 If non-@code{nil}, do crossposting if several split methods match the
18162 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
18163 found will be used.
18164
18165 Nnmail equivalent: @code{nnmail-crosspost}.
18166
18167 @item nnimap-split-inbox
18168 @cindex splitting, inbox
18169 @cindex inbox
18170 @vindex nnimap-split-inbox
18171
18172 A string or a list of strings that gives the name(s) of @acronym{IMAP}
18173 mailboxes to split from.  Defaults to @code{nil}, which means that
18174 splitting is disabled!
18175
18176 @lisp
18177 (setq nnimap-split-inbox
18178       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
18179 @end lisp
18180
18181 No nnmail equivalent.
18182
18183 @item nnimap-split-rule
18184 @cindex splitting, rules
18185 @vindex nnimap-split-rule
18186
18187 New mail found in @code{nnimap-split-inbox} will be split according to
18188 this variable.
18189
18190 This variable contains a list of lists, where the first element in the
18191 sublist gives the name of the @acronym{IMAP} mailbox to move articles
18192 matching the regexp in the second element in the sublist.  Got that?
18193 Neither did I, we need examples.
18194
18195 @lisp
18196 (setq nnimap-split-rule
18197       '(("INBOX.nnimap"
18198          "^Sender: owner-nnimap@@vic20.globalcom.se")
18199         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
18200         ("INBOX.private" "")))
18201 @end lisp
18202
18203 This will put all articles from the nnimap mailing list into mailbox
18204 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
18205 into INBOX.junk and everything else in INBOX.private.
18206
18207 The first string may contain @samp{\\1} forms, like the ones used by
18208 replace-match to insert sub-expressions from the matched text.  For
18209 instance:
18210
18211 @lisp
18212 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
18213 @end lisp
18214
18215 The first element can also be the symbol @code{junk} to indicate that
18216 matching messages should simply be deleted.  Use with care.
18217
18218 The second element can also be a function.  In that case, it will be
18219 called with the first element of the rule as the argument, in a buffer
18220 containing the headers of the article.  It should return a
18221 non-@code{nil} value if it thinks that the mail belongs in that group.
18222
18223 Nnmail users might recollect that the last regexp had to be empty to
18224 match all articles (like in the example above).  This is not required in
18225 nnimap.  Articles not matching any of the regexps will not be moved out
18226 of your inbox.  (This might affect performance if you keep lots of
18227 unread articles in your inbox, since the splitting code would go over
18228 them every time you fetch new mail.)
18229
18230 These rules are processed from the beginning of the alist toward the
18231 end.  The first rule to make a match will ``win'', unless you have
18232 crossposting enabled.  In that case, all matching rules will ``win''.
18233
18234 This variable can also have a function as its value, the function will
18235 be called with the headers narrowed and should return a group where it
18236 thinks the article should be split to.  See @code{nnimap-split-fancy}.
18237
18238 The splitting code tries to create mailboxes if it needs to.
18239
18240 To allow for different split rules on different virtual servers, and
18241 even different split rules in different inboxes on the same server,
18242 the syntax of this variable have been extended along the lines of:
18243
18244 @lisp
18245 (setq nnimap-split-rule
18246       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
18247                                ("junk"    "From:.*Simon"))))
18248         ("my2server"    ("INBOX" nnimap-split-fancy))
18249         ("my[34]server" (".*" (("private" "To:.*Simon")
18250                                ("junk"    my-junk-func))))))
18251 @end lisp
18252
18253 The virtual server name is in fact a regexp, so that the same rules
18254 may apply to several servers.  In the example, the servers
18255 @code{my3server} and @code{my4server} both use the same rules.
18256 Similarly, the inbox string is also a regexp.  The actual splitting
18257 rules are as before, either a function, or a list with group/regexp or
18258 group/function elements.
18259
18260 Nnmail equivalent: @code{nnmail-split-methods}.
18261
18262 @item nnimap-split-predicate
18263 @cindex splitting
18264 @vindex nnimap-split-predicate
18265
18266 Mail matching this predicate in @code{nnimap-split-inbox} will be
18267 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
18268
18269 This might be useful if you use another @acronym{IMAP} client to read mail in
18270 your inbox but would like Gnus to split all articles in the inbox
18271 regardless of readedness.  Then you might change this to
18272 @samp{UNDELETED}.
18273
18274 @item nnimap-split-fancy
18275 @cindex splitting, fancy
18276 @findex nnimap-split-fancy
18277 @vindex nnimap-split-fancy
18278
18279 It's possible to set @code{nnimap-split-rule} to
18280 @code{nnmail-split-fancy} if you want to use fancy
18281 splitting.  @xref{Fancy Mail Splitting}.
18282
18283 However, to be able to have different fancy split rules for nnmail and
18284 nnimap back ends you can set @code{nnimap-split-rule} to
18285 @code{nnimap-split-fancy} and define the nnimap specific fancy split
18286 rule in @code{nnimap-split-fancy}.
18287
18288 Example:
18289
18290 @lisp
18291 (setq nnimap-split-rule 'nnimap-split-fancy
18292       nnimap-split-fancy ...)
18293 @end lisp
18294
18295 Nnmail equivalent: @code{nnmail-split-fancy}.
18296
18297 @item nnimap-split-download-body
18298 @findex nnimap-split-download-body
18299 @vindex nnimap-split-download-body
18300
18301 Set to non-@code{nil} to download entire articles during splitting.
18302 This is generally not required, and will slow things down
18303 considerably.  You may need it if you want to use an advanced
18304 splitting function that analyzes the body to split the article.
18305
18306 @end table
18307
18308 @node Expiring in IMAP
18309 @subsection Expiring in IMAP
18310 @cindex expiring @acronym{IMAP} mail
18311
18312 Even though @code{nnimap} is not a proper @code{nnmail} derived back
18313 end, it supports most features in regular expiring (@pxref{Expiring
18314 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
18315 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
18316 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
18317 follows below are the variables used by the @code{nnimap} expiry
18318 process.
18319
18320 A note on how the expire mark is stored on the @acronym{IMAP} server is
18321 appropriate here as well.  The expire mark is translated into a
18322 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
18323 message.  This means that likely only Gnus will understand and treat
18324 the @code{gnus-expire} mark properly, although other clients may allow
18325 you to view client specific flags on the message.  It also means that
18326 your server must support permanent storage of client specific flags on
18327 messages.  Most do, fortunately.
18328
18329 If expiring @acronym{IMAP} mail seems very slow, try setting the server
18330 variable @code{nnimap-search-uids-not-since-is-evil}.
18331
18332 @table @code
18333
18334 @item nnmail-expiry-wait
18335 @item nnmail-expiry-wait-function
18336
18337 These variables are fully supported.  The expire value can be a
18338 number, the symbol @code{immediate} or @code{never}.
18339
18340 @item nnmail-expiry-target
18341
18342 This variable is supported, and internally implemented by calling the
18343 @code{nnmail} functions that handle this.  It contains an optimization
18344 that if the destination is a @acronym{IMAP} group on the same server, the
18345 article is copied instead of appended (that is, uploaded again).
18346
18347 @end table
18348
18349 @node Editing IMAP ACLs
18350 @subsection Editing IMAP ACLs
18351 @cindex editing imap acls
18352 @cindex Access Control Lists
18353 @cindex Editing @acronym{IMAP} ACLs
18354 @kindex G l (Group)
18355 @findex gnus-group-nnimap-edit-acl
18356
18357 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
18358 limiting (or enabling) other users access to your mail boxes.  Not all
18359 @acronym{IMAP} servers support this, this function will give an error if it
18360 doesn't.
18361
18362 To edit an ACL for a mailbox, type @kbd{G l}
18363 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
18364 editing window with detailed instructions.
18365
18366 Some possible uses:
18367
18368 @itemize @bullet
18369 @item
18370 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
18371 on your mailing list mailboxes enables other users on the same server to
18372 follow the list without subscribing to it.
18373 @item
18374 At least with the Cyrus server, you are required to give the user
18375 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
18376 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
18377 INBOX.mailbox).
18378 @end itemize
18379
18380 @node Expunging mailboxes
18381 @subsection Expunging mailboxes
18382 @cindex expunging
18383
18384 @cindex expunge
18385 @cindex manual expunging
18386 @kindex G x (Group)
18387 @findex gnus-group-expunge-group
18388
18389 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
18390 you may want the option of expunging all deleted articles in a mailbox
18391 manually.  This is exactly what @kbd{G x} does.
18392
18393 Currently there is no way of showing deleted articles, you can just
18394 delete them.
18395
18396 @node A note on namespaces
18397 @subsection A note on namespaces
18398 @cindex IMAP namespace
18399 @cindex namespaces
18400
18401 The @acronym{IMAP} protocol has a concept called namespaces, described
18402 by the following text in the RFC2060:
18403
18404 @display
18405 5.1.2.  Mailbox Namespace Naming Convention
18406
18407    By convention, the first hierarchical element of any mailbox name
18408    which begins with "#" identifies the "namespace" of the remainder of
18409    the name.  This makes it possible to disambiguate between different
18410    types of mailbox stores, each of which have their own namespaces.
18411
18412       For example, implementations which offer access to USENET
18413       newsgroups MAY use the "#news" namespace to partition the USENET
18414       newsgroup namespace from that of other mailboxes.  Thus, the
18415       comp.mail.misc newsgroup would have an mailbox name of
18416       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
18417       to a different object (e.g. a user's private mailbox).
18418 @end display
18419
18420 While there is nothing in this text that warrants concern for the
18421 @acronym{IMAP} implementation in Gnus, some servers use namespace
18422 prefixes in a way that does not work with how Gnus uses mailbox names.
18423
18424 Specifically, University of Washington's @acronym{IMAP} server uses
18425 mailbox names like @code{#driver.mbx/read-mail} which are valid only
18426 in the @sc{create} and @sc{append} commands.  After the mailbox is
18427 created (or a messages is appended to a mailbox), it must be accessed
18428 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
18429 not make it possible for the user to guarantee that user entered
18430 mailbox names will only be used with the CREATE and APPEND commands,
18431 you should simply not use the namespace prefixed mailbox names in
18432 Gnus.
18433
18434 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
18435 for more information on how to use the prefixes.  They are a power
18436 tool and should be used only if you are sure what the effects are.
18437
18438 @node Debugging IMAP
18439 @subsection Debugging IMAP
18440 @cindex IMAP debugging
18441 @cindex protocol dump (IMAP)
18442
18443 @acronym{IMAP} is a complex protocol, more so than @acronym{NNTP} or
18444 @acronym{POP3}.  Implementation bugs are not unlikely, and we do our
18445 best to fix them right away.  If you encounter odd behavior, chances
18446 are that either the server or Gnus is buggy.
18447
18448 If you are familiar with network protocols in general, you will
18449 probably be able to extract some clues from the protocol dump of the
18450 exchanges between Gnus and the server.  Even if you are not familiar
18451 with network protocols, when you include the protocol dump in
18452 @acronym{IMAP}-related bug reports you are helping us with data
18453 critical to solving the problem.  Therefore, we strongly encourage you
18454 to include the protocol dump when reporting IMAP bugs in Gnus.
18455
18456
18457 @vindex imap-log
18458 Because the protocol dump, when enabled, generates lots of data, it is
18459 disabled by default.  You can enable it by setting @code{imap-log} as
18460 follows:
18461
18462 @lisp
18463 (setq imap-log t)
18464 @end lisp
18465
18466 This instructs the @code{imap.el} package to log any exchanges with
18467 the server.  The log is stored in the buffer @samp{*imap-log*}.  Look
18468 for error messages, which sometimes are tagged with the keyword
18469 @code{BAD}---but when submitting a bug, make sure to include all the
18470 data.
18471
18472 @node Other Sources
18473 @section Other Sources
18474
18475 Gnus can do more than just read news or mail.  The methods described
18476 below allow Gnus to view directories and files as if they were
18477 newsgroups.
18478
18479 @menu
18480 * Directory Groups::            You can read a directory as if it was a newsgroup.
18481 * Anything Groups::             Dired?  Who needs dired?
18482 * Document Groups::             Single files can be the basis of a group.
18483 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
18484 @end menu
18485
18486
18487 @node Directory Groups
18488 @subsection Directory Groups
18489 @cindex nndir
18490 @cindex directory groups
18491
18492 If you have a directory that has lots of articles in separate files in
18493 it, you might treat it as a newsgroup.  The files have to have numerical
18494 names, of course.
18495
18496 This might be an opportune moment to mention @code{ange-ftp} (and its
18497 successor @code{efs}), that most wonderful of all wonderful Emacs
18498 packages.  When I wrote @code{nndir}, I didn't think much about it---a
18499 back end to read directories.  Big deal.
18500
18501 @code{ange-ftp} changes that picture dramatically.  For instance, if you
18502 enter the @code{ange-ftp} file name
18503 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
18504 @code{ange-ftp} or @code{efs} will actually allow you to read this
18505 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
18506
18507 @code{nndir} will use @acronym{NOV} files if they are present.
18508
18509 @code{nndir} is a ``read-only'' back end---you can't delete or expire
18510 articles with this method.  You can use @code{nnmh} or @code{nnml} for
18511 whatever you use @code{nndir} for, so you could switch to any of those
18512 methods if you feel the need to have a non-read-only @code{nndir}.
18513
18514
18515 @node Anything Groups
18516 @subsection Anything Groups
18517 @cindex nneething
18518
18519 From the @code{nndir} back end (which reads a single spool-like
18520 directory), it's just a hop and a skip to @code{nneething}, which
18521 pretends that any arbitrary directory is a newsgroup.  Strange, but
18522 true.
18523
18524 When @code{nneething} is presented with a directory, it will scan this
18525 directory and assign article numbers to each file.  When you enter such
18526 a group, @code{nneething} must create ``headers'' that Gnus can use.
18527 After all, Gnus is a newsreader, in case you're forgetting.
18528 @code{nneething} does this in a two-step process.  First, it snoops each
18529 file in question.  If the file looks like an article (i.e., the first
18530 few lines look like headers), it will use this as the head.  If this is
18531 just some arbitrary file without a head (e.g. a C source file),
18532 @code{nneething} will cobble up a header out of thin air.  It will use
18533 file ownership, name and date and do whatever it can with these
18534 elements.
18535
18536 All this should happen automatically for you, and you will be presented
18537 with something that looks very much like a newsgroup.  Totally like a
18538 newsgroup, to be precise.  If you select an article, it will be displayed
18539 in the article buffer, just as usual.
18540
18541 If you select a line that represents a directory, Gnus will pop you into
18542 a new summary buffer for this @code{nneething} group.  And so on.  You can
18543 traverse the entire disk this way, if you feel like, but remember that
18544 Gnus is not dired, really, and does not intend to be, either.
18545
18546 There are two overall modes to this action---ephemeral or solid.  When
18547 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
18548 will not store information on what files you have read, and what files
18549 are new, and so on.  If you create a solid @code{nneething} group the
18550 normal way with @kbd{G m}, Gnus will store a mapping table between
18551 article numbers and file names, and you can treat this group like any
18552 other groups.  When you activate a solid @code{nneething} group, you will
18553 be told how many unread articles it contains, etc., etc.
18554
18555 Some variables:
18556
18557 @table @code
18558 @item nneething-map-file-directory
18559 @vindex nneething-map-file-directory
18560 All the mapping files for solid @code{nneething} groups will be stored
18561 in this directory, which defaults to @file{~/.nneething/}.
18562
18563 @item nneething-exclude-files
18564 @vindex nneething-exclude-files
18565 All files that match this regexp will be ignored.  Nice to use to exclude
18566 auto-save files and the like, which is what it does by default.
18567
18568 @item nneething-include-files
18569 @vindex nneething-include-files
18570 Regexp saying what files to include in the group.  If this variable is
18571 non-@code{nil}, only files matching this regexp will be included.
18572
18573 @item nneething-map-file
18574 @vindex nneething-map-file
18575 Name of the map files.
18576 @end table
18577
18578
18579 @node Document Groups
18580 @subsection Document Groups
18581 @cindex nndoc
18582 @cindex documentation group
18583 @cindex help group
18584
18585 @code{nndoc} is a cute little thing that will let you read a single file
18586 as a newsgroup.  Several files types are supported:
18587
18588 @table @code
18589 @cindex Babyl
18590 @item babyl
18591 The Babyl format.
18592
18593 @cindex mbox
18594 @cindex Unix mbox
18595 @item mbox
18596 The standard Unix mbox file.
18597
18598 @cindex MMDF mail box
18599 @item mmdf
18600 The MMDF mail box format.
18601
18602 @item news
18603 Several news articles appended into a file.
18604
18605 @cindex rnews batch files
18606 @item rnews
18607 The rnews batch transport format.
18608
18609 @item nsmail
18610 Netscape mail boxes.
18611
18612 @item mime-parts
18613 @acronym{MIME} multipart messages.
18614
18615 @item standard-digest
18616 The standard (RFC 1153) digest format.
18617
18618 @item mime-digest
18619 A @acronym{MIME} digest of messages.
18620
18621 @item lanl-gov-announce
18622 Announcement messages from LANL Gov Announce.
18623
18624 @cindex forwarded messages
18625 @item rfc822-forward
18626 A message forwarded according to RFC822.
18627
18628 @item outlook
18629 The Outlook mail box.
18630
18631 @item oe-dbx
18632 The Outlook Express dbx mail box.
18633
18634 @item exim-bounce
18635 A bounce message from the Exim MTA.
18636
18637 @item forward
18638 A message forwarded according to informal rules.
18639
18640 @item rfc934
18641 An RFC934-forwarded message.
18642
18643 @item mailman
18644 A mailman digest.
18645
18646 @item clari-briefs
18647 A digest of Clarinet brief news items.
18648
18649 @item slack-digest
18650 Non-standard digest format---matches most things, but does it badly.
18651
18652 @item mail-in-mail
18653 The last resort.
18654 @end table
18655
18656 You can also use the special ``file type'' @code{guess}, which means
18657 that @code{nndoc} will try to guess what file type it is looking at.
18658 @code{digest} means that @code{nndoc} should guess what digest type the
18659 file is.
18660
18661 @code{nndoc} will not try to change the file or insert any extra headers into
18662 it---it will simply, like, let you use the file as the basis for a
18663 group.  And that's it.
18664
18665 If you have some old archived articles that you want to insert into your
18666 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
18667 that.  Say you have an old @file{RMAIL} file with mail that you now want
18668 to split into your new @code{nnml} groups.  You look at that file using
18669 @code{nndoc} (using the @kbd{G f} command in the group buffer
18670 (@pxref{Foreign Groups})), set the process mark on all the articles in
18671 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
18672 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
18673 file is now also stored in lots of @code{nnml} directories, and you can
18674 delete that pesky @file{RMAIL} file.  If you have the guts!
18675
18676 Virtual server variables:
18677
18678 @table @code
18679 @item nndoc-article-type
18680 @vindex nndoc-article-type
18681 This should be one of @code{mbox}, @code{babyl}, @code{digest},
18682 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
18683 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
18684 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
18685 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
18686
18687 @item nndoc-post-type
18688 @vindex nndoc-post-type
18689 This variable says whether Gnus is to consider the group a news group or
18690 a mail group.  There are two valid values:  @code{mail} (the default)
18691 and @code{news}.
18692 @end table
18693
18694 @menu
18695 * Document Server Internals::   How to add your own document types.
18696 @end menu
18697
18698
18699 @node Document Server Internals
18700 @subsubsection Document Server Internals
18701
18702 Adding new document types to be recognized by @code{nndoc} isn't
18703 difficult.  You just have to whip up a definition of what the document
18704 looks like, write a predicate function to recognize that document type,
18705 and then hook into @code{nndoc}.
18706
18707 First, here's an example document type definition:
18708
18709 @example
18710 (mmdf
18711  (article-begin .  "^\^A\^A\^A\^A\n")
18712  (body-end .  "^\^A\^A\^A\^A\n"))
18713 @end example
18714
18715 The definition is simply a unique @dfn{name} followed by a series of
18716 regexp pseudo-variable settings.  Below are the possible
18717 variables---don't be daunted by the number of variables; most document
18718 types can be defined with very few settings:
18719
18720 @table @code
18721 @item first-article
18722 If present, @code{nndoc} will skip past all text until it finds
18723 something that match this regexp.  All text before this will be
18724 totally ignored.
18725
18726 @item article-begin
18727 This setting has to be present in all document type definitions.  It
18728 says what the beginning of each article looks like.  To do more
18729 complicated things that cannot be dealt with a simple regexp, you can
18730 use @code{article-begin-function} instead of this.
18731
18732 @item article-begin-function
18733 If present, this should be a function that moves point to the beginning
18734 of each article.  This setting overrides @code{article-begin}.
18735
18736 @item head-begin
18737 If present, this should be a regexp that matches the head of the
18738 article.  To do more complicated things that cannot be dealt with a
18739 simple regexp, you can use @code{head-begin-function} instead of this.
18740
18741 @item head-begin-function
18742 If present, this should be a function that moves point to the head of
18743 the article.  This setting overrides @code{head-begin}.
18744
18745 @item head-end
18746 This should match the end of the head of the article.  It defaults to
18747 @samp{^$}---the empty line.
18748
18749 @item body-begin
18750 This should match the beginning of the body of the article.  It defaults
18751 to @samp{^\n}.  To do more complicated things that cannot be dealt with
18752 a simple regexp, you can use @code{body-begin-function} instead of this.
18753
18754 @item body-begin-function
18755 If present, this function should move point to the beginning of the body
18756 of the article.  This setting overrides @code{body-begin}.
18757
18758 @item body-end
18759 If present, this should match the end of the body of the article.  To do
18760 more complicated things that cannot be dealt with a simple regexp, you
18761 can use @code{body-end-function} instead of this.
18762
18763 @item body-end-function
18764 If present, this function should move point to the end of the body of
18765 the article.  This setting overrides @code{body-end}.
18766
18767 @item file-begin
18768 If present, this should match the beginning of the file.  All text
18769 before this regexp will be totally ignored.
18770
18771 @item file-end
18772 If present, this should match the end of the file.  All text after this
18773 regexp will be totally ignored.
18774
18775 @end table
18776
18777 So, using these variables @code{nndoc} is able to dissect a document
18778 file into a series of articles, each with a head and a body.  However, a
18779 few more variables are needed since not all document types are all that
18780 news-like---variables needed to transform the head or the body into
18781 something that's palatable for Gnus:
18782
18783 @table @code
18784 @item prepare-body-function
18785 If present, this function will be called when requesting an article.  It
18786 will be called with point at the start of the body, and is useful if the
18787 document has encoded some parts of its contents.
18788
18789 @item article-transform-function
18790 If present, this function is called when requesting an article.  It's
18791 meant to be used for more wide-ranging transformation of both head and
18792 body of the article.
18793
18794 @item generate-head-function
18795 If present, this function is called to generate a head that Gnus can
18796 understand.  It is called with the article number as a parameter, and is
18797 expected to generate a nice head for the article in question.  It is
18798 called when requesting the headers of all articles.
18799
18800 @item generate-article-function
18801 If present, this function is called to generate an entire article that
18802 Gnus can understand.  It is called with the article number as a
18803 parameter when requesting all articles.
18804
18805 @item dissection-function
18806 If present, this function is called to dissect a document by itself,
18807 overriding @code{first-article}, @code{article-begin},
18808 @code{article-begin-function}, @code{head-begin},
18809 @code{head-begin-function}, @code{head-end}, @code{body-begin},
18810 @code{body-begin-function}, @code{body-end}, @code{body-end-function},
18811 @code{file-begin}, and @code{file-end}.
18812
18813 @end table
18814
18815 Let's look at the most complicated example I can come up with---standard
18816 digests:
18817
18818 @example
18819 (standard-digest
18820  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
18821  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
18822  (prepare-body-function . nndoc-unquote-dashes)
18823  (body-end-function . nndoc-digest-body-end)
18824  (head-end . "^ ?$")
18825  (body-begin . "^ ?\n")
18826  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
18827  (subtype digest guess))
18828 @end example
18829
18830 We see that all text before a 70-width line of dashes is ignored; all
18831 text after a line that starts with that @samp{^End of} is also ignored;
18832 each article begins with a 30-width line of dashes; the line separating
18833 the head from the body may contain a single space; and that the body is
18834 run through @code{nndoc-unquote-dashes} before being delivered.
18835
18836 To hook your own document definition into @code{nndoc}, use the
18837 @code{nndoc-add-type} function.  It takes two parameters---the first
18838 is the definition itself and the second (optional) parameter says
18839 where in the document type definition alist to put this definition.
18840 The alist is traversed sequentially, and
18841 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
18842 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
18843 @code{mmdf} type, and so on.  These type predicates should return
18844 @code{nil} if the document is not of the correct type; @code{t} if it
18845 is of the correct type; and a number if the document might be of the
18846 correct type.  A high number means high probability; a low number
18847 means low probability with @samp{0} being the lowest valid number.
18848
18849
18850 @node Mail-To-News Gateways
18851 @subsection Mail-To-News Gateways
18852 @cindex mail-to-news gateways
18853 @cindex gateways
18854
18855 If your local @code{nntp} server doesn't allow posting, for some reason
18856 or other, you can post using one of the numerous mail-to-news gateways.
18857 The @code{nngateway} back end provides the interface.
18858
18859 Note that you can't read anything from this back end---it can only be
18860 used to post with.
18861
18862 Server variables:
18863
18864 @table @code
18865 @item nngateway-address
18866 @vindex nngateway-address
18867 This is the address of the mail-to-news gateway.
18868
18869 @item nngateway-header-transformation
18870 @vindex nngateway-header-transformation
18871 News headers often have to be transformed in some odd way or other
18872 for the mail-to-news gateway to accept it.  This variable says what
18873 transformation should be called, and defaults to
18874 @code{nngateway-simple-header-transformation}.  The function is called
18875 narrowed to the headers to be transformed and with one parameter---the
18876 gateway address.
18877
18878 This default function just inserts a new @code{To} header based on the
18879 @code{Newsgroups} header and the gateway address.
18880 For instance, an article with this @code{Newsgroups} header:
18881
18882 @example
18883 Newsgroups: alt.religion.emacs
18884 @end example
18885
18886 will get this @code{To} header inserted:
18887
18888 @example
18889 To: alt-religion-emacs@@GATEWAY
18890 @end example
18891
18892 The following pre-defined functions exist:
18893
18894 @findex nngateway-simple-header-transformation
18895 @table @code
18896
18897 @item nngateway-simple-header-transformation
18898 Creates a @code{To} header that looks like
18899 @var{newsgroup}@@@code{nngateway-address}.
18900
18901 @findex nngateway-mail2news-header-transformation
18902
18903 @item nngateway-mail2news-header-transformation
18904 Creates a @code{To} header that looks like
18905 @code{nngateway-address}.
18906 @end table
18907
18908 @end table
18909
18910 Here's an example:
18911
18912 @lisp
18913 (setq gnus-post-method
18914       '(nngateway
18915         "mail2news@@replay.com"
18916         (nngateway-header-transformation
18917          nngateway-mail2news-header-transformation)))
18918 @end lisp
18919
18920 So, to use this, simply say something like:
18921
18922 @lisp
18923 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
18924 @end lisp
18925
18926
18927
18928 @node Combined Groups
18929 @section Combined Groups
18930
18931 Gnus allows combining a mixture of all the other group types into bigger
18932 groups.
18933
18934 @menu
18935 * Virtual Groups::              Combining articles from many groups.
18936 @end menu
18937
18938
18939 @node Virtual Groups
18940 @subsection Virtual Groups
18941 @cindex nnvirtual
18942 @cindex virtual groups
18943 @cindex merging groups
18944
18945 An @dfn{nnvirtual group} is really nothing more than a collection of
18946 other groups.
18947
18948 For instance, if you are tired of reading many small groups, you can
18949 put them all in one big group, and then grow tired of reading one
18950 big, unwieldy group.  The joys of computing!
18951
18952 You specify @code{nnvirtual} as the method.  The address should be a
18953 regexp to match component groups.
18954
18955 All marks in the virtual group will stick to the articles in the
18956 component groups.  So if you tick an article in a virtual group, the
18957 article will also be ticked in the component group from whence it
18958 came.  (And vice versa---marks from the component groups will also be
18959 shown in the virtual group.).  To create an empty virtual group, run
18960 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
18961 and edit the method regexp with @kbd{M-e}
18962 (@code{gnus-group-edit-group-method})
18963
18964 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
18965 newsgroups into one, big, happy newsgroup:
18966
18967 @lisp
18968 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
18969 @end lisp
18970
18971 The component groups can be native or foreign; everything should work
18972 smoothly, but if your computer explodes, it was probably my fault.
18973
18974 Collecting the same group from several servers might actually be a good
18975 idea if users have set the Distribution header to limit distribution.
18976 If you would like to read @samp{soc.motss} both from a server in Japan
18977 and a server in Norway, you could use the following as the group regexp:
18978
18979 @example
18980 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
18981 @end example
18982
18983 (Remember, though, that if you're creating the group with @kbd{G m}, you
18984 shouldn't double the backslashes, and you should leave off the quote
18985 characters at the beginning and the end of the string.)
18986
18987 This should work kinda smoothly---all articles from both groups should
18988 end up in this one, and there should be no duplicates.  Threading (and
18989 the rest) will still work as usual, but there might be problems with the
18990 sequence of articles.  Sorting on date might be an option here
18991 (@pxref{Selecting a Group}).
18992
18993 One limitation, however---all groups included in a virtual
18994 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
18995 zombie groups can't be component groups for @code{nnvirtual} groups.
18996
18997 @vindex nnvirtual-always-rescan
18998 If the @code{nnvirtual-always-rescan} variable is non-@code{nil} (which
18999 is the default), @code{nnvirtual} will always scan groups for unread
19000 articles when entering a virtual group.  If this variable is @code{nil}
19001 and you read articles in a component group after the virtual group has
19002 been activated, the read articles from the component group will show up
19003 when you enter the virtual group.  You'll also see this effect if you
19004 have two virtual groups that have a component group in common.  If
19005 that's the case, you should set this variable to @code{t}.  Or you can
19006 just tap @code{M-g} on the virtual group every time before you enter
19007 it---it'll have much the same effect.
19008
19009 @code{nnvirtual} can have both mail and news groups as component groups.
19010 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
19011 has to ask the back end of the component group the article comes from
19012 whether it is a news or mail back end.  However, when you do a @kbd{^},
19013 there is typically no sure way for the component back end to know this,
19014 and in that case @code{nnvirtual} tells Gnus that the article came from a
19015 not-news back end.  (Just to be on the safe side.)
19016
19017 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
19018 line from the article you respond to in these cases.
19019
19020 @code{nnvirtual} groups do not inherit anything but articles and marks
19021 from component groups---group parameters, for instance, are not
19022 inherited.
19023
19024
19025 @node Email Based Diary
19026 @section Email Based Diary
19027 @cindex diary
19028 @cindex email based diary
19029 @cindex calendar
19030
19031 This section describes a special mail back end called @code{nndiary},
19032 and its companion library @code{gnus-diary}.  It is ``special'' in the
19033 sense that it is not meant to be one of the standard alternatives for
19034 reading mail with Gnus.  See @ref{Choosing a Mail Back End} for that.
19035 Instead, it is used to treat @emph{some} of your mails in a special way,
19036 namely, as event reminders.
19037
19038 Here is a typical scenario:
19039
19040 @itemize @bullet
19041 @item
19042 You've got a date with Andy Mc Dowell or Bruce Willis (select according
19043 to your sexual preference) in one month.  You don't want to forget it.
19044 @item
19045 So you send a ``reminder'' message (actually, a diary one) to yourself.
19046 @item
19047 You forget all about it and keep on getting and reading new mail, as usual.
19048 @item
19049 From time to time, as you type `g' in the group buffer and as the date
19050 is getting closer, the message will pop up again to remind you of your
19051 appointment, just as if it were new and unread.
19052 @item
19053 Read your ``new'' messages, this one included, and start dreaming again
19054 of the night you're gonna have.
19055 @item
19056 Once the date is over (you actually fell asleep just after dinner), the
19057 message will be automatically deleted if it is marked as expirable.
19058 @end itemize
19059
19060 The Gnus Diary back end has the ability to handle regular appointments
19061 (that wouldn't ever be deleted) as well as punctual ones, operates as a
19062 real mail back end and is configurable in many ways.  All of this is
19063 explained in the sections below.
19064
19065 @menu
19066 * The NNDiary Back End::        Basic setup and usage.
19067 * The Gnus Diary Library::      Utility toolkit on top of nndiary.
19068 * Sending or Not Sending::      A final note on sending diary messages.
19069 @end menu
19070
19071
19072 @node The NNDiary Back End
19073 @subsection The NNDiary Back End
19074 @cindex nndiary
19075 @cindex the nndiary back end
19076
19077 @code{nndiary} is a back end very similar to @code{nnml} (@pxref{Mail
19078 Spool}).  Actually, it could appear as a mix of @code{nnml} and
19079 @code{nndraft}.  If you know @code{nnml}, you're already familiar with
19080 the message storing scheme of @code{nndiary}: one file per message, one
19081 directory per group.
19082
19083   Before anything, there is one requirement to be able to run
19084 @code{nndiary} properly: you @emph{must} use the group timestamp feature
19085 of Gnus.  This adds a timestamp to each group's parameters.  @ref{Group
19086 Timestamp} to see how it's done.
19087
19088 @menu
19089 * Diary Messages::              What makes a message valid for nndiary.
19090 * Running NNDiary::             NNDiary has two modes of operation.
19091 * Customizing NNDiary::         Bells and whistles.
19092 @end menu
19093
19094 @node Diary Messages
19095 @subsubsection Diary Messages
19096 @cindex nndiary messages
19097 @cindex nndiary mails
19098
19099 @code{nndiary} messages are just normal ones, except for the mandatory
19100 presence of 7 special headers.  These headers are of the form
19101 @code{X-Diary-<something>}, @code{<something>} being one of
19102 @code{Minute}, @code{Hour}, @code{Dom}, @code{Month}, @code{Year},
19103 @code{Time-Zone} and @code{Dow}.  @code{Dom} means ``Day of Month'', and
19104 @code{dow} means ``Day of Week''.  These headers actually behave like
19105 crontab specifications and define the event date(s):
19106
19107 @itemize @bullet
19108 @item
19109 For all headers except the @code{Time-Zone} one, a header value is
19110 either a star (meaning all possible values), or a list of fields
19111 (separated by a comma).
19112 @item
19113 A field is either an integer, or a range.
19114 @item
19115 A range is two integers separated by a dash.
19116 @item
19117 Possible integer values are 0--59 for @code{Minute}, 0--23 for
19118 @code{Hour}, 1--31 for @code{Dom}, 1--12 for @code{Month}, above 1971
19119 for @code{Year} and 0--6 for @code{Dow} (0 meaning Sunday).
19120 @item
19121 As a special case, a star in either @code{Dom} or @code{Dow} doesn't
19122 mean ``all possible values'', but ``use only the other field''.  Note
19123 that if both are star'ed, the use of either one gives the same result.
19124 @item
19125 The @code{Time-Zone} header is special in that it can only have one
19126 value (@code{GMT}, for instance).  A star doesn't mean ``all possible
19127 values'' (because it makes no sense), but ``the current local time
19128 zone''.  Most of the time, you'll be using a star here.  However, for a
19129 list of available time zone values, see the variable
19130 @code{nndiary-headers}.
19131 @end itemize
19132
19133 As a concrete example, here are the diary headers to add to your message
19134 for specifying ``Each Monday and each 1st of month, at 12:00, 20:00,
19135 21:00, 22:00, 23:00 and 24:00, from 1999 to 2010'' (I'll let you find
19136 what to do then):
19137
19138 @example
19139 X-Diary-Minute: 0
19140 X-Diary-Hour: 12, 20-24
19141 X-Diary-Dom: 1
19142 X-Diary-Month: *
19143 X-Diary-Year: 1999-2010
19144 X-Diary-Dow: 1
19145 X-Diary-Time-Zone: *
19146 @end example
19147
19148 @node Running NNDiary
19149 @subsubsection Running NNDiary
19150 @cindex running nndiary
19151 @cindex nndiary operation modes
19152
19153 @code{nndiary} has two modes of operation: ``traditional'' (the default)
19154 and ``autonomous''.  In traditional mode, @code{nndiary} does not get new
19155 mail by itself.  You have to move (@kbd{B m}) or copy (@kbd{B c}) mails
19156 from your primary mail back end to nndiary groups in order to handle them
19157 as diary messages.  In autonomous mode, @code{nndiary} retrieves its own
19158 mail and handles it independently from your primary mail back end.
19159
19160 One should note that Gnus is not inherently designed to allow several
19161 ``master'' mail back ends at the same time.  However, this does make
19162 sense with @code{nndiary}: you really want to send and receive diary
19163 messages to your diary groups directly.  So, @code{nndiary} supports
19164 being sort of a ``second primary mail back end'' (to my knowledge, it is
19165 the only back end offering this feature).  However, there is a limitation
19166 (which I hope to fix some day): respooling doesn't work in autonomous
19167 mode.
19168
19169 In order to use @code{nndiary} in autonomous mode, you have several
19170 things to do:
19171
19172 @itemize @bullet
19173 @item
19174 Allow @code{nndiary} to retrieve new mail by itself.  Put the following
19175 line in your @file{~/.gnus.el} file:
19176
19177 @lisp
19178 (setq nndiary-get-new-mail t)
19179 @end lisp
19180 @item
19181 You must arrange for diary messages (those containing @code{X-Diary-*}
19182 headers) to be split in a private folder @emph{before} Gnus treat them.
19183 Again, this is needed because Gnus cannot (yet ?) properly handle
19184 multiple primary mail back ends.  Getting those messages from a separate
19185 source will compensate this misfeature to some extent.
19186
19187 As an example, here's my procmailrc entry to store diary files in
19188 @file{~/.nndiary} (the default @code{nndiary} mail source file):
19189
19190 @example
19191 :0 HD :
19192 * ^X-Diary
19193 .nndiary
19194 @end example
19195 @end itemize
19196
19197 Once this is done, you might want to customize the following two options
19198 that affect the diary mail retrieval and splitting processes:
19199
19200 @defvar nndiary-mail-sources
19201 This is the diary-specific replacement for the standard
19202 @code{mail-sources} variable.  It obeys the same syntax, and defaults to
19203 @code{(file :path "~/.nndiary")}.
19204 @end defvar
19205
19206 @defvar nndiary-split-methods
19207 This is the diary-specific replacement for the standard
19208 @code{nnmail-split-methods} variable.  It obeys the same syntax.
19209 @end defvar
19210
19211   Finally, you may add a permanent @code{nndiary} virtual server
19212 (something like @code{(nndiary "diary")} should do) to your
19213 @code{gnus-secondary-select-methods}.
19214
19215   Hopefully, almost everything (see the TODO section in
19216 @file{nndiary.el}) will work as expected when you restart Gnus: in
19217 autonomous mode, typing @kbd{g} and @kbd{M-g} in the group buffer, will
19218 also get your new diary mails and split them according to your
19219 diary-specific rules, @kbd{F} will find your new diary groups etc.
19220
19221 @node Customizing NNDiary
19222 @subsubsection Customizing NNDiary
19223 @cindex customizing nndiary
19224 @cindex nndiary customization
19225
19226 Now that @code{nndiary} is up and running, it's time to customize it.
19227 The custom group is called @code{nndiary} (no, really ?!).  You should
19228 browse it to figure out which options you'd like to tweak.  The following
19229 two variables are probably the only ones you will want to change:
19230
19231 @defvar nndiary-reminders
19232 This is the list of times when you want to be reminded of your
19233 appointments (e.g. 3 weeks before, then 2 days before, then 1 hour
19234 before and that's it).  Remember that ``being reminded'' means that the
19235 diary message will pop up as brand new and unread again when you get new
19236 mail.
19237 @end defvar
19238
19239 @defvar nndiary-week-starts-on-monday
19240 Rather self-explanatory.  Otherwise, Sunday is assumed (this is the
19241 default).
19242 @end defvar
19243
19244
19245 @node The Gnus Diary Library
19246 @subsection The Gnus Diary Library
19247 @cindex gnus-diary
19248 @cindex the gnus diary library
19249
19250 Using @code{nndiary} manually (I mean, writing the headers by hand and
19251 so on) would be rather boring.  Fortunately, there is a library called
19252 @code{gnus-diary} written on top of @code{nndiary}, that does many
19253 useful things for you.
19254
19255   In order to use it, add the following line to your @file{~/.gnus.el} file:
19256
19257 @lisp
19258 (require 'gnus-diary)
19259 @end lisp
19260
19261   Also, you shouldn't use any @code{gnus-user-format-function-[d|D]}
19262 (@pxref{Summary Buffer Lines}).  @code{gnus-diary} provides both of these
19263 (sorry if you used them before).
19264
19265
19266 @menu
19267 * Diary Summary Line Format::           A nicer summary buffer line format.
19268 * Diary Articles Sorting::              A nicer way to sort messages.
19269 * Diary Headers Generation::            Not doing it manually.
19270 * Diary Group Parameters::              Not handling them manually.
19271 @end menu
19272
19273 @node Diary Summary Line Format
19274 @subsubsection Diary Summary Line Format
19275 @cindex diary summary buffer line
19276 @cindex diary summary line format
19277
19278 Displaying diary messages in standard summary line format (usually
19279 something like @samp{From Joe: Subject}) is pretty useless.  Most of
19280 the time, you're the one who wrote the message, and you mostly want to
19281 see the event's date.
19282
19283   @code{gnus-diary} provides two supplemental user formats to be used in
19284 summary line formats.  @code{D} corresponds to a formatted time string
19285 for the next occurrence of the event (e.g. ``Sat, Sep 22 01, 12:00''),
19286 while @code{d} corresponds to an approximative remaining time until the
19287 next occurrence of the event (e.g. ``in 6 months, 1 week'').
19288
19289   For example, here's how Joe's birthday is displayed in my
19290 @code{nndiary+diary:birthdays} summary buffer (note that the message is
19291 expirable, but will never be deleted, as it specifies a periodic event):
19292
19293 @example
19294    E  Sat, Sep 22 01, 12:00: Joe's birthday (in 6 months, 1 week)
19295 @end example
19296
19297 In order to get something like the above, you would normally add the
19298 following line to your diary groups'parameters:
19299
19300 @lisp
19301 (gnus-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n")
19302 @end lisp
19303
19304 However, @code{gnus-diary} does it automatically (@pxref{Diary Group
19305 Parameters}).  You can however customize the provided summary line format
19306 with the following user options:
19307
19308 @defvar gnus-diary-summary-line-format
19309 Defines the summary line format used for diary groups (@pxref{Summary
19310 Buffer Lines}).  @code{gnus-diary} uses it to automatically update the
19311 diary groups'parameters.
19312 @end defvar
19313
19314 @defvar gnus-diary-time-format
19315 Defines the format to display dates in diary summary buffers.  This is
19316 used by the @code{D} user format.  See the docstring for details.
19317 @end defvar
19318
19319 @defvar gnus-diary-delay-format-function
19320 Defines the format function to use for displaying delays (remaining
19321 times) in diary summary buffers.  This is used by the @code{d} user
19322 format.  There are currently built-in functions for English and French;
19323 you can also define your own.  See the docstring for details.
19324 @end defvar
19325
19326 @node Diary Articles Sorting
19327 @subsubsection Diary Articles Sorting
19328 @cindex diary articles sorting
19329 @cindex diary summary lines sorting
19330 @findex gnus-summary-sort-by-schedule
19331 @findex gnus-thread-sort-by-schedule
19332 @findex gnus-article-sort-by-schedule
19333
19334 @code{gnus-diary} provides new sorting functions (@pxref{Sorting the
19335 Summary Buffer} ) called @code{gnus-summary-sort-by-schedule},
19336 @code{gnus-thread-sort-by-schedule} and
19337 @code{gnus-article-sort-by-schedule}.  These functions let you organize
19338 your diary summary buffers from the closest event to the farthest one.
19339
19340 @code{gnus-diary} automatically installs
19341 @code{gnus-summary-sort-by-schedule} as a menu item in the summary
19342 buffer's ``sort'' menu, and the two others as the primary (hence
19343 default) sorting functions in the group parameters (@pxref{Diary Group
19344 Parameters}).
19345
19346 @node Diary Headers Generation
19347 @subsubsection Diary Headers Generation
19348 @cindex diary headers generation
19349 @findex gnus-diary-check-message
19350
19351 @code{gnus-diary} provides a function called
19352 @code{gnus-diary-check-message} to help you handle the @code{X-Diary-*}
19353 headers.  This function ensures that the current message contains all the
19354 required diary headers, and prompts you for values or corrections if
19355 needed.
19356
19357   This function is hooked into the @code{nndiary} back end, so that
19358 moving or copying an article to a diary group will trigger it
19359 automatically.  It is also bound to @kbd{C-c C-f d} in
19360 @code{message-mode} and @code{article-edit-mode} in order to ease the
19361 process of converting a usual mail to a diary one.
19362
19363   This function takes a prefix argument which will force prompting of
19364 all diary headers, regardless of their presence or validity.  That way,
19365 you can very easily reschedule an already valid diary message, for
19366 instance.
19367
19368 @node Diary Group Parameters
19369 @subsubsection Diary Group Parameters
19370 @cindex diary group parameters
19371
19372 When you create a new diary group, or visit one, @code{gnus-diary}
19373 automatically checks your group parameters and if needed, sets the
19374 summary line format to the diary-specific value, installs the
19375 diary-specific sorting functions, and also adds the different
19376 @code{X-Diary-*} headers to the group's posting-style.  It is then easier
19377 to send a diary message, because if you use @kbd{C-u a} or @kbd{C-u m}
19378 on a diary group to prepare a message, these headers will be inserted
19379 automatically (although not filled with proper values yet).
19380
19381 @node Sending or Not Sending
19382 @subsection Sending or Not Sending
19383
19384 Well, assuming you've read all of the above, here are two final notes on
19385 mail sending with @code{nndiary}:
19386
19387 @itemize @bullet
19388 @item
19389 @code{nndiary} is a @emph{real} mail back end.  You really send real diary
19390 messsages for real.  This means for instance that you can give
19391 appointments to anybody (provided they use Gnus and @code{nndiary}) by
19392 sending the diary message to them as well.
19393 @item
19394 However, since @code{nndiary} also has a @code{request-post} method, you
19395 can also use @kbd{C-u a} instead of @kbd{C-u m} on a diary group and the
19396 message won't actually be sent; just stored locally in the group. This
19397 comes in very handy for private appointments.
19398 @end itemize
19399
19400 @node Gnus Unplugged
19401 @section Gnus Unplugged
19402 @cindex offline
19403 @cindex unplugged
19404 @cindex agent
19405 @cindex Gnus agent
19406 @cindex Gnus unplugged
19407
19408 In olden times (ca. February '88), people used to run their newsreaders
19409 on big machines with permanent connections to the net.  News transport
19410 was dealt with by news servers, and all the newsreaders had to do was to
19411 read news.  Believe it or not.
19412
19413 Nowadays most people read news and mail at home, and use some sort of
19414 modem to connect to the net.  To avoid running up huge phone bills, it
19415 would be nice to have a way to slurp down all the news and mail, hang up
19416 the phone, read for several hours, and then upload any responses you
19417 have to make.  And then you repeat the procedure.
19418
19419 Of course, you can use news servers for doing this as well.  I've used
19420 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
19421 for some years, but doing that's a bore.  Moving the news server
19422 functionality up to the newsreader makes sense if you're the only person
19423 reading news on a machine.
19424
19425 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
19426 fact, you don't have to configure anything as the agent is now enabled
19427 by default (@pxref{Agent Variables, gnus-agent}).
19428
19429 Of course, to use it as such, you have to learn a few new commands.
19430
19431 @menu
19432 * Agent Basics::                How it all is supposed to work.
19433 * Agent Categories::            How to tell the Gnus Agent what to download.
19434 * Agent Commands::              New commands for all the buffers.
19435 * Agent Visuals::               Ways that the agent may effect your summary buffer.
19436 * Agent as Cache::              The Agent is a big cache too.
19437 * Agent Expiry::                How to make old articles go away.
19438 * Agent Regeneration::          How to recover from lost connections and other accidents.
19439 * Agent and flags::             How the Agent maintains flags.
19440 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
19441 * Outgoing Messages::           What happens when you post/mail something?
19442 * Agent Variables::             Customizing is fun.
19443 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
19444 * Batching Agents::             How to fetch news from a @code{cron} job.
19445 * Agent Caveats::               What you think it'll do and what it does.
19446 @end menu
19447
19448
19449 @node Agent Basics
19450 @subsection Agent Basics
19451
19452 First, let's get some terminology out of the way.
19453
19454 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
19455 connection to the net (and notified the Agent that this is the case).
19456 When the connection to the net is up again (and Gnus knows this), the
19457 Agent is @dfn{plugged}.
19458
19459 The @dfn{local} machine is the one you're running on, and which isn't
19460 connected to the net continuously.
19461
19462 @dfn{Downloading} means fetching things from the net to your local
19463 machine.  @dfn{Uploading} is doing the opposite.
19464
19465 You know that Gnus gives you all the opportunity you'd ever want for
19466 shooting yourself in the foot.  Some people call it flexibility.  Gnus
19467 is also customizable to a great extent, which means that the user has a
19468 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
19469 you in your foot, but with Gnus, you have a choice!
19470
19471 Gnus is never really in plugged or unplugged state.  Rather, it applies
19472 that state to each server individually.  This means that some servers
19473 can be plugged while others can be unplugged.  Additionally, some
19474 servers can be ignored by the Agent altogether (which means that
19475 they're kinda like plugged always).
19476
19477 So when you unplug the Agent and then wonder why is Gnus opening a
19478 connection to the Net, the next step to do is to look whether all
19479 servers are agentized.  If there is an unagentized server, you found
19480 the culprit.
19481
19482 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
19483 reachable.  When Gnus notices this, it asks you whether you want the
19484 server to be switched to offline state.  If you say yes, then the
19485 server will behave somewhat as if it was unplugged, except that Gnus
19486 will ask you whether you want to switch it back online again.
19487
19488 Let's take a typical Gnus session using the Agent.
19489
19490 @itemize @bullet
19491
19492 @item
19493 @findex gnus-unplugged
19494 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
19495 Agent in a disconnected state.  You can read all the news that you have
19496 already fetched while in this mode.
19497
19498 @item
19499 You then decide to see whether any new news has arrived.  You connect
19500 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
19501 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
19502 as usual.  To check for new mail in unplugged mode (@pxref{Mail
19503 Source Specifiers}).
19504
19505 @item
19506 You can then read the new news immediately, or you can download the
19507 news onto your local machine.  If you want to do the latter, you press
19508 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
19509 all the eligible articles in all the groups.  (To let Gnus know which
19510 articles you want to download, @pxref{Agent Categories}).
19511
19512 @item
19513 After fetching the articles, you press @kbd{J j} to make Gnus become
19514 unplugged again, and you shut down the PPP thing (or whatever).  And
19515 then you read the news offline.
19516
19517 @item
19518 And then you go to step 2.
19519 @end itemize
19520
19521 Here are some things you should do the first time (or so) that you use
19522 the Agent.
19523
19524 @itemize @bullet
19525
19526 @item
19527 Decide which servers should be covered by the Agent.  If you have a mail
19528 back end, it would probably be nonsensical to have it covered by the
19529 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
19530 @kbd{J a} on the server (or servers) that you wish to have covered by the
19531 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
19532 added servers you do not wish to have covered by the Agent.  By default,
19533 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
19534 @code{gnus-secondary-select-methods} are agentized.
19535
19536 @item
19537 Decide on download policy.  It's fairly simple once you decide whether
19538 you are going to use agent categories, topic parameters, and/or group
19539 parameters to implement your policy.  If you're new to gnus, it
19540 is probably best to start with a category, @xref{Agent Categories}.
19541
19542 Both topic parameters (@pxref{Topic Parameters}) and agent categories
19543 (@pxref{Agent Categories}) provide for setting a policy that applies
19544 to multiple groups.  Which you use is entirely up to you.  Topic
19545 parameters do override categories so, if you mix the two, you'll have
19546 to take that into account.  If you have a few groups that deviate from
19547 your policy, you can use group parameters (@pxref{Group Parameters}) to
19548 configure them.
19549
19550 @item
19551 Uhm@dots{} that's it.
19552 @end itemize
19553
19554
19555 @node Agent Categories
19556 @subsection Agent Categories
19557
19558 One of the main reasons to integrate the news transport layer into the
19559 newsreader is to allow greater control over what articles to download.
19560 There's not much point in downloading huge amounts of articles, just to
19561 find out that you're not interested in reading any of them.  It's better
19562 to be somewhat more conservative in choosing what to download, and then
19563 mark the articles for downloading manually if it should turn out that
19564 you're interested in the articles anyway.
19565
19566 One of the more effective methods for controlling what is to be
19567 downloaded is to create a @dfn{category} and then assign some (or all)
19568 groups to this category.  Groups that do not belong in any other
19569 category belong to the @code{default} category.  Gnus has its own
19570 buffer for creating and managing categories.
19571
19572 If you prefer, you can also use group parameters (@pxref{Group
19573 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
19574 alternative approach to controlling the agent.  The only real
19575 difference is that categories are specific to the agent (so there is
19576 less to learn) while group and topic parameters include the kitchen
19577 sink.
19578
19579 Since you can set agent parameters in several different places we have
19580 a rule to decide which source to believe.  This rule specifies that
19581 the parameter sources are checked in the following order: group
19582 parameters, topic parameters, agent category, and finally customizable
19583 variables.  So you can mix all of these sources to produce a wide range
19584 of behavior, just don't blame me if you don't remember where you put
19585 your settings.
19586
19587 @menu
19588 * Category Syntax::             What a category looks like.
19589 * Category Buffer::             A buffer for maintaining categories.
19590 * Category Variables::          Customize'r'Us.
19591 @end menu
19592
19593
19594 @node Category Syntax
19595 @subsubsection Category Syntax
19596
19597 A category consists of a name, the list of groups belonging to the
19598 category, and a number of optional parameters that override the
19599 customizable variables.  The complete list of agent parameters are
19600 listed below.
19601
19602 @cindex Agent Parameters
19603 @table @code
19604 @item agent-groups
19605 The list of groups that are in this category.
19606
19607 @item agent-predicate
19608 A predicate which (generally) gives a rough outline of which articles
19609 are eligible for downloading; and
19610
19611 @item agent-score
19612 a score rule which (generally) gives you a finer granularity when
19613 deciding what articles to download.  (Note that this @dfn{download
19614 score} is not necessarily related to normal scores.)
19615
19616 @item agent-enable-expiration
19617 a boolean indicating whether the agent should expire old articles in
19618 this group.  Most groups should be expired to conserve disk space.  In
19619 fact, its probably safe to say that the gnus.* hierarchy contains the
19620 only groups that should not be expired.
19621
19622 @item agent-days-until-old
19623 an integer indicating the number of days that the agent should wait
19624 before deciding that a read article is safe to expire.
19625
19626 @item agent-low-score
19627 an integer that overrides the value of @code{gnus-agent-low-score}.
19628
19629 @item agent-high-score
19630 an integer that overrides the value of @code{gnus-agent-high-score}.
19631
19632 @item agent-short-article
19633 an integer that overrides the value of
19634 @code{gnus-agent-short-article}.
19635
19636 @item agent-long-article
19637 an integer that overrides the value of @code{gnus-agent-long-article}.
19638
19639 @item agent-enable-undownloaded-faces
19640 a symbol indicating whether the summary buffer should display
19641 undownloaded articles using the @code{gnus-summary-*-undownloaded-face}
19642 faces.  Any symbol other than @code{nil} will enable the use of
19643 undownloaded faces.
19644 @end table
19645
19646 The name of a category can not be changed once the category has been
19647 created.
19648
19649 Each category maintains a list of groups that are exclusive members of
19650 that category.  The exclusivity rule is automatically enforced, add a
19651 group to a new category and it is automatically removed from its old
19652 category.
19653
19654 A predicate in its simplest form can be a single predicate such as
19655 @code{true} or @code{false}.  These two will download every available
19656 article or nothing respectively.  In the case of these two special
19657 predicates an additional score rule is superfluous.
19658
19659 Predicates of @code{high} or @code{low} download articles in respect of
19660 their scores in relationship to @code{gnus-agent-high-score} and
19661 @code{gnus-agent-low-score} as described below.
19662
19663 To gain even finer control of what is to be regarded eligible for
19664 download a predicate can consist of a number of predicates with logical
19665 operators sprinkled in between.
19666
19667 Perhaps some examples are in order.
19668
19669 Here's a simple predicate.  (It's the default predicate, in fact, used
19670 for all groups that don't belong to any other category.)
19671
19672 @lisp
19673 short
19674 @end lisp
19675
19676 Quite simple, eh?  This predicate is true if and only if the article is
19677 short (for some value of ``short'').
19678
19679 Here's a more complex predicate:
19680
19681 @lisp
19682 (or high
19683     (and
19684      (not low)
19685      (not long)))
19686 @end lisp
19687
19688 This means that an article should be downloaded if it has a high score,
19689 or if the score is not low and the article is not long.  You get the
19690 drift.
19691
19692 The available logical operators are @code{or}, @code{and} and
19693 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
19694 @samp{|}, @code{&} and @code{!} instead.)
19695
19696 The following predicates are pre-defined, but if none of these fit what
19697 you want to do, you can write your own.
19698
19699 When evaluating each of these predicates, the named constant will be
19700 bound to the value determined by calling
19701 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
19702 example, gnus-agent-short-article will be bound to
19703 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
19704 means that you can specify a predicate in your category then tune that
19705 predicate to individual groups.
19706
19707 @table @code
19708 @item short
19709 True if the article is shorter than @code{gnus-agent-short-article}
19710 lines; default 100.
19711
19712 @item long
19713 True if the article is longer than @code{gnus-agent-long-article}
19714 lines; default 200.
19715
19716 @item low
19717 True if the article has a download score less than
19718 @code{gnus-agent-low-score}; default 0.
19719
19720 @item high
19721 True if the article has a download score greater than
19722 @code{gnus-agent-high-score}; default 0.
19723
19724 @item spam
19725 True if the Gnus Agent guesses that the article is spam.  The
19726 heuristics may change over time, but at present it just computes a
19727 checksum and sees whether articles match.
19728
19729 @item true
19730 Always true.
19731
19732 @item false
19733 Always false.
19734 @end table
19735
19736 If you want to create your own predicate function, here's what you have
19737 to know:  The functions are called with no parameters, but the
19738 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
19739 useful values.
19740
19741 For example, you could decide that you don't want to download articles
19742 that were posted more than a certain number of days ago (e.g. posted
19743 more than @code{gnus-agent-expire-days} ago) you might write a function
19744 something along the lines of the following:
19745
19746 @lisp
19747 (defun my-article-old-p ()
19748   "Say whether an article is old."
19749   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
19750      (- (time-to-days (current-time)) gnus-agent-expire-days)))
19751 @end lisp
19752
19753 with the predicate then defined as:
19754
19755 @lisp
19756 (not my-article-old-p)
19757 @end lisp
19758
19759 or you could append your predicate to the predefined
19760 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
19761 wherever.
19762
19763 @lisp
19764 (require 'gnus-agent)
19765 (setq  gnus-category-predicate-alist
19766   (append gnus-category-predicate-alist
19767          '((old . my-article-old-p))))
19768 @end lisp
19769
19770 and simply specify your predicate as:
19771
19772 @lisp
19773 (not old)
19774 @end lisp
19775
19776 If/when using something like the above, be aware that there are many
19777 misconfigured systems/mailers out there and so an article's date is not
19778 always a reliable indication of when it was posted.  Hell, some people
19779 just don't give a damn.
19780
19781 The above predicates apply to @emph{all} the groups which belong to the
19782 category.  However, if you wish to have a specific predicate for an
19783 individual group within a category, or you're just too lazy to set up a
19784 new category, you can enter a group's individual predicate in its group
19785 parameters like so:
19786
19787 @lisp
19788 (agent-predicate . short)
19789 @end lisp
19790
19791 This is the group/topic parameter equivalent of the agent category default.
19792 Note that when specifying a single word predicate like this, the
19793 @code{agent-predicate} specification must be in dotted pair notation.
19794
19795 The equivalent of the longer example from above would be:
19796
19797 @lisp
19798 (agent-predicate or high (and (not low) (not long)))
19799 @end lisp
19800
19801 The outer parenthesis required in the category specification are not
19802 entered here as, not being in dotted pair notation, the value of the
19803 predicate is assumed to be a list.
19804
19805
19806 Now, the syntax of the download score is the same as the syntax of
19807 normal score files, except that all elements that require actually
19808 seeing the article itself are verboten.  This means that only the
19809 following headers can be scored on: @code{Subject}, @code{From},
19810 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
19811 @code{Lines}, and @code{Xref}.
19812
19813 As with predicates, the specification of the @code{download score rule}
19814 to use in respect of a group can be in either the category definition if
19815 it's to be applicable to all groups in therein, or a group's parameters
19816 if it's to be specific to that group.
19817
19818 In both of these places the @code{download score rule} can take one of
19819 three forms:
19820
19821 @enumerate
19822 @item
19823 Score rule
19824
19825 This has the same syntax as a normal Gnus score file except only a
19826 subset of scoring keywords are available as mentioned above.
19827
19828 example:
19829
19830 @itemize @bullet
19831 @item
19832 Category specification
19833
19834 @lisp
19835 (("from"
19836        ("Lars Ingebrigtsen" 1000000 nil s))
19837 ("lines"
19838        (500 -100 nil <)))
19839 @end lisp
19840
19841 @item
19842 Group/Topic Parameter specification
19843
19844 @lisp
19845 (agent-score ("from"
19846                    ("Lars Ingebrigtsen" 1000000 nil s))
19847              ("lines"
19848                    (500 -100 nil <)))
19849 @end lisp
19850
19851 Again, note the omission of the outermost parenthesis here.
19852 @end itemize
19853
19854 @item
19855 Agent score file
19856
19857 These score files must @emph{only} contain the permitted scoring
19858 keywords stated above.
19859
19860 example:
19861
19862 @itemize @bullet
19863 @item
19864 Category specification
19865
19866 @lisp
19867 ("~/News/agent.SCORE")
19868 @end lisp
19869
19870 or perhaps
19871
19872 @lisp
19873 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
19874 @end lisp
19875
19876 @item
19877 Group Parameter specification
19878
19879 @lisp
19880 (agent-score "~/News/agent.SCORE")
19881 @end lisp
19882
19883 Additional score files can be specified as above.  Need I say anything
19884 about parenthesis?
19885 @end itemize
19886
19887 @item
19888 Use @code{normal} score files
19889
19890 If you don't want to maintain two sets of scoring rules for a group, and
19891 your desired @code{downloading} criteria for a group are the same as your
19892 @code{reading} criteria then you can tell the agent to refer to your
19893 @code{normal} score files when deciding what to download.
19894
19895 These directives in either the category definition or a group's
19896 parameters will cause the agent to read in all the applicable score
19897 files for a group, @emph{filtering out} those sections that do not
19898 relate to one of the permitted subset of scoring keywords.
19899
19900 @itemize @bullet
19901 @item
19902 Category Specification
19903
19904 @lisp
19905 file
19906 @end lisp
19907
19908 @item
19909 Group Parameter specification
19910
19911 @lisp
19912 (agent-score . file)
19913 @end lisp
19914 @end itemize
19915 @end enumerate
19916
19917 @node Category Buffer
19918 @subsubsection Category Buffer
19919
19920 You'd normally do all category maintenance from the category buffer.
19921 When you enter it for the first time (with the @kbd{J c} command from
19922 the group buffer), you'll only see the @code{default} category.
19923
19924 The following commands are available in this buffer:
19925
19926 @table @kbd
19927 @item q
19928 @kindex q (Category)
19929 @findex gnus-category-exit
19930 Return to the group buffer (@code{gnus-category-exit}).
19931
19932 @item e
19933 @kindex e (Category)
19934 @findex gnus-category-customize-category
19935 Use a customization buffer to set all of the selected category's
19936 parameters at one time (@code{gnus-category-customize-category}).
19937
19938 @item k
19939 @kindex k (Category)
19940 @findex gnus-category-kill
19941 Kill the current category (@code{gnus-category-kill}).
19942
19943 @item c
19944 @kindex c (Category)
19945 @findex gnus-category-copy
19946 Copy the current category (@code{gnus-category-copy}).
19947
19948 @item a
19949 @kindex a (Category)
19950 @findex gnus-category-add
19951 Add a new category (@code{gnus-category-add}).
19952
19953 @item p
19954 @kindex p (Category)
19955 @findex gnus-category-edit-predicate
19956 Edit the predicate of the current category
19957 (@code{gnus-category-edit-predicate}).
19958
19959 @item g
19960 @kindex g (Category)
19961 @findex gnus-category-edit-groups
19962 Edit the list of groups belonging to the current category
19963 (@code{gnus-category-edit-groups}).
19964
19965 @item s
19966 @kindex s (Category)
19967 @findex gnus-category-edit-score
19968 Edit the download score rule of the current category
19969 (@code{gnus-category-edit-score}).
19970
19971 @item l
19972 @kindex l (Category)
19973 @findex gnus-category-list
19974 List all the categories (@code{gnus-category-list}).
19975 @end table
19976
19977
19978 @node Category Variables
19979 @subsubsection Category Variables
19980
19981 @table @code
19982 @item gnus-category-mode-hook
19983 @vindex gnus-category-mode-hook
19984 Hook run in category buffers.
19985
19986 @item gnus-category-line-format
19987 @vindex gnus-category-line-format
19988 Format of the lines in the category buffer (@pxref{Formatting
19989 Variables}).  Valid elements are:
19990
19991 @table @samp
19992 @item c
19993 The name of the category.
19994
19995 @item g
19996 The number of groups in the category.
19997 @end table
19998
19999 @item gnus-category-mode-line-format
20000 @vindex gnus-category-mode-line-format
20001 Format of the category mode line (@pxref{Mode Line Formatting}).
20002
20003 @item gnus-agent-short-article
20004 @vindex gnus-agent-short-article
20005 Articles that have fewer lines than this are short.  Default 100.
20006
20007 @item gnus-agent-long-article
20008 @vindex gnus-agent-long-article
20009 Articles that have more lines than this are long.  Default 200.
20010
20011 @item gnus-agent-low-score
20012 @vindex gnus-agent-low-score
20013 Articles that have a score lower than this have a low score.  Default
20014 0.
20015
20016 @item gnus-agent-high-score
20017 @vindex gnus-agent-high-score
20018 Articles that have a score higher than this have a high score.  Default
20019 0.
20020
20021 @item gnus-agent-expire-days
20022 @vindex gnus-agent-expire-days
20023 The number of days that a @samp{read} article must stay in the agent's
20024 local disk before becoming eligible for expiration (While the name is
20025 the same, this doesn't mean expiring the article on the server.  It
20026 just means deleting the local copy of the article).  What is also
20027 important to understand is that the counter starts with the time the
20028 article was written to the local disk and not the time the article was
20029 read.
20030 Default 7.
20031
20032 @item gnus-agent-enable-expiration
20033 @vindex gnus-agent-enable-expiration
20034 Determines whether articles in a group are, by default, expired or
20035 retained indefinitely.  The default is @code{ENABLE} which means that
20036 you'll have to disable expiration when desired.  On the other hand,
20037 you could set this to @code{DISABLE}.  In that case, you would then
20038 have to enable expiration in selected groups.
20039
20040 @end table
20041
20042
20043 @node Agent Commands
20044 @subsection Agent Commands
20045 @findex gnus-agent-toggle-plugged
20046 @kindex J j (Agent)
20047
20048 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
20049 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
20050 toggles the plugged/unplugged state of the Gnus Agent.
20051
20052
20053 @menu
20054 * Group Agent Commands::        Configure groups and fetch their contents.
20055 * Summary Agent Commands::      Manually select then fetch specific articles.
20056 * Server Agent Commands::       Select the servers that are supported by the agent.
20057 @end menu
20058
20059
20060
20061
20062 @node Group Agent Commands
20063 @subsubsection Group Agent Commands
20064
20065 @table @kbd
20066 @item J u
20067 @kindex J u (Agent Group)
20068 @findex gnus-agent-fetch-groups
20069 Fetch all eligible articles in the current group
20070 (@code{gnus-agent-fetch-groups}).
20071
20072 @item J c
20073 @kindex J c (Agent Group)
20074 @findex gnus-enter-category-buffer
20075 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
20076
20077 @item J s
20078 @kindex J s (Agent Group)
20079 @findex gnus-agent-fetch-session
20080 Fetch all eligible articles in all groups
20081 (@code{gnus-agent-fetch-session}).
20082
20083 @item J S
20084 @kindex J S (Agent Group)
20085 @findex gnus-group-send-queue
20086 Send all sendable messages in the queue group
20087 (@code{gnus-group-send-queue}).  @xref{Drafts}.
20088
20089 @item J a
20090 @kindex J a (Agent Group)
20091 @findex gnus-agent-add-group
20092 Add the current group to an Agent category
20093 (@code{gnus-agent-add-group}).  This command understands the
20094 process/prefix convention (@pxref{Process/Prefix}).
20095
20096 @item J r
20097 @kindex J r (Agent Group)
20098 @findex gnus-agent-remove-group
20099 Remove the current group from its category, if any
20100 (@code{gnus-agent-remove-group}).  This command understands the
20101 process/prefix convention (@pxref{Process/Prefix}).
20102
20103 @item J Y
20104 @kindex J Y (Agent Group)
20105 @findex gnus-agent-synchronize-flags
20106 Synchronize flags changed while unplugged with remote server, if any.
20107
20108
20109 @end table
20110
20111
20112 @node Summary Agent Commands
20113 @subsubsection Summary Agent Commands
20114
20115 @table @kbd
20116 @item J #
20117 @kindex J # (Agent Summary)
20118 @findex gnus-agent-mark-article
20119 Mark the article for downloading (@code{gnus-agent-mark-article}).
20120
20121 @item J M-#
20122 @kindex J M-# (Agent Summary)
20123 @findex gnus-agent-unmark-article
20124 Remove the downloading mark from the article
20125 (@code{gnus-agent-unmark-article}).
20126
20127 @cindex %
20128 @item @@
20129 @kindex @@ (Agent Summary)
20130 @findex gnus-agent-toggle-mark
20131 Toggle whether to download the article
20132 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
20133 default.
20134
20135 @item J c
20136 @kindex J c (Agent Summary)
20137 @findex gnus-agent-catchup
20138 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
20139
20140 @item J S
20141 @kindex J S (Agent Summary)
20142 @findex gnus-agent-fetch-group
20143 Download all eligible (@pxref{Agent Categories}) articles in this group.
20144 (@code{gnus-agent-fetch-group}).
20145
20146 @item J s
20147 @kindex J s (Agent Summary)
20148 @findex gnus-agent-summary-fetch-series
20149 Download all processable articles in this group.
20150 (@code{gnus-agent-summary-fetch-series}).
20151
20152 @item J u
20153 @kindex J u (Agent Summary)
20154 @findex gnus-agent-summary-fetch-group
20155 Download all downloadable articles in the current group
20156 (@code{gnus-agent-summary-fetch-group}).
20157
20158 @end table
20159
20160
20161 @node Server Agent Commands
20162 @subsubsection Server Agent Commands
20163
20164 @table @kbd
20165 @item J a
20166 @kindex J a (Agent Server)
20167 @findex gnus-agent-add-server
20168 Add the current server to the list of servers covered by the Gnus Agent
20169 (@code{gnus-agent-add-server}).
20170
20171 @item J r
20172 @kindex J r (Agent Server)
20173 @findex gnus-agent-remove-server
20174 Remove the current server from the list of servers covered by the Gnus
20175 Agent (@code{gnus-agent-remove-server}).
20176
20177 @end table
20178
20179
20180 @node Agent Visuals
20181 @subsection Agent Visuals
20182
20183 If you open a summary while unplugged and, Gnus knows from the group's
20184 active range that there are more articles than the headers currently
20185 stored in the Agent, you may see some articles whose subject looks
20186 something like @samp{[Undownloaded article #####]}.  These are
20187 placeholders for the missing headers.  Aside from setting a mark,
20188 there is not much that can be done with one of these placeholders.
20189 When Gnus finally gets a chance to fetch the group's headers, the
20190 placeholders will automatically be replaced by the actual headers.
20191 You can configure the summary buffer's maneuvering to skip over the
20192 placeholders if you care (See @code{gnus-auto-goto-ignores}).
20193
20194 While it may be obvious to all, the only headers and articles
20195 available while unplugged are those headers and articles that were
20196 fetched into the Agent while previously plugged.  To put it another
20197 way, ``If you forget to fetch something while plugged, you might have a
20198 less than satisfying unplugged session''.  For this reason, the Agent
20199 adds two visual effects to your summary buffer.  These effects display
20200 the download status of each article so that you always know which
20201 articles will be available when unplugged.
20202
20203 The first visual effect is the @samp{%O} spec.  If you customize
20204 @code{gnus-summary-line-format} to include this specifier, you will add
20205 a single character field that indicates an article's download status.
20206 Articles that have been fetched into either the Agent or the Cache,
20207 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
20208 other articles will display @code{gnus-undownloaded-mark} (defaults to
20209 @samp{-}).  If you open a group that has not been agentized, a space
20210 (@samp{ }) will be displayed.
20211
20212 The second visual effect are the undownloaded faces.  The faces, there
20213 are three indicating the article's score (low, normal, high), seem to
20214 result in a love/hate response from many Gnus users.  The problem is
20215 that the face selection is controlled by a list of condition tests and
20216 face names (See @code{gnus-summary-highlight}).  Each condition is
20217 tested in the order in which it appears in the list so early
20218 conditions have precedence over later conditions.  All of this means
20219 that, if you tick an undownloaded article, the article will continue
20220 to be displayed in the undownloaded face rather than the ticked face.
20221
20222 If you use the Agent as a cache (to avoid downloading the same article
20223 each time you visit it or to minimize your connection time), the
20224 undownloaded face will probably seem like a good idea.  The reason
20225 being that you do all of our work (marking, reading, deleting) with
20226 downloaded articles so the normal faces always appear.  For those
20227 users using the agent to improve online performance by caching the NOV
20228 database (most users since 5.10.2), the undownloaded faces may appear
20229 to be an absolutely horrible idea.  The issue being that, since none
20230 of their articles have been fetched into the Agent, all of the
20231 normal faces will be obscured by the undownloaded faces.
20232
20233 If you would like to use the undownloaded faces, you must enable the
20234 undownloaded faces by setting the @code{agent-enable-undownloaded-faces}
20235 group parameter to @code{t}.  This parameter, like all other agent
20236 parameters, may be set on an Agent Category (@pxref{Agent Categories}),
20237 a Group Topic (@pxref{Topic Parameters}), or an individual group
20238 (@pxref{Group Parameters}).
20239
20240 The one problem common to all users using the agent is how quickly it
20241 can consume disk space.  If you using the agent on many groups, it is
20242 even more difficult to effectively recover disk space.  One solution
20243 is the @samp{%F} format available in @code{gnus-group-line-format}.
20244 This format will display the actual disk space used by articles
20245 fetched into both the agent and cache.  By knowing which groups use
20246 the most space, users know where to focus their efforts when ``agent
20247 expiring'' articles.
20248
20249 @node Agent as Cache
20250 @subsection Agent as Cache
20251
20252 When Gnus is plugged, it is not efficient to download headers or
20253 articles from the server again, if they are already stored in the
20254 Agent.  So, Gnus normally only downloads headers once, and stores them
20255 in the Agent.  These headers are later used when generating the summary
20256 buffer, regardless of whether you are plugged or unplugged.  Articles
20257 are not cached in the Agent by default though (that would potentially
20258 consume lots of disk space), but if you have already downloaded an
20259 article into the Agent, Gnus will not download the article from the
20260 server again but use the locally stored copy instead.
20261
20262 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
20263 @pxref{Agent Variables}) to always download headers and articles while
20264 plugged.  Gnus will almost certainly be slower, but it will be kept
20265 synchronized with the server.  That last point probably won't make any
20266 sense if you are using a nntp or nnimap back end.
20267
20268 @node Agent Expiry
20269 @subsection Agent Expiry
20270
20271 @vindex gnus-agent-expire-days
20272 @findex gnus-agent-expire
20273 @kindex M-x gnus-agent-expire
20274 @kindex M-x gnus-agent-expire-group
20275 @findex gnus-agent-expire-group
20276 @cindex agent expiry
20277 @cindex Gnus agent expiry
20278 @cindex expiry, in Gnus agent
20279
20280 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
20281 least it doesn't handle it like other back ends.  Instead, there are
20282 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
20283 commands that will expire all read articles that are older than
20284 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
20285 that you're running out of space.  Neither are particularly fast or
20286 efficient, and it's not a particularly good idea to interrupt them (with
20287 @kbd{C-g} or anything else) once you've started one of them.
20288
20289 Note that other functions, e.g. @code{gnus-request-expire-articles},
20290 might run @code{gnus-agent-expire} for you to keep the agent
20291 synchronized with the group.
20292
20293 The agent parameter @code{agent-enable-expiration} may be used to
20294 prevent expiration in selected groups.
20295
20296 @vindex gnus-agent-expire-all
20297 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
20298 expiration commands will expire all articles---unread, read, ticked
20299 and dormant.  If @code{nil} (which is the default), only read articles
20300 are eligible for expiry, and unread, ticked and dormant articles will
20301 be kept indefinitely.
20302
20303 If you find that some articles eligible for expiry are never expired,
20304 perhaps some Gnus Agent files are corrupted.  There's are special
20305 commands, @code{gnus-agent-regenerate} and
20306 @code{gnus-agent-regenerate-group}, to fix possible problems.
20307
20308 @node Agent Regeneration
20309 @subsection Agent Regeneration
20310
20311 @cindex agent regeneration
20312 @cindex Gnus agent regeneration
20313 @cindex regeneration
20314
20315 The local data structures used by @code{nnagent} may become corrupted
20316 due to certain exceptional conditions.  When this happens,
20317 @code{nnagent} functionality may degrade or even fail.  The solution
20318 to this problem is to repair the local data structures by removing all
20319 internal inconsistencies.
20320
20321 For example, if your connection to your server is lost while
20322 downloaded articles into the agent, the local data structures will not
20323 know about articles successfully downloaded prior to the connection
20324 failure.  Running @code{gnus-agent-regenerate} or
20325 @code{gnus-agent-regenerate-group} will update the data structures
20326 such that you don't need to download these articles a second time.
20327
20328 @findex gnus-agent-regenerate
20329 @kindex M-x gnus-agent-regenerate
20330 The command @code{gnus-agent-regenerate} will perform
20331 @code{gnus-agent-regenerate-group} on every agentized group.  While
20332 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
20333 recommended that you first close all summary buffers.
20334
20335 @findex gnus-agent-regenerate-group
20336 @kindex M-x gnus-agent-regenerate-group
20337 The command @code{gnus-agent-regenerate-group} uses the local copies
20338 of individual articles to repair the local @acronym{NOV}(header) database.  It
20339 then updates the internal data structures that document which articles
20340 are stored locally.  An optional argument will mark articles in the
20341 agent as unread.
20342
20343 @node Agent and flags
20344 @subsection Agent and flags
20345
20346 The Agent works with any Gnus back end including those, such as
20347 nnimap, that store flags (read, ticked, etc) on the server.  Sadly,
20348 the Agent does not actually know which backends keep their flags in
20349 the backend server rather than in @file{.newsrc}.  This means that the
20350 Agent, while unplugged or disconnected, will always record all changes
20351 to the flags in its own files.
20352
20353 When you plug back in, Gnus will then check to see if you have any
20354 changed any flags and ask if you wish to synchronize these with the
20355 server.  This behavior is customizable by @code{gnus-agent-synchronize-flags}.
20356
20357 @vindex gnus-agent-synchronize-flags
20358 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
20359 never automatically synchronize flags.  If it is @code{ask}, which is
20360 the default, the Agent will check if you made any changes and if so
20361 ask if you wish to synchronize these when you re-connect.  If it has
20362 any other value, all flags will be synchronized automatically.
20363
20364 If you do not wish to synchronize flags automatically when you
20365 re-connect, you can do it manually with the
20366 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
20367 in the group buffer.
20368
20369 Technical note: the synchronization algorithm does not work by ``pushing''
20370 all local flags to the server, but rather by incrementally updated the
20371 server view of flags by changing only those flags that were changed by
20372 the user.  Thus, if you set one flag on an article, quit the group then
20373 re-select the group and remove the flag; the flag will be set and
20374 removed from the server when you ``synchronize''.  The queued flag
20375 operations can be found in the per-server @code{flags} file in the Agent
20376 directory.  It's emptied when you synchronize flags.
20377
20378 @node Agent and IMAP
20379 @subsection Agent and IMAP
20380
20381 The Agent works with any Gnus back end, including nnimap.  However,
20382 since there are some conceptual differences between @acronym{NNTP} and
20383 @acronym{IMAP}, this section (should) provide you with some information to
20384 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
20385
20386 Some things are currently not implemented in the Agent that you'd might
20387 expect from a disconnected @acronym{IMAP} client, including:
20388
20389 @itemize @bullet
20390
20391 @item
20392 Copying/moving articles into nnimap groups when unplugged.
20393
20394 @item
20395 Creating/deleting nnimap groups when unplugged.
20396
20397 @end itemize
20398
20399 @node Outgoing Messages
20400 @subsection Outgoing Messages
20401
20402 By default, when Gnus is unplugged, all outgoing messages (both mail
20403 and news) are stored in the draft group ``queue'' (@pxref{Drafts}).
20404 You can view them there after posting, and edit them at will.
20405
20406 You can control the circumstances under which outgoing mail is queued
20407 (see @code{gnus-agent-queue-mail}, @pxref{Agent Variables}).  Outgoing
20408 news is always queued when Gnus is unplugged, and never otherwise.
20409
20410 You can send the messages either from the draft group with the special
20411 commands available there, or you can use the @kbd{J S} command in the
20412 group buffer to send all the sendable messages in the draft group.
20413 Posting news will only work when Gnus is plugged, but you can send
20414 mail at any time.
20415
20416 If sending mail while unplugged does not work for you and you worry
20417 about hitting @kbd{J S} by accident when unplugged, you can have Gnus
20418 ask you to confirm your action (see
20419 @code{gnus-agent-prompt-send-queue}, @pxref{Agent Variables}).
20420
20421 @node Agent Variables
20422 @subsection Agent Variables
20423
20424 @table @code
20425 @item gnus-agent
20426 @vindex gnus-agent
20427 Is the agent enabled?  The default is @code{t}.  When first enabled,
20428 the agent will use @code{gnus-agent-auto-agentize-methods} to
20429 automatically mark some back ends as agentized.  You may change which
20430 back ends are agentized using the agent commands in the server buffer.
20431
20432 To enter the server buffer, use the @kbd{^}
20433 (@code{gnus-group-enter-server-mode}) command in the group buffer.
20434
20435
20436 @item gnus-agent-directory
20437 @vindex gnus-agent-directory
20438 Where the Gnus Agent will store its files.  The default is
20439 @file{~/News/agent/}.
20440
20441 @item gnus-agent-handle-level
20442 @vindex gnus-agent-handle-level
20443 Groups on levels (@pxref{Group Levels}) higher than this variable will
20444 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
20445 which means that only subscribed group will be considered by the Agent
20446 by default.
20447
20448 @item gnus-agent-plugged-hook
20449 @vindex gnus-agent-plugged-hook
20450 Hook run when connecting to the network.
20451
20452 @item gnus-agent-unplugged-hook
20453 @vindex gnus-agent-unplugged-hook
20454 Hook run when disconnecting from the network.
20455
20456 @item gnus-agent-fetched-hook
20457 @vindex gnus-agent-fetched-hook
20458 Hook run when finished fetching articles.
20459
20460 @item gnus-agent-cache
20461 @vindex gnus-agent-cache
20462 Variable to control whether use the locally stored @acronym{NOV} and
20463 articles when plugged, e.g. essentially using the Agent as a cache.
20464 The default is non-@code{nil}, which means to use the Agent as a cache.
20465
20466 @item gnus-agent-go-online
20467 @vindex gnus-agent-go-online
20468 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
20469 automatically switch offline servers into online status.  If it is
20470 @code{ask}, the default, the Agent will ask if you wish to switch
20471 offline servers into online status when you re-connect.  If it has any
20472 other value, all offline servers will be automatically switched into
20473 online status.
20474
20475 @item gnus-agent-mark-unread-after-downloaded
20476 @vindex gnus-agent-mark-unread-after-downloaded
20477 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
20478 mark articles as unread after downloading.  This is usually a safe
20479 thing to do as the newly downloaded article has obviously not been
20480 read.  The default is @code{t}.
20481
20482 @item gnus-agent-synchronize-flags
20483 @vindex gnus-agent-synchronize-flags
20484 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
20485 never automatically synchronize flags.  If it is @code{ask}, which is
20486 the default, the Agent will check if you made any changes and if so
20487 ask if you wish to synchronize these when you re-connect.  If it has
20488 any other value, all flags will be synchronized automatically.
20489
20490 @item gnus-agent-consider-all-articles
20491 @vindex gnus-agent-consider-all-articles
20492 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
20493 agent will let the agent predicate decide whether articles need to be
20494 downloaded or not, for all articles.  When @code{nil}, the default,
20495 the agent will only let the predicate decide whether unread articles
20496 are downloaded or not.  If you enable this, you may also want to look
20497 into the agent expiry settings (@pxref{Category Variables}), so that
20498 the agent doesn't download articles which the agent will later expire,
20499 over and over again.
20500
20501 @item gnus-agent-max-fetch-size
20502 @vindex gnus-agent-max-fetch-size
20503 The agent fetches articles into a temporary buffer prior to parsing
20504 them into individual files.  To avoid exceeding the max. buffer size,
20505 the agent alternates between fetching and parsing until all articles
20506 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
20507 limit to control how often the cycling occurs.  A large value improves
20508 performance.  A small value minimizes the time lost should the
20509 connection be lost while fetching (You may need to run
20510 @code{gnus-agent-regenerate-group} to update the group's state.
20511 However, all articles parsed prior to loosing the connection will be
20512 available while unplugged).  The default is 10M so it is unusual to
20513 see any cycling.
20514
20515 @item gnus-server-unopen-status
20516 @vindex gnus-server-unopen-status
20517 Perhaps not an Agent variable, but closely related to the Agent, this
20518 variable says what will happen if Gnus cannot open a server.  If the
20519 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
20520 whether to deny the server or whether to unplug the agent.  If the
20521 Agent is disabled, Gnus always simply deny the server.  Other choices
20522 for this variable include @code{denied} and @code{offline} the latter
20523 is only valid if the Agent is used.
20524
20525 @item gnus-auto-goto-ignores
20526 @vindex gnus-auto-goto-ignores
20527 Another variable that isn't an Agent variable, yet so closely related
20528 that most will look for it here, this variable tells the summary
20529 buffer how to maneuver around undownloaded (only headers stored in the
20530 agent) and unfetched (neither article nor headers stored) articles.
20531
20532 The valid values are @code{nil} (maneuver to any article),
20533 @code{undownloaded} (maneuvering while unplugged ignores articles that
20534 have not been fetched), @code{always-undownloaded} (maneuvering always
20535 ignores articles that have not been fetched), @code{unfetched}
20536 (maneuvering ignores articles whose headers have not been fetched).
20537
20538 @item gnus-agent-queue-mail
20539 @vindex gnus-agent-queue-mail
20540 When @code{gnus-agent-queue-mail} is @code{always}, Gnus will always
20541 queue mail rather than sending it straight away.  When @code{t}, Gnus
20542 will queue mail when unplugged only.  When @code{nil}, never queue
20543 mail.  The default is @code{t}.
20544
20545 @item gnus-agent-prompt-send-queue
20546 @vindex gnus-agent-prompt-send-queue
20547 When @code{gnus-agent-prompt-send-queue} is non-@code{nil} Gnus will
20548 prompt you to confirm that you really wish to proceed if you hit
20549 @kbd{J S} while unplugged.  The default is @code{nil}.
20550
20551 @item gnus-agent-auto-agentize-methods
20552 @vindex gnus-agent-auto-agentize-methods
20553 If you have never used the Agent before (or more technically, if
20554 @file{~/News/agent/lib/servers} does not exist), Gnus will
20555 automatically agentize a few servers for you.  This variable control
20556 which back ends should be auto-agentized.  It is typically only useful
20557 to agentize remote back ends.  The auto-agentizing has the same effect
20558 as running @kbd{J a} on the servers (@pxref{Server Agent Commands}).
20559 If the file exist, you must manage the servers manually by adding or
20560 removing them, this variable is only applicable the first time you
20561 start Gnus.  The default is @samp{(nntp nnimap)}.
20562
20563 @end table
20564
20565
20566 @node Example Setup
20567 @subsection Example Setup
20568
20569 If you don't want to read this manual, and you have a fairly standard
20570 setup, you may be able to use something like the following as your
20571 @file{~/.gnus.el} file to get started.
20572
20573 @lisp
20574 ;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
20575 ;; @r{from your ISP's server.}
20576 (setq gnus-select-method '(nntp "news.your-isp.com"))
20577
20578 ;; @r{Define how Gnus is to read your mail.  We read mail from}
20579 ;; @r{your ISP's @acronym{POP} server.}
20580 (setq mail-sources '((pop :server "pop.your-isp.com")))
20581
20582 ;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
20583 (setq gnus-secondary-select-methods '((nnml "")))
20584
20585 ;; @r{Make Gnus into an offline newsreader.}
20586 ;; (gnus-agentize) ; @r{The obsolete setting.}
20587 ;; (setq gnus-agent t) ; @r{Now the default.}
20588 @end lisp
20589
20590 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
20591 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
20592 gnus}.
20593
20594 If this is the first time you've run Gnus, you will be subscribed
20595 automatically to a few default newsgroups.  You'll probably want to
20596 subscribe to more groups, and to do that, you have to query the
20597 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
20598 command.  This usually takes quite a while, but you only have to do it
20599 once.
20600
20601 After reading and parsing a while, you'll be presented with a list of
20602 groups.  Subscribe to the ones you want to read with the @kbd{u}
20603 command.  @kbd{l} to make all the killed groups disappear after you've
20604 subscribe to all the groups you want to read.  (@kbd{A k} will bring
20605 back all the killed groups.)
20606
20607 You can now read the groups at once, or you can download the articles
20608 with the @kbd{J s} command.  And then read the rest of this manual to
20609 find out which of the other gazillion things you want to customize.
20610
20611
20612 @node Batching Agents
20613 @subsection Batching Agents
20614 @findex gnus-agent-batch
20615
20616 Having the Gnus Agent fetch articles (and post whatever messages you've
20617 written) is quite easy once you've gotten things set up properly.  The
20618 following shell script will do everything that is necessary:
20619
20620 You can run a complete batch command from the command line with the
20621 following incantation:
20622
20623 @example
20624 #!/bin/sh
20625 emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-agent-batch >/dev/null 2>&1
20626 @end example
20627
20628
20629 @node Agent Caveats
20630 @subsection Agent Caveats
20631
20632 The Gnus Agent doesn't seem to work like most other offline
20633 newsreaders.  Here are some common questions that some imaginary people
20634 may ask:
20635
20636 @table @dfn
20637 @item If I read an article while plugged, do they get entered into the Agent?
20638
20639 @strong{No}.  If you want this behavior, add
20640 @code{gnus-agent-fetch-selected-article} to
20641 @code{gnus-select-article-hook}.
20642
20643 @item If I read an article while plugged, and the article already exists in
20644 the Agent, will it get downloaded once more?
20645
20646 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
20647
20648 @end table
20649
20650 In short, when Gnus is unplugged, it only looks into the locally stored
20651 articles; when it's plugged, it talks to your ISP and may also use the
20652 locally stored articles.
20653
20654
20655 @node Scoring
20656 @chapter Scoring
20657 @cindex scoring
20658
20659 Other people use @dfn{kill files}, but we here at Gnus Towers like
20660 scoring better than killing, so we'd rather switch than fight.  They do
20661 something completely different as well, so sit up straight and pay
20662 attention!
20663
20664 @vindex gnus-summary-mark-below
20665 All articles have a default score (@code{gnus-summary-default-score}),
20666 which is 0 by default.  This score may be raised or lowered either
20667 interactively or by score files.  Articles that have a score lower than
20668 @code{gnus-summary-mark-below} are marked as read.
20669
20670 Gnus will read any @dfn{score files} that apply to the current group
20671 before generating the summary buffer.
20672
20673 There are several commands in the summary buffer that insert score
20674 entries based on the current article.  You can, for instance, ask Gnus to
20675 lower or increase the score of all articles with a certain subject.
20676
20677 There are two sorts of scoring entries: Permanent and temporary.
20678 Temporary score entries are self-expiring entries.  Any entries that are
20679 temporary and have not been used for, say, a week, will be removed
20680 silently to help keep the sizes of the score files down.
20681
20682 @menu
20683 * Summary Score Commands::      Adding score entries for the current group.
20684 * Group Score Commands::        General score commands.
20685 * Score Variables::             Customize your scoring.  (My, what terminology).
20686 * Score File Format::           What a score file may contain.
20687 * Score File Editing::          You can edit score files by hand as well.
20688 * Adaptive Scoring::            Big Sister Gnus knows what you read.
20689 * Home Score File::             How to say where new score entries are to go.
20690 * Followups To Yourself::       Having Gnus notice when people answer you.
20691 * Scoring On Other Headers::    Scoring on non-standard headers.
20692 * Scoring Tips::                How to score effectively.
20693 * Reverse Scoring::             That problem child of old is not problem.
20694 * Global Score Files::          Earth-spanning, ear-splitting score files.
20695 * Kill Files::                  They are still here, but they can be ignored.
20696 * Converting Kill Files::       Translating kill files to score files.
20697 * Advanced Scoring::            Using logical expressions to build score rules.
20698 * Score Decays::                It can be useful to let scores wither away.
20699 @end menu
20700
20701
20702 @node Summary Score Commands
20703 @section Summary Score Commands
20704 @cindex score commands
20705
20706 The score commands that alter score entries do not actually modify real
20707 score files.  That would be too inefficient.  Gnus maintains a cache of
20708 previously loaded score files, one of which is considered the
20709 @dfn{current score file alist}.  The score commands simply insert
20710 entries into this list, and upon group exit, this list is saved.
20711
20712 The current score file is by default the group's local score file, even
20713 if no such score file actually exists.  To insert score commands into
20714 some other score file (e.g. @file{all.SCORE}), you must first make this
20715 score file the current one.
20716
20717 General score commands that don't actually change the score file:
20718
20719 @table @kbd
20720
20721 @item V s
20722 @kindex V s (Summary)
20723 @findex gnus-summary-set-score
20724 Set the score of the current article (@code{gnus-summary-set-score}).
20725
20726 @item V S
20727 @kindex V S (Summary)
20728 @findex gnus-summary-current-score
20729 Display the score of the current article
20730 (@code{gnus-summary-current-score}).
20731
20732 @item V t
20733 @kindex V t (Summary)
20734 @findex gnus-score-find-trace
20735 Display all score rules that have been used on the current article
20736 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
20737 may type @kbd{e} to edit score file corresponding to the score rule on
20738 current line and @kbd{f} to format (@code{gnus-score-pretty-print}) the
20739 score file and edit it.
20740
20741 @item V w
20742 @kindex V w (Summary)
20743 @findex gnus-score-find-favourite-words
20744 List words used in scoring (@code{gnus-score-find-favourite-words}).
20745
20746 @item V R
20747 @kindex V R (Summary)
20748 @findex gnus-summary-rescore
20749 Run the current summary through the scoring process
20750 (@code{gnus-summary-rescore}).  This might be useful if you're playing
20751 around with your score files behind Gnus' back and want to see the
20752 effect you're having.
20753
20754 @item V c
20755 @kindex V c (Summary)
20756 @findex gnus-score-change-score-file
20757 Make a different score file the current
20758 (@code{gnus-score-change-score-file}).
20759
20760 @item V e
20761 @kindex V e (Summary)
20762 @findex gnus-score-edit-current-scores
20763 Edit the current score file (@code{gnus-score-edit-current-scores}).
20764 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
20765 File Editing}).
20766
20767 @item V f
20768 @kindex V f (Summary)
20769 @findex gnus-score-edit-file
20770 Edit a score file and make this score file the current one
20771 (@code{gnus-score-edit-file}).
20772
20773 @item V F
20774 @kindex V F (Summary)
20775 @findex gnus-score-flush-cache
20776 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
20777 after editing score files.
20778
20779 @item V C
20780 @kindex V C (Summary)
20781 @findex gnus-score-customize
20782 Customize a score file in a visually pleasing manner
20783 (@code{gnus-score-customize}).
20784
20785 @end table
20786
20787 The rest of these commands modify the local score file.
20788
20789 @table @kbd
20790
20791 @item V m
20792 @kindex V m (Summary)
20793 @findex gnus-score-set-mark-below
20794 Prompt for a score, and mark all articles with a score below this as
20795 read (@code{gnus-score-set-mark-below}).
20796
20797 @item V x
20798 @kindex V x (Summary)
20799 @findex gnus-score-set-expunge-below
20800 Prompt for a score, and add a score rule to the current score file to
20801 expunge all articles below this score
20802 (@code{gnus-score-set-expunge-below}).
20803 @end table
20804
20805 The keystrokes for actually making score entries follow a very regular
20806 pattern, so there's no need to list all the commands.  (Hundreds of
20807 them.)
20808
20809 @findex gnus-summary-increase-score
20810 @findex gnus-summary-lower-score
20811
20812 @enumerate
20813 @item
20814 The first key is either @kbd{I} (upper case i) for increasing the score
20815 or @kbd{L} for lowering the score.
20816 @item
20817 The second key says what header you want to score on.  The following
20818 keys are available:
20819 @table @kbd
20820
20821 @item a
20822 Score on the author name.
20823
20824 @item s
20825 Score on the subject line.
20826
20827 @item x
20828 Score on the @code{Xref} line---i.e., the cross-posting line.
20829
20830 @item r
20831 Score on the @code{References} line.
20832
20833 @item d
20834 Score on the date.
20835
20836 @item l
20837 Score on the number of lines.
20838
20839 @item i
20840 Score on the @code{Message-ID} header.
20841
20842 @item e
20843 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
20844 if your @acronym{NNTP} server tracks additional header data in overviews.
20845
20846 @item f
20847 Score on followups---this matches the author name, and adds scores to
20848 the followups to this author.  (Using this key leads to the creation of
20849 @file{ADAPT} files.)
20850
20851 @item b
20852 Score on the body.
20853
20854 @item h
20855 Score on the head.
20856
20857 @item t
20858 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
20859 files.)
20860
20861 @end table
20862
20863 @item
20864 The third key is the match type.  Which match types are valid depends on
20865 what headers you are scoring on.
20866
20867 @table @code
20868
20869 @item strings
20870
20871 @table @kbd
20872
20873 @item e
20874 Exact matching.
20875
20876 @item s
20877 Substring matching.
20878
20879 @item f
20880 Fuzzy matching (@pxref{Fuzzy Matching}).
20881
20882 @item r
20883 Regexp matching
20884 @end table
20885
20886 @item date
20887 @table @kbd
20888
20889 @item b
20890 Before date.
20891
20892 @item a
20893 After date.
20894
20895 @item n
20896 This date.
20897 @end table
20898
20899 @item number
20900 @table @kbd
20901
20902 @item <
20903 Less than number.
20904
20905 @item =
20906 Equal to number.
20907
20908 @item >
20909 Greater than number.
20910 @end table
20911 @end table
20912
20913 @item
20914 The fourth and usually final key says whether this is a temporary (i.e.,
20915 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
20916 or whether it is to be done immediately, without adding to the score
20917 file.
20918 @table @kbd
20919
20920 @item t
20921 Temporary score entry.
20922
20923 @item p
20924 Permanent score entry.
20925
20926 @item i
20927 Immediately scoring.
20928 @end table
20929
20930 @item
20931 If you are scoring on `e' (extra) headers, you will then be prompted for
20932 the header name on which you wish to score.  This must be a header named
20933 in gnus-extra-headers, and @samp{TAB} completion is available.
20934
20935 @end enumerate
20936
20937 So, let's say you want to increase the score on the current author with
20938 exact matching permanently: @kbd{I a e p}.  If you want to lower the
20939 score based on the subject line, using substring matching, and make a
20940 temporary score entry: @kbd{L s s t}.  Pretty easy.
20941
20942 To make things a bit more complicated, there are shortcuts.  If you use
20943 a capital letter on either the second or third keys, Gnus will use
20944 defaults for the remaining one or two keystrokes.  The defaults are
20945 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
20946 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
20947
20948 These functions take both the numerical prefix and the symbolic prefix
20949 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
20950 (or increase) the score of the article.  A symbolic prefix of @code{a}
20951 says to use the @file{all.SCORE} file for the command instead of the
20952 current score file.
20953
20954 @vindex gnus-score-mimic-keymap
20955 The @code{gnus-score-mimic-keymap} says whether these commands will
20956 pretend they are keymaps or not.
20957
20958
20959 @node Group Score Commands
20960 @section Group Score Commands
20961 @cindex group score commands
20962
20963 There aren't many of these as yet, I'm afraid.
20964
20965 @table @kbd
20966
20967 @item W e
20968 @kindex W e (Group)
20969 @findex gnus-score-edit-all-score
20970 Edit the apply-to-all-groups all.SCORE file.  You will be popped into
20971 a @code{gnus-score-mode} buffer (@pxref{Score File Editing}).
20972
20973 @item W f
20974 @kindex W f (Group)
20975 @findex gnus-score-flush-cache
20976 Gnus maintains a cache of score alists to avoid having to reload them
20977 all the time.  This command will flush the cache
20978 (@code{gnus-score-flush-cache}).
20979
20980 @end table
20981
20982 You can do scoring from the command line by saying something like:
20983
20984 @findex gnus-batch-score
20985 @cindex batch scoring
20986 @example
20987 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
20988 @end example
20989
20990
20991 @node Score Variables
20992 @section Score Variables
20993 @cindex score variables
20994
20995 @table @code
20996
20997 @item gnus-use-scoring
20998 @vindex gnus-use-scoring
20999 If @code{nil}, Gnus will not check for score files, and will not, in
21000 general, do any score-related work.  This is @code{t} by default.
21001
21002 @item gnus-kill-killed
21003 @vindex gnus-kill-killed
21004 If this variable is @code{nil}, Gnus will never apply score files to
21005 articles that have already been through the kill process.  While this
21006 may save you lots of time, it also means that if you apply a kill file
21007 to a group, and then change the kill file and want to run it over you
21008 group again to kill more articles, it won't work.  You have to set this
21009 variable to @code{t} to do that.  (It is @code{t} by default.)
21010
21011 @item gnus-kill-files-directory
21012 @vindex gnus-kill-files-directory
21013 All kill and score files will be stored in this directory, which is
21014 initialized from the @env{SAVEDIR} environment variable by default.
21015 This is @file{~/News/} by default.
21016
21017 @item gnus-score-file-suffix
21018 @vindex gnus-score-file-suffix
21019 Suffix to add to the group name to arrive at the score file name
21020 (@file{SCORE} by default.)
21021
21022 @item gnus-score-uncacheable-files
21023 @vindex gnus-score-uncacheable-files
21024 @cindex score cache
21025 All score files are normally cached to avoid excessive re-loading of
21026 score files.  However, this might make your Emacs grow big and
21027 bloated, so this regexp can be used to weed out score files unlikely
21028 to be needed again.  It would be a bad idea to deny caching of
21029 @file{all.SCORE}, while it might be a good idea to not cache
21030 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
21031 variable is @samp{ADAPT$} by default, so no adaptive score files will
21032 be cached.
21033
21034 @item gnus-save-score
21035 @vindex gnus-save-score
21036 If you have really complicated score files, and do lots of batch
21037 scoring, then you might set this variable to @code{t}.  This will make
21038 Gnus save the scores into the @file{.newsrc.eld} file.
21039
21040 If you do not set this to @code{t}, then manual scores (like those set
21041 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
21042 across group visits.
21043
21044 @item gnus-score-interactive-default-score
21045 @vindex gnus-score-interactive-default-score
21046 Score used by all the interactive raise/lower commands to raise/lower
21047 score with.  Default is 1000, which may seem excessive, but this is to
21048 ensure that the adaptive scoring scheme gets enough room to play with.
21049 We don't want the small changes from the adaptive scoring to overwrite
21050 manually entered data.
21051
21052 @item gnus-summary-default-score
21053 @vindex gnus-summary-default-score
21054 Default score of an article, which is 0 by default.
21055
21056 @item gnus-summary-expunge-below
21057 @vindex gnus-summary-expunge-below
21058 Don't display the summary lines of articles that have scores lower than
21059 this variable.  This is @code{nil} by default, which means that no
21060 articles will be hidden.  This variable is local to the summary buffers,
21061 and has to be set from @code{gnus-summary-mode-hook}.
21062
21063 @item gnus-score-over-mark
21064 @vindex gnus-score-over-mark
21065 Mark (in the third column) used for articles with a score over the
21066 default.  Default is @samp{+}.
21067
21068 @item gnus-score-below-mark
21069 @vindex gnus-score-below-mark
21070 Mark (in the third column) used for articles with a score below the
21071 default.  Default is @samp{-}.
21072
21073 @item gnus-score-find-score-files-function
21074 @vindex gnus-score-find-score-files-function
21075 Function used to find score files for the current group.  This function
21076 is called with the name of the group as the argument.
21077
21078 Predefined functions available are:
21079 @table @code
21080
21081 @item gnus-score-find-single
21082 @findex gnus-score-find-single
21083 Only apply the group's own score file.
21084
21085 @item gnus-score-find-bnews
21086 @findex gnus-score-find-bnews
21087 Apply all score files that match, using bnews syntax.  This is the
21088 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
21089 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
21090 @file{gnu.all.SCORE} would all apply.  In short, the instances of
21091 @samp{all} in the score file names are translated into @samp{.*}, and
21092 then a regexp match is done.
21093
21094 This means that if you have some score entries that you want to apply to
21095 all groups, then you put those entries in the @file{all.SCORE} file.
21096
21097 The score files are applied in a semi-random order, although Gnus will
21098 try to apply the more general score files before the more specific score
21099 files.  It does this by looking at the number of elements in the score
21100 file names---discarding the @samp{all} elements.
21101
21102 @item gnus-score-find-hierarchical
21103 @findex gnus-score-find-hierarchical
21104 Apply all score files from all the parent groups.  This means that you
21105 can't have score files like @file{all.SCORE}, but you can have
21106 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
21107 server.
21108
21109 @end table
21110 This variable can also be a list of functions.  In that case, all
21111 these functions will be called with the group name as argument, and
21112 all the returned lists of score files will be applied.  These
21113 functions can also return lists of lists of score alists directly.  In
21114 that case, the functions that return these non-file score alists
21115 should probably be placed before the ``real'' score file functions, to
21116 ensure that the last score file returned is the local score file.
21117 Phu.
21118
21119 For example, to do hierarchical scoring but use a non-server-specific
21120 overall score file, you could use the value
21121 @example
21122 (list (lambda (group) ("all.SCORE"))
21123       'gnus-score-find-hierarchical)
21124 @end example
21125
21126 @item gnus-score-expiry-days
21127 @vindex gnus-score-expiry-days
21128 This variable says how many days should pass before an unused score file
21129 entry is expired.  If this variable is @code{nil}, no score file entries
21130 are expired.  It's 7 by default.
21131
21132 @item gnus-update-score-entry-dates
21133 @vindex gnus-update-score-entry-dates
21134 If this variable is non-@code{nil}, temporary score entries that have
21135 been triggered (matched) will have their dates updated.  (This is how Gnus
21136 controls expiry---all non-matched-entries will become too old while
21137 matched entries will stay fresh and young.)  However, if you set this
21138 variable to @code{nil}, even matched entries will grow old and will
21139 have to face that oh-so grim reaper.
21140
21141 @item gnus-score-after-write-file-function
21142 @vindex gnus-score-after-write-file-function
21143 Function called with the name of the score file just written.
21144
21145 @item gnus-score-thread-simplify
21146 @vindex gnus-score-thread-simplify
21147 If this variable is non-@code{nil}, article subjects will be
21148 simplified for subject scoring purposes in the same manner as with
21149 threading---according to the current value of
21150 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
21151 @code{substring} or @code{exact} matching, the match will also be
21152 simplified in this manner.
21153
21154 @end table
21155
21156
21157 @node Score File Format
21158 @section Score File Format
21159 @cindex score file format
21160
21161 A score file is an @code{emacs-lisp} file that normally contains just a
21162 single form.  Casual users are not expected to edit these files;
21163 everything can be changed from the summary buffer.
21164
21165 Anyway, if you'd like to dig into it yourself, here's an example:
21166
21167 @lisp
21168 (("from"
21169   ("Lars Ingebrigtsen" -10000)
21170   ("Per Abrahamsen")
21171   ("larsi\\|lmi" -50000 nil R))
21172  ("subject"
21173   ("Ding is Badd" nil 728373))
21174  ("xref"
21175   ("alt.politics" -1000 728372 s))
21176  ("lines"
21177   (2 -100 nil <))
21178  (mark 0)
21179  (expunge -1000)
21180  (mark-and-expunge -10)
21181  (read-only nil)
21182  (orphan -10)
21183  (adapt t)
21184  (files "/hom/larsi/News/gnu.SCORE")
21185  (exclude-files "all.SCORE")
21186  (local (gnus-newsgroup-auto-expire t)
21187         (gnus-summary-make-false-root empty))
21188  (eval (ding)))
21189 @end lisp
21190
21191 This example demonstrates most score file elements.  @xref{Advanced
21192 Scoring}, for a different approach.
21193
21194 Even though this looks much like Lisp code, nothing here is actually
21195 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
21196 has to be valid syntactically, if not semantically.
21197
21198 Six keys are supported by this alist:
21199
21200 @table @code
21201
21202 @item STRING
21203 If the key is a string, it is the name of the header to perform the
21204 match on.  Scoring can only be performed on these eight headers:
21205 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
21206 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
21207 these headers, there are three strings to tell Gnus to fetch the entire
21208 article and do the match on larger parts of the article: @code{Body}
21209 will perform the match on the body of the article, @code{Head} will
21210 perform the match on the head of the article, and @code{All} will
21211 perform the match on the entire article.  Note that using any of these
21212 last three keys will slow down group entry @emph{considerably}.  The
21213 final ``header'' you can score on is @code{Followup}.  These score
21214 entries will result in new score entries being added for all follow-ups
21215 to articles that matches these score entries.
21216
21217 Following this key is an arbitrary number of score entries, where each
21218 score entry has one to four elements.
21219 @enumerate
21220
21221 @item
21222 The first element is the @dfn{match element}.  On most headers this will
21223 be a string, but on the Lines and Chars headers, this must be an
21224 integer.
21225
21226 @item
21227 If the second element is present, it should be a number---the @dfn{score
21228 element}.  This number should be an integer in the neginf to posinf
21229 interval.  This number is added to the score of the article if the match
21230 is successful.  If this element is not present, the
21231 @code{gnus-score-interactive-default-score} number will be used
21232 instead.  This is 1000 by default.
21233
21234 @item
21235 If the third element is present, it should be a number---the @dfn{date
21236 element}.  This date says when the last time this score entry matched,
21237 which provides a mechanism for expiring the score entries.  It this
21238 element is not present, the score entry is permanent.  The date is
21239 represented by the number of days since December 31, 1 BCE.
21240
21241 @item
21242 If the fourth element is present, it should be a symbol---the @dfn{type
21243 element}.  This element specifies what function should be used to see
21244 whether this score entry matches the article.  What match types that can
21245 be used depends on what header you wish to perform the match on.
21246 @table @dfn
21247
21248 @item From, Subject, References, Xref, Message-ID
21249 For most header types, there are the @code{r} and @code{R} (regexp), as
21250 well as @code{s} and @code{S} (substring) types, and @code{e} and
21251 @code{E} (exact match), and @code{w} (word match) types.  If this
21252 element is not present, Gnus will assume that substring matching should
21253 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
21254 that the matches will be done in a case-sensitive manner.  All these
21255 one-letter types are really just abbreviations for the @code{regexp},
21256 @code{string}, @code{exact}, and @code{word} types, which you can use
21257 instead, if you feel like.
21258
21259 @item Extra
21260 Just as for the standard string overview headers, if you are using
21261 gnus-extra-headers, you can score on these headers' values.  In this
21262 case, there is a 5th element in the score entry, being the name of the
21263 header to be scored.  The following entry is useful in your
21264 @file{all.SCORE} file in case of spam attacks from a single origin
21265 host, if your @acronym{NNTP} server tracks @samp{NNTP-Posting-Host} in
21266 overviews:
21267
21268 @lisp
21269 ("111.222.333.444" -1000 nil s
21270  "NNTP-Posting-Host")
21271 @end lisp
21272
21273 @item Lines, Chars
21274 These two headers use different match types: @code{<}, @code{>},
21275 @code{=}, @code{>=} and @code{<=}.
21276
21277 These predicates are true if
21278
21279 @example
21280 (PREDICATE HEADER MATCH)
21281 @end example
21282
21283 evaluates to non-@code{nil}.  For instance, the advanced match
21284 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
21285 following form:
21286
21287 @lisp
21288 (< header-value 4)
21289 @end lisp
21290
21291 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
21292 the match, we get the score added if the article has less than 4 lines.
21293 (It's easy to get confused and think it's the other way around.  But
21294 it's not.  I think.)
21295
21296 When matching on @code{Lines}, be careful because some back ends (like
21297 @code{nndir}) do not generate @code{Lines} header, so every article ends
21298 up being marked as having 0 lines.  This can lead to strange results if
21299 you happen to lower score of the articles with few lines.
21300
21301 @item Date
21302 For the Date header we have three kinda silly match types:
21303 @code{before}, @code{at} and @code{after}.  I can't really imagine this
21304 ever being useful, but, like, it would feel kinda silly not to provide
21305 this function.  Just in case.  You never know.  Better safe than sorry.
21306 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
21307 sex on a first date.  (I have been told that at least one person, and I
21308 quote, ``found this function indispensable'', however.)
21309
21310 @cindex ISO8601
21311 @cindex date
21312 A more useful match type is @code{regexp}.  With it, you can match the
21313 date string using a regular expression.  The date is normalized to
21314 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
21315 you want to match all articles that have been posted on April 1st in
21316 every year, you could use @samp{....0401.........} as a match string,
21317 for instance.  (Note that the date is kept in its original time zone, so
21318 this will match articles that were posted when it was April 1st where
21319 the article was posted from.  Time zones are such wholesome fun for the
21320 whole family, eh?)
21321
21322 @item Head, Body, All
21323 These three match keys use the same match types as the @code{From} (etc)
21324 header uses.
21325
21326 @item Followup
21327 This match key is somewhat special, in that it will match the
21328 @code{From} header, and affect the score of not only the matching
21329 articles, but also all followups to the matching articles.  This allows
21330 you e.g. increase the score of followups to your own articles, or
21331 decrease the score of followups to the articles of some known
21332 trouble-maker.  Uses the same match types as the @code{From} header
21333 uses.  (Using this match key will lead to creation of @file{ADAPT}
21334 files.)
21335
21336 @item Thread
21337 This match key works along the same lines as the @code{Followup} match
21338 key.  If you say that you want to score on a (sub-)thread started by an
21339 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
21340 match.  This will add a new @samp{thread} match for each article that
21341 has @var{x} in its @code{References} header.  (These new @samp{thread}
21342 matches will use the @code{Message-ID}s of these matching articles.)
21343 This will ensure that you can raise/lower the score of an entire thread,
21344 even though some articles in the thread may not have complete
21345 @code{References} headers.  Note that using this may lead to
21346 undeterministic scores of the articles in the thread.  (Using this match
21347 key will lead to creation of @file{ADAPT} files.)
21348 @end table
21349 @end enumerate
21350
21351 @cindex score file atoms
21352 @item mark
21353 The value of this entry should be a number.  Any articles with a score
21354 lower than this number will be marked as read.
21355
21356 @item expunge
21357 The value of this entry should be a number.  Any articles with a score
21358 lower than this number will be removed from the summary buffer.
21359
21360 @item mark-and-expunge
21361 The value of this entry should be a number.  Any articles with a score
21362 lower than this number will be marked as read and removed from the
21363 summary buffer.
21364
21365 @item thread-mark-and-expunge
21366 The value of this entry should be a number.  All articles that belong to
21367 a thread that has a total score below this number will be marked as read
21368 and removed from the summary buffer.  @code{gnus-thread-score-function}
21369 says how to compute the total score for a thread.
21370
21371 @item files
21372 The value of this entry should be any number of file names.  These files
21373 are assumed to be score files as well, and will be loaded the same way
21374 this one was.
21375
21376 @item exclude-files
21377 The clue of this entry should be any number of files.  These files will
21378 not be loaded, even though they would normally be so, for some reason or
21379 other.
21380
21381 @item eval
21382 The value of this entry will be @code{eval}ed.  This element will be
21383 ignored when handling global score files.
21384
21385 @item read-only
21386 Read-only score files will not be updated or saved.  Global score files
21387 should feature this atom (@pxref{Global Score Files}).  (Note:
21388 @dfn{Global} here really means @dfn{global}; not your personal
21389 apply-to-all-groups score files.)
21390
21391 @item orphan
21392 The value of this entry should be a number.  Articles that do not have
21393 parents will get this number added to their scores.  Imagine you follow
21394 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
21395 will only follow a few of the threads, also want to see any new threads.
21396
21397 You can do this with the following two score file entries:
21398
21399 @example
21400         (orphan -500)
21401         (mark-and-expunge -100)
21402 @end example
21403
21404 When you enter the group the first time, you will only see the new
21405 threads.  You then raise the score of the threads that you find
21406 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{c y}) the
21407 rest.  Next time you enter the group, you will see new articles in the
21408 interesting threads, plus any new threads.
21409
21410 I.e.---the orphan score atom is for high-volume groups where a few
21411 interesting threads which can't be found automatically by ordinary
21412 scoring rules exist.
21413
21414 @item adapt
21415 This entry controls the adaptive scoring.  If it is @code{t}, the
21416 default adaptive scoring rules will be used.  If it is @code{ignore}, no
21417 adaptive scoring will be performed on this group.  If it is a list, this
21418 list will be used as the adaptive scoring rules.  If it isn't present,
21419 or is something other than @code{t} or @code{ignore}, the default
21420 adaptive scoring rules will be used.  If you want to use adaptive
21421 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
21422 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
21423 not want adaptive scoring.  If you only want adaptive scoring in a few
21424 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
21425 insert @code{(adapt t)} in the score files of the groups where you want
21426 it.
21427
21428 @item adapt-file
21429 All adaptive score entries will go to the file named by this entry.  It
21430 will also be applied when entering the group.  This atom might be handy
21431 if you want to adapt on several groups at once, using the same adaptive
21432 file for a number of groups.
21433
21434 @item local
21435 @cindex local variables
21436 The value of this entry should be a list of @code{(@var{var}
21437 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
21438 current summary buffer, and set to the value specified.  This is a
21439 convenient, if somewhat strange, way of setting variables in some
21440 groups if you don't like hooks much.  Note that the @var{value} won't
21441 be evaluated.
21442 @end table
21443
21444
21445 @node Score File Editing
21446 @section Score File Editing
21447
21448 You normally enter all scoring commands from the summary buffer, but you
21449 might feel the urge to edit them by hand as well, so we've supplied you
21450 with a mode for that.
21451
21452 It's simply a slightly customized @code{emacs-lisp} mode, with these
21453 additional commands:
21454
21455 @table @kbd
21456
21457 @item C-c C-c
21458 @kindex C-c C-c (Score)
21459 @findex gnus-score-edit-exit
21460 Save the changes you have made and return to the summary buffer
21461 (@code{gnus-score-edit-exit}).
21462
21463 @item C-c C-d
21464 @kindex C-c C-d (Score)
21465 @findex gnus-score-edit-insert-date
21466 Insert the current date in numerical format
21467 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
21468 you were wondering.
21469
21470 @item C-c C-p
21471 @kindex C-c C-p (Score)
21472 @findex gnus-score-pretty-print
21473 The adaptive score files are saved in an unformatted fashion.  If you
21474 intend to read one of these files, you want to @dfn{pretty print} it
21475 first.  This command (@code{gnus-score-pretty-print}) does that for
21476 you.
21477
21478 @end table
21479
21480 Type @kbd{M-x gnus-score-mode} to use this mode.
21481
21482 @vindex gnus-score-mode-hook
21483 @code{gnus-score-menu-hook} is run in score mode buffers.
21484
21485 In the summary buffer you can use commands like @kbd{V f}, @kbd{V e} and
21486 @kbd{V t} to begin editing score files.
21487
21488
21489 @node Adaptive Scoring
21490 @section Adaptive Scoring
21491 @cindex adaptive scoring
21492
21493 If all this scoring is getting you down, Gnus has a way of making it all
21494 happen automatically---as if by magic.  Or rather, as if by artificial
21495 stupidity, to be precise.
21496
21497 @vindex gnus-use-adaptive-scoring
21498 When you read an article, or mark an article as read, or kill an
21499 article, you leave marks behind.  On exit from the group, Gnus can sniff
21500 these marks and add score elements depending on what marks it finds.
21501 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
21502 @code{t} or @code{(line)}.  If you want score adaptively on separate
21503 words appearing in the subjects, you should set this variable to
21504 @code{(word)}.  If you want to use both adaptive methods, set this
21505 variable to @code{(word line)}.
21506
21507 @vindex gnus-default-adaptive-score-alist
21508 To give you complete control over the scoring process, you can customize
21509 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
21510 might look something like this:
21511
21512 @lisp
21513 (setq gnus-default-adaptive-score-alist
21514   '((gnus-unread-mark)
21515     (gnus-ticked-mark (from 4))
21516     (gnus-dormant-mark (from 5))
21517     (gnus-del-mark (from -4) (subject -1))
21518     (gnus-read-mark (from 4) (subject 2))
21519     (gnus-expirable-mark (from -1) (subject -1))
21520     (gnus-killed-mark (from -1) (subject -3))
21521     (gnus-kill-file-mark)
21522     (gnus-ancient-mark)
21523     (gnus-low-score-mark)
21524     (gnus-catchup-mark (from -1) (subject -1))))
21525 @end lisp
21526
21527 As you see, each element in this alist has a mark as a key (either a
21528 variable name or a ``real'' mark---a character).  Following this key is
21529 a arbitrary number of header/score pairs.  If there are no header/score
21530 pairs following the key, no adaptive scoring will be done on articles
21531 that have that key as the article mark.  For instance, articles with
21532 @code{gnus-unread-mark} in the example above will not get adaptive score
21533 entries.
21534
21535 Each article can have only one mark, so just a single of these rules
21536 will be applied to each article.
21537
21538 To take @code{gnus-del-mark} as an example---this alist says that all
21539 articles that have that mark (i.e., are marked with @samp{e}) will have a
21540 score entry added to lower based on the @code{From} header by -4, and
21541 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
21542
21543 If you have marked 10 articles with the same subject with
21544 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
21545 That means that that subject will get a score of ten times -1, which
21546 should be, unless I'm much mistaken, -10.
21547
21548 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
21549 the read articles will be marked with the @samp{E} mark.  This'll
21550 probably make adaptive scoring slightly impossible, so auto-expiring and
21551 adaptive scoring doesn't really mix very well.
21552
21553 The headers you can score on are @code{from}, @code{subject},
21554 @code{message-id}, @code{references}, @code{xref}, @code{lines},
21555 @code{chars} and @code{date}.  In addition, you can score on
21556 @code{followup}, which will create an adaptive score entry that matches
21557 on the @code{References} header using the @code{Message-ID} of the
21558 current article, thereby matching the following thread.
21559
21560 If you use this scheme, you should set the score file atom @code{mark}
21561 to something small---like -300, perhaps, to avoid having small random
21562 changes result in articles getting marked as read.
21563
21564 After using adaptive scoring for a week or so, Gnus should start to
21565 become properly trained and enhance the authors you like best, and kill
21566 the authors you like least, without you having to say so explicitly.
21567
21568 You can control what groups the adaptive scoring is to be performed on
21569 by using the score files (@pxref{Score File Format}).  This will also
21570 let you use different rules in different groups.
21571
21572 @vindex gnus-adaptive-file-suffix
21573 The adaptive score entries will be put into a file where the name is the
21574 group name with @code{gnus-adaptive-file-suffix} appended.  The default
21575 is @file{ADAPT}.
21576
21577 @vindex gnus-adaptive-pretty-print
21578 Adaptive score files can get huge and are not meant to be edited by
21579 human hands.  If @code{gnus-adaptive-pretty-print} is @code{nil} (the
21580 default) those files will not be written in a human readable way.
21581
21582 @vindex gnus-score-exact-adapt-limit
21583 When doing adaptive scoring, substring or fuzzy matching would probably
21584 give you the best results in most cases.  However, if the header one
21585 matches is short, the possibility for false positives is great, so if
21586 the length of the match is less than
21587 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
21588 this variable is @code{nil}, exact matching will always be used to avoid
21589 this problem.
21590
21591 @vindex gnus-default-adaptive-word-score-alist
21592 As mentioned above, you can adapt either on individual words or entire
21593 headers.  If you adapt on words, the
21594 @code{gnus-default-adaptive-word-score-alist} variable says what score
21595 each instance of a word should add given a mark.
21596
21597 @lisp
21598 (setq gnus-default-adaptive-word-score-alist
21599       `((,gnus-read-mark . 30)
21600         (,gnus-catchup-mark . -10)
21601         (,gnus-killed-mark . -20)
21602         (,gnus-del-mark . -15)))
21603 @end lisp
21604
21605 This is the default value.  If you have adaption on words enabled, every
21606 word that appears in subjects of articles marked with
21607 @code{gnus-read-mark} will result in a score rule that increase the
21608 score with 30 points.
21609
21610 @vindex gnus-default-ignored-adaptive-words
21611 @vindex gnus-ignored-adaptive-words
21612 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
21613 will be ignored.  If you wish to add more words to be ignored, use the
21614 @code{gnus-ignored-adaptive-words} list instead.
21615
21616 @vindex gnus-adaptive-word-length-limit
21617 Some may feel that short words shouldn't count when doing adaptive
21618 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
21619 an integer.  Words shorter than this number will be ignored.  This
21620 variable defaults to @code{nil}.
21621
21622 @vindex gnus-adaptive-word-syntax-table
21623 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
21624 syntax table in effect.  It is similar to the standard syntax table, but
21625 it considers numbers to be non-word-constituent characters.
21626
21627 @vindex gnus-adaptive-word-minimum
21628 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
21629 word scoring process will never bring down the score of an article to
21630 below this number.  The default is @code{nil}.
21631
21632 @vindex gnus-adaptive-word-no-group-words
21633 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
21634 won't adaptively word score any of the words in the group name.  Useful
21635 for groups like @samp{comp.editors.emacs}, where most of the subject
21636 lines contain the word @samp{emacs}.
21637
21638 After using this scheme for a while, it might be nice to write a
21639 @code{gnus-psychoanalyze-user} command to go through the rules and see
21640 what words you like and what words you don't like.  Or perhaps not.
21641
21642 Note that the adaptive word scoring thing is highly experimental and is
21643 likely to change in the future.  Initial impressions seem to indicate
21644 that it's totally useless as it stands.  Some more work (involving more
21645 rigorous statistical methods) will have to be done to make this useful.
21646
21647
21648 @node Home Score File
21649 @section Home Score File
21650
21651 The score file where new score file entries will go is called the
21652 @dfn{home score file}.  This is normally (and by default) the score file
21653 for the group itself.  For instance, the home score file for
21654 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
21655
21656 However, this may not be what you want.  It is often convenient to share
21657 a common home score file among many groups---all @samp{emacs} groups
21658 could perhaps use the same home score file.
21659
21660 @vindex gnus-home-score-file
21661 The variable that controls this is @code{gnus-home-score-file}.  It can
21662 be:
21663
21664 @enumerate
21665 @item
21666 A string.  Then this file will be used as the home score file for all
21667 groups.
21668
21669 @item
21670 A function.  The result of this function will be used as the home score
21671 file.  The function will be called with the name of the group as the
21672 parameter.
21673
21674 @item
21675 A list.  The elements in this list can be:
21676
21677 @enumerate
21678 @item
21679 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
21680 group name, the @var{file-name} will be used as the home score file.
21681
21682 @item
21683 A function.  If the function returns non-@code{nil}, the result will
21684 be used as the home score file.  The function will be called with the
21685 name of the group as the parameter.
21686
21687 @item
21688 A string.  Use the string as the home score file.
21689 @end enumerate
21690
21691 The list will be traversed from the beginning towards the end looking
21692 for matches.
21693
21694 @end enumerate
21695
21696 So, if you want to use just a single score file, you could say:
21697
21698 @lisp
21699 (setq gnus-home-score-file
21700       "my-total-score-file.SCORE")
21701 @end lisp
21702
21703 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
21704 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
21705
21706 @findex gnus-hierarchial-home-score-file
21707 @lisp
21708 (setq gnus-home-score-file
21709       'gnus-hierarchial-home-score-file)
21710 @end lisp
21711
21712 This is a ready-made function provided for your convenience.
21713 Other functions include
21714
21715 @table @code
21716 @item gnus-current-home-score-file
21717 @findex gnus-current-home-score-file
21718 Return the ``current'' regular score file.  This will make scoring
21719 commands add entry to the ``innermost'' matching score file.
21720
21721 @end table
21722
21723 If you want to have one score file for the @samp{emacs} groups and
21724 another for the @samp{comp} groups, while letting all other groups use
21725 their own home score files:
21726
21727 @lisp
21728 (setq gnus-home-score-file
21729       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
21730       '(("\\.emacs" "emacs.SCORE")
21731         ;; @r{All the comp groups in one score file}
21732         ("^comp" "comp.SCORE")))
21733 @end lisp
21734
21735 @vindex gnus-home-adapt-file
21736 @code{gnus-home-adapt-file} works exactly the same way as
21737 @code{gnus-home-score-file}, but says what the home adaptive score file
21738 is instead.  All new adaptive file entries will go into the file
21739 specified by this variable, and the same syntax is allowed.
21740
21741 In addition to using @code{gnus-home-score-file} and
21742 @code{gnus-home-adapt-file}, you can also use group parameters
21743 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
21744 Parameters}) to achieve much the same.  Group and topic parameters take
21745 precedence over this variable.
21746
21747
21748 @node Followups To Yourself
21749 @section Followups To Yourself
21750
21751 Gnus offers two commands for picking out the @code{Message-ID} header in
21752 the current buffer.  Gnus will then add a score rule that scores using
21753 this @code{Message-ID} on the @code{References} header of other
21754 articles.  This will, in effect, increase the score of all articles that
21755 respond to the article in the current buffer.  Quite useful if you want
21756 to easily note when people answer what you've said.
21757
21758 @table @code
21759
21760 @item gnus-score-followup-article
21761 @findex gnus-score-followup-article
21762 This will add a score to articles that directly follow up your own
21763 article.
21764
21765 @item gnus-score-followup-thread
21766 @findex gnus-score-followup-thread
21767 This will add a score to all articles that appear in a thread ``below''
21768 your own article.
21769 @end table
21770
21771 @vindex message-sent-hook
21772 These two functions are both primarily meant to be used in hooks like
21773 @code{message-sent-hook}, like this:
21774 @lisp
21775 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
21776 @end lisp
21777
21778
21779 If you look closely at your own @code{Message-ID}, you'll notice that
21780 the first two or three characters are always the same.  Here's two of
21781 mine:
21782
21783 @example
21784 <x6u3u47icf.fsf@@eyesore.no>
21785 <x6sp9o7ibw.fsf@@eyesore.no>
21786 @end example
21787
21788 So ``my'' ident on this machine is @samp{x6}.  This can be
21789 exploited---the following rule will raise the score on all followups to
21790 myself:
21791
21792 @lisp
21793 ("references"
21794  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
21795   1000 nil r))
21796 @end lisp
21797
21798 Whether it's the first two or first three characters that are ``yours''
21799 is system-dependent.
21800
21801
21802 @node Scoring On Other Headers
21803 @section Scoring On Other Headers
21804 @cindex scoring on other headers
21805
21806 Gnus is quite fast when scoring the ``traditional''
21807 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
21808 other headers requires writing a @code{head} scoring rule, which means
21809 that Gnus has to request every single article from the back end to find
21810 matches.  This takes a long time in big groups.
21811
21812 @vindex gnus-inhibit-slow-scoring
21813 You can inhibit this slow scoring on headers or body by setting the
21814 variable @code{gnus-inhibit-slow-scoring}.  If
21815 @code{gnus-inhibit-slow-scoring} is regexp, slow scoring is inhibited if
21816 the group matches the regexp.  If it is t, slow scoring on it is
21817 inhibited for all groups.
21818
21819 Now, there's not much you can do about the slowness for news groups, but for
21820 mail groups, you have greater control.  In @ref{To From Newsgroups},
21821 it's explained in greater detail what this mechanism does, but here's
21822 a cookbook example for @code{nnml} on how to allow scoring on the
21823 @samp{To} and @samp{Cc} headers.
21824
21825 Put the following in your @file{~/.gnus.el} file.
21826
21827 @lisp
21828 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
21829       nnmail-extra-headers gnus-extra-headers)
21830 @end lisp
21831
21832 Restart Gnus and rebuild your @code{nnml} overview files with the
21833 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
21834 time if you have much mail.
21835
21836 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
21837 so: @kbd{I e s p To RET <your name> RET}.
21838
21839 See?  Simple.
21840
21841
21842 @node Scoring Tips
21843 @section Scoring Tips
21844 @cindex scoring tips
21845
21846 @table @dfn
21847
21848 @item Crossposts
21849 @cindex crossposts
21850 @cindex scoring crossposts
21851 If you want to lower the score of crossposts, the line to match on is
21852 the @code{Xref} header.
21853 @lisp
21854 ("xref" (" talk.politics.misc:" -1000))
21855 @end lisp
21856
21857 @item Multiple crossposts
21858 If you want to lower the score of articles that have been crossposted to
21859 more than, say, 3 groups:
21860 @lisp
21861 ("xref"
21862   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
21863    -1000 nil r))
21864 @end lisp
21865
21866 @item Matching on the body
21867 This is generally not a very good idea---it takes a very long time.
21868 Gnus actually has to fetch each individual article from the server.  But
21869 you might want to anyway, I guess.  Even though there are three match
21870 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
21871 and stick with it in each score file.  If you use any two, each article
21872 will be fetched @emph{twice}.  If you want to match a bit on the
21873 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
21874 the matches.
21875
21876 @item Marking as read
21877 You will probably want to mark articles that have scores below a certain
21878 number as read.  This is most easily achieved by putting the following
21879 in your @file{all.SCORE} file:
21880 @lisp
21881 ((mark -100))
21882 @end lisp
21883 You may also consider doing something similar with @code{expunge}.
21884
21885 @item Negated character classes
21886 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
21887 That will match newlines, which might lead to, well, The Unknown.  Say
21888 @code{[^abcd\n]*} instead.
21889 @end table
21890
21891
21892 @node Reverse Scoring
21893 @section Reverse Scoring
21894 @cindex reverse scoring
21895
21896 If you want to keep just articles that have @samp{Sex with Emacs} in the
21897 subject header, and expunge all other articles, you could put something
21898 like this in your score file:
21899
21900 @lisp
21901 (("subject"
21902   ("Sex with Emacs" 2))
21903  (mark 1)
21904  (expunge 1))
21905 @end lisp
21906
21907 So, you raise all articles that match @samp{Sex with Emacs} and mark the
21908 rest as read, and expunge them to boot.
21909
21910
21911 @node Global Score Files
21912 @section Global Score Files
21913 @cindex global score files
21914
21915 Sure, other newsreaders have ``global kill files''.  These are usually
21916 nothing more than a single kill file that applies to all groups, stored
21917 in the user's home directory.  Bah!  Puny, weak newsreaders!
21918
21919 What I'm talking about here are Global Score Files.  Score files from
21920 all over the world, from users everywhere, uniting all nations in one
21921 big, happy score file union!  Ange-score!  New and untested!
21922
21923 @vindex gnus-global-score-files
21924 All you have to do to use other people's score files is to set the
21925 @code{gnus-global-score-files} variable.  One entry for each score file,
21926 or each score file directory.  Gnus will decide by itself what score
21927 files are applicable to which group.
21928
21929 To use the score file
21930 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
21931 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
21932 say this:
21933
21934 @lisp
21935 (setq gnus-global-score-files
21936       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
21937         "/ftp@@ftp.some-where:/pub/score/"))
21938 @end lisp
21939
21940 @findex gnus-score-search-global-directories
21941 @noindent
21942 Simple, eh?  Directory names must end with a @samp{/}.  These
21943 directories are typically scanned only once during each Gnus session.
21944 If you feel the need to manually re-scan the remote directories, you can
21945 use the @code{gnus-score-search-global-directories} command.
21946
21947 Note that, at present, using this option will slow down group entry
21948 somewhat.  (That is---a lot.)
21949
21950 If you want to start maintaining score files for other people to use,
21951 just put your score file up for anonymous ftp and announce it to the
21952 world.  Become a retro-moderator!  Participate in the retro-moderator
21953 wars sure to ensue, where retro-moderators battle it out for the
21954 sympathy of the people, luring them to use their score files on false
21955 premises!  Yay!  The net is saved!
21956
21957 Here are some tips for the would-be retro-moderator, off the top of my
21958 head:
21959
21960 @itemize @bullet
21961
21962 @item
21963 Articles heavily crossposted are probably junk.
21964 @item
21965 To lower a single inappropriate article, lower by @code{Message-ID}.
21966 @item
21967 Particularly brilliant authors can be raised on a permanent basis.
21968 @item
21969 Authors that repeatedly post off-charter for the group can safely be
21970 lowered out of existence.
21971 @item
21972 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
21973 articles completely.
21974
21975 @item
21976 Use expiring score entries to keep the size of the file down.  You
21977 should probably have a long expiry period, though, as some sites keep
21978 old articles for a long time.
21979 @end itemize
21980
21981 @dots{} I wonder whether other newsreaders will support global score files
21982 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
21983 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
21984 holding our breath yet?
21985
21986
21987 @node Kill Files
21988 @section Kill Files
21989 @cindex kill files
21990
21991 Gnus still supports those pesky old kill files.  In fact, the kill file
21992 entries can now be expiring, which is something I wrote before Daniel
21993 Quinlan thought of doing score files, so I've left the code in there.
21994
21995 In short, kill processing is a lot slower (and I do mean @emph{a lot})
21996 than score processing, so it might be a good idea to rewrite your kill
21997 files into score files.
21998
21999 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
22000 forms into this file, which means that you can use kill files as some
22001 sort of primitive hook function to be run on group entry, even though
22002 that isn't a very good idea.
22003
22004 Normal kill files look like this:
22005
22006 @lisp
22007 (gnus-kill "From" "Lars Ingebrigtsen")
22008 (gnus-kill "Subject" "ding")
22009 (gnus-expunge "X")
22010 @end lisp
22011
22012 This will mark every article written by me as read, and remove the
22013 marked articles from the summary buffer.  Very useful, you'll agree.
22014
22015 Other programs use a totally different kill file syntax.  If Gnus
22016 encounters what looks like a @code{rn} kill file, it will take a stab at
22017 interpreting it.
22018
22019 Two summary functions for editing a @sc{gnus} kill file:
22020
22021 @table @kbd
22022
22023 @item M-k
22024 @kindex M-k (Summary)
22025 @findex gnus-summary-edit-local-kill
22026 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
22027
22028 @item M-K
22029 @kindex M-K (Summary)
22030 @findex gnus-summary-edit-global-kill
22031 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
22032 @end table
22033
22034 Two group mode functions for editing the kill files:
22035
22036 @table @kbd
22037
22038 @item M-k
22039 @kindex M-k (Group)
22040 @findex gnus-group-edit-local-kill
22041 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
22042
22043 @item M-K
22044 @kindex M-K (Group)
22045 @findex gnus-group-edit-global-kill
22046 Edit the general kill file (@code{gnus-group-edit-global-kill}).
22047 @end table
22048
22049 Kill file variables:
22050
22051 @table @code
22052 @item gnus-kill-file-name
22053 @vindex gnus-kill-file-name
22054 A kill file for the group @samp{soc.motss} is normally called
22055 @file{soc.motss.KILL}.  The suffix appended to the group name to get
22056 this file name is detailed by the @code{gnus-kill-file-name} variable.
22057 The ``global'' kill file (not in the score file sense of ``global'', of
22058 course) is just called @file{KILL}.
22059
22060 @vindex gnus-kill-save-kill-file
22061 @item gnus-kill-save-kill-file
22062 If this variable is non-@code{nil}, Gnus will save the
22063 kill file after processing, which is necessary if you use expiring
22064 kills.
22065
22066 @item gnus-apply-kill-hook
22067 @vindex gnus-apply-kill-hook
22068 @findex gnus-apply-kill-file-unless-scored
22069 @findex gnus-apply-kill-file
22070 A hook called to apply kill files to a group.  It is
22071 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
22072 kill file if you have a score file for the same group, you can set this
22073 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
22074 kill files to be processed, you should set this variable to @code{nil}.
22075
22076 @item gnus-kill-file-mode-hook
22077 @vindex gnus-kill-file-mode-hook
22078 A hook called in kill-file mode buffers.
22079
22080 @end table
22081
22082
22083 @node Converting Kill Files
22084 @section Converting Kill Files
22085 @cindex kill files
22086 @cindex converting kill files
22087
22088 If you have loads of old kill files, you may want to convert them into
22089 score files.  If they are ``regular'', you can use
22090 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
22091 by hand.
22092
22093 The kill to score conversion package isn't included in Emacs by default.
22094 You can fetch it from the contrib directory of the Gnus distribution or
22095 from
22096 @uref{http://heim.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
22097
22098 If your old kill files are very complex---if they contain more
22099 non-@code{gnus-kill} forms than not, you'll have to convert them by
22100 hand.  Or just let them be as they are.  Gnus will still use them as
22101 before.
22102
22103
22104 @node Advanced Scoring
22105 @section Advanced Scoring
22106
22107 Scoring on Subjects and From headers is nice enough, but what if you're
22108 really interested in what a person has to say only when she's talking
22109 about a particular subject?  Or what if you really don't want to
22110 read what person A has to say when she's following up to person B, but
22111 want to read what she says when she's following up to person C?
22112
22113 By using advanced scoring rules you may create arbitrarily complex
22114 scoring patterns.
22115
22116 @menu
22117 * Advanced Scoring Syntax::     A definition.
22118 * Advanced Scoring Examples::   What they look like.
22119 * Advanced Scoring Tips::       Getting the most out of it.
22120 @end menu
22121
22122
22123 @node Advanced Scoring Syntax
22124 @subsection Advanced Scoring Syntax
22125
22126 Ordinary scoring rules have a string as the first element in the rule.
22127 Advanced scoring rules have a list as the first element.  The second
22128 element is the score to be applied if the first element evaluated to a
22129 non-@code{nil} value.
22130
22131 These lists may consist of three logical operators, one redirection
22132 operator, and various match operators.
22133
22134 Logical operators:
22135
22136 @table @code
22137 @item &
22138 @itemx and
22139 This logical operator will evaluate each of its arguments until it finds
22140 one that evaluates to @code{false}, and then it'll stop.  If all arguments
22141 evaluate to @code{true} values, then this operator will return
22142 @code{true}.
22143
22144 @item |
22145 @itemx or
22146 This logical operator will evaluate each of its arguments until it finds
22147 one that evaluates to @code{true}.  If no arguments are @code{true},
22148 then this operator will return @code{false}.
22149
22150 @item !
22151 @itemx not
22152 @itemx Â¬
22153 This logical operator only takes a single argument.  It returns the
22154 logical negation of the value of its argument.
22155
22156 @end table
22157
22158 There is an @dfn{indirection operator} that will make its arguments
22159 apply to the ancestors of the current article being scored.  For
22160 instance, @code{1-} will make score rules apply to the parent of the
22161 current article.  @code{2-} will make score rules apply to the
22162 grandparent of the current article.  Alternatively, you can write
22163 @code{^^}, where the number of @code{^}s (carets) says how far back into
22164 the ancestry you want to go.
22165
22166 Finally, we have the match operators.  These are the ones that do the
22167 real work.  Match operators are header name strings followed by a match
22168 and a match type.  A typical match operator looks like @samp{("from"
22169 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
22170 simple scoring, and the match types are also the same.
22171
22172
22173 @node Advanced Scoring Examples
22174 @subsection Advanced Scoring Examples
22175
22176 Please note that the following examples are score file rules.  To
22177 make a complete score file from them, surround them with another pair
22178 of parentheses.
22179
22180 Let's say you want to increase the score of articles written by Lars
22181 when he's talking about Gnus:
22182
22183 @example
22184 @group
22185 ((&
22186   ("from" "Lars Ingebrigtsen")
22187   ("subject" "Gnus"))
22188  1000)
22189 @end group
22190 @end example
22191
22192 Quite simple, huh?
22193
22194 When he writes long articles, he sometimes has something nice to say:
22195
22196 @example
22197 ((&
22198   ("from" "Lars Ingebrigtsen")
22199   (|
22200    ("subject" "Gnus")
22201    ("lines" 100 >)))
22202  1000)
22203 @end example
22204
22205 However, when he responds to things written by Reig Eigil Logge, you
22206 really don't want to read what he's written:
22207
22208 @example
22209 ((&
22210   ("from" "Lars Ingebrigtsen")
22211   (1- ("from" "Reig Eigil Logge")))
22212  -100000)
22213 @end example
22214
22215 Everybody that follows up Redmondo when he writes about disappearing
22216 socks should have their scores raised, but only when they talk about
22217 white socks.  However, when Lars talks about socks, it's usually not
22218 very interesting:
22219
22220 @example
22221 ((&
22222   (1-
22223    (&
22224     ("from" "redmondo@@.*no" r)
22225     ("body" "disappearing.*socks" t)))
22226   (! ("from" "Lars Ingebrigtsen"))
22227   ("body" "white.*socks"))
22228  1000)
22229 @end example
22230
22231 Suppose you're reading a high volume group and you're only interested
22232 in replies. The plan is to score down all articles that don't have
22233 subject that begin with "Re:", "Fw:" or "Fwd:" and then score up all
22234 parents of articles that have subjects that begin with reply marks.
22235
22236 @example
22237 ((! ("subject" "re:\\|fwd?:" r))
22238   -200)
22239 ((1- ("subject" "re:\\|fwd?:" r))
22240   200)
22241 @end example
22242
22243 The possibilities are endless.
22244
22245 @node Advanced Scoring Tips
22246 @subsection Advanced Scoring Tips
22247
22248 The @code{&} and @code{|} logical operators do short-circuit logic.
22249 That is, they stop processing their arguments when it's clear what the
22250 result of the operation will be.  For instance, if one of the arguments
22251 of an @code{&} evaluates to @code{false}, there's no point in evaluating
22252 the rest of the arguments.  This means that you should put slow matches
22253 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
22254 @samp{subject}) first.
22255
22256 The indirection arguments (@code{1-} and so on) will make their
22257 arguments work on previous generations of the thread.  If you say
22258 something like:
22259
22260 @example
22261 ...
22262 (1-
22263  (1-
22264   ("from" "lars")))
22265 ...
22266 @end example
22267
22268 Then that means ``score on the from header of the grandparent of the
22269 current article''.  An indirection is quite fast, but it's better to say:
22270
22271 @example
22272 (1-
22273  (&
22274   ("from" "Lars")
22275   ("subject" "Gnus")))
22276 @end example
22277
22278 than it is to say:
22279
22280 @example
22281 (&
22282  (1- ("from" "Lars"))
22283  (1- ("subject" "Gnus")))
22284 @end example
22285
22286
22287 @node Score Decays
22288 @section Score Decays
22289 @cindex score decays
22290 @cindex decays
22291
22292 You may find that your scores have a tendency to grow without
22293 bounds, especially if you're using adaptive scoring.  If scores get too
22294 big, they lose all meaning---they simply max out and it's difficult to
22295 use them in any sensible way.
22296
22297 @vindex gnus-decay-scores
22298 @findex gnus-decay-score
22299 @vindex gnus-decay-score-function
22300 Gnus provides a mechanism for decaying scores to help with this problem.
22301 When score files are loaded and @code{gnus-decay-scores} is
22302 non-@code{nil}, Gnus will run the score files through the decaying
22303 mechanism thereby lowering the scores of all non-permanent score rules.
22304 If @code{gnus-decay-scores} is a regexp, only score files matching this
22305 regexp are treated.  E.g. you may set it to @samp{\\.ADAPT\\'} if only
22306 @emph{adaptive} score files should be decayed.  The decay itself if
22307 performed by the @code{gnus-decay-score-function} function, which is
22308 @code{gnus-decay-score} by default.  Here's the definition of that
22309 function:
22310
22311 @lisp
22312 (defun gnus-decay-score (score)
22313   "Decay SCORE according to `gnus-score-decay-constant'
22314 and `gnus-score-decay-scale'."
22315   (let ((n (- score
22316               (* (if (< score 0) -1 1)
22317                  (min (abs score)
22318                       (max gnus-score-decay-constant
22319                            (* (abs score)
22320                               gnus-score-decay-scale)))))))
22321     (if (and (featurep 'xemacs)
22322              ;; XEmacs' floor can handle only the floating point
22323              ;; number below the half of the maximum integer.
22324              (> (abs n) (lsh -1 -2)))
22325         (string-to-number
22326          (car (split-string (number-to-string n) "\\.")))
22327       (floor n))))
22328 @end lisp
22329
22330 @vindex gnus-score-decay-scale
22331 @vindex gnus-score-decay-constant
22332 @code{gnus-score-decay-constant} is 3 by default and
22333 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
22334
22335 @enumerate
22336 @item
22337 Scores between -3 and 3 will be set to 0 when this function is called.
22338
22339 @item
22340 Scores with magnitudes between 3 and 60 will be shrunk by 3.
22341
22342 @item
22343 Scores with magnitudes greater than 60 will be shrunk by 5% of the
22344 score.
22345 @end enumerate
22346
22347 If you don't like this decay function, write your own.  It is called
22348 with the score to be decayed as its only parameter, and it should return
22349 the new score, which should be an integer.
22350
22351 Gnus will try to decay scores once a day.  If you haven't run Gnus for
22352 four days, Gnus will decay the scores four times, for instance.
22353
22354 @iftex
22355 @iflatex
22356 @chapter Message
22357 @include message.texi
22358 @chapter Emacs MIME
22359 @include emacs-mime.texi
22360 @chapter Sieve
22361 @include sieve.texi
22362 @chapter PGG
22363 @include pgg.texi
22364 @chapter SASL
22365 @include sasl.texi
22366 @end iflatex
22367 @end iftex
22368
22369 @node Various
22370 @chapter Various
22371
22372 @menu
22373 * Process/Prefix::              A convention used by many treatment commands.
22374 * Interactive::                 Making Gnus ask you many questions.
22375 * Symbolic Prefixes::           How to supply some Gnus functions with options.
22376 * Formatting Variables::        You can specify what buffers should look like.
22377 * Window Layout::               Configuring the Gnus buffer windows.
22378 * Faces and Fonts::             How to change how faces look.
22379 * Compilation::                 How to speed Gnus up.
22380 * Mode Lines::                  Displaying information in the mode lines.
22381 * Highlighting and Menus::      Making buffers look all nice and cozy.
22382 * Buttons::                     Get tendinitis in ten easy steps!
22383 * Daemons::                     Gnus can do things behind your back.
22384 * NoCeM::                       How to avoid spam and other fatty foods.
22385 * Undo::                        Some actions can be undone.
22386 * Predicate Specifiers::        Specifying predicates.
22387 * Moderation::                  What to do if you're a moderator.
22388 * Fetching a Group::            Starting Gnus just to read a group.
22389 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
22390 * Fuzzy Matching::              What's the big fuzz?
22391 * Thwarting Email Spam::        Simple ways to avoid unsolicited commercial email.
22392 * Spam Package::                A package for filtering and processing spam.
22393 * The Gnus Registry::           A package for tracking messages by Message-ID.
22394 * Other modes::                 Interaction with other modes.
22395 * Various Various::             Things that are really various.
22396 @end menu
22397
22398
22399 @node Process/Prefix
22400 @section Process/Prefix
22401 @cindex process/prefix convention
22402
22403 Many functions, among them functions for moving, decoding and saving
22404 articles, use what is known as the @dfn{Process/Prefix convention}.
22405
22406 This is a method for figuring out what articles the user wants the
22407 command to be performed on.
22408
22409 It goes like this:
22410
22411 If the numeric prefix is N, perform the operation on the next N
22412 articles, starting with the current one.  If the numeric prefix is
22413 negative, perform the operation on the previous N articles, starting
22414 with the current one.
22415
22416 @vindex transient-mark-mode
22417 If @code{transient-mark-mode} in non-@code{nil} and the region is
22418 active, all articles in the region will be worked upon.
22419
22420 If there is no numeric prefix, but some articles are marked with the
22421 process mark, perform the operation on the articles marked with
22422 the process mark.
22423
22424 If there is neither a numeric prefix nor any articles marked with the
22425 process mark, just perform the operation on the current article.
22426
22427 Quite simple, really, but it needs to be made clear so that surprises
22428 are avoided.
22429
22430 Commands that react to the process mark will push the current list of
22431 process marked articles onto a stack and will then clear all process
22432 marked articles.  You can restore the previous configuration with the
22433 @kbd{M P y} command (@pxref{Setting Process Marks}).
22434
22435 @vindex gnus-summary-goto-unread
22436 One thing that seems to shock & horrify lots of people is that, for
22437 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
22438 Since each @kbd{d} (which marks the current article as read) by default
22439 goes to the next unread article after marking, this means that @kbd{3 d}
22440 will mark the next three unread articles as read, no matter what the
22441 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
22442 @code{nil} for a more straightforward action.
22443
22444 Many commands do not use the process/prefix convention.  All commands
22445 that do explicitly say so in this manual.  To apply the process/prefix
22446 convention to commands that do not use it, you can use the @kbd{M-&}
22447 command.  For instance, to mark all the articles in the group as
22448 expirable, you could say @kbd{M P b M-& E}.
22449
22450
22451 @node Interactive
22452 @section Interactive
22453 @cindex interaction
22454
22455 @table @code
22456
22457 @item gnus-novice-user
22458 @vindex gnus-novice-user
22459 If this variable is non-@code{nil}, you are either a newcomer to the
22460 World of Usenet, or you are very cautious, which is a nice thing to be,
22461 really.  You will be given questions of the type ``Are you sure you want
22462 to do this?'' before doing anything dangerous.  This is @code{t} by
22463 default.
22464
22465 @item gnus-expert-user
22466 @vindex gnus-expert-user
22467 If this variable is non-@code{nil}, you will seldom be asked any
22468 questions by Gnus.  It will simply assume you know what you're doing,
22469 no matter how strange.  For example, quitting Gnus, exiting a group
22470 without an update, catching up with a group, deleting expired
22471 articles, and replying by mail to a news message will not require
22472 confirmation.
22473
22474 @item gnus-interactive-catchup
22475 @vindex gnus-interactive-catchup
22476 Require confirmation before catching up a group if non-@code{nil}.  It
22477 is @code{t} by default.
22478
22479 @item gnus-interactive-exit
22480 @vindex gnus-interactive-exit
22481 Require confirmation before exiting Gnus.  This variable is @code{t} by
22482 default.
22483 @end table
22484
22485
22486 @node Symbolic Prefixes
22487 @section Symbolic Prefixes
22488 @cindex symbolic prefixes
22489
22490 Quite a lot of Emacs commands react to the (numeric) prefix.  For
22491 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
22492 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
22493 rule of 900 to the current article.
22494
22495 This is all nice and well, but what if you want to give a command some
22496 additional information?  Well, what most commands do is interpret the
22497 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
22498 doesn't want a backup file to be created when saving the current buffer,
22499 for instance.  But what if you want to save without making a backup
22500 file, and you want Emacs to flash lights and play a nice tune at the
22501 same time?  You can't, and you're probably perfectly happy that way.
22502
22503 @kindex M-i (Summary)
22504 @findex gnus-symbolic-argument
22505 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
22506 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
22507 character typed in is the value.  You can stack as many @kbd{M-i}
22508 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
22509 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
22510 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
22511 @code{b}''.  You get the drift.
22512
22513 Typing in symbolic prefixes to commands that don't accept them doesn't
22514 hurt, but it doesn't do any good either.  Currently not many Gnus
22515 functions make use of the symbolic prefix.
22516
22517 If you're interested in how Gnus implements this, @pxref{Extended
22518 Interactive}.
22519
22520
22521 @node Formatting Variables
22522 @section Formatting Variables
22523 @cindex formatting variables
22524
22525 Throughout this manual you've probably noticed lots of variables called
22526 things like @code{gnus-group-line-format} and
22527 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
22528 output lines in the various buffers.  There's quite a lot of them.
22529 Fortunately, they all use the same syntax, so there's not that much to
22530 be annoyed by.
22531
22532 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
22533 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
22534 lots of percentages everywhere.
22535
22536 @menu
22537 * Formatting Basics::           A formatting variable is basically a format string.
22538 * Mode Line Formatting::        Some rules about mode line formatting variables.
22539 * Advanced Formatting::         Modifying output in various ways.
22540 * User-Defined Specs::          Having Gnus call your own functions.
22541 * Formatting Fonts::            Making the formatting look colorful and nice.
22542 * Positioning Point::           Moving point to a position after an operation.
22543 * Tabulation::                  Tabulating your output.
22544 * Wide Characters::             Dealing with wide characters.
22545 @end menu
22546
22547 Currently Gnus uses the following formatting variables:
22548 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
22549 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
22550 @code{gnus-group-mode-line-format},
22551 @code{gnus-summary-mode-line-format},
22552 @code{gnus-article-mode-line-format},
22553 @code{gnus-server-mode-line-format}, and
22554 @code{gnus-summary-pick-line-format}.
22555
22556 All these format variables can also be arbitrary elisp forms.  In that
22557 case, they will be @code{eval}ed to insert the required lines.
22558
22559 @kindex M-x gnus-update-format
22560 @findex gnus-update-format
22561 Gnus includes a command to help you while creating your own format
22562 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
22563 update the spec in question and pop you to a buffer where you can
22564 examine the resulting Lisp code to be run to generate the line.
22565
22566
22567
22568 @node Formatting Basics
22569 @subsection Formatting Basics
22570
22571 Each @samp{%} element will be replaced by some string or other when the
22572 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
22573 spec, and pad with spaces to get a 5-character field''.
22574
22575 As with normal C and Emacs Lisp formatting strings, the numerical
22576 modifier between the @samp{%} and the formatting type character will
22577 @dfn{pad} the output so that it is always at least that long.
22578 @samp{%5y} will make the field always (at least) five characters wide by
22579 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
22580 the right instead.
22581
22582 You may also wish to limit the length of the field to protect against
22583 particularly wide values.  For that you can say @samp{%4,6y}, which
22584 means that the field will never be more than 6 characters wide and never
22585 less than 4 characters wide.
22586
22587 Also Gnus supports some extended format specifications, such as
22588 @samp{%&user-date;}.
22589
22590
22591 @node Mode Line Formatting
22592 @subsection Mode Line Formatting
22593
22594 Mode line formatting variables (e.g.,
22595 @code{gnus-summary-mode-line-format}) follow the same rules as other,
22596 buffer line oriented formatting variables (@pxref{Formatting Basics})
22597 with the following two differences:
22598
22599 @enumerate
22600
22601 @item
22602 There must be no newline (@samp{\n}) at the end.
22603
22604 @item
22605 The special @samp{%%b} spec can be used to display the buffer name.
22606 Well, it's no spec at all, really---@samp{%%} is just a way to quote
22607 @samp{%} to allow it to pass through the formatting machinery unmangled,
22608 so that Emacs receives @samp{%b}, which is something the Emacs mode line
22609 display interprets to mean ``show the buffer name''.  For a full list of
22610 mode line specs Emacs understands, see the documentation of the
22611 @code{mode-line-format} variable.
22612
22613 @end enumerate
22614
22615
22616 @node Advanced Formatting
22617 @subsection Advanced Formatting
22618
22619 It is frequently useful to post-process the fields in some way.
22620 Padding, limiting, cutting off parts and suppressing certain values can
22621 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
22622 look like @samp{%~(cut 3)~(ignore "0")y}.
22623
22624 These are the valid modifiers:
22625
22626 @table @code
22627 @item pad
22628 @itemx pad-left
22629 Pad the field to the left with spaces until it reaches the required
22630 length.
22631
22632 @item pad-right
22633 Pad the field to the right with spaces until it reaches the required
22634 length.
22635
22636 @item max
22637 @itemx max-left
22638 Cut off characters from the left until it reaches the specified length.
22639
22640 @item max-right
22641 Cut off characters from the right until it reaches the specified
22642 length.
22643
22644 @item cut
22645 @itemx cut-left
22646 Cut off the specified number of characters from the left.
22647
22648 @item cut-right
22649 Cut off the specified number of characters from the right.
22650
22651 @item ignore
22652 Return an empty string if the field is equal to the specified value.
22653
22654 @item form
22655 Use the specified form as the field value when the @samp{@@} spec is
22656 used.
22657
22658 Here's an example:
22659
22660 @lisp
22661 "~(form (current-time-string))@@"
22662 @end lisp
22663
22664 @end table
22665
22666 Let's take an example.  The @samp{%o} spec in the summary mode lines
22667 will return a date in compact ISO8601 format---@samp{19960809T230410}.
22668 This is quite a mouthful, so we want to shave off the century number and
22669 the time, leaving us with a six-character date.  That would be
22670 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
22671 maxing, and we need the padding to ensure that the date is never less
22672 than 6 characters to make it look nice in columns.)
22673
22674 Ignoring is done first; then cutting; then maxing; and then as the very
22675 last operation, padding.
22676
22677 If you use lots of these advanced thingies, you'll find that Gnus gets
22678 quite slow.  This can be helped enormously by running @kbd{M-x
22679 gnus-compile} when you are satisfied with the look of your lines.
22680 @xref{Compilation}.
22681
22682
22683 @node User-Defined Specs
22684 @subsection User-Defined Specs
22685
22686 All the specs allow for inserting user defined specifiers---@samp{u}.
22687 The next character in the format string should be a letter.  Gnus
22688 will call the function @code{gnus-user-format-function-}@samp{X}, where
22689 @samp{X} is the letter following @samp{%u}.  The function will be passed
22690 a single parameter---what the parameter means depends on what buffer
22691 it's being called from.  The function should return a string, which will
22692 be inserted into the buffer just like information from any other
22693 specifier.  This function may also be called with dummy values, so it
22694 should protect against that.
22695
22696 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
22697 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
22698
22699 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
22700 much the same without defining new functions.  Here's an example:
22701 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
22702 given here will be evaluated to yield the current line number, and then
22703 inserted.
22704
22705
22706 @node Formatting Fonts
22707 @subsection Formatting Fonts
22708
22709 @cindex %(, %)
22710 @vindex gnus-mouse-face
22711 There are specs for highlighting, and these are shared by all the format
22712 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
22713 the special @code{mouse-face} property set, which means that it will be
22714 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
22715 over it.
22716
22717 @cindex %@{, %@}
22718 @vindex gnus-face-0
22719 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
22720 normal faces set using @code{gnus-face-0}, which is @code{bold} by
22721 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
22722 and so on.  Create as many faces as you wish.  The same goes for the
22723 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
22724 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
22725
22726 @cindex %<<, %>>, guillemets
22727 @c @cindex %<<, %>>, %«, %», guillemets
22728 @vindex gnus-balloon-face-0
22729 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
22730 special @code{balloon-help} property set to
22731 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
22732 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
22733 variables should be either strings or symbols naming functions that
22734 return a string.  When the mouse passes over text with this property
22735 set, a balloon window will appear and display the string.  Please
22736 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
22737 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
22738 XEmacs) for more information on this.  (For technical reasons, the
22739 guillemets have been approximated as @samp{<<} and @samp{>>} in this
22740 paragraph.)
22741
22742 Here's an alternative recipe for the group buffer:
22743
22744 @lisp
22745 ;; @r{Create three face types.}
22746 (setq gnus-face-1 'bold)
22747 (setq gnus-face-3 'italic)
22748
22749 ;; @r{We want the article count to be in}
22750 ;; @r{a bold and green face.  So we create}
22751 ;; @r{a new face called @code{my-green-bold}.}
22752 (copy-face 'bold 'my-green-bold)
22753 ;; @r{Set the color.}
22754 (set-face-foreground 'my-green-bold "ForestGreen")
22755 (setq gnus-face-2 'my-green-bold)
22756
22757 ;; @r{Set the new & fancy format.}
22758 (setq gnus-group-line-format
22759       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
22760 @end lisp
22761
22762 I'm sure you'll be able to use this scheme to create totally unreadable
22763 and extremely vulgar displays.  Have fun!
22764
22765 Note that the @samp{%(} specs (and friends) do not make any sense on the
22766 mode-line variables.
22767
22768 @node Positioning Point
22769 @subsection Positioning Point
22770
22771 Gnus usually moves point to a pre-defined place on each line in most
22772 buffers.  By default, point move to the first colon character on the
22773 line.  You can customize this behavior in three different ways.
22774
22775 You can move the colon character to somewhere else on the line.
22776
22777 @findex gnus-goto-colon
22778 You can redefine the function that moves the point to the colon.  The
22779 function is called @code{gnus-goto-colon}.
22780
22781 But perhaps the most convenient way to deal with this, if you don't want
22782 to have a colon in your line, is to use the @samp{%*} specifier.  If you
22783 put a @samp{%*} somewhere in your format line definition, Gnus will
22784 place point there.
22785
22786
22787 @node Tabulation
22788 @subsection Tabulation
22789
22790 You can usually line up your displays by padding and cutting your
22791 strings.  However, when combining various strings of different size, it
22792 can often be more convenient to just output the strings, and then worry
22793 about lining up the following text afterwards.
22794
22795 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
22796 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
22797
22798 @samp{%50=} will insert space characters to pad the line up to column
22799 50.  If the text is already past column 50, nothing will be inserted.
22800 This is the soft tabulator.
22801
22802 @samp{%-50=} will insert space characters to pad the line up to column
22803 50.  If the text is already past column 50, the excess text past column
22804 50 will be removed.  This is the hard tabulator.
22805
22806
22807 @node Wide Characters
22808 @subsection Wide Characters
22809
22810 Fixed width fonts in most countries have characters of the same width.
22811 Some countries, however, use Latin characters mixed with wider
22812 characters---most notable East Asian countries.
22813
22814 The problem is that when formatting, Gnus assumes that if a string is 10
22815 characters wide, it'll be 10 Latin characters wide on the screen.  In
22816 these countries, that's not true.
22817
22818 @vindex gnus-use-correct-string-widths
22819 To help fix this, you can set @code{gnus-use-correct-string-widths} to
22820 @code{t}.  This makes buffer generation slower, but the results will be
22821 prettier.  The default value under XEmacs is @code{t} but @code{nil}
22822 for Emacs.
22823
22824
22825 @node Window Layout
22826 @section Window Layout
22827 @cindex window layout
22828
22829 No, there's nothing here about X, so be quiet.
22830
22831 @vindex gnus-use-full-window
22832 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
22833 other windows and occupy the entire Emacs screen by itself.  It is
22834 @code{t} by default.
22835
22836 Setting this variable to @code{nil} kinda works, but there are
22837 glitches.  Use at your own peril.
22838
22839 @vindex gnus-buffer-configuration
22840 @code{gnus-buffer-configuration} describes how much space each Gnus
22841 buffer should be given.  Here's an excerpt of this variable:
22842
22843 @lisp
22844 ((group (vertical 1.0 (group 1.0 point)
22845                       (if gnus-carpal (group-carpal 4))))
22846  (article (vertical 1.0 (summary 0.25 point)
22847                         (article 1.0))))
22848 @end lisp
22849
22850 This is an alist.  The @dfn{key} is a symbol that names some action or
22851 other.  For instance, when displaying the group buffer, the window
22852 configuration function will use @code{group} as the key.  A full list of
22853 possible names is listed below.
22854
22855 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
22856 should occupy.  To take the @code{article} split as an example -
22857
22858 @lisp
22859 (article (vertical 1.0 (summary 0.25 point)
22860                        (article 1.0)))
22861 @end lisp
22862
22863 This @dfn{split} says that the summary buffer should occupy 25% of upper
22864 half of the screen, and that it is placed over the article buffer.  As
22865 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
22866 reaching for that calculator there).  However, the special number
22867 @code{1.0} is used to signal that this buffer should soak up all the
22868 rest of the space available after the rest of the buffers have taken
22869 whatever they need.  There should be only one buffer with the @code{1.0}
22870 size spec per split.
22871
22872 Point will be put in the buffer that has the optional third element
22873 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
22874 split where the tag @code{frame-focus} is a member (i.e. is the third or
22875 fourth element in the list, depending on whether the @code{point} tag is
22876 present) gets focus.
22877
22878 Here's a more complicated example:
22879
22880 @lisp
22881 (article (vertical 1.0 (group 4)
22882                        (summary 0.25 point)
22883                        (if gnus-carpal (summary-carpal 4))
22884                        (article 1.0)))
22885 @end lisp
22886
22887 If the size spec is an integer instead of a floating point number,
22888 then that number will be used to say how many lines a buffer should
22889 occupy, not a percentage.
22890
22891 If the @dfn{split} looks like something that can be @code{eval}ed (to be
22892 precise---if the @code{car} of the split is a function or a subr), this
22893 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
22894 be used as a split.  This means that there will be three buffers if
22895 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
22896 is non-@code{nil}.
22897
22898 Not complicated enough for you?  Well, try this on for size:
22899
22900 @lisp
22901 (article (horizontal 1.0
22902              (vertical 0.5
22903                  (group 1.0)
22904                  (gnus-carpal 4))
22905              (vertical 1.0
22906                  (summary 0.25 point)
22907                  (summary-carpal 4)
22908                  (article 1.0))))
22909 @end lisp
22910
22911 Whoops.  Two buffers with the mystery 100% tag.  And what's that
22912 @code{horizontal} thingie?
22913
22914 If the first element in one of the split is @code{horizontal}, Gnus will
22915 split the window horizontally, giving you two windows side-by-side.
22916 Inside each of these strips you may carry on all you like in the normal
22917 fashion.  The number following @code{horizontal} says what percentage of
22918 the screen is to be given to this strip.
22919
22920 For each split, there @emph{must} be one element that has the 100% tag.
22921 The splitting is never accurate, and this buffer will eat any leftover
22922 lines from the splits.
22923
22924 To be slightly more formal, here's a definition of what a valid split
22925 may look like:
22926
22927 @example
22928 @group
22929 split      = frame | horizontal | vertical | buffer | form
22930 frame      = "(frame " size *split ")"
22931 horizontal = "(horizontal " size *split ")"
22932 vertical   = "(vertical " size *split ")"
22933 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
22934 size       = number | frame-params
22935 buf-name   = group | article | summary ...
22936 @end group
22937 @end example
22938
22939 The limitations are that the @code{frame} split can only appear as the
22940 top-level split.  @var{form} should be an Emacs Lisp form that should
22941 return a valid split.  We see that each split is fully recursive, and
22942 may contain any number of @code{vertical} and @code{horizontal} splits.
22943
22944 @vindex gnus-window-min-width
22945 @vindex gnus-window-min-height
22946 @cindex window height
22947 @cindex window width
22948 Finding the right sizes can be a bit complicated.  No window may be less
22949 than @code{gnus-window-min-height} (default 1) characters high, and all
22950 windows must be at least @code{gnus-window-min-width} (default 1)
22951 characters wide.  Gnus will try to enforce this before applying the
22952 splits.  If you want to use the normal Emacs window width/height limit,
22953 you can just set these two variables to @code{nil}.
22954
22955 If you're not familiar with Emacs terminology, @code{horizontal} and
22956 @code{vertical} splits may work the opposite way of what you'd expect.
22957 Windows inside a @code{horizontal} split are shown side-by-side, and
22958 windows within a @code{vertical} split are shown above each other.
22959
22960 @findex gnus-configure-frame
22961 If you want to experiment with window placement, a good tip is to call
22962 @code{gnus-configure-frame} directly with a split.  This is the function
22963 that does all the real work when splitting buffers.  Below is a pretty
22964 nonsensical configuration with 5 windows; two for the group buffer and
22965 three for the article buffer.  (I said it was nonsensical.)  If you
22966 @code{eval} the statement below, you can get an idea of how that would
22967 look straight away, without going through the normal Gnus channels.
22968 Play with it until you're satisfied, and then use
22969 @code{gnus-add-configuration} to add your new creation to the buffer
22970 configuration list.
22971
22972 @lisp
22973 (gnus-configure-frame
22974  '(horizontal 1.0
22975     (vertical 10
22976       (group 1.0)
22977       (article 0.3 point))
22978     (vertical 1.0
22979       (article 1.0)
22980       (horizontal 4
22981         (group 1.0)
22982         (article 10)))))
22983 @end lisp
22984
22985 You might want to have several frames as well.  No prob---just use the
22986 @code{frame} split:
22987
22988 @lisp
22989 (gnus-configure-frame
22990  '(frame 1.0
22991          (vertical 1.0
22992                    (summary 0.25 point frame-focus)
22993                    (article 1.0))
22994          (vertical ((height . 5) (width . 15)
22995                     (user-position . t)
22996                     (left . -1) (top . 1))
22997                    (picon 1.0))))
22998
22999 @end lisp
23000
23001 This split will result in the familiar summary/article window
23002 configuration in the first (or ``main'') frame, while a small additional
23003 frame will be created where picons will be shown.  As you can see,
23004 instead of the normal @code{1.0} top-level spec, each additional split
23005 should have a frame parameter alist as the size spec.
23006 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
23007 Reference Manual}.  Under XEmacs, a frame property list will be
23008 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
23009 is such a plist.
23010 The list of all possible keys for @code{gnus-buffer-configuration} can
23011 be found in its default value.
23012
23013 Note that the @code{message} key is used for both
23014 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
23015 it is desirable to distinguish between the two, something like this
23016 might be used:
23017
23018 @lisp
23019 (message (horizontal 1.0
23020                      (vertical 1.0 (message 1.0 point))
23021                      (vertical 0.24
23022                                (if (buffer-live-p gnus-summary-buffer)
23023                                    '(summary 0.5))
23024                                (group 1.0))))
23025 @end lisp
23026
23027 One common desire for a multiple frame split is to have a separate frame
23028 for composing mail and news while leaving the original frame intact.  To
23029 accomplish that, something like the following can be done:
23030
23031 @lisp
23032 (message
23033   (frame 1.0
23034          (if (not (buffer-live-p gnus-summary-buffer))
23035              (car (cdr (assoc 'group gnus-buffer-configuration)))
23036            (car (cdr (assoc 'summary gnus-buffer-configuration))))
23037          (vertical ((user-position . t) (top . 1) (left . 1)
23038                     (name . "Message"))
23039                    (message 1.0 point))))
23040 @end lisp
23041
23042 @findex gnus-add-configuration
23043 Since the @code{gnus-buffer-configuration} variable is so long and
23044 complicated, there's a function you can use to ease changing the config
23045 of a single setting: @code{gnus-add-configuration}.  If, for instance,
23046 you want to change the @code{article} setting, you could say:
23047
23048 @lisp
23049 (gnus-add-configuration
23050  '(article (vertical 1.0
23051                (group 4)
23052                (summary .25 point)
23053                (article 1.0))))
23054 @end lisp
23055
23056 You'd typically stick these @code{gnus-add-configuration} calls in your
23057 @file{~/.gnus.el} file or in some startup hook---they should be run after
23058 Gnus has been loaded.
23059
23060 @vindex gnus-always-force-window-configuration
23061 If all windows mentioned in the configuration are already visible, Gnus
23062 won't change the window configuration.  If you always want to force the
23063 ``right'' window configuration, you can set
23064 @code{gnus-always-force-window-configuration} to non-@code{nil}.
23065
23066 If you're using tree displays (@pxref{Tree Display}), and the tree
23067 window is displayed vertically next to another window, you may also want
23068 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
23069 windows resized.
23070
23071 @subsection Example Window Configurations
23072
23073 @itemize @bullet
23074 @item
23075 Narrow left hand side occupied by group buffer.  Right hand side split
23076 between summary buffer (top one-sixth) and article buffer (bottom).
23077
23078 @ifinfo
23079 @example
23080 +---+---------+
23081 | G | Summary |
23082 | r +---------+
23083 | o |         |
23084 | u | Article |
23085 | p |         |
23086 +---+---------+
23087 @end example
23088 @end ifinfo
23089
23090 @lisp
23091 (gnus-add-configuration
23092  '(article
23093    (horizontal 1.0
23094                (vertical 25 (group 1.0))
23095                (vertical 1.0
23096                          (summary 0.16 point)
23097                          (article 1.0)))))
23098
23099 (gnus-add-configuration
23100  '(summary
23101    (horizontal 1.0
23102                (vertical 25 (group 1.0))
23103                (vertical 1.0 (summary 1.0 point)))))
23104 @end lisp
23105
23106 @end itemize
23107
23108
23109 @node Faces and Fonts
23110 @section Faces and Fonts
23111 @cindex faces
23112 @cindex fonts
23113 @cindex colors
23114
23115 Fiddling with fonts and faces used to be very difficult, but these days
23116 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
23117 the face you want to alter, and alter it via the standard Customize
23118 interface.
23119
23120
23121 @node Compilation
23122 @section Compilation
23123 @cindex compilation
23124 @cindex byte-compilation
23125
23126 @findex gnus-compile
23127
23128 Remember all those line format specification variables?
23129 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
23130 on.  Now, Gnus will of course heed whatever these variables are, but,
23131 unfortunately, changing them will mean a quite significant slow-down.
23132 (The default values of these variables have byte-compiled functions
23133 associated with them, while the user-generated versions do not, of
23134 course.)
23135
23136 To help with this, you can run @kbd{M-x gnus-compile} after you've
23137 fiddled around with the variables and feel that you're (kind of)
23138 satisfied.  This will result in the new specs being byte-compiled, and
23139 you'll get top speed again.  Gnus will save these compiled specs in the
23140 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
23141 this function, though---you should compile them yourself by sticking
23142 them into the @file{~/.gnus.el} file and byte-compiling that file.)
23143
23144
23145 @node Mode Lines
23146 @section Mode Lines
23147 @cindex mode lines
23148
23149 @vindex gnus-updated-mode-lines
23150 @code{gnus-updated-mode-lines} says what buffers should keep their mode
23151 lines updated.  It is a list of symbols.  Supported symbols include
23152 @code{group}, @code{article}, @code{summary}, @code{server},
23153 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
23154 Gnus will keep that mode line updated with information that may be
23155 pertinent.  If this variable is @code{nil}, screen refresh may be
23156 quicker.
23157
23158 @cindex display-time
23159
23160 @vindex gnus-mode-non-string-length
23161 By default, Gnus displays information on the current article in the mode
23162 lines of the summary and article buffers.  The information Gnus wishes
23163 to display (e.g. the subject of the article) is often longer than the
23164 mode lines, and therefore have to be cut off at some point.  The
23165 @code{gnus-mode-non-string-length} variable says how long the other
23166 elements on the line is (i.e., the non-info part).  If you put
23167 additional elements on the mode line (e.g. a clock), you should modify
23168 this variable:
23169
23170 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
23171 @lisp
23172 (add-hook 'display-time-hook
23173           (lambda () (setq gnus-mode-non-string-length
23174                            (+ 21
23175                               (if line-number-mode 5 0)
23176                               (if column-number-mode 4 0)
23177                               (length display-time-string)))))
23178 @end lisp
23179
23180 If this variable is @code{nil} (which is the default), the mode line
23181 strings won't be chopped off, and they won't be padded either.  Note
23182 that the default is unlikely to be desirable, as even the percentage
23183 complete in the buffer may be crowded off the mode line; the user should
23184 configure this variable appropriately for her configuration.
23185
23186
23187 @node Highlighting and Menus
23188 @section Highlighting and Menus
23189 @cindex visual
23190 @cindex highlighting
23191 @cindex menus
23192
23193 @vindex gnus-visual
23194 The @code{gnus-visual} variable controls most of the Gnus-prettifying
23195 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
23196 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
23197 file.
23198
23199 This variable can be a list of visual properties that are enabled.  The
23200 following elements are valid, and are all included by default:
23201
23202 @table @code
23203 @item group-highlight
23204 Do highlights in the group buffer.
23205 @item summary-highlight
23206 Do highlights in the summary buffer.
23207 @item article-highlight
23208 Do highlights in the article buffer.
23209 @item highlight
23210 Turn on highlighting in all buffers.
23211 @item group-menu
23212 Create menus in the group buffer.
23213 @item summary-menu
23214 Create menus in the summary buffers.
23215 @item article-menu
23216 Create menus in the article buffer.
23217 @item browse-menu
23218 Create menus in the browse buffer.
23219 @item server-menu
23220 Create menus in the server buffer.
23221 @item score-menu
23222 Create menus in the score buffers.
23223 @item menu
23224 Create menus in all buffers.
23225 @end table
23226
23227 So if you only want highlighting in the article buffer and menus in all
23228 buffers, you could say something like:
23229
23230 @lisp
23231 (setq gnus-visual '(article-highlight menu))
23232 @end lisp
23233
23234 If you want highlighting only and no menus whatsoever, you'd say:
23235
23236 @lisp
23237 (setq gnus-visual '(highlight))
23238 @end lisp
23239
23240 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
23241 in all Gnus buffers.
23242
23243 Other general variables that influence the look of all buffers include:
23244
23245 @table @code
23246 @item gnus-mouse-face
23247 @vindex gnus-mouse-face
23248 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
23249 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
23250
23251 @end table
23252
23253 There are hooks associated with the creation of all the different menus:
23254
23255 @table @code
23256
23257 @item gnus-article-menu-hook
23258 @vindex gnus-article-menu-hook
23259 Hook called after creating the article mode menu.
23260
23261 @item gnus-group-menu-hook
23262 @vindex gnus-group-menu-hook
23263 Hook called after creating the group mode menu.
23264
23265 @item gnus-summary-menu-hook
23266 @vindex gnus-summary-menu-hook
23267 Hook called after creating the summary mode menu.
23268
23269 @item gnus-server-menu-hook
23270 @vindex gnus-server-menu-hook
23271 Hook called after creating the server mode menu.
23272
23273 @item gnus-browse-menu-hook
23274 @vindex gnus-browse-menu-hook
23275 Hook called after creating the browse mode menu.
23276
23277 @item gnus-score-menu-hook
23278 @vindex gnus-score-menu-hook
23279 Hook called after creating the score mode menu.
23280
23281 @end table
23282
23283
23284 @node Buttons
23285 @section Buttons
23286 @cindex buttons
23287 @cindex mouse
23288 @cindex click
23289
23290 Those new-fangled @dfn{mouse} contraptions is very popular with the
23291 young, hep kids who don't want to learn the proper way to do things
23292 these days.  Why, I remember way back in the summer of '89, when I was
23293 using Emacs on a Tops 20 system.  Three hundred users on one single
23294 machine, and every user was running Simula compilers.  Bah!
23295
23296 Right.
23297
23298 @vindex gnus-carpal
23299 Well, you can make Gnus display bufferfuls of buttons you can click to
23300 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
23301 really.  Tell the chiropractor I sent you.
23302
23303
23304 @table @code
23305
23306 @item gnus-carpal-mode-hook
23307 @vindex gnus-carpal-mode-hook
23308 Hook run in all carpal mode buffers.
23309
23310 @item gnus-carpal-button-face
23311 @vindex gnus-carpal-button-face
23312 Face used on buttons.
23313
23314 @item gnus-carpal-header-face
23315 @vindex gnus-carpal-header-face
23316 Face used on carpal buffer headers.
23317
23318 @item gnus-carpal-group-buffer-buttons
23319 @vindex gnus-carpal-group-buffer-buttons
23320 Buttons in the group buffer.
23321
23322 @item gnus-carpal-summary-buffer-buttons
23323 @vindex gnus-carpal-summary-buffer-buttons
23324 Buttons in the summary buffer.
23325
23326 @item gnus-carpal-server-buffer-buttons
23327 @vindex gnus-carpal-server-buffer-buttons
23328 Buttons in the server buffer.
23329
23330 @item gnus-carpal-browse-buffer-buttons
23331 @vindex gnus-carpal-browse-buffer-buttons
23332 Buttons in the browse buffer.
23333 @end table
23334
23335 All the @code{buttons} variables are lists.  The elements in these list
23336 are either cons cells where the @code{car} contains a text to be displayed and
23337 the @code{cdr} contains a function symbol, or a simple string.
23338
23339
23340 @node Daemons
23341 @section Daemons
23342 @cindex demons
23343 @cindex daemons
23344
23345 Gnus, being larger than any program ever written (allegedly), does lots
23346 of strange stuff that you may wish to have done while you're not
23347 present.  For instance, you may want it to check for new mail once in a
23348 while.  Or you may want it to close down all connections to all servers
23349 when you leave Emacs idle.  And stuff like that.
23350
23351 Gnus will let you do stuff like that by defining various
23352 @dfn{handlers}.  Each handler consists of three elements:  A
23353 @var{function}, a @var{time}, and an @var{idle} parameter.
23354
23355 Here's an example of a handler that closes connections when Emacs has
23356 been idle for thirty minutes:
23357
23358 @lisp
23359 (gnus-demon-close-connections nil 30)
23360 @end lisp
23361
23362 Here's a handler that scans for @acronym{PGP} headers every hour when
23363 Emacs is idle:
23364
23365 @lisp
23366 (gnus-demon-scan-pgp 60 t)
23367 @end lisp
23368
23369 This @var{time} parameter and that @var{idle} parameter work together
23370 in a strange, but wonderful fashion.  Basically, if @var{idle} is
23371 @code{nil}, then the function will be called every @var{time} minutes.
23372
23373 If @var{idle} is @code{t}, then the function will be called after
23374 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
23375 the function will never be called.  But once Emacs goes idle, the
23376 function will be called every @var{time} minutes.
23377
23378 If @var{idle} is a number and @var{time} is a number, the function will
23379 be called every @var{time} minutes only when Emacs has been idle for
23380 @var{idle} minutes.
23381
23382 If @var{idle} is a number and @var{time} is @code{nil}, the function
23383 will be called once every time Emacs has been idle for @var{idle}
23384 minutes.
23385
23386 And if @var{time} is a string, it should look like @samp{07:31}, and
23387 the function will then be called once every day somewhere near that
23388 time.  Modified by the @var{idle} parameter, of course.
23389
23390 @vindex gnus-demon-timestep
23391 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
23392 seconds.  This is 60 by default.  If you change that variable,
23393 all the timings in the handlers will be affected.)
23394
23395 So, if you want to add a handler, you could put something like this in
23396 your @file{~/.gnus.el} file:
23397
23398 @findex gnus-demon-add-handler
23399 @lisp
23400 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
23401 @end lisp
23402
23403 @findex gnus-demon-add-nocem
23404 @findex gnus-demon-add-scanmail
23405 @findex gnus-demon-add-rescan
23406 @findex gnus-demon-add-scan-timestamps
23407 @findex gnus-demon-add-disconnection
23408 Some ready-made functions to do this have been created:
23409 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
23410 @code{gnus-demon-add-nntp-close-connection},
23411 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
23412 @code{gnus-demon-add-scanmail}.  Just put those functions in your
23413 @file{~/.gnus.el} if you want those abilities.
23414
23415 @findex gnus-demon-init
23416 @findex gnus-demon-cancel
23417 @vindex gnus-demon-handlers
23418 If you add handlers to @code{gnus-demon-handlers} directly, you should
23419 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
23420 daemons, you can use the @code{gnus-demon-cancel} function.
23421
23422 Note that adding daemons can be pretty naughty if you over do it.  Adding
23423 functions that scan all news and mail from all servers every two seconds
23424 is a sure-fire way of getting booted off any respectable system.  So
23425 behave.
23426
23427
23428 @node NoCeM
23429 @section NoCeM
23430 @cindex nocem
23431 @cindex spam
23432
23433 @dfn{Spamming} is posting the same article lots and lots of times.
23434 Spamming is bad.  Spamming is evil.
23435
23436 Spamming is usually canceled within a day or so by various anti-spamming
23437 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
23438 NoCeM is pronounced ``no see-'em'', and means what the name
23439 implies---these are messages that make the offending articles, like, go
23440 away.
23441
23442 What use are these NoCeM messages if the articles are canceled anyway?
23443 Some sites do not honor cancel messages and some sites just honor cancels
23444 from a select few people.  Then you may wish to make use of the NoCeM
23445 messages, which are distributed in the newsgroups
23446 @samp{news.lists.filters}, @samp{alt.nocem.misc}, etc.
23447
23448 Gnus can read and parse the messages in this group automatically, and
23449 this will make spam disappear.
23450
23451 There are some variables to customize, of course:
23452
23453 @table @code
23454 @item gnus-use-nocem
23455 @vindex gnus-use-nocem
23456 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
23457 by default.
23458
23459 You can also set this variable to a positive number as a group level.
23460 In that case, Gnus scans NoCeM messages when checking new news if this
23461 value is not exceeding a group level that you specify as the prefix
23462 argument to some commands, e.g. @code{gnus},
23463 @code{gnus-group-get-new-news}, etc.  Otherwise, Gnus does not scan
23464 NoCeM messages if you specify a group level that is smaller than this
23465 value to those commands.  For example, if you use 1 or 2 on the mail
23466 groups and the levels on the news groups remain the default, 3 is the
23467 best choice.
23468
23469 @item gnus-nocem-groups
23470 @vindex gnus-nocem-groups
23471 Gnus will look for NoCeM messages in the groups in this list.  The
23472 default is
23473 @lisp
23474 ("news.lists.filters" "alt.nocem.misc")
23475 @end lisp
23476
23477 @item gnus-nocem-issuers
23478 @vindex gnus-nocem-issuers
23479 There are many people issuing NoCeM messages.  This list says what
23480 people you want to listen to.  The default is:
23481
23482 @lisp
23483 ("Adri Verhoef"
23484  "alba-nocem@@albasani.net"
23485  "bleachbot@@httrack.com"
23486  "news@@arcor-online.net"
23487  "news@@uni-berlin.de"
23488  "nocem@@arcor.de"
23489  "pgpmoose@@killfile.org"
23490  "xjsppl@@gmx.de")
23491 @end lisp
23492
23493 Known despammers that you can put in this list are listed at@*
23494 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
23495
23496 You do not have to heed NoCeM messages from all these people---just the
23497 ones you want to listen to.  You also don't have to accept all NoCeM
23498 messages from the people you like.  Each NoCeM message has a @dfn{type}
23499 header that gives the message a (more or less, usually less) rigorous
23500 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
23501 @samp{binary}, and @samp{troll}.  To specify this, you have to use
23502 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
23503 Each condition is either a string (which is a regexp that matches types
23504 you want to use) or a list on the form @code{(not @var{string})}, where
23505 @var{string} is a regexp that matches types you don't want to use.
23506
23507 For instance, if you want all NoCeM messages from Chris Lewis except his
23508 @samp{troll} messages, you'd say:
23509
23510 @lisp
23511 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
23512 @end lisp
23513
23514 On the other hand, if you just want nothing but his @samp{spam} and
23515 @samp{spew} messages, you'd say:
23516
23517 @lisp
23518 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
23519 @end lisp
23520
23521 The specs are applied left-to-right.
23522
23523
23524 @item gnus-nocem-verifyer
23525 @vindex gnus-nocem-verifyer
23526 @findex gnus-nocem-epg-verify
23527 @findex pgg-verify
23528 This should be a function for verifying that the NoCeM issuer is who she
23529 says she is.  This variable defaults to @code{gnus-nocem-epg-verify} if
23530 EasyPG is available, otherwise defaults to @code{pgg-verify}.  The
23531 function should return non-@code{nil} if the verification is successful,
23532 otherwise (including the case the NoCeM message was not signed) should
23533 return @code{nil}.  If this is too slow and you don't care for
23534 verification (which may be dangerous), you can set this variable to
23535 @code{nil}.
23536
23537 Formerly the default was @code{mc-verify}, which is a Mailcrypt
23538 function.  While you can still use it, you can change it into
23539 @code{gnus-nocem-epg-verify} or @code{pgg-verify} running with GnuPG if
23540 you are willing to add the @acronym{PGP} public keys to GnuPG's keyring.
23541
23542 @item gnus-nocem-directory
23543 @vindex gnus-nocem-directory
23544 This is where Gnus will store its NoCeM cache files.  The default is@*
23545 @file{~/News/NoCeM/}.
23546
23547 @item gnus-nocem-expiry-wait
23548 @vindex gnus-nocem-expiry-wait
23549 The number of days before removing old NoCeM entries from the cache.
23550 The default is 15.  If you make it shorter Gnus will be faster, but you
23551 might then see old spam.
23552
23553 @item gnus-nocem-check-from
23554 @vindex gnus-nocem-check-from
23555 Non-@code{nil} means check for valid issuers in message bodies.
23556 Otherwise don't bother fetching articles unless their author matches a
23557 valid issuer; that is much faster if you are selective about the
23558 issuers.
23559
23560 @item gnus-nocem-check-article-limit
23561 @vindex gnus-nocem-check-article-limit
23562 If non-@code{nil}, the maximum number of articles to check in any NoCeM
23563 group.  @code{nil} means no restriction.  NoCeM groups can be huge and
23564 very slow to process.
23565
23566 @end table
23567
23568 Using NoCeM could potentially be a memory hog.  If you have many living
23569 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
23570 big.  If this is a problem, you should kill off all (or most) of your
23571 unsubscribed groups (@pxref{Subscription Commands}).
23572
23573
23574 @node Undo
23575 @section Undo
23576 @cindex undo
23577
23578 It is very useful to be able to undo actions one has done.  In normal
23579 Emacs buffers, it's easy enough---you just push the @code{undo} button.
23580 In Gnus buffers, however, it isn't that simple.
23581
23582 The things Gnus displays in its buffer is of no value whatsoever to
23583 Gnus---it's all just data designed to look nice to the user.
23584 Killing a group in the group buffer with @kbd{C-k} makes the line
23585 disappear, but that's just a side-effect of the real action---the
23586 removal of the group in question from the internal Gnus structures.
23587 Undoing something like that can't be done by the normal Emacs
23588 @code{undo} function.
23589
23590 Gnus tries to remedy this somewhat by keeping track of what the user
23591 does and coming up with actions that would reverse the actions the user
23592 takes.  When the user then presses the @code{undo} key, Gnus will run
23593 the code to reverse the previous action, or the previous actions.
23594 However, not all actions are easily reversible, so Gnus currently offers
23595 a few key functions to be undoable.  These include killing groups,
23596 yanking groups, and changing the list of read articles of groups.
23597 That's it, really.  More functions may be added in the future, but each
23598 added function means an increase in data to be stored, so Gnus will
23599 never be totally undoable.
23600
23601 @findex gnus-undo-mode
23602 @vindex gnus-use-undo
23603 @findex gnus-undo
23604 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
23605 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
23606 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
23607 command, which should feel kinda like the normal Emacs @code{undo}
23608 command.
23609
23610
23611 @node Predicate Specifiers
23612 @section Predicate Specifiers
23613 @cindex predicate specifiers
23614
23615 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
23616 form that allows flexible specification of predicates without having
23617 to type all that much.
23618
23619 These specifiers are lists consisting of functions, symbols and lists.
23620
23621 Here's an example:
23622
23623 @lisp
23624 (or gnus-article-unseen-p
23625     gnus-article-unread-p)
23626 @end lisp
23627
23628 The available symbols are @code{or}, @code{and} and @code{not}.  The
23629 functions all take one parameter.
23630
23631 @findex gnus-make-predicate
23632 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
23633 to create a function that can be called.  This input parameter to this
23634 function will be passed along to all the functions in the predicate
23635 specifier.
23636
23637
23638 @node Moderation
23639 @section Moderation
23640 @cindex moderation
23641
23642 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
23643 It is not included in the standard Gnus package.  Write a mail to
23644 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
23645 get a copy.
23646
23647 The moderation package is implemented as a minor mode for summary
23648 buffers.  Put
23649
23650 @lisp
23651 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
23652 @end lisp
23653
23654 in your @file{~/.gnus.el} file.
23655
23656 If you are the moderator of @samp{rec.zoofle}, this is how it's
23657 supposed to work:
23658
23659 @enumerate
23660 @item
23661 You split your incoming mail by matching on
23662 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
23663 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
23664
23665 @item
23666 You enter that group once in a while and post articles using the @kbd{e}
23667 (edit-and-post) or @kbd{s} (just send unedited) commands.
23668
23669 @item
23670 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
23671 articles that weren't approved by you, you can cancel them with the
23672 @kbd{c} command.
23673 @end enumerate
23674
23675 To use moderation mode in these two groups, say:
23676
23677 @lisp
23678 (setq gnus-moderated-list
23679       "^nnml:rec.zoofle$\\|^rec.zoofle$")
23680 @end lisp
23681
23682
23683 @node Fetching a Group
23684 @section Fetching a Group
23685 @cindex fetching a group
23686
23687 @findex gnus-fetch-group
23688 It is sometimes convenient to be able to just say ``I want to read this
23689 group and I don't care whether Gnus has been started or not''.  This is
23690 perhaps more useful for people who write code than for users, but the
23691 command @code{gnus-fetch-group} provides this functionality in any case.
23692 It takes the group name as a parameter.
23693
23694
23695 @node Image Enhancements
23696 @section Image Enhancements
23697
23698 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
23699 support images, Emacs 22 does.} and up, are able to display pictures and
23700 stuff, so Gnus has taken advantage of that.
23701
23702 @menu
23703 * X-Face::                      Display a funky, teensy black-and-white image.
23704 * Face::                        Display a funkier, teensier colored image.
23705 * Smileys::                     Show all those happy faces the way they were meant to be shown.
23706 * Picons::                      How to display pictures of what you're reading.
23707 * XVarious::                    Other XEmacsy Gnusey variables.
23708 @end menu
23709
23710
23711 @node X-Face
23712 @subsection X-Face
23713 @cindex x-face
23714
23715 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
23716 depth) image that's supposed to represent the author of the message.
23717 It seems to be supported by an ever-growing number of mail and news
23718 readers.
23719
23720 @cindex x-face
23721 @findex gnus-article-display-x-face
23722 @vindex gnus-article-x-face-command
23723 @vindex gnus-article-x-face-too-ugly
23724 @iftex
23725 @iflatex
23726 \include{xface}
23727 @end iflatex
23728 @end iftex
23729 @c @anchor{X-Face}
23730
23731 Viewing an @code{X-Face} header either requires an Emacs that has
23732 @samp{compface} support (which most XEmacs versions have), or that you
23733 have suitable conversion or display programs installed.  If your Emacs
23734 has image support the default action is to display the face before the
23735 @code{From} header.  If there's no native @code{X-Face} support, Gnus
23736 will try to convert the @code{X-Face} header using external programs
23737 from the @code{pbmplus} package and friends, see below.  For XEmacs it's
23738 faster if XEmacs has been compiled with @code{X-Face} support.  The
23739 default action under Emacs without image support is to fork off the
23740 @code{display} program.
23741
23742 On a GNU/Linux system, the @code{display} program is included in the
23743 ImageMagick package.  For external conversion programs look for packages
23744 with names like @code{netpbm}, @code{libgr-progs} and @code{compface}.
23745 On Windows, you may use the packages @code{netpbm} and @code{compface}
23746 from @url{http://gnuwin32.sourceforge.net}.  You need to add the
23747 @code{bin} directory to your @code{PATH} environment variable.
23748 @c In fact only the following DLLs and binaries seem to be required:
23749 @c compface1.dll uncompface.exe libnetpbm10.dll icontopbm.exe
23750
23751 The variable @code{gnus-article-x-face-command} controls which programs
23752 are used to display the @code{X-Face} header.  If this variable is a
23753 string, this string will be executed in a sub-shell.  If it is a
23754 function, this function will be called with the face as the argument.
23755 If @code{gnus-article-x-face-too-ugly} (which is a regexp) matches the
23756 @code{From} header, the face will not be shown.
23757
23758 (Note: @code{x-face} is used in the variable/function names, not
23759 @code{xface}).
23760
23761 @noindent
23762 Face and variable:
23763
23764 @table @code
23765 @item gnus-x-face
23766 @vindex gnus-x-face
23767 Face to show X-Face.  The colors from this face are used as the
23768 foreground and background colors of the displayed X-Faces.  The
23769 default colors are black and white.
23770
23771 @item gnus-face-properties-alist
23772 @vindex gnus-face-properties-alist
23773 Alist of image types and properties applied to Face (@pxref{Face}) and
23774 X-Face images.  The default value is @code{((pbm . (:face gnus-x-face))
23775 (png . nil))} for Emacs or @code{((xface . (:face gnus-x-face)))} for
23776 XEmacs.  Here are examples:
23777
23778 @lisp
23779 ;; Specify the altitude of Face and X-Face images in the From header.
23780 (setq gnus-face-properties-alist
23781       '((pbm . (:face gnus-x-face :ascent 80))
23782         (png . (:ascent 80))))
23783
23784 ;; Show Face and X-Face images as pressed buttons.
23785 (setq gnus-face-properties-alist
23786       '((pbm . (:face gnus-x-face :relief -2))
23787         (png . (:relief -2))))
23788 @end lisp
23789
23790 @pxref{Image Descriptors, ,Image Descriptors, elisp, The Emacs Lisp
23791 Reference Manual} for the valid properties for various image types.
23792 Currently, @code{pbm} is used for X-Face images and @code{png} is used
23793 for Face images in Emacs.  Only the @code{:face} property is effective
23794 on the @code{xface} image type in XEmacs if it is built with the
23795 @samp{libcompface} library.
23796 @end table
23797
23798 If you use posting styles, you can use an @code{x-face-file} entry in
23799 @code{gnus-posting-styles}, @xref{Posting Styles}.  If you don't, Gnus
23800 provides a few convenience functions and variables to allow easier
23801 insertion of X-Face headers in outgoing messages.  You also need the
23802 above mentioned ImageMagick, netpbm or other image conversion packages
23803 (depending the values of the variables below) for these functions.
23804
23805 @findex gnus-random-x-face
23806 @vindex gnus-convert-pbm-to-x-face-command
23807 @vindex gnus-x-face-directory
23808 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
23809 @code{gnus-x-face-directory} and picks one at random, and then
23810 converts it to the X-Face format by using the
23811 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
23812 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
23813 header data as a string.
23814
23815 @findex gnus-insert-random-x-face-header
23816 @code{gnus-insert-random-x-face-header} calls
23817 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
23818 randomly generated data.
23819
23820 @findex gnus-x-face-from-file
23821 @vindex gnus-convert-image-to-x-face-command
23822 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
23823 converts the file to X-Face format by using the
23824 @code{gnus-convert-image-to-x-face-command} shell command.
23825
23826 Here's how you would typically use the first function.  Put something
23827 like the following in your @file{~/.gnus.el} file:
23828
23829 @lisp
23830 (setq message-required-news-headers
23831       (nconc message-required-news-headers
23832              (list '(X-Face . gnus-random-x-face))))
23833 @end lisp
23834
23835 Using the last function would be something like this:
23836
23837 @lisp
23838 (setq message-required-news-headers
23839       (nconc message-required-news-headers
23840              (list '(X-Face . (lambda ()
23841                                 (gnus-x-face-from-file
23842                                  "~/My-face.gif"))))))
23843 @end lisp
23844
23845
23846 @node Face
23847 @subsection Face
23848 @cindex face
23849
23850 @c #### FIXME: faces and x-faces' implementations should really be harmonized.
23851
23852 @code{Face} headers are essentially a funkier version of @code{X-Face}
23853 ones. They describe a 48x48 pixel colored image that's supposed to
23854 represent the author of the message.
23855
23856 @cindex face
23857 @findex gnus-article-display-face
23858 The contents of a @code{Face} header must be a base64 encoded PNG image.
23859 See @uref{http://quimby.gnus.org/circus/face/} for the precise
23860 specifications.
23861
23862 The @code{gnus-face-properties-alist} variable affects the appearance of
23863 displayed Face images.  @xref{X-Face}.
23864
23865 Viewing an @code{Face} header requires an Emacs that is able to display
23866 PNG images.
23867 @c Maybe add this:
23868 @c (if (featurep 'xemacs)
23869 @c     (featurep 'png)
23870 @c   (image-type-available-p 'png))
23871
23872 Gnus provides a few convenience functions and variables to allow
23873 easier insertion of Face headers in outgoing messages.
23874
23875 @findex gnus-convert-png-to-face
23876 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
23877 726 bytes long, and converts it to a face.
23878
23879 @findex gnus-face-from-file
23880 @vindex gnus-convert-image-to-face-command
23881 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
23882 converts the file to Face format by using the
23883 @code{gnus-convert-image-to-face-command} shell command.
23884
23885 Here's how you would typically use this function. Put something like the
23886 following in your @file{~/.gnus.el} file:
23887
23888 @lisp
23889 (setq message-required-news-headers
23890       (nconc message-required-news-headers
23891              (list '(Face . (lambda ()
23892                               (gnus-face-from-file "~/face.jpg"))))))
23893 @end lisp
23894
23895
23896 @node Smileys
23897 @subsection Smileys
23898 @cindex smileys
23899
23900 @iftex
23901 @iflatex
23902 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
23903 \input{smiley}
23904 @end iflatex
23905 @end iftex
23906
23907 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
23908 currently the only package that uses Smiley, it is documented here.
23909
23910 In short---to use Smiley in Gnus, put the following in your
23911 @file{~/.gnus.el} file:
23912
23913 @lisp
23914 (setq gnus-treat-display-smileys t)
23915 @end lisp
23916
23917 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
23918 the like---to pictures and displays those instead of the text smiley
23919 faces.  The conversion is controlled by a list of regexps that matches
23920 text and maps that to file names.
23921
23922 @vindex smiley-regexp-alist
23923 The alist used is specified by the @code{smiley-regexp-alist}
23924 variable.  The first item in each element is the regexp to be matched;
23925 the second element is the regexp match group that is to be replaced by
23926 the picture; and the third element is the name of the file to be
23927 displayed.
23928
23929 The following variables customize the appearance of the smileys:
23930
23931 @table @code
23932
23933 @item smiley-style
23934 @vindex smiley-style
23935 Specifies the smiley style.  Predefined smiley styles include
23936 @code{low-color} (small 13x14 pixel, three-color images), @code{medium}
23937 (more colorful images, 16x16 pixel), and @code{grayscale} (grayscale
23938 images, 14x14 pixel).  The default depends on the height of the default
23939 face.
23940
23941 @item smiley-data-directory
23942 @vindex smiley-data-directory
23943 Where Smiley will look for smiley faces files.  You shouldn't set this
23944 variable anymore.  Customize @code{smiley-style} instead.
23945
23946 @item gnus-smiley-file-types
23947 @vindex gnus-smiley-file-types
23948 List of suffixes on smiley file names to try.
23949
23950 @end table
23951
23952
23953 @node Picons
23954 @subsection Picons
23955
23956 @iftex
23957 @iflatex
23958 \include{picons}
23959 @end iflatex
23960 @end iftex
23961
23962 So@dots{}  You want to slow down your news reader even more!  This is a
23963 good way to do so.  It's also a great way to impress people staring
23964 over your shoulder as you read news.
23965
23966 What are Picons?  To quote directly from the Picons Web site:
23967
23968 @iftex
23969 @iflatex
23970 \margindex{}
23971 @end iflatex
23972 @end iftex
23973
23974 @quotation
23975 @dfn{Picons} is short for ``personal icons''.  They're small,
23976 constrained images used to represent users and domains on the net,
23977 organized into databases so that the appropriate image for a given
23978 e-mail address can be found.  Besides users and domains, there are picon
23979 databases for Usenet newsgroups and weather forecasts.  The picons are
23980 in either monochrome @code{XBM} format or color @code{XPM} and
23981 @code{GIF} formats.
23982 @end quotation
23983
23984 @vindex gnus-picon-databases
23985 For instructions on obtaining and installing the picons databases,
23986 point your Web browser at
23987 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
23988
23989 If you are using Debian GNU/Linux, saying @samp{apt-get install
23990 picons.*} will install the picons where Gnus can find them.
23991
23992 To enable displaying picons, simply make sure that
23993 @code{gnus-picon-databases} points to the directory containing the
23994 Picons databases.
23995
23996 @vindex gnus-picon-style
23997 The variable @code{gnus-picon-style} controls how picons are displayed.
23998 If @code{inline}, the textual representation is replaced.  If
23999 @code{right}, picons are added right to the textual representation.
24000
24001 The following variables offer control over where things are located.
24002
24003 @table @code
24004
24005 @item gnus-picon-databases
24006 @vindex gnus-picon-databases
24007 The location of the picons database.  This is a list of directories
24008 containing the @file{news}, @file{domains}, @file{users} (and so on)
24009 subdirectories.  Defaults to @code{("/usr/lib/picon"
24010 "/usr/local/faces")}.
24011
24012 @item gnus-picon-news-directories
24013 @vindex gnus-picon-news-directories
24014 List of subdirectories to search in @code{gnus-picon-databases} for
24015 newsgroups faces.  @code{("news")} is the default.
24016
24017 @item gnus-picon-user-directories
24018 @vindex gnus-picon-user-directories
24019 List of subdirectories to search in @code{gnus-picon-databases} for user
24020 faces.  @code{("users" "usenix" "local" "misc")} is the default.
24021
24022 @item gnus-picon-domain-directories
24023 @vindex gnus-picon-domain-directories
24024 List of subdirectories to search in @code{gnus-picon-databases} for
24025 domain name faces.  Defaults to @code{("domains")}.  Some people may
24026 want to add @samp{"unknown"} to this list.
24027
24028 @item gnus-picon-file-types
24029 @vindex gnus-picon-file-types
24030 Ordered list of suffixes on picon file names to try.  Defaults to
24031 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
24032
24033 @end table
24034
24035
24036 @node XVarious
24037 @subsection Various XEmacs Variables
24038
24039 @table @code
24040 @item gnus-xmas-glyph-directory
24041 @vindex gnus-xmas-glyph-directory
24042 This is where Gnus will look for pictures.  Gnus will normally
24043 auto-detect this directory, but you may set it manually if you have an
24044 unusual directory structure.
24045
24046 @item gnus-xmas-modeline-glyph
24047 @vindex gnus-xmas-modeline-glyph
24048 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
24049 default.
24050
24051 @end table
24052
24053 @subsubsection Toolbar
24054
24055 @table @code
24056
24057 @item gnus-use-toolbar
24058 @vindex gnus-use-toolbar
24059 This variable specifies the position to display the toolbar.  If
24060 @code{nil}, don't display toolbars.  If it is non-@code{nil}, it should
24061 be one of the symbols @code{default}, @code{top}, @code{bottom},
24062 @code{right}, and @code{left}.  @code{default} means to use the default
24063 toolbar, the rest mean to display the toolbar on the place which those
24064 names show.  The default is @code{default}.
24065
24066 @item gnus-toolbar-thickness
24067 @vindex gnus-toolbar-thickness
24068 Cons of the height and the width specifying the thickness of a toolbar.
24069 The height is used for the toolbar displayed on the top or the bottom,
24070 the width is used for the toolbar displayed on the right or the left.
24071 The default is that of the default toolbar.
24072
24073 @item gnus-group-toolbar
24074 @vindex gnus-group-toolbar
24075 The toolbar in the group buffer.
24076
24077 @item gnus-summary-toolbar
24078 @vindex gnus-summary-toolbar
24079 The toolbar in the summary buffer.
24080
24081 @item gnus-summary-mail-toolbar
24082 @vindex gnus-summary-mail-toolbar
24083 The toolbar in the summary buffer of mail groups.
24084
24085 @end table
24086
24087 @iftex
24088 @iflatex
24089 \margindex{}
24090 @end iflatex
24091 @end iftex
24092
24093
24094 @node Fuzzy Matching
24095 @section Fuzzy Matching
24096 @cindex fuzzy matching
24097
24098 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
24099 things like scoring, thread gathering and thread comparison.
24100
24101 As opposed to regular expression matching, fuzzy matching is very fuzzy.
24102 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
24103 means, and the implementation has changed over time.
24104
24105 Basically, it tries to remove all noise from lines before comparing.
24106 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
24107 out of the strings before comparing the results.  This often leads to
24108 adequate results---even when faced with strings generated by text
24109 manglers masquerading as newsreaders.
24110
24111
24112 @node Thwarting Email Spam
24113 @section Thwarting Email Spam
24114 @cindex email spam
24115 @cindex spam
24116 @cindex UCE
24117 @cindex unsolicited commercial email
24118
24119 In these last days of the Usenet, commercial vultures are hanging about
24120 and grepping through news like crazy to find email addresses they can
24121 foist off their scams and products to.  As a reaction to this, many
24122 people have started putting nonsense addresses into their @code{From}
24123 lines.  I think this is counterproductive---it makes it difficult for
24124 people to send you legitimate mail in response to things you write, as
24125 well as making it difficult to see who wrote what.  This rewriting may
24126 perhaps be a bigger menace than the unsolicited commercial email itself
24127 in the end.
24128
24129 The biggest problem I have with email spam is that it comes in under
24130 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
24131 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
24132 mail group, only to find two pyramid schemes, seven advertisements
24133 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
24134 and one mail asking me to repent and find some god.
24135
24136 This is annoying.  Here's what you can do about it.
24137
24138 @menu
24139 * The problem of spam::         Some background, and some solutions
24140 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
24141 * SpamAssassin::                How to use external anti-spam tools.
24142 * Hashcash::                    Reduce spam by burning CPU time.
24143 @end menu
24144
24145 @node The problem of spam
24146 @subsection The problem of spam
24147 @cindex email spam
24148 @cindex spam filtering approaches
24149 @cindex filtering approaches, spam
24150 @cindex UCE
24151 @cindex unsolicited commercial email
24152
24153 First, some background on spam.
24154
24155 If you have access to e-mail, you are familiar with spam (technically
24156 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it
24157 exists because e-mail delivery is very cheap compared to paper mail,
24158 so only a very small percentage of people need to respond to an UCE to
24159 make it worthwhile to the advertiser.  Ironically, one of the most
24160 common spams is the one offering a database of e-mail addresses for
24161 further spamming.  Senders of spam are usually called @emph{spammers},
24162 but terms like @emph{vermin}, @emph{scum}, @emph{sociopaths}, and
24163 @emph{morons} are in common use as well.
24164
24165 Spam comes from a wide variety of sources.  It is simply impossible to
24166 dispose of all spam without discarding useful messages.  A good
24167 example is the TMDA system, which requires senders
24168 unknown to you to confirm themselves as legitimate senders before
24169 their e-mail can reach you.  Without getting into the technical side
24170 of TMDA, a downside is clearly that e-mail from legitimate sources may
24171 be discarded if those sources can't or won't confirm themselves
24172 through the TMDA system.  Another problem with TMDA is that it
24173 requires its users to have a basic understanding of e-mail delivery
24174 and processing.
24175
24176 The simplest approach to filtering spam is filtering, at the mail
24177 server or when you sort through incoming mail.  If you get 200 spam
24178 messages per day from @samp{random-address@@vmadmin.com}, you block
24179 @samp{vmadmin.com}.  If you get 200 messages about @samp{VIAGRA}, you
24180 discard all messages with @samp{VIAGRA} in the message.  If you get
24181 lots of spam from Bulgaria, for example, you try to filter all mail
24182 from Bulgarian IPs.
24183
24184 This, unfortunately, is a great way to discard legitimate e-mail.  The
24185 risks of blocking a whole country (Bulgaria, Norway, Nigeria, China,
24186 etc.) or even a continent (Asia, Africa, Europe, etc.) from contacting
24187 you should be obvious, so don't do it if you have the choice.
24188
24189 In another instance, the very informative and useful RISKS digest has
24190 been blocked by overzealous mail filters because it @strong{contained}
24191 words that were common in spam messages.  Nevertheless, in isolated
24192 cases, with great care, direct filtering of mail can be useful.
24193
24194 Another approach to filtering e-mail is the distributed spam
24195 processing, for instance DCC implements such a system.  In essence,
24196 @var{N} systems around the world agree that a machine @var{X} in
24197 Ghana, Estonia, or California is sending out spam e-mail, and these
24198 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into a
24199 database.  The criteria for spam detection vary---it may be the number
24200 of messages sent, the content of the messages, and so on.  When a user
24201 of the distributed processing system wants to find out if a message is
24202 spam, he consults one of those @var{N} systems.
24203
24204 Distributed spam processing works very well against spammers that send
24205 a large number of messages at once, but it requires the user to set up
24206 fairly complicated checks.  There are commercial and free distributed
24207 spam processing systems.  Distributed spam processing has its risks as
24208 well.  For instance legitimate e-mail senders have been accused of
24209 sending spam, and their web sites and mailing lists have been shut
24210 down for some time because of the incident.
24211
24212 The statistical approach to spam filtering is also popular.  It is
24213 based on a statistical analysis of previous spam messages.  Usually
24214 the analysis is a simple word frequency count, with perhaps pairs of
24215 words or 3-word combinations thrown into the mix.  Statistical
24216 analysis of spam works very well in most of the cases, but it can
24217 classify legitimate e-mail as spam in some cases.  It takes time to
24218 run the analysis, the full message must be analyzed, and the user has
24219 to store the database of spam analysis.  Statistical analysis on the
24220 server is gaining popularity.  This has the advantage of letting the
24221 user Just Read Mail, but has the disadvantage that it's harder to tell
24222 the server that it has misclassified mail.
24223
24224 Fighting spam is not easy, no matter what anyone says.  There is no
24225 magic switch that will distinguish Viagra ads from Mom's e-mails.
24226 Even people are having a hard time telling spam apart from non-spam,
24227 because spammers are actively looking to fool us into thinking they
24228 are Mom, essentially.  Spamming is irritating, irresponsible, and
24229 idiotic behavior from a bunch of people who think the world owes them
24230 a favor.  We hope the following sections will help you in fighting the
24231 spam plague.
24232
24233 @node Anti-Spam Basics
24234 @subsection Anti-Spam Basics
24235 @cindex email spam
24236 @cindex spam
24237 @cindex UCE
24238 @cindex unsolicited commercial email
24239
24240 One way of dealing with spam is having Gnus split out all spam into a
24241 @samp{spam} mail group (@pxref{Splitting Mail}).
24242
24243 First, pick one (1) valid mail address that you can be reached at, and
24244 put it in your @code{From} header of all your news articles.  (I've
24245 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
24246 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
24247 sysadmin whether your sendmail installation accepts keywords in the local
24248 part of the mail address.)
24249
24250 @lisp
24251 (setq message-default-news-headers
24252       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
24253 @end lisp
24254
24255 Then put the following split rule in @code{nnmail-split-fancy}
24256 (@pxref{Fancy Mail Splitting}):
24257
24258 @lisp
24259 (...
24260  (to "larsi@@trym.ifi.uio.no"
24261      (| ("subject" "re:.*" "misc")
24262         ("references" ".*@@.*" "misc")
24263         "spam"))
24264  ...)
24265 @end lisp
24266
24267 This says that all mail to this address is suspect, but if it has a
24268 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
24269 header, it's probably ok.  All the rest goes to the @samp{spam} group.
24270 (This idea probably comes from Tim Pierce.)
24271
24272 In addition, many mail spammers talk directly to your @acronym{SMTP} server
24273 and do not include your email address explicitly in the @code{To}
24274 header.  Why they do this is unknown---perhaps it's to thwart this
24275 thwarting scheme?  In any case, this is trivial to deal with---you just
24276 put anything not addressed to you in the @samp{spam} group by ending
24277 your fancy split rule in this way:
24278
24279 @lisp
24280 (
24281  ...
24282  (to "larsi" "misc")
24283  "spam")
24284 @end lisp
24285
24286 In my experience, this will sort virtually everything into the right
24287 group.  You still have to check the @samp{spam} group from time to time to
24288 check for legitimate mail, though.  If you feel like being a good net
24289 citizen, you can even send off complaints to the proper authorities on
24290 each unsolicited commercial email---at your leisure.
24291
24292 This works for me.  It allows people an easy way to contact me (they can
24293 just press @kbd{r} in the usual way), and I'm not bothered at all with
24294 spam.  It's a win-win situation.  Forging @code{From} headers to point
24295 to non-existent domains is yucky, in my opinion.
24296
24297 Be careful with this approach.  Spammers are wise to it.
24298
24299
24300 @node SpamAssassin
24301 @subsection SpamAssassin, Vipul's Razor, DCC, etc
24302 @cindex SpamAssassin
24303 @cindex Vipul's Razor
24304 @cindex DCC
24305
24306 The days where the hints in the previous section were sufficient in
24307 avoiding spam are coming to an end.  There are many tools out there
24308 that claim to reduce the amount of spam you get.  This section could
24309 easily become outdated fast, as new products replace old, but
24310 fortunately most of these tools seem to have similar interfaces.  Even
24311 though this section will use SpamAssassin as an example, it should be
24312 easy to adapt it to most other tools.
24313
24314 Note that this section does not involve the @code{spam.el} package,
24315 which is discussed in the next section.  If you don't care for all
24316 the features of @code{spam.el}, you can make do with these simple
24317 recipes.
24318
24319 If the tool you are using is not installed on the mail server, you
24320 need to invoke it yourself.  Ideas on how to use the
24321 @code{:postscript} mail source parameter (@pxref{Mail Source
24322 Specifiers}) follow.
24323
24324 @lisp
24325 (setq mail-sources
24326       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
24327         (pop :user "jrl"
24328              :server "pophost"
24329              :postscript
24330              "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
24331 @end lisp
24332
24333 Once you manage to process your incoming spool somehow, thus making
24334 the mail contain e.g.@: a header indicating it is spam, you are ready to
24335 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
24336
24337 @lisp
24338 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
24339                              ...))
24340 @end lisp
24341
24342 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
24343
24344 @lisp
24345 (setq nnmail-split-methods 'nnmail-split-fancy
24346       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
24347                              ...))
24348 @end lisp
24349
24350 Some people might not like the idea of piping the mail through various
24351 programs using a @code{:prescript} (if some program is buggy, you
24352 might lose all mail).  If you are one of them, another solution is to
24353 call the external tools during splitting.  Example fancy split method:
24354
24355 @lisp
24356 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
24357                              ...))
24358 (defun kevin-spamassassin ()
24359   (save-excursion
24360     (save-restriction
24361       (widen)
24362       (if (eq 1 (call-process-region (point-min) (point-max)
24363                                      "spamc" nil nil nil "-c"))
24364           "spam"))))
24365 @end lisp
24366
24367 Note that with the nnimap back end, message bodies will not be
24368 downloaded by default.  You need to set
24369 @code{nnimap-split-download-body} to @code{t} to do that
24370 (@pxref{Splitting in IMAP}).
24371
24372 That is about it.  As some spam is likely to get through anyway, you
24373 might want to have a nifty function to call when you happen to read
24374 spam.  And here is the nifty function:
24375
24376 @lisp
24377 (defun my-gnus-raze-spam ()
24378   "Submit SPAM to Vipul's Razor, then mark it as expirable."
24379   (interactive)
24380   (gnus-summary-save-in-pipe "razor-report -f -d" t)
24381   (gnus-summary-mark-as-expirable 1))
24382 @end lisp
24383
24384 @node Hashcash
24385 @subsection Hashcash
24386 @cindex hashcash
24387
24388 A novel technique to fight spam is to require senders to do something
24389 costly and demonstrably unique for each message they send.  This has
24390 the obvious drawback that you cannot rely on everyone in the world
24391 using this technique, since it is not part of the Internet standards,
24392 but it may be useful in smaller communities.
24393
24394 While the tools in the previous section work well in practice, they
24395 work only because the tools are constantly maintained and updated as
24396 new form of spam appears.  This means that a small percentage of spam
24397 will always get through.  It also means that somewhere, someone needs
24398 to read lots of spam to update these tools.  Hashcash avoids that, but
24399 instead prefers that everyone you contact through e-mail supports the
24400 scheme.  You can view the two approaches as pragmatic vs dogmatic.
24401 The approaches have their own advantages and disadvantages, but as
24402 often in the real world, a combination of them is stronger than either
24403 one of them separately.
24404
24405 @cindex X-Hashcash
24406 The ``something costly'' is to burn CPU time, more specifically to
24407 compute a hash collision up to a certain number of bits.  The
24408 resulting hashcash cookie is inserted in a @samp{X-Hashcash:} header.
24409 For more details, and for the external application @code{hashcash} you
24410 need to install to use this feature, see
24411 @uref{http://www.hashcash.org/}.  Even more information can be found
24412 at @uref{http://www.camram.org/}.
24413
24414 If you wish to generate hashcash for each message you send, you can
24415 customize @code{message-generate-hashcash} (@pxref{Mail Headers, ,Mail
24416 Headers,message, The Message Manual}), as in:
24417
24418 @lisp
24419 (setq message-generate-hashcash t)
24420 @end lisp
24421
24422 You will need to set up some additional variables as well:
24423
24424 @table @code
24425
24426 @item hashcash-default-payment
24427 @vindex hashcash-default-payment
24428 This variable indicates the default number of bits the hash collision
24429 should consist of.  By default this is 20.  Suggested useful values
24430 include 17 to 29.
24431
24432 @item hashcash-payment-alist
24433 @vindex hashcash-payment-alist
24434 Some receivers may require you to spend burn more CPU time than the
24435 default.  This variable contains a list of @samp{(@var{addr}
24436 @var{amount})} cells, where @var{addr} is the receiver (email address
24437 or newsgroup) and @var{amount} is the number of bits in the collision
24438 that is needed.  It can also contain @samp{(@var{addr} @var{string}
24439 @var{amount})} cells, where the @var{string} is the string to use
24440 (normally the email address or newsgroup name is used).
24441
24442 @item hashcash-path
24443 @vindex hashcash-path
24444 Where the @code{hashcash} binary is installed.  This variable should
24445 be automatically set by @code{executable-find}, but if it's @code{nil}
24446 (usually because the @code{hashcash} binary is not in your path)
24447 you'll get a warning when you check hashcash payments and an error
24448 when you generate hashcash payments.
24449
24450 @end table
24451
24452 Gnus can verify hashcash cookies, although this can also be done by
24453 hand customized mail filtering scripts.  To verify a hashcash cookie
24454 in a message, use the @code{mail-check-payment} function in the
24455 @code{hashcash.el} library.  You can also use the @code{spam.el}
24456 package with the @code{spam-use-hashcash} back end to validate hashcash
24457 cookies in incoming mail and filter mail accordingly (@pxref{Anti-spam
24458 Hashcash Payments}).
24459
24460 @node Spam Package
24461 @section Spam Package
24462 @cindex spam filtering
24463 @cindex spam
24464
24465 The Spam package provides Gnus with a centralized mechanism for
24466 detecting and filtering spam.  It filters new mail, and processes
24467 messages according to whether they are spam or ham.  (@dfn{Ham} is the
24468 name used throughout this manual to indicate non-spam messages.)
24469
24470 @menu
24471 * Spam Package Introduction::
24472 * Filtering Incoming Mail::
24473 * Detecting Spam in Groups::
24474 * Spam and Ham Processors::
24475 * Spam Package Configuration Examples::
24476 * Spam Back Ends::
24477 * Extending the Spam package::
24478 * Spam Statistics Package::
24479 @end menu
24480
24481 @node Spam Package Introduction
24482 @subsection Spam Package Introduction
24483 @cindex spam filtering
24484 @cindex spam filtering sequence of events
24485 @cindex spam
24486
24487 You must read this section to understand how the Spam package works.
24488 Do not skip, speed-read, or glance through this section.
24489
24490 Make sure you read the section on the @code{spam.el} sequence of
24491 events.  See @xref{Extending the Spam package}.
24492
24493 @cindex spam-initialize
24494 @vindex spam-use-stat
24495 To use the Spam package, you @strong{must} first run the function
24496 @code{spam-initialize}:
24497
24498 @example
24499 (spam-initialize)
24500 @end example
24501
24502 This autoloads @code{spam.el} and installs the various hooks necessary
24503 to let the Spam package do its job.  In order to make use of the Spam
24504 package, you have to set up certain group parameters and variables,
24505 which we will describe below.  All of the variables controlling the
24506 Spam package can be found in the @samp{spam} customization group.
24507
24508 There are two ``contact points'' between the Spam package and the rest
24509 of Gnus: checking new mail for spam, and leaving a group.
24510
24511 Checking new mail for spam is done in one of two ways: while splitting
24512 incoming mail, or when you enter a group.
24513
24514 The first way, checking for spam while splitting incoming mail, is
24515 suited to mail back ends such as @code{nnml} or @code{nnimap}, where
24516 new mail appears in a single spool file.  The Spam package processes
24517 incoming mail, and sends mail considered to be spam to a designated
24518 ``spam'' group.  @xref{Filtering Incoming Mail}.
24519
24520 The second way is suited to back ends such as @code{nntp}, which have
24521 no incoming mail spool, or back ends where the server is in charge of
24522 splitting incoming mail.  In this case, when you enter a Gnus group,
24523 the unseen or unread messages in that group are checked for spam.
24524 Detected spam messages are marked as spam.  @xref{Detecting Spam in
24525 Groups}.
24526
24527 @cindex spam back ends
24528 In either case, you have to tell the Spam package what method to use
24529 to detect spam messages.  There are several methods, or @dfn{spam back
24530 ends} (not to be confused with Gnus back ends!) to choose from: spam
24531 ``blacklists'' and ``whitelists'', dictionary-based filters, and so
24532 forth.  @xref{Spam Back Ends}.
24533
24534 In the Gnus summary buffer, messages that have been identified as spam
24535 always appear with a @samp{$} symbol.
24536
24537 The Spam package divides Gnus groups into three categories: ham
24538 groups, spam groups, and unclassified groups.  You should mark each of
24539 the groups you subscribe to as either a ham group or a spam group,
24540 using the @code{spam-contents} group parameter (@pxref{Group
24541 Parameters}).  Spam groups have a special property: when you enter a
24542 spam group, all unseen articles are marked as spam.  Thus, mail split
24543 into a spam group is automatically marked as spam.
24544
24545 Identifying spam messages is only half of the Spam package's job.  The
24546 second half comes into play whenever you exit a group buffer.  At this
24547 point, the Spam package does several things:
24548
24549 First, it calls @dfn{spam and ham processors} to process the articles
24550 according to whether they are spam or ham.  There is a pair of spam
24551 and ham processors associated with each spam back end, and what the
24552 processors do depends on the back end.  At present, the main role of
24553 spam and ham processors is for dictionary-based spam filters: they add
24554 the contents of the messages in the group to the filter's dictionary,
24555 to improve its ability to detect future spam.  The @code{spam-process}
24556 group parameter specifies what spam processors to use.  @xref{Spam and
24557 Ham Processors}.
24558
24559 If the spam filter failed to mark a spam message, you can mark it
24560 yourself, so that the message is processed as spam when you exit the
24561 group:
24562
24563 @table @kbd
24564 @item M-d
24565 @itemx M s x
24566 @itemx S x
24567 @kindex M-d
24568 @kindex S x
24569 @kindex M s x
24570 @findex gnus-summary-mark-as-spam
24571 @findex gnus-summary-mark-as-spam
24572 Mark current article as spam, showing it with the @samp{$} mark
24573 (@code{gnus-summary-mark-as-spam}).
24574 @end table
24575
24576 @noindent
24577 Similarly, you can unmark an article if it has been erroneously marked
24578 as spam.  @xref{Setting Marks}.
24579
24580 Normally, a ham message found in a non-ham group is not processed as
24581 ham---the rationale is that it should be moved into a ham group for
24582 further processing (see below).  However, you can force these articles
24583 to be processed as ham by setting
24584 @code{spam-process-ham-in-spam-groups} and
24585 @code{spam-process-ham-in-nonham-groups}.
24586
24587 @vindex gnus-ham-process-destinations
24588 @vindex gnus-spam-process-destinations
24589 The second thing that the Spam package does when you exit a group is
24590 to move ham articles out of spam groups, and spam articles out of ham
24591 groups.  Ham in a spam group is moved to the group specified by the
24592 variable @code{gnus-ham-process-destinations}, or the group parameter
24593 @code{ham-process-destination}.  Spam in a ham group is moved to the
24594 group specified by the variable @code{gnus-spam-process-destinations},
24595 or the group parameter @code{spam-process-destination}.  If these
24596 variables are not set, the articles are left in their current group.
24597 If an article cannot be moved (e.g., with a read-only backend such
24598 as @acronym{NNTP}), it is copied.
24599
24600 If an article is moved to another group, it is processed again when
24601 you visit the new group.  Normally, this is not a problem, but if you
24602 want each article to be processed only once, load the
24603 @code{gnus-registry.el} package and set the variable
24604 @code{spam-log-to-registry} to @code{t}.  @xref{Spam Package
24605 Configuration Examples}.
24606
24607 Normally, spam groups ignore @code{gnus-spam-process-destinations}.
24608 However, if you set @code{spam-move-spam-nonspam-groups-only} to
24609 @code{nil}, spam will also be moved out of spam groups, depending on
24610 the @code{spam-process-destination} parameter.
24611
24612 The final thing the Spam package does is to mark spam articles as
24613 expired, which is usually the right thing to do.
24614
24615 If all this seems confusing, don't worry.  Soon it will be as natural
24616 as typing Lisp one-liners on a neural interface@dots{} err, sorry, that's
24617 50 years in the future yet.  Just trust us, it's not so bad.
24618
24619 @node Filtering Incoming Mail
24620 @subsection Filtering Incoming Mail
24621 @cindex spam filtering
24622 @cindex spam filtering incoming mail
24623 @cindex spam
24624
24625 To use the Spam package to filter incoming mail, you must first set up
24626 fancy mail splitting.  @xref{Fancy Mail Splitting}.  The Spam package
24627 defines a special splitting function that you can add to your fancy
24628 split variable (either @code{nnmail-split-fancy} or
24629 @code{nnimap-split-fancy}, depending on your mail back end):
24630
24631 @example
24632 (: spam-split)
24633 @end example
24634
24635 @vindex spam-split-group
24636 @noindent
24637 The @code{spam-split} function scans incoming mail according to your
24638 chosen spam back end(s), and sends messages identified as spam to a
24639 spam group.  By default, the spam group is a group named @samp{spam},
24640 but you can change this by customizing @code{spam-split-group}.  Make
24641 sure the contents of @code{spam-split-group} are an unqualified group
24642 name.  For instance, in an @code{nnimap} server @samp{your-server},
24643 the value @samp{spam} means @samp{nnimap+your-server:spam}.  The value
24644 @samp{nnimap+server:spam} is therefore wrong---it gives the group
24645 @samp{nnimap+your-server:nnimap+server:spam}.
24646
24647 @code{spam-split} does not modify the contents of messages in any way.
24648
24649 @vindex nnimap-split-download-body
24650 Note for IMAP users: if you use the @code{spam-check-bogofilter},
24651 @code{spam-check-ifile}, and @code{spam-check-stat} spam back ends,
24652 you should also set the variable @code{nnimap-split-download-body}
24653 to @code{t}.  These spam back ends are most useful when they can
24654 ``scan'' the full message body.  By default, the nnimap back end only
24655 retrieves the message headers; @code{nnimap-split-download-body} tells
24656 it to retrieve the message bodies as well.  We don't set this by
24657 default because it will slow @acronym{IMAP} down, and that is not an
24658 appropriate decision to make on behalf of the user.  @xref{Splitting
24659 in IMAP}.
24660
24661 You have to specify one or more spam back ends for @code{spam-split}
24662 to use, by setting the @code{spam-use-*} variables.  @xref{Spam Back
24663 Ends}.  Normally, @code{spam-split} simply uses all the spam back ends
24664 you enabled in this way.  However, you can tell @code{spam-split} to
24665 use only some of them.  Why this is useful?  Suppose you are using the
24666 @code{spam-use-regex-headers} and @code{spam-use-blackholes} spam back
24667 ends, and the following split rule:
24668
24669 @example
24670  nnimap-split-fancy '(|
24671                       (any "ding" "ding")
24672                       (: spam-split)
24673                       ;; @r{default mailbox}
24674                       "mail")
24675 @end example
24676
24677 @noindent
24678 The problem is that you want all ding messages to make it to the ding
24679 folder.  But that will let obvious spam (for example, spam detected by
24680 SpamAssassin, and @code{spam-use-regex-headers}) through, when it's
24681 sent to the ding list.  On the other hand, some messages to the ding
24682 list are from a mail server in the blackhole list, so the invocation
24683 of @code{spam-split} can't be before the ding rule.
24684
24685 The solution is to let SpamAssassin headers supersede ding rules, and
24686 perform the other @code{spam-split} rules (including a second
24687 invocation of the regex-headers check) after the ding rule.  This is
24688 done by passing a parameter to @code{spam-split}:
24689
24690 @example
24691 nnimap-split-fancy
24692       '(|
24693         ;; @r{spam detected by @code{spam-use-regex-headers} goes to @samp{regex-spam}}
24694         (: spam-split "regex-spam" 'spam-use-regex-headers)
24695         (any "ding" "ding")
24696         ;; @r{all other spam detected by spam-split goes to @code{spam-split-group}}
24697         (: spam-split)
24698         ;; @r{default mailbox}
24699         "mail")
24700 @end example
24701
24702 @noindent
24703 This lets you invoke specific @code{spam-split} checks depending on
24704 your particular needs, and target the results of those checks to a
24705 particular spam group.  You don't have to throw all mail into all the
24706 spam tests.  Another reason why this is nice is that messages to
24707 mailing lists you have rules for don't have to have resource-intensive
24708 blackhole checks performed on them.  You could also specify different
24709 spam checks for your nnmail split vs. your nnimap split.  Go crazy.
24710
24711 You should set the @code{spam-use-*} variables for whatever spam back
24712 ends you intend to use.  The reason is that when loading
24713 @file{spam.el}, some conditional loading is done depending on what
24714 @code{spam-use-xyz} variables you have set.  @xref{Spam Back Ends}.
24715
24716 @c @emph{TODO: spam.el needs to provide a uniform way of training all the
24717 @c statistical databases.  Some have that functionality built-in, others
24718 @c don't.}
24719
24720 @node Detecting Spam in Groups
24721 @subsection Detecting Spam in Groups
24722
24723 To detect spam when visiting a group, set the group's
24724 @code{spam-autodetect} and @code{spam-autodetect-methods} group
24725 parameters.  These are accessible with @kbd{G c} or @kbd{G p}, as
24726 usual (@pxref{Group Parameters}).
24727
24728 You should set the @code{spam-use-*} variables for whatever spam back
24729 ends you intend to use.  The reason is that when loading
24730 @file{spam.el}, some conditional loading is done depending on what
24731 @code{spam-use-xyz} variables you have set.
24732
24733 By default, only unseen articles are processed for spam.  You can
24734 force Gnus to recheck all messages in the group by setting the
24735 variable @code{spam-autodetect-recheck-messages} to @code{t}.
24736
24737 If you use the @code{spam-autodetect} method of checking for spam, you
24738 can specify different spam detection methods for different groups.
24739 For instance, the @samp{ding} group may have @code{spam-use-BBDB} as
24740 the autodetection method, while the @samp{suspect} group may have the
24741 @code{spam-use-blacklist} and @code{spam-use-bogofilter} methods
24742 enabled.  Unlike with @code{spam-split}, you don't have any control
24743 over the @emph{sequence} of checks, but this is probably unimportant.
24744
24745 @node Spam and Ham Processors
24746 @subsection Spam and Ham Processors
24747 @cindex spam filtering
24748 @cindex spam filtering variables
24749 @cindex spam variables
24750 @cindex spam
24751
24752 @vindex gnus-spam-process-newsgroups
24753 Spam and ham processors specify special actions to take when you exit
24754 a group buffer.  Spam processors act on spam messages, and ham
24755 processors on ham messages.  At present, the main role of these
24756 processors is to update the dictionaries of dictionary-based spam back
24757 ends such as Bogofilter (@pxref{Bogofilter}) and the Spam Statistics
24758 package (@pxref{Spam Statistics Filtering}).
24759
24760 The spam and ham processors that apply to each group are determined by
24761 the group's@code{spam-process} group parameter.  If this group
24762 parameter is not defined, they are determined by the variable
24763 @code{gnus-spam-process-newsgroups}.
24764
24765 @vindex gnus-spam-newsgroup-contents
24766 Gnus learns from the spam you get.  You have to collect your spam in
24767 one or more spam groups, and set or customize the variable
24768 @code{spam-junk-mailgroups} as appropriate.  You can also declare
24769 groups to contain spam by setting their group parameter
24770 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
24771 by customizing the corresponding variable
24772 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
24773 parameter and the @code{gnus-spam-newsgroup-contents} variable can
24774 also be used to declare groups as @emph{ham} groups if you set their
24775 classification to @code{gnus-group-spam-classification-ham}.  If
24776 groups are not classified by means of @code{spam-junk-mailgroups},
24777 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
24778 considered @emph{unclassified}.  All groups are unclassified by
24779 default.
24780
24781 @vindex gnus-spam-mark
24782 @cindex $
24783 In spam groups, all messages are considered to be spam by default:
24784 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
24785 group.  If you have seen a message, had it marked as spam, then
24786 unmarked it, it won't be marked as spam when you enter the group
24787 thereafter.  You can disable that behavior, so all unread messages
24788 will get the @samp{$} mark, if you set the
24789 @code{spam-mark-only-unseen-as-spam} parameter to @code{nil}.  You
24790 should remove the @samp{$} mark when you are in the group summary
24791 buffer for every message that is not spam after all.  To remove the
24792 @samp{$} mark, you can use @kbd{M-u} to ``unread'' the article, or
24793 @kbd{d} for declaring it read the non-spam way.  When you leave a
24794 group, all spam-marked (@samp{$}) articles are sent to a spam
24795 processor which will study them as spam samples.
24796
24797 Messages may also be deleted in various other ways, and unless
24798 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
24799 and @samp{r} for default read or explicit delete, marks @samp{X} and
24800 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
24801 low scores, are all considered to be associated with articles which
24802 are not spam.  This assumption might be false, in particular if you
24803 use kill files or score files as means for detecting genuine spam, you
24804 should then adjust the @code{ham-marks} group parameter.
24805
24806 @defvar ham-marks
24807 You can customize this group or topic parameter to be the list of
24808 marks you want to consider ham.  By default, the list contains the
24809 deleted, read, killed, kill-filed, and low-score marks (the idea is
24810 that these articles have been read, but are not spam).  It can be
24811 useful to also include the tick mark in the ham marks.  It is not
24812 recommended to make the unread mark a ham mark, because it normally
24813 indicates a lack of classification.  But you can do it, and we'll be
24814 happy for you.
24815 @end defvar
24816
24817 @defvar spam-marks
24818 You can customize this group or topic parameter to be the list of
24819 marks you want to consider spam.  By default, the list contains only
24820 the spam mark.  It is not recommended to change that, but you can if
24821 you really want to.
24822 @end defvar
24823
24824 When you leave @emph{any} group, regardless of its
24825 @code{spam-contents} classification, all spam-marked articles are sent
24826 to a spam processor, which will study these as spam samples.  If you
24827 explicit kill a lot, you might sometimes end up with articles marked
24828 @samp{K} which you never saw, and which might accidentally contain
24829 spam.  Best is to make sure that real spam is marked with @samp{$},
24830 and nothing else.
24831
24832 @vindex gnus-ham-process-destinations
24833 When you leave a @emph{spam} group, all spam-marked articles are
24834 marked as expired after processing with the spam processor.  This is
24835 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
24836 @strong{ham} articles in a spam group will be moved to a location
24837 determined by either the @code{ham-process-destination} group
24838 parameter or a match in the @code{gnus-ham-process-destinations}
24839 variable, which is a list of regular expressions matched with group
24840 names (it's easiest to customize this variable with @kbd{M-x
24841 customize-variable @key{RET} gnus-ham-process-destinations}).  Each
24842 group name list is a standard Lisp list, if you prefer to customize
24843 the variable manually.  If the @code{ham-process-destination}
24844 parameter is not set, ham articles are left in place.  If the
24845 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
24846 set, the ham articles are marked as unread before being moved.
24847
24848 If ham can not be moved---because of a read-only back end such as
24849 @acronym{NNTP}, for example, it will be copied.
24850
24851 Note that you can use multiples destinations per group or regular
24852 expression!  This enables you to send your ham to a regular mail
24853 group and to a @emph{ham training} group.
24854
24855 When you leave a @emph{ham} group, all ham-marked articles are sent to
24856 a ham processor, which will study these as non-spam samples.
24857
24858 @vindex spam-process-ham-in-spam-groups
24859 By default the variable @code{spam-process-ham-in-spam-groups} is
24860 @code{nil}.  Set it to @code{t} if you want ham found in spam groups
24861 to be processed.  Normally this is not done, you are expected instead
24862 to send your ham to a ham group and process it there.
24863
24864 @vindex spam-process-ham-in-nonham-groups
24865 By default the variable @code{spam-process-ham-in-nonham-groups} is
24866 @code{nil}.  Set it to @code{t} if you want ham found in non-ham (spam
24867 or unclassified) groups to be processed.  Normally this is not done,
24868 you are expected instead to send your ham to a ham group and process
24869 it there.
24870
24871 @vindex gnus-spam-process-destinations
24872 When you leave a @emph{ham} or @emph{unclassified} group, all
24873 @strong{spam} articles are moved to a location determined by either
24874 the @code{spam-process-destination} group parameter or a match in the
24875 @code{gnus-spam-process-destinations} variable, which is a list of
24876 regular expressions matched with group names (it's easiest to
24877 customize this variable with @kbd{M-x customize-variable @key{RET}
24878 gnus-spam-process-destinations}).  Each group name list is a standard
24879 Lisp list, if you prefer to customize the variable manually.  If the
24880 @code{spam-process-destination} parameter is not set, the spam
24881 articles are only expired.  The group name is fully qualified, meaning
24882 that if you see @samp{nntp:servername} before the group name in the
24883 group buffer then you need it here as well.
24884
24885 If spam can not be moved---because of a read-only back end such as
24886 @acronym{NNTP}, for example, it will be copied.
24887
24888 Note that you can use multiples destinations per group or regular
24889 expression!  This enables you to send your spam to multiple @emph{spam
24890 training} groups.
24891
24892 @vindex spam-log-to-registry
24893 The problem with processing ham and spam is that Gnus doesn't track
24894 this processing by default.  Enable the @code{spam-log-to-registry}
24895 variable so @code{spam.el} will use @code{gnus-registry.el} to track
24896 what articles have been processed, and avoid processing articles
24897 multiple times.  Keep in mind that if you limit the number of registry
24898 entries, this won't work as well as it does without a limit.
24899
24900 @vindex spam-mark-only-unseen-as-spam
24901 Set this variable if you want only unseen articles in spam groups to
24902 be marked as spam.  By default, it is set.  If you set it to
24903 @code{nil}, unread articles will also be marked as spam.
24904
24905 @vindex spam-mark-ham-unread-before-move-from-spam-group
24906 Set this variable if you want ham to be unmarked before it is moved
24907 out of the spam group.  This is very useful when you use something
24908 like the tick mark @samp{!} to mark ham---the article will be placed
24909 in your @code{ham-process-destination}, unmarked as if it came fresh
24910 from the mail server.
24911
24912 @vindex spam-autodetect-recheck-messages
24913 When autodetecting spam, this variable tells @code{spam.el} whether
24914 only unseen articles or all unread articles should be checked for
24915 spam.  It is recommended that you leave it off.
24916
24917 @node Spam Package Configuration Examples
24918 @subsection Spam Package Configuration Examples
24919 @cindex spam filtering
24920 @cindex spam filtering configuration examples
24921 @cindex spam configuration examples
24922 @cindex spam
24923
24924 @subsubheading Ted's setup
24925
24926 From Ted Zlatanov <tzz@@lifelogs.com>.
24927 @example
24928 ;; @r{for @code{gnus-registry-split-fancy-with-parent} and spam autodetection}
24929 ;; @r{see @file{gnus-registry.el} for more information}
24930 (gnus-registry-initialize)
24931 (spam-initialize)
24932
24933 (setq
24934  spam-log-to-registry t     ; @r{for spam autodetection}
24935  spam-use-BBDB t
24936  spam-use-regex-headers t   ; @r{catch X-Spam-Flag (SpamAssassin)}
24937  ;; @r{all groups with @samp{spam} in the name contain spam}
24938  gnus-spam-newsgroup-contents
24939   '(("spam" gnus-group-spam-classification-spam))
24940  ;; @r{see documentation for these}
24941  spam-move-spam-nonspam-groups-only nil
24942  spam-mark-only-unseen-as-spam t
24943  spam-mark-ham-unread-before-move-from-spam-group t
24944  nnimap-split-rule 'nnimap-split-fancy
24945  ;; @r{understand what this does before you copy it to your own setup!}
24946  nnimap-split-fancy '(|
24947                       ;; @r{trace references to parents and put in their group}
24948                       (: gnus-registry-split-fancy-with-parent)
24949                       ;; @r{this will catch server-side SpamAssassin tags}
24950                       (: spam-split 'spam-use-regex-headers)
24951                       (any "ding" "ding")
24952                       ;; @r{note that spam by default will go to @samp{spam}}
24953                       (: spam-split)
24954                       ;; @r{default mailbox}
24955                       "mail"))
24956
24957 ;; @r{my parameters, set with @kbd{G p}}
24958
24959 ;; @r{all nnml groups, and all nnimap groups except}
24960 ;; @r{@samp{nnimap+mail.lifelogs.com:train} and}
24961 ;; @r{@samp{nnimap+mail.lifelogs.com:spam}: any spam goes to nnimap training,}
24962 ;; @r{because it must have been detected manually}
24963
24964 ((spam-process-destination . "nnimap+mail.lifelogs.com:train"))
24965
24966 ;; @r{all @acronym{NNTP} groups}
24967 ;; @r{autodetect spam with the blacklist and ham with the BBDB}
24968 ((spam-autodetect-methods spam-use-blacklist spam-use-BBDB)
24969 ;; @r{send all spam to the training group}
24970  (spam-process-destination . "nnimap+mail.lifelogs.com:train"))
24971
24972 ;; @r{only some @acronym{NNTP} groups, where I want to autodetect spam}
24973 ((spam-autodetect . t))
24974
24975 ;; @r{my nnimap @samp{nnimap+mail.lifelogs.com:spam} group}
24976
24977 ;; @r{this is a spam group}
24978 ((spam-contents gnus-group-spam-classification-spam)
24979
24980  ;; @r{any spam (which happens when I enter for all unseen messages,}
24981  ;; @r{because of the @code{gnus-spam-newsgroup-contents} setting above), goes to}
24982  ;; @r{@samp{nnimap+mail.lifelogs.com:train} unless I mark it as ham}
24983
24984  (spam-process-destination "nnimap+mail.lifelogs.com:train")
24985
24986  ;; @r{any ham goes to my @samp{nnimap+mail.lifelogs.com:mail} folder, but}
24987  ;; @r{also to my @samp{nnimap+mail.lifelogs.com:trainham} folder for training}
24988
24989  (ham-process-destination "nnimap+mail.lifelogs.com:mail"
24990                           "nnimap+mail.lifelogs.com:trainham")
24991  ;; @r{in this group, only @samp{!} marks are ham}
24992  (ham-marks
24993   (gnus-ticked-mark))
24994  ;; @r{remembers senders in the blacklist on the way out---this is}
24995  ;; @r{definitely not needed, it just makes me feel better}
24996  (spam-process (gnus-group-spam-exit-processor-blacklist)))
24997
24998 ;; @r{Later, on the @acronym{IMAP} server I use the @samp{train} group for training}
24999 ;; @r{SpamAssassin to recognize spam, and the @samp{trainham} group fora}
25000 ;; @r{recognizing ham---but Gnus has nothing to do with it.}
25001
25002 @end example
25003
25004 @subsubheading Using @code{spam.el} on an IMAP server with a statistical filter on the server
25005 From Reiner Steib <reiner.steib@@gmx.de>.
25006
25007 My provider has set up bogofilter (in combination with @acronym{DCC}) on
25008 the mail server (@acronym{IMAP}).  Recognized spam goes to
25009 @samp{spam.detected}, the rest goes through the normal filter rules,
25010 i.e. to @samp{some.folder} or to @samp{INBOX}.  Training on false
25011 positives or negatives is done by copying or moving the article to
25012 @samp{training.ham} or @samp{training.spam} respectively.  A cron job on
25013 the server feeds those to bogofilter with the suitable ham or spam
25014 options and deletes them from the @samp{training.ham} and
25015 @samp{training.spam} folders.
25016
25017 With the following entries in @code{gnus-parameters}, @code{spam.el}
25018 does most of the job for me:
25019
25020 @lisp
25021    ("nnimap:spam\\.detected"
25022     (gnus-article-sort-functions '(gnus-article-sort-by-chars))
25023     (ham-process-destination "nnimap:INBOX" "nnimap:training.ham")
25024     (spam-contents gnus-group-spam-classification-spam))
25025    ("nnimap:\\(INBOX\\|other-folders\\)"
25026     (spam-process-destination . "nnimap:training.spam")
25027     (spam-contents gnus-group-spam-classification-ham))
25028 @end lisp
25029
25030 @itemize
25031
25032 @item @b{The Spam folder:}
25033
25034 In the folder @samp{spam.detected}, I have to check for false positives
25035 (i.e. legitimate mails, that were wrongly judged as spam by
25036 bogofilter or DCC).
25037
25038 Because of the @code{gnus-group-spam-classification-spam} entry, all
25039 messages are marked as spam (with @code{$}).  When I find a false
25040 positive, I mark the message with some other ham mark
25041 (@code{ham-marks}, @ref{Spam and Ham Processors}).  On group exit,
25042 those messages are copied to both groups, @samp{INBOX} (where I want
25043 to have the article) and @samp{training.ham} (for training bogofilter)
25044 and deleted from the @samp{spam.detected} folder.
25045
25046 The @code{gnus-article-sort-by-chars} entry simplifies detection of
25047 false positives for me.  I receive lots of worms (sweN, @dots{}), that all
25048 have a similar size.  Grouping them by size (i.e. chars) makes finding
25049 other false positives easier.  (Of course worms aren't @i{spam}
25050 (@acronym{UCE}, @acronym{UBE}) strictly speaking.  Anyhow, bogofilter is
25051 an excellent tool for filtering those unwanted mails for me.)
25052
25053 @item @b{Ham folders:}
25054
25055 In my ham folders, I just hit @kbd{S x}
25056 (@code{gnus-summary-mark-as-spam}) whenever I see an unrecognized spam
25057 mail (false negative).  On group exit, those messages are moved to
25058 @samp{training.spam}.
25059 @end itemize
25060
25061 @subsubheading Reporting spam articles in Gmane groups with @code{spam-report.el}
25062
25063 From Reiner Steib <reiner.steib@@gmx.de>.
25064
25065 With following entry in @code{gnus-parameters}, @kbd{S x}
25066 (@code{gnus-summary-mark-as-spam}) marks articles in @code{gmane.*}
25067 groups as spam and reports the to Gmane at group exit:
25068
25069 @lisp
25070    ("^gmane\\."
25071     (spam-process (gnus-group-spam-exit-processor-report-gmane)))
25072 @end lisp
25073
25074 Additionally, I use @code{(setq spam-report-gmane-use-article-number nil)}
25075 because I don't read the groups directly from news.gmane.org, but
25076 through my local news server (leafnode).  I.e. the article numbers are
25077 not the same as on news.gmane.org, thus @code{spam-report.el} has to check
25078 the @code{X-Report-Spam} header to find the correct number.
25079
25080 @node Spam Back Ends
25081 @subsection Spam Back Ends
25082 @cindex spam back ends
25083
25084 The spam package offers a variety of back ends for detecting spam.
25085 Each back end defines a set of methods for detecting spam
25086 (@pxref{Filtering Incoming Mail}, @pxref{Detecting Spam in Groups}),
25087 and a pair of spam and ham processors (@pxref{Spam and Ham
25088 Processors}).
25089
25090 @menu
25091 * Blacklists and Whitelists::
25092 * BBDB Whitelists::
25093 * Gmane Spam Reporting::
25094 * Anti-spam Hashcash Payments::
25095 * Blackholes::
25096 * Regular Expressions Header Matching::
25097 * Bogofilter::
25098 * SpamAssassin back end::
25099 * ifile spam filtering::
25100 * Spam Statistics Filtering::
25101 * SpamOracle::
25102 @end menu
25103
25104 @node Blacklists and Whitelists
25105 @subsubsection Blacklists and Whitelists
25106 @cindex spam filtering
25107 @cindex whitelists, spam filtering
25108 @cindex blacklists, spam filtering
25109 @cindex spam
25110
25111 @defvar spam-use-blacklist
25112
25113 Set this variable to @code{t} if you want to use blacklists when
25114 splitting incoming mail.  Messages whose senders are in the blacklist
25115 will be sent to the @code{spam-split-group}.  This is an explicit
25116 filter, meaning that it acts only on mail senders @emph{declared} to
25117 be spammers.
25118
25119 @end defvar
25120
25121 @defvar spam-use-whitelist
25122
25123 Set this variable to @code{t} if you want to use whitelists when
25124 splitting incoming mail.  Messages whose senders are not in the
25125 whitelist will be sent to the next spam-split rule.  This is an
25126 explicit filter, meaning that unless someone is in the whitelist, their
25127 messages are not assumed to be spam or ham.
25128
25129 @end defvar
25130
25131 @defvar spam-use-whitelist-exclusive
25132
25133 Set this variable to @code{t} if you want to use whitelists as an
25134 implicit filter, meaning that every message will be considered spam
25135 unless the sender is in the whitelist.  Use with care.
25136
25137 @end defvar
25138
25139 @defvar gnus-group-spam-exit-processor-blacklist
25140
25141 Add this symbol to a group's @code{spam-process} parameter by
25142 customizing the group parameters or the
25143 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25144 added to a group's @code{spam-process} parameter, the senders of
25145 spam-marked articles will be added to the blacklist.
25146
25147 @emph{WARNING}
25148
25149 Instead of the obsolete
25150 @code{gnus-group-spam-exit-processor-blacklist}, it is recommended
25151 that you use @code{(spam spam-use-blacklist)}.  Everything will work
25152 the same way, we promise.
25153
25154 @end defvar
25155
25156 @defvar gnus-group-ham-exit-processor-whitelist
25157
25158 Add this symbol to a group's @code{spam-process} parameter by
25159 customizing the group parameters or the
25160 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25161 added to a group's @code{spam-process} parameter, the senders of
25162 ham-marked articles in @emph{ham} groups will be added to the
25163 whitelist.
25164
25165 @emph{WARNING}
25166
25167 Instead of the obsolete
25168 @code{gnus-group-ham-exit-processor-whitelist}, it is recommended
25169 that you use @code{(ham spam-use-whitelist)}.  Everything will work
25170 the same way, we promise.
25171
25172 @end defvar
25173
25174 Blacklists are lists of regular expressions matching addresses you
25175 consider to be spam senders.  For instance, to block mail from any
25176 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
25177 blacklist.  You start out with an empty blacklist.  Blacklist entries
25178 use the Emacs regular expression syntax.
25179
25180 Conversely, whitelists tell Gnus what addresses are considered
25181 legitimate.  All messages from whitelisted addresses are considered
25182 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
25183 Emacs regular expression syntax.
25184
25185 The blacklist and whitelist file locations can be customized with the
25186 @code{spam-directory} variable (@file{~/News/spam} by default), or
25187 the @code{spam-whitelist} and @code{spam-blacklist} variables
25188 directly.  The whitelist and blacklist files will by default be in the
25189 @code{spam-directory} directory, named @file{whitelist} and
25190 @file{blacklist} respectively.
25191
25192 @node BBDB Whitelists
25193 @subsubsection BBDB Whitelists
25194 @cindex spam filtering
25195 @cindex BBDB whitelists, spam filtering
25196 @cindex BBDB, spam filtering
25197 @cindex spam
25198
25199 @defvar spam-use-BBDB
25200
25201 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
25202 Whitelists}), but uses the BBDB as the source of whitelisted
25203 addresses, without regular expressions.  You must have the BBDB loaded
25204 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
25205 not in the BBDB will be sent to the next spam-split rule.  This is an
25206 explicit filter, meaning that unless someone is in the BBDB, their
25207 messages are not assumed to be spam or ham.
25208
25209 @end defvar
25210
25211 @defvar spam-use-BBDB-exclusive
25212
25213 Set this variable to @code{t} if you want to use the BBDB as an
25214 implicit filter, meaning that every message will be considered spam
25215 unless the sender is in the BBDB.  Use with care.  Only sender
25216 addresses in the BBDB will be allowed through; all others will be
25217 classified as spammers.
25218
25219 While @code{spam-use-BBDB-exclusive} @emph{can} be used as an alias
25220 for @code{spam-use-BBDB} as far as @code{spam.el} is concerned, it is
25221 @emph{not} a separate back end.  If you set
25222 @code{spam-use-BBDB-exclusive} to t, @emph{all} your BBDB splitting
25223 will be exclusive.
25224
25225 @end defvar
25226
25227 @defvar gnus-group-ham-exit-processor-BBDB
25228
25229 Add this symbol to a group's @code{spam-process} parameter by
25230 customizing the group parameters or the
25231 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25232 added to a group's @code{spam-process} parameter, the senders of
25233 ham-marked articles in @emph{ham} groups will be added to the
25234 BBDB.
25235
25236 @emph{WARNING}
25237
25238 Instead of the obsolete
25239 @code{gnus-group-ham-exit-processor-BBDB}, it is recommended
25240 that you use @code{(ham spam-use-BBDB)}.  Everything will work
25241 the same way, we promise.
25242
25243 @end defvar
25244
25245 @node Gmane Spam Reporting
25246 @subsubsection Gmane Spam Reporting
25247 @cindex spam reporting
25248 @cindex Gmane, spam reporting
25249 @cindex Gmane, spam reporting
25250 @cindex spam
25251
25252 @defvar gnus-group-spam-exit-processor-report-gmane
25253
25254 Add this symbol to a group's @code{spam-process} parameter by
25255 customizing the group parameters or the
25256 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25257 added to a group's @code{spam-process} parameter, the spam-marked
25258 articles groups will be reported to the Gmane administrators via a
25259 HTTP request.
25260
25261 Gmane can be found at @uref{http://gmane.org}.
25262
25263 @emph{WARNING}
25264
25265 Instead of the obsolete
25266 @code{gnus-group-spam-exit-processor-report-gmane}, it is recommended
25267 that you use @code{(spam spam-use-gmane)}.  Everything will work the
25268 same way, we promise.
25269
25270 @end defvar
25271
25272 @defvar spam-report-gmane-use-article-number
25273
25274 This variable is @code{t} by default.  Set it to @code{nil} if you are
25275 running your own news server, for instance, and the local article
25276 numbers don't correspond to the Gmane article numbers.  When
25277 @code{spam-report-gmane-use-article-number} is @code{nil},
25278 @code{spam-report.el} will fetch the number from the article headers.
25279
25280 @end defvar
25281
25282 @defvar spam-report-user-mail-address
25283
25284 Mail address exposed in the User-Agent spam reports to Gmane.  It allows
25285 the Gmane administrators to contact you in case of misreports.  The
25286 default is @code{user-mail-address}.
25287
25288 @end defvar
25289
25290 @node Anti-spam Hashcash Payments
25291 @subsubsection Anti-spam Hashcash Payments
25292 @cindex spam filtering
25293 @cindex hashcash, spam filtering
25294 @cindex spam
25295
25296 @defvar spam-use-hashcash
25297
25298 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
25299 Whitelists}), but uses hashcash tokens for whitelisting messages
25300 instead of the sender address.  Messages without a hashcash payment
25301 token will be sent to the next spam-split rule.  This is an explicit
25302 filter, meaning that unless a hashcash token is found, the messages
25303 are not assumed to be spam or ham.
25304
25305 @end defvar
25306
25307 @node Blackholes
25308 @subsubsection Blackholes
25309 @cindex spam filtering
25310 @cindex blackholes, spam filtering
25311 @cindex spam
25312
25313 @defvar spam-use-blackholes
25314
25315 This option is disabled by default.  You can let Gnus consult the
25316 blackhole-type distributed spam processing systems (DCC, for instance)
25317 when you set this option.  The variable @code{spam-blackhole-servers}
25318 holds the list of blackhole servers Gnus will consult.  The current
25319 list is fairly comprehensive, but make sure to let us know if it
25320 contains outdated servers.
25321
25322 The blackhole check uses the @code{dig.el} package, but you can tell
25323 @code{spam.el} to use @code{dns.el} instead for better performance if
25324 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
25325 this time to set @code{spam-use-dig} to @code{nil} despite the
25326 possible performance improvements, because some users may be unable to
25327 use it, but you can try it and see if it works for you.
25328
25329 @end defvar
25330
25331 @defvar spam-blackhole-servers
25332
25333 The list of servers to consult for blackhole checks.
25334
25335 @end defvar
25336
25337 @defvar spam-blackhole-good-server-regex
25338
25339 A regular expression for IPs that should not be checked against the
25340 blackhole server list.  When set to @code{nil}, it has no effect.
25341
25342 @end defvar
25343
25344 @defvar spam-use-dig
25345
25346 Use the @code{dig.el} package instead of the @code{dns.el} package.
25347 The default setting of @code{t} is recommended.
25348
25349 @end defvar
25350
25351 Blackhole checks are done only on incoming mail.  There is no spam or
25352 ham processor for blackholes.
25353
25354 @node Regular Expressions Header Matching
25355 @subsubsection Regular Expressions Header Matching
25356 @cindex spam filtering
25357 @cindex regular expressions header matching, spam filtering
25358 @cindex spam
25359
25360 @defvar spam-use-regex-headers
25361
25362 This option is disabled by default.  You can let Gnus check the
25363 message headers against lists of regular expressions when you set this
25364 option.  The variables @code{spam-regex-headers-spam} and
25365 @code{spam-regex-headers-ham} hold the list of regular expressions.
25366 Gnus will check against the message headers to determine if the
25367 message is spam or ham, respectively.
25368
25369 @end defvar
25370
25371 @defvar spam-regex-headers-spam
25372
25373 The list of regular expressions that, when matched in the headers of
25374 the message, positively identify it as spam.
25375
25376 @end defvar
25377
25378 @defvar spam-regex-headers-ham
25379
25380 The list of regular expressions that, when matched in the headers of
25381 the message, positively identify it as ham.
25382
25383 @end defvar
25384
25385 Regular expression header checks are done only on incoming mail.
25386 There is no specific spam or ham processor for regular expressions.
25387
25388 @node Bogofilter
25389 @subsubsection Bogofilter
25390 @cindex spam filtering
25391 @cindex bogofilter, spam filtering
25392 @cindex spam
25393
25394 @defvar spam-use-bogofilter
25395
25396 Set this variable if you want @code{spam-split} to use Eric Raymond's
25397 speedy Bogofilter.
25398
25399 With a minimum of care for associating the @samp{$} mark for spam
25400 articles only, Bogofilter training all gets fairly automatic.  You
25401 should do this until you get a few hundreds of articles in each
25402 category, spam or not.  The command @kbd{S t} in summary mode, either
25403 for debugging or for curiosity, shows the @emph{spamicity} score of
25404 the current article (between 0.0 and 1.0).
25405
25406 Bogofilter determines if a message is spam based on a specific
25407 threshold.  That threshold can be customized, consult the Bogofilter
25408 documentation.
25409
25410 If the @code{bogofilter} executable is not in your path, Bogofilter
25411 processing will be turned off.
25412
25413 You should not enable this if you use @code{spam-use-bogofilter-headers}.
25414
25415 @end defvar
25416
25417 @table @kbd
25418 @item M s t
25419 @itemx S t
25420 @kindex M s t
25421 @kindex S t
25422 @findex spam-bogofilter-score
25423 Get the Bogofilter spamicity score (@code{spam-bogofilter-score}).
25424 @end table
25425
25426 @defvar spam-use-bogofilter-headers
25427
25428 Set this variable if you want @code{spam-split} to use Eric Raymond's
25429 speedy Bogofilter, looking only at the message headers.  It works
25430 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
25431 must be in the message already.  Normally you would do this with a
25432 procmail recipe or something similar; consult the Bogofilter
25433 installation documents for details.
25434
25435 You should not enable this if you use @code{spam-use-bogofilter}.
25436
25437 @end defvar
25438
25439 @defvar gnus-group-spam-exit-processor-bogofilter
25440 Add this symbol to a group's @code{spam-process} parameter by
25441 customizing the group parameters or the
25442 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25443 added to a group's @code{spam-process} parameter, spam-marked articles
25444 will be added to the Bogofilter spam database.
25445
25446 @emph{WARNING}
25447
25448 Instead of the obsolete
25449 @code{gnus-group-spam-exit-processor-bogofilter}, it is recommended
25450 that you use @code{(spam spam-use-bogofilter)}.  Everything will work
25451 the same way, we promise.
25452 @end defvar
25453
25454 @defvar gnus-group-ham-exit-processor-bogofilter
25455 Add this symbol to a group's @code{spam-process} parameter by
25456 customizing the group parameters or the
25457 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25458 added to a group's @code{spam-process} parameter, the ham-marked
25459 articles in @emph{ham} groups will be added to the Bogofilter database
25460 of non-spam messages.
25461
25462 @emph{WARNING}
25463
25464 Instead of the obsolete
25465 @code{gnus-group-ham-exit-processor-bogofilter}, it is recommended
25466 that you use @code{(ham spam-use-bogofilter)}.  Everything will work
25467 the same way, we promise.
25468 @end defvar
25469
25470 @defvar spam-bogofilter-database-directory
25471
25472 This is the directory where Bogofilter will store its databases.  It
25473 is not specified by default, so Bogofilter will use its own default
25474 database directory.
25475
25476 @end defvar
25477
25478 The Bogofilter mail classifier is similar to @command{ifile} in intent and
25479 purpose.  A ham and a spam processor are provided, plus the
25480 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
25481 variables to indicate to spam-split that Bogofilter should either be
25482 used, or has already been used on the article.  The 0.9.2.1 version of
25483 Bogofilter was used to test this functionality.
25484
25485 @node SpamAssassin back end
25486 @subsubsection SpamAssassin back end
25487 @cindex spam filtering
25488 @cindex spamassassin, spam filtering
25489 @cindex spam
25490
25491 @defvar spam-use-spamassassin
25492
25493 Set this variable if you want @code{spam-split} to use SpamAssassin.
25494
25495 SpamAssassin assigns a score to each article based on a set of rules
25496 and tests, including a Bayesian filter.  The Bayesian filter can be
25497 trained by associating the @samp{$} mark for spam articles.  The
25498 spam score can be viewed by using the command @kbd{S t} in summary
25499 mode.
25500
25501 If you set this variable, each article will be processed by
25502 SpamAssassin when @code{spam-split} is called.  If your mail is
25503 preprocessed by SpamAssassin, and you want to just use the
25504 SpamAssassin headers, set @code{spam-use-spamassassin-headers}
25505 instead.
25506
25507 You should not enable this if you use
25508 @code{spam-use-spamassassin-headers}.
25509
25510 @end defvar
25511
25512 @defvar spam-use-spamassassin-headers
25513
25514 Set this variable if your mail is preprocessed by SpamAssassin and
25515 want @code{spam-split} to split based on the SpamAssassin headers.
25516
25517 You should not enable this if you use @code{spam-use-spamassassin}.
25518
25519 @end defvar
25520
25521 @defvar spam-spamassassin-program
25522
25523 This variable points to the SpamAssassin executable.  If you have
25524 @code{spamd} running, you can set this variable to the @code{spamc}
25525 executable for faster processing.  See the SpamAssassin documentation
25526 for more information on @code{spamd}/@code{spamc}.
25527
25528 @end defvar
25529
25530 SpamAssassin is a powerful and flexible spam filter that uses a wide
25531 variety of tests to identify spam.  A ham and a spam processors are
25532 provided, plus the @code{spam-use-spamassassin} and
25533 @code{spam-use-spamassassin-headers} variables to indicate to
25534 spam-split that SpamAssassin should be either used, or has already
25535 been used on the article.  The 2.63 version of SpamAssassin was used
25536 to test this functionality.
25537
25538 @node ifile spam filtering
25539 @subsubsection ifile spam filtering
25540 @cindex spam filtering
25541 @cindex ifile, spam filtering
25542 @cindex spam
25543
25544 @defvar spam-use-ifile
25545
25546 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
25547 statistical analyzer similar to Bogofilter.
25548
25549 @end defvar
25550
25551 @defvar spam-ifile-all-categories
25552
25553 Enable this variable if you want @code{spam-use-ifile} to give you all
25554 the ifile categories, not just spam/non-spam.  If you use this, make
25555 sure you train ifile as described in its documentation.
25556
25557 @end defvar
25558
25559 @defvar spam-ifile-spam-category
25560
25561 This is the category of spam messages as far as ifile is concerned.
25562 The actual string used is irrelevant, but you probably want to leave
25563 the default value of @samp{spam}.
25564 @end defvar
25565
25566 @defvar spam-ifile-database
25567
25568 This is the filename for the ifile database.  It is not specified by
25569 default, so ifile will use its own default database name.
25570
25571 @end defvar
25572
25573 The ifile mail classifier is similar to Bogofilter in intent and
25574 purpose.  A ham and a spam processor are provided, plus the
25575 @code{spam-use-ifile} variable to indicate to spam-split that ifile
25576 should be used.  The 1.2.1 version of ifile was used to test this
25577 functionality.
25578
25579 @node Spam Statistics Filtering
25580 @subsubsection Spam Statistics Filtering
25581 @cindex spam filtering
25582 @cindex spam-stat, spam filtering
25583 @cindex spam-stat
25584 @cindex spam
25585
25586 This back end uses the Spam Statistics Emacs Lisp package to perform
25587 statistics-based filtering (@pxref{Spam Statistics Package}).  Before
25588 using this, you may want to perform some additional steps to
25589 initialize your Spam Statistics dictionary.  @xref{Creating a
25590 spam-stat dictionary}.
25591
25592 @defvar spam-use-stat
25593
25594 @end defvar
25595
25596 @defvar gnus-group-spam-exit-processor-stat
25597 Add this symbol to a group's @code{spam-process} parameter by
25598 customizing the group parameters or the
25599 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25600 added to a group's @code{spam-process} parameter, the spam-marked
25601 articles will be added to the spam-stat database of spam messages.
25602
25603 @emph{WARNING}
25604
25605 Instead of the obsolete
25606 @code{gnus-group-spam-exit-processor-stat}, it is recommended
25607 that you use @code{(spam spam-use-stat)}.  Everything will work
25608 the same way, we promise.
25609 @end defvar
25610
25611 @defvar gnus-group-ham-exit-processor-stat
25612 Add this symbol to a group's @code{spam-process} parameter by
25613 customizing the group parameters or the
25614 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25615 added to a group's @code{spam-process} parameter, the ham-marked
25616 articles in @emph{ham} groups will be added to the spam-stat database
25617 of non-spam messages.
25618
25619 @emph{WARNING}
25620
25621 Instead of the obsolete
25622 @code{gnus-group-ham-exit-processor-stat}, it is recommended
25623 that you use @code{(ham spam-use-stat)}.  Everything will work
25624 the same way, we promise.
25625 @end defvar
25626
25627 This enables @code{spam.el} to cooperate with @file{spam-stat.el}.
25628 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
25629 which unlike ifile or Bogofilter does not require external programs.
25630 A spam and a ham processor, and the @code{spam-use-stat} variable for
25631 @code{spam-split} are provided.
25632
25633 @node SpamOracle
25634 @subsubsection Using SpamOracle with Gnus
25635 @cindex spam filtering
25636 @cindex SpamOracle
25637 @cindex spam
25638
25639 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
25640 statistical mail filtering tool written by Xavier Leroy and needs to be
25641 installed separately.
25642
25643 There are several ways to use SpamOracle with Gnus.  In all cases, your
25644 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
25645 then enter an @samp{X-Spam} header indicating whether it regards the
25646 mail as a spam mail or not.
25647
25648 One possibility is to run SpamOracle as a @code{:prescript} from the
25649 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
25650 the advantage that the user can see the @emph{X-Spam} headers.
25651
25652 The easiest method is to make @file{spam.el} (@pxref{Spam Package})
25653 call SpamOracle.
25654
25655 @vindex spam-use-spamoracle
25656 To enable SpamOracle usage by @code{spam.el}, set the variable
25657 @code{spam-use-spamoracle} to @code{t} and configure the
25658 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}.  @xref{Spam
25659 Package}.  In this example the @samp{INBOX} of an nnimap server is
25660 filtered using SpamOracle.  Mails recognized as spam mails will be
25661 moved to @code{spam-split-group}, @samp{Junk} in this case.  Ham
25662 messages stay in @samp{INBOX}:
25663
25664 @example
25665 (setq spam-use-spamoracle t
25666       spam-split-group "Junk"
25667       nnimap-split-inbox '("INBOX")
25668       nnimap-split-rule 'nnimap-split-fancy
25669       nnimap-split-fancy '(| (: spam-split) "INBOX"))
25670 @end example
25671
25672 @defvar spam-use-spamoracle
25673 Set to @code{t} if you want Gnus to enable spam filtering using
25674 SpamOracle.
25675 @end defvar
25676
25677 @defvar spam-spamoracle-binary
25678 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
25679 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
25680 can be customized.
25681 @end defvar
25682
25683 @defvar spam-spamoracle-database
25684 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
25685 store its analysis.  This is controlled by the variable
25686 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
25687 the default SpamOracle database will be used.  In case you want your
25688 database to live somewhere special, set
25689 @code{spam-spamoracle-database} to this path.
25690 @end defvar
25691
25692 SpamOracle employs a statistical algorithm to determine whether a
25693 message is spam or ham.  In order to get good results, meaning few
25694 false hits or misses, SpamOracle needs training.  SpamOracle learns
25695 the characteristics of your spam mails.  Using the @emph{add} mode
25696 (training mode) one has to feed good (ham) and spam mails to
25697 SpamOracle.  This can be done by pressing @kbd{|} in the Summary
25698 buffer and pipe the mail to a SpamOracle process or using
25699 @file{spam.el}'s spam- and ham-processors, which is much more
25700 convenient.  For a detailed description of spam- and ham-processors,
25701 @xref{Spam Package}.
25702
25703 @defvar gnus-group-spam-exit-processor-spamoracle
25704 Add this symbol to a group's @code{spam-process} parameter by
25705 customizing the group parameter or the
25706 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
25707 to a group's @code{spam-process} parameter, spam-marked articles will be
25708 sent to SpamOracle as spam samples.
25709
25710 @emph{WARNING}
25711
25712 Instead of the obsolete
25713 @code{gnus-group-spam-exit-processor-spamoracle}, it is recommended
25714 that you use @code{(spam spam-use-spamoracle)}.  Everything will work
25715 the same way, we promise.
25716 @end defvar
25717
25718 @defvar gnus-group-ham-exit-processor-spamoracle
25719 Add this symbol to a group's @code{spam-process} parameter by
25720 customizing the group parameter or the
25721 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
25722 to a group's @code{spam-process} parameter, the ham-marked articles in
25723 @emph{ham} groups will be sent to the SpamOracle as samples of ham
25724 messages.
25725
25726 @emph{WARNING}
25727
25728 Instead of the obsolete
25729 @code{gnus-group-ham-exit-processor-spamoracle}, it is recommended
25730 that you use @code{(ham spam-use-spamoracle)}.  Everything will work
25731 the same way, we promise.
25732 @end defvar
25733
25734 @emph{Example:} These are the Group Parameters of a group that has been
25735 classified as a ham group, meaning that it should only contain ham
25736 messages.
25737 @example
25738  ((spam-contents gnus-group-spam-classification-ham)
25739   (spam-process ((ham spam-use-spamoracle)
25740                  (spam spam-use-spamoracle))))
25741 @end example
25742 For this group the @code{spam-use-spamoracle} is installed for both
25743 ham and spam processing.  If the group contains spam message
25744 (e.g. because SpamOracle has not had enough sample messages yet) and
25745 the user marks some messages as spam messages, these messages will be
25746 processed by SpamOracle.  The processor sends the messages to
25747 SpamOracle as new samples for spam.
25748
25749 @node Extending the Spam package
25750 @subsection Extending the Spam package
25751 @cindex spam filtering
25752 @cindex spam elisp package, extending
25753 @cindex extending the spam elisp package
25754
25755 Say you want to add a new back end called blackbox.  For filtering
25756 incoming mail, provide the following:
25757
25758 @enumerate
25759
25760 @item
25761 Code
25762
25763 @lisp
25764 (defvar spam-use-blackbox nil
25765   "True if blackbox should be used.")
25766 @end lisp
25767
25768 Write @code{spam-check-blackbox} if Blackbox can check incoming mail.
25769
25770 Write @code{spam-blackbox-register-routine} and
25771 @code{spam-blackbox-unregister-routine} using the bogofilter
25772 register/unregister routines as a start, or other restister/unregister
25773 routines more appropriate to Blackbox, if Blackbox can
25774 register/unregister spam and ham.
25775
25776 @item
25777 Functionality
25778
25779 The @code{spam-check-blackbox} function should return @samp{nil} or
25780 @code{spam-split-group}, observing the other conventions.  See the
25781 existing @code{spam-check-*} functions for examples of what you can
25782 do, and stick to the template unless you fully understand the reasons
25783 why you aren't.
25784
25785 @end enumerate
25786
25787 For processing spam and ham messages, provide the following:
25788
25789 @enumerate
25790
25791 @item
25792 Code
25793
25794 Note you don't have to provide a spam or a ham processor.  Only
25795 provide them if Blackbox supports spam or ham processing.
25796
25797 Also, ham and spam processors are being phased out as single
25798 variables.  Instead the form @code{(spam spam-use-blackbox)} or
25799 @code{(ham spam-use-blackbox)} is favored.  For now, spam/ham
25800 processor variables are still around but they won't be for long.
25801
25802 @lisp
25803 (defvar gnus-group-spam-exit-processor-blackbox "blackbox-spam"
25804   "The Blackbox summary exit spam processor.
25805 Only applicable to spam groups.")
25806
25807 (defvar gnus-group-ham-exit-processor-blackbox "blackbox-ham"
25808   "The whitelist summary exit ham processor.
25809 Only applicable to non-spam (unclassified and ham) groups.")
25810
25811 @end lisp
25812
25813 @item
25814 Gnus parameters
25815
25816 Add
25817 @lisp
25818 (const :tag "Spam: Blackbox" (spam spam-use-blackbox))
25819 (const :tag "Ham: Blackbox"  (ham spam-use-blackbox))
25820 @end lisp
25821 to the @code{spam-process} group parameter in @code{gnus.el}.  Make
25822 sure you do it twice, once for the parameter and once for the
25823 variable customization.
25824
25825 Add
25826 @lisp
25827 (variable-item spam-use-blackbox)
25828 @end lisp
25829 to the @code{spam-autodetect-methods} group parameter in
25830 @code{gnus.el} if Blackbox can check incoming mail for spam contents.
25831
25832 Finally, use the appropriate @code{spam-install-*-backend} function in
25833 @code{spam.el}.  Here are the available functions.
25834
25835
25836 @enumerate
25837
25838 @item
25839 @code{spam-install-backend-alias}
25840
25841 This function will simply install an alias for a back end that does
25842 everything like the original back end.  It is currently only used to
25843 make @code{spam-use-BBDB-exclusive} act like @code{spam-use-BBDB}.
25844
25845 @item
25846 @code{spam-install-nocheck-backend}
25847
25848 This function installs a back end that has no check function, but can
25849 register/unregister ham or spam.  The @code{spam-use-gmane} back end is
25850 such a back end.
25851
25852 @item
25853 @code{spam-install-checkonly-backend}
25854
25855 This function will install a back end that can only check incoming mail
25856 for spam contents.  It can't register or unregister messages.
25857 @code{spam-use-blackholes} and @code{spam-use-hashcash} are such
25858 back ends.
25859
25860 @item
25861 @code{spam-install-statistical-checkonly-backend}
25862
25863 This function installs a statistical back end (one which requires the
25864 full body of a message to check it) that can only check incoming mail
25865 for contents.  @code{spam-use-regex-body} is such a filter.
25866
25867 @item
25868 @code{spam-install-statistical-backend}
25869
25870 This function install a statistical back end with incoming checks and
25871 registration/unregistration routines.  @code{spam-use-bogofilter} is
25872 set up this way.
25873
25874 @item
25875 @code{spam-install-backend}
25876
25877 This is the most normal back end installation, where a back end that can
25878 check and register/unregister messages is set up without statistical
25879 abilities.  The @code{spam-use-BBDB} is such a back end.
25880
25881 @item
25882 @code{spam-install-mover-backend}
25883
25884 Mover back ends are internal to @code{spam.el} and specifically move
25885 articles around when the summary is exited.  You will very probably
25886 never install such a back end.
25887 @end enumerate
25888
25889 @end enumerate
25890
25891 @node Spam Statistics Package
25892 @subsection Spam Statistics Package
25893 @cindex Paul Graham
25894 @cindex Graham, Paul
25895 @cindex naive Bayesian spam filtering
25896 @cindex Bayesian spam filtering, naive
25897 @cindex spam filtering, naive Bayesian
25898
25899 Paul Graham has written an excellent essay about spam filtering using
25900 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
25901 Spam}.  In it he describes the inherent deficiency of rule-based
25902 filtering as used by SpamAssassin, for example: Somebody has to write
25903 the rules, and everybody else has to install these rules.  You are
25904 always late.  It would be much better, he argues, to filter mail based
25905 on whether it somehow resembles spam or non-spam.  One way to measure
25906 this is word distribution.  He then goes on to describe a solution
25907 that checks whether a new mail resembles any of your other spam mails
25908 or not.
25909
25910 The basic idea is this:  Create a two collections of your mail, one
25911 with spam, one with non-spam.  Count how often each word appears in
25912 either collection, weight this by the total number of mails in the
25913 collections, and store this information in a dictionary.  For every
25914 word in a new mail, determine its probability to belong to a spam or a
25915 non-spam mail.  Use the 15 most conspicuous words, compute the total
25916 probability of the mail being spam.  If this probability is higher
25917 than a certain threshold, the mail is considered to be spam.
25918
25919 The Spam Statistics package adds support to Gnus for this kind of
25920 filtering.  It can be used as one of the back ends of the Spam package
25921 (@pxref{Spam Package}), or by itself.
25922
25923 Before using the Spam Statistics package, you need to set it up.
25924 First, you need two collections of your mail, one with spam, one with
25925 non-spam.  Then you need to create a dictionary using these two
25926 collections, and save it.  And last but not least, you need to use
25927 this dictionary in your fancy mail splitting rules.
25928
25929 @menu
25930 * Creating a spam-stat dictionary::
25931 * Splitting mail using spam-stat::
25932 * Low-level interface to the spam-stat dictionary::
25933 @end menu
25934
25935 @node Creating a spam-stat dictionary
25936 @subsubsection Creating a spam-stat dictionary
25937
25938 Before you can begin to filter spam based on statistics, you must
25939 create these statistics based on two mail collections, one with spam,
25940 one with non-spam.  These statistics are then stored in a dictionary
25941 for later use.  In order for these statistics to be meaningful, you
25942 need several hundred emails in both collections.
25943
25944 Gnus currently supports only the nnml back end for automated dictionary
25945 creation.  The nnml back end stores all mails in a directory, one file
25946 per mail.  Use the following:
25947
25948 @defun spam-stat-process-spam-directory
25949 Create spam statistics for every file in this directory.  Every file
25950 is treated as one spam mail.
25951 @end defun
25952
25953 @defun spam-stat-process-non-spam-directory
25954 Create non-spam statistics for every file in this directory.  Every
25955 file is treated as one non-spam mail.
25956 @end defun
25957
25958 Usually you would call @code{spam-stat-process-spam-directory} on a
25959 directory such as @file{~/Mail/mail/spam} (this usually corresponds to
25960 the group @samp{nnml:mail.spam}), and you would call
25961 @code{spam-stat-process-non-spam-directory} on a directory such as
25962 @file{~/Mail/mail/misc} (this usually corresponds to the group
25963 @samp{nnml:mail.misc}).
25964
25965 When you are using @acronym{IMAP}, you won't have the mails available
25966 locally, so that will not work.  One solution is to use the Gnus Agent
25967 to cache the articles.  Then you can use directories such as
25968 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
25969 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
25970
25971 @defvar spam-stat
25972 This variable holds the hash-table with all the statistics---the
25973 dictionary we have been talking about.  For every word in either
25974 collection, this hash-table stores a vector describing how often the
25975 word appeared in spam and often it appeared in non-spam mails.
25976 @end defvar
25977
25978 If you want to regenerate the statistics from scratch, you need to
25979 reset the dictionary.
25980
25981 @defun spam-stat-reset
25982 Reset the @code{spam-stat} hash-table, deleting all the statistics.
25983 @end defun
25984
25985 When you are done, you must save the dictionary.  The dictionary may
25986 be rather large.  If you will not update the dictionary incrementally
25987 (instead, you will recreate it once a month, for example), then you
25988 can reduce the size of the dictionary by deleting all words that did
25989 not appear often enough or that do not clearly belong to only spam or
25990 only non-spam mails.
25991
25992 @defun spam-stat-reduce-size
25993 Reduce the size of the dictionary.  Use this only if you do not want
25994 to update the dictionary incrementally.
25995 @end defun
25996
25997 @defun spam-stat-save
25998 Save the dictionary.
25999 @end defun
26000
26001 @defvar spam-stat-file
26002 The filename used to store the dictionary.  This defaults to
26003 @file{~/.spam-stat.el}.
26004 @end defvar
26005
26006 @node Splitting mail using spam-stat
26007 @subsubsection Splitting mail using spam-stat
26008
26009 This section describes how to use the Spam statistics
26010 @emph{independently} of the @xref{Spam Package}.
26011
26012 First, add the following to your @file{~/.gnus.el} file:
26013
26014 @lisp
26015 (require 'spam-stat)
26016 (spam-stat-load)
26017 @end lisp
26018
26019 This will load the necessary Gnus code, and the dictionary you
26020 created.
26021
26022 Next, you need to adapt your fancy splitting rules:  You need to
26023 determine how to use @code{spam-stat}.  The following examples are for
26024 the nnml back end.  Using the nnimap back end works just as well.  Just
26025 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
26026
26027 In the simplest case, you only have two groups, @samp{mail.misc} and
26028 @samp{mail.spam}.  The following expression says that mail is either
26029 spam or it should go into @samp{mail.misc}.  If it is spam, then
26030 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
26031
26032 @lisp
26033 (setq nnmail-split-fancy
26034       `(| (: spam-stat-split-fancy)
26035           "mail.misc"))
26036 @end lisp
26037
26038 @defvar spam-stat-split-fancy-spam-group
26039 The group to use for spam.  Default is @samp{mail.spam}.
26040 @end defvar
26041
26042 If you also filter mail with specific subjects into other groups, use
26043 the following expression.  Only mails not matching the regular
26044 expression are considered potential spam.
26045
26046 @lisp
26047 (setq nnmail-split-fancy
26048       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
26049           (: spam-stat-split-fancy)
26050           "mail.misc"))
26051 @end lisp
26052
26053 If you want to filter for spam first, then you must be careful when
26054 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
26055 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
26056 non-spam, therefore both should be in your collection of non-spam
26057 mails, when creating the dictionary!
26058
26059 @lisp
26060 (setq nnmail-split-fancy
26061       `(| (: spam-stat-split-fancy)
26062           ("Subject" "\\bspam-stat\\b" "mail.emacs")
26063           "mail.misc"))
26064 @end lisp
26065
26066 You can combine this with traditional filtering.  Here, we move all
26067 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
26068 @code{spam-stat-split-fancy} will never see them, the mails in
26069 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
26070 nor in your collection of non-spam mails, when creating the
26071 dictionary!
26072
26073 @lisp
26074 (setq nnmail-split-fancy
26075       `(| ("Content-Type" "text/html" "mail.spam.filtered")
26076           (: spam-stat-split-fancy)
26077           ("Subject" "\\bspam-stat\\b" "mail.emacs")
26078           "mail.misc"))
26079 @end lisp
26080
26081
26082 @node Low-level interface to the spam-stat dictionary
26083 @subsubsection Low-level interface to the spam-stat dictionary
26084
26085 The main interface to using @code{spam-stat}, are the following functions:
26086
26087 @defun spam-stat-buffer-is-spam
26088 Called in a buffer, that buffer is considered to be a new spam mail.
26089 Use this for new mail that has not been processed before.
26090 @end defun
26091
26092 @defun spam-stat-buffer-is-no-spam
26093 Called in a buffer, that buffer is considered to be a new non-spam
26094 mail.  Use this for new mail that has not been processed before.
26095 @end defun
26096
26097 @defun spam-stat-buffer-change-to-spam
26098 Called in a buffer, that buffer is no longer considered to be normal
26099 mail but spam.  Use this to change the status of a mail that has
26100 already been processed as non-spam.
26101 @end defun
26102
26103 @defun spam-stat-buffer-change-to-non-spam
26104 Called in a buffer, that buffer is no longer considered to be spam but
26105 normal mail.  Use this to change the status of a mail that has already
26106 been processed as spam.
26107 @end defun
26108
26109 @defun spam-stat-save
26110 Save the hash table to the file.  The filename used is stored in the
26111 variable @code{spam-stat-file}.
26112 @end defun
26113
26114 @defun spam-stat-load
26115 Load the hash table from a file.  The filename used is stored in the
26116 variable @code{spam-stat-file}.
26117 @end defun
26118
26119 @defun spam-stat-score-word
26120 Return the spam score for a word.
26121 @end defun
26122
26123 @defun spam-stat-score-buffer
26124 Return the spam score for a buffer.
26125 @end defun
26126
26127 @defun spam-stat-split-fancy
26128 Use this function for fancy mail splitting.  Add the rule @samp{(:
26129 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
26130 @end defun
26131
26132 Make sure you load the dictionary before using it.  This requires the
26133 following in your @file{~/.gnus.el} file:
26134
26135 @lisp
26136 (require 'spam-stat)
26137 (spam-stat-load)
26138 @end lisp
26139
26140 Typical test will involve calls to the following functions:
26141
26142 @smallexample
26143 Reset: (setq spam-stat (make-hash-table :test 'equal))
26144 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
26145 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
26146 Save table: (spam-stat-save)
26147 File size: (nth 7 (file-attributes spam-stat-file))
26148 Number of words: (hash-table-count spam-stat)
26149 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
26150 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
26151 Reduce table size: (spam-stat-reduce-size)
26152 Save table: (spam-stat-save)
26153 File size: (nth 7 (file-attributes spam-stat-file))
26154 Number of words: (hash-table-count spam-stat)
26155 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
26156 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
26157 @end smallexample
26158
26159 Here is how you would create your dictionary:
26160
26161 @smallexample
26162 Reset: (setq spam-stat (make-hash-table :test 'equal))
26163 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
26164 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
26165 Repeat for any other non-spam group you need...
26166 Reduce table size: (spam-stat-reduce-size)
26167 Save table: (spam-stat-save)
26168 @end smallexample
26169
26170 @node The Gnus Registry
26171 @section The Gnus Registry
26172 @cindex registry
26173 @cindex split
26174 @cindex track
26175
26176 The Gnus registry is a package that tracks messages by their
26177 Message-ID across all backends.  This allows Gnus users to do several
26178 cool things, be the envy of the locals, get free haircuts, and be
26179 experts on world issues.  Well, maybe not all of those, but the
26180 features are pretty cool.
26181
26182 Although they will be explained in detail shortly, here's a quick list
26183 of said features in case your attention span is...  never mind.
26184
26185 @enumerate
26186 @item
26187 Split messages to their parent
26188
26189 This keeps discussions in the same group.  You can use the subject and
26190 the sender in addition to the Message-ID.  Several strategies are
26191 available.
26192
26193 @item
26194 Store custom flags and keywords
26195
26196 The registry can store custom flags and keywords for a message.  For
26197 instance, you can mark a message ``To-Do'' this way and the flag will
26198 persist whether the message is in the nnimap, nnml, nnmaildir,
26199 etc. backends.
26200
26201 @item
26202 Store arbitrary data
26203
26204 Through a simple ELisp API, the registry can remember any data for a
26205 message.  A built-in inverse map, when activated, allows quick lookups
26206 of all messages matching a particular set of criteria.
26207 @end enumerate
26208
26209 @menu
26210 * Setup::
26211 * Fancy splitting to parent::
26212 * Store custom flags and keywords::
26213 * Store arbitrary data::
26214 @end menu
26215
26216 @node Setup
26217 @subsection Setup
26218
26219 Fortunately, setting up the Gnus registry is pretty easy:
26220
26221 @lisp
26222 (setq gnus-registry-max-entries 2500
26223       gnus-registry-use-long-group-names t)
26224
26225 (gnus-registry-initialize)
26226 @end lisp
26227
26228 This adds registry saves to Gnus newsrc saves (which happen on exit
26229 and when you press @kbd{s} from the @code{*Group*} buffer.  It also
26230 adds registry calls to article actions in Gnus (copy, move, etc.)  so
26231 it's not easy to undo the initialization.  See
26232 @code{gnus-registry-initialize} for the gory details.
26233
26234 Here are other settings used by the author of the registry (understand
26235 what they do before you copy them blindly).
26236
26237 @lisp
26238 (setq
26239  gnus-registry-split-strategy 'majority
26240  gnus-registry-ignored-groups '(("nntp" t)
26241                                 ("nnrss" t)
26242                                 ("spam" t)
26243                                 ("train" t))
26244  gnus-registry-max-entries 500000
26245  gnus-registry-use-long-group-names t
26246  gnus-registry-track-extra '(sender subject))
26247 @end lisp
26248
26249 They say: keep a lot of messages around, use long group names, track
26250 messages by sender and subject (not just parent Message-ID), and when
26251 the registry splits incoming mail, use a majority rule to decide where
26252 messages should go if there's more than one possibility.  In addition,
26253 the registry should ignore messages in groups that match ``nntp'',
26254 ``nnrss'', ``spam'', or ``train.''
26255
26256 You are doubtless impressed by all this, but you ask: ``I am a Gnus
26257 user, I customize to live.  Give me more.''  Here you go, these are
26258 the general settings.
26259
26260 @defvar gnus-registry-unfollowed-groups
26261 The groups that will not be followed by
26262 @code{gnus-registry-split-fancy-with-parent}.  They will still be
26263 remembered by the registry.  This is a list of regular expressions.
26264 @end defvar
26265
26266 @defvar gnus-registry-ignored-groups
26267 The groups that will not be remembered by the registry.  This is a
26268 list of regular expressions, also available through Group/Topic
26269 customization (so you can ignore or keep a specific group or a whole
26270 topic).
26271 @end defvar
26272
26273 @defvar gnus-registry-use-long-group-names
26274 Whether the registry will use long group names.  It's recommended to
26275 set this to @code{t}, although everything works if you don't.  Future
26276 functionality will require it.
26277 @end defvar
26278
26279 @defvar gnus-registry-max-entries
26280 The number (an integer or @code{nil} for unlimited) of entries the
26281 registry will keep.
26282 @end defvar
26283
26284 @defvar gnus-registry-cache-file
26285 The file where the registry will be stored between Gnus sessions.
26286 @end defvar
26287
26288 @node Fancy splitting to parent
26289 @subsection Fancy splitting to parent
26290
26291 Simply put, this lets you put followup e-mail where it belongs.
26292
26293 Every message has a Message-ID, which is unique, and the registry
26294 remembers it.  When the message is moved or copied, the registry will
26295 notice this and offer the new group as a choice to the splitting
26296 strategy.
26297
26298 When a followup is made, usually it mentions the original message's
26299 Message-ID in the headers.  The registry knows this and uses that
26300 mention to find the group where the original message lives.  You only
26301 have to put a rule like this:
26302
26303 @lisp
26304 (setq nnimap-my-split-fancy '(|
26305
26306       ;; split to parent: you need this
26307       (: gnus-registry-split-fancy-with-parent)
26308
26309       ;; other rules, as an example
26310       (: spam-split)
26311       ;; default mailbox
26312       "mail")
26313 @end lisp
26314
26315 in your fancy split setup.  In addition, you may want to customize the
26316 following variables.
26317
26318 @defvar gnus-registry-track-extra
26319 This is a list of symbols, so it's best to change it from the
26320 Customize interface.  By default it's @code{nil}, but you may want to
26321 track @code{subject} and @code{sender} as well when splitting by parent.
26322 It may work for you.  It can be annoying if your mail flow is large and
26323 people don't stick to the same groups.
26324 @end defvar
26325
26326 @defvar gnus-registry-split-strategy
26327 This is a symbol, so it's best to change it from the Customize
26328 interface.  By default it's @code{nil}, but you may want to set it to
26329 @code{majority} or @code{first} to split by sender or subject based on
26330 the majority of matches or on the first found.
26331 @end defvar
26332
26333 @node Store custom flags and keywords
26334 @subsection Store custom flags and keywords
26335
26336 The registry lets you set custom flags and keywords per message.  You
26337 can use the Gnus->Registry Marks menu or the @kbd{M M x} keyboard
26338 shortcuts, where @code{x} is the first letter of the mark's name.
26339
26340 @defvar gnus-registry-marks
26341 The custom marks that the registry can use.  You can modify the
26342 default list, if you like.  If you do, you'll have to exit Emacs
26343 before they take effect (you can also unload the registry and reload
26344 it or evaluate the specific macros you'll need, but you probably don't
26345 want to bother).  Use the Customize interface to modify the list.
26346
26347 By default this list has the @code{Important}, @code{Work},
26348 @code{Personal}, @code{To-Do}, and @code{Later} marks.  They all have
26349 keyboard shortcuts like @kbd{M M i} for Important, using the first
26350 letter.
26351 @end defvar
26352
26353 @defun gnus-registry-mark-article
26354 Call this function to mark an article with a custom registry mark.  It
26355 will offer the available marks for completion.
26356 @end defun
26357
26358 @node Store arbitrary data
26359 @subsection Store arbitrary data
26360
26361 The registry has a simple API that uses a Message-ID as the key to
26362 store arbitrary data (as long as it can be converted to a list for
26363 storage).
26364
26365 @defun gnus-registry-store-extra-entry (id key value)
26366 Store @code{value} in the extra data key @code{key} for message
26367 @code{id}.
26368 @end defun
26369
26370 @defun gnus-registry-delete-extra-entry (id key)
26371 Delete the extra data key @code{key} for message @code{id}.
26372 @end defun
26373
26374 @defun gnus-registry-fetch-extra (id key)
26375 Get the extra data key @code{key} for message @code{id}.
26376 @end defun
26377
26378 @defvar gnus-registry-extra-entries-precious
26379 If any extra entries are precious, their presence will make the
26380 registry keep the whole entry forever, even if there are no groups for
26381 the Message-ID and if the size limit of the registry is reached.  By
26382 default this is just @code{(marks)} so the custom registry marks are
26383 precious.
26384 @end defvar
26385
26386 @node Other modes
26387 @section Interaction with other modes
26388
26389 @subsection Dired
26390 @cindex dired
26391
26392 @code{gnus-dired-minor-mode} provides some useful functions for dired
26393 buffers.  It is enabled with
26394 @lisp
26395 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
26396 @end lisp
26397
26398 @table @kbd
26399 @item C-c C-m C-a
26400 @findex gnus-dired-attach
26401 @cindex attachments, selection via dired
26402 Send dired's marked files as an attachment (@code{gnus-dired-attach}).
26403 You will be prompted for a message buffer.
26404
26405 @item C-c C-m C-l
26406 @findex gnus-dired-find-file-mailcap
26407 Visit a file according to the appropriate mailcap entry
26408 (@code{gnus-dired-find-file-mailcap}).  With prefix, open file in a new
26409 buffer.
26410
26411 @item C-c C-m C-p
26412 @findex gnus-dired-print
26413 Print file according to the mailcap entry (@code{gnus-dired-print}).  If
26414 there is no print command, print in a PostScript image.
26415 @end table
26416
26417 @node Various Various
26418 @section Various Various
26419 @cindex mode lines
26420 @cindex highlights
26421
26422 @table @code
26423
26424 @item gnus-home-directory
26425 @vindex gnus-home-directory
26426 All Gnus file and directory variables will be initialized from this
26427 variable, which defaults to @file{~/}.
26428
26429 @item gnus-directory
26430 @vindex gnus-directory
26431 Most Gnus storage file and directory variables will be initialized from
26432 this variable, which defaults to the @env{SAVEDIR} environment
26433 variable, or @file{~/News/} if that variable isn't set.
26434
26435 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
26436 This means that other directory variables that are initialized from this
26437 variable won't be set properly if you set this variable in
26438 @file{~/.gnus.el}.  Set this variable in @file{.emacs} instead.
26439
26440 @item gnus-default-directory
26441 @vindex gnus-default-directory
26442 Not related to the above variable at all---this variable says what the
26443 default directory of all Gnus buffers should be.  If you issue commands
26444 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
26445 default directory.  If this variable is @code{nil} (which is the
26446 default), the default directory will be the default directory of the
26447 buffer you were in when you started Gnus.
26448
26449 @item gnus-verbose
26450 @vindex gnus-verbose
26451 This variable is an integer between zero and ten.  The higher the value,
26452 the more messages will be displayed.  If this variable is zero, Gnus
26453 will never flash any messages, if it is seven (which is the default),
26454 most important messages will be shown, and if it is ten, Gnus won't ever
26455 shut up, but will flash so many messages it will make your head swim.
26456
26457 @item gnus-verbose-backends
26458 @vindex gnus-verbose-backends
26459 This variable works the same way as @code{gnus-verbose}, but it applies
26460 to the Gnus back ends instead of Gnus proper.
26461
26462 @item gnus-add-timestamp-to-message
26463 @vindex gnus-add-timestamp-to-message
26464 This variable controls whether to add timestamps to messages that are
26465 controlled by @code{gnus-verbose} and @code{gnus-verbose-backends} and
26466 are issued.  The default value is @code{nil} which means never to add
26467 timestamp.  If it is @code{log}, add timestamps to only the messages
26468 that go into the @samp{*Messages*} buffer (in XEmacs, it is the
26469 @w{@samp{ *Message-Log*}} buffer).  If it is neither @code{nil} nor
26470 @code{log}, add timestamps not only to log messages but also to the ones
26471 displayed in the echo area.
26472
26473 @item nnheader-max-head-length
26474 @vindex nnheader-max-head-length
26475 When the back ends read straight heads of articles, they all try to read
26476 as little as possible.  This variable (default 8192) specifies
26477 the absolute max length the back ends will try to read before giving up
26478 on finding a separator line between the head and the body.  If this
26479 variable is @code{nil}, there is no upper read bound.  If it is
26480 @code{t}, the back ends won't try to read the articles piece by piece,
26481 but read the entire articles.  This makes sense with some versions of
26482 @code{ange-ftp} or @code{efs}.
26483
26484 @item nnheader-head-chop-length
26485 @vindex nnheader-head-chop-length
26486 This variable (default 2048) says how big a piece of each article to
26487 read when doing the operation described above.
26488
26489 @item nnheader-file-name-translation-alist
26490 @vindex nnheader-file-name-translation-alist
26491 @cindex file names
26492 @cindex invalid characters in file names
26493 @cindex characters in file names
26494 This is an alist that says how to translate characters in file names.
26495 For instance, if @samp{:} is invalid as a file character in file names
26496 on your system (you OS/2 user you), you could say something like:
26497
26498 @lisp
26499 @group
26500 (setq nnheader-file-name-translation-alist
26501       '((?: . ?_)))
26502 @end group
26503 @end lisp
26504
26505 In fact, this is the default value for this variable on OS/2 and MS
26506 Windows (phooey) systems.
26507
26508 @item gnus-hidden-properties
26509 @vindex gnus-hidden-properties
26510 This is a list of properties to use to hide ``invisible'' text.  It is
26511 @code{(invisible t intangible t)} by default on most systems, which
26512 makes invisible text invisible and intangible.
26513
26514 @item gnus-parse-headers-hook
26515 @vindex gnus-parse-headers-hook
26516 A hook called before parsing headers.  It can be used, for instance, to
26517 gather statistics on the headers fetched, or perhaps you'd like to prune
26518 some headers.  I don't see why you'd want that, though.
26519
26520 @item gnus-shell-command-separator
26521 @vindex gnus-shell-command-separator
26522 String used to separate two shell commands.  The default is @samp{;}.
26523
26524 @item gnus-invalid-group-regexp
26525 @vindex gnus-invalid-group-regexp
26526
26527 Regexp to match ``invalid'' group names when querying user for a group
26528 name.  The default value catches some @strong{really} invalid group
26529 names who could possibly mess up Gnus internally (like allowing
26530 @samp{:} in a group name, which is normally used to delimit method and
26531 group).
26532
26533 @acronym{IMAP} users might want to allow @samp{/} in group names though.
26534
26535 @item gnus-safe-html-newsgroups
26536 @vindex gnus-safe-html-newsgroups
26537 Groups in which links in html articles are considered all safe.  The
26538 value may be a regexp matching those groups, a list of group names, or
26539 @code{nil}.  This overrides @code{mm-w3m-safe-url-regexp}.  The default
26540 value is @code{"\\`nnrss[+:]"}.  This is effective only when emacs-w3m
26541 renders html articles, i.e., in the case @code{mm-text-html-renderer} is
26542 set to @code{w3m}.  @xref{Display Customization, ,Display Customization,
26543 emacs-mime, The Emacs MIME Manual}.
26544
26545 @end table
26546
26547 @node The End
26548 @chapter The End
26549
26550 Well, that's the manual---you can get on with your life now.  Keep in
26551 touch.  Say hello to your cats from me.
26552
26553 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
26554
26555 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
26556
26557 @quotation
26558 @strong{Te Deum}
26559
26560 @sp 1
26561 Not because of victories @*
26562 I sing,@*
26563 having none,@*
26564 but for the common sunshine,@*
26565 the breeze,@*
26566 the largess of the spring.
26567
26568 @sp 1
26569 Not for victory@*
26570 but for the day's work done@*
26571 as well as I was able;@*
26572 not for a seat upon the dais@*
26573 but at the common table.@*
26574 @end quotation
26575
26576
26577 @node Appendices
26578 @chapter Appendices
26579
26580 @menu
26581 * XEmacs::                      Requirements for installing under XEmacs.
26582 * History::                     How Gnus got where it is today.
26583 * On Writing Manuals::          Why this is not a beginner's guide.
26584 * Terminology::                 We use really difficult, like, words here.
26585 * Customization::               Tailoring Gnus to your needs.
26586 * Troubleshooting::             What you might try if things do not work.
26587 * Gnus Reference Guide::        Rilly, rilly technical stuff.
26588 * Emacs for Heathens::          A short introduction to Emacsian terms.
26589 * Frequently Asked Questions::  The Gnus FAQ
26590 @end menu
26591
26592
26593 @node XEmacs
26594 @section XEmacs
26595 @cindex XEmacs
26596 @cindex installing under XEmacs
26597
26598 XEmacs is distributed as a collection of packages.  You should install
26599 whatever packages the Gnus XEmacs package requires.  The current
26600 requirements are @samp{gnus}, @samp{mail-lib}, @samp{xemacs-base},
26601 @samp{eterm}, @samp{sh-script}, @samp{net-utils}, @samp{os-utils},
26602 @samp{dired}, @samp{mh-e}, @samp{sieve}, @samp{ps-print}, @samp{W3},
26603 @samp{pgg}, @samp{mailcrypt}, @samp{ecrypto}, and @samp{sasl}.
26604
26605
26606 @node History
26607 @section History
26608
26609 @cindex history
26610 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
26611 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
26612
26613 If you want to investigate the person responsible for this outrage,
26614 you can point your (feh!) web browser to
26615 @uref{http://quimby.gnus.org/}.  This is also the primary
26616 distribution point for the new and spiffy versions of Gnus, and is
26617 known as The Site That Destroys Newsrcs And Drives People Mad.
26618
26619 During the first extended alpha period of development, the new Gnus was
26620 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
26621 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
26622 (Besides, the ``Gnus'' in this abbreviation should probably be
26623 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
26624 appropriate name, don't you think?)
26625
26626 In any case, after spending all that energy on coming up with a new and
26627 spunky name, we decided that the name was @emph{too} spunky, so we
26628 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
26629 ``@sc{gnus}''.  New vs. old.
26630
26631 @menu
26632 * Gnus Versions::               What Gnus versions have been released.
26633 * Other Gnus Versions::         Other Gnus versions that also have been released.
26634 * Why?::                        What's the point of Gnus?
26635 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
26636 * Conformity::                  Gnus tries to conform to all standards.
26637 * Emacsen::                     Gnus can be run on a few modern Emacsen.
26638 * Gnus Development::            How Gnus is developed.
26639 * Contributors::                Oodles of people.
26640 * New Features::                Pointers to some of the new stuff in Gnus.
26641 @end menu
26642
26643
26644 @node Gnus Versions
26645 @subsection Gnus Versions
26646 @cindex ding Gnus
26647 @cindex September Gnus
26648 @cindex Red Gnus
26649 @cindex Quassia Gnus
26650 @cindex Pterodactyl Gnus
26651 @cindex Oort Gnus
26652 @cindex No Gnus
26653 @cindex Gnus versions
26654
26655 The first ``proper'' release of Gnus 5 was done in November 1995 when it
26656 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
26657 plus 15 Gnus 5.0 releases).
26658
26659 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
26660 releases)) was released under the name ``Gnus 5.2'' (40 releases).
26661
26662 On July 28th 1996 work on Red Gnus was begun, and it was released on
26663 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
26664
26665 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
26666 It was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
26667
26668 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
26669 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
26670 1999.
26671
26672 On the 26th of October 2000, Oort Gnus was begun and was released as
26673 Gnus 5.10 on May 1st 2003 (24 releases).
26674
26675 On the January 4th 2004, No Gnus was begun.
26676
26677 On April 19, 2010 Gnus development was moved to Git.  See
26678 http://git.gnus.org for details (http://www.gnus.org will be updated
26679 with the information when possible).
26680
26681 If you happen upon a version of Gnus that has a prefixed name --
26682 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
26683 ``Pterodactyl Gnus'', ``Oort Gnus'', ``No Gnus'' -- don't panic.
26684 Don't let it know that you're frightened.  Back away.  Slowly.  Whatever
26685 you do, don't run.  Walk away, calmly, until you're out of its reach.
26686 Find a proper released version of Gnus and snuggle up to that instead.
26687
26688
26689 @node Other Gnus Versions
26690 @subsection Other Gnus Versions
26691 @cindex Semi-gnus
26692
26693 In addition to the versions of Gnus which have had their releases
26694 coordinated by Lars, one major development has been Semi-gnus from
26695 Japan.  It's based on a library called @acronym{SEMI}, which provides
26696 @acronym{MIME} capabilities.
26697
26698 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
26699 Collectively, they are called ``Semi-gnus'', and different strains are
26700 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
26701 @acronym{MIME} and multilingualization things, especially important for
26702 Japanese users.
26703
26704
26705 @node Why?
26706 @subsection Why?
26707
26708 What's the point of Gnus?
26709
26710 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
26711 newsreader, that lets you do anything you can think of.  That was my
26712 original motivation, but while working on Gnus, it has become clear to
26713 me that this generation of newsreaders really belong in the stone age.
26714 Newsreaders haven't developed much since the infancy of the net.  If the
26715 volume continues to rise with the current rate of increase, all current
26716 newsreaders will be pretty much useless.  How do you deal with
26717 newsgroups that have thousands of new articles each day?  How do you
26718 keep track of millions of people who post?
26719
26720 Gnus offers no real solutions to these questions, but I would very much
26721 like to see Gnus being used as a testing ground for new methods of
26722 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
26723 to separate the newsreader from the back ends, Gnus now offers a simple
26724 interface for anybody who wants to write new back ends for fetching mail
26725 and news from different sources.  I have added hooks for customizations
26726 everywhere I could imagine it being useful.  By doing so, I'm inviting
26727 every one of you to explore and invent.
26728
26729 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
26730 @kbd{C-u 100 M-x all-hail-xemacs}.
26731
26732
26733 @node Compatibility
26734 @subsection Compatibility
26735
26736 @cindex compatibility
26737 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
26738 bindings have been kept.  More key bindings have been added, of course,
26739 but only in one or two obscure cases have old bindings been changed.
26740
26741 Our motto is:
26742 @quotation
26743 @cartouche
26744 @center In a cloud bones of steel.
26745 @end cartouche
26746 @end quotation
26747
26748 All commands have kept their names.  Some internal functions have changed
26749 their names.
26750
26751 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
26752 Articles}.
26753
26754 One major compatibility question is the presence of several summary
26755 buffers.  All variables relevant while reading a group are
26756 buffer-local to the summary buffer they belong in.  Although many
26757 important variables have their values copied into their global
26758 counterparts whenever a command is executed in the summary buffer, this
26759 change might lead to incorrect values being used unless you are careful.
26760
26761 All code that relies on knowledge of @sc{gnus} internals will probably
26762 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
26763 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
26764 maintains a hash table that points to the entries in this alist (which
26765 speeds up many functions), and changing the alist directly will lead to
26766 peculiar results.
26767
26768 @cindex hilit19
26769 @cindex highlighting
26770 Old hilit19 code does not work at all.  In fact, you should probably
26771 remove all hilit code from all Gnus hooks
26772 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
26773 Gnus provides various integrated functions for highlighting.  These are
26774 faster and more accurate.  To make life easier for everybody, Gnus will
26775 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
26776 Away!
26777
26778 Packages like @code{expire-kill} will no longer work.  As a matter of
26779 fact, you should probably remove all old @sc{gnus} packages (and other
26780 code) when you start using Gnus.  More likely than not, Gnus already
26781 does what you have written code to make @sc{gnus} do.  (Snicker.)
26782
26783 Even though old methods of doing things are still supported, only the
26784 new methods are documented in this manual.  If you detect a new method of
26785 doing something while reading this manual, that does not mean you have
26786 to stop doing it the old way.
26787
26788 Gnus understands all @sc{gnus} startup files.
26789
26790 @kindex M-x gnus-bug
26791 @findex gnus-bug
26792 @cindex reporting bugs
26793 @cindex bugs
26794 Overall, a casual user who hasn't written much code that depends on
26795 @sc{gnus} internals should suffer no problems.  If problems occur,
26796 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
26797
26798 @vindex gnus-bug-create-help-buffer
26799 If you are in the habit of sending bug reports @emph{very} often, you
26800 may find the helpful help buffer annoying after a while.  If so, set
26801 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
26802 up at you.
26803
26804
26805 @node Conformity
26806 @subsection Conformity
26807
26808 No rebels without a clue here, ma'am.  We conform to all standards known
26809 to (wo)man.  Except for those standards and/or conventions we disagree
26810 with, of course.
26811
26812 @table @strong
26813
26814 @item RFC (2)822
26815 @cindex RFC 822
26816 @cindex RFC 2822
26817 There are no known breaches of this standard.
26818
26819 @item RFC 1036
26820 @cindex RFC 1036
26821 There are no known breaches of this standard, either.
26822
26823 @item Son-of-RFC 1036
26824 @cindex Son-of-RFC 1036
26825 We do have some breaches to this one.
26826
26827 @table @emph
26828
26829 @item X-Newsreader
26830 @itemx User-Agent
26831 These are considered to be ``vanity headers'', while I consider them
26832 to be consumer information.  After seeing so many badly formatted
26833 articles coming from @code{tin} and @code{Netscape} I know not to use
26834 either of those for posting articles.  I would not have known that if
26835 it wasn't for the @code{X-Newsreader} header.
26836 @end table
26837
26838 @item USEFOR
26839 @cindex USEFOR
26840 USEFOR is an IETF working group writing a successor to RFC 1036, based
26841 on Son-of-RFC 1036.  They have produced a number of drafts proposing
26842 various changes to the format of news articles.  The Gnus towers will
26843 look into implementing the changes when the draft is accepted as an RFC.
26844
26845 @item MIME - RFC 2045-2049 etc
26846 @cindex @acronym{MIME}
26847 All the various @acronym{MIME} RFCs are supported.
26848
26849 @item Disposition Notifications - RFC 2298
26850 Message Mode is able to request notifications from the receiver.
26851
26852 @item PGP - RFC 1991 and RFC 2440
26853 @cindex RFC 1991
26854 @cindex RFC 2440
26855 RFC 1991 is the original @acronym{PGP} message specification,
26856 published as an informational RFC.  RFC 2440 was the follow-up, now
26857 called Open PGP, and put on the Standards Track.  Both document a
26858 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
26859 encoding (signing and encryption) and decoding (verification and
26860 decryption).
26861
26862 @item PGP/MIME - RFC 2015/3156
26863 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
26864 1991) describes the @acronym{MIME}-wrapping around the RFC 1991/2440 format.
26865 Gnus supports both encoding and decoding.
26866
26867 @item S/MIME - RFC 2633
26868 RFC 2633 describes the @acronym{S/MIME} format.
26869
26870 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
26871 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
26872 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
26873 authentication for @acronym{IMAP}.  RFC 2086 describes access control
26874 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
26875 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
26876 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
26877 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
26878
26879 @end table
26880
26881 If you ever notice Gnus acting non-compliant with regards to the texts
26882 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
26883 know.
26884
26885
26886 @node Emacsen
26887 @subsection Emacsen
26888 @cindex Emacsen
26889 @cindex XEmacs
26890 @cindex Mule
26891 @cindex Emacs
26892
26893 This version of Gnus should work on:
26894
26895 @itemize @bullet
26896
26897 @item
26898 Emacs 21.1 and up.
26899
26900 @item
26901 XEmacs 21.4 and up.
26902
26903 @end itemize
26904
26905 This Gnus version will absolutely not work on any Emacsen older than
26906 that.  Not reliably, at least.  Older versions of Gnus may work on older
26907 Emacs versions.  Particularly, Gnus 5.10.8 should also work on Emacs
26908 20.7 and XEmacs 21.1.
26909
26910 @c No-merge comment: The paragraph added in v5-10 here must not be
26911 @c synced here!
26912
26913 @node Gnus Development
26914 @subsection Gnus Development
26915
26916 Gnus is developed in a two-phased cycle.  The first phase involves much
26917 discussion on the development mailing list @samp{ding@@gnus.org}, where people
26918 propose changes and new features, post patches and new back ends.  This
26919 phase is called the @dfn{alpha} phase, since the Gnusae released in this
26920 phase are @dfn{alpha releases}, or (perhaps more commonly in other
26921 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
26922 unstable and should not be used by casual users.  Gnus alpha releases
26923 have names like ``Oort Gnus'' and ``No Gnus''.  @xref{Gnus Versions}.
26924
26925 After futzing around for 10-100 alpha releases, Gnus is declared
26926 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
26927 and is called things like ``Gnus 5.10.1'' instead.  Normal people are
26928 supposed to be able to use these, and these are mostly discussed on the
26929 @samp{gnu.emacs.gnus} newsgroup.  This newgroup is mirrored to the
26930 mailing list @samp{info-gnus-english@@gnu.org} which is carried on Gmane
26931 as @samp{gmane.emacs.gnus.user}.  These releases are finally integrated
26932 in Emacs.
26933
26934 @cindex Incoming*
26935 @vindex mail-source-delete-incoming
26936 Some variable defaults differ between alpha Gnusae and released Gnusae,
26937 in particular, @code{mail-source-delete-incoming}.  This is to prevent
26938 lossage of mail if an alpha release hiccups while handling the mail.
26939 @xref{Mail Source Customization}.
26940
26941 The division of discussion between the ding mailing list and the Gnus
26942 newsgroup is not purely based on publicity concerns.  It's true that
26943 having people write about the horrible things that an alpha Gnus release
26944 can do (sometimes) in a public forum may scare people off, but more
26945 importantly, talking about new experimental features that have been
26946 introduced may confuse casual users.  New features are frequently
26947 introduced, fiddled with, and judged to be found wanting, and then
26948 either discarded or totally rewritten.  People reading the mailing list
26949 usually keep up with these rapid changes, while people on the newsgroup
26950 can't be assumed to do so.
26951
26952 So if you have problems with or questions about the alpha versions,
26953 direct those to the ding mailing list @samp{ding@@gnus.org}.  This list
26954 is also available on Gmane as @samp{gmane.emacs.gnus.general}.
26955
26956 @cindex Incoming*
26957 @vindex mail-source-delete-incoming
26958 Some variable defaults differ between alpha Gnusae and released Gnusae,
26959 in particular, @code{mail-source-delete-incoming}.  This is to prevent
26960 lossage of mail if an alpha release hiccups while handling the mail.
26961 @xref{Mail Source Customization}.
26962
26963 @node Contributors
26964 @subsection Contributors
26965 @cindex contributors
26966
26967 The new Gnus version couldn't have been done without the help of all the
26968 people on the (ding) mailing list.  Every day for over a year I have
26969 gotten billions of nice bug reports from them, filling me with joy,
26970 every single one of them.  Smooches.  The people on the list have been
26971 tried beyond endurance, what with my ``oh, that's a neat idea <type
26972 type>, yup, I'll release it right away <ship off> no wait, that doesn't
26973 work at all <type type>, yup, I'll ship that one off right away <ship
26974 off> no, wait, that absolutely does not work'' policy for releases.
26975 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
26976 ``worser''? ``much worser''?  ``worsest''?)
26977
26978 I would like to take this opportunity to thank the Academy for@dots{}  oops,
26979 wrong show.
26980
26981 @itemize @bullet
26982
26983 @item
26984 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
26985
26986 @item
26987 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
26988 nnwarchive and many, many other things connected with @acronym{MIME} and
26989 other types of en/decoding, as well as general bug fixing, new
26990 functionality and stuff.
26991
26992 @item
26993 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
26994 well as numerous other things).
26995
26996 @item
26997 Luis Fernandes---design and graphics.
26998
26999 @item
27000 Joe Reiss---creator of the smiley faces.
27001
27002 @item
27003 Justin Sheehy---the @acronym{FAQ} maintainer.
27004
27005 @item
27006 Erik Naggum---help, ideas, support, code and stuff.
27007
27008 @item
27009 Wes Hardaker---@file{gnus-picon.el} and the manual section on
27010 @dfn{picons} (@pxref{Picons}).
27011
27012 @item
27013 Kim-Minh Kaplan---further work on the picon code.
27014
27015 @item
27016 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section.
27017
27018 @item
27019 Sudish Joseph---innumerable bug fixes.
27020
27021 @item
27022 Ilja Weis---@file{gnus-topic.el}.
27023
27024 @item
27025 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
27026
27027 @item
27028 Vladimir Alexiev---the refcard and reference booklets.
27029
27030 @item
27031 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
27032 distribution by Felix Lee and JWZ.
27033
27034 @item
27035 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
27036
27037 @item
27038 Peter Mutsaers---orphan article scoring code.
27039
27040 @item
27041 Ken Raeburn---POP mail support.
27042
27043 @item
27044 Hallvard B Furuseth---various bits and pieces, especially dealing with
27045 .newsrc files.
27046
27047 @item
27048 Brian Edmonds---@file{gnus-bbdb.el}.
27049
27050 @item
27051 David Moore---rewrite of @file{nnvirtual.el} and many other things.
27052
27053 @item
27054 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
27055
27056 @item
27057 Fran@,{c}ois Pinard---many, many interesting and thorough bug reports, as
27058 well as autoconf support.
27059
27060 @end itemize
27061
27062 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
27063 Borges, and Jost Krieger proof-reading parts of the manual.
27064
27065 The following people have contributed many patches and suggestions:
27066
27067 Christopher Davis,
27068 Andrew Eskilsson,
27069 Kai Grossjohann,
27070 Kevin Greiner,
27071 Jesper Harder,
27072 Paul Jarc,
27073 Simon Josefsson,
27074 David K@aa{}gedal,
27075 Richard Pieri,
27076 Fabrice Popineau,
27077 Daniel Quinlan,
27078 Michael Shields,
27079 Reiner Steib,
27080 Jason L. Tibbitts, III,
27081 Jack Vinson,
27082 Katsumi Yamaoka, @c Yamaoka
27083 and
27084 Teodor Zlatanov.
27085
27086 Also thanks to the following for patches and stuff:
27087
27088 Jari Aalto,
27089 Adrian Aichner,
27090 Vladimir Alexiev,
27091 Russ Allbery,
27092 Peter Arius,
27093 Matt Armstrong,
27094 Marc Auslander,
27095 Miles Bader,
27096 Alexei V. Barantsev,
27097 Frank Bennett,
27098 Robert Bihlmeyer,
27099 Chris Bone,
27100 Mark Borges,
27101 Mark Boyns,
27102 Lance A. Brown,
27103 Rob Browning,
27104 Kees de Bruin,
27105 Martin Buchholz,
27106 Joe Buehler,
27107 Kevin Buhr,
27108 Alastair Burt,
27109 Joao Cachopo,
27110 Zlatko Calusic,
27111 Massimo Campostrini,
27112 Castor,
27113 David Charlap,
27114 Dan Christensen,
27115 Kevin Christian,
27116 Jae-you Chung, @c ?
27117 James H. Cloos, Jr.,
27118 Laura Conrad,
27119 Michael R. Cook,
27120 Glenn Coombs,
27121 Andrew J. Cosgriff,
27122 Neil Crellin,
27123 Frank D. Cringle,
27124 Geoffrey T. Dairiki,
27125 Andre Deparade,
27126 Ulrik Dickow,
27127 Dave Disser,
27128 Rui-Tao Dong, @c ?
27129 Joev Dubach,
27130 Michael Welsh Duggan,
27131 Dave Edmondson,
27132 Paul Eggert,
27133 Mark W. Eichin,
27134 Karl Eichwalder,
27135 Enami Tsugutomo, @c Enami
27136 Michael Ernst,
27137 Luc Van Eycken,
27138 Sam Falkner,
27139 Nelson Jose dos Santos Ferreira,
27140 Sigbjorn Finne,
27141 Sven Fischer,
27142 Paul Fisher,
27143 Decklin Foster,
27144 Gary D. Foster,
27145 Paul Franklin,
27146 Guy Geens,
27147 Arne Georg Gleditsch,
27148 David S. Goldberg,
27149 Michelangelo Grigni,
27150 Dale Hagglund,
27151 D. Hall,
27152 Magnus Hammerin,
27153 Kenichi Handa, @c Handa
27154 Raja R. Harinath,
27155 Yoshiki Hayashi, @c Hayashi
27156 P. E. Jareth Hein,
27157 Hisashige Kenji, @c Hisashige
27158 Scott Hofmann,
27159 Tassilo Horn,
27160 Marc Horowitz,
27161 Gunnar Horrigmo,
27162 Richard Hoskins,
27163 Brad Howes,
27164 Miguel de Icaza,
27165 Fran@,{c}ois Felix Ingrand,
27166 Tatsuya Ichikawa, @c Ichikawa
27167 Ishikawa Ichiro, @c Ishikawa
27168 Lee Iverson,
27169 Iwamuro Motonori, @c Iwamuro
27170 Rajappa Iyer,
27171 Andreas Jaeger,
27172 Adam P. Jenkins,
27173 Randell Jesup,
27174 Fred Johansen,
27175 Gareth Jones,
27176 Greg Klanderman,
27177 Karl Kleinpaste,
27178 Michael Klingbeil,
27179 Peter Skov Knudsen,
27180 Shuhei Kobayashi, @c Kobayashi
27181 Petr Konecny,
27182 Koseki Yoshinori, @c Koseki
27183 Thor Kristoffersen,
27184 Jens Lautenbacher,
27185 Martin Larose,
27186 Seokchan Lee, @c Lee
27187 Joerg Lenneis,
27188 Carsten Leonhardt,
27189 James LewisMoss,
27190 Christian Limpach,
27191 Markus Linnala,
27192 Dave Love,
27193 Mike McEwan,
27194 Tonny Madsen,
27195 Shlomo Mahlab,
27196 Nat Makarevitch,
27197 Istvan Marko,
27198 David Martin,
27199 Jason R. Mastaler,
27200 Gordon Matzigkeit,
27201 Timo Metzemakers,
27202 Richard Mlynarik,
27203 Lantz Moore,
27204 Morioka Tomohiko, @c Morioka
27205 Erik Toubro Nielsen,
27206 Hrvoje Niksic,
27207 Andy Norman,
27208 Fred Oberhauser,
27209 C. R. Oldham,
27210 Alexandre Oliva,
27211 Ken Olstad,
27212 Masaharu Onishi, @c Onishi
27213 Hideki Ono, @c Ono
27214 Ettore Perazzoli,
27215 William Perry,
27216 Stephen Peters,
27217 Jens-Ulrik Holger Petersen,
27218 Ulrich Pfeifer,
27219 Matt Pharr,
27220 Andy Piper,
27221 John McClary Prevost,
27222 Bill Pringlemeir,
27223 Mike Pullen,
27224 Jim Radford,
27225 Colin Rafferty,
27226 Lasse Rasinen,
27227 Lars Balker Rasmussen,
27228 Joe Reiss,
27229 Renaud Rioboo,
27230 Roland B. Roberts,
27231 Bart Robinson,
27232 Christian von Roques,
27233 Markus Rost,
27234 Jason Rumney,
27235 Wolfgang Rupprecht,
27236 Jay Sachs,
27237 Dewey M. Sasser,
27238 Conrad Sauerwald,
27239 Loren Schall,
27240 Dan Schmidt,
27241 Ralph Schleicher,
27242 Philippe Schnoebelen,
27243 Andreas Schwab,
27244 Randal L. Schwartz,
27245 Danny Siu,
27246 Matt Simmons,
27247 Paul D. Smith,
27248 Jeff Sparkes,
27249 Toby Speight,
27250 Michael Sperber,
27251 Darren Stalder,
27252 Richard Stallman,
27253 Greg Stark,
27254 Sam Steingold,
27255 Paul Stevenson,
27256 Jonas Steverud,
27257 Paul Stodghill,
27258 Kiyokazu Suto, @c Suto
27259 Kurt Swanson,
27260 Samuel Tardieu,
27261 Teddy,
27262 Chuck Thompson,
27263 Tozawa Akihiko, @c Tozawa
27264 Philippe Troin,
27265 James Troup,
27266 Trung Tran-Duc,
27267 Jack Twilley,
27268 Aaron M. Ucko,
27269 Aki Vehtari,
27270 Didier Verna,
27271 Vladimir Volovich,
27272 Jan Vroonhof,
27273 Stefan Waldherr,
27274 Pete Ware,
27275 Barry A. Warsaw,
27276 Christoph Wedler,
27277 Joe Wells,
27278 Lee Willis,
27279 and
27280 Lloyd Zusman.
27281
27282
27283 For a full overview of what each person has done, the ChangeLogs
27284 included in the Gnus alpha distributions should give ample reading
27285 (550kB and counting).
27286
27287 Apologies to everybody that I've forgotten, of which there are many, I'm
27288 sure.
27289
27290 Gee, that's quite a list of people.  I guess that must mean that there
27291 actually are people who are using Gnus.  Who'd'a thunk it!
27292
27293
27294 @node New Features
27295 @subsection New Features
27296 @cindex new features
27297
27298 @menu
27299 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
27300 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
27301 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
27302 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
27303 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
27304 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10/5.11.
27305 * No Gnus::                     Very punny.
27306 @end menu
27307
27308 These lists are, of course, just @emph{short} overviews of the
27309 @emph{most} important new features.  No, really.  There are tons more.
27310 Yes, we have feeping creaturism in full effect.
27311
27312 @node ding Gnus
27313 @subsubsection (ding) Gnus
27314
27315 New features in Gnus 5.0/5.1:
27316
27317 @itemize @bullet
27318
27319 @item
27320 The look of all buffers can be changed by setting format-like variables
27321 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
27322
27323 @item
27324 Local spool and several @acronym{NNTP} servers can be used at once
27325 (@pxref{Select Methods}).
27326
27327 @item
27328 You can combine groups into virtual groups (@pxref{Virtual Groups}).
27329
27330 @item
27331 You can read a number of different mail formats (@pxref{Getting Mail}).
27332 All the mail back ends implement a convenient mail expiry scheme
27333 (@pxref{Expiring Mail}).
27334
27335 @item
27336 Gnus can use various strategies for gathering threads that have lost
27337 their roots (thereby gathering loose sub-threads into one thread) or it
27338 can go back and retrieve enough headers to build a complete thread
27339 (@pxref{Customizing Threading}).
27340
27341 @item
27342 Killed groups can be displayed in the group buffer, and you can read
27343 them as well (@pxref{Listing Groups}).
27344
27345 @item
27346 Gnus can do partial group updates---you do not have to retrieve the
27347 entire active file just to check for new articles in a few groups
27348 (@pxref{The Active File}).
27349
27350 @item
27351 Gnus implements a sliding scale of subscribedness to groups
27352 (@pxref{Group Levels}).
27353
27354 @item
27355 You can score articles according to any number of criteria
27356 (@pxref{Scoring}).  You can even get Gnus to find out how to score
27357 articles for you (@pxref{Adaptive Scoring}).
27358
27359 @item
27360 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
27361 manner, so it should be difficult to lose much data on what you have
27362 read if your machine should go down (@pxref{Auto Save}).
27363
27364 @item
27365 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
27366 cluttering up the @file{.emacs} file.
27367
27368 @item
27369 You can set the process mark on both groups and articles and perform
27370 operations on all the marked items (@pxref{Process/Prefix}).
27371
27372 @item
27373 You can list subsets of groups according to, well, anything
27374 (@pxref{Listing Groups}).
27375
27376 @item
27377 You can browse foreign servers and subscribe to groups from those
27378 servers (@pxref{Browse Foreign Server}).
27379
27380 @item
27381 Gnus can fetch articles, asynchronously, on a second connection to the
27382 server (@pxref{Asynchronous Fetching}).
27383
27384 @item
27385 You can cache articles locally (@pxref{Article Caching}).
27386
27387 @item
27388 The uudecode functions have been expanded and generalized
27389 (@pxref{Decoding Articles}).
27390
27391 @item
27392 You can still post uuencoded articles, which was a little-known feature
27393 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
27394
27395 @item
27396 Fetching parents (and other articles) now actually works without
27397 glitches (@pxref{Finding the Parent}).
27398
27399 @item
27400 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
27401
27402 @item
27403 Digests (and other files) can be used as the basis for groups
27404 (@pxref{Document Groups}).
27405
27406 @item
27407 Articles can be highlighted and customized (@pxref{Customizing
27408 Articles}).
27409
27410 @item
27411 URLs and other external references can be buttonized (@pxref{Article
27412 Buttons}).
27413
27414 @item
27415 You can do lots of strange stuff with the Gnus window & frame
27416 configuration (@pxref{Window Layout}).
27417
27418 @item
27419 You can click on buttons instead of using the keyboard
27420 (@pxref{Buttons}).
27421
27422 @end itemize
27423
27424
27425 @node September Gnus
27426 @subsubsection September Gnus
27427
27428 @iftex
27429 @iflatex
27430 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
27431 @end iflatex
27432 @end iftex
27433
27434 New features in Gnus 5.2/5.3:
27435
27436 @itemize @bullet
27437
27438 @item
27439 A new message composition mode is used.  All old customization variables
27440 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
27441 now obsolete.
27442
27443 @item
27444 Gnus is now able to generate @dfn{sparse} threads---threads where
27445 missing articles are represented by empty nodes (@pxref{Customizing
27446 Threading}).
27447
27448 @lisp
27449 (setq gnus-build-sparse-threads 'some)
27450 @end lisp
27451
27452 @item
27453 Outgoing articles are stored on a special archive server
27454 (@pxref{Archived Messages}).
27455
27456 @item
27457 Partial thread regeneration now happens when articles are
27458 referred.
27459
27460 @item
27461 Gnus can make use of GroupLens predictions.
27462
27463 @item
27464 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
27465
27466 @item
27467 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
27468
27469 @lisp
27470 (setq gnus-use-trees t)
27471 @end lisp
27472
27473 @item
27474 An @code{nn}-like pick-and-read minor mode is available for the summary
27475 buffers (@pxref{Pick and Read}).
27476
27477 @lisp
27478 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
27479 @end lisp
27480
27481 @item
27482 In binary groups you can use a special binary minor mode (@pxref{Binary
27483 Groups}).
27484
27485 @item
27486 Groups can be grouped in a folding topic hierarchy (@pxref{Group
27487 Topics}).
27488
27489 @lisp
27490 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
27491 @end lisp
27492
27493 @item
27494 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
27495
27496 @item
27497 Groups can now have a score, and bubbling based on entry frequency
27498 is possible (@pxref{Group Score}).
27499
27500 @lisp
27501 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
27502 @end lisp
27503
27504 @item
27505 Groups can be process-marked, and commands can be performed on
27506 groups of groups (@pxref{Marking Groups}).
27507
27508 @item
27509 Caching is possible in virtual groups.
27510
27511 @item
27512 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
27513 news batches, ClariNet briefs collections, and just about everything
27514 else (@pxref{Document Groups}).
27515
27516 @item
27517 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets.
27518
27519 @item
27520 The Gnus cache is much faster.
27521
27522 @item
27523 Groups can be sorted according to many criteria (@pxref{Sorting
27524 Groups}).
27525
27526 @item
27527 New group parameters have been introduced to set list-addresses and
27528 expiry times (@pxref{Group Parameters}).
27529
27530 @item
27531 All formatting specs allow specifying faces to be used
27532 (@pxref{Formatting Fonts}).
27533
27534 @item
27535 There are several more commands for setting/removing/acting on process
27536 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
27537
27538 @item
27539 The summary buffer can be limited to show parts of the available
27540 articles based on a wide range of criteria.  These commands have been
27541 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
27542
27543 @item
27544 Articles can be made persistent with the @kbd{*} command
27545 (@pxref{Persistent Articles}).
27546
27547 @item
27548 All functions for hiding article elements are now toggles.
27549
27550 @item
27551 Article headers can be buttonized (@pxref{Article Washing}).
27552
27553 @item
27554 All mail back ends support fetching articles by @code{Message-ID}.
27555
27556 @item
27557 Duplicate mail can now be treated properly (@pxref{Duplicates}).
27558
27559 @item
27560 All summary mode commands are available directly from the article
27561 buffer (@pxref{Article Keymap}).
27562
27563 @item
27564 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
27565 Layout}).
27566
27567 @item
27568 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
27569 @iftex
27570 @iflatex
27571 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
27572 @end iflatex
27573 @end iftex
27574
27575 @item
27576 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
27577
27578 @lisp
27579 (setq gnus-use-nocem t)
27580 @end lisp
27581
27582 @item
27583 Groups can be made permanently visible (@pxref{Listing Groups}).
27584
27585 @lisp
27586 (setq gnus-permanently-visible-groups "^nnml:")
27587 @end lisp
27588
27589 @item
27590 Many new hooks have been introduced to make customizing easier.
27591
27592 @item
27593 Gnus respects the @code{Mail-Copies-To} header.
27594
27595 @item
27596 Threads can be gathered by looking at the @code{References} header
27597 (@pxref{Customizing Threading}).
27598
27599 @lisp
27600 (setq gnus-summary-thread-gathering-function
27601       'gnus-gather-threads-by-references)
27602 @end lisp
27603
27604 @item
27605 Read articles can be stored in a special backlog buffer to avoid
27606 refetching (@pxref{Article Backlog}).
27607
27608 @lisp
27609 (setq gnus-keep-backlog 50)
27610 @end lisp
27611
27612 @item
27613 A clean copy of the current article is always stored in a separate
27614 buffer to allow easier treatment.
27615
27616 @item
27617 Gnus can suggest where to save articles (@pxref{Saving Articles}).
27618
27619 @item
27620 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
27621 Articles}).
27622
27623 @lisp
27624 (setq gnus-prompt-before-saving t)
27625 @end lisp
27626
27627 @item
27628 @code{gnus-uu} can view decoded files asynchronously while fetching
27629 articles (@pxref{Other Decode Variables}).
27630
27631 @lisp
27632 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
27633 @end lisp
27634
27635 @item
27636 Filling in the article buffer now works properly on cited text
27637 (@pxref{Article Washing}).
27638
27639 @item
27640 Hiding cited text adds buttons to toggle hiding, and how much
27641 cited text to hide is now customizable (@pxref{Article Hiding}).
27642
27643 @lisp
27644 (setq gnus-cited-lines-visible 2)
27645 @end lisp
27646
27647 @item
27648 Boring headers can be hidden (@pxref{Article Hiding}).
27649
27650 @item
27651 Default scoring values can now be set from the menu bar.
27652
27653 @item
27654 Further syntax checking of outgoing articles have been added.
27655
27656 @end itemize
27657
27658
27659 @node Red Gnus
27660 @subsubsection Red Gnus
27661
27662 New features in Gnus 5.4/5.5:
27663
27664 @iftex
27665 @iflatex
27666 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
27667 @end iflatex
27668 @end iftex
27669
27670 @itemize @bullet
27671
27672 @item
27673 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
27674
27675 @item
27676 Article prefetching functionality has been moved up into
27677 Gnus (@pxref{Asynchronous Fetching}).
27678
27679 @item
27680 Scoring can now be performed with logical operators like @code{and},
27681 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
27682 Scoring}).
27683
27684 @item
27685 Article washing status can be displayed in the
27686 article mode line (@pxref{Misc Article}).
27687
27688 @item
27689 @file{gnus.el} has been split into many smaller files.
27690
27691 @item
27692 Suppression of duplicate articles based on Message-ID can be done
27693 (@pxref{Duplicate Suppression}).
27694
27695 @lisp
27696 (setq gnus-suppress-duplicates t)
27697 @end lisp
27698
27699 @item
27700 New variables for specifying what score and adapt files are to be
27701 considered home score and adapt files (@pxref{Home Score File}) have
27702 been added.
27703
27704 @item
27705 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
27706 Server Internals}).
27707
27708 @item
27709 Groups can inherit group parameters from parent topics (@pxref{Topic
27710 Parameters}).
27711
27712 @item
27713 Article editing has been revamped and is now actually usable.
27714
27715 @item
27716 Signatures can be recognized in more intelligent fashions
27717 (@pxref{Article Signature}).
27718
27719 @item
27720 Summary pick mode has been made to look more @code{nn}-like.  Line
27721 numbers are displayed and the @kbd{.} command can be used to pick
27722 articles (@code{Pick and Read}).
27723
27724 @item
27725 Commands for moving the @file{.newsrc.eld} from one server to
27726 another have been added (@pxref{Changing Servers}).
27727
27728 @item
27729 There's a way now to specify that ``uninteresting'' fields be suppressed
27730 when generating lines in buffers (@pxref{Advanced Formatting}).
27731
27732 @item
27733 Several commands in the group buffer can be undone with @kbd{C-M-_}
27734 (@pxref{Undo}).
27735
27736 @item
27737 Scoring can be done on words using the new score type @code{w}
27738 (@pxref{Score File Format}).
27739
27740 @item
27741 Adaptive scoring can be done on a Subject word-by-word basis
27742 (@pxref{Adaptive Scoring}).
27743
27744 @lisp
27745 (setq gnus-use-adaptive-scoring '(word))
27746 @end lisp
27747
27748 @item
27749 Scores can be decayed (@pxref{Score Decays}).
27750
27751 @lisp
27752 (setq gnus-decay-scores t)
27753 @end lisp
27754
27755 @item
27756 Scoring can be performed using a regexp on the Date header.  The Date is
27757 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
27758
27759 @item
27760 A new command has been added to remove all data on articles from
27761 the native server (@pxref{Changing Servers}).
27762
27763 @item
27764 A new command for reading collections of documents
27765 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
27766 (@pxref{Really Various Summary Commands}).
27767
27768 @item
27769 Process mark sets can be pushed and popped (@pxref{Setting Process
27770 Marks}).
27771
27772 @item
27773 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
27774 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
27775
27776 @item
27777 A new back end for reading searches from Web search engines
27778 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
27779 (@pxref{Web Searches}).
27780
27781 @item
27782 Groups inside topics can now be sorted using the standard sorting
27783 functions, and each topic can be sorted independently (@pxref{Topic
27784 Sorting}).
27785
27786 @item
27787 Subsets of the groups can be sorted independently (@code{Sorting
27788 Groups}).
27789
27790 @item
27791 Cached articles can be pulled into the groups (@pxref{Summary Generation
27792 Commands}).
27793 @iftex
27794 @iflatex
27795 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
27796 @end iflatex
27797 @end iftex
27798
27799 @item
27800 Score files are now applied in a more reliable order (@pxref{Score
27801 Variables}).
27802
27803 @item
27804 Reports on where mail messages end up can be generated (@pxref{Splitting
27805 Mail}).
27806
27807 @item
27808 More hooks and functions have been added to remove junk from incoming
27809 mail before saving the mail (@pxref{Washing Mail}).
27810
27811 @item
27812 Emphasized text can be properly fontisized:
27813
27814 @end itemize
27815
27816
27817 @node Quassia Gnus
27818 @subsubsection Quassia Gnus
27819
27820 New features in Gnus 5.6:
27821
27822 @itemize @bullet
27823
27824 @item
27825 New functionality for using Gnus as an offline newsreader has been
27826 added.  A plethora of new commands and modes have been added.
27827 @xref{Gnus Unplugged}, for the full story.
27828
27829 @item
27830 The @code{nndraft} back end has returned, but works differently than
27831 before.  All Message buffers are now also articles in the @code{nndraft}
27832 group, which is created automatically.
27833
27834 @item
27835 @code{gnus-alter-header-function} can now be used to alter header
27836 values.
27837
27838 @item
27839 @code{gnus-summary-goto-article} now accept Message-ID's.
27840
27841 @item
27842 A new Message command for deleting text in the body of a message
27843 outside the region: @kbd{C-c C-v}.
27844
27845 @item
27846 You can now post to component group in @code{nnvirtual} groups with
27847 @kbd{C-u C-c C-c}.
27848
27849 @item
27850  @code{nntp-rlogin-program}---new variable to ease customization.
27851
27852 @item
27853 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
27854 re-highlighting of the article buffer.
27855
27856 @item
27857 New element in @code{gnus-boring-article-headers}---@code{long-to}.
27858
27859 @item
27860 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
27861 details.
27862
27863 @item
27864 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
27865 @kbd{a} to add the score rule to the @file{all.SCORE} file.
27866
27867 @item
27868 @code{gnus-simplify-subject-functions} variable to allow greater
27869 control over simplification.
27870
27871 @item
27872 @kbd{A T}---new command for fetching the current thread.
27873
27874 @item
27875 @kbd{/ T}---new command for including the current thread in the
27876 limit.
27877
27878 @item
27879 @kbd{M-RET} is a new Message command for breaking cited text.
27880
27881 @item
27882 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
27883
27884 @item
27885 The @code{custom-face-lookup} function has been removed.
27886 If you used this function in your initialization files, you must
27887 rewrite them to use @code{face-spec-set} instead.
27888
27889 @item
27890 Canceling now uses the current select method.  Symbolic prefix
27891 @kbd{a} forces normal posting method.
27892
27893 @item
27894 New command to translate M******** sm*rtq**t*s into proper
27895 text---@kbd{W d}.
27896
27897 @item
27898 For easier debugging of @code{nntp}, you can set
27899 @code{nntp-record-commands} to a non-@code{nil} value.
27900
27901 @item
27902 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
27903 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
27904
27905 @item
27906 A command for editing group parameters from the summary buffer
27907 has been added.
27908
27909 @item
27910 A history of where mails have been split is available.
27911
27912 @item
27913 A new article date command has been added---@code{article-date-iso8601}.
27914
27915 @item
27916 Subjects can be simplified when threading by setting
27917 @code{gnus-score-thread-simplify}.
27918
27919 @item
27920 A new function for citing in Message has been
27921 added---@code{message-cite-original-without-signature}.
27922
27923 @item
27924 @code{article-strip-all-blank-lines}---new article command.
27925
27926 @item
27927 A new Message command to kill to the end of the article has
27928 been added.
27929
27930 @item
27931 A minimum adaptive score can be specified by using the
27932 @code{gnus-adaptive-word-minimum} variable.
27933
27934 @item
27935 The ``lapsed date'' article header can be kept continually
27936 updated by the @code{gnus-start-date-timer} command.
27937
27938 @item
27939 Web listserv archives can be read with the @code{nnlistserv} back end.
27940
27941 @item
27942 Old dejanews archives can now be read by @code{nnweb}.
27943
27944 @end itemize
27945
27946 @node Pterodactyl Gnus
27947 @subsubsection Pterodactyl Gnus
27948
27949 New features in Gnus 5.8:
27950
27951 @itemize @bullet
27952
27953 @item
27954 The mail-fetching functions have changed.  See the manual for the
27955 many details.  In particular, all procmail fetching variables are gone.
27956
27957 If you used procmail like in
27958
27959 @lisp
27960 (setq nnmail-use-procmail t)
27961 (setq nnmail-spool-file 'procmail)
27962 (setq nnmail-procmail-directory "~/mail/incoming/")
27963 (setq nnmail-procmail-suffix "\\.in")
27964 @end lisp
27965
27966 this now has changed to
27967
27968 @lisp
27969 (setq mail-sources
27970       '((directory :path "~/mail/incoming/"
27971                    :suffix ".in")))
27972 @end lisp
27973
27974 @xref{Mail Source Specifiers}.
27975
27976 @item
27977 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
27978 Gnus, and adds a slew of new commands.  See the manual for details.
27979
27980 @item
27981 Gnus has also been multilingualized.  This also affects too
27982 many parts of Gnus to summarize here, and adds many new variables.
27983
27984 @item
27985 @code{gnus-auto-select-first} can now be a function to be
27986 called to position point.
27987
27988 @item
27989 The user can now decide which extra headers should be included in
27990 summary buffers and @acronym{NOV} files.
27991
27992 @item
27993 @code{gnus-article-display-hook} has been removed.  Instead, a number
27994 of variables starting with @code{gnus-treat-} have been added.
27995
27996 @item
27997 The Gnus posting styles have been redone again and now works in a
27998 subtly different manner.
27999
28000 @item
28001 New web-based back ends have been added: @code{nnslashdot},
28002 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
28003 again, to keep up with ever-changing layouts.
28004
28005 @item
28006 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
28007
28008 @end itemize
28009
28010 @node Oort Gnus
28011 @subsubsection Oort Gnus
28012 @cindex Oort Gnus
28013
28014 New features in Gnus 5.10:
28015
28016 @itemize @bullet
28017
28018 @item Installation changes
28019 @c ***********************
28020
28021 @itemize @bullet
28022 @item
28023 Upgrading from previous (stable) version if you have used Oort.
28024
28025 If you have tried Oort (the unstable Gnus branch leading to this
28026 release) but went back to a stable version, be careful when upgrading to
28027 this version.  In particular, you will probably want to remove all
28028 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
28029 read from your @file{.newsrc.eld} instead of from the
28030 @file{.marks}/@file{.mrk} file where this release store flags.  See a
28031 later entry for more information about marks.  Note that downgrading
28032 isn't save in general.
28033
28034 @item
28035 Lisp files are now installed in @file{.../site-lisp/gnus/} by default.
28036 It defaulted to @file{.../site-lisp/} formerly.  In addition to this,
28037 the new installer issues a warning if other Gnus installations which
28038 will shadow the latest one are detected.  You can then remove those
28039 shadows manually or remove them using @code{make
28040 remove-installed-shadows}.
28041
28042 @item
28043 New @file{make.bat} for compiling and installing Gnus under MS Windows
28044
28045 Use @file{make.bat} if you want to install Gnus under MS Windows, the
28046 first argument to the batch-program should be the directory where
28047 @file{xemacs.exe} respectively @file{emacs.exe} is located, if you want
28048 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
28049 the second parameter.
28050
28051 @file{make.bat} has been rewritten from scratch, it now features
28052 automatic recognition of XEmacs and GNU Emacs, generates
28053 @file{gnus-load.el}, checks if errors occur while compilation and
28054 generation of info files and reports them at the end of the build
28055 process.  It now uses @code{makeinfo} if it is available and falls
28056 back to @file{infohack.el} otherwise.  @file{make.bat} should now
28057 install all files which are necessary to run Gnus and be generally a
28058 complete replacement for the @code{configure; make; make install}
28059 cycle used under Unix systems.
28060
28061 The new @file{make.bat} makes @file{make-x.bat} and @file{xemacs.mak}
28062 superfluous, so they have been removed.
28063
28064 @item
28065 @file{~/News/overview/} not used.
28066
28067 As a result of the following change, the @file{~/News/overview/}
28068 directory is not used any more.  You can safely delete the entire
28069 hierarchy.
28070
28071 @c FIXME: `gnus-load' is mentioned in README, which is not included in
28072 @c the repository.  We should find a better place for this item.
28073 @item
28074 @code{(require 'gnus-load)}
28075
28076 If you use a stand-alone Gnus distribution, you'd better add
28077 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
28078 lisp directory into load-path.
28079
28080 File @file{gnus-load.el} contains autoload commands, functions and variables,
28081 some of which may not be included in distributions of Emacsen.
28082
28083 @end itemize
28084
28085 @item New packages and libraries within Gnus
28086 @c *****************************************
28087
28088 @itemize @bullet
28089
28090 @item
28091 The revised Gnus @acronym{FAQ} is included in the manual,
28092 @xref{Frequently Asked Questions}.
28093
28094 @item
28095 @acronym{TLS} wrapper shipped with Gnus
28096
28097 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
28098 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
28099 @acronym{TLS}/@acronym{SSL} support via (external third party)
28100 @file{ssl.el} and OpenSSL still works.
28101
28102 @item
28103 Improved anti-spam features.
28104
28105 Gnus is now able to take out spam from your mail and news streams
28106 using a wide variety of programs and filter rules.  Among the supported
28107 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
28108 for easy use of external packages such as SpamAssassin and Hashcash
28109 are also new.  @ref{Thwarting Email Spam} and @ref{Spam Package}.
28110 @c FIXME: @xref{Spam Package}?.  Should this be under Misc?
28111
28112 @item
28113 Gnus supports server-side mail filtering using Sieve.
28114
28115 Sieve rules can be added as Group Parameters for groups, and the
28116 complete Sieve script is generated using @kbd{D g} from the Group
28117 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
28118 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
28119 manual @ref{Top, , Top, sieve, Emacs Sieve}.
28120
28121 @end itemize
28122
28123 @item Changes in group mode
28124 @c ************************
28125
28126 @itemize @bullet
28127
28128 @item
28129 @code{gnus-group-read-ephemeral-group} can be called interactively,
28130 using @kbd{G M}.
28131
28132 @item
28133 Retrieval of charters and control messages
28134
28135 There are new commands for fetching newsgroup charters (@kbd{H c}) and
28136 control messages (@kbd{H C}).
28137
28138 @item
28139 The new variable @code{gnus-parameters} can be used to set group parameters.
28140
28141 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
28142 the parameters in @file{~/.newsrc.eld}, but via this variable you can
28143 enjoy the powers of customize, and simplified backups since you set the
28144 variable in @file{~/.gnus.el} instead of @file{~/.newsrc.eld}.  The
28145 variable maps regular expressions matching group names to group
28146 parameters, a'la:
28147 @lisp
28148 (setq gnus-parameters
28149       '(("mail\\..*"
28150          (gnus-show-threads nil)
28151          (gnus-use-scoring nil))
28152         ("^nnimap:\\(foo.bar\\)$"
28153          (to-group . "\\1"))))
28154 @end lisp
28155
28156 @item
28157 Unread count correct in nnimap groups.
28158
28159 The estimated number of unread articles in the group buffer should now
28160 be correct for nnimap groups.  This is achieved by calling
28161 @code{nnimap-fixup-unread-after-getting-new-news} from the
28162 @code{gnus-setup-news-hook} (called on startup) and
28163 @code{gnus-after-getting-new-news-hook}. (called after getting new
28164 mail).  If you have modified those variables from the default, you may
28165 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
28166 you were happy with the estimate and want to save some (minimal) time
28167 when getting new mail, remove the function.
28168
28169 @item
28170 Group names are treated as UTF-8 by default.
28171
28172 This is supposedly what USEFOR wanted to migrate to.  See
28173 @code{gnus-group-name-charset-group-alist} and
28174 @code{gnus-group-name-charset-method-alist} for customization.
28175
28176 @item
28177 @code{gnus-group-charset-alist} and
28178 @code{gnus-group-ignored-charsets-alist}.
28179
28180 The regexps in these variables are compared with full group names
28181 instead of real group names in 5.8.  Users who customize these
28182 variables should change those regexps accordingly.  For example:
28183 @lisp
28184 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
28185 @end lisp
28186
28187 @item
28188 Old intermediate incoming mail files (@file{Incoming*}) are deleted
28189 after a couple of days, not immediately.  @xref{Mail Source
28190 Customization}.  (New in Gnus 5.10.10 / Emacs 22.2)
28191
28192 @end itemize
28193
28194 @item Changes in summary and article mode
28195 @c **************************************
28196
28197 @itemize @bullet
28198
28199 @item
28200 @kbd{F} (@code{gnus-article-followup-with-original}) and @kbd{R}
28201 (@code{gnus-article-reply-with-original}) only yank the text in the
28202 region if the region is active.
28203
28204 @item
28205 In draft groups, @kbd{e} is now bound to @code{gnus-draft-edit-message}.
28206 Use @kbd{B w} for @code{gnus-summary-edit-article} instead.
28207
28208 @item
28209 Article Buttons
28210
28211 More buttons for URLs, mail addresses, Message-IDs, Info links, man
28212 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
28213 variables @code{gnus-button-@var{*}-level} can be used to control the
28214 appearance of all article buttons.  @xref{Article Button Levels}.
28215
28216 @item
28217 Single-part yenc encoded attachments can be decoded.
28218
28219 @item
28220 Picons
28221
28222 The picons code has been reimplemented to work in GNU Emacs---some of
28223 the previous options have been removed or renamed.
28224
28225 Picons are small ``personal icons'' representing users, domain and
28226 newsgroups, which can be displayed in the Article buffer.
28227 @xref{Picons}.
28228
28229 @item
28230 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
28231 boundary line is drawn at the end of the headers.
28232
28233 @item
28234 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
28235
28236 @item
28237 The Summary Buffer uses an arrow in the fringe to indicate the current
28238 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
28239
28240 @item
28241 Warn about email replies to news
28242
28243 Do you often find yourself replying to news by email by mistake?  Then
28244 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
28245 you.
28246
28247 @item
28248 If the new option @code{gnus-summary-display-while-building} is
28249 non-@code{nil}, the summary buffer is shown and updated as it's being
28250 built.
28251
28252 @item
28253 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
28254 opposed to old but unread messages).
28255
28256 @item
28257 Gnus supports RFC 2369 mailing list headers, and adds a number of
28258 related commands in mailing list groups.  @xref{Mailing List}.
28259
28260 @item
28261 The Date header can be displayed in a format that can be read aloud
28262 in English.  @xref{Article Date}.
28263
28264 @item
28265 diffs are automatically highlighted in groups matching
28266 @code{mm-uu-diff-groups-regexp}
28267
28268 @item
28269 Better handling of Microsoft citation styles
28270
28271 Gnus now tries to recognize the mangled header block that some Microsoft
28272 mailers use to indicate that the rest of the message is a citation, even
28273 though it is not quoted in any way.  The variable
28274 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
28275 citations.
28276
28277 The new command @kbd{W Y f}
28278 (@code{gnus-article-outlook-deuglify-article}) allows deuglifying broken
28279 Outlook (Express) articles.
28280
28281 @item
28282 @code{gnus-article-skip-boring}
28283
28284 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
28285 not scroll down to show you a page that contains only boring text,
28286 which by default means cited text and signature.  You can customize
28287 what is skippable using @code{gnus-article-boring-faces}.
28288
28289 This feature is especially useful if you read many articles that
28290 consist of a little new content at the top with a long, untrimmed
28291 message cited below.
28292
28293 @item
28294 Smileys (@samp{:-)}, @samp{;-)} etc) are now displayed graphically in
28295 Emacs too.
28296
28297 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.gnus.el} to
28298 disable it.
28299
28300 @item
28301 Face headers handling.  @xref{Face}.
28302
28303 @item
28304 In the summary buffer, the new command @kbd{/ N} inserts new messages
28305 and @kbd{/ o} inserts old messages.
28306
28307 @item
28308 Gnus decodes morse encoded messages if you press @kbd{W m}.
28309
28310 @item
28311 @code{gnus-summary-line-format}
28312
28313 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
28314 %s\n}.  Moreover @code{gnus-extra-headers},
28315 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
28316 changed their default so that the users name will be replaced by the
28317 recipient's name or the group name posting to for @acronym{NNTP}
28318 groups.
28319
28320 @item
28321 Deleting of attachments.
28322
28323 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
28324 on @acronym{MIME} buttons) saves a part and replaces the part with an
28325 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
28326 @acronym{MIME} buttons) removes a part.  It works only on back ends
28327 that support editing.
28328
28329 @item
28330 @code{gnus-default-charset}
28331
28332 The default value is determined from the
28333 @code{current-language-environment} variable, instead of
28334 @code{iso-8859-1}.  Also the @samp{.*} item in
28335 @code{gnus-group-charset-alist} is removed.
28336
28337 @item
28338 Printing capabilities are enhanced.
28339
28340 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
28341 Article buffers.  Also, each individual @acronym{MIME} part can be
28342 printed using @kbd{p} on the @acronym{MIME} button.
28343
28344 @item
28345 Extended format specs.
28346
28347 Format spec @samp{%&user-date;} is added into
28348 @code{gnus-summary-line-format-alist}.  Also, user defined extended
28349 format specs are supported.  The extended format specs look like
28350 @samp{%u&foo;}, which invokes function
28351 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
28352 escape character, old user defined format @samp{%u&} is no longer supported.
28353
28354 @item
28355 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
28356 @c FIXME: Was this a user-visible change?
28357
28358 It was aliased to @kbd{Y c}
28359 (@code{gnus-summary-insert-cached-articles}).  The new function filters
28360 out other articles.
28361
28362 @item
28363 Some limiting commands accept a @kbd{C-u} prefix to negate the match.
28364
28365 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
28366 s}, @kbd{/ a}, and @kbd{/ x}
28367 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
28368 result will be to display all articles that do not match the expression.
28369
28370 @item
28371 Gnus inlines external parts (message/external).
28372
28373 @end itemize
28374
28375 @item Changes in Message mode and related Gnus features
28376 @c ****************************************************
28377
28378 @itemize @bullet
28379
28380 @item
28381 Delayed articles
28382
28383 You can delay the sending of a message with @kbd{C-c C-j} in the Message
28384 buffer.  The messages are delivered at specified time.  This is useful
28385 for sending yourself reminders.  @xref{Delayed Articles}.
28386
28387 @item
28388 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
28389 the nnml back end allows compressed message files.
28390
28391 @item
28392 The new option @code{gnus-gcc-mark-as-read} automatically marks
28393 Gcc articles as read.
28394
28395 @item
28396 Externalizing of attachments
28397
28398 If @code{gnus-gcc-externalize-attachments} or
28399 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
28400 local files as external parts.
28401
28402 @item
28403 The envelope sender address can be customized when using Sendmail.
28404 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
28405
28406 @item
28407 Gnus no longer generate the Sender: header automatically.
28408
28409 Earlier it was generated when the user configurable email address was
28410 different from the Gnus guessed default user address.  As the guessing
28411 algorithm is rarely correct these days, and (more controversially) the
28412 only use of the Sender: header was to check if you are entitled to
28413 cancel/supersede news (which is now solved by Cancel Locks instead,
28414 see another entry), generation of the header has been disabled by
28415 default.  See the variables @code{message-required-headers},
28416 @code{message-required-news-headers}, and
28417 @code{message-required-mail-headers}.
28418
28419 @item
28420 Features from third party @file{message-utils.el} added to @file{message.el}.
28421
28422 Message now asks if you wish to remove @samp{(was: <old subject>)} from
28423 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
28424 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
28425 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
28426 appropriate headers and a note in the body for cross-postings and
28427 followups (see the variables @code{message-cross-post-@var{*}}).
28428
28429 @item
28430 References and X-Draft-From headers are no longer generated when you
28431 start composing messages and @code{message-generate-headers-first} is
28432 @code{nil}.
28433
28434 @item
28435 Easy inclusion of X-Faces headers.  @xref{X-Face}.
28436
28437 @item
28438 Group Carbon Copy (GCC) quoting
28439
28440 To support groups that contains SPC and other weird characters, groups
28441 are quoted before they are placed in the Gcc: header.  This means
28442 variables such as @code{gnus-message-archive-group} should no longer
28443 contain quote characters to make groups containing SPC work.  Also, if
28444 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
28445 into two groups) you must change it to return the list
28446 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
28447 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
28448 was incorrect earlier, it just didn't generate any problems since it
28449 was inserted directly.
28450
28451 @item
28452 @code{message-insinuate-rmail}
28453
28454 @c FIXME should that not be 'message-user-agent?
28455 Adding @code{(message-insinuate-rmail)} and @code{(setq
28456 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
28457 compose, reply and forward messages in message-mode, where you can
28458 enjoy the power of @acronym{MML}.
28459
28460 @item
28461 @code{message-minibuffer-local-map}
28462
28463 The line below enables BBDB in resending a message:
28464 @lisp
28465 (define-key message-minibuffer-local-map [(tab)]
28466   'bbdb-complete-name)
28467 @end lisp
28468
28469 @item
28470 @code{gnus-posting-styles}
28471
28472 Add a new format of match like
28473 @lisp
28474 ((header "to" "larsi.*org")
28475  (Organization "Somewhere, Inc."))
28476 @end lisp
28477 The old format like the lines below is obsolete, but still accepted.
28478 @lisp
28479 (header "to" "larsi.*org"
28480         (Organization "Somewhere, Inc."))
28481 @end lisp
28482
28483 @item
28484 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
28485
28486 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
28487 added into these two variables.  If you customized those, perhaps you
28488 need add those two headers too.
28489
28490 @item
28491 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
28492 composing messages, it is enabled by @code{use-hard-newlines}.
28493 Decoding format=flowed was present but not documented in earlier
28494 versions.
28495
28496 @item
28497 The option @code{mm-fill-flowed} can be used to disable treatment of
28498 ``format=flowed'' messages.  Also, flowed text is disabled when sending
28499 inline PGP signed messages.  @xref{Flowed text, , Flowed text,
28500 emacs-mime, The Emacs MIME Manual}.  (New in Gnus 5.10.7)
28501 @c This entry is also present in the node "No Gnus".
28502
28503 @item
28504 Gnus supports the generation of RFC 2298 Disposition Notification requests.
28505
28506 This is invoked with the @kbd{C-c M-n} key binding from message mode.
28507
28508 @item
28509 Message supports the Importance: (RFC 2156) header.
28510
28511 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
28512 the valid values.
28513
28514 @item
28515 Gnus supports Cancel Locks in News.
28516
28517 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
28518 used to determine if you wrote an article or not (for canceling and
28519 superseding).  Gnus generates a random password string the first time
28520 you post a message, and saves it in your @file{~/.emacs} using the Custom
28521 system.  While the variable is called @code{canlock-password}, it is not
28522 security sensitive data.  Publishing your canlock string on the web
28523 will not allow anyone to be able to anything she could not already do.
28524 The behavior can be changed by customizing @code{message-insert-canlock}.
28525
28526 @item
28527 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
28528 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
28529
28530 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
28531 additional Lisp libraries.  This add several menu items to the
28532 Attachments menu, and @kbd{C-c RET} key bindings, when composing
28533 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
28534
28535 @item
28536 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
28537 C-m}.
28538
28539 This change was made to avoid conflict with the standard binding of
28540 @code{back-to-indentation}, which is also useful in message mode.
28541
28542 @item
28543 The default for @code{message-forward-show-mml} changed to the symbol
28544 @code{best}.
28545
28546 The behavior for the @code{best} value is to show @acronym{MML} (i.e.,
28547 convert to @acronym{MIME}) when appropriate.  @acronym{MML} will not be
28548 used when forwarding signed or encrypted messages, as the conversion
28549 invalidate the digital signature.
28550
28551 @item
28552 If @code{auto-compression-mode} is enabled, attachments are automatically
28553 decompressed when activated.
28554 @c FIXME: Does this affect article or message mode?
28555
28556 @item
28557 Support for non-@acronym{ASCII} domain names
28558
28559 Message supports non-@acronym{ASCII} domain names in From:, To: and
28560 Cc: and will query you whether to perform encoding when you try to
28561 send a message.  The variable @code{message-use-idna} controls this.
28562 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
28563 and Cc: when you view a message.  The variable @code{gnus-use-idna}
28564 controls this.
28565
28566 @item You can now drag and drop attachments to the Message buffer.
28567 See @code{mml-dnd-protocol-alist} and @code{mml-dnd-attach-options}.
28568 @xref{MIME, ,MIME, message, Message Manual}.
28569 @c New in 5.10.9 / 5.11 (Emacs 22.1)
28570
28571 @item @code{auto-fill-mode} is enabled by default in Message mode.
28572 See @code{message-fill-column}.  @xref{Various Message Variables, ,
28573 Message Headers, message, Message Manual}.
28574 @c New in Gnus 5.10.12 / 5.11 (Emacs 22.3)
28575
28576 @end itemize
28577
28578 @item Changes in back ends
28579 @c ***********************
28580
28581 @itemize @bullet
28582 @item
28583 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
28584
28585 @item
28586 The nndoc back end now supports mailman digests and exim bounces.
28587
28588 @item
28589 Gnus supports Maildir groups.
28590
28591 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
28592
28593 @item
28594 The nnml and nnfolder back ends store marks for each groups.
28595
28596 This makes it possible to take backup of nnml/nnfolder servers/groups
28597 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
28598 makes it possible to share articles and marks between users (without
28599 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
28600 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
28601 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
28602 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
28603 another machine, Gnus will automatically use the @file{.marks} or
28604 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
28605 The new server variables @code{nnml-marks-is-evil} and
28606 @code{nnfolder-marks-is-evil} can be used to disable this feature.
28607
28608 @end itemize
28609
28610 @item Appearance
28611 @c *************
28612
28613 @itemize @bullet
28614
28615 @item
28616 The menu bar item (in Group and Summary buffer) named ``Misc'' has
28617 been renamed to ``Gnus''.
28618
28619 @item
28620 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
28621 renamed to ``Attachments''.  Note that this menu also contains security
28622 related stuff, like signing and encryption (@pxref{Security, Security,,
28623 message, Message Manual}).
28624
28625 @item
28626 The tool bars have been updated to use GNOME icons in Group, Summary and
28627 Message mode.  You can also customize the tool bars: @kbd{M-x
28628 customize-apropos RET -tool-bar$} should get you started.  This is a new
28629 feature in Gnus 5.10.10.  (Only for Emacs, not in XEmacs.)
28630
28631 @item The tool bar icons are now (de)activated correctly
28632 in the group buffer, see the variable @code{gnus-group-update-tool-bar}.
28633 Its default value depends on your Emacs version.  This is a new feature
28634 in Gnus 5.10.9.
28635 @end itemize
28636
28637
28638 @item Miscellaneous changes
28639 @c ************************
28640
28641 @itemize @bullet
28642
28643 @item
28644 @code{gnus-agent}
28645
28646 The Gnus Agent has seen a major updated and is now enabled by default,
28647 and all nntp and nnimap servers from @code{gnus-select-method} and
28648 @code{gnus-secondary-select-method} are agentized by default.  Earlier
28649 only the server in @code{gnus-select-method} was agentized by the
28650 default, and the agent was disabled by default.  When the agent is
28651 enabled, headers are now also retrieved from the Agent cache instead
28652 of the back ends when possible.  Earlier this only happened in the
28653 unplugged state.  You can enroll or remove servers with @kbd{J a} and
28654 @kbd{J r} in the server buffer.  Gnus will not download articles into
28655 the Agent cache, unless you instruct it to do so, though, by using
28656 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
28657 behavior of having the Agent disabled with @code{(setq gnus-agent
28658 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
28659 is not needed any more.
28660
28661 @item
28662 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
28663
28664 If one reads an article while plugged, and the article already exists
28665 in the Agent, it won't get downloaded once more.  @code{(setq
28666 gnus-agent-cache nil)} reverts to the old behavior.
28667
28668 @item
28669 Dired integration
28670
28671 @code{gnus-dired-minor-mode} (see @ref{Other modes}) installs key
28672 bindings in dired buffers to send a file as an attachment, open a file
28673 using the appropriate mailcap entry, and print a file using the mailcap
28674 entry.
28675
28676 @item
28677 The format spec @code{%C} for positioning point has changed to @code{%*}.
28678
28679 @item
28680 @code{gnus-slave-unplugged}
28681
28682 A new command which starts Gnus offline in slave mode.
28683
28684 @end itemize
28685
28686 @end itemize
28687
28688 @node No Gnus
28689 @subsubsection No Gnus
28690 @cindex No Gnus
28691
28692 New features in No Gnus:
28693 @c FIXME: Gnus 5.12?
28694
28695 @include gnus-news.texi
28696
28697 @iftex
28698
28699 @page
28700 @node The Manual
28701 @section The Manual
28702 @cindex colophon
28703 @cindex manual
28704
28705 This manual was generated from a TeXinfo file and then run through
28706 either @code{texi2dvi}
28707 @iflatex
28708 or my own home-brewed TeXinfo to \LaTeX\ transformer,
28709 and then run through @code{latex} and @code{dvips}
28710 @end iflatex
28711 to get what you hold in your hands now.
28712
28713 The following conventions have been used:
28714
28715 @enumerate
28716
28717 @item
28718 This is a @samp{string}
28719
28720 @item
28721 This is a @kbd{keystroke}
28722
28723 @item
28724 This is a @file{file}
28725
28726 @item
28727 This is a @code{symbol}
28728
28729 @end enumerate
28730
28731 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
28732 mean:
28733
28734 @lisp
28735 (setq flargnoze "yes")
28736 @end lisp
28737
28738 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
28739
28740 @lisp
28741 (setq flumphel 'yes)
28742 @end lisp
28743
28744 @samp{yes} and @code{yes} are two @emph{very} different things---don't
28745 ever get them confused.
28746
28747 @iflatex
28748 @c @head
28749 Of course, everything in this manual is of vital interest, so you should
28750 read it all.  Several times.  However, if you feel like skimming the
28751 manual, look for that gnu head you should see in the margin over
28752 there---it means that what's being discussed is of more importance than
28753 the rest of the stuff.  (On the other hand, if everything is infinitely
28754 important, how can anything be more important than that?  Just one more
28755 of the mysteries of this world, I guess.)
28756 @end iflatex
28757
28758 @end iftex
28759
28760
28761 @node On Writing Manuals
28762 @section On Writing Manuals
28763
28764 I guess most manuals are written after-the-fact; documenting a program
28765 that's already there.  This is not how this manual is written.  When
28766 implementing something, I write the manual entry for that something
28767 straight away.  I then see that it's difficult to explain the
28768 functionality, so I write how it's supposed to be, and then I change the
28769 implementation.  Writing the documentation and writing the code go hand
28770 in hand.
28771
28772 This, of course, means that this manual has no, or little, flow.  It
28773 documents absolutely everything in Gnus, but often not where you're
28774 looking for it.  It is a reference manual, and not a guide to how to get
28775 started with Gnus.
28776
28777 That would be a totally different book, that should be written using the
28778 reference manual as source material.  It would look quite different.
28779
28780
28781 @page
28782 @node Terminology
28783 @section Terminology
28784
28785 @cindex terminology
28786 @table @dfn
28787
28788 @item news
28789 @cindex news
28790 This is what you are supposed to use this thing for---reading news.
28791 News is generally fetched from a nearby @acronym{NNTP} server, and is
28792 generally publicly available to everybody.  If you post news, the entire
28793 world is likely to read just what you have written, and they'll all
28794 snigger mischievously.  Behind your back.
28795
28796 @item mail
28797 @cindex mail
28798 Everything that's delivered to you personally is mail.  Some news/mail
28799 readers (like Gnus) blur the distinction between mail and news, but
28800 there is a difference.  Mail is private.  News is public.  Mailing is
28801 not posting, and replying is not following up.
28802
28803 @item reply
28804 @cindex reply
28805 Send a mail to the person who has written what you are reading.
28806
28807 @item follow up
28808 @cindex follow up
28809 Post an article to the current newsgroup responding to the article you
28810 are reading.
28811
28812 @item back end
28813 @cindex back end
28814 Gnus considers mail and news to be mostly the same, really.  The only
28815 difference is how to access the actual articles.  News articles are
28816 commonly fetched via the protocol @acronym{NNTP}, whereas mail
28817 messages could be read from a file on the local disk.  The internal
28818 architecture of Gnus thus comprises a ``front end'' and a number of
28819 ``back ends''.  Internally, when you enter a group (by hitting
28820 @key{RET}, say), you thereby invoke a function in the front end in
28821 Gnus.  The front end then ``talks'' to a back end and says things like
28822 ``Give me the list of articles in the foo group'' or ``Show me article
28823 number 4711''.
28824
28825 So a back end mainly defines either a protocol (the @code{nntp} back
28826 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
28827 accesses mail via @acronym{IMAP}) or a file format and directory
28828 layout (the @code{nnspool} back end accesses news via the common
28829 ``spool directory'' format, the @code{nnml} back end access mail via a
28830 file format and directory layout that's quite similar).
28831
28832 Gnus does not handle the underlying media, so to speak---this is all
28833 done by the back ends.  A back end is a collection of functions to
28834 access the articles.
28835
28836 However, sometimes the term ``back end'' is also used where ``server''
28837 would have been more appropriate.  And then there is the term ``select
28838 method'' which can mean either.  The Gnus terminology can be quite
28839 confusing.
28840
28841 @item native
28842 @cindex native
28843 Gnus will always use one method (and back end) as the @dfn{native}, or
28844 default, way of getting news.
28845
28846 @item foreign
28847 @cindex foreign
28848 You can also have any number of foreign groups active at the same time.
28849 These are groups that use non-native non-secondary back ends for getting
28850 news.
28851
28852 @item secondary
28853 @cindex secondary
28854 Secondary back ends are somewhere half-way between being native and being
28855 foreign, but they mostly act like they are native.
28856
28857 @item article
28858 @cindex article
28859 A message that has been posted as news.
28860
28861 @item mail message
28862 @cindex mail message
28863 A message that has been mailed.
28864
28865 @item message
28866 @cindex message
28867 A mail message or news article
28868
28869 @item head
28870 @cindex head
28871 The top part of a message, where administrative information (etc.) is
28872 put.
28873
28874 @item body
28875 @cindex body
28876 The rest of an article.  Everything not in the head is in the
28877 body.
28878
28879 @item header
28880 @cindex header
28881 A line from the head of an article.
28882
28883 @item headers
28884 @cindex headers
28885 A collection of such lines, or a collection of heads.  Or even a
28886 collection of @acronym{NOV} lines.
28887
28888 @item @acronym{NOV}
28889 @cindex @acronym{NOV}
28890 @acronym{NOV} stands for News OverView, which is a type of news server
28891 header which provide datas containing the condensed header information
28892 of articles.  They are produced by the server itself; in the @code{nntp}
28893 back end Gnus uses the ones that the @acronym{NNTP} server makes, but
28894 Gnus makes them by itself for some backends (in particular, @code{nnml}).
28895
28896 When Gnus enters a group, it asks the back end for the headers of all
28897 unread articles in the group.  Most servers support the News OverView
28898 format, which is more compact and much faster to read and parse than the
28899 normal @sc{head} format.
28900
28901 The @acronym{NOV} data consist of one or more text lines (@pxref{Text
28902 Lines, ,Motion by Text Lines, elisp, The Emacs Lisp Reference Manual})
28903 where each line has the header information of one article.  The header
28904 information is a tab-separated series of the header's contents including
28905 an article number, a subject, an author, a date, a message-id,
28906 references, etc.
28907
28908 Those data enable Gnus to generate summary lines quickly.  However, if
28909 the server does not support @acronym{NOV} or you disable it purposely or
28910 for some reason, Gnus will try to generate the header information by
28911 parsing each article's headers one by one.  It will take time.
28912 Therefore, it is not usually a good idea to set nn*-nov-is-evil
28913 (@pxref{Slow/Expensive Connection}) to a non-@code{nil} value unless you
28914 know that the server makes wrong @acronym{NOV} data.
28915
28916 @item level
28917 @cindex levels
28918 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
28919 that have a lower level are ``more'' subscribed than the groups with a
28920 higher level.  In fact, groups on levels 1-5 are considered
28921 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
28922 are @dfn{killed}.  Commands for listing groups and scanning for new
28923 articles will all use the numeric prefix as @dfn{working level}.
28924
28925 @item killed groups
28926 @cindex killed groups
28927 No information on killed groups is stored or updated, which makes killed
28928 groups much easier to handle than subscribed groups.
28929
28930 @item zombie groups
28931 @cindex zombie groups
28932 Just like killed groups, only slightly less dead.
28933
28934 @item active file
28935 @cindex active file
28936 The news server has to keep track of what articles it carries, and what
28937 groups exist.  All this information in stored in the active file, which
28938 is rather large, as you might surmise.
28939
28940 @item bogus groups
28941 @cindex bogus groups
28942 A group that exists in the @file{.newsrc} file, but isn't known to the
28943 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
28944 This means that the group probably doesn't exist (any more).
28945
28946 @item activating
28947 @cindex activating groups
28948 The act of asking the server for info on a group and computing the
28949 number of unread articles is called @dfn{activating the group}.
28950 Un-activated groups are listed with @samp{*} in the group buffer.
28951
28952 @item spool
28953 @cindex spool
28954 News servers store their articles locally in one fashion or other.
28955 One old-fashioned storage method is to have just one file per
28956 article.  That's called a ``traditional spool''.
28957
28958 @item server
28959 @cindex server
28960 A machine one can connect to and get news (or mail) from.
28961
28962 @item select method
28963 @cindex select method
28964 A structure that specifies the back end, the server and the virtual
28965 server settings.
28966
28967 @item virtual server
28968 @cindex virtual server
28969 A named select method.  Since a select method defines all there is to
28970 know about connecting to a (physical) server, taking the thing as a
28971 whole is a virtual server.
28972
28973 @item washing
28974 @cindex washing
28975 Taking a buffer and running it through a filter of some sort.  The
28976 result will (more often than not) be cleaner and more pleasing than the
28977 original.
28978
28979 @item ephemeral groups
28980 @cindex ephemeral groups
28981 @cindex temporary groups
28982 Most groups store data on what articles you have read.  @dfn{Ephemeral}
28983 groups are groups that will have no data stored---when you exit the
28984 group, it'll disappear into the aether.
28985
28986 @item solid groups
28987 @cindex solid groups
28988 This is the opposite of ephemeral groups.  All groups listed in the
28989 group buffer are solid groups.
28990
28991 @item sparse articles
28992 @cindex sparse articles
28993 These are article placeholders shown in the summary buffer when
28994 @code{gnus-build-sparse-threads} has been switched on.
28995
28996 @item threading
28997 @cindex threading
28998 To put responses to articles directly after the articles they respond
28999 to---in a hierarchical fashion.
29000
29001 @item root
29002 @cindex root
29003 @cindex thread root
29004 The first article in a thread is the root.  It is the ancestor of all
29005 articles in the thread.
29006
29007 @item parent
29008 @cindex parent
29009 An article that has responses.
29010
29011 @item child
29012 @cindex child
29013 An article that responds to a different article---its parent.
29014
29015 @item digest
29016 @cindex digest
29017 A collection of messages in one file.  The most common digest format is
29018 specified by RFC 1153.
29019
29020 @item splitting
29021 @cindex splitting, terminology
29022 @cindex mail sorting
29023 @cindex mail filtering (splitting)
29024 The action of sorting your emails according to certain rules. Sometimes
29025 incorrectly called mail filtering.
29026
29027 @end table
29028
29029
29030 @page
29031 @node Customization
29032 @section Customization
29033 @cindex general customization
29034
29035 All variables are properly documented elsewhere in this manual.  This
29036 section is designed to give general pointers on how to customize Gnus
29037 for some quite common situations.
29038
29039 @menu
29040 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
29041 * Slow Terminal Connection::    You run a remote Emacs.
29042 * Little Disk Space::           You feel that having large setup files is icky.
29043 * Slow Machine::                You feel like buying a faster machine.
29044 @end menu
29045
29046
29047 @node Slow/Expensive Connection
29048 @subsection Slow/Expensive Connection
29049
29050 If you run Emacs on a machine locally, and get your news from a machine
29051 over some very thin strings, you want to cut down on the amount of data
29052 Gnus has to get from the server.
29053
29054 @table @code
29055
29056 @item gnus-read-active-file
29057 Set this to @code{nil}, which will inhibit Gnus from requesting the
29058 entire active file from the server.  This file is often very large.  You
29059 also have to set @code{gnus-check-new-newsgroups} and
29060 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
29061 doesn't suddenly decide to fetch the active file anyway.
29062
29063 @item gnus-nov-is-evil
29064 @vindex gnus-nov-is-evil
29065 Usually this one must @emph{always} be @code{nil} (which is the
29066 default).  If, for example, you wish to not use @acronym{NOV}
29067 (@pxref{Terminology}) with the @code{nntp} back end (@pxref{Crosspost
29068 Handling}), set @code{nntp-nov-is-evil} to a non-@code{nil} value
29069 instead of setting this.  But you normally do not need to set
29070 @code{nntp-nov-is-evil} since Gnus by itself will detect whether the
29071 @acronym{NNTP} server supports @acronym{NOV}.  Anyway, grabbing article
29072 headers from the @acronym{NNTP} server will not be very fast if you tell
29073 Gnus not to use @acronym{NOV}.
29074
29075 As the variables for the other back ends, there are
29076 @code{nndiary-nov-is-evil}, @code{nndir-nov-is-evil},
29077 @code{nnfolder-nov-is-evil}, @code{nnimap-nov-is-evil},
29078 @code{nnml-nov-is-evil}, and @code{nnspool-nov-is-evil}.  Note that a
29079 non-@code{nil} value for @code{gnus-nov-is-evil} overrides all those
29080 variables.
29081 @end table
29082
29083
29084 @node Slow Terminal Connection
29085 @subsection Slow Terminal Connection
29086
29087 Let's say you use your home computer for dialing up the system that runs
29088 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
29089 possible) the amount of data sent over the wires.
29090
29091 @table @code
29092
29093 @item gnus-auto-center-summary
29094 Set this to @code{nil} to inhibit Gnus from re-centering the summary
29095 buffer all the time.  If it is @code{vertical}, do only vertical
29096 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
29097 horizontal and vertical recentering.
29098
29099 @item gnus-visible-headers
29100 Cut down on the headers included in the articles to the
29101 minimum.  You can, in fact, make do without them altogether---most of the
29102 useful data is in the summary buffer, anyway.  Set this variable to
29103 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
29104
29105 Use the following to enable all the available hiding features:
29106 @lisp
29107 (setq gnus-treat-hide-headers 'head
29108       gnus-treat-hide-signature t
29109       gnus-treat-hide-citation t)
29110 @end lisp
29111
29112 @item gnus-use-full-window
29113 By setting this to @code{nil}, you can make all the windows smaller.
29114 While this doesn't really cut down much generally, it means that you
29115 have to see smaller portions of articles before deciding that you didn't
29116 want to read them anyway.
29117
29118 @item gnus-thread-hide-subtree
29119 If this is non-@code{nil}, all threads in the summary buffer will be
29120 hidden initially.
29121
29122
29123 @item gnus-updated-mode-lines
29124 If this is @code{nil}, Gnus will not put information in the buffer mode
29125 lines, which might save some time.
29126 @end table
29127
29128
29129 @node Little Disk Space
29130 @subsection Little Disk Space
29131 @cindex disk space
29132
29133 The startup files can get rather large, so you may want to cut their
29134 sizes a bit if you are running out of space.
29135
29136 @table @code
29137
29138 @item gnus-save-newsrc-file
29139 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
29140 only save @file{.newsrc.eld}.  This means that you will not be able to
29141 use any other newsreaders than Gnus.  This variable is @code{t} by
29142 default.
29143
29144 @item gnus-read-newsrc-file
29145 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
29146 only read @file{.newsrc.eld}.  This means that you will not be able to
29147 use any other newsreaders than Gnus.  This variable is @code{t} by
29148 default.
29149
29150 @item gnus-save-killed-list
29151 If this is @code{nil}, Gnus will not save the list of dead groups.  You
29152 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
29153 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
29154 variable to @code{nil}.  This variable is @code{t} by default.
29155
29156 @end table
29157
29158
29159 @node Slow Machine
29160 @subsection Slow Machine
29161 @cindex slow machine
29162
29163 If you have a slow machine, or are just really impatient, there are a
29164 few things you can do to make Gnus run faster.
29165
29166 Set @code{gnus-check-new-newsgroups} and
29167 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
29168
29169 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
29170 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
29171 summary buffer faster.  Also @pxref{Slow/Expensive Connection}.
29172
29173
29174 @page
29175 @node Troubleshooting
29176 @section Troubleshooting
29177 @cindex troubleshooting
29178
29179 Gnus works @emph{so} well straight out of the box---I can't imagine any
29180 problems, really.
29181
29182 Ahem.
29183
29184 @enumerate
29185
29186 @item
29187 Make sure your computer is switched on.
29188
29189 @item
29190 Make sure that you really load the current Gnus version.  If you have
29191 been running @sc{gnus}, you need to exit Emacs and start it up again before
29192 Gnus will work.
29193
29194 @item
29195 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
29196 like @c
29197 @samp{No Gnus v0.10} @c Adjust ../Makefile.in if you change this line!
29198 @c
29199 you have the right files loaded.  Otherwise you have some old @file{.el}
29200 files lying around.  Delete these.
29201
29202 @item
29203 Read the help group (@kbd{G h} in the group buffer) for a
29204 @acronym{FAQ} and a how-to.
29205
29206 @item
29207 @vindex max-lisp-eval-depth
29208 Gnus works on many recursive structures, and in some extreme (and very
29209 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
29210 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
29211 something like that.
29212 @end enumerate
29213
29214 If all else fails, report the problem as a bug.
29215
29216 @cindex bugs
29217 @cindex reporting bugs
29218
29219 @kindex M-x gnus-bug
29220 @findex gnus-bug
29221 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
29222 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
29223 me the backtrace.  I will fix bugs, but I can only fix them if you send
29224 me a precise description as to how to reproduce the bug.
29225
29226 You really can never be too detailed in a bug report.  Always use the
29227 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
29228 a 10Kb mail each time you use it, and even if you have sent me your
29229 environment 500 times before.  I don't care.  I want the full info each
29230 time.
29231
29232 It is also important to remember that I have no memory whatsoever.  If
29233 you send a bug report, and I send you a reply, and then you just send
29234 back ``No, it's not! Moron!'', I will have no idea what you are
29235 insulting me about.  Always over-explain everything.  It's much easier
29236 for all of us---if I don't have all the information I need, I will just
29237 mail you and ask for more info, and everything takes more time.
29238
29239 If the problem you're seeing is very visual, and you can't quite explain
29240 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
29241 it somewhere it can be reached, and include the URL of the picture in
29242 the bug report.
29243
29244 @cindex patches
29245 If you would like to contribute a patch to fix bugs or make
29246 improvements, please produce the patch using @samp{diff -u}.
29247
29248 @cindex edebug
29249 If you want to debug your problem further before reporting, possibly
29250 in order to solve the problem yourself and send a patch, you can use
29251 edebug.  Debugging Lisp code is documented in the Elisp manual
29252 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
29253 Lisp Reference Manual}).  To get you started with edebug, consider if
29254 you discover some weird behavior when pressing @kbd{c}, the first
29255 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
29256 the documentation buffer that leads you to the function definition,
29257 then press @kbd{M-x edebug-defun RET} with point inside that function,
29258 return to Gnus and press @kbd{c} to invoke the code.  You will be
29259 placed in the lisp buffer and can single step using @kbd{SPC} and
29260 evaluate expressions using @kbd{M-:} or inspect variables using
29261 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
29262 @kbd{c} or @kbd{g}.
29263
29264 @cindex elp
29265 @cindex profile
29266 @cindex slow
29267 Sometimes, a problem do not directly generate an elisp error but
29268 manifests itself by causing Gnus to be very slow.  In these cases, you
29269 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
29270 slow, and then try to analyze the backtrace (repeating the procedure
29271 helps isolating the real problem areas).
29272
29273 A fancier approach is to use the elisp profiler, ELP.  The profiler is
29274 (or should be) fully documented elsewhere, but to get you started
29275 there are a few steps that need to be followed.  First, instrument the
29276 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
29277 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
29278 RET message}.  Then perform the operation that is slow and press
29279 @kbd{M-x elp-results}.  You will then see which operations that takes
29280 time, and can debug them further.  If the entire operation takes much
29281 longer than the time spent in the slowest function in the profiler
29282 output, you probably profiled the wrong part of Gnus.  To reset
29283 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
29284 elp-restore-all} is supposed to remove profiling, but given the
29285 complexities and dynamic code generation in Gnus, it might not always
29286 work perfectly.
29287
29288 @cindex gnu.emacs.gnus
29289 @cindex ding mailing list
29290 If you just need help, you are better off asking on
29291 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
29292 @email{ding@@gnus.org, the ding mailing list}.  Write to
29293 @email{ding-request@@gnus.org} to subscribe.
29294
29295
29296 @page
29297 @node Gnus Reference Guide
29298 @section Gnus Reference Guide
29299
29300 It is my hope that other people will figure out smart stuff that Gnus
29301 can do, and that other people will write those smart things as well.  To
29302 facilitate that I thought it would be a good idea to describe the inner
29303 workings of Gnus.  And some of the not-so-inner workings, while I'm at
29304 it.
29305
29306 You can never expect the internals of a program not to change, but I
29307 will be defining (in some details) the interface between Gnus and its
29308 back ends (this is written in stone), the format of the score files
29309 (ditto), data structures (some are less likely to change than others)
29310 and general methods of operation.
29311
29312 @menu
29313 * Gnus Utility Functions::      Common functions and variable to use.
29314 * Back End Interface::          How Gnus communicates with the servers.
29315 * Score File Syntax::           A BNF definition of the score file standard.
29316 * Headers::                     How Gnus stores headers internally.
29317 * Ranges::                      A handy format for storing mucho numbers.
29318 * Group Info::                  The group info format.
29319 * Extended Interactive::        Symbolic prefixes and stuff.
29320 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
29321 * Various File Formats::        Formats of files that Gnus use.
29322 @end menu
29323
29324
29325 @node Gnus Utility Functions
29326 @subsection Gnus Utility Functions
29327 @cindex Gnus utility functions
29328 @cindex utility functions
29329 @cindex functions
29330 @cindex internal variables
29331
29332 When writing small functions to be run from hooks (and stuff), it's
29333 vital to have access to the Gnus internal functions and variables.
29334 Below is a list of the most common ones.
29335
29336 @table @code
29337
29338 @item gnus-newsgroup-name
29339 @vindex gnus-newsgroup-name
29340 This variable holds the name of the current newsgroup.
29341
29342 @item gnus-find-method-for-group
29343 @findex gnus-find-method-for-group
29344 A function that returns the select method for @var{group}.
29345
29346 @item gnus-group-real-name
29347 @findex gnus-group-real-name
29348 Takes a full (prefixed) Gnus group name, and returns the unprefixed
29349 name.
29350
29351 @item gnus-group-prefixed-name
29352 @findex gnus-group-prefixed-name
29353 Takes an unprefixed group name and a select method, and returns the full
29354 (prefixed) Gnus group name.
29355
29356 @item gnus-get-info
29357 @findex gnus-get-info
29358 Returns the group info list for @var{group}.
29359
29360 @item gnus-group-unread
29361 @findex gnus-group-unread
29362 The number of unread articles in @var{group}, or @code{t} if that is
29363 unknown.
29364
29365 @item gnus-active
29366 @findex gnus-active
29367 The active entry for @var{group}.
29368
29369 @item gnus-set-active
29370 @findex gnus-set-active
29371 Set the active entry for @var{group}.
29372
29373 @item gnus-add-current-to-buffer-list
29374 @findex gnus-add-current-to-buffer-list
29375 Adds the current buffer to the list of buffers to be killed on Gnus
29376 exit.
29377
29378 @item gnus-continuum-version
29379 @findex gnus-continuum-version
29380 Takes a Gnus version string as a parameter and returns a floating point
29381 number.  Earlier versions will always get a lower number than later
29382 versions.
29383
29384 @item gnus-group-read-only-p
29385 @findex gnus-group-read-only-p
29386 Says whether @var{group} is read-only or not.
29387
29388 @item gnus-news-group-p
29389 @findex gnus-news-group-p
29390 Says whether @var{group} came from a news back end.
29391
29392 @item gnus-ephemeral-group-p
29393 @findex gnus-ephemeral-group-p
29394 Says whether @var{group} is ephemeral or not.
29395
29396 @item gnus-server-to-method
29397 @findex gnus-server-to-method
29398 Returns the select method corresponding to @var{server}.
29399
29400 @item gnus-server-equal
29401 @findex gnus-server-equal
29402 Says whether two virtual servers are equal.
29403
29404 @item gnus-group-native-p
29405 @findex gnus-group-native-p
29406 Says whether @var{group} is native or not.
29407
29408 @item gnus-group-secondary-p
29409 @findex gnus-group-secondary-p
29410 Says whether @var{group} is secondary or not.
29411
29412 @item gnus-group-foreign-p
29413 @findex gnus-group-foreign-p
29414 Says whether @var{group} is foreign or not.
29415
29416 @item gnus-group-find-parameter
29417 @findex gnus-group-find-parameter
29418 Returns the parameter list of @var{group}.  If given a second parameter,
29419 returns the value of that parameter for @var{group}.
29420
29421 @item gnus-group-set-parameter
29422 @findex gnus-group-set-parameter
29423 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
29424
29425 @item gnus-narrow-to-body
29426 @findex gnus-narrow-to-body
29427 Narrows the current buffer to the body of the article.
29428
29429 @item gnus-check-backend-function
29430 @findex gnus-check-backend-function
29431 Takes two parameters, @var{function} and @var{group}.  If the back end
29432 @var{group} comes from supports @var{function}, return non-@code{nil}.
29433
29434 @lisp
29435 (gnus-check-backend-function "request-scan" "nnml:misc")
29436 @result{} t
29437 @end lisp
29438
29439 @item gnus-read-method
29440 @findex gnus-read-method
29441 Prompts the user for a select method.
29442
29443 @end table
29444
29445
29446 @node Back End Interface
29447 @subsection Back End Interface
29448
29449 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
29450 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
29451 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
29452 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
29453 examples of the latter we have @code{nntp-port-number} and
29454 @code{nnmbox-directory}.
29455
29456 When Gnus asks for information from a back end---say @code{nntp}---on
29457 something, it will normally include a virtual server name in the
29458 function parameters.  (If not, the back end should use the ``current''
29459 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
29460 server as its only (optional) parameter.  If this virtual server hasn't
29461 been opened, the function should fail.
29462
29463 Note that a virtual server name has no relation to some physical server
29464 name.  Take this example:
29465
29466 @lisp
29467 (nntp "odd-one"
29468       (nntp-address "ifi.uio.no")
29469       (nntp-port-number 4324))
29470 @end lisp
29471
29472 Here the virtual server name is @samp{odd-one} while the name of
29473 the physical server is @samp{ifi.uio.no}.
29474
29475 The back ends should be able to switch between several virtual servers.
29476 The standard back ends implement this by keeping an alist of virtual
29477 server environments that they pull down/push up when needed.
29478
29479 There are two groups of interface functions: @dfn{required functions},
29480 which must be present, and @dfn{optional functions}, which Gnus will
29481 always check for presence before attempting to call 'em.
29482
29483 All these functions are expected to return data in the buffer
29484 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
29485 unfortunately named, but we'll have to live with it.  When I talk about
29486 @dfn{resulting data}, I always refer to the data in that buffer.  When I
29487 talk about @dfn{return value}, I talk about the function value returned by
29488 the function call.  Functions that fail should return @code{nil} as the
29489 return value.
29490
29491 Some back ends could be said to be @dfn{server-forming} back ends, and
29492 some might be said not to be.  The latter are back ends that generally
29493 only operate on one group at a time, and have no concept of ``server''
29494 ---they have a group, and they deliver info on that group and nothing
29495 more.
29496
29497 Gnus identifies each message by way of group name and article number.  A
29498 few remarks about these article numbers might be useful.  First of all,
29499 the numbers are positive integers.  Secondly, it is normally not
29500 possible for later articles to ``re-use'' older article numbers without
29501 confusing Gnus.  That is, if a group has ever contained a message
29502 numbered 42, then no other message may get that number, or Gnus will get
29503 mightily confused.@footnote{See the function
29504 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
29505 Third, article numbers must be assigned in order of arrival in the
29506 group; this is not necessarily the same as the date of the message.
29507
29508 The previous paragraph already mentions all the ``hard'' restrictions that
29509 article numbers must fulfill.  But it seems that it might be useful to
29510 assign @emph{consecutive} article numbers, for Gnus gets quite confused
29511 if there are holes in the article numbering sequence.  However, due to
29512 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
29513 also useful for the article numbers to start at 1 to avoid running out
29514 of numbers as long as possible.
29515
29516 Note that by convention, back ends are named @code{nnsomething}, but
29517 Gnus also comes with some @code{nnnotbackends}, such as
29518 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
29519
29520 In the examples and definitions I will refer to the imaginary back end
29521 @code{nnchoke}.
29522
29523 @cindex @code{nnchoke}
29524
29525 @menu
29526 * Required Back End Functions::  Functions that must be implemented.
29527 * Optional Back End Functions::  Functions that need not be implemented.
29528 * Error Messaging::             How to get messages and report errors.
29529 * Writing New Back Ends::       Extending old back ends.
29530 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
29531 * Mail-like Back Ends::         Some tips on mail back ends.
29532 @end menu
29533
29534
29535 @node Required Back End Functions
29536 @subsubsection Required Back End Functions
29537
29538 @table @code
29539
29540 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
29541
29542 @var{articles} is either a range of article numbers or a list of
29543 @code{Message-ID}s.  Current back ends do not fully support either---only
29544 sequences (lists) of article numbers, and most back ends do not support
29545 retrieval of @code{Message-ID}s.  But they should try for both.
29546
29547 The result data should either be HEADs or @acronym{NOV} lines, and the result
29548 value should either be @code{headers} or @code{nov} to reflect this.
29549 This might later be expanded to @code{various}, which will be a mixture
29550 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
29551
29552 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
29553 headers'', in some meaning of the word.  This is generally done by
29554 fetching (at most) @var{fetch-old} extra headers less than the smallest
29555 article number in @code{articles}, and filling the gaps as well.  The
29556 presence of this parameter can be ignored if the back end finds it
29557 cumbersome to follow the request.  If this is non-@code{nil} and not a
29558 number, do maximum fetches.
29559
29560 Here's an example HEAD:
29561
29562 @example
29563 221 1056 Article retrieved.
29564 Path: ifi.uio.no!sturles
29565 From: sturles@@ifi.uio.no (Sturle Sunde)
29566 Newsgroups: ifi.discussion
29567 Subject: Re: Something very droll
29568 Date: 27 Oct 1994 14:02:57 +0100
29569 Organization: Dept. of Informatics, University of Oslo, Norway
29570 Lines: 26
29571 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
29572 References: <38jdmq$4qu@@visbur.ifi.uio.no>
29573 NNTP-Posting-Host: holmenkollen.ifi.uio.no
29574 .
29575 @end example
29576
29577 So a @code{headers} return value would imply that there's a number of
29578 these in the data buffer.
29579
29580 Here's a BNF definition of such a buffer:
29581
29582 @example
29583 headers        = *head
29584 head           = error / valid-head
29585 error-message  = [ "4" / "5" ] 2number " " <error message> eol
29586 valid-head     = valid-message *header "." eol
29587 valid-message  = "221 " <number> " Article retrieved." eol
29588 header         = <text> eol
29589 @end example
29590
29591 @cindex BNF
29592 (The version of BNF used here is the one used in RFC822.)
29593
29594 If the return value is @code{nov}, the data buffer should contain
29595 @dfn{network overview database} lines.  These are basically fields
29596 separated by tabs.
29597
29598 @example
29599 nov-buffer = *nov-line
29600 nov-line   = field 7*8[ <TAB> field ] eol
29601 field      = <text except TAB>
29602 @end example
29603
29604 For a closer look at what should be in those fields,
29605 @pxref{Headers}.
29606
29607
29608 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
29609
29610 @var{server} is here the virtual server name.  @var{definitions} is a
29611 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
29612
29613 If the server can't be opened, no error should be signaled.  The back end
29614 may then choose to refuse further attempts at connecting to this
29615 server.  In fact, it should do so.
29616
29617 If the server is opened already, this function should return a
29618 non-@code{nil} value.  There should be no data returned.
29619
29620
29621 @item (nnchoke-close-server &optional SERVER)
29622
29623 Close connection to @var{server} and free all resources connected
29624 to it.  Return @code{nil} if the server couldn't be closed for some
29625 reason.
29626
29627 There should be no data returned.
29628
29629
29630 @item (nnchoke-request-close)
29631
29632 Close connection to all servers and free all resources that the back end
29633 have reserved.  All buffers that have been created by that back end
29634 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
29635 function is generally only called when Gnus is shutting down.
29636
29637 There should be no data returned.
29638
29639
29640 @item (nnchoke-server-opened &optional SERVER)
29641
29642 If @var{server} is the current virtual server, and the connection to the
29643 physical server is alive, then this function should return a
29644 non-@code{nil} value.  This function should under no circumstances
29645 attempt to reconnect to a server we have lost connection to.
29646
29647 There should be no data returned.
29648
29649
29650 @item (nnchoke-status-message &optional SERVER)
29651
29652 This function should return the last error message from @var{server}.
29653
29654 There should be no data returned.
29655
29656
29657 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
29658
29659 The result data from this function should be the article specified by
29660 @var{article}.  This might either be a @code{Message-ID} or a number.
29661 It is optional whether to implement retrieval by @code{Message-ID}, but
29662 it would be nice if that were possible.
29663
29664 If @var{to-buffer} is non-@code{nil}, the result data should be returned
29665 in this buffer instead of the normal data buffer.  This is to make it
29666 possible to avoid copying large amounts of data from one buffer to
29667 another, while Gnus mainly requests articles to be inserted directly
29668 into its article buffer.
29669
29670 If it is at all possible, this function should return a cons cell where
29671 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
29672 the article number.  This will enable Gnus to find out what the real
29673 group and article numbers are when fetching articles by
29674 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
29675 on successful article retrieval.
29676
29677
29678 @item (nnchoke-request-group GROUP &optional SERVER FAST INFO)
29679
29680 Get data on @var{group}.  This function also has the side effect of
29681 making @var{group} the current group.
29682
29683 If @var{fast}, don't bother to return useful data, just make @var{group}
29684 the current group.
29685
29686 If @var{info}, it allows the backend to update the group info
29687 structure.
29688
29689 Here's an example of some result data and a definition of the same:
29690
29691 @example
29692 211 56 1000 1059 ifi.discussion
29693 @end example
29694
29695 The first number is the status, which should be 211.  Next is the
29696 total number of articles in the group, the lowest article number, the
29697 highest article number, and finally the group name.  Note that the total
29698 number of articles may be less than one might think while just
29699 considering the highest and lowest article numbers, but some articles
29700 may have been canceled.  Gnus just discards the total-number, so
29701 whether one should take the bother to generate it properly (if that is a
29702 problem) is left as an exercise to the reader.  If the group contains no
29703 articles, the lowest article number should be reported as 1 and the
29704 highest as 0.
29705
29706 @example
29707 group-status = [ error / info ] eol
29708 error        = [ "4" / "5" ] 2<number> " " <Error message>
29709 info         = "211 " 3* [ <number> " " ] <string>
29710 @end example
29711
29712
29713 @item (nnchoke-close-group GROUP &optional SERVER)
29714
29715 Close @var{group} and free any resources connected to it.  This will be
29716 a no-op on most back ends.
29717
29718 There should be no data returned.
29719
29720
29721 @item (nnchoke-request-list &optional SERVER)
29722
29723 Return a list of all groups available on @var{server}.  And that means
29724 @emph{all}.
29725
29726 Here's an example from a server that only carries two groups:
29727
29728 @example
29729 ifi.test 0000002200 0000002000 y
29730 ifi.discussion 3324 3300 n
29731 @end example
29732
29733 On each line we have a group name, then the highest article number in
29734 that group, the lowest article number, and finally a flag.  If the group
29735 contains no articles, the lowest article number should be reported as 1
29736 and the highest as 0.
29737
29738 @example
29739 active-file = *active-line
29740 active-line = name " " <number> " " <number> " " flags eol
29741 name        = <string>
29742 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
29743 @end example
29744
29745 The flag says whether the group is read-only (@samp{n}), is moderated
29746 (@samp{m}), is dead (@samp{x}), is aliased to some other group
29747 (@samp{=other-group}) or none of the above (@samp{y}).
29748
29749
29750 @item (nnchoke-request-post &optional SERVER)
29751
29752 This function should post the current buffer.  It might return whether
29753 the posting was successful or not, but that's not required.  If, for
29754 instance, the posting is done asynchronously, it has generally not been
29755 completed by the time this function concludes.  In that case, this
29756 function should set up some kind of sentinel to beep the user loud and
29757 clear if the posting could not be completed.
29758
29759 There should be no result data from this function.
29760
29761 @end table
29762
29763
29764 @node Optional Back End Functions
29765 @subsubsection Optional Back End Functions
29766
29767 @table @code
29768
29769 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
29770
29771 @var{groups} is a list of groups, and this function should request data
29772 on all those groups.  How it does it is of no concern to Gnus, but it
29773 should attempt to do this in a speedy fashion.
29774
29775 The return value of this function can be either @code{active} or
29776 @code{group}, which says what the format of the result data is.  The
29777 former is in the same format as the data from
29778 @code{nnchoke-request-list}, while the latter is a buffer full of lines
29779 in the same format as @code{nnchoke-request-group} gives.
29780
29781 @example
29782 group-buffer = *active-line / *group-status
29783 @end example
29784
29785
29786 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
29787
29788 A Gnus group info (@pxref{Group Info}) is handed to the back end for
29789 alterations.  This comes in handy if the back end really carries all
29790 the information (as is the case with virtual and imap groups).  This
29791 function should destructively alter the info to suit its needs, and
29792 should return a non-@code{nil} value (exceptionally,
29793 @code{nntp-request-update-info} always returns @code{nil} not to waste
29794 the network resources).
29795
29796 There should be no result data from this function.
29797
29798
29799 @item (nnchoke-request-type GROUP &optional ARTICLE)
29800
29801 When the user issues commands for ``sending news'' (@kbd{F} in the
29802 summary buffer, for instance), Gnus has to know whether the article the
29803 user is following up on is news or mail.  This function should return
29804 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
29805 is mail and @code{unknown} if the type can't be decided.  (The
29806 @var{article} parameter is necessary in @code{nnvirtual} groups which
29807 might very well combine mail groups and news groups.)  Both @var{group}
29808 and @var{article} may be @code{nil}.
29809
29810 There should be no result data from this function.
29811
29812
29813 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
29814
29815 Set/remove/add marks on articles.  Normally Gnus handles the article
29816 marks (such as read, ticked, expired etc) internally, and store them in
29817 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
29818 all information about the articles on the server, so Gnus need to
29819 propagate the mark information to the server.
29820
29821 @var{action} is a list of mark setting requests, having this format:
29822
29823 @example
29824 (RANGE ACTION MARK)
29825 @end example
29826
29827 @var{range} is a range of articles you wish to update marks on.
29828 @var{action} is @code{add} or @code{del}, used to add marks or remove
29829 marks (preserving all marks not mentioned).  @var{mark} is a list of
29830 marks; where each mark is a symbol.  Currently used marks are
29831 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
29832 @code{dormant}, @code{save}, @code{download}, @code{unsend},
29833 @code{forward} and @code{recent}, but your back end should, if
29834 possible, not limit itself to these.
29835
29836 Given contradictory actions, the last action in the list should be the
29837 effective one.  That is, if your action contains a request to add the
29838 @code{tick} mark on article 1 and, later in the list, a request to
29839 remove the mark on the same article, the mark should in fact be removed.
29840
29841 An example action list:
29842
29843 @example
29844 (((5 12 30) 'del '(tick))
29845  ((10 . 90) 'add '(read expire))
29846  ((92 94) 'del '(read)))
29847 @end example
29848
29849 The function should return a range of articles it wasn't able to set the
29850 mark on (currently not used for anything).
29851
29852 There should be no result data from this function.
29853
29854 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
29855
29856 If the user tries to set a mark that the back end doesn't like, this
29857 function may change the mark.  Gnus will use whatever this function
29858 returns as the mark for @var{article} instead of the original
29859 @var{mark}.  If the back end doesn't care, it must return the original
29860 @var{mark}, and not @code{nil} or any other type of garbage.
29861
29862 The only use for this I can see is what @code{nnvirtual} does with
29863 it---if a component group is auto-expirable, marking an article as read
29864 in the virtual group should result in the article being marked as
29865 expirable.
29866
29867 There should be no result data from this function.
29868
29869
29870 @item (nnchoke-request-scan &optional GROUP SERVER)
29871
29872 This function may be called at any time (by Gnus or anything else) to
29873 request that the back end check for incoming articles, in one way or
29874 another.  A mail back end will typically read the spool file or query
29875 the @acronym{POP} server when this function is invoked.  The
29876 @var{group} doesn't have to be heeded---if the back end decides that
29877 it is too much work just scanning for a single group, it may do a
29878 total scan of all groups.  It would be nice, however, to keep things
29879 local if that's practical.
29880
29881 There should be no result data from this function.
29882
29883
29884 @item (nnchoke-request-group-description GROUP &optional SERVER)
29885
29886 The result data from this function should be a description of
29887 @var{group}.
29888
29889 @example
29890 description-line = name <TAB> description eol
29891 name             = <string>
29892 description      = <text>
29893 @end example
29894
29895 @item (nnchoke-request-list-newsgroups &optional SERVER)
29896
29897 The result data from this function should be the description of all
29898 groups available on the server.
29899
29900 @example
29901 description-buffer = *description-line
29902 @end example
29903
29904
29905 @item (nnchoke-request-newgroups DATE &optional SERVER)
29906
29907 The result data from this function should be all groups that were
29908 created after @samp{date}, which is in normal human-readable date format
29909 (i.e., the date format used in mail and news headers, and returned by
29910 the function @code{message-make-date} by default).  The data should be
29911 in the active buffer format.
29912
29913 It is okay for this function to return ``too many'' groups; some back ends
29914 might find it cheaper to return the full list of groups, rather than
29915 just the new groups.  But don't do this for back ends with many groups.
29916 Normally, if the user creates the groups herself, there won't be too
29917 many groups, so @code{nnml} and the like are probably safe.  But for
29918 back ends like @code{nntp}, where the groups have been created by the
29919 server, it is quite likely that there can be many groups.
29920
29921
29922 @item (nnchoke-request-create-group GROUP &optional SERVER)
29923
29924 This function should create an empty group with name @var{group}.
29925
29926 There should be no return data.
29927
29928
29929 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
29930
29931 This function should run the expiry process on all articles in the
29932 @var{articles} range (which is currently a simple list of article
29933 numbers.)  It is left up to the back end to decide how old articles
29934 should be before they are removed by this function.  If @var{force} is
29935 non-@code{nil}, all @var{articles} should be deleted, no matter how new
29936 they are.
29937
29938 This function should return a list of articles that it did not/was not
29939 able to delete.
29940
29941 There should be no result data returned.
29942
29943
29944 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
29945
29946 This function should move @var{article} (which is a number) from
29947 @var{group} by calling @var{accept-form}.
29948
29949 This function should ready the article in question for moving by
29950 removing any header lines it has added to the article, and generally
29951 should ``tidy up'' the article.  Then it should @code{eval}
29952 @var{accept-form} in the buffer where the ``tidy'' article is.  This
29953 will do the actual copying.  If this @code{eval} returns a
29954 non-@code{nil} value, the article should be removed.
29955
29956 If @var{last} is @code{nil}, that means that there is a high likelihood
29957 that there will be more requests issued shortly, so that allows some
29958 optimizations.
29959
29960 The function should return a cons where the @code{car} is the group name and
29961 the @code{cdr} is the article number that the article was entered as.
29962
29963 There should be no data returned.
29964
29965
29966 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
29967
29968 This function takes the current buffer and inserts it into @var{group}.
29969 If @var{last} in @code{nil}, that means that there will be more calls to
29970 this function in short order.
29971
29972 The function should return a cons where the @code{car} is the group name and
29973 the @code{cdr} is the article number that the article was entered as.
29974
29975 The group should exist before the back end is asked to accept the
29976 article for that group.
29977
29978 There should be no data returned.
29979
29980
29981 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
29982
29983 This function should remove @var{article} (which is a number) from
29984 @var{group} and insert @var{buffer} there instead.
29985
29986 There should be no data returned.
29987
29988
29989 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
29990
29991 This function should delete @var{group}.  If @var{force}, it should
29992 really delete all the articles in the group, and then delete the group
29993 itself.  (If there is such a thing as ``the group itself''.)
29994
29995 There should be no data returned.
29996
29997
29998 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
29999
30000 This function should rename @var{group} into @var{new-name}.  All
30001 articles in @var{group} should move to @var{new-name}.
30002
30003 There should be no data returned.
30004
30005 @end table
30006
30007
30008 @node Error Messaging
30009 @subsubsection Error Messaging
30010
30011 @findex nnheader-report
30012 @findex nnheader-get-report
30013 The back ends should use the function @code{nnheader-report} to report
30014 error conditions---they should not raise errors when they aren't able to
30015 perform a request.  The first argument to this function is the back end
30016 symbol, and the rest are interpreted as arguments to @code{format} if
30017 there are multiple of them, or just a string if there is one of them.
30018 This function must always returns @code{nil}.
30019
30020 @lisp
30021 (nnheader-report 'nnchoke "You did something totally bogus")
30022
30023 (nnheader-report 'nnchoke "Could not request group %s" group)
30024 @end lisp
30025
30026 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
30027 @code{nil} back from a server, and this function returns the most
30028 recently reported message for the back end in question.  This function
30029 takes one argument---the server symbol.
30030
30031 Internally, these functions access @var{back-end}@code{-status-string},
30032 so the @code{nnchoke} back end will have its error message stored in
30033 @code{nnchoke-status-string}.
30034
30035
30036 @node Writing New Back Ends
30037 @subsubsection Writing New Back Ends
30038
30039 Many back ends are quite similar.  @code{nnml} is just like
30040 @code{nnspool}, but it allows you to edit the articles on the server.
30041 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
30042 and it doesn't maintain overview databases.  @code{nndir} is just like
30043 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
30044 editing articles.
30045
30046 It would make sense if it were possible to ``inherit'' functions from
30047 back ends when writing new back ends.  And, indeed, you can do that if you
30048 want to.  (You don't have to if you don't want to, of course.)
30049
30050 All the back ends declare their public variables and functions by using a
30051 package called @code{nnoo}.
30052
30053 To inherit functions from other back ends (and allow other back ends to
30054 inherit functions from the current back end), you should use the
30055 following macros:
30056
30057 @table @code
30058
30059 @item nnoo-declare
30060 This macro declares the first parameter to be a child of the subsequent
30061 parameters.  For instance:
30062
30063 @lisp
30064 (nnoo-declare nndir
30065   nnml nnmh)
30066 @end lisp
30067
30068 @code{nndir} has declared here that it intends to inherit functions from
30069 both @code{nnml} and @code{nnmh}.
30070
30071 @item defvoo
30072 This macro is equivalent to @code{defvar}, but registers the variable as
30073 a public server variable.  Most state-oriented variables should be
30074 declared with @code{defvoo} instead of @code{defvar}.
30075
30076 In addition to the normal @code{defvar} parameters, it takes a list of
30077 variables in the parent back ends to map the variable to when executing
30078 a function in those back ends.
30079
30080 @lisp
30081 (defvoo nndir-directory nil
30082   "Where nndir will look for groups."
30083   nnml-current-directory nnmh-current-directory)
30084 @end lisp
30085
30086 This means that @code{nnml-current-directory} will be set to
30087 @code{nndir-directory} when an @code{nnml} function is called on behalf
30088 of @code{nndir}.  (The same with @code{nnmh}.)
30089
30090 @item nnoo-define-basics
30091 This macro defines some common functions that almost all back ends should
30092 have.
30093
30094 @lisp
30095 (nnoo-define-basics nndir)
30096 @end lisp
30097
30098 @item deffoo
30099 This macro is just like @code{defun} and takes the same parameters.  In
30100 addition to doing the normal @code{defun} things, it registers the
30101 function as being public so that other back ends can inherit it.
30102
30103 @item nnoo-map-functions
30104 This macro allows mapping of functions from the current back end to
30105 functions from the parent back ends.
30106
30107 @lisp
30108 (nnoo-map-functions nndir
30109   (nnml-retrieve-headers 0 nndir-current-group 0 0)
30110   (nnmh-request-article 0 nndir-current-group 0 0))
30111 @end lisp
30112
30113 This means that when @code{nndir-retrieve-headers} is called, the first,
30114 third, and fourth parameters will be passed on to
30115 @code{nnml-retrieve-headers}, while the second parameter is set to the
30116 value of @code{nndir-current-group}.
30117
30118 @item nnoo-import
30119 This macro allows importing functions from back ends.  It should be the
30120 last thing in the source file, since it will only define functions that
30121 haven't already been defined.
30122
30123 @lisp
30124 (nnoo-import nndir
30125   (nnmh
30126    nnmh-request-list
30127    nnmh-request-newgroups)
30128   (nnml))
30129 @end lisp
30130
30131 This means that calls to @code{nndir-request-list} should just be passed
30132 on to @code{nnmh-request-list}, while all public functions from
30133 @code{nnml} that haven't been defined in @code{nndir} yet should be
30134 defined now.
30135
30136 @end table
30137
30138 Below is a slightly shortened version of the @code{nndir} back end.
30139
30140 @lisp
30141 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
30142 ;; @r{Copyright (C) 1995,1996 Free Software Foundation, Inc.}
30143
30144 ;;; @r{Code:}
30145
30146 (require 'nnheader)
30147 (require 'nnmh)
30148 (require 'nnml)
30149 (require 'nnoo)
30150 (eval-when-compile (require 'cl))
30151
30152 (nnoo-declare nndir
30153   nnml nnmh)
30154
30155 (defvoo nndir-directory nil
30156   "Where nndir will look for groups."
30157   nnml-current-directory nnmh-current-directory)
30158
30159 (defvoo nndir-nov-is-evil nil
30160   "*Non-nil means that nndir will never retrieve NOV headers."
30161   nnml-nov-is-evil)
30162
30163 (defvoo nndir-current-group ""
30164   nil
30165   nnml-current-group nnmh-current-group)
30166 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
30167 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
30168
30169 (defvoo nndir-status-string "" nil nnmh-status-string)
30170 (defconst nndir-version "nndir 1.0")
30171
30172 ;;; @r{Interface functions.}
30173
30174 (nnoo-define-basics nndir)
30175
30176 (deffoo nndir-open-server (server &optional defs)
30177   (setq nndir-directory
30178         (or (cadr (assq 'nndir-directory defs))
30179             server))
30180   (unless (assq 'nndir-directory defs)
30181     (push `(nndir-directory ,server) defs))
30182   (push `(nndir-current-group
30183           ,(file-name-nondirectory
30184             (directory-file-name nndir-directory)))
30185         defs)
30186   (push `(nndir-top-directory
30187           ,(file-name-directory (directory-file-name nndir-directory)))
30188         defs)
30189   (nnoo-change-server 'nndir server defs))
30190
30191 (nnoo-map-functions nndir
30192   (nnml-retrieve-headers 0 nndir-current-group 0 0)
30193   (nnmh-request-article 0 nndir-current-group 0 0)
30194   (nnmh-request-group nndir-current-group 0 0)
30195   (nnmh-close-group nndir-current-group 0))
30196
30197 (nnoo-import nndir
30198   (nnmh
30199    nnmh-status-message
30200    nnmh-request-list
30201    nnmh-request-newgroups))
30202
30203 (provide 'nndir)
30204 @end lisp
30205
30206
30207 @node Hooking New Back Ends Into Gnus
30208 @subsubsection Hooking New Back Ends Into Gnus
30209
30210 @vindex gnus-valid-select-methods
30211 @findex gnus-declare-backend
30212 Having Gnus start using your new back end is rather easy---you just
30213 declare it with the @code{gnus-declare-backend} functions.  This will
30214 enter the back end into the @code{gnus-valid-select-methods} variable.
30215
30216 @code{gnus-declare-backend} takes two parameters---the back end name and
30217 an arbitrary number of @dfn{abilities}.
30218
30219 Here's an example:
30220
30221 @lisp
30222 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
30223 @end lisp
30224
30225 The above line would then go in the @file{nnchoke.el} file.
30226
30227 The abilities can be:
30228
30229 @table @code
30230 @item mail
30231 This is a mailish back end---followups should (probably) go via mail.
30232 @item post
30233 This is a newsish back end---followups should (probably) go via news.
30234 @item post-mail
30235 This back end supports both mail and news.
30236 @item none
30237 This is neither a post nor mail back end---it's something completely
30238 different.
30239 @item respool
30240 It supports respooling---or rather, it is able to modify its source
30241 articles and groups.
30242 @item address
30243 The name of the server should be in the virtual server name.  This is
30244 true for almost all back ends.
30245 @item prompt-address
30246 The user should be prompted for an address when doing commands like
30247 @kbd{B} in the group buffer.  This is true for back ends like
30248 @code{nntp}, but not @code{nnmbox}, for instance.
30249 @end table
30250
30251
30252 @node Mail-like Back Ends
30253 @subsubsection Mail-like Back Ends
30254
30255 One of the things that separate the mail back ends from the rest of the
30256 back ends is the heavy dependence by most of the mail back ends on
30257 common functions in @file{nnmail.el}.  For instance, here's the
30258 definition of @code{nnml-request-scan}:
30259
30260 @lisp
30261 (deffoo nnml-request-scan (&optional group server)
30262   (setq nnml-article-file-alist nil)
30263   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
30264 @end lisp
30265
30266 It simply calls @code{nnmail-get-new-mail} with a few parameters,
30267 and @code{nnmail} takes care of all the moving and splitting of the
30268 mail.
30269
30270 This function takes four parameters.
30271
30272 @table @var
30273 @item method
30274 This should be a symbol to designate which back end is responsible for
30275 the call.
30276
30277 @item exit-function
30278 This function should be called after the splitting has been performed.
30279
30280 @item temp-directory
30281 Where the temporary files should be stored.
30282
30283 @item group
30284 This optional argument should be a group name if the splitting is to be
30285 performed for one group only.
30286 @end table
30287
30288 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
30289 save each article.  @var{back-end}@code{-active-number} will be called to
30290 find the article number assigned to this article.
30291
30292 The function also uses the following variables:
30293 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
30294 this back end); and @var{back-end}@code{-group-alist} and
30295 @var{back-end}@code{-active-file} to generate the new active file.
30296 @var{back-end}@code{-group-alist} should be a group-active alist, like
30297 this:
30298
30299 @example
30300 (("a-group" (1 . 10))
30301  ("some-group" (34 . 39)))
30302 @end example
30303
30304
30305 @node Score File Syntax
30306 @subsection Score File Syntax
30307
30308 Score files are meant to be easily parseable, but yet extremely
30309 mallable.  It was decided that something that had the same read syntax
30310 as an Emacs Lisp list would fit that spec.
30311
30312 Here's a typical score file:
30313
30314 @lisp
30315 (("summary"
30316   ("win95" -10000 nil s)
30317   ("Gnus"))
30318  ("from"
30319   ("Lars" -1000))
30320  (mark -100))
30321 @end lisp
30322
30323 BNF definition of a score file:
30324
30325 @example
30326 score-file      = "" / "(" *element ")"
30327 element         = rule / atom
30328 rule            = string-rule / number-rule / date-rule
30329 string-rule     = "(" quote string-header quote space *string-match ")"
30330 number-rule     = "(" quote number-header quote space *number-match ")"
30331 date-rule       = "(" quote date-header quote space *date-match ")"
30332 quote           = <ascii 34>
30333 string-header   = "subject" / "from" / "references" / "message-id" /
30334                   "xref" / "body" / "head" / "all" / "followup"
30335 number-header   = "lines" / "chars"
30336 date-header     = "date"
30337 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
30338                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
30339 score           = "nil" / <integer>
30340 date            = "nil" / <natural number>
30341 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
30342                   "r" / "regex" / "R" / "Regex" /
30343                   "e" / "exact" / "E" / "Exact" /
30344                   "f" / "fuzzy" / "F" / "Fuzzy"
30345 number-match    = "(" <integer> [ "" / [ space score [ "" /
30346                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
30347 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
30348 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
30349                   space date [ "" / [ space date-match-t ] ] ] ] ")"
30350 date-match-t    = "nil" / "at" / "before" / "after"
30351 atom            = "(" [ required-atom / optional-atom ] ")"
30352 required-atom   = mark / expunge / mark-and-expunge / files /
30353                   exclude-files / read-only / touched
30354 optional-atom   = adapt / local / eval
30355 mark            = "mark" space nil-or-number
30356 nil-or-number   = "nil" / <integer>
30357 expunge         = "expunge" space nil-or-number
30358 mark-and-expunge = "mark-and-expunge" space nil-or-number
30359 files           = "files" *[ space <string> ]
30360 exclude-files   = "exclude-files" *[ space <string> ]
30361 read-only       = "read-only" [ space "nil" / space "t" ]
30362 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
30363 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
30364 local           = "local" *[ space "(" <string> space <form> ")" ]
30365 eval            = "eval" space <form>
30366 space           = *[ " " / <TAB> / <NEWLINE> ]
30367 @end example
30368
30369 Any unrecognized elements in a score file should be ignored, but not
30370 discarded.
30371
30372 As you can see, white space is needed, but the type and amount of white
30373 space is irrelevant.  This means that formatting of the score file is
30374 left up to the programmer---if it's simpler to just spew it all out on
30375 one looong line, then that's ok.
30376
30377 The meaning of the various atoms are explained elsewhere in this
30378 manual (@pxref{Score File Format}).
30379
30380
30381 @node Headers
30382 @subsection Headers
30383
30384 Internally Gnus uses a format for storing article headers that
30385 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
30386 almost suspect that the author looked at the @acronym{NOV} specification and
30387 just shamelessly @emph{stole} the entire thing, and one would be right.
30388
30389 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
30390 RFC 1036 to talk about lines in the head of an article (e.g.,
30391 @code{From}).  It is used by many people as a synonym for
30392 ``head''---``the header and the body''.  (That should be avoided, in my
30393 opinion.)  And Gnus uses a format internally that it calls ``header'',
30394 which is what I'm talking about here.  This is a 9-element vector,
30395 basically, with each header (ouch) having one slot.
30396
30397 These slots are, in order: @code{number}, @code{subject}, @code{from},
30398 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
30399 @code{xref}, and @code{extra}.  There are macros for accessing and
30400 setting these slots---they all have predictable names beginning with
30401 @code{mail-header-} and @code{mail-header-set-}, respectively.
30402
30403 All these slots contain strings, except the @code{extra} slot, which
30404 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
30405
30406
30407 @node Ranges
30408 @subsection Ranges
30409
30410 @sc{gnus} introduced a concept that I found so useful that I've started
30411 using it a lot and have elaborated on it greatly.
30412
30413 The question is simple: If you have a large amount of objects that are
30414 identified by numbers (say, articles, to take a @emph{wild} example)
30415 that you want to qualify as being ``included'', a normal sequence isn't
30416 very useful.  (A 200,000 length sequence is a bit long-winded.)
30417
30418 The solution is as simple as the question: You just collapse the
30419 sequence.
30420
30421 @example
30422 (1 2 3 4 5 6 10 11 12)
30423 @end example
30424
30425 is transformed into
30426
30427 @example
30428 ((1 . 6) (10 . 12))
30429 @end example
30430
30431 To avoid having those nasty @samp{(13 . 13)} elements to denote a
30432 lonesome object, a @samp{13} is a valid element:
30433
30434 @example
30435 ((1 . 6) 7 (10 . 12))
30436 @end example
30437
30438 This means that comparing two ranges to find out whether they are equal
30439 is slightly tricky:
30440
30441 @example
30442 ((1 . 5) 7 8 (10 . 12))
30443 @end example
30444
30445 and
30446
30447 @example
30448 ((1 . 5) (7 . 8) (10 . 12))
30449 @end example
30450
30451 are equal.  In fact, any non-descending list is a range:
30452
30453 @example
30454 (1 2 3 4 5)
30455 @end example
30456
30457 is a perfectly valid range, although a pretty long-winded one.  This is
30458 also valid:
30459
30460 @example
30461 (1 . 5)
30462 @end example
30463
30464 and is equal to the previous range.
30465
30466 Here's a BNF definition of ranges.  Of course, one must remember the
30467 semantic requirement that the numbers are non-descending.  (Any number
30468 of repetition of the same number is allowed, but apt to disappear in
30469 range handling.)
30470
30471 @example
30472 range           = simple-range / normal-range
30473 simple-range    = "(" number " . " number ")"
30474 normal-range    = "(" start-contents ")"
30475 contents        = "" / simple-range *[ " " contents ] /
30476                   number *[ " " contents ]
30477 @end example
30478
30479 Gnus currently uses ranges to keep track of read articles and article
30480 marks.  I plan on implementing a number of range operators in C if The
30481 Powers That Be are willing to let me.  (I haven't asked yet, because I
30482 need to do some more thinking on what operators I need to make life
30483 totally range-based without ever having to convert back to normal
30484 sequences.)
30485
30486
30487 @node Group Info
30488 @subsection Group Info
30489
30490 Gnus stores all permanent info on groups in a @dfn{group info} list.
30491 This list is from three to six elements (or more) long and exhaustively
30492 describes the group.
30493
30494 Here are two example group infos; one is a very simple group while the
30495 second is a more complex one:
30496
30497 @example
30498 ("no.group" 5 ((1 . 54324)))
30499
30500 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
30501                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
30502                 (nnml "")
30503                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
30504 @end example
30505
30506 The first element is the @dfn{group name}---as Gnus knows the group,
30507 anyway.  The second element is the @dfn{subscription level}, which
30508 normally is a small integer.  (It can also be the @dfn{rank}, which is a
30509 cons cell where the @code{car} is the level and the @code{cdr} is the
30510 score.)  The third element is a list of ranges of read articles.  The
30511 fourth element is a list of lists of article marks of various kinds.
30512 The fifth element is the select method (or virtual server, if you like).
30513 The sixth element is a list of @dfn{group parameters}, which is what
30514 this section is about.
30515
30516 Any of the last three elements may be missing if they are not required.
30517 In fact, the vast majority of groups will normally only have the first
30518 three elements, which saves quite a lot of cons cells.
30519
30520 Here's a BNF definition of the group info format:
30521
30522 @example
30523 info          = "(" group space ralevel space read
30524                 [ "" / [ space marks-list [ "" / [ space method [ "" /
30525                 space parameters ] ] ] ] ] ")"
30526 group         = quote <string> quote
30527 ralevel       = rank / level
30528 level         = <integer in the range of 1 to inf>
30529 rank          = "(" level "." score ")"
30530 score         = <integer in the range of 1 to inf>
30531 read          = range
30532 marks-lists   = nil / "(" *marks ")"
30533 marks         = "(" <string> range ")"
30534 method        = "(" <string> *elisp-forms ")"
30535 parameters    = "(" *elisp-forms ")"
30536 @end example
30537
30538 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
30539 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
30540 in pseudo-BNF.
30541
30542 If you have a Gnus info and want to access the elements, Gnus offers a
30543 series of macros for getting/setting these elements.
30544
30545 @table @code
30546 @item gnus-info-group
30547 @itemx gnus-info-set-group
30548 @findex gnus-info-group
30549 @findex gnus-info-set-group
30550 Get/set the group name.
30551
30552 @item gnus-info-rank
30553 @itemx gnus-info-set-rank
30554 @findex gnus-info-rank
30555 @findex gnus-info-set-rank
30556 Get/set the group rank (@pxref{Group Score}).
30557
30558 @item gnus-info-level
30559 @itemx gnus-info-set-level
30560 @findex gnus-info-level
30561 @findex gnus-info-set-level
30562 Get/set the group level.
30563
30564 @item gnus-info-score
30565 @itemx gnus-info-set-score
30566 @findex gnus-info-score
30567 @findex gnus-info-set-score
30568 Get/set the group score (@pxref{Group Score}).
30569
30570 @item gnus-info-read
30571 @itemx gnus-info-set-read
30572 @findex gnus-info-read
30573 @findex gnus-info-set-read
30574 Get/set the ranges of read articles.
30575
30576 @item gnus-info-marks
30577 @itemx gnus-info-set-marks
30578 @findex gnus-info-marks
30579 @findex gnus-info-set-marks
30580 Get/set the lists of ranges of marked articles.
30581
30582 @item gnus-info-method
30583 @itemx gnus-info-set-method
30584 @findex gnus-info-method
30585 @findex gnus-info-set-method
30586 Get/set the group select method.
30587
30588 @item gnus-info-params
30589 @itemx gnus-info-set-params
30590 @findex gnus-info-params
30591 @findex gnus-info-set-params
30592 Get/set the group parameters.
30593 @end table
30594
30595 All the getter functions take one parameter---the info list.  The setter
30596 functions take two parameters---the info list and the new value.
30597
30598 The last three elements in the group info aren't mandatory, so it may be
30599 necessary to extend the group info before setting the element.  If this
30600 is necessary, you can just pass on a non-@code{nil} third parameter to
30601 the three final setter functions to have this happen automatically.
30602
30603
30604 @node Extended Interactive
30605 @subsection Extended Interactive
30606 @cindex interactive
30607 @findex gnus-interactive
30608
30609 Gnus extends the standard Emacs @code{interactive} specification
30610 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
30611 Prefixes}).  Here's an example of how this is used:
30612
30613 @lisp
30614 (defun gnus-summary-increase-score (&optional score symp)
30615   (interactive (gnus-interactive "P\ny"))
30616   ...
30617   )
30618 @end lisp
30619
30620 The best thing to do would have been to implement
30621 @code{gnus-interactive} as a macro which would have returned an
30622 @code{interactive} form, but this isn't possible since Emacs checks
30623 whether a function is interactive or not by simply doing an @code{assq}
30624 on the lambda form.  So, instead we have @code{gnus-interactive}
30625 function that takes a string and returns values that are usable to
30626 @code{interactive}.
30627
30628 This function accepts (almost) all normal @code{interactive} specs, but
30629 adds a few more.
30630
30631 @table @samp
30632 @item y
30633 @vindex gnus-current-prefix-symbol
30634 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
30635 variable.
30636
30637 @item Y
30638 @vindex gnus-current-prefix-symbols
30639 A list of the current symbolic prefixes---the
30640 @code{gnus-current-prefix-symbol} variable.
30641
30642 @item A
30643 The current article number---the @code{gnus-summary-article-number}
30644 function.
30645
30646 @item H
30647 The current article header---the @code{gnus-summary-article-header}
30648 function.
30649
30650 @item g
30651 The current group name---the @code{gnus-group-group-name}
30652 function.
30653
30654 @end table
30655
30656
30657 @node Emacs/XEmacs Code
30658 @subsection Emacs/XEmacs Code
30659 @cindex XEmacs
30660 @cindex Emacsen
30661
30662 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
30663 platforms must be the primary one.  I chose Emacs.  Not because I don't
30664 like XEmacs or Mule, but because it comes first alphabetically.
30665
30666 This means that Gnus will byte-compile under Emacs with nary a warning,
30667 while XEmacs will pump out gigabytes of warnings while byte-compiling.
30668 As I use byte-compilation warnings to help me root out trivial errors in
30669 Gnus, that's very useful.
30670
30671 I've also consistently used Emacs function interfaces, but have used
30672 Gnusey aliases for the functions.  To take an example:  Emacs defines a
30673 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
30674 function.  I then define a function called @code{gnus-run-at-time} that
30675 takes the same parameters as the Emacs @code{run-at-time}.  When running
30676 Gnus under Emacs, the former function is just an alias for the latter.
30677 However, when running under XEmacs, the former is an alias for the
30678 following function:
30679
30680 @lisp
30681 (defun gnus-xmas-run-at-time (time repeat function &rest args)
30682   (start-itimer
30683    "gnus-run-at-time"
30684    `(lambda ()
30685       (,function ,@@args))
30686    time repeat))
30687 @end lisp
30688
30689 This sort of thing has been done for bunches of functions.  Gnus does
30690 not redefine any native Emacs functions while running under XEmacs---it
30691 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
30692 all over.
30693
30694 In the cases where the XEmacs function interface was obviously cleaner,
30695 I used it instead.  For example @code{gnus-region-active-p} is an alias
30696 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
30697
30698 Of course, I could have chosen XEmacs as my native platform and done
30699 mapping functions the other way around.  But I didn't.  The performance
30700 hit these indirections impose on Gnus under XEmacs should be slight.
30701
30702
30703 @node Various File Formats
30704 @subsection Various File Formats
30705
30706 @menu
30707 * Active File Format::          Information on articles and groups available.
30708 * Newsgroups File Format::      Group descriptions.
30709 @end menu
30710
30711
30712 @node Active File Format
30713 @subsubsection Active File Format
30714
30715 The active file lists all groups available on the server in
30716 question.  It also lists the highest and lowest current article numbers
30717 in each group.
30718
30719 Here's an excerpt from a typical active file:
30720
30721 @example
30722 soc.motss 296030 293865 y
30723 alt.binaries.pictures.fractals 3922 3913 n
30724 comp.sources.unix 1605 1593 m
30725 comp.binaries.ibm.pc 5097 5089 y
30726 no.general 1000 900 y
30727 @end example
30728
30729 Here's a pseudo-BNF definition of this file:
30730
30731 @example
30732 active      = *group-line
30733 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
30734 group       = <non-white-space string>
30735 spc         = " "
30736 high-number = <non-negative integer>
30737 low-number  = <positive integer>
30738 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
30739 @end example
30740
30741 For a full description of this file, see the manual pages for
30742 @samp{innd}, in particular @samp{active(5)}.
30743
30744
30745 @node Newsgroups File Format
30746 @subsubsection Newsgroups File Format
30747
30748 The newsgroups file lists groups along with their descriptions.  Not all
30749 groups on the server have to be listed,  and not all groups in the file
30750 have to exist on the server.  The file is meant purely as information to
30751 the user.
30752
30753 The format is quite simple; a group name, a tab, and the description.
30754 Here's the definition:
30755
30756 @example
30757 newsgroups    = *line
30758 line          = group tab description <NEWLINE>
30759 group         = <non-white-space string>
30760 tab           = <TAB>
30761 description   = <string>
30762 @end example
30763
30764
30765 @page
30766 @node Emacs for Heathens
30767 @section Emacs for Heathens
30768
30769 Believe it or not, but some people who use Gnus haven't really used
30770 Emacs much before they embarked on their journey on the Gnus Love Boat.
30771 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
30772 region'', and ``set @code{gnus-flargblossen} to an alist where the key
30773 is a regexp that is used for matching on the group name'' are magical
30774 phrases with little or no meaning, then this appendix is for you.  If
30775 you are already familiar with Emacs, just ignore this and go fondle your
30776 cat instead.
30777
30778 @menu
30779 * Keystrokes::                  Entering text and executing commands.
30780 * Emacs Lisp::                  The built-in Emacs programming language.
30781 @end menu
30782
30783
30784 @node Keystrokes
30785 @subsection Keystrokes
30786
30787 @itemize @bullet
30788 @item
30789 Q: What is an experienced Emacs user?
30790
30791 @item
30792 A: A person who wishes that the terminal had pedals.
30793 @end itemize
30794
30795 Yes, when you use Emacs, you are apt to use the control key, the shift
30796 key and the meta key a lot.  This is very annoying to some people
30797 (notably @code{vi}le users), and the rest of us just love the hell out
30798 of it.  Just give up and submit.  Emacs really does stand for
30799 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
30800 may have heard from other disreputable sources (like the Emacs author).
30801
30802 The shift keys are normally located near your pinky fingers, and are
30803 normally used to get capital letters and stuff.  You probably use it all
30804 the time.  The control key is normally marked ``CTRL'' or something like
30805 that.  The meta key is, funnily enough, never marked as such on any
30806 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
30807 which is the meta key on this keyboard.  It's usually located somewhere
30808 to the left hand side of the keyboard, usually on the bottom row.
30809
30810 Now, us Emacs people don't say ``press the meta-control-m key'',
30811 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
30812 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
30813 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
30814 down the control key, and hold it down while you press @kbd{k}''.
30815 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
30816 the control key and then press @kbd{k}''.  Simple, ay?
30817
30818 This is somewhat complicated by the fact that not all keyboards have a
30819 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
30820 means ``press escape, release escape, press @kbd{k}''.  That's much more
30821 work than if you have a meta key, so if that's the case, I respectfully
30822 suggest you get a real keyboard with a meta key.  You can't live without
30823 it.
30824
30825
30826
30827 @node Emacs Lisp
30828 @subsection Emacs Lisp
30829
30830 Emacs is the King of Editors because it's really a Lisp interpreter.
30831 Each and every key you tap runs some Emacs Lisp code snippet, and since
30832 Emacs Lisp is an interpreted language, that means that you can configure
30833 any key to run any arbitrary code.  You just, like, do it.
30834
30835 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
30836 functions.  (These are byte-compiled for speed, but it's still
30837 interpreted.)  If you decide that you don't like the way Gnus does
30838 certain things, it's trivial to have it do something a different way.
30839 (Well, at least if you know how to write Lisp code.)  However, that's
30840 beyond the scope of this manual, so we are simply going to talk about
30841 some common constructs that you normally use in your @file{~/.gnus.el}
30842 file to customize Gnus.  (You can also use the @file{~/.emacs} file, but
30843 in order to set things of Gnus up, it is much better to use the
30844 @file{~/.gnus.el} file, @xref{Startup Files}.)
30845
30846 If you want to set the variable @code{gnus-florgbnize} to four (4), you
30847 write the following:
30848
30849 @lisp
30850 (setq gnus-florgbnize 4)
30851 @end lisp
30852
30853 This function (really ``special form'') @code{setq} is the one that can
30854 set a variable to some value.  This is really all you need to know.  Now
30855 you can go and fill your @file{~/.gnus.el} file with lots of these to
30856 change how Gnus works.
30857
30858 If you have put that thing in your @file{~/.gnus.el} file, it will be
30859 read and @code{eval}ed (which is Lisp-ese for ``run'') the next time you
30860 start Gnus.  If you want to change the variable right away, simply say
30861 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
30862 previous ``form'', which is a simple @code{setq} statement here.
30863
30864 Go ahead---just try it, if you're located at your Emacs.  After you
30865 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
30866 is the return value of the form you @code{eval}ed.
30867
30868 Some pitfalls:
30869
30870 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
30871 that means:
30872
30873 @lisp
30874 (setq gnus-read-active-file 'some)
30875 @end lisp
30876
30877 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
30878 @samp{nntp.ifi.uio.no}'', that means:
30879
30880 @lisp
30881 (setq gnus-nntp-server "nntp.ifi.uio.no")
30882 @end lisp
30883
30884 So be careful not to mix up strings (the latter) with symbols (the
30885 former).  The manual is unambiguous, but it can be confusing.
30886
30887 @page
30888 @include gnus-faq.texi
30889
30890 @node GNU Free Documentation License
30891 @chapter GNU Free Documentation License
30892 @include doclicense.texi
30893
30894 @node Index
30895 @chapter Index
30896 @printindex cp
30897
30898 @node Key Index
30899 @chapter Key Index
30900 @printindex ky
30901
30902 @bye
30903
30904 @iftex
30905 @iflatex
30906 \end{document}
30907 @end iflatex
30908 @end iftex
30909
30910 @c Local Variables:
30911 @c mode: texinfo
30912 @c coding: iso-8859-1
30913 @c End: