7e6802de21270a86931acda7a71e11bce98fe237
[gnus] / texi / gnus.texi
1 \input texinfo
2
3 @include gnus-overrides.texi
4
5 @setfilename gnus
6 @settitle Gnus Manual
7 @syncodeindex fn cp
8 @syncodeindex vr cp
9 @syncodeindex pg cp
10
11 @documentencoding UTF-8
12
13 @copying
14 Copyright @copyright{} 1995--2013 Free Software Foundation, Inc.
15
16 @quotation
17 Permission is granted to copy, distribute and/or modify this document
18 under the terms of the GNU Free Documentation License, Version 1.3 or
19 any later version published by the Free Software Foundation; with no
20 Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
21 and with the Back-Cover Texts as in (a) below.  A copy of the license
22 is included in the section entitled ``GNU Free Documentation License''.
23
24 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
25 modify this GNU manual.''
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}{Ma Gnus v0.8}
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 network features
324 @direntry
325 * Gnus: (gnus).                 The newsreader Gnus.
326 @end direntry
327 @iftex
328 @finalout
329 @end iftex
330
331
332 @titlepage
333 @ifset WEBHACKDEVEL
334 @title Gnus Manual (DEVELOPMENT VERSION)
335 @end ifset
336 @ifclear WEBHACKDEVEL
337 @title Gnus Manual
338 @end ifclear
339
340 @author by Lars Magne Ingebrigtsen
341 @page
342 @vskip 0pt plus 1filll
343 @insertcopying
344 @end titlepage
345
346 @summarycontents
347 @contents
348
349 @node Top
350 @top The Gnus Newsreader
351
352 @ifinfo
353
354 You can read news (and mail) from within Emacs by using Gnus.  The news
355 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
356 spool or your mbox file.  All at the same time, if you want to push your
357 luck.
358
359 @c Adjust ../Makefile.in if you change the following line:
360 This manual corresponds to Ma Gnus v0.8
361
362 @ifnottex
363 @insertcopying
364 @end ifnottex
365
366 @end ifinfo
367
368 @iftex
369
370 @iflatex
371 \tableofcontents
372 \gnuscleardoublepage
373 @end iflatex
374
375 Gnus is the advanced, self-documenting, customizable, extensible
376 unreal-time newsreader for GNU Emacs.
377
378 Oops.  That sounds oddly familiar, so let's start over again to avoid
379 being accused of plagiarism:
380
381 Gnus is a message-reading laboratory.  It will let you look at just
382 about anything as if it were a newsgroup.  You can read mail with it,
383 you can browse directories with it, you can @code{ftp} with it---you
384 can even read news with it!
385
386 Gnus tries to empower people who read news the same way Emacs empowers
387 people who edit text.  Gnus sets no limits to what the user should be
388 allowed to do.  Users are encouraged to extend Gnus to make it behave
389 like they want it to behave.  A program should not control people;
390 people should be empowered to do what they want by using (or abusing)
391 the program.
392
393 @c Adjust ../Makefile.in if you change the following line:
394 This manual corresponds to Ma Gnus v0.8
395
396 @heading Other related manuals
397 @itemize
398 @item Message manual: Composing messages
399 @item Emacs-MIME:     Composing messages; @acronym{MIME}-specific parts.
400 @item Sieve:          Managing Sieve scripts in Emacs.
401 @item EasyPG:         @acronym{PGP/MIME} with Gnus.
402 @item SASL:           @acronym{SASL} authentication in Emacs.
403 @end itemize
404
405 @end iftex
406
407 @menu
408 * Starting Up::              Finding news can be a pain.
409 * Group Buffer::             Selecting, subscribing and killing groups.
410 * Summary Buffer::           Reading, saving and posting articles.
411 * Article Buffer::           Displaying and handling articles.
412 * Composing Messages::       Information on sending mail and news.
413 * Select Methods::           Gnus reads all messages from various select methods.
414 * Scoring::                  Assigning values to articles.
415 * Searching::                Mail and News search engines.
416 * Various::                  General purpose settings.
417 * The End::                  Farewell and goodbye.
418 * Appendices::               Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
419 * GNU Free Documentation License:: The license for this documentation.
420 * Index::                    Variable, function and concept index.
421 * Key Index::                Key Index.
422
423 @c Doesn't work right in html.
424 @c FIXME Do this in a more standard way.
425 @ifinfo
426 Other related manuals
427
428 * Message:(message).         Composing messages.
429 * Emacs-MIME:(emacs-mime).   Composing messages; @acronym{MIME}-specific parts.
430 * Sieve:(sieve).             Managing Sieve scripts in Emacs.
431 * EasyPG:(epa).              @acronym{PGP/MIME} with Gnus.
432 * SASL:(sasl).               @acronym{SASL} authentication in Emacs.
433 @end ifinfo
434
435 @detailmenu
436  --- The Detailed Node Listing ---
437
438 Starting Gnus
439
440 * Finding the News::            Choosing a method for getting news.
441 * The Server is Down::          How can I read my mail then?
442 * Slave Gnusae::                You can have more than one Gnus active at a time.
443 * Fetching a Group::            Starting Gnus just to read a group.
444 * New Groups::                  What is Gnus supposed to do with new groups?
445 * Changing Servers::            You may want to move from one server to another.
446 * Startup Files::               Those pesky startup files---@file{.newsrc}.
447 * Auto Save::                   Recovering from a crash.
448 * The Active File::             Reading the active file over a slow line Takes Time.
449 * Startup Variables::           Other variables you might change.
450
451 New Groups
452
453 * Checking New Groups::         Determining what groups are new.
454 * Subscription Methods::        What Gnus should do with new groups.
455 * Filtering New Groups::        Making Gnus ignore certain new groups.
456
457 Group Buffer
458
459 * Group Buffer Format::         Information listed and how you can change it.
460 * Group Maneuvering::           Commands for moving in the group buffer.
461 * Selecting a Group::           Actually reading news.
462 * Subscription Commands::       Unsubscribing, killing, subscribing.
463 * Group Data::                  Changing the info for a group.
464 * Group Levels::                Levels? What are those, then?
465 * Group Score::                 A mechanism for finding out what groups you like.
466 * Marking Groups::              You can mark groups for later processing.
467 * Foreign Groups::              Creating and editing groups.
468 * Group Parameters::            Each group may have different parameters set.
469 * Listing Groups::              Gnus can list various subsets of the groups.
470 * Sorting Groups::              Re-arrange the group order.
471 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
472 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
473 * Exiting Gnus::                Stop reading news and get some work done.
474 * Group Topics::                A folding group mode divided into topics.
475 * Non-ASCII Group Names::       Accessing groups of non-English names.
476 * Misc Group Stuff::            Other stuff that you can to do.
477
478 Group Buffer Format
479
480 * Group Line Specification::    Deciding how the group buffer is to look.
481 * Group Mode Line Specification::  The group buffer mode line.
482 * Group Highlighting::          Having nice colors in the group buffer.
483
484 Group Topics
485
486 * Topic Commands::              Interactive E-Z commands.
487 * Topic Variables::             How to customize the topics the Lisp Way.
488 * Topic Sorting::               Sorting each topic individually.
489 * Topic Topology::              A map of the world.
490 * Topic Parameters::            Parameters that apply to all groups in a topic.
491
492 Misc Group Stuff
493
494 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
495 * Group Information::           Information and help on groups and Gnus.
496 * Group Timestamp::             Making Gnus keep track of when you last read a group.
497 * File Commands::               Reading and writing the Gnus files.
498 * Sieve Commands::              Managing Sieve scripts.
499
500 Summary Buffer
501
502 * Summary Buffer Format::       Deciding how the summary buffer is to look.
503 * Summary Maneuvering::         Moving around the summary buffer.
504 * Choosing Articles::           Reading articles.
505 * Paging the Article::          Scrolling the current article.
506 * Reply Followup and Post::     Posting articles.
507 * Delayed Articles::            Send articles at a later time.
508 * Marking Articles::            Marking articles as read, expirable, etc.
509 * Limiting::                    You can limit the summary buffer.
510 * Threading::                   How threads are made.
511 * Sorting the Summary Buffer::  How articles and threads are sorted.
512 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
513 * Article Caching::             You may store articles in a cache.
514 * Persistent Articles::         Making articles expiry-resistant.
515 * Sticky Articles::             Article buffers that are not reused.
516 * Article Backlog::             Having already read articles hang around.
517 * Saving Articles::             Ways of customizing article saving.
518 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
519 * Article Treatment::           The article buffer can be mangled at will.
520 * MIME Commands::               Doing MIMEy things with the articles.
521 * Charsets::                    Character set issues.
522 * Article Commands::            Doing various things with the article buffer.
523 * Summary Sorting::             Sorting the summary buffer in various ways.
524 * Finding the Parent::          No child support? Get the parent.
525 * Alternative Approaches::      Reading using non-default summaries.
526 * Tree Display::                A more visual display of threads.
527 * Mail Group Commands::         Some commands can only be used in mail groups.
528 * Various Summary Stuff::       What didn't fit anywhere else.
529 * Exiting the Summary Buffer::  Returning to the Group buffer,
530                                 or reselecting the current group.
531 * Crosspost Handling::          How crossposted articles are dealt with.
532 * Duplicate Suppression::       An alternative when crosspost handling fails.
533 * Security::                    Decrypt and Verify.
534 * Mailing List::                Mailing list minor mode.
535
536 Summary Buffer Format
537
538 * Summary Buffer Lines::        You can specify how summary lines should look.
539 * To From Newsgroups::          How to not display your own name.
540 * Summary Buffer Mode Line::    You can say how the mode line should look.
541 * Summary Highlighting::        Making the summary buffer all pretty and nice.
542
543 Choosing Articles
544
545 * Choosing Commands::           Commands for choosing articles.
546 * Choosing Variables::          Variables that influence these commands.
547
548 Reply, Followup and Post
549
550 * Summary Mail Commands::       Sending mail.
551 * Summary Post Commands::       Sending news.
552 * Summary Message Commands::    Other Message-related commands.
553 * Canceling and Superseding::
554
555 Marking Articles
556
557 * Unread Articles::             Marks for unread articles.
558 * Read Articles::               Marks for read articles.
559 * Other Marks::                 Marks that do not affect readedness.
560 * Setting Marks::               How to set and remove marks.
561 * Generic Marking Commands::    How to customize the marking.
562 * Setting Process Marks::       How to mark articles for later processing.
563
564 Threading
565
566 * Customizing Threading::       Variables you can change to affect the threading.
567 * Thread Commands::             Thread based commands in the summary buffer.
568
569 Customizing Threading
570
571 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
572 * Filling In Threads::          Making the threads displayed look fuller.
573 * More Threading::              Even more variables for fiddling with threads.
574 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
575
576 Decoding Articles
577
578 * Uuencoded Articles::          Uudecode articles.
579 * Shell Archives::              Unshar articles.
580 * PostScript Files::            Split PostScript.
581 * Other Files::                 Plain save and binhex.
582 * Decoding Variables::          Variables for a happy decoding.
583 * Viewing Files::               You want to look at the result of the decoding?
584
585 Decoding Variables
586
587 * Rule Variables::              Variables that say how a file is to be viewed.
588 * Other Decode Variables::      Other decode variables.
589 * Uuencoding and Posting::      Variables for customizing uuencoding.
590
591 Article Treatment
592
593 * Article Highlighting::        You want to make the article look like fruit salad.
594 * Article Fontisizing::         Making emphasized text look nice.
595 * Article Hiding::              You also want to make certain info go away.
596 * Article Washing::             Lots of way-neat functions to make life better.
597 * Article Header::              Doing various header transformations.
598 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
599 * Article Button Levels::       Controlling appearance of buttons.
600 * Article Date::                Grumble, UT!
601 * Article Display::             Display various stuff---X-Face, Picons, Smileys, Gravatars
602 * Article Signature::           What is a signature?
603 * Article Miscellanea::         Various other stuff.
604
605 Alternative Approaches
606
607 * Pick and Read::               First mark articles and then read them.
608 * Binary Groups::               Auto-decode all articles.
609
610 Various Summary Stuff
611
612 * Summary Group Information::   Information oriented commands.
613 * Searching for Articles::      Multiple article commands.
614 * Summary Generation Commands::
615 * Really Various Summary Commands::  Those pesky non-conformant commands.
616
617 Article Buffer
618
619 * Hiding Headers::              Deciding what headers should be displayed.
620 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
621 * Customizing Articles::        Tailoring the look of the articles.
622 * Article Keymap::              Keystrokes available in the article buffer.
623 * Misc Article::                Other stuff.
624
625 Composing Messages
626
627 * Mail::                        Mailing and replying.
628 * Posting Server::              What server should you post and mail via?
629 * POP before SMTP::             You cannot send a mail unless you read a mail.
630 * Mail and Post::               Mailing and posting at the same time.
631 * Archived Messages::           Where Gnus stores the messages you've sent.
632 * Posting Styles::              An easier way to specify who you are.
633 * Drafts::                      Postponing messages and rejected messages.
634 * Rejected Articles::           What happens if the server doesn't like your article?
635 * Signing and encrypting::      How to compose secure messages.
636
637 Select Methods
638
639 * Server Buffer::               Making and editing virtual servers.
640 * Getting News::                Reading USENET news with Gnus.
641 * Using IMAP::                  Reading mail from @acronym{IMAP}.
642 * Getting Mail::                Reading your personal mail with Gnus.
643 * Browsing the Web::            Getting messages from a plethora of Web sources.
644 * Other Sources::               Reading directories, files.
645 * Combined Groups::             Combining groups into one group.
646 * Email Based Diary::           Using mails to manage diary events in Gnus.
647 * Gnus Unplugged::              Reading news and mail offline.
648
649 Server Buffer
650
651 * Server Buffer Format::        You can customize the look of this buffer.
652 * Server Commands::             Commands to manipulate servers.
653 * Example Methods::             Examples server specifications.
654 * Creating a Virtual Server::   An example session.
655 * Server Variables::            Which variables to set.
656 * Servers and Methods::         You can use server names as select methods.
657 * Unavailable Servers::         Some servers you try to contact may be down.
658
659 Getting News
660
661 * NNTP::                        Reading news from an @acronym{NNTP} server.
662 * News Spool::                  Reading news from the local spool.
663
664 @acronym{NNTP}
665
666 * Direct Functions::            Connecting directly to the server.
667 * Indirect Functions::          Connecting indirectly to the server.
668 * Common Variables::            Understood by several connection functions.
669
670 Getting Mail
671
672 * Mail in a Newsreader::        Important introductory notes.
673 * Getting Started Reading Mail::  A simple cookbook example.
674 * Splitting Mail::              How to create mail groups.
675 * Mail Sources::                How to tell Gnus where to get mail from.
676 * Mail Back End Variables::     Variables for customizing mail handling.
677 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
678 * Group Mail Splitting::        Use group customize to drive mail splitting.
679 * Incorporating Old Mail::      What about the old mail you have?
680 * Expiring Mail::               Getting rid of unwanted mail.
681 * Washing Mail::                Removing cruft from the mail you get.
682 * Duplicates::                  Dealing with duplicated mail.
683 * Not Reading Mail::            Using mail back ends for reading other files.
684 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
685
686 Mail Sources
687
688 * Mail Source Specifiers::      How to specify what a mail source is.
689 * Mail Source Customization::   Some variables that influence things.
690 * Fetching Mail::               Using the mail source specifiers.
691
692 Choosing a Mail Back End
693
694 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
695 * Babyl::                       Babyl was used by older versions of Rmail.
696 * Mail Spool::                  Store your mail in a private spool?
697 * MH Spool::                    An mhspool-like back end.
698 * Maildir::                     Another one-file-per-message format.
699 * Mail Folders::                Having one file for each group.
700 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
701
702 Browsing the Web
703
704 * Archiving Mail::
705 * Web Searches::                Creating groups from articles that match a string.
706 * RSS::                         Reading RDF site summary.
707 * Customizing W3::              Doing stuff to Emacs/W3 from Gnus.
708
709 Other Sources
710
711 * Directory Groups::            You can read a directory as if it was a newsgroup.
712 * Anything Groups::             Dired?  Who needs dired?
713 * Document Groups::             Single files can be the basis of a group.
714 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
715 * The Empty Backend::           The backend that never has any news.
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 Searching
799
800 * nnir::                        Searching with various engines.
801 * nnmairix::                    Searching with Mairix.
802
803 nnir
804
805 * What is nnir?::               What does nnir do.
806 * Basic Usage::                 How to perform simple searches.
807 * Setting up nnir::             How to set up nnir.
808
809 Setting up nnir
810
811 * Associating Engines::         How to associate engines.
812
813 Various
814
815 * Process/Prefix::              A convention used by many treatment commands.
816 * Interactive::                 Making Gnus ask you many questions.
817 * Symbolic Prefixes::           How to supply some Gnus functions with options.
818 * Formatting Variables::        You can specify what buffers should look like.
819 * Window Layout::               Configuring the Gnus buffer windows.
820 * Faces and Fonts::             How to change how faces look.
821 * Mode Lines::                  Displaying information in the mode lines.
822 * Highlighting and Menus::      Making buffers look all nice and cozy.
823 * Daemons::                     Gnus can do things behind your back.
824 * Undo::                        Some actions can be undone.
825 * Predicate Specifiers::        Specifying predicates.
826 * Moderation::                  What to do if you're a moderator.
827 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
828 * Fuzzy Matching::              What's the big fuzz?
829 * Thwarting Email Spam::        Simple ways to avoid unsolicited commercial email.
830 * Spam Package::                A package for filtering and processing spam.
831 * The Gnus Registry::           A package for tracking messages by Message-ID.
832 * Other modes::                 Interaction with other modes.
833 * Various Various::             Things that are really various.
834
835 Formatting Variables
836
837 * Formatting Basics::           A formatting variable is basically a format string.
838 * Mode Line Formatting::        Some rules about mode line formatting variables.
839 * Advanced Formatting::         Modifying output in various ways.
840 * User-Defined Specs::          Having Gnus call your own functions.
841 * Formatting Fonts::            Making the formatting look colorful and nice.
842 * Positioning Point::           Moving point to a position after an operation.
843 * Tabulation::                  Tabulating your output.
844 * Wide Characters::             Dealing with wide characters.
845
846 Image Enhancements
847
848 * X-Face::                      Display a funky, teensy black-and-white image.
849 * Face::                        Display a funkier, teensier colored image.
850 * Smileys::                     Show all those happy faces the way they were
851                                   meant to be shown.
852 * Picons::                      How to display pictures of what you're reading.
853 * Gravatars::                   Display the avatar of people you read.
854 * XVarious::                    Other XEmacsy Gnusey variables.
855
856 Thwarting Email Spam
857
858 * The problem of spam::         Some background, and some solutions
859 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
860 * SpamAssassin::                How to use external anti-spam tools.
861 * Hashcash::                    Reduce spam by burning CPU time.
862
863 Spam Package
864
865 * Spam Package Introduction::
866 * Filtering Incoming Mail::
867 * Detecting Spam in Groups::
868 * Spam and Ham Processors::
869 * Spam Package Configuration Examples::
870 * Spam Back Ends::
871 * Extending the Spam package::
872 * Spam Statistics Package::
873
874 Spam Statistics Package
875
876 * Creating a spam-stat dictionary::
877 * Splitting mail using spam-stat::
878 * Low-level interface to the spam-stat dictionary::
879
880 Appendices
881
882 * XEmacs::                      Requirements for installing under XEmacs.
883 * History::                     How Gnus got where it is today.
884 * On Writing Manuals::          Why this is not a beginner's guide.
885 * Terminology::                 We use really difficult, like, words here.
886 * Customization::               Tailoring Gnus to your needs.
887 * Troubleshooting::             What you might try if things do not work.
888 * Gnus Reference Guide::        Rilly, rilly technical stuff.
889 * Emacs for Heathens::          A short introduction to Emacsian terms.
890 * Frequently Asked Questions::  The Gnus FAQ
891
892 History
893
894 * Gnus Versions::               What Gnus versions have been released.
895 * Why?::                        What's the point of Gnus?
896 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
897 * Conformity::                  Gnus tries to conform to all standards.
898 * Emacsen::                     Gnus can be run on a few modern Emacsen.
899 * Gnus Development::            How Gnus is developed.
900 * Contributors::                Oodles of people.
901 * New Features::                Pointers to some of the new stuff in Gnus.
902
903 New Features
904
905 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
906 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
907 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
908 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
909 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
910 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10/5.11.
911 * No Gnus::                     Very punny.  Gnus 5.12/5.13
912 * Ma Gnus::                     Celebrating 25 years of Gnus.
913
914 Customization
915
916 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
917 * Slow Terminal Connection::    You run a remote Emacs.
918 * Little Disk Space::           You feel that having large setup files is icky.
919 * Slow Machine::                You feel like buying a faster machine.
920
921 Gnus Reference Guide
922
923 * Gnus Utility Functions::      Common functions and variable to use.
924 * Back End Interface::          How Gnus communicates with the servers.
925 * Score File Syntax::           A BNF definition of the score file standard.
926 * Headers::                     How Gnus stores headers internally.
927 * Ranges::                      A handy format for storing mucho numbers.
928 * Group Info::                  The group info format.
929 * Extended Interactive::        Symbolic prefixes and stuff.
930 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
931 * Various File Formats::        Formats of files that Gnus use.
932
933 Back End Interface
934
935 * Required Back End Functions::  Functions that must be implemented.
936 * Optional Back End Functions::  Functions that need not be implemented.
937 * Error Messaging::             How to get messages and report errors.
938 * Writing New Back Ends::       Extending old back ends.
939 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
940 * Mail-like Back Ends::         Some tips on mail back ends.
941
942 Various File Formats
943
944 * Active File Format::          Information on articles and groups available.
945 * Newsgroups File Format::      Group descriptions.
946
947 Emacs for Heathens
948
949 * Keystrokes::                  Entering text and executing commands.
950 * Emacs Lisp::                  The built-in Emacs programming language.
951
952 @end detailmenu
953 @end menu
954
955 @node Starting Up
956 @chapter Starting Gnus
957 @cindex starting up
958
959 If you haven't used Emacs much before using Gnus, read @ref{Emacs for
960 Heathens} first.
961
962 @kindex M-x gnus
963 @findex gnus
964 If your system administrator has set things up properly, starting Gnus
965 and reading news is extremely easy---you just type @kbd{M-x gnus} in
966 your Emacs.  If not, you should customize the variable
967 @code{gnus-select-method} as described in @ref{Finding the News}.  For a
968 minimal setup for posting should also customize the variables
969 @code{user-full-name} and @code{user-mail-address}.
970
971 @findex gnus-other-frame
972 @kindex M-x gnus-other-frame
973 If you want to start Gnus in a different frame, you can use the command
974 @kbd{M-x gnus-other-frame} instead.
975
976 If things do not go smoothly at startup, you have to twiddle some
977 variables in your @file{~/.gnus.el} file.  This file is similar to
978 @file{~/.emacs}, but is read when Gnus starts.
979
980 If you puzzle at any terms used in this manual, please refer to the
981 terminology section (@pxref{Terminology}).
982
983 @menu
984 * Finding the News::      Choosing a method for getting news.
985 * The Server is Down::    How can I read my mail then?
986 * Slave Gnusae::          You can have more than one Gnus active at a time.
987 * New Groups::            What is Gnus supposed to do with new groups?
988 * Changing Servers::      You may want to move from one server to another.
989 * Startup Files::         Those pesky startup files---@file{.newsrc}.
990 * Auto Save::             Recovering from a crash.
991 * The Active File::       Reading the active file over a slow line Takes Time.
992 * Startup Variables::     Other variables you might change.
993 @end menu
994
995
996 @node Finding the News
997 @section Finding the News
998 @cindex finding news
999
1000 First of all, you should know that there is a special buffer called
1001 @code{*Server*} that lists all the servers Gnus knows about.  You can
1002 press @kbd{^} from the Group buffer to see it.  In the Server buffer,
1003 you can press @kbd{RET} on a defined server to see all the groups it
1004 serves (subscribed or not!).  You can also add or delete servers, edit
1005 a foreign server's definition, agentize or de-agentize a server, and
1006 do many other neat things.  @xref{Server Buffer}.
1007 @xref{Foreign Groups}.  @xref{Agent Basics}.
1008
1009 @vindex gnus-select-method
1010 @c @head
1011 The @code{gnus-select-method} variable says where Gnus should look for
1012 news.  This variable should be a list where the first element says
1013 @dfn{how} and the second element says @dfn{where}.  This method is your
1014 native method.  All groups not fetched with this method are
1015 secondary or foreign groups.
1016
1017 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
1018 you want to get your daily dosage of news from, you'd say:
1019
1020 @lisp
1021 (setq gnus-select-method '(nntp "news.somewhere.edu"))
1022 @end lisp
1023
1024 If you want to read directly from the local spool, say:
1025
1026 @lisp
1027 (setq gnus-select-method '(nnspool ""))
1028 @end lisp
1029
1030 If you can use a local spool, you probably should, as it will almost
1031 certainly be much faster.  But do not use the local spool if your
1032 server is running Leafnode (which is a simple, standalone private news
1033 server); in this case, use @code{(nntp "localhost")}.
1034
1035 @vindex gnus-nntpserver-file
1036 @cindex NNTPSERVER
1037 @cindex @acronym{NNTP} server
1038 If this variable is not set, Gnus will take a look at the
1039 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1040 Gnus will see whether @code{gnus-nntpserver-file}
1041 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1042 If that fails as well, Gnus will try to use the machine running Emacs
1043 as an @acronym{NNTP} server.  That's a long shot, though.
1044
1045 @findex gnus-group-browse-foreign-server
1046 @kindex B (Group)
1047 However, if you use one @acronym{NNTP} server regularly and are just
1048 interested in a couple of groups from a different server, you would be
1049 better served by using the @kbd{B} command in the group buffer.  It will
1050 let you have a look at what groups are available, and you can subscribe
1051 to any of the groups you want to.  This also makes @file{.newsrc}
1052 maintenance much tidier.  @xref{Foreign Groups}.
1053
1054 @vindex gnus-secondary-select-methods
1055 @c @head
1056 A slightly different approach to foreign groups is to set the
1057 @code{gnus-secondary-select-methods} variable.  The select methods
1058 listed in this variable are in many ways just as native as the
1059 @code{gnus-select-method} server.  They will also be queried for active
1060 files during startup (if that's required), and new newsgroups that
1061 appear on these servers will be subscribed (or not) just as native
1062 groups are.
1063
1064 For instance, if you use the @code{nnmbox} back end to read your mail,
1065 you would typically set this variable to
1066
1067 @lisp
1068 (setq gnus-secondary-select-methods '((nnmbox "")))
1069 @end lisp
1070
1071
1072
1073 @node The Server is Down
1074 @section The Server is Down
1075 @cindex server errors
1076
1077 If the default server is down, Gnus will understandably have some
1078 problems starting.  However, if you have some mail groups in addition to
1079 the news groups, you may want to start Gnus anyway.
1080
1081 Gnus, being the trusting sort of program, will ask whether to proceed
1082 without a native select method if that server can't be contacted.  This
1083 will happen whether the server doesn't actually exist (i.e., you have
1084 given the wrong address) or the server has just momentarily taken ill
1085 for some reason or other.  If you decide to continue and have no foreign
1086 groups, you'll find it difficult to actually do anything in the group
1087 buffer.  But, hey, that's your problem.  Blllrph!
1088
1089 @findex gnus-no-server
1090 @kindex M-x gnus-no-server
1091 @c @head
1092 If you know that the server is definitely down, or you just want to read
1093 your mail without bothering with the server at all, you can use the
1094 @code{gnus-no-server} command to start Gnus.  That might come in handy
1095 if you're in a hurry as well.  This command will not attempt to contact
1096 your primary server---instead, it will just activate all groups on level
1097 1 and 2.  (You should preferably keep no native groups on those two
1098 levels.) Also @pxref{Group Levels}.
1099
1100
1101 @node Slave Gnusae
1102 @section Slave Gnusae
1103 @cindex slave
1104
1105 You might want to run more than one Emacs with more than one Gnus at the
1106 same time.  If you are using different @file{.newsrc} files (e.g., if you
1107 are using the two different Gnusae to read from two different servers),
1108 that is no problem whatsoever.  You just do it.
1109
1110 The problem appears when you want to run two Gnusae that use the same
1111 @file{.newsrc} file.
1112
1113 To work around that problem some, we here at the Think-Tank at the Gnus
1114 Towers have come up with a new concept: @dfn{Masters} and
1115 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1116 taken out a copyright on those words.  If you wish to use those words in
1117 conjunction with each other, you have to send $1 per usage instance to
1118 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1119 Applications}) will be much more expensive, of course.)
1120
1121 @findex gnus-slave
1122 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1123 however you do it).  Each subsequent slave Gnusae should be started with
1124 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1125 files, but instead save @dfn{slave files} that contain information only
1126 on what groups have been read in the slave session.  When a master Gnus
1127 starts, it will read (and delete) these slave files, incorporating all
1128 information from them.  (The slave files will be read in the sequence
1129 they were created, so the latest changes will have precedence.)
1130
1131 Information from the slave files has, of course, precedence over the
1132 information in the normal (i.e., master) @file{.newsrc} file.
1133
1134 If the @file{.newsrc*} files have not been saved in the master when the
1135 slave starts, you may be prompted as to whether to read an auto-save
1136 file.  If you answer ``yes'', the unsaved changes to the master will be
1137 incorporated into the slave.  If you answer ``no'', the slave may see some
1138 messages as unread that have been read in the master.
1139
1140
1141
1142 @node New Groups
1143 @section New Groups
1144 @cindex new groups
1145 @cindex subscription
1146
1147 @vindex gnus-check-new-newsgroups
1148 If you are satisfied that you really never want to see any new groups,
1149 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1150 also save you some time at startup.  Even if this variable is
1151 @code{nil}, you can always subscribe to the new groups just by pressing
1152 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1153 is @code{ask-server} by default.  If you set this variable to
1154 @code{always}, then Gnus will query the back ends for new groups even
1155 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1156
1157 @menu
1158 * Checking New Groups::         Determining what groups are new.
1159 * Subscription Methods::        What Gnus should do with new groups.
1160 * Filtering New Groups::        Making Gnus ignore certain new groups.
1161 @end menu
1162
1163
1164 @node Checking New Groups
1165 @subsection Checking New Groups
1166
1167 Gnus normally determines whether a group is new or not by comparing
1168 the list of groups from the active file(s) with the lists of
1169 subscribed and dead groups.  This isn't a particularly fast method.
1170 If @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will
1171 ask the server for new groups since the last time.  This is both
1172 faster and cheaper.  This also means that you can get rid of the list
1173 of killed groups (@pxref{Group Levels}) altogether, so you may set
1174 @code{gnus-save-killed-list} to @code{nil}, which will save time both
1175 at startup, at exit, and all over.  Saves disk space, too.  Why isn't
1176 this the default, then?  Unfortunately, not all servers support this
1177 command.
1178
1179 I bet I know what you're thinking now: How do I find out whether my
1180 server supports @code{ask-server}?  No?  Good, because I don't have a
1181 fail-safe answer.  I would suggest just setting this variable to
1182 @code{ask-server} and see whether any new groups appear within the next
1183 few days.  If any do, then it works.  If none do, then it doesn't
1184 work.  I could write a function to make Gnus guess whether the server
1185 supports @code{ask-server}, but it would just be a guess.  So I won't.
1186 You could @code{telnet} to the server and say @code{HELP} and see
1187 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1188 it does, then it might work.  (But there are servers that lists
1189 @samp{NEWGROUPS} without supporting the function properly.)
1190
1191 This variable can also be a list of select methods.  If so, Gnus will
1192 issue an @code{ask-server} command to each of the select methods, and
1193 subscribe them (or not) using the normal methods.  This might be handy
1194 if you are monitoring a few servers for new groups.  A side effect is
1195 that startup will take much longer, so you can meditate while waiting.
1196 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1197
1198
1199 @node Subscription Methods
1200 @subsection Subscription Methods
1201
1202 @vindex gnus-subscribe-newsgroup-method
1203 What Gnus does when it encounters a new group is determined by the
1204 @code{gnus-subscribe-newsgroup-method} variable.
1205
1206 This variable should contain a function.  This function will be called
1207 with the name of the new group as the only parameter.
1208
1209 Some handy pre-fab functions are:
1210
1211 @table @code
1212
1213 @item gnus-subscribe-zombies
1214 @vindex gnus-subscribe-zombies
1215 Make all new groups zombies (@pxref{Group Levels}).  This is the
1216 default.  You can browse the zombies later (with @kbd{A z}) and either
1217 kill them all off properly (with @kbd{S z}), or subscribe to them
1218 (with @kbd{u}).
1219
1220 @item gnus-subscribe-randomly
1221 @vindex gnus-subscribe-randomly
1222 Subscribe all new groups in arbitrary order.  This really means that all
1223 new groups will be added at ``the top'' of the group buffer.
1224
1225 @item gnus-subscribe-alphabetically
1226 @vindex gnus-subscribe-alphabetically
1227 Subscribe all new groups in alphabetical order.
1228
1229 @item gnus-subscribe-hierarchically
1230 @vindex gnus-subscribe-hierarchically
1231 Subscribe all new groups hierarchically.  The difference between this
1232 function and @code{gnus-subscribe-alphabetically} is slight.
1233 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1234 alphabetical fashion, while this function will enter groups into its
1235 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1236 @samp{comp} hierarchy, this function will not mess that configuration
1237 up.  Or something like that.
1238
1239 @item gnus-subscribe-interactively
1240 @vindex gnus-subscribe-interactively
1241 Subscribe new groups interactively.  This means that Gnus will ask
1242 you about @strong{all} new groups.  The groups you choose to subscribe
1243 to will be subscribed hierarchically.
1244
1245 @item gnus-subscribe-killed
1246 @vindex gnus-subscribe-killed
1247 Kill all new groups.
1248
1249 @item gnus-subscribe-topics
1250 @vindex gnus-subscribe-topics
1251 Put the groups into the topic that has a matching @code{subscribe} topic
1252 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1253 topic parameter that looks like
1254
1255 @example
1256 "nnml"
1257 @end example
1258
1259 will mean that all groups that match that regex will be subscribed under
1260 that topic.
1261
1262 If no topics match the groups, the groups will be subscribed in the
1263 top-level topic.
1264
1265 @end table
1266
1267 @vindex gnus-subscribe-hierarchical-interactive
1268 A closely related variable is
1269 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1270 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1271 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1272 will ask you for each sub-hierarchy whether you want to descend the
1273 hierarchy or not.
1274
1275 One common mistake is to set the variable a few paragraphs above
1276 (@code{gnus-subscribe-newsgroup-method}) to
1277 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1278 will not work.  This is ga-ga.  So don't do it.
1279
1280
1281 @node Filtering New Groups
1282 @subsection Filtering New Groups
1283
1284 A nice and portable way to control which new newsgroups should be
1285 subscribed (or ignored) is to put an @dfn{options} line at the start of
1286 the @file{.newsrc} file.  Here's an example:
1287
1288 @example
1289 options -n !alt.all !rec.all sci.all
1290 @end example
1291
1292 @vindex gnus-subscribe-options-newsgroup-method
1293 This line obviously belongs to a serious-minded intellectual scientific
1294 person (or she may just be plain old boring), because it says that all
1295 groups that have names beginning with @samp{alt} and @samp{rec} should
1296 be ignored, and all groups with names beginning with @samp{sci} should
1297 be subscribed.  Gnus will not use the normal subscription method for
1298 subscribing these groups.
1299 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1300 variable defaults to @code{gnus-subscribe-alphabetically}.
1301
1302 The ``options -n'' format is very simplistic.  The syntax above is all
1303 that is supports: you can force-subscribe hierarchies, or you can
1304 deny hierarchies, and that's it.
1305
1306 @vindex gnus-options-not-subscribe
1307 @vindex gnus-options-subscribe
1308 If you don't want to mess with your @file{.newsrc} file, you can just
1309 set the two variables @code{gnus-options-subscribe} and
1310 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1311 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1312 and if the new group matches the former, it will be unconditionally
1313 subscribed, and if it matches the latter, it will be ignored.
1314
1315 @vindex gnus-auto-subscribed-groups
1316 Yet another variable that meddles here is
1317 @code{gnus-auto-subscribed-groups}.  It works exactly like
1318 @code{gnus-options-subscribe}, and is therefore really superfluous,
1319 but I thought it would be nice to have two of these.  This variable is
1320 more meant for setting some ground rules, while the other variable is
1321 used more for user fiddling.  By default this variable makes all new
1322 groups that come from mail back ends (@code{nnml}, @code{nnbabyl},
1323 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, @code{nnimap}, and
1324 @code{nnmaildir}) subscribed.  If you don't like that, just set this
1325 variable to @code{nil}.
1326
1327 @vindex gnus-auto-subscribed-categories
1328 As if that wasn't enough, @code{gnus-auto-subscribed-categories} also
1329 allows you to specify that new groups should be subscribed based on the
1330 category their select methods belong to.  The default is @samp{(mail
1331 post-mail)}, meaning that all new groups from mail-like backends
1332 should be subscribed automatically.
1333
1334 New groups that match these variables are subscribed using
1335 @code{gnus-subscribe-options-newsgroup-method}.
1336
1337
1338 @node Changing Servers
1339 @section Changing Servers
1340 @cindex changing servers
1341
1342 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1343 This happens very rarely, but perhaps you change jobs, or one server is
1344 very flaky and you want to use another.
1345
1346 Changing the server is pretty easy, right?  You just change
1347 @code{gnus-select-method} to point to the new server?
1348
1349 @emph{Wrong!}
1350
1351 Article numbers are not (in any way) kept synchronized between different
1352 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1353 you have read is by keeping track of article numbers.  So when you
1354 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1355 worthless.
1356
1357 @kindex M-x gnus-group-clear-data-on-native-groups
1358 @findex gnus-group-clear-data-on-native-groups
1359 You can use the @kbd{M-x gnus-group-clear-data-on-native-groups}
1360 command to clear out all data that you have on your native groups.
1361 Use with caution.
1362
1363 @kindex M-x gnus-group-clear-data
1364 @findex gnus-group-clear-data
1365 Clear the data from the current group only---nix out marks and the
1366 list of read articles (@code{gnus-group-clear-data}).
1367
1368 After changing servers, you @strong{must} move the cache hierarchy away,
1369 since the cached articles will have wrong article numbers, which will
1370 affect which articles Gnus thinks are read.
1371 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1372 to have it done automatically; for @code{gnus-group-clear-data}, you
1373 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1374 cache for all groups).
1375
1376
1377 @node Startup Files
1378 @section Startup Files
1379 @cindex startup files
1380 @cindex .newsrc
1381 @cindex .newsrc.el
1382 @cindex .newsrc.eld
1383
1384 Most common Unix news readers use a shared startup file called
1385 @file{.newsrc}.  This file contains all the information about what
1386 groups are subscribed, and which articles in these groups have been
1387 read.
1388
1389 Things got a bit more complicated with @sc{gnus}.  In addition to
1390 keeping the @file{.newsrc} file updated, it also used a file called
1391 @file{.newsrc.el} for storing all the information that didn't fit into
1392 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1393 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1394 files was the most recently saved, which enabled people to swap between
1395 @sc{gnus} and other newsreaders.
1396
1397 That was kinda silly, so Gnus went one better: In addition to the
1398 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1399 @file{.newsrc.eld}.  It will read whichever of these files that are most
1400 recent, but it will never write a @file{.newsrc.el} file.  You should
1401 never delete the @file{.newsrc.eld} file---it contains much information
1402 not stored in the @file{.newsrc} file.
1403
1404 @vindex gnus-save-newsrc-file
1405 @vindex gnus-read-newsrc-file
1406 You can turn off writing the @file{.newsrc} file by setting
1407 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1408 the file and save some space, as well as exiting from Gnus faster.
1409 However, this will make it impossible to use other newsreaders than
1410 Gnus.  But hey, who would want to, right?  Similarly, setting
1411 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1412 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which can be
1413 convenient if you use a different news reader occasionally, and you
1414 want to read a different subset of the available groups with that
1415 news reader.
1416
1417 @vindex gnus-save-killed-list
1418 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1419 will not save the list of killed groups to the startup file.  This will
1420 save both time (when starting and quitting) and space (on disk).  It
1421 will also mean that Gnus has no record of what groups are new or old,
1422 so the automatic new groups subscription methods become meaningless.
1423 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1424 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1425 Groups}).  This variable can also be a regular expression.  If that's
1426 the case, remove all groups that do not match this regexp before
1427 saving.  This can be useful in certain obscure situations that involve
1428 several servers where not all servers support @code{ask-server}.
1429
1430 @vindex gnus-startup-file
1431 @vindex gnus-backup-startup-file
1432 @vindex version-control
1433 The @code{gnus-startup-file} variable says where the startup files are.
1434 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1435 file being whatever that one is, with a @samp{.eld} appended.
1436 If you want to keep multiple numbered backups of this file, set
1437 @code{gnus-backup-startup-file}.  It respects the same values as the
1438 @code{version-control} variable.
1439
1440 @vindex gnus-save-newsrc-hook
1441 @vindex gnus-save-quick-newsrc-hook
1442 @vindex gnus-save-standard-newsrc-hook
1443 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1444 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1445 saving the @file{.newsrc.eld} file, and
1446 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1447 @file{.newsrc} file.  The latter two are commonly used to turn version
1448 control on or off.  Version control is on by default when saving the
1449 startup files.  If you want to turn backup creation off, say something like:
1450
1451 @lisp
1452 (defun turn-off-backup ()
1453   (set (make-local-variable 'backup-inhibited) t))
1454
1455 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1456 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1457 @end lisp
1458
1459 @vindex gnus-init-file
1460 @vindex gnus-site-init-file
1461 When Gnus starts, it will read the @code{gnus-site-init-file}
1462 (@file{.../site-lisp/gnus-init} by default) and @code{gnus-init-file}
1463 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1464 and can be used to avoid cluttering your @file{~/.emacs} and
1465 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1466 with the same names as these, but with @file{.elc} and @file{.el}
1467 suffixes.  In other words, if you have set @code{gnus-init-file} to
1468 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1469 and finally @file{~/.gnus} (in this order).  If Emacs was invoked with
1470 the @option{-q} or @option{--no-init-file} options (@pxref{Initial
1471 Options, ,Initial Options, emacs, The Emacs Manual}), Gnus doesn't read
1472 @code{gnus-init-file}.
1473
1474
1475 @node Auto Save
1476 @section Auto Save
1477 @cindex dribble file
1478 @cindex auto-save
1479
1480 Whenever you do something that changes the Gnus data (reading articles,
1481 catching up, killing/subscribing groups), the change is added to a
1482 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1483 Emacs way.  If your Emacs should crash before you have saved the
1484 @file{.newsrc} files, all changes you have made can be recovered from
1485 this file.
1486
1487 If Gnus detects this file at startup, it will ask the user whether to
1488 read it.  The auto save file is deleted whenever the real startup file is
1489 saved.
1490
1491 @vindex gnus-use-dribble-file
1492 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1493 maintain a dribble buffer.  The default is @code{t}.
1494
1495 @vindex gnus-dribble-directory
1496 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1497 this variable is @code{nil}, which it is by default, Gnus will dribble
1498 into the directory where the @file{.newsrc} file is located.  (This is
1499 normally the user's home directory.)  The dribble file will get the same
1500 file permissions as the @file{.newsrc} file.
1501
1502 @vindex gnus-always-read-dribble-file
1503 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1504 read the dribble file on startup without querying the user.
1505
1506
1507 @node The Active File
1508 @section The Active File
1509 @cindex active file
1510 @cindex ignored groups
1511
1512 When Gnus starts, or indeed whenever it tries to determine whether new
1513 articles have arrived, it reads the active file.  This is a very large
1514 file that lists all the active groups and articles on the server.
1515
1516 @vindex gnus-ignored-newsgroups
1517 Before examining the active file, Gnus deletes all lines that match the
1518 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1519 any groups with bogus names, but you can use this variable to make Gnus
1520 ignore hierarchies you aren't ever interested in.  However, this is not
1521 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1522 Groups} for an overview of other variables that can be used instead.
1523
1524 @c This variable is
1525 @c @code{nil} by default, and will slow down active file handling somewhat
1526 @c if you set it to anything else.
1527
1528 @vindex gnus-read-active-file
1529 @c @head
1530 The active file can be rather Huge, so if you have a slow network, you
1531 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1532 reading the active file.  This variable is @code{some} by default.
1533
1534 Gnus will try to make do by getting information just on the groups that
1535 you actually subscribe to.
1536
1537 Note that if you subscribe to lots and lots of groups, setting this
1538 variable to @code{nil} will probably make Gnus slower, not faster.  At
1539 present, having this variable @code{nil} will slow Gnus down
1540 considerably, unless you read news over a 2400 baud modem.
1541
1542 This variable can also have the value @code{some}.  Gnus will then
1543 attempt to read active info only on the subscribed groups.  On some
1544 servers this is quite fast (on sparkling, brand new INN servers that
1545 support the @code{LIST ACTIVE group} command), on others this isn't fast
1546 at all.  In any case, @code{some} should be faster than @code{nil}, and
1547 is certainly faster than @code{t} over slow lines.
1548
1549 Some news servers (old versions of Leafnode and old versions of INN, for
1550 instance) do not support the @code{LIST ACTIVE group}.  For these
1551 servers, @code{nil} is probably the most efficient value for this
1552 variable.
1553
1554 If this variable is @code{nil}, Gnus will ask for group info in total
1555 lock-step, which isn't very fast.  If it is @code{some} and you use an
1556 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1557 read all the replies in one swoop.  This will normally result in better
1558 performance, but if the server does not support the aforementioned
1559 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1560
1561 If you think that starting up Gnus takes too long, try all the three
1562 different values for this variable and see what works best for you.
1563
1564 In any case, if you use @code{some} or @code{nil}, you should definitely
1565 kill all groups that you aren't interested in to speed things up.
1566
1567 Note that this variable also affects active file retrieval from
1568 secondary select methods.
1569
1570
1571 @node Startup Variables
1572 @section Startup Variables
1573
1574 @table @code
1575
1576 @item gnus-load-hook
1577 @vindex gnus-load-hook
1578 A hook run while Gnus is being loaded.  Note that this hook will
1579 normally be run just once in each Emacs session, no matter how many
1580 times you start Gnus.
1581
1582 @item gnus-before-startup-hook
1583 @vindex gnus-before-startup-hook
1584 A hook called as the first thing when Gnus is started.
1585
1586 @item gnus-before-resume-hook
1587 @vindex gnus-before-resume-hook
1588 A hook called as the first thing when Gnus is resumed after a suspend.
1589
1590 @item gnus-startup-hook
1591 @vindex gnus-startup-hook
1592 A hook run as the very last thing after starting up Gnus
1593
1594 @item gnus-started-hook
1595 @vindex gnus-started-hook
1596 A hook that is run as the very last thing after starting up Gnus
1597 successfully.
1598
1599 @item gnus-setup-news-hook
1600 @vindex gnus-setup-news-hook
1601 A hook that is run after reading the @file{.newsrc} file(s), but before
1602 generating the group buffer.
1603
1604 @item gnus-check-bogus-newsgroups
1605 @vindex gnus-check-bogus-newsgroups
1606 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1607 startup.  A @dfn{bogus group} is a group that you have in your
1608 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1609 bogus groups can take quite a while, so to save time and resources it's
1610 best to leave this option off, and do the checking for bogus groups once
1611 in a while from the group buffer instead (@pxref{Group Maintenance}).
1612
1613 @item gnus-inhibit-startup-message
1614 @vindex gnus-inhibit-startup-message
1615 If non-@code{nil}, the startup message won't be displayed.  That way,
1616 your boss might not notice as easily that you are reading news instead
1617 of doing your job.  Note that this variable is used before
1618 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1619
1620 @item gnus-no-groups-message
1621 @vindex gnus-no-groups-message
1622 Message displayed by Gnus when no groups are available.
1623
1624 @item gnus-use-backend-marks
1625 @vindex gnus-use-backend-marks
1626 If non-@code{nil}, Gnus will store article marks both in the
1627 @file{.newsrc.eld} file and in the backends.  This will slow down
1628 group operation some.
1629
1630 @end table
1631
1632
1633 @node Group Buffer
1634 @chapter Group Buffer
1635 @cindex group buffer
1636
1637 @c Alex Schroeder suggests to rearrange this as follows:
1638 @c
1639 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1640 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1641 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1642 @c   7. Group Score, 8. Group Buffer Format
1643 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1644 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1645 @c <kensanata> First, "Gnus considers groups... (default 9)."
1646 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1647 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1648 @c <kensanata> Then expand the next paragraph or add some more to it.
1649 @c    This short one sentence explains levels 1 and 2, therefore I understand
1650 @c    that I should keep important news at 3 and boring news at 4.
1651 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1652 @c    Maybe keep those that you don't want to read temporarily at 6,
1653 @c    those that you never want to read at 8, those that offend your
1654 @c    human rights at 9...
1655
1656
1657 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1658 is the first buffer shown when Gnus starts, and will never be killed as
1659 long as Gnus is active.
1660
1661 @iftex
1662 @iflatex
1663 \gnusfigure{The Group Buffer}{320}{
1664 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1665 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1666 \put(120,38){\vector(1,2){10}}
1667 \put(40,60){\makebox(0,0)[r]{Mode line}}
1668 \put(40,58){\vector(1,0){30}}
1669 \put(200,28){\makebox(0,0)[t]{Native select method}}
1670 \put(200,26){\vector(-1,2){15}}
1671 }
1672 @end iflatex
1673 @end iftex
1674
1675 @menu
1676 * Group Buffer Format::         Information listed and how you can change it.
1677 * Group Maneuvering::           Commands for moving in the group buffer.
1678 * Selecting a Group::           Actually reading news.
1679 * Subscription Commands::       Unsubscribing, killing, subscribing.
1680 * Group Data::                  Changing the info for a group.
1681 * Group Levels::                Levels? What are those, then?
1682 * Group Score::                 A mechanism for finding out what groups you like.
1683 * Marking Groups::              You can mark groups for later processing.
1684 * Foreign Groups::              Creating and editing groups.
1685 * Group Parameters::            Each group may have different parameters set.
1686 * Listing Groups::              Gnus can list various subsets of the groups.
1687 * Sorting Groups::              Re-arrange the group order.
1688 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1689 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1690 * Exiting Gnus::                Stop reading news and get some work done.
1691 * Group Topics::                A folding group mode divided into topics.
1692 * Non-ASCII Group Names::       Accessing groups of non-English names.
1693 * Misc Group Stuff::            Other stuff that you can to do.
1694 @end menu
1695
1696
1697 @node Group Buffer Format
1698 @section Group Buffer Format
1699
1700 @menu
1701 * Group Line Specification::    Deciding how the group buffer is to look.
1702 * Group Mode Line Specification::  The group buffer mode line.
1703 * Group Highlighting::          Having nice colors in the group buffer.
1704 @end menu
1705
1706 You can customize the Group Mode tool bar, see @kbd{M-x
1707 customize-apropos RET gnus-group-tool-bar}.  This feature is only
1708 available in Emacs.
1709
1710 The tool bar icons are now (de)activated correctly depending on the
1711 cursor position.  Therefore, moving around in the Group Buffer is
1712 slower.  You can disable this via the variable
1713 @code{gnus-group-update-tool-bar}.  Its default value depends on your
1714 Emacs version.
1715
1716 @node Group Line Specification
1717 @subsection Group Line Specification
1718 @cindex group buffer format
1719
1720 The default format of the group buffer is nice and dull, but you can
1721 make it as exciting and ugly as you feel like.
1722
1723 Here's a couple of example group lines:
1724
1725 @example
1726      25: news.announce.newusers
1727  *    0: alt.fan.andrea-dworkin
1728 @end example
1729
1730 Quite simple, huh?
1731
1732 You can see that there are 25 unread articles in
1733 @samp{news.announce.newusers}.  There are no unread articles, but some
1734 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1735 asterisk at the beginning of the line?).
1736
1737 @vindex gnus-group-line-format
1738 You can change that format to whatever you want by fiddling with the
1739 @code{gnus-group-line-format} variable.  This variable works along the
1740 lines of a @code{format} specification, which is pretty much the same as
1741 a @code{printf} specifications, for those of you who use (feh!) C@.
1742 @xref{Formatting Variables}.
1743
1744 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1745
1746 There should always be a colon on the line; the cursor always moves to
1747 the colon after performing an operation.  @xref{Positioning
1748 Point}.  Nothing else is required---not even the group name.  All
1749 displayed text is just window dressing, and is never examined by Gnus.
1750 Gnus stores all real information it needs using text properties.
1751
1752 (Note that if you make a really strange, wonderful, spreadsheet-like
1753 layout, everybody will believe you are hard at work with the accounting
1754 instead of wasting time reading news.)
1755
1756 Here's a list of all available format characters:
1757
1758 @table @samp
1759
1760 @item M
1761 An asterisk if the group only has marked articles.
1762
1763 @item S
1764 Whether the group is subscribed.
1765
1766 @item L
1767 Level of subscribedness.
1768
1769 @item N
1770 Number of unread articles.
1771
1772 @item I
1773 Number of dormant articles.
1774
1775 @item T
1776 Number of ticked articles.
1777
1778 @item R
1779 Number of read articles.
1780
1781 @item U
1782 Number of unseen articles.
1783
1784 @item t
1785 Estimated total number of articles.  (This is really @var{max-number}
1786 minus @var{min-number} plus 1.)
1787
1788 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1789 efficient access to @var{max-number} and @var{min-number} but getting
1790 the true unread message count is not possible efficiently.  For
1791 hysterical raisins, even the mail back ends, where the true number of
1792 unread messages might be available efficiently, use the same limited
1793 interface.  To remove this restriction from Gnus means that the back
1794 end interface has to be changed, which is not an easy job.
1795
1796 The nnml backend (@pxref{Mail Spool}) has a feature called ``group
1797 compaction'' which circumvents this deficiency: the idea is to
1798 renumber all articles from 1, removing all gaps between numbers, hence
1799 getting a correct total count.  Other backends may support this in the
1800 future.  In order to keep your total article count relatively up to
1801 date, you might want to compact your groups (or even directly your
1802 server) from time to time. @xref{Misc Group Stuff}, @xref{Server Commands}.
1803
1804 @item y
1805 Number of unread, unticked, non-dormant articles.
1806
1807 @item i
1808 Number of ticked and dormant articles.
1809
1810 @item g
1811 Full group name.
1812
1813 @item G
1814 Group name.
1815
1816 @item C
1817 Group comment (@pxref{Group Parameters}) or group name if there is no
1818 comment element in the group parameters.
1819
1820 @item D
1821 Newsgroup description.  You need to read the group descriptions
1822 before these will appear, and to do that, you either have to set
1823 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1824 command.
1825
1826 @item o
1827 @samp{m} if moderated.
1828
1829 @item O
1830 @samp{(m)} if moderated.
1831
1832 @item s
1833 Select method.
1834
1835 @item B
1836 If the summary buffer for the group is open or not.
1837
1838 @item n
1839 Select from where.
1840
1841 @item z
1842 A string that looks like @samp{<%s:%n>} if a foreign select method is
1843 used.
1844
1845 @item P
1846 Indentation based on the level of the topic (@pxref{Group Topics}).
1847
1848 @item c
1849 @vindex gnus-group-uncollapsed-levels
1850 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1851 variable says how many levels to leave at the end of the group name.
1852 The default is 1---this will mean that group names like
1853 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1854
1855 @item m
1856 @vindex gnus-new-mail-mark
1857 @cindex %
1858 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1859 the group lately.
1860
1861 @item p
1862 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1863
1864 @item d
1865 A string that says when you last read the group (@pxref{Group
1866 Timestamp}).
1867
1868 @item F
1869 The disk space used by the articles fetched by both the cache and
1870 agent.  The value is automatically scaled to bytes(B), kilobytes(K),
1871 megabytes(M), or gigabytes(G) to minimize the column width.  A format
1872 of %7F is sufficient for a fixed-width column.
1873
1874 @item u
1875 User defined specifier.  The next character in the format string should
1876 be a letter.  Gnus will call the function
1877 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1878 following @samp{%u}.  The function will be passed a single dummy
1879 parameter as argument.  The function should return a string, which will
1880 be inserted into the buffer just like information from any other
1881 specifier.
1882 @end table
1883
1884 @cindex *
1885 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1886 if no info is available---for instance, if it is a non-activated foreign
1887 group, or a bogus native group.
1888
1889
1890 @node Group Mode Line Specification
1891 @subsection Group Mode Line Specification
1892 @cindex group mode line
1893
1894 @vindex gnus-group-mode-line-format
1895 The mode line can be changed by setting
1896 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1897 doesn't understand that many format specifiers:
1898
1899 @table @samp
1900 @item S
1901 The native news server.
1902 @item M
1903 The native select method.
1904 @end table
1905
1906
1907 @node Group Highlighting
1908 @subsection Group Highlighting
1909 @cindex highlighting
1910 @cindex group highlighting
1911
1912 @vindex gnus-group-highlight
1913 Highlighting in the group buffer is controlled by the
1914 @code{gnus-group-highlight} variable.  This is an alist with elements
1915 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1916 something non-@code{nil}, the @var{face} will be used on the line.
1917
1918 Here's an example value for this variable that might look nice if the
1919 background is dark:
1920
1921 @lisp
1922 (cond (window-system
1923        (setq custom-background-mode 'light)
1924        (defface my-group-face-1
1925          '((t (:foreground "Red" :bold t))) "First group face")
1926        (defface my-group-face-2
1927          '((t (:foreground "DarkSeaGreen4" :bold t)))
1928          "Second group face")
1929        (defface my-group-face-3
1930          '((t (:foreground "Green4" :bold t))) "Third group face")
1931        (defface my-group-face-4
1932          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1933        (defface my-group-face-5
1934          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1935
1936 (setq gnus-group-highlight
1937       '(((> unread 200) . my-group-face-1)
1938         ((and (< level 3) (zerop unread)) . my-group-face-2)
1939         ((< level 3) . my-group-face-3)
1940         ((zerop unread) . my-group-face-4)
1941         (t . my-group-face-5)))
1942 @end lisp
1943
1944 Also @pxref{Faces and Fonts}.
1945
1946 Variables that are dynamically bound when the forms are evaluated
1947 include:
1948
1949 @table @code
1950 @item group
1951 The group name.
1952 @item unread
1953 The number of unread articles in the group.
1954 @item method
1955 The select method.
1956 @item mailp
1957 Whether the group is a mail group.
1958 @item level
1959 The level of the group.
1960 @item score
1961 The score of the group.
1962 @item ticked
1963 The number of ticked articles in the group.
1964 @item total
1965 The total number of articles in the group.  Or rather,
1966 @var{max-number} minus @var{min-number} plus one.
1967 @item topic
1968 When using the topic minor mode, this variable is bound to the current
1969 topic being inserted.
1970 @end table
1971
1972 When the forms are @code{eval}ed, point is at the beginning of the line
1973 of the group in question, so you can use many of the normal Gnus
1974 functions for snarfing info on the group.
1975
1976 @vindex gnus-group-update-hook
1977 @findex gnus-group-highlight-line
1978 @code{gnus-group-update-hook} is called when a group line is changed.
1979 It will not be called when @code{gnus-visual} is @code{nil}.
1980
1981
1982 @node Group Maneuvering
1983 @section Group Maneuvering
1984 @cindex group movement
1985
1986 All movement commands understand the numeric prefix and will behave as
1987 expected, hopefully.
1988
1989 @table @kbd
1990
1991 @item n
1992 @kindex n (Group)
1993 @findex gnus-group-next-unread-group
1994 Go to the next group that has unread articles
1995 (@code{gnus-group-next-unread-group}).
1996
1997 @item p
1998 @itemx DEL
1999 @kindex DEL (Group)
2000 @kindex p (Group)
2001 @findex gnus-group-prev-unread-group
2002 Go to the previous group that has unread articles
2003 (@code{gnus-group-prev-unread-group}).
2004
2005 @item N
2006 @kindex N (Group)
2007 @findex gnus-group-next-group
2008 Go to the next group (@code{gnus-group-next-group}).
2009
2010 @item P
2011 @kindex P (Group)
2012 @findex gnus-group-prev-group
2013 Go to the previous group (@code{gnus-group-prev-group}).
2014
2015 @item M-n
2016 @kindex M-n (Group)
2017 @findex gnus-group-next-unread-group-same-level
2018 Go to the next unread group on the same (or lower) level
2019 (@code{gnus-group-next-unread-group-same-level}).
2020
2021 @item M-p
2022 @kindex M-p (Group)
2023 @findex gnus-group-prev-unread-group-same-level
2024 Go to the previous unread group on the same (or lower) level
2025 (@code{gnus-group-prev-unread-group-same-level}).
2026 @end table
2027
2028 Three commands for jumping to groups:
2029
2030 @table @kbd
2031
2032 @item j
2033 @kindex j (Group)
2034 @findex gnus-group-jump-to-group
2035 Jump to a group (and make it visible if it isn't already)
2036 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2037 like living groups.
2038
2039 @item ,
2040 @kindex , (Group)
2041 @findex gnus-group-best-unread-group
2042 Jump to the unread group with the lowest level
2043 (@code{gnus-group-best-unread-group}).
2044
2045 @item .
2046 @kindex . (Group)
2047 @findex gnus-group-first-unread-group
2048 Jump to the first group with unread articles
2049 (@code{gnus-group-first-unread-group}).
2050 @end table
2051
2052 @vindex gnus-group-goto-unread
2053 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2054 commands will move to the next group, not the next unread group.  Even
2055 the commands that say they move to the next unread group.  The default
2056 is @code{t}.
2057
2058 @vindex gnus-summary-next-group-on-exit
2059 If @code{gnus-summary-next-group-on-exit} is @code{t}, when a summary is
2060 exited, the point in the group buffer is moved to the next unread group.
2061 Otherwise, the point is set to the group just exited.  The default is
2062 @code{t}.
2063
2064 @node Selecting a Group
2065 @section Selecting a Group
2066 @cindex group selection
2067
2068 @table @kbd
2069
2070 @item SPACE
2071 @kindex SPACE (Group)
2072 @findex gnus-group-read-group
2073 Select the current group, switch to the summary buffer and display the
2074 first unread article (@code{gnus-group-read-group}).  If there are no
2075 unread articles in the group, or if you give a non-numerical prefix to
2076 this command, Gnus will offer to fetch all the old articles in this
2077 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2078 determines the number of articles Gnus will fetch.  If @var{n} is
2079 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2080 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2081
2082 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2083 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2084 - 4 2 SPC} fetches the 42 oldest ones.
2085
2086 When you are in the group (in the Summary buffer), you can type
2087 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2088 ones.
2089
2090 @item RET
2091 @kindex RET (Group)
2092 @findex gnus-group-select-group
2093 Select the current group and switch to the summary buffer
2094 (@code{gnus-group-select-group}).  Takes the same arguments as
2095 @code{gnus-group-read-group}---the only difference is that this command
2096 does not display the first unread article automatically upon group
2097 entry.
2098
2099 @item M-RET
2100 @kindex M-RET (Group)
2101 @findex gnus-group-quick-select-group
2102 This does the same as the command above, but tries to do it with the
2103 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2104 scoring/killing will be performed, there will be no highlights and no
2105 expunging.  This might be useful if you're in a real hurry and have to
2106 enter some humongous group.  If you give a 0 prefix to this command
2107 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2108 which is useful if you want to toggle threading before generating the
2109 summary buffer (@pxref{Summary Generation Commands}).
2110
2111 @item M-SPACE
2112 @kindex M-SPACE (Group)
2113 @findex gnus-group-visible-select-group
2114 This is yet one more command that does the same as the @kbd{RET}
2115 command, but this one does it without expunging and hiding dormants
2116 (@code{gnus-group-visible-select-group}).
2117
2118 @item C-M-RET
2119 @kindex C-M-RET (Group)
2120 @findex gnus-group-select-group-ephemerally
2121 Finally, this command selects the current group ephemerally without
2122 doing any processing of its contents
2123 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2124 turned off.  Everything you do in the group after selecting it in this
2125 manner will have no permanent effects.
2126
2127 @end table
2128
2129 @vindex gnus-large-newsgroup
2130 The @code{gnus-large-newsgroup} variable says what Gnus should
2131 consider to be a big group.  If it is @code{nil}, no groups are
2132 considered big.  The default value is 200.  If the group has more
2133 (unread and/or ticked) articles than this, Gnus will query the user
2134 before entering the group.  The user can then specify how many
2135 articles should be fetched from the server.  If the user specifies a
2136 negative number (@var{-n}), the @var{n} oldest articles will be
2137 fetched.  If it is positive, the @var{n} articles that have arrived
2138 most recently will be fetched.
2139
2140 @vindex gnus-large-ephemeral-newsgroup
2141 @code{gnus-large-ephemeral-newsgroup} is the same as
2142 @code{gnus-large-newsgroup}, but is only used for ephemeral
2143 newsgroups.
2144
2145 @vindex gnus-newsgroup-maximum-articles
2146 In groups in some news servers, there might be a big gap between a few
2147 very old articles that will never be expired and the recent ones.  In
2148 such a case, the server will return the data like @code{(1 . 30000000)}
2149 for the @code{LIST ACTIVE group} command, for example.  Even if there
2150 are actually only the articles 1--10 and 29999900--30000000, Gnus doesn't
2151 know it at first and prepares for getting 30000000 articles.  However,
2152 it will consume hundreds megabytes of memories and might make Emacs get
2153 stuck as the case may be.  If you use such news servers, set the
2154 variable @code{gnus-newsgroup-maximum-articles} to a positive number.
2155 The value means that Gnus ignores articles other than this number of the
2156 latest ones in every group.  For instance, the value 10000 makes Gnus
2157 get only the articles 29990001--30000000 (if the latest article number is
2158 30000000 in a group).  Note that setting this variable to a number might
2159 prevent you from reading very old articles.  The default value of the
2160 variable @code{gnus-newsgroup-maximum-articles} is @code{nil}, which
2161 means Gnus never ignores old articles.
2162
2163 @vindex gnus-select-group-hook
2164 @vindex gnus-auto-select-first
2165 @vindex gnus-auto-select-subject
2166 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2167 automatically when entering a group with the @kbd{SPACE} command.
2168 Which article this is controlled by the
2169 @code{gnus-auto-select-subject} variable.  Valid values for this
2170 variable are:
2171
2172 @table @code
2173
2174 @item unread
2175 Place point on the subject line of the first unread article.
2176
2177 @item first
2178 Place point on the subject line of the first article.
2179
2180 @item unseen
2181 Place point on the subject line of the first unseen article.
2182
2183 @item unseen-or-unread
2184 Place point on the subject line of the first unseen article, and if
2185 there is no such article, place point on the subject line of the first
2186 unread article.
2187
2188 @item best
2189 Place point on the subject line of the highest-scored unread article.
2190
2191 @end table
2192
2193 This variable can also be a function.  In that case, that function
2194 will be called to place point on a subject line.
2195
2196 If you want to prevent automatic selection in some group (say, in a
2197 binary group with Huge articles) you can set the
2198 @code{gnus-auto-select-first} variable to @code{nil} in
2199 @code{gnus-select-group-hook}, which is called when a group is
2200 selected.
2201
2202
2203 @node Subscription Commands
2204 @section Subscription Commands
2205 @cindex subscription
2206
2207 The following commands allow for managing your subscriptions in the
2208 Group buffer.  If you want to subscribe to many groups, it's probably
2209 more convenient to go to the @ref{Server Buffer}, and choose the
2210 server there using @kbd{RET} or @kbd{SPC}.  Then you'll have the
2211 commands listed in @ref{Browse Foreign Server} at hand.
2212
2213 @table @kbd
2214
2215 @item S t
2216 @itemx u
2217 @kindex S t (Group)
2218 @kindex u (Group)
2219 @findex gnus-group-unsubscribe-current-group
2220 @c @icon{gnus-group-unsubscribe}
2221 Toggle subscription to the current group
2222 (@code{gnus-group-unsubscribe-current-group}).
2223
2224 @item S s
2225 @itemx U
2226 @kindex S s (Group)
2227 @kindex U (Group)
2228 @findex gnus-group-unsubscribe-group
2229 Prompt for a group to subscribe, and then subscribe it.  If it was
2230 subscribed already, unsubscribe it instead
2231 (@code{gnus-group-unsubscribe-group}).
2232
2233 @item S k
2234 @itemx C-k
2235 @kindex S k (Group)
2236 @kindex C-k (Group)
2237 @findex gnus-group-kill-group
2238 @c @icon{gnus-group-kill-group}
2239 Kill the current group (@code{gnus-group-kill-group}).
2240
2241 @item S y
2242 @itemx C-y
2243 @kindex S y (Group)
2244 @kindex C-y (Group)
2245 @findex gnus-group-yank-group
2246 Yank the last killed group (@code{gnus-group-yank-group}).
2247
2248 @item C-x C-t
2249 @kindex C-x C-t (Group)
2250 @findex gnus-group-transpose-groups
2251 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2252 really a subscription command, but you can use it instead of a
2253 kill-and-yank sequence sometimes.
2254
2255 @item S w
2256 @itemx C-w
2257 @kindex S w (Group)
2258 @kindex C-w (Group)
2259 @findex gnus-group-kill-region
2260 Kill all groups in the region (@code{gnus-group-kill-region}).
2261
2262 @item S z
2263 @kindex S z (Group)
2264 @findex gnus-group-kill-all-zombies
2265 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2266
2267 @item S C-k
2268 @kindex S C-k (Group)
2269 @findex gnus-group-kill-level
2270 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2271 These groups can't be yanked back after killing, so this command should
2272 be used with some caution.  The only time where this command comes in
2273 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2274 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2275 kill off all unsubscribed groups that do not have message numbers in the
2276 @file{.newsrc} file.
2277
2278 @end table
2279
2280 Also @pxref{Group Levels}.
2281
2282
2283 @node Group Data
2284 @section Group Data
2285
2286 @table @kbd
2287
2288 @item c
2289 @kindex c (Group)
2290 @findex gnus-group-catchup-current
2291 @vindex gnus-group-catchup-group-hook
2292 @c @icon{gnus-group-catchup-current}
2293 Mark all unticked articles in this group as read
2294 (@code{gnus-group-catchup-current}).
2295 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2296 the group buffer.
2297
2298 @item C
2299 @kindex C (Group)
2300 @findex gnus-group-catchup-current-all
2301 Mark all articles in this group, even the ticked ones, as read
2302 (@code{gnus-group-catchup-current-all}).
2303
2304 @item M-c
2305 @kindex M-c (Group)
2306 @findex gnus-group-clear-data
2307 Clear the data from the current group---nix out marks and the list of
2308 read articles (@code{gnus-group-clear-data}).
2309
2310 @item M-x gnus-group-clear-data-on-native-groups
2311 @kindex M-x gnus-group-clear-data-on-native-groups
2312 @findex gnus-group-clear-data-on-native-groups
2313 If you have switched from one @acronym{NNTP} server to another, all your marks
2314 and read ranges have become worthless.  You can use this command to
2315 clear out all data that you have on your native groups.  Use with
2316 caution.
2317
2318 @end table
2319
2320
2321 @node Group Levels
2322 @section Group Levels
2323 @cindex group level
2324 @cindex level
2325
2326 All groups have a level of @dfn{subscribedness}.  For instance, if a
2327 group is on level 2, it is more subscribed than a group on level 5.  You
2328 can ask Gnus to just list groups on a given level or lower
2329 (@pxref{Listing Groups}), or to just check for new articles in groups on
2330 a given level or lower (@pxref{Scanning New Messages}).
2331
2332 Remember:  The higher the level of the group, the less important it is.
2333
2334 @table @kbd
2335
2336 @item S l
2337 @kindex S l (Group)
2338 @findex gnus-group-set-current-level
2339 Set the level of the current group.  If a numeric prefix is given, the
2340 next @var{n} groups will have their levels set.  The user will be
2341 prompted for a level.
2342 @end table
2343
2344 @vindex gnus-level-killed
2345 @vindex gnus-level-zombie
2346 @vindex gnus-level-unsubscribed
2347 @vindex gnus-level-subscribed
2348 Gnus considers groups from levels 1 to
2349 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2350 @code{gnus-level-subscribed} (exclusive) and
2351 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2352 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2353 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2354 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2355 same, but zombie and killed groups store no information on what articles
2356 you have read, etc.  This distinction between dead and living
2357 groups isn't done because it is nice or clever, it is done purely for
2358 reasons of efficiency.
2359
2360 It is recommended that you keep all your mail groups (if any) on quite
2361 low levels (e.g., 1 or 2).
2362
2363 Maybe the following description of the default behavior of Gnus helps to
2364 understand what these levels are all about.  By default, Gnus shows you
2365 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2366 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2367 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2368 groups are hidden, in a way.
2369
2370 @cindex zombie groups
2371 Zombie and killed groups are similar to unsubscribed groups in that they
2372 are hidden by default.  But they are different from subscribed and
2373 unsubscribed groups in that Gnus doesn't ask the news server for
2374 information (number of messages, number of unread messages) on zombie
2375 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2376 aren't interested in.  If most groups are killed, Gnus is faster.
2377
2378 Why does Gnus distinguish between zombie and killed groups?  Well, when
2379 a new group arrives on the server, Gnus by default makes it a zombie
2380 group.  This means that you are normally not bothered with new groups,
2381 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2382 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2383 list of killed groups.)
2384
2385 If you want to play with the level variables, you should show some care.
2386 Set them once, and don't touch them ever again.  Better yet, don't touch
2387 them at all unless you know exactly what you're doing.
2388
2389 @vindex gnus-level-default-unsubscribed
2390 @vindex gnus-level-default-subscribed
2391 Two closely related variables are @code{gnus-level-default-subscribed}
2392 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2393 which are the levels that new groups will be put on if they are
2394 (un)subscribed.  These two variables should, of course, be inside the
2395 relevant valid ranges.
2396
2397 @vindex gnus-keep-same-level
2398 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2399 will only move to groups of the same level (or lower).  In
2400 particular, going from the last article in one group to the next group
2401 will go to the next group of the same level (or lower).  This might be
2402 handy if you want to read the most important groups before you read the
2403 rest.
2404
2405 If this variable is @code{best}, Gnus will make the next newsgroup the
2406 one with the best level.
2407
2408 @vindex gnus-group-default-list-level
2409 All groups with a level less than or equal to
2410 @code{gnus-group-default-list-level} will be listed in the group buffer
2411 by default.
2412 This variable can also be a function.  In that case, that function will
2413 be called and the result will be used as value.
2414
2415
2416 @vindex gnus-group-list-inactive-groups
2417 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2418 groups will be listed along with the unread groups.  This variable is
2419 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2420 listed.
2421
2422 @vindex gnus-group-use-permanent-levels
2423 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2424 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2425 use this level as the ``work'' level.
2426
2427 @vindex gnus-activate-level
2428 Gnus will normally just activate (i.e., query the server about) groups
2429 on level @code{gnus-activate-level} or less.  If you don't want to
2430 activate unsubscribed groups, for instance, you might set this variable
2431 to 5.  The default is 6.
2432
2433
2434 @node Group Score
2435 @section Group Score
2436 @cindex group score
2437 @cindex group rank
2438 @cindex rank
2439
2440 You would normally keep important groups on high levels, but that scheme
2441 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2442 group buffer according to how often you read groups, perhaps?  Within
2443 reason?
2444
2445 This is what @dfn{group score} is for.  You can have Gnus assign a score
2446 to each group through the mechanism described below.  You can then sort
2447 the group buffer based on this score.  Alternatively, you can sort on
2448 score and then level.  (Taken together, the level and the score is
2449 called the @dfn{rank} of the group.  A group that is on level 4 and has
2450 a score of 1 has a higher rank than a group on level 5 that has a score
2451 of 300.  (The level is the most significant part and the score is the
2452 least significant part.))
2453
2454 @findex gnus-summary-bubble-group
2455 If you want groups you read often to get higher scores than groups you
2456 read seldom you can add the @code{gnus-summary-bubble-group} function to
2457 the @code{gnus-summary-exit-hook} hook.  This will result (after
2458 sorting) in a bubbling sort of action.  If you want to see that in
2459 action after each summary exit, you can add
2460 @code{gnus-group-sort-groups-by-rank} or
2461 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2462 slow things down somewhat.
2463
2464
2465 @node Marking Groups
2466 @section Marking Groups
2467 @cindex marking groups
2468
2469 If you want to perform some command on several groups, and they appear
2470 subsequently in the group buffer, you would normally just give a
2471 numerical prefix to the command.  Most group commands will then do your
2472 bidding on those groups.
2473
2474 However, if the groups are not in sequential order, you can still
2475 perform a command on several groups.  You simply mark the groups first
2476 with the process mark and then execute the command.
2477
2478 @table @kbd
2479
2480 @item #
2481 @kindex # (Group)
2482 @itemx M m
2483 @kindex M m (Group)
2484 @findex gnus-group-mark-group
2485 Set the mark on the current group (@code{gnus-group-mark-group}).
2486
2487 @item M-#
2488 @kindex M-# (Group)
2489 @itemx M u
2490 @kindex M u (Group)
2491 @findex gnus-group-unmark-group
2492 Remove the mark from the current group
2493 (@code{gnus-group-unmark-group}).
2494
2495 @item M U
2496 @kindex M U (Group)
2497 @findex gnus-group-unmark-all-groups
2498 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2499
2500 @item M w
2501 @kindex M w (Group)
2502 @findex gnus-group-mark-region
2503 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2504
2505 @item M b
2506 @kindex M b (Group)
2507 @findex gnus-group-mark-buffer
2508 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2509
2510 @item M r
2511 @kindex M r (Group)
2512 @findex gnus-group-mark-regexp
2513 Mark all groups that match some regular expression
2514 (@code{gnus-group-mark-regexp}).
2515 @end table
2516
2517 Also @pxref{Process/Prefix}.
2518
2519 @findex gnus-group-universal-argument
2520 If you want to execute some command on all groups that have been marked
2521 with the process mark, you can use the @kbd{M-&}
2522 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2523 the command to be executed.
2524
2525
2526 @node Foreign Groups
2527 @section Foreign Groups
2528 @cindex foreign groups
2529
2530 If you recall how to subscribe to servers (@pxref{Finding the News})
2531 you will remember that @code{gnus-secondary-select-methods} and
2532 @code{gnus-select-method} let you write a definition in Emacs Lisp of
2533 what servers you want to see when you start up.  The alternate
2534 approach is to use foreign servers and groups.  ``Foreign'' here means
2535 they are not coming from the select methods.  All foreign server
2536 configuration and subscriptions are stored only in the
2537 @file{~/.newsrc.eld} file.
2538
2539 Below are some group mode commands for making and editing general foreign
2540 groups, as well as commands to ease the creation of a few
2541 special-purpose groups.  All these commands insert the newly created
2542 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2543 consulted.
2544
2545 Changes from the group editing commands are stored in
2546 @file{~/.newsrc.eld} (@code{gnus-startup-file}).  An alternative is the
2547 variable @code{gnus-parameters}, @xref{Group Parameters}.
2548
2549 @table @kbd
2550
2551 @item G m
2552 @kindex G m (Group)
2553 @findex gnus-group-make-group
2554 @cindex making groups
2555 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2556 for a name, a method and possibly an @dfn{address}.  For an easier way
2557 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2558
2559 @item G M
2560 @kindex G M (Group)
2561 @findex gnus-group-read-ephemeral-group
2562 Make an ephemeral group (@code{gnus-group-read-ephemeral-group}).  Gnus
2563 will prompt you for a name, a method and an @dfn{address}.
2564
2565 @item G r
2566 @kindex G r (Group)
2567 @findex gnus-group-rename-group
2568 @cindex renaming groups
2569 Rename the current group to something else
2570 (@code{gnus-group-rename-group}).  This is valid only on some
2571 groups---mail groups mostly.  This command might very well be quite slow
2572 on some back ends.
2573
2574 @item G c
2575 @kindex G c (Group)
2576 @cindex customizing
2577 @findex gnus-group-customize
2578 Customize the group parameters (@code{gnus-group-customize}).
2579
2580 @item G e
2581 @kindex G e (Group)
2582 @findex gnus-group-edit-group-method
2583 @cindex renaming groups
2584 Enter a buffer where you can edit the select method of the current
2585 group (@code{gnus-group-edit-group-method}).
2586
2587 @item G p
2588 @kindex G p (Group)
2589 @findex gnus-group-edit-group-parameters
2590 Enter a buffer where you can edit the group parameters
2591 (@code{gnus-group-edit-group-parameters}).
2592
2593 @item G E
2594 @kindex G E (Group)
2595 @findex gnus-group-edit-group
2596 Enter a buffer where you can edit the group info
2597 (@code{gnus-group-edit-group}).
2598
2599 @item G d
2600 @kindex G d (Group)
2601 @findex gnus-group-make-directory-group
2602 @cindex nndir
2603 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2604 for a directory name (@code{gnus-group-make-directory-group}).
2605
2606 @item G h
2607 @kindex G h (Group)
2608 @cindex help group
2609 @findex gnus-group-make-help-group
2610 Make the Gnus help group (@code{gnus-group-make-help-group}).
2611
2612 @item G D
2613 @kindex G D (Group)
2614 @findex gnus-group-enter-directory
2615 @cindex nneething
2616 Read an arbitrary directory as if it were a newsgroup with the
2617 @code{nneething} back end (@code{gnus-group-enter-directory}).
2618 @xref{Anything Groups}.
2619
2620 @item G f
2621 @kindex G f (Group)
2622 @findex gnus-group-make-doc-group
2623 @cindex ClariNet Briefs
2624 @cindex nndoc
2625 Make a group based on some file or other
2626 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2627 command, you will be prompted for a file name and a file type.
2628 Currently supported types are @code{mbox}, @code{babyl},
2629 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2630 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2631 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2632 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2633 you run this command without a prefix, Gnus will guess at the file
2634 type.  @xref{Document Groups}.
2635
2636 @item G u
2637 @kindex G u (Group)
2638 @vindex gnus-useful-groups
2639 @findex gnus-group-make-useful-group
2640 Create one of the groups mentioned in @code{gnus-useful-groups}
2641 (@code{gnus-group-make-useful-group}).
2642
2643 @item G w
2644 @kindex G w (Group)
2645 @findex gnus-group-make-web-group
2646 @cindex Google
2647 @cindex nnweb
2648 @cindex gmane
2649 Make an ephemeral group based on a web search
2650 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2651 command, make a solid group instead.  You will be prompted for the
2652 search engine type and the search string.  Valid search engine types
2653 include @code{google}, @code{dejanews}, and @code{gmane}.
2654 @xref{Web Searches}.
2655
2656 If you use the @code{google} search engine, you can limit the search
2657 to a particular group by using a match string like
2658 @samp{shaving group:alt.sysadmin.recovery}.
2659
2660 @item G R
2661 @kindex G R (Group)
2662 @findex gnus-group-make-rss-group
2663 Make a group based on an @acronym{RSS} feed
2664 (@code{gnus-group-make-rss-group}).  You will be prompted for an URL@.
2665 @xref{RSS}.
2666
2667 @item G DEL
2668 @kindex G DEL (Group)
2669 @findex gnus-group-delete-group
2670 This function will delete the current group
2671 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2672 actually delete all the articles in the group, and forcibly remove the
2673 group itself from the face of the Earth.  Use a prefix only if you are
2674 absolutely sure of what you are doing.  This command can't be used on
2675 read-only groups (like @code{nntp} groups), though.
2676
2677 @item G V
2678 @kindex G V (Group)
2679 @findex gnus-group-make-empty-virtual
2680 Make a new, fresh, empty @code{nnvirtual} group
2681 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2682
2683 @item G v
2684 @kindex G v (Group)
2685 @findex gnus-group-add-to-virtual
2686 Add the current group to an @code{nnvirtual} group
2687 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2688 @end table
2689
2690 @xref{Select Methods}, for more information on the various select
2691 methods.
2692
2693 @vindex gnus-activate-foreign-newsgroups
2694 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2695 Gnus will check all foreign groups with this level or lower at startup.
2696 This might take quite a while, especially if you subscribe to lots of
2697 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2698 @code{gnus-activate-level} also affects activation of foreign
2699 newsgroups.
2700
2701
2702 The following commands create ephemeral groups.  They can be called not
2703 only from the Group buffer, but in any Gnus buffer.
2704
2705 @table @code
2706 @item gnus-read-ephemeral-gmane-group
2707 @findex gnus-read-ephemeral-gmane-group
2708 @vindex gnus-gmane-group-download-format
2709 Read an ephemeral group on Gmane.org.  The articles are downloaded via
2710 HTTP using the URL specified by @code{gnus-gmane-group-download-format}.
2711 Gnus will prompt you for a group name, the start article number and an
2712 the article range.
2713
2714 @item gnus-read-ephemeral-gmane-group-url
2715 @findex gnus-read-ephemeral-gmane-group-url
2716 This command is similar to @code{gnus-read-ephemeral-gmane-group}, but
2717 the group name and the article number and range are constructed from a
2718 given @acronym{URL}.  Supported @acronym{URL} formats include:
2719 @indicateurl{http://thread.gmane.org/gmane.foo.bar/12300/focus=12399},
2720 @indicateurl{http://thread.gmane.org/gmane.foo.bar/12345/},
2721 @indicateurl{http://article.gmane.org/gmane.foo.bar/12345/},
2722 @indicateurl{http://permalink.gmane.org/gmane.foo.bar/12345/}, and
2723 @indicateurl{http://news.gmane.org/group/gmane.foo.bar/thread=12345}.
2724
2725 @item gnus-read-ephemeral-emacs-bug-group
2726 @findex gnus-read-ephemeral-emacs-bug-group
2727 Read an Emacs bug report in an ephemeral group.  Gnus will prompt for a
2728 bug number.  The default is the number at point.  The @acronym{URL} is
2729 specified in @code{gnus-bug-group-download-format-alist}.
2730
2731 @item gnus-read-ephemeral-debian-bug-group
2732 @findex gnus-read-ephemeral-debian-bug-group
2733 Read a Debian bug report in an ephemeral group.  Analog to
2734 @code{gnus-read-ephemeral-emacs-bug-group}.
2735 @end table
2736
2737 Some of these command are also useful for article buttons, @xref{Article
2738 Buttons}.
2739
2740 Here is an example:
2741 @lisp
2742 (require 'gnus-art)
2743 (add-to-list
2744  'gnus-button-alist
2745  '("#\\([0-9]+\\)\\>" 1
2746    (string-match "\\<emacs\\>" (or gnus-newsgroup-name ""))
2747    gnus-read-ephemeral-emacs-bug-group 1))
2748 @end lisp
2749
2750
2751 @node Group Parameters
2752 @section Group Parameters
2753 @cindex group parameters
2754
2755 The group parameters store information local to a particular group.
2756
2757 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2758 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2759 presents you with a Customize-like interface.  The latter helps avoid
2760 silly Lisp errors.)  You might also be interested in reading about topic
2761 parameters (@pxref{Topic Parameters}).
2762 Additionally, you can set group parameters via the
2763 @code{gnus-parameters} variable, see below.
2764
2765 Here's an example group parameter list:
2766
2767 @example
2768 ((to-address . "ding@@gnus.org")
2769  (auto-expire . t))
2770 @end example
2771
2772 We see that each element consists of a ``dotted pair''---the thing before
2773 the dot is the key, while the thing after the dot is the value.  All the
2774 parameters have this form @emph{except} local variable specs, which are
2775 not dotted pairs, but proper lists.
2776
2777 Some parameters have correspondent customizable variables, each of which
2778 is an alist of regexps and values.
2779
2780 The following group parameters can be used:
2781
2782 @table @code
2783 @item to-address
2784 @cindex to-address
2785 Address used by when doing followups and new posts.
2786
2787 @example
2788 (to-address . "some@@where.com")
2789 @end example
2790
2791 This is primarily useful in mail groups that represent closed mailing
2792 lists---mailing lists where it's expected that everybody that writes to
2793 the mailing list is subscribed to it.  Since using this parameter
2794 ensures that the mail only goes to the mailing list itself, it means
2795 that members won't receive two copies of your followups.
2796
2797 Using @code{to-address} will actually work whether the group is foreign
2798 or not.  Let's say there's a group on the server that is called
2799 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2800 the articles from a mail-to-news gateway.  Posting directly to this
2801 group is therefore impossible---you have to send mail to the mailing
2802 list address instead.
2803
2804 See also @code{gnus-parameter-to-address-alist}.
2805
2806 @item to-list
2807 @cindex to-list
2808 Address used when doing @kbd{a} in that group.
2809
2810 @example
2811 (to-list . "some@@where.com")
2812 @end example
2813
2814 It is totally ignored
2815 when doing a followup---except that if it is present in a news group,
2816 you'll get mail group semantics when doing @kbd{f}.
2817
2818 If you do an @kbd{a} command in a mail group and you have neither a
2819 @code{to-list} group parameter nor a @code{to-address} group parameter,
2820 then a @code{to-list} group parameter will be added automatically upon
2821 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2822 @vindex gnus-add-to-list
2823
2824 @findex gnus-mailing-list-mode
2825 @cindex mail list groups
2826 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2827 entering summary buffer.
2828
2829 See also @code{gnus-parameter-to-list-alist}.
2830
2831 @anchor{subscribed}
2832 @item subscribed
2833 @cindex subscribed
2834 @cindex Mail-Followup-To
2835 @findex gnus-find-subscribed-addresses
2836 If this parameter is set to @code{t}, Gnus will consider the
2837 to-address and to-list parameters for this group as addresses of
2838 mailing lists you are subscribed to.  Giving Gnus this information is
2839 (only) a first step in getting it to generate correct Mail-Followup-To
2840 headers for your posts to these lists.  The second step is to put the
2841 following in your @file{.gnus.el}
2842
2843 @lisp
2844 (setq message-subscribed-address-functions
2845       '(gnus-find-subscribed-addresses))
2846 @end lisp
2847
2848 @xref{Mailing Lists, ,Mailing Lists, message, The Message Manual}, for
2849 a complete treatment of available MFT support.
2850
2851 @item visible
2852 @cindex visible
2853 If the group parameter list has the element @code{(visible . t)},
2854 that group will always be visible in the Group buffer, regardless
2855 of whether it has any unread articles.
2856
2857 This parameter cannot be set via @code{gnus-parameters}. See
2858 @code{gnus-permanently-visible-groups} as an alternative.
2859
2860 @item broken-reply-to
2861 @cindex broken-reply-to
2862 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2863 headers in this group are to be ignored, and for the header to be hidden
2864 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2865 can be useful if you're reading a mailing list group where the listserv
2866 has inserted @code{Reply-To} headers that point back to the listserv
2867 itself.  That is broken behavior.  So there!
2868
2869 @item to-group
2870 @cindex to-group
2871 Elements like @code{(to-group . "some.group.name")} means that all
2872 posts in that group will be sent to @code{some.group.name}.
2873
2874 @item newsgroup
2875 @cindex newsgroup
2876 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2877 will treat all responses as if they were responses to news articles.
2878 This can be useful if you have a mail group that's really a mirror of a
2879 news group.
2880
2881 @item gcc-self
2882 @cindex gcc-self
2883 If @code{(gcc-self . t)} is present in the group parameter list, newly
2884 composed messages will be @code{Gcc}'d to the current group.  If
2885 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2886 generated, if @code{(gcc-self . "string")} is present, this string will
2887 be inserted literally as a @code{gcc} header.  This parameter takes
2888 precedence over any default @code{Gcc} rules as described later
2889 (@pxref{Archived Messages}), with the exception for messages to resend.
2890
2891 @strong{Caveat}: Adding @code{(gcc-self . t)} to the parameter list of
2892 @code{nntp} groups (or the like) isn't valid.  An @code{nntp} server
2893 doesn't accept articles.
2894
2895 @item auto-expire
2896 @cindex auto-expire
2897 @cindex expiring mail
2898 If the group parameter has an element that looks like @code{(auto-expire
2899 . t)}, all articles read will be marked as expirable.  For an
2900 alternative approach, @pxref{Expiring Mail}.
2901
2902 See also @code{gnus-auto-expirable-newsgroups}.
2903
2904 @item total-expire
2905 @cindex total-expire
2906 @cindex expiring mail
2907 If the group parameter has an element that looks like
2908 @code{(total-expire . t)}, all read articles will be put through the
2909 expiry process, even if they are not marked as expirable.  Use with
2910 caution.  Unread, ticked and dormant articles are not eligible for
2911 expiry.
2912
2913 See also @code{gnus-total-expirable-newsgroups}.
2914
2915 @item expiry-wait
2916 @cindex expiry-wait
2917 @vindex nnmail-expiry-wait-function
2918 If the group parameter has an element that looks like
2919 @code{(expiry-wait . 10)}, this value will override any
2920 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2921 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2922 can either be a number of days (not necessarily an integer) or the
2923 symbols @code{never} or @code{immediate}.
2924
2925 @item expiry-target
2926 @cindex expiry-target
2927 Where expired messages end up.  This parameter overrides
2928 @code{nnmail-expiry-target}.
2929
2930 @item score-file
2931 @cindex score file group parameter
2932 Elements that look like @code{(score-file . "file")} will make
2933 @file{file} into the current score file for the group in question.  All
2934 interactive score entries will be put into this file.
2935
2936 @item adapt-file
2937 @cindex adapt file group parameter
2938 Elements that look like @code{(adapt-file . "file")} will make
2939 @file{file} into the current adaptive file for the group in question.
2940 All adaptive score entries will be put into this file.
2941
2942 @item admin-address
2943 @cindex admin-address
2944 When unsubscribing from a mailing list you should never send the
2945 unsubscription notice to the mailing list itself.  Instead, you'd send
2946 messages to the administrative address.  This parameter allows you to
2947 put the admin address somewhere convenient.
2948
2949 @item display
2950 @cindex display
2951 Elements that look like @code{(display . MODE)} say which articles to
2952 display on entering the group.  Valid values are:
2953
2954 @table @code
2955 @item all
2956 Display all articles, both read and unread.
2957
2958 @item an integer
2959 Display the last @var{integer} articles in the group.  This is the same as
2960 entering the group with @kbd{C-u @var{integer}}.
2961
2962 @item default
2963 Display the default visible articles, which normally includes unread and
2964 ticked articles.
2965
2966 @item an array
2967 Display articles that satisfy a predicate.
2968
2969 Here are some examples:
2970
2971 @table @code
2972 @item [unread]
2973 Display only unread articles.
2974
2975 @item [not expire]
2976 Display everything except expirable articles.
2977
2978 @item [and (not reply) (not expire)]
2979 Display everything except expirable and articles you've already
2980 responded to.
2981 @end table
2982
2983 The available operators are @code{not}, @code{and} and @code{or}.
2984 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2985 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2986 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2987 @code{cache}, @code{forward}, and @code{unseen}.
2988
2989 @end table
2990
2991 The @code{display} parameter works by limiting the summary buffer to
2992 the subset specified.  You can pop the limit by using the @kbd{/ w}
2993 command (@pxref{Limiting}).
2994
2995 @item comment
2996 @cindex comment
2997 Elements that look like @code{(comment . "This is a comment")} are
2998 arbitrary comments on the group.  You can display comments in the
2999 group line (@pxref{Group Line Specification}).
3000
3001 @item charset
3002 @cindex charset
3003 Elements that look like @code{(charset . iso-8859-1)} will make
3004 @code{iso-8859-1} the default charset; that is, the charset that will be
3005 used for all articles that do not specify a charset.
3006
3007 See also @code{gnus-group-charset-alist}.
3008
3009 @item ignored-charsets
3010 @cindex ignored-charset
3011 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
3012 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
3013 default charset will be used for decoding articles.
3014
3015 See also @code{gnus-group-ignored-charsets-alist}.
3016
3017 @item posting-style
3018 @cindex posting-style
3019 You can store additional posting style information for this group
3020 here (@pxref{Posting Styles}).  The format is that of an entry in the
3021 @code{gnus-posting-styles} alist, except that there's no regexp matching
3022 the group name (of course).  Style elements in this group parameter will
3023 take precedence over the ones found in @code{gnus-posting-styles}.
3024
3025 For instance, if you want a funky name and signature in this group only,
3026 instead of hacking @code{gnus-posting-styles}, you could put something
3027 like this in the group parameters:
3028
3029 @example
3030 (posting-style
3031   (name "Funky Name")
3032   ("X-Message-SMTP-Method" "smtp smtp.example.org 587")
3033   ("X-My-Header" "Funky Value")
3034   (signature "Funky Signature"))
3035 @end example
3036
3037 If you're using topics to organize your group buffer
3038 (@pxref{Group Topics}), note that posting styles can also be set in
3039 the topics parameters. Posting styles in topic parameters apply to all
3040 groups in this topic. More precisely, the posting-style settings for a
3041 group result from the hierarchical merging of all posting-style
3042 entries in the parameters of this group and all the topics it belongs
3043 to.
3044
3045
3046 @item post-method
3047 @cindex post-method
3048 If it is set, the value is used as the method for posting message
3049 instead of @code{gnus-post-method}.
3050
3051 @item mail-source
3052 @cindex mail-source
3053 If it is set, and the setting of @code{mail-sources} includes a
3054 @code{group} mail source (@pxref{Mail Sources}), the value is a
3055 mail source for this group.
3056
3057 @item banner
3058 @cindex banner
3059 An item like @code{(banner . @var{regexp})} causes any part of an article
3060 that matches the regular expression @var{regexp} to be stripped.  Instead of
3061 @var{regexp}, you can also use the symbol @code{signature} which strips the
3062 last signature or any of the elements of the alist
3063 @code{gnus-article-banner-alist}.
3064
3065 @item sieve
3066 @cindex sieve
3067 This parameter contains a Sieve test that should match incoming mail
3068 that should be placed in this group.  From this group parameter, a
3069 Sieve @samp{IF} control structure is generated, having the test as the
3070 condition and @samp{fileinto "group.name";} as the body.
3071
3072 For example, if the @samp{INBOX.list.sieve} group has the @code{(sieve
3073 address "sender" "sieve-admin@@extundo.com")} group parameter, when
3074 translating the group parameter into a Sieve script (@pxref{Sieve
3075 Commands}) the following Sieve code is generated:
3076
3077 @example
3078 if address "sender" "sieve-admin@@extundo.com" @{
3079         fileinto "INBOX.list.sieve";
3080 @}
3081 @end example
3082
3083 To generate tests for multiple email-addresses use a group parameter
3084 like @code{(sieve address "sender" ("name@@one.org" else@@two.org"))}.
3085 When generating a sieve script (@pxref{Sieve Commands}) Sieve code
3086 like the following is generated:
3087
3088 @example
3089 if address "sender" ["name@@one.org", "else@@two.org"] @{
3090         fileinto "INBOX.list.sieve";
3091 @}
3092 @end example
3093
3094 You can also use regexp expansions in the rules:
3095
3096 @example
3097 (sieve header :regex "list-id" "<c++std-\\1.accu.org>")
3098 @end example
3099
3100 See @pxref{Sieve Commands} for commands and variables that might be of
3101 interest in relation to the sieve parameter.
3102
3103 The Sieve language is described in RFC 3028.  @xref{Top, Emacs Sieve,
3104 Top, sieve, Emacs Sieve}.
3105
3106 @item (agent parameters)
3107 If the agent has been enabled, you can set any of its parameters to
3108 control the behavior of the agent in individual groups.  See Agent
3109 Parameters in @ref{Category Syntax}.  Most users will choose to set
3110 agent parameters in either an agent category or group topic to
3111 minimize the configuration effort.
3112
3113 @item (@var{variable} @var{form})
3114 You can use the group parameters to set variables local to the group you
3115 are entering.  If you want to turn threading off in @samp{news.answers},
3116 you could put @code{(gnus-show-threads nil)} in the group parameters of
3117 that group.  @code{gnus-show-threads} will be made into a local variable
3118 in the summary buffer you enter, and the form @code{nil} will be
3119 @code{eval}ed there.
3120
3121 Note that this feature sets the variable locally to the summary buffer
3122 if and only if @var{variable} has been bound as a variable.  Otherwise,
3123 only evaluating the form will take place.  So, you may want to bind the
3124 variable in advance using @code{defvar} or other if the result of the
3125 form needs to be set to it.
3126
3127 But some variables are evaluated in the article buffer, or in the
3128 message buffer (of a reply or followup or otherwise newly created
3129 message).  As a workaround, it might help to add the variable in
3130 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
3131 Stuff}.  So if you want to set @code{message-from-style} via the group
3132 parameters, then you may need the following statement elsewhere in your
3133 @file{~/.gnus.el} file:
3134
3135 @lisp
3136 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
3137 @end lisp
3138
3139 @vindex gnus-list-identifiers
3140 A use for this feature is to remove a mailing list identifier tag in
3141 the subject fields of articles.  E.g., if the news group
3142
3143 @example
3144 nntp+news.gnus.org:gmane.text.docbook.apps
3145 @end example
3146
3147 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
3148 tag can be removed from the article subjects in the summary buffer for
3149 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
3150 into the group parameters for the group.
3151
3152 This can also be used as a group-specific hook function.  If you want to
3153 hear a beep when you enter a group, you could put something like
3154 @code{(dummy-variable (ding))} in the parameters of that group.  If
3155 @code{dummy-variable} has been bound (see above), it will be set to the
3156 (meaningless) result of the @code{(ding)} form.
3157
3158 Alternatively, since the VARIABLE becomes local to the group, this
3159 pattern can be used to temporarily change a hook.  For example, if the
3160 following is added to a group parameter
3161
3162 @lisp
3163 (gnus-summary-prepared-hook
3164   (lambda nil (local-set-key "d" (local-key-binding "n"))))
3165 @end lisp
3166
3167 when the group is entered, the 'd' key will not mark the article as
3168 expired.
3169
3170 @end table
3171
3172 @vindex gnus-parameters
3173 Group parameters can be set via the @code{gnus-parameters} variable too.
3174 But some variables, such as @code{visible}, have no effect (For this
3175 case see @code{gnus-permanently-visible-groups} as an alternative.).
3176 For example:
3177
3178 @lisp
3179 (setq gnus-parameters
3180       '(("mail\\..*"
3181          (gnus-show-threads nil)
3182          (gnus-use-scoring nil)
3183          (gnus-summary-line-format
3184           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3185          (gcc-self . t)
3186          (display . all))
3187
3188         ("^nnimap:\\(foo.bar\\)$"
3189          (to-group . "\\1"))
3190
3191         ("mail\\.me"
3192          (gnus-use-scoring t))
3193
3194         ("list\\..*"
3195          (total-expire . t)
3196          (broken-reply-to . t))))
3197 @end lisp
3198
3199 All clauses that matches the group name will be used, but the last
3200 setting ``wins''.  So if you have two clauses that both match the
3201 group name, and both set, say @code{display}, the last setting will
3202 override the first.
3203
3204 Parameters that are strings will be subjected to regexp substitution,
3205 as the @code{to-group} example shows.
3206
3207 @vindex gnus-parameters-case-fold-search
3208 By default, whether comparing the group name and one of those regexps
3209 specified in @code{gnus-parameters} is done in a case-sensitive manner
3210 or a case-insensitive manner depends on the value of
3211 @code{case-fold-search} at the time when the comparison is done.  The
3212 value of @code{case-fold-search} is typically @code{t}; it means, for
3213 example, the element @code{("INBOX\\.FOO" (total-expire . t))} might be
3214 applied to both the @samp{INBOX.FOO} group and the @samp{INBOX.foo}
3215 group.  If you want to make those regexps always case-sensitive, set the
3216 value of the @code{gnus-parameters-case-fold-search} variable to
3217 @code{nil}.  Otherwise, set it to @code{t} if you want to compare them
3218 always in a case-insensitive manner.
3219
3220 You can define different sorting to different groups via
3221 @code{gnus-parameters}.  Here is an example to sort an @acronym{NNTP}
3222 group by reverse date to see the latest news at the top and an
3223 @acronym{RSS} group by subject.  In this example, the first group is the
3224 Debian daily news group @code{gmane.linux.debian.user.news} from
3225 news.gmane.org.  The @acronym{RSS} group corresponds to the Debian
3226 weekly news RSS feed
3227 @url{http://packages.debian.org/unstable/newpkg_main.en.rdf},
3228 @xref{RSS}.
3229
3230 @lisp
3231 (setq
3232  gnus-parameters
3233  '(("nntp.*gmane\\.debian\\.user\\.news"
3234     (gnus-show-threads nil)
3235     (gnus-article-sort-functions '((not gnus-article-sort-by-date)))
3236     (gnus-use-adaptive-scoring nil)
3237     (gnus-use-scoring nil))
3238    ("nnrss.*debian"
3239     (gnus-show-threads nil)
3240     (gnus-article-sort-functions 'gnus-article-sort-by-subject)
3241     (gnus-use-adaptive-scoring nil)
3242     (gnus-use-scoring t)
3243     (gnus-score-find-score-files-function 'gnus-score-find-single)
3244     (gnus-summary-line-format "%U%R%z%d %I%(%[ %s %]%)\n"))))
3245 @end lisp
3246
3247
3248 @node Listing Groups
3249 @section Listing Groups
3250 @cindex group listing
3251
3252 These commands all list various slices of the groups available.
3253
3254 @table @kbd
3255
3256 @item l
3257 @itemx A s
3258 @kindex A s (Group)
3259 @kindex l (Group)
3260 @findex gnus-group-list-groups
3261 List all groups that have unread articles
3262 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3263 command will list only groups of level ARG and lower.  By default, it
3264 only lists groups of level five (i.e.,
3265 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3266 groups).
3267
3268 @item L
3269 @itemx A u
3270 @kindex A u (Group)
3271 @kindex L (Group)
3272 @findex gnus-group-list-all-groups
3273 List all groups, whether they have unread articles or not
3274 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3275 this command will list only groups of level ARG and lower.  By default,
3276 it lists groups of level seven or lower (i.e., just subscribed and
3277 unsubscribed groups).
3278
3279 @item A l
3280 @kindex A l (Group)
3281 @findex gnus-group-list-level
3282 List all unread groups on a specific level
3283 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3284 with no unread articles.
3285
3286 @item A k
3287 @kindex A k (Group)
3288 @findex gnus-group-list-killed
3289 List all killed groups (@code{gnus-group-list-killed}).  If given a
3290 prefix argument, really list all groups that are available, but aren't
3291 currently (un)subscribed.  This could entail reading the active file
3292 from the server.
3293
3294 @item A z
3295 @kindex A z (Group)
3296 @findex gnus-group-list-zombies
3297 List all zombie groups (@code{gnus-group-list-zombies}).
3298
3299 @item A m
3300 @kindex A m (Group)
3301 @findex gnus-group-list-matching
3302 List all unread, subscribed groups with names that match a regexp
3303 (@code{gnus-group-list-matching}).
3304
3305 @item A M
3306 @kindex A M (Group)
3307 @findex gnus-group-list-all-matching
3308 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3309
3310 @item A A
3311 @kindex A A (Group)
3312 @findex gnus-group-list-active
3313 List absolutely all groups in the active file(s) of the
3314 server(s) you are connected to (@code{gnus-group-list-active}).  This
3315 might very well take quite a while.  It might actually be a better idea
3316 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3317 thing to match on.  Also note that this command may list groups that
3318 don't exist (yet)---these will be listed as if they were killed groups.
3319 Take the output with some grains of salt.
3320
3321 @item A a
3322 @kindex A a (Group)
3323 @findex gnus-group-apropos
3324 List all groups that have names that match a regexp
3325 (@code{gnus-group-apropos}).
3326
3327 @item A d
3328 @kindex A d (Group)
3329 @findex gnus-group-description-apropos
3330 List all groups that have names or descriptions that match a regexp
3331 (@code{gnus-group-description-apropos}).
3332
3333 @item A c
3334 @kindex A c (Group)
3335 @findex gnus-group-list-cached
3336 List all groups with cached articles (@code{gnus-group-list-cached}).
3337
3338 @item A ?
3339 @kindex A ? (Group)
3340 @findex gnus-group-list-dormant
3341 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3342
3343 @item A !
3344 @kindex A ! (Group)
3345 @findex gnus-group-list-ticked
3346 List all groups with ticked articles (@code{gnus-group-list-ticked}).
3347
3348 @item A /
3349 @kindex A / (Group)
3350 @findex gnus-group-list-limit
3351 Further limit groups within the current selection
3352 (@code{gnus-group-list-limit}).  If you've first limited to groups
3353 with dormant articles with @kbd{A ?}, you can then further limit with
3354 @kbd{A / c}, which will then limit to groups with cached articles,
3355 giving you the groups that have both dormant articles and cached
3356 articles.
3357
3358 @item A f
3359 @kindex A f (Group)
3360 @findex gnus-group-list-flush
3361 Flush groups from the current selection (@code{gnus-group-list-flush}).
3362
3363 @item A p
3364 @kindex A p (Group)
3365 @findex gnus-group-list-plus
3366 List groups plus the current selection (@code{gnus-group-list-plus}).
3367
3368 @end table
3369
3370 @vindex gnus-permanently-visible-groups
3371 @cindex visible group parameter
3372 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3373 always be shown, whether they have unread articles or not.  You can also
3374 add the @code{visible} element to the group parameters in question to
3375 get the same effect.
3376
3377 @vindex gnus-list-groups-with-ticked-articles
3378 Groups that have just ticked articles in it are normally listed in the
3379 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3380 @code{nil}, these groups will be treated just like totally empty
3381 groups.  It is @code{t} by default.
3382
3383
3384 @node Sorting Groups
3385 @section Sorting Groups
3386 @cindex sorting groups
3387
3388 @kindex C-c C-s (Group)
3389 @findex gnus-group-sort-groups
3390 @vindex gnus-group-sort-function
3391 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3392 group buffer according to the function(s) given by the
3393 @code{gnus-group-sort-function} variable.  Available sorting functions
3394 include:
3395
3396 @table @code
3397
3398 @item gnus-group-sort-by-alphabet
3399 @findex gnus-group-sort-by-alphabet
3400 Sort the group names alphabetically.  This is the default.
3401
3402 @item gnus-group-sort-by-real-name
3403 @findex gnus-group-sort-by-real-name
3404 Sort the group alphabetically on the real (unprefixed) group names.
3405
3406 @item gnus-group-sort-by-level
3407 @findex gnus-group-sort-by-level
3408 Sort by group level.
3409
3410 @item gnus-group-sort-by-score
3411 @findex gnus-group-sort-by-score
3412 Sort by group score.  @xref{Group Score}.
3413
3414 @item gnus-group-sort-by-rank
3415 @findex gnus-group-sort-by-rank
3416 Sort by group score and then the group level.  The level and the score
3417 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3418
3419 @item gnus-group-sort-by-unread
3420 @findex gnus-group-sort-by-unread
3421 Sort by number of unread articles.
3422
3423 @item gnus-group-sort-by-method
3424 @findex gnus-group-sort-by-method
3425 Sort alphabetically on the select method.
3426
3427 @item gnus-group-sort-by-server
3428 @findex gnus-group-sort-by-server
3429 Sort alphabetically on the Gnus server name.
3430
3431
3432 @end table
3433
3434 @code{gnus-group-sort-function} can also be a list of sorting
3435 functions.  In that case, the most significant sort key function must be
3436 the last one.
3437
3438
3439 There are also a number of commands for sorting directly according to
3440 some sorting criteria:
3441
3442 @table @kbd
3443 @item G S a
3444 @kindex G S a (Group)
3445 @findex gnus-group-sort-groups-by-alphabet
3446 Sort the group buffer alphabetically by group name
3447 (@code{gnus-group-sort-groups-by-alphabet}).
3448
3449 @item G S u
3450 @kindex G S u (Group)
3451 @findex gnus-group-sort-groups-by-unread
3452 Sort the group buffer by the number of unread articles
3453 (@code{gnus-group-sort-groups-by-unread}).
3454
3455 @item G S l
3456 @kindex G S l (Group)
3457 @findex gnus-group-sort-groups-by-level
3458 Sort the group buffer by group level
3459 (@code{gnus-group-sort-groups-by-level}).
3460
3461 @item G S v
3462 @kindex G S v (Group)
3463 @findex gnus-group-sort-groups-by-score
3464 Sort the group buffer by group score
3465 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3466
3467 @item G S r
3468 @kindex G S r (Group)
3469 @findex gnus-group-sort-groups-by-rank
3470 Sort the group buffer by group rank
3471 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3472
3473 @item G S m
3474 @kindex G S m (Group)
3475 @findex gnus-group-sort-groups-by-method
3476 Sort the group buffer alphabetically by back end name@*
3477 (@code{gnus-group-sort-groups-by-method}).
3478
3479 @item G S n
3480 @kindex G S n (Group)
3481 @findex gnus-group-sort-groups-by-real-name
3482 Sort the group buffer alphabetically by real (unprefixed) group name
3483 (@code{gnus-group-sort-groups-by-real-name}).
3484
3485 @end table
3486
3487 All the commands below obey the process/prefix convention
3488 (@pxref{Process/Prefix}).
3489
3490 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3491 commands will sort in reverse order.
3492
3493 You can also sort a subset of the groups:
3494
3495 @table @kbd
3496 @item G P a
3497 @kindex G P a (Group)
3498 @findex gnus-group-sort-selected-groups-by-alphabet
3499 Sort the groups alphabetically by group name
3500 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3501
3502 @item G P u
3503 @kindex G P u (Group)
3504 @findex gnus-group-sort-selected-groups-by-unread
3505 Sort the groups by the number of unread articles
3506 (@code{gnus-group-sort-selected-groups-by-unread}).
3507
3508 @item G P l
3509 @kindex G P l (Group)
3510 @findex gnus-group-sort-selected-groups-by-level
3511 Sort the groups by group level
3512 (@code{gnus-group-sort-selected-groups-by-level}).
3513
3514 @item G P v
3515 @kindex G P v (Group)
3516 @findex gnus-group-sort-selected-groups-by-score
3517 Sort the groups by group score
3518 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3519
3520 @item G P r
3521 @kindex G P r (Group)
3522 @findex gnus-group-sort-selected-groups-by-rank
3523 Sort the groups by group rank
3524 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3525
3526 @item G P m
3527 @kindex G P m (Group)
3528 @findex gnus-group-sort-selected-groups-by-method
3529 Sort the groups alphabetically by back end name@*
3530 (@code{gnus-group-sort-selected-groups-by-method}).
3531
3532 @item G P n
3533 @kindex G P n (Group)
3534 @findex gnus-group-sort-selected-groups-by-real-name
3535 Sort the groups alphabetically by real (unprefixed) group name
3536 (@code{gnus-group-sort-selected-groups-by-real-name}).
3537
3538 @item G P s
3539 @kindex G P s (Group)
3540 @findex gnus-group-sort-selected-groups
3541 Sort the groups according to @code{gnus-group-sort-function}.
3542
3543 @end table
3544
3545 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3546 move groups around.
3547
3548
3549 @node Group Maintenance
3550 @section Group Maintenance
3551 @cindex bogus groups
3552
3553 @table @kbd
3554 @item b
3555 @kindex b (Group)
3556 @findex gnus-group-check-bogus-groups
3557 Find bogus groups and delete them
3558 (@code{gnus-group-check-bogus-groups}).
3559
3560 @item F
3561 @kindex F (Group)
3562 @findex gnus-group-find-new-groups
3563 Find new groups and process them (@code{gnus-group-find-new-groups}).
3564 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3565 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3566 to query the server for new groups, and subscribe the new groups as
3567 zombies.
3568
3569 @item C-c C-x
3570 @kindex C-c C-x (Group)
3571 @findex gnus-group-expire-articles
3572 @cindex expiring mail
3573 Run all expirable articles in the current group through the expiry
3574 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3575 all expirable articles in the group that have been around for a while.
3576 (@pxref{Expiring Mail}).
3577
3578 @item C-c C-M-x
3579 @kindex C-c C-M-x (Group)
3580 @findex gnus-group-expire-all-groups
3581 @cindex expiring mail
3582 Run all expirable articles in all groups through the expiry process
3583 (@code{gnus-group-expire-all-groups}).
3584
3585 @end table
3586
3587
3588 @node Browse Foreign Server
3589 @section Browse Foreign Server
3590 @cindex foreign servers
3591 @cindex browsing servers
3592
3593 @table @kbd
3594 @item B
3595 @kindex B (Group)
3596 @findex gnus-group-browse-foreign-server
3597 You will be queried for a select method and a server name.  Gnus will
3598 then attempt to contact this server and let you browse the groups there
3599 (@code{gnus-group-browse-foreign-server}).
3600 @end table
3601
3602 @findex gnus-browse-mode
3603 A new buffer with a list of available groups will appear.  This buffer
3604 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3605 a lot) like a normal group buffer.
3606
3607 Here's a list of keystrokes available in the browse mode:
3608
3609 @table @kbd
3610 @item n
3611 @kindex n (Browse)
3612 @findex gnus-group-next-group
3613 Go to the next group (@code{gnus-group-next-group}).
3614
3615 @item p
3616 @kindex p (Browse)
3617 @findex gnus-group-prev-group
3618 Go to the previous group (@code{gnus-group-prev-group}).
3619
3620 @item SPACE
3621 @kindex SPACE (Browse)
3622 @findex gnus-browse-read-group
3623 Enter the current group and display the first article
3624 (@code{gnus-browse-read-group}).
3625
3626 @item RET
3627 @kindex RET (Browse)
3628 @findex gnus-browse-select-group
3629 Enter the current group (@code{gnus-browse-select-group}).
3630
3631 @item u
3632 @kindex u (Browse)
3633 @findex gnus-browse-unsubscribe-current-group
3634 @vindex gnus-browse-subscribe-newsgroup-method
3635 Unsubscribe to the current group, or, as will be the case here,
3636 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).  You
3637 can affect the way the new group is entered into the Group buffer
3638 using the variable @code{gnus-browse-subscribe-newsgroup-method}.  See
3639 @pxref{Subscription Methods} for available options.
3640
3641 @item l
3642 @itemx q
3643 @kindex q (Browse)
3644 @kindex l (Browse)
3645 @findex gnus-browse-exit
3646 Exit browse mode (@code{gnus-browse-exit}).
3647
3648 @item d
3649 @kindex d (Browse)
3650 @findex gnus-browse-describe-group
3651 Describe the current group (@code{gnus-browse-describe-group}).
3652
3653 @item ?
3654 @kindex ? (Browse)
3655 @findex gnus-browse-describe-briefly
3656 Describe browse mode briefly (well, there's not much to describe, is
3657 there) (@code{gnus-browse-describe-briefly}).
3658
3659 @item DEL
3660 @kindex DEL (Browse)
3661 @findex gnus-browse-delete-group
3662 This function will delete the current group
3663 (@code{gnus-browse-delete-group}).  If given a prefix, this function
3664 will actually delete all the articles in the group, and forcibly
3665 remove the group itself from the face of the Earth.  Use a prefix only
3666 if you are absolutely sure of what you are doing.
3667 @end table
3668
3669
3670 @node Exiting Gnus
3671 @section Exiting Gnus
3672 @cindex exiting Gnus
3673
3674 Yes, Gnus is ex(c)iting.
3675
3676 @table @kbd
3677 @item z
3678 @kindex z (Group)
3679 @findex gnus-group-suspend
3680 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3681 but it kills all buffers except the Group buffer.  I'm not sure why this
3682 is a gain, but then who am I to judge?
3683
3684 @item q
3685 @kindex q (Group)
3686 @findex gnus-group-exit
3687 @c @icon{gnus-group-exit}
3688 Quit Gnus (@code{gnus-group-exit}).
3689
3690 @item Q
3691 @kindex Q (Group)
3692 @findex gnus-group-quit
3693 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3694 The dribble file will be saved, though (@pxref{Auto Save}).
3695 @end table
3696
3697 @vindex gnus-exit-gnus-hook
3698 @vindex gnus-suspend-gnus-hook
3699 @vindex gnus-after-exiting-gnus-hook
3700 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3701 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3702 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3703 exiting Gnus.
3704
3705 Note:
3706
3707 @quotation
3708 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3709 numbly heavy and herself fall into a hazy trance as the boy sitting
3710 behind her drew repeated lines with his pencil across the back of her
3711 plastic chair.
3712 @end quotation
3713
3714
3715 @node Group Topics
3716 @section Group Topics
3717 @cindex topics
3718
3719 If you read lots and lots of groups, it might be convenient to group
3720 them hierarchically according to topics.  You put your Emacs groups over
3721 here, your sex groups over there, and the rest (what, two groups or so?)
3722 you put in some misc section that you never bother with anyway.  You can
3723 even group the Emacs sex groups as a sub-topic to either the Emacs
3724 groups or the sex groups---or both!  Go wild!
3725
3726 @iftex
3727 @iflatex
3728 \gnusfigure{Group Topics}{400}{
3729 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3730 }
3731 @end iflatex
3732 @end iftex
3733
3734 Here's an example:
3735
3736 @example
3737 Gnus
3738   Emacs -- I wuw it!
3739      3: comp.emacs
3740      2: alt.religion.emacs
3741     Naughty Emacs
3742      452: alt.sex.emacs
3743        0: comp.talk.emacs.recovery
3744   Misc
3745      8: comp.binaries.fractals
3746     13: comp.sources.unix
3747 @end example
3748
3749 @findex gnus-topic-mode
3750 @kindex t (Group)
3751 To get this @emph{fab} functionality you simply turn on (ooh!) the
3752 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3753 is a toggling command.)
3754
3755 Go ahead, just try it.  I'll still be here when you get back.  La de
3756 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3757 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3758 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3759 Hot and bothered?
3760
3761 If you want this permanently enabled, you should add that minor mode to
3762 the hook for the group mode.  Put the following line in your
3763 @file{~/.gnus.el} file:
3764
3765 @lisp
3766 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3767 @end lisp
3768
3769 @menu
3770 * Topic Commands::              Interactive E-Z commands.
3771 * Topic Variables::             How to customize the topics the Lisp Way.
3772 * Topic Sorting::               Sorting each topic individually.
3773 * Topic Topology::              A map of the world.
3774 * Topic Parameters::            Parameters that apply to all groups in a topic.
3775 @end menu
3776
3777
3778 @node Topic Commands
3779 @subsection Topic Commands
3780 @cindex topic commands
3781
3782 When the topic minor mode is turned on, a new @kbd{T} submap will be
3783 available.  In addition, a few of the standard keys change their
3784 definitions slightly.
3785
3786 In general, the following kinds of operations are possible on topics.
3787 First of all, you want to create topics.  Secondly, you want to put
3788 groups in topics and to move them around until you have an order you
3789 like.  The third kind of operation is to show/hide parts of the whole
3790 shebang.  You might want to hide a topic including its subtopics and
3791 groups, to get a better overview of the other groups.
3792
3793 Here is a list of the basic keys that you might need to set up topics
3794 the way you like.
3795
3796 @table @kbd
3797
3798 @item T n
3799 @kindex T n (Topic)
3800 @findex gnus-topic-create-topic
3801 Prompt for a new topic name and create it
3802 (@code{gnus-topic-create-topic}).
3803
3804 @item T TAB
3805 @itemx TAB
3806 @kindex T TAB (Topic)
3807 @kindex TAB (Topic)
3808 @findex gnus-topic-indent
3809 ``Indent'' the current topic so that it becomes a sub-topic of the
3810 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3811 ``un-indent'' the topic instead.
3812
3813 @item M-TAB
3814 @kindex M-TAB (Topic)
3815 @findex gnus-topic-unindent
3816 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3817 parent of its current parent (@code{gnus-topic-unindent}).
3818
3819 @end table
3820
3821 The following two keys can be used to move groups and topics around.
3822 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3823 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3824 kill and yank rather than cut and paste.
3825
3826 @table @kbd
3827
3828 @item C-k
3829 @kindex C-k (Topic)
3830 @findex gnus-topic-kill-group
3831 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3832 topic will be removed along with the topic.
3833
3834 @item C-y
3835 @kindex C-y (Topic)
3836 @findex gnus-topic-yank-group
3837 Yank the previously killed group or topic
3838 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3839 before all groups.
3840
3841 So, to move a topic to the beginning of the list of topics, just hit
3842 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3843 move the cursor to the beginning of the buffer (just below the ``Gnus''
3844 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3845 paste.  Like I said---E-Z.
3846
3847 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3848 you can move topics around as well as groups.
3849
3850 @end table
3851
3852 After setting up the topics the way you like them, you might wish to
3853 hide a topic, or to show it again.  That's why we have the following
3854 key.
3855
3856 @table @kbd
3857
3858 @item RET
3859 @kindex RET (Topic)
3860 @findex gnus-topic-select-group
3861 @itemx SPACE
3862 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3863 When you perform this command on a group, you'll enter the group, as
3864 usual.  When done on a topic line, the topic will be folded (if it was
3865 visible) or unfolded (if it was folded already).  So it's basically a
3866 toggling command on topics.  In addition, if you give a numerical
3867 prefix, group on that level (and lower) will be displayed.
3868
3869 @end table
3870
3871 Now for a list of other commands, in no particular order.
3872
3873 @table @kbd
3874
3875 @item T m
3876 @kindex T m (Topic)
3877 @findex gnus-topic-move-group
3878 Move the current group to some other topic
3879 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3880 convention (@pxref{Process/Prefix}).
3881
3882 @item T j
3883 @kindex T j (Topic)
3884 @findex gnus-topic-jump-to-topic
3885 Go to a topic (@code{gnus-topic-jump-to-topic}).
3886
3887 @item T c
3888 @kindex T c (Topic)
3889 @findex gnus-topic-copy-group
3890 Copy the current group to some other topic
3891 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3892 convention (@pxref{Process/Prefix}).
3893
3894 @item T h
3895 @kindex T h (Topic)
3896 @findex gnus-topic-hide-topic
3897 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3898 a prefix, hide the topic permanently.
3899
3900 @item T s
3901 @kindex T s (Topic)
3902 @findex gnus-topic-show-topic
3903 Show the current topic (@code{gnus-topic-show-topic}).  If given
3904 a prefix, show the topic permanently.
3905
3906 @item T D
3907 @kindex T D (Topic)
3908 @findex gnus-topic-remove-group
3909 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3910 This command is mainly useful if you have the same group in several
3911 topics and wish to remove it from one of the topics.  You may also
3912 remove a group from all topics, but in that case, Gnus will add it to
3913 the root topic the next time you start Gnus.  In fact, all new groups
3914 (which, naturally, don't belong to any topic) will show up in the root
3915 topic.
3916
3917 This command uses the process/prefix convention
3918 (@pxref{Process/Prefix}).
3919
3920 @item T M
3921 @kindex T M (Topic)
3922 @findex gnus-topic-move-matching
3923 Move all groups that match some regular expression to a topic
3924 (@code{gnus-topic-move-matching}).
3925
3926 @item T C
3927 @kindex T C (Topic)
3928 @findex gnus-topic-copy-matching
3929 Copy all groups that match some regular expression to a topic
3930 (@code{gnus-topic-copy-matching}).
3931
3932 @item T H
3933 @kindex T H (Topic)
3934 @findex gnus-topic-toggle-display-empty-topics
3935 Toggle hiding empty topics
3936 (@code{gnus-topic-toggle-display-empty-topics}).
3937
3938 @item T #
3939 @kindex T # (Topic)
3940 @findex gnus-topic-mark-topic
3941 Mark all groups in the current topic with the process mark
3942 (@code{gnus-topic-mark-topic}).  This command works recursively on
3943 sub-topics unless given a prefix.
3944
3945 @item T M-#
3946 @kindex T M-# (Topic)
3947 @findex gnus-topic-unmark-topic
3948 Remove the process mark from all groups in the current topic
3949 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3950 sub-topics unless given a prefix.
3951
3952 @item C-c C-x
3953 @kindex C-c C-x (Topic)
3954 @findex gnus-topic-expire-articles
3955 @cindex expiring mail
3956 Run all expirable articles in the current group or topic through the
3957 expiry process (if any)
3958 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3959
3960 @item T r
3961 @kindex T r (Topic)
3962 @findex gnus-topic-rename
3963 Rename a topic (@code{gnus-topic-rename}).
3964
3965 @item T DEL
3966 @kindex T DEL (Topic)
3967 @findex gnus-topic-delete
3968 Delete an empty topic (@code{gnus-topic-delete}).
3969
3970 @item A T
3971 @kindex A T (Topic)
3972 @findex gnus-topic-list-active
3973 List all groups that Gnus knows about in a topics-ified way
3974 (@code{gnus-topic-list-active}).
3975
3976 @item T M-n
3977 @kindex T M-n (Topic)
3978 @findex gnus-topic-goto-next-topic
3979 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3980
3981 @item T M-p
3982 @kindex T M-p (Topic)
3983 @findex gnus-topic-goto-previous-topic
3984 Go to the previous topic (@code{gnus-topic-goto-previous-topic}).
3985
3986 @item G p
3987 @kindex G p (Topic)
3988 @findex gnus-topic-edit-parameters
3989 @cindex group parameters
3990 @cindex topic parameters
3991 @cindex parameters
3992 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3993 @xref{Topic Parameters}.
3994
3995 @end table
3996
3997
3998 @node Topic Variables
3999 @subsection Topic Variables
4000 @cindex topic variables
4001
4002 The previous section told you how to tell Gnus which topics to display.
4003 This section explains how to tell Gnus what to display about each topic.
4004
4005 @vindex gnus-topic-line-format
4006 The topic lines themselves are created according to the
4007 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
4008 Valid elements are:
4009
4010 @table @samp
4011 @item i
4012 Indentation.
4013 @item n
4014 Topic name.
4015 @item v
4016 Visibility.
4017 @item l
4018 Level.
4019 @item g
4020 Number of groups in the topic.
4021 @item a
4022 Number of unread articles in the topic.
4023 @item A
4024 Number of unread articles in the topic and all its subtopics.
4025 @end table
4026
4027 @vindex gnus-topic-indent-level
4028 Each sub-topic (and the groups in the sub-topics) will be indented with
4029 @code{gnus-topic-indent-level} times the topic level number of spaces.
4030 The default is 2.
4031
4032 @vindex gnus-topic-mode-hook
4033 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
4034
4035 @vindex gnus-topic-display-empty-topics
4036 The @code{gnus-topic-display-empty-topics} says whether to display even
4037 topics that have no unread articles in them.  The default is @code{t}.
4038
4039
4040 @node Topic Sorting
4041 @subsection Topic Sorting
4042 @cindex topic sorting
4043
4044 You can sort the groups in each topic individually with the following
4045 commands:
4046
4047
4048 @table @kbd
4049 @item T S a
4050 @kindex T S a (Topic)
4051 @findex gnus-topic-sort-groups-by-alphabet
4052 Sort the current topic alphabetically by group name
4053 (@code{gnus-topic-sort-groups-by-alphabet}).
4054
4055 @item T S u
4056 @kindex T S u (Topic)
4057 @findex gnus-topic-sort-groups-by-unread
4058 Sort the current topic by the number of unread articles
4059 (@code{gnus-topic-sort-groups-by-unread}).
4060
4061 @item T S l
4062 @kindex T S l (Topic)
4063 @findex gnus-topic-sort-groups-by-level
4064 Sort the current topic by group level
4065 (@code{gnus-topic-sort-groups-by-level}).
4066
4067 @item T S v
4068 @kindex T S v (Topic)
4069 @findex gnus-topic-sort-groups-by-score
4070 Sort the current topic by group score
4071 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
4072
4073 @item T S r
4074 @kindex T S r (Topic)
4075 @findex gnus-topic-sort-groups-by-rank
4076 Sort the current topic by group rank
4077 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
4078
4079 @item T S m
4080 @kindex T S m (Topic)
4081 @findex gnus-topic-sort-groups-by-method
4082 Sort the current topic alphabetically by back end name
4083 (@code{gnus-topic-sort-groups-by-method}).
4084
4085 @item T S e
4086 @kindex T S e (Topic)
4087 @findex gnus-topic-sort-groups-by-server
4088 Sort the current topic alphabetically by server name
4089 (@code{gnus-topic-sort-groups-by-server}).
4090
4091 @item T S s
4092 @kindex T S s (Topic)
4093 @findex gnus-topic-sort-groups
4094 Sort the current topic according to the function(s) given by the
4095 @code{gnus-group-sort-function} variable
4096 (@code{gnus-topic-sort-groups}).
4097
4098 @end table
4099
4100 When given a prefix argument, all these commands will sort in reverse
4101 order.  @xref{Sorting Groups}, for more information about group
4102 sorting.
4103
4104
4105 @node Topic Topology
4106 @subsection Topic Topology
4107 @cindex topic topology
4108 @cindex topology
4109
4110 So, let's have a look at an example group buffer:
4111
4112 @example
4113 @group
4114 Gnus
4115   Emacs -- I wuw it!
4116      3: comp.emacs
4117      2: alt.religion.emacs
4118     Naughty Emacs
4119      452: alt.sex.emacs
4120        0: comp.talk.emacs.recovery
4121   Misc
4122      8: comp.binaries.fractals
4123     13: comp.sources.unix
4124 @end group
4125 @end example
4126
4127 So, here we have one top-level topic (@samp{Gnus}), two topics under
4128 that, and one sub-topic under one of the sub-topics.  (There is always
4129 just one (1) top-level topic).  This topology can be expressed as
4130 follows:
4131
4132 @lisp
4133 (("Gnus" visible)
4134  (("Emacs -- I wuw it!" visible)
4135   (("Naughty Emacs" visible)))
4136  (("Misc" visible)))
4137 @end lisp
4138
4139 @vindex gnus-topic-topology
4140 This is in fact how the variable @code{gnus-topic-topology} would look
4141 for the display above.  That variable is saved in the @file{.newsrc.eld}
4142 file, and shouldn't be messed with manually---unless you really want
4143 to.  Since this variable is read from the @file{.newsrc.eld} file,
4144 setting it in any other startup files will have no effect.
4145
4146 This topology shows what topics are sub-topics of what topics (right),
4147 and which topics are visible.  Two settings are currently
4148 allowed---@code{visible} and @code{invisible}.
4149
4150
4151 @node Topic Parameters
4152 @subsection Topic Parameters
4153 @cindex topic parameters
4154
4155 All groups in a topic will inherit group parameters from the parent
4156 (and ancestor) topic parameters.  All valid group parameters are valid
4157 topic parameters (@pxref{Group Parameters}).  When the agent is
4158 enabled, all agent parameters (See Agent Parameters in @ref{Category
4159 Syntax}) are also valid topic parameters.
4160
4161 In addition, the following parameters are only valid as topic
4162 parameters:
4163
4164 @table @code
4165 @item subscribe
4166 When subscribing new groups by topic (@pxref{Subscription Methods}), the
4167 @code{subscribe} topic parameter says what groups go in what topic.  Its
4168 value should be a regexp to match the groups that should go in that
4169 topic.
4170
4171 @item subscribe-level
4172 When subscribing new groups by topic (see the @code{subscribe} parameter),
4173 the group will be subscribed with the level specified in the
4174 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
4175
4176 @end table
4177
4178 Group parameters (of course) override topic parameters, and topic
4179 parameters in sub-topics override topic parameters in super-topics.  You
4180 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
4181 verb, although you may feel free to disagree with me here.)
4182
4183 @example
4184 @group
4185 Gnus
4186   Emacs
4187      3: comp.emacs
4188      2: alt.religion.emacs
4189    452: alt.sex.emacs
4190     Relief
4191      452: alt.sex.emacs
4192        0: comp.talk.emacs.recovery
4193   Misc
4194      8: comp.binaries.fractals
4195     13: comp.sources.unix
4196    452: alt.sex.emacs
4197 @end group
4198 @end example
4199
4200 The @samp{Emacs} topic has the topic parameter @code{(score-file
4201 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
4202 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
4203 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
4204 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
4205 . "religion.SCORE")}.
4206
4207 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
4208 will get the @file{relief.SCORE} home score file.  If you enter the same
4209 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
4210 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
4211 get the @file{religion.SCORE} home score file.
4212
4213 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
4214 there are some problems, especially with the @code{total-expiry}
4215 parameter.  Say you have a mail group in two topics; one with
4216 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
4217 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
4218 of these topics you mean to expire articles from, so anything may
4219 happen.  In fact, I hereby declare that it is @dfn{undefined} what
4220 happens.  You just have to be careful if you do stuff like that.
4221
4222
4223 @node Non-ASCII Group Names
4224 @section Accessing groups of non-English names
4225 @cindex non-ascii group names
4226
4227 There are some news servers that provide groups of which the names are
4228 expressed with their native languages in the world.  For instance, in a
4229 certain news server there are some newsgroups of which the names are
4230 spelled in Chinese, where people are talking in Chinese.  You can, of
4231 course, subscribe to such news groups using Gnus.  Currently Gnus
4232 supports non-@acronym{ASCII} group names not only with the @code{nntp}
4233 back end but also with the @code{nnml} back end and the @code{nnrss}
4234 back end.
4235
4236 Every such group name is encoded by a certain charset in the server
4237 side (in an @acronym{NNTP} server its administrator determines the
4238 charset, but for groups in the other back ends it is determined by you).
4239 Gnus has to display the decoded ones for you in the group buffer and the
4240 article buffer, and needs to use the encoded ones when communicating
4241 with servers.  However, Gnus doesn't know what charset is used for each
4242 non-@acronym{ASCII} group name.  The following two variables are just
4243 the ones for telling Gnus what charset should be used for each group:
4244
4245 @table @code
4246 @item gnus-group-name-charset-method-alist
4247 @vindex gnus-group-name-charset-method-alist
4248 An alist of select methods and charsets.  The default value is
4249 @code{nil}.  The names of groups in the server specified by that select
4250 method are all supposed to use the corresponding charset.  For example:
4251
4252 @lisp
4253 (setq gnus-group-name-charset-method-alist
4254       '(((nntp "news.com.cn") . cn-gb-2312)))
4255 @end lisp
4256
4257 Charsets specified for groups with this variable are preferred to the
4258 ones specified for the same groups with the
4259 @code{gnus-group-name-charset-group-alist} variable (see below).
4260
4261 A select method can be very long, like:
4262
4263 @lisp
4264 (nntp "gmane"
4265       (nntp-address "news.gmane.org")
4266       (nntp-end-of-line "\n")
4267       (nntp-open-connection-function
4268        nntp-open-via-rlogin-and-telnet)
4269       (nntp-via-rlogin-command "ssh")
4270       (nntp-via-rlogin-command-switches
4271        ("-C" "-t" "-e" "none"))
4272       (nntp-via-address @dots{}))
4273 @end lisp
4274
4275 In that case, you can truncate it into @code{(nntp "gmane")} in this
4276 variable.  That is, it is enough to contain only the back end name and
4277 the server name.
4278
4279 @item gnus-group-name-charset-group-alist
4280 @cindex UTF-8 group names
4281 @vindex gnus-group-name-charset-group-alist
4282 An alist of regexp of group name and the charset for group names.
4283 @code{((".*" . utf-8))} is the default value if UTF-8 is supported,
4284 otherwise the default is @code{nil}.  For example:
4285
4286 @lisp
4287 (setq gnus-group-name-charset-group-alist
4288       '(("\\.com\\.cn:" . cn-gb-2312)
4289         (".*" . utf-8)))
4290 @end lisp
4291
4292 Note that this variable is ignored if the match is made with
4293 @code{gnus-group-name-charset-method-alist}.
4294 @end table
4295
4296 Those two variables are used also to determine the charset for encoding
4297 and decoding non-@acronym{ASCII} group names that are in the back ends
4298 other than @code{nntp}.  It means that it is you who determine it.  If
4299 you do nothing, the charset used for group names in those back ends will
4300 all be @code{utf-8} because of the last element of
4301 @code{gnus-group-name-charset-group-alist}.
4302
4303 There is one more important variable for non-@acronym{ASCII} group
4304 names:
4305
4306 @table @code
4307 @item nnmail-pathname-coding-system
4308 @vindex nnmail-pathname-coding-system
4309 The value of this variable should be a coding system or @code{nil}.  The
4310 default is @code{nil} in Emacs, or is the aliasee of the coding system
4311 named @code{file-name} (a certain coding system of which an alias is
4312 @code{file-name}) in XEmacs.
4313
4314 The @code{nnml} back end, the @code{nnrss} back end, the agent, and
4315 the cache use non-@acronym{ASCII} group names in those files and
4316 directories.  This variable overrides the value of
4317 @code{file-name-coding-system} which specifies the coding system used
4318 when encoding and decoding those file names and directory names.
4319
4320 In XEmacs (with the @code{mule} feature), @code{file-name-coding-system}
4321 is the only means to specify the coding system used to encode and decode
4322 file names.  On the other hand, Emacs uses the value of
4323 @code{default-file-name-coding-system} if @code{file-name-coding-system}
4324 is @code{nil} or it is bound to the value of
4325 @code{nnmail-pathname-coding-system} which is @code{nil}.
4326
4327 Normally the value of @code{default-file-name-coding-system} in Emacs or
4328 @code{nnmail-pathname-coding-system} in XEmacs is initialized according
4329 to the locale, so you will need to do nothing if the value is suitable
4330 to encode and decode non-@acronym{ASCII} group names.
4331
4332 The value of this variable (or @code{default-file-name-coding-system})
4333 does not necessarily need to be the same value that is determined by
4334 @code{gnus-group-name-charset-method-alist} and
4335 @code{gnus-group-name-charset-group-alist}.
4336
4337 If @code{default-file-name-coding-system} or this variable is
4338 initialized by default to @code{iso-latin-1} for example, although you
4339 want to subscribe to the groups spelled in Chinese, that is the most
4340 typical case where you have to customize
4341 @code{nnmail-pathname-coding-system}.  The @code{utf-8} coding system is
4342 a good candidate for it.  Otherwise, you may change the locale in your
4343 system so that @code{default-file-name-coding-system} or this variable
4344 may be initialized to an appropriate value.
4345 @end table
4346
4347 Note that when you copy or move articles from a non-@acronym{ASCII}
4348 group to another group, the charset used to encode and decode group
4349 names should be the same in both groups.  Otherwise the Newsgroups
4350 header will be displayed incorrectly in the article buffer.
4351
4352
4353 @node Misc Group Stuff
4354 @section Misc Group Stuff
4355
4356 @menu
4357 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
4358 * Group Information::           Information and help on groups and Gnus.
4359 * Group Timestamp::             Making Gnus keep track of when you last read a group.
4360 * File Commands::               Reading and writing the Gnus files.
4361 * Sieve Commands::              Managing Sieve scripts.
4362 @end menu
4363
4364 @table @kbd
4365
4366 @item v
4367 @kindex v (Group)
4368 @cindex keys, reserved for users (Group)
4369 The key @kbd{v} is reserved for users.  You can bind it to some
4370 command or better use it as a prefix key.  For example:
4371
4372 @lisp
4373 (define-key gnus-group-mode-map (kbd "v j d")
4374   (lambda ()
4375     (interactive)
4376     (gnus-group-jump-to-group "nndraft:drafts")))
4377 @end lisp
4378
4379 On keys reserved for users in Emacs and on keybindings in general
4380 @xref{Keymaps, Keymaps, , emacs, The Emacs Editor}.
4381
4382 @item ^
4383 @kindex ^ (Group)
4384 @findex gnus-group-enter-server-mode
4385 Enter the server buffer (@code{gnus-group-enter-server-mode}).
4386 @xref{Server Buffer}.
4387
4388 @item a
4389 @kindex a (Group)
4390 @findex gnus-group-post-news
4391 Start composing a message (a news by default)
4392 (@code{gnus-group-post-news}).  If given a prefix, post to the group
4393 under the point.  If the prefix is 1, prompt for a group to post to.
4394 Contrary to what the name of this function suggests, the prepared
4395 article might be a mail instead of a news, if a mail group is specified
4396 with the prefix argument.  @xref{Composing Messages}.
4397
4398 @item m
4399 @kindex m (Group)
4400 @findex gnus-group-mail
4401 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
4402 use the posting style of the group under the point.  If the prefix is 1,
4403 prompt for a group name to find the posting style.
4404 @xref{Composing Messages}.
4405
4406 @item i
4407 @kindex i (Group)
4408 @findex gnus-group-news
4409 Start composing a news (@code{gnus-group-news}).  If given a prefix,
4410 post to the group under the point.  If the prefix is 1, prompt
4411 for group to post to.  @xref{Composing Messages}.
4412
4413 This function actually prepares a news even when using mail groups.
4414 This is useful for ``posting'' messages to mail groups without actually
4415 sending them over the network: they're just saved directly to the group
4416 in question.  The corresponding back end must have a request-post method
4417 for this to work though.
4418
4419 @item G z
4420 @kindex G z (Group)
4421 @findex gnus-group-compact-group
4422
4423 Compact the group under point (@code{gnus-group-compact-group}).
4424 Currently implemented only in nnml (@pxref{Mail Spool}).  This removes
4425 gaps between article numbers, hence getting a correct total article
4426 count.
4427
4428 @end table
4429
4430 Variables for the group buffer:
4431
4432 @table @code
4433
4434 @item gnus-group-mode-hook
4435 @vindex gnus-group-mode-hook
4436 is called after the group buffer has been
4437 created.
4438
4439 @item gnus-group-prepare-hook
4440 @vindex gnus-group-prepare-hook
4441 is called after the group buffer is
4442 generated.  It may be used to modify the buffer in some strange,
4443 unnatural way.
4444
4445 @item gnus-group-prepared-hook
4446 @vindex gnus-group-prepare-hook
4447 is called as the very last thing after the group buffer has been
4448 generated.  It may be used to move point around, for instance.
4449
4450 @item gnus-permanently-visible-groups
4451 @vindex gnus-permanently-visible-groups
4452 Groups matching this regexp will always be listed in the group buffer,
4453 whether they are empty or not.
4454
4455 @end table
4456
4457 @node Scanning New Messages
4458 @subsection Scanning New Messages
4459 @cindex new messages
4460 @cindex scanning new news
4461
4462 @table @kbd
4463
4464 @item g
4465 @kindex g (Group)
4466 @findex gnus-group-get-new-news
4467 @c @icon{gnus-group-get-new-news}
4468 Check the server(s) for new articles.  If the numerical prefix is used,
4469 this command will check only groups of level @var{arg} and lower
4470 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4471 command will force a total re-reading of the active file(s) from the
4472 back end(s).
4473
4474 @item M-g
4475 @kindex M-g (Group)
4476 @findex gnus-group-get-new-news-this-group
4477 @vindex gnus-goto-next-group-when-activating
4478 @c @icon{gnus-group-get-new-news-this-group}
4479 Check whether new articles have arrived in the current group
4480 (@code{gnus-group-get-new-news-this-group}).
4481 @code{gnus-goto-next-group-when-activating} says whether this command is
4482 to move point to the next group or not.  It is @code{t} by default.
4483
4484 @findex gnus-activate-all-groups
4485 @cindex activating groups
4486 @item C-c M-g
4487 @kindex C-c M-g (Group)
4488 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4489
4490 @item R
4491 @kindex R (Group)
4492 @cindex restarting
4493 @findex gnus-group-restart
4494 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4495 file(s), closes the connection to all servers, clears up all run-time
4496 Gnus variables, and then starts Gnus all over again.
4497
4498 @end table
4499
4500 @vindex gnus-get-new-news-hook
4501 @code{gnus-get-new-news-hook} is run just before checking for new news.
4502
4503 @vindex gnus-after-getting-new-news-hook
4504 @code{gnus-after-getting-new-news-hook} is run after checking for new
4505 news.
4506
4507
4508 @node Group Information
4509 @subsection Group Information
4510 @cindex group information
4511 @cindex information on groups
4512
4513 @table @kbd
4514
4515
4516 @item H d
4517 @itemx C-c C-d
4518 @c @icon{gnus-group-describe-group}
4519 @kindex H d (Group)
4520 @kindex C-c C-d (Group)
4521 @cindex describing groups
4522 @cindex group description
4523 @findex gnus-group-describe-group
4524 Describe the current group (@code{gnus-group-describe-group}).  If given
4525 a prefix, force Gnus to re-read the description from the server.
4526
4527 @item M-d
4528 @kindex M-d (Group)
4529 @findex gnus-group-describe-all-groups
4530 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4531 prefix, force Gnus to re-read the description file from the server.
4532
4533 @item H v
4534 @itemx V
4535 @kindex V (Group)
4536 @kindex H v (Group)
4537 @cindex version
4538 @findex gnus-version
4539 Display current Gnus version numbers (@code{gnus-version}).
4540
4541 @item ?
4542 @kindex ? (Group)
4543 @findex gnus-group-describe-briefly
4544 Give a very short help message (@code{gnus-group-describe-briefly}).
4545
4546 @item C-c C-i
4547 @kindex C-c C-i (Group)
4548 @cindex info
4549 @cindex manual
4550 @findex gnus-info-find-node
4551 Go to the Gnus info node (@code{gnus-info-find-node}).
4552 @end table
4553
4554
4555 @node Group Timestamp
4556 @subsection Group Timestamp
4557 @cindex timestamps
4558 @cindex group timestamps
4559
4560 It can be convenient to let Gnus keep track of when you last read a
4561 group.  To set the ball rolling, you should add
4562 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4563
4564 @lisp
4565 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4566 @end lisp
4567
4568 After doing this, each time you enter a group, it'll be recorded.
4569
4570 This information can be displayed in various ways---the easiest is to
4571 use the @samp{%d} spec in the group line format:
4572
4573 @lisp
4574 (setq gnus-group-line-format
4575       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4576 @end lisp
4577
4578 This will result in lines looking like:
4579
4580 @example
4581 *        0: mail.ding                                19961002T012943
4582          0: custom                                   19961002T012713
4583 @end example
4584
4585 As you can see, the date is displayed in compact ISO 8601 format.  This
4586 may be a bit too much, so to just display the date, you could say
4587 something like:
4588
4589 @lisp
4590 (setq gnus-group-line-format
4591       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4592 @end lisp
4593
4594 If you would like greater control of the time format, you can use a
4595 user-defined format spec.  Something like the following should do the
4596 trick:
4597
4598 @lisp
4599 (setq gnus-group-line-format
4600       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4601 (defun gnus-user-format-function-d (headers)
4602   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4603     (if time
4604         (format-time-string "%b %d  %H:%M" time)
4605       "")))
4606 @end lisp
4607
4608 To see what variables are dynamically bound (like
4609 @code{gnus-tmp-group}), you have to look at the source code.  The
4610 variable names aren't guaranteed to be stable over Gnus versions,
4611 either.
4612
4613
4614 @node File Commands
4615 @subsection File Commands
4616 @cindex file commands
4617
4618 @table @kbd
4619
4620 @item r
4621 @kindex r (Group)
4622 @findex gnus-group-read-init-file
4623 @vindex gnus-init-file
4624 @cindex reading init file
4625 Re-read the init file (@code{gnus-init-file}, which defaults to
4626 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4627
4628 @item s
4629 @kindex s (Group)
4630 @findex gnus-group-save-newsrc
4631 @cindex saving .newsrc
4632 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4633 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4634 file(s) whether Gnus thinks it is necessary or not.
4635
4636 @c @item Z
4637 @c @kindex Z (Group)
4638 @c @findex gnus-group-clear-dribble
4639 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4640
4641 @end table
4642
4643
4644 @node Sieve Commands
4645 @subsection Sieve Commands
4646 @cindex group sieve commands
4647
4648 Sieve is a server-side mail filtering language.  In Gnus you can use
4649 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4650 sieve rules that should apply to each group.  Gnus provides two
4651 commands to translate all these group parameters into a proper Sieve
4652 script that can be transferred to the server somehow.
4653
4654 @vindex gnus-sieve-file
4655 @vindex gnus-sieve-region-start
4656 @vindex gnus-sieve-region-end
4657 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4658 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4659 between two delimiters, @code{gnus-sieve-region-start} and
4660 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4661 outside these delimiters that will not be removed the next time you
4662 regenerate the Sieve script.
4663
4664 @vindex gnus-sieve-crosspost
4665 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4666 is generated.  If it is non-@code{nil} (the default) articles is
4667 placed in all groups that have matching rules, otherwise the article
4668 is only placed in the group with the first matching rule.  For
4669 example, the group parameter @samp{(sieve address "sender"
4670 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4671 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
4672 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4673 except that the line containing the call to @code{stop} is removed.)
4674
4675 @example
4676 if address "sender" "owner-ding@@hpc.uh.edu" @{
4677         fileinto "INBOX.ding";
4678         stop;
4679 @}
4680 @end example
4681
4682 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
4683
4684 @table @kbd
4685
4686 @item D g
4687 @kindex D g (Group)
4688 @findex gnus-sieve-generate
4689 @vindex gnus-sieve-file
4690 @cindex generating sieve script
4691 Regenerate a Sieve script from the @code{sieve} group parameters and
4692 put you into the @code{gnus-sieve-file} without saving it.
4693
4694 @item D u
4695 @kindex D u (Group)
4696 @findex gnus-sieve-update
4697 @vindex gnus-sieve-file
4698 @cindex updating sieve script
4699 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4700 @code{sieve} group parameters, save the file and upload it to the
4701 server using the @code{sieveshell} program.
4702
4703 @end table
4704
4705
4706 @node Summary Buffer
4707 @chapter Summary Buffer
4708 @cindex summary buffer
4709
4710 A line for each article is displayed in the summary buffer.  You can
4711 move around, read articles, post articles and reply to articles.
4712
4713 The most common way to a summary buffer is to select a group from the
4714 group buffer (@pxref{Selecting a Group}).
4715
4716 You can have as many summary buffers open as you wish.
4717
4718 You can customize the Summary Mode tool bar, see @kbd{M-x
4719 customize-apropos RET gnus-summary-tool-bar}.  This feature is only
4720 available in Emacs.
4721
4722 @kindex v (Summary)
4723 @cindex keys, reserved for users (Summary)
4724 The key @kbd{v} is reserved for users.  You can bind it to some
4725 command or better use it as a prefix key.  For example:
4726 @lisp
4727 (define-key gnus-summary-mode-map (kbd "v -") "LrS") ;; lower subthread
4728 @end lisp
4729
4730 @menu
4731 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4732 * Summary Maneuvering::         Moving around the summary buffer.
4733 * Choosing Articles::           Reading articles.
4734 * Paging the Article::          Scrolling the current article.
4735 * Reply Followup and Post::     Posting articles.
4736 * Delayed Articles::            Send articles at a later time.
4737 * Marking Articles::            Marking articles as read, expirable, etc.
4738 * Limiting::                    You can limit the summary buffer.
4739 * Threading::                   How threads are made.
4740 * Sorting the Summary Buffer::  How articles and threads are sorted.
4741 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4742 * Article Caching::             You may store articles in a cache.
4743 * Persistent Articles::         Making articles expiry-resistant.
4744 * Sticky Articles::             Article buffers that are not reused.
4745 * Article Backlog::             Having already read articles hang around.
4746 * Saving Articles::             Ways of customizing article saving.
4747 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4748 * Article Treatment::           The article buffer can be mangled at will.
4749 * MIME Commands::               Doing MIMEy things with the articles.
4750 * Charsets::                    Character set issues.
4751 * Article Commands::            Doing various things with the article buffer.
4752 * Summary Sorting::             Sorting the summary buffer in various ways.
4753 * Finding the Parent::          No child support? Get the parent.
4754 * Alternative Approaches::      Reading using non-default summaries.
4755 * Tree Display::                A more visual display of threads.
4756 * Mail Group Commands::         Some commands can only be used in mail groups.
4757 * Various Summary Stuff::       What didn't fit anywhere else.
4758 * Exiting the Summary Buffer::  Returning to the Group buffer,
4759                                 or reselecting the current group.
4760 * Crosspost Handling::          How crossposted articles are dealt with.
4761 * Duplicate Suppression::       An alternative when crosspost handling fails.
4762 * Security::                    Decrypt and Verify.
4763 * Mailing List::                Mailing list minor mode.
4764 @end menu
4765
4766
4767 @node Summary Buffer Format
4768 @section Summary Buffer Format
4769 @cindex summary buffer format
4770
4771 @iftex
4772 @iflatex
4773 \gnusfigure{The Summary Buffer}{180}{
4774 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4775 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4776 }
4777 @end iflatex
4778 @end iftex
4779
4780 @menu
4781 * Summary Buffer Lines::        You can specify how summary lines should look.
4782 * To From Newsgroups::          How to not display your own name.
4783 * Summary Buffer Mode Line::    You can say how the mode line should look.
4784 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4785 @end menu
4786
4787 @findex mail-extract-address-components
4788 @findex gnus-extract-address-components
4789 @vindex gnus-extract-address-components
4790 Gnus will use the value of the @code{gnus-extract-address-components}
4791 variable as a function for getting the name and address parts of a
4792 @code{From} header.  Two pre-defined functions exist:
4793 @code{gnus-extract-address-components}, which is the default, quite
4794 fast, and too simplistic solution; and
4795 @code{mail-extract-address-components}, which works very nicely, but is
4796 slower.  The default function will return the wrong answer in 5% of the
4797 cases.  If this is unacceptable to you, use the other function instead:
4798
4799 @lisp
4800 (setq gnus-extract-address-components
4801       'mail-extract-address-components)
4802 @end lisp
4803
4804 @vindex gnus-summary-same-subject
4805 @code{gnus-summary-same-subject} is a string indicating that the current
4806 article has the same subject as the previous.  This string will be used
4807 with those specs that require it.  The default is @code{""}.
4808
4809
4810 @node Summary Buffer Lines
4811 @subsection Summary Buffer Lines
4812
4813 @vindex gnus-summary-line-format
4814 You can change the format of the lines in the summary buffer by changing
4815 the @code{gnus-summary-line-format} variable.  It works along the same
4816 lines as a normal @code{format} string, with some extensions
4817 (@pxref{Formatting Variables}).
4818
4819 There should always be a colon or a point position marker on the line;
4820 the cursor always moves to the point position marker or the colon after
4821 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4822 possible to change this.  Just write a new function
4823 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4824 @xref{Positioning Point}.
4825
4826 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4827
4828 The following format specification characters and extended format
4829 specification(s) are understood:
4830
4831 @table @samp
4832 @item N
4833 Article number.
4834 @item S
4835 Subject string.  List identifiers stripped,
4836 @code{gnus-list-identifiers}.  @xref{Article Hiding}.
4837 @item s
4838 Subject if the article is the root of the thread or the previous article
4839 had a different subject, @code{gnus-summary-same-subject} otherwise.
4840 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4841 @item F
4842 Full @code{From} header.
4843 @item n
4844 The name (from the @code{From} header).
4845 @item f
4846 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4847 From Newsgroups}).
4848 @item a
4849 The name (from the @code{From} header).  This differs from the @code{n}
4850 spec in that it uses the function designated by the
4851 @code{gnus-extract-address-components} variable, which is slower, but
4852 may be more thorough.
4853 @item A
4854 The address (from the @code{From} header).  This works the same way as
4855 the @code{a} spec.
4856 @item L
4857 Number of lines in the article.
4858 @item c
4859 Number of characters in the article.  This specifier is not supported
4860 in some methods (like nnfolder).
4861 @item k
4862 Pretty-printed version of the number of characters in the article;
4863 for example, @samp{1.2k} or @samp{0.4M}.
4864 @item I
4865 Indentation based on thread level (@pxref{Customizing Threading}).
4866 @item B
4867 A complex trn-style thread tree, showing response-connecting trace
4868 lines.  A thread could be drawn like this:
4869
4870 @example
4871 >
4872 +->
4873 | +->
4874 | | \->
4875 | |   \->
4876 | \->
4877 +->
4878 \->
4879 @end example
4880
4881 You can customize the appearance with the following options.  Note
4882 that it is possible to make the thread display look really neat by
4883 replacing the default @acronym{ASCII} characters with graphic
4884 line-drawing glyphs.
4885 @table @code
4886 @item gnus-sum-thread-tree-root
4887 @vindex gnus-sum-thread-tree-root
4888 Used for the root of a thread.  If @code{nil}, use subject
4889 instead.  The default is @samp{> }.
4890
4891 @item gnus-sum-thread-tree-false-root
4892 @vindex gnus-sum-thread-tree-false-root
4893 Used for the false root of a thread (@pxref{Loose Threads}).  If
4894 @code{nil}, use subject instead.  The default is @samp{> }.
4895
4896 @item gnus-sum-thread-tree-single-indent
4897 @vindex gnus-sum-thread-tree-single-indent
4898 Used for a thread with just one message.  If @code{nil}, use subject
4899 instead.  The default is @samp{}.
4900
4901 @item gnus-sum-thread-tree-vertical
4902 @vindex gnus-sum-thread-tree-vertical
4903 Used for drawing a vertical line.  The default is @samp{| }.
4904
4905 @item gnus-sum-thread-tree-indent
4906 @vindex gnus-sum-thread-tree-indent
4907 Used for indenting.  The default is @samp{  }.
4908
4909 @item gnus-sum-thread-tree-leaf-with-other
4910 @vindex gnus-sum-thread-tree-leaf-with-other
4911 Used for a leaf with brothers.  The default is @samp{+-> }.
4912
4913 @item gnus-sum-thread-tree-single-leaf
4914 @vindex gnus-sum-thread-tree-single-leaf
4915 Used for a leaf without brothers.  The default is @samp{\-> }
4916
4917 @end table
4918
4919 @item T
4920 Nothing if the article is a root and lots of spaces if it isn't (it
4921 pushes everything after it off the screen).
4922 @item [
4923 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4924 for adopted articles (@pxref{Customizing Threading}).
4925 @item ]
4926 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4927 for adopted articles.
4928 @item >
4929 One space for each thread level.
4930 @item <
4931 Twenty minus thread level spaces.
4932 @item U
4933 Unread.  @xref{Read Articles}.
4934
4935 @item R
4936 This misleadingly named specifier is the @dfn{secondary mark}.  This
4937 mark will say whether the article has been replied to, has been cached,
4938 or has been saved.  @xref{Other Marks}.
4939
4940 @item i
4941 Score as a number (@pxref{Scoring}).
4942 @item z
4943 @vindex gnus-summary-zcore-fuzz
4944 Zcore, @samp{+} if above the default level and @samp{-} if below the
4945 default level.  If the difference between
4946 @code{gnus-summary-default-score} and the score is less than
4947 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4948 @item V
4949 Total thread score.
4950 @item x
4951 @code{Xref}.
4952 @item D
4953 @code{Date}.
4954 @item d
4955 The @code{Date} in @code{DD-MMM} format.
4956 @item o
4957 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4958 @item M
4959 @code{Message-ID}.
4960 @item r
4961 @code{References}.
4962 @item t
4963 Number of articles in the current sub-thread.  Using this spec will slow
4964 down summary buffer generation somewhat.
4965 @item e
4966 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4967 article has any children.
4968 @item P
4969 The line number.
4970 @item O
4971 Download mark.
4972 @item *
4973 Desired cursor position (instead of after first colon).
4974 @item &user-date;
4975 Age sensitive date format.  Various date format is defined in
4976 @code{gnus-user-date-format-alist}.
4977 @item u
4978 User defined specifier.  The next character in the format string should
4979 be a letter.  Gnus will call the function
4980 @code{gnus-user-format-function-@var{x}}, where @var{x} is the letter
4981 following @samp{%u}.  The function will be passed the current header as
4982 argument.  The function should return a string, which will be inserted
4983 into the summary just like information from any other summary specifier.
4984 @end table
4985
4986 Text between @samp{%(} and @samp{%)} will be highlighted with
4987 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4988 There can only be one such area.
4989
4990 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4991 have to be handled with care.  For reasons of efficiency, Gnus will
4992 compute what column these characters will end up in, and ``hard-code''
4993 that.  This means that it is invalid to have these specs after a
4994 variable-length spec.  Well, you might not be arrested, but your summary
4995 buffer will look strange, which is bad enough.
4996
4997 The smart choice is to have these specs as far to the left as possible.
4998 (Isn't that the case with everything, though?  But I digress.)
4999
5000 This restriction may disappear in later versions of Gnus.
5001
5002
5003 @node To From Newsgroups
5004 @subsection To From Newsgroups
5005 @cindex To
5006 @cindex Newsgroups
5007
5008 In some groups (particularly in archive groups), the @code{From} header
5009 isn't very interesting, since all the articles there are written by
5010 you.  To display the information in the @code{To} or @code{Newsgroups}
5011 headers instead, you need to decide three things: What information to
5012 gather; where to display it; and when to display it.
5013
5014 @enumerate
5015 @item
5016 @vindex gnus-extra-headers
5017 The reading of extra header information is controlled by the
5018 @code{gnus-extra-headers}.  This is a list of header symbols.  For
5019 instance:
5020
5021 @lisp
5022 (setq gnus-extra-headers
5023       '(To Newsgroups X-Newsreader))
5024 @end lisp
5025
5026 This will result in Gnus trying to obtain these three headers, and
5027 storing it in header structures for later easy retrieval.
5028
5029 @item
5030 @findex gnus-extra-header
5031 The value of these extra headers can be accessed via the
5032 @code{gnus-extra-header} function.  Here's a format line spec that will
5033 access the @code{X-Newsreader} header:
5034
5035 @example
5036 "%~(form (gnus-extra-header 'X-Newsreader))@@"
5037 @end example
5038
5039 @item
5040 @vindex gnus-ignored-from-addresses
5041 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
5042 summary line spec returns the @code{To}, @code{Newsreader} or
5043 @code{From} header.  If this regexp matches the contents of the
5044 @code{From} header, the value of the @code{To} or @code{Newsreader}
5045 headers are used instead.
5046
5047 To distinguish regular articles from those where the @code{From} field
5048 has been swapped, a string is prefixed to the @code{To} or
5049 @code{Newsgroups} header in the summary line.  By default the string is
5050 @samp{-> } for @code{To} and @samp{=> } for @code{Newsgroups}, you can
5051 customize these strings with @code{gnus-summary-to-prefix} and
5052 @code{gnus-summary-newsgroup-prefix}.
5053
5054 @end enumerate
5055
5056 @vindex nnmail-extra-headers
5057 A related variable is @code{nnmail-extra-headers}, which controls when
5058 to include extra headers when generating overview (@acronym{NOV}) files.
5059 If you have old overview files, you should regenerate them after
5060 changing this variable, by entering the server buffer using @kbd{^},
5061 and then @kbd{g} on the appropriate mail server (e.g., nnml) to cause
5062 regeneration.
5063
5064 @vindex gnus-summary-line-format
5065 You also have to instruct Gnus to display the data by changing the
5066 @code{%n} spec to the @code{%f} spec in the
5067 @code{gnus-summary-line-format} variable.
5068
5069 In summary, you'd typically put something like the following in
5070 @file{~/.gnus.el}:
5071
5072 @lisp
5073 (setq gnus-extra-headers
5074       '(To Newsgroups))
5075 (setq nnmail-extra-headers gnus-extra-headers)
5076 (setq gnus-summary-line-format
5077       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
5078 (setq gnus-ignored-from-addresses
5079       "Your Name Here")
5080 @end lisp
5081
5082 (The values listed above are the default values in Gnus.  Alter them
5083 to fit your needs.)
5084
5085 A note for news server administrators, or for users who wish to try to
5086 convince their news server administrator to provide some additional
5087 support:
5088
5089 The above is mostly useful for mail groups, where you have control over
5090 the @acronym{NOV} files that are created.  However, if you can persuade your
5091 nntp admin to add (in the usual implementation, notably INN):
5092
5093 @example
5094 Newsgroups:full
5095 @end example
5096
5097 to the end of her @file{overview.fmt} file, then you can use that just
5098 as you would the extra headers from the mail groups.
5099
5100
5101 @node Summary Buffer Mode Line
5102 @subsection Summary Buffer Mode Line
5103
5104 @vindex gnus-summary-mode-line-format
5105 You can also change the format of the summary mode bar (@pxref{Mode Line
5106 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
5107 like.  The default is @samp{Gnus: %%b [%A] %Z}.
5108
5109 Here are the elements you can play with:
5110
5111 @table @samp
5112 @item G
5113 Group name.
5114 @item p
5115 Unprefixed group name.
5116 @item A
5117 Current article number.
5118 @item z
5119 Current article score.
5120 @item V
5121 Gnus version.
5122 @item U
5123 Number of unread articles in this group.
5124 @item e
5125 Number of unread articles in this group that aren't displayed in the
5126 summary buffer.
5127 @item Z
5128 A string with the number of unread and unselected articles represented
5129 either as @samp{<%U(+%e) more>} if there are both unread and unselected
5130 articles, and just as @samp{<%U more>} if there are just unread articles
5131 and no unselected ones.
5132 @item g
5133 Shortish group name.  For instance, @samp{rec.arts.anime} will be
5134 shortened to @samp{r.a.anime}.
5135 @item S
5136 Subject of the current article.
5137 @item u
5138 User-defined spec (@pxref{User-Defined Specs}).
5139 @item s
5140 Name of the current score file (@pxref{Scoring}).
5141 @item d
5142 Number of dormant articles (@pxref{Unread Articles}).
5143 @item t
5144 Number of ticked articles (@pxref{Unread Articles}).
5145 @item r
5146 Number of articles that have been marked as read in this session.
5147 @item E
5148 Number of articles expunged by the score files.
5149 @end table
5150
5151
5152 @node Summary Highlighting
5153 @subsection Summary Highlighting
5154
5155 @table @code
5156
5157 @item gnus-visual-mark-article-hook
5158 @vindex gnus-visual-mark-article-hook
5159 This hook is run after selecting an article.  It is meant to be used for
5160 highlighting the article in some way.  It is not run if
5161 @code{gnus-visual} is @code{nil}.
5162
5163 @item gnus-summary-update-hook
5164 @vindex gnus-summary-update-hook
5165 This hook is called when a summary line is changed.  It is not run if
5166 @code{gnus-visual} is @code{nil}.
5167
5168 @item gnus-summary-selected-face
5169 @vindex gnus-summary-selected-face
5170 This is the face (or @dfn{font} as some people call it) used to
5171 highlight the current article in the summary buffer.
5172
5173 @item gnus-summary-highlight
5174 @vindex gnus-summary-highlight
5175 Summary lines are highlighted according to this variable, which is a
5176 list where the elements are of the format @code{(@var{form}
5177 . @var{face})}.  If you would, for instance, like ticked articles to be
5178 italic and high-scored articles to be bold, you could set this variable
5179 to something like
5180 @lisp
5181 (((eq mark gnus-ticked-mark) . italic)
5182  ((> score default) . bold))
5183 @end lisp
5184 As you may have guessed, if @var{form} returns a non-@code{nil} value,
5185 @var{face} will be applied to the line.
5186 @end table
5187
5188
5189 @node Summary Maneuvering
5190 @section Summary Maneuvering
5191 @cindex summary movement
5192
5193 All the straight movement commands understand the numeric prefix and
5194 behave pretty much as you'd expect.
5195
5196 None of these commands select articles.
5197
5198 @table @kbd
5199 @item G M-n
5200 @itemx M-n
5201 @kindex M-n (Summary)
5202 @kindex G M-n (Summary)
5203 @findex gnus-summary-next-unread-subject
5204 Go to the next summary line of an unread article
5205 (@code{gnus-summary-next-unread-subject}).
5206
5207 @item G M-p
5208 @itemx M-p
5209 @kindex M-p (Summary)
5210 @kindex G M-p (Summary)
5211 @findex gnus-summary-prev-unread-subject
5212 Go to the previous summary line of an unread article
5213 (@code{gnus-summary-prev-unread-subject}).
5214
5215 @item G g
5216 @kindex G g (Summary)
5217 @findex gnus-summary-goto-subject
5218 Ask for an article number and then go to the summary line of that article
5219 without displaying the article (@code{gnus-summary-goto-subject}).
5220 @end table
5221
5222 If Gnus asks you to press a key to confirm going to the next group, you
5223 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
5224 buffer, searching for the next group to read without actually returning
5225 to the group buffer.
5226
5227 Variables related to summary movement:
5228
5229 @table @code
5230
5231 @vindex gnus-auto-select-next
5232 @item gnus-auto-select-next
5233 If you issue one of the movement commands (like @kbd{n}) and there are
5234 no more unread articles after the current one, Gnus will offer to go to
5235 the next group.  If this variable is @code{t} and the next group is
5236 empty, Gnus will exit summary mode and return to the group buffer.  If
5237 this variable is neither @code{t} nor @code{nil}, Gnus will select the
5238 next group with unread articles.  As a special case, if this variable
5239 is @code{quietly}, Gnus will select the next group without asking for
5240 confirmation.  If this variable is @code{almost-quietly}, the same
5241 will happen only if you are located on the last article in the group.
5242 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
5243 command will go to the next group without confirmation.  Also
5244 @pxref{Group Levels}.
5245
5246 @item gnus-auto-select-same
5247 @vindex gnus-auto-select-same
5248 If non-@code{nil}, all the movement commands will try to go to the next
5249 article with the same subject as the current.  (@dfn{Same} here might
5250 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
5251 for details (@pxref{Customizing Threading}).)  If there are no more
5252 articles with the same subject, go to the first unread article.
5253
5254 This variable is not particularly useful if you use a threaded display.
5255
5256 @item gnus-summary-check-current
5257 @vindex gnus-summary-check-current
5258 If non-@code{nil}, all the ``unread'' movement commands will not proceed
5259 to the next (or previous) article if the current article is unread.
5260 Instead, they will choose the current article.
5261
5262 @item gnus-auto-center-summary
5263 @vindex gnus-auto-center-summary
5264 If non-@code{nil}, Gnus will keep the point in the summary buffer
5265 centered at all times.  This makes things quite tidy, but if you have a
5266 slow network connection, or simply do not like this un-Emacsism, you can
5267 set this variable to @code{nil} to get the normal Emacs scrolling
5268 action.  This will also inhibit horizontal re-centering of the summary
5269 buffer, which might make it more inconvenient to read extremely long
5270 threads.
5271
5272 This variable can also be a number.  In that case, center the window at
5273 the given number of lines from the top.
5274
5275 @item gnus-summary-stop-at-end-of-message
5276 @vindex gnus-summary-stop-at-end-of-message
5277 If non-@code{nil}, don't go to the next article when hitting
5278 @kbd{SPC}, and you're at the end of the article.
5279
5280 @end table
5281
5282
5283 @node Choosing Articles
5284 @section Choosing Articles
5285 @cindex selecting articles
5286
5287 @menu
5288 * Choosing Commands::           Commands for choosing articles.
5289 * Choosing Variables::          Variables that influence these commands.
5290 @end menu
5291
5292
5293 @node Choosing Commands
5294 @subsection Choosing Commands
5295
5296 None of the following movement commands understand the numeric prefix,
5297 and they all select and display an article.
5298
5299 If you want to fetch new articles or redisplay the group, see
5300 @ref{Exiting the Summary Buffer}.
5301
5302 @table @kbd
5303 @item SPACE
5304 @kindex SPACE (Summary)
5305 @findex gnus-summary-next-page
5306 Select the current article, or, if that one's read already, the next
5307 unread article (@code{gnus-summary-next-page}).
5308
5309 If you have an article window open already and you press @kbd{SPACE}
5310 again, the article will be scrolled.  This lets you conveniently
5311 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
5312
5313 @item G n
5314 @itemx n
5315 @kindex n (Summary)
5316 @kindex G n (Summary)
5317 @findex gnus-summary-next-unread-article
5318 @c @icon{gnus-summary-next-unread}
5319 Go to next unread article (@code{gnus-summary-next-unread-article}).
5320
5321 @item G p
5322 @itemx p
5323 @kindex p (Summary)
5324 @findex gnus-summary-prev-unread-article
5325 @c @icon{gnus-summary-prev-unread}
5326 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
5327
5328 @item G N
5329 @itemx N
5330 @kindex N (Summary)
5331 @kindex G N (Summary)
5332 @findex gnus-summary-next-article
5333 Go to the next article (@code{gnus-summary-next-article}).
5334
5335 @item G P
5336 @itemx P
5337 @kindex P (Summary)
5338 @kindex G P (Summary)
5339 @findex gnus-summary-prev-article
5340 Go to the previous article (@code{gnus-summary-prev-article}).
5341
5342 @item G C-n
5343 @kindex G C-n (Summary)
5344 @findex gnus-summary-next-same-subject
5345 Go to the next article with the same subject
5346 (@code{gnus-summary-next-same-subject}).
5347
5348 @item G C-p
5349 @kindex G C-p (Summary)
5350 @findex gnus-summary-prev-same-subject
5351 Go to the previous article with the same subject
5352 (@code{gnus-summary-prev-same-subject}).
5353
5354 @item G f
5355 @itemx .
5356 @kindex G f  (Summary)
5357 @kindex .  (Summary)
5358 @findex gnus-summary-first-unread-article
5359 Go to the first unread article
5360 (@code{gnus-summary-first-unread-article}).
5361
5362 @item G b
5363 @itemx ,
5364 @kindex G b (Summary)
5365 @kindex , (Summary)
5366 @findex gnus-summary-best-unread-article
5367 Go to the unread article with the highest score
5368 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
5369 go to the first unread article that has a score over the default score.
5370
5371 @item G l
5372 @itemx l
5373 @kindex l (Summary)
5374 @kindex G l (Summary)
5375 @findex gnus-summary-goto-last-article
5376 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5377
5378 @item G o
5379 @kindex G o (Summary)
5380 @findex gnus-summary-pop-article
5381 @cindex history
5382 @cindex article history
5383 Pop an article off the summary history and go to this article
5384 (@code{gnus-summary-pop-article}).  This command differs from the
5385 command above in that you can pop as many previous articles off the
5386 history as you like, while @kbd{l} toggles the two last read articles.
5387 For a somewhat related issue (if you use these commands a lot),
5388 @pxref{Article Backlog}.
5389
5390 @item G j
5391 @itemx j
5392 @kindex j (Summary)
5393 @kindex G j (Summary)
5394 @findex gnus-summary-goto-article
5395 Ask for an article number or @code{Message-ID}, and then go to that
5396 article (@code{gnus-summary-goto-article}).
5397
5398 @end table
5399
5400
5401 @node Choosing Variables
5402 @subsection Choosing Variables
5403
5404 Some variables relevant for moving and selecting articles:
5405
5406 @table @code
5407 @item gnus-auto-extend-newsgroup
5408 @vindex gnus-auto-extend-newsgroup
5409 All the movement commands will try to go to the previous (or next)
5410 article, even if that article isn't displayed in the Summary buffer if
5411 this variable is non-@code{nil}.  Gnus will then fetch the article from
5412 the server and display it in the article buffer.
5413
5414 @item gnus-select-article-hook
5415 @vindex gnus-select-article-hook
5416 This hook is called whenever an article is selected.  The default is
5417 @code{nil}.  If you would like each article to be saved in the Agent as
5418 you read it, putting @code{gnus-agent-fetch-selected-article} on this
5419 hook will do so.
5420
5421 @item gnus-mark-article-hook
5422 @vindex gnus-mark-article-hook
5423 @findex gnus-summary-mark-unread-as-read
5424 @findex gnus-summary-mark-read-and-unread-as-read
5425 @findex gnus-unread-mark
5426 This hook is called whenever an article is selected.  It is intended to
5427 be used for marking articles as read.  The default value is
5428 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5429 mark of almost any article you read to @code{gnus-read-mark}.  The only
5430 articles not affected by this function are ticked, dormant, and
5431 expirable articles.  If you'd instead like to just have unread articles
5432 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5433 instead.  It will leave marks like @code{gnus-low-score-mark},
5434 @code{gnus-del-mark} (and so on) alone.
5435
5436 @end table
5437
5438
5439 @node Paging the Article
5440 @section Scrolling the Article
5441 @cindex article scrolling
5442
5443 @table @kbd
5444
5445 @item SPACE
5446 @kindex SPACE (Summary)
5447 @findex gnus-summary-next-page
5448 Pressing @kbd{SPACE} will scroll the current article forward one page,
5449 or, if you have come to the end of the current article, will choose the
5450 next article (@code{gnus-summary-next-page}).
5451
5452 @vindex gnus-article-boring-faces
5453 @vindex gnus-article-skip-boring
5454 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5455 the article consists only of citations and signature, then it will be
5456 skipped; the next article will be shown instead.  You can customize
5457 what is considered uninteresting with
5458 @code{gnus-article-boring-faces}.  You can manually view the article's
5459 pages, no matter how boring, using @kbd{C-M-v}.
5460
5461 @item DEL
5462 @kindex DEL (Summary)
5463 @findex gnus-summary-prev-page
5464 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5465
5466 @item RET
5467 @kindex RET (Summary)
5468 @findex gnus-summary-scroll-up
5469 Scroll the current article one line forward
5470 (@code{gnus-summary-scroll-up}).
5471
5472 @item M-RET
5473 @kindex M-RET (Summary)
5474 @findex gnus-summary-scroll-down
5475 Scroll the current article one line backward
5476 (@code{gnus-summary-scroll-down}).
5477
5478 @item A g
5479 @itemx g
5480 @kindex A g (Summary)
5481 @kindex g (Summary)
5482 @findex gnus-summary-show-article
5483 @vindex gnus-summary-show-article-charset-alist
5484 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5485 given a prefix, show a completely ``raw'' article, just the way it
5486 came from the server.  If given a prefix twice (i.e., @kbd{C-u C-u
5487 g'}), fetch the current article, but don't run any of the article
5488 treatment functions.
5489
5490 @cindex charset, view article with different charset
5491 If given a numerical prefix, you can do semi-manual charset stuff.
5492 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5493 encoded in the @code{cn-gb-2312} charset.  If you have
5494
5495 @lisp
5496 (setq gnus-summary-show-article-charset-alist
5497       '((1 . cn-gb-2312)
5498         (2 . big5)))
5499 @end lisp
5500
5501 then you can say @kbd{C-u 1 g} to get the same effect.
5502
5503 @item A <
5504 @itemx <
5505 @kindex < (Summary)
5506 @kindex A < (Summary)
5507 @findex gnus-summary-beginning-of-article
5508 Scroll to the beginning of the article
5509 (@code{gnus-summary-beginning-of-article}).
5510
5511 @item A >
5512 @itemx >
5513 @kindex > (Summary)
5514 @kindex A > (Summary)
5515 @findex gnus-summary-end-of-article
5516 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5517
5518 @item A s
5519 @itemx s
5520 @kindex A s (Summary)
5521 @kindex s (Summary)
5522 @findex gnus-summary-isearch-article
5523 Perform an isearch in the article buffer
5524 (@code{gnus-summary-isearch-article}).
5525
5526 @item h
5527 @kindex h (Summary)
5528 @findex gnus-summary-select-article-buffer
5529 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5530
5531 @end table
5532
5533
5534 @node Reply Followup and Post
5535 @section Reply, Followup and Post
5536
5537 @menu
5538 * Summary Mail Commands::       Sending mail.
5539 * Summary Post Commands::       Sending news.
5540 * Summary Message Commands::    Other Message-related commands.
5541 * Canceling and Superseding::
5542 @end menu
5543
5544
5545 @node Summary Mail Commands
5546 @subsection Summary Mail Commands
5547 @cindex mail
5548 @cindex composing mail
5549
5550 Commands for composing a mail message:
5551
5552 @table @kbd
5553
5554 @item S r
5555 @itemx r
5556 @kindex S r (Summary)
5557 @kindex r (Summary)
5558 @findex gnus-summary-reply
5559 @c @icon{gnus-summary-mail-reply}
5560 @c @icon{gnus-summary-reply}
5561 Mail a reply to the author of the current article
5562 (@code{gnus-summary-reply}).
5563
5564 @item S R
5565 @itemx R
5566 @kindex R (Summary)
5567 @kindex S R (Summary)
5568 @findex gnus-summary-reply-with-original
5569 @c @icon{gnus-summary-reply-with-original}
5570 Mail a reply to the author of the current article and include the
5571 original message (@code{gnus-summary-reply-with-original}).  This
5572 command uses the process/prefix convention.
5573
5574 @item S w
5575 @kindex S w (Summary)
5576 @findex gnus-summary-wide-reply
5577 Mail a wide reply to the author of the current article
5578 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5579 goes out to all people listed in the @code{To}, @code{From} (or
5580 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
5581 present, that's used instead.
5582
5583 @item S W
5584 @kindex S W (Summary)
5585 @findex gnus-summary-wide-reply-with-original
5586 Mail a wide reply to the current article and include the original
5587 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5588 the process/prefix convention, but only uses the headers from the
5589 first article to determine the recipients.
5590
5591 @item S L
5592 @kindex S L (Summary)
5593 @findex gnus-summary-reply-to-list-with-original
5594 When replying to a message from a mailing list, send a reply to that
5595 message to the mailing list, and include the original message
5596 (@code{gnus-summary-reply-to-list-with-original}).
5597
5598 @item S v
5599 @kindex S v (Summary)
5600 @findex gnus-summary-very-wide-reply
5601 Mail a very wide reply to the author of the current article
5602 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5603 that goes out to all people listed in the @code{To}, @code{From} (or
5604 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5605 articles.  This command uses the process/prefix convention.
5606
5607 @item S V
5608 @kindex S V (Summary)
5609 @findex gnus-summary-very-wide-reply-with-original
5610 Mail a very wide reply to the author of the current article and include the
5611 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5612 command uses the process/prefix convention.
5613
5614 @item S B r
5615 @kindex S B r (Summary)
5616 @findex gnus-summary-reply-broken-reply-to
5617 Mail a reply to the author of the current article but ignore the
5618 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5619 If you need this because a mailing list incorrectly sets a
5620 @code{Reply-To} header pointing to the list, you probably want to set
5621 the @code{broken-reply-to} group parameter instead, so things will work
5622 correctly.  @xref{Group Parameters}.
5623
5624 @item S B R
5625 @kindex S B R (Summary)
5626 @findex gnus-summary-reply-broken-reply-to-with-original
5627 Mail a reply to the author of the current article and include the
5628 original message but ignore the @code{Reply-To} field
5629 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5630
5631 @item S o m
5632 @itemx C-c C-f
5633 @kindex S o m (Summary)
5634 @kindex C-c C-f (Summary)
5635 @findex gnus-summary-mail-forward
5636 @c @icon{gnus-summary-mail-forward}
5637 Forward the current article to some other person
5638 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
5639 is forwarded according to the value of (@code{message-forward-as-mime})
5640 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
5641 message and forward directly inline; if the prefix is 2, forward message
5642 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5643 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5644 directly inline; otherwise, the message is forwarded as no prefix given
5645 but use the flipped value of (@code{message-forward-as-mime}).  By
5646 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
5647 section.
5648
5649 @item S m
5650 @itemx m
5651 @kindex m (Summary)
5652 @kindex S m (Summary)
5653 @findex gnus-summary-mail-other-window
5654 @c @icon{gnus-summary-mail-originate}
5655 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5656 the posting style of the current group.  If given a prefix, disable that.
5657 If the prefix is 1, prompt for a group name to find the posting style.
5658
5659 @item S i
5660 @kindex S i (Summary)
5661 @findex gnus-summary-news-other-window
5662 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5663 post to the current group.  If given a prefix, disable that.  If the
5664 prefix is 1, prompt for a group to post to.
5665
5666 This function actually prepares a news even when using mail groups.
5667 This is useful for ``posting'' messages to mail groups without actually
5668 sending them over the network: they're just saved directly to the group
5669 in question.  The corresponding back end must have a request-post method
5670 for this to work though.
5671
5672 @item S D b
5673 @kindex S D b (Summary)
5674 @findex gnus-summary-resend-bounced-mail
5675 @cindex bouncing mail
5676 If you have sent a mail, but the mail was bounced back to you for some
5677 reason (wrong address, transient failure), you can use this command to
5678 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5679 will be popped into a mail buffer where you can edit the headers before
5680 sending the mail off again.  If you give a prefix to this command, and
5681 the bounced mail is a reply to some other mail, Gnus will try to fetch
5682 that mail and display it for easy perusal of its headers.  This might
5683 very well fail, though.
5684
5685 @item S D r
5686 @kindex S D r (Summary)
5687 @findex gnus-summary-resend-message
5688 Not to be confused with the previous command,
5689 @code{gnus-summary-resend-message} will prompt you for an address to
5690 send the current message off to, and then send it to that place.  The
5691 headers of the message won't be altered---but lots of headers that say
5692 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5693 means that you actually send a mail to someone that has a @code{To}
5694 header that (probably) points to yourself.  This will confuse people.
5695 So, natcherly you'll only do that if you're really eVIl.
5696
5697 This command is mainly used if you have several accounts and want to
5698 ship a mail to a different account of yours.  (If you're both
5699 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5700 to the @code{root} account, you may want to resend it to
5701 @code{postmaster}.  Ordnung muss sein!
5702
5703 This command understands the process/prefix convention
5704 (@pxref{Process/Prefix}).
5705
5706 @item S D e
5707 @kindex S D e (Summary)
5708 @findex gnus-summary-resend-message-edit
5709
5710 Like the previous command, but will allow you to edit the message as
5711 if it were a new message before resending.
5712
5713 @item S O m
5714 @kindex S O m (Summary)
5715 @findex gnus-uu-digest-mail-forward
5716 Digest the current series (@pxref{Decoding Articles}) and forward the
5717 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
5718 uses the process/prefix convention (@pxref{Process/Prefix}).
5719
5720 @item S M-c
5721 @kindex S M-c (Summary)
5722 @findex gnus-summary-mail-crosspost-complaint
5723 @cindex crossposting
5724 @cindex excessive crossposting
5725 Send a complaint about excessive crossposting to the author of the
5726 current article (@code{gnus-summary-mail-crosspost-complaint}).
5727
5728 @findex gnus-crosspost-complaint
5729 This command is provided as a way to fight back against the current
5730 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5731 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5732 command understands the process/prefix convention
5733 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5734
5735 @end table
5736
5737 Also @xref{Header Commands, ,Header Commands, message, The Message
5738 Manual}, for more information.
5739
5740
5741 @node Summary Post Commands
5742 @subsection Summary Post Commands
5743 @cindex post
5744 @cindex composing news
5745
5746 Commands for posting a news article:
5747
5748 @table @kbd
5749 @item S p
5750 @itemx a
5751 @kindex a (Summary)
5752 @kindex S p (Summary)
5753 @findex gnus-summary-post-news
5754 @c @icon{gnus-summary-post-news}
5755 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5756 default, post to the current group.  If given a prefix, disable that.
5757 If the prefix is 1, prompt for another group instead.
5758
5759 @item S f
5760 @itemx f
5761 @kindex f (Summary)
5762 @kindex S f (Summary)
5763 @findex gnus-summary-followup
5764 @c @icon{gnus-summary-followup}
5765 Post a followup to the current article (@code{gnus-summary-followup}).
5766
5767 @item S F
5768 @itemx F
5769 @kindex S F (Summary)
5770 @kindex F (Summary)
5771 @c @icon{gnus-summary-followup-with-original}
5772 @findex gnus-summary-followup-with-original
5773 Post a followup to the current article and include the original message
5774 (@code{gnus-summary-followup-with-original}).  This command uses the
5775 process/prefix convention.
5776
5777 @item S n
5778 @kindex S n (Summary)
5779 @findex gnus-summary-followup-to-mail
5780 Post a followup to the current article via news, even if you got the
5781 message through mail (@code{gnus-summary-followup-to-mail}).
5782
5783 @item S N
5784 @kindex S N (Summary)
5785 @findex gnus-summary-followup-to-mail-with-original
5786 Post a followup to the current article via news, even if you got the
5787 message through mail and include the original message
5788 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5789 the process/prefix convention.
5790
5791 @item S o p
5792 @kindex S o p (Summary)
5793 @findex gnus-summary-post-forward
5794 Forward the current article to a newsgroup
5795 (@code{gnus-summary-post-forward}).
5796  If no prefix is given, the message is forwarded according to the value
5797 of (@code{message-forward-as-mime}) and
5798 (@code{message-forward-show-mml}); if the prefix is 1, decode the
5799 message and forward directly inline; if the prefix is 2, forward message
5800 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5801 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5802 directly inline; otherwise, the message is forwarded as no prefix given
5803 but use the flipped value of (@code{message-forward-as-mime}).  By
5804 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
5805
5806 @item S O p
5807 @kindex S O p (Summary)
5808 @findex gnus-uu-digest-post-forward
5809 @cindex digests
5810 @cindex making digests
5811 Digest the current series and forward the result to a newsgroup
5812 (@code{gnus-uu-digest-post-forward}).  This command uses the
5813 process/prefix convention.
5814
5815 @item S u
5816 @kindex S u (Summary)
5817 @findex gnus-uu-post-news
5818 @c @icon{gnus-uu-post-news}
5819 Uuencode a file, split it into parts, and post it as a series
5820 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5821 @end table
5822
5823 Also @xref{Header Commands, ,Header Commands, message, The Message
5824 Manual}, for more information.
5825
5826
5827 @node Summary Message Commands
5828 @subsection Summary Message Commands
5829
5830 @table @kbd
5831 @item S y
5832 @kindex S y (Summary)
5833 @findex gnus-summary-yank-message
5834 Yank the current article into an already existing Message composition
5835 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5836 what message buffer you want to yank into, and understands the
5837 process/prefix convention (@pxref{Process/Prefix}).
5838
5839 @end table
5840
5841
5842 @node Canceling and Superseding
5843 @subsection Canceling Articles
5844 @cindex canceling articles
5845 @cindex superseding articles
5846
5847 Have you ever written something, and then decided that you really,
5848 really, really wish you hadn't posted that?
5849
5850 Well, you can't cancel mail, but you can cancel posts.
5851
5852 @findex gnus-summary-cancel-article
5853 @kindex C (Summary)
5854 @c @icon{gnus-summary-cancel-article}
5855 Find the article you wish to cancel (you can only cancel your own
5856 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5857 c} (@code{gnus-summary-cancel-article}).  Your article will be
5858 canceled---machines all over the world will be deleting your article.
5859 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5860
5861 Be aware, however, that not all sites honor cancels, so your article may
5862 live on here and there, while most sites will delete the article in
5863 question.
5864
5865 Gnus will use the ``current'' select method when canceling.  If you
5866 want to use the standard posting method, use the @samp{a} symbolic
5867 prefix (@pxref{Symbolic Prefixes}).
5868
5869 Gnus ensures that only you can cancel your own messages using a
5870 @code{Cancel-Lock} header (@pxref{Canceling News, Canceling News, ,
5871 message, Message Manual}).
5872
5873 If you discover that you have made some mistakes and want to do some
5874 corrections, you can post a @dfn{superseding} article that will replace
5875 your original article.
5876
5877 @findex gnus-summary-supersede-article
5878 @kindex S (Summary)
5879 Go to the original article and press @kbd{S s}
5880 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5881 where you can edit the article all you want before sending it off the
5882 usual way.
5883
5884 The same goes for superseding as for canceling, only more so: Some
5885 sites do not honor superseding.  On those sites, it will appear that you
5886 have posted almost the same article twice.
5887
5888 If you have just posted the article, and change your mind right away,
5889 there is a trick you can use to cancel/supersede the article without
5890 waiting for the article to appear on your site first.  You simply return
5891 to the post buffer (which is called @code{*sent ...*}).  There you will
5892 find the article you just posted, with all the headers intact.  Change
5893 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5894 header by substituting one of those words for the word
5895 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5896 you would do normally.  The previous article will be
5897 canceled/superseded.
5898
5899 Just remember, kids: There is no 'c' in 'supersede'.
5900
5901 @node Delayed Articles
5902 @section Delayed Articles
5903 @cindex delayed sending
5904 @cindex send delayed
5905
5906 Sometimes, you might wish to delay the sending of a message.  For
5907 example, you might wish to arrange for a message to turn up just in time
5908 to remind your about the birthday of your Significant Other.  For this,
5909 there is the @code{gnus-delay} package.  Setup is simple:
5910
5911 @lisp
5912 (gnus-delay-initialize)
5913 @end lisp
5914
5915 @findex gnus-delay-article
5916 Normally, to send a message you use the @kbd{C-c C-c} command from
5917 Message mode.  To delay a message, use @kbd{C-c C-j}
5918 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5919 message should be delayed.  Possible answers are:
5920
5921 @itemize @bullet
5922 @item
5923 A time span.  Consists of an integer and a letter.  For example,
5924 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5925 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5926 (months) and @code{Y} (years).
5927
5928 @item
5929 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
5930 delayed until that day, at a specific time (eight o'clock by default).
5931 See also @code{gnus-delay-default-hour}.
5932
5933 @item
5934 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5935 stuff.  The deadline will be at that time today, except if that time has
5936 already passed, then it's at the given time tomorrow.  So if it's ten
5937 o'clock in the morning and you specify @code{11:15}, then the deadline
5938 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5939 that means a time tomorrow.
5940 @end itemize
5941
5942 The action of the @code{gnus-delay-article} command is influenced by a
5943 couple of variables:
5944
5945 @table @code
5946 @item gnus-delay-default-hour
5947 @vindex gnus-delay-default-hour
5948 When you specify a specific date, the message will be due on that hour
5949 on the given date.  Possible values are integers 0 through 23.
5950
5951 @item gnus-delay-default-delay
5952 @vindex gnus-delay-default-delay
5953 This is a string and gives the default delay.  It can be of any of the
5954 formats described above.
5955
5956 @item gnus-delay-group
5957 @vindex gnus-delay-group
5958 Delayed articles will be kept in this group on the drafts server until
5959 they are due.  You probably don't need to change this.  The default
5960 value is @code{"delayed"}.
5961
5962 @item gnus-delay-header
5963 @vindex gnus-delay-header
5964 The deadline for each article will be stored in a header.  This variable
5965 is a string and gives the header name.  You probably don't need to
5966 change this.  The default value is @code{"X-Gnus-Delayed"}.
5967 @end table
5968
5969 The way delaying works is like this: when you use the
5970 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5971 calculates the deadline of the message and stores it in the
5972 @code{X-Gnus-Delayed} header and puts the message in the
5973 @code{nndraft:delayed} group.
5974
5975 @findex gnus-delay-send-queue
5976 And whenever you get new news, Gnus looks through the group for articles
5977 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5978 function for this.  By default, this function is added to the hook
5979 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5980 Maybe you want to use the demon to send drafts?  Just tell the demon to
5981 execute the @code{gnus-delay-send-queue} function.
5982
5983 @table @code
5984 @item gnus-delay-initialize
5985 @findex gnus-delay-initialize
5986 By default, this function installs @code{gnus-delay-send-queue} in
5987 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5988 argument @code{no-check}.  If it is non-@code{nil},
5989 @code{gnus-get-new-news-hook} is not changed.  The optional first
5990 argument is ignored.
5991
5992 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5993 Presumably, you want to use the demon for sending due delayed articles.
5994 Just don't forget to set that up :-)
5995 @end table
5996
5997 When delaying an article with @kbd{C-c C-j}, Message mode will
5998 automatically add a @code{"Date"} header with the current time.  In
5999 many cases you probably want the @code{"Date"} header to reflect the
6000 time the message is sent instead.  To do this, you have to delete
6001 @code{Date} from @code{message-draft-headers}.
6002
6003
6004 @node Marking Articles
6005 @section Marking Articles
6006 @cindex article marking
6007 @cindex article ticking
6008 @cindex marks
6009
6010 There are several marks you can set on an article.
6011
6012 You have marks that decide the @dfn{readedness} (whoo, neato-keano
6013 neologism ohoy!) of the article.  Alphabetic marks generally mean
6014 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
6015
6016 In addition, you also have marks that do not affect readedness.
6017
6018 @ifinfo
6019 There's a plethora of commands for manipulating these marks.
6020 @end ifinfo
6021
6022 @menu
6023 * Unread Articles::             Marks for unread articles.
6024 * Read Articles::               Marks for read articles.
6025 * Other Marks::                 Marks that do not affect readedness.
6026 * Setting Marks::               How to set and remove marks.
6027 * Generic Marking Commands::    How to customize the marking.
6028 * Setting Process Marks::       How to mark articles for later processing.
6029 @end menu
6030
6031
6032 @node Unread Articles
6033 @subsection Unread Articles
6034
6035 The following marks mark articles as (kinda) unread, in one form or
6036 other.
6037
6038 @table @samp
6039 @item !
6040 @vindex gnus-ticked-mark
6041 Marked as ticked (@code{gnus-ticked-mark}).
6042
6043 @dfn{Ticked articles} are articles that will remain visible always.  If
6044 you see an article that you find interesting, or you want to put off
6045 reading it, or replying to it, until sometime later, you'd typically
6046 tick it.  However, articles can be expired (from news servers by the
6047 news server software, Gnus itself never expires ticked messages), so if
6048 you want to keep an article forever, you'll have to make it persistent
6049 (@pxref{Persistent Articles}).
6050
6051 @item ?
6052 @vindex gnus-dormant-mark
6053 Marked as dormant (@code{gnus-dormant-mark}).
6054
6055 @dfn{Dormant articles} will only appear in the summary buffer if there
6056 are followups to it.  If you want to see them even if they don't have
6057 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
6058 Otherwise (except for the visibility issue), they are just like ticked
6059 messages.
6060
6061 @item SPACE
6062 @vindex gnus-unread-mark
6063 Marked as unread (@code{gnus-unread-mark}).
6064
6065 @dfn{Unread articles} are articles that haven't been read at all yet.
6066 @end table
6067
6068
6069 @node Read Articles
6070 @subsection Read Articles
6071 @cindex expirable mark
6072
6073 All the following marks mark articles as read.
6074
6075 @table @samp
6076
6077 @item r
6078 @vindex gnus-del-mark
6079 These are articles that the user has marked as read with the @kbd{d}
6080 command manually, more or less (@code{gnus-del-mark}).
6081
6082 @item R
6083 @vindex gnus-read-mark
6084 Articles that have actually been read (@code{gnus-read-mark}).
6085
6086 @item O
6087 @vindex gnus-ancient-mark
6088 Articles that were marked as read in previous sessions and are now
6089 @dfn{old} (@code{gnus-ancient-mark}).
6090
6091 @item K
6092 @vindex gnus-killed-mark
6093 Marked as killed (@code{gnus-killed-mark}).
6094
6095 @item X
6096 @vindex gnus-kill-file-mark
6097 Marked as killed by kill files (@code{gnus-kill-file-mark}).
6098
6099 @item Y
6100 @vindex gnus-low-score-mark
6101 Marked as read by having too low a score (@code{gnus-low-score-mark}).
6102
6103 @item C
6104 @vindex gnus-catchup-mark
6105 Marked as read by a catchup (@code{gnus-catchup-mark}).
6106
6107 @item G
6108 @vindex gnus-canceled-mark
6109 Canceled article (@code{gnus-canceled-mark})
6110
6111 @item Q
6112 @vindex gnus-sparse-mark
6113 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
6114 Threading}.
6115
6116 @item M
6117 @vindex gnus-duplicate-mark
6118 Article marked as read by duplicate suppression
6119 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
6120
6121 @end table
6122
6123 All these marks just mean that the article is marked as read, really.
6124 They are interpreted differently when doing adaptive scoring, though.
6125
6126 One more special mark, though:
6127
6128 @table @samp
6129 @item E
6130 @vindex gnus-expirable-mark
6131 Marked as expirable (@code{gnus-expirable-mark}).
6132
6133 Marking articles as @dfn{expirable} (or have them marked as such
6134 automatically) doesn't make much sense in normal groups---a user doesn't
6135 control expiring of news articles, but in mail groups, for instance,
6136 articles marked as @dfn{expirable} can be deleted by Gnus at
6137 any time.
6138 @end table
6139
6140
6141 @node Other Marks
6142 @subsection Other Marks
6143 @cindex process mark
6144 @cindex bookmarks
6145
6146 There are some marks that have nothing to do with whether the article is
6147 read or not.
6148
6149 @itemize @bullet
6150
6151 @item
6152 You can set a bookmark in the current article.  Say you are reading a
6153 long thesis on cats' urinary tracts, and have to go home for dinner
6154 before you've finished reading the thesis.  You can then set a bookmark
6155 in the article, and Gnus will jump to this bookmark the next time it
6156 encounters the article.  @xref{Setting Marks}.
6157
6158 @item
6159 @vindex gnus-replied-mark
6160 All articles that you have replied to or made a followup to (i.e., have
6161 answered) will be marked with an @samp{A} in the second column
6162 (@code{gnus-replied-mark}).
6163
6164 @item
6165 @vindex gnus-forwarded-mark
6166 All articles that you have forwarded will be marked with an @samp{F} in
6167 the second column (@code{gnus-forwarded-mark}).
6168
6169 @item
6170 @vindex gnus-cached-mark
6171 Articles stored in the article cache will be marked with an @samp{*} in
6172 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
6173
6174 @item
6175 @vindex gnus-saved-mark
6176 Articles ``saved'' (in some manner or other; not necessarily
6177 religiously) are marked with an @samp{S} in the second column
6178 (@code{gnus-saved-mark}).
6179
6180 @item
6181 @vindex gnus-unseen-mark
6182 Articles that haven't been seen before in Gnus by the user are marked
6183 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
6184
6185 @item
6186 @vindex gnus-downloaded-mark
6187 When using the Gnus agent (@pxref{Agent Basics}), articles may be
6188 downloaded for unplugged (offline) viewing.  If you are using the
6189 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
6190 (The variable @code{gnus-downloaded-mark} controls which character to
6191 use.)
6192
6193 @item
6194 @vindex gnus-undownloaded-mark
6195 When using the Gnus agent (@pxref{Agent Basics}), some articles might
6196 not have been downloaded.  Such articles cannot be viewed while you
6197 are unplugged (offline).  If you are using the @samp{%O} spec, these
6198 articles get the @samp{-} mark in that spec.  (The variable
6199 @code{gnus-undownloaded-mark} controls which character to use.)
6200
6201 @item
6202 @vindex gnus-downloadable-mark
6203 The Gnus agent (@pxref{Agent Basics}) downloads some articles
6204 automatically, but it is also possible to explicitly mark articles for
6205 download, even if they would not be downloaded automatically.  Such
6206 explicitly-marked articles get the @samp{%} mark in the first column.
6207 (The variable @code{gnus-downloadable-mark} controls which character to
6208 use.)
6209
6210 @item
6211 @vindex gnus-not-empty-thread-mark
6212 @vindex gnus-empty-thread-mark
6213 If the @samp{%e} spec is used, the presence of threads or not will be
6214 marked with @code{gnus-not-empty-thread-mark} and
6215 @code{gnus-empty-thread-mark} in the third column, respectively.
6216
6217 @item
6218 @vindex gnus-process-mark
6219 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
6220 variety of commands react to the presence of the process mark.  For
6221 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
6222 all articles that have been marked with the process mark.  Articles
6223 marked with the process mark have a @samp{#} in the second column.
6224
6225 @end itemize
6226
6227 You might have noticed that most of these ``non-readedness'' marks
6228 appear in the second column by default.  So if you have a cached, saved,
6229 replied article that you have process-marked, what will that look like?
6230
6231 Nothing much.  The precedence rules go as follows: process -> cache ->
6232 replied -> saved.  So if the article is in the cache and is replied,
6233 you'll only see the cache mark and not the replied mark.
6234
6235
6236 @node Setting Marks
6237 @subsection Setting Marks
6238 @cindex setting marks
6239
6240 All the marking commands understand the numeric prefix.
6241
6242 @table @kbd
6243 @item M c
6244 @itemx M-u
6245 @kindex M c (Summary)
6246 @kindex M-u (Summary)
6247 @findex gnus-summary-clear-mark-forward
6248 @cindex mark as unread
6249 Clear all readedness-marks from the current article
6250 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
6251 article as unread.
6252
6253 @item M t
6254 @itemx !
6255 @kindex ! (Summary)
6256 @kindex M t (Summary)
6257 @findex gnus-summary-tick-article-forward
6258 Tick the current article (@code{gnus-summary-tick-article-forward}).
6259 @xref{Article Caching}.
6260
6261 @item M ?
6262 @itemx ?
6263 @kindex ? (Summary)
6264 @kindex M ? (Summary)
6265 @findex gnus-summary-mark-as-dormant
6266 Mark the current article as dormant
6267 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
6268
6269 @item M d
6270 @itemx d
6271 @kindex M d (Summary)
6272 @kindex d (Summary)
6273 @findex gnus-summary-mark-as-read-forward
6274 Mark the current article as read
6275 (@code{gnus-summary-mark-as-read-forward}).
6276
6277 @item D
6278 @kindex D (Summary)
6279 @findex gnus-summary-mark-as-read-backward
6280 Mark the current article as read and move point to the previous line
6281 (@code{gnus-summary-mark-as-read-backward}).
6282
6283 @item M k
6284 @itemx k
6285 @kindex k (Summary)
6286 @kindex M k (Summary)
6287 @findex gnus-summary-kill-same-subject-and-select
6288 Mark all articles that have the same subject as the current one as read,
6289 and then select the next unread article
6290 (@code{gnus-summary-kill-same-subject-and-select}).
6291
6292 @item M K
6293 @itemx C-k
6294 @kindex M K (Summary)
6295 @kindex C-k (Summary)
6296 @findex gnus-summary-kill-same-subject
6297 Mark all articles that have the same subject as the current one as read
6298 (@code{gnus-summary-kill-same-subject}).
6299
6300 @item M C
6301 @kindex M C (Summary)
6302 @findex gnus-summary-catchup
6303 @c @icon{gnus-summary-catchup}
6304 Mark all unread articles as read (@code{gnus-summary-catchup}).
6305
6306 @item M C-c
6307 @kindex M C-c (Summary)
6308 @findex gnus-summary-catchup-all
6309 Mark all articles in the group as read---even the ticked and dormant
6310 articles (@code{gnus-summary-catchup-all}).
6311
6312 @item M H
6313 @kindex M H (Summary)
6314 @findex gnus-summary-catchup-to-here
6315 Catchup the current group to point (before the point)
6316 (@code{gnus-summary-catchup-to-here}).
6317
6318 @item M h
6319 @kindex M h (Summary)
6320 @findex gnus-summary-catchup-from-here
6321 Catchup the current group from point (after the point)
6322 (@code{gnus-summary-catchup-from-here}).
6323
6324 @item C-w
6325 @kindex C-w (Summary)
6326 @findex gnus-summary-mark-region-as-read
6327 Mark all articles between point and mark as read
6328 (@code{gnus-summary-mark-region-as-read}).
6329
6330 @item M V k
6331 @kindex M V k (Summary)
6332 @findex gnus-summary-kill-below
6333 Kill all articles with scores below the default score (or below the
6334 numeric prefix) (@code{gnus-summary-kill-below}).
6335
6336 @item M e
6337 @itemx E
6338 @kindex M e (Summary)
6339 @kindex E (Summary)
6340 @findex gnus-summary-mark-as-expirable
6341 Mark the current article as expirable
6342 (@code{gnus-summary-mark-as-expirable}).
6343
6344 @item M b
6345 @kindex M b (Summary)
6346 @findex gnus-summary-set-bookmark
6347 Set a bookmark in the current article
6348 (@code{gnus-summary-set-bookmark}).
6349
6350 @item M B
6351 @kindex M B (Summary)
6352 @findex gnus-summary-remove-bookmark
6353 Remove the bookmark from the current article
6354 (@code{gnus-summary-remove-bookmark}).
6355
6356 @item M V c
6357 @kindex M V c (Summary)
6358 @findex gnus-summary-clear-above
6359 Clear all marks from articles with scores over the default score (or
6360 over the numeric prefix) (@code{gnus-summary-clear-above}).
6361
6362 @item M V u
6363 @kindex M V u (Summary)
6364 @findex gnus-summary-tick-above
6365 Tick all articles with scores over the default score (or over the
6366 numeric prefix) (@code{gnus-summary-tick-above}).
6367
6368 @item M V m
6369 @kindex M V m (Summary)
6370 @findex gnus-summary-mark-above
6371 Prompt for a mark, and mark all articles with scores over the default
6372 score (or over the numeric prefix) with this mark
6373 (@code{gnus-summary-clear-above}).
6374 @end table
6375
6376 @vindex gnus-summary-goto-unread
6377 The @code{gnus-summary-goto-unread} variable controls what action should
6378 be taken after setting a mark.  If non-@code{nil}, point will move to
6379 the next/previous unread article.  If @code{nil}, point will just move
6380 one line up or down.  As a special case, if this variable is
6381 @code{never}, all the marking commands as well as other commands (like
6382 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6383 The default is @code{t}.
6384
6385
6386 @node Generic Marking Commands
6387 @subsection Generic Marking Commands
6388
6389 Some people would like the command that ticks an article (@kbd{!}) to
6390 go to the next article.  Others would like it to go to the next unread
6391 article.  Yet others would like it to stay on the current article.
6392 And even though I haven't heard of anybody wanting it to go to the
6393 previous (unread) article, I'm sure there are people that want that as
6394 well.
6395
6396 Multiply these five behaviors with five different marking commands, and
6397 you get a potentially complex set of variable to control what each
6398 command should do.
6399
6400 To sidestep that mess, Gnus provides commands that do all these
6401 different things.  They can be found on the @kbd{M M} map in the summary
6402 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6403 to list in this manual.
6404
6405 While you can use these commands directly, most users would prefer
6406 altering the summary mode keymap.  For instance, if you would like the
6407 @kbd{!} command to go to the next article instead of the next unread
6408 article, you could say something like:
6409
6410 @lisp
6411 @group
6412 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6413 (defun my-alter-summary-map ()
6414   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6415 @end group
6416 @end lisp
6417
6418 @noindent
6419 or
6420
6421 @lisp
6422 (defun my-alter-summary-map ()
6423   (local-set-key "!" "MM!n"))
6424 @end lisp
6425
6426
6427 @node Setting Process Marks
6428 @subsection Setting Process Marks
6429 @cindex setting process marks
6430
6431 Process marks are displayed as @code{#} in the summary buffer, and are
6432 used for marking articles in such a way that other commands will
6433 process these articles.  For instance, if you process mark four
6434 articles and then use the @kbd{*} command, Gnus will enter these four
6435 articles into the cache.  For more information,
6436 @pxref{Process/Prefix}.
6437
6438 @table @kbd
6439
6440 @item M P p
6441 @itemx #
6442 @kindex # (Summary)
6443 @kindex M P p (Summary)
6444 @findex gnus-summary-mark-as-processable
6445 Mark the current article with the process mark
6446 (@code{gnus-summary-mark-as-processable}).
6447 @findex gnus-summary-unmark-as-processable
6448
6449 @item M P u
6450 @itemx M-#
6451 @kindex M P u (Summary)
6452 @kindex M-# (Summary)
6453 Remove the process mark, if any, from the current article
6454 (@code{gnus-summary-unmark-as-processable}).
6455
6456 @item M P U
6457 @kindex M P U (Summary)
6458 @findex gnus-summary-unmark-all-processable
6459 Remove the process mark from all articles
6460 (@code{gnus-summary-unmark-all-processable}).
6461
6462 @item M P i
6463 @kindex M P i (Summary)
6464 @findex gnus-uu-invert-processable
6465 Invert the list of process marked articles
6466 (@code{gnus-uu-invert-processable}).
6467
6468 @item M P R
6469 @kindex M P R (Summary)
6470 @findex gnus-uu-mark-by-regexp
6471 Mark articles that have a @code{Subject} header that matches a regular
6472 expression (@code{gnus-uu-mark-by-regexp}).
6473
6474 @item M P G
6475 @kindex M P G (Summary)
6476 @findex gnus-uu-unmark-by-regexp
6477 Unmark articles that have a @code{Subject} header that matches a regular
6478 expression (@code{gnus-uu-unmark-by-regexp}).
6479
6480 @item M P r
6481 @kindex M P r (Summary)
6482 @findex gnus-uu-mark-region
6483 Mark articles in region (@code{gnus-uu-mark-region}).
6484
6485 @item M P g
6486 @kindex M P g (Summary)
6487 @findex gnus-uu-unmark-region
6488 Unmark articles in region (@code{gnus-uu-unmark-region}).
6489
6490 @item M P t
6491 @kindex M P t (Summary)
6492 @findex gnus-uu-mark-thread
6493 Mark all articles in the current (sub)thread
6494 (@code{gnus-uu-mark-thread}).
6495
6496 @item M P T
6497 @kindex M P T (Summary)
6498 @findex gnus-uu-unmark-thread
6499 Unmark all articles in the current (sub)thread
6500 (@code{gnus-uu-unmark-thread}).
6501
6502 @item M P v
6503 @kindex M P v (Summary)
6504 @findex gnus-uu-mark-over
6505 Mark all articles that have a score above the prefix argument
6506 (@code{gnus-uu-mark-over}).
6507
6508 @item M P s
6509 @kindex M P s (Summary)
6510 @findex gnus-uu-mark-series
6511 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6512
6513 @item M P S
6514 @kindex M P S (Summary)
6515 @findex gnus-uu-mark-sparse
6516 Mark all series that have already had some articles marked
6517 (@code{gnus-uu-mark-sparse}).
6518
6519 @item M P a
6520 @kindex M P a (Summary)
6521 @findex gnus-uu-mark-all
6522 Mark all articles in series order (@code{gnus-uu-mark-all}).
6523
6524 @item M P b
6525 @kindex M P b (Summary)
6526 @findex gnus-uu-mark-buffer
6527 Mark all articles in the buffer in the order they appear
6528 (@code{gnus-uu-mark-buffer}).
6529
6530 @item M P k
6531 @kindex M P k (Summary)
6532 @findex gnus-summary-kill-process-mark
6533 Push the current process mark set onto the stack and unmark all articles
6534 (@code{gnus-summary-kill-process-mark}).
6535
6536 @item M P y
6537 @kindex M P y (Summary)
6538 @findex gnus-summary-yank-process-mark
6539 Pop the previous process mark set from the stack and restore it
6540 (@code{gnus-summary-yank-process-mark}).
6541
6542 @item M P w
6543 @kindex M P w (Summary)
6544 @findex gnus-summary-save-process-mark
6545 Push the current process mark set onto the stack
6546 (@code{gnus-summary-save-process-mark}).
6547
6548 @end table
6549
6550 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
6551 set process marks based on article body contents.
6552
6553
6554 @node Limiting
6555 @section Limiting
6556 @cindex limiting
6557
6558 It can be convenient to limit the summary buffer to just show some
6559 subset of the articles currently in the group.  The effect most limit
6560 commands have is to remove a few (or many) articles from the summary
6561 buffer.
6562
6563 Limiting commands work on subsets of the articles already fetched from
6564 the servers.  These commands don't query the server for additional
6565 articles.
6566
6567 @table @kbd
6568
6569 @item / /
6570 @itemx / s
6571 @kindex / / (Summary)
6572 @findex gnus-summary-limit-to-subject
6573 Limit the summary buffer to articles that match some subject
6574 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
6575 matching articles.
6576
6577 @item / a
6578 @kindex / a (Summary)
6579 @findex gnus-summary-limit-to-author
6580 Limit the summary buffer to articles that match some author
6581 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
6582 matching articles.
6583
6584 @item / R
6585 @kindex / R (Summary)
6586 @findex gnus-summary-limit-to-recipient
6587 Limit the summary buffer to articles that match some recipient
6588 (@code{gnus-summary-limit-to-recipient}).  If given a prefix, exclude
6589 matching articles.
6590
6591 @item / A
6592 @kindex / A (Summary)
6593 @findex gnus-summary-limit-to-address
6594 Limit the summary buffer to articles in which contents of From, To or Cc
6595 header match a given address (@code{gnus-summary-limit-to-address}).  If
6596 given a prefix, exclude matching articles.
6597
6598 @item / S
6599 @kindex / S (Summary)
6600 @findex gnus-summary-limit-to-singletons
6601 Limit the summary buffer to articles that aren't part of any displayed
6602 threads (@code{gnus-summary-limit-to-singletons}).  If given a prefix,
6603 limit to articles that are part of displayed threads.
6604
6605 @item / x
6606 @kindex / x (Summary)
6607 @findex gnus-summary-limit-to-extra
6608 Limit the summary buffer to articles that match one of the ``extra''
6609 headers (@pxref{To From Newsgroups})
6610 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
6611 matching articles.
6612
6613 @item / u
6614 @itemx x
6615 @kindex / u (Summary)
6616 @kindex x (Summary)
6617 @findex gnus-summary-limit-to-unread
6618 Limit the summary buffer to articles not marked as read
6619 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6620 buffer to articles strictly unread.  This means that ticked and
6621 dormant articles will also be excluded.
6622
6623 @item / m
6624 @kindex / m (Summary)
6625 @findex gnus-summary-limit-to-marks
6626 Ask for a mark and then limit to all articles that have been marked
6627 with that mark (@code{gnus-summary-limit-to-marks}).
6628
6629 @item / t
6630 @kindex / t (Summary)
6631 @findex gnus-summary-limit-to-age
6632 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6633 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6634 articles younger than that number of days.
6635
6636 @item / n
6637 @kindex / n (Summary)
6638 @findex gnus-summary-limit-to-articles
6639 With prefix @samp{n}, limit the summary buffer to the next @samp{n}
6640 articles.  If not given a prefix, use the process marked articles
6641 instead.  (@code{gnus-summary-limit-to-articles}).
6642
6643 @item / w
6644 @kindex / w (Summary)
6645 @findex gnus-summary-pop-limit
6646 Pop the previous limit off the stack and restore it
6647 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6648 the stack.
6649
6650 @item / .
6651 @kindex / . (Summary)
6652 @findex gnus-summary-limit-to-unseen
6653 Limit the summary buffer to the unseen articles
6654 (@code{gnus-summary-limit-to-unseen}).
6655
6656 @item / v
6657 @kindex / v (Summary)
6658 @findex gnus-summary-limit-to-score
6659 Limit the summary buffer to articles that have a score at or above some
6660 score (@code{gnus-summary-limit-to-score}).
6661
6662 @item / p
6663 @kindex / p (Summary)
6664 @findex gnus-summary-limit-to-display-predicate
6665 Limit the summary buffer to articles that satisfy the @code{display}
6666 group parameter predicate
6667 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
6668 Parameters}, for more on this predicate.
6669
6670 @item / r
6671 @kindex / r (Summary)
6672 @findex gnus-summary-limit-to-replied
6673 Limit the summary buffer to replied articles
6674 (@code{gnus-summary-limit-to-replied}).  If given a prefix, exclude
6675 replied articles.
6676
6677 @item / E
6678 @itemx M S
6679 @kindex M S (Summary)
6680 @kindex / E (Summary)
6681 @findex gnus-summary-limit-include-expunged
6682 Include all expunged articles in the limit
6683 (@code{gnus-summary-limit-include-expunged}).
6684
6685 @item / D
6686 @kindex / D (Summary)
6687 @findex gnus-summary-limit-include-dormant
6688 Include all dormant articles in the limit
6689 (@code{gnus-summary-limit-include-dormant}).
6690
6691 @item / *
6692 @kindex / * (Summary)
6693 @findex gnus-summary-limit-include-cached
6694 Include all cached articles in the limit
6695 (@code{gnus-summary-limit-include-cached}).
6696
6697 @item / d
6698 @kindex / d (Summary)
6699 @findex gnus-summary-limit-exclude-dormant
6700 Exclude all dormant articles from the limit
6701 (@code{gnus-summary-limit-exclude-dormant}).
6702
6703 @item / M
6704 @kindex / M (Summary)
6705 @findex gnus-summary-limit-exclude-marks
6706 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6707
6708 @item / T
6709 @kindex / T (Summary)
6710 @findex gnus-summary-limit-include-thread
6711 Include all the articles in the current thread in the limit.
6712
6713 @item / c
6714 @kindex / c (Summary)
6715 @findex gnus-summary-limit-exclude-childless-dormant
6716 Exclude all dormant articles that have no children from the limit@*
6717 (@code{gnus-summary-limit-exclude-childless-dormant}).
6718
6719 @item / C
6720 @kindex / C (Summary)
6721 @findex gnus-summary-limit-mark-excluded-as-read
6722 Mark all excluded unread articles as read
6723 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
6724 also mark excluded ticked and dormant articles as read.
6725
6726 @item / b
6727 @kindex / b (Summary)
6728 @findex gnus-summary-limit-to-bodies
6729 Limit the summary buffer to articles that have bodies that match a
6730 certain regexp (@code{gnus-summary-limit-to-bodies}).  If given a
6731 prefix, reverse the limit.  This command is quite slow since it
6732 requires selecting each article to find the matches.
6733
6734 @item / h
6735 @kindex / h (Summary)
6736 @findex gnus-summary-limit-to-headers
6737 Like the previous command, only limit to headers instead
6738 (@code{gnus-summary-limit-to-headers}).
6739
6740 @end table
6741
6742
6743 The following commands aren't limiting commands, but use the @kbd{/}
6744 prefix as well.
6745
6746 @table @kbd
6747 @item / N
6748 @kindex / N (Summary)
6749 @findex gnus-summary-insert-new-articles
6750 Insert all new articles in the summary buffer.  It scans for new emails
6751 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6752
6753 @item / o
6754 @kindex / o (Summary)
6755 @findex gnus-summary-insert-old-articles
6756 Insert all old articles in the summary buffer.  If given a numbered
6757 prefix, fetch this number of articles.
6758
6759 @end table
6760
6761
6762 @node Threading
6763 @section Threading
6764 @cindex threading
6765 @cindex article threading
6766
6767 Gnus threads articles by default.  @dfn{To thread} is to put responses
6768 to articles directly after the articles they respond to---in a
6769 hierarchical fashion.
6770
6771 Threading is done by looking at the @code{References} headers of the
6772 articles.  In a perfect world, this would be enough to build pretty
6773 trees, but unfortunately, the @code{References} header is often broken
6774 or simply missing.  Weird news propagation exacerbates the problem,
6775 so one has to employ other heuristics to get pleasing results.  A
6776 plethora of approaches exists, as detailed in horrible detail in
6777 @ref{Customizing Threading}.
6778
6779 First, a quick overview of the concepts:
6780
6781 @table @dfn
6782 @item root
6783 The top-most article in a thread; the first article in the thread.
6784
6785 @item thread
6786 A tree-like article structure.
6787
6788 @item sub-thread
6789 A small(er) section of this tree-like structure.
6790
6791 @item loose threads
6792 Threads often lose their roots due to article expiry, or due to the root
6793 already having been read in a previous session, and not displayed in the
6794 summary buffer.  We then typically have many sub-threads that really
6795 belong to one thread, but are without connecting roots.  These are
6796 called loose threads.
6797
6798 @item thread gathering
6799 An attempt to gather loose threads into bigger threads.
6800
6801 @item sparse threads
6802 A thread where the missing articles have been ``guessed'' at, and are
6803 displayed as empty lines in the summary buffer.
6804
6805 @end table
6806
6807
6808 @menu
6809 * Customizing Threading::       Variables you can change to affect the threading.
6810 * Thread Commands::             Thread based commands in the summary buffer.
6811 @end menu
6812
6813
6814 @node Customizing Threading
6815 @subsection Customizing Threading
6816 @cindex customizing threading
6817
6818 @menu
6819 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6820 * Filling In Threads::          Making the threads displayed look fuller.
6821 * More Threading::              Even more variables for fiddling with threads.
6822 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6823 @end menu
6824
6825
6826 @node Loose Threads
6827 @subsubsection Loose Threads
6828 @cindex <
6829 @cindex >
6830 @cindex loose threads
6831
6832 @table @code
6833 @item gnus-summary-make-false-root
6834 @vindex gnus-summary-make-false-root
6835 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
6836 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6837 Yup.)  Loose subtrees occur when the real root has expired, or you've
6838 read or killed the root in a previous session.
6839
6840 When there is no real root of a thread, Gnus will have to fudge
6841 something.  This variable says what fudging method Gnus should use.
6842 There are four possible values:
6843
6844 @iftex
6845 @iflatex
6846 \gnusfigure{The Summary Buffer}{390}{
6847 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6848 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6849 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6850 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6851 }
6852 @end iflatex
6853 @end iftex
6854
6855 @cindex adopting articles
6856
6857 @table @code
6858
6859 @item adopt
6860 Gnus will make the first of the orphaned articles the parent.  This
6861 parent will adopt all the other articles.  The adopted articles will be
6862 marked as such by pointy brackets (@samp{<>}) instead of the standard
6863 square brackets (@samp{[]}).  This is the default method.
6864
6865 @item dummy
6866 @vindex gnus-summary-dummy-line-format
6867 @vindex gnus-summary-make-false-root-always
6868 Gnus will create a dummy summary line that will pretend to be the
6869 parent.  This dummy line does not correspond to any real article, so
6870 selecting it will just select the first real article after the dummy
6871 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6872 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6873 which is the subject of the article.  @xref{Formatting Variables}.
6874 If you want all threads to have a dummy root, even the non-gathered
6875 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6876
6877 @item empty
6878 Gnus won't actually make any article the parent, but simply leave the
6879 subject field of all orphans except the first empty.  (Actually, it will
6880 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6881 Buffer Format}).)
6882
6883 @item none
6884 Don't make any article parent at all.  Just gather the threads and
6885 display them after one another.
6886
6887 @item nil
6888 Don't gather loose threads.
6889 @end table
6890
6891 @item gnus-summary-gather-subject-limit
6892 @vindex gnus-summary-gather-subject-limit
6893 Loose threads are gathered by comparing subjects of articles.  If this
6894 variable is @code{nil}, Gnus requires an exact match between the
6895 subjects of the loose threads before gathering them into one big
6896 super-thread.  This might be too strict a requirement, what with the
6897 presence of stupid newsreaders that chop off long subject lines.  If
6898 you think so, set this variable to, say, 20 to require that only the
6899 first 20 characters of the subjects have to match.  If you set this
6900 variable to a really low number, you'll find that Gnus will gather
6901 everything in sight into one thread, which isn't very helpful.
6902
6903 @cindex fuzzy article gathering
6904 If you set this variable to the special value @code{fuzzy}, Gnus will
6905 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6906 Matching}).
6907
6908 @item gnus-simplify-subject-fuzzy-regexp
6909 @vindex gnus-simplify-subject-fuzzy-regexp
6910 This can either be a regular expression or list of regular expressions
6911 that match strings that will be removed from subjects if fuzzy subject
6912 simplification is used.
6913
6914 @item gnus-simplify-ignored-prefixes
6915 @vindex gnus-simplify-ignored-prefixes
6916 If you set @code{gnus-summary-gather-subject-limit} to something as low
6917 as 10, you might consider setting this variable to something sensible:
6918
6919 @c Written by Michael Ernst <mernst@cs.rice.edu>
6920 @lisp
6921 (setq gnus-simplify-ignored-prefixes
6922       (concat
6923        "\\`\\[?\\("
6924        (mapconcat
6925         'identity
6926         '("looking"
6927           "wanted" "followup" "summary\\( of\\)?"
6928           "help" "query" "problem" "question"
6929           "answer" "reference" "announce"
6930           "How can I" "How to" "Comparison of"
6931           ;; ...
6932           )
6933         "\\|")
6934        "\\)\\s *\\("
6935        (mapconcat 'identity
6936                   '("for" "for reference" "with" "about")
6937                   "\\|")
6938        "\\)?\\]?:?[ \t]*"))
6939 @end lisp
6940
6941 All words that match this regexp will be removed before comparing two
6942 subjects.
6943
6944 @item gnus-simplify-subject-functions
6945 @vindex gnus-simplify-subject-functions
6946 If non-@code{nil}, this variable overrides
6947 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6948 list of functions to apply to the @code{Subject} string iteratively to
6949 arrive at the simplified version of the string.
6950
6951 Useful functions to put in this list include:
6952
6953 @table @code
6954 @item gnus-simplify-subject-re
6955 @findex gnus-simplify-subject-re
6956 Strip the leading @samp{Re:}.
6957
6958 @item gnus-simplify-subject-fuzzy
6959 @findex gnus-simplify-subject-fuzzy
6960 Simplify fuzzily.
6961
6962 @item gnus-simplify-whitespace
6963 @findex gnus-simplify-whitespace
6964 Remove excessive whitespace.
6965
6966 @item gnus-simplify-all-whitespace
6967 @findex gnus-simplify-all-whitespace
6968 Remove all whitespace.
6969 @end table
6970
6971 You may also write your own functions, of course.
6972
6973
6974 @item gnus-summary-gather-exclude-subject
6975 @vindex gnus-summary-gather-exclude-subject
6976 Since loose thread gathering is done on subjects only, that might lead
6977 to many false hits, especially with certain common subjects like
6978 @samp{} and @samp{(none)}.  To make the situation slightly better,
6979 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6980 what subjects should be excluded from the gathering process.@*
6981 The default is @samp{^ *$\\|^(none)$}.
6982
6983 @item gnus-summary-thread-gathering-function
6984 @vindex gnus-summary-thread-gathering-function
6985 Gnus gathers threads by looking at @code{Subject} headers.  This means
6986 that totally unrelated articles may end up in the same ``thread'', which
6987 is confusing.  An alternate approach is to look at all the
6988 @code{Message-ID}s in all the @code{References} headers to find matches.
6989 This will ensure that no gathered threads ever include unrelated
6990 articles, but it also means that people who have posted with broken
6991 newsreaders won't be gathered properly.  The choice is yours---plague or
6992 cholera:
6993
6994 @table @code
6995 @item gnus-gather-threads-by-subject
6996 @findex gnus-gather-threads-by-subject
6997 This function is the default gathering function and looks at
6998 @code{Subject}s exclusively.
6999
7000 @item gnus-gather-threads-by-references
7001 @findex gnus-gather-threads-by-references
7002 This function looks at @code{References} headers exclusively.
7003 @end table
7004
7005 If you want to test gathering by @code{References}, you could say
7006 something like:
7007
7008 @lisp
7009 (setq gnus-summary-thread-gathering-function
7010       'gnus-gather-threads-by-references)
7011 @end lisp
7012
7013 @end table
7014
7015
7016 @node Filling In Threads
7017 @subsubsection Filling In Threads
7018
7019 @table @code
7020 @item gnus-fetch-old-headers
7021 @vindex gnus-fetch-old-headers
7022 If non-@code{nil}, Gnus will attempt to build old threads by fetching
7023 more old headers---headers to articles marked as read.  If you would
7024 like to display as few summary lines as possible, but still connect as
7025 many loose threads as possible, you should set this variable to
7026 @code{some} or a number.  If you set it to a number, no more than that
7027 number of extra old headers will be fetched.  In either case, fetching
7028 old headers only works if the back end you are using carries overview
7029 files---this would normally be @code{nntp}, @code{nnspool},
7030 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
7031 the thread has been expired by the server, there's not much Gnus can
7032 do about that.
7033
7034 This variable can also be set to @code{invisible}.  This won't have any
7035 visible effects, but is useful if you use the @kbd{A T} command a lot
7036 (@pxref{Finding the Parent}).
7037
7038 The server has to support @acronym{NOV} for any of this to work.
7039
7040 @cindex Gmane, gnus-fetch-old-headers
7041 This feature can seriously impact performance it ignores all locally
7042 cached header entries.  Setting it to @code{t} for groups for a server
7043 that doesn't expire articles (such as news.gmane.org), leads to very
7044 slow summary generation.
7045
7046 @item gnus-fetch-old-ephemeral-headers
7047 @vindex gnus-fetch-old-ephemeral-headers
7048 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
7049 newsgroups.
7050
7051 @item gnus-build-sparse-threads
7052 @vindex gnus-build-sparse-threads
7053 Fetching old headers can be slow.  A low-rent similar effect can be
7054 gotten by setting this variable to @code{some}.  Gnus will then look at
7055 the complete @code{References} headers of all articles and try to string
7056 together articles that belong in the same thread.  This will leave
7057 @dfn{gaps} in the threading display where Gnus guesses that an article
7058 is missing from the thread.  (These gaps appear like normal summary
7059 lines.  If you select a gap, Gnus will try to fetch the article in
7060 question.)  If this variable is @code{t}, Gnus will display all these
7061 ``gaps'' without regard for whether they are useful for completing the
7062 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
7063 off sparse leaf nodes that don't lead anywhere.  This variable is
7064 @code{nil} by default.
7065
7066 @item gnus-read-all-available-headers
7067 @vindex gnus-read-all-available-headers
7068 This is a rather obscure variable that few will find useful.  It's
7069 intended for those non-news newsgroups where the back end has to fetch
7070 quite a lot to present the summary buffer, and where it's impossible to
7071 go back to parents of articles.  This is mostly the case in the
7072 web-based groups.
7073
7074 If you don't use those, then it's safe to leave this as the default
7075 @code{nil}.  If you want to use this variable, it should be a regexp
7076 that matches the group name, or @code{t} for all groups.
7077
7078 @end table
7079
7080
7081 @node More Threading
7082 @subsubsection More Threading
7083
7084 @table @code
7085 @item gnus-show-threads
7086 @vindex gnus-show-threads
7087 If this variable is @code{nil}, no threading will be done, and all of
7088 the rest of the variables here will have no effect.  Turning threading
7089 off will speed group selection up a bit, but it is sure to make reading
7090 slower and more awkward.
7091
7092 @item gnus-thread-hide-subtree
7093 @vindex gnus-thread-hide-subtree
7094 If non-@code{nil}, all threads will be hidden when the summary buffer is
7095 generated.
7096
7097 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
7098 Available predicates are @code{gnus-article-unread-p} and
7099 @code{gnus-article-unseen-p}.
7100
7101 Here's an example:
7102
7103 @lisp
7104 (setq gnus-thread-hide-subtree
7105       '(or gnus-article-unread-p
7106            gnus-article-unseen-p))
7107 @end lisp
7108
7109 (It's a pretty nonsensical example, since all unseen articles are also
7110 unread, but you get my drift.)
7111
7112
7113 @item gnus-thread-expunge-below
7114 @vindex gnus-thread-expunge-below
7115 All threads that have a total score (as defined by
7116 @code{gnus-thread-score-function}) less than this number will be
7117 expunged.  This variable is @code{nil} by default, which means that no
7118 threads are expunged.
7119
7120 @item gnus-thread-hide-killed
7121 @vindex gnus-thread-hide-killed
7122 if you kill a thread and this variable is non-@code{nil}, the subtree
7123 will be hidden.
7124
7125 @item gnus-thread-ignore-subject
7126 @vindex gnus-thread-ignore-subject
7127 Sometimes somebody changes the subject in the middle of a thread.  If
7128 this variable is non-@code{nil}, which is the default, the subject
7129 change is ignored.  If it is @code{nil}, a change in the subject will
7130 result in a new thread.
7131
7132 @item gnus-thread-indent-level
7133 @vindex gnus-thread-indent-level
7134 This is a number that says how much each sub-thread should be indented.
7135 The default is 4.
7136
7137 @item gnus-sort-gathered-threads-function
7138 @vindex gnus-sort-gathered-threads-function
7139 Sometimes, particularly with mailing lists, the order in which mails
7140 arrive locally is not necessarily the same as the order in which they
7141 arrived on the mailing list.  Consequently, when sorting sub-threads
7142 using the default @code{gnus-thread-sort-by-number}, responses can end
7143 up appearing before the article to which they are responding to.
7144 Setting this variable to an alternate value
7145 (e.g., @code{gnus-thread-sort-by-date}), in a group's parameters or in an
7146 appropriate hook (e.g., @code{gnus-summary-generate-hook}) can produce a
7147 more logical sub-thread ordering in such instances.
7148
7149 @end table
7150
7151
7152 @node Low-Level Threading
7153 @subsubsection Low-Level Threading
7154
7155 @table @code
7156
7157 @item gnus-parse-headers-hook
7158 @vindex gnus-parse-headers-hook
7159 Hook run before parsing any headers.
7160
7161 @item gnus-alter-header-function
7162 @vindex gnus-alter-header-function
7163 If non-@code{nil}, this function will be called to allow alteration of
7164 article header structures.  The function is called with one parameter,
7165 the article header vector, which it may alter in any way.  For instance,
7166 if you have a mail-to-news gateway which alters the @code{Message-ID}s
7167 in systematic ways (by adding prefixes and such), you can use this
7168 variable to un-scramble the @code{Message-ID}s so that they are more
7169 meaningful.  Here's one example:
7170
7171 @lisp
7172 (setq gnus-alter-header-function 'my-alter-message-id)
7173
7174 (defun my-alter-message-id (header)
7175   (let ((id (mail-header-id header)))
7176     (when (string-match
7177            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
7178       (mail-header-set-id
7179        (concat (match-string 1 id) "@@" (match-string 2 id))
7180        header))))
7181 @end lisp
7182
7183 @end table
7184
7185
7186 @node Thread Commands
7187 @subsection Thread Commands
7188 @cindex thread commands
7189
7190 @table @kbd
7191
7192 @item T k
7193 @itemx C-M-k
7194 @kindex T k (Summary)
7195 @kindex C-M-k (Summary)
7196 @findex gnus-summary-kill-thread
7197 Mark all articles in the current (sub-)thread as read
7198 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
7199 remove all marks instead.  If the prefix argument is negative, tick
7200 articles instead.
7201
7202 @item T l
7203 @itemx C-M-l
7204 @kindex T l (Summary)
7205 @kindex C-M-l (Summary)
7206 @findex gnus-summary-lower-thread
7207 Lower the score of the current (sub-)thread
7208 (@code{gnus-summary-lower-thread}).
7209
7210 @item T i
7211 @kindex T i (Summary)
7212 @findex gnus-summary-raise-thread
7213 Increase the score of the current (sub-)thread
7214 (@code{gnus-summary-raise-thread}).
7215
7216 @item T #
7217 @kindex T # (Summary)
7218 @findex gnus-uu-mark-thread
7219 Set the process mark on the current (sub-)thread
7220 (@code{gnus-uu-mark-thread}).
7221
7222 @item T M-#
7223 @kindex T M-# (Summary)
7224 @findex gnus-uu-unmark-thread
7225 Remove the process mark from the current (sub-)thread
7226 (@code{gnus-uu-unmark-thread}).
7227
7228 @item T T
7229 @kindex T T (Summary)
7230 @findex gnus-summary-toggle-threads
7231 Toggle threading (@code{gnus-summary-toggle-threads}).
7232
7233 @item T s
7234 @kindex T s (Summary)
7235 @findex gnus-summary-show-thread
7236 Expose the (sub-)thread hidden under the current article, if any@*
7237 (@code{gnus-summary-show-thread}).
7238
7239 @item T h
7240 @kindex T h (Summary)
7241 @findex gnus-summary-hide-thread
7242 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
7243
7244 @item T S
7245 @kindex T S (Summary)
7246 @findex gnus-summary-show-all-threads
7247 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
7248
7249 @item T H
7250 @kindex T H (Summary)
7251 @findex gnus-summary-hide-all-threads
7252 Hide all threads (@code{gnus-summary-hide-all-threads}).
7253
7254 @item T t
7255 @kindex T t (Summary)
7256 @findex gnus-summary-rethread-current
7257 Re-thread the current article's thread
7258 (@code{gnus-summary-rethread-current}).  This works even when the
7259 summary buffer is otherwise unthreaded.
7260
7261 @item T ^
7262 @kindex T ^ (Summary)
7263 @findex gnus-summary-reparent-thread
7264 Make the current article the child of the marked (or previous) article
7265 (@code{gnus-summary-reparent-thread}).
7266
7267 @item T M-^
7268 @kindex T M-^ (Summary)
7269 @findex gnus-summary-reparent-children
7270 Make the current article the parent of the marked articles
7271 (@code{gnus-summary-reparent-children}).
7272
7273 @end table
7274
7275 The following commands are thread movement commands.  They all
7276 understand the numeric prefix.
7277
7278 @table @kbd
7279
7280 @item T n
7281 @kindex T n (Summary)
7282 @itemx C-M-f
7283 @kindex C-M-n (Summary)
7284 @itemx M-down
7285 @kindex M-down (Summary)
7286 @findex gnus-summary-next-thread
7287 Go to the next thread (@code{gnus-summary-next-thread}).
7288
7289 @item T p
7290 @kindex T p (Summary)
7291 @itemx C-M-b
7292 @kindex C-M-p (Summary)
7293 @itemx M-up
7294 @kindex M-up (Summary)
7295 @findex gnus-summary-prev-thread
7296 Go to the previous thread (@code{gnus-summary-prev-thread}).
7297
7298 @item T d
7299 @kindex T d (Summary)
7300 @findex gnus-summary-down-thread
7301 Descend the thread (@code{gnus-summary-down-thread}).
7302
7303 @item T u
7304 @kindex T u (Summary)
7305 @findex gnus-summary-up-thread
7306 Ascend the thread (@code{gnus-summary-up-thread}).
7307
7308 @item T o
7309 @kindex T o (Summary)
7310 @findex gnus-summary-top-thread
7311 Go to the top of the thread (@code{gnus-summary-top-thread}).
7312 @end table
7313
7314 @vindex gnus-thread-operation-ignore-subject
7315 If you ignore subject while threading, you'll naturally end up with
7316 threads that have several different subjects in them.  If you then issue
7317 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
7318 wish to kill the entire thread, but just those parts of the thread that
7319 have the same subject as the current article.  If you like this idea,
7320 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
7321 is non-@code{nil} (which it is by default), subjects will be ignored
7322 when doing thread commands.  If this variable is @code{nil}, articles in
7323 the same thread with different subjects will not be included in the
7324 operation in question.  If this variable is @code{fuzzy}, only articles
7325 that have subjects fuzzily equal will be included (@pxref{Fuzzy
7326 Matching}).
7327
7328
7329 @node Sorting the Summary Buffer
7330 @section Sorting the Summary Buffer
7331
7332 @findex gnus-thread-sort-by-total-score
7333 @findex gnus-thread-sort-by-date
7334 @findex gnus-thread-sort-by-score
7335 @findex gnus-thread-sort-by-subject
7336 @findex gnus-thread-sort-by-author
7337 @findex gnus-thread-sort-by-recipient
7338 @findex gnus-thread-sort-by-number
7339 @findex gnus-thread-sort-by-random
7340 @vindex gnus-thread-sort-functions
7341 @findex gnus-thread-sort-by-most-recent-number
7342 @findex gnus-thread-sort-by-most-recent-date
7343 If you are using a threaded summary display, you can sort the threads by
7344 setting @code{gnus-thread-sort-functions}, which can be either a single
7345 function, a list of functions, or a list containing functions and
7346 @code{(not some-function)} elements.
7347
7348 By default, sorting is done on article numbers.  Ready-made sorting
7349 predicate functions include @code{gnus-thread-sort-by-number},
7350 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-recipient},
7351 @code{gnus-thread-sort-by-subject},
7352 @code{gnus-thread-sort-by-date},
7353 @code{gnus-thread-sort-by-score},
7354 @code{gnus-thread-sort-by-most-recent-number},
7355 @code{gnus-thread-sort-by-most-recent-date},
7356 @code{gnus-thread-sort-by-random} and
7357 @code{gnus-thread-sort-by-total-score}.
7358
7359 Each function takes two threads and returns non-@code{nil} if the first
7360 thread should be sorted before the other.  Note that sorting really is
7361 normally done by looking only at the roots of each thread.  Exceptions
7362 to this rule are @code{gnus-thread-sort-by-most-recent-number} and
7363 @code{gnus-thread-sort-by-most-recent-date}.
7364
7365 If you use more than one function, the primary sort key should be the
7366 last function in the list.  You should probably always include
7367 @code{gnus-thread-sort-by-number} in the list of sorting
7368 functions---preferably first.  This will ensure that threads that are
7369 equal with respect to the other sort criteria will be displayed in
7370 ascending article order.
7371
7372 If you would like to sort by reverse score, then by subject, and finally
7373 by number, you could do something like:
7374
7375 @lisp
7376 (setq gnus-thread-sort-functions
7377       '(gnus-thread-sort-by-number
7378         gnus-thread-sort-by-subject
7379         (not gnus-thread-sort-by-total-score)))
7380 @end lisp
7381
7382 The threads that have highest score will be displayed first in the
7383 summary buffer.  When threads have the same score, they will be sorted
7384 alphabetically.  The threads that have the same score and the same
7385 subject will be sorted by number, which is (normally) the sequence in
7386 which the articles arrived.
7387
7388 If you want to sort by score and then reverse arrival order, you could
7389 say something like:
7390
7391 @lisp
7392 (setq gnus-thread-sort-functions
7393       '((not gnus-thread-sort-by-number)
7394         gnus-thread-sort-by-score))
7395 @end lisp
7396
7397 @vindex gnus-thread-score-function
7398 The function in the @code{gnus-thread-score-function} variable (default
7399 @code{+}) is used for calculating the total score of a thread.  Useful
7400 functions might be @code{max}, @code{min}, or squared means, or whatever
7401 tickles your fancy.
7402
7403 @findex gnus-article-sort-functions
7404 @findex gnus-article-sort-by-date
7405 @findex gnus-article-sort-by-most-recent-date
7406 @findex gnus-article-sort-by-score
7407 @findex gnus-article-sort-by-subject
7408 @findex gnus-article-sort-by-author
7409 @findex gnus-article-sort-by-random
7410 @findex gnus-article-sort-by-number
7411 @findex gnus-article-sort-by-most-recent-number
7412 If you are using an unthreaded display for some strange reason or
7413 other, you have to fiddle with the @code{gnus-article-sort-functions}
7414 variable.  It is very similar to the
7415 @code{gnus-thread-sort-functions}, except that it uses slightly
7416 different functions for article comparison.  Available sorting
7417 predicate functions are @code{gnus-article-sort-by-number},
7418 @code{gnus-article-sort-by-author},
7419 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
7420 @code{gnus-article-sort-by-random}, and
7421 @code{gnus-article-sort-by-score}.
7422
7423 If you want to sort an unthreaded summary display by subject, you could
7424 say something like:
7425
7426 @lisp
7427 (setq gnus-article-sort-functions
7428       '(gnus-article-sort-by-number
7429         gnus-article-sort-by-subject))
7430 @end lisp
7431
7432 You can define group specific sorting via @code{gnus-parameters},
7433 @xref{Group Parameters}.
7434
7435
7436 @node Asynchronous Fetching
7437 @section Asynchronous Article Fetching
7438 @cindex asynchronous article fetching
7439 @cindex article pre-fetch
7440 @cindex pre-fetch
7441
7442 If you read your news from an @acronym{NNTP} server that's far away, the
7443 network latencies may make reading articles a chore.  You have to wait
7444 for a while after pressing @kbd{n} to go to the next article before the
7445 article appears.  Why can't Gnus just go ahead and fetch the article
7446 while you are reading the previous one?  Why not, indeed.
7447
7448 First, some caveats.  There are some pitfalls to using asynchronous
7449 article fetching, especially the way Gnus does it.
7450
7451 Let's say you are reading article 1, which is short, and article 2 is
7452 quite long, and you are not interested in reading that.  Gnus does not
7453 know this, so it goes ahead and fetches article 2.  You decide to read
7454 article 3, but since Gnus is in the process of fetching article 2, the
7455 connection is blocked.
7456
7457 To avoid these situations, Gnus will open two (count 'em two)
7458 connections to the server.  Some people may think this isn't a very nice
7459 thing to do, but I don't see any real alternatives.  Setting up that
7460 extra connection takes some time, so Gnus startup will be slower.
7461
7462 Gnus will fetch more articles than you will read.  This will mean that
7463 the link between your machine and the @acronym{NNTP} server will become more
7464 loaded than if you didn't use article pre-fetch.  The server itself will
7465 also become more loaded---both with the extra article requests, and the
7466 extra connection.
7467
7468 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7469 you really want to.
7470
7471 @vindex gnus-asynchronous
7472 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7473 happen automatically.
7474
7475 @vindex gnus-use-article-prefetch
7476 You can control how many articles are to be pre-fetched by setting
7477 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7478 that when you read an article in the group, the back end will pre-fetch
7479 the next 30 articles.  If this variable is @code{t}, the back end will
7480 pre-fetch all the articles it can without bound.  If it is
7481 @code{nil}, no pre-fetching will be done.
7482
7483 @vindex gnus-async-prefetch-article-p
7484 @findex gnus-async-unread-p
7485 There are probably some articles that you don't want to pre-fetch---read
7486 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7487 variable controls whether an article is to be pre-fetched.  This
7488 function should return non-@code{nil} when the article in question is
7489 to be pre-fetched.  The default is @code{gnus-async-unread-p}, which
7490 returns @code{nil} on read articles.  The function is called with an
7491 article data structure as the only parameter.
7492
7493 If, for instance, you wish to pre-fetch only unread articles shorter
7494 than 100 lines, you could say something like:
7495
7496 @lisp
7497 (defun my-async-short-unread-p (data)
7498   "Return non-nil for short, unread articles."
7499   (and (gnus-data-unread-p data)
7500        (< (mail-header-lines (gnus-data-header data))
7501           100)))
7502
7503 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7504 @end lisp
7505
7506 These functions will be called many, many times, so they should
7507 preferably be short and sweet to avoid slowing down Gnus too much.
7508 It's probably a good idea to byte-compile things like this.
7509
7510 @vindex gnus-async-post-fetch-function
7511 @findex gnus-html-prefetch-images
7512 After an article has been prefetched, this
7513 @code{gnus-async-post-fetch-function} will be called.  The buffer will
7514 be narrowed to the region of the article that was fetched.  A useful
7515 value would be @code{gnus-html-prefetch-images}, which will prefetch
7516 and store images referenced in the article, so that you don't have to
7517 wait for them to be fetched when you read the article.  This is useful
7518 for @acronym{HTML} messages that have external images.
7519
7520 @vindex gnus-prefetched-article-deletion-strategy
7521 Articles have to be removed from the asynch buffer sooner or later.  The
7522 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7523 articles.  This is a list that may contain the following elements:
7524
7525 @table @code
7526 @item read
7527 Remove articles when they are read.
7528
7529 @item exit
7530 Remove articles when exiting the group.
7531 @end table
7532
7533 The default value is @code{(read exit)}.
7534
7535 @c @vindex gnus-use-header-prefetch
7536 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7537 @c from the next group.
7538
7539
7540 @node Article Caching
7541 @section Article Caching
7542 @cindex article caching
7543 @cindex caching
7544
7545 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7546 consider turning article caching on.  Each article will then be stored
7547 locally under your home directory.  As you may surmise, this could
7548 potentially use @emph{huge} amounts of disk space, as well as eat up all
7549 your inodes so fast it will make your head swim.  In vodka.
7550
7551 Used carefully, though, it could be just an easier way to save articles.
7552
7553 @vindex gnus-use-long-file-name
7554 @vindex gnus-cache-directory
7555 @vindex gnus-use-cache
7556 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7557 all articles ticked or marked as dormant will then be copied
7558 over to your local cache (@code{gnus-cache-directory}).  Whether this
7559 cache is flat or hierarchical is controlled by the
7560 @code{gnus-use-long-file-name} variable, as usual.
7561
7562 When re-selecting a ticked or dormant article, it will be fetched from the
7563 cache instead of from the server.  As articles in your cache will never
7564 expire, this might serve as a method of saving articles while still
7565 keeping them where they belong.  Just mark all articles you want to save
7566 as dormant, and don't worry.
7567
7568 When an article is marked as read, is it removed from the cache.
7569
7570 @vindex gnus-cache-remove-articles
7571 @vindex gnus-cache-enter-articles
7572 The entering/removal of articles from the cache is controlled by the
7573 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7574 variables.  Both are lists of symbols.  The first is @code{(ticked
7575 dormant)} by default, meaning that ticked and dormant articles will be
7576 put in the cache.  The latter is @code{(read)} by default, meaning that
7577 articles marked as read are removed from the cache.  Possibly
7578 symbols in these two lists are @code{ticked}, @code{dormant},
7579 @code{unread} and @code{read}.
7580
7581 @findex gnus-jog-cache
7582 So where does the massive article-fetching and storing come into the
7583 picture?  The @code{gnus-jog-cache} command will go through all
7584 subscribed newsgroups, request all unread articles, score them, and
7585 store them in the cache.  You should only ever, ever ever ever, use this
7586 command if 1) your connection to the @acronym{NNTP} server is really, really,
7587 really slow and 2) you have a really, really, really huge disk.
7588 Seriously.  One way to cut down on the number of articles downloaded is
7589 to score unwanted articles down and have them marked as read.  They will
7590 not then be downloaded by this command.
7591
7592 @vindex gnus-uncacheable-groups
7593 @vindex gnus-cacheable-groups
7594 It is likely that you do not want caching on all groups.  For instance,
7595 if your @code{nnml} mail is located under your home directory, it makes no
7596 sense to cache it somewhere else under your home directory.  Unless you
7597 feel that it's neat to use twice as much space.
7598
7599 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7600 regexp of groups to cache, @samp{^nntp} for instance, or set the
7601 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7602 Both variables are @code{nil} by default.  If a group matches both
7603 variables, the group is not cached.
7604
7605 @findex gnus-cache-generate-nov-databases
7606 @findex gnus-cache-generate-active
7607 @vindex gnus-cache-active-file
7608 The cache stores information on what articles it contains in its active
7609 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7610 of the cache) becomes all messed up for some reason or other, Gnus
7611 offers two functions that will try to set things right.  @kbd{M-x
7612 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7613 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7614 file.
7615
7616 @findex gnus-cache-move-cache
7617 @code{gnus-cache-move-cache} will move your whole
7618 @code{gnus-cache-directory} to some other location.  You get asked to
7619 where, isn't that cool?
7620
7621 @node Persistent Articles
7622 @section Persistent Articles
7623 @cindex persistent articles
7624
7625 Closely related to article caching, we have @dfn{persistent articles}.
7626 In fact, it's just a different way of looking at caching, and much more
7627 useful in my opinion.
7628
7629 Say you're reading a newsgroup, and you happen on to some valuable gem
7630 that you want to keep and treasure forever.  You'd normally just save it
7631 (using one of the many saving commands) in some file.  The problem with
7632 that is that it's just, well, yucky.  Ideally you'd prefer just having
7633 the article remain in the group where you found it forever; untouched by
7634 the expiry going on at the news server.
7635
7636 This is what a @dfn{persistent article} is---an article that just won't
7637 be deleted.  It's implemented using the normal cache functions, but
7638 you use two explicit commands for managing persistent articles:
7639
7640 @table @kbd
7641
7642 @item *
7643 @kindex * (Summary)
7644 @findex gnus-cache-enter-article
7645 Make the current article persistent (@code{gnus-cache-enter-article}).
7646
7647 @item M-*
7648 @kindex M-* (Summary)
7649 @findex gnus-cache-remove-article
7650 Remove the current article from the persistent articles
7651 (@code{gnus-cache-remove-article}).  This will normally delete the
7652 article.
7653 @end table
7654
7655 Both these commands understand the process/prefix convention.
7656
7657 To avoid having all ticked articles (and stuff) entered into the cache,
7658 you should set @code{gnus-use-cache} to @code{passive} if you're just
7659 interested in persistent articles:
7660
7661 @lisp
7662 (setq gnus-use-cache 'passive)
7663 @end lisp
7664
7665 @node Sticky Articles
7666 @section Sticky Articles
7667 @cindex sticky articles
7668
7669 When you select an article the current article buffer will be reused
7670 according to the value of the variable
7671 @code{gnus-single-article-buffer}.  If its value is non-@code{nil} (the
7672 default) all articles reuse the same article buffer.  Else each group
7673 has its own article buffer.
7674
7675 This implies that it's not possible to have more than one article buffer
7676 in a group at a time.  But sometimes you might want to display all the
7677 latest emails from your mother, your father, your aunt, your uncle and
7678 your 17 cousins to coordinate the next Christmas party.
7679
7680 That's where sticky articles come in handy.  A sticky article buffer
7681 basically is a normal article buffer, but it won't be reused when you
7682 select another article.  You can make an article sticky with:
7683
7684 @table @kbd
7685 @item A S
7686 @kindex A S (Summary)
7687 @findex gnus-sticky-article
7688 Make the current article sticky.  If a prefix arg is given, ask for a
7689 name for this sticky article buffer.
7690 @end table
7691
7692 To close a sticky article buffer you can use these commands:
7693
7694 @table @kbd
7695 @item q
7696 @kindex q (Article)
7697 @findex bury-buffer
7698 Puts this sticky article buffer at the end of the list of all buffers.
7699
7700 @item k
7701 @kindex k (Article)
7702 @findex gnus-kill-sticky-article-buffer
7703 Kills this sticky article buffer.
7704 @end table
7705
7706 To kill all sticky article buffers you can use:
7707
7708 @defun gnus-kill-sticky-article-buffers ARG
7709 Kill all sticky article buffers.
7710 If a prefix ARG is given, ask for confirmation.
7711 @end defun
7712
7713 @node Article Backlog
7714 @section Article Backlog
7715 @cindex backlog
7716 @cindex article backlog
7717
7718 If you have a slow connection, but the idea of using caching seems
7719 unappealing to you (and it is, really), you can help the situation some
7720 by switching on the @dfn{backlog}.  This is where Gnus will buffer
7721 already read articles so that it doesn't have to re-fetch articles
7722 you've already read.  This only helps if you are in the habit of
7723 re-selecting articles you've recently read, of course.  If you never do
7724 that, turning the backlog on will slow Gnus down a little bit, and
7725 increase memory usage some.
7726
7727 @vindex gnus-keep-backlog
7728 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
7729 at most @var{n} old articles in a buffer for later re-fetching.  If this
7730 variable is non-@code{nil} and is not a number, Gnus will store
7731 @emph{all} read articles, which means that your Emacs will grow without
7732 bound before exploding and taking your machine down with you.  I put
7733 that in there just to keep y'all on your toes.
7734
7735 The default value is 20.
7736
7737
7738 @node Saving Articles
7739 @section Saving Articles
7740 @cindex saving articles
7741
7742 Gnus can save articles in a number of ways.  Below is the documentation
7743 for saving articles in a fairly straight-forward fashion (i.e., little
7744 processing of the article is done before it is saved).  For a different
7745 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7746 (@pxref{Decoding Articles}).
7747
7748 For the commands listed here, the target is a file.  If you want to
7749 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7750 command (@pxref{Mail Group Commands}).
7751
7752 @vindex gnus-save-all-headers
7753 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
7754 unwanted headers before saving the article.
7755
7756 @vindex gnus-saved-headers
7757 If the preceding variable is @code{nil}, all headers that match the
7758 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7759 deleted before saving.
7760
7761 @table @kbd
7762
7763 @item O o
7764 @itemx o
7765 @kindex O o (Summary)
7766 @kindex o (Summary)
7767 @findex gnus-summary-save-article
7768 @c @icon{gnus-summary-save-article}
7769 Save the current article using the default article saver
7770 (@code{gnus-summary-save-article}).
7771
7772 @item O m
7773 @kindex O m (Summary)
7774 @findex gnus-summary-save-article-mail
7775 Save the current article in a Unix mail box (mbox) file
7776 (@code{gnus-summary-save-article-mail}).
7777
7778 @item O r
7779 @kindex O r (Summary)
7780 @findex gnus-summary-save-article-rmail
7781 Save the current article in Rmail format
7782 (@code{gnus-summary-save-article-rmail}).  This is mbox since Emacs 23,
7783 Babyl in older versions.
7784
7785 @item O f
7786 @kindex O f (Summary)
7787 @findex gnus-summary-save-article-file
7788 @c @icon{gnus-summary-save-article-file}
7789 Save the current article in plain file format
7790 (@code{gnus-summary-save-article-file}).
7791
7792 @item O F
7793 @kindex O F (Summary)
7794 @findex gnus-summary-write-article-file
7795 Write the current article in plain file format, overwriting any previous
7796 file contents (@code{gnus-summary-write-article-file}).
7797
7798 @item O b
7799 @kindex O b (Summary)
7800 @findex gnus-summary-save-article-body-file
7801 Save the current article body in plain file format
7802 (@code{gnus-summary-save-article-body-file}).
7803
7804 @item O h
7805 @kindex O h (Summary)
7806 @findex gnus-summary-save-article-folder
7807 Save the current article in mh folder format
7808 (@code{gnus-summary-save-article-folder}).
7809
7810 @item O v
7811 @kindex O v (Summary)
7812 @findex gnus-summary-save-article-vm
7813 Save the current article in a VM folder
7814 (@code{gnus-summary-save-article-vm}).
7815
7816 @item O p
7817 @itemx |
7818 @kindex O p (Summary)
7819 @kindex | (Summary)
7820 @findex gnus-summary-pipe-output
7821 @vindex gnus-summary-pipe-output-default-command
7822 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7823 the current article to a process (@code{gnus-summary-pipe-output}).
7824 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7825 complete headers in the piped output.  The symbolic prefix @code{r} is
7826 special; it lets this command pipe a raw article including all headers.
7827 The @code{gnus-summary-pipe-output-default-command} variable can be set
7828 to a string containing the default command and options (default
7829 @code{nil}).
7830
7831 @item O P
7832 @kindex O P (Summary)
7833 @findex gnus-summary-muttprint
7834 @vindex gnus-summary-muttprint-program
7835 Save the current article into muttprint.  That is, print it using the
7836 external program @uref{http://muttprint.sourceforge.net/,
7837 Muttprint}.  The program name and options to use is controlled by the
7838 variable @code{gnus-summary-muttprint-program}.
7839 (@code{gnus-summary-muttprint}).
7840
7841 @end table
7842
7843 @vindex gnus-prompt-before-saving
7844 All these commands use the process/prefix convention
7845 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7846 functions, you might get tired of being prompted for files to save each
7847 and every article in.  The prompting action is controlled by
7848 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7849 default, giving you that excessive prompting action you know and
7850 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7851 just once for each series of articles you save.  If you like to really
7852 have Gnus do all your thinking for you, you can even set this variable
7853 to @code{nil}, which means that you will never be prompted for files to
7854 save articles in.  Gnus will simply save all the articles in the default
7855 files.
7856
7857
7858 @vindex gnus-default-article-saver
7859 You can customize the @code{gnus-default-article-saver} variable to make
7860 Gnus do what you want it to.  You can use any of the eight ready-made
7861 functions below, or you can create your own.
7862
7863 @table @code
7864
7865 @item gnus-summary-save-in-rmail
7866 @findex gnus-summary-save-in-rmail
7867 @vindex gnus-rmail-save-name
7868 @findex gnus-plain-save-name
7869 This is the default format, that used by the Rmail package.  Since Emacs
7870 23, Rmail uses standard mbox format.  Before this, it used the
7871 @dfn{Babyl} format.  Accordingly, this command writes mbox format since
7872 Emacs 23, unless appending to an existing Babyl file.  In older versions
7873 of Emacs, it always uses Babyl format.  Uses the function in the
7874 @code{gnus-rmail-save-name} variable to get a file name to save the
7875 article in.  The default is @code{gnus-plain-save-name}.
7876
7877 @item gnus-summary-save-in-mail
7878 @findex gnus-summary-save-in-mail
7879 @vindex gnus-mail-save-name
7880 Save in a Unix mail (mbox) file.  Uses the function in the
7881 @code{gnus-mail-save-name} variable to get a file name to save the
7882 article in.  The default is @code{gnus-plain-save-name}.
7883
7884 @item gnus-summary-save-in-file
7885 @findex gnus-summary-save-in-file
7886 @vindex gnus-file-save-name
7887 @findex gnus-numeric-save-name
7888 Append the article straight to an ordinary file.  Uses the function in
7889 the @code{gnus-file-save-name} variable to get a file name to save the
7890 article in.  The default is @code{gnus-numeric-save-name}.
7891
7892 @item gnus-summary-write-to-file
7893 @findex gnus-summary-write-to-file
7894 Write the article straight to an ordinary file.  The file is
7895 overwritten if it exists.  Uses the function in the
7896 @code{gnus-file-save-name} variable to get a file name to save the
7897 article in.  The default is @code{gnus-numeric-save-name}.
7898
7899 @item gnus-summary-save-body-in-file
7900 @findex gnus-summary-save-body-in-file
7901 Append the article body to an ordinary file.  Uses the function in the
7902 @code{gnus-file-save-name} variable to get a file name to save the
7903 article in.  The default is @code{gnus-numeric-save-name}.
7904
7905 @item gnus-summary-write-body-to-file
7906 @findex gnus-summary-write-body-to-file
7907 Write the article body straight to an ordinary file.  The file is
7908 overwritten if it exists.  Uses the function in the
7909 @code{gnus-file-save-name} variable to get a file name to save the
7910 article in.  The default is @code{gnus-numeric-save-name}.
7911
7912 @item gnus-summary-save-in-folder
7913 @findex gnus-summary-save-in-folder
7914 @findex gnus-folder-save-name
7915 @findex gnus-Folder-save-name
7916 @vindex gnus-folder-save-name
7917 @cindex rcvstore
7918 @cindex MH folders
7919 Save the article to an MH folder using @code{rcvstore} from the MH
7920 library.  Uses the function in the @code{gnus-folder-save-name} variable
7921 to get a file name to save the article in.  The default is
7922 @code{gnus-folder-save-name}, but you can also use
7923 @code{gnus-Folder-save-name}, which creates capitalized names.
7924
7925 @item gnus-summary-save-in-vm
7926 @findex gnus-summary-save-in-vm
7927 Save the article in a VM folder.  You have to have the VM mail
7928 reader to use this setting.
7929
7930 @item gnus-summary-save-in-pipe
7931 @findex gnus-summary-save-in-pipe
7932 Pipe the article to a shell command.  This function takes optional two
7933 arguments COMMAND and RAW@.  Valid values for COMMAND include:
7934
7935 @itemize @bullet
7936 @item a string@*
7937 The executable command name and possibly arguments.
7938 @item @code{nil}@*
7939 You will be prompted for the command in the minibuffer.
7940 @item the symbol @code{default}@*
7941 It will be replaced with the command which the variable
7942 @code{gnus-summary-pipe-output-default-command} holds or the command
7943 last used for saving.
7944 @end itemize
7945
7946 Non-@code{nil} value for RAW overrides @code{:decode} and
7947 @code{:headers} properties (see below) and the raw article including all
7948 headers will be piped.
7949 @end table
7950
7951 The symbol of each function may have the following properties:
7952
7953 @table @code
7954 @item :decode
7955 The value non-@code{nil} means save decoded articles.  This is
7956 meaningful only with @code{gnus-summary-save-in-file},
7957 @code{gnus-summary-save-body-in-file},
7958 @code{gnus-summary-write-to-file},
7959 @code{gnus-summary-write-body-to-file}, and
7960 @code{gnus-summary-save-in-pipe}.
7961
7962 @item :function
7963 The value specifies an alternative function which appends, not
7964 overwrites, articles to a file.  This implies that when saving many
7965 articles at a time, @code{gnus-prompt-before-saving} is bound to
7966 @code{t} and all articles are saved in a single file.  This is
7967 meaningful only with @code{gnus-summary-write-to-file} and
7968 @code{gnus-summary-write-body-to-file}.
7969
7970 @item :headers
7971 The value specifies the symbol of a variable of which the value
7972 specifies headers to be saved.  If it is omitted,
7973 @code{gnus-save-all-headers} and @code{gnus-saved-headers} control what
7974 headers should be saved.
7975 @end table
7976
7977 @vindex gnus-article-save-directory
7978 All of these functions, except for the last one, will save the article
7979 in the @code{gnus-article-save-directory}, which is initialized from the
7980 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
7981 default.
7982
7983 As you can see above, the functions use different functions to find a
7984 suitable name of a file to save the article in.  Below is a list of
7985 available functions that generate names:
7986
7987 @table @code
7988
7989 @item gnus-Numeric-save-name
7990 @findex gnus-Numeric-save-name
7991 File names like @file{~/News/Alt.andrea-dworkin/45}.
7992
7993 @item gnus-numeric-save-name
7994 @findex gnus-numeric-save-name
7995 File names like @file{~/News/alt.andrea-dworkin/45}.
7996
7997 @item gnus-Plain-save-name
7998 @findex gnus-Plain-save-name
7999 File names like @file{~/News/Alt.andrea-dworkin}.
8000
8001 @item gnus-plain-save-name
8002 @findex gnus-plain-save-name
8003 File names like @file{~/News/alt.andrea-dworkin}.
8004
8005 @item gnus-sender-save-name
8006 @findex gnus-sender-save-name
8007 File names like @file{~/News/larsi}.
8008 @end table
8009
8010 @vindex gnus-split-methods
8011 You can have Gnus suggest where to save articles by plonking a regexp into
8012 the @code{gnus-split-methods} alist.  For instance, if you would like to
8013 save articles related to Gnus in the file @file{gnus-stuff}, and articles
8014 related to VM in @file{vm-stuff}, you could set this variable to something
8015 like:
8016
8017 @lisp
8018 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
8019  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
8020  (my-choosing-function "../other-dir/my-stuff")
8021  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
8022 @end lisp
8023
8024 We see that this is a list where each element is a list that has two
8025 elements---the @dfn{match} and the @dfn{file}.  The match can either be
8026 a string (in which case it is used as a regexp to match on the article
8027 head); it can be a symbol (which will be called as a function with the
8028 group name as a parameter); or it can be a list (which will be
8029 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
8030 the @dfn{file} will be used as a default prompt.  In addition, the
8031 result of the operation itself will be used if the function or form
8032 called returns a string or a list of strings.
8033
8034 You basically end up with a list of file names that might be used when
8035 saving the current article.  (All ``matches'' will be used.)  You will
8036 then be prompted for what you really want to use as a name, with file
8037 name completion over the results from applying this variable.
8038
8039 This variable is @code{((gnus-article-archive-name))} by default, which
8040 means that Gnus will look at the articles it saves for an
8041 @code{Archive-name} line and use that as a suggestion for the file
8042 name.
8043
8044 Here's an example function to clean up file names somewhat.  If you have
8045 lots of mail groups called things like
8046 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
8047 these group names before creating the file name to save to.  The
8048 following will do just that:
8049
8050 @lisp
8051 (defun my-save-name (group)
8052   (when (string-match "^nnml:mail." group)
8053     (substring group (match-end 0))))
8054
8055 (setq gnus-split-methods
8056       '((gnus-article-archive-name)
8057         (my-save-name)))
8058 @end lisp
8059
8060
8061 @vindex gnus-use-long-file-name
8062 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
8063 @code{nil}, all the preceding functions will replace all periods
8064 (@samp{.}) in the group names with slashes (@samp{/})---which means that
8065 the functions will generate hierarchies of directories instead of having
8066 all the files in the top level directory
8067 (@file{~/News/alt/andrea-dworkin} instead of
8068 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
8069 on most systems.  However, for historical reasons, this is @code{nil} on
8070 Xenix and usg-unix-v machines by default.
8071
8072 This function also affects kill and score file names.  If this variable
8073 is a list, and the list contains the element @code{not-score}, long file
8074 names will not be used for score files, if it contains the element
8075 @code{not-save}, long file names will not be used for saving, and if it
8076 contains the element @code{not-kill}, long file names will not be used
8077 for kill files.
8078
8079 If you'd like to save articles in a hierarchy that looks something like
8080 a spool, you could
8081
8082 @lisp
8083 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
8084 (setq gnus-default-article-saver
8085       'gnus-summary-save-in-file)          ; @r{no encoding}
8086 @end lisp
8087
8088 Then just save with @kbd{o}.  You'd then read this hierarchy with
8089 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
8090 the top level directory as the argument (@file{~/News/}).  Then just walk
8091 around to the groups/directories with @code{nneething}.
8092
8093
8094 @node Decoding Articles
8095 @section Decoding Articles
8096 @cindex decoding articles
8097
8098 Sometime users post articles (or series of articles) that have been
8099 encoded in some way or other.  Gnus can decode them for you.
8100
8101 @menu
8102 * Uuencoded Articles::          Uudecode articles.
8103 * Shell Archives::              Unshar articles.
8104 * PostScript Files::            Split PostScript.
8105 * Other Files::                 Plain save and binhex.
8106 * Decoding Variables::          Variables for a happy decoding.
8107 * Viewing Files::               You want to look at the result of the decoding?
8108 @end menu
8109
8110 @cindex series
8111 @cindex article series
8112 All these functions use the process/prefix convention
8113 (@pxref{Process/Prefix}) for finding out what articles to work on, with
8114 the extension that a ``single article'' means ``a single series''.  Gnus
8115 can find out by itself what articles belong to a series, decode all the
8116 articles and unpack/view/save the resulting file(s).
8117
8118 Gnus guesses what articles are in the series according to the following
8119 simplish rule: The subjects must be (nearly) identical, except for the
8120 last two numbers of the line.  (Spaces are largely ignored, however.)
8121
8122 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
8123 will find all the articles that match the regexp @samp{^cat.gif
8124 ([0-9]+/[0-9]+).*$}.
8125
8126 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
8127 series}, will not be properly recognized by any of the automatic viewing
8128 commands, and you have to mark the articles manually with @kbd{#}.
8129
8130
8131 @node Uuencoded Articles
8132 @subsection Uuencoded Articles
8133 @cindex uudecode
8134 @cindex uuencoded articles
8135
8136 @table @kbd
8137
8138 @item X u
8139 @kindex X u (Summary)
8140 @findex gnus-uu-decode-uu
8141 @c @icon{gnus-uu-decode-uu}
8142 Uudecodes the current series (@code{gnus-uu-decode-uu}).
8143
8144 @item X U
8145 @kindex X U (Summary)
8146 @findex gnus-uu-decode-uu-and-save
8147 Uudecodes and saves the current series
8148 (@code{gnus-uu-decode-uu-and-save}).
8149
8150 @item X v u
8151 @kindex X v u (Summary)
8152 @findex gnus-uu-decode-uu-view
8153 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
8154
8155 @item X v U
8156 @kindex X v U (Summary)
8157 @findex gnus-uu-decode-uu-and-save-view
8158 Uudecodes, views and saves the current series
8159 (@code{gnus-uu-decode-uu-and-save-view}).
8160
8161 @end table
8162
8163 Remember that these all react to the presence of articles marked with
8164 the process mark.  If, for instance, you'd like to decode and save an
8165 entire newsgroup, you'd typically do @kbd{M P a}
8166 (@code{gnus-uu-mark-all}) and then @kbd{X U}
8167 (@code{gnus-uu-decode-uu-and-save}).
8168
8169 All this is very much different from how @code{gnus-uu} worked with
8170 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
8171 the sun.  This version of @code{gnus-uu} generally assumes that you mark
8172 articles in some way (@pxref{Setting Process Marks}) and then press
8173 @kbd{X u}.
8174
8175 @vindex gnus-uu-notify-files
8176 Note: When trying to decode articles that have names matching
8177 @code{gnus-uu-notify-files}, which is hard-coded to
8178 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
8179 automatically post an article on @samp{comp.unix.wizards} saying that
8180 you have just viewed the file in question.  This feature can't be turned
8181 off.
8182
8183
8184 @node Shell Archives
8185 @subsection Shell Archives
8186 @cindex unshar
8187 @cindex shell archives
8188 @cindex shared articles
8189
8190 Shell archives (``shar files'') used to be a popular way to distribute
8191 sources, but it isn't used all that much today.  In any case, we have
8192 some commands to deal with these:
8193
8194 @table @kbd
8195
8196 @item X s
8197 @kindex X s (Summary)
8198 @findex gnus-uu-decode-unshar
8199 Unshars the current series (@code{gnus-uu-decode-unshar}).
8200
8201 @item X S
8202 @kindex X S (Summary)
8203 @findex gnus-uu-decode-unshar-and-save
8204 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
8205
8206 @item X v s
8207 @kindex X v s (Summary)
8208 @findex gnus-uu-decode-unshar-view
8209 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
8210
8211 @item X v S
8212 @kindex X v S (Summary)
8213 @findex gnus-uu-decode-unshar-and-save-view
8214 Unshars, views and saves the current series
8215 (@code{gnus-uu-decode-unshar-and-save-view}).
8216 @end table
8217
8218
8219 @node PostScript Files
8220 @subsection PostScript Files
8221 @cindex PostScript
8222
8223 @table @kbd
8224
8225 @item X p
8226 @kindex X p (Summary)
8227 @findex gnus-uu-decode-postscript
8228 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
8229
8230 @item X P
8231 @kindex X P (Summary)
8232 @findex gnus-uu-decode-postscript-and-save
8233 Unpack and save the current PostScript series
8234 (@code{gnus-uu-decode-postscript-and-save}).
8235
8236 @item X v p
8237 @kindex X v p (Summary)
8238 @findex gnus-uu-decode-postscript-view
8239 View the current PostScript series
8240 (@code{gnus-uu-decode-postscript-view}).
8241
8242 @item X v P
8243 @kindex X v P (Summary)
8244 @findex gnus-uu-decode-postscript-and-save-view
8245 View and save the current PostScript series
8246 (@code{gnus-uu-decode-postscript-and-save-view}).
8247 @end table
8248
8249
8250 @node Other Files
8251 @subsection Other Files
8252
8253 @table @kbd
8254 @item X o
8255 @kindex X o (Summary)
8256 @findex gnus-uu-decode-save
8257 Save the current series
8258 (@code{gnus-uu-decode-save}).
8259
8260 @item X b
8261 @kindex X b (Summary)
8262 @findex gnus-uu-decode-binhex
8263 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
8264 doesn't really work yet.
8265
8266 @item X Y
8267 @kindex X Y (Summary)
8268 @findex gnus-uu-decode-yenc
8269 yEnc-decode the current series and save it (@code{gnus-uu-decode-yenc}).
8270 @end table
8271
8272
8273 @node Decoding Variables
8274 @subsection Decoding Variables
8275
8276 Adjective, not verb.
8277
8278 @menu
8279 * Rule Variables::              Variables that say how a file is to be viewed.
8280 * Other Decode Variables::      Other decode variables.
8281 * Uuencoding and Posting::      Variables for customizing uuencoding.
8282 @end menu
8283
8284
8285 @node Rule Variables
8286 @subsubsection Rule Variables
8287 @cindex rule variables
8288
8289 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
8290 variables are of the form
8291
8292 @lisp
8293       (list '(regexp1 command2)
8294             '(regexp2 command2)
8295             ...)
8296 @end lisp
8297
8298 @table @code
8299
8300 @item gnus-uu-user-view-rules
8301 @vindex gnus-uu-user-view-rules
8302 @cindex sox
8303 This variable is consulted first when viewing files.  If you wish to use,
8304 for instance, @code{sox} to convert an @file{.au} sound file, you could
8305 say something like:
8306 @lisp
8307 (setq gnus-uu-user-view-rules
8308       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
8309 @end lisp
8310
8311 @item gnus-uu-user-view-rules-end
8312 @vindex gnus-uu-user-view-rules-end
8313 This variable is consulted if Gnus couldn't make any matches from the
8314 user and default view rules.
8315
8316 @item gnus-uu-user-archive-rules
8317 @vindex gnus-uu-user-archive-rules
8318 This variable can be used to say what commands should be used to unpack
8319 archives.
8320 @end table
8321
8322
8323 @node Other Decode Variables
8324 @subsubsection Other Decode Variables
8325
8326 @table @code
8327 @vindex gnus-uu-grabbed-file-functions
8328
8329 @item gnus-uu-grabbed-file-functions
8330 All functions in this list will be called right after each file has been
8331 successfully decoded---so that you can move or view files right away,
8332 and don't have to wait for all files to be decoded before you can do
8333 anything.  Ready-made functions you can put in this list are:
8334
8335 @table @code
8336
8337 @item gnus-uu-grab-view
8338 @findex gnus-uu-grab-view
8339 View the file.
8340
8341 @item gnus-uu-grab-move
8342 @findex gnus-uu-grab-move
8343 Move the file (if you're using a saving function.)
8344 @end table
8345
8346 @item gnus-uu-be-dangerous
8347 @vindex gnus-uu-be-dangerous
8348 Specifies what to do if unusual situations arise during decoding.  If
8349 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
8350 that didn't work, and overwrite existing files.  Otherwise, ask each
8351 time.
8352
8353 @item gnus-uu-ignore-files-by-name
8354 @vindex gnus-uu-ignore-files-by-name
8355 Files with name matching this regular expression won't be viewed.
8356
8357 @item gnus-uu-ignore-files-by-type
8358 @vindex gnus-uu-ignore-files-by-type
8359 Files with a @acronym{MIME} type matching this variable won't be viewed.
8360 Note that Gnus tries to guess what type the file is based on the name.
8361 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
8362 kludgy.
8363
8364 @item gnus-uu-tmp-dir
8365 @vindex gnus-uu-tmp-dir
8366 Where @code{gnus-uu} does its work.
8367
8368 @item gnus-uu-do-not-unpack-archives
8369 @vindex gnus-uu-do-not-unpack-archives
8370 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
8371 looking for files to display.
8372
8373 @item gnus-uu-view-and-save
8374 @vindex gnus-uu-view-and-save
8375 Non-@code{nil} means that the user will always be asked to save a file
8376 after viewing it.
8377
8378 @item gnus-uu-ignore-default-view-rules
8379 @vindex gnus-uu-ignore-default-view-rules
8380 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
8381 rules.
8382
8383 @item gnus-uu-ignore-default-archive-rules
8384 @vindex gnus-uu-ignore-default-archive-rules
8385 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
8386 unpacking commands.
8387
8388 @item gnus-uu-kill-carriage-return
8389 @vindex gnus-uu-kill-carriage-return
8390 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
8391 from articles.
8392
8393 @item gnus-uu-unmark-articles-not-decoded
8394 @vindex gnus-uu-unmark-articles-not-decoded
8395 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
8396 decoded articles as unread.
8397
8398 @item gnus-uu-correct-stripped-uucode
8399 @vindex gnus-uu-correct-stripped-uucode
8400 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
8401 uuencoded files that have had trailing spaces deleted.
8402
8403 @item gnus-uu-pre-uudecode-hook
8404 @vindex gnus-uu-pre-uudecode-hook
8405 Hook run before sending a message to @code{uudecode}.
8406
8407 @item gnus-uu-view-with-metamail
8408 @vindex gnus-uu-view-with-metamail
8409 @cindex metamail
8410 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
8411 commands defined by the rule variables and just fudge a @acronym{MIME}
8412 content type based on the file name.  The result will be fed to
8413 @code{metamail} for viewing.
8414
8415 @item gnus-uu-save-in-digest
8416 @vindex gnus-uu-save-in-digest
8417 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
8418 decoding, will save in digests.  If this variable is @code{nil},
8419 @code{gnus-uu} will just save everything in a file without any
8420 embellishments.  The digesting almost conforms to RFC 1153---no easy way
8421 to specify any meaningful volume and issue numbers were found, so I
8422 simply dropped them.
8423
8424 @end table
8425
8426
8427 @node Uuencoding and Posting
8428 @subsubsection Uuencoding and Posting
8429
8430 @table @code
8431
8432 @item gnus-uu-post-include-before-composing
8433 @vindex gnus-uu-post-include-before-composing
8434 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
8435 before you compose the article.  If this variable is @code{t}, you can
8436 either include an encoded file with @kbd{C-c C-i} or have one included
8437 for you when you post the article.
8438
8439 @item gnus-uu-post-length
8440 @vindex gnus-uu-post-length
8441 Maximum length of an article.  The encoded file will be split into how
8442 many articles it takes to post the entire file.
8443
8444 @item gnus-uu-post-threaded
8445 @vindex gnus-uu-post-threaded
8446 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
8447 thread.  This may not be smart, as no other decoder I have seen is able
8448 to follow threads when collecting uuencoded articles.  (Well, I have
8449 seen one package that does that---@code{gnus-uu}, but somehow, I don't
8450 think that counts@dots{}) Default is @code{nil}.
8451
8452 @item gnus-uu-post-separate-description
8453 @vindex gnus-uu-post-separate-description
8454 Non-@code{nil} means that the description will be posted in a separate
8455 article.  The first article will typically be numbered (0/x).  If this
8456 variable is @code{nil}, the description the user enters will be included
8457 at the beginning of the first article, which will be numbered (1/x).
8458 Default is @code{t}.
8459
8460 @end table
8461
8462
8463 @node Viewing Files
8464 @subsection Viewing Files
8465 @cindex viewing files
8466 @cindex pseudo-articles
8467
8468 After decoding, if the file is some sort of archive, Gnus will attempt
8469 to unpack the archive and see if any of the files in the archive can be
8470 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
8471 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
8472 uncompress and de-tar the main file, and then view the two pictures.
8473 This unpacking process is recursive, so if the archive contains archives
8474 of archives, it'll all be unpacked.
8475
8476 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
8477 extracted file into the summary buffer.  If you go to these
8478 ``articles'', you will be prompted for a command to run (usually Gnus
8479 will make a suggestion), and then the command will be run.
8480
8481 @vindex gnus-view-pseudo-asynchronously
8482 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
8483 until the viewing is done before proceeding.
8484
8485 @vindex gnus-view-pseudos
8486 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
8487 the pseudo-articles into the summary buffer, but view them
8488 immediately.  If this variable is @code{not-confirm}, the user won't even
8489 be asked for a confirmation before viewing is done.
8490
8491 @vindex gnus-view-pseudos-separately
8492 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
8493 pseudo-article will be created for each file to be viewed.  If
8494 @code{nil}, all files that use the same viewing command will be given as
8495 a list of parameters to that command.
8496
8497 @vindex gnus-insert-pseudo-articles
8498 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
8499 pseudo-articles when decoding.  It is @code{t} by default.
8500
8501 So; there you are, reading your @emph{pseudo-articles} in your
8502 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
8503 Why isn't anything real anymore? How did we get here?
8504
8505
8506 @node Article Treatment
8507 @section Article Treatment
8508
8509 Reading through this huge manual, you may have quite forgotten that the
8510 object of newsreaders is to actually, like, read what people have
8511 written.  Reading articles.  Unfortunately, people are quite bad at
8512 writing, so there are tons of functions and variables to make reading
8513 these articles easier.
8514
8515 @menu
8516 * Article Highlighting::        You want to make the article look like fruit salad.
8517 * Article Fontisizing::         Making emphasized text look nice.
8518 * Article Hiding::              You also want to make certain info go away.
8519 * Article Washing::             Lots of way-neat functions to make life better.
8520 * Article Header::              Doing various header transformations.
8521 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
8522 * Article Button Levels::       Controlling appearance of buttons.
8523 * Article Date::                Grumble, UT!
8524 * Article Display::             Display various stuff:
8525                                 X-Face, Picons, Gravatars, Smileys.
8526 * Article Signature::           What is a signature?
8527 * Article Miscellanea::         Various other stuff.
8528 @end menu
8529
8530
8531 @node Article Highlighting
8532 @subsection Article Highlighting
8533 @cindex highlighting
8534
8535 Not only do you want your article buffer to look like fruit salad, but
8536 you want it to look like technicolor fruit salad.
8537
8538 @table @kbd
8539
8540 @item W H a
8541 @kindex W H a (Summary)
8542 @findex gnus-article-highlight
8543 @findex gnus-article-maybe-highlight
8544 Do much highlighting of the current article
8545 (@code{gnus-article-highlight}).  This function highlights header, cited
8546 text, the signature, and adds buttons to the body and the head.
8547
8548 @item W H h
8549 @kindex W H h (Summary)
8550 @findex gnus-article-highlight-headers
8551 @vindex gnus-header-face-alist
8552 Highlight the headers (@code{gnus-article-highlight-headers}).  The
8553 highlighting will be done according to the @code{gnus-header-face-alist}
8554 variable, which is a list where each element has the form
8555 @code{(@var{regexp} @var{name} @var{content})}.
8556 @var{regexp} is a regular expression for matching the
8557 header, @var{name} is the face used for highlighting the header name
8558 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
8559 the header value.  The first match made will be used.  Note that
8560 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
8561
8562 @item W H c
8563 @kindex W H c (Summary)
8564 @findex gnus-article-highlight-citation
8565 Highlight cited text (@code{gnus-article-highlight-citation}).
8566
8567 Some variables to customize the citation highlights:
8568
8569 @table @code
8570 @vindex gnus-cite-parse-max-size
8571
8572 @item gnus-cite-parse-max-size
8573 If the article size in bytes is bigger than this variable (which is
8574 25000 by default), no citation highlighting will be performed.
8575
8576 @item gnus-cite-max-prefix
8577 @vindex gnus-cite-max-prefix
8578 Maximum possible length for a citation prefix (default 20).
8579
8580 @item gnus-cite-face-list
8581 @vindex gnus-cite-face-list
8582 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8583 When there are citations from multiple articles in the same message,
8584 Gnus will try to give each citation from each article its own face.
8585 This should make it easier to see who wrote what.
8586
8587 @item gnus-supercite-regexp
8588 @vindex gnus-supercite-regexp
8589 Regexp matching normal Supercite attribution lines.
8590
8591 @item gnus-supercite-secondary-regexp
8592 @vindex gnus-supercite-secondary-regexp
8593 Regexp matching mangled Supercite attribution lines.
8594
8595 @item gnus-cite-minimum-match-count
8596 @vindex gnus-cite-minimum-match-count
8597 Minimum number of identical prefixes we have to see before we believe
8598 that it's a citation.
8599
8600 @item gnus-cite-attribution-prefix
8601 @vindex gnus-cite-attribution-prefix
8602 Regexp matching the beginning of an attribution line.
8603
8604 @item gnus-cite-attribution-suffix
8605 @vindex gnus-cite-attribution-suffix
8606 Regexp matching the end of an attribution line.
8607
8608 @item gnus-cite-attribution-face
8609 @vindex gnus-cite-attribution-face
8610 Face used for attribution lines.  It is merged with the face for the
8611 cited text belonging to the attribution.
8612
8613 @item gnus-cite-ignore-quoted-from
8614 @vindex gnus-cite-ignore-quoted-from
8615 If non-@code{nil}, no citation highlighting will be performed on lines
8616 beginning with @samp{>From }.  Those lines may have been quoted by MTAs
8617 in order not to mix up with the envelope From line.  The default value
8618 is @code{t}.
8619
8620 @end table
8621
8622
8623 @item W H s
8624 @kindex W H s (Summary)
8625 @vindex gnus-signature-separator
8626 @vindex gnus-signature-face
8627 @findex gnus-article-highlight-signature
8628 Highlight the signature (@code{gnus-article-highlight-signature}).
8629 Everything after @code{gnus-signature-separator} (@pxref{Article
8630 Signature}) in an article will be considered a signature and will be
8631 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8632 default.
8633
8634 @end table
8635
8636 @xref{Customizing Articles}, for how to highlight articles automatically.
8637
8638
8639 @node Article Fontisizing
8640 @subsection Article Fontisizing
8641 @cindex emphasis
8642 @cindex article emphasis
8643
8644 @findex gnus-article-emphasize
8645 @kindex W e (Summary)
8646 People commonly add emphasis to words in news articles by writing things
8647 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8648 this look nicer by running the article through the @kbd{W e}
8649 (@code{gnus-article-emphasize}) command.
8650
8651 @vindex gnus-emphasis-alist
8652 How the emphasis is computed is controlled by the
8653 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8654 element is a regular expression to be matched.  The second is a number
8655 that says what regular expression grouping is used to find the entire
8656 emphasized word.  The third is a number that says what regexp grouping
8657 should be displayed and highlighted.  (The text between these two
8658 groupings will be hidden.)  The fourth is the face used for
8659 highlighting.
8660
8661 @lisp
8662 (setq gnus-emphasis-alist
8663       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8664         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8665 @end lisp
8666
8667 @cindex slash
8668 @cindex asterisk
8669 @cindex underline
8670 @cindex /
8671 @cindex *
8672
8673 @vindex gnus-emphasis-underline
8674 @vindex gnus-emphasis-bold
8675 @vindex gnus-emphasis-italic
8676 @vindex gnus-emphasis-underline-bold
8677 @vindex gnus-emphasis-underline-italic
8678 @vindex gnus-emphasis-bold-italic
8679 @vindex gnus-emphasis-underline-bold-italic
8680 By default, there are seven rules, and they use the following faces:
8681 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8682 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8683 @code{gnus-emphasis-underline-italic},
8684 @code{gnus-emphasis-underline-bold}, and
8685 @code{gnus-emphasis-underline-bold-italic}.
8686
8687 If you want to change these faces, you can either use @kbd{M-x
8688 customize}, or you can use @code{copy-face}.  For instance, if you want
8689 to make @code{gnus-emphasis-italic} use a red face instead, you could
8690 say something like:
8691
8692 @lisp
8693 (copy-face 'red 'gnus-emphasis-italic)
8694 @end lisp
8695
8696 @vindex gnus-group-highlight-words-alist
8697
8698 If you want to highlight arbitrary words, you can use the
8699 @code{gnus-group-highlight-words-alist} variable, which uses the same
8700 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8701 parameter (@pxref{Group Parameters}) can also be used.
8702
8703 @xref{Customizing Articles}, for how to fontize articles automatically.
8704
8705
8706 @node Article Hiding
8707 @subsection Article Hiding
8708 @cindex article hiding
8709
8710 Or rather, hiding certain things in each article.  There usually is much
8711 too much cruft in most articles.
8712
8713 @table @kbd
8714
8715 @item W W a
8716 @kindex W W a (Summary)
8717 @findex gnus-article-hide
8718 Do quite a lot of hiding on the article buffer
8719 (@kbd{gnus-article-hide}).  In particular, this function will hide
8720 headers, @acronym{PGP}, cited text and the signature.
8721
8722 @item W W h
8723 @kindex W W h (Summary)
8724 @findex gnus-article-hide-headers
8725 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8726 Headers}.
8727
8728 @item W W b
8729 @kindex W W b (Summary)
8730 @findex gnus-article-hide-boring-headers
8731 Hide headers that aren't particularly interesting
8732 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8733
8734 @item W W s
8735 @kindex W W s (Summary)
8736 @findex gnus-article-hide-signature
8737 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8738 Signature}.
8739
8740 @item W W l
8741 @kindex W W l (Summary)
8742 @findex gnus-article-hide-list-identifiers
8743 @vindex gnus-list-identifiers
8744 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8745 are strings some mailing list servers add to the beginning of all
8746 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8747 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
8748 may not contain @code{\\(..\\)}.
8749
8750 @table @code
8751
8752 @item gnus-list-identifiers
8753 @vindex gnus-list-identifiers
8754 A regular expression that matches list identifiers to be removed from
8755 subject.  This can also be a list of regular expressions.
8756
8757 @end table
8758
8759 @item W W P
8760 @kindex W W P (Summary)
8761 @findex gnus-article-hide-pem
8762 Hide @acronym{PEM} (privacy enhanced messages) cruft
8763 (@code{gnus-article-hide-pem}).
8764
8765 @item W W B
8766 @kindex W W B (Summary)
8767 @findex gnus-article-strip-banner
8768 @vindex gnus-article-banner-alist
8769 @vindex gnus-article-address-banner-alist
8770 @cindex banner
8771 @cindex OneList
8772 @cindex stripping advertisements
8773 @cindex advertisements
8774 Strip the banner specified by the @code{banner} group parameter
8775 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8776 annoying banners and/or signatures that some mailing lists and moderated
8777 groups adds to all the messages.  The way to use this function is to add
8778 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8779 group you want banners stripped from.  The parameter either be a string,
8780 which will be interpreted as a regular expression matching text to be
8781 removed, or the symbol @code{signature}, meaning that the (last)
8782 signature should be removed, or other symbol, meaning that the
8783 corresponding regular expression in @code{gnus-article-banner-alist} is
8784 used.
8785
8786 For instance:
8787
8788 @lisp
8789 (setq gnus-article-banner-alist
8790       ((googleGroups .
8791        "^\n*--~--~---------\\(.+\n\\)+")))
8792 @end lisp
8793
8794 Regardless of a group, you can hide things like advertisements only when
8795 the sender of an article has a certain mail address specified in
8796 @code{gnus-article-address-banner-alist}.
8797
8798 @table @code
8799
8800 @item gnus-article-address-banner-alist
8801 @vindex gnus-article-address-banner-alist
8802 Alist of mail addresses and banners.  Each element has the form
8803 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8804 matching a mail address in the From header, @var{banner} is one of a
8805 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8806 a regexp and @code{nil}.  If @var{address} matches author's mail
8807 address, it will remove things like advertisements.  For example, if a
8808 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8809 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8810 sends, you can use the following element to remove them:
8811
8812 @lisp
8813 ("@@yoo-hoo\\.co\\.jp\\'" .
8814  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8815 @end lisp
8816
8817 @end table
8818
8819 @item W W c
8820 @kindex W W c (Summary)
8821 @findex gnus-article-hide-citation
8822 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8823 customizing the hiding:
8824
8825 @table @code
8826
8827 @item gnus-cited-opened-text-button-line-format
8828 @itemx gnus-cited-closed-text-button-line-format
8829 @vindex gnus-cited-closed-text-button-line-format
8830 @vindex gnus-cited-opened-text-button-line-format
8831 Gnus adds buttons to show where the cited text has been hidden, and to
8832 allow toggle hiding the text.  The format of the variable is specified
8833 by these format-like variable (@pxref{Formatting Variables}).  These
8834 specs are valid:
8835
8836 @table @samp
8837 @item b
8838 Starting point of the hidden text.
8839 @item e
8840 Ending point of the hidden text.
8841 @item l
8842 Number of characters in the hidden region.
8843 @item n
8844 Number of lines of hidden text.
8845 @end table
8846
8847 @item gnus-cited-lines-visible
8848 @vindex gnus-cited-lines-visible
8849 The number of lines at the beginning of the cited text to leave
8850 shown.  This can also be a cons cell with the number of lines at the top
8851 and bottom of the text, respectively, to remain visible.
8852
8853 @end table
8854
8855 @item W W C-c
8856 @kindex W W C-c (Summary)
8857 @findex gnus-article-hide-citation-maybe
8858
8859 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8860 following two variables:
8861
8862 @table @code
8863 @item gnus-cite-hide-percentage
8864 @vindex gnus-cite-hide-percentage
8865 If the cited text is of a bigger percentage than this variable (default
8866 50), hide the cited text.
8867
8868 @item gnus-cite-hide-absolute
8869 @vindex gnus-cite-hide-absolute
8870 The cited text must have at least this length (default 10) before it
8871 is hidden.
8872 @end table
8873
8874 @item W W C
8875 @kindex W W C (Summary)
8876 @findex gnus-article-hide-citation-in-followups
8877 Hide cited text in articles that aren't roots
8878 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8879 useful as an interactive command, but might be a handy function to stick
8880 have happen automatically (@pxref{Customizing Articles}).
8881
8882 @end table
8883
8884 All these ``hiding'' commands are toggles, but if you give a negative
8885 prefix to these commands, they will show what they have previously
8886 hidden.  If you give a positive prefix, they will always hide.
8887
8888 Also @pxref{Article Highlighting} for further variables for
8889 citation customization.
8890
8891 @xref{Customizing Articles}, for how to hide article elements
8892 automatically.
8893
8894
8895 @node Article Washing
8896 @subsection Article Washing
8897 @cindex washing
8898 @cindex article washing
8899
8900 We call this ``article washing'' for a really good reason.  Namely, the
8901 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8902
8903 @dfn{Washing} is defined by us as ``changing something from something to
8904 something else'', but normally results in something looking better.
8905 Cleaner, perhaps.
8906
8907 @xref{Customizing Articles}, if you want to change how Gnus displays
8908 articles by default.
8909
8910 @table @kbd
8911
8912 @item C-u g
8913 This is not really washing, it's sort of the opposite of washing.  If
8914 you type this, you see the article exactly as it exists on disk or on
8915 the server.
8916
8917 @item g
8918 Force redisplaying of the current article
8919 (@code{gnus-summary-show-article}).  This is also not really washing.
8920 If you type this, you see the article without any previously applied
8921 interactive Washing functions but with all default treatments
8922 (@pxref{Customizing Articles}).
8923
8924 @item W l
8925 @kindex W l (Summary)
8926 @findex gnus-summary-stop-page-breaking
8927 Remove page breaks from the current article
8928 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8929 delimiters.
8930
8931 @item W r
8932 @kindex W r (Summary)
8933 @findex gnus-summary-caesar-message
8934 @c @icon{gnus-summary-caesar-message}
8935 Do a Caesar rotate (rot13) on the article buffer
8936 (@code{gnus-summary-caesar-message}).
8937 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8938 (Typically offensive jokes and such.)
8939
8940 It's commonly called ``rot13'' because each letter is rotated 13
8941 positions in the alphabet, e.g., @samp{B} (letter #2) -> @samp{O} (letter
8942 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8943 is rumored to have employed this form of, uh, somewhat weak encryption.
8944
8945 @item W m
8946 @kindex W m (Summary)
8947 @findex gnus-summary-morse-message
8948 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8949
8950 @item W i
8951 @kindex W i (Summary)
8952 @findex gnus-summary-idna-message
8953 Decode IDNA encoded domain names in the current articles.  IDNA
8954 encoded domain names looks like @samp{xn--bar}.  If a string remain
8955 unencoded after running invoking this, it is likely an invalid IDNA
8956 string (@samp{xn--bar} is invalid).  You must have GNU Libidn
8957 (@url{http://www.gnu.org/software/libidn/}) installed for this command
8958 to work.
8959
8960 @item W t
8961 @item t
8962 @kindex W t (Summary)
8963 @kindex t (Summary)
8964 @findex gnus-summary-toggle-header
8965 Toggle whether to display all headers in the article buffer
8966 (@code{gnus-summary-toggle-header}).
8967
8968 @item W v
8969 @kindex W v (Summary)
8970 @findex gnus-summary-verbose-headers
8971 Toggle whether to display all headers in the article buffer permanently
8972 (@code{gnus-summary-verbose-headers}).
8973
8974 @item W o
8975 @kindex W o (Summary)
8976 @findex gnus-article-treat-overstrike
8977 Treat overstrike (@code{gnus-article-treat-overstrike}).
8978
8979 @item W d
8980 @kindex W d (Summary)
8981 @findex gnus-article-treat-dumbquotes
8982 @vindex gnus-article-dumbquotes-map
8983 @cindex Smartquotes
8984 @cindex M****s*** sm*rtq**t*s
8985 @cindex Latin 1
8986 Treat M****s*** sm*rtq**t*s according to
8987 @code{gnus-article-dumbquotes-map}
8988 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8989 whether a character is a sm*rtq**t* or not, so it should only be used
8990 interactively.
8991
8992 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8993 an attempt to provide more quoting characters.  If you see something
8994 like @code{\222} or @code{\264} where you're expecting some kind of
8995 apostrophe or quotation mark, then try this wash.
8996
8997 @item W U
8998 @kindex W U (Summary)
8999 @findex gnus-article-treat-non-ascii
9000 @cindex Unicode
9001 @cindex Non-@acronym{ASCII}
9002 Translate many non-@acronym{ASCII} characters into their
9003 @acronym{ASCII} equivalents (@code{gnus-article-treat-non-ascii}).
9004 This is mostly useful if you're on a terminal that has a limited font
9005 and doesn't show accented characters, ``advanced'' punctuation, and the
9006 like.  For instance, @samp{»} is translated into @samp{>>}, and so on.
9007
9008 @item W Y f
9009 @kindex W Y f (Summary)
9010 @findex gnus-article-outlook-deuglify-article
9011 @cindex Outlook Express
9012 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
9013 unwrap lines, repair attribution and rearrange citation.
9014 (@code{gnus-article-outlook-deuglify-article}).
9015
9016 @item W Y u
9017 @kindex W Y u (Summary)
9018 @findex gnus-article-outlook-unwrap-lines
9019 @vindex gnus-outlook-deuglify-unwrap-min
9020 @vindex gnus-outlook-deuglify-unwrap-max
9021 Unwrap lines that appear to be wrapped citation lines.  You can control
9022 what lines will be unwrapped by frobbing
9023 @code{gnus-outlook-deuglify-unwrap-min} and
9024 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
9025 maximum length of an unwrapped citation line.
9026 (@code{gnus-article-outlook-unwrap-lines}).
9027
9028 @item W Y a
9029 @kindex W Y a (Summary)
9030 @findex gnus-article-outlook-repair-attribution
9031 Repair a broken attribution line.@*
9032 (@code{gnus-article-outlook-repair-attribution}).
9033
9034 @item W Y c
9035 @kindex W Y c (Summary)
9036 @findex gnus-article-outlook-rearrange-citation
9037 Repair broken citations by rearranging the text.
9038 (@code{gnus-article-outlook-rearrange-citation}).
9039
9040 @item W w
9041 @kindex W w (Summary)
9042 @findex gnus-article-fill-cited-article
9043 Do word wrap (@code{gnus-article-fill-cited-article}).
9044
9045 You can give the command a numerical prefix to specify the width to use
9046 when filling.
9047
9048 @item W Q
9049 @kindex W Q (Summary)
9050 @findex gnus-article-fill-long-lines
9051 Fill long lines (@code{gnus-article-fill-long-lines}).
9052
9053 @item W C
9054 @kindex W C (Summary)
9055 @findex gnus-article-capitalize-sentences
9056 Capitalize the first word in each sentence
9057 (@code{gnus-article-capitalize-sentences}).
9058
9059 @item W c
9060 @kindex W c (Summary)
9061 @findex gnus-article-remove-cr
9062 Translate CRLF pairs (i.e., @samp{^M}s on the end of the lines) into LF
9063 (this takes care of DOS line endings), and then translate any remaining
9064 CRs into LF (this takes care of Mac line endings)
9065 (@code{gnus-article-remove-cr}).
9066
9067 @item W q
9068 @kindex W q (Summary)
9069 @findex gnus-article-de-quoted-unreadable
9070 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
9071 Quoted-Printable is one common @acronym{MIME} encoding employed when
9072 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
9073 makes strings like @samp{d@'ej@`a vu} look like @samp{d=E9j=E0 vu},
9074 which doesn't look very readable to me.  Note that this is usually
9075 done automatically by Gnus if the message in question has a
9076 @code{Content-Transfer-Encoding} header that says that this encoding
9077 has been done.  If a prefix is given, a charset will be asked for.
9078
9079 @item W 6
9080 @kindex W 6 (Summary)
9081 @findex gnus-article-de-base64-unreadable
9082 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
9083 one common @acronym{MIME} encoding employed when sending
9084 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
9085 usually done automatically by Gnus if the message in question has a
9086 @code{Content-Transfer-Encoding} header that says that this encoding
9087 has been done.  If a prefix is given, a charset will be asked for.
9088
9089 @item W Z
9090 @kindex W Z (Summary)
9091 @findex gnus-article-decode-HZ
9092 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
9093 common encoding employed when sending Chinese articles.  It typically
9094 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
9095
9096 @item W A
9097 @kindex W A (Summary)
9098 @findex gnus-article-treat-ansi-sequences
9099 @cindex @acronym{ANSI} control sequences
9100 Translate @acronym{ANSI} SGR control sequences into overlays or
9101 extents (@code{gnus-article-treat-ansi-sequences}).  @acronym{ANSI}
9102 sequences are used in some Chinese hierarchies for highlighting.
9103
9104 @item W u
9105 @kindex W u (Summary)
9106 @findex gnus-article-unsplit-urls
9107 Remove newlines from within URLs.  Some mailers insert newlines into
9108 outgoing email messages to keep lines short.  This reformatting can
9109 split long URLs onto multiple lines.  Repair those URLs by removing
9110 the newlines (@code{gnus-article-unsplit-urls}).
9111
9112 @item W h
9113 @kindex W h (Summary)
9114 @findex gnus-article-wash-html
9115 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
9116 usually done automatically by Gnus if the message in question has a
9117 @code{Content-Type} header that says that the message is @acronym{HTML}.
9118
9119 If a prefix is given, a charset will be asked for.  If it is a number,
9120 the charset defined in @code{gnus-summary-show-article-charset-alist}
9121 (@pxref{Paging the Article}) will be used.
9122
9123 The default is to use the function specified by
9124 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
9125 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
9126 @acronym{HTML}.  Pre-defined functions you can use include:
9127
9128 @table @code
9129 @item shr
9130 Use Gnus simple html renderer.
9131
9132 @item gnus-w3m
9133 Use Gnus rendered based on w3m.
9134
9135 @item w3
9136 Use Emacs/W3.
9137
9138 @item w3m
9139 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
9140
9141 @item w3m-standalone
9142 Use @uref{http://w3m.sourceforge.net/, w3m}.
9143
9144 @item links
9145 Use @uref{http://links.sf.net/, Links}.
9146
9147 @item lynx
9148 Use @uref{http://lynx.isc.org/, Lynx}.
9149
9150 @item html2text
9151 Use html2text---a simple @acronym{HTML} converter included with Gnus.
9152
9153 @end table
9154
9155 @item W b
9156 @kindex W b (Summary)
9157 @findex gnus-article-add-buttons
9158 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
9159 @xref{Article Buttons}.
9160
9161 @item W B
9162 @kindex W B (Summary)
9163 @findex gnus-article-add-buttons-to-head
9164 Add clickable buttons to the article headers
9165 (@code{gnus-article-add-buttons-to-head}).
9166
9167 @item W p
9168 @kindex W p (Summary)
9169 @findex gnus-article-verify-x-pgp-sig
9170 Verify a signed control message
9171 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
9172 @code{newgroup} and @code{checkgroups} are usually signed by the
9173 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
9174 the maintainer to your keyring to verify the
9175 message.@footnote{@acronym{PGP} keys for many hierarchies are
9176 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
9177
9178 @item W s
9179 @kindex W s (Summary)
9180 @findex gnus-summary-force-verify-and-decrypt
9181 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
9182 @acronym{S/MIME}) message
9183 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
9184
9185 @item W a
9186 @kindex W a (Summary)
9187 @findex gnus-article-strip-headers-in-body
9188 Strip headers like the @code{X-No-Archive} header from the beginning of
9189 article bodies (@code{gnus-article-strip-headers-in-body}).
9190
9191 @item W E l
9192 @kindex W E l (Summary)
9193 @findex gnus-article-strip-leading-blank-lines
9194 Remove all blank lines from the beginning of the article
9195 (@code{gnus-article-strip-leading-blank-lines}).
9196
9197 @item W E m
9198 @kindex W E m (Summary)
9199 @findex gnus-article-strip-multiple-blank-lines
9200 Replace all blank lines with empty lines and then all multiple empty
9201 lines with a single empty line.
9202 (@code{gnus-article-strip-multiple-blank-lines}).
9203
9204 @item W E t
9205 @kindex W E t (Summary)
9206 @findex gnus-article-remove-trailing-blank-lines
9207 Remove all blank lines at the end of the article
9208 (@code{gnus-article-remove-trailing-blank-lines}).
9209
9210 @item W E a
9211 @kindex W E a (Summary)
9212 @findex gnus-article-strip-blank-lines
9213 Do all the three commands above
9214 (@code{gnus-article-strip-blank-lines}).
9215
9216 @item W E A
9217 @kindex W E A (Summary)
9218 @findex gnus-article-strip-all-blank-lines
9219 Remove all blank lines
9220 (@code{gnus-article-strip-all-blank-lines}).
9221
9222 @item W E s
9223 @kindex W E s (Summary)
9224 @findex gnus-article-strip-leading-space
9225 Remove all white space from the beginning of all lines of the article
9226 body (@code{gnus-article-strip-leading-space}).
9227
9228 @item W E e
9229 @kindex W E e (Summary)
9230 @findex gnus-article-strip-trailing-space
9231 Remove all white space from the end of all lines of the article
9232 body (@code{gnus-article-strip-trailing-space}).
9233
9234 @end table
9235
9236 @xref{Customizing Articles}, for how to wash articles automatically.
9237
9238
9239 @node Article Header
9240 @subsection Article Header
9241
9242 These commands perform various transformations of article header.
9243
9244 @table @kbd
9245
9246 @item W G u
9247 @kindex W G u (Summary)
9248 @findex gnus-article-treat-unfold-headers
9249 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
9250
9251 @item W G n
9252 @kindex W G n (Summary)
9253 @findex gnus-article-treat-fold-newsgroups
9254 Fold the @code{Newsgroups} and @code{Followup-To} headers
9255 (@code{gnus-article-treat-fold-newsgroups}).
9256
9257 @item W G f
9258 @kindex W G f (Summary)
9259 @findex gnus-article-treat-fold-headers
9260 Fold all the message headers
9261 (@code{gnus-article-treat-fold-headers}).
9262
9263 @item W E w
9264 @kindex W E w (Summary)
9265 @findex gnus-article-remove-leading-whitespace
9266 Remove excessive whitespace from all headers
9267 (@code{gnus-article-remove-leading-whitespace}).
9268
9269 @end table
9270
9271
9272 @node Article Buttons
9273 @subsection Article Buttons
9274 @cindex buttons
9275
9276 People often include references to other stuff in articles, and it would
9277 be nice if Gnus could just fetch whatever it is that people talk about
9278 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
9279 button on these references.
9280
9281 @vindex gnus-button-man-handler
9282 Gnus adds @dfn{buttons} to certain standard references by default:
9283 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
9284 Emacs or Gnus related references.  This is controlled by two variables,
9285 one that handles article bodies and one that handles article heads:
9286
9287 @table @code
9288
9289 @item gnus-button-alist
9290 @vindex gnus-button-alist
9291 This is an alist where each entry has this form:
9292
9293 @lisp
9294 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
9295 @end lisp
9296
9297 @table @var
9298
9299 @item regexp
9300 All text that match this regular expression (case insensitive) will be
9301 considered an external reference.  Here's a typical regexp that matches
9302 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
9303 variable containing a regexp, useful variables to use include
9304 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
9305
9306 @item button-par
9307 Gnus has to know which parts of the matches is to be highlighted.  This
9308 is a number that says what sub-expression of the regexp is to be
9309 highlighted.  If you want it all highlighted, you use 0 here.
9310
9311 @item use-p
9312 This form will be @code{eval}ed, and if the result is non-@code{nil},
9313 this is considered a match.  This is useful if you want extra sifting to
9314 avoid false matches.  Often variables named
9315 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
9316 Levels}, but any other form may be used too.
9317
9318 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
9319
9320 @item function
9321 This function will be called when you click on this button.
9322
9323 @item data-par
9324 As with @var{button-par}, this is a sub-expression number, but this one
9325 says which part of the match is to be sent as data to @var{function}.
9326
9327 @end table
9328
9329 So the full entry for buttonizing URLs is then
9330
9331 @lisp
9332 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
9333 @end lisp
9334
9335 @item gnus-header-button-alist
9336 @vindex gnus-header-button-alist
9337 This is just like the other alist, except that it is applied to the
9338 article head only, and that each entry has an additional element that is
9339 used to say what headers to apply the buttonize coding to:
9340
9341 @lisp
9342 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
9343 @end lisp
9344
9345 @var{header} is a regular expression.
9346 @end table
9347
9348 @subsubsection Related variables and functions
9349
9350 @table @code
9351 @item gnus-button-@var{*}-level
9352 @xref{Article Button Levels}.
9353
9354 @c Stuff related to gnus-button-browse-level
9355
9356 @item gnus-button-url-regexp
9357 @vindex gnus-button-url-regexp
9358 A regular expression that matches embedded URLs.  It is used in the
9359 default values of the variables above.
9360
9361 @c Stuff related to gnus-button-man-level
9362
9363 @item gnus-button-man-handler
9364 @vindex gnus-button-man-handler
9365 The function to use for displaying man pages.  It must take at least one
9366 argument with a string naming the man page.
9367
9368 @c Stuff related to gnus-button-message-level
9369
9370 @item gnus-button-mid-or-mail-regexp
9371 @vindex gnus-button-mid-or-mail-regexp
9372 Regular expression that matches a message ID or a mail address.
9373
9374 @item gnus-button-prefer-mid-or-mail
9375 @vindex gnus-button-prefer-mid-or-mail
9376 This variable determines what to do when the button on a string as
9377 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
9378 message ID or a mail address.  If it is one of the symbols @code{mid} or
9379 @code{mail}, Gnus will always assume that the string is a message ID or
9380 a mail address, respectively.  If this variable is set to the symbol
9381 @code{ask}, always query the user what to do.  If it is a function, this
9382 function will be called with the string as its only argument.  The
9383 function must return @code{mid}, @code{mail}, @code{invalid} or
9384 @code{ask}.  The default value is the function
9385 @code{gnus-button-mid-or-mail-heuristic}.
9386
9387 @item gnus-button-mid-or-mail-heuristic
9388 @findex gnus-button-mid-or-mail-heuristic
9389 Function that guesses whether its argument is a message ID or a mail
9390 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
9391 it's a mail address, @code{ask} if unsure and @code{invalid} if the
9392 string is invalid.
9393
9394 @item gnus-button-mid-or-mail-heuristic-alist
9395 @vindex gnus-button-mid-or-mail-heuristic-alist
9396 An alist of @code{(RATE . REGEXP)} pairs used by the function
9397 @code{gnus-button-mid-or-mail-heuristic}.
9398
9399 @c Misc stuff
9400
9401 @item gnus-article-button-face
9402 @vindex gnus-article-button-face
9403 Face used on buttons.
9404
9405 @item gnus-article-mouse-face
9406 @vindex gnus-article-mouse-face
9407 Face used when the mouse cursor is over a button.
9408
9409 @end table
9410
9411 @xref{Customizing Articles}, for how to buttonize articles automatically.
9412
9413
9414 @node Article Button Levels
9415 @subsection Article button levels
9416 @cindex button levels
9417 The higher the value of the variables @code{gnus-button-@var{*}-level},
9418 the more buttons will appear.  If the level is zero, no corresponding
9419 buttons are displayed.  With the default value (which is 5) you should
9420 already see quite a lot of buttons.  With higher levels, you will see
9421 more buttons, but you may also get more false positives.  To avoid them,
9422 you can set the variables @code{gnus-button-@var{*}-level} local to
9423 specific groups (@pxref{Group Parameters}).  Here's an example for the
9424 variable @code{gnus-parameters}:
9425
9426 @lisp
9427 ;; @r{increase @code{gnus-button-*-level} in some groups:}
9428 (setq gnus-parameters
9429       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
9430         ("\\<unix\\>"               (gnus-button-man-level 10))
9431         ("\\<tex\\>"                (gnus-button-tex-level 10))))
9432 @end lisp
9433
9434 @table @code
9435
9436 @item gnus-button-browse-level
9437 @vindex gnus-button-browse-level
9438 Controls the display of references to message IDs, mail addresses and
9439 news URLs.  Related variables and functions include
9440 @code{gnus-button-url-regexp}, @code{browse-url}, and
9441 @code{browse-url-browser-function}.
9442
9443 @item gnus-button-emacs-level
9444 @vindex gnus-button-emacs-level
9445 Controls the display of Emacs or Gnus references.  Related functions are
9446 @code{gnus-button-handle-custom},
9447 @code{gnus-button-handle-describe-function},
9448 @code{gnus-button-handle-describe-variable},
9449 @code{gnus-button-handle-symbol},
9450 @code{gnus-button-handle-describe-key},
9451 @code{gnus-button-handle-apropos},
9452 @code{gnus-button-handle-apropos-command},
9453 @code{gnus-button-handle-apropos-variable},
9454 @code{gnus-button-handle-apropos-documentation}, and
9455 @code{gnus-button-handle-library}.
9456
9457 @item gnus-button-man-level
9458 @vindex gnus-button-man-level
9459 Controls the display of references to (Unix) man pages.
9460 See @code{gnus-button-man-handler}.
9461
9462 @item gnus-button-message-level
9463 @vindex gnus-button-message-level
9464 Controls the display of message IDs, mail addresses and news URLs.
9465 Related variables and functions include
9466 @code{gnus-button-mid-or-mail-regexp},
9467 @code{gnus-button-prefer-mid-or-mail},
9468 @code{gnus-button-mid-or-mail-heuristic}, and
9469 @code{gnus-button-mid-or-mail-heuristic-alist}.
9470
9471 @end table
9472
9473
9474 @node Article Date
9475 @subsection Article Date
9476
9477 The date is most likely generated in some obscure timezone you've never
9478 heard of, so it's quite nice to be able to find out what the time was
9479 when the article was sent.
9480
9481 @table @kbd
9482
9483 @item W T u
9484 @kindex W T u (Summary)
9485 @findex gnus-article-date-ut
9486 Display the date in UT (aka. GMT, aka ZULU)
9487 (@code{gnus-article-date-ut}).
9488
9489 @item W T i
9490 @kindex W T i (Summary)
9491 @findex gnus-article-date-iso8601
9492 @cindex ISO 8601
9493 Display the date in international format, aka. ISO 8601
9494 (@code{gnus-article-date-iso8601}).
9495
9496 @item W T l
9497 @kindex W T l (Summary)
9498 @findex gnus-article-date-local
9499 Display the date in the local timezone (@code{gnus-article-date-local}).
9500
9501 @item W T p
9502 @kindex W T p (Summary)
9503 @findex gnus-article-date-english
9504 Display the date in a format that's easily pronounceable in English
9505 (@code{gnus-article-date-english}).
9506
9507 @item W T s
9508 @kindex W T s (Summary)
9509 @vindex gnus-article-time-format
9510 @findex gnus-article-date-user
9511 @findex format-time-string
9512 Display the date using a user-defined format
9513 (@code{gnus-article-date-user}).  The format is specified by the
9514 @code{gnus-article-time-format} variable, and is a string that's passed
9515 to @code{format-time-string}.  See the documentation of that variable
9516 for a list of possible format specs.
9517
9518 @item W T e
9519 @kindex W T e (Summary)
9520 @findex gnus-article-date-lapsed
9521 @findex gnus-start-date-timer
9522 @findex gnus-stop-date-timer
9523 Say how much time has elapsed between the article was posted and now
9524 (@code{gnus-article-date-lapsed}).  It looks something like:
9525
9526 @example
9527 Date: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
9528 @end example
9529
9530 To make this line updated continually, set the
9531 @code{gnus-article-update-date-headers} variable to the frequency in
9532 seconds (the default is @code{nil}).
9533
9534 @item W T o
9535 @kindex W T o (Summary)
9536 @findex gnus-article-date-original
9537 Display the original date (@code{gnus-article-date-original}).  This can
9538 be useful if you normally use some other conversion function and are
9539 worried that it might be doing something totally wrong.  Say, claiming
9540 that the article was posted in 1854.  Although something like that is
9541 @emph{totally} impossible.  Don't you trust me? *titter*
9542
9543 @end table
9544
9545 @xref{Customizing Articles}, for how to display the date in your
9546 preferred format automatically.
9547
9548
9549 @node Article Display
9550 @subsection Article Display
9551 @cindex picons
9552 @cindex x-face
9553 @cindex smileys
9554 @cindex gravatars
9555
9556 These commands add various frivolous display gimmicks to the article
9557 buffer in Emacs versions that support them.
9558
9559 @code{X-Face} headers are small black-and-white images supplied by the
9560 message headers (@pxref{X-Face}).
9561
9562 @code{Face} headers are small colored images supplied by the message
9563 headers (@pxref{Face}).
9564
9565 Smileys are those little @samp{:-)} symbols that people like to litter
9566 their messages with (@pxref{Smileys}).
9567
9568 Picons, on the other hand, reside on your own system, and Gnus will
9569 try to match the headers to what you have (@pxref{Picons}).
9570
9571 Gravatars reside on-line and are fetched from
9572 @uref{http://www.gravatar.com/} (@pxref{Gravatars}).
9573
9574 All these functions are toggles---if the elements already exist,
9575 they'll be removed.
9576
9577 @table @kbd
9578 @item W D x
9579 @kindex W D x (Summary)
9580 @findex gnus-article-display-x-face
9581 Display an @code{X-Face} in the @code{From} header.
9582 (@code{gnus-article-display-x-face}).
9583
9584 @item W D d
9585 @kindex W D d (Summary)
9586 @findex gnus-article-display-face
9587 Display a @code{Face} in the @code{From} header.
9588 (@code{gnus-article-display-face}).
9589
9590 @item W D s
9591 @kindex W D s (Summary)
9592 @findex gnus-treat-smiley
9593 Display smileys (@code{gnus-treat-smiley}).
9594
9595 @item W D f
9596 @kindex W D f (Summary)
9597 @findex gnus-treat-from-picon
9598 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9599
9600 @item W D m
9601 @kindex W D m (Summary)
9602 @findex gnus-treat-mail-picon
9603 Piconify all mail headers (i.e., @code{Cc}, @code{To})
9604 (@code{gnus-treat-mail-picon}).
9605
9606 @item W D n
9607 @kindex W D n (Summary)
9608 @findex gnus-treat-newsgroups-picon
9609 Piconify all news headers (i.e., @code{Newsgroups} and
9610 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9611
9612 @item W D g
9613 @kindex W D g (Summary)
9614 @findex gnus-treat-from-gravatar
9615 Gravatarify the @code{From} header (@code{gnus-treat-from-gravatar}).
9616
9617 @item W D h
9618 @kindex W D h (Summary)
9619 @findex gnus-treat-mail-gravatar
9620 Gravatarify all mail headers (i.e., @code{Cc}, @code{To})
9621 (@code{gnus-treat-from-gravatar}).
9622
9623 @item W D D
9624 @kindex W D D (Summary)
9625 @findex gnus-article-remove-images
9626 Remove all images from the article buffer
9627 (@code{gnus-article-remove-images}).
9628
9629 @item W D W
9630 @kindex W D W (Summary)
9631 @findex gnus-html-show-images
9632 If you're reading an @acronym{HTML} article rendered with
9633 @code{gnus-article-html}, then you can insert any blocked images in
9634 the buffer with this command.
9635 (@code{gnus-html-show-images}).
9636
9637 @end table
9638
9639
9640
9641 @node Article Signature
9642 @subsection Article Signature
9643 @cindex signatures
9644 @cindex article signature
9645
9646 @vindex gnus-signature-separator
9647 Each article is divided into two parts---the head and the body.  The
9648 body can be divided into a signature part and a text part.  The variable
9649 that says what is to be considered a signature is
9650 @code{gnus-signature-separator}.  This is normally the standard
9651 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9652 non-standard signature separators, so this variable can also be a list
9653 of regular expressions to be tested, one by one.  (Searches are done
9654 from the end of the body towards the beginning.)  One likely value is:
9655
9656 @lisp
9657 (setq gnus-signature-separator
9658       '("^-- $"         ; @r{The standard}
9659         "^-- *$"        ; @r{A common mangling}
9660         "^-------*$"    ; @r{Many people just use a looong}
9661                         ; @r{line of dashes.  Shame!}
9662         "^ *--------*$" ; @r{Double-shame!}
9663         "^________*$"   ; @r{Underscores are also popular}
9664         "^========*$")) ; @r{Pervert!}
9665 @end lisp
9666
9667 The more permissive you are, the more likely it is that you'll get false
9668 positives.
9669
9670 @vindex gnus-signature-limit
9671 @code{gnus-signature-limit} provides a limit to what is considered a
9672 signature when displaying articles.
9673
9674 @enumerate
9675 @item
9676 If it is an integer, no signature may be longer (in characters) than
9677 that integer.
9678 @item
9679 If it is a floating point number, no signature may be longer (in lines)
9680 than that number.
9681 @item
9682 If it is a function, the function will be called without any parameters,
9683 and if it returns @code{nil}, there is no signature in the buffer.
9684 @item
9685 If it is a string, it will be used as a regexp.  If it matches, the text
9686 in question is not a signature.
9687 @end enumerate
9688
9689 This variable can also be a list where the elements may be of the types
9690 listed above.  Here's an example:
9691
9692 @lisp
9693 (setq gnus-signature-limit
9694       '(200.0 "^---*Forwarded article"))
9695 @end lisp
9696
9697 This means that if there are more than 200 lines after the signature
9698 separator, or the text after the signature separator is matched by
9699 the regular expression @samp{^---*Forwarded article}, then it isn't a
9700 signature after all.
9701
9702
9703 @node Article Miscellanea
9704 @subsection Article Miscellanea
9705
9706 @table @kbd
9707 @item A t
9708 @kindex A t (Summary)
9709 @findex gnus-article-babel
9710 Translate the article from one language to another
9711 (@code{gnus-article-babel}).
9712
9713 @end table
9714
9715
9716 @node MIME Commands
9717 @section MIME Commands
9718 @cindex MIME decoding
9719 @cindex attachments
9720 @cindex viewing attachments
9721
9722 The following commands all understand the numerical prefix.  For
9723 instance, @kbd{3 K v} means ``view the third @acronym{MIME} part''.
9724
9725 @table @kbd
9726 @item b
9727 @itemx K v
9728 @kindex b (Summary)
9729 @kindex K v (Summary)
9730 View the @acronym{MIME} part.
9731
9732 @item K o
9733 @kindex K o (Summary)
9734 Save the @acronym{MIME} part.
9735
9736 @item K O
9737 @kindex K O (Summary)
9738 Prompt for a file name, then save the @acronym{MIME} part and strip it
9739 from the article.  The stripped @acronym{MIME} object will be referred
9740 via the message/external-body @acronym{MIME} type.
9741
9742 @item K r
9743 @kindex K r (Summary)
9744 Replace the @acronym{MIME} part with an external body.
9745
9746 @item K d
9747 @kindex K d (Summary)
9748 Delete the @acronym{MIME} part and add some information about the
9749 removed part.
9750
9751 @item K c
9752 @kindex K c (Summary)
9753 Copy the @acronym{MIME} part.
9754
9755 @item K e
9756 @kindex K e (Summary)
9757 View the @acronym{MIME} part externally.
9758
9759 @item K i
9760 @kindex K i (Summary)
9761 View the @acronym{MIME} part internally.
9762
9763 @item K |
9764 @kindex K | (Summary)
9765 Pipe the @acronym{MIME} part to an external command.
9766 @end table
9767
9768 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9769 the same manner:
9770
9771 @table @kbd
9772 @item K H
9773 @kindex K H (Summary)
9774 @findex gnus-article-browse-html-article
9775 View @samp{text/html} parts of the current article with a WWW browser.
9776 Inline images embedded in a message using the @code{cid} scheme, as they
9777 are generally considered to be safe, will be processed properly.  The
9778 message header is added to the beginning of every @acronym{HTML} part
9779 unless the prefix argument is given.
9780
9781 Warning: Spammers use links to images (using the @code{http} scheme) in
9782 @acronym{HTML} articles to verify whether you have read the message.  As
9783 this command passes the @acronym{HTML} content to the browser without
9784 eliminating these ``web bugs'' you should only use it for mails from
9785 trusted senders.
9786
9787 If you always want to display @acronym{HTML} parts in the browser, set
9788 @code{mm-text-html-renderer} to @code{nil}.
9789
9790 This command creates temporary files to pass @acronym{HTML} contents
9791 including images if any to the browser, and deletes them when exiting
9792 the group (if you want).
9793
9794 @item K b
9795 @kindex K b (Summary)
9796 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9797 mostly useful if you wish to save (or perform other actions) on inlined
9798 parts.
9799
9800 @item K m
9801 @kindex K m (Summary)
9802 @findex gnus-summary-repair-multipart
9803 Some multipart messages are transmitted with missing or faulty headers.
9804 This command will attempt to ``repair'' these messages so that they can
9805 be viewed in a more pleasant manner
9806 (@code{gnus-summary-repair-multipart}).
9807
9808 @item X m
9809 @kindex X m (Summary)
9810 @findex gnus-summary-save-parts
9811 Save all parts matching a @acronym{MIME} type to a directory
9812 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9813 convention (@pxref{Process/Prefix}).
9814
9815 @item M-t
9816 @kindex M-t (Summary)
9817 @findex gnus-summary-toggle-display-buttonized
9818 Toggle the buttonized display of the article buffer
9819 (@code{gnus-summary-toggle-display-buttonized}).
9820
9821 @item W M w
9822 @kindex W M w (Summary)
9823 @findex gnus-article-decode-mime-words
9824 Decode RFC 2047-encoded words in the article headers
9825 (@code{gnus-article-decode-mime-words}).
9826
9827 @item W M c
9828 @kindex W M c (Summary)
9829 @findex gnus-article-decode-charset
9830 Decode encoded article bodies as well as charsets
9831 (@code{gnus-article-decode-charset}).
9832
9833 This command looks in the @code{Content-Type} header to determine the
9834 charset.  If there is no such header in the article, you can give it a
9835 prefix, which will prompt for the charset to decode as.  In regional
9836 groups where people post using some common encoding (but do not
9837 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9838 parameter to the required charset (@pxref{Group Parameters}).
9839
9840 @item W M v
9841 @kindex W M v (Summary)
9842 @findex gnus-mime-view-all-parts
9843 View all the @acronym{MIME} parts in the current article
9844 (@code{gnus-mime-view-all-parts}).
9845
9846 @end table
9847
9848 Relevant variables:
9849
9850 @table @code
9851 @item gnus-ignored-mime-types
9852 @vindex gnus-ignored-mime-types
9853 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9854 this list will be completely ignored by Gnus.  The default value is
9855 @code{nil}.
9856
9857 To have all Vcards be ignored, you'd say something like this:
9858
9859 @lisp
9860 (setq gnus-ignored-mime-types
9861       '("text/x-vcard"))
9862 @end lisp
9863
9864 @item gnus-article-loose-mime
9865 @vindex gnus-article-loose-mime
9866 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9867 before interpreting the message as a @acronym{MIME} message.  This helps
9868 when reading messages from certain broken mail user agents.  The
9869 default is @code{t}.
9870
9871 @item gnus-article-emulate-mime
9872 @vindex gnus-article-emulate-mime
9873 @cindex uuencode
9874 @cindex yEnc
9875 There are other, non-@acronym{MIME} encoding methods used.  The most common
9876 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9877 this variable is non-@code{nil}, Gnus will look in message bodies to
9878 see if it finds these encodings, and if so, it'll run them through the
9879 Gnus @acronym{MIME} machinery.  The default is @code{t}.  Only
9880 single-part yEnc encoded attachments can be decoded.  There's no support
9881 for encoding in Gnus.
9882
9883 @item gnus-unbuttonized-mime-types
9884 @vindex gnus-unbuttonized-mime-types
9885 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9886 this list won't have @acronym{MIME} buttons inserted unless they aren't
9887 displayed or this variable is overridden by
9888 @code{gnus-buttonized-mime-types}.  The default value is
9889 @code{(".*/.*")}.  This variable is only used when
9890 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9891
9892 @item gnus-buttonized-mime-types
9893 @vindex gnus-buttonized-mime-types
9894 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9895 this list will have @acronym{MIME} buttons inserted unless they aren't
9896 displayed.  This variable overrides
9897 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9898 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9899 is @code{nil}.
9900
9901 E.g., to see security buttons but no other buttons, you could set this
9902 variable to @code{("multipart/signed")} and leave
9903 @code{gnus-unbuttonized-mime-types} at the default value.
9904
9905 You could also add @code{"multipart/alternative"} to this list to
9906 display radio buttons that allow you to choose one of two media types
9907 those mails include.  See also @code{mm-discouraged-alternatives}
9908 (@pxref{Display Customization, ,Display Customization, emacs-mime, The
9909 Emacs MIME Manual}).
9910
9911 @item gnus-inhibit-mime-unbuttonizing
9912 @vindex gnus-inhibit-mime-unbuttonizing
9913 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9914 default value is @code{nil}.
9915
9916 @item gnus-article-mime-part-function
9917 @vindex gnus-article-mime-part-function
9918 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9919 handle as the parameter.  The function is meant to be used to allow
9920 users to gather information from the article (e.g., add Vcard info to
9921 the bbdb database) or to do actions based on parts (e.g., automatically
9922 save all jpegs into some directory).
9923
9924 Here's an example function the does the latter:
9925
9926 @lisp
9927 (defun my-save-all-jpeg-parts (handle)
9928   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9929     (with-temp-buffer
9930       (insert (mm-get-part handle))
9931       (write-region (point-min) (point-max)
9932                     (read-file-name "Save jpeg to: ")))))
9933 (setq gnus-article-mime-part-function
9934       'my-save-all-jpeg-parts)
9935 @end lisp
9936
9937 @vindex gnus-mime-multipart-functions
9938 @item gnus-mime-multipart-functions
9939 Alist of @acronym{MIME} multipart types and functions to handle them.
9940
9941 @vindex gnus-mime-display-multipart-alternative-as-mixed
9942 @item gnus-mime-display-multipart-alternative-as-mixed
9943 Display "multipart/alternative" parts as "multipart/mixed".
9944
9945 @vindex gnus-mime-display-multipart-related-as-mixed
9946 @item gnus-mime-display-multipart-related-as-mixed
9947 Display "multipart/related" parts as "multipart/mixed".
9948
9949 If displaying @samp{text/html} is discouraged, see
9950 @code{mm-discouraged-alternatives}, images or other material inside a
9951 "multipart/related" part might be overlooked when this variable is
9952 @code{nil}.  @ref{Display Customization, Display Customization, ,
9953 emacs-mime, Emacs-Mime Manual}.
9954
9955 @vindex gnus-mime-display-multipart-as-mixed
9956 @item gnus-mime-display-multipart-as-mixed
9957 Display "multipart" parts as "multipart/mixed".  If @code{t}, it
9958 overrides @code{nil} values of
9959 @code{gnus-mime-display-multipart-alternative-as-mixed} and
9960 @code{gnus-mime-display-multipart-related-as-mixed}.
9961
9962 @vindex mm-file-name-rewrite-functions
9963 @item mm-file-name-rewrite-functions
9964 List of functions used for rewriting file names of @acronym{MIME} parts.
9965 Each function takes a file name as input and returns a file name.
9966
9967 Ready-made functions include@*
9968 @code{mm-file-name-delete-whitespace},
9969 @code{mm-file-name-trim-whitespace},
9970 @code{mm-file-name-collapse-whitespace}, and
9971 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9972 the variable @code{mm-file-name-replace-whitespace} to replace each
9973 whitespace character in a file name with that string; default value
9974 is @code{"_"} (a single underscore).
9975 @findex mm-file-name-delete-whitespace
9976 @findex mm-file-name-trim-whitespace
9977 @findex mm-file-name-collapse-whitespace
9978 @findex mm-file-name-replace-whitespace
9979 @vindex mm-file-name-replace-whitespace
9980
9981 The standard functions @code{capitalize}, @code{downcase},
9982 @code{upcase}, and @code{upcase-initials} may be useful, too.
9983
9984 Everybody knows that whitespace characters in file names are evil,
9985 except those who don't know.  If you receive lots of attachments from
9986 such unenlightened users, you can make live easier by adding
9987
9988 @lisp
9989 (setq mm-file-name-rewrite-functions
9990       '(mm-file-name-trim-whitespace
9991         mm-file-name-collapse-whitespace
9992         mm-file-name-replace-whitespace))
9993 @end lisp
9994
9995 @noindent
9996 to your @file{~/.gnus.el} file.
9997
9998 @end table
9999
10000
10001 @node Charsets
10002 @section Charsets
10003 @cindex charsets
10004
10005 People use different charsets, and we have @acronym{MIME} to let us know what
10006 charsets they use.  Or rather, we wish we had.  Many people use
10007 newsreaders and mailers that do not understand or use @acronym{MIME}, and
10008 just send out messages without saying what character sets they use.  To
10009 help a bit with this, some local news hierarchies have policies that say
10010 what character set is the default.  For instance, the @samp{fj}
10011 hierarchy uses @code{iso-2022-jp}.
10012
10013 @vindex gnus-group-charset-alist
10014 This knowledge is encoded in the @code{gnus-group-charset-alist}
10015 variable, which is an alist of regexps (use the first item to match full
10016 group names) and default charsets to be used when reading these groups.
10017
10018 @vindex gnus-newsgroup-ignored-charsets
10019 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
10020 aren't.  These blithely mark messages as being in @code{iso-8859-1}
10021 even if they really are in @code{koi-8}.  To help here, the
10022 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
10023 charsets that are listed here will be ignored.  The variable can be
10024 set on a group-by-group basis using the group parameters (@pxref{Group
10025 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
10026 which includes values some agents insist on having in there.
10027
10028 @vindex gnus-group-posting-charset-alist
10029 When posting, @code{gnus-group-posting-charset-alist} is used to
10030 determine which charsets should not be encoded using the @acronym{MIME}
10031 encodings.  For instance, some hierarchies discourage using
10032 quoted-printable header encoding.
10033
10034 This variable is an alist of regexps and permitted unencoded charsets
10035 for posting.  Each element of the alist has the form @code{(}@var{test
10036 header body-list}@code{)}, where:
10037
10038 @table @var
10039 @item test
10040 is either a regular expression matching the newsgroup header or a
10041 variable to query,
10042 @item header
10043 is the charset which may be left unencoded in the header (@code{nil}
10044 means encode all charsets),
10045 @item body-list
10046 is a list of charsets which may be encoded using 8bit content-transfer
10047 encoding in the body, or one of the special values @code{nil} (always
10048 encode using quoted-printable) or @code{t} (always use 8bit).
10049 @end table
10050
10051 @cindex Russian
10052 @cindex koi8-r
10053 @cindex koi8-u
10054 @cindex iso-8859-5
10055 @cindex coding system aliases
10056 @cindex preferred charset
10057
10058 @xref{Encoding Customization, , Encoding Customization, emacs-mime,
10059 The Emacs MIME Manual}, for additional variables that control which
10060 MIME charsets are used when sending messages.
10061
10062 Other charset tricks that may be useful, although not Gnus-specific:
10063
10064 If there are several @acronym{MIME} charsets that encode the same Emacs
10065 charset, you can choose what charset to use by saying the following:
10066
10067 @lisp
10068 (put-charset-property 'cyrillic-iso8859-5
10069                       'preferred-coding-system 'koi8-r)
10070 @end lisp
10071
10072 This means that Russian will be encoded using @code{koi8-r} instead of
10073 the default @code{iso-8859-5} @acronym{MIME} charset.
10074
10075 If you want to read messages in @code{koi8-u}, you can cheat and say
10076
10077 @lisp
10078 (define-coding-system-alias 'koi8-u 'koi8-r)
10079 @end lisp
10080
10081 This will almost do the right thing.
10082
10083 And finally, to read charsets like @code{windows-1251}, you can say
10084 something like
10085
10086 @lisp
10087 (codepage-setup 1251)
10088 (define-coding-system-alias 'windows-1251 'cp1251)
10089 @end lisp
10090
10091
10092 @node Article Commands
10093 @section Article Commands
10094
10095 @table @kbd
10096
10097 @item A P
10098 @cindex PostScript
10099 @cindex printing
10100 @kindex A P (Summary)
10101 @vindex gnus-ps-print-hook
10102 @findex gnus-summary-print-article
10103 Generate and print a PostScript image of the article buffer
10104 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
10105 be run just before printing the buffer.  An alternative way to print
10106 article is to use Muttprint (@pxref{Saving Articles}).
10107
10108 @item A C
10109 @vindex gnus-fetch-partial-articles
10110 @findex gnus-summary-show-complete-article
10111 If @code{<backend>-fetch-partial-articles} is non-@code{nil}, Gnus will
10112 fetch partial articles, if the backend it fetches them from supports
10113 it.  Currently only @code{nnimap} does.  If you're looking at a
10114 partial article, and want to see the complete article instead, then
10115 the @kbd{A C} command (@code{gnus-summary-show-complete-article}) will
10116 do so.
10117
10118 @end table
10119
10120
10121 @node Summary Sorting
10122 @section Summary Sorting
10123 @cindex summary sorting
10124
10125 You can have the summary buffer sorted in various ways, even though I
10126 can't really see why you'd want that.
10127
10128 @table @kbd
10129
10130 @item C-c C-s C-n
10131 @kindex C-c C-s C-n (Summary)
10132 @findex gnus-summary-sort-by-number
10133 Sort by article number (@code{gnus-summary-sort-by-number}).
10134
10135 @item C-c C-s C-m C-n
10136 @kindex C-c C-s C-n (Summary)
10137 @findex gnus-summary-sort-by-most-recent-number
10138 Sort by most recent article number
10139 (@code{gnus-summary-sort-by-most-recent-number}).
10140
10141 @item C-c C-s C-a
10142 @kindex C-c C-s C-a (Summary)
10143 @findex gnus-summary-sort-by-author
10144 Sort by author (@code{gnus-summary-sort-by-author}).
10145
10146 @item C-c C-s C-t
10147 @kindex C-c C-s C-t (Summary)
10148 @findex gnus-summary-sort-by-recipient
10149 Sort by recipient (@code{gnus-summary-sort-by-recipient}).
10150
10151 @item C-c C-s C-s
10152 @kindex C-c C-s C-s (Summary)
10153 @findex gnus-summary-sort-by-subject
10154 Sort by subject (@code{gnus-summary-sort-by-subject}).
10155
10156 @item C-c C-s C-d
10157 @kindex C-c C-s C-d (Summary)
10158 @findex gnus-summary-sort-by-date
10159 Sort by date (@code{gnus-summary-sort-by-date}).
10160
10161 @item C-c C-s C-m C-d
10162 @kindex C-c C-s C-m C-d (Summary)
10163 @findex gnus-summary-sort-by-most-recent-date
10164 Sort by most recent date (@code{gnus-summary-sort-by-most-recent-date}).
10165
10166 @item C-c C-s C-l
10167 @kindex C-c C-s C-l (Summary)
10168 @findex gnus-summary-sort-by-lines
10169 Sort by lines (@code{gnus-summary-sort-by-lines}).
10170
10171 @item C-c C-s C-c
10172 @kindex C-c C-s C-c (Summary)
10173 @findex gnus-summary-sort-by-chars
10174 Sort by article length (@code{gnus-summary-sort-by-chars}).
10175
10176 @item C-c C-s C-i
10177 @kindex C-c C-s C-i (Summary)
10178 @findex gnus-summary-sort-by-score
10179 Sort by score (@code{gnus-summary-sort-by-score}).
10180
10181 @item C-c C-s C-r
10182 @kindex C-c C-s C-r (Summary)
10183 @findex gnus-summary-sort-by-random
10184 Randomize (@code{gnus-summary-sort-by-random}).
10185
10186 @item C-c C-s C-o
10187 @kindex C-c C-s C-o (Summary)
10188 @findex gnus-summary-sort-by-original
10189 Sort using the default sorting method
10190 (@code{gnus-summary-sort-by-original}).
10191 @end table
10192
10193 These functions will work both when you use threading and when you don't
10194 use threading.  In the latter case, all summary lines will be sorted,
10195 line by line.  In the former case, sorting will be done on a
10196 root-by-root basis, which might not be what you were looking for.  To
10197 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
10198 Commands}).
10199
10200 If a prefix argument if given, the sort order is reversed.
10201
10202
10203 @node Finding the Parent
10204 @section Finding the Parent
10205 @cindex parent articles
10206 @cindex referring articles
10207
10208 @table @kbd
10209 @item ^
10210 @kindex ^ (Summary)
10211 @findex gnus-summary-refer-parent-article
10212 If you'd like to read the parent of the current article, and it is not
10213 displayed in the summary buffer, you might still be able to.  That is,
10214 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
10215 and the @code{References} in the current article are not mangled, you
10216 can just press @kbd{^} or @kbd{A r}
10217 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
10218 you'll get the parent.  If the parent is already displayed in the
10219 summary buffer, point will just move to this article.
10220
10221 If given a positive numerical prefix, fetch that many articles back into
10222 the ancestry.  If given a negative numerical prefix, fetch just that
10223 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
10224 grandparent and the grandgrandparent of the current article.  If you say
10225 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
10226 article.
10227
10228 @item A R (Summary)
10229 @findex gnus-summary-refer-references
10230 @kindex A R (Summary)
10231 Fetch all articles mentioned in the @code{References} header of the
10232 article (@code{gnus-summary-refer-references}).
10233
10234 @item A T (Summary)
10235 @findex gnus-summary-refer-thread
10236 @kindex A T (Summary)
10237 Display the full thread where the current article appears
10238 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
10239 headers in the current group to work, so it usually takes a while.  If
10240 you do it often, you may consider setting @code{gnus-fetch-old-headers}
10241 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
10242 visible effects normally, but it'll make this command work a whole lot
10243 faster.  Of course, it'll make group entry somewhat slow.
10244
10245 @vindex gnus-refer-thread-limit
10246 The @code{gnus-refer-thread-limit} variable says how many old (i.e.,
10247 articles before the first displayed in the current group) headers to
10248 fetch when doing this command.  The default is 200.  If @code{t}, all
10249 the available headers will be fetched.  This variable can be overridden
10250 by giving the @kbd{A T} command a numerical prefix.
10251
10252 @item M-^ (Summary)
10253 @findex gnus-summary-refer-article
10254 @kindex M-^ (Summary)
10255 @cindex Message-ID
10256 @cindex fetching by Message-ID
10257 You can also ask Gnus for an arbitrary article, no matter what group it
10258 belongs to.  @kbd{M-^} (@code{gnus-summary-refer-article}) will ask you
10259 for a @code{Message-ID}, which is one of those long, hard-to-read
10260 thingies that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.
10261 You have to get it all exactly right.  No fuzzy searches, I'm afraid.
10262
10263 Gnus looks for the @code{Message-ID} in the headers that have already
10264 been fetched, but also tries all the select methods specified by
10265 @code{gnus-refer-article-method} if it is not found.
10266 @end table
10267
10268 @vindex gnus-refer-article-method
10269 If the group you are reading is located on a back end that does not
10270 support fetching by @code{Message-ID} very well (like @code{nnspool}),
10271 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
10272 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
10273 updating the spool you are reading from, but that's not really
10274 necessary.
10275
10276 It can also be a list of select methods, as well as the special symbol
10277 @code{current}, which means to use the current select method.  If it
10278 is a list, Gnus will try all the methods in the list until it finds a
10279 match.
10280
10281 Here's an example setting that will first try the current method, and
10282 then ask Google if that fails:
10283
10284 @lisp
10285 (setq gnus-refer-article-method
10286       '(current
10287         (nnweb "google" (nnweb-type google))))
10288 @end lisp
10289
10290 Most of the mail back ends support fetching by @code{Message-ID}, but
10291 do not do a particularly excellent job at it.  That is, @code{nnmbox},
10292 @code{nnbabyl}, @code{nnmaildir}, @code{nnml}, are able to locate
10293 articles from any groups, while @code{nnfolder}, and @code{nnimap} are
10294 only able to locate articles that have been posted to the current
10295 group.  @code{nnmh} does not support this at all.
10296
10297 Fortunately, the special @code{nnregistry} back end is able to locate
10298 articles in any groups, regardless of their back end (@pxref{Registry
10299 Article Refer Method, fetching by @code{Message-ID} using the
10300 registry}).
10301
10302 @node Alternative Approaches
10303 @section Alternative Approaches
10304
10305 Different people like to read news using different methods.  This being
10306 Gnus, we offer a small selection of minor modes for the summary buffers.
10307
10308 @menu
10309 * Pick and Read::               First mark articles and then read them.
10310 * Binary Groups::               Auto-decode all articles.
10311 @end menu
10312
10313
10314 @node Pick and Read
10315 @subsection Pick and Read
10316 @cindex pick and read
10317
10318 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
10319 a two-phased reading interface.  The user first marks in a summary
10320 buffer the articles she wants to read.  Then she starts reading the
10321 articles with just an article buffer displayed.
10322
10323 @findex gnus-pick-mode
10324 @kindex M-x gnus-pick-mode
10325 Gnus provides a summary buffer minor mode that allows
10326 this---@code{gnus-pick-mode}.  This basically means that a few process
10327 mark commands become one-keystroke commands to allow easy marking, and
10328 it provides one additional command for switching to the summary buffer.
10329
10330 Here are the available keystrokes when using pick mode:
10331
10332 @table @kbd
10333 @item .
10334 @kindex . (Pick)
10335 @findex gnus-pick-article-or-thread
10336 Pick the article or thread on the current line
10337 (@code{gnus-pick-article-or-thread}).  If the variable
10338 @code{gnus-thread-hide-subtree} is true, then this key selects the
10339 entire thread when used at the first article of the thread.  Otherwise,
10340 it selects just the article.  If given a numerical prefix, go to that
10341 thread or article and pick it.  (The line number is normally displayed
10342 at the beginning of the summary pick lines.)
10343
10344 @item SPACE
10345 @kindex SPACE (Pick)
10346 @findex gnus-pick-next-page
10347 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
10348 at the end of the buffer, start reading the picked articles.
10349
10350 @item u
10351 @kindex u (Pick)
10352 @findex gnus-pick-unmark-article-or-thread.
10353 Unpick the thread or article
10354 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
10355 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
10356 thread if used at the first article of the thread.  Otherwise it unpicks
10357 just the article.  You can give this key a numerical prefix to unpick
10358 the thread or article at that line.
10359
10360 @item RET
10361 @kindex RET (Pick)
10362 @findex gnus-pick-start-reading
10363 @vindex gnus-pick-display-summary
10364 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
10365 given a prefix, mark all unpicked articles as read first.  If
10366 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
10367 will still be visible when you are reading.
10368
10369 @end table
10370
10371 All the normal summary mode commands are still available in the
10372 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
10373 which is mapped to the same function
10374 @code{gnus-summary-tick-article-forward}.
10375
10376 If this sounds like a good idea to you, you could say:
10377
10378 @lisp
10379 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
10380 @end lisp
10381
10382 @vindex gnus-pick-mode-hook
10383 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
10384
10385 @vindex gnus-mark-unpicked-articles-as-read
10386 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
10387 all unpicked articles as read.  The default is @code{nil}.
10388
10389 @vindex gnus-summary-pick-line-format
10390 The summary line format in pick mode is slightly different from the
10391 standard format.  At the beginning of each line the line number is
10392 displayed.  The pick mode line format is controlled by the
10393 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
10394 Variables}).  It accepts the same format specs that
10395 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
10396
10397
10398 @node Binary Groups
10399 @subsection Binary Groups
10400 @cindex binary groups
10401
10402 @findex gnus-binary-mode
10403 @kindex M-x gnus-binary-mode
10404 If you spend much time in binary groups, you may grow tired of hitting
10405 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
10406 is a minor mode for summary buffers that makes all ordinary Gnus article
10407 selection functions uudecode series of articles and display the result
10408 instead of just displaying the articles the normal way.
10409
10410 @kindex g (Binary)
10411 @findex gnus-binary-show-article
10412 The only way, in fact, to see the actual articles is the @kbd{g}
10413 command, when you have turned on this mode
10414 (@code{gnus-binary-show-article}).
10415
10416 @vindex gnus-binary-mode-hook
10417 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
10418
10419
10420 @node Tree Display
10421 @section Tree Display
10422 @cindex trees
10423
10424 @vindex gnus-use-trees
10425 If you don't like the normal Gnus summary display, you might try setting
10426 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
10427 additional @dfn{tree buffer}.  You can execute all summary mode commands
10428 in the tree buffer.
10429
10430 There are a few variables to customize the tree display, of course:
10431
10432 @table @code
10433 @item gnus-tree-mode-hook
10434 @vindex gnus-tree-mode-hook
10435 A hook called in all tree mode buffers.
10436
10437 @item gnus-tree-mode-line-format
10438 @vindex gnus-tree-mode-line-format
10439 A format string for the mode bar in the tree mode buffers (@pxref{Mode
10440 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
10441 of valid specs, @pxref{Summary Buffer Mode Line}.
10442
10443 @item gnus-selected-tree-face
10444 @vindex gnus-selected-tree-face
10445 Face used for highlighting the selected article in the tree buffer.  The
10446 default is @code{modeline}.
10447
10448 @item gnus-tree-line-format
10449 @vindex gnus-tree-line-format
10450 A format string for the tree nodes.  The name is a bit of a misnomer,
10451 though---it doesn't define a line, but just the node.  The default value
10452 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
10453 the name of the poster.  It is vital that all nodes are of the same
10454 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
10455
10456 Valid specs are:
10457
10458 @table @samp
10459 @item n
10460 The name of the poster.
10461 @item f
10462 The @code{From} header.
10463 @item N
10464 The number of the article.
10465 @item [
10466 The opening bracket.
10467 @item ]
10468 The closing bracket.
10469 @item s
10470 The subject.
10471 @end table
10472
10473 @xref{Formatting Variables}.
10474
10475 Variables related to the display are:
10476
10477 @table @code
10478 @item gnus-tree-brackets
10479 @vindex gnus-tree-brackets
10480 This is used for differentiating between ``real'' articles and
10481 ``sparse'' articles.  The format is
10482 @example
10483 ((@var{real-open} . @var{real-close})
10484  (@var{sparse-open} . @var{sparse-close})
10485  (@var{dummy-open} . @var{dummy-close}))
10486 @end example
10487 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
10488
10489 @item gnus-tree-parent-child-edges
10490 @vindex gnus-tree-parent-child-edges
10491 This is a list that contains the characters used for connecting parent
10492 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
10493
10494 @end table
10495
10496 @item gnus-tree-minimize-window
10497 @vindex gnus-tree-minimize-window
10498 If this variable is non-@code{nil}, Gnus will try to keep the tree
10499 buffer as small as possible to allow more room for the other Gnus
10500 windows.  If this variable is a number, the tree buffer will never be
10501 higher than that number.  The default is @code{t}.  Note that if you
10502 have several windows displayed side-by-side in a frame and the tree
10503 buffer is one of these, minimizing the tree window will also resize all
10504 other windows displayed next to it.
10505
10506 You may also wish to add the following hook to keep the window minimized
10507 at all times:
10508
10509 @lisp
10510 (add-hook 'gnus-configure-windows-hook
10511           'gnus-tree-perhaps-minimize)
10512 @end lisp
10513
10514 @item gnus-generate-tree-function
10515 @vindex gnus-generate-tree-function
10516 @findex gnus-generate-horizontal-tree
10517 @findex gnus-generate-vertical-tree
10518 The function that actually generates the thread tree.  Two predefined
10519 functions are available: @code{gnus-generate-horizontal-tree} and
10520 @code{gnus-generate-vertical-tree} (which is the default).
10521
10522 @end table
10523
10524 Here's an example from a horizontal tree buffer:
10525
10526 @example
10527 @{***@}-(***)-[odd]-[Gun]
10528      |      \[Jan]
10529      |      \[odd]-[Eri]
10530      |      \(***)-[Eri]
10531      |            \[odd]-[Paa]
10532      \[Bjo]
10533      \[Gun]
10534      \[Gun]-[Jor]
10535 @end example
10536
10537 Here's the same thread displayed in a vertical tree buffer:
10538
10539 @example
10540 @group
10541 @{***@}
10542   |--------------------------\-----\-----\
10543 (***)                         [Bjo] [Gun] [Gun]
10544   |--\-----\-----\                          |
10545 [odd] [Jan] [odd] (***)                   [Jor]
10546   |           |     |--\
10547 [Gun]       [Eri] [Eri] [odd]
10548                           |
10549                         [Paa]
10550 @end group
10551 @end example
10552
10553 If you're using horizontal trees, it might be nice to display the trees
10554 side-by-side with the summary buffer.  You could add something like the
10555 following to your @file{~/.gnus.el} file:
10556
10557 @lisp
10558 (setq gnus-use-trees t
10559       gnus-generate-tree-function 'gnus-generate-horizontal-tree
10560       gnus-tree-minimize-window nil)
10561 (gnus-add-configuration
10562  '(article
10563    (vertical 1.0
10564              (horizontal 0.25
10565                          (summary 0.75 point)
10566                          (tree 1.0))
10567              (article 1.0))))
10568 @end lisp
10569
10570 @xref{Window Layout}.
10571
10572
10573 @node Mail Group Commands
10574 @section Mail Group Commands
10575 @cindex mail group commands
10576
10577 Some commands only make sense in mail groups.  If these commands are
10578 invalid in the current group, they will raise a hell and let you know.
10579
10580 All these commands (except the expiry and edit commands) use the
10581 process/prefix convention (@pxref{Process/Prefix}).
10582
10583 @table @kbd
10584
10585 @item B e
10586 @kindex B e (Summary)
10587 @findex gnus-summary-expire-articles
10588 @cindex expiring mail
10589 Run all expirable articles in the current group through the expiry
10590 process (@code{gnus-summary-expire-articles}).  That is, delete all
10591 expirable articles in the group that have been around for a while.
10592 (@pxref{Expiring Mail}).
10593
10594 @item B C-M-e
10595 @kindex B C-M-e (Summary)
10596 @findex gnus-summary-expire-articles-now
10597 @cindex expiring mail
10598 Delete all the expirable articles in the group
10599 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
10600 articles eligible for expiry in the current group will
10601 disappear forever into that big @file{/dev/null} in the sky.
10602
10603 @item B DEL
10604 @kindex B DEL (Summary)
10605 @cindex deleting mail
10606 @findex gnus-summary-delete-article
10607 @c @icon{gnus-summary-mail-delete}
10608 Delete the mail article.  This is ``delete'' as in ``delete it from your
10609 disk forever and ever, never to return again.'' Use with caution.
10610 (@code{gnus-summary-delete-article}).
10611
10612 @item B m
10613 @kindex B m (Summary)
10614 @cindex move mail
10615 @findex gnus-summary-move-article
10616 @vindex gnus-preserve-marks
10617 Move the article from one mail group to another
10618 (@code{gnus-summary-move-article}).  Marks will be preserved if
10619 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
10620
10621 @item B c
10622 @kindex B c (Summary)
10623 @cindex copy mail
10624 @findex gnus-summary-copy-article
10625 @c @icon{gnus-summary-mail-copy}
10626 Copy the article from one group (mail group or not) to a mail group
10627 (@code{gnus-summary-copy-article}).  Marks will be preserved if
10628 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
10629
10630 @item B B
10631 @kindex B B (Summary)
10632 @cindex crosspost mail
10633 @findex gnus-summary-crosspost-article
10634 Crosspost the current article to some other group
10635 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
10636 the article in the other group, and the Xref headers of the article will
10637 be properly updated.
10638
10639 @item B i
10640 @kindex B i (Summary)
10641 @findex gnus-summary-import-article
10642 Import an arbitrary file into the current mail newsgroup
10643 (@code{gnus-summary-import-article}).  You will be prompted for a file
10644 name, a @code{From} header and a @code{Subject} header.
10645
10646 @item B I
10647 @kindex B I (Summary)
10648 @findex gnus-summary-create-article
10649 Create an empty article in the current mail newsgroups
10650 (@code{gnus-summary-create-article}).  You will be prompted for a
10651 @code{From} header and a @code{Subject} header.
10652
10653 @item B r
10654 @kindex B r (Summary)
10655 @findex gnus-summary-respool-article
10656 @vindex gnus-summary-respool-default-method
10657 Respool the mail article (@code{gnus-summary-respool-article}).
10658 @code{gnus-summary-respool-default-method} will be used as the default
10659 select method when respooling.  This variable is @code{nil} by default,
10660 which means that the current group select method will be used instead.
10661 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
10662 (which is the default).
10663
10664 @item B w
10665 @itemx e
10666 @kindex B w (Summary)
10667 @kindex e (Summary)
10668 @findex gnus-summary-edit-article
10669 @kindex C-c C-c (Article)
10670 @findex gnus-summary-edit-article-done
10671 Edit the current article (@code{gnus-summary-edit-article}).  To finish
10672 editing and make the changes permanent, type @kbd{C-c C-c}
10673 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
10674 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
10675
10676 @item B q
10677 @kindex B q (Summary)
10678 @findex gnus-summary-respool-query
10679 If you want to re-spool an article, you might be curious as to what group
10680 the article will end up in before you do the re-spooling.  This command
10681 will tell you (@code{gnus-summary-respool-query}).
10682
10683 @item B t
10684 @kindex B t (Summary)
10685 @findex gnus-summary-respool-trace
10686 Similarly, this command will display all fancy splitting patterns used
10687 when respooling, if any (@code{gnus-summary-respool-trace}).
10688
10689 @item B p
10690 @kindex B p (Summary)
10691 @findex gnus-summary-article-posted-p
10692 Some people have a tendency to send you ``courtesy'' copies when they
10693 follow up to articles you have posted.  These usually have a
10694 @code{Newsgroups} header in them, but not always.  This command
10695 (@code{gnus-summary-article-posted-p}) will try to fetch the current
10696 article from your news server (or rather, from
10697 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
10698 report back whether it found the article or not.  Even if it says that
10699 it didn't find the article, it may have been posted anyway---mail
10700 propagation is much faster than news propagation, and the news copy may
10701 just not have arrived yet.
10702
10703 @item K E
10704 @kindex K E (Summary)
10705 @findex gnus-article-encrypt-body
10706 @vindex gnus-article-encrypt-protocol
10707 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
10708 The body is encrypted with the encryption protocol specified by the
10709 variable @code{gnus-article-encrypt-protocol}.
10710
10711 @end table
10712
10713 @vindex gnus-move-split-methods
10714 @cindex moving articles
10715 If you move (or copy) articles regularly, you might wish to have Gnus
10716 suggest where to put the articles.  @code{gnus-move-split-methods} is a
10717 variable that uses the same syntax as @code{gnus-split-methods}
10718 (@pxref{Saving Articles}).  You may customize that variable to create
10719 suggestions you find reasonable.  (Note that
10720 @code{gnus-move-split-methods} uses group names where
10721 @code{gnus-split-methods} uses file names.)
10722
10723 @lisp
10724 (setq gnus-move-split-methods
10725       '(("^From:.*Lars Magne" "nnml:junk")
10726         ("^Subject:.*gnus" "nnfolder:important")
10727         (".*" "nnml:misc")))
10728 @end lisp
10729
10730
10731 @node Various Summary Stuff
10732 @section Various Summary Stuff
10733
10734 @menu
10735 * Summary Group Information::   Information oriented commands.
10736 * Searching for Articles::      Multiple article commands.
10737 * Summary Generation Commands::
10738 * Really Various Summary Commands::  Those pesky non-conformant commands.
10739 @end menu
10740
10741 @table @code
10742 @vindex gnus-summary-display-while-building
10743 @item gnus-summary-display-while-building
10744 If non-@code{nil}, show and update the summary buffer as it's being
10745 built.  If @code{t}, update the buffer after every line is inserted.
10746 If the value is an integer, @var{n}, update the display every @var{n}
10747 lines.  The default is @code{nil}.
10748
10749 @vindex gnus-summary-display-arrow
10750 @item gnus-summary-display-arrow
10751 If non-@code{nil}, display an arrow in the fringe to indicate the
10752 current article.
10753
10754 @vindex gnus-summary-mode-hook
10755 @item gnus-summary-mode-hook
10756 This hook is called when creating a summary mode buffer.
10757
10758 @vindex gnus-summary-generate-hook
10759 @item gnus-summary-generate-hook
10760 This is called as the last thing before doing the threading and the
10761 generation of the summary buffer.  It's quite convenient for customizing
10762 the threading variables based on what data the newsgroup has.  This hook
10763 is called from the summary buffer after most summary buffer variables
10764 have been set.
10765
10766 @vindex gnus-summary-prepare-hook
10767 @item gnus-summary-prepare-hook
10768 It is called after the summary buffer has been generated.  You might use
10769 it to, for instance, highlight lines or modify the look of the buffer in
10770 some other ungodly manner.  I don't care.
10771
10772 @vindex gnus-summary-prepared-hook
10773 @item gnus-summary-prepared-hook
10774 A hook called as the very last thing after the summary buffer has been
10775 generated.
10776
10777 @vindex gnus-summary-ignore-duplicates
10778 @item gnus-summary-ignore-duplicates
10779 When Gnus discovers two articles that have the same @code{Message-ID},
10780 it has to do something drastic.  No articles are allowed to have the
10781 same @code{Message-ID}, but this may happen when reading mail from some
10782 sources.  Gnus allows you to customize what happens with this variable.
10783 If it is @code{nil} (which is the default), Gnus will rename the
10784 @code{Message-ID} (for display purposes only) and display the article as
10785 any other article.  If this variable is @code{t}, it won't display the
10786 article---it'll be as if it never existed.
10787
10788 @vindex gnus-alter-articles-to-read-function
10789 @item gnus-alter-articles-to-read-function
10790 This function, which takes two parameters (the group name and the list
10791 of articles to be selected), is called to allow the user to alter the
10792 list of articles to be selected.
10793
10794 For instance, the following function adds the list of cached articles to
10795 the list in one particular group:
10796
10797 @lisp
10798 (defun my-add-cached-articles (group articles)
10799   (if (string= group "some.group")
10800       (append gnus-newsgroup-cached articles)
10801     articles))
10802 @end lisp
10803
10804 @vindex gnus-newsgroup-variables
10805 @item gnus-newsgroup-variables
10806 A list of newsgroup (summary buffer) local variables, or cons of
10807 variables and their default expressions to be evalled (when the default
10808 values are not @code{nil}), that should be made global while the summary
10809 buffer is active.
10810
10811 Note: The default expressions will be evaluated (using function
10812 @code{eval}) before assignment to the local variable rather than just
10813 assigned to it.  If the default expression is the symbol @code{global},
10814 that symbol will not be evaluated but the global value of the local
10815 variable will be used instead.
10816
10817 These variables can be used to set variables in the group parameters
10818 while still allowing them to affect operations done in other
10819 buffers.  For example:
10820
10821 @lisp
10822 (setq gnus-newsgroup-variables
10823       '(message-use-followup-to
10824         (gnus-visible-headers .
10825  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10826 @end lisp
10827
10828 Also @pxref{Group Parameters}.
10829
10830 @end table
10831
10832
10833 @node Summary Group Information
10834 @subsection Summary Group Information
10835
10836 @table @kbd
10837
10838 @item H d
10839 @kindex H d (Summary)
10840 @findex gnus-summary-describe-group
10841 Give a brief description of the current group
10842 (@code{gnus-summary-describe-group}).  If given a prefix, force
10843 rereading the description from the server.
10844
10845 @item H h
10846 @kindex H h (Summary)
10847 @findex gnus-summary-describe-briefly
10848 Give an extremely brief description of the most important summary
10849 keystrokes (@code{gnus-summary-describe-briefly}).
10850
10851 @item H i
10852 @kindex H i (Summary)
10853 @findex gnus-info-find-node
10854 Go to the Gnus info node (@code{gnus-info-find-node}).
10855 @end table
10856
10857
10858 @node Searching for Articles
10859 @subsection Searching for Articles
10860
10861 @table @kbd
10862
10863 @item M-s
10864 @kindex M-s (Summary)
10865 @findex gnus-summary-search-article-forward
10866 Search through all subsequent (raw) articles for a regexp
10867 (@code{gnus-summary-search-article-forward}).
10868
10869 @item M-r
10870 @kindex M-r (Summary)
10871 @findex gnus-summary-search-article-backward
10872 Search through all previous (raw) articles for a regexp
10873 (@code{gnus-summary-search-article-backward}).
10874
10875 @item M-S
10876 @kindex M-S (Summary)
10877 @findex gnus-summary-repeat-search-article-forward
10878 Repeat the previous search forwards
10879 (@code{gnus-summary-repeat-search-article-forward}).
10880
10881 @item M-R
10882 @kindex M-R (Summary)
10883 @findex gnus-summary-repeat-search-article-backward
10884 Repeat the previous search backwards
10885 (@code{gnus-summary-repeat-search-article-backward}).
10886
10887 @item &
10888 @kindex & (Summary)
10889 @findex gnus-summary-execute-command
10890 This command will prompt you for a header, a regular expression to match
10891 on this field, and a command to be executed if the match is made
10892 (@code{gnus-summary-execute-command}).  If the header is an empty
10893 string, the match is done on the entire article.  If given a prefix,
10894 search backward instead.
10895
10896 For instance, @kbd{& RET some.*string RET #} will put the process mark on
10897 all articles that have heads or bodies that match @samp{some.*string}.
10898
10899 @item M-&
10900 @kindex M-& (Summary)
10901 @findex gnus-summary-universal-argument
10902 Perform any operation on all articles that have been marked with
10903 the process mark (@code{gnus-summary-universal-argument}).
10904 @end table
10905
10906 @node Summary Generation Commands
10907 @subsection Summary Generation Commands
10908
10909 @table @kbd
10910
10911 @item Y g
10912 @kindex Y g (Summary)
10913 @findex gnus-summary-prepare
10914 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10915
10916 @item Y c
10917 @kindex Y c (Summary)
10918 @findex gnus-summary-insert-cached-articles
10919 Pull all cached articles (for the current group) into the summary buffer
10920 (@code{gnus-summary-insert-cached-articles}).
10921
10922 @item Y d
10923 @kindex Y d (Summary)
10924 @findex gnus-summary-insert-dormant-articles
10925 Pull all dormant articles (for the current group) into the summary buffer
10926 (@code{gnus-summary-insert-dormant-articles}).
10927
10928 @item Y t
10929 @kindex Y t (Summary)
10930 @findex gnus-summary-insert-ticked-articles
10931 Pull all ticked articles (for the current group) into the summary buffer
10932 (@code{gnus-summary-insert-ticked-articles}).
10933
10934 @end table
10935
10936
10937 @node Really Various Summary Commands
10938 @subsection Really Various Summary Commands
10939
10940 @table @kbd
10941
10942 @item A D
10943 @itemx C-d
10944 @kindex C-d (Summary)
10945 @kindex A D (Summary)
10946 @findex gnus-summary-enter-digest-group
10947 If the current article is a collection of other articles (for instance,
10948 a digest), you might use this command to enter a group based on the that
10949 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10950 guess what article type is currently displayed unless you give a prefix
10951 to this command, which forces a ``digest'' interpretation.  Basically,
10952 whenever you see a message that is a collection of other messages of
10953 some format, you @kbd{C-d} and read these messages in a more convenient
10954 fashion.
10955
10956 @vindex gnus-auto-select-on-ephemeral-exit
10957 The variable @code{gnus-auto-select-on-ephemeral-exit} controls what
10958 article should be selected after exiting a digest group.  Valid values
10959 include:
10960
10961 @table @code
10962 @item next
10963 Select the next article.
10964
10965 @item next-unread
10966 Select the next unread article.
10967
10968 @item next-noselect
10969 Move the cursor to the next article.  This is the default.
10970
10971 @item next-unread-noselect
10972 Move the cursor to the next unread article.
10973 @end table
10974
10975 If it has any other value or there is no next (unread) article, the
10976 article selected before entering to the digest group will appear.
10977
10978 @item C-M-d
10979 @kindex C-M-d (Summary)
10980 @findex gnus-summary-read-document
10981 This command is very similar to the one above, but lets you gather
10982 several documents into one biiig group
10983 (@code{gnus-summary-read-document}).  It does this by opening several
10984 @code{nndoc} groups for each document, and then opening an
10985 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10986 command understands the process/prefix convention
10987 (@pxref{Process/Prefix}).
10988
10989 @item C-t
10990 @kindex C-t (Summary)
10991 @findex gnus-summary-toggle-truncation
10992 Toggle truncation of summary lines
10993 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10994 line centering function in the summary buffer, so it's not a good idea
10995 to have truncation switched off while reading articles.
10996
10997 @item =
10998 @kindex = (Summary)
10999 @findex gnus-summary-expand-window
11000 Expand the summary buffer window (@code{gnus-summary-expand-window}).
11001 If given a prefix, force an @code{article} window configuration.
11002
11003 @item C-M-e
11004 @kindex C-M-e (Summary)
11005 @findex gnus-summary-edit-parameters
11006 Edit the group parameters (@pxref{Group Parameters}) of the current
11007 group (@code{gnus-summary-edit-parameters}).
11008
11009 @item C-M-a
11010 @kindex C-M-a (Summary)
11011 @findex gnus-summary-customize-parameters
11012 Customize the group parameters (@pxref{Group Parameters}) of the current
11013 group (@code{gnus-summary-customize-parameters}).
11014
11015 @end table
11016
11017
11018 @node Exiting the Summary Buffer
11019 @section Exiting the Summary Buffer
11020 @cindex summary exit
11021 @cindex exiting groups
11022
11023 Exiting from the summary buffer will normally update all info on the
11024 group and return you to the group buffer.
11025
11026 @table @kbd
11027
11028 @item Z Z
11029 @itemx Z Q
11030 @itemx q
11031 @kindex Z Z (Summary)
11032 @kindex Z Q (Summary)
11033 @kindex q (Summary)
11034 @findex gnus-summary-exit
11035 @vindex gnus-summary-exit-hook
11036 @vindex gnus-summary-prepare-exit-hook
11037 @vindex gnus-group-no-more-groups-hook
11038 @c @icon{gnus-summary-exit}
11039 Exit the current group and update all information on the group
11040 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
11041 called before doing much of the exiting, which calls
11042 @code{gnus-summary-expire-articles} by default.
11043 @code{gnus-summary-exit-hook} is called after finishing the exit
11044 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
11045 group mode having no more (unread) groups.
11046
11047 @item Z E
11048 @itemx Q
11049 @kindex Z E (Summary)
11050 @kindex Q (Summary)
11051 @findex gnus-summary-exit-no-update
11052 Exit the current group without updating any information on the group
11053 (@code{gnus-summary-exit-no-update}).
11054
11055 @item Z c
11056 @itemx c
11057 @kindex Z c (Summary)
11058 @kindex c (Summary)
11059 @findex gnus-summary-catchup-and-exit
11060 @c @icon{gnus-summary-catchup-and-exit}
11061 Mark all unticked articles in the group as read and then exit
11062 (@code{gnus-summary-catchup-and-exit}).
11063
11064 @item Z C
11065 @kindex Z C (Summary)
11066 @findex gnus-summary-catchup-all-and-exit
11067 Mark all articles, even the ticked ones, as read and then exit
11068 (@code{gnus-summary-catchup-all-and-exit}).
11069
11070 @item Z n
11071 @kindex Z n (Summary)
11072 @findex gnus-summary-catchup-and-goto-next-group
11073 Mark all articles as read and go to the next group
11074 (@code{gnus-summary-catchup-and-goto-next-group}).
11075
11076 @item Z p
11077 @kindex Z p (Summary)
11078 @findex gnus-summary-catchup-and-goto-prev-group
11079 Mark all articles as read and go to the previous group
11080 (@code{gnus-summary-catchup-and-goto-prev-group}).
11081
11082 @item Z R
11083 @itemx C-x C-s
11084 @kindex Z R (Summary)
11085 @kindex C-x C-s (Summary)
11086 @findex gnus-summary-reselect-current-group
11087 Exit this group, and then enter it again
11088 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
11089 all articles, both read and unread.
11090
11091 @item Z G
11092 @itemx M-g
11093 @kindex Z G (Summary)
11094 @kindex M-g (Summary)
11095 @findex gnus-summary-rescan-group
11096 @c @icon{gnus-summary-mail-get}
11097 Exit the group, check for new articles in the group, and select the
11098 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
11099 articles, both read and unread.
11100
11101 @item Z N
11102 @kindex Z N (Summary)
11103 @findex gnus-summary-next-group
11104 Exit the group and go to the next group
11105 (@code{gnus-summary-next-group}).
11106
11107 @item Z P
11108 @kindex Z P (Summary)
11109 @findex gnus-summary-prev-group
11110 Exit the group and go to the previous group
11111 (@code{gnus-summary-prev-group}).
11112
11113 @item Z s
11114 @kindex Z s (Summary)
11115 @findex gnus-summary-save-newsrc
11116 Save the current number of read/marked articles in the dribble buffer
11117 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
11118 given a prefix, also save the @file{.newsrc} file(s).  Using this
11119 command will make exit without updating (the @kbd{Q} command) worthless.
11120 @end table
11121
11122 @vindex gnus-exit-group-hook
11123 @code{gnus-exit-group-hook} is called when you exit the current group
11124 with an ``updating'' exit.  For instance @kbd{Q}
11125 (@code{gnus-summary-exit-no-update}) does not call this hook.
11126
11127 @findex gnus-summary-wake-up-the-dead
11128 @findex gnus-dead-summary-mode
11129 @vindex gnus-kill-summary-on-exit
11130 If you're in the habit of exiting groups, and then changing your mind
11131 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
11132 If you do that, Gnus won't kill the summary buffer when you exit it.
11133 (Quelle surprise!)  Instead it will change the name of the buffer to
11134 something like @samp{*Dead Summary ... *} and install a minor mode
11135 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
11136 buffer, you'll find that all keys are mapped to a function called
11137 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
11138 summary buffer will result in a live, normal summary buffer.
11139
11140 There will never be more than one dead summary buffer at any one time.
11141
11142 @vindex gnus-use-cross-reference
11143 The data on the current group will be updated (which articles you have
11144 read, which articles you have replied to, etc.)@: when you exit the
11145 summary buffer.  If the @code{gnus-use-cross-reference} variable is
11146 @code{t} (which is the default), articles that are cross-referenced to
11147 this group and are marked as read, will also be marked as read in the
11148 other subscribed groups they were cross-posted to.  If this variable is
11149 neither @code{nil} nor @code{t}, the article will be marked as read in
11150 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
11151
11152
11153 @node Crosspost Handling
11154 @section Crosspost Handling
11155
11156 @cindex velveeta
11157 @cindex spamming
11158 Marking cross-posted articles as read ensures that you'll never have to
11159 read the same article more than once.  Unless, of course, somebody has
11160 posted it to several groups separately.  Posting the same article to
11161 several groups (not cross-posting) is called @dfn{spamming}, and you are
11162 by law required to send nasty-grams to anyone who perpetrates such a
11163 heinous crime.
11164
11165 Remember: Cross-posting is kinda ok, but posting the same article
11166 separately to several groups is not.  Massive cross-posting (aka.
11167 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
11168 @code{gnus-summary-mail-crosspost-complaint} command to complain about
11169 excessive crossposting (@pxref{Summary Mail Commands}).
11170
11171 @cindex cross-posting
11172 @cindex Xref
11173 @cindex @acronym{NOV}
11174 One thing that may cause Gnus to not do the cross-posting thing
11175 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
11176 (which is very nice, because it speeds things up considerably) which
11177 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
11178 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
11179 even with @sc{xover} by registering the @code{Xref} lines of all
11180 articles you actually read, but if you kill the articles, or just mark
11181 them as read without reading them, Gnus will not get a chance to snoop
11182 the @code{Xref} lines out of these articles, and will be unable to use
11183 the cross reference mechanism.
11184
11185 @cindex LIST overview.fmt
11186 @cindex overview.fmt
11187 To check whether your @acronym{NNTP} server includes the @code{Xref} header
11188 in its overview files, try @samp{telnet your.nntp.server nntp},
11189 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
11190 overview.fmt}.  This may not work, but if it does, and the last line you
11191 get does not read @samp{Xref:full}, then you should shout and whine at
11192 your news admin until she includes the @code{Xref} header in the
11193 overview files.
11194
11195 If you want Gnus to get the @code{Xref}s right all the time, you have to
11196 set @code{nntp-nov-is-evil} to @code{t}, which slows things down
11197 considerably.  Also @pxref{Slow/Expensive Connection}.
11198
11199 C'est la vie.
11200
11201 For an alternative approach, @pxref{Duplicate Suppression}.
11202
11203
11204 @node Duplicate Suppression
11205 @section Duplicate Suppression
11206
11207 By default, Gnus tries to make sure that you don't have to read the same
11208 article more than once by utilizing the crossposting mechanism
11209 (@pxref{Crosspost Handling}).  However, that simple and efficient
11210 approach may not work satisfactory for some users for various
11211 reasons.
11212
11213 @enumerate
11214 @item
11215 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
11216 is evil and not very common.
11217
11218 @item
11219 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
11220 @file{.overview} data bases.  This is evil and all too common, alas.
11221
11222 @item
11223 You may be reading the same group (or several related groups) from
11224 different @acronym{NNTP} servers.
11225
11226 @item
11227 You may be getting mail that duplicates articles posted to groups.
11228 @end enumerate
11229
11230 I'm sure there are other situations where @code{Xref} handling fails as
11231 well, but these four are the most common situations.
11232
11233 If, and only if, @code{Xref} handling fails for you, then you may
11234 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
11235 will remember the @code{Message-ID}s of all articles you have read or
11236 otherwise marked as read, and then, as if by magic, mark them as read
11237 all subsequent times you see them---in @emph{all} groups.  Using this
11238 mechanism is quite likely to be somewhat inefficient, but not overly
11239 so.  It's certainly preferable to reading the same articles more than
11240 once.
11241
11242 Duplicate suppression is not a very subtle instrument.  It's more like a
11243 sledge hammer than anything else.  It works in a very simple
11244 fashion---if you have marked an article as read, it adds this Message-ID
11245 to a cache.  The next time it sees this Message-ID, it will mark the
11246 article as read with the @samp{M} mark.  It doesn't care what group it
11247 saw the article in.
11248
11249 @table @code
11250 @item gnus-suppress-duplicates
11251 @vindex gnus-suppress-duplicates
11252 If non-@code{nil}, suppress duplicates.
11253
11254 @item gnus-save-duplicate-list
11255 @vindex gnus-save-duplicate-list
11256 If non-@code{nil}, save the list of duplicates to a file.  This will
11257 make startup and shutdown take longer, so the default is @code{nil}.
11258 However, this means that only duplicate articles read in a single Gnus
11259 session are suppressed.
11260
11261 @item gnus-duplicate-list-length
11262 @vindex gnus-duplicate-list-length
11263 This variable says how many @code{Message-ID}s to keep in the duplicate
11264 suppression list.  The default is 10000.
11265
11266 @item gnus-duplicate-file
11267 @vindex gnus-duplicate-file
11268 The name of the file to store the duplicate suppression list in.  The
11269 default is @file{~/News/suppression}.
11270 @end table
11271
11272 If you have a tendency to stop and start Gnus often, setting
11273 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
11274 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
11275 the other hand, saving the list makes startup and shutdown much slower,
11276 so that means that if you stop and start Gnus often, you should set
11277 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
11278 to you to figure out, I think.
11279
11280 @node Security
11281 @section Security
11282
11283 Gnus is able to verify signed messages or decrypt encrypted messages.
11284 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
11285 and @acronym{S/MIME}, however you need some external programs to get
11286 things to work:
11287
11288 @enumerate
11289 @item
11290 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
11291 install an OpenPGP implementation such as GnuPG@.  The Lisp interface
11292 to GnuPG included with Emacs is called EasyPG (@pxref{Top, ,EasyPG,
11293 epa, EasyPG Assistant user's manual}), but PGG (@pxref{Top, ,PGG, pgg,
11294 PGG Manual}), and Mailcrypt are also supported.
11295
11296 @item
11297 To handle @acronym{S/MIME} message, you need to install OpenSSL@.  OpenSSL 0.9.6
11298 or newer is recommended.
11299
11300 @end enumerate
11301
11302 The variables that control security functionality on reading/composing
11303 messages include:
11304
11305 @table @code
11306 @item mm-verify-option
11307 @vindex mm-verify-option
11308 Option of verifying signed parts.  @code{never}, not verify;
11309 @code{always}, always verify; @code{known}, only verify known
11310 protocols.  Otherwise, ask user.
11311
11312 @item mm-decrypt-option
11313 @vindex mm-decrypt-option
11314 Option of decrypting encrypted parts.  @code{never}, no decryption;
11315 @code{always}, always decrypt; @code{known}, only decrypt known
11316 protocols.  Otherwise, ask user.
11317
11318 @item mm-sign-option
11319 @vindex mm-sign-option
11320 Option of creating signed parts.  @code{nil}, use default signing
11321 keys; @code{guided}, ask user to select signing keys from the menu.
11322
11323 @item mm-encrypt-option
11324 @vindex mm-encrypt-option
11325 Option of creating encrypted parts.  @code{nil}, use the first
11326 public-key matching the @samp{From:} header as the recipient;
11327 @code{guided}, ask user to select recipient keys from the menu.
11328
11329 @item mml1991-use
11330 @vindex mml1991-use
11331 Symbol indicating elisp interface to OpenPGP implementation for
11332 @acronym{PGP} messages.  The default is @code{epg}, but @code{pgg},
11333 and @code{mailcrypt} are also supported although
11334 deprecated.  By default, Gnus uses the first available interface in
11335 this order.
11336
11337 @item mml2015-use
11338 @vindex mml2015-use
11339 Symbol indicating elisp interface to OpenPGP implementation for
11340 @acronym{PGP/MIME} messages.  The default is @code{epg}, but
11341 @code{pgg}, and @code{mailcrypt} are also supported
11342 although deprecated.  By default, Gnus uses the first available
11343 interface in this order.
11344
11345 @end table
11346
11347 By default the buttons that display security information are not
11348 shown, because they clutter reading the actual e-mail.  You can type
11349 @kbd{K b} manually to display the information.  Use the
11350 @code{gnus-buttonized-mime-types} and
11351 @code{gnus-unbuttonized-mime-types} variables to control this
11352 permanently.  @ref{MIME Commands} for further details, and hints on
11353 how to customize these variables to always display security
11354 information.
11355
11356 @cindex snarfing keys
11357 @cindex importing PGP keys
11358 @cindex PGP key ring import
11359 Snarfing OpenPGP keys (i.e., importing keys from articles into your
11360 key ring) is not supported explicitly through a menu item or command,
11361 rather Gnus do detect and label keys as @samp{application/pgp-keys},
11362 allowing you to specify whatever action you think is appropriate
11363 through the usual @acronym{MIME} infrastructure.  You can use a
11364 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
11365 Emacs MIME Manual}) such as the following to import keys using GNU
11366 Privacy Guard when you click on the @acronym{MIME} button
11367 (@pxref{Using MIME}).
11368
11369 @example
11370 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
11371 @end example
11372 @noindent
11373 This happens to also be the default action defined in
11374 @code{mailcap-mime-data}.
11375
11376 More information on how to set things for sending outgoing signed and
11377 encrypted messages up can be found in the message manual
11378 (@pxref{Security, ,Security, message, Message Manual}).
11379
11380 @node Mailing List
11381 @section Mailing List
11382 @cindex mailing list
11383 @cindex RFC 2396
11384
11385 @kindex A M (summary)
11386 @findex gnus-mailing-list-insinuate
11387 Gnus understands some mailing list fields of RFC 2369.  To enable it,
11388 add a @code{to-list} group parameter (@pxref{Group Parameters}),
11389 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
11390 summary buffer.
11391
11392 That enables the following commands to the summary buffer:
11393
11394 @table @kbd
11395
11396 @item C-c C-n h
11397 @kindex C-c C-n h (Summary)
11398 @findex gnus-mailing-list-help
11399 Send a message to fetch mailing list help, if List-Help field exists.
11400
11401 @item C-c C-n s
11402 @kindex C-c C-n s (Summary)
11403 @findex gnus-mailing-list-subscribe
11404 Send a message to subscribe the mailing list, if List-Subscribe field exists.
11405
11406 @item C-c C-n u
11407 @kindex C-c C-n u (Summary)
11408 @findex gnus-mailing-list-unsubscribe
11409 Send a message to unsubscribe the mailing list, if List-Unsubscribe
11410 field exists.
11411
11412 @item C-c C-n p
11413 @kindex C-c C-n p (Summary)
11414 @findex gnus-mailing-list-post
11415 Post to the mailing list, if List-Post field exists.
11416
11417 @item C-c C-n o
11418 @kindex C-c C-n o (Summary)
11419 @findex gnus-mailing-list-owner
11420 Send a message to the mailing list owner, if List-Owner field exists.
11421
11422 @item C-c C-n a
11423 @kindex C-c C-n a (Summary)
11424 @findex gnus-mailing-list-archive
11425 Browse the mailing list archive, if List-Archive field exists.
11426
11427 @end table
11428
11429
11430 @node Article Buffer
11431 @chapter Article Buffer
11432 @cindex article buffer
11433
11434 The articles are displayed in the article buffer, of which there is only
11435 one.  All the summary buffers share the same article buffer unless you
11436 tell Gnus otherwise.
11437
11438 @menu
11439 * Hiding Headers::              Deciding what headers should be displayed.
11440 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
11441 * HTML::                        Reading @acronym{HTML} messages.
11442 * Customizing Articles::        Tailoring the look of the articles.
11443 * Article Keymap::              Keystrokes available in the article buffer.
11444 * Misc Article::                Other stuff.
11445 @end menu
11446
11447
11448 @node Hiding Headers
11449 @section Hiding Headers
11450 @cindex hiding headers
11451 @cindex deleting headers
11452
11453 The top section of each article is the @dfn{head}.  (The rest is the
11454 @dfn{body}, but you may have guessed that already.)
11455
11456 @vindex gnus-show-all-headers
11457 There is a lot of useful information in the head: the name of the person
11458 who wrote the article, the date it was written and the subject of the
11459 article.  That's well and nice, but there's also lots of information
11460 most people do not want to see---what systems the article has passed
11461 through before reaching you, the @code{Message-ID}, the
11462 @code{References}, etc. ad nauseam---and you'll probably want to get rid
11463 of some of those lines.  If you want to keep all those lines in the
11464 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
11465
11466 Gnus provides you with two variables for sifting headers:
11467
11468 @table @code
11469
11470 @item gnus-visible-headers
11471 @vindex gnus-visible-headers
11472 If this variable is non-@code{nil}, it should be a regular expression
11473 that says what headers you wish to keep in the article buffer.  All
11474 headers that do not match this variable will be hidden.
11475
11476 For instance, if you only want to see the name of the person who wrote
11477 the article and the subject, you'd say:
11478
11479 @lisp
11480 (setq gnus-visible-headers "^From:\\|^Subject:")
11481 @end lisp
11482
11483 This variable can also be a list of regexps to match headers to
11484 remain visible.
11485
11486 @item gnus-ignored-headers
11487 @vindex gnus-ignored-headers
11488 This variable is the reverse of @code{gnus-visible-headers}.  If this
11489 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
11490 should be a regular expression that matches all lines that you want to
11491 hide.  All lines that do not match this variable will remain visible.
11492
11493 For instance, if you just want to get rid of the @code{References} line
11494 and the @code{Xref} line, you might say:
11495
11496 @lisp
11497 (setq gnus-ignored-headers "^References:\\|^Xref:")
11498 @end lisp
11499
11500 This variable can also be a list of regexps to match headers to
11501 be removed.
11502
11503 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
11504 variable will have no effect.
11505
11506 @end table
11507
11508 @vindex gnus-sorted-header-list
11509 Gnus can also sort the headers for you.  (It does this by default.)  You
11510 can control the sorting by setting the @code{gnus-sorted-header-list}
11511 variable.  It is a list of regular expressions that says in what order
11512 the headers are to be displayed.
11513
11514 For instance, if you want the name of the author of the article first,
11515 and then the subject, you might say something like:
11516
11517 @lisp
11518 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
11519 @end lisp
11520
11521 Any headers that are to remain visible, but are not listed in this
11522 variable, will be displayed in random order after all the headers listed in this variable.
11523
11524 @findex gnus-article-hide-boring-headers
11525 @vindex gnus-boring-article-headers
11526 You can hide further boring headers by setting
11527 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
11528 does depends on the @code{gnus-boring-article-headers} variable.  It's a
11529 list, but this list doesn't actually contain header names.  Instead it
11530 lists various @dfn{boring conditions} that Gnus can check and remove
11531 from sight.
11532
11533 These conditions are:
11534 @table @code
11535 @item empty
11536 Remove all empty headers.
11537 @item followup-to
11538 Remove the @code{Followup-To} header if it is identical to the
11539 @code{Newsgroups} header.
11540 @item reply-to
11541 Remove the @code{Reply-To} header if it lists the same addresses as
11542 the @code{From} header, or if the @code{broken-reply-to} group
11543 parameter is set.
11544 @item newsgroups
11545 Remove the @code{Newsgroups} header if it only contains the current group
11546 name.
11547 @item to-address
11548 Remove the @code{To} header if it only contains the address identical to
11549 the current group's @code{to-address} parameter.
11550 @item to-list
11551 Remove the @code{To} header if it only contains the address identical to
11552 the current group's @code{to-list} parameter.
11553 @item cc-list
11554 Remove the @code{Cc} header if it only contains the address identical to
11555 the current group's @code{to-list} parameter.
11556 @item date
11557 Remove the @code{Date} header if the article is less than three days
11558 old.
11559 @item long-to
11560 Remove the @code{To} and/or @code{Cc} header if it is very long.
11561 @item many-to
11562 Remove all @code{To} and/or @code{Cc} headers if there are more than one.
11563 @end table
11564
11565 To include these three elements, you could say something like:
11566
11567 @lisp
11568 (setq gnus-boring-article-headers
11569       '(empty followup-to reply-to))
11570 @end lisp
11571
11572 This is also the default value for this variable.
11573
11574
11575 @node Using MIME
11576 @section Using MIME
11577 @cindex @acronym{MIME}
11578
11579 Mime is a standard for waving your hands through the air, aimlessly,
11580 while people stand around yawning.
11581
11582 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
11583 while all newsreaders die of fear.
11584
11585 @acronym{MIME} may specify what character set the article uses, the encoding
11586 of the characters, and it also makes it possible to embed pictures and
11587 other naughty stuff in innocent-looking articles.
11588
11589 @vindex gnus-display-mime-function
11590 @findex gnus-display-mime
11591 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
11592 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
11593 default, which creates a bundle of clickable buttons that can be used to
11594 display, save and manipulate the @acronym{MIME} objects.
11595
11596 The following commands are available when you have placed point over a
11597 @acronym{MIME} button:
11598
11599 @table @kbd
11600 @findex gnus-article-press-button
11601 @item RET (Article)
11602 @kindex RET (Article)
11603 @itemx BUTTON-2 (Article)
11604 Toggle displaying of the @acronym{MIME} object
11605 (@code{gnus-article-press-button}).  If built-in viewers can not display
11606 the object, Gnus resorts to external viewers in the @file{mailcap}
11607 files.  If a viewer has the @samp{copiousoutput} specification, the
11608 object is displayed inline.
11609
11610 @findex gnus-mime-view-part
11611 @item M-RET (Article)
11612 @kindex M-RET (Article)
11613 @itemx v (Article)
11614 Prompt for a method, and then view the @acronym{MIME} object using this
11615 method (@code{gnus-mime-view-part}).
11616
11617 @findex gnus-mime-view-part-as-type
11618 @item t (Article)
11619 @kindex t (Article)
11620 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
11621 (@code{gnus-mime-view-part-as-type}).
11622
11623 @findex gnus-mime-view-part-as-charset
11624 @item C (Article)
11625 @kindex C (Article)
11626 Prompt for a charset, and then view the @acronym{MIME} object using this
11627 charset (@code{gnus-mime-view-part-as-charset}).
11628
11629 @findex gnus-mime-save-part
11630 @item o (Article)
11631 @kindex o (Article)
11632 Prompt for a file name, and then save the @acronym{MIME} object
11633 (@code{gnus-mime-save-part}).
11634
11635 @findex gnus-mime-save-part-and-strip
11636 @item C-o (Article)
11637 @kindex C-o (Article)
11638 Prompt for a file name, then save the @acronym{MIME} object and strip it from
11639 the article.  Then proceed to article editing, where a reasonable
11640 suggestion is being made on how the altered article should look
11641 like.  The stripped @acronym{MIME} object will be referred via the
11642 message/external-body @acronym{MIME} type.
11643 (@code{gnus-mime-save-part-and-strip}).
11644
11645 @findex gnus-mime-replace-part
11646 @item r (Article)
11647 @kindex r (Article)
11648 Prompt for a file name, replace the @acronym{MIME} object with an
11649 external body referring to the file via the message/external-body
11650 @acronym{MIME} type.  (@code{gnus-mime-replace-part}).
11651
11652 @findex gnus-mime-delete-part
11653 @item d (Article)
11654 @kindex d (Article)
11655 Delete the @acronym{MIME} object from the article and replace it with some
11656 information about the removed @acronym{MIME} object
11657 (@code{gnus-mime-delete-part}).
11658
11659 @c FIXME: gnus-auto-select-part should be documented here
11660
11661 @findex gnus-mime-copy-part
11662 @item c (Article)
11663 @kindex c (Article)
11664 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
11665 (@code{gnus-mime-copy-part}).  If given a prefix, copy the raw contents
11666 without decoding.  If given a numerical prefix, you can do semi-manual
11667 charset stuff (see @code{gnus-summary-show-article-charset-alist} in
11668 @ref{Paging the Article}).  Compressed files like @file{.gz} and
11669 @file{.bz2} are automatically decompressed if
11670 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
11671 Accessing Compressed Files, emacs, The Emacs Editor}).
11672
11673 @findex gnus-mime-print-part
11674 @item p (Article)
11675 @kindex p (Article)
11676 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
11677 command respects the @samp{print=} specifications in the
11678 @file{.mailcap} file.
11679
11680 @findex gnus-mime-inline-part
11681 @item i (Article)
11682 @kindex i (Article)
11683 Insert the contents of the @acronym{MIME} object into the buffer
11684 (@code{gnus-mime-inline-part}) as @samp{text/plain}.  If given a prefix, insert
11685 the raw contents without decoding.  If given a numerical prefix, you can
11686 do semi-manual charset stuff (see
11687 @code{gnus-summary-show-article-charset-alist} in @ref{Paging the
11688 Article}).  Compressed files like @file{.gz} and @file{.bz2} are
11689 automatically decompressed depending on @code{jka-compr} regardless of
11690 @code{auto-compression-mode} (@pxref{Compressed Files,, Accessing
11691 Compressed Files, emacs, The Emacs Editor}).
11692
11693 @findex gnus-mime-view-part-internally
11694 @item E (Article)
11695 @kindex E (Article)
11696 View the @acronym{MIME} object with an internal viewer.  If no internal
11697 viewer is available, use an external viewer
11698 (@code{gnus-mime-view-part-internally}).
11699
11700 @findex gnus-mime-view-part-externally
11701 @item e (Article)
11702 @kindex e (Article)
11703 View the @acronym{MIME} object with an external viewer.
11704 (@code{gnus-mime-view-part-externally}).
11705
11706 @findex gnus-mime-pipe-part
11707 @item | (Article)
11708 @kindex | (Article)
11709 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
11710
11711 @findex gnus-mime-action-on-part
11712 @item . (Article)
11713 @kindex . (Article)
11714 Interactively run an action on the @acronym{MIME} object
11715 (@code{gnus-mime-action-on-part}).
11716
11717 @end table
11718
11719 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
11720 determines which parts to do this with is described in the Emacs
11721 @acronym{MIME} manual.
11722
11723 It might be best to just use the toggling functions from the article
11724 buffer to avoid getting nasty surprises.  (For instance, you enter the
11725 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
11726 decoded the sound file in the article and some horrible sing-a-long song
11727 comes screaming out your speakers, and you can't find the volume button,
11728 because there isn't one, and people are starting to look at you, and you
11729 try to stop the program, but you can't, and you can't find the program
11730 to control the volume, and everybody else in the room suddenly decides
11731 to look at you disdainfully, and you'll feel rather stupid.)
11732
11733 Any similarity to real events and people is purely coincidental.  Ahem.
11734
11735 Also @pxref{MIME Commands}.
11736
11737
11738 @node HTML
11739 @section @acronym{HTML}
11740 @cindex @acronym{HTML}
11741
11742 If you have @code{w3m} installed on your system, Gnus can display
11743 @acronym{HTML} articles in the article buffer.  There are many Gnus
11744 add-ons for doing this, using various approaches, but there's one
11745 (sort of) built-in method that's used by default.
11746
11747 For a complete overview, consult @xref{Display Customization,
11748 ,Display Customization, emacs-mime, The Emacs MIME Manual}.  This
11749 section only describes the default method.
11750
11751 @table @code
11752 @item mm-text-html-renderer
11753 @vindex mm-text-html-renderer
11754 If set to @code{gnus-article-html}, Gnus will use the built-in method,
11755 that's based on @code{w3m}.
11756
11757 @item gnus-blocked-images
11758 @vindex gnus-blocked-images
11759 External images that have @acronym{URL}s that match this regexp won't
11760 be fetched and displayed.  For instance, do block all @acronym{URL}s
11761 that have the string ``ads'' in them, do the following:
11762
11763 @lisp
11764 (setq gnus-blocked-images "ads")
11765 @end lisp
11766
11767 This can also be a function to be evaluated.  If so, it will be
11768 called with the group name as the parameter.  The default value is
11769 @code{gnus-block-private-groups}, which will return @samp{"."} for
11770 anything that isn't a newsgroup.  This means that no external images
11771 will be fetched as a result of reading mail, so that nobody can use
11772 web bugs (and the like) to track whether you've read email.
11773
11774 Also @pxref{Misc Article} for @code{gnus-inhibit-images}.
11775
11776 @item gnus-html-cache-directory
11777 @vindex gnus-html-cache-directory
11778 Gnus will download and cache images according to how
11779 @code{gnus-blocked-images} is set.  These images will be stored in
11780 this directory.
11781
11782 @item gnus-html-cache-size
11783 @vindex gnus-html-cache-size
11784 When @code{gnus-html-cache-size} bytes have been used in that
11785 directory, the oldest files will be deleted.  The default is 500MB.
11786
11787 @item gnus-html-frame-width
11788 @vindex gnus-html-frame-width
11789 The width to use when rendering HTML@.  The default is 70.
11790
11791 @item gnus-max-image-proportion
11792 @vindex gnus-max-image-proportion
11793 How big pictures displayed are in relation to the window they're in.
11794 A value of 0.7 (the default) means that they are allowed to take up
11795 70% of the width and height of the window.  If they are larger than
11796 this, and Emacs supports it, then the images will be rescaled down to
11797 fit these criteria.
11798
11799 @end table
11800
11801 To use this, make sure that you have @code{w3m} and @code{curl}
11802 installed.  If you have, then Gnus should display @acronym{HTML}
11803 automatically.
11804
11805
11806
11807 @node Customizing Articles
11808 @section Customizing Articles
11809 @cindex article customization
11810
11811 A slew of functions for customizing how the articles are to look like
11812 exist.  You can call these functions interactively
11813 (@pxref{Article Washing}), or you can have them
11814 called automatically when you select the articles.
11815
11816 To have them called automatically, you should set the corresponding
11817 ``treatment'' variable.  For instance, to have headers hidden, you'd set
11818 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
11819 be set, but first we discuss the values these variables can have.
11820
11821 Note: Some values, while valid, make little sense.  Check the list below
11822 for sensible values.
11823
11824 @enumerate
11825 @item
11826 @code{nil}: Don't do this treatment.
11827
11828 @item
11829 @code{t}: Do this treatment on all body parts.
11830
11831 @item
11832 @code{head}: Do the treatment on the headers.
11833
11834 @item
11835 @code{first}: Do this treatment on the first body part.
11836
11837 @item
11838 @code{last}: Do this treatment on the last body part.
11839
11840 @item
11841 An integer: Do this treatment on all body parts that have a length less
11842 than this number.
11843
11844 @item
11845 A list of strings: Do this treatment on all body parts that are in
11846 articles that are read in groups that have names that match one of the
11847 regexps in the list.
11848
11849 @item
11850 A list where the first element is not a string:
11851
11852 The list is evaluated recursively.  The first element of the list is a
11853 predicate.  The following predicates are recognized: @code{or},
11854 @code{and}, @code{not} and @code{typep}.  Here's an example:
11855
11856 @lisp
11857 (or last
11858     (typep "text/x-vcard"))
11859 @end lisp
11860
11861 @end enumerate
11862
11863 You may have noticed that the word @dfn{part} is used here.  This refers
11864 to the fact that some messages are @acronym{MIME} multipart articles that may
11865 be divided into several parts.  Articles that are not multiparts are
11866 considered to contain just a single part.
11867
11868 @vindex gnus-article-treat-types
11869 Are the treatments applied to all sorts of multipart parts?  Yes, if you
11870 want to, but by default, only @samp{text/plain} parts are given the
11871 treatment.  This is controlled by the @code{gnus-article-treat-types}
11872 variable, which is a list of regular expressions that are matched to the
11873 type of the part.  This variable is ignored if the value of the
11874 controlling variable is a predicate list, as described above.
11875
11876 @ifinfo
11877 @c Avoid sort of redundant entries in the same section for the printed
11878 @c manual, but add them in info to allow `i gnus-treat-foo-bar RET' or
11879 @c `i foo-bar'.
11880 @vindex gnus-treat-buttonize
11881 @vindex gnus-treat-buttonize-head
11882 @vindex gnus-treat-capitalize-sentences
11883 @vindex gnus-treat-overstrike
11884 @vindex gnus-treat-strip-cr
11885 @vindex gnus-treat-strip-headers-in-body
11886 @vindex gnus-treat-strip-leading-blank-lines
11887 @vindex gnus-treat-strip-multiple-blank-lines
11888 @vindex gnus-treat-strip-pem
11889 @vindex gnus-treat-strip-trailing-blank-lines
11890 @vindex gnus-treat-unsplit-urls
11891 @vindex gnus-treat-wash-html
11892 @vindex gnus-treat-date
11893 @vindex gnus-treat-from-picon
11894 @vindex gnus-treat-mail-picon
11895 @vindex gnus-treat-newsgroups-picon
11896 @vindex gnus-treat-from-gravatar
11897 @vindex gnus-treat-mail-gravatar
11898 @vindex gnus-treat-display-smileys
11899 @vindex gnus-treat-body-boundary
11900 @vindex gnus-treat-display-x-face
11901 @vindex gnus-treat-display-face
11902 @vindex gnus-treat-emphasize
11903 @vindex gnus-treat-fill-article
11904 @vindex gnus-treat-fill-long-lines
11905 @vindex gnus-treat-hide-boring-headers
11906 @vindex gnus-treat-hide-citation
11907 @vindex gnus-treat-hide-citation-maybe
11908 @vindex gnus-treat-hide-headers
11909 @vindex gnus-treat-hide-signature
11910 @vindex gnus-treat-strip-banner
11911 @vindex gnus-treat-strip-list-identifiers
11912 @vindex gnus-treat-highlight-citation
11913 @vindex gnus-treat-highlight-headers
11914 @vindex gnus-treat-highlight-signature
11915 @vindex gnus-treat-play-sounds
11916 @vindex gnus-treat-x-pgp-sig
11917 @vindex gnus-treat-unfold-headers
11918 @vindex gnus-treat-fold-headers
11919 @vindex gnus-treat-fold-newsgroups
11920 @vindex gnus-treat-leading-whitespace
11921 @end ifinfo
11922
11923 The following treatment options are available.  The easiest way to
11924 customize this is to examine the @code{gnus-article-treat} customization
11925 group.  Values in parenthesis are suggested sensible values.  Others are
11926 possible but those listed are probably sufficient for most people.
11927
11928 @table @code
11929 @item gnus-treat-buttonize (t, integer)
11930 @item gnus-treat-buttonize-head (head)
11931
11932 @xref{Article Buttons}.
11933
11934 @item gnus-treat-capitalize-sentences (t, integer)
11935 @item gnus-treat-overstrike (t, integer)
11936 @item gnus-treat-strip-cr (t, integer)
11937 @item gnus-treat-strip-headers-in-body (t, integer)
11938 @item gnus-treat-strip-leading-blank-lines (t, first, integer)
11939 @item gnus-treat-strip-multiple-blank-lines (t, integer)
11940 @item gnus-treat-strip-pem (t, last, integer)
11941 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
11942 @item gnus-treat-unsplit-urls (t, integer)
11943 @item gnus-treat-wash-html (t, integer)
11944
11945 @xref{Article Washing}.
11946
11947 @item gnus-treat-date (head)
11948
11949 This will transform/add date headers according to the
11950 @code{gnus-article-date-headers} variable.  This is a list of Date
11951 headers to display.  The formats available are:
11952
11953 @table @code
11954 @item ut
11955 Universal time, aka GMT, aka ZULU.
11956
11957 @item local
11958 The user's local time zone.
11959
11960 @item english
11961 A semi-readable English sentence.
11962
11963 @item lapsed
11964 The time elapsed since the message was posted.
11965
11966 @item combined-lapsed
11967 Both the original date header and a (shortened) elapsed time.
11968
11969 @item original
11970 The original date header.
11971
11972 @item iso8601
11973 ISO8601 format, i.e., ``2010-11-23T22:05:21''.
11974
11975 @item user-defined
11976 A format done according to the @code{gnus-article-time-format}
11977 variable.
11978
11979 @end table
11980
11981 @xref{Article Date}.
11982
11983 @item gnus-treat-from-picon (head)
11984 @item gnus-treat-mail-picon (head)
11985 @item gnus-treat-newsgroups-picon (head)
11986
11987 @xref{Picons}.
11988
11989 @item gnus-treat-from-gravatar (head)
11990 @item gnus-treat-mail-gravatar (head)
11991
11992 @xref{Gravatars}.
11993
11994 @item gnus-treat-display-smileys (t, integer)
11995
11996 @item gnus-treat-body-boundary (head)
11997
11998 @vindex gnus-body-boundary-delimiter
11999 Adds a delimiter between header and body, the string used as delimiter
12000 is controlled by @code{gnus-body-boundary-delimiter}.
12001
12002 @xref{Smileys}.
12003
12004 @vindex gnus-treat-display-x-face
12005 @item gnus-treat-display-x-face (head)
12006
12007 @xref{X-Face}.
12008
12009 @vindex gnus-treat-display-face
12010 @item gnus-treat-display-face (head)
12011
12012 @xref{Face}.
12013
12014 @vindex gnus-treat-emphasize
12015 @item gnus-treat-emphasize (t, head, integer)
12016 @vindex gnus-treat-fill-article
12017 @item gnus-treat-fill-article (t, integer)
12018 @vindex gnus-treat-fill-long-lines
12019 @item gnus-treat-fill-long-lines (t, integer)
12020 @vindex gnus-treat-hide-boring-headers
12021 @item gnus-treat-hide-boring-headers (head)
12022 @vindex gnus-treat-hide-citation
12023 @item gnus-treat-hide-citation (t, integer)
12024 @vindex gnus-treat-hide-citation-maybe
12025 @item gnus-treat-hide-citation-maybe (t, integer)
12026 @vindex gnus-treat-hide-headers
12027 @item gnus-treat-hide-headers (head)
12028 @vindex gnus-treat-hide-signature
12029 @item gnus-treat-hide-signature (t, last)
12030 @vindex gnus-treat-strip-banner
12031 @item gnus-treat-strip-banner (t, last)
12032 @vindex gnus-treat-strip-list-identifiers
12033 @item gnus-treat-strip-list-identifiers (head)
12034
12035 @xref{Article Hiding}.
12036
12037 @vindex gnus-treat-highlight-citation
12038 @item gnus-treat-highlight-citation (t, integer)
12039 @vindex gnus-treat-highlight-headers
12040 @item gnus-treat-highlight-headers (head)
12041 @vindex gnus-treat-highlight-signature
12042 @item gnus-treat-highlight-signature (t, last, integer)
12043
12044 @xref{Article Highlighting}.
12045
12046 @vindex gnus-treat-play-sounds
12047 @item gnus-treat-play-sounds
12048 @item gnus-treat-ansi-sequences (t)
12049 @vindex gnus-treat-x-pgp-sig
12050 @item gnus-treat-x-pgp-sig (head)
12051
12052 @vindex gnus-treat-unfold-headers
12053 @item gnus-treat-unfold-headers (head)
12054 @vindex gnus-treat-fold-headers
12055 @item gnus-treat-fold-headers (head)
12056 @vindex gnus-treat-fold-newsgroups
12057 @item gnus-treat-fold-newsgroups (head)
12058 @vindex gnus-treat-leading-whitespace
12059 @item gnus-treat-leading-whitespace (head)
12060
12061 @xref{Article Header}.
12062
12063
12064 @end table
12065
12066 @vindex gnus-part-display-hook
12067 You can, of course, write your own functions to be called from
12068 @code{gnus-part-display-hook}.  The functions are called narrowed to the
12069 part, and you can do anything you like, pretty much.  There is no
12070 information that you have to keep in the buffer---you can change
12071 everything.
12072
12073
12074 @node Article Keymap
12075 @section Article Keymap
12076
12077 Most of the keystrokes in the summary buffer can also be used in the
12078 article buffer.  They should behave as if you typed them in the summary
12079 buffer, which means that you don't actually have to have a summary
12080 buffer displayed while reading.  You can do it all from the article
12081 buffer.
12082
12083 @kindex v (Article)
12084 @cindex keys, reserved for users (Article)
12085 The key @kbd{v} is reserved for users.  You can bind it to some
12086 command or better use it as a prefix key.
12087
12088 A few additional keystrokes are available:
12089
12090 @table @kbd
12091
12092 @item SPACE
12093 @kindex SPACE (Article)
12094 @findex gnus-article-next-page
12095 Scroll forwards one page (@code{gnus-article-next-page}).
12096 This is exactly the same as @kbd{h SPACE h}.
12097
12098 @item DEL
12099 @kindex DEL (Article)
12100 @findex gnus-article-prev-page
12101 Scroll backwards one page (@code{gnus-article-prev-page}).
12102 This is exactly the same as @kbd{h DEL h}.
12103
12104 @item C-c ^
12105 @kindex C-c ^ (Article)
12106 @findex gnus-article-refer-article
12107 If point is in the neighborhood of a @code{Message-ID} and you press
12108 @kbd{C-c ^}, Gnus will try to get that article from the server
12109 (@code{gnus-article-refer-article}).
12110
12111 @item C-c C-m
12112 @kindex C-c C-m (Article)
12113 @findex gnus-article-mail
12114 Send a reply to the address near point (@code{gnus-article-mail}).  If
12115 given a prefix, include the mail.
12116
12117 @item s
12118 @kindex s (Article)
12119 @findex gnus-article-show-summary
12120 Reconfigure the buffers so that the summary buffer becomes visible
12121 (@code{gnus-article-show-summary}).
12122
12123 @item ?
12124 @kindex ? (Article)
12125 @findex gnus-article-describe-briefly
12126 Give a very brief description of the available keystrokes
12127 (@code{gnus-article-describe-briefly}).
12128
12129 @item TAB
12130 @kindex TAB (Article)
12131 @findex gnus-article-next-button
12132 Go to the next button, if any (@code{gnus-article-next-button}).  This
12133 only makes sense if you have buttonizing turned on.
12134
12135 @item M-TAB
12136 @kindex M-TAB (Article)
12137 @findex gnus-article-prev-button
12138 Go to the previous button, if any (@code{gnus-article-prev-button}).
12139
12140 @item R
12141 @kindex R (Article)
12142 @findex gnus-article-reply-with-original
12143 Send a reply to the current article and yank the current article
12144 (@code{gnus-article-reply-with-original}).  If the region is active,
12145 only yank the text in the region.
12146
12147 @item S W
12148 @kindex S W (Article)
12149 @findex gnus-article-wide-reply-with-original
12150 Send a wide reply to the current article and yank the current article
12151 (@code{gnus-article-wide-reply-with-original}).  If the region is
12152 active, only yank the text in the region.
12153
12154 @item F
12155 @kindex F (Article)
12156 @findex gnus-article-followup-with-original
12157 Send a followup to the current article and yank the current article
12158 (@code{gnus-article-followup-with-original}).  If the region is active,
12159 only yank the text in the region.
12160
12161
12162 @end table
12163
12164
12165 @node Misc Article
12166 @section Misc Article
12167
12168 @table @code
12169
12170 @item gnus-single-article-buffer
12171 @vindex gnus-single-article-buffer
12172 @cindex article buffers, several
12173 If non-@code{nil}, use the same article buffer for all the groups.
12174 (This is the default.)  If @code{nil}, each group will have its own
12175 article buffer.
12176
12177 @item gnus-widen-article-window
12178 @cindex gnus-widen-article-window
12179 If non-@code{nil}, selecting the article buffer with the @kbd{h}
12180 command will ``widen'' the article window to take the entire frame.
12181
12182 @vindex gnus-article-decode-hook
12183 @item gnus-article-decode-hook
12184 @cindex @acronym{MIME}
12185 Hook used to decode @acronym{MIME} articles.  The default value is
12186 @code{(article-decode-charset article-decode-encoded-words)}
12187
12188 @vindex gnus-article-prepare-hook
12189 @item gnus-article-prepare-hook
12190 This hook is called right after the article has been inserted into the
12191 article buffer.  It is mainly intended for functions that do something
12192 depending on the contents; it should probably not be used for changing
12193 the contents of the article buffer.
12194
12195 @item gnus-article-mode-hook
12196 @vindex gnus-article-mode-hook
12197 Hook called in article mode buffers.
12198
12199 @item gnus-article-mode-syntax-table
12200 @vindex gnus-article-mode-syntax-table
12201 Syntax table used in article buffers.  It is initialized from
12202 @code{text-mode-syntax-table}.
12203
12204 @vindex gnus-article-over-scroll
12205 @item gnus-article-over-scroll
12206 If non-@code{nil}, allow scrolling the article buffer even when there
12207 no more new text to scroll in.  The default is @code{nil}.
12208
12209 @vindex gnus-article-mode-line-format
12210 @item gnus-article-mode-line-format
12211 This variable is a format string along the same lines as
12212 @code{gnus-summary-mode-line-format} (@pxref{Summary Buffer Mode
12213 Line}).  It accepts the same format specifications as that variable,
12214 with two extensions:
12215
12216 @table @samp
12217
12218 @item w
12219 The @dfn{wash status} of the article.  This is a short string with one
12220 character for each possible article wash operation that may have been
12221 performed.  The characters and their meaning:
12222
12223 @table @samp
12224
12225 @item c
12226 Displayed when cited text may be hidden in the article buffer.
12227
12228 @item h
12229 Displayed when headers are hidden in the article buffer.
12230
12231 @item p
12232 Displayed when article is digitally signed or encrypted, and Gnus has
12233 hidden the security headers.  (N.B. does not tell anything about
12234 security status, i.e., good or bad signature.)
12235
12236 @item s
12237 Displayed when the signature has been hidden in the Article buffer.
12238
12239 @item o
12240 Displayed when Gnus has treated overstrike characters in the article buffer.
12241
12242 @item e
12243 Displayed when Gnus has treated emphasized strings in the article buffer.
12244
12245 @end table
12246
12247 @item m
12248 The number of @acronym{MIME} parts in the article.
12249
12250 @end table
12251
12252 @vindex gnus-break-pages
12253
12254 @item gnus-break-pages
12255 Controls whether @dfn{page breaking} is to take place.  If this variable
12256 is non-@code{nil}, the articles will be divided into pages whenever a
12257 page delimiter appears in the article.  If this variable is @code{nil},
12258 paging will not be done.
12259
12260 @item gnus-page-delimiter
12261 @vindex gnus-page-delimiter
12262 This is the delimiter mentioned above.  By default, it is @samp{^L}
12263 (formfeed).
12264
12265 @cindex IDNA
12266 @cindex internationalized domain names
12267 @vindex gnus-use-idna
12268 @item gnus-use-idna
12269 This variable controls whether Gnus performs IDNA decoding of
12270 internationalized domain names inside @samp{From}, @samp{To} and
12271 @samp{Cc} headers.  @xref{IDNA, ,IDNA,message, The Message Manual},
12272 for how to compose such messages.  This requires
12273 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
12274 variable is only enabled if you have installed it.
12275
12276 @vindex gnus-inhibit-images
12277 @item gnus-inhibit-images
12278 If this is non-@code{nil}, inhibit displaying of images inline in the
12279 article body.  It is effective to images that are in articles as
12280 @acronym{MIME} parts, and images in @acronym{HTML} articles rendered
12281 when @code{mm-text-html-renderer} (@pxref{Display Customization,
12282 ,Display Customization, emacs-mime, The Emacs MIME Manual}) is
12283 @code{shr} or @code{gnus-w3m}.
12284
12285 @end table
12286
12287
12288 @node Composing Messages
12289 @chapter Composing Messages
12290 @cindex composing messages
12291 @cindex messages
12292 @cindex mail
12293 @cindex sending mail
12294 @cindex reply
12295 @cindex followup
12296 @cindex post
12297 @cindex using gpg
12298 @cindex using s/mime
12299 @cindex using smime
12300
12301 @kindex C-c C-c (Post)
12302 All commands for posting and mailing will put you in a message buffer
12303 where you can edit the article all you like, before you send the
12304 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
12305 Message Manual}.  Where the message will be posted/mailed to depends
12306 on your setup (@pxref{Posting Server}).
12307
12308 @menu
12309 * Mail::                        Mailing and replying.
12310 * Posting Server::              What server should you post and mail via?
12311 * POP before SMTP::             You cannot send a mail unless you read a mail.
12312 * Mail and Post::               Mailing and posting at the same time.
12313 * Archived Messages::           Where Gnus stores the messages you've sent.
12314 * Posting Styles::              An easier way to specify who you are.
12315 * Drafts::                      Postponing messages and rejected messages.
12316 * Rejected Articles::           What happens if the server doesn't like your article?
12317 * Signing and encrypting::      How to compose secure messages.
12318 @end menu
12319
12320 Also @pxref{Canceling and Superseding} for information on how to
12321 remove articles you shouldn't have posted.
12322
12323
12324 @node Mail
12325 @section Mail
12326
12327 Variables for customizing outgoing mail:
12328
12329 @table @code
12330 @item gnus-uu-digest-headers
12331 @vindex gnus-uu-digest-headers
12332 List of regexps to match headers included in digested messages.  The
12333 headers will be included in the sequence they are matched.  If
12334 @code{nil} include all headers.
12335
12336 @item gnus-add-to-list
12337 @vindex gnus-add-to-list
12338 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
12339 that have none when you do a @kbd{a}.
12340
12341 @item gnus-confirm-mail-reply-to-news
12342 @vindex gnus-confirm-mail-reply-to-news
12343 If non-@code{nil}, Gnus will ask you for a confirmation when you are
12344 about to reply to news articles by mail.  If it is @code{nil}, nothing
12345 interferes in what you want to do.  This can also be a function
12346 receiving the group name as the only parameter which should return
12347 non-@code{nil} if a confirmation is needed, or a regular expression
12348 matching group names, where confirmation should be asked for.
12349
12350 If you find yourself never wanting to reply to mail, but occasionally
12351 press @kbd{R} anyway, this variable might be for you.
12352
12353 @item gnus-confirm-treat-mail-like-news
12354 @vindex gnus-confirm-treat-mail-like-news
12355 If non-@code{nil}, Gnus also requests confirmation according to
12356 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
12357 useful for treating mailing lists like newsgroups.
12358
12359 @end table
12360
12361
12362 @node Posting Server
12363 @section Posting Server
12364
12365 When you press those magical @kbd{C-c C-c} keys to ship off your latest
12366 (extremely intelligent, of course) article, where does it go?
12367
12368 Thank you for asking.  I hate you.
12369
12370 It can be quite complicated.
12371
12372 @vindex gnus-post-method
12373 When posting news, Message usually invokes @code{message-send-news}
12374 (@pxref{News Variables, , News Variables, message, Message Manual}).
12375 Normally, Gnus will post using the same select method as you're
12376 reading from (which might be convenient if you're reading lots of
12377 groups from different private servers).  However.  If the server
12378 you're reading from doesn't allow posting, just reading, you probably
12379 want to use some other server to post your (extremely intelligent and
12380 fabulously interesting) articles.  You can then set the
12381 @code{gnus-post-method} to some other method:
12382
12383 @lisp
12384 (setq gnus-post-method '(nnspool ""))
12385 @end lisp
12386
12387 Now, if you've done this, and then this server rejects your article, or
12388 this server is down, what do you do then?  To override this variable you
12389 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
12390 the ``current'' server, to get back the default behavior, for posting.
12391
12392 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
12393 Gnus will prompt you for what method to use for posting.
12394
12395 You can also set @code{gnus-post-method} to a list of select methods.
12396 If that's the case, Gnus will always prompt you for what method to use
12397 for posting.
12398
12399 Finally, if you want to always post using the native select method,
12400 you can set this variable to @code{native}.
12401
12402 @vindex message-send-mail-function
12403 When sending mail, Message invokes the function specified by the
12404 variable @code{message-send-mail-function}.  Gnus tries to set it to a
12405 value suitable for your system.
12406 @xref{Mail Variables, ,Mail Variables,message,Message manual}, for more
12407 information.
12408
12409
12410 @node POP before SMTP
12411 @section POP before SMTP
12412 @cindex pop before smtp
12413 @findex mail-source-touch-pop
12414
12415 Does your @acronym{ISP} use @acronym{POP}-before-@acronym{SMTP}
12416 authentication?  This authentication method simply requires you to
12417 contact the @acronym{POP} server before sending email.  To do that,
12418 put the following lines in your @file{~/.gnus.el} file:
12419
12420 @lisp
12421 (add-hook 'message-send-mail-hook 'mail-source-touch-pop)
12422 @end lisp
12423
12424 @noindent
12425 The @code{mail-source-touch-pop} function does @acronym{POP}
12426 authentication according to the value of @code{mail-sources} without
12427 fetching mails, just before sending a mail.  @xref{Mail Sources}.
12428
12429 If you have two or more @acronym{POP} mail servers set in
12430 @code{mail-sources}, you may want to specify one of them to
12431 @code{mail-source-primary-source} as the @acronym{POP} mail server to be
12432 used for the @acronym{POP}-before-@acronym{SMTP} authentication.  If it
12433 is your primary @acronym{POP} mail server (i.e., you are fetching mails
12434 mainly from that server), you can set it permanently as follows:
12435
12436 @lisp
12437 (setq mail-source-primary-source
12438       '(pop :server "pop3.mail.server"
12439             :password "secret"))
12440 @end lisp
12441
12442 @noindent
12443 Otherwise, bind it dynamically only when performing the
12444 @acronym{POP}-before-@acronym{SMTP} authentication as follows:
12445
12446 @lisp
12447 (add-hook 'message-send-mail-hook
12448           (lambda ()
12449             (let ((mail-source-primary-source
12450                    '(pop :server "pop3.mail.server"
12451                          :password "secret")))
12452               (mail-source-touch-pop))))
12453 @end lisp
12454
12455
12456 @node Mail and Post
12457 @section Mail and Post
12458
12459 Here's a list of variables relevant to both mailing and
12460 posting:
12461
12462 @table @code
12463 @item gnus-mailing-list-groups
12464 @findex gnus-mailing-list-groups
12465 @cindex mailing lists
12466
12467 If your news server offers groups that are really mailing lists
12468 gatewayed to the @acronym{NNTP} server, you can read those groups without
12469 problems, but you can't post/followup to them without some difficulty.
12470 One solution is to add a @code{to-address} to the group parameters
12471 (@pxref{Group Parameters}).  An easier thing to do is set the
12472 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
12473 really are mailing lists.  Then, at least, followups to the mailing
12474 lists will work most of the time.  Posting to these groups (@kbd{a}) is
12475 still a pain, though.
12476
12477 @item gnus-user-agent
12478 @vindex gnus-user-agent
12479 @cindex User-Agent
12480
12481 This variable controls which information should be exposed in the
12482 User-Agent header.  It can be a list of symbols or a string.  Valid
12483 symbols are @code{gnus} (show Gnus version) and @code{emacs} (show Emacs
12484 version).  In addition to the Emacs version, you can add @code{codename}
12485 (show (S)XEmacs codename) or either @code{config} (show system
12486 configuration) or @code{type} (show system type).  If you set it to a
12487 string, be sure to use a valid format, see RFC 2616.
12488
12489 @end table
12490
12491 You may want to do spell-checking on messages that you send out.  Or, if
12492 you don't want to spell-check by hand, you could add automatic
12493 spell-checking via the @code{ispell} package:
12494
12495 @cindex ispell
12496 @findex ispell-message
12497 @lisp
12498 (add-hook 'message-send-hook 'ispell-message)
12499 @end lisp
12500
12501 If you want to change the @code{ispell} dictionary based on what group
12502 you're in, you could say something like the following:
12503
12504 @lisp
12505 (add-hook 'gnus-select-group-hook
12506           (lambda ()
12507             (cond
12508              ((string-match
12509                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
12510               (ispell-change-dictionary "deutsch"))
12511              (t
12512               (ispell-change-dictionary "english")))))
12513 @end lisp
12514
12515 Modify to suit your needs.
12516
12517 @vindex gnus-message-highlight-citation
12518 If @code{gnus-message-highlight-citation} is t, different levels of
12519 citations are highlighted like in Gnus article buffers also in message
12520 mode buffers.
12521
12522 @node Archived Messages
12523 @section Archived Messages
12524 @cindex archived messages
12525 @cindex sent messages
12526
12527 Gnus provides a few different methods for storing the mail and news you
12528 send.  The default method is to use the @dfn{archive virtual server} to
12529 store the messages.  If you want to disable this completely, the
12530 @code{gnus-message-archive-group} variable should be @code{nil}.  The
12531 default is "sent.%Y-%m", which gives you one archive group per month.
12532
12533 For archiving interesting messages in a group you read, see the
12534 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
12535 Group Commands}).
12536
12537 @vindex gnus-message-archive-method
12538 @code{gnus-message-archive-method} says what virtual server Gnus is to
12539 use to store sent messages.  The default is @code{"archive"}, and when
12540 actually being used it is expanded into:
12541
12542 @lisp
12543 (nnfolder "archive"
12544           (nnfolder-directory   "~/Mail/archive")
12545           (nnfolder-active-file "~/Mail/archive/active")
12546           (nnfolder-get-new-mail nil)
12547           (nnfolder-inhibit-expiry t))
12548 @end lisp
12549
12550 @quotation
12551 @vindex gnus-update-message-archive-method
12552 Note: a server like this is saved in the @file{~/.newsrc.eld} file first
12553 so that it may be used as a real method of the server which is named
12554 @code{"archive"} (that is, for the case where
12555 @code{gnus-message-archive-method} is set to @code{"archive"}) ever
12556 since.  If it once has been saved, it will never be updated by default
12557 even if you change the value of @code{gnus-message-archive-method}
12558 afterward.  Therefore, the server @code{"archive"} doesn't necessarily
12559 mean the @code{nnfolder} server like this at all times.  If you want the
12560 saved method to reflect always the value of
12561 @code{gnus-message-archive-method}, set the
12562 @code{gnus-update-message-archive-method} variable to a non-@code{nil}
12563 value.  The default value of this variable is @code{nil}.
12564 @end quotation
12565
12566 You can, however, use any mail select method (@code{nnml},
12567 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
12568 for doing this sort of thing, though.  If you don't like the default
12569 directory chosen, you could say something like:
12570
12571 @lisp
12572 (setq gnus-message-archive-method
12573       '(nnfolder "archive"
12574                  (nnfolder-inhibit-expiry t)
12575                  (nnfolder-active-file "~/News/sent-mail/active")
12576                  (nnfolder-directory "~/News/sent-mail/")))
12577 @end lisp
12578
12579 @vindex gnus-message-archive-group
12580 @cindex Gcc
12581 Gnus will insert @code{Gcc} headers in all outgoing messages that point
12582 to one or more group(s) on that server.  Which group to use is
12583 determined by the @code{gnus-message-archive-group} variable.
12584
12585 This variable can be used to do the following:
12586
12587 @table @asis
12588 @item a string
12589 Messages will be saved in that group.
12590
12591 Note that you can include a select method in the group name, then the
12592 message will not be stored in the select method given by
12593 @code{gnus-message-archive-method}, but in the select method specified
12594 by the group name, instead.  Suppose @code{gnus-message-archive-method}
12595 has the default value shown above.  Then setting
12596 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
12597 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
12598 value @code{"nnml:foo"}, then outgoing messages will be stored in
12599 @samp{nnml:foo}.
12600
12601 @item a list of strings
12602 Messages will be saved in all those groups.
12603
12604 @item an alist of regexps, functions and forms
12605 When a key ``matches'', the result is used.
12606
12607 @item @code{nil}
12608 No message archiving will take place.
12609 @end table
12610
12611 Let's illustrate:
12612
12613 Just saving to a single group called @samp{MisK}:
12614 @lisp
12615 (setq gnus-message-archive-group "MisK")
12616 @end lisp
12617
12618 Saving to two groups, @samp{MisK} and @samp{safe}:
12619 @lisp
12620 (setq gnus-message-archive-group '("MisK" "safe"))
12621 @end lisp
12622
12623 Save to different groups based on what group you are in:
12624 @lisp
12625 (setq gnus-message-archive-group
12626       '(("^alt" "sent-to-alt")
12627         ("mail" "sent-to-mail")
12628         (".*" "sent-to-misc")))
12629 @end lisp
12630
12631 More complex stuff:
12632 @lisp
12633 (setq gnus-message-archive-group
12634       '((if (message-news-p)
12635             "misc-news"
12636           "misc-mail")))
12637 @end lisp
12638
12639 How about storing all news messages in one file, but storing all mail
12640 messages in one file per month:
12641
12642 @lisp
12643 (setq gnus-message-archive-group
12644       '((if (message-news-p)
12645             "misc-news"
12646           (concat "mail." (format-time-string "%Y-%m")))))
12647 @end lisp
12648
12649 Now, when you send a message off, it will be stored in the appropriate
12650 group.  (If you want to disable storing for just one particular message,
12651 you can just remove the @code{Gcc} header that has been inserted.)  The
12652 archive group will appear in the group buffer the next time you start
12653 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
12654 enter it and read the articles in it just like you'd read any other
12655 group.  If the group gets really big and annoying, you can simply rename
12656 if (using @kbd{G r} in the group buffer) to something
12657 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
12658 continue to be stored in the old (now empty) group.
12659
12660 @table @code
12661 @item gnus-gcc-mark-as-read
12662 @vindex gnus-gcc-mark-as-read
12663 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
12664
12665 @item gnus-gcc-externalize-attachments
12666 @vindex gnus-gcc-externalize-attachments
12667 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
12668 and matches the Gcc group name, attach files as external parts; if it is
12669 @code{all}, attach local files as external parts; if it is other
12670 non-@code{nil}, the behavior is the same as @code{all}, but it may be
12671 changed in the future.
12672
12673 @item gnus-gcc-self-resent-messages
12674 @vindex gnus-gcc-self-resent-messages
12675 Like the @code{gcc-self} group parameter, applied only for unmodified
12676 messages that @code{gnus-summary-resend-message} (@pxref{Summary Mail
12677 Commands}) resends.  Non-@code{nil} value of this variable takes
12678 precedence over any existing @code{Gcc} header.
12679
12680 If this is @code{none}, no @code{Gcc} copy will be made.  If this is
12681 @code{t}, messages resent will be @code{Gcc} copied to the current
12682 group.  If this is a string, it specifies a group to which resent
12683 messages will be @code{Gcc} copied.  If this is @code{nil}, @code{Gcc}
12684 will be done according to existing @code{Gcc} header(s), if any.  If
12685 this is @code{no-gcc-self}, that is the default, resent messages will be
12686 @code{Gcc} copied to groups that existing @code{Gcc} header specifies,
12687 except for the current group.
12688
12689 @item gnus-gcc-pre-body-encode-hook
12690 @vindex gnus-gcc-pre-body-encode-hook
12691 @itemx gnus-gcc-post-body-encode-hook
12692 @vindex gnus-gcc-post-body-encode-hook
12693
12694 These hooks are run before/after encoding the message body of the Gcc
12695 copy of a sent message.  The current buffer (when the hook is run)
12696 contains the message including the message header.  Changes made to
12697 the message will only affect the Gcc copy, but not the original
12698 message.  You can use these hooks to edit the copy (and influence
12699 subsequent transformations), e.g., remove MML secure tags
12700 (@pxref{Signing and encrypting}).
12701
12702 @end table
12703
12704
12705 @node Posting Styles
12706 @section Posting Styles
12707 @cindex posting styles
12708 @cindex styles
12709
12710 All them variables, they make my head swim.
12711
12712 So what if you want a different @code{Organization} and signature based
12713 on what groups you post to?  And you post both from your home machine
12714 and your work machine, and you want different @code{From} lines, and so
12715 on?
12716
12717 @vindex gnus-posting-styles
12718 One way to do stuff like that is to write clever hooks that change the
12719 variables you need to have changed.  That's a bit boring, so somebody
12720 came up with the bright idea of letting the user specify these things in
12721 a handy alist.  Here's an example of a @code{gnus-posting-styles}
12722 variable:
12723
12724 @lisp
12725 ((".*"
12726   (signature "Peace and happiness")
12727   (organization "What me?"))
12728  ("^comp"
12729   (signature "Death to everybody"))
12730  ("comp.emacs.i-love-it"
12731   (organization "Emacs is it")))
12732 @end lisp
12733
12734 As you might surmise from this example, this alist consists of several
12735 @dfn{styles}.  Each style will be applicable if the first element
12736 ``matches'', in some form or other.  The entire alist will be iterated
12737 over, from the beginning towards the end, and each match will be
12738 applied, which means that attributes in later styles that match override
12739 the same attributes in earlier matching styles.  So
12740 @samp{comp.programming.literate} will have the @samp{Death to everybody}
12741 signature and the @samp{What me?} @code{Organization} header.
12742
12743 The first element in each style is called the @code{match}.  If it's a
12744 string, then Gnus will try to regexp match it against the group name.
12745 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
12746 will look in the original article for a header whose name is
12747 @var{match} and compare that @var{regexp}.  @var{match} and
12748 @var{regexp} are strings.  (The original article is the one you are
12749 replying or following up to.  If you are not composing a reply or a
12750 followup, then there is nothing to match against.)  If the
12751 @code{match} is a function symbol, that function will be called with
12752 no arguments.  If it's a variable symbol, then the variable will be
12753 referenced.  If it's a list, then that list will be @code{eval}ed.  In
12754 any case, if this returns a non-@code{nil} value, then the style is
12755 said to @dfn{match}.
12756
12757 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
12758 attribute consists of a @code{(@var{name} @var{value})} pair.  In
12759 addition, you can also use the @code{(@var{name} :file @var{value})}
12760 form or the @code{(@var{name} :value @var{value})} form.  Where
12761 @code{:file} signifies @var{value} represents a file name and its
12762 contents should be used as the attribute value, @code{:value} signifies
12763 @var{value} does not represent a file name explicitly.  The attribute
12764 name can be one of:
12765
12766 @itemize @bullet
12767 @item @code{signature}
12768 @item @code{signature-file}
12769 @item @code{x-face-file}
12770 @item @code{address}, overriding @code{user-mail-address}
12771 @item @code{name}, overriding @code{(user-full-name)}
12772 @item @code{body}
12773 @end itemize
12774
12775 Note that the @code{signature-file} attribute honors the variable
12776 @code{message-signature-directory}.
12777
12778 The attribute name can also be a string or a symbol.  In that case,
12779 this will be used as a header name, and the value will be inserted in
12780 the headers of the article; if the value is @code{nil}, the header
12781 name will be removed.  If the attribute name is @code{eval}, the form
12782 is evaluated, and the result is thrown away.
12783
12784 The attribute value can be a string, a function with zero arguments
12785 (the return value will be used), a variable (its value will be used)
12786 or a list (it will be @code{eval}ed and the return value will be
12787 used).  The functions and sexps are called/@code{eval}ed in the
12788 message buffer that is being set up.  The headers of the current
12789 article are available through the @code{message-reply-headers}
12790 variable, which is a vector of the following headers: number subject
12791 from date id references chars lines xref extra.
12792
12793 In the case of a string value, if the @code{match} is a regular
12794 expression, a @samp{gnus-match-substitute-replacement} is proceed on
12795 the value to replace the positional parameters @samp{\@var{n}} by the
12796 corresponding parenthetical matches (see @xref{Replacing Match,,
12797 Replacing the Text that Matched, elisp, The Emacs Lisp Reference Manual}.)
12798
12799 @vindex message-reply-headers
12800
12801 If you wish to check whether the message you are about to compose is
12802 meant to be a news article or a mail message, you can check the values
12803 of the @code{message-news-p} and @code{message-mail-p} functions.
12804
12805 @findex message-mail-p
12806 @findex message-news-p
12807
12808 So here's a new example:
12809
12810 @lisp
12811 (setq gnus-posting-styles
12812       '((".*"
12813          (signature-file "~/.signature")
12814          (name "User Name")
12815          (x-face-file "~/.xface")
12816          (x-url (getenv "WWW_HOME"))
12817          (organization "People's Front Against MWM"))
12818         ("^rec.humor"
12819          (signature my-funny-signature-randomizer))
12820         ((equal (system-name) "gnarly")  ;; @r{A form}
12821          (signature my-quote-randomizer))
12822         (message-news-p        ;; @r{A function symbol}
12823          (signature my-news-signature))
12824         (window-system         ;; @r{A value symbol}
12825          ("X-Window-System" (format "%s" window-system)))
12826         ;; @r{If I'm replying to Larsi, set the Organization header.}
12827         ((header "from" "larsi.*org")
12828          (Organization "Somewhere, Inc."))
12829         ((posting-from-work-p) ;; @r{A user defined function}
12830          (signature-file "~/.work-signature")
12831          (address "user@@bar.foo")
12832          (body "You are fired.\n\nSincerely, your boss.")
12833          ("X-Message-SMTP-Method" "smtp smtp.example.org 587")
12834          (organization "Important Work, Inc"))
12835         ("nnml:.*"
12836          (From (with-current-buffer gnus-article-buffer
12837                  (message-fetch-field "to"))))
12838         ("^nn.+:"
12839          (signature-file "~/.mail-signature"))))
12840 @end lisp
12841
12842 The @samp{nnml:.*} rule means that you use the @code{To} address as the
12843 @code{From} address in all your outgoing replies, which might be handy
12844 if you fill many roles.
12845 You may also use @code{message-alternative-emails} instead.
12846 @xref{Message Headers, ,Message Headers, message, Message Manual}.
12847
12848 Of particular interest in the ``work-mail'' style is the
12849 @samp{X-Message-SMTP-Method} header.  It specifies how to send the
12850 outgoing email.  You may want to sent certain emails through certain
12851 @acronym{SMTP} servers due to company policies, for instance.
12852 @xref{Mail Variables, ,Message Variables, message, Message Manual}.
12853
12854
12855 @node Drafts
12856 @section Drafts
12857 @cindex drafts
12858
12859 If you are writing a message (mail or news) and suddenly remember that
12860 you have a steak in the oven (or some pesto in the food processor, you
12861 craaazy vegetarians), you'll probably wish there was a method to save
12862 the message you are writing so that you can continue editing it some
12863 other day, and send it when you feel its finished.
12864
12865 Well, don't worry about it.  Whenever you start composing a message of
12866 some sort using the Gnus mail and post commands, the buffer you get will
12867 automatically associate to an article in a special @dfn{draft} group.
12868 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
12869 article will be saved there.  (Auto-save files also go to the draft
12870 group.)
12871
12872 @cindex nndraft
12873 @vindex nndraft-directory
12874 The draft group is a special group (which is implemented as an
12875 @code{nndraft} group, if you absolutely have to know) called
12876 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
12877 @code{nndraft} is to store its files.  What makes this group special is
12878 that you can't tick any articles in it or mark any articles as
12879 read---all articles in the group are permanently unread.
12880
12881 If the group doesn't exist, it will be created and you'll be subscribed
12882 to it.  The only way to make it disappear from the Group buffer is to
12883 unsubscribe it.  The special properties of the draft group comes from
12884 a group property (@pxref{Group Parameters}), and if lost the group
12885 behaves like any other group.  This means the commands below will not
12886 be available.  To restore the special properties of the group, the
12887 simplest way is to kill the group, using @kbd{C-k}, and restart
12888 Gnus.  The group is automatically created again with the
12889 correct parameters.  The content of the group is not lost.
12890
12891 @c @findex gnus-dissociate-buffer-from-draft
12892 @c @kindex C-c M-d (Mail)
12893 @c @kindex C-c M-d (Post)
12894 @c @findex gnus-associate-buffer-with-draft
12895 @c @kindex C-c C-d (Mail)
12896 @c @kindex C-c C-d (Post)
12897 @c If you're writing some super-secret message that you later want to
12898 @c encode with PGP before sending, you may wish to turn the auto-saving
12899 @c (and association with the draft group) off.  You never know who might be
12900 @c interested in reading all your extremely valuable and terribly horrible
12901 @c and interesting secrets.  The @kbd{C-c M-d}
12902 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
12903 @c If you change your mind and want to turn the auto-saving back on again,
12904 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
12905 @c
12906 @c @vindex gnus-use-draft
12907 @c To leave association with the draft group off by default, set
12908 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
12909
12910 @findex gnus-draft-edit-message
12911 @kindex D e (Draft)
12912 When you want to continue editing the article, you simply enter the
12913 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
12914 that.  You will be placed in a buffer where you left off.
12915
12916 Rejected articles will also be put in this draft group (@pxref{Rejected
12917 Articles}).
12918
12919 @findex gnus-draft-send-all-messages
12920 @kindex D s (Draft)
12921 @findex gnus-draft-send-message
12922 @kindex D S (Draft)
12923 If you have lots of rejected messages you want to post (or mail) without
12924 doing further editing, you can use the @kbd{D s} command
12925 (@code{gnus-draft-send-message}).  This command understands the
12926 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
12927 command (@code{gnus-draft-send-all-messages}) will ship off all messages
12928 in the buffer.
12929
12930 @findex gnus-draft-toggle-sending
12931 @kindex D t (Draft)
12932 If you have some messages that you wish not to send, you can use the
12933 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
12934 as unsendable.  This is a toggling command.
12935
12936 Finally, if you want to delete a draft, use the normal @kbd{B DEL}
12937 command (@pxref{Mail Group Commands}).
12938
12939
12940 @node Rejected Articles
12941 @section Rejected Articles
12942 @cindex rejected articles
12943
12944 Sometimes a news server will reject an article.  Perhaps the server
12945 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
12946 @emph{there be demons}.  Perhaps you have included too much cited text.
12947 Perhaps the disk is full.  Perhaps the server is down.
12948
12949 These situations are, of course, totally beyond the control of Gnus.
12950 (Gnus, of course, loves the way you look, always feels great, has angels
12951 fluttering around inside of it, doesn't care about how much cited text
12952 you include, never runs full and never goes down.)  So Gnus saves these
12953 articles until some later time when the server feels better.
12954
12955 The rejected articles will automatically be put in a special draft group
12956 (@pxref{Drafts}).  When the server comes back up again, you'd then
12957 typically enter that group and send all the articles off.
12958
12959 @node Signing and encrypting
12960 @section Signing and encrypting
12961 @cindex using gpg
12962 @cindex using s/mime
12963 @cindex using smime
12964
12965 Gnus can digitally sign and encrypt your messages, using vanilla
12966 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
12967 decoding such messages, see the @code{mm-verify-option} and
12968 @code{mm-decrypt-option} options (@pxref{Security}).
12969
12970 @vindex gnus-message-replysign
12971 @vindex gnus-message-replyencrypt
12972 @vindex gnus-message-replysignencrypted
12973 Often, you would like to sign replies to people who send you signed
12974 messages.  Even more often, you might want to encrypt messages which
12975 are in reply to encrypted messages.  Gnus offers
12976 @code{gnus-message-replysign} to enable the former, and
12977 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
12978 @code{gnus-message-replysignencrypted} (on by default) will sign
12979 automatically encrypted messages.
12980
12981 Instructing @acronym{MML} to perform security operations on a
12982 @acronym{MIME} part is done using the @kbd{C-c C-m s} key map for
12983 signing and the @kbd{C-c C-m c} key map for encryption, as follows.
12984
12985 @table @kbd
12986
12987 @item C-c C-m s s
12988 @kindex C-c C-m s s (Message)
12989 @findex mml-secure-message-sign-smime
12990
12991 Digitally sign current message using @acronym{S/MIME}.
12992
12993 @item C-c C-m s o
12994 @kindex C-c C-m s o (Message)
12995 @findex mml-secure-message-sign-pgp
12996
12997 Digitally sign current message using @acronym{PGP}.
12998
12999 @item C-c C-m s p
13000 @kindex C-c C-m s p (Message)
13001 @findex mml-secure-message-sign-pgp
13002
13003 Digitally sign current message using @acronym{PGP/MIME}.
13004
13005 @item C-c C-m c s
13006 @kindex C-c C-m c s (Message)
13007 @findex mml-secure-message-encrypt-smime
13008
13009 Digitally encrypt current message using @acronym{S/MIME}.
13010
13011 @item C-c C-m c o
13012 @kindex C-c C-m c o (Message)
13013 @findex mml-secure-message-encrypt-pgp
13014
13015 Digitally encrypt current message using @acronym{PGP}.
13016
13017 @item C-c C-m c p
13018 @kindex C-c C-m c p (Message)
13019 @findex mml-secure-message-encrypt-pgpmime
13020
13021 Digitally encrypt current message using @acronym{PGP/MIME}.
13022
13023 @item C-c C-m C-n
13024 @kindex C-c C-m C-n (Message)
13025 @findex mml-unsecure-message
13026 Remove security related @acronym{MML} tags from message.
13027
13028 @end table
13029
13030 @xref{Security, ,Security, message, Message Manual}, for more information.
13031
13032 @node Select Methods
13033 @chapter Select Methods
13034 @cindex foreign groups
13035 @cindex select methods
13036
13037 A @dfn{foreign group} is a group not read by the usual (or
13038 default) means.  It could be, for instance, a group from a different
13039 @acronym{NNTP} server, it could be a virtual group, or it could be your own
13040 personal mail group.
13041
13042 A foreign group (or any group, really) is specified by a @dfn{name} and
13043 a @dfn{select method}.  To take the latter first, a select method is a
13044 list where the first element says what back end to use (e.g., @code{nntp},
13045 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
13046 name}.  There may be additional elements in the select method, where the
13047 value may have special meaning for the back end in question.
13048
13049 One could say that a select method defines a @dfn{virtual server}---so
13050 we do just that (@pxref{Server Buffer}).
13051
13052 The @dfn{name} of the group is the name the back end will recognize the
13053 group as.
13054
13055 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
13056 @samp{some.where.edu} will have the name @samp{soc.motss} and select
13057 method @code{(nntp "some.where.edu")}.  Gnus will call this group
13058 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
13059 back end just knows this group as @samp{soc.motss}.
13060
13061 The different methods all have their peculiarities, of course.
13062
13063 @menu
13064 * Server Buffer::               Making and editing virtual servers.
13065 * Getting News::                Reading USENET news with Gnus.
13066 * Using IMAP::                  Reading mail from @acronym{IMAP}.
13067 * Getting Mail::                Reading your personal mail with Gnus.
13068 * Browsing the Web::            Getting messages from a plethora of Web sources.
13069 * Other Sources::               Reading directories, files.
13070 * Combined Groups::             Combining groups into one group.
13071 * Email Based Diary::           Using mails to manage diary events in Gnus.
13072 * Gnus Unplugged::              Reading news and mail offline.
13073 @end menu
13074
13075
13076 @node Server Buffer
13077 @section Server Buffer
13078
13079 Traditionally, a @dfn{server} is a machine or a piece of software that
13080 one connects to, and then requests information from.  Gnus does not
13081 connect directly to any real servers, but does all transactions through
13082 one back end or other.  But that's just putting one layer more between
13083 the actual media and Gnus, so we might just as well say that each
13084 back end represents a virtual server.
13085
13086 For instance, the @code{nntp} back end may be used to connect to several
13087 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
13088 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
13089 use, and what parameters to set by specifying a @dfn{select method}.
13090
13091 These select method specifications can sometimes become quite
13092 complicated---say, for instance, that you want to read from the
13093 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
13094 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
13095 Anyway, if you had to specify that for each group that used this
13096 server, that would be too much work, so Gnus offers a way of naming
13097 select methods, which is what you do in the server buffer.
13098
13099 To enter the server buffer, use the @kbd{^}
13100 (@code{gnus-group-enter-server-mode}) command in the group buffer.
13101
13102 @menu
13103 * Server Buffer Format::        You can customize the look of this buffer.
13104 * Server Commands::             Commands to manipulate servers.
13105 * Example Methods::             Examples server specifications.
13106 * Creating a Virtual Server::   An example session.
13107 * Server Variables::            Which variables to set.
13108 * Servers and Methods::         You can use server names as select methods.
13109 * Unavailable Servers::         Some servers you try to contact may be down.
13110 @end menu
13111
13112 @vindex gnus-server-mode-hook
13113 @code{gnus-server-mode-hook} is run when creating the server buffer.
13114
13115
13116 @node Server Buffer Format
13117 @subsection Server Buffer Format
13118 @cindex server buffer format
13119
13120 @vindex gnus-server-line-format
13121 You can change the look of the server buffer lines by changing the
13122 @code{gnus-server-line-format} variable.  This is a @code{format}-like
13123 variable, with some simple extensions:
13124
13125 @table @samp
13126
13127 @item h
13128 How the news is fetched---the back end name.
13129
13130 @item n
13131 The name of this server.
13132
13133 @item w
13134 Where the news is to be fetched from---the address.
13135
13136 @item s
13137 The opened/closed/denied status of the server.
13138
13139 @item a
13140 Whether this server is agentized.
13141 @end table
13142
13143 @vindex gnus-server-mode-line-format
13144 The mode line can also be customized by using the
13145 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
13146 Formatting}).  The following specs are understood:
13147
13148 @table @samp
13149 @item S
13150 Server name.
13151
13152 @item M
13153 Server method.
13154 @end table
13155
13156 Also @pxref{Formatting Variables}.
13157
13158
13159 @node Server Commands
13160 @subsection Server Commands
13161 @cindex server commands
13162
13163 @table @kbd
13164
13165 @item v
13166 @kindex v (Server)
13167 @cindex keys, reserved for users (Server)
13168 The key @kbd{v} is reserved for users.  You can bind it to some
13169 command or better use it as a prefix key.
13170
13171 @item a
13172 @kindex a (Server)
13173 @findex gnus-server-add-server
13174 Add a new server (@code{gnus-server-add-server}).
13175
13176 @item e
13177 @kindex e (Server)
13178 @findex gnus-server-edit-server
13179 Edit a server (@code{gnus-server-edit-server}).
13180
13181 @item S
13182 @kindex S (Server)
13183 @findex gnus-server-show-server
13184 Show the definition of a server (@code{gnus-server-show-server}).
13185
13186 @item SPACE
13187 @kindex SPACE (Server)
13188 @findex gnus-server-read-server
13189 Browse the current server (@code{gnus-server-read-server}).
13190
13191 @item q
13192 @kindex q (Server)
13193 @findex gnus-server-exit
13194 Return to the group buffer (@code{gnus-server-exit}).
13195
13196 @item k
13197 @kindex k (Server)
13198 @findex gnus-server-kill-server
13199 Kill the current server (@code{gnus-server-kill-server}).
13200
13201 @item y
13202 @kindex y (Server)
13203 @findex gnus-server-yank-server
13204 Yank the previously killed server (@code{gnus-server-yank-server}).
13205
13206 @item c
13207 @kindex c (Server)
13208 @findex gnus-server-copy-server
13209 Copy the current server (@code{gnus-server-copy-server}).
13210
13211 @item l
13212 @kindex l (Server)
13213 @findex gnus-server-list-servers
13214 List all servers (@code{gnus-server-list-servers}).
13215
13216 @item s
13217 @kindex s (Server)
13218 @findex gnus-server-scan-server
13219 Request that the server scan its sources for new articles
13220 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
13221 servers.
13222
13223 @item g
13224 @kindex g (Server)
13225 @findex gnus-server-regenerate-server
13226 Request that the server regenerate all its data structures
13227 (@code{gnus-server-regenerate-server}).  This can be useful if you have
13228 a mail back end that has gotten out of sync.
13229
13230 @item z
13231 @kindex z (Server)
13232 @findex gnus-server-compact-server
13233
13234 Compact all groups in the server under point
13235 (@code{gnus-server-compact-server}).  Currently implemented only in
13236 nnml (@pxref{Mail Spool}).  This removes gaps between article numbers,
13237 hence getting a correct total article count.
13238
13239 @end table
13240
13241 Some more commands for closing, disabling, and re-opening servers are
13242 listed in @ref{Unavailable Servers}.
13243
13244
13245 @node Example Methods
13246 @subsection Example Methods
13247
13248 Most select methods are pretty simple and self-explanatory:
13249
13250 @lisp
13251 (nntp "news.funet.fi")
13252 @end lisp
13253
13254 Reading directly from the spool is even simpler:
13255
13256 @lisp
13257 (nnspool "")
13258 @end lisp
13259
13260 As you can see, the first element in a select method is the name of the
13261 back end, and the second is the @dfn{address}, or @dfn{name}, if you
13262 will.
13263
13264 After these two elements, there may be an arbitrary number of
13265 @code{(@var{variable} @var{form})} pairs.
13266
13267 To go back to the first example---imagine that you want to read from
13268 port 15 on that machine.  This is what the select method should
13269 look like then:
13270
13271 @lisp
13272 (nntp "news.funet.fi" (nntp-port-number 15))
13273 @end lisp
13274
13275 You should read the documentation to each back end to find out what
13276 variables are relevant, but here's an @code{nnmh} example:
13277
13278 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
13279 you have two structures that you wish to access: One is your private
13280 mail spool, and the other is a public one.  Here's the possible spec for
13281 your private mail:
13282
13283 @lisp
13284 (nnmh "private" (nnmh-directory "~/private/mail/"))
13285 @end lisp
13286
13287 (This server is then called @samp{private}, but you may have guessed
13288 that.)
13289
13290 Here's the method for a public spool:
13291
13292 @lisp
13293 (nnmh "public"
13294       (nnmh-directory "/usr/information/spool/")
13295       (nnmh-get-new-mail nil))
13296 @end lisp
13297
13298 @cindex proxy
13299 @cindex firewall
13300
13301 If you are behind a firewall and only have access to the @acronym{NNTP}
13302 server from the firewall machine, you can instruct Gnus to @code{rlogin}
13303 on the firewall machine and connect with
13304 @uref{http://netcat.sourceforge.net/, netcat} from there to the
13305 @acronym{NNTP} server.
13306 Doing this can be rather fiddly, but your virtual server definition
13307 should probably look something like this:
13308
13309 @lisp
13310 (nntp "firewall"
13311       (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)
13312       (nntp-via-address "the.firewall.machine")
13313       (nntp-address "the.real.nntp.host"))
13314 @end lisp
13315
13316 If you want to use the wonderful @code{ssh} program to provide a
13317 compressed connection over the modem line, you could add the following
13318 configuration to the example above:
13319
13320 @lisp
13321       (nntp-via-rlogin-command "ssh")
13322 @end lisp
13323
13324 See also @code{nntp-via-rlogin-command-switches}.  Here's an example for
13325 an indirect connection:
13326
13327 @lisp
13328 (setq gnus-select-method
13329       '(nntp "indirect"
13330              (nntp-address "news.server.example")
13331              (nntp-via-user-name "intermediate_user_name")
13332              (nntp-via-address "intermediate.host.example")
13333              (nntp-via-rlogin-command "ssh")
13334              (nntp-via-rlogin-command-switches ("-C"))
13335              (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)))
13336 @end lisp
13337
13338 This means that you have to have set up @code{ssh-agent} correctly to
13339 provide automatic authorization, of course.
13340
13341 If you're behind a firewall, but have direct access to the outside world
13342 through a wrapper command like "runsocks", you could open a socksified
13343 netcat connection to the news server as follows:
13344
13345 @lisp
13346 (nntp "outside"
13347       (nntp-pre-command "runsocks")
13348       (nntp-open-connection-function nntp-open-netcat-stream)
13349       (nntp-address "the.news.server"))
13350 @end lisp
13351
13352
13353 @node Creating a Virtual Server
13354 @subsection Creating a Virtual Server
13355
13356 If you're saving lots of articles in the cache by using persistent
13357 articles, you may want to create a virtual server to read the cache.
13358
13359 First you need to add a new server.  The @kbd{a} command does that.  It
13360 would probably be best to use @code{nnml} to read the cache.  You
13361 could also use @code{nnspool} or @code{nnmh}, though.
13362
13363 Type @kbd{a nnml RET cache RET}.
13364
13365 You should now have a brand new @code{nnml} virtual server called
13366 @samp{cache}.  You now need to edit it to have the right definitions.
13367 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
13368 will contain the following:
13369
13370 @lisp
13371 (nnml "cache")
13372 @end lisp
13373
13374 Change that to:
13375
13376 @lisp
13377 (nnml "cache"
13378          (nnml-directory "~/News/cache/")
13379          (nnml-active-file "~/News/cache/active"))
13380 @end lisp
13381
13382 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
13383 @kbd{RET} over this virtual server, you should be entered into a browse
13384 buffer, and you should be able to enter any of the groups displayed.
13385
13386
13387 @node Server Variables
13388 @subsection Server Variables
13389 @cindex server variables
13390 @cindex server parameters
13391
13392 One sticky point when defining variables (both on back ends and in Emacs
13393 in general) is that some variables are typically initialized from other
13394 variables when the definition of the variables is being loaded.  If you
13395 change the ``base'' variable after the variables have been loaded, you
13396 won't change the ``derived'' variables.
13397
13398 This typically affects directory and file variables.  For instance,
13399 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
13400 directory variables are initialized from that variable, so
13401 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
13402 new virtual @code{nnml} server, it will @emph{not} suffice to set just
13403 @code{nnml-directory}---you have to explicitly set all the file
13404 variables to be what you want them to be.  For a complete list of
13405 variables for each back end, see each back end's section later in this
13406 manual, but here's an example @code{nnml} definition:
13407
13408 @lisp
13409 (nnml "public"
13410       (nnml-directory "~/my-mail/")
13411       (nnml-active-file "~/my-mail/active")
13412       (nnml-newsgroups-file "~/my-mail/newsgroups"))
13413 @end lisp
13414
13415 Server variables are often called @dfn{server parameters}.
13416
13417 @node Servers and Methods
13418 @subsection Servers and Methods
13419
13420 Wherever you would normally use a select method
13421 (e.g., @code{gnus-secondary-select-method}, in the group select method,
13422 when browsing a foreign server) you can use a virtual server name
13423 instead.  This could potentially save lots of typing.  And it's nice all
13424 over.
13425
13426
13427 @node Unavailable Servers
13428 @subsection Unavailable Servers
13429
13430 If a server seems to be unreachable, Gnus will mark that server as
13431 @code{denied}.  That means that any subsequent attempt to make contact
13432 with that server will just be ignored.  ``It can't be opened,'' Gnus
13433 will tell you, without making the least effort to see whether that is
13434 actually the case or not.
13435
13436 That might seem quite naughty, but it does make sense most of the time.
13437 Let's say you have 10 groups subscribed to on server
13438 @samp{nephelococcygia.com}.  This server is located somewhere quite far
13439 away from you and the machine is quite slow, so it takes 1 minute just
13440 to find out that it refuses connection to you today.  If Gnus were to
13441 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
13442 attempt to do that.  Once it has gotten a single ``connection refused'',
13443 it will regard that server as ``down''.
13444
13445 So, what happens if the machine was only feeling unwell temporarily?
13446 How do you test to see whether the machine has come up again?
13447
13448 You jump to the server buffer (@pxref{Server Buffer}) and poke it
13449 with the following commands:
13450
13451 @table @kbd
13452
13453 @item O
13454 @kindex O (Server)
13455 @findex gnus-server-open-server
13456 Try to establish connection to the server on the current line
13457 (@code{gnus-server-open-server}).
13458
13459 @item C
13460 @kindex C (Server)
13461 @findex gnus-server-close-server
13462 Close the connection (if any) to the server
13463 (@code{gnus-server-close-server}).
13464
13465 @item D
13466 @kindex D (Server)
13467 @findex gnus-server-deny-server
13468 Mark the current server as unreachable
13469 (@code{gnus-server-deny-server}).
13470
13471 @item M-o
13472 @kindex M-o (Server)
13473 @findex gnus-server-open-all-servers
13474 Open the connections to all servers in the buffer
13475 (@code{gnus-server-open-all-servers}).
13476
13477 @item M-c
13478 @kindex M-c (Server)
13479 @findex gnus-server-close-all-servers
13480 Close the connections to all servers in the buffer
13481 (@code{gnus-server-close-all-servers}).
13482
13483 @item R
13484 @kindex R (Server)
13485 @findex gnus-server-remove-denials
13486 Remove all marks to whether Gnus was denied connection from any servers
13487 (@code{gnus-server-remove-denials}).
13488
13489 @item c
13490 @kindex c (Server)
13491 @findex gnus-server-copy-server
13492 Copy a server and give it a new name
13493 (@code{gnus-server-copy-server}).  This can be useful if you have a
13494 complex method definition, and want to use the same definition towards
13495 a different (physical) server.
13496
13497 @item L
13498 @kindex L (Server)
13499 @findex gnus-server-offline-server
13500 Set server status to offline (@code{gnus-server-offline-server}).
13501
13502 @end table
13503
13504
13505 @node Getting News
13506 @section Getting News
13507 @cindex reading news
13508 @cindex news back ends
13509
13510 A newsreader is normally used for reading news.  Gnus currently provides
13511 only two methods of getting news---it can read from an @acronym{NNTP} server,
13512 or it can read from a local spool.
13513
13514 @menu
13515 * NNTP::                        Reading news from an @acronym{NNTP} server.
13516 * News Spool::                  Reading news from the local spool.
13517 @end menu
13518
13519
13520 @node NNTP
13521 @subsection NNTP
13522 @cindex nntp
13523
13524 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
13525 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
13526 server as the, uhm, address.
13527
13528 If the @acronym{NNTP} server is located at a non-standard port, setting the
13529 third element of the select method to this port number should allow you
13530 to connect to the right port.  You'll have to edit the group info for
13531 that (@pxref{Foreign Groups}).
13532
13533 The name of the foreign group can be the same as a native group.  In
13534 fact, you can subscribe to the same group from as many different servers
13535 you feel like.  There will be no name collisions.
13536
13537 The following variables can be used to create a virtual @code{nntp}
13538 server:
13539
13540 @table @code
13541
13542 @item nntp-server-opened-hook
13543 @vindex nntp-server-opened-hook
13544 @cindex @sc{mode reader}
13545 @cindex authinfo
13546 @cindex authentication
13547 @cindex nntp authentication
13548 @findex nntp-send-authinfo
13549 @findex nntp-send-mode-reader
13550 is run after a connection has been made.  It can be used to send
13551 commands to the @acronym{NNTP} server after it has been contacted.  By
13552 default it sends the command @code{MODE READER} to the server with the
13553 @code{nntp-send-mode-reader} function.  This function should always be
13554 present in this hook.
13555
13556 @item nntp-authinfo-function
13557 @vindex nntp-authinfo-function
13558 @findex nntp-send-authinfo
13559 @vindex nntp-authinfo-file
13560 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
13561 server.  The default function is @code{nntp-send-authinfo}, which looks
13562 through your @file{~/.authinfo} (or whatever you've set the
13563 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
13564 are found, it will prompt you for a login name and a password.  The
13565 format of the @file{~/.authinfo} file is (almost) the same as the
13566 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
13567 manual page, but here are the salient facts:
13568
13569 @enumerate
13570 @item
13571 The file contains one or more line, each of which define one server.
13572
13573 @item
13574 Each line may contain an arbitrary number of token/value pairs.
13575
13576 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
13577 @samp{default}.  In addition Gnus introduces two new tokens, not present
13578 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
13579 @samp{force}.  (This is the only way the @file{.authinfo} file format
13580 deviates from the @file{.netrc} file format.)  @samp{port} is used to
13581 indicate what port on the server the credentials apply to and
13582 @samp{force} is explained below.
13583
13584 @end enumerate
13585
13586 Here's an example file:
13587
13588 @example
13589 machine news.uio.no login larsi password geheimnis
13590 machine nntp.ifi.uio.no login larsi force yes
13591 @end example
13592
13593 The token/value pairs may appear in any order; @samp{machine} doesn't
13594 have to be first, for instance.
13595
13596 In this example, both login name and password have been supplied for the
13597 former server, while the latter has only the login name listed, and the
13598 user will be prompted for the password.  The latter also has the
13599 @samp{force} tag, which means that the authinfo will be sent to the
13600 @var{nntp} server upon connection; the default (i.e., when there is not
13601 @samp{force} tag) is to not send authinfo to the @var{nntp} server
13602 until the @var{nntp} server asks for it.
13603
13604 You can also add @samp{default} lines that will apply to all servers
13605 that don't have matching @samp{machine} lines.
13606
13607 @example
13608 default force yes
13609 @end example
13610
13611 This will force sending @samp{AUTHINFO} commands to all servers not
13612 previously mentioned.
13613
13614 Remember to not leave the @file{~/.authinfo} file world-readable.
13615
13616 @item nntp-server-action-alist
13617 @vindex nntp-server-action-alist
13618 This is a list of regexps to match on server types and actions to be
13619 taken when matches are made.  For instance, if you want Gnus to beep
13620 every time you connect to innd, you could say something like:
13621
13622 @lisp
13623 (setq nntp-server-action-alist
13624       '(("innd" (ding))))
13625 @end lisp
13626
13627 You probably don't want to do that, though.
13628
13629 The default value is
13630
13631 @lisp
13632 '(("nntpd 1\\.5\\.11t"
13633    (remove-hook 'nntp-server-opened-hook
13634                 'nntp-send-mode-reader)))
13635 @end lisp
13636
13637 This ensures that Gnus doesn't send the @code{MODE READER} command to
13638 nntpd 1.5.11t, since that command chokes that server, I've been told.
13639
13640 @item nntp-maximum-request
13641 @vindex nntp-maximum-request
13642 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
13643 will collect headers by sending a series of @code{head} commands.  To
13644 speed things up, the back end sends lots of these commands without
13645 waiting for reply, and then reads all the replies.  This is controlled
13646 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
13647 your network is buggy, you should set this to 1.
13648
13649 @item nntp-connection-timeout
13650 @vindex nntp-connection-timeout
13651 If you have lots of foreign @code{nntp} groups that you connect to
13652 regularly, you're sure to have problems with @acronym{NNTP} servers not
13653 responding properly, or being too loaded to reply within reasonable
13654 time.  This is can lead to awkward problems, which can be helped
13655 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
13656 that says how many seconds the @code{nntp} back end should wait for a
13657 connection before giving up.  If it is @code{nil}, which is the default,
13658 no timeouts are done.
13659
13660 @item nntp-nov-is-evil
13661 @vindex nntp-nov-is-evil
13662 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
13663 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
13664 can be used.
13665
13666 @item nntp-xover-commands
13667 @vindex nntp-xover-commands
13668 @cindex @acronym{NOV}
13669 @cindex XOVER
13670 List of strings used as commands to fetch @acronym{NOV} lines from a
13671 server.  The default value of this variable is @code{("XOVER"
13672 "XOVERVIEW")}.
13673
13674 @item nntp-nov-gap
13675 @vindex nntp-nov-gap
13676 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
13677 the server.  The server responds with one huge list of lines.  However,
13678 if you have read articles 2--5000 in the group, and only want to read
13679 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
13680 lines that you will not need.  This variable says how
13681 big a gap between two consecutive articles is allowed to be before the
13682 @code{XOVER} request is split into several request.  Note that if your
13683 network is fast, setting this variable to a really small number means
13684 that fetching will probably be slower.  If this variable is @code{nil},
13685 @code{nntp} will never split requests.  The default is 5.
13686
13687 @item nntp-xref-number-is-evil
13688 @vindex nntp-xref-number-is-evil
13689 When Gnus refers to an article having the @code{Message-ID} that a user
13690 specifies or having the @code{Message-ID} of the parent article of the
13691 current one (@pxref{Finding the Parent}), Gnus sends a @code{HEAD}
13692 command to the @acronym{NNTP} server to know where it is, and the server
13693 returns the data containing the pairs of a group and an article number
13694 in the @code{Xref} header.  Gnus normally uses the article number to
13695 refer to the article if the data shows that that article is in the
13696 current group, while it uses the @code{Message-ID} otherwise.  However,
13697 some news servers, e.g., ones running Diablo, run multiple engines
13698 having the same articles but article numbers are not kept synchronized
13699 between them.  In that case, the article number that appears in the
13700 @code{Xref} header varies by which engine is chosen, so you cannot refer
13701 to the parent article that is in the current group, for instance.  If
13702 you connect to such a server, set this variable to a non-@code{nil}
13703 value, and Gnus never uses article numbers.  For example:
13704
13705 @lisp
13706 (setq gnus-select-method
13707       '(nntp "newszilla"
13708              (nntp-address "newszilla.example.com")
13709              (nntp-xref-number-is-evil t)
13710              @dots{}))
13711 @end lisp
13712
13713 The default value of this server variable is @code{nil}.
13714
13715 @item nntp-prepare-server-hook
13716 @vindex nntp-prepare-server-hook
13717 A hook run before attempting to connect to an @acronym{NNTP} server.
13718
13719 @item nntp-record-commands
13720 @vindex nntp-record-commands
13721 If non-@code{nil}, @code{nntp} will log all commands it sends to the
13722 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
13723 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
13724 that doesn't seem to work.
13725
13726 @item nntp-open-connection-function
13727 @vindex nntp-open-connection-function
13728 It is possible to customize how the connection to the nntp server will
13729 be opened.  If you specify an @code{nntp-open-connection-function}
13730 parameter, Gnus will use that function to establish the connection.
13731 Seven pre-made functions are supplied.  These functions can be grouped
13732 in two categories: direct connection functions (four pre-made), and
13733 indirect ones (three pre-made).
13734
13735 @item nntp-never-echoes-commands
13736 @vindex nntp-never-echoes-commands
13737 Non-@code{nil} means the nntp server never echoes commands.  It is
13738 reported that some nntps server doesn't echo commands.  So, you may want
13739 to set this to non-@code{nil} in the method for such a server setting
13740 @code{nntp-open-connection-function} to @code{nntp-open-ssl-stream} for
13741 example.  The default value is @code{nil}.  Note that the
13742 @code{nntp-open-connection-functions-never-echo-commands} variable
13743 overrides the @code{nil} value of this variable.
13744
13745 @item nntp-open-connection-functions-never-echo-commands
13746 @vindex nntp-open-connection-functions-never-echo-commands
13747 List of functions that never echo commands.  Add or set a function which
13748 you set to @code{nntp-open-connection-function} to this list if it does
13749 not echo commands.  Note that a non-@code{nil} value of the
13750 @code{nntp-never-echoes-commands} variable overrides this variable.  The
13751 default value is @code{(nntp-open-network-stream)}.
13752
13753 @item nntp-prepare-post-hook
13754 @vindex nntp-prepare-post-hook
13755 A hook run just before posting an article.  If there is no
13756 @code{Message-ID} header in the article and the news server provides the
13757 recommended ID, it will be added to the article before running this
13758 hook.  It is useful to make @code{Cancel-Lock} headers even if you
13759 inhibit Gnus to add a @code{Message-ID} header, you could say:
13760
13761 @lisp
13762 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
13763 @end lisp
13764
13765 Note that not all servers support the recommended ID@.  This works for
13766 INN versions 2.3.0 and later, for instance.
13767
13768 @item nntp-server-list-active-group
13769 If @code{nil}, then always use @samp{GROUP} instead of @samp{LIST
13770 ACTIVE}.  This is usually slower, but on misconfigured servers that
13771 don't update their active files often, this can help.
13772
13773
13774 @end table
13775
13776 @menu
13777 * Direct Functions::            Connecting directly to the server.
13778 * Indirect Functions::          Connecting indirectly to the server.
13779 * Common Variables::            Understood by several connection functions.
13780 @end menu
13781
13782
13783 @node Direct Functions
13784 @subsubsection Direct Functions
13785 @cindex direct connection functions
13786
13787 These functions are called direct because they open a direct connection
13788 between your machine and the @acronym{NNTP} server.  The behavior of these
13789 functions is also affected by commonly understood variables
13790 (@pxref{Common Variables}).
13791
13792 @table @code
13793 @findex nntp-open-network-stream
13794 @item nntp-open-network-stream
13795 This is the default, and simply connects to some port or other on the
13796 remote system.  If both Emacs and the server supports it, the
13797 connection will be upgraded to an encrypted @acronym{STARTTLS}
13798 connection automatically.
13799
13800 @item network-only
13801 The same as the above, but don't do automatic @acronym{STARTTLS} upgrades.
13802
13803 @findex nntp-open-tls-stream
13804 @item nntp-open-tls-stream
13805 Opens a connection to a server over a @dfn{secure} channel.  To use
13806 this you must have @uref{http://www.gnu.org/software/gnutls/, GnuTLS}
13807 installed.  You then define a server as follows:
13808
13809 @lisp
13810 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
13811 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
13812 ;;
13813 (nntp "snews.bar.com"
13814       (nntp-open-connection-function nntp-open-tls-stream)
13815       (nntp-port-number 563)
13816       (nntp-address "snews.bar.com"))
13817 @end lisp
13818
13819 @findex nntp-open-ssl-stream
13820 @item nntp-open-ssl-stream
13821 Opens a connection to a server over a @dfn{secure} channel.  To use
13822 this you must have @uref{http://www.openssl.org, OpenSSL}
13823 @ignore
13824 @c Defunct URL, ancient package, so don't mention it.
13825 or @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay}
13826 @end ignore
13827 installed.  You then define a server as follows:
13828
13829 @lisp
13830 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
13831 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
13832 ;;
13833 (nntp "snews.bar.com"
13834       (nntp-open-connection-function nntp-open-ssl-stream)
13835       (nntp-port-number 563)
13836       (nntp-address "snews.bar.com"))
13837 @end lisp
13838
13839 @findex nntp-open-netcat-stream
13840 @item nntp-open-netcat-stream
13841 Opens a connection to an @acronym{NNTP} server using the @code{netcat}
13842 program.  You might wonder why this function exists, since we have
13843 the default @code{nntp-open-network-stream} which would do the job.  (One
13844 of) the reason(s) is that if you are behind a firewall but have direct
13845 connections to the outside world thanks to a command wrapper like
13846 @code{runsocks}, you can use it like this:
13847
13848 @lisp
13849 (nntp "socksified"
13850       (nntp-pre-command "runsocks")
13851       (nntp-open-connection-function nntp-open-netcat-stream)
13852       (nntp-address "the.news.server"))
13853 @end lisp
13854
13855 With the default method, you would need to wrap your whole Emacs
13856 session, which is not a good idea.
13857
13858 @findex nntp-open-telnet-stream
13859 @item nntp-open-telnet-stream
13860 Like @code{nntp-open-netcat-stream}, but uses @code{telnet} rather than
13861 @code{netcat}.  @code{telnet} is a bit less robust because of things
13862 like line-end-conversion, but sometimes netcat is simply
13863 not available.  The previous example would turn into:
13864
13865 @lisp
13866 (nntp "socksified"
13867       (nntp-pre-command "runsocks")
13868       (nntp-open-connection-function nntp-open-telnet-stream)
13869       (nntp-address "the.news.server")
13870       (nntp-end-of-line "\n"))
13871 @end lisp
13872 @end table
13873
13874
13875 @node Indirect Functions
13876 @subsubsection Indirect Functions
13877 @cindex indirect connection functions
13878
13879 These functions are called indirect because they connect to an
13880 intermediate host before actually connecting to the @acronym{NNTP} server.
13881 All of these functions and related variables are also said to belong to
13882 the ``via'' family of connection: they're all prefixed with ``via'' to make
13883 things cleaner.  The behavior of these functions is also affected by
13884 commonly understood variables (@pxref{Common Variables}).
13885
13886 @table @code
13887 @item nntp-open-via-rlogin-and-netcat
13888 @findex nntp-open-via-rlogin-and-netcat
13889 Does an @samp{rlogin} on a remote system, and then uses @code{netcat} to connect
13890 to the real @acronym{NNTP} server from there.  This is useful for instance if
13891 you need to connect to a firewall machine first.
13892
13893 @code{nntp-open-via-rlogin-and-netcat}-specific variables:
13894
13895 @table @code
13896 @item nntp-via-rlogin-command
13897 @vindex nntp-via-rlogin-command
13898 Command used to log in on the intermediate host.  The default is
13899 @samp{rsh}, but @samp{ssh} is a popular alternative.
13900
13901 @item nntp-via-rlogin-command-switches
13902 @vindex nntp-via-rlogin-command-switches
13903 List of strings to be used as the switches to
13904 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
13905 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
13906 @samp{("-C")} in order to compress all data connections.
13907 @end table
13908
13909 @item nntp-open-via-rlogin-and-telnet
13910 @findex nntp-open-via-rlogin-and-telnet
13911 Does essentially the same, but uses @code{telnet} instead of @samp{netcat}
13912 to connect to the real @acronym{NNTP} server from the intermediate host.
13913 @code{telnet} is a bit less robust because of things like
13914 line-end-conversion, but sometimes @code{netcat} is simply not available.
13915
13916 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
13917
13918 @table @code
13919 @item nntp-telnet-command
13920 @vindex nntp-telnet-command
13921 Command used to connect to the real @acronym{NNTP} server from the
13922 intermediate host.  The default is @samp{telnet}.
13923
13924 @item nntp-telnet-switches
13925 @vindex nntp-telnet-switches
13926 List of strings to be used as the switches to the
13927 @code{nntp-telnet-command} command.  The default is @code{("-8")}.
13928
13929 @item nntp-via-rlogin-command
13930 @vindex nntp-via-rlogin-command
13931 Command used to log in on the intermediate host.  The default is
13932 @samp{rsh}, but @samp{ssh} is a popular alternative.
13933
13934 @item nntp-via-rlogin-command-switches
13935 @vindex nntp-via-rlogin-command-switches
13936 List of strings to be used as the switches to
13937 @code{nntp-via-rlogin-command}.  If you use @samp{ssh},  you may need to set
13938 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
13939 the telnet command requires a pseudo-tty allocation on an intermediate
13940 host.  The default is @code{nil}.
13941 @end table
13942
13943 Note that you may want to change the value for @code{nntp-end-of-line}
13944 to @samp{\n} (@pxref{Common Variables}).
13945
13946 @item nntp-open-via-telnet-and-telnet
13947 @findex nntp-open-via-telnet-and-telnet
13948 Does essentially the same, but uses @samp{telnet} instead of
13949 @samp{rlogin} to connect to the intermediate host.
13950
13951 @code{nntp-open-via-telnet-and-telnet}-specific variables:
13952
13953 @table @code
13954 @item nntp-via-telnet-command
13955 @vindex nntp-via-telnet-command
13956 Command used to @code{telnet} the intermediate host.  The default is
13957 @samp{telnet}.
13958
13959 @item nntp-via-telnet-switches
13960 @vindex nntp-via-telnet-switches
13961 List of strings to be used as the switches to the
13962 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
13963
13964 @item nntp-via-user-password
13965 @vindex nntp-via-user-password
13966 Password to use when logging in on the intermediate host.
13967
13968 @item nntp-via-envuser
13969 @vindex nntp-via-envuser
13970 If non-@code{nil}, the intermediate @code{telnet} session (client and
13971 server both) will support the @code{ENVIRON} option and not prompt for
13972 login name.  This works for Solaris @code{telnet}, for instance.
13973
13974 @item nntp-via-shell-prompt
13975 @vindex nntp-via-shell-prompt
13976 Regexp matching the shell prompt on the intermediate host.  The default
13977 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
13978
13979 @end table
13980
13981 Note that you may want to change the value for @code{nntp-end-of-line}
13982 to @samp{\n} (@pxref{Common Variables}).
13983 @end table
13984
13985
13986 Here are some additional variables that are understood by all the above
13987 functions:
13988
13989 @table @code
13990
13991 @item nntp-via-user-name
13992 @vindex nntp-via-user-name
13993 User name to use when connecting to the intermediate host.
13994
13995 @item nntp-via-address
13996 @vindex nntp-via-address
13997 Address of the intermediate host to connect to.
13998
13999 @end table
14000
14001
14002 @node Common Variables
14003 @subsubsection Common Variables
14004
14005 The following variables affect the behavior of all, or several of the
14006 pre-made connection functions.  When not specified, all functions are
14007 affected (the values of the following variables will be used as the
14008 default if each virtual @code{nntp} server doesn't specify those server
14009 variables individually).
14010
14011 @table @code
14012
14013 @item nntp-pre-command
14014 @vindex nntp-pre-command
14015 A command wrapper to use when connecting through a non native
14016 connection function (all except @code{nntp-open-network-stream},
14017 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}).  This is
14018 where you would put a @samp{SOCKS} wrapper for instance.
14019
14020 @item nntp-address
14021 @vindex nntp-address
14022 The address of the @acronym{NNTP} server.
14023
14024 @item nntp-port-number
14025 @vindex nntp-port-number
14026 Port number to connect to the @acronym{NNTP} server.  The default is
14027 @samp{nntp}.  If you use @acronym{NNTP} over
14028 @acronym{TLS}/@acronym{SSL}, you may want to use integer ports rather
14029 than named ports (i.e., use @samp{563} instead of @samp{snews} or
14030 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
14031 not work with named ports.
14032
14033 @item nntp-end-of-line
14034 @vindex nntp-end-of-line
14035 String to use as end-of-line marker when talking to the @acronym{NNTP}
14036 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
14037 using a non native telnet connection function.
14038
14039 @item nntp-netcat-command
14040 @vindex nntp-netcat-command
14041 Command to use when connecting to the @acronym{NNTP} server through
14042 @samp{netcat}.  This is @emph{not} for an intermediate host.  This is
14043 just for the real @acronym{NNTP} server.  The default is
14044 @samp{nc}.
14045
14046 @item nntp-netcat-switches
14047 @vindex nntp-netcat-switches
14048 A list of switches to pass to @code{nntp-netcat-command}.  The default
14049 is @samp{()}.
14050
14051 @end table
14052
14053 @node News Spool
14054 @subsection News Spool
14055 @cindex nnspool
14056 @cindex news spool
14057
14058 Subscribing to a foreign group from the local spool is extremely easy,
14059 and might be useful, for instance, to speed up reading groups that
14060 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
14061 instance.
14062
14063 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
14064 anything else) as the address.
14065
14066 If you have access to a local spool, you should probably use that as the
14067 native select method (@pxref{Finding the News}).  It is normally faster
14068 than using an @code{nntp} select method, but might not be.  It depends.
14069 You just have to try to find out what's best at your site.
14070
14071 @table @code
14072
14073 @item nnspool-inews-program
14074 @vindex nnspool-inews-program
14075 Program used to post an article.
14076
14077 @item nnspool-inews-switches
14078 @vindex nnspool-inews-switches
14079 Parameters given to the inews program when posting an article.
14080
14081 @item nnspool-spool-directory
14082 @vindex nnspool-spool-directory
14083 Where @code{nnspool} looks for the articles.  This is normally
14084 @file{/usr/spool/news/}.
14085
14086 @item nnspool-nov-directory
14087 @vindex nnspool-nov-directory
14088 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
14089 @file{/usr/spool/news/over.view/}.
14090
14091 @item nnspool-lib-dir
14092 @vindex nnspool-lib-dir
14093 Where the news lib dir is (@file{/usr/lib/news/} by default).
14094
14095 @item nnspool-active-file
14096 @vindex nnspool-active-file
14097 The name of the active file.
14098
14099 @item nnspool-newsgroups-file
14100 @vindex nnspool-newsgroups-file
14101 The name of the group descriptions file.
14102
14103 @item nnspool-history-file
14104 @vindex nnspool-history-file
14105 The name of the news history file.
14106
14107 @item nnspool-active-times-file
14108 @vindex nnspool-active-times-file
14109 The name of the active date file.
14110
14111 @item nnspool-nov-is-evil
14112 @vindex nnspool-nov-is-evil
14113 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
14114 that it finds.
14115
14116 @item nnspool-sift-nov-with-sed
14117 @vindex nnspool-sift-nov-with-sed
14118 @cindex sed
14119 If non-@code{nil}, which is the default, use @code{sed} to get the
14120 relevant portion from the overview file.  If @code{nil},
14121 @code{nnspool} will load the entire file into a buffer and process it
14122 there.
14123
14124 @end table
14125
14126
14127 @node Using IMAP
14128 @section Using IMAP
14129 @cindex imap
14130
14131 The most popular mail backend is probably @code{nnimap}, which
14132 provides access to @acronym{IMAP} servers.  @acronym{IMAP} servers
14133 store mail remotely, so the client doesn't store anything locally.
14134 This means that it's a convenient choice when you're reading your mail
14135 from different locations, or with different user agents.
14136
14137 @menu
14138 * Connecting to an IMAP Server::     Getting started with @acronym{IMAP}.
14139 * Customizing the IMAP Connection::  Variables for @acronym{IMAP} connection.
14140 * Client-Side IMAP Splitting::       Put mail in the correct mail box.
14141 @end menu
14142
14143
14144 @node Connecting to an IMAP Server
14145 @subsection Connecting to an IMAP Server
14146
14147 Connecting to an @acronym{IMAP} can be very easy.  Type @kbd{B} in the
14148 group buffer, or (if your primary interest is reading email), say
14149 something like:
14150
14151 @example
14152 (setq gnus-select-method
14153       '(nnimap "imap.gmail.com"))
14154 @end example
14155
14156 You'll be prompted for a user name and password.  If you grow tired of
14157 that, then add the following to your @file{~/.authinfo} file:
14158
14159 @example
14160 machine imap.gmail.com login <username> password <password> port imap
14161 @end example
14162
14163 That should basically be it for most users.
14164
14165
14166 @node Customizing the IMAP Connection
14167 @subsection Customizing the IMAP Connection
14168
14169 Here's an example method that's more complex:
14170
14171 @example
14172 (nnimap "imap.gmail.com"
14173         (nnimap-inbox "INBOX")
14174         (nnimap-split-methods default)
14175         (nnimap-expunge t)
14176         (nnimap-stream ssl))
14177 @end example
14178
14179 @table @code
14180 @item nnimap-address
14181 The address of the server, like @samp{imap.gmail.com}.
14182
14183 @item nnimap-server-port
14184 If the server uses a non-standard port, that can be specified here.  A
14185 typical port would be @code{"imap"} or @code{"imaps"}.
14186
14187 @item nnimap-stream
14188 How @code{nnimap} should connect to the server.  Possible values are:
14189
14190 @table @code
14191 @item undecided
14192 This is the default, and this first tries the @code{ssl} setting, and
14193 then tries the @code{network} setting.
14194
14195 @item ssl
14196 This uses standard @acronym{TLS}/@acronym{SSL} connections.
14197
14198 @item network
14199 Non-encrypted and unsafe straight socket connection, but will upgrade
14200 to encrypted @acronym{STARTTLS} if both Emacs and the server
14201 supports it.
14202
14203 @item starttls
14204 Encrypted @acronym{STARTTLS} over the normal @acronym{IMAP} port.
14205
14206 @item shell
14207 If you need to tunnel via other systems to connect to the server, you
14208 can use this option, and customize @code{nnimap-shell-program} to be
14209 what you need.
14210
14211 @end table
14212
14213 @item nnimap-authenticator
14214 Some @acronym{IMAP} servers allow anonymous logins.  In that case,
14215 this should be set to @code{anonymous}.  If this variable isn't set,
14216 the normal login methods will be used.  If you wish to specify a
14217 specific login method to be used, you can set this variable to either
14218 @code{login} (the traditional @acronym{IMAP} login method),
14219 @code{plain} or @code{cram-md5}.
14220
14221 @item nnimap-expunge
14222 If non-@code{nil}, expunge articles after deleting them.  This is always done
14223 if the server supports UID EXPUNGE, but it's not done by default on
14224 servers that doesn't support that command.
14225
14226 @item nnimap-streaming
14227 Virtually all @acronym{IMAP} server support fast streaming of data.
14228 If you have problems connecting to the server, try setting this to
14229 @code{nil}.
14230
14231 @item nnimap-fetch-partial-articles
14232 If non-@code{nil}, fetch partial articles from the server.  If set to
14233 a string, then it's interpreted as a regexp, and parts that have
14234 matching types will be fetched.  For instance, @samp{"text/"} will
14235 fetch all textual parts, while leaving the rest on the server.
14236
14237 @item nnimap-record-commands
14238 If non-@code{nil}, record all @acronym{IMAP} commands in the
14239 @samp{"*imap log*"} buffer.
14240
14241 @end table
14242
14243
14244 @node Client-Side IMAP Splitting
14245 @subsection Client-Side IMAP Splitting
14246
14247 Many people prefer to do the sorting/splitting of mail into their mail
14248 boxes on the @acronym{IMAP} server.  That way they don't have to
14249 download the mail they're not all that interested in.
14250
14251 If you do want to do client-side mail splitting, then the following
14252 variables are relevant:
14253
14254 @table @code
14255 @item nnimap-inbox
14256 This is the @acronym{IMAP} mail box that will be scanned for new
14257 mail.  This can also be a list of mail box names.
14258
14259 @item nnimap-split-methods
14260 Uses the same syntax as @code{nnmail-split-methods} (@pxref{Splitting
14261 Mail}), except the symbol @code{default}, which means that it should
14262 use the value of the @code{nnmail-split-methods} variable.
14263
14264 @item nnimap-split-fancy
14265 Uses the same syntax as @code{nnmail-split-fancy}.
14266
14267 @item nnimap-unsplittable-articles
14268 List of flag symbols to ignore when doing splitting.  That is,
14269 articles that have these flags won't be considered when splitting.
14270 The default is @samp{(%Deleted %Seen)}.
14271
14272 @end table
14273
14274 Here's a complete example @code{nnimap} backend with a client-side
14275 ``fancy'' splitting method:
14276
14277 @example
14278 (nnimap "imap.example.com"
14279         (nnimap-inbox "INBOX")
14280         (nnimap-split-methods
14281          (| ("MailScanner-SpamCheck" "spam" "spam.detected")
14282             (to "foo@@bar.com" "foo")
14283             "undecided")))
14284 @end example
14285
14286
14287 @node Getting Mail
14288 @section Getting Mail
14289 @cindex reading mail
14290 @cindex mail
14291
14292 Reading mail with a newsreader---isn't that just plain WeIrD@? But of
14293 course.
14294
14295 @menu
14296 * Mail in a Newsreader::        Important introductory notes.
14297 * Getting Started Reading Mail::  A simple cookbook example.
14298 * Splitting Mail::              How to create mail groups.
14299 * Mail Sources::                How to tell Gnus where to get mail from.
14300 * Mail Back End Variables::     Variables for customizing mail handling.
14301 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
14302 * Group Mail Splitting::        Use group customize to drive mail splitting.
14303 * Incorporating Old Mail::      What about the old mail you have?
14304 * Expiring Mail::               Getting rid of unwanted mail.
14305 * Washing Mail::                Removing cruft from the mail you get.
14306 * Duplicates::                  Dealing with duplicated mail.
14307 * Not Reading Mail::            Using mail back ends for reading other files.
14308 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
14309 @end menu
14310
14311
14312 @node Mail in a Newsreader
14313 @subsection Mail in a Newsreader
14314
14315 If you are used to traditional mail readers, but have decided to switch
14316 to reading mail with Gnus, you may find yourself experiencing something
14317 of a culture shock.
14318
14319 Gnus does not behave like traditional mail readers.  If you want to make
14320 it behave that way, you can, but it's an uphill battle.
14321
14322 Gnus, by default, handles all its groups using the same approach.  This
14323 approach is very newsreaderly---you enter a group, see the new/unread
14324 messages, and when you read the messages, they get marked as read, and
14325 you don't see them any more.  (Unless you explicitly ask for them.)
14326
14327 In particular, you do not do anything explicitly to delete messages.
14328
14329 Does this mean that all the messages that have been marked as read are
14330 deleted?  How awful!
14331
14332 But, no, it means that old messages are @dfn{expired} according to some
14333 scheme or other.  For news messages, the expire process is controlled by
14334 the news administrator; for mail, the expire process is controlled by
14335 you.  The expire process for mail is covered in depth in @ref{Expiring
14336 Mail}.
14337
14338 What many Gnus users find, after using it a while for both news and
14339 mail, is that the transport mechanism has very little to do with how
14340 they want to treat a message.
14341
14342 Many people subscribe to several mailing lists.  These are transported
14343 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
14344 answering, or even reading these messages very carefully.  We may not
14345 need to save them because if we should need to read one again, they are
14346 archived somewhere else.
14347
14348 Some people have local news groups which have only a handful of readers.
14349 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
14350 to read and answer a large fraction of the messages very carefully in
14351 order to do our work.  And there may not be an archive, so we may need
14352 to save the interesting messages the same way we would personal mail.
14353
14354 The important distinction turns out to be not the transport mechanism,
14355 but other factors such as how interested we are in the subject matter,
14356 or how easy it is to retrieve the message if we need to read it again.
14357
14358 Gnus provides many options for sorting mail into ``groups'' which behave
14359 like newsgroups, and for treating each group (whether mail or news)
14360 differently.
14361
14362 Some users never get comfortable using the Gnus (ahem) paradigm and wish
14363 that Gnus should grow up and be a male, er, mail reader.  It is possible
14364 to whip Gnus into a more mailreaderly being, but, as said before, it's
14365 not easy.  People who prefer proper mail readers should try @sc{vm}
14366 instead, which is an excellent, and proper, mail reader.
14367
14368 I don't mean to scare anybody off, but I want to make it clear that you
14369 may be required to learn a new way of thinking about messages.  After
14370 you've been subjected to The Gnus Way, you will come to love it.  I can
14371 guarantee it.  (At least the guy who sold me the Emacs Subliminal
14372 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
14373 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
14374 You Do.)
14375
14376
14377 @node Getting Started Reading Mail
14378 @subsection Getting Started Reading Mail
14379
14380 It's quite easy to use Gnus to read your new mail.  You just plonk the
14381 mail back end of your choice into @code{gnus-secondary-select-methods},
14382 and things will happen automatically.
14383
14384 For instance, if you want to use @code{nnml} (which is a ``one file per
14385 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
14386
14387 @lisp
14388 (setq gnus-secondary-select-methods '((nnml "")))
14389 @end lisp
14390
14391 Now, the next time you start Gnus, this back end will be queried for new
14392 articles, and it will move all the messages in your spool file to its
14393 directory, which is @file{~/Mail/} by default.  The new group that will
14394 be created (@samp{mail.misc}) will be subscribed, and you can read it
14395 like any other group.
14396
14397 You will probably want to split the mail into several groups, though:
14398
14399 @lisp
14400 (setq nnmail-split-methods
14401       '(("junk" "^From:.*Lars Ingebrigtsen")
14402         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
14403         ("other" "")))
14404 @end lisp
14405
14406 This will result in three new @code{nnml} mail groups being created:
14407 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
14408 mail that doesn't fit into the first two groups will be placed in the
14409 last group.
14410
14411 This should be sufficient for reading mail with Gnus.  You might want to
14412 give the other sections in this part of the manual a perusal, though.
14413 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
14414
14415
14416 @node Splitting Mail
14417 @subsection Splitting Mail
14418 @cindex splitting mail
14419 @cindex mail splitting
14420 @cindex mail filtering (splitting)
14421
14422 @vindex nnmail-split-methods
14423 The @code{nnmail-split-methods} variable says how the incoming mail is
14424 to be split into groups.
14425
14426 @lisp
14427 (setq nnmail-split-methods
14428   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
14429     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
14430     ("mail.other" "")))
14431 @end lisp
14432
14433 This variable is a list of lists, where the first element of each of
14434 these lists is the name of the mail group (they do not have to be called
14435 something beginning with @samp{mail}, by the way), and the second
14436 element is a regular expression used on the header of each mail to
14437 determine if it belongs in this mail group.  The first string may
14438 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
14439 insert sub-expressions from the matched text.  For instance:
14440
14441 @lisp
14442 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
14443 @end lisp
14444
14445 @noindent
14446 In that case, @code{nnmail-split-lowercase-expanded} controls whether
14447 the inserted text should be made lowercase.  @xref{Fancy Mail Splitting}.
14448
14449 The second element can also be a function.  In that case, it will be
14450 called narrowed to the headers with the first element of the rule as the
14451 argument.  It should return a non-@code{nil} value if it thinks that the
14452 mail belongs in that group.
14453
14454 @cindex @samp{bogus} group
14455 The last of these groups should always be a general one, and the regular
14456 expression should @emph{always} be @samp{""} so that it matches any mails
14457 that haven't been matched by any of the other regexps.  (These rules are
14458 processed from the beginning of the alist toward the end.  The first rule
14459 to make a match will ``win'', unless you have crossposting enabled.  In
14460 that case, all matching rules will ``win''.)  If no rule matched, the mail
14461 will end up in the @samp{bogus} group.  When new groups are created by
14462 splitting mail, you may want to run @code{gnus-group-find-new-groups} to
14463 see the new groups.  This also applies to the @samp{bogus} group.
14464
14465 If you like to tinker with this yourself, you can set this variable to a
14466 function of your choice.  This function will be called without any
14467 arguments in a buffer narrowed to the headers of an incoming mail
14468 message.  The function should return a list of group names that it
14469 thinks should carry this mail message.
14470
14471 This variable can also be a fancy split method.  For the syntax,
14472 see @ref{Fancy Mail Splitting}.
14473
14474 Note that the mail back ends are free to maul the poor, innocent,
14475 incoming headers all they want to.  They all add @code{Lines} headers;
14476 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
14477 @code{From<SPACE>} line to something else.
14478
14479 @vindex nnmail-crosspost
14480 The mail back ends all support cross-posting.  If several regexps match,
14481 the mail will be ``cross-posted'' to all those groups.
14482 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
14483 that no articles are crossposted to the general (@samp{""}) group.
14484
14485 @vindex nnmail-crosspost-link-function
14486 @cindex crosspost
14487 @cindex links
14488 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
14489 the crossposted articles.  However, not all file systems support hard
14490 links.  If that's the case for you, set
14491 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
14492 variable is @code{add-name-to-file} by default.)
14493
14494 @kindex M-x nnmail-split-history
14495 @findex nnmail-split-history
14496 If you wish to see where the previous mail split put the messages, you
14497 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
14498 where re-spooling messages would put the messages, you can use
14499 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
14500 Group Commands}).
14501
14502 @vindex nnmail-split-header-length-limit
14503 Header lines longer than the value of
14504 @code{nnmail-split-header-length-limit} are excluded from the split
14505 function.
14506
14507 @vindex nnmail-mail-splitting-decodes
14508 @vindex nnmail-mail-splitting-charset
14509 By default, splitting does not decode headers, so you can not match on
14510 non-@acronym{ASCII} strings.  But it is useful if you want to match
14511 articles based on the raw header data.  To enable it, set the
14512 @code{nnmail-mail-splitting-decodes} variable to a non-@code{nil} value.
14513 In addition, the value of the @code{nnmail-mail-splitting-charset}
14514 variable is used for decoding non-@acronym{MIME} encoded string when
14515 @code{nnmail-mail-splitting-decodes} is non-@code{nil}.  The default
14516 value is @code{nil} which means not to decode non-@acronym{MIME} encoded
14517 string.  A suitable value for you will be @code{undecided} or be the
14518 charset used normally in mails you are interested in.
14519
14520 @vindex nnmail-resplit-incoming
14521 By default, splitting is performed on all incoming messages.  If you
14522 specify a @code{directory} entry for the variable @code{mail-sources}
14523 (@pxref{Mail Source Specifiers}), however, then splitting does
14524 @emph{not} happen by default.  You can set the variable
14525 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
14526 splitting happen even in this case.  (This variable has no effect on
14527 other kinds of entries.)
14528
14529 Gnus gives you all the opportunity you could possibly want for shooting
14530 yourself in the foot.  Let's say you create a group that will contain
14531 all the mail you get from your boss.  And then you accidentally
14532 unsubscribe from the group.  Gnus will still put all the mail from your
14533 boss in the unsubscribed group, and so, when your boss mails you ``Have
14534 that report ready by Monday or you're fired!'', you'll never see it and,
14535 come Tuesday, you'll still believe that you're gainfully employed while
14536 you really should be out collecting empty bottles to save up for next
14537 month's rent money.
14538
14539
14540 @node Mail Sources
14541 @subsection Mail Sources
14542
14543 Mail can be gotten from many different sources---the mail spool, from
14544 a @acronym{POP} mail server, from a procmail directory, or from a
14545 maildir, for instance.
14546
14547 @menu
14548 * Mail Source Specifiers::      How to specify what a mail source is.
14549 * Mail Source Functions::
14550 * Mail Source Customization::   Some variables that influence things.
14551 * Fetching Mail::               Using the mail source specifiers.
14552 @end menu
14553
14554
14555 @node Mail Source Specifiers
14556 @subsubsection Mail Source Specifiers
14557 @cindex POP
14558 @cindex mail server
14559 @cindex procmail
14560 @cindex mail spool
14561 @cindex mail source
14562
14563 You tell Gnus how to fetch mail by setting @code{mail-sources}
14564 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
14565
14566 Here's an example:
14567
14568 @lisp
14569 (pop :server "pop3.mailserver.com" :user "myname")
14570 @end lisp
14571
14572 As can be observed, a mail source specifier is a list where the first
14573 element is a @dfn{mail source type}, followed by an arbitrary number of
14574 @dfn{keywords}.  Keywords that are not explicitly specified are given
14575 default values.
14576
14577 The @code{mail-sources} is global for all mail groups.  You can specify
14578 an additional mail source for a particular group by including the
14579 @code{group} mail specifier in @code{mail-sources}, and setting a
14580 @code{mail-source} group parameter (@pxref{Group Parameters}) specifying
14581 a single mail source.  When this is used, @code{mail-sources} is
14582 typically just @code{(group)}; the @code{mail-source} parameter for a
14583 group might look like this:
14584
14585 @lisp
14586 (mail-source . (file :path "home/user/spools/foo.spool"))
14587 @end lisp
14588
14589 This means that the group's (and only this group's) messages will be
14590 fetched from the spool file @samp{/user/spools/foo.spool}.
14591
14592 The following mail source types are available:
14593
14594 @table @code
14595 @item file
14596 Get mail from a single file; typically from the mail spool.
14597
14598 Keywords:
14599
14600 @table @code
14601 @item :path
14602 The file name.  Defaults to the value of the @env{MAIL}
14603 environment variable or the value of @code{rmail-spool-directory}
14604 (usually something like @file{/usr/mail/spool/user-name}).
14605
14606 @item :prescript
14607 @itemx :postscript
14608 Script run before/after fetching mail.
14609 @end table
14610
14611 An example file mail source:
14612
14613 @lisp
14614 (file :path "/usr/spool/mail/user-name")
14615 @end lisp
14616
14617 Or using the default file name:
14618
14619 @lisp
14620 (file)
14621 @end lisp
14622
14623 If the mail spool file is not located on the local machine, it's best
14624 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
14625 You can not use ange-ftp file names here---it has no way to lock the
14626 mail spool while moving the mail.
14627
14628 If it's impossible to set up a proper server, you can use ssh instead.
14629
14630 @lisp
14631 (setq mail-sources
14632       '((file :prescript "ssh host bin/getmail >%t")))
14633 @end lisp
14634
14635 The @samp{getmail} script would look something like the following:
14636
14637 @example
14638 #!/bin/sh
14639 #  getmail - move mail from spool to stdout
14640 #  flu@@iki.fi
14641
14642 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
14643 TMP=$HOME/Mail/tmp
14644 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
14645 @end example
14646
14647 Alter this script to fit the @samp{movemail} and temporary
14648 file you want to use.
14649
14650
14651 @item directory
14652 @vindex nnmail-scan-directory-mail-source-once
14653 Get mail from several files in a directory.  This is typically used
14654 when you have procmail split the incoming mail into several files.
14655 That is, there is a one-to-one correspondence between files in that
14656 directory and groups, so that mail from the file @file{foo.bar.spool}
14657 will be put in the group @code{foo.bar}.  (You can change the suffix
14658 to be used instead of @code{.spool}.)  Setting
14659 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
14660 Gnus to scan the mail source only once.  This is particularly useful
14661 if you want to scan mail groups at a specified level.
14662
14663 @vindex nnmail-resplit-incoming
14664 There is also the variable @code{nnmail-resplit-incoming}, if you set
14665 that to a non-@code{nil} value, then the normal splitting process is
14666 applied to all the files from the directory, @ref{Splitting Mail}.
14667
14668 Keywords:
14669
14670 @table @code
14671 @item :path
14672 The name of the directory where the files are.  There is no default
14673 value.
14674
14675 @item :suffix
14676 Only files ending with this suffix are used.  The default is
14677 @samp{.spool}.
14678
14679 @item :predicate
14680 Only files that have this predicate return non-@code{nil} are returned.
14681 The default is @code{identity}.  This is used as an additional
14682 filter---only files that have the right suffix @emph{and} satisfy this
14683 predicate are considered.
14684
14685 @item :prescript
14686 @itemx :postscript
14687 Script run before/after fetching mail.
14688
14689 @end table
14690
14691 An example directory mail source:
14692
14693 @lisp
14694 (directory :path "/home/user-name/procmail-dir/"
14695            :suffix ".prcml")
14696 @end lisp
14697
14698 @item pop
14699 Get mail from a @acronym{POP} server.
14700
14701 Keywords:
14702
14703 @table @code
14704 @item :server
14705 The name of the @acronym{POP} server.  The default is taken from the
14706 @env{MAILHOST} environment variable.
14707
14708 @item :port
14709 The port number of the @acronym{POP} server.  This can be a number (e.g.,
14710 @samp{:port 1234}) or a string (e.g., @samp{:port "pop3"}).  If it is a
14711 string, it should be a service name as listed in @file{/etc/services} on
14712 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
14713 need to specify it as @samp{"pop-3"} instead.
14714
14715 @item :user
14716 The user name to give to the @acronym{POP} server.  The default is the login
14717 name.
14718
14719 @item :password
14720 The password to give to the @acronym{POP} server.  If not specified,
14721 the user is prompted.
14722
14723 @item :program
14724 The program to use to fetch mail from the @acronym{POP} server.  This
14725 should be a @code{format}-like string.  Here's an example:
14726
14727 @example
14728 fetchmail %u@@%s -P %p %t
14729 @end example
14730
14731 The valid format specifier characters are:
14732
14733 @table @samp
14734 @item t
14735 The name of the file the mail is to be moved to.  This must always be
14736 included in this string.
14737
14738 @item s
14739 The name of the server.
14740
14741 @item P
14742 The port number of the server.
14743
14744 @item u
14745 The user name to use.
14746
14747 @item p
14748 The password to use.
14749 @end table
14750
14751 The values used for these specs are taken from the values you give the
14752 corresponding keywords.
14753
14754 @item :prescript
14755 A script to be run before fetching the mail.  The syntax is the same as
14756 the @code{:program} keyword.  This can also be a function to be run.
14757
14758 One popular way to use this is to set up an SSH tunnel to access the
14759 @acronym{POP} server.  Here's an example:
14760
14761 @lisp
14762 (pop :server "127.0.0.1"
14763      :port 1234
14764      :user "foo"
14765      :password "secret"
14766      :prescript
14767      "nohup ssh -f -L 1234:pop.server:110 remote.host sleep 3600 &")
14768 @end lisp
14769
14770 @item :postscript
14771 A script to be run after fetching the mail.  The syntax is the same as
14772 the @code{:program} keyword.  This can also be a function to be run.
14773
14774 @item :function
14775 The function to use to fetch mail from the @acronym{POP} server.  The
14776 function is called with one parameter---the name of the file where the
14777 mail should be moved to.
14778
14779 @item :authentication
14780 This can be either the symbol @code{password} or the symbol @code{apop}
14781 and says what authentication scheme to use.  The default is
14782 @code{password}.
14783
14784 @item :leave
14785 Non-@code{nil} if the mail is to be left on the @acronym{POP} server
14786 after fetching.  Mails once fetched will never be fetched again by the
14787 @acronym{UIDL} control.  Only the built-in @code{pop3-movemail} program
14788 (the default) supports this keyword.
14789
14790 If this is neither @code{nil} nor a number, all mails will be left on
14791 the server.  If this is a number, leave mails on the server for this
14792 many days since you first checked new mails.  If this is @code{nil}
14793 (the default), mails will be deleted on the server right after fetching.
14794
14795 @vindex pop3-uidl-file
14796 The @code{pop3-uidl-file} variable specifies the file to which the
14797 @acronym{UIDL} data are locally stored.  The default value is
14798 @file{~/.pop3-uidl}.
14799
14800 Note that @acronym{POP} servers maintain no state information between
14801 sessions, so what the client believes is there and what is actually
14802 there may not match up.  If they do not, then you may get duplicate
14803 mails or the whole thing can fall apart and leave you with a corrupt
14804 mailbox.
14805
14806 @end table
14807
14808 @findex pop3-movemail
14809 @vindex pop3-leave-mail-on-server
14810 If the @code{:program} and @code{:function} keywords aren't specified,
14811 @code{pop3-movemail} will be used.
14812
14813 Here are some examples for getting mail from a @acronym{POP} server.
14814
14815 Fetch from the default @acronym{POP} server, using the default user
14816 name, and default fetcher:
14817
14818 @lisp
14819 (pop)
14820 @end lisp
14821
14822 Fetch from a named server with a named user and password:
14823
14824 @lisp
14825 (pop :server "my.pop.server"
14826      :user "user-name" :password "secret")
14827 @end lisp
14828
14829 Leave mails on the server for 14 days:
14830
14831 @lisp
14832 (pop :server "my.pop.server"
14833      :user "user-name" :password "secret"
14834      :leave 14)
14835 @end lisp
14836
14837 Use @samp{movemail} to move the mail:
14838
14839 @lisp
14840 (pop :program "movemail po:%u %t %p")
14841 @end lisp
14842
14843 @item maildir
14844 Get mail from a maildir.  This is a type of mailbox that is supported by
14845 at least qmail and postfix, where each file in a special directory
14846 contains exactly one mail.
14847
14848 Keywords:
14849
14850 @table @code
14851 @item :path
14852 The name of the directory where the mails are stored.  The default is
14853 taken from the @env{MAILDIR} environment variable or
14854 @file{~/Maildir/}.
14855 @item :subdirs
14856 The subdirectories of the Maildir.  The default is
14857 @samp{("new" "cur")}.
14858
14859 @c If you sometimes look at your mail through a pop3 daemon before fetching
14860 @c them with Gnus, you may also have to fetch your mails from the
14861 @c @code{cur} directory inside the maildir, like in the first example
14862 @c below.
14863
14864 You can also get mails from remote hosts (because maildirs don't suffer
14865 from locking problems).
14866
14867 @end table
14868
14869 Two example maildir mail sources:
14870
14871 @lisp
14872 (maildir :path "/home/user-name/Maildir/"
14873          :subdirs ("cur" "new"))
14874 @end lisp
14875
14876 @lisp
14877 (maildir :path "/user@@remotehost.org:~/Maildir/"
14878          :subdirs ("new"))
14879 @end lisp
14880
14881 @item imap
14882 Get mail from a @acronym{IMAP} server.  If you don't want to use
14883 @acronym{IMAP} as intended, as a network mail reading protocol (i.e.,
14884 with nnimap), for some reason or other, Gnus let you treat it similar
14885 to a @acronym{POP} server and fetches articles from a given
14886 @acronym{IMAP} mailbox.  @xref{Using IMAP}, for more information.
14887
14888 Keywords:
14889
14890 @table @code
14891 @item :server
14892 The name of the @acronym{IMAP} server.  The default is taken from the
14893 @env{MAILHOST} environment variable.
14894
14895 @item :port
14896 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
14897 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
14898
14899 @item :user
14900 The user name to give to the @acronym{IMAP} server.  The default is the login
14901 name.
14902
14903 @item :password
14904 The password to give to the @acronym{IMAP} server.  If not specified, the user is
14905 prompted.
14906
14907 @item :stream
14908 What stream to use for connecting to the server, this is one of the
14909 symbols in @code{imap-stream-alist}.  Right now, this means
14910 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
14911 @samp{ssl}, @samp{shell} or the default @samp{network}.
14912
14913 @item :authentication
14914 Which authenticator to use for authenticating to the server, this is
14915 one of the symbols in @code{imap-authenticator-alist}.  Right now,
14916 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
14917 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
14918
14919 @item :program
14920 When using the `shell' :stream, the contents of this variable is
14921 mapped into the @code{imap-shell-program} variable.  This should be a
14922 @code{format}-like string (or list of strings).  Here's an example:
14923
14924 @example
14925 ssh %s imapd
14926 @end example
14927
14928 Make sure nothing is interfering with the output of the program, e.g.,
14929 don't forget to redirect the error output to the void.  The valid format
14930 specifier characters are:
14931
14932 @table @samp
14933 @item s
14934 The name of the server.
14935
14936 @item l
14937 User name from @code{imap-default-user}.
14938
14939 @item p
14940 The port number of the server.
14941 @end table
14942
14943 The values used for these specs are taken from the values you give the
14944 corresponding keywords.
14945
14946 @item :mailbox
14947 The name of the mailbox to get mail from.  The default is @samp{INBOX}
14948 which normally is the mailbox which receives incoming mail.
14949
14950 @item :predicate
14951 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
14952 UNDELETED}, is probably the best choice for most people, but if you
14953 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
14954 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
14955 Then all articles in the mailbox is fetched, no matter what.  For a
14956 complete list of predicates, see RFC 2060 section 6.4.4.
14957
14958 @item :fetchflag
14959 How to flag fetched articles on the server, the default @samp{\Deleted}
14960 will mark them as deleted, an alternative would be @samp{\Seen} which
14961 would simply mark them as read.  These are the two most likely choices,
14962 but more flags are defined in RFC 2060 section 2.3.2.
14963
14964 @item :dontexpunge
14965 If non-@code{nil}, don't remove all articles marked as deleted in the
14966 mailbox after finishing the fetch.
14967
14968 @end table
14969
14970 An example @acronym{IMAP} mail source:
14971
14972 @lisp
14973 (imap :server "mail.mycorp.com"
14974       :stream kerberos4
14975       :fetchflag "\\Seen")
14976 @end lisp
14977
14978 @item group
14979 Get the actual mail source from the @code{mail-source} group parameter,
14980 @xref{Group Parameters}.
14981
14982 @end table
14983
14984 @table @dfn
14985 @item Common Keywords
14986 Common keywords can be used in any type of mail source.
14987
14988 Keywords:
14989
14990 @table @code
14991 @item :plugged
14992 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
14993 use directory source to get mail, you can specify it as in this
14994 example:
14995
14996 @lisp
14997 (setq mail-sources
14998       '((directory :path "/home/pavel/.Spool/"
14999                    :suffix ""
15000                    :plugged t)))
15001 @end lisp
15002
15003 Gnus will then fetch your mail even when you are unplugged.  This is
15004 useful when you use local mail and news.
15005
15006 @end table
15007 @end table
15008
15009 @node Mail Source Functions
15010 @subsubsection Function Interface
15011
15012 Some of the above keywords specify a Lisp function to be executed.
15013 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
15014 the value of the keyword while the function is executing.  For example,
15015 consider the following mail-source setting:
15016
15017 @lisp
15018 (setq mail-sources '((pop :user "jrl"
15019                           :server "pophost" :function fetchfunc)))
15020 @end lisp
15021
15022 While the function @code{fetchfunc} is executing, the symbol @code{user}
15023 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
15024 @code{"pophost"}.  The symbols @code{port}, @code{password},
15025 @code{program}, @code{prescript}, @code{postscript}, @code{function},
15026 and @code{authentication} are also bound (to their default values).
15027
15028 See above for a list of keywords for each type of mail source.
15029
15030
15031 @node Mail Source Customization
15032 @subsubsection Mail Source Customization
15033
15034 The following is a list of variables that influence how the mail is
15035 fetched.  You would normally not need to set or change any of these
15036 variables.
15037
15038 @table @code
15039 @item mail-source-crash-box
15040 @vindex mail-source-crash-box
15041 File where mail will be stored while processing it.  The default is@*
15042 @file{~/.emacs-mail-crash-box}.
15043
15044 @cindex Incoming*
15045 @item mail-source-delete-incoming
15046 @vindex mail-source-delete-incoming
15047 If non-@code{nil}, delete incoming files after handling them.  If
15048 @code{t}, delete the files immediately, if @code{nil}, never delete any
15049 files.  If a positive number, delete files older than number of days
15050 (the deletion will only happen when receiving new mail).  You may also
15051 set @code{mail-source-delete-incoming} to @code{nil} and call
15052 @code{mail-source-delete-old-incoming} from a hook or interactively.
15053 @code{mail-source-delete-incoming} defaults to @code{10} in alpha Gnusae
15054 and @code{2} in released Gnusae.  @xref{Gnus Development}.
15055
15056 @item mail-source-delete-old-incoming-confirm
15057 @vindex mail-source-delete-old-incoming-confirm
15058 If non-@code{nil}, ask for confirmation before deleting old incoming
15059 files.  This variable only applies when
15060 @code{mail-source-delete-incoming} is a positive number.
15061
15062 @item mail-source-ignore-errors
15063 @vindex mail-source-ignore-errors
15064 If non-@code{nil}, ignore errors when reading mail from a mail source.
15065
15066 @item mail-source-directory
15067 @vindex mail-source-directory
15068 Directory where incoming mail source files (if any) will be stored.  The
15069 default is @file{~/Mail/}.  At present, the only thing this is used for
15070 is to say where the incoming files will be stored if the variable
15071 @code{mail-source-delete-incoming} is @code{nil} or a number.
15072
15073 @item mail-source-incoming-file-prefix
15074 @vindex mail-source-incoming-file-prefix
15075 Prefix for file name for storing incoming mail.  The default is
15076 @file{Incoming}, in which case files will end up with names like
15077 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
15078 relevant if @code{mail-source-delete-incoming} is @code{nil} or a
15079 number.
15080
15081 @item mail-source-default-file-modes
15082 @vindex mail-source-default-file-modes
15083 All new mail files will get this file mode.  The default is @code{#o600}.
15084
15085 @item mail-source-movemail-program
15086 @vindex mail-source-movemail-program
15087 If non-@code{nil}, name of program for fetching new mail.  If
15088 @code{nil}, @code{movemail} in @var{exec-directory}.
15089
15090 @end table
15091
15092
15093 @node Fetching Mail
15094 @subsubsection Fetching Mail
15095
15096 @vindex mail-sources
15097 The way to actually tell Gnus where to get new mail from is to set
15098 @code{mail-sources} to a list of mail source specifiers
15099 (@pxref{Mail Source Specifiers}).
15100
15101 If this variable is @code{nil}, the mail back ends will never attempt to
15102 fetch mail by themselves.
15103
15104 If you want to fetch mail both from your local spool as well as a
15105 @acronym{POP} mail server, you'd say something like:
15106
15107 @lisp
15108 (setq mail-sources
15109       '((file)
15110         (pop :server "pop3.mail.server"
15111              :password "secret")))
15112 @end lisp
15113
15114 Or, if you don't want to use any of the keyword defaults:
15115
15116 @lisp
15117 (setq mail-sources
15118       '((file :path "/var/spool/mail/user-name")
15119         (pop :server "pop3.mail.server"
15120              :user "user-name"
15121              :port "pop3"
15122              :password "secret")))
15123 @end lisp
15124
15125
15126 When you use a mail back end, Gnus will slurp all your mail from your
15127 inbox and plonk it down in your home directory.  Gnus doesn't move any
15128 mail if you're not using a mail back end---you have to do a lot of magic
15129 invocations first.  At the time when you have finished drawing the
15130 pentagram, lightened the candles, and sacrificed the goat, you really
15131 shouldn't be too surprised when Gnus moves your mail.
15132
15133
15134
15135 @node Mail Back End Variables
15136 @subsection Mail Back End Variables
15137
15138 These variables are (for the most part) pertinent to all the various
15139 mail back ends.
15140
15141 @table @code
15142 @vindex nnmail-read-incoming-hook
15143 @item nnmail-read-incoming-hook
15144 The mail back ends all call this hook after reading new mail.  You can
15145 use this hook to notify any mail watch programs, if you want to.
15146
15147 @vindex nnmail-split-hook
15148 @item nnmail-split-hook
15149 @findex gnus-article-decode-encoded-words
15150 @cindex RFC 1522 decoding
15151 @cindex RFC 2047 decoding
15152 Hook run in the buffer where the mail headers of each message is kept
15153 just before the splitting based on these headers is done.  The hook is
15154 free to modify the buffer contents in any way it sees fit---the buffer
15155 is discarded after the splitting has been done, and no changes performed
15156 in the buffer will show up in any files.
15157 @code{gnus-article-decode-encoded-words} is one likely function to add
15158 to this hook.
15159
15160 @vindex nnmail-pre-get-new-mail-hook
15161 @vindex nnmail-post-get-new-mail-hook
15162 @item nnmail-pre-get-new-mail-hook
15163 @itemx nnmail-post-get-new-mail-hook
15164 These are two useful hooks executed when treating new incoming
15165 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
15166 starting to handle the new mail) and
15167 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
15168 is done).  Here's and example of using these two hooks to change the
15169 default file modes the new mail files get:
15170
15171 @lisp
15172 (add-hook 'nnmail-pre-get-new-mail-hook
15173           (lambda () (set-default-file-modes #o700)))
15174
15175 (add-hook 'nnmail-post-get-new-mail-hook
15176           (lambda () (set-default-file-modes #o775)))
15177 @end lisp
15178
15179 @item nnmail-use-long-file-names
15180 @vindex nnmail-use-long-file-names
15181 If non-@code{nil}, the mail back ends will use long file and directory
15182 names.  Groups like @samp{mail.misc} will end up in directories
15183 (assuming use of @code{nnml} back end) or files (assuming use of
15184 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
15185 the same group will end up in @file{mail/misc}.
15186
15187 @item nnmail-delete-file-function
15188 @vindex nnmail-delete-file-function
15189 @findex delete-file
15190 Function called to delete files.  It is @code{delete-file} by default.
15191
15192 @item nnmail-cache-accepted-message-ids
15193 @vindex nnmail-cache-accepted-message-ids
15194 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
15195 the back end (via @code{Gcc}, for instance) into the mail duplication
15196 discovery cache.  The default is @code{nil}.
15197
15198 @item nnmail-cache-ignore-groups
15199 @vindex nnmail-cache-ignore-groups
15200 This can be a regular expression or a list of regular expressions.
15201 Group names that match any of the regular expressions will never be
15202 recorded in the @code{Message-ID} cache.
15203
15204 This can be useful, for example, when using Fancy Splitting
15205 (@pxref{Fancy Mail Splitting}) together with the function
15206 @code{nnmail-split-fancy-with-parent}.
15207
15208 @end table
15209
15210
15211 @node Fancy Mail Splitting
15212 @subsection Fancy Mail Splitting
15213 @cindex mail splitting
15214 @cindex fancy mail splitting
15215
15216 @vindex nnmail-split-fancy
15217 @findex nnmail-split-fancy
15218 If the rather simple, standard method for specifying how to split mail
15219 doesn't allow you to do what you want, you can set
15220 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
15221 play with the @code{nnmail-split-fancy} variable.
15222
15223 Let's look at an example value of this variable first:
15224
15225 @lisp
15226 ;; @r{Messages from the mailer daemon are not crossposted to any of}
15227 ;; @r{the ordinary groups.  Warnings are put in a separate group}
15228 ;; @r{from real errors.}
15229 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
15230                    "mail.misc"))
15231    ;; @r{Non-error messages are crossposted to all relevant}
15232    ;; @r{groups, but we don't crosspost between the group for the}
15233    ;; @r{(ding) list and the group for other (ding) related mail.}
15234    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
15235          ("subject" "ding" "ding.misc"))
15236       ;; @r{Other mailing lists@dots{}}
15237       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
15238       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
15239       ;; @r{Both lists below have the same suffix, so prevent}
15240       ;; @r{cross-posting to mkpkg.list of messages posted only to}
15241       ;; @r{the bugs- list, but allow cross-posting when the}
15242       ;; @r{message was really cross-posted.}
15243       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
15244       (any "mypackage@@somewhere" - "bugs-mypackage" "mypkg.list")
15245       ;; @r{People@dots{}}
15246       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
15247    ;; @r{Unmatched mail goes to the catch all group.}
15248    "misc.misc")
15249 @end lisp
15250
15251 This variable has the format of a @dfn{split}.  A split is a
15252 (possibly) recursive structure where each split may contain other
15253 splits.  Here are the possible split syntaxes:
15254
15255 @table @code
15256
15257 @item group
15258 If the split is a string, that will be taken as a group name.  Normal
15259 regexp match expansion will be done.  See below for examples.
15260
15261 @c Don't fold this line.
15262 @item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split} [@var{invert-partial}])
15263 The split can be a list containing at least three elements.  If the
15264 first element @var{field} (a regexp matching a header) contains
15265 @var{value} (also a regexp) then store the message as specified by
15266 @var{split}.
15267
15268 If @var{restrict} (yet another regexp) matches some string after
15269 @var{field} and before the end of the matched @var{value}, the
15270 @var{split} is ignored.  If none of the @var{restrict} clauses match,
15271 @var{split} is processed.
15272
15273 The last element @var{invert-partial} is optional.  If it is
15274 non-@code{nil}, the match-partial-words behavior controlled by the
15275 variable @code{nnmail-split-fancy-match-partial-words} (see below) is
15276 be inverted.  (New in Gnus 5.10.7)
15277
15278 @item (| @var{split} @dots{})
15279 If the split is a list, and the first element is @code{|} (vertical
15280 bar), then process each @var{split} until one of them matches.  A
15281 @var{split} is said to match if it will cause the mail message to be
15282 stored in one or more groups.
15283
15284 @item (& @var{split} @dots{})
15285 If the split is a list, and the first element is @code{&}, then
15286 process all @var{split}s in the list.
15287
15288 @item junk
15289 If the split is the symbol @code{junk}, then don't save (i.e., delete)
15290 this message.  Use with extreme caution.
15291
15292 @item (: @var{function} @var{arg1} @var{arg2} @dots{})
15293 If the split is a list, and the first element is @samp{:}, then the
15294 second element will be called as a function with @var{args} given as
15295 arguments.  The function should return a @var{split}.
15296
15297 @cindex body split
15298 For instance, the following function could be used to split based on the
15299 body of the messages:
15300
15301 @lisp
15302 (defun split-on-body ()
15303   (save-excursion
15304     (save-restriction
15305       (widen)
15306       (goto-char (point-min))
15307       (when (re-search-forward "Some.*string" nil t)
15308         "string.group"))))
15309 @end lisp
15310
15311 The buffer is narrowed to the header of the message in question when
15312 @var{function} is run.  That's why @code{(widen)} needs to be called
15313 after @code{save-excursion} and @code{save-restriction} in the example
15314 above.  Also note that with the nnimap backend, message bodies will
15315 not be downloaded by default.  You need to set
15316 @code{nnimap-split-download-body} to @code{t} to do that
15317 (@pxref{Client-Side IMAP Splitting}).
15318
15319 @item (! @var{func} @var{split})
15320 If the split is a list, and the first element is @code{!}, then
15321 @var{split} will be processed, and @var{func} will be called as a
15322 function with the result of @var{split} as argument.  @var{func}
15323 should return a split.
15324
15325 @item nil
15326 If the split is @code{nil}, it is ignored.
15327
15328 @end table
15329
15330 In these splits, @var{field} must match a complete field name.
15331
15332 Normally, @var{value} in these splits must match a complete @emph{word}
15333 according to the fundamental mode syntax table.  In other words, all
15334 @var{value}'s will be implicitly surrounded by @code{\<...\>} markers,
15335 which are word delimiters.  Therefore, if you use the following split,
15336 for example,
15337
15338 @example
15339 (any "joe" "joemail")
15340 @end example
15341
15342 @noindent
15343 messages sent from @samp{joedavis@@foo.org} will normally not be filed
15344 in @samp{joemail}.  If you want to alter this behavior, you can use any
15345 of the following three ways:
15346
15347 @enumerate
15348 @item
15349 @vindex nnmail-split-fancy-match-partial-words
15350 You can set the @code{nnmail-split-fancy-match-partial-words} variable
15351 to non-@code{nil} in order to ignore word boundaries and instead the
15352 match becomes more like a grep.  This variable controls whether partial
15353 words are matched during fancy splitting.  The default value is
15354 @code{nil}.
15355
15356 Note that it influences all @var{value}'s in your split rules.
15357
15358 @item
15359 @var{value} beginning with @code{.*} ignores word boundaries in front of
15360 a word.  Similarly, if @var{value} ends with @code{.*}, word boundaries
15361 in the rear of a word will be ignored.  For example, the @var{value}
15362 @code{"@@example\\.com"} does not match @samp{foo@@example.com} but
15363 @code{".*@@example\\.com"} does.
15364
15365 @item
15366 You can set the @var{invert-partial} flag in your split rules of the
15367 @samp{(@var{field} @var{value} @dots{})} types, aforementioned in this
15368 section.  If the flag is set, word boundaries on both sides of a word
15369 are ignored even if @code{nnmail-split-fancy-match-partial-words} is
15370 @code{nil}.  Contrarily, if the flag is set, word boundaries are not
15371 ignored even if @code{nnmail-split-fancy-match-partial-words} is
15372 non-@code{nil}.  (New in Gnus 5.10.7)
15373 @end enumerate
15374
15375 @vindex nnmail-split-abbrev-alist
15376 @var{field} and @var{value} can also be Lisp symbols, in that case
15377 they are expanded as specified by the variable
15378 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
15379 where the @sc{car} of a cell contains the key, and the @sc{cdr}
15380 contains the associated value.  Predefined entries in
15381 @code{nnmail-split-abbrev-alist} include:
15382
15383 @table @code
15384 @item from
15385 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
15386 @item to
15387 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
15388 @samp{Resent-To} and @samp{Resent-Cc} fields.
15389 @item any
15390 Is the union of the @code{from} and @code{to} entries.
15391 @end table
15392
15393 @vindex nnmail-split-fancy-syntax-table
15394 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
15395 when all this splitting is performed.
15396
15397 If you want to have Gnus create groups dynamically based on some
15398 information in the headers (i.e., do @code{replace-match}-like
15399 substitutions in the group names), you can say things like:
15400
15401 @example
15402 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
15403 @end example
15404
15405 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
15406 will be filed in @samp{mail.debian.foo}.
15407
15408 If the string contains the element @samp{\\&}, then the previously
15409 matched string will be substituted.  Similarly, the elements @samp{\\1}
15410 up to @samp{\\9} will be substituted with the text matched by the
15411 groupings 1 through 9.
15412
15413 @vindex nnmail-split-lowercase-expanded
15414 Where @code{nnmail-split-lowercase-expanded} controls whether the
15415 lowercase of the matched string should be used for the substitution.
15416 Setting it as non-@code{nil} is useful to avoid the creation of multiple
15417 groups when users send to an address using different case
15418 (i.e., mailing-list@@domain vs Mailing-List@@Domain).  The default value
15419 is @code{t}.
15420
15421 @findex nnmail-split-fancy-with-parent
15422 @code{nnmail-split-fancy-with-parent} is a function which allows you to
15423 split followups into the same groups their parents are in.  Sometimes
15424 you can't make splitting rules for all your mail.  For example, your
15425 boss might send you personal mail regarding different projects you are
15426 working on, and as you can't tell your boss to put a distinguishing
15427 string into the subject line, you have to resort to manually moving the
15428 messages into the right group.  With this function, you only have to do
15429 it once per thread.
15430
15431 To use this feature, you have to set @code{nnmail-treat-duplicates}
15432 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
15433 value.  And then you can include @code{nnmail-split-fancy-with-parent}
15434 using the colon feature, like so:
15435 @lisp
15436 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
15437       nnmail-cache-accepted-message-ids t
15438       nnmail-split-fancy
15439       '(| (: nnmail-split-fancy-with-parent)
15440           ;; @r{other splits go here}
15441         ))
15442 @end lisp
15443
15444 This feature works as follows: when @code{nnmail-treat-duplicates} is
15445 non-@code{nil}, Gnus records the message id of every message it sees
15446 in the file specified by the variable
15447 @code{nnmail-message-id-cache-file}, together with the group it is in
15448 (the group is omitted for non-mail messages).  When mail splitting is
15449 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
15450 at the References (and In-Reply-To) header of each message to split
15451 and searches the file specified by @code{nnmail-message-id-cache-file}
15452 for the message ids.  When it has found a parent, it returns the
15453 corresponding group name unless the group name matches the regexp
15454 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
15455 recommended that you set @code{nnmail-message-id-cache-length} to a
15456 somewhat higher number than the default so that the message ids are
15457 still in the cache.  (A value of 5000 appears to create a file some
15458 300 kBytes in size.)
15459 @vindex nnmail-cache-accepted-message-ids
15460 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
15461 also records the message ids of moved articles, so that the followup
15462 messages goes into the new group.
15463
15464 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
15465 want certain groups to be recorded in the cache.  For example, if all
15466 outgoing messages are written to an ``outgoing'' group, you could set
15467 @code{nnmail-cache-ignore-groups} to match that group name.
15468 Otherwise, answers to all your messages would end up in the
15469 ``outgoing'' group.
15470
15471
15472 @node Group Mail Splitting
15473 @subsection Group Mail Splitting
15474 @cindex mail splitting
15475 @cindex group mail splitting
15476
15477 @findex gnus-group-split
15478 If you subscribe to dozens of mailing lists but you don't want to
15479 maintain mail splitting rules manually, group mail splitting is for you.
15480 You just have to set @code{to-list} and/or @code{to-address} in group
15481 parameters or group customization and set @code{nnmail-split-methods} to
15482 @code{gnus-group-split}.  This splitting function will scan all groups
15483 for those parameters and split mail accordingly, i.e., messages posted
15484 from or to the addresses specified in the parameters @code{to-list} or
15485 @code{to-address} of a mail group will be stored in that group.
15486
15487 Sometimes, mailing lists have multiple addresses, and you may want mail
15488 splitting to recognize them all: just set the @code{extra-aliases} group
15489 parameter to the list of additional addresses and it's done.  If you'd
15490 rather use a regular expression, set @code{split-regexp}.
15491
15492 All these parameters in a group will be used to create an
15493 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
15494 the @var{value} is a single regular expression that matches
15495 @code{to-list}, @code{to-address}, all of @code{extra-aliases} and all
15496 matches of @code{split-regexp}, and the @var{split} is the name of the
15497 group.  @var{restrict}s are also supported: just set the
15498 @code{split-exclude} parameter to a list of regular expressions.
15499
15500 If you can't get the right split to be generated using all these
15501 parameters, or you just need something fancier, you can set the
15502 parameter @code{split-spec} to an @code{nnmail-split-fancy} split.  In
15503 this case, all other aforementioned parameters will be ignored by
15504 @code{gnus-group-split}.  In particular, @code{split-spec} may be set to
15505 @code{nil}, in which case the group will be ignored by
15506 @code{gnus-group-split}.
15507
15508 @vindex gnus-group-split-default-catch-all-group
15509 @code{gnus-group-split} will do cross-posting on all groups that match,
15510 by defining a single @code{&} fancy split containing one split for each
15511 group.  If a message doesn't match any split, it will be stored in the
15512 group named in @code{gnus-group-split-default-catch-all-group}, unless
15513 some group has @code{split-spec} set to @code{catch-all}, in which case
15514 that group is used as the catch-all group.  Even though this variable is
15515 often used just to name a group, it may also be set to an arbitrarily
15516 complex fancy split (after all, a group name is a fancy split), and this
15517 may be useful to split mail that doesn't go to any mailing list to
15518 personal mail folders.  Note that this fancy split is added as the last
15519 element of a @code{|} split list that also contains a @code{&} split
15520 with the rules extracted from group parameters.
15521
15522 It's time for an example.  Assume the following group parameters have
15523 been defined:
15524
15525 @example
15526 nnml:mail.bar:
15527 ((to-address . "bar@@femail.com")
15528  (split-regexp . ".*@@femail\\.com"))
15529 nnml:mail.foo:
15530 ((to-list . "foo@@nowhere.gov")
15531  (extra-aliases "foo@@localhost" "foo-redist@@home")
15532  (split-exclude "bugs-foo" "rambling-foo")
15533  (admin-address . "foo-request@@nowhere.gov"))
15534 nnml:mail.others:
15535 ((split-spec . catch-all))
15536 @end example
15537
15538 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
15539 behave as if @code{nnmail-split-fancy} had been selected and variable
15540 @code{nnmail-split-fancy} had been set as follows:
15541
15542 @lisp
15543 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
15544       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
15545            - "bugs-foo" - "rambling-foo" "mail.foo"))
15546    "mail.others")
15547 @end lisp
15548
15549 @findex gnus-group-split-fancy
15550 If you'd rather not use group splitting for all your mail groups, you
15551 may use it for only some of them, by using @code{nnmail-split-fancy}
15552 splits like this:
15553
15554 @lisp
15555 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
15556 @end lisp
15557
15558 @var{groups} may be a regular expression or a list of group names whose
15559 parameters will be scanned to generate the output split.
15560 @var{no-crosspost} can be used to disable cross-posting; in this case, a
15561 single @code{|} split will be output.  @var{catch-all} is the fall back
15562 fancy split, used like @code{gnus-group-split-default-catch-all-group}.
15563 If @var{catch-all} is @code{nil}, or if @code{split-regexp} matches the
15564 empty string in any selected group, no catch-all split will be issued.
15565 Otherwise, if some group has @code{split-spec} set to @code{catch-all},
15566 this group will override the value of the @var{catch-all} argument.
15567
15568 @findex gnus-group-split-setup
15569 Unfortunately, scanning all groups and their parameters can be quite
15570 slow, especially considering that it has to be done for every message.
15571 But don't despair!  The function @code{gnus-group-split-setup} can be
15572 used to enable @code{gnus-group-split} in a much more efficient way.  It
15573 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
15574 @code{nnmail-split-fancy} to the split produced by
15575 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
15576 scanned once, no matter how many messages are split.
15577
15578 @findex gnus-group-split-update
15579 However, if you change group parameters, you'd have to update
15580 @code{nnmail-split-fancy} manually.  You can do it by running
15581 @code{gnus-group-split-update}.  If you'd rather have it updated
15582 automatically, just tell @code{gnus-group-split-setup} to do it for
15583 you.  For example, add to your @file{~/.gnus.el}:
15584
15585 @lisp
15586 (gnus-group-split-setup @var{auto-update} @var{catch-all})
15587 @end lisp
15588
15589 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
15590 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
15591 have to worry about updating @code{nnmail-split-fancy} again.  If you
15592 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
15593 @code{gnus-group-split-default-catch-all-group} will be set to its
15594 value.
15595
15596 @vindex gnus-group-split-updated-hook
15597 Because you may want to change @code{nnmail-split-fancy} after it is set
15598 by @code{gnus-group-split-update}, this function will run
15599 @code{gnus-group-split-updated-hook} just before finishing.
15600
15601 @node Incorporating Old Mail
15602 @subsection Incorporating Old Mail
15603 @cindex incorporating old mail
15604 @cindex import old mail
15605
15606 Most people have lots of old mail stored in various file formats.  If
15607 you have set up Gnus to read mail using one of the spiffy Gnus mail
15608 back ends, you'll probably wish to have that old mail incorporated into
15609 your mail groups.
15610
15611 Doing so can be quite easy.
15612
15613 To take an example: You're reading mail using @code{nnml}
15614 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
15615 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
15616 file filled with important, but old, mail.  You want to move it into
15617 your @code{nnml} groups.
15618
15619 Here's how:
15620
15621 @enumerate
15622 @item
15623 Go to the group buffer.
15624
15625 @item
15626 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
15627 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
15628
15629 @item
15630 Type @kbd{SPACE} to enter the newly created group.
15631
15632 @item
15633 Type @kbd{M P b} to process-mark all articles in this group's buffer
15634 (@pxref{Setting Process Marks}).
15635
15636 @item
15637 Type @kbd{B r} to respool all the process-marked articles, and answer
15638 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
15639 @end enumerate
15640
15641 All the mail messages in the mbox file will now also be spread out over
15642 all your @code{nnml} groups.  Try entering them and check whether things
15643 have gone without a glitch.  If things look ok, you may consider
15644 deleting the mbox file, but I wouldn't do that unless I was absolutely
15645 sure that all the mail has ended up where it should be.
15646
15647 Respooling is also a handy thing to do if you're switching from one mail
15648 back end to another.  Just respool all the mail in the old mail groups
15649 using the new mail back end.
15650
15651
15652 @node Expiring Mail
15653 @subsection Expiring Mail
15654 @cindex article expiry
15655 @cindex expiring mail
15656
15657 Traditional mail readers have a tendency to remove mail articles when
15658 you mark them as read, in some way.  Gnus takes a fundamentally
15659 different approach to mail reading.
15660
15661 Gnus basically considers mail just to be news that has been received in
15662 a rather peculiar manner.  It does not think that it has the power to
15663 actually change the mail, or delete any mail messages.  If you enter a
15664 mail group, and mark articles as ``read'', or kill them in some other
15665 fashion, the mail articles will still exist on the system.  I repeat:
15666 Gnus will not delete your old, read mail.  Unless you ask it to, of
15667 course.
15668
15669 To make Gnus get rid of your unwanted mail, you have to mark the
15670 articles as @dfn{expirable}.  (With the default key bindings, this means
15671 that you have to type @kbd{E}.)  This does not mean that the articles
15672 will disappear right away, however.  In general, a mail article will be
15673 deleted from your system if, 1) it is marked as expirable, AND 2) it is
15674 more than one week old.  If you do not mark an article as expirable, it
15675 will remain on your system until hell freezes over.  This bears
15676 repeating one more time, with some spurious capitalizations: IF you do
15677 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
15678
15679 @vindex gnus-auto-expirable-marks
15680 You do not have to mark articles as expirable by hand.  Gnus provides
15681 two features, called ``auto-expire'' and ``total-expire'', that can help you
15682 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
15683 for you when you select an article.  And ``total-expire'' means that Gnus
15684 considers all articles as expirable that are read.  So, in addition to
15685 the articles marked @samp{E}, also the articles marked @samp{r},
15686 @samp{R}, @samp{O}, @samp{K}, @samp{Y} (and so on) are considered
15687 expirable.  @code{gnus-auto-expirable-marks} has the full list of
15688 these marks.
15689
15690 When should either auto-expire or total-expire be used?  Most people
15691 who are subscribed to mailing lists split each list into its own group
15692 and then turn on auto-expire or total-expire for those groups.
15693 (@xref{Splitting Mail}, for more information on splitting each list
15694 into its own group.)
15695
15696 Which one is better, auto-expire or total-expire?  It's not easy to
15697 answer.  Generally speaking, auto-expire is probably faster.  Another
15698 advantage of auto-expire is that you get more marks to work with: for
15699 the articles that are supposed to stick around, you can still choose
15700 between tick and dormant and read marks.  But with total-expire, you
15701 only have dormant and ticked to choose from.  The advantage of
15702 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
15703 Scoring}).  Auto-expire works with normal scoring but not with adaptive
15704 scoring.
15705
15706 @vindex gnus-auto-expirable-newsgroups
15707 Groups that match the regular expression
15708 @code{gnus-auto-expirable-newsgroups} will have all articles that you
15709 read marked as expirable automatically.  All articles marked as
15710 expirable have an @samp{E} in the first column in the summary buffer.
15711
15712 By default, if you have auto expiry switched on, Gnus will mark all the
15713 articles you read as expirable, no matter if they were read or unread
15714 before.  To avoid having articles marked as read marked as expirable
15715 automatically, you can put something like the following in your
15716 @file{~/.gnus.el} file:
15717
15718 @vindex gnus-mark-article-hook
15719 @lisp
15720 (remove-hook 'gnus-mark-article-hook
15721              'gnus-summary-mark-read-and-unread-as-read)
15722 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
15723 @end lisp
15724
15725 Note that making a group auto-expirable doesn't mean that all read
15726 articles are expired---only the articles marked as expirable
15727 will be expired.  Also note that using the @kbd{d} command won't make
15728 articles expirable---only semi-automatic marking of articles as read will
15729 mark the articles as expirable in auto-expirable groups.
15730
15731 Let's say you subscribe to a couple of mailing lists, and you want the
15732 articles you have read to disappear after a while:
15733
15734 @lisp
15735 (setq gnus-auto-expirable-newsgroups
15736       "mail.nonsense-list\\|mail.nice-list")
15737 @end lisp
15738
15739 Another way to have auto-expiry happen is to have the element
15740 @code{auto-expire} in the group parameters of the group.
15741
15742 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
15743 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
15744 don't really mix very well.
15745
15746 @vindex nnmail-expiry-wait
15747 The @code{nnmail-expiry-wait} variable supplies the default time an
15748 expirable article has to live.  Gnus starts counting days from when the
15749 message @emph{arrived}, not from when it was sent.  The default is seven
15750 days.
15751
15752 Gnus also supplies a function that lets you fine-tune how long articles
15753 are to live, based on what group they are in.  Let's say you want to
15754 have one month expiry period in the @samp{mail.private} group, a one day
15755 expiry period in the @samp{mail.junk} group, and a six day expiry period
15756 everywhere else:
15757
15758 @vindex nnmail-expiry-wait-function
15759 @lisp
15760 (setq nnmail-expiry-wait-function
15761       (lambda (group)
15762        (cond ((string= group "mail.private")
15763                31)
15764              ((string= group "mail.junk")
15765                1)
15766              ((string= group "important")
15767                'never)
15768              (t
15769                6))))
15770 @end lisp
15771
15772 The group names this function is fed are ``unadorned'' group
15773 names---no @samp{nnml:} prefixes and the like.
15774
15775 The @code{nnmail-expiry-wait} variable and
15776 @code{nnmail-expiry-wait-function} function can either be a number (not
15777 necessarily an integer) or one of the symbols @code{immediate} or
15778 @code{never}.
15779
15780 You can also use the @code{expiry-wait} group parameter to selectively
15781 change the expiry period (@pxref{Group Parameters}).
15782
15783 @vindex nnmail-expiry-target
15784 The normal action taken when expiring articles is to delete them.
15785 However, in some circumstances it might make more sense to move them
15786 to other groups instead of deleting them.  The variable
15787 @code{nnmail-expiry-target} (and the @code{expiry-target} group
15788 parameter) controls this.  The variable supplies a default value for
15789 all groups, which can be overridden for specific groups by the group
15790 parameter.  default value is @code{delete}, but this can also be a
15791 string (which should be the name of the group the message should be
15792 moved to), or a function (which will be called in a buffer narrowed to
15793 the message in question, and with the name of the group being moved
15794 from as its parameter) which should return a target---either a group
15795 name or @code{delete}.
15796
15797 Here's an example for specifying a group name:
15798 @lisp
15799 (setq nnmail-expiry-target "nnml:expired")
15800 @end lisp
15801
15802 @findex nnmail-fancy-expiry-target
15803 @vindex nnmail-fancy-expiry-targets
15804 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
15805 expire mail to groups according to the variable
15806 @code{nnmail-fancy-expiry-targets}.  Here's an example:
15807
15808 @lisp
15809  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
15810        nnmail-fancy-expiry-targets
15811        '((to-from "boss" "nnfolder:Work")
15812          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
15813          ("from" ".*" "nnfolder:Archive-%Y")))
15814 @end lisp
15815
15816 With this setup, any mail that has @code{IMPORTANT} in its Subject
15817 header and was sent in the year @code{YYYY} and month @code{MMM}, will
15818 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
15819 From or To header contains the string @code{boss}, it will get expired
15820 to @code{nnfolder:Work}.  All other mail will get expired to
15821 @code{nnfolder:Archive-YYYY}.
15822
15823 @vindex nnmail-keep-last-article
15824 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
15825 expire the final article in a mail newsgroup.  This is to make life
15826 easier for procmail users.
15827
15828 @vindex gnus-total-expirable-newsgroups
15829 By the way: That line up there, about Gnus never expiring non-expirable
15830 articles, is a lie.  If you put @code{total-expire} in the group
15831 parameters, articles will not be marked as expirable, but all read
15832 articles will be put through the expiry process.  Use with extreme
15833 caution.  Even more dangerous is the
15834 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
15835 this regexp will have all read articles put through the expiry process,
15836 which means that @emph{all} old mail articles in the groups in question
15837 will be deleted after a while.  Use with extreme caution, and don't come
15838 crying to me when you discover that the regexp you used matched the
15839 wrong group and all your important mail has disappeared.  Be a
15840 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
15841 with!  So there!
15842
15843 Most people make most of their mail groups total-expirable, though.
15844
15845 @vindex gnus-inhibit-user-auto-expire
15846 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
15847 commands will not mark an article as expirable, even if the group has
15848 auto-expire turned on.
15849
15850 @vindex gnus-mark-copied-or-moved-articles-as-expirable
15851 The expirable marks of articles will be removed when copying or moving
15852 them to a group in which auto-expire is not turned on.  This is for
15853 preventing articles from being expired unintentionally.  On the other
15854 hand, to a group that has turned auto-expire on, the expirable marks of
15855 articles that are copied or moved will not be changed by default.  I.e.,
15856 when copying or moving to such a group, articles that were expirable
15857 will be left expirable and ones that were not expirable will not be
15858 marked as expirable.  So, even though in auto-expire groups, some
15859 articles will never get expired (unless you read them again).  If you
15860 don't side with that behavior that unexpirable articles may be mixed
15861 into auto-expire groups, you can set
15862 @code{gnus-mark-copied-or-moved-articles-as-expirable} to a
15863 non-@code{nil} value.  In that case, articles that have been read will
15864 be marked as expirable automatically when being copied or moved to a
15865 group that has auto-expire turned on.  The default value is @code{nil}.
15866
15867
15868 @node Washing Mail
15869 @subsection Washing Mail
15870 @cindex mail washing
15871 @cindex list server brain damage
15872 @cindex incoming mail treatment
15873
15874 Mailers and list servers are notorious for doing all sorts of really,
15875 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
15876 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
15877 end of all lines passing through our server, so let's do that!!!!1!''
15878 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
15879 considered to be self-evident were not discussed.  So.  Here we are.
15880
15881 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
15882 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
15883 be shocked and dismayed by this, but I haven't got the energy.  It is to
15884 laugh.
15885
15886 Gnus provides a plethora of functions for washing articles while
15887 displaying them, but it might be nicer to do the filtering before
15888 storing the mail to disk.  For that purpose, we have three hooks and
15889 various functions that can be put in these hooks.
15890
15891 @table @code
15892 @item nnmail-prepare-incoming-hook
15893 @vindex nnmail-prepare-incoming-hook
15894 This hook is called before doing anything with the mail and is meant for
15895 grand, sweeping gestures.  It is called in a buffer that contains all
15896 the new, incoming mail.  Functions to be used include:
15897
15898 @table @code
15899 @item nnheader-ms-strip-cr
15900 @findex nnheader-ms-strip-cr
15901 Remove trailing carriage returns from each line.  This is default on
15902 Emacs running on MS machines.
15903
15904 @end table
15905
15906 @item nnmail-prepare-incoming-header-hook
15907 @vindex nnmail-prepare-incoming-header-hook
15908 This hook is called narrowed to each header.  It can be used when
15909 cleaning up the headers.  Functions that can be used include:
15910
15911 @table @code
15912 @item nnmail-remove-leading-whitespace
15913 @findex nnmail-remove-leading-whitespace
15914 Clear leading white space that ``helpful'' listservs have added to the
15915 headers to make them look nice.  Aaah.
15916
15917 (Note that this function works on both the header on the body of all
15918 messages, so it is a potentially dangerous function to use (if a body
15919 of a message contains something that looks like a header line).  So
15920 rather than fix the bug, it is of course the right solution to make it
15921 into a feature by documenting it.)
15922
15923 @item nnmail-remove-list-identifiers
15924 @findex nnmail-remove-list-identifiers
15925 Some list servers add an identifier---for example, @samp{(idm)}---to the
15926 beginning of all @code{Subject} headers.  I'm sure that's nice for
15927 people who use stone age mail readers.  This function will remove
15928 strings that match the @code{nnmail-list-identifiers} regexp, which can
15929 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
15930 @code{\\(..\\)}.
15931
15932 For instance, if you want to remove the @samp{(idm)} and the
15933 @samp{nagnagnag} identifiers:
15934
15935 @lisp
15936 (setq nnmail-list-identifiers
15937       '("(idm)" "nagnagnag"))
15938 @end lisp
15939
15940 This can also be done non-destructively with
15941 @code{gnus-list-identifiers}, @xref{Article Hiding}.
15942
15943 @item nnmail-remove-tabs
15944 @findex nnmail-remove-tabs
15945 Translate all @samp{TAB} characters into @samp{SPACE} characters.
15946
15947 @item nnmail-ignore-broken-references
15948 @findex nnmail-ignore-broken-references
15949 @c @findex nnmail-fix-eudora-headers
15950 @cindex Eudora
15951 @cindex Pegasus
15952 Some mail user agents (e.g., Eudora and Pegasus) produce broken
15953 @code{References} headers, but correct @code{In-Reply-To} headers.  This
15954 function will get rid of the @code{References} header if the headers
15955 contain a line matching the regular expression
15956 @code{nnmail-broken-references-mailers}.
15957
15958 @end table
15959
15960 @item nnmail-prepare-incoming-message-hook
15961 @vindex nnmail-prepare-incoming-message-hook
15962 This hook is called narrowed to each message.  Functions to be used
15963 include:
15964
15965 @table @code
15966 @item article-de-quoted-unreadable
15967 @findex article-de-quoted-unreadable
15968 Decode Quoted Readable encoding.
15969
15970 @end table
15971 @end table
15972
15973
15974 @node Duplicates
15975 @subsection Duplicates
15976
15977 @vindex nnmail-treat-duplicates
15978 @vindex nnmail-message-id-cache-length
15979 @vindex nnmail-message-id-cache-file
15980 @cindex duplicate mails
15981 If you are a member of a couple of mailing lists, you will sometimes
15982 receive two copies of the same mail.  This can be quite annoying, so
15983 @code{nnmail} checks for and treats any duplicates it might find.  To do
15984 this, it keeps a cache of old @code{Message-ID}s:
15985 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
15986 default.  The approximate maximum number of @code{Message-ID}s stored
15987 there is controlled by the @code{nnmail-message-id-cache-length}
15988 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
15989 stored.) If all this sounds scary to you, you can set
15990 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
15991 default), and @code{nnmail} won't delete duplicate mails.  Instead it
15992 will insert a warning into the head of the mail saying that it thinks
15993 that this is a duplicate of a different message.
15994
15995 This variable can also be a function.  If that's the case, the function
15996 will be called from a buffer narrowed to the message in question with
15997 the @code{Message-ID} as a parameter.  The function must return either
15998 @code{nil}, @code{warn}, or @code{delete}.
15999
16000 You can turn this feature off completely by setting the variable to
16001 @code{nil}.
16002
16003 If you want all the duplicate mails to be put into a special
16004 @dfn{duplicates} group, you could do that using the normal mail split
16005 methods:
16006
16007 @lisp
16008 (setq nnmail-split-fancy
16009       '(| ;; @r{Messages duplicates go to a separate group.}
16010         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
16011         ;; @r{Message from daemons, postmaster, and the like to another.}
16012         (any mail "mail.misc")
16013         ;; @r{Other rules.}
16014         [...] ))
16015 @end lisp
16016 @noindent
16017 Or something like:
16018 @lisp
16019 (setq nnmail-split-methods
16020       '(("duplicates" "^Gnus-Warning:.*duplicate")
16021         ;; @r{Other rules.}
16022         [...]))
16023 @end lisp
16024
16025 Here's a neat feature: If you know that the recipient reads her mail
16026 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
16027 @code{delete}, you can send her as many insults as you like, just by
16028 using a @code{Message-ID} of a mail that you know that she's already
16029 received.  Think of all the fun!  She'll never see any of it!  Whee!
16030
16031
16032 @node Not Reading Mail
16033 @subsection Not Reading Mail
16034
16035 If you start using any of the mail back ends, they have the annoying
16036 habit of assuming that you want to read mail with them.  This might not
16037 be unreasonable, but it might not be what you want.
16038
16039 If you set @code{mail-sources} and @code{nnmail-spool-file} to
16040 @code{nil}, none of the back ends will ever attempt to read incoming
16041 mail, which should help.
16042
16043 @vindex nnbabyl-get-new-mail
16044 @vindex nnmbox-get-new-mail
16045 @vindex nnml-get-new-mail
16046 @vindex nnmh-get-new-mail
16047 @vindex nnfolder-get-new-mail
16048 This might be too much, if, for instance, you are reading mail quite
16049 happily with @code{nnml} and just want to peek at some old (pre-Emacs
16050 23) Rmail file you have stashed away with @code{nnbabyl}.  All back ends have
16051 variables called back-end-@code{get-new-mail}.  If you want to disable
16052 the @code{nnbabyl} mail reading, you edit the virtual server for the
16053 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
16054
16055 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
16056 narrowed to the article to be saved before saving it when reading
16057 incoming mail.
16058
16059
16060 @node Choosing a Mail Back End
16061 @subsection Choosing a Mail Back End
16062
16063 Gnus will read the mail spool when you activate a mail group.  The mail
16064 file is first copied to your home directory.  What happens after that
16065 depends on what format you want to store your mail in.
16066
16067 There are six different mail back ends in the standard Gnus, and more
16068 back ends are available separately.  The mail back end most people use
16069 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
16070 Spool}).
16071
16072 @menu
16073 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
16074 * Babyl::                       Babyl was used by older versions of Rmail.
16075 * Mail Spool::                  Store your mail in a private spool?
16076 * MH Spool::                    An mhspool-like back end.
16077 * Maildir::                     Another one-file-per-message format.
16078 * nnmaildir Group Parameters::
16079 * Article Identification::
16080 * NOV Data::
16081 * Article Marks::
16082 * Mail Folders::                Having one file for each group.
16083 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
16084 @end menu
16085
16086
16087
16088 @node Unix Mail Box
16089 @subsubsection Unix Mail Box
16090 @cindex nnmbox
16091 @cindex unix mail box
16092
16093 @vindex nnmbox-active-file
16094 @vindex nnmbox-mbox-file
16095 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
16096 mail.  @code{nnmbox} will add extra headers to each mail article to say
16097 which group it belongs in.
16098
16099 Virtual server settings:
16100
16101 @table @code
16102 @item nnmbox-mbox-file
16103 @vindex nnmbox-mbox-file
16104 The name of the mail box in the user's home directory.  Default is
16105 @file{~/mbox}.
16106
16107 @item nnmbox-active-file
16108 @vindex nnmbox-active-file
16109 The name of the active file for the mail box.  Default is
16110 @file{~/.mbox-active}.
16111
16112 @item nnmbox-get-new-mail
16113 @vindex nnmbox-get-new-mail
16114 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
16115 into groups.  Default is @code{t}.
16116 @end table
16117
16118
16119 @node Babyl
16120 @subsubsection Babyl
16121 @cindex nnbabyl
16122
16123 @vindex nnbabyl-active-file
16124 @vindex nnbabyl-mbox-file
16125 The @dfn{nnbabyl} back end will use a Babyl mail box to store mail.
16126 @code{nnbabyl} will add extra headers to each mail article to say which
16127 group it belongs in.
16128
16129 Virtual server settings:
16130
16131 @table @code
16132 @item nnbabyl-mbox-file
16133 @vindex nnbabyl-mbox-file
16134 The name of the Babyl file.  The default is @file{~/RMAIL}
16135
16136 @item nnbabyl-active-file
16137 @vindex nnbabyl-active-file
16138 The name of the active file for the Babyl file.  The default is
16139 @file{~/.rmail-active}
16140
16141 @item nnbabyl-get-new-mail
16142 @vindex nnbabyl-get-new-mail
16143 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
16144 @code{t}
16145 @end table
16146
16147
16148 @node Mail Spool
16149 @subsubsection Mail Spool
16150 @cindex nnml
16151 @cindex mail @acronym{NOV} spool
16152
16153 The @dfn{nnml} spool mail format isn't compatible with any other known
16154 format.  It should be used with some caution.
16155
16156 @vindex nnml-directory
16157 If you use this back end, Gnus will split all incoming mail into files,
16158 one file for each mail, and put the articles into the corresponding
16159 directories under the directory specified by the @code{nnml-directory}
16160 variable.  The default value is @file{~/Mail/}.
16161
16162 You do not have to create any directories beforehand; Gnus will take
16163 care of all that.
16164
16165 If you have a strict limit as to how many files you are allowed to store
16166 in your account, you should not use this back end.  As each mail gets its
16167 own file, you might very well occupy thousands of inodes within a few
16168 weeks.  If this is no problem for you, and it isn't a problem for you
16169 having your friendly systems administrator walking around, madly,
16170 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
16171 know that this is probably the fastest format to use.  You do not have
16172 to trudge through a big mbox file just to read your new mail.
16173
16174 @code{nnml} is probably the slowest back end when it comes to article
16175 splitting.  It has to create lots of files, and it also generates
16176 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
16177 fastest back end when it comes to reading mail.
16178
16179 Virtual server settings:
16180
16181 @table @code
16182 @item nnml-directory
16183 @vindex nnml-directory
16184 All @code{nnml} directories will be placed under this directory.  The
16185 default is the value of @code{message-directory} (whose default value
16186 is @file{~/Mail}).
16187
16188 @item nnml-active-file
16189 @vindex nnml-active-file
16190 The active file for the @code{nnml} server.  The default is
16191 @file{~/Mail/active}.
16192
16193 @item nnml-newsgroups-file
16194 @vindex nnml-newsgroups-file
16195 The @code{nnml} group descriptions file.  @xref{Newsgroups File
16196 Format}.  The default is @file{~/Mail/newsgroups}.
16197
16198 @item nnml-get-new-mail
16199 @vindex nnml-get-new-mail
16200 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
16201 @code{t}.
16202
16203 @item nnml-nov-is-evil
16204 @vindex nnml-nov-is-evil
16205 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
16206 default is @code{nil}.
16207
16208 @item nnml-nov-file-name
16209 @vindex nnml-nov-file-name
16210 The name of the @acronym{NOV} files.  The default is @file{.overview}.
16211
16212 @item nnml-prepare-save-mail-hook
16213 @vindex nnml-prepare-save-mail-hook
16214 Hook run narrowed to an article before saving.
16215
16216 @item nnml-use-compressed-files
16217 @vindex nnml-use-compressed-files
16218 If non-@code{nil}, @code{nnml} will allow using compressed message
16219 files.  This requires @code{auto-compression-mode} to be enabled
16220 (@pxref{Compressed Files, ,Compressed Files, emacs, The Emacs Manual}).
16221 If the value of @code{nnml-use-compressed-files} is a string, it is used
16222 as the file extension specifying the compression program.  You can set it
16223 to @samp{.bz2} if your Emacs supports it.  A value of @code{t} is
16224 equivalent to @samp{.gz}.
16225
16226 @item nnml-compressed-files-size-threshold
16227 @vindex nnml-compressed-files-size-threshold
16228 Default size threshold for compressed message files.  Message files with
16229 bodies larger than that many characters will be automatically compressed
16230 if @code{nnml-use-compressed-files} is non-@code{nil}.
16231
16232 @end table
16233
16234 @findex nnml-generate-nov-databases
16235 If your @code{nnml} groups and @acronym{NOV} files get totally out of
16236 whack, you can do a complete update by typing @kbd{M-x
16237 nnml-generate-nov-databases}.  This command will trawl through the
16238 entire @code{nnml} hierarchy, looking at each and every article, so it
16239 might take a while to complete.  A better interface to this
16240 functionality can be found in the server buffer (@pxref{Server
16241 Commands}).
16242
16243
16244 @node MH Spool
16245 @subsubsection MH Spool
16246 @cindex nnmh
16247 @cindex mh-e mail spool
16248
16249 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
16250 @acronym{NOV} databases and it doesn't keep an active file or marks
16251 file.  This makes @code{nnmh} a @emph{much} slower back end than
16252 @code{nnml}, but it also makes it easier to write procmail scripts
16253 for.
16254
16255 Virtual server settings:
16256
16257 @table @code
16258 @item nnmh-directory
16259 @vindex nnmh-directory
16260 All @code{nnmh} directories will be located under this directory.  The
16261 default is the value of @code{message-directory} (whose default is
16262 @file{~/Mail})
16263
16264 @item nnmh-get-new-mail
16265 @vindex nnmh-get-new-mail
16266 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
16267 @code{t}.
16268
16269 @item nnmh-be-safe
16270 @vindex nnmh-be-safe
16271 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
16272 sure that the articles in the folder are actually what Gnus thinks
16273 they are.  It will check date stamps and stat everything in sight, so
16274 setting this to @code{t} will mean a serious slow-down.  If you never
16275 use anything but Gnus to read the @code{nnmh} articles, you do not
16276 have to set this variable to @code{t}.  The default is @code{nil}.
16277 @end table
16278
16279
16280 @node Maildir
16281 @subsubsection Maildir
16282 @cindex nnmaildir
16283 @cindex maildir
16284
16285 @code{nnmaildir} stores mail in the maildir format, with each maildir
16286 corresponding to a group in Gnus.  This format is documented here:
16287 @uref{http://cr.yp.to/proto/maildir.html} and here:
16288 @uref{http://www.qmail.org/man/man5/maildir.html}.  @code{nnmaildir}
16289 also stores extra information in the @file{.nnmaildir/} directory
16290 within a maildir.
16291
16292 Maildir format was designed to allow concurrent deliveries and
16293 reading, without needing locks.  With other back ends, you would have
16294 your mail delivered to a spool of some kind, and then you would
16295 configure Gnus to split mail from that spool into your groups.  You
16296 can still do that with @code{nnmaildir}, but the more common
16297 configuration is to have your mail delivered directly to the maildirs
16298 that appear as group in Gnus.
16299
16300 @code{nnmaildir} is designed to be perfectly reliable: @kbd{C-g} will
16301 never corrupt its data in memory, and @code{SIGKILL} will never
16302 corrupt its data in the filesystem.
16303
16304 @code{nnmaildir} stores article marks and @acronym{NOV} data in each
16305 maildir.  So you can copy a whole maildir from one Gnus setup to
16306 another, and you will keep your marks.
16307
16308 Virtual server settings:
16309
16310 @table @code
16311 @item directory
16312 For each of your @code{nnmaildir} servers (it's very unlikely that
16313 you'd need more than one), you need to create a directory and populate
16314 it with maildirs or symlinks to maildirs (and nothing else; do not
16315 choose a directory already used for other purposes).  Each maildir
16316 will be represented in Gnus as a newsgroup on that server; the
16317 filename of the symlink will be the name of the group.  Any filenames
16318 in the directory starting with @samp{.} are ignored.  The directory is
16319 scanned when you first start Gnus, and each time you type @kbd{g} in
16320 the group buffer; if any maildirs have been removed or added,
16321 @code{nnmaildir} notices at these times.
16322
16323 The value of the @code{directory} parameter should be a Lisp form
16324 which is processed by @code{eval} and @code{expand-file-name} to get
16325 the path of the directory for this server.  The form is @code{eval}ed
16326 only when the server is opened; the resulting string is used until the
16327 server is closed.  (If you don't know about forms and @code{eval},
16328 don't worry---a simple string will work.)  This parameter is not
16329 optional; you must specify it.  I don't recommend using
16330 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
16331 use that directory by default for various things, and may get confused
16332 if @code{nnmaildir} uses it too.  @code{"~/.nnmaildir"} is a typical
16333 value.
16334
16335 @item target-prefix
16336 This should be a Lisp form which is processed by @code{eval} and
16337 @code{expand-file-name}.  The form is @code{eval}ed only when the
16338 server is opened; the resulting string is used until the server is
16339 closed.
16340
16341 When you create a group on an @code{nnmaildir} server, the maildir is
16342 created with @code{target-prefix} prepended to its name, and a symlink
16343 pointing to that maildir is created, named with the plain group name.
16344 So if @code{directory} is @code{"~/.nnmaildir"} and
16345 @code{target-prefix} is @code{"../maildirs/"}, then when you create
16346 the group @code{foo}, @code{nnmaildir} will create
16347 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
16348 @file{~/.nnmaildir/foo} as a symlink pointing to
16349 @file{../maildirs/foo}.
16350
16351 You can set @code{target-prefix} to a string without any slashes to
16352 create both maildirs and symlinks in the same @code{directory}; in
16353 this case, any maildirs found in @code{directory} whose names start
16354 with @code{target-prefix} will not be listed as groups (but the
16355 symlinks pointing to them will be).
16356
16357 As a special case, if @code{target-prefix} is @code{""} (the default),
16358 then when you create a group, the maildir will be created in
16359 @code{directory} without a corresponding symlink.  Beware that you
16360 cannot use @code{gnus-group-delete-group} on such groups without the
16361 @code{force} argument.
16362
16363 @item directory-files
16364 This should be a function with the same interface as
16365 @code{directory-files} (such as @code{directory-files} itself).  It is
16366 used to scan the server's @code{directory} for maildirs.  This
16367 parameter is optional; the default is
16368 @code{nnheader-directory-files-safe} if
16369 @code{nnheader-directory-files-is-safe} is @code{nil}, and
16370 @code{directory-files} otherwise.
16371 (@code{nnheader-directory-files-is-safe} is checked only once when the
16372 server is opened; if you want to check it each time the directory is
16373 scanned, you'll have to provide your own function that does that.)
16374
16375 @item get-new-mail
16376 If non-@code{nil}, then after scanning for new mail in the group
16377 maildirs themselves as usual, this server will also incorporate mail
16378 the conventional Gnus way, from @code{mail-sources} according to
16379 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
16380 value is @code{nil}.
16381
16382 Do @emph{not} use the same maildir both in @code{mail-sources} and as
16383 an @code{nnmaildir} group.  The results might happen to be useful, but
16384 that would be by chance, not by design, and the results might be
16385 different in the future.  If your split rules create new groups,
16386 remember to supply a @code{create-directory} server parameter.
16387 @end table
16388
16389 @node nnmaildir Group Parameters
16390 @subsubsection Group parameters
16391
16392 @code{nnmaildir} uses several group parameters.  It's safe to ignore
16393 all this; the default behavior for @code{nnmaildir} is the same as the
16394 default behavior for other mail back ends: articles are deleted after
16395 one week, etc.  Except for the expiry parameters, all this
16396 functionality is unique to @code{nnmaildir}, so you can ignore it if
16397 you're just trying to duplicate the behavior you already have with
16398 another back end.
16399
16400 If the value of any of these parameters is a vector, the first element
16401 is evaluated as a Lisp form and the result is used, rather than the
16402 original value.  If the value is not a vector, the value itself is
16403 evaluated as a Lisp form.  (This is why these parameters use names
16404 different from those of other, similar parameters supported by other
16405 back ends: they have different, though similar, meanings.)  (For
16406 numbers, strings, @code{nil}, and @code{t}, you can ignore the
16407 @code{eval} business again; for other values, remember to use an extra
16408 quote and wrap the value in a vector when appropriate.)
16409
16410 @table @code
16411 @item expire-age
16412 An integer specifying the minimum age, in seconds, of an article
16413 before it will be expired, or the symbol @code{never} to specify that
16414 articles should never be expired.  If this parameter is not set,
16415 @code{nnmaildir} falls back to the usual
16416 @code{nnmail-expiry-wait}(@code{-function}) variables (the
16417 @code{expiry-wait} group parameter overrides @code{nnmail-expiry-wait}
16418 and makes @code{nnmail-expiry-wait-function} ineffective).  If you
16419 wanted a value of 3 days, you could use something like @code{[(* 3 24
16420 60 60)]}; @code{nnmaildir} will evaluate the form and use the result.
16421 An article's age is measured starting from the article file's
16422 modification time.  Normally, this is the same as the article's
16423 delivery time, but editing an article makes it younger.  Moving an
16424 article (other than via expiry) may also make an article younger.
16425
16426 @item expire-group
16427 If this is set to a string such as a full Gnus group name, like
16428 @example
16429 "backend+server.address.string:group.name"
16430 @end example
16431 and if it is not the name of the same group that the parameter belongs
16432 to, then articles will be moved to the specified group during expiry
16433 before being deleted.  @emph{If this is set to an @code{nnmaildir}
16434 group, the article will be just as old in the destination group as it
16435 was in the source group.}  So be careful with @code{expire-age} in the
16436 destination group.  If this is set to the name of the same group that
16437 the parameter belongs to, then the article is not expired at all.  If
16438 you use the vector form, the first element is evaluated once for each
16439 article.  So that form can refer to
16440 @code{nnmaildir-article-file-name}, etc., to decide where to put the
16441 article.  @emph{Even if this parameter is not set, @code{nnmaildir}
16442 does not fall back to the @code{expiry-target} group parameter or the
16443 @code{nnmail-expiry-target} variable.}
16444
16445 @item read-only
16446 If this is set to @code{t}, @code{nnmaildir} will treat the articles
16447 in this maildir as read-only.  This means: articles are not renamed
16448 from @file{new/} into @file{cur/}; articles are only found in
16449 @file{new/}, not @file{cur/}; articles are never deleted; articles
16450 cannot be edited.  @file{new/} is expected to be a symlink to the
16451 @file{new/} directory of another maildir---e.g., a system-wide mailbox
16452 containing a mailing list of common interest.  Everything in the
16453 maildir outside @file{new/} is @emph{not} treated as read-only, so for
16454 a shared mailbox, you do still need to set up your own maildir (or
16455 have write permission to the shared mailbox); your maildir just won't
16456 contain extra copies of the articles.
16457
16458 @item directory-files
16459 A function with the same interface as @code{directory-files}.  It is
16460 used to scan the directories in the maildir corresponding to this
16461 group to find articles.  The default is the function specified by the
16462 server's @code{directory-files} parameter.
16463
16464 @item distrust-Lines:
16465 If non-@code{nil}, @code{nnmaildir} will always count the lines of an
16466 article, rather than use the @code{Lines:} header field.  If
16467 @code{nil}, the header field will be used if present.
16468
16469 @item always-marks
16470 A list of mark symbols, such as @code{['(read expire)]}.  Whenever
16471 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
16472 say that all articles have these marks, regardless of whether the
16473 marks stored in the filesystem say so.  This is a proof-of-concept
16474 feature that will probably be removed eventually; it ought to be done
16475 in Gnus proper, or abandoned if it's not worthwhile.
16476
16477 @item never-marks
16478 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
16479 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
16480 say that no articles have these marks, regardless of whether the marks
16481 stored in the filesystem say so.  @code{never-marks} overrides
16482 @code{always-marks}.  This is a proof-of-concept feature that will
16483 probably be removed eventually; it ought to be done in Gnus proper, or
16484 abandoned if it's not worthwhile.
16485
16486 @item nov-cache-size
16487 An integer specifying the size of the @acronym{NOV} memory cache.  To
16488 speed things up, @code{nnmaildir} keeps @acronym{NOV} data in memory
16489 for a limited number of articles in each group.  (This is probably not
16490 worthwhile, and will probably be removed in the future.)  This
16491 parameter's value is noticed only the first time a group is seen after
16492 the server is opened---i.e., when you first start Gnus, typically.
16493 The @acronym{NOV} cache is never resized until the server is closed
16494 and reopened.  The default is an estimate of the number of articles
16495 that would be displayed in the summary buffer: a count of articles
16496 that are either marked with @code{tick} or not marked with
16497 @code{read}, plus a little extra.
16498 @end table
16499
16500 @node Article Identification
16501 @subsubsection Article identification
16502 Articles are stored in the @file{cur/} subdirectory of each maildir.
16503 Each article file is named like @code{uniq:info}, where @code{uniq}
16504 contains no colons.  @code{nnmaildir} ignores, but preserves, the
16505 @code{:info} part.  (Other maildir readers typically use this part of
16506 the filename to store marks.)  The @code{uniq} part uniquely
16507 identifies the article, and is used in various places in the
16508 @file{.nnmaildir/} subdirectory of the maildir to store information
16509 about the corresponding article.  The full pathname of an article is
16510 available in the variable @code{nnmaildir-article-file-name} after you
16511 request the article in the summary buffer.
16512
16513 @node NOV Data
16514 @subsubsection NOV data
16515 An article identified by @code{uniq} has its @acronym{NOV} data (used
16516 to generate lines in the summary buffer) stored in
16517 @code{.nnmaildir/nov/uniq}.  There is no
16518 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
16519 need for it---an article's @acronym{NOV} data is updated automatically
16520 when the article or @code{nnmail-extra-headers} has changed.)  You can
16521 force @code{nnmaildir} to regenerate the @acronym{NOV} data for a
16522 single article simply by deleting the corresponding @acronym{NOV}
16523 file, but @emph{beware}: this will also cause @code{nnmaildir} to
16524 assign a new article number for this article, which may cause trouble
16525 with @code{seen} marks, the Agent, and the cache.
16526
16527 @node Article Marks
16528 @subsubsection Article marks
16529 An article identified by @code{uniq} is considered to have the mark
16530 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
16531 When Gnus asks @code{nnmaildir} for a group's marks, @code{nnmaildir}
16532 looks for such files and reports the set of marks it finds.  When Gnus
16533 asks @code{nnmaildir} to store a new set of marks, @code{nnmaildir}
16534 creates and deletes the corresponding files as needed.  (Actually,
16535 rather than create a new file for each mark, it just creates hard
16536 links to @file{.nnmaildir/markfile}, to save inodes.)
16537
16538 You can invent new marks by creating a new directory in
16539 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
16540 your server, untar it later, and keep your marks.  You can add and
16541 remove marks yourself by creating and deleting mark files.  If you do
16542 this while Gnus is running and your @code{nnmaildir} server is open,
16543 it's best to exit all summary buffers for @code{nnmaildir} groups and
16544 type @kbd{s} in the group buffer first, and to type @kbd{g} or
16545 @kbd{M-g} in the group buffer afterwards.  Otherwise, Gnus might not
16546 pick up the changes, and might undo them.
16547
16548
16549 @node Mail Folders
16550 @subsubsection Mail Folders
16551 @cindex nnfolder
16552 @cindex mbox folders
16553 @cindex mail folders
16554
16555 @code{nnfolder} is a back end for storing each mail group in a
16556 separate file.  Each file is in the standard Un*x mbox format.
16557 @code{nnfolder} will add extra headers to keep track of article
16558 numbers and arrival dates.
16559
16560 Virtual server settings:
16561
16562 @table @code
16563 @item nnfolder-directory
16564 @vindex nnfolder-directory
16565 All the @code{nnfolder} mail boxes will be stored under this
16566 directory.  The default is the value of @code{message-directory}
16567 (whose default is @file{~/Mail})
16568
16569 @item nnfolder-active-file
16570 @vindex nnfolder-active-file
16571 The name of the active file.  The default is @file{~/Mail/active}.
16572
16573 @item nnfolder-newsgroups-file
16574 @vindex nnfolder-newsgroups-file
16575 The name of the group descriptions file.  @xref{Newsgroups File
16576 Format}.  The default is @file{~/Mail/newsgroups}
16577
16578 @item nnfolder-get-new-mail
16579 @vindex nnfolder-get-new-mail
16580 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The
16581 default is @code{t}
16582
16583 @item nnfolder-save-buffer-hook
16584 @vindex nnfolder-save-buffer-hook
16585 @cindex backup files
16586 Hook run before saving the folders.  Note that Emacs does the normal
16587 backup renaming of files even with the @code{nnfolder} buffers.  If
16588 you wish to switch this off, you could say something like the
16589 following in your @file{.emacs} file:
16590
16591 @lisp
16592 (defun turn-off-backup ()
16593   (set (make-local-variable 'backup-inhibited) t))
16594
16595 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
16596 @end lisp
16597
16598 @item nnfolder-delete-mail-hook
16599 @vindex nnfolder-delete-mail-hook
16600 Hook run in a buffer narrowed to the message that is to be deleted.
16601 This function can be used to copy the message to somewhere else, or to
16602 extract some information from it before removing it.
16603
16604 @item nnfolder-nov-is-evil
16605 @vindex nnfolder-nov-is-evil
16606 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
16607 default is @code{nil}.
16608
16609 @item nnfolder-nov-file-suffix
16610 @vindex nnfolder-nov-file-suffix
16611 The extension for @acronym{NOV} files.  The default is @file{.nov}.
16612
16613 @item nnfolder-nov-directory
16614 @vindex nnfolder-nov-directory
16615 The directory where the @acronym{NOV} files should be stored.  If
16616 @code{nil}, @code{nnfolder-directory} is used.
16617
16618 @end table
16619
16620
16621 @findex nnfolder-generate-active-file
16622 @kindex M-x nnfolder-generate-active-file
16623 If you have lots of @code{nnfolder}-like files you'd like to read with
16624 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
16625 command to make @code{nnfolder} aware of all likely files in
16626 @code{nnfolder-directory}.  This only works if you use long file names,
16627 though.
16628
16629 @node Comparing Mail Back Ends
16630 @subsubsection Comparing Mail Back Ends
16631
16632 First, just for terminology, the @dfn{back end} is the common word for a
16633 low-level access method---a transport, if you will, by which something
16634 is acquired.  The sense is that one's mail has to come from somewhere,
16635 and so selection of a suitable back end is required in order to get that
16636 mail within spitting distance of Gnus.
16637
16638 The same concept exists for Usenet itself: Though access to articles is
16639 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
16640 in the world got at Usenet by running a reader on the machine where the
16641 articles lay (the machine which today we call an @acronym{NNTP} server), and
16642 access was by the reader stepping into the articles' directory spool
16643 area directly.  One can still select between either the @code{nntp} or
16644 @code{nnspool} back ends, to select between these methods, if one happens
16645 actually to live on the server (or can see its spool directly, anyway,
16646 via NFS).
16647
16648 The goal in selecting a mail back end is to pick one which
16649 simultaneously represents a suitable way of dealing with the original
16650 format plus leaving mail in a form that is convenient to use in the
16651 future.  Here are some high and low points on each:
16652
16653 @table @code
16654 @item nnmbox
16655
16656 UNIX systems have historically had a single, very common, and well-defined
16657 format.  All messages arrive in a single @dfn{spool file}, and
16658 they are delineated by a line whose regular expression matches
16659 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
16660 to make it clear in this instance that this is not the RFC-specified
16661 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
16662 historically from the Unix environment, it is simplest if one does not
16663 mess a great deal with the original mailbox format, so if one chooses
16664 this back end, Gnus' primary activity in getting mail from the real spool
16665 area to Gnus' preferred directory is simply to copy it, with no
16666 (appreciable) format change in the process.  It is the ``dumbest'' way
16667 to move mail into availability in the Gnus environment.  This makes it
16668 fast to move into place, but slow to parse, when Gnus has to look at
16669 what's where.
16670
16671 @item nnbabyl
16672
16673 Once upon a time, there was the DEC-10 and DEC-20, running operating
16674 systems called TOPS and related things, and the usual (only?) mail
16675 reading environment was a thing called Babyl.  I don't know what format
16676 was used for mail landing on the system, but Babyl had its own internal
16677 format to which mail was converted, primarily involving creating a
16678 spool-file-like entity with a scheme for inserting Babyl-specific
16679 headers and status bits above the top of each message in the file.
16680 Rmail was Emacs's first mail reader, it was written by Richard Stallman,
16681 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
16682 to understand the mail files folks already had in existence.  Gnus (and
16683 VM, for that matter) continue to support this format because it's
16684 perceived as having some good qualities in those mailer-specific
16685 headers/status bits stuff.  Rmail itself still exists as well, of
16686 course, and is still maintained within Emacs.  Since Emacs 23, it
16687 uses standard mbox format rather than Babyl.
16688
16689 Both of the above forms leave your mail in a single file on your
16690 file system, and they must parse that entire file each time you take a
16691 look at your mail.
16692
16693 @item nnml
16694
16695 @code{nnml} is the back end which smells the most as though you were
16696 actually operating with an @code{nnspool}-accessed Usenet system.  (In
16697 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
16698 lo these years ago.)  One's mail is taken from the original spool file,
16699 and is then cut up into individual message files, 1:1.  It maintains a
16700 Usenet-style active file (analogous to what one finds in an INN- or
16701 CNews-based news system in (for instance) @file{/var/lib/news/active},
16702 or what is returned via the @samp{NNTP LIST} verb) and also creates
16703 @dfn{overview} files for efficient group entry, as has been defined for
16704 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
16705 due to the creation of lots of files, updates to the @code{nnml} active
16706 file, and additions to overview files on a per-message basis, but it is
16707 extremely fast on access because of what amounts to the indexing support
16708 provided by the active file and overviews.
16709
16710 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
16711 resource which defines available places in the file system to put new
16712 files.  Sysadmins take a dim view of heavy inode occupation within
16713 tight, shared file systems.  But if you live on a personal machine where
16714 the file system is your own and space is not at a premium, @code{nnml}
16715 wins big.
16716
16717 It is also problematic using this back end if you are living in a
16718 FAT16-based Windows world, since much space will be wasted on all these
16719 tiny files.
16720
16721 @item nnmh
16722
16723 The Rand MH mail-reading system has been around UNIX systems for a very
16724 long time; it operates by splitting one's spool file of messages into
16725 individual files, but with little or no indexing support---@code{nnmh}
16726 is considered to be semantically equivalent to ``@code{nnml} without
16727 active file or overviews''.  This is arguably the worst choice, because
16728 one gets the slowness of individual file creation married to the
16729 slowness of access parsing when learning what's new in one's groups.
16730
16731 @item nnfolder
16732
16733 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
16734 method described above) on a per-group basis.  That is, @code{nnmbox}
16735 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
16736 little bit of optimization to this so that each of one's mail groups has
16737 a Unix mail box file.  It's faster than @code{nnmbox} because each group
16738 can be parsed separately, and still provides the simple Unix mail box
16739 format requiring minimal effort in moving the mail around.  In addition,
16740 it maintains an ``active'' file making it much faster for Gnus to figure
16741 out how many messages there are in each separate group.
16742
16743 If you have groups that are expected to have a massive amount of
16744 messages, @code{nnfolder} is not the best choice, but if you receive
16745 only a moderate amount of mail, @code{nnfolder} is probably the most
16746 friendly mail back end all over.
16747
16748 @item nnmaildir
16749
16750 For configuring expiry and other things, @code{nnmaildir} uses
16751 incompatible group parameters, slightly different from those of other
16752 mail back ends.
16753
16754 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
16755 differences. Each message is stored in a separate file, but the
16756 filename is unrelated to the article number in Gnus. @code{nnmaildir}
16757 also stores the equivalent of @code{nnml}'s overview files in one file
16758 per article, so it uses about twice as many inodes as @code{nnml}.
16759 (Use @code{df -i} to see how plentiful your inode supply is.) If this
16760 slows you down or takes up very much space, a non-block-structured
16761 file system.
16762
16763 Since maildirs don't require locking for delivery, the maildirs you use
16764 as groups can also be the maildirs your mail is directly delivered to.
16765 This means you can skip Gnus' mail splitting if your mail is already
16766 organized into different mailboxes during delivery.  A @code{directory}
16767 entry in @code{mail-sources} would have a similar effect, but would
16768 require one set of mailboxes for spooling deliveries (in mbox format,
16769 thus damaging message bodies), and another set to be used as groups (in
16770 whatever format you like).  A maildir has a built-in spool, in the
16771 @code{new/} subdirectory.  Beware that currently, mail moved from
16772 @code{new/} to @code{cur/} instead of via mail splitting will not
16773 undergo treatment such as duplicate checking.
16774
16775 @code{nnmaildir} stores article marks for a given group in the
16776 corresponding maildir, in a way designed so that it's easy to manipulate
16777 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
16778 else, and still have your marks.
16779
16780 @code{nnmaildir} uses a significant amount of memory to speed things up.
16781 (It keeps in memory some of the things that @code{nnml} stores in files
16782 and that @code{nnmh} repeatedly parses out of message files.)  If this
16783 is a problem for you, you can set the @code{nov-cache-size} group
16784 parameter to something small (0 would probably not work, but 1 probably
16785 would) to make it use less memory.  This caching will probably be
16786 removed in the future.
16787
16788 Startup is likely to be slower with @code{nnmaildir} than with other
16789 back ends.  Everything else is likely to be faster, depending in part
16790 on your file system.
16791
16792 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
16793 to write an @code{nnmaildir}-derived back end.
16794
16795 @end table
16796
16797
16798 @node Browsing the Web
16799 @section Browsing the Web
16800 @cindex web
16801 @cindex browsing the web
16802 @cindex www
16803 @cindex http
16804
16805 Web-based discussion forums are getting more and more popular.  On many
16806 subjects, the web-based forums have become the most important forums,
16807 eclipsing the importance of mailing lists and news groups.  The reason
16808 is easy to understand---they are friendly to new users; you just point
16809 and click, and there's the discussion.  With mailing lists, you have to
16810 go through a cumbersome subscription procedure, and most people don't
16811 even know what a news group is.
16812
16813 The problem with this scenario is that web browsers are not very good at
16814 being newsreaders.  They do not keep track of what articles you've read;
16815 they do not allow you to score on subjects you're interested in; they do
16816 not allow off-line browsing; they require you to click around and drive
16817 you mad in the end.
16818
16819 So---if web browsers suck at reading discussion forums, why not use Gnus
16820 to do it instead?
16821
16822 Gnus has been getting a bit of a collection of back ends for providing
16823 interfaces to these sources.
16824
16825 @menu
16826 * Archiving Mail::
16827 * Web Searches::                Creating groups from articles that match a string.
16828 * RSS::                         Reading RDF site summary.
16829 * Customizing W3::              Doing stuff to Emacs/W3 from Gnus.
16830 @end menu
16831
16832 All the web sources require Emacs/W3 and the url library or those
16833 alternatives to work.
16834
16835 The main caveat with all these web sources is that they probably won't
16836 work for a very long time.  Gleaning information from the @acronym{HTML} data
16837 is guesswork at best, and when the layout is altered, the Gnus back end
16838 will fail.  If you have reasonably new versions of these back ends,
16839 though, you should be ok.
16840
16841 One thing all these Web methods have in common is that the Web sources
16842 are often down, unavailable or just plain too slow to be fun.  In those
16843 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
16844 Unplugged}) handle downloading articles, and then you can read them at
16845 leisure from your local disk.  No more World Wide Wait for you.
16846
16847 @node Archiving Mail
16848 @subsection Archiving Mail
16849 @cindex archiving mail
16850 @cindex backup of mail
16851
16852 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
16853 @code{nnmaildir}, now actually store the article marks with each group.
16854 For these servers, archiving and restoring a group while preserving
16855 marks is fairly simple.
16856
16857 (Preserving the group level and group parameters as well still
16858 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
16859 though.)
16860
16861 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
16862 server, take a recursive copy of the server directory.  There is no need
16863 to shut down Gnus, so archiving may be invoked by @code{cron} or
16864 similar.  You restore the data by restoring the directory tree, and
16865 adding a server definition pointing to that directory in Gnus.  The
16866 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
16867 might interfere with overwriting data, so you may want to shut down Gnus
16868 before you restore the data.
16869
16870 @node Web Searches
16871 @subsection Web Searches
16872 @cindex nnweb
16873 @cindex Google
16874 @cindex dejanews
16875 @cindex gmane
16876 @cindex Usenet searches
16877 @cindex searching the Usenet
16878
16879 It's, like, too neat to search the Usenet for articles that match a
16880 string, but it, like, totally @emph{sucks}, like, totally, to use one of
16881 those, like, Web browsers, and you, like, have to, rilly, like, look at
16882 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
16883 searches without having to use a browser.
16884
16885 The @code{nnweb} back end allows an easy interface to the mighty search
16886 engine.  You create an @code{nnweb} group, enter a search pattern, and
16887 then enter the group and read the articles like you would any normal
16888 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
16889 Groups}) will do this in an easy-to-use fashion.
16890
16891 @code{nnweb} groups don't really lend themselves to being solid
16892 groups---they have a very fleeting idea of article numbers.  In fact,
16893 each time you enter an @code{nnweb} group (not even changing the search
16894 pattern), you are likely to get the articles ordered in a different
16895 manner.  Not even using duplicate suppression (@pxref{Duplicate
16896 Suppression}) will help, since @code{nnweb} doesn't even know the
16897 @code{Message-ID} of the articles before reading them using some search
16898 engines (Google, for instance).  The only possible way to keep track
16899 of which articles you've read is by scoring on the @code{Date}
16900 header---mark all articles posted before the last date you read the
16901 group as read.
16902
16903 If the search engine changes its output substantially, @code{nnweb}
16904 won't be able to parse it and will fail.  One could hardly fault the Web
16905 providers if they were to do this---their @emph{raison d'@^etre} is to
16906 make money off of advertisements, not to provide services to the
16907 community.  Since @code{nnweb} washes the ads off all the articles, one
16908 might think that the providers might be somewhat miffed.  We'll see.
16909
16910 You must have the @code{url} and @code{W3} package or those alternatives
16911 (try @code{customize-group} on the @samp{mm-url} variable group)
16912 installed to be able to use @code{nnweb}.
16913
16914 Virtual server variables:
16915
16916 @table @code
16917 @item nnweb-type
16918 @vindex nnweb-type
16919 What search engine type is being used.  The currently supported types
16920 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
16921 @code{dejanews} is an alias to @code{google}.
16922
16923 @item nnweb-search
16924 @vindex nnweb-search
16925 The search string to feed to the search engine.
16926
16927 @item nnweb-max-hits
16928 @vindex nnweb-max-hits
16929 Advisory maximum number of hits per search to display.  The default is
16930 999.
16931
16932 @item nnweb-type-definition
16933 @vindex nnweb-type-definition
16934 Type-to-definition alist.  This alist says what @code{nnweb} should do
16935 with the various search engine types.  The following elements must be
16936 present:
16937
16938 @table @code
16939 @item article
16940 Function to decode the article and provide something that Gnus
16941 understands.
16942
16943 @item map
16944 Function to create an article number to message header and URL alist.
16945
16946 @item search
16947 Function to send the search string to the search engine.
16948
16949 @item address
16950 The address the aforementioned function should send the search string
16951 to.
16952
16953 @item id
16954 Format string URL to fetch an article by @code{Message-ID}.
16955 @end table
16956
16957 @end table
16958
16959
16960 @node RSS
16961 @subsection RSS
16962 @cindex nnrss
16963 @cindex RSS
16964
16965 Some web sites have an RDF Site Summary (@acronym{RSS}).
16966 @acronym{RSS} is a format for summarizing headlines from news related
16967 sites (such as BBC or CNN).  But basically anything list-like can be
16968 presented as an @acronym{RSS} feed: weblogs, changelogs or recent
16969 changes to a wiki (e.g., @url{http://cliki.net/site/recent-changes}).
16970
16971 @acronym{RSS} has a quite regular and nice interface, and it's
16972 possible to get the information Gnus needs to keep groups updated.
16973
16974 Note: you had better use Emacs which supports the @code{utf-8} coding
16975 system because @acronym{RSS} uses UTF-8 for encoding non-@acronym{ASCII}
16976 text by default.  It is also used by default for non-@acronym{ASCII}
16977 group names.
16978
16979 @kindex G R (Group)
16980 Use @kbd{G R} from the group buffer to subscribe to a feed---you will be
16981 prompted for the location, the title and the description of the feed.
16982 The title, which allows any characters, will be used for the group name
16983 and the name of the group data file.  The description can be omitted.
16984
16985 An easy way to get started with @code{nnrss} is to say something like
16986 the following in the group buffer: @kbd{B nnrss RET RET y}, then
16987 subscribe to groups.
16988
16989 The @code{nnrss} back end saves the group data file in
16990 @code{nnrss-directory} (see below) for each @code{nnrss} group.  File
16991 names containing non-@acronym{ASCII} characters will be encoded by the
16992 coding system specified with the @code{nnmail-pathname-coding-system}
16993 variable or other.  Also @xref{Non-ASCII Group Names}, for more
16994 information.
16995
16996 The @code{nnrss} back end generates @samp{multipart/alternative}
16997 @acronym{MIME} articles in which each contains a @samp{text/plain} part
16998 and a @samp{text/html} part.
16999
17000 @cindex OPML
17001 You can also use the following commands to import and export your
17002 subscriptions from a file in @acronym{OPML} format (Outline Processor
17003 Markup Language).
17004
17005 @defun nnrss-opml-import file
17006 Prompt for an @acronym{OPML} file, and subscribe to each feed in the
17007 file.
17008 @end defun
17009
17010 @defun nnrss-opml-export
17011 Write your current @acronym{RSS} subscriptions to a buffer in
17012 @acronym{OPML} format.
17013 @end defun
17014
17015 The following @code{nnrss} variables can be altered:
17016
17017 @table @code
17018 @item nnrss-directory
17019 @vindex nnrss-directory
17020 The directory where @code{nnrss} stores its files.  The default is
17021 @file{~/News/rss/}.
17022
17023 @item nnrss-file-coding-system
17024 @vindex nnrss-file-coding-system
17025 The coding system used when reading and writing the @code{nnrss} groups
17026 data files.  The default is the value of
17027 @code{mm-universal-coding-system} (which defaults to @code{emacs-mule}
17028 in Emacs or @code{escape-quoted} in XEmacs).
17029
17030 @item nnrss-ignore-article-fields
17031 @vindex nnrss-ignore-article-fields
17032 Some feeds update constantly article fields during their publications,
17033 e.g., to indicate the number of comments.  However, if there is
17034 a difference between the local article and the distant one, the latter
17035 is considered to be new.  To avoid this and discard some fields, set this
17036 variable to the list of fields to be ignored.  The default is
17037 @code{'(slash:comments)}.
17038
17039 @item nnrss-use-local
17040 @vindex nnrss-use-local
17041 @findex nnrss-generate-download-script
17042 If you set @code{nnrss-use-local} to @code{t}, @code{nnrss} will read
17043 the feeds from local files in @code{nnrss-directory}.  You can use
17044 the command @code{nnrss-generate-download-script} to generate a
17045 download script using @command{wget}.
17046 @end table
17047
17048 The following code may be helpful, if you want to show the description in
17049 the summary buffer.
17050
17051 @lisp
17052 (add-to-list 'nnmail-extra-headers nnrss-description-field)
17053 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
17054
17055 (defun gnus-user-format-function-X (header)
17056   (let ((descr
17057          (assq nnrss-description-field (mail-header-extra header))))
17058     (if descr (concat "\n\t" (cdr descr)) "")))
17059 @end lisp
17060
17061 The following code may be useful to open an nnrss url directly from the
17062 summary buffer.
17063
17064 @lisp
17065 (require 'browse-url)
17066
17067 (defun browse-nnrss-url (arg)
17068   (interactive "p")
17069   (let ((url (assq nnrss-url-field
17070                    (mail-header-extra
17071                     (gnus-data-header
17072                      (assq (gnus-summary-article-number)
17073                            gnus-newsgroup-data))))))
17074     (if url
17075         (progn
17076           (browse-url (cdr url))
17077           (gnus-summary-mark-as-read-forward 1))
17078       (gnus-summary-scroll-up arg))))
17079
17080 (eval-after-load "gnus"
17081   #'(define-key gnus-summary-mode-map
17082       (kbd "<RET>") 'browse-nnrss-url))
17083 (add-to-list 'nnmail-extra-headers nnrss-url-field)
17084 @end lisp
17085
17086 Even if you have added @samp{text/html} to the
17087 @code{mm-discouraged-alternatives} variable (@pxref{Display
17088 Customization, ,Display Customization, emacs-mime, The Emacs MIME
17089 Manual}) since you don't want to see @acronym{HTML} parts, it might be
17090 more useful especially in @code{nnrss} groups to display
17091 @samp{text/html} parts.  Here's an example of setting
17092 @code{mm-discouraged-alternatives} as a group parameter (@pxref{Group
17093 Parameters}) in order to display @samp{text/html} parts only in
17094 @code{nnrss} groups:
17095
17096 @lisp
17097 ;; @r{Set the default value of @code{mm-discouraged-alternatives}.}
17098 (eval-after-load "gnus-sum"
17099   '(add-to-list
17100     'gnus-newsgroup-variables
17101     '(mm-discouraged-alternatives
17102       . '("text/html" "image/.*"))))
17103
17104 ;; @r{Display @samp{text/html} parts in @code{nnrss} groups.}
17105 (add-to-list
17106  'gnus-parameters
17107  '("\\`nnrss:" (mm-discouraged-alternatives nil)))
17108 @end lisp
17109
17110
17111 @node Customizing W3
17112 @subsection Customizing W3
17113 @cindex W3
17114 @cindex html
17115 @cindex url
17116 @cindex Netscape
17117
17118 Gnus uses the url library to fetch web pages and Emacs/W3 (or those
17119 alternatives) to display web pages.  Emacs/W3 is documented in its own
17120 manual, but there are some things that may be more relevant for Gnus
17121 users.
17122
17123 For instance, a common question is how to make Emacs/W3 follow links
17124 using the @code{browse-url} functions (which will call some external web
17125 browser like Netscape).  Here's one way:
17126
17127 @lisp
17128 (eval-after-load "w3"
17129   '(progn
17130     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
17131     (defun w3-fetch (&optional url target)
17132       (interactive (list (w3-read-url-with-default)))
17133       (if (eq major-mode 'gnus-article-mode)
17134           (browse-url url)
17135         (w3-fetch-orig url target)))))
17136 @end lisp
17137
17138 Put that in your @file{.emacs} file, and hitting links in W3-rendered
17139 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
17140 follow the link.
17141
17142
17143 @node Other Sources
17144 @section Other Sources
17145
17146 Gnus can do more than just read news or mail.  The methods described
17147 below allow Gnus to view directories and files as if they were
17148 newsgroups.
17149
17150 @menu
17151 * Directory Groups::            You can read a directory as if it was a newsgroup.
17152 * Anything Groups::             Dired?  Who needs dired?
17153 * Document Groups::             Single files can be the basis of a group.
17154 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
17155 * The Empty Backend::           The backend that never has any news.
17156 @end menu
17157
17158
17159 @node Directory Groups
17160 @subsection Directory Groups
17161 @cindex nndir
17162 @cindex directory groups
17163
17164 If you have a directory that has lots of articles in separate files in
17165 it, you might treat it as a newsgroup.  The files have to have numerical
17166 names, of course.
17167
17168 This might be an opportune moment to mention @code{ange-ftp} (and its
17169 successor @code{efs}), that most wonderful of all wonderful Emacs
17170 packages.  When I wrote @code{nndir}, I didn't think much about it---a
17171 back end to read directories.  Big deal.
17172
17173 @code{ange-ftp} changes that picture dramatically.  For instance, if you
17174 enter the @code{ange-ftp} file name
17175 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
17176 @code{ange-ftp} or @code{efs} will actually allow you to read this
17177 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
17178
17179 @code{nndir} will use @acronym{NOV} files if they are present.
17180
17181 @code{nndir} is a ``read-only'' back end---you can't delete or expire
17182 articles with this method.  You can use @code{nnmh} or @code{nnml} for
17183 whatever you use @code{nndir} for, so you could switch to any of those
17184 methods if you feel the need to have a non-read-only @code{nndir}.
17185
17186
17187 @node Anything Groups
17188 @subsection Anything Groups
17189 @cindex nneething
17190
17191 From the @code{nndir} back end (which reads a single spool-like
17192 directory), it's just a hop and a skip to @code{nneething}, which
17193 pretends that any arbitrary directory is a newsgroup.  Strange, but
17194 true.
17195
17196 When @code{nneething} is presented with a directory, it will scan this
17197 directory and assign article numbers to each file.  When you enter such
17198 a group, @code{nneething} must create ``headers'' that Gnus can use.
17199 After all, Gnus is a newsreader, in case you're forgetting.
17200 @code{nneething} does this in a two-step process.  First, it snoops each
17201 file in question.  If the file looks like an article (i.e., the first
17202 few lines look like headers), it will use this as the head.  If this is
17203 just some arbitrary file without a head (e.g., a C source file),
17204 @code{nneething} will cobble up a header out of thin air.  It will use
17205 file ownership, name and date and do whatever it can with these
17206 elements.
17207
17208 All this should happen automatically for you, and you will be presented
17209 with something that looks very much like a newsgroup.  Totally like a
17210 newsgroup, to be precise.  If you select an article, it will be displayed
17211 in the article buffer, just as usual.
17212
17213 If you select a line that represents a directory, Gnus will pop you into
17214 a new summary buffer for this @code{nneething} group.  And so on.  You can
17215 traverse the entire disk this way, if you feel like, but remember that
17216 Gnus is not dired, really, and does not intend to be, either.
17217
17218 There are two overall modes to this action---ephemeral or solid.  When
17219 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
17220 will not store information on what files you have read, and what files
17221 are new, and so on.  If you create a solid @code{nneething} group the
17222 normal way with @kbd{G m}, Gnus will store a mapping table between
17223 article numbers and file names, and you can treat this group like any
17224 other groups.  When you activate a solid @code{nneething} group, you will
17225 be told how many unread articles it contains, etc., etc.
17226
17227 Some variables:
17228
17229 @table @code
17230 @item nneething-map-file-directory
17231 @vindex nneething-map-file-directory
17232 All the mapping files for solid @code{nneething} groups will be stored
17233 in this directory, which defaults to @file{~/.nneething/}.
17234
17235 @item nneething-exclude-files
17236 @vindex nneething-exclude-files
17237 All files that match this regexp will be ignored.  Nice to use to exclude
17238 auto-save files and the like, which is what it does by default.
17239
17240 @item nneething-include-files
17241 @vindex nneething-include-files
17242 Regexp saying what files to include in the group.  If this variable is
17243 non-@code{nil}, only files matching this regexp will be included.
17244
17245 @item nneething-map-file
17246 @vindex nneething-map-file
17247 Name of the map files.
17248 @end table
17249
17250
17251 @node Document Groups
17252 @subsection Document Groups
17253 @cindex nndoc
17254 @cindex documentation group
17255 @cindex help group
17256
17257 @code{nndoc} is a cute little thing that will let you read a single file
17258 as a newsgroup.  Several files types are supported:
17259
17260 @table @code
17261 @cindex Babyl
17262 @item babyl
17263 The Babyl format.
17264
17265 @cindex mbox
17266 @cindex Unix mbox
17267 @item mbox
17268 The standard Unix mbox file.
17269
17270 @cindex MMDF mail box
17271 @item mmdf
17272 The MMDF mail box format.
17273
17274 @item news
17275 Several news articles appended into a file.
17276
17277 @cindex rnews batch files
17278 @item rnews
17279 The rnews batch transport format.
17280
17281 @item nsmail
17282 Netscape mail boxes.
17283
17284 @item mime-parts
17285 @acronym{MIME} multipart messages.
17286
17287 @item standard-digest
17288 The standard (RFC 1153) digest format.
17289
17290 @item mime-digest
17291 A @acronym{MIME} digest of messages.
17292
17293 @item lanl-gov-announce
17294 Announcement messages from LANL Gov Announce.
17295
17296 @cindex git commit messages
17297 @item git
17298 @code{git} commit messages.
17299
17300 @cindex forwarded messages
17301 @item rfc822-forward
17302 A message forwarded according to RFC822.
17303
17304 @item outlook
17305 The Outlook mail box.
17306
17307 @item oe-dbx
17308 The Outlook Express dbx mail box.
17309
17310 @item exim-bounce
17311 A bounce message from the Exim MTA.
17312
17313 @item forward
17314 A message forwarded according to informal rules.
17315
17316 @item rfc934
17317 An RFC934-forwarded message.
17318
17319 @item mailman
17320 A mailman digest.
17321
17322 @item clari-briefs
17323 A digest of Clarinet brief news items.
17324
17325 @item slack-digest
17326 Non-standard digest format---matches most things, but does it badly.
17327
17328 @item mail-in-mail
17329 The last resort.
17330 @end table
17331
17332 You can also use the special ``file type'' @code{guess}, which means
17333 that @code{nndoc} will try to guess what file type it is looking at.
17334 @code{digest} means that @code{nndoc} should guess what digest type the
17335 file is.
17336
17337 @code{nndoc} will not try to change the file or insert any extra headers into
17338 it---it will simply, like, let you use the file as the basis for a
17339 group.  And that's it.
17340
17341 If you have some old archived articles that you want to insert into your
17342 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
17343 that.  Say you have an old @file{RMAIL} file with mail that you now want
17344 to split into your new @code{nnml} groups.  You look at that file using
17345 @code{nndoc} (using the @kbd{G f} command in the group buffer
17346 (@pxref{Foreign Groups})), set the process mark on all the articles in
17347 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
17348 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
17349 file is now also stored in lots of @code{nnml} directories, and you can
17350 delete that pesky @file{RMAIL} file.  If you have the guts!
17351
17352 Virtual server variables:
17353
17354 @table @code
17355 @item nndoc-article-type
17356 @vindex nndoc-article-type
17357 This should be one of @code{mbox}, @code{babyl}, @code{digest},
17358 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
17359 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
17360 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
17361 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
17362
17363 @item nndoc-post-type
17364 @vindex nndoc-post-type
17365 This variable says whether Gnus is to consider the group a news group or
17366 a mail group.  There are two valid values:  @code{mail} (the default)
17367 and @code{news}.
17368 @end table
17369
17370 @menu
17371 * Document Server Internals::   How to add your own document types.
17372 @end menu
17373
17374
17375 @node Document Server Internals
17376 @subsubsection Document Server Internals
17377
17378 Adding new document types to be recognized by @code{nndoc} isn't
17379 difficult.  You just have to whip up a definition of what the document
17380 looks like, write a predicate function to recognize that document type,
17381 and then hook into @code{nndoc}.
17382
17383 First, here's an example document type definition:
17384
17385 @example
17386 (mmdf
17387  (article-begin .  "^\^A\^A\^A\^A\n")
17388  (body-end .  "^\^A\^A\^A\^A\n"))
17389 @end example
17390
17391 The definition is simply a unique @dfn{name} followed by a series of
17392 regexp pseudo-variable settings.  Below are the possible
17393 variables---don't be daunted by the number of variables; most document
17394 types can be defined with very few settings:
17395
17396 @table @code
17397 @item first-article
17398 If present, @code{nndoc} will skip past all text until it finds
17399 something that match this regexp.  All text before this will be
17400 totally ignored.
17401
17402 @item article-begin
17403 This setting has to be present in all document type definitions.  It
17404 says what the beginning of each article looks like.  To do more
17405 complicated things that cannot be dealt with a simple regexp, you can
17406 use @code{article-begin-function} instead of this.
17407
17408 @item article-begin-function
17409 If present, this should be a function that moves point to the beginning
17410 of each article.  This setting overrides @code{article-begin}.
17411
17412 @item head-begin
17413 If present, this should be a regexp that matches the head of the
17414 article.  To do more complicated things that cannot be dealt with a
17415 simple regexp, you can use @code{head-begin-function} instead of this.
17416
17417 @item head-begin-function
17418 If present, this should be a function that moves point to the head of
17419 the article.  This setting overrides @code{head-begin}.
17420
17421 @item head-end
17422 This should match the end of the head of the article.  It defaults to
17423 @samp{^$}---the empty line.
17424
17425 @item body-begin
17426 This should match the beginning of the body of the article.  It defaults
17427 to @samp{^\n}.  To do more complicated things that cannot be dealt with
17428 a simple regexp, you can use @code{body-begin-function} instead of this.
17429
17430 @item body-begin-function
17431 If present, this function should move point to the beginning of the body
17432 of the article.  This setting overrides @code{body-begin}.
17433
17434 @item body-end
17435 If present, this should match the end of the body of the article.  To do
17436 more complicated things that cannot be dealt with a simple regexp, you
17437 can use @code{body-end-function} instead of this.
17438
17439 @item body-end-function
17440 If present, this function should move point to the end of the body of
17441 the article.  This setting overrides @code{body-end}.
17442
17443 @item file-begin
17444 If present, this should match the beginning of the file.  All text
17445 before this regexp will be totally ignored.
17446
17447 @item file-end
17448 If present, this should match the end of the file.  All text after this
17449 regexp will be totally ignored.
17450
17451 @end table
17452
17453 So, using these variables @code{nndoc} is able to dissect a document
17454 file into a series of articles, each with a head and a body.  However, a
17455 few more variables are needed since not all document types are all that
17456 news-like---variables needed to transform the head or the body into
17457 something that's palatable for Gnus:
17458
17459 @table @code
17460 @item prepare-body-function
17461 If present, this function will be called when requesting an article.  It
17462 will be called with point at the start of the body, and is useful if the
17463 document has encoded some parts of its contents.
17464
17465 @item article-transform-function
17466 If present, this function is called when requesting an article.  It's
17467 meant to be used for more wide-ranging transformation of both head and
17468 body of the article.
17469
17470 @item generate-head-function
17471 If present, this function is called to generate a head that Gnus can
17472 understand.  It is called with the article number as a parameter, and is
17473 expected to generate a nice head for the article in question.  It is
17474 called when requesting the headers of all articles.
17475
17476 @item generate-article-function
17477 If present, this function is called to generate an entire article that
17478 Gnus can understand.  It is called with the article number as a
17479 parameter when requesting all articles.
17480
17481 @item dissection-function
17482 If present, this function is called to dissect a document by itself,
17483 overriding @code{first-article}, @code{article-begin},
17484 @code{article-begin-function}, @code{head-begin},
17485 @code{head-begin-function}, @code{head-end}, @code{body-begin},
17486 @code{body-begin-function}, @code{body-end}, @code{body-end-function},
17487 @code{file-begin}, and @code{file-end}.
17488
17489 @end table
17490
17491 Let's look at the most complicated example I can come up with---standard
17492 digests:
17493
17494 @example
17495 (standard-digest
17496  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
17497  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
17498  (prepare-body-function . nndoc-unquote-dashes)
17499  (body-end-function . nndoc-digest-body-end)
17500  (head-end . "^ ?$")
17501  (body-begin . "^ ?\n")
17502  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
17503  (subtype digest guess))
17504 @end example
17505
17506 We see that all text before a 70-width line of dashes is ignored; all
17507 text after a line that starts with that @samp{^End of} is also ignored;
17508 each article begins with a 30-width line of dashes; the line separating
17509 the head from the body may contain a single space; and that the body is
17510 run through @code{nndoc-unquote-dashes} before being delivered.
17511
17512 To hook your own document definition into @code{nndoc}, use the
17513 @code{nndoc-add-type} function.  It takes two parameters---the first
17514 is the definition itself and the second (optional) parameter says
17515 where in the document type definition alist to put this definition.
17516 The alist is traversed sequentially, and
17517 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
17518 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
17519 @code{mmdf} type, and so on.  These type predicates should return
17520 @code{nil} if the document is not of the correct type; @code{t} if it
17521 is of the correct type; and a number if the document might be of the
17522 correct type.  A high number means high probability; a low number
17523 means low probability with @samp{0} being the lowest valid number.
17524
17525
17526 @node Mail-To-News Gateways
17527 @subsection Mail-To-News Gateways
17528 @cindex mail-to-news gateways
17529 @cindex gateways
17530
17531 If your local @code{nntp} server doesn't allow posting, for some reason
17532 or other, you can post using one of the numerous mail-to-news gateways.
17533 The @code{nngateway} back end provides the interface.
17534
17535 Note that you can't read anything from this back end---it can only be
17536 used to post with.
17537
17538 Server variables:
17539
17540 @table @code
17541 @item nngateway-address
17542 @vindex nngateway-address
17543 This is the address of the mail-to-news gateway.
17544
17545 @item nngateway-header-transformation
17546 @vindex nngateway-header-transformation
17547 News headers often have to be transformed in some odd way or other
17548 for the mail-to-news gateway to accept it.  This variable says what
17549 transformation should be called, and defaults to
17550 @code{nngateway-simple-header-transformation}.  The function is called
17551 narrowed to the headers to be transformed and with one parameter---the
17552 gateway address.
17553
17554 This default function just inserts a new @code{To} header based on the
17555 @code{Newsgroups} header and the gateway address.
17556 For instance, an article with this @code{Newsgroups} header:
17557
17558 @example
17559 Newsgroups: alt.religion.emacs
17560 @end example
17561
17562 will get this @code{To} header inserted:
17563
17564 @example
17565 To: alt-religion-emacs@@GATEWAY
17566 @end example
17567
17568 The following pre-defined functions exist:
17569
17570 @findex nngateway-simple-header-transformation
17571 @table @code
17572
17573 @item nngateway-simple-header-transformation
17574 Creates a @code{To} header that looks like
17575 @var{newsgroup}@@@code{nngateway-address}.
17576
17577 @findex nngateway-mail2news-header-transformation
17578
17579 @item nngateway-mail2news-header-transformation
17580 Creates a @code{To} header that looks like
17581 @code{nngateway-address}.
17582 @end table
17583
17584 @end table
17585
17586 Here's an example:
17587
17588 @lisp
17589 (setq gnus-post-method
17590       '(nngateway
17591         "mail2news@@replay.com"
17592         (nngateway-header-transformation
17593          nngateway-mail2news-header-transformation)))
17594 @end lisp
17595
17596 So, to use this, simply say something like:
17597
17598 @lisp
17599 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17600 @end lisp
17601
17602
17603 @node The Empty Backend
17604 @subsection The Empty Backend
17605 @cindex nnnil
17606
17607 @code{nnnil} is a backend that can be used as a placeholder if you
17608 have to specify a backend somewhere, but don't really want to.  The
17609 classical example is if you don't want to have a primary select
17610 methods, but want to only use secondary ones:
17611
17612 @lisp
17613 (setq gnus-select-method '(nnnil ""))
17614 (setq gnus-secondary-select-methods
17615       '((nnimap "foo")
17616         (nnml "")))
17617 @end lisp
17618
17619
17620 @node Combined Groups
17621 @section Combined Groups
17622
17623 Gnus allows combining a mixture of all the other group types into bigger
17624 groups.
17625
17626 @menu
17627 * Virtual Groups::              Combining articles from many groups.
17628 @end menu
17629
17630
17631 @node Virtual Groups
17632 @subsection Virtual Groups
17633 @cindex nnvirtual
17634 @cindex virtual groups
17635 @cindex merging groups
17636
17637 An @dfn{nnvirtual group} is really nothing more than a collection of
17638 other groups.
17639
17640 For instance, if you are tired of reading many small groups, you can
17641 put them all in one big group, and then grow tired of reading one
17642 big, unwieldy group.  The joys of computing!
17643
17644 You specify @code{nnvirtual} as the method.  The address should be a
17645 regexp to match component groups.
17646
17647 All marks in the virtual group will stick to the articles in the
17648 component groups.  So if you tick an article in a virtual group, the
17649 article will also be ticked in the component group from whence it
17650 came.  (And vice versa---marks from the component groups will also be
17651 shown in the virtual group.).  To create an empty virtual group, run
17652 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17653 and edit the method regexp with @kbd{M-e}
17654 (@code{gnus-group-edit-group-method})
17655
17656 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17657 newsgroups into one, big, happy newsgroup:
17658
17659 @lisp
17660 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17661 @end lisp
17662
17663 The component groups can be native or foreign; everything should work
17664 smoothly, but if your computer explodes, it was probably my fault.
17665
17666 Collecting the same group from several servers might actually be a good
17667 idea if users have set the Distribution header to limit distribution.
17668 If you would like to read @samp{soc.motss} both from a server in Japan
17669 and a server in Norway, you could use the following as the group regexp:
17670
17671 @example
17672 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17673 @end example
17674
17675 (Remember, though, that if you're creating the group with @kbd{G m}, you
17676 shouldn't double the backslashes, and you should leave off the quote
17677 characters at the beginning and the end of the string.)
17678
17679 This should work kinda smoothly---all articles from both groups should
17680 end up in this one, and there should be no duplicates.  Threading (and
17681 the rest) will still work as usual, but there might be problems with the
17682 sequence of articles.  Sorting on date might be an option here
17683 (@pxref{Selecting a Group}).
17684
17685 One limitation, however---all groups included in a virtual
17686 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17687 zombie groups can't be component groups for @code{nnvirtual} groups.
17688
17689 @vindex nnvirtual-always-rescan
17690 If the @code{nnvirtual-always-rescan} variable is non-@code{nil} (which
17691 is the default), @code{nnvirtual} will always scan groups for unread
17692 articles when entering a virtual group.  If this variable is @code{nil}
17693 and you read articles in a component group after the virtual group has
17694 been activated, the read articles from the component group will show up
17695 when you enter the virtual group.  You'll also see this effect if you
17696 have two virtual groups that have a component group in common.  If
17697 that's the case, you should set this variable to @code{t}.  Or you can
17698 just tap @code{M-g} on the virtual group every time before you enter
17699 it---it'll have much the same effect.
17700
17701 @code{nnvirtual} can have both mail and news groups as component groups.
17702 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17703 has to ask the back end of the component group the article comes from
17704 whether it is a news or mail back end.  However, when you do a @kbd{^},
17705 there is typically no sure way for the component back end to know this,
17706 and in that case @code{nnvirtual} tells Gnus that the article came from a
17707 not-news back end.  (Just to be on the safe side.)
17708
17709 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17710 line from the article you respond to in these cases.
17711
17712 @code{nnvirtual} groups do not inherit anything but articles and marks
17713 from component groups---group parameters, for instance, are not
17714 inherited.
17715
17716
17717 @node Email Based Diary
17718 @section Email Based Diary
17719 @cindex diary
17720 @cindex email based diary
17721 @cindex calendar
17722
17723 This section describes a special mail back end called @code{nndiary},
17724 and its companion library @code{gnus-diary}.  It is ``special'' in the
17725 sense that it is not meant to be one of the standard alternatives for
17726 reading mail with Gnus.  See @ref{Choosing a Mail Back End} for that.
17727 Instead, it is used to treat @emph{some} of your mails in a special way,
17728 namely, as event reminders.
17729
17730 Here is a typical scenario:
17731
17732 @itemize @bullet
17733 @item
17734 You've got a date with Andy Mc Dowell or Bruce Willis (select according
17735 to your sexual preference) in one month.  You don't want to forget it.
17736 @item
17737 So you send a ``reminder'' message (actually, a diary one) to yourself.
17738 @item
17739 You forget all about it and keep on getting and reading new mail, as usual.
17740 @item
17741 From time to time, as you type `g' in the group buffer and as the date
17742 is getting closer, the message will pop up again to remind you of your
17743 appointment, just as if it were new and unread.
17744 @item
17745 Read your ``new'' messages, this one included, and start dreaming again
17746 of the night you're gonna have.
17747 @item
17748 Once the date is over (you actually fell asleep just after dinner), the
17749 message will be automatically deleted if it is marked as expirable.
17750 @end itemize
17751
17752 The Gnus Diary back end has the ability to handle regular appointments
17753 (that wouldn't ever be deleted) as well as punctual ones, operates as a
17754 real mail back end and is configurable in many ways.  All of this is
17755 explained in the sections below.
17756
17757 @menu
17758 * The NNDiary Back End::        Basic setup and usage.
17759 * The Gnus Diary Library::      Utility toolkit on top of nndiary.
17760 * Sending or Not Sending::      A final note on sending diary messages.
17761 @end menu
17762
17763
17764 @node The NNDiary Back End
17765 @subsection The NNDiary Back End
17766 @cindex nndiary
17767 @cindex the nndiary back end
17768
17769 @code{nndiary} is a back end very similar to @code{nnml} (@pxref{Mail
17770 Spool}).  Actually, it could appear as a mix of @code{nnml} and
17771 @code{nndraft}.  If you know @code{nnml}, you're already familiar with
17772 the message storing scheme of @code{nndiary}: one file per message, one
17773 directory per group.
17774
17775   Before anything, there is one requirement to be able to run
17776 @code{nndiary} properly: you @emph{must} use the group timestamp feature
17777 of Gnus.  This adds a timestamp to each group's parameters.  @ref{Group
17778 Timestamp} to see how it's done.
17779
17780 @menu
17781 * Diary Messages::              What makes a message valid for nndiary.
17782 * Running NNDiary::             NNDiary has two modes of operation.
17783 * Customizing NNDiary::         Bells and whistles.
17784 @end menu
17785
17786 @node Diary Messages
17787 @subsubsection Diary Messages
17788 @cindex nndiary messages
17789 @cindex nndiary mails
17790
17791 @code{nndiary} messages are just normal ones, except for the mandatory
17792 presence of 7 special headers.  These headers are of the form
17793 @code{X-Diary-<something>}, @code{<something>} being one of
17794 @code{Minute}, @code{Hour}, @code{Dom}, @code{Month}, @code{Year},
17795 @code{Time-Zone} and @code{Dow}.  @code{Dom} means ``Day of Month'', and
17796 @code{dow} means ``Day of Week''.  These headers actually behave like