Synch with Oort Gnus.
[elisp/gnus.git-] / texi / gnus.texi
1 \input texinfo
2
3 @setfilename gnus
4 @settitle T-gnus 6.15 Manual
5 @synindex fn cp
6 @synindex vr cp
7 @synindex pg cp
8 @dircategory Emacs
9 @direntry
10 * Gnus: (gnus).         The newsreader Gnus.
11 @end direntry
12 @iftex
13 @finalout
14 @end iftex
15 @setchapternewpage odd
16
17 @iftex
18 @iflatex
19 \documentclass[twoside,a4paper,openright,11pt]{book}
20 \usepackage[latin1]{inputenc}
21 \usepackage{pagestyle}
22 \usepackage{epsfig}
23 \usepackage{pixidx}
24 \input{gnusconfig.tex}
25
26 \ifx\pdfoutput\undefined
27 \else
28 \usepackage[pdftex,bookmarks,colorlinks=true]{hyperref}
29 \usepackage{thumbpdf}
30 \pdfcompresslevel=9
31 \fi
32
33 \makeindex
34 \begin{document}
35
36 \newcommand{\gnusversionname}{Oort Gnus v0.06}
37 \newcommand{\gnuschaptername}{}
38 \newcommand{\gnussectionname}{}
39
40 \newcommand{\gnusbackslash}{/}
41
42 \newcommand{\gnusref}[1]{``#1'' on page \pageref{#1}}
43 \ifx\pdfoutput\undefined
44 \newcommand{\gnusuref}[1]{\gnustt{#1}}
45 \else
46 \newcommand{\gnusuref}[1]{\href{#1}{\gnustt{#1}}}
47 \fi
48 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
49 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
50
51 \newcommand{\gnuskindex}[1]{\index{#1}}
52 \newcommand{\gnusindex}[1]{\index{#1}}
53
54 \newcommand{\gnustt}[1]{{\gnusselectttfont{}#1}}
55 \newcommand{\gnuscode}[1]{\gnustt{#1}}
56 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
57 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
58 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
59 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
60 \newcommand{\gnusdfn}[1]{\textit{#1}}
61 \newcommand{\gnusi}[1]{\textit{#1}}
62 \newcommand{\gnusstrong}[1]{\textbf{#1}}
63 \newcommand{\gnusemph}[1]{\textit{#1}}
64 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
65 \newcommand{\gnussc}[1]{\textsc{#1}}
66 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
67 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
68 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
69 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
70
71 \newcommand{\gnusbullet}{{${\bullet}$}}
72 \newcommand{\gnusdollar}{\$}
73 \newcommand{\gnusampersand}{\&}
74 \newcommand{\gnuspercent}{\%}
75 \newcommand{\gnushash}{\#}
76 \newcommand{\gnushat}{\symbol{"5E}}
77 \newcommand{\gnusunderline}{\symbol{"5F}}
78 \newcommand{\gnusnot}{$\neg$}
79 \newcommand{\gnustilde}{\symbol{"7E}}
80 \newcommand{\gnusless}{{$<$}}
81 \newcommand{\gnusgreater}{{$>$}}
82 \newcommand{\gnusbraceleft}{{$>$}}
83 \newcommand{\gnusbraceright}{{$>$}}
84
85 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
86 \newcommand{\gnusinteresting}{
87 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
88 }
89
90 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
91
92 \newcommand{\gnuspagechapter}[1]{
93 {\mbox{}}
94 }
95
96 \newdimen{\gnusdimen}
97 \gnusdimen 0pt
98
99 \newcommand{\gnuschapter}[2]{
100 \gnuscleardoublepage
101 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
102 \chapter{#2}
103 \renewcommand{\gnussectionname}{}
104 \renewcommand{\gnuschaptername}{#2}
105 \thispagestyle{empty}
106 \hspace*{-2cm}
107 \begin{picture}(500,500)(0,0)
108 \put(480,350){\makebox(0,0)[tr]{#1}}
109 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
110 \end{picture}
111 \clearpage
112 }
113
114 \newcommand{\gnusfigure}[3]{
115 \begin{figure}
116 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
117 #3
118 \end{picture}
119 \caption{#1}
120 \end{figure}
121 }
122
123 \newcommand{\gnusicon}[1]{
124 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
125 }
126
127 \newcommand{\gnuspicon}[1]{
128 \margindex{\epsfig{figure=#1,width=2cm}}
129 }
130
131 \newcommand{\gnusxface}[2]{
132 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
133 }
134
135 \newcommand{\gnussmiley}[2]{
136 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
137 }
138
139 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
140
141 \newcommand{\gnussection}[1]{
142 \renewcommand{\gnussectionname}{#1}
143 \section{#1}
144 }
145
146 \newenvironment{codelist}%
147 {\begin{list}{}{
148 }
149 }{\end{list}}
150
151 \newenvironment{kbdlist}%
152 {\begin{list}{}{
153 \labelwidth=0cm
154 }
155 }{\end{list}}
156
157 \newenvironment{dfnlist}%
158 {\begin{list}{}{
159 }
160 }{\end{list}}
161
162 \newenvironment{stronglist}%
163 {\begin{list}{}{
164 }
165 }{\end{list}}
166
167 \newenvironment{samplist}%
168 {\begin{list}{}{
169 }
170 }{\end{list}}
171
172 \newenvironment{varlist}%
173 {\begin{list}{}{
174 }
175 }{\end{list}}
176
177 \newenvironment{emphlist}%
178 {\begin{list}{}{
179 }
180 }{\end{list}}
181
182 \newlength\gnusheadtextwidth
183 \setlength{\gnusheadtextwidth}{\headtextwidth}
184 \addtolength{\gnusheadtextwidth}{1cm}
185
186 \newpagestyle{gnuspreamble}%
187 {
188 {
189 \ifodd\count0
190 {
191 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
192 }
193 \else
194 {
195 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
196 }
197 }
198 \fi
199 }
200 }
201 {
202 \ifodd\count0
203 \mbox{} \hfill
204 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
205 \else
206 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
207 \hfill \mbox{}
208 \fi
209 }
210
211 \newpagestyle{gnusindex}%
212 {
213 {
214 \ifodd\count0
215 {
216 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
217 }
218 \else
219 {
220 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
221 }
222 \fi
223 }
224 }
225 {
226 \ifodd\count0
227 \mbox{} \hfill
228 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
229 \else
230 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
231 \hfill \mbox{}
232 \fi
233 }
234
235 \newpagestyle{gnus}%
236 {
237 {
238 \ifodd\count0
239 {
240 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
241 }
242 \else
243 {
244 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
245 }
246 \fi
247 }
248 }
249 {
250 \ifodd\count0
251 \mbox{} \hfill
252 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
253 \else
254 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
255 \hfill \mbox{}
256 \fi
257 }
258
259 \pagenumbering{roman}
260 \pagestyle{gnuspreamble}
261
262 @end iflatex
263 @end iftex
264
265 @iftex
266 @iflatex
267 \begin{titlepage}
268 {
269
270 %\addtolength{\oddsidemargin}{-5cm}
271 %\addtolength{\evensidemargin}{-5cm}
272 \parindent=0cm
273 \addtolength{\textheight}{2cm}
274
275 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
276 \rule{15cm}{1mm}\\
277 \vfill
278 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
279 \vfill
280 \rule{15cm}{1mm}\\
281 \gnusauthor{by Lars Magne Ingebrigtsen}
282 \newpage
283 }
284
285 \mbox{}
286 \vfill
287
288 \thispagestyle{empty}
289
290 Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
291 Free Software Foundation, Inc.
292
293
294 Permission is granted to copy, distribute and/or modify this document
295 under the terms of the GNU Free Documentation License, Version 1.1 or
296 any later version published by the Free Software Foundation; with no
297 Invariant Sections, with the Front-Cover texts being ``A GNU
298 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
299 license is included in the section entitled ``GNU Free Documentation
300 License'' in the Emacs manual.
301
302 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
303 this GNU Manual, like GNU software.  Copies published by the Free
304 Software Foundation raise funds for GNU development.''
305
306 This document is part of a collection distributed under the GNU Free
307 Documentation License.  If you want to distribute this document
308 separately from the collection, you can do so by adding a copy of the
309 license to the document, as described in section 6 of the license.
310 \newpage
311 \end{titlepage}
312 @end iflatex
313 @end iftex
314
315 @ifnottex
316
317 This file documents gnus, the GNU Emacs newsreader.
318
319 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
320         Free Software Foundation, Inc.
321
322 Permission is granted to copy, distribute and/or modify this document
323 under the terms of the GNU Free Documentation License, Version 1.1 or
324 any later version published by the Free Software Foundation; with the
325 Invariant Sections being none, with the Front-Cover texts being ``A GNU
326 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
327 license is included in the section entitled ``GNU Free Documentation
328 License'' in the Emacs manual.
329
330 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
331 this GNU Manual, like GNU software.  Copies published by the Free
332 Software Foundation raise funds for GNU development.''
333
334 This document is part of a collection distributed under the GNU Free
335 Documentation License.  If you want to distribute this document
336 separately from the collection, you can do so by adding a copy of the
337 license to the document, as described in section 6 of the license.
338 @end ifnottex
339
340 @tex
341
342 @titlepage
343 @title T-gnus 6.15 Manual
344
345 @author by Lars Magne Ingebrigtsen
346 @page
347
348 @vskip 0pt plus 1filll
349 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
350         Free Software Foundation, Inc.
351
352 Permission is granted to copy, distribute and/or modify this document
353 under the terms of the GNU Free Documentation License, Version 1.1 or
354 any later version published by the Free Software Foundation; with no
355 Invariant Sections, with the Front-Cover texts being ``A GNU
356 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
357 license is included in the section entitled ``GNU Free Documentation
358 License'' in the Emacs manual.
359
360 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
361 this GNU Manual, like GNU software.  Copies published by the Free
362 Software Foundation raise funds for GNU development.''
363
364 This document is part of a collection distributed under the GNU Free
365 Documentation License.  If you want to distribute this document
366 separately from the collection, you can do so by adding a copy of the
367 license to the document, as described in section 6 of the license.
368
369 @end titlepage
370 @page
371
372 @end tex
373
374
375 @node Top
376 @top The gnus Newsreader
377
378 @ifinfo
379
380 You can read news (and mail) from within Emacs by using gnus.  The news
381 can be gotten by any nefarious means you can think of---@sc{nntp}, local
382 spool or your mbox file.  All at the same time, if you want to push your
383 luck.
384
385 T-gnus provides @sc{mime} features based on @sc{semi} API.  So T-gnus
386 supports your right to read strange messages including big images or
387 other various kinds of formats.  T-gnus also supports
388 internationalization/localization and multiscript features based on MULE
389 API.  So T-gnus does not discriminate various language communities.
390 Oh, if you are a Klingon, please wait Unicode Next Generation.
391
392 This manual corresponds to T-gnus 6.15.
393
394 @end ifinfo
395
396 @iftex
397
398 @iflatex
399 \tableofcontents
400 \gnuscleardoublepage
401 @end iflatex
402
403 Gnus is the advanced, self-documenting, customizable, extensible
404 unreal-time newsreader for GNU Emacs.
405
406 Oops.  That sounds oddly familiar, so let's start over again to avoid
407 being accused of plagiarism:
408
409 Gnus is a message-reading laboratory.  It will let you look at just
410 about anything as if it were a newsgroup.  You can read mail with it,
411 you can browse directories with it, you can @code{ftp} with it---you
412 can even read news with it!
413
414 Gnus tries to empower people who read news the same way Emacs empowers
415 people who edit text.  Gnus sets no limits to what the user should be
416 allowed to do.  Users are encouraged to extend gnus to make it behave
417 like they want it to behave.  A program should not control people;
418 people should be empowered to do what they want by using (or abusing)
419 the program.
420
421 @end iftex
422
423 @menu
424 * Starting Up::                 Finding news can be a pain.
425 * Group Buffer::                Selecting, subscribing and killing groups.
426 * Summary Buffer::              Reading, saving and posting articles.
427 * Article Buffer::              Displaying and handling articles.
428 * Composing Messages::          Information on sending mail and news.
429 * Select Methods::              Gnus reads all messages from various select methods.
430 * Scoring::                     Assigning values to articles.
431 * Various::                     General purpose settings.
432 * The End::                     Farewell and goodbye.
433 * Appendices::                  Terminology, Emacs intro, FAQ, History, Internals.
434 * Index::                       Variable, function and concept index.
435 * Key Index::                   Key Index.
436
437 @detailmenu
438  --- The Detailed Node Listing ---
439
440 Starting Gnus
441
442 * Finding the News::            Choosing a method for getting news.
443 * The First Time::              What does Gnus do the first time you start it?
444 * The Server is Down::          How can I read my mail then?
445 * Slave Gnusae::                You can have more than one Gnus active at a time.
446 * Fetching a Group::            Starting Gnus just to read a group.
447 * New Groups::                  What is Gnus supposed to do with new groups?
448 * Changing Servers::            You may want to move from one server to another.
449 * Startup Files::               Those pesky startup files---@file{.newsrc}.
450 * Auto Save::                   Recovering from a crash.
451 * The Active File::             Reading the active file over a slow line Takes Time.
452 * Startup Variables::           Other variables you might change.
453
454 New Groups
455
456 * Checking New Groups::         Determining what groups are new.
457 * Subscription Methods::        What Gnus should do with new groups.
458 * Filtering New Groups::        Making Gnus ignore certain new groups.
459
460 Group Buffer
461
462 * Group Buffer Format::         Information listed and how you can change it.
463 * Group Maneuvering::           Commands for moving in the group buffer.
464 * Selecting a Group::           Actually reading news.
465 * Subscription Commands::       Unsubscribing, killing, subscribing.
466 * Group Data::                  Changing the info for a group.
467 * Group Levels::                Levels? What are those, then?
468 * Group Score::                 A mechanism for finding out what groups you like.
469 * Marking Groups::              You can mark groups for later processing.
470 * Foreign Groups::              Creating and editing groups.
471 * Group Parameters::            Each group may have different parameters set.
472 * Listing Groups::              Gnus can list various subsets of the groups.
473 * Sorting Groups::              Re-arrange the group order.
474 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
475 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
476 * Exiting Gnus::                Stop reading news and get some work done.
477 * Group Topics::                A folding group mode divided into topics.
478 * Misc Group Stuff::            Other stuff that you can to do.
479
480 Group Buffer Format
481
482 * Group Line Specification::    Deciding how the group buffer is to look.
483 * Group Modeline Specification::  The group buffer modeline.
484 * Group Highlighting::          Having nice colors in the group buffer.
485
486 Group Topics
487
488 * Topic Commands::              Interactive E-Z commands.
489 * Topic Variables::             How to customize the topics the Lisp Way.
490 * Topic Sorting::               Sorting each topic individually.
491 * Topic Topology::              A map of the world.
492 * Topic Parameters::            Parameters that apply to all groups in a topic.
493
494 Misc Group Stuff
495
496 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
497 * Group Information::           Information and help on groups and Gnus.
498 * Group Timestamp::             Making Gnus keep track of when you last read a group.
499 * File Commands::               Reading and writing the Gnus files.
500 * Sieve Commands::              Managing Sieve scripts.
501
502 Summary Buffer
503
504 * Summary Buffer Format::       Deciding how the summary buffer is to look.
505 * Summary Maneuvering::         Moving around the summary buffer.
506 * Choosing Articles::           Reading articles.
507 * Paging the Article::          Scrolling the current article.
508 * Reply Followup and Post::     Posting articles.
509 * Delayed Articles::            
510 * Marking Articles::            Marking articles as read, expirable, etc.
511 * Limiting::                    You can limit the summary buffer.
512 * Threading::                   How threads are made.
513 * Sorting the Summary Buffer::  How articles and threads are sorted.
514 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
515 * Article Caching::             You may store articles in a cache.
516 * Persistent Articles::         Making articles expiry-resistant.
517 * Article Backlog::             Having already read articles hang around.
518 * Saving Articles::             Ways of customizing article saving.
519 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
520 * Article Treatment::           The article buffer can be mangled at will.
521 * MIME Commands::               Doing MIMEy things with the articles.
522 * Charsets::                    Character set issues.
523 * Article Commands::            Doing various things with the article buffer.
524 * Summary Sorting::             Sorting the summary buffer in various ways.
525 * Finding the Parent::          No child support? Get the parent.
526 * Alternative Approaches::      Reading using non-default summaries.
527 * Tree Display::                A more visual display of threads.
528 * Mail Group Commands::         Some commands can only be used in mail groups.
529 * Various Summary Stuff::       What didn't fit anywhere else.
530 * Exiting the Summary Buffer::  Returning to the Group buffer,
531                                 or reselecting the current group.
532 * Crosspost Handling::          How crossposted articles are dealt with.
533 * Duplicate Suppression::       An alternative when crosspost handling fails.
534 * Security::                    Decrypt and Verify.
535 * Mailing List::                Mailing list minor mode.
536
537 Summary Buffer Format
538
539 * Summary Buffer Lines::        You can specify how summary lines should look.
540 * To From Newsgroups::          How to not display your own name.
541 * Summary Buffer Mode Line::    You can say how the mode line should look.
542 * Summary Highlighting::        Making the summary buffer all pretty and nice.
543
544 Choosing Articles
545
546 * Choosing Commands::           Commands for choosing articles.
547 * Choosing Variables::          Variables that influence these commands.
548
549 Reply, Followup and Post
550
551 * Summary Mail Commands::       Sending mail.
552 * Summary Post Commands::       Sending news.
553 * Summary Message Commands::    Other Message-related commands.
554 * Canceling and Superseding::   
555
556 Marking Articles
557
558 * Unread Articles::             Marks for unread articles.
559 * Read Articles::               Marks for read articles.
560 * Other Marks::                 Marks that do not affect readedness.
561 * Setting Marks::               
562 * Generic Marking Commands::    
563 * Setting Process Marks::       
564
565 Marking Articles
566
567 * Setting Marks::             How to set and remove marks.
568 * Generic Marking Commands::  How to customize the marking.
569 * Setting Process Marks::     How to mark articles for later processing.
570
571 Threading
572
573 * Customizing Threading::       Variables you can change to affect the threading.
574 * Thread Commands::             Thread based commands in the summary buffer.
575
576 Customizing Threading
577
578 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
579 * Filling In Threads::          Making the threads displayed look fuller.
580 * More Threading::              Even more variables for fiddling with threads.
581 * Low-Level Threading::         You thought it was over... but you were wrong!
582
583 Decoding Articles
584
585 * Uuencoded Articles::          Uudecode articles.
586 * Shell Archives::              Unshar articles.
587 * PostScript Files::            Split PostScript.
588 * Other Files::                 Plain save and binhex.
589 * Decoding Variables::          Variables for a happy decoding.
590 * Viewing Files::               You want to look at the result of the decoding?
591
592 Decoding Variables
593
594 * Rule Variables::              Variables that say how a file is to be viewed.
595 * Other Decode Variables::      Other decode variables.
596 * Uuencoding and Posting::      Variables for customizing uuencoding.
597
598 Article Treatment
599
600 * Article Highlighting::        You want to make the article look like fruit salad.
601 * Article Fontisizing::         Making emphasized text look nice.
602 * Article Hiding::              You also want to make certain info go away.
603 * Article Washing::             Lots of way-neat functions to make life better.
604 * Article Header::              Doing various header transformations.
605 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
606 * Article Date::                Grumble, UT!
607 * Article Display::             Display various stuff---X-Face, Picons, Smileys
608 * Article Signature::           What is a signature?
609 * Article Miscellania::         Various other stuff.
610
611 Alternative Approaches
612
613 * Pick and Read::               First mark articles and then read them.
614 * Binary Groups::               Auto-decode all articles.
615
616 Various Summary Stuff
617
618 * Summary Group Information::   Information oriented commands.
619 * Searching for Articles::      Multiple article commands.
620 * Summary Generation Commands::  
621 * Really Various Summary Commands::  Those pesky non-conformant commands.
622
623 Article Buffer
624
625 * Hiding Headers::              Deciding what headers should be displayed.
626 * Using MIME::                  Pushing articles through @sc{mime} before reading them.
627 * Customizing Articles::        Tailoring the look of the articles.
628 * Article Keymap::              Keystrokes available in the article buffer.
629 * Misc Article::                Other stuff.
630
631 Composing Messages
632
633 * Mail::                        Mailing and replying.
634 * Posting Server::              What server should you post and mail via?
635 * Mail and Post::               Mailing and posting at the same time.
636 * Archived Messages::           Where Gnus stores the messages you've sent.
637 * Posting Styles::              An easier way to specify who you are.
638 * Drafts::                      Postponing messages and rejected messages.
639 * Rejected Articles::           What happens if the server doesn't like your article?
640 * Signing and encrypting::      How to compose secure messages.
641
642 Select Methods
643
644 * Server Buffer::               Making and editing virtual servers.
645 * Getting News::                Reading USENET news with Gnus.
646 * Getting Mail::                Reading your personal mail with Gnus.
647 * Browsing the Web::            Getting messages from a plethora of Web sources.
648 * IMAP::                        Using Gnus as a @sc{imap} client.
649 * Other Sources::               Reading directories, files, SOUP packets.
650 * Combined Groups::             Combining groups into one group.
651 * Gnus Unplugged::              Reading news and mail offline.
652
653 Server Buffer
654
655 * Server Buffer Format::        You can customize the look of this buffer.
656 * Server Commands::             Commands to manipulate servers.
657 * Example Methods::             Examples server specifications.
658 * Creating a Virtual Server::   An example session.
659 * Server Variables::            Which variables to set.
660 * Servers and Methods::         You can use server names as select methods.
661 * Unavailable Servers::         Some servers you try to contact may be down.
662
663 Getting News
664
665 * NNTP::                        Reading news from an @sc{nntp} server.
666 * News Spool::                  Reading news from the local spool.
667
668 @sc{nntp}
669
670 * Direct Functions::            Connecting directly to the server.
671 * Indirect Functions::          Connecting indirectly to the server.
672 * Common Variables::            Understood by several connection functions.
673
674 Getting Mail
675
676 * Mail in a Newsreader::        Important introductory notes.
677 * Getting Started Reading Mail::  A simple cookbook example.
678 * Splitting Mail::              How to create mail groups.
679 * Mail Sources::                How to tell Gnus where to get mail from.
680 * Mail Back End Variables::     Variables for customizing mail handling.
681 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
682 * Group Mail Splitting::        Use group customize to drive mail splitting.
683 * Incorporating Old Mail::      What about the old mail you have?
684 * Expiring Mail::               Getting rid of unwanted mail.
685 * Washing Mail::                Removing gruft from the mail you get.
686 * Duplicates::                  Dealing with duplicated mail.
687 * Not Reading Mail::            Using mail back ends for reading other files.
688 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
689
690 Mail Sources
691
692 * Mail Source Specifiers::      How to specify what a mail source is.
693 * Mail Source Customization::   Some variables that influence things.
694 * Fetching Mail::               Using the mail source specifiers.
695
696 Choosing a Mail Back End
697
698 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
699 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
700 * Mail Spool::                  Store your mail in a private spool?
701 * MH Spool::                    An mhspool-like back end.
702 * Mail Folders::                Having one file for each group.
703 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
704
705 Browsing the Web
706
707 * Archiving Mail::              
708 * Web Searches::                Creating groups from articles that match a string.
709 * Slashdot::                    Reading the Slashdot comments.
710 * Ultimate::                    The Ultimate Bulletin Board systems.
711 * Web Archive::                 Reading mailing list archived on web.
712 * RSS::                         Reading RDF site summary.
713 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
714
715 @sc{imap}
716
717 * Splitting in IMAP::           Splitting mail with nnimap.
718 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
719 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
720
721 Other Sources
722
723 * Directory Groups::            You can read a directory as if it was a newsgroup.
724 * Anything Groups::             Dired?  Who needs dired?
725 * Document Groups::             Single files can be the basis of a group.
726 * SOUP::                        Reading @sc{soup} packets ``offline''.
727 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
728
729 Document Groups
730
731 * Document Server Internals::   How to add your own document types.
732
733 SOUP
734
735 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
736 * SOUP Groups::                 A back end for reading @sc{soup} packets.
737 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
738
739 Combined Groups
740
741 * Virtual Groups::              Combining articles from many groups.
742 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
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 Expiry::                How to make old articles go away.
750 * Agent and IMAP::              How to use the Agent with IMAP.
751 * Outgoing Messages::           What happens when you post/mail something?
752 * Agent Variables::             Customizing is fun.
753 * Example Setup::               An example @file{.gnus.el} file for offline people.
754 * Batching Agents::             How to fetch news from a @code{cron} job.
755 * Agent Caveats::               What you think it'll do and what it does.
756
757 Agent Categories
758
759 * Category Syntax::             What a category looks like.
760 * Category Buffer::             A buffer for maintaining categories.
761 * Category Variables::          Customize'r'Us.
762
763 Agent Commands
764
765 * Group Agent Commands::        
766 * Summary Agent Commands::      
767 * Server Agent Commands::       
768
769 Scoring
770
771 * Summary Score Commands::      Adding score entries for the current group.
772 * Group Score Commands::        General score commands.
773 * Score Variables::             Customize your scoring.  (My, what terminology).
774 * Score File Format::           What a score file may contain.
775 * Score File Editing::          You can edit score files by hand as well.
776 * Adaptive Scoring::            Big Sister Gnus knows what you read.
777 * Home Score File::             How to say where new score entries are to go.
778 * Followups To Yourself::       Having Gnus notice when people answer you.
779 * Scoring On Other Headers::    Scoring on non-standard headers.
780 * Scoring Tips::                How to score effectively.
781 * Reverse Scoring::             That problem child of old is not problem.
782 * Global Score Files::          Earth-spanning, ear-splitting score files.
783 * Kill Files::                  They are still here, but they can be ignored.
784 * Converting Kill Files::       Translating kill files to score files.
785 * GroupLens::                   Getting predictions on what you like to read.
786 * Advanced Scoring::            Using logical expressions to build score rules.
787 * Score Decays::                It can be useful to let scores wither away.
788
789 GroupLens
790
791 * Using GroupLens::             How to make Gnus use GroupLens.
792 * Rating Articles::             Letting GroupLens know how you rate articles.
793 * Displaying Predictions::      Displaying predictions given by GroupLens.
794 * GroupLens Variables::         Customizing GroupLens.
795
796 Advanced Scoring
797
798 * Advanced Scoring Syntax::     A definition.
799 * Advanced Scoring Examples::   What they look like.
800 * Advanced Scoring Tips::       Getting the most out of it.
801
802 Various
803
804 * Process/Prefix::              A convention used by many treatment commands.
805 * Interactive::                 Making Gnus ask you many questions.
806 * Symbolic Prefixes::           How to supply some Gnus functions with options.
807 * Formatting Variables::        You can specify what buffers should look like.
808 * Window Layout::               Configuring the Gnus buffer windows.
809 * Faces and Fonts::             How to change how faces look.
810 * Compilation::                 How to speed Gnus up.
811 * Mode Lines::                  Displaying information in the mode lines.
812 * Highlighting and Menus::      Making buffers look all nice and cozy.
813 * Buttons::                     Get tendinitis in ten easy steps!
814 * Daemons::                     Gnus can do things behind your back.
815 * NoCeM::                       How to avoid spam and other fatty foods.
816 * Undo::                        Some actions can be undone.
817 * Predicate Specifiers::        Specifying predicates.
818 * Moderation::                  What to do if you're a moderator.
819 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
820 * Fuzzy Matching::              What's the big fuzz?
821 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
822 * Various Various::             Things that are really various.
823
824 Formatting Variables
825
826 * Formatting Basics::           A formatting variable is basically a format string.
827 * Mode Line Formatting::        Some rules about mode line formatting variables.
828 * Advanced Formatting::         Modifying output in various ways.
829 * User-Defined Specs::          Having Gnus call your own functions.
830 * Formatting Fonts::            Making the formatting look colorful and nice.
831 * Positioning Point::           Moving point to a position after an operation.
832 * Tabulation::                  Tabulating your output.
833 * Wide Characters::             Dealing with wide characters.
834
835 Image Enhancements
836
837 * Picons::                      How to display pictures of what you're reading.
838 * Smileys::                     Show all those happy faces the way they were meant to be shown.
839 * X-Face::                      Display a funky, teensy black-and-white image.
840 * Toolbar::                     Click'n'drool.
841 * XVarious::                    Other XEmacsy Gnusey variables.
842
843 Picons
844
845 * Picon Basics::                What are picons and How do I get them.
846 * Picon Requirements::          Don't go further if you aren't using XEmacs.
847 * Easy Picons::                 Displaying Picons---the easy way.
848 * Hard Picons::                 The way you should do it.  You'll learn something.
849 * Picon Useless Configuration::  Other variables you can trash/tweak/munge/play with.
850
851 Appendices
852
853 * XEmacs::                      Requirements for installing under XEmacs.
854 * History::                     How Gnus got where it is today.
855 * On Writing Manuals::          Why this is not a beginner's guide.
856 * Terminology::                 We use really difficult, like, words here.
857 * Customization::               Tailoring Gnus to your needs.
858 * Troubleshooting::             What you might try if things do not work.
859 * Gnus Reference Guide::        Rilly, rilly technical stuff.
860 * Emacs for Heathens::          A short introduction to Emacsian terms.
861 * Frequently Asked Questions::
862
863 History
864
865 * Gnus Versions::               What Gnus versions have been released.
866 * Other Gnus Versions::         Other Gnus versions that also have been released.
867 * Why?::                        What's the point of Gnus?
868 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
869 * Conformity::                  Gnus tries to conform to all standards.
870 * Emacsen::                     Gnus can be run on a few modern Emacsen.
871 * Gnus Development::            How Gnus is developed.
872 * Contributors::                Oodles of people.
873 * New Features::                Pointers to some of the new stuff in Gnus.
874
875 New Features
876
877 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
878 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
879 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
880 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
881 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
882
883 Customization
884
885 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
886 * Slow Terminal Connection::    You run a remote Emacs.
887 * Little Disk Space::           You feel that having large setup files is icky.
888 * Slow Machine::                You feel like buying a faster machine.
889
890 Gnus Reference Guide
891
892 * Gnus Utility Functions::      Common functions and variable to use.
893 * Back End Interface::          How Gnus communicates with the servers.
894 * Score File Syntax::           A BNF definition of the score file standard.
895 * Headers::                     How Gnus stores headers internally.
896 * Ranges::                      A handy format for storing mucho numbers.
897 * Group Info::                  The group info format.
898 * Extended Interactive::        Symbolic prefixes and stuff.
899 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
900 * Various File Formats::        Formats of files that Gnus use.
901
902 Back End Interface
903
904 * Required Back End Functions::  Functions that must be implemented.
905 * Optional Back End Functions::  Functions that need not be implemented.
906 * Error Messaging::             How to get messages and report errors.
907 * Writing New Back Ends::       Extending old back ends.
908 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
909 * Mail-like Back Ends::         Some tips on mail back ends.
910
911 Various File Formats
912
913 * Active File Format::          Information on articles and groups available.
914 * Newsgroups File Format::      Group descriptions.
915
916 Emacs for Heathens
917
918 * Keystrokes::                  Entering text and executing commands.
919 * Emacs Lisp::                  The built-in Emacs programming language.
920
921 @end detailmenu
922 @end menu
923
924 @node Starting Up
925 @chapter Starting gnus
926 @cindex starting up
927
928 @kindex M-x gnus
929 @findex gnus
930 If your system administrator has set things up properly, starting gnus
931 and reading news is extremely easy---you just type @kbd{M-x gnus} in
932 your Emacs.
933
934 @findex gnus-other-frame
935 @kindex M-x gnus-other-frame
936 If you want to start gnus in a different frame, you can use the command
937 @kbd{M-x gnus-other-frame} instead.
938
939 If things do not go smoothly at startup, you have to twiddle some
940 variables in your @file{~/.gnus} file.  This file is similar to
941 @file{~/.emacs}, but is read when gnus starts.
942
943 If you puzzle at any terms used in this manual, please refer to the
944 terminology section (@pxref{Terminology}).
945
946 @menu
947 * Finding the News::            Choosing a method for getting news.
948 * The First Time::              What does Gnus do the first time you start it?
949 * The Server is Down::          How can I read my mail then?
950 * Slave Gnusae::                You can have more than one Gnus active at a time.
951 * Fetching a Group::            Starting Gnus just to read a group.
952 * New Groups::                  What is Gnus supposed to do with new groups?
953 * Changing Servers::            You may want to move from one server to another.
954 * Startup Files::               Those pesky startup files---@file{.newsrc}.
955 * Auto Save::                   Recovering from a crash.
956 * The Active File::             Reading the active file over a slow line Takes Time.
957 * Startup Variables::           Other variables you might change.
958 @end menu
959
960
961 @node Finding the News
962 @section Finding the News
963 @cindex finding news
964
965 @vindex gnus-select-method
966 @c @head
967 The @code{gnus-select-method} variable says where gnus should look for
968 news.  This variable should be a list where the first element says
969 @dfn{how} and the second element says @dfn{where}.  This method is your
970 native method.  All groups not fetched with this method are
971 foreign groups.
972
973 For instance, if the @samp{news.somewhere.edu} @sc{nntp} server is where
974 you want to get your daily dosage of news from, you'd say:
975
976 @lisp
977 (setq gnus-select-method '(nntp "news.somewhere.edu"))
978 @end lisp
979
980 If you want to read directly from the local spool, say:
981
982 @lisp
983 (setq gnus-select-method '(nnspool ""))
984 @end lisp
985
986 If you can use a local spool, you probably should, as it will almost
987 certainly be much faster.  But do not use the local spool if your
988 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
989
990 @vindex gnus-nntpserver-file
991 @cindex NNTPSERVER
992 @cindex @sc{nntp} server
993 If this variable is not set, gnus will take a look at the
994 @code{NNTPSERVER} environment variable.  If that variable isn't set,
995 gnus will see whether @code{gnus-nntpserver-file}
996 (@file{/etc/nntpserver} by default) has any opinions on the matter.  If
997 that fails as well, gnus will try to use the machine running Emacs as an @sc{nntp} server.  That's a long shot, though.
998
999 @vindex gnus-nntp-server
1000 If @code{gnus-nntp-server} is set, this variable will override
1001 @code{gnus-select-method}.  You should therefore set
1002 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1003
1004 @vindex gnus-secondary-servers
1005 @vindex gnus-nntp-server
1006 You can also make gnus prompt you interactively for the name of an
1007 @sc{nntp} server.  If you give a non-numerical prefix to @code{gnus}
1008 (i.e., @kbd{C-u M-x gnus}), gnus will let you choose between the servers
1009 in the @code{gnus-secondary-servers} list (if any).  You can also just
1010 type in the name of any server you feel like visiting.  (Note that this
1011 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1012 gnus} later in the same Emacs session, Gnus will contact the same
1013 server.)
1014
1015 @findex gnus-group-browse-foreign-server
1016 @kindex B (Group)
1017 However, if you use one @sc{nntp} server regularly and are just
1018 interested in a couple of groups from a different server, you would be
1019 better served by using the @kbd{B} command in the group buffer.  It will
1020 let you have a look at what groups are available, and you can subscribe
1021 to any of the groups you want to.  This also makes @file{.newsrc}
1022 maintenance much tidier.  @xref{Foreign Groups}.
1023
1024 @vindex gnus-secondary-select-methods
1025 @c @head
1026 A slightly different approach to foreign groups is to set the
1027 @code{gnus-secondary-select-methods} variable.  The select methods
1028 listed in this variable are in many ways just as native as the
1029 @code{gnus-select-method} server.  They will also be queried for active
1030 files during startup (if that's required), and new newsgroups that
1031 appear on these servers will be subscribed (or not) just as native
1032 groups are.
1033
1034 For instance, if you use the @code{nnmbox} back end to read your mail,
1035 you would typically set this variable to
1036
1037 @lisp
1038 (setq gnus-secondary-select-methods '((nnmbox "")))
1039 @end lisp
1040
1041
1042 @node The First Time
1043 @section The First Time
1044 @cindex first time usage
1045
1046 If no startup files exist, gnus will try to determine what groups should
1047 be subscribed by default.
1048
1049 @vindex gnus-default-subscribed-newsgroups
1050 If the variable @code{gnus-default-subscribed-newsgroups} is set, gnus
1051 will subscribe you to just those groups in that list, leaving the rest
1052 killed.  Your system administrator should have set this variable to
1053 something useful.
1054
1055 Since she hasn't, gnus will just subscribe you to a few arbitrarily
1056 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1057 here as @dfn{whatever Lars thinks you should read}.)
1058
1059 You'll also be subscribed to the gnus documentation group, which should
1060 help you with most common problems.
1061
1062 If @code{gnus-default-subscribed-newsgroups} is @code{t}, gnus will just
1063 use the normal functions for handling new groups, and not do anything
1064 special.
1065
1066
1067 @node The Server is Down
1068 @section The Server is Down
1069 @cindex server errors
1070
1071 If the default server is down, gnus will understandably have some
1072 problems starting.  However, if you have some mail groups in addition to
1073 the news groups, you may want to start gnus anyway.
1074
1075 Gnus, being the trusting sort of program, will ask whether to proceed
1076 without a native select method if that server can't be contacted.  This
1077 will happen whether the server doesn't actually exist (i.e., you have
1078 given the wrong address) or the server has just momentarily taken ill
1079 for some reason or other.  If you decide to continue and have no foreign
1080 groups, you'll find it difficult to actually do anything in the group
1081 buffer.  But, hey, that's your problem.  Blllrph!
1082
1083 @findex gnus-no-server
1084 @kindex M-x gnus-no-server
1085 @c @head
1086 If you know that the server is definitely down, or you just want to read
1087 your mail without bothering with the server at all, you can use the
1088 @code{gnus-no-server} command to start gnus.  That might come in handy
1089 if you're in a hurry as well.  This command will not attempt to contact
1090 your primary server---instead, it will just activate all groups on level
1091 1 and 2.  (You should preferably keep no native groups on those two
1092 levels.) Also @pxref{Group Levels}.
1093
1094
1095 @node Slave Gnusae
1096 @section Slave Gnusae
1097 @cindex slave
1098
1099 You might want to run more than one Emacs with more than one gnus at the
1100 same time.  If you are using different @file{.newsrc} files (e.g., if you
1101 are using the two different gnusae to read from two different servers),
1102 that is no problem whatsoever.  You just do it.
1103
1104 The problem appears when you want to run two Gnusae that use the same
1105 @code{.newsrc} file.
1106
1107 To work around that problem some, we here at the Think-Tank at the gnus
1108 Towers have come up with a new concept: @dfn{Masters} and
1109 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1110 taken out a copyright on those words.  If you wish to use those words in
1111 conjunction with each other, you have to send $1 per usage instance to
1112 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1113 Applications}) will be much more expensive, of course.)
1114
1115 Anyway, you start one gnus up the normal way with @kbd{M-x gnus} (or
1116 however you do it).  Each subsequent slave gnusae should be started with
1117 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1118 files, but instead save @dfn{slave files} that contain information only
1119 on what groups have been read in the slave session.  When a master gnus
1120 starts, it will read (and delete) these slave files, incorporating all
1121 information from them.  (The slave files will be read in the sequence
1122 they were created, so the latest changes will have precedence.)
1123
1124 Information from the slave files has, of course, precedence over the
1125 information in the normal (i.e., master) @code{.newsrc} file.
1126
1127 If the @code{.newsrc*} files have not been saved in the master when the
1128 slave starts, you may be prompted as to whether to read an auto-save
1129 file.  If you answer "yes", the unsaved changes to the master will be
1130 incorporated into the slave.  If you answer "no", the slave may see some
1131 messages as unread that have been read in the master.
1132
1133 @node Fetching a Group
1134 @section Fetching a Group
1135 @cindex fetching a group
1136
1137 @findex gnus-fetch-group
1138 It is sometimes convenient to be able to just say ``I want to read this
1139 group and I don't care whether gnus has been started or not''.  This is
1140 perhaps more useful for people who write code than for users, but the
1141 command @code{gnus-fetch-group} provides this functionality in any case.
1142 It takes the group name as a parameter.
1143
1144
1145 @node New Groups
1146 @section New Groups
1147 @cindex new groups
1148 @cindex subscription
1149
1150 @vindex gnus-check-new-newsgroups
1151 If you are satisfied that you really never want to see any new groups,
1152 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1153 also save you some time at startup.  Even if this variable is
1154 @code{nil}, you can always subscribe to the new groups just by pressing
1155 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1156 is @code{ask-server} by default.  If you set this variable to
1157 @code{always}, then Gnus will query the back ends for new groups even
1158 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1159
1160 @menu
1161 * Checking New Groups::         Determining what groups are new.
1162 * Subscription Methods::        What Gnus should do with new groups.
1163 * Filtering New Groups::        Making Gnus ignore certain new groups.
1164 @end menu
1165
1166
1167 @node Checking New Groups
1168 @subsection Checking New Groups
1169
1170 Gnus normally determines whether a group is new or not by comparing the
1171 list of groups from the active file(s) with the lists of subscribed and
1172 dead groups.  This isn't a particularly fast method.  If
1173 @code{gnus-check-new-newsgroups} is @code{ask-server}, gnus will ask the
1174 server for new groups since the last time.  This is both faster and
1175 cheaper.  This also means that you can get rid of the list of killed
1176 groups altogether, so you may set @code{gnus-save-killed-list} to
1177 @code{nil}, which will save time both at startup, at exit, and all over.
1178 Saves disk space, too.  Why isn't this the default, then?
1179 Unfortunately, not all servers support this command.
1180
1181 I bet I know what you're thinking now: How do I find out whether my
1182 server supports @code{ask-server}?  No?  Good, because I don't have a
1183 fail-safe answer.  I would suggest just setting this variable to
1184 @code{ask-server} and see whether any new groups appear within the next
1185 few days.  If any do, then it works.  If none do, then it doesn't
1186 work.  I could write a function to make gnus guess whether the server
1187 supports @code{ask-server}, but it would just be a guess.  So I won't.
1188 You could @code{telnet} to the server and say @code{HELP} and see
1189 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1190 it does, then it might work.  (But there are servers that lists
1191 @samp{NEWGROUPS} without supporting the function properly.)
1192
1193 This variable can also be a list of select methods.  If so, gnus will
1194 issue an @code{ask-server} command to each of the select methods, and
1195 subscribe them (or not) using the normal methods.  This might be handy
1196 if you are monitoring a few servers for new groups.  A side effect is
1197 that startup will take much longer, so you can meditate while waiting.
1198 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1199
1200
1201 @node Subscription Methods
1202 @subsection Subscription Methods
1203
1204 @vindex gnus-subscribe-newsgroup-method
1205 What gnus does when it encounters a new group is determined by the
1206 @code{gnus-subscribe-newsgroup-method} variable.
1207
1208 This variable should contain a function.  This function will be called
1209 with the name of the new group as the only parameter.
1210
1211 Some handy pre-fab functions are:
1212
1213 @table @code
1214
1215 @item gnus-subscribe-zombies
1216 @vindex gnus-subscribe-zombies
1217 Make all new groups zombies.  This is the default.  You can browse the
1218 zombies later (with @kbd{A z}) and either kill them all off properly
1219 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1220
1221 @item gnus-subscribe-randomly
1222 @vindex gnus-subscribe-randomly
1223 Subscribe all new groups in arbitrary order.  This really means that all
1224 new groups will be added at ``the top'' of the group buffer.
1225
1226 @item gnus-subscribe-alphabetically
1227 @vindex gnus-subscribe-alphabetically
1228 Subscribe all new groups in alphabetical order.
1229
1230 @item gnus-subscribe-hierarchically
1231 @vindex gnus-subscribe-hierarchically
1232 Subscribe all new groups hierarchically.  The difference between this
1233 function and @code{gnus-subscribe-alphabetically} is slight.
1234 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1235 alphabetical fashion, while this function will enter groups into its
1236 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1237 @samp{comp} hierarchy, this function will not mess that configuration
1238 up.  Or something like that.
1239
1240 @item gnus-subscribe-interactively
1241 @vindex gnus-subscribe-interactively
1242 Subscribe new groups interactively.  This means that gnus will ask
1243 you about @strong{all} new groups.  The groups you choose to subscribe
1244 to will be subscribed hierarchically.
1245
1246 @item gnus-subscribe-killed
1247 @vindex gnus-subscribe-killed
1248 Kill all new groups.
1249
1250 @item gnus-subscribe-topics
1251 @vindex gnus-subscribe-topics
1252 Put the groups into the topic that has a matching @code{subscribe} topic
1253 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1254 topic parameter that looks like
1255
1256 @example
1257 "nnslashdot"
1258 @end example
1259
1260 will mean that all groups that match that regex will be subscribed under
1261 that topic.
1262
1263 If no topics match the groups, the groups will be subscribed in the
1264 top-level topic.
1265
1266 @end table
1267
1268 @vindex gnus-subscribe-hierarchical-interactive
1269 A closely related variable is
1270 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1271 mouthful.)  If this variable is non-@code{nil}, gnus will ask you in a
1272 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1273 will ask you for each sub-hierarchy whether you want to descend the
1274 hierarchy or not.
1275
1276 One common mistake is to set the variable a few paragraphs above
1277 (@code{gnus-subscribe-newsgroup-method}) to
1278 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1279 will not work.  This is ga-ga.  So don't do it.
1280
1281
1282 @node Filtering New Groups
1283 @subsection Filtering New Groups
1284
1285 A nice and portable way to control which new newsgroups should be
1286 subscribed (or ignored) is to put an @dfn{options} line at the start of
1287 the @file{.newsrc} file.  Here's an example:
1288
1289 @example
1290 options -n !alt.all !rec.all sci.all
1291 @end example
1292
1293 @vindex gnus-subscribe-options-newsgroup-method
1294 This line obviously belongs to a serious-minded intellectual scientific
1295 person (or she may just be plain old boring), because it says that all
1296 groups that have names beginning with @samp{alt} and @samp{rec} should
1297 be ignored, and all groups with names beginning with @samp{sci} should
1298 be subscribed.  Gnus will not use the normal subscription method for
1299 subscribing these groups.
1300 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1301 variable defaults to @code{gnus-subscribe-alphabetically}.
1302
1303 @vindex gnus-options-not-subscribe
1304 @vindex gnus-options-subscribe
1305 If you don't want to mess with your @file{.newsrc} file, you can just
1306 set the two variables @code{gnus-options-subscribe} and
1307 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1308 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1309 and if the new group matches the former, it will be unconditionally
1310 subscribed, and if it matches the latter, it will be ignored.
1311
1312 @vindex gnus-auto-subscribed-groups
1313 Yet another variable that meddles here is
1314 @code{gnus-auto-subscribed-groups}.  It works exactly like
1315 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1316 thought it would be nice to have two of these.  This variable is more
1317 meant for setting some ground rules, while the other variable is used
1318 more for user fiddling.  By default this variable makes all new groups
1319 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1320 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1321 subscribed.  If you don't like that, just set this variable to
1322 @code{nil}.
1323
1324 New groups that match this regexp are subscribed using
1325 @code{gnus-subscribe-options-newsgroup-method}.
1326
1327
1328 @node Changing Servers
1329 @section Changing Servers
1330 @cindex changing servers
1331
1332 Sometimes it is necessary to move from one @sc{nntp} server to another.
1333 This happens very rarely, but perhaps you change jobs, or one server is
1334 very flaky and you want to use another.
1335
1336 Changing the server is pretty easy, right?  You just change
1337 @code{gnus-select-method} to point to the new server?
1338
1339 @emph{Wrong!}
1340
1341 Article numbers are not (in any way) kept synchronized between different
1342 @sc{nntp} servers, and the only way Gnus keeps track of what articles
1343 you have read is by keeping track of article numbers.  So when you
1344 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1345 worthless.
1346
1347 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1348 file from one server to another.  They all have one thing in
1349 common---they take a looong time to run.  You don't want to use these
1350 functions more than absolutely necessary.
1351
1352 @kindex M-x gnus-change-server
1353 @findex gnus-change-server
1354 If you have access to both servers, Gnus can request the headers for all
1355 the articles you have read and compare @code{Message-ID}s and map the
1356 article numbers of the read articles and article marks.  The @kbd{M-x
1357 gnus-change-server} command will do this for all your native groups.  It
1358 will prompt for the method you want to move to.
1359
1360 @kindex M-x gnus-group-move-group-to-server
1361 @findex gnus-group-move-group-to-server
1362 You can also move individual groups with the @kbd{M-x
1363 gnus-group-move-group-to-server} command.  This is useful if you want to
1364 move a (foreign) group from one server to another.
1365
1366 @kindex M-x gnus-group-clear-data-on-native-groups
1367 @findex gnus-group-clear-data-on-native-groups
1368 If you don't have access to both the old and new server, all your marks
1369 and read ranges have become worthless.  You can use the @kbd{M-x
1370 gnus-group-clear-data-on-native-groups} command to clear out all data
1371 that you have on your native groups.  Use with caution.
1372
1373 @kindex M-x gnus-group-clear-data
1374 @findex gnus-group-clear-data
1375 Clear the data from the current group only---nix out marks and the
1376 list of read articles (@code{gnus-group-clear-data}).
1377
1378 After changing servers, you @strong{must} move the cache hierarchy away,
1379 since the cached articles will have wrong article numbers, which will
1380 affect which articles Gnus thinks are read.
1381 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1382 to have it done automatically; for @code{gnus-group-clear-data}, you
1383 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1384 cache for all groups).
1385
1386
1387 @node Startup Files
1388 @section Startup Files
1389 @cindex startup files
1390 @cindex .newsrc
1391 @cindex .newsrc.el
1392 @cindex .newsrc.eld
1393
1394 Now, you all know about the @file{.newsrc} file.  All subscription
1395 information is traditionally stored in this file.
1396
1397 Things got a bit more complicated with @sc{gnus}.  In addition to
1398 keeping the @file{.newsrc} file updated, it also used a file called
1399 @file{.newsrc.el} for storing all the information that didn't fit into
1400 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1401 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1402 files was the most recently saved, which enabled people to swap between
1403 @sc{gnus} and other newsreaders.
1404
1405 That was kinda silly, so Gnus went one better: In addition to the
1406 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1407 @file{.newsrc.eld}.  It will read whichever of these files that are most
1408 recent, but it will never write a @file{.newsrc.el} file.  You should
1409 never delete the @file{.newsrc.eld} file---it contains much information
1410 not stored in the @file{.newsrc} file.
1411
1412 @vindex gnus-save-newsrc-file
1413 @vindex gnus-read-newsrc-file
1414 You can turn off writing the @file{.newsrc} file by setting
1415 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1416 the file and save some space, as well as exiting from gnus faster.
1417 However, this will make it impossible to use other newsreaders than
1418 gnus.  But hey, who would want to, right?  Similarly, setting
1419 @code{gnus-read-newsrc-file} to @code{nil} makes gnus ignore the
1420 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1421 convenient if you have a tendency to use Netscape once in a while.
1422
1423 @vindex gnus-save-killed-list
1424 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1425 will not save the list of killed groups to the startup file.  This will
1426 save both time (when starting and quitting) and space (on disk).  It
1427 will also mean that Gnus has no record of what groups are new or old,
1428 so the automatic new groups subscription methods become meaningless.
1429 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1430 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1431 Groups}).  This variable can also be a regular expression.  If that's
1432 the case, remove all groups that do not match this regexp before
1433 saving.  This can be useful in certain obscure situations that involve
1434 several servers where not all servers support @code{ask-server}.
1435
1436 @vindex gnus-startup-file
1437 The @code{gnus-startup-file} variable says where the startup files are.
1438 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1439 file being whatever that one is, with a @samp{.eld} appended.
1440
1441 @vindex gnus-save-newsrc-hook
1442 @vindex gnus-save-quick-newsrc-hook
1443 @vindex gnus-save-standard-newsrc-hook
1444 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1445 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1446 saving the @file{.newsrc.eld} file, and
1447 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1448 @file{.newsrc} file.  The latter two are commonly used to turn version
1449 control on or off.  Version control is on by default when saving the
1450 startup files.  If you want to turn backup creation off, say something like:
1451
1452 @lisp
1453 (defun turn-off-backup ()
1454   (set (make-local-variable 'backup-inhibited) t))
1455
1456 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1457 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1458 @end lisp
1459
1460 @vindex gnus-init-file
1461 When gnus starts, it will read the @code{gnus-site-init-file}
1462 (@file{.../site-lisp/gnus} 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).
1470
1471
1472
1473 @node Auto Save
1474 @section Auto Save
1475 @cindex dribble file
1476 @cindex auto-save
1477
1478 Whenever you do something that changes the gnus data (reading articles,
1479 catching up, killing/subscribing groups), the change is added to a
1480 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1481 Emacs way.  If your Emacs should crash before you have saved the
1482 @file{.newsrc} files, all changes you have made can be recovered from
1483 this file.
1484
1485 If gnus detects this file at startup, it will ask the user whether to
1486 read it.  The auto save file is deleted whenever the real startup file is
1487 saved.
1488
1489 @vindex gnus-use-dribble-file
1490 If @code{gnus-use-dribble-file} is @code{nil}, gnus won't create and
1491 maintain a dribble buffer.  The default is @code{t}.
1492
1493 @vindex gnus-dribble-directory
1494 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1495 this variable is @code{nil}, which it is by default, gnus will dribble
1496 into the directory where the @file{.newsrc} file is located.  (This is
1497 normally the user's home directory.)  The dribble file will get the same
1498 file permissions as the @code{.newsrc} file.
1499
1500 @vindex gnus-always-read-dribble-file
1501 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1502 read the dribble file on startup without querying the user.
1503
1504
1505 @node The Active File
1506 @section The Active File
1507 @cindex active file
1508 @cindex ignored groups
1509
1510 When gnus starts, or indeed whenever it tries to determine whether new
1511 articles have arrived, it reads the active file.  This is a very large
1512 file that lists all the active groups and articles on the server.
1513
1514 @vindex gnus-ignored-newsgroups
1515 Before examining the active file, gnus deletes all lines that match the
1516 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1517 any groups with bogus names, but you can use this variable to make gnus
1518 ignore hierarchies you aren't ever interested in.  However, this is not
1519 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1520 Groups} for an overview of other variables that can be used instead.
1521
1522 @c This variable is
1523 @c @code{nil} by default, and will slow down active file handling somewhat
1524 @c if you set it to anything else.
1525
1526 @vindex gnus-read-active-file
1527 @c @head
1528 The active file can be rather Huge, so if you have a slow network, you
1529 can set @code{gnus-read-active-file} to @code{nil} to prevent gnus from
1530 reading the active file.  This variable is @code{some} by default.
1531
1532 Gnus will try to make do by getting information just on the groups that
1533 you actually subscribe to.
1534
1535 Note that if you subscribe to lots and lots of groups, setting this
1536 variable to @code{nil} will probably make gnus slower, not faster.  At
1537 present, having this variable @code{nil} will slow gnus down
1538 considerably, unless you read news over a 2400 baud modem.
1539
1540 This variable can also have the value @code{some}.  Gnus will then
1541 attempt to read active info only on the subscribed groups.  On some
1542 servers this is quite fast (on sparkling, brand new INN servers that
1543 support the @code{LIST ACTIVE group} command), on others this isn't fast
1544 at all.  In any case, @code{some} should be faster than @code{nil}, and
1545 is certainly faster than @code{t} over slow lines.
1546
1547 Some news servers (old versions of Leafnode and old versions of INN, for
1548 instance) do not support the @code{LIST ACTIVE group}.  For these
1549 servers, @code{nil} is probably the most efficient value for this
1550 variable.
1551
1552 If this variable is @code{nil}, gnus will ask for group info in total
1553 lock-step, which isn't very fast.  If it is @code{some} and you use an
1554 @sc{nntp} server, gnus will pump out commands as fast as it can, and
1555 read all the replies in one swoop.  This will normally result in better
1556 performance, but if the server does not support the aforementioned
1557 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1558
1559 If you think that starting up Gnus takes too long, try all the three
1560 different values for this variable and see what works best for you.
1561
1562 In any case, if you use @code{some} or @code{nil}, you should definitely
1563 kill all groups that you aren't interested in to speed things up.
1564
1565 Note that this variable also affects active file retrieval from
1566 secondary select methods.
1567
1568
1569 @node Startup Variables
1570 @section Startup Variables
1571
1572 @table @code
1573
1574 @item gnus-load-hook
1575 @vindex gnus-load-hook
1576 A hook run while gnus is being loaded.  Note that this hook will
1577 normally be run just once in each Emacs session, no matter how many
1578 times you start gnus.
1579
1580 @item gnus-before-startup-hook
1581 @vindex gnus-before-startup-hook
1582 A hook run after starting up gnus successfully.
1583
1584 @item gnus-startup-hook
1585 @vindex gnus-startup-hook
1586 A hook run as the very last thing after starting up gnus
1587
1588 @item gnus-started-hook
1589 @vindex gnus-started-hook
1590 A hook that is run as the very last thing after starting up gnus
1591 successfully.
1592
1593 @item gnus-setup-news-hook
1594 @vindex gnus-setup-news-hook
1595 A hook that is run after reading the @file{.newsrc} file(s), but before
1596 generating the group buffer.
1597
1598 @item gnus-check-bogus-newsgroups
1599 @vindex gnus-check-bogus-newsgroups
1600 If non-@code{nil}, gnus will check for and delete all bogus groups at
1601 startup.  A @dfn{bogus group} is a group that you have in your
1602 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1603 bogus groups can take quite a while, so to save time and resources it's
1604 best to leave this option off, and do the checking for bogus groups once
1605 in a while from the group buffer instead (@pxref{Group Maintenance}).
1606
1607 @item gnus-inhibit-startup-message
1608 @vindex gnus-inhibit-startup-message
1609 If non-@code{nil}, the startup message won't be displayed.  That way,
1610 your boss might not notice as easily that you are reading news instead
1611 of doing your job.  Note that this variable is used before
1612 @file{.gnus.el} is loaded, so it should be set in @code{.emacs} instead.
1613
1614 @item gnus-no-groups-message
1615 @vindex gnus-no-groups-message
1616 Message displayed by gnus when no groups are available.
1617
1618 @item gnus-play-startup-jingle
1619 @vindex gnus-play-startup-jingle
1620 If non-@code{nil}, play the gnus jingle at startup.
1621
1622 @item gnus-startup-jingle
1623 @vindex gnus-startup-jingle
1624 Jingle to be played if the above variable is non-@code{nil}.  The
1625 default is @samp{Tuxedomoon.Jingle4.au}.
1626
1627 @end table
1628
1629
1630 @node Group Buffer
1631 @chapter Group Buffer
1632 @cindex group buffer
1633
1634 @c Alex Schroeder suggests to rearrange this as follows:
1635 @c
1636 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1637 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1638 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1639 @c   7. Group Score, 8. Group Buffer Format
1640 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1641 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1642 @c <kensanata> First, "Gnus considers groups... (default 9)."
1643 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1644 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1645 @c <kensanata> Then expand the next paragraph or add some more to it.
1646 @c    This short one sentence explains levels 1 and 2, therefore I understand
1647 @c    that I should keep important news at 3 and boring news at 4.
1648 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1649 @c    Maybe keep those that you don't want to read temporarily at 6,
1650 @c    those that you never want to read at 8, those that offend your
1651 @c    human rights at 9...
1652
1653
1654 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1655 is the first buffer shown when gnus starts, and will never be killed as
1656 long as gnus is active.
1657
1658 @iftex
1659 @iflatex
1660 \gnusfigure{The Group Buffer}{320}{
1661 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1662 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1663 \put(120,38){\vector(1,2){10}}
1664 \put(40,60){\makebox(0,0)[r]{Mode line}}
1665 \put(40,58){\vector(1,0){30}}
1666 \put(200,28){\makebox(0,0)[t]{Native select method}}
1667 \put(200,26){\vector(-1,2){15}}
1668 }
1669 @end iflatex
1670 @end iftex
1671
1672 @menu
1673 * Group Buffer Format::         Information listed and how you can change it.
1674 * Group Maneuvering::           Commands for moving in the group buffer.
1675 * Selecting a Group::           Actually reading news.
1676 * Subscription Commands::       Unsubscribing, killing, subscribing.
1677 * Group Data::                  Changing the info for a group.
1678 * Group Levels::                Levels? What are those, then?
1679 * Group Score::                 A mechanism for finding out what groups you like.
1680 * Marking Groups::              You can mark groups for later processing.
1681 * Foreign Groups::              Creating and editing groups.
1682 * Group Parameters::            Each group may have different parameters set.
1683 * Listing Groups::              Gnus can list various subsets of the groups.
1684 * Sorting Groups::              Re-arrange the group order.
1685 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1686 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1687 * Exiting Gnus::                Stop reading news and get some work done.
1688 * Group Topics::                A folding group mode divided into topics.
1689 * Misc Group Stuff::            Other stuff that you can to do.
1690 @end menu
1691
1692
1693 @node Group Buffer Format
1694 @section Group Buffer Format
1695
1696 @menu
1697 * Group Line Specification::    Deciding how the group buffer is to look.
1698 * Group Modeline Specification::  The group buffer modeline.
1699 * Group Highlighting::          Having nice colors in the group buffer.
1700 @end menu
1701
1702
1703 @node Group Line Specification
1704 @subsection Group Line Specification
1705 @cindex group buffer format
1706
1707 The default format of the group buffer is nice and dull, but you can
1708 make it as exciting and ugly as you feel like.
1709
1710 Here's a couple of example group lines:
1711
1712 @example
1713      25: news.announce.newusers
1714  *    0: alt.fan.andrea-dworkin
1715 @end example
1716
1717 Quite simple, huh?
1718
1719 You can see that there are 25 unread articles in
1720 @samp{news.announce.newusers}.  There are no unread articles, but some
1721 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1722 asterisk at the beginning of the line?).
1723
1724 @vindex gnus-group-line-format
1725 You can change that format to whatever you want by fiddling with the
1726 @code{gnus-group-line-format} variable.  This variable works along the
1727 lines of a @code{format} specification, which is pretty much the same as
1728 a @code{printf} specifications, for those of you who use (feh!) C.
1729 @xref{Formatting Variables}.
1730
1731 @samp{%M%S%5y: %(%g%)\n} is the value that produced those lines above.
1732
1733 There should always be a colon on the line; the cursor always moves to
1734 the colon after performing an operation.  @xref{Positioning
1735 Point}. Nothing else is required---not even the group name.  All
1736 displayed text is just window dressing, and is never examined by Gnus.
1737 Gnus stores all real information it needs using text properties.
1738
1739 (Note that if you make a really strange, wonderful, spreadsheet-like
1740 layout, everybody will believe you are hard at work with the accounting
1741 instead of wasting time reading news.)
1742
1743 Here's a list of all available format characters:
1744
1745 @table @samp
1746
1747 @item M
1748 An asterisk if the group only has marked articles.
1749
1750 @item S
1751 Whether the group is subscribed.
1752
1753 @item L
1754 Level of subscribedness.
1755
1756 @item N
1757 Number of unread articles.
1758
1759 @item I
1760 Number of dormant articles.
1761
1762 @item T
1763 Number of ticked articles.
1764
1765 @item R
1766 Number of read articles.
1767
1768 @item t
1769 Estimated total number of articles.  (This is really @var{max-number}
1770 minus @var{min-number} plus 1.)
1771
1772 Gnus uses this estimation because the @sc{nntp} protocol provides
1773 efficient access to @var{max-number} and @var{min-number} but getting
1774 the true unread message count is not possible efficiently.  For
1775 hysterical raisins, even the mail back ends, where the true number of
1776 unread messages might be available efficiently, use the same limited
1777 interface.  To remove this restriction from Gnus means that the back
1778 end interface has to be changed, which is not an easy job.  If you
1779 want to work on this, please contact the Gnus mailing list.
1780
1781 @item y
1782 Number of unread, unticked, non-dormant articles.
1783
1784 @item i
1785 Number of ticked and dormant articles.
1786
1787 @item g
1788 Full group name.
1789
1790 @item G
1791 Group name.
1792
1793 @item D
1794 Newsgroup description.
1795
1796 @item o
1797 @samp{m} if moderated.
1798
1799 @item O
1800 @samp{(m)} if moderated.
1801
1802 @item s
1803 Select method.
1804
1805 @item n
1806 Select from where.
1807
1808 @item z
1809 A string that looks like @samp{<%s:%n>} if a foreign select method is
1810 used.
1811
1812 @item P
1813 Indentation based on the level of the topic (@pxref{Group Topics}).
1814
1815 @item c
1816 @vindex gnus-group-uncollapsed-levels
1817 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1818 variable says how many levels to leave at the end of the group name.
1819 The default is 1---this will mean that group names like
1820 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1821
1822 @item m
1823 @vindex gnus-new-mail-mark
1824 @cindex %
1825 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1826 the group lately.
1827
1828 @item p
1829 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1830
1831 @item d
1832 A string that says when you last read the group (@pxref{Group
1833 Timestamp}).
1834
1835 @item u
1836 User defined specifier.  The next character in the format string should
1837 be a letter.  Gnus will call the function
1838 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1839 following @samp{%u}.  The function will be passed a single dummy
1840 parameter as argument.  The function should return a string, which will
1841 be inserted into the buffer just like information from any other
1842 specifier.
1843 @end table
1844
1845 @cindex *
1846 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1847 if no info is available---for instance, if it is a non-activated foreign
1848 group, or a bogus native group.
1849
1850
1851 @node Group Modeline Specification
1852 @subsection Group Modeline Specification
1853 @cindex group modeline
1854
1855 @vindex gnus-group-mode-line-format
1856 The mode line can be changed by setting
1857 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1858 doesn't understand that many format specifiers:
1859
1860 @table @samp
1861 @item S
1862 The native news server.
1863 @item M
1864 The native select method.
1865 @end table
1866
1867
1868 @node Group Highlighting
1869 @subsection Group Highlighting
1870 @cindex highlighting
1871 @cindex group highlighting
1872
1873 @vindex gnus-group-highlight
1874 Highlighting in the group buffer is controlled by the
1875 @code{gnus-group-highlight} variable.  This is an alist with elements
1876 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1877 something non-@code{nil}, the @var{face} will be used on the line.
1878
1879 Here's an example value for this variable that might look nice if the
1880 background is dark:
1881
1882 @lisp
1883 (cond (window-system
1884        (setq custom-background-mode 'light)
1885        (defface my-group-face-1
1886          '((t (:foreground "Red" :bold t))) "First group face")
1887        (defface my-group-face-2
1888          '((t (:foreground "DarkSeaGreen4" :bold t))) "Second group face")
1889        (defface my-group-face-3
1890          '((t (:foreground "Green4" :bold t))) "Third group face")
1891        (defface my-group-face-4
1892          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1893        (defface my-group-face-5
1894          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1895
1896 (setq gnus-group-highlight
1897       '(((> unread 200) . my-group-face-1)
1898         ((and (< level 3) (zerop unread)) . my-group-face-2)
1899         ((< level 3) . my-group-face-3)
1900         ((zerop unread) . my-group-face-4)
1901         (t . my-group-face-5)))
1902 @end lisp
1903
1904 Also @pxref{Faces and Fonts}.
1905
1906 Variables that are dynamically bound when the forms are evaluated
1907 include:
1908
1909 @table @code
1910 @item group
1911 The group name.
1912 @item unread
1913 The number of unread articles in the group.
1914 @item method
1915 The select method.
1916 @item mailp
1917 Whether the group is a mail group.
1918 @item level
1919 The level of the group.
1920 @item score
1921 The score of the group.
1922 @item ticked
1923 The number of ticked articles in the group.
1924 @item total
1925 The total number of articles in the group.  Or rather, MAX-NUMBER minus
1926 MIN-NUMBER plus one.
1927 @item topic
1928 When using the topic minor mode, this variable is bound to the current
1929 topic being inserted.
1930 @end table
1931
1932 When the forms are @code{eval}ed, point is at the beginning of the line
1933 of the group in question, so you can use many of the normal gnus
1934 functions for snarfing info on the group.
1935
1936 @vindex gnus-group-update-hook
1937 @findex gnus-group-highlight-line
1938 @code{gnus-group-update-hook} is called when a group line is changed.
1939 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1940 calls @code{gnus-group-highlight-line} by default.
1941
1942
1943 @node Group Maneuvering
1944 @section Group Maneuvering
1945 @cindex group movement
1946
1947 All movement commands understand the numeric prefix and will behave as
1948 expected, hopefully.
1949
1950 @table @kbd
1951
1952 @item n
1953 @kindex n (Group)
1954 @findex gnus-group-next-unread-group
1955 Go to the next group that has unread articles
1956 (@code{gnus-group-next-unread-group}).
1957
1958 @item p
1959 @itemx DEL
1960 @kindex DEL (Group)
1961 @kindex p (Group)
1962 @findex gnus-group-prev-unread-group
1963 Go to the previous group that has unread articles
1964 (@code{gnus-group-prev-unread-group}).
1965
1966 @item N
1967 @kindex N (Group)
1968 @findex gnus-group-next-group
1969 Go to the next group (@code{gnus-group-next-group}).
1970
1971 @item P
1972 @kindex P (Group)
1973 @findex gnus-group-prev-group
1974 Go to the previous group (@code{gnus-group-prev-group}).
1975
1976 @item M-n
1977 @kindex M-n (Group)
1978 @findex gnus-group-next-unread-group-same-level
1979 Go to the next unread group on the same (or lower) level
1980 (@code{gnus-group-next-unread-group-same-level}).
1981
1982 @item M-p
1983 @kindex M-p (Group)
1984 @findex gnus-group-prev-unread-group-same-level
1985 Go to the previous unread group on the same (or lower) level
1986 (@code{gnus-group-prev-unread-group-same-level}).
1987 @end table
1988
1989 Three commands for jumping to groups:
1990
1991 @table @kbd
1992
1993 @item j
1994 @kindex j (Group)
1995 @findex gnus-group-jump-to-group
1996 Jump to a group (and make it visible if it isn't already)
1997 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
1998 like living groups.
1999
2000 @item ,
2001 @kindex , (Group)
2002 @findex gnus-group-best-unread-group
2003 Jump to the unread group with the lowest level
2004 (@code{gnus-group-best-unread-group}).
2005
2006 @item .
2007 @kindex . (Group)
2008 @findex gnus-group-first-unread-group
2009 Jump to the first group with unread articles
2010 (@code{gnus-group-first-unread-group}).
2011 @end table
2012
2013 @vindex gnus-group-goto-unread
2014 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2015 commands will move to the next group, not the next unread group.  Even
2016 the commands that say they move to the next unread group.  The default
2017 is @code{t}.
2018
2019
2020 @node Selecting a Group
2021 @section Selecting a Group
2022 @cindex group selection
2023
2024 @table @kbd
2025
2026 @item SPACE
2027 @kindex SPACE (Group)
2028 @findex gnus-group-read-group
2029 Select the current group, switch to the summary buffer and display the
2030 first unread article (@code{gnus-group-read-group}).  If there are no
2031 unread articles in the group, or if you give a non-numerical prefix to
2032 this command, gnus will offer to fetch all the old articles in this
2033 group from the server.  If you give a numerical prefix @var{N}, @var{N}
2034 determines the number of articles gnus will fetch.  If @var{N} is
2035 positive, gnus fetches the @var{N} newest articles, if @var{N} is
2036 negative, Gnus fetches the @code{abs(@var{N})} oldest articles.
2037
2038 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2039 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2040 - 4 2 SPC} fetches the 42 oldest ones.
2041
2042 When you are in the group (in the Summary buffer), you can type
2043 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2044 ones.
2045
2046 @item RET
2047 @kindex RET (Group)
2048 @findex gnus-group-select-group
2049 Select the current group and switch to the summary buffer
2050 (@code{gnus-group-select-group}).  Takes the same arguments as
2051 @code{gnus-group-read-group}---the only difference is that this command
2052 does not display the first unread article automatically upon group
2053 entry.
2054
2055 @item M-RET
2056 @kindex M-RET (Group)
2057 @findex gnus-group-quick-select-group
2058 This does the same as the command above, but tries to do it with the
2059 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2060 scoring/killing will be performed, there will be no highlights and no
2061 expunging.  This might be useful if you're in a real hurry and have to
2062 enter some humongous group.  If you give a 0 prefix to this command
2063 (i.e., @kbd{0 M-RET}), gnus won't even generate the summary buffer,
2064 which is useful if you want to toggle threading before generating the
2065 summary buffer (@pxref{Summary Generation Commands}).
2066
2067 @item M-SPACE
2068 @kindex M-SPACE (Group)
2069 @findex gnus-group-visible-select-group
2070 This is yet one more command that does the same as the @kbd{RET}
2071 command, but this one does it without expunging and hiding dormants
2072 (@code{gnus-group-visible-select-group}).
2073
2074 @item C-M-RET
2075 @kindex C-M-RET (Group)
2076 @findex gnus-group-select-group-ephemerally
2077 Finally, this command selects the current group ephemerally without
2078 doing any processing of its contents
2079 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2080 turned off.  Everything you do in the group after selecting it in this
2081 manner will have no permanent effects.
2082
2083 @end table
2084
2085 @vindex gnus-large-newsgroup
2086 The @code{gnus-large-newsgroup} variable says what gnus should consider
2087 to be a big group.  This is 200 by default.  If the group has more
2088 (unread and/or ticked) articles than this, gnus will query the user
2089 before entering the group.  The user can then specify how many articles
2090 should be fetched from the server.  If the user specifies a negative
2091 number (@code{-n}), the @code{n} oldest articles will be fetched.  If it
2092 is positive, the @code{n} articles that have arrived most recently will
2093 be fetched.
2094
2095 @vindex gnus-select-group-hook
2096 @vindex gnus-auto-select-first
2097 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2098 automatically when entering a group with the @kbd{SPACE} command.
2099 Which article this is is controlled by the
2100 @code{gnus-auto-select-subject} variable.  Valid values for this
2101 variable is:
2102
2103 @table @code
2104
2105 @item unread
2106 Place point on the subject line of the first unread article.
2107
2108 @item first
2109 Place point on the subject line of the first article.
2110
2111 @item unseen
2112 Place point on the subject line of the first unseen article.
2113
2114 @item unseen-or-unread
2115 Place point on the subject line of the first unseen article, and if
2116 there is no such article, place point on the subject line of the first
2117 unread article.
2118
2119 @item best
2120 Place point on the subject line of the highest-scored unread article.
2121
2122 @end table
2123
2124 This variable can also be a function.  In that case, that function
2125 will be called to place point on a subject line.  
2126
2127 If you want to prevent automatic selection in some group (say, in a
2128 binary group with Huge articles) you can set the
2129 @code{gnus-auto-select-first} variable to @code{nil} in
2130 @code{gnus-select-group-hook}, which is called when a group is
2131 selected.
2132
2133
2134 @node Subscription Commands
2135 @section Subscription Commands
2136 @cindex subscription
2137
2138 @table @kbd
2139
2140 @item S t
2141 @itemx u
2142 @kindex S t (Group)
2143 @kindex u (Group)
2144 @findex gnus-group-unsubscribe-current-group
2145 @c @icon{gnus-group-unsubscribe}
2146 Toggle subscription to the current group
2147 (@code{gnus-group-unsubscribe-current-group}).
2148
2149 @item S s
2150 @itemx U
2151 @kindex S s (Group)
2152 @kindex U (Group)
2153 @findex gnus-group-unsubscribe-group
2154 Prompt for a group to subscribe, and then subscribe it.  If it was
2155 subscribed already, unsubscribe it instead
2156 (@code{gnus-group-unsubscribe-group}).
2157
2158 @item S k
2159 @itemx C-k
2160 @kindex S k (Group)
2161 @kindex C-k (Group)
2162 @findex gnus-group-kill-group
2163 @c @icon{gnus-group-kill-group}
2164 Kill the current group (@code{gnus-group-kill-group}).
2165
2166 @item S y
2167 @itemx C-y
2168 @kindex S y (Group)
2169 @kindex C-y (Group)
2170 @findex gnus-group-yank-group
2171 Yank the last killed group (@code{gnus-group-yank-group}).
2172
2173 @item C-x C-t
2174 @kindex C-x C-t (Group)
2175 @findex gnus-group-transpose-groups
2176 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2177 really a subscription command, but you can use it instead of a
2178 kill-and-yank sequence sometimes.
2179
2180 @item S w
2181 @itemx C-w
2182 @kindex S w (Group)
2183 @kindex C-w (Group)
2184 @findex gnus-group-kill-region
2185 Kill all groups in the region (@code{gnus-group-kill-region}).
2186
2187 @item S z
2188 @kindex S z (Group)
2189 @findex gnus-group-kill-all-zombies
2190 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2191
2192 @item S C-k
2193 @kindex S C-k (Group)
2194 @findex gnus-group-kill-level
2195 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2196 These groups can't be yanked back after killing, so this command should
2197 be used with some caution.  The only time where this command comes in
2198 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2199 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2200 kill off all unsubscribed groups that do not have message numbers in the
2201 @file{.newsrc} file.
2202
2203 @end table
2204
2205 Also @pxref{Group Levels}.
2206
2207
2208 @node Group Data
2209 @section Group Data
2210
2211 @table @kbd
2212
2213 @item c
2214 @kindex c (Group)
2215 @findex gnus-group-catchup-current
2216 @vindex gnus-group-catchup-group-hook
2217 @c @icon{gnus-group-catchup-current}
2218 Mark all unticked articles in this group as read
2219 (@code{gnus-group-catchup-current}).
2220 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2221 the group buffer.
2222
2223 @item C
2224 @kindex C (Group)
2225 @findex gnus-group-catchup-current-all
2226 Mark all articles in this group, even the ticked ones, as read
2227 (@code{gnus-group-catchup-current-all}).
2228
2229 @item M-c
2230 @kindex M-c (Group)
2231 @findex gnus-group-clear-data
2232 Clear the data from the current group---nix out marks and the list of
2233 read articles (@code{gnus-group-clear-data}).
2234
2235 @item M-x gnus-group-clear-data-on-native-groups
2236 @kindex M-x gnus-group-clear-data-on-native-groups
2237 @findex gnus-group-clear-data-on-native-groups
2238 If you have switched from one @sc{nntp} server to another, all your marks
2239 and read ranges have become worthless.  You can use this command to
2240 clear out all data that you have on your native groups.  Use with
2241 caution.
2242
2243 @end table
2244
2245
2246 @node Group Levels
2247 @section Group Levels
2248 @cindex group level
2249 @cindex level
2250
2251 All groups have a level of @dfn{subscribedness}.  For instance, if a
2252 group is on level 2, it is more subscribed than a group on level 5.  You
2253 can ask gnus to just list groups on a given level or lower
2254 (@pxref{Listing Groups}), or to just check for new articles in groups on
2255 a given level or lower (@pxref{Scanning New Messages}).
2256
2257 Remember:  The higher the level of the group, the less important it is.
2258
2259 @table @kbd
2260
2261 @item S l
2262 @kindex S l (Group)
2263 @findex gnus-group-set-current-level
2264 Set the level of the current group.  If a numeric prefix is given, the
2265 next @var{n} groups will have their levels set.  The user will be
2266 prompted for a level.
2267 @end table
2268
2269 @vindex gnus-level-killed
2270 @vindex gnus-level-zombie
2271 @vindex gnus-level-unsubscribed
2272 @vindex gnus-level-subscribed
2273 Gnus considers groups from levels 1 to
2274 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2275 @code{gnus-level-subscribed} (exclusive) and
2276 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2277 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2278 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2279 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2280 same, but zombie and killed groups have no information on what articles
2281 you have read, etc, stored.  This distinction between dead and living
2282 groups isn't done because it is nice or clever, it is done purely for
2283 reasons of efficiency.
2284
2285 It is recommended that you keep all your mail groups (if any) on quite
2286 low levels (e.g. 1 or 2).
2287
2288 Maybe the following description of the default behavior of Gnus helps to
2289 understand what these levels are all about.  By default, Gnus shows you
2290 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2291 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2292 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2293 groups are hidden, in a way.
2294
2295 Zombie and killed groups are similar to unsubscribed groups in that they
2296 are hidden by default.  But they are different from subscribed and
2297 unsubscribed groups in that Gnus doesn't ask the news server for
2298 information (number of messages, number of unread messages) on zombie
2299 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2300 aren't interested in.  If most groups are killed, Gnus is faster.
2301
2302 Why does Gnus distinguish between zombie and killed groups?  Well, when
2303 a new group arrives on the server, Gnus by default makes it a zombie
2304 group.  This means that you are normally not bothered with new groups,
2305 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2306 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2307 list of killed groups.)
2308
2309 If you want to play with the level variables, you should show some care.
2310 Set them once, and don't touch them ever again.  Better yet, don't touch
2311 them at all unless you know exactly what you're doing.
2312
2313 @vindex gnus-level-default-unsubscribed
2314 @vindex gnus-level-default-subscribed
2315 Two closely related variables are @code{gnus-level-default-subscribed}
2316 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2317 which are the levels that new groups will be put on if they are
2318 (un)subscribed.  These two variables should, of course, be inside the
2319 relevant valid ranges.
2320
2321 @vindex gnus-keep-same-level
2322 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2323 will only move to groups of the same level (or lower).  In
2324 particular, going from the last article in one group to the next group
2325 will go to the next group of the same level (or lower).  This might be
2326 handy if you want to read the most important groups before you read the
2327 rest.
2328
2329 If this variable is @code{best}, Gnus will make the next newsgroup the
2330 one with the best level.
2331
2332 @vindex gnus-group-default-list-level
2333 All groups with a level less than or equal to
2334 @code{gnus-group-default-list-level} will be listed in the group buffer
2335 by default.
2336
2337 @vindex gnus-group-list-inactive-groups
2338 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2339 groups will be listed along with the unread groups.  This variable is
2340 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2341 listed.
2342
2343 @vindex gnus-group-use-permanent-levels
2344 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2345 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2346 use this level as the ``work'' level.
2347
2348 @vindex gnus-activate-level
2349 Gnus will normally just activate (i. e., query the server about) groups
2350 on level @code{gnus-activate-level} or less.  If you don't want to
2351 activate unsubscribed groups, for instance, you might set this variable
2352 to 5.  The default is 6.
2353
2354
2355 @node Group Score
2356 @section Group Score
2357 @cindex group score
2358 @cindex group rank
2359 @cindex rank
2360
2361 You would normally keep important groups on high levels, but that scheme
2362 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2363 group buffer according to how often you read groups, perhaps?  Within
2364 reason?
2365
2366 This is what @dfn{group score} is for.  You can have Gnus assign a score
2367 to each group through the mechanism described below.  You can then sort
2368 the group buffer based on this score.  Alternatively, you can sort on
2369 score and then level.  (Taken together, the level and the score is
2370 called the @dfn{rank} of the group.  A group that is on level 4 and has
2371 a score of 1 has a higher rank than a group on level 5 that has a score
2372 of 300.  (The level is the most significant part and the score is the
2373 least significant part.))
2374
2375 @findex gnus-summary-bubble-group
2376 If you want groups you read often to get higher scores than groups you
2377 read seldom you can add the @code{gnus-summary-bubble-group} function to
2378 the @code{gnus-summary-exit-hook} hook.  This will result (after
2379 sorting) in a bubbling sort of action.  If you want to see that in
2380 action after each summary exit, you can add
2381 @code{gnus-group-sort-groups-by-rank} or
2382 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2383 slow things down somewhat.
2384
2385
2386 @node Marking Groups
2387 @section Marking Groups
2388 @cindex marking groups
2389
2390 If you want to perform some command on several groups, and they appear
2391 subsequently in the group buffer, you would normally just give a
2392 numerical prefix to the command.  Most group commands will then do your
2393 bidding on those groups.
2394
2395 However, if the groups are not in sequential order, you can still
2396 perform a command on several groups.  You simply mark the groups first
2397 with the process mark and then execute the command.
2398
2399 @table @kbd
2400
2401 @item #
2402 @kindex # (Group)
2403 @itemx M m
2404 @kindex M m (Group)
2405 @findex gnus-group-mark-group
2406 Set the mark on the current group (@code{gnus-group-mark-group}).
2407
2408 @item M-#
2409 @kindex M-# (Group)
2410 @itemx M u
2411 @kindex M u (Group)
2412 @findex gnus-group-unmark-group
2413 Remove the mark from the current group
2414 (@code{gnus-group-unmark-group}).
2415
2416 @item M U
2417 @kindex M U (Group)
2418 @findex gnus-group-unmark-all-groups
2419 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2420
2421 @item M w
2422 @kindex M w (Group)
2423 @findex gnus-group-mark-region
2424 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2425
2426 @item M b
2427 @kindex M b (Group)
2428 @findex gnus-group-mark-buffer
2429 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2430
2431 @item M r
2432 @kindex M r (Group)
2433 @findex gnus-group-mark-regexp
2434 Mark all groups that match some regular expression
2435 (@code{gnus-group-mark-regexp}).
2436 @end table
2437
2438 Also @pxref{Process/Prefix}.
2439
2440 @findex gnus-group-universal-argument
2441 If you want to execute some command on all groups that have been marked
2442 with the process mark, you can use the @kbd{M-&}
2443 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2444 the command to be executed.
2445
2446
2447 @node Foreign Groups
2448 @section Foreign Groups
2449 @cindex foreign groups
2450
2451 Below are some group mode commands for making and editing general foreign
2452 groups, as well as commands to ease the creation of a few
2453 special-purpose groups.  All these commands insert the newly created
2454 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2455 consulted.
2456
2457 @table @kbd
2458
2459 @item G m
2460 @kindex G m (Group)
2461 @findex gnus-group-make-group
2462 @cindex making groups
2463 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2464 for a name, a method and possibly an @dfn{address}.  For an easier way
2465 to subscribe to @sc{nntp} groups, @pxref{Browse Foreign Server}.
2466
2467 @item G r
2468 @kindex G r (Group)
2469 @findex gnus-group-rename-group
2470 @cindex renaming groups
2471 Rename the current group to something else
2472 (@code{gnus-group-rename-group}).  This is valid only on some
2473 groups---mail groups mostly.  This command might very well be quite slow
2474 on some back ends.
2475
2476 @item G c
2477 @kindex G c (Group)
2478 @cindex customizing
2479 @findex gnus-group-customize
2480 Customize the group parameters (@code{gnus-group-customize}).
2481
2482 @item G e
2483 @kindex G e (Group)
2484 @findex gnus-group-edit-group-method
2485 @cindex renaming groups
2486 Enter a buffer where you can edit the select method of the current
2487 group (@code{gnus-group-edit-group-method}).
2488
2489 @item G p
2490 @kindex G p (Group)
2491 @findex gnus-group-edit-group-parameters
2492 Enter a buffer where you can edit the group parameters
2493 (@code{gnus-group-edit-group-parameters}).
2494
2495 @item G E
2496 @kindex G E (Group)
2497 @findex gnus-group-edit-group
2498 Enter a buffer where you can edit the group info
2499 (@code{gnus-group-edit-group}).
2500
2501 @item G d
2502 @kindex G d (Group)
2503 @findex gnus-group-make-directory-group
2504 @cindex nndir
2505 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2506 for a directory name (@code{gnus-group-make-directory-group}).
2507
2508 @item G h
2509 @kindex G h (Group)
2510 @cindex help group
2511 @findex gnus-group-make-help-group
2512 Make the gnus help group (@code{gnus-group-make-help-group}).
2513
2514 @item G a
2515 @kindex G a (Group)
2516 @cindex (ding) archive
2517 @cindex archive group
2518 @findex gnus-group-make-archive-group
2519 @vindex gnus-group-archive-directory
2520 @vindex gnus-group-recent-archive-directory
2521 Make a gnus archive group (@code{gnus-group-make-archive-group}).  By
2522 default a group pointing to the most recent articles will be created
2523 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2524 group will be created from @code{gnus-group-archive-directory}.
2525
2526 @item G k
2527 @kindex G k (Group)
2528 @findex gnus-group-make-kiboze-group
2529 @cindex nnkiboze
2530 Make a kiboze group.  You will be prompted for a name, for a regexp to
2531 match groups to be ``included'' in the kiboze group, and a series of
2532 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2533 @xref{Kibozed Groups}.
2534
2535 @item G D
2536 @kindex G D (Group)
2537 @findex gnus-group-enter-directory
2538 @cindex nneething
2539 Read an arbitrary directory as if it were a newsgroup with the
2540 @code{nneething} back end (@code{gnus-group-enter-directory}).
2541 @xref{Anything Groups}.
2542
2543 @item G f
2544 @kindex G f (Group)
2545 @findex gnus-group-make-doc-group
2546 @cindex ClariNet Briefs
2547 @cindex nndoc
2548 Make a group based on some file or other
2549 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2550 command, you will be prompted for a file name and a file type.
2551 Currently supported types are @code{mbox}, @code{babyl},
2552 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2553 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2554 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2555 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2556 you run this command without a prefix, Gnus will guess at the file
2557 type.  @xref{Document Groups}.
2558
2559 @item G u
2560 @kindex G u (Group)
2561 @vindex gnus-useful-groups
2562 @findex gnus-group-make-useful-group
2563 Create one of the groups mentioned in @code{gnus-useful-groups}
2564 (@code{gnus-group-make-useful-group}).
2565
2566 @item G w
2567 @kindex G w (Group)
2568 @findex gnus-group-make-web-group
2569 @cindex DejaNews
2570 @cindex Alta Vista
2571 @cindex InReference
2572 @cindex nnweb
2573 Make an ephemeral group based on a web search
2574 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2575 command, make a solid group instead.  You will be prompted for the
2576 search engine type and the search string.  Valid search engine types
2577 include @code{dejanews}, @code{altavista} and @code{reference}.
2578 @xref{Web Searches}.
2579
2580 If you use the @code{dejanews} search engine, you can limit the search
2581 to a particular group by using a match string like
2582 @samp{~g alt.sysadmin.recovery shaving}.
2583
2584 @item G DEL
2585 @kindex G DEL (Group)
2586 @findex gnus-group-delete-group
2587 This function will delete the current group
2588 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2589 actually delete all the articles in the group, and forcibly remove the
2590 group itself from the face of the Earth.  Use a prefix only if you are
2591 absolutely sure of what you are doing.  This command can't be used on
2592 read-only groups (like @code{nntp} group), though.
2593
2594 @item G V
2595 @kindex G V (Group)
2596 @findex gnus-group-make-empty-virtual
2597 Make a new, fresh, empty @code{nnvirtual} group
2598 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2599
2600 @item G v
2601 @kindex G v (Group)
2602 @findex gnus-group-add-to-virtual
2603 Add the current group to an @code{nnvirtual} group
2604 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2605 @end table
2606
2607 @xref{Select Methods}, for more information on the various select
2608 methods.
2609
2610 @vindex gnus-activate-foreign-newsgroups
2611 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2612 gnus will check all foreign groups with this level or lower at startup.
2613 This might take quite a while, especially if you subscribe to lots of
2614 groups from different @sc{nntp} servers.  Also @pxref{Group Levels};
2615 @code{gnus-activate-level} also affects activation of foreign
2616 newsgroups.
2617
2618
2619 @node Group Parameters
2620 @section Group Parameters
2621 @cindex group parameters
2622
2623 The group parameters store information local to a particular group.
2624 Here's an example group parameter list:
2625
2626 @example
2627 ((to-address . "ding@@gnus.org")
2628  (auto-expire . t))
2629 @end example
2630
2631 We see that each element consists of a "dotted pair"---the thing before
2632 the dot is the key, while the thing after the dot is the value.  All the
2633 parameters have this form @emph{except} local variable specs, which are
2634 not dotted pairs, but proper lists.
2635
2636 Some parameters have correspondant customizable variables, each of which
2637 is an alist of regexps and values.
2638
2639 The following group parameters can be used:
2640
2641 @table @code
2642 @item to-address
2643 @cindex to-address
2644 Address used by when doing followups and new posts.
2645
2646 @example
2647 (to-address . "some@@where.com")
2648 @end example
2649
2650 This is primarily useful in mail groups that represent closed mailing
2651 lists---mailing lists where it's expected that everybody that writes to
2652 the mailing list is subscribed to it.  Since using this parameter
2653 ensures that the mail only goes to the mailing list itself, it means
2654 that members won't receive two copies of your followups.
2655
2656 Using @code{to-address} will actually work whether the group is foreign
2657 or not.  Let's say there's a group on the server that is called
2658 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2659 the articles from a mail-to-news gateway.  Posting directly to this
2660 group is therefore impossible---you have to send mail to the mailing
2661 list address instead.
2662
2663 See also @code{gnus-parameter-to-address-alist}.
2664
2665 @item to-list
2666 @cindex to-list
2667 Address used when doing @kbd{a} in that group.
2668
2669 @example
2670 (to-list . "some@@where.com")
2671 @end example
2672
2673 It is totally ignored
2674 when doing a followup---except that if it is present in a news group,
2675 you'll get mail group semantics when doing @kbd{f}.
2676
2677 If you do an @kbd{a} command in a mail group and you have neither a
2678 @code{to-list} group parameter nor a @code{to-address} group parameter,
2679 then a @code{to-list} group parameter will be added automatically upon
2680 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2681 @vindex gnus-add-to-list
2682
2683 If you do an @kbd{a} command in a mail group and you don't have a
2684 @code{to-list} group parameter, one will be added automatically upon
2685 sending the message.
2686
2687 @findex gnus-mailing-list-mode
2688 @cindex Mail List Groups
2689 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2690 entering summary buffer.
2691
2692 See also @code{gnus-parameter-to-list-alist}.
2693
2694 @anchor{subscribed}
2695 @item subscribed
2696 @cindex subscribed
2697 If this parameter is set to @code{t}, Gnus will consider the
2698 to-address and to-list parameters for this group as addresses of
2699 mailing lists you are subscribed to.  Giving Gnus this information is
2700 (only) a first step in getting it to generate correct Mail-Followup-To
2701 headers for your posts to these lists.  Look here @pxref{(message)Mailing
2702 Lists} for a complete treatment of available MFT support.
2703
2704 See also @code{gnus-find-subscribed-addresses}, the function that
2705 directly uses this group parameter.
2706
2707 @item visible
2708 @cindex visible
2709 If the group parameter list has the element @code{(visible . t)},
2710 that group will always be visible in the Group buffer, regardless
2711 of whether it has any unread articles.
2712
2713 @item broken-reply-to
2714 @cindex broken-reply-to
2715 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2716 headers in this group are to be ignored.  This can be useful if you're
2717 reading a mailing list group where the listserv has inserted
2718 @code{Reply-To} headers that point back to the listserv itself.  This is
2719 broken behavior.  So there!
2720
2721 @item to-group
2722 @cindex to-group
2723 Elements like @code{(to-group . "some.group.name")} means that all
2724 posts in that group will be sent to @code{some.group.name}.
2725
2726 @item newsgroup
2727 @cindex newsgroup
2728 If you have @code{(newsgroup . t)} in the group parameter list, gnus
2729 will treat all responses as if they were responses to news articles.
2730 This can be useful if you have a mail group that's really a mirror of a
2731 news group.
2732
2733 @item gcc-self
2734 @cindex gcc-self
2735 If @code{(gcc-self . t)} is present in the group parameter list, newly
2736 composed messages will be @code{Gcc}'d to the current group.  If
2737 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2738 generated, if @code{(gcc-self . "string")} is present, this string will
2739 be inserted literally as a @code{gcc} header.  This parameter takes
2740 precedence over any default @code{Gcc} rules as described later
2741 (@pxref{Archived Messages}).  CAVEAT:: It yields an error putting
2742 @code{(gcc-self . t)} in groups of a @code{nntp} server or so, because
2743 a @code{nntp} server doesn't accept artciles.
2744  
2745 @item auto-expire
2746 @cindex auto-expire
2747 If the group parameter has an element that looks like @code{(auto-expire
2748 . t)}, all articles read will be marked as expirable.  For an
2749 alternative approach, @pxref{Expiring Mail}.
2750
2751 See also @code{gnus-auto-expirable-newsgroups}.
2752
2753 @item total-expire
2754 @cindex total-expire
2755 If the group parameter has an element that looks like
2756 @code{(total-expire . t)}, all read articles will be put through the
2757 expiry process, even if they are not marked as expirable.  Use with
2758 caution.  Unread, ticked and dormant articles are not eligible for
2759 expiry.
2760
2761 See also @code{gnus-total-expirable-newsgroups}.
2762
2763 @item expiry-wait
2764 @cindex expiry-wait
2765 @vindex nnmail-expiry-wait-function
2766 If the group parameter has an element that looks like @code{(expiry-wait
2767 . 10)}, this value will override any @code{nnmail-expiry-wait} and
2768 @code{nnmail-expiry-wait-function} when expiring expirable messages.
2769 The value can either be a number of days (not necessarily an integer) or
2770 the symbols @code{never} or @code{immediate}.
2771
2772 @item score-file
2773 @cindex score file group parameter
2774 Elements that look like @code{(score-file . "file")} will make
2775 @file{file} into the current score file for the group in question.  All
2776 interactive score entries will be put into this file.
2777
2778 @item adapt-file
2779 @cindex adapt file group parameter
2780 Elements that look like @code{(adapt-file . "file")} will make
2781 @file{file} into the current adaptive file for the group in question.
2782 All adaptive score entries will be put into this file.
2783
2784 @item admin-address
2785 @cindex admin-address
2786 When unsubscribing from a mailing list you should never send the
2787 unsubscription notice to the mailing list itself.  Instead, you'd send
2788 messages to the administrative address.  This parameter allows you to
2789 put the admin address somewhere convenient.
2790
2791 @item display
2792 @cindex display
2793 Elements that look like @code{(display . MODE)} say which articles to
2794 display on entering the group.  Valid values are:
2795
2796 @table @code
2797 @item all
2798 Display all articles, both read and unread.
2799
2800 @item an integer
2801 Display the last INTEGER articles in the group.  This is the same as
2802 entering the group with C-u INTEGER.
2803
2804 @item default
2805 Display the default visible articles, which normally includes unread and
2806 ticked articles.
2807
2808 @item an array
2809 Display articles that satisfy a predicate.
2810
2811 Here are some examples:
2812
2813 @table @code
2814 @item [unread]
2815 Display only unread articles.
2816
2817 @item [not expire]
2818 Display everything except expirable articles.
2819
2820 @item [and (not reply) (not expire)]
2821 Display everything except expirable and articles you've already
2822 responded to.
2823 @end table
2824
2825 The available operators are @code{not}, @code{and} and @code{or}.
2826 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2827 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2828 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2829 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2830
2831 @end table
2832
2833 The @code{display} parameter works by limiting the summary buffer to
2834 the subset specified.  You can pop the limit by using the @kbd{/ w}
2835 command (@pxref{Limiting}).
2836
2837 @item comment
2838 @cindex comment
2839 Elements that look like @code{(comment . "This is a comment")}
2840 are arbitrary comments on the group.  They are currently ignored by
2841 gnus, but provide a place for you to store information on particular
2842 groups.
2843
2844 @item charset
2845 @cindex charset
2846 Elements that look like @code{(charset . iso-8859-1)} will make
2847 @code{iso-8859-1} the default charset; that is, the charset that will be
2848 used for all articles that do not specify a charset.
2849
2850 See also @code{gnus-group-charset-alist}.
2851
2852 @item ignored-charsets
2853 @cindex ignored-charset
2854 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2855 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2856 default charset will be used for decoding articles.
2857
2858 See also @code{gnus-group-ignored-charsets-alist}.
2859
2860 @item posting-style
2861 @cindex posting-style
2862 You can store additional posting style information for this group only
2863 here (@pxref{Posting Styles}).  The format is that of an entry in the
2864 @code{gnus-posting-styles} alist, except that there's no regexp matching
2865 the group name (of course).  Style elements in this group parameter will
2866 take precedence over the ones found in @code{gnus-posting-styles}.
2867
2868 For instance, if you want a funky name and signature in this group only,
2869 instead of hacking @code{gnus-posting-styles}, you could put something
2870 like this in the group parameters:
2871
2872 @example
2873 (posting-style
2874   (name "Funky Name")
2875   (signature "Funky Signature"))
2876 @end example
2877
2878 @item post-method
2879 @cindex post-method
2880 If it is set, the value is used as the method for posting message
2881 instead of @code{gnus-post-method}.
2882
2883 @item banner
2884 @cindex banner
2885 An item like @code{(banner . "regex")} causes any part of an article
2886 that matches the regular expression "regex" to be stripped. Instead of
2887 "regex", you can also use the symbol @code{signature} which strips the
2888 last signature or any of the elements of the alist
2889 @code{gnus-article-banner-alist}.
2890
2891 @item sieve
2892 @cindex sieve
2893 This parameter contains a Sieve test that should match incoming mail
2894 that should be placed in this group.  From this group parameter, a
2895 Sieve @samp{IF} control structure is generated, having the test as the
2896 condition and @samp{fileinto "group.name";} as the body.
2897
2898 For example, if the INBOX.list.sieve group has the @code{(sieve
2899 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2900 translating the group parameter into a Sieve script (@pxref{Sieve
2901 Commands}) the following Sieve code is generated:
2902
2903 @example
2904 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2905         fileinto \"INBOX.list.sieve\";
2906 @}
2907 @end example
2908
2909 The Sieve language is described in RFC 3028.  @xref{Top, , Top, sieve,
2910 Emacs Sieve}.
2911
2912 @item (@var{variable} @var{form})
2913 You can use the group parameters to set variables local to the group you
2914 are entering.  If you want to turn threading off in @samp{news.answers},
2915 you could put @code{(gnus-show-threads nil)} in the group parameters of
2916 that group.  @code{gnus-show-threads} will be made into a local variable
2917 in the summary buffer you enter, and the form @code{nil} will be
2918 @code{eval}ed there.
2919
2920 @vindex gnus-list-identifiers
2921 A use for this feature, is to remove a mailing list identifier tag in
2922 the subject fields of articles.   E.g. if the news group
2923 @samp{nntp+news.gnus.org:gmane.text.docbook.apps} has the tag
2924 @samp{DOC-BOOK-APPS:} in the subject of all articles, this tag can be
2925 removed from the article subjects in the summary buffer for the group by
2926 putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")} into the group
2927 parameters for the group.
2928
2929
2930 This can also be used as a group-specific hook function, if you'd like.
2931 If you want to hear a beep when you enter a group, you could put
2932 something like @code{(dummy-variable (ding))} in the parameters of that
2933 group.  @code{dummy-variable} will be set to the result of the
2934 @code{(ding)} form, but who cares?
2935
2936 @end table
2937
2938 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2939 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2940 presents you with a Customize-like interface.  The latter helps avoid
2941 silly Lisp errors.)  You might also be interested in reading about topic
2942 parameters (@pxref{Topic Parameters}).
2943
2944 Group parameters can be set via the @code{gnus-parameters} variable too.
2945 But some variables, such as @code{visible}, have no effect.  For
2946 example:
2947
2948 @example
2949 (setq gnus-parameters
2950       '(("mail\\..*"
2951          (gnus-show-threads nil)
2952          (gnus-use-scoring nil)
2953          (gnus-summary-line-format
2954           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
2955          (gcc-self . t)
2956          (display . all))
2957
2958         ("^nnimap:\\(foo.bar\\)$"
2959          (to-group . "\\1"))
2960
2961         ("mail\\.me"
2962          (gnus-use-scoring  t))
2963
2964         ("list\\..*"
2965          (total-expire . t)
2966          (broken-reply-to . t))))
2967 @end example
2968
2969 String value of parameters will be subjected to regexp substitution, as
2970 the @code{to-group} example shows.
2971
2972
2973 @node Listing Groups
2974 @section Listing Groups
2975 @cindex group listing
2976
2977 These commands all list various slices of the groups available.
2978
2979 @table @kbd
2980
2981 @item l
2982 @itemx A s
2983 @kindex A s (Group)
2984 @kindex l (Group)
2985 @findex gnus-group-list-groups
2986 List all groups that have unread articles
2987 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
2988 command will list only groups of level ARG and lower.  By default, it
2989 only lists groups of level five (i. e.,
2990 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
2991 groups).
2992
2993 @item L
2994 @itemx A u
2995 @kindex A u (Group)
2996 @kindex L (Group)
2997 @findex gnus-group-list-all-groups
2998 List all groups, whether they have unread articles or not
2999 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3000 this command will list only groups of level ARG and lower.  By default,
3001 it lists groups of level seven or lower (i.e., just subscribed and
3002 unsubscribed groups).
3003
3004 @item A l
3005 @kindex A l (Group)
3006 @findex gnus-group-list-level
3007 List all unread groups on a specific level
3008 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3009 with no unread articles.
3010
3011 @item A k
3012 @kindex A k (Group)
3013 @findex gnus-group-list-killed
3014 List all killed groups (@code{gnus-group-list-killed}).  If given a
3015 prefix argument, really list all groups that are available, but aren't
3016 currently (un)subscribed.  This could entail reading the active file
3017 from the server.
3018
3019 @item A z
3020 @kindex A z (Group)
3021 @findex gnus-group-list-zombies
3022 List all zombie groups (@code{gnus-group-list-zombies}).
3023
3024 @item A m
3025 @kindex A m (Group)
3026 @findex gnus-group-list-matching
3027 List all unread, subscribed groups with names that match a regexp
3028 (@code{gnus-group-list-matching}).
3029
3030 @item A M
3031 @kindex A M (Group)
3032 @findex gnus-group-list-all-matching
3033 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3034
3035 @item A A
3036 @kindex A A (Group)
3037 @findex gnus-group-list-active
3038 List absolutely all groups in the active file(s) of the
3039 server(s) you are connected to (@code{gnus-group-list-active}).  This
3040 might very well take quite a while.  It might actually be a better idea
3041 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3042 thing to match on.  Also note that this command may list groups that
3043 don't exist (yet)---these will be listed as if they were killed groups.
3044 Take the output with some grains of salt.
3045
3046 @item A a
3047 @kindex A a (Group)
3048 @findex gnus-group-apropos
3049 List all groups that have names that match a regexp
3050 (@code{gnus-group-apropos}).
3051
3052 @item A d
3053 @kindex A d (Group)
3054 @findex gnus-group-description-apropos
3055 List all groups that have names or descriptions that match a regexp
3056 (@code{gnus-group-description-apropos}).
3057
3058 @item A c
3059 @kindex A c (Group)
3060 @findex gnus-group-list-cached
3061 List all groups with cached articles (@code{gnus-group-list-cached}).
3062
3063 @item A ?
3064 @kindex A ? (Group)
3065 @findex gnus-group-list-dormant
3066 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3067
3068 @item A /
3069 @kindex A / (Group)
3070 @findex gnus-group-list-limit
3071 List groups limited within the current selection
3072 (@code{gnus-group-list-limit}).
3073
3074 @item A f
3075 @kindex A f (Group)
3076 @findex gnus-group-list-flush
3077 Flush groups from the current selection (@code{gnus-group-list-flush}).
3078
3079 @item A p
3080 @kindex A p (Group)
3081 @findex gnus-group-list-plus
3082 List groups plus the current selection (@code{gnus-group-list-plus}).
3083
3084 @end table
3085
3086 @vindex gnus-permanently-visible-groups
3087 @cindex visible group parameter
3088 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3089 always be shown, whether they have unread articles or not.  You can also
3090 add the @code{visible} element to the group parameters in question to
3091 get the same effect.
3092
3093 @vindex gnus-list-groups-with-ticked-articles
3094 Groups that have just ticked articles in it are normally listed in the
3095 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3096 @code{nil}, these groups will be treated just like totally empty
3097 groups.  It is @code{t} by default.
3098
3099
3100 @node Sorting Groups
3101 @section Sorting Groups
3102 @cindex sorting groups
3103
3104 @kindex C-c C-s (Group)
3105 @findex gnus-group-sort-groups
3106 @vindex gnus-group-sort-function
3107 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3108 group buffer according to the function(s) given by the
3109 @code{gnus-group-sort-function} variable.  Available sorting functions
3110 include:
3111
3112 @table @code
3113
3114 @item gnus-group-sort-by-alphabet
3115 @findex gnus-group-sort-by-alphabet
3116 Sort the group names alphabetically.  This is the default.
3117
3118 @item gnus-group-sort-by-real-name
3119 @findex gnus-group-sort-by-real-name
3120 Sort the group alphabetically on the real (unprefixed) group names.
3121
3122 @item gnus-group-sort-by-level
3123 @findex gnus-group-sort-by-level
3124 Sort by group level.
3125
3126 @item gnus-group-sort-by-score
3127 @findex gnus-group-sort-by-score
3128 Sort by group score.  @xref{Group Score}.
3129
3130 @item gnus-group-sort-by-rank
3131 @findex gnus-group-sort-by-rank
3132 Sort by group score and then the group level.  The level and the score
3133 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3134
3135 @item gnus-group-sort-by-unread
3136 @findex gnus-group-sort-by-unread
3137 Sort by number of unread articles.
3138
3139 @item gnus-group-sort-by-method
3140 @findex gnus-group-sort-by-method
3141 Sort alphabetically on the select method.
3142
3143 @item gnus-group-sort-by-server
3144 @findex gnus-group-sort-by-server
3145 Sort alphabetically on the Gnus server name.
3146
3147
3148 @end table
3149
3150 @code{gnus-group-sort-function} can also be a list of sorting
3151 functions.  In that case, the most significant sort key function must be
3152 the last one.
3153
3154
3155 There are also a number of commands for sorting directly according to
3156 some sorting criteria:
3157
3158 @table @kbd
3159 @item G S a
3160 @kindex G S a (Group)
3161 @findex gnus-group-sort-groups-by-alphabet
3162 Sort the group buffer alphabetically by group name
3163 (@code{gnus-group-sort-groups-by-alphabet}).
3164
3165 @item G S u
3166 @kindex G S u (Group)
3167 @findex gnus-group-sort-groups-by-unread
3168 Sort the group buffer by the number of unread articles
3169 (@code{gnus-group-sort-groups-by-unread}).
3170
3171 @item G S l
3172 @kindex G S l (Group)
3173 @findex gnus-group-sort-groups-by-level
3174 Sort the group buffer by group level
3175 (@code{gnus-group-sort-groups-by-level}).
3176
3177 @item G S v
3178 @kindex G S v (Group)
3179 @findex gnus-group-sort-groups-by-score
3180 Sort the group buffer by group score
3181 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3182
3183 @item G S r
3184 @kindex G S r (Group)
3185 @findex gnus-group-sort-groups-by-rank
3186 Sort the group buffer by group rank
3187 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3188
3189 @item G S m
3190 @kindex G S m (Group)
3191 @findex gnus-group-sort-groups-by-method
3192 Sort the group buffer alphabetically by back end name
3193 (@code{gnus-group-sort-groups-by-method}).
3194
3195 @end table
3196
3197 All the commands below obey the process/prefix convention
3198 (@pxref{Process/Prefix}).
3199
3200 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3201 commands will sort in reverse order.
3202
3203 You can also sort a subset of the groups:
3204
3205 @table @kbd
3206 @item G P a
3207 @kindex G P a (Group)
3208 @findex gnus-group-sort-selected-groups-by-alphabet
3209 Sort the groups alphabetically by group name
3210 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3211
3212 @item G P u
3213 @kindex G P u (Group)
3214 @findex gnus-group-sort-selected-groups-by-unread
3215 Sort the groups by the number of unread articles
3216 (@code{gnus-group-sort-selected-groups-by-unread}).
3217
3218 @item G P l
3219 @kindex G P l (Group)
3220 @findex gnus-group-sort-selected-groups-by-level
3221 Sort the groups by group level
3222 (@code{gnus-group-sort-selected-groups-by-level}).
3223
3224 @item G P v
3225 @kindex G P v (Group)
3226 @findex gnus-group-sort-selected-groups-by-score
3227 Sort the groups by group score
3228 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3229
3230 @item G P r
3231 @kindex G P r (Group)
3232 @findex gnus-group-sort-selected-groups-by-rank
3233 Sort the groups by group rank
3234 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3235
3236 @item G P m
3237 @kindex G P m (Group)
3238 @findex gnus-group-sort-selected-groups-by-method
3239 Sort the groups alphabetically by back end name
3240 (@code{gnus-group-sort-selected-groups-by-method}).
3241
3242 @item G P s
3243 @kindex G P s (Group)
3244 @findex gnus-group-sort-selected-groups
3245 Sort the groups according to @code{gnus-group-sort-function}.
3246
3247 @end table
3248
3249 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3250 move groups around.
3251
3252
3253 @node Group Maintenance
3254 @section Group Maintenance
3255 @cindex bogus groups
3256
3257 @table @kbd
3258 @item b
3259 @kindex b (Group)
3260 @findex gnus-group-check-bogus-groups
3261 Find bogus groups and delete them
3262 (@code{gnus-group-check-bogus-groups}).
3263
3264 @item F
3265 @kindex F (Group)
3266 @findex gnus-group-find-new-groups
3267 Find new groups and process them (@code{gnus-group-find-new-groups}).
3268 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3269 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3270 to query the server for new groups, and subscribe the new groups as
3271 zombies.
3272
3273 @item C-c C-x
3274 @kindex C-c C-x (Group)
3275 @findex gnus-group-expire-articles
3276 Run all expirable articles in the current group through the expiry
3277 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3278 all expirable articles in the group that have been around for a while.
3279 (@pxref{Expiring Mail}).
3280
3281 @item C-c C-M-x
3282 @kindex C-c C-M-x (Group)
3283 @findex gnus-group-expire-all-groups
3284 Run all expirable articles in all groups through the expiry process
3285 (@code{gnus-group-expire-all-groups}).
3286
3287 @end table
3288
3289
3290 @node Browse Foreign Server
3291 @section Browse Foreign Server
3292 @cindex foreign servers
3293 @cindex browsing servers
3294
3295 @table @kbd
3296 @item B
3297 @kindex B (Group)
3298 @findex gnus-group-browse-foreign-server
3299 You will be queried for a select method and a server name.  Gnus will
3300 then attempt to contact this server and let you browse the groups there
3301 (@code{gnus-group-browse-foreign-server}).
3302 @end table
3303
3304 @findex gnus-browse-mode
3305 A new buffer with a list of available groups will appear.  This buffer
3306 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3307 a lot) like a normal group buffer.
3308
3309 Here's a list of keystrokes available in the browse mode:
3310
3311 @table @kbd
3312 @item n
3313 @kindex n (Browse)
3314 @findex gnus-group-next-group
3315 Go to the next group (@code{gnus-group-next-group}).
3316
3317 @item p
3318 @kindex p (Browse)
3319 @findex gnus-group-prev-group
3320 Go to the previous group (@code{gnus-group-prev-group}).
3321
3322 @item SPACE
3323 @kindex SPACE (Browse)
3324 @findex gnus-browse-read-group
3325 Enter the current group and display the first article
3326 (@code{gnus-browse-read-group}).
3327
3328 @item RET
3329 @kindex RET (Browse)
3330 @findex gnus-browse-select-group
3331 Enter the current group (@code{gnus-browse-select-group}).
3332
3333 @item u
3334 @kindex u (Browse)
3335 @findex gnus-browse-unsubscribe-current-group
3336 Unsubscribe to the current group, or, as will be the case here,
3337 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3338
3339 @item l
3340 @itemx q
3341 @kindex q (Browse)
3342 @kindex l (Browse)
3343 @findex gnus-browse-exit
3344 Exit browse mode (@code{gnus-browse-exit}).
3345
3346 @item ?
3347 @kindex ? (Browse)
3348 @findex gnus-browse-describe-briefly
3349 Describe browse mode briefly (well, there's not much to describe, is
3350 there) (@code{gnus-browse-describe-briefly}).
3351 @end table
3352
3353
3354 @node Exiting Gnus
3355 @section Exiting gnus
3356 @cindex exiting gnus
3357
3358 Yes, gnus is ex(c)iting.
3359
3360 @table @kbd
3361 @item z
3362 @kindex z (Group)
3363 @findex gnus-group-suspend
3364 Suspend gnus (@code{gnus-group-suspend}).  This doesn't really exit gnus,
3365 but it kills all buffers except the Group buffer.  I'm not sure why this
3366 is a gain, but then who am I to judge?
3367
3368 @item q
3369 @kindex q (Group)
3370 @findex gnus-group-exit
3371 @c @icon{gnus-group-exit}
3372 Quit gnus (@code{gnus-group-exit}).
3373
3374 @item Q
3375 @kindex Q (Group)
3376 @findex gnus-group-quit
3377 Quit gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3378 The dribble file will be saved, though (@pxref{Auto Save}).
3379 @end table
3380
3381 @vindex gnus-exit-gnus-hook
3382 @vindex gnus-suspend-gnus-hook
3383 @code{gnus-suspend-gnus-hook} is called when you suspend gnus and
3384 @code{gnus-exit-gnus-hook} is called when you quit gnus, while
3385 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3386 exiting gnus.
3387
3388 @findex gnus-unload
3389 @cindex unloading
3390 If you wish to completely unload gnus and all its adherents, you can use
3391 the @code{gnus-unload} command.  This command is also very handy when
3392 trying to customize meta-variables.
3393
3394 Note:
3395
3396 @quotation
3397 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3398 numbly heavy and herself fall into a hazy trance as the boy sitting
3399 behind her drew repeated lines with his pencil across the back of her
3400 plastic chair.
3401 @end quotation
3402
3403
3404 @node Group Topics
3405 @section Group Topics
3406 @cindex topics
3407
3408 If you read lots and lots of groups, it might be convenient to group
3409 them hierarchically according to topics.  You put your Emacs groups over
3410 here, your sex groups over there, and the rest (what, two groups or so?)
3411 you put in some misc section that you never bother with anyway.  You can
3412 even group the Emacs sex groups as a sub-topic to either the Emacs
3413 groups or the sex groups---or both!  Go wild!
3414
3415 @iftex
3416 @iflatex
3417 \gnusfigure{Group Topics}{400}{
3418 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3419 }
3420 @end iflatex
3421 @end iftex
3422
3423 Here's an example:
3424
3425 @example
3426 Gnus
3427   Emacs -- I wuw it!
3428      3: comp.emacs
3429      2: alt.religion.emacs
3430     Naughty Emacs
3431      452: alt.sex.emacs
3432        0: comp.talk.emacs.recovery
3433   Misc
3434      8: comp.binaries.fractals
3435     13: comp.sources.unix
3436 @end example
3437
3438 @findex gnus-topic-mode
3439 @kindex t (Group)
3440 To get this @emph{fab} functionality you simply turn on (ooh!) the
3441 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3442 is a toggling command.)
3443
3444 Go ahead, just try it.  I'll still be here when you get back.  La de
3445 dum...  Nice tune, that...  la la la...  What, you're back?  Yes, and
3446 now press @kbd{l}.  There.  All your groups are now listed under
3447 @samp{misc}.  Doesn't that make you feel all warm and fuzzy?  Hot and
3448 bothered?
3449
3450 If you want this permanently enabled, you should add that minor mode to
3451 the hook for the group mode.  Put the following line in your
3452 @file{~/.gnus} file:
3453
3454 @lisp
3455 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3456 @end lisp
3457
3458 @menu
3459 * Topic Commands::              Interactive E-Z commands.
3460 * Topic Variables::             How to customize the topics the Lisp Way.
3461 * Topic Sorting::               Sorting each topic individually.
3462 * Topic Topology::              A map of the world.
3463 * Topic Parameters::            Parameters that apply to all groups in a topic.
3464 @end menu
3465
3466
3467 @node Topic Commands
3468 @subsection Topic Commands
3469 @cindex topic commands
3470
3471 When the topic minor mode is turned on, a new @kbd{T} submap will be
3472 available.  In addition, a few of the standard keys change their
3473 definitions slightly.
3474
3475 In general, the following kinds of operations are possible on topics.
3476 First of all, you want to create topics.  Secondly, you want to put
3477 groups in topics and to move them around until you have an order you
3478 like.  The third kind of operation is to show/hide parts of the whole
3479 shebang.  You might want to hide a topic including its subtopics and
3480 groups, to get a better overview of the other groups.
3481
3482 Here is a list of the basic keys that you might need to set up topics
3483 the way you like.
3484
3485 @table @kbd
3486
3487 @item T n
3488 @kindex T n (Topic)
3489 @findex gnus-topic-create-topic
3490 Prompt for a new topic name and create it
3491 (@code{gnus-topic-create-topic}).
3492
3493 @item T TAB
3494 @itemx TAB
3495 @kindex T TAB (Topic)
3496 @kindex TAB (Topic)
3497 @findex gnus-topic-indent
3498 ``Indent'' the current topic so that it becomes a sub-topic of the
3499 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3500 ``un-indent'' the topic instead.
3501
3502 @item M-TAB
3503 @kindex M-TAB (Topic)
3504 @findex gnus-topic-unindent
3505 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3506 parent of its current parent (@code{gnus-topic-unindent}).
3507
3508 @end table
3509
3510 The following two keys can be used to move groups and topics around.
3511 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3512 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3513 kill and yank rather than cut and paste.
3514
3515 @table @kbd
3516
3517 @item C-k
3518 @kindex C-k (Topic)
3519 @findex gnus-topic-kill-group
3520 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3521 topic will be removed along with the topic.
3522
3523 @item C-y
3524 @kindex C-y (Topic)
3525 @findex gnus-topic-yank-group
3526 Yank the previously killed group or topic
3527 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3528 before all groups.
3529
3530 So, to move a topic to the beginning of the list of topics, just hit
3531 @kbd{C-k} on it.  This is like the `cut' part of cut and paste.  Then,
3532 move the cursor to the beginning of the buffer (just below the `Gnus'
3533 topic) and hit @kbd{C-y}.  This is like the `paste' part of cut and
3534 paste.  Like I said -- E-Z.
3535
3536 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3537 you can move topics around as well as groups.
3538
3539 @end table
3540
3541 After setting up the topics the way you like them, you might wish to
3542 hide a topic, or to show it again.  That's why we have the following
3543 key.
3544
3545 @table @kbd
3546
3547 @item RET
3548 @kindex RET (Topic)
3549 @findex gnus-topic-select-group
3550 @itemx SPACE
3551 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3552 When you perform this command on a group, you'll enter the group, as
3553 usual.  When done on a topic line, the topic will be folded (if it was
3554 visible) or unfolded (if it was folded already).  So it's basically a
3555 toggling command on topics.  In addition, if you give a numerical
3556 prefix, group on that level (and lower) will be displayed.
3557
3558 @end table
3559
3560 Now for a list of other commands, in no particular order.
3561
3562 @table @kbd
3563
3564 @item T m
3565 @kindex T m (Topic)
3566 @findex gnus-topic-move-group
3567 Move the current group to some other topic
3568 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3569 convention (@pxref{Process/Prefix}).
3570
3571 @item T j
3572 @kindex T j (Topic)
3573 @findex gnus-topic-jump-to-topic
3574 Go to a topic (@code{gnus-topic-jump-to-topic}).
3575
3576 @item T c
3577 @kindex T c (Topic)
3578 @findex gnus-topic-copy-group
3579 Copy the current group to some other topic
3580 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3581 convention (@pxref{Process/Prefix}).
3582
3583 @item T h
3584 @kindex T h (Topic)
3585 @findex gnus-topic-hide-topic
3586 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3587 a prefix, hide the topic permanently.
3588
3589 @item T s
3590 @kindex T s (Topic)
3591 @findex gnus-topic-show-topic
3592 Show the current topic (@code{gnus-topic-show-topic}).  If given
3593 a prefix, show the topic permanently.
3594
3595 @item T D
3596 @kindex T D (Topic)
3597 @findex gnus-topic-remove-group
3598 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3599 This command is mainly useful if you have the same group in several
3600 topics and wish to remove it from one of the topics.  You may also
3601 remove a group from all topics, but in that case, Gnus will add it to
3602 the root topic the next time you start Gnus.  In fact, all new groups
3603 (which, naturally, don't belong to any topic) will show up in the root
3604 topic.
3605
3606 This command uses the process/prefix convention
3607 (@pxref{Process/Prefix}).
3608
3609 @item T M
3610 @kindex T M (Topic)
3611 @findex gnus-topic-move-matching
3612 Move all groups that match some regular expression to a topic
3613 (@code{gnus-topic-move-matching}).
3614
3615 @item T C
3616 @kindex T C (Topic)
3617 @findex gnus-topic-copy-matching
3618 Copy all groups that match some regular expression to a topic
3619 (@code{gnus-topic-copy-matching}).
3620
3621 @item T H
3622 @kindex T H (Topic)
3623 @findex gnus-topic-toggle-display-empty-topics
3624 Toggle hiding empty topics
3625 (@code{gnus-topic-toggle-display-empty-topics}).
3626
3627 @item T #
3628 @kindex T # (Topic)
3629 @findex gnus-topic-mark-topic
3630 Mark all groups in the current topic with the process mark
3631 (@code{gnus-topic-mark-topic}).
3632
3633 @item T M-#
3634 @kindex T M-# (Topic)
3635 @findex gnus-topic-unmark-topic
3636 Remove the process mark from all groups in the current topic
3637 (@code{gnus-topic-unmark-topic}).
3638
3639 @item C-c C-x
3640 @kindex C-c C-x (Topic)
3641 @findex gnus-topic-expire-articles
3642 Run all expirable articles in the current group or topic through the
3643 expiry process (if any)
3644 (@code{gnus-topic-expire-articles}). (@pxref{Expiring Mail}).
3645
3646 @item T r
3647 @kindex T r (Topic)
3648 @findex gnus-topic-rename
3649 Rename a topic (@code{gnus-topic-rename}).
3650
3651 @item T DEL
3652 @kindex T DEL (Topic)
3653 @findex gnus-topic-delete
3654 Delete an empty topic (@code{gnus-topic-delete}).
3655
3656 @item A T
3657 @kindex A T (Topic)
3658 @findex gnus-topic-list-active
3659 List all groups that gnus knows about in a topics-ified way
3660 (@code{gnus-topic-list-active}).
3661
3662 @item T M-n
3663 @kindex T M-n (Topic)
3664 @findex gnus-topic-goto-next-topic
3665 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3666
3667 @item T M-p
3668 @kindex T M-p (Topic)
3669 @findex gnus-topic-goto-previous-topic
3670 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3671
3672 @item G p
3673 @kindex G p (Topic)
3674 @findex gnus-topic-edit-parameters
3675 @cindex group parameters
3676 @cindex topic parameters
3677 @cindex parameters
3678 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3679 @xref{Topic Parameters}.
3680
3681 @end table
3682
3683
3684 @node Topic Variables
3685 @subsection Topic Variables
3686 @cindex topic variables
3687
3688 The previous section told you how to tell Gnus which topics to display.
3689 This section explains how to tell Gnus what to display about each topic.
3690
3691 @vindex gnus-topic-line-format
3692 The topic lines themselves are created according to the
3693 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3694 Valid elements are:
3695
3696 @table @samp
3697 @item i
3698 Indentation.
3699 @item n
3700 Topic name.
3701 @item v
3702 Visibility.
3703 @item l
3704 Level.
3705 @item g
3706 Number of groups in the topic.
3707 @item a
3708 Number of unread articles in the topic.
3709 @item A
3710 Number of unread articles in the topic and all its subtopics.
3711 @end table
3712
3713 @vindex gnus-topic-indent-level
3714 Each sub-topic (and the groups in the sub-topics) will be indented with
3715 @code{gnus-topic-indent-level} times the topic level number of spaces.
3716 The default is 2.
3717
3718 @vindex gnus-topic-mode-hook
3719 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3720
3721 @vindex gnus-topic-display-empty-topics
3722 The @code{gnus-topic-display-empty-topics} says whether to display even
3723 topics that have no unread articles in them.  The default is @code{t}.
3724
3725
3726 @node Topic Sorting
3727 @subsection Topic Sorting
3728 @cindex topic sorting
3729
3730 You can sort the groups in each topic individually with the following
3731 commands:
3732
3733
3734 @table @kbd
3735 @item T S a
3736 @kindex T S a (Topic)
3737 @findex gnus-topic-sort-groups-by-alphabet
3738 Sort the current topic alphabetically by group name
3739 (@code{gnus-topic-sort-groups-by-alphabet}).
3740
3741 @item T S u
3742 @kindex T S u (Topic)
3743 @findex gnus-topic-sort-groups-by-unread
3744 Sort the current topic by the number of unread articles
3745 (@code{gnus-topic-sort-groups-by-unread}).
3746
3747 @item T S l
3748 @kindex T S l (Topic)
3749 @findex gnus-topic-sort-groups-by-level
3750 Sort the current topic by group level
3751 (@code{gnus-topic-sort-groups-by-level}).
3752
3753 @item T S v
3754 @kindex T S v (Topic)
3755 @findex gnus-topic-sort-groups-by-score
3756 Sort the current topic by group score
3757 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3758
3759 @item T S r
3760 @kindex T S r (Topic)
3761 @findex gnus-topic-sort-groups-by-rank
3762 Sort the current topic by group rank
3763 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3764
3765 @item T S m
3766 @kindex T S m (Topic)
3767 @findex gnus-topic-sort-groups-by-method
3768 Sort the current topic alphabetically by back end name
3769 (@code{gnus-topic-sort-groups-by-method}).
3770
3771 @item T S e
3772 @kindex T S e (Topic)
3773 @findex gnus-topic-sort-groups-by-server
3774 Sort the current topic alphabetically by server name
3775 (@code{gnus-topic-sort-groups-by-server}).
3776
3777 @item T S s
3778 @kindex T S s
3779 @findex gnus-topic-sort-groups
3780 Sort the current topic according to the function(s) given by the
3781 @code{gnus-group-sort-function} variable
3782 (@code{gnus-topic-sort-groups}).
3783
3784 @end table
3785
3786 When given a prefix argument, all these commands will sort in reverse
3787 order.  @xref{Sorting Groups}, for more information about group
3788 sorting.
3789
3790
3791 @node Topic Topology
3792 @subsection Topic Topology
3793 @cindex topic topology
3794 @cindex topology
3795
3796 So, let's have a look at an example group buffer:
3797
3798 @example
3799 Gnus
3800   Emacs -- I wuw it!
3801      3: comp.emacs
3802      2: alt.religion.emacs
3803     Naughty Emacs
3804      452: alt.sex.emacs
3805        0: comp.talk.emacs.recovery
3806   Misc
3807      8: comp.binaries.fractals
3808     13: comp.sources.unix
3809 @end example
3810
3811 So, here we have one top-level topic (@samp{Gnus}), two topics under
3812 that, and one sub-topic under one of the sub-topics.  (There is always
3813 just one (1) top-level topic).  This topology can be expressed as
3814 follows:
3815
3816 @lisp
3817 (("Gnus" visible)
3818  (("Emacs -- I wuw it!" visible)
3819   (("Naughty Emacs" visible)))
3820  (("Misc" visible)))
3821 @end lisp
3822
3823 @vindex gnus-topic-topology
3824 This is in fact how the variable @code{gnus-topic-topology} would look
3825 for the display above.  That variable is saved in the @file{.newsrc.eld}
3826 file, and shouldn't be messed with manually---unless you really want
3827 to.  Since this variable is read from the @file{.newsrc.eld} file,
3828 setting it in any other startup files will have no effect.
3829
3830 This topology shows what topics are sub-topics of what topics (right),
3831 and which topics are visible.  Two settings are currently
3832 allowed---@code{visible} and @code{invisible}.
3833
3834
3835 @node Topic Parameters
3836 @subsection Topic Parameters
3837 @cindex topic parameters
3838
3839 All groups in a topic will inherit group parameters from the parent (and
3840 ancestor) topic parameters.  All valid group parameters are valid topic
3841 parameters (@pxref{Group Parameters}).
3842
3843 In addition, the following parameters are only valid as topic
3844 parameters:
3845
3846 @table @code
3847 @item subscribe
3848 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3849 @code{subscribe} topic parameter says what groups go in what topic.  Its
3850 value should be a regexp to match the groups that should go in that
3851 topic.
3852
3853 @item subscribe-level
3854 When subscribing new groups by topic (see the @code{subscribe} parameter),
3855 the group will be subscribed with the level specified in the 
3856 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3857
3858 @end table
3859
3860 Group parameters (of course) override topic parameters, and topic
3861 parameters in sub-topics override topic parameters in super-topics.  You
3862 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3863 verb, although you may feel free to disagree with me here.)
3864
3865 @example
3866 Gnus
3867   Emacs
3868      3: comp.emacs
3869      2: alt.religion.emacs
3870    452: alt.sex.emacs
3871     Relief
3872      452: alt.sex.emacs
3873        0: comp.talk.emacs.recovery
3874   Misc
3875      8: comp.binaries.fractals
3876     13: comp.sources.unix
3877    452: alt.sex.emacs
3878 @end example
3879
3880 The @samp{Emacs} topic has the topic parameter @code{(score-file
3881 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3882 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3883 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3884 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3885 . "religion.SCORE")}.
3886
3887 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
3888 will get the @file{relief.SCORE} home score file.  If you enter the same
3889 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
3890 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
3891 get the @file{religion.SCORE} home score file.
3892
3893 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
3894 there are some problems, especially with the @code{total-expiry}
3895 parameter.  Say you have a mail group in two topics; one with
3896 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
3897 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
3898 of these topics you mean to expire articles from, so anything may
3899 happen.  In fact, I hereby declare that it is @dfn{undefined} what
3900 happens.  You just have to be careful if you do stuff like that.
3901
3902
3903 @node Misc Group Stuff
3904 @section Misc Group Stuff
3905
3906 @menu
3907 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
3908 * Group Information::           Information and help on groups and Gnus.
3909 * Group Timestamp::             Making Gnus keep track of when you last read a group.
3910 * File Commands::               Reading and writing the Gnus files.
3911 * Sieve Commands::              Managing Sieve scripts.
3912 @end menu
3913
3914 @table @kbd
3915
3916 @item ^
3917 @kindex ^ (Group)
3918 @findex gnus-group-enter-server-mode
3919 Enter the server buffer (@code{gnus-group-enter-server-mode}).
3920 @xref{Server Buffer}.
3921
3922 @item a
3923 @kindex a (Group)
3924 @findex gnus-group-post-news
3925 Start composing a message (a news by default)
3926 (@code{gnus-group-post-news}).  If given a prefix, post to the group
3927 under the point.  If the prefix is 1, prompt for a group to post to.
3928 Contrary to what the name of this function suggests, the prepared
3929 article might be a mail instead of a news, if a mail group is specified
3930 with the prefix argument.  @xref{Composing Messages}.
3931
3932 @item m
3933 @kindex m (Group)
3934 @findex gnus-group-mail
3935 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
3936 use the posting style of the group under the point.  If the prefix is 1,
3937 prompt for a group name to find the posting style.
3938 @xref{Composing Messages}.
3939
3940 @item i
3941 @kindex i (Group)
3942 @findex gnus-group-news
3943 Start composing a news (@code{gnus-group-news}).  If given a prefix,
3944 post to the group under the point.  If the prefix is 1, prompt
3945 for group to post to.  @xref{Composing Messages}.
3946
3947 This function actually prepares a news even when using mail groups.
3948 This is useful for "posting" messages to mail groups without actually
3949 sending them over the network: they're just saved directly to the group
3950 in question.  The corresponding back end must have a request-post method
3951 for this to work though.
3952
3953 @end table
3954
3955 Variables for the group buffer:
3956
3957 @table @code
3958
3959 @item gnus-group-mode-hook
3960 @vindex gnus-group-mode-hook
3961 is called after the group buffer has been
3962 created.
3963
3964 @item gnus-group-prepare-hook
3965 @vindex gnus-group-prepare-hook
3966 is called after the group buffer is
3967 generated.  It may be used to modify the buffer in some strange,
3968 unnatural way.
3969
3970 @item gnus-group-prepared-hook
3971 @vindex gnus-group-prepare-hook
3972 is called as the very last thing after the group buffer has been
3973 generated.  It may be used to move point around, for instance.
3974
3975 @item gnus-permanently-visible-groups
3976 @vindex gnus-permanently-visible-groups
3977 Groups matching this regexp will always be listed in the group buffer,
3978 whether they are empty or not.
3979
3980 @item gnus-group-name-charset-method-alist
3981 @vindex gnus-group-name-charset-method-alist
3982 An alist of method and the charset for group names. It is used to show
3983 non-ASCII group names.
3984
3985 For example:
3986 @lisp
3987 (setq gnus-group-name-charset-method-alist
3988     '(((nntp "news.com.cn") . cn-gb-2312)))
3989 @end lisp
3990
3991 @item gnus-group-name-charset-group-alist
3992 @cindex UTF-8 group names
3993 @vindex gnus-group-name-charset-group-alist
3994 An alist of regexp of group name and the charset for group names.  It
3995 is used to show non-ASCII group names.  @code{((".*" utf-8))} is the
3996 default value if UTF-8 is supported, otherwise the default is nil.
3997
3998 For example:
3999 @lisp
4000 (setq gnus-group-name-charset-group-alist
4001     '(("\\.com\\.cn:" . cn-gb-2312)))
4002 @end lisp
4003
4004 @end table
4005
4006 @node Scanning New Messages
4007 @subsection Scanning New Messages
4008 @cindex new messages
4009 @cindex scanning new news
4010
4011 @table @kbd
4012
4013 @item g
4014 @kindex g (Group)
4015 @findex gnus-group-get-new-news
4016 @c @icon{gnus-group-get-new-news}
4017 Check the server(s) for new articles.  If the numerical prefix is used,
4018 this command will check only groups of level @var{arg} and lower
4019 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4020 command will force a total re-reading of the active file(s) from the
4021 back end(s).
4022
4023 @item M-g
4024 @kindex M-g (Group)
4025 @findex gnus-group-get-new-news-this-group
4026 @vindex gnus-goto-next-group-when-activating
4027 @c @icon{gnus-group-get-new-news-this-group}
4028 Check whether new articles have arrived in the current group
4029 (@code{gnus-group-get-new-news-this-group}).
4030 @code{gnus-goto-next-group-when-activating} says whether this command is
4031 to move point to the next group or not.  It is @code{t} by default.
4032
4033 @findex gnus-activate-all-groups
4034 @cindex activating groups
4035 @item C-c M-g
4036 @kindex C-c M-g (Group)
4037 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4038
4039 @item R
4040 @kindex R (Group)
4041 @cindex restarting
4042 @findex gnus-group-restart
4043 Restart gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4044 file(s), closes the connection to all servers, clears up all run-time
4045 gnus variables, and then starts gnus all over again.
4046
4047 @end table
4048
4049 @vindex gnus-get-new-news-hook
4050 @code{gnus-get-new-news-hook} is run just before checking for new news.
4051
4052 @vindex gnus-after-getting-new-news-hook
4053 @code{gnus-after-getting-new-news-hook} is run after checking for new
4054 news.
4055
4056
4057 @node Group Information
4058 @subsection Group Information
4059 @cindex group information
4060 @cindex information on groups
4061
4062 @table @kbd
4063
4064
4065 @item H f
4066 @kindex H f (Group)
4067 @findex gnus-group-fetch-faq
4068 @vindex gnus-group-faq-directory
4069 @cindex FAQ
4070 @cindex ange-ftp
4071 Try to fetch the FAQ for the current group
4072 (@code{gnus-group-fetch-faq}).  Gnus will try to get the FAQ from
4073 @code{gnus-group-faq-directory}, which is usually a directory on a
4074 remote machine.  This variable can also be a list of directories.  In
4075 that case, giving a prefix to this command will allow you to choose
4076 between the various sites.  @code{ange-ftp} (or @code{efs}) will be used
4077 for fetching the file.
4078
4079 If fetching from the first site is unsuccessful, gnus will attempt to go
4080 through @code{gnus-group-faq-directory} and try to open them one by one.
4081
4082 @item H d
4083 @itemx C-c C-d
4084 @c @icon{gnus-group-describe-group}
4085 @kindex H d (Group)
4086 @kindex C-c C-d (Group)
4087 @cindex describing groups
4088 @cindex group description
4089 @findex gnus-group-describe-group
4090 Describe the current group (@code{gnus-group-describe-group}).  If given
4091 a prefix, force Gnus to re-read the description from the server.
4092
4093 @item M-d
4094 @kindex M-d (Group)
4095 @findex gnus-group-describe-all-groups
4096 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4097 prefix, force gnus to re-read the description file from the server.
4098
4099 @item H v
4100 @itemx V
4101 @kindex V (Group)
4102 @kindex H v (Group)
4103 @cindex version
4104 @findex gnus-version
4105 Display current gnus version numbers (@code{gnus-version}).
4106
4107 @item ?
4108 @kindex ? (Group)
4109 @findex gnus-group-describe-briefly
4110 Give a very short help message (@code{gnus-group-describe-briefly}).
4111
4112 @item C-c C-i
4113 @kindex C-c C-i (Group)
4114 @cindex info
4115 @cindex manual
4116 @findex gnus-info-find-node
4117 Go to the gnus info node (@code{gnus-info-find-node}).
4118 @end table
4119
4120
4121 @node Group Timestamp
4122 @subsection Group Timestamp
4123 @cindex timestamps
4124 @cindex group timestamps
4125
4126 It can be convenient to let gnus keep track of when you last read a
4127 group.  To set the ball rolling, you should add
4128 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4129
4130 @lisp
4131 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4132 @end lisp
4133
4134 After doing this, each time you enter a group, it'll be recorded.
4135
4136 This information can be displayed in various ways---the easiest is to
4137 use the @samp{%d} spec in the group line format:
4138
4139 @lisp
4140 (setq gnus-group-line-format
4141       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4142 @end lisp
4143
4144 This will result in lines looking like:
4145
4146 @example
4147 *        0: mail.ding                                19961002T012943
4148          0: custom                                   19961002T012713
4149 @end example
4150
4151 As you can see, the date is displayed in compact ISO 8601 format.  This
4152 may be a bit too much, so to just display the date, you could say
4153 something like:
4154
4155 @lisp
4156 (setq gnus-group-line-format
4157       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4158 @end lisp
4159
4160 If you would like greater control of the time format, you can use a
4161 user-defined format spec.  Something like the following should do the
4162 trick: 
4163
4164 @lisp
4165 (setq gnus-group-line-format
4166       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4167 (defun gnus-user-format-function-d (headers)
4168   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4169     (if time
4170         (format-time-string "%b %d  %H:%M" time)
4171       "")))
4172 @end lisp
4173             
4174
4175 @node File Commands
4176 @subsection File Commands
4177 @cindex file commands
4178
4179 @table @kbd
4180
4181 @item r
4182 @kindex r (Group)
4183 @findex gnus-group-read-init-file
4184 @vindex gnus-init-file
4185 @cindex reading init file
4186 Re-read the init file (@code{gnus-init-file}, which defaults to
4187 @file{~/.gnus}) (@code{gnus-group-read-init-file}).
4188
4189 @item s
4190 @kindex s (Group)
4191 @findex gnus-group-save-newsrc
4192 @cindex saving .newsrc
4193 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4194 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4195 file(s) whether Gnus thinks it is necessary or not.
4196
4197 @c @item Z
4198 @c @kindex Z (Group)
4199 @c @findex gnus-group-clear-dribble
4200 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4201
4202 @end table
4203
4204
4205 @node Sieve Commands
4206 @subsection Sieve Commands
4207 @cindex group sieve commands
4208
4209 Sieve is a server-side mail filtering language.  In Gnus you can use
4210 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4211 sieve rules that should apply to each group.  Gnus provides two
4212 commands to translate all these group parameters into a proper Sieve
4213 script that can be transfered to the server somehow.
4214
4215 @vindex gnus-sieve-file
4216 @vindex gnus-sieve-region-start
4217 @vindex gnus-sieve-region-end
4218 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4219 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4220 between two delimiters, @code{gnus-sieve-region-start} and
4221 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4222 outside these delimiters that will not be removed the next time you
4223 regenerate the Sieve script.
4224
4225 @vindex gnus-sieve-crosspost
4226 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4227 is generated.  If it is non-nil (the default) articles is placed in
4228 all groups that have matching rules, otherwise the article is only
4229 placed in the group with the first matching rule.  For example, the
4230 group parameter @samp{(sieve address "sender"
4231 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4232 code if @code{gnus-sieve-crosspost} is nil. (When
4233 @code{gnus-sieve-crosspost} is non-nil, it looks the same except that
4234 the line containing the call to @code{stop} is removed.)
4235
4236 @example
4237 if address "sender" "owner-ding@@hpc.uh.edu" @{
4238         fileinto "INBOX.ding";
4239         stop;
4240 @}
4241 @end example
4242
4243 @xref{Top, ,Top, sieve, Emacs Sieve}.
4244
4245 @table @kbd
4246
4247 @item D g
4248 @kindex D g (Group)
4249 @findex gnus-sieve-generate
4250 @vindex gnus-sieve-file
4251 @cindex generating sieve script
4252 Regenerate a Sieve script from the @code{sieve} group parameters and
4253 put you into the @code{gnus-sieve-file} without saving it.
4254
4255 @item D u
4256 @kindex D u (Group)
4257 @findex gnus-sieve-update
4258 @vindex gnus-sieve-file
4259 @cindex updating sieve script
4260 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4261 @code{sieve} group parameters, save the file and upload it to the
4262 server using the @code{sieveshell} program.
4263
4264 @end table
4265
4266
4267 @node Summary Buffer
4268 @chapter Summary Buffer
4269 @cindex summary buffer
4270
4271 A line for each article is displayed in the summary buffer.  You can
4272 move around, read articles, post articles and reply to articles.
4273
4274 The most common way to a summary buffer is to select a group from the
4275 group buffer (@pxref{Selecting a Group}).
4276
4277 You can have as many summary buffers open as you wish.
4278
4279 @menu
4280 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4281 * Summary Maneuvering::         Moving around the summary buffer.
4282 * Choosing Articles::           Reading articles.
4283 * Paging the Article::          Scrolling the current article.
4284 * Reply Followup and Post::     Posting articles.
4285 * Delayed Articles::            
4286 * Marking Articles::            Marking articles as read, expirable, etc.
4287 * Limiting::                    You can limit the summary buffer.
4288 * Threading::                   How threads are made.
4289 * Sorting the Summary Buffer::  How articles and threads are sorted.
4290 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4291 * Article Caching::             You may store articles in a cache.
4292 * Persistent Articles::         Making articles expiry-resistant.
4293 * Article Backlog::             Having already read articles hang around.
4294 * Saving Articles::             Ways of customizing article saving.
4295 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4296 * Article Treatment::           The article buffer can be mangled at will.
4297 * MIME Commands::               Doing MIMEy things with the articles.
4298 * Charsets::                    Character set issues.
4299 * Article Commands::            Doing various things with the article buffer.
4300 * Summary Sorting::             Sorting the summary buffer in various ways.
4301 * Finding the Parent::          No child support? Get the parent.
4302 * Alternative Approaches::      Reading using non-default summaries.
4303 * Tree Display::                A more visual display of threads.
4304 * Mail Group Commands::         Some commands can only be used in mail groups.
4305 * Various Summary Stuff::       What didn't fit anywhere else.
4306 * Exiting the Summary Buffer::  Returning to the Group buffer,
4307                                 or reselecting the current group.
4308 * Crosspost Handling::          How crossposted articles are dealt with.
4309 * Duplicate Suppression::       An alternative when crosspost handling fails.
4310 * Security::                    Decrypt and Verify.
4311 * Mailing List::                Mailing list minor mode.
4312 @end menu
4313
4314
4315 @node Summary Buffer Format
4316 @section Summary Buffer Format
4317 @cindex summary buffer format
4318
4319 @iftex
4320 @iflatex
4321 \gnusfigure{The Summary Buffer}{180}{
4322 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4323 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4324 }
4325 @end iflatex
4326 @end iftex
4327
4328 @menu
4329 * Summary Buffer Lines::        You can specify how summary lines should look.
4330 * To From Newsgroups::          How to not display your own name.
4331 * Summary Buffer Mode Line::    You can say how the mode line should look.
4332 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4333 @end menu
4334
4335 @findex mail-extract-address-components
4336 @findex gnus-extract-address-components
4337 @vindex gnus-extract-address-components
4338 Gnus will use the value of the @code{gnus-extract-address-components}
4339 variable as a function for getting the name and address parts of a
4340 @code{From} header.  Three pre-defined functions exist:
4341 @code{gnus-extract-address-components}, which is the default, quite
4342 fast, and too simplistic solution;
4343 @code{mail-extract-address-components}, which works nicely, but is
4344 slower; and @code{std11-extract-address-components}, which works very
4345 nicely, but is slower.  The default function will return the wrong
4346 answer in 5% of the cases.  If this is unacceptable to you, use the
4347 other function instead:
4348
4349 @lisp
4350 (setq gnus-extract-address-components
4351       'mail-extract-address-components)
4352 @end lisp
4353
4354 @vindex gnus-summary-same-subject
4355 @code{gnus-summary-same-subject} is a string indicating that the current
4356 article has the same subject as the previous.  This string will be used
4357 with those specs that require it.  The default is @code{""}.
4358
4359
4360 @node Summary Buffer Lines
4361 @subsection Summary Buffer Lines
4362
4363 @vindex gnus-summary-line-format
4364 You can change the format of the lines in the summary buffer by changing
4365 the @code{gnus-summary-line-format} variable.  It works along the same
4366 lines as a normal @code{format} string, with some extensions
4367 (@pxref{Formatting Variables}).
4368
4369 There should always be a colon or a point position marker on the line;
4370 the cursor always moves to the point position marker or the colon after
4371 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4372 possible to change this.  Just write a new function
4373 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4374 @xref{Positioning Point}.
4375
4376 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4377
4378 The following format specification characters and extended format
4379 specification(s) are understood:
4380
4381 @table @samp
4382 @item N
4383 Article number.
4384 @item S
4385 Subject string.  List identifiers stripped,
4386 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4387 @item s
4388 Subject if the article is the root of the thread or the previous article
4389 had a different subject, @code{gnus-summary-same-subject} otherwise.
4390 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4391 @item F
4392 Full @code{From} header.
4393 @item n
4394 The name (from the @code{From} header).
4395 @item f
4396 The name, code @code{To} header or the @code{Newsgroups} header
4397 (@pxref{To From Newsgroups}).
4398 @item a
4399 The name (from the @code{From} header).  This differs from the @code{n}
4400 spec in that it uses the function designated by the
4401 @code{gnus-extract-address-components} variable, which is slower, but
4402 may be more thorough.
4403 @item A
4404 The address (from the @code{From} header).  This works the same way as
4405 the @code{a} spec.
4406 @item L
4407 Number of lines in the article.
4408 @item c
4409 Number of characters in the article. This specifier is not supported
4410 in some methods (like nnfolder).
4411 @item I
4412 Indentation based on thread level (@pxref{Customizing Threading}).
4413 @item B
4414 A complex trn-style thread tree, showing response-connecting trace
4415 lines.
4416 @item T
4417 Nothing if the article is a root and lots of spaces if it isn't (it
4418 pushes everything after it off the screen).
4419 @item [
4420 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4421 for adopted articles (@pxref{Customizing Threading}).
4422 @item ]
4423 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4424 for adopted articles.
4425 @item >
4426 One space for each thread level.
4427 @item <
4428 Twenty minus thread level spaces.
4429 @item U
4430 Unread. @xref{Read Articles}.
4431
4432 @item R
4433 This misleadingly named specifier is the @dfn{secondary mark}.  This
4434 mark will say whether the article has been replied to, has been cached,
4435 or has been saved.  @xref{Other Marks}.
4436
4437 @item i
4438 Score as a number (@pxref{Scoring}).
4439 @item z
4440 @vindex gnus-summary-zcore-fuzz
4441 Zcore, @samp{+} if above the default level and @samp{-} if below the
4442 default level.  If the difference between
4443 @code{gnus-summary-default-score} and the score is less than
4444 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4445 @item V
4446 Total thread score.
4447 @item x
4448 @code{Xref}.
4449 @item D
4450 @code{Date}.
4451 @item d
4452 The @code{Date} in @code{DD-MMM} format.
4453 @item o
4454 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4455 @item M
4456 @code{Message-ID}.
4457 @item r
4458 @code{References}.
4459 @item t
4460 Number of articles in the current sub-thread.  Using this spec will slow
4461 down summary buffer generation somewhat.
4462 @item e
4463 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4464 article has any children.
4465 @item P
4466 The line number.
4467 @item O
4468 Download mark.
4469 @item &user-date;
4470 Age sensitive date format.  Various date format is defined in
4471 @code{gnus-user-date-format-alist}.
4472 @item u
4473 User defined specifier.  The next character in the format string should
4474 be a letter.  Gnus will call the function
4475 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
4476 following @samp{%u}.  The function will be passed the current header as
4477 argument.  The function should return a string, which will be inserted
4478 into the summary just like information from any other summary specifier.
4479 @end table
4480
4481 Text between @samp{%(} and @samp{%)} will be highlighted with
4482 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4483 There can only be one such area.
4484
4485 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4486 have to be handled with care.  For reasons of efficiency, gnus will
4487 compute what column these characters will end up in, and ``hard-code''
4488 that.  This means that it is invalid to have these specs after a
4489 variable-length spec.  Well, you might not be arrested, but your summary
4490 buffer will look strange, which is bad enough.
4491
4492 The smart choice is to have these specs as far to the left as possible.
4493 (Isn't that the case with everything, though?  But I digress.)
4494
4495 This restriction may disappear in later versions of gnus.
4496
4497
4498 @node To From Newsgroups
4499 @subsection To From Newsgroups
4500 @cindex To
4501 @cindex Newsgroups
4502
4503 In some groups (particularly in archive groups), the @code{From} header
4504 isn't very interesting, since all the articles there are written by
4505 you.  To display the information in the @code{To} or @code{Newsgroups}
4506 headers instead, you need to decide three things: What information to
4507 gather; where to display it; and when to display it.
4508
4509 @enumerate
4510 @item
4511 @vindex gnus-extra-headers
4512 The reading of extra header information is controlled by the
4513 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4514 instance:
4515
4516 @lisp
4517 (setq gnus-extra-headers
4518       '(To Newsgroups X-Newsreader))
4519 @end lisp
4520
4521 This will result in Gnus trying to obtain these three headers, and
4522 storing it in header structures for later easy retrieval.
4523
4524 @item
4525 @findex gnus-extra-header
4526 The value of these extra headers can be accessed via the
4527 @code{gnus-extra-header} function.  Here's a format line spec that will
4528 access the @code{X-Newsreader} header:
4529
4530 @example
4531 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4532 @end example
4533
4534 @item
4535 @vindex gnus-ignored-from-addresses
4536 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4537 summary line spec returns the @code{To}, @code{Newsreader} or
4538 @code{From} header.  If this regexp matches the contents of the
4539 @code{From} header, the value of the @code{To} or @code{Newsreader}
4540 headers are used instead.
4541
4542 @end enumerate
4543
4544 @vindex nnmail-extra-headers
4545 A related variable is @code{nnmail-extra-headers}, which controls when
4546 to include extra headers when generating overview (@sc{nov}) files.  If
4547 you have old overview files, you should regenerate them after changing
4548 this variable.
4549
4550 @vindex gnus-summary-line-format
4551 You also have to instruct Gnus to display the data by changing the
4552 @code{%n} spec to the @code{%f} spec in the
4553 @code{gnus-summary-line-format} variable.
4554
4555 In summary, you'd typically put something like the following in
4556 @file{~/.gnus}:
4557
4558 @lisp
4559 (setq gnus-extra-headers
4560       '(To Newsgroups))
4561 (setq nnmail-extra-headers gnus-extra-headers)
4562 (setq gnus-summary-line-format
4563       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4564 (setq gnus-ignored-from-addresses
4565       "Your Name Here")
4566 @end lisp
4567
4568 (The values listed above are the default values in Gnus.  Alter them
4569 to fit your needs.)
4570
4571 Now, this is mostly useful for mail groups, where you have control over
4572 the @sc{nov} files that are created.  However, if you can persuade your
4573 nntp admin to add:
4574
4575 @example
4576 Newsgroups:full
4577 @end example
4578
4579 to the end of her @file{overview.fmt} file, then you can use that just
4580 as you would the extra headers from the mail groups.
4581
4582
4583 @node Summary Buffer Mode Line
4584 @subsection Summary Buffer Mode Line
4585
4586 @vindex gnus-summary-mode-line-format
4587 You can also change the format of the summary mode bar (@pxref{Mode Line
4588 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4589 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4590
4591 Here are the elements you can play with:
4592
4593 @table @samp
4594 @item G
4595 Group name.
4596 @item p
4597 Unprefixed group name.
4598 @item A
4599 Current article number.
4600 @item z
4601 Current article score.
4602 @item V
4603 Gnus version.
4604 @item U
4605 Number of unread articles in this group.
4606 @item e
4607 Number of unread articles in this group that aren't displayed in the
4608 summary buffer.
4609 @item Z
4610 A string with the number of unread and unselected articles represented
4611 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4612 articles, and just as @samp{<%U more>} if there are just unread articles
4613 and no unselected ones.
4614 @item g
4615 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4616 shortened to @samp{r.a.anime}.
4617 @item S
4618 Subject of the current article.
4619 @item u
4620 User-defined spec (@pxref{User-Defined Specs}).
4621 @item s
4622 Name of the current score file (@pxref{Scoring}).
4623 @item d
4624 Number of dormant articles (@pxref{Unread Articles}).
4625 @item t
4626 Number of ticked articles (@pxref{Unread Articles}).
4627 @item r
4628 Number of articles that have been marked as read in this session.
4629 @item E
4630 Number of articles expunged by the score files.
4631 @end table
4632
4633
4634 @node Summary Highlighting
4635 @subsection Summary Highlighting
4636
4637 @table @code
4638
4639 @item gnus-visual-mark-article-hook
4640 @vindex gnus-visual-mark-article-hook
4641 This hook is run after selecting an article.  It is meant to be used for
4642 highlighting the article in some way.  It is not run if
4643 @code{gnus-visual} is @code{nil}.
4644
4645 @item gnus-summary-update-hook
4646 @vindex gnus-summary-update-hook
4647 This hook is called when a summary line is changed.  It is not run if
4648 @code{gnus-visual} is @code{nil}.
4649
4650 @item gnus-summary-selected-face
4651 @vindex gnus-summary-selected-face
4652 This is the face (or @dfn{font} as some people call it) used to
4653 highlight the current article in the summary buffer.
4654
4655 @item gnus-summary-highlight
4656 @vindex gnus-summary-highlight
4657 Summary lines are highlighted according to this variable, which is a
4658 list where the elements are of the format @code{(@var{form}
4659 . @var{face})}.  If you would, for instance, like ticked articles to be
4660 italic and high-scored articles to be bold, you could set this variable
4661 to something like
4662 @lisp
4663 (((eq mark gnus-ticked-mark) . italic)
4664  ((> score default) . bold))
4665 @end lisp
4666 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4667 @var{face} will be applied to the line.
4668 @end table
4669
4670
4671 @node Summary Maneuvering
4672 @section Summary Maneuvering
4673 @cindex summary movement
4674
4675 All the straight movement commands understand the numeric prefix and
4676 behave pretty much as you'd expect.
4677
4678 None of these commands select articles.
4679
4680 @table @kbd
4681 @item G M-n
4682 @itemx M-n
4683 @kindex M-n (Summary)
4684 @kindex G M-n (Summary)
4685 @findex gnus-summary-next-unread-subject
4686 Go to the next summary line of an unread article
4687 (@code{gnus-summary-next-unread-subject}).
4688
4689 @item G M-p
4690 @itemx M-p
4691 @kindex M-p (Summary)
4692 @kindex G M-p (Summary)
4693 @findex gnus-summary-prev-unread-subject
4694 Go to the previous summary line of an unread article
4695 (@code{gnus-summary-prev-unread-subject}).
4696
4697 @item G g
4698 @kindex G g (Summary)
4699 @findex gnus-summary-goto-subject
4700 Ask for an article number and then go to the summary line of that article
4701 without displaying the article (@code{gnus-summary-goto-subject}).
4702 @end table
4703
4704 If gnus asks you to press a key to confirm going to the next group, you
4705 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4706 buffer, searching for the next group to read without actually returning
4707 to the group buffer.
4708
4709 Variables related to summary movement:
4710
4711 @table @code
4712
4713 @vindex gnus-auto-select-next
4714 @item gnus-auto-select-next
4715 If you issue one of the movement commands (like @kbd{n}) and there are
4716 no more unread articles after the current one, gnus will offer to go to
4717 the next group.  If this variable is @code{t} and the next group is
4718 empty, gnus will exit summary mode and return to the group buffer.  If
4719 this variable is neither @code{t} nor @code{nil}, gnus will select the
4720 next group, no matter whether it has any unread articles or not.  As a
4721 special case, if this variable is @code{quietly}, gnus will select the
4722 next group without asking for confirmation.  If this variable is
4723 @code{almost-quietly}, the same will happen only if you are located on
4724 the last article in the group.  Finally, if this variable is
4725 @code{slightly-quietly}, the @kbd{Z n} command will go to the next group
4726 without confirmation.  Also @pxref{Group Levels}.
4727
4728 @item gnus-auto-select-same
4729 @vindex gnus-auto-select-same
4730 If non-@code{nil}, all the movement commands will try to go to the next
4731 article with the same subject as the current.  (@dfn{Same} here might
4732 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4733 for details (@pxref{Customizing Threading}).)  If there are no more
4734 articles with the same subject, go to the first unread article.
4735
4736 This variable is not particularly useful if you use a threaded display.
4737
4738 @item gnus-summary-check-current
4739 @vindex gnus-summary-check-current
4740 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4741 to the next (or previous) article if the current article is unread.
4742 Instead, they will choose the current article.
4743
4744 @item gnus-auto-center-summary
4745 @vindex gnus-auto-center-summary
4746 If non-@code{nil}, gnus will keep the point in the summary buffer
4747 centered at all times.  This makes things quite tidy, but if you have a
4748 slow network connection, or simply do not like this un-Emacsism, you can
4749 set this variable to @code{nil} to get the normal Emacs scrolling
4750 action.  This will also inhibit horizontal re-centering of the summary
4751 buffer, which might make it more inconvenient to read extremely long
4752 threads.
4753
4754 This variable can also be a number.  In that case, center the window at
4755 the given number of lines from the top.
4756
4757 @end table
4758
4759
4760 @node Choosing Articles
4761 @section Choosing Articles
4762 @cindex selecting articles
4763
4764 @menu
4765 * Choosing Commands::           Commands for choosing articles.
4766 * Choosing Variables::          Variables that influence these commands.
4767 @end menu
4768
4769
4770 @node Choosing Commands
4771 @subsection Choosing Commands
4772
4773 None of the following movement commands understand the numeric prefix,
4774 and they all select and display an article.
4775
4776 If you want to fetch new articles or redisplay the group, see
4777 @ref{Exiting the Summary Buffer}.
4778
4779 @table @kbd
4780 @item SPACE
4781 @kindex SPACE (Summary)
4782 @findex gnus-summary-next-page
4783 Select the current article, or, if that one's read already, the next
4784 unread article (@code{gnus-summary-next-page}).
4785
4786 @item G n
4787 @itemx n
4788 @kindex n (Summary)
4789 @kindex G n (Summary)
4790 @findex gnus-summary-next-unread-article
4791 @c @icon{gnus-summary-next-unread}
4792 Go to next unread article (@code{gnus-summary-next-unread-article}).
4793
4794 @item G p
4795 @itemx p
4796 @kindex p (Summary)
4797 @findex gnus-summary-prev-unread-article
4798 @c @icon{gnus-summary-prev-unread}
4799 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
4800
4801 @item G N
4802 @itemx N
4803 @kindex N (Summary)
4804 @kindex G N (Summary)
4805 @findex gnus-summary-next-article
4806 Go to the next article (@code{gnus-summary-next-article}).
4807
4808 @item G P
4809 @itemx P
4810 @kindex P (Summary)
4811 @kindex G P (Summary)
4812 @findex gnus-summary-prev-article
4813 Go to the previous article (@code{gnus-summary-prev-article}).
4814
4815 @item G C-n
4816 @kindex G C-n (Summary)
4817 @findex gnus-summary-next-same-subject
4818 Go to the next article with the same subject
4819 (@code{gnus-summary-next-same-subject}).
4820
4821 @item G C-p
4822 @kindex G C-p (Summary)
4823 @findex gnus-summary-prev-same-subject
4824 Go to the previous article with the same subject
4825 (@code{gnus-summary-prev-same-subject}).
4826
4827 @item G f
4828 @itemx .
4829 @kindex G f  (Summary)
4830 @kindex .  (Summary)
4831 @findex gnus-summary-first-unread-article
4832 Go to the first unread article
4833 (@code{gnus-summary-first-unread-article}).
4834
4835 @item G b
4836 @itemx ,
4837 @kindex G b (Summary)
4838 @kindex , (Summary)
4839 @findex gnus-summary-best-unread-article
4840 Go to the unread article with the highest score
4841 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
4842 go to the first unread article that has a score over the default score.
4843
4844 @item G l
4845 @itemx l
4846 @kindex l (Summary)
4847 @kindex G l (Summary)
4848 @findex gnus-summary-goto-last-article
4849 Go to the previous article read (@code{gnus-summary-goto-last-article}).
4850
4851 @item G o
4852 @kindex G o (Summary)
4853 @findex gnus-summary-pop-article
4854 @cindex history
4855 @cindex article history
4856 Pop an article off the summary history and go to this article
4857 (@code{gnus-summary-pop-article}).  This command differs from the
4858 command above in that you can pop as many previous articles off the
4859 history as you like, while @kbd{l} toggles the two last read articles.
4860 For a somewhat related issue (if you use these commands a lot),
4861 @pxref{Article Backlog}.
4862
4863 @item G j
4864 @itemx j
4865 @kindex j (Summary)
4866 @kindex G j (Summary)
4867 @findex gnus-summary-goto-article
4868 Ask for an article number or @code{Message-ID}, and then go to that
4869 article (@code{gnus-summary-goto-article}).
4870
4871 @end table
4872
4873
4874 @node Choosing Variables
4875 @subsection Choosing Variables
4876
4877 Some variables relevant for moving and selecting articles:
4878
4879 @table @code
4880 @item gnus-auto-extend-newsgroup
4881 @vindex gnus-auto-extend-newsgroup
4882 All the movement commands will try to go to the previous (or next)
4883 article, even if that article isn't displayed in the Summary buffer if
4884 this variable is non-@code{nil}.  Gnus will then fetch the article from
4885 the server and display it in the article buffer.
4886
4887 @item gnus-select-article-hook
4888 @vindex gnus-select-article-hook
4889 This hook is called whenever an article is selected.  By default it
4890 exposes any threads hidden under the selected article.
4891
4892 @item gnus-mark-article-hook
4893 @vindex gnus-mark-article-hook
4894 @findex gnus-summary-mark-unread-as-read
4895 @findex gnus-summary-mark-read-and-unread-as-read
4896 @findex gnus-unread-mark
4897 This hook is called whenever an article is selected.  It is intended to
4898 be used for marking articles as read.  The default value is
4899 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
4900 mark of almost any article you read to @code{gnus-unread-mark}.  The
4901 only articles not affected by this function are ticked, dormant, and
4902 expirable articles.  If you'd instead like to just have unread articles
4903 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
4904 instead.  It will leave marks like @code{gnus-low-score-mark},
4905 @code{gnus-del-mark} (and so on) alone.
4906
4907 @end table
4908
4909
4910 @node Paging the Article
4911 @section Scrolling the Article
4912 @cindex article scrolling
4913
4914 @table @kbd
4915
4916 @item SPACE
4917 @kindex SPACE (Summary)
4918 @findex gnus-summary-next-page
4919 Pressing @kbd{SPACE} will scroll the current article forward one page,
4920 or, if you have come to the end of the current article, will choose the
4921 next article (@code{gnus-summary-next-page}).
4922
4923 @item DEL
4924 @kindex DEL (Summary)
4925 @findex gnus-summary-prev-page
4926 Scroll the current article back one page (@code{gnus-summary-prev-page}).
4927
4928 @item RET
4929 @kindex RET (Summary)
4930 @findex gnus-summary-scroll-up
4931 Scroll the current article one line forward
4932 (@code{gnus-summary-scroll-up}).
4933
4934 @item M-RET
4935 @kindex M-RET (Summary)
4936 @findex gnus-summary-scroll-down
4937 Scroll the current article one line backward
4938 (@code{gnus-summary-scroll-down}).
4939
4940 @item A g
4941 @itemx g
4942 @kindex A g (Summary)
4943 @kindex g (Summary)
4944 @findex gnus-summary-show-article
4945 @vindex gnus-summary-show-article-charset-alist
4946 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
4947 given a prefix, fetch the current article, but don't run any of the
4948 article treatment functions.  This will give you a ``raw'' article, just
4949 the way it came from the server.
4950
4951 If given a numerical prefix, you can do semi-manual charset stuff.
4952 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
4953 encoded in the @code{cn-gb-2312} charset.  If you have
4954
4955 @lisp
4956 (setq gnus-summary-show-article-charset-alist
4957       '((1 . cn-gb-2312)
4958         (2 . big5)))
4959 @end lisp
4960
4961 then you can say @kbd{C-u 1 g} to get the same effect.
4962
4963 @item A <
4964 @itemx <
4965 @kindex < (Summary)
4966 @kindex A < (Summary)
4967 @findex gnus-summary-beginning-of-article
4968 Scroll to the beginning of the article
4969 (@code{gnus-summary-beginning-of-article}).
4970
4971 @item A >
4972 @itemx >
4973 @kindex > (Summary)
4974 @kindex A > (Summary)
4975 @findex gnus-summary-end-of-article
4976 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
4977
4978 @item A s
4979 @itemx s
4980 @kindex A s (Summary)
4981 @kindex s (Summary)
4982 @findex gnus-summary-isearch-article
4983 Perform an isearch in the article buffer
4984 (@code{gnus-summary-isearch-article}).
4985
4986 @item h
4987 @kindex h (Summary)
4988 @findex gnus-summary-select-article-buffer
4989 Select the article buffer (@code{gnus-summary-select-article-buffer}).
4990
4991 @end table
4992
4993
4994 @node Reply Followup and Post
4995 @section Reply, Followup and Post
4996
4997 @menu
4998 * Summary Mail Commands::       Sending mail.
4999 * Summary Post Commands::       Sending news.
5000 * Summary Message Commands::    Other Message-related commands.
5001 * Canceling and Superseding::   
5002 @end menu
5003
5004
5005 @node Summary Mail Commands
5006 @subsection Summary Mail Commands
5007 @cindex mail
5008 @cindex composing mail
5009
5010 Commands for composing a mail message:
5011
5012 @table @kbd
5013
5014 @item S r
5015 @itemx r
5016 @kindex S r (Summary)
5017 @kindex r (Summary)
5018 @findex gnus-summary-reply
5019 @c @icon{gnus-summary-mail-reply}
5020 @c @icon{gnus-summary-reply}
5021 Mail a reply to the author of the current article
5022 (@code{gnus-summary-reply}).
5023
5024 @item S R
5025 @itemx R
5026 @kindex R (Summary)
5027 @kindex S R (Summary)
5028 @findex gnus-summary-reply-with-original
5029 @c @icon{gnus-summary-reply-with-original}
5030 Mail a reply to the author of the current article and include the
5031 original message (@code{gnus-summary-reply-with-original}).  This
5032 command uses the process/prefix convention.
5033
5034 @item S w
5035 @kindex S w (Summary)
5036 @findex gnus-summary-wide-reply
5037 Mail a wide reply to the author of the current article
5038 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5039 goes out to all people listed in the @code{To}, @code{From} (or
5040 @code{Reply-to}) and @code{Cc} headers.
5041
5042 @item S W
5043 @kindex S W (Summary)
5044 @findex gnus-summary-wide-reply-with-original
5045 Mail a wide reply to the current article and include the original
5046 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5047 the process/prefix convention.
5048
5049 @item S v
5050 @kindex S v (Summary)
5051 @findex gnus-summary-very-wide-reply
5052 Mail a very wide reply to the author of the current article
5053 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5054 that goes out to all people listed in the @code{To}, @code{From} (or
5055 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5056 articles.  This command uses the process/prefix convention.
5057
5058 @item S o m
5059 @itemx C-c C-f
5060 @kindex S o m (Summary)
5061 @kindex C-c C-f (Summary)
5062 @findex gnus-summary-mail-forward
5063 @c @icon{gnus-summary-mail-forward}
5064 Forward the current article to some other person
5065 (@code{gnus-summary-mail-forward}).  If given a prefix, include the full
5066 headers of the forwarded article.
5067
5068 @item S m
5069 @itemx m
5070 @kindex m (Summary)
5071 @kindex S m (Summary)
5072 @findex gnus-summary-mail-other-window
5073 @c @icon{gnus-summary-mail-originate}
5074 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5075 the posting style of the current group.  If given a prefix, disable that.
5076 If the prefix is 1, prompt for a group name to find the posting style.
5077
5078 @item S i
5079 @itemx i
5080 @kindex i (Summary)
5081 @kindex S i (Summary)
5082 @findex gnus-summary-news-other-window
5083 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5084 post to the current group.  If given a prefix, disable that.  If the
5085 prefix is 1, prompt for a group to post to.
5086
5087 This function actually prepares a news even when using mail groups.
5088 This is useful for "posting" messages to mail groups without actually
5089 sending them over the network: they're just saved directly to the group
5090 in question.  The corresponding back end must have a request-post method
5091 for this to work though.
5092
5093 @item S D b
5094 @kindex S D b (Summary)
5095 @findex gnus-summary-resend-bounced-mail
5096 @cindex bouncing mail
5097 If you have sent a mail, but the mail was bounced back to you for some
5098 reason (wrong address, transient failure), you can use this command to
5099 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5100 will be popped into a mail buffer where you can edit the headers before
5101 sending the mail off again.  If you give a prefix to this command, and
5102 the bounced mail is a reply to some other mail, gnus will try to fetch
5103 that mail and display it for easy perusal of its headers.  This might
5104 very well fail, though.
5105
5106 @item S D r
5107 @kindex S D r (Summary)
5108 @findex gnus-summary-resend-message
5109 Not to be confused with the previous command,
5110 @code{gnus-summary-resend-message} will prompt you for an address to
5111 send the current message off to, and then send it to that place.  The
5112 headers of the message won't be altered---but lots of headers that say
5113 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5114 means that you actually send a mail to someone that has a @code{To}
5115 header that (probably) points to yourself.  This will confuse people.
5116 So, natcherly you'll only do that if you're really eVIl.
5117
5118 This command is mainly used if you have several accounts and want to
5119 ship a mail to a different account of yours.  (If you're both
5120 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5121 to the @code{root} account, you may want to resend it to
5122 @code{postmaster}.  Ordnung muss sein!
5123
5124 This command understands the process/prefix convention
5125 (@pxref{Process/Prefix}).
5126
5127 @item S O m
5128 @kindex S O m (Summary)
5129 @findex gnus-summary-digest-mail-forward
5130 Digest the current series (@pxref{Decoding Articles}) and forward the
5131 result using mail (@code{gnus-summary-digest-mail-forward}).  This
5132 command uses the process/prefix convention (@pxref{Process/Prefix}).
5133
5134 @item S M-c
5135 @kindex S M-c (Summary)
5136 @findex gnus-summary-mail-crosspost-complaint
5137 @cindex crossposting
5138 @cindex excessive crossposting
5139 Send a complaint about excessive crossposting to the author of the
5140 current article (@code{gnus-summary-mail-crosspost-complaint}).
5141
5142 @findex gnus-crosspost-complaint
5143 This command is provided as a way to fight back against the current
5144 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5145 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5146 command understands the process/prefix convention
5147 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5148
5149 @end table
5150
5151 Also @xref{Header Commands, ,Header Commands, message, The Message
5152 Manual}, for more information.
5153
5154
5155 @node Summary Post Commands
5156 @subsection Summary Post Commands
5157 @cindex post
5158 @cindex composing news
5159
5160 Commands for posting a news article:
5161
5162 @table @kbd
5163 @item S p
5164 @itemx a
5165 @kindex a (Summary)
5166 @kindex S p (Summary)
5167 @findex gnus-summary-post-news
5168 @c @icon{gnus-summary-post-news}
5169 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5170 default, post to the current group.  If given a prefix, disable that.
5171 If the prefix is 1, prompt for another group instead.
5172
5173 @item S f
5174 @itemx f
5175 @kindex f (Summary)
5176 @kindex S f (Summary)
5177 @findex gnus-summary-followup
5178 @c @icon{gnus-summary-followup}
5179 Post a followup to the current article (@code{gnus-summary-followup}).
5180
5181 @item S F
5182 @itemx F
5183 @kindex S F (Summary)
5184 @kindex F (Summary)
5185 @c @icon{gnus-summary-followup-with-original}
5186 @findex gnus-summary-followup-with-original
5187 Post a followup to the current article and include the original message
5188 (@code{gnus-summary-followup-with-original}).   This command uses the
5189 process/prefix convention.
5190
5191 @item S n
5192 @kindex S n (Summary)
5193 @findex gnus-summary-followup-to-mail
5194 Post a followup to the current article via news, even if you got the
5195 message through mail (@code{gnus-summary-followup-to-mail}).
5196
5197 @item S N
5198 @kindex S N (Summary)
5199 @findex gnus-summary-followup-to-mail-with-original
5200 Post a followup to the current article via news, even if you got the
5201 message through mail and include the original message
5202 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5203 the process/prefix convention.
5204
5205 @item S o p
5206 @kindex S o p (Summary)
5207 @findex gnus-summary-post-forward
5208 Forward the current article to a newsgroup
5209 (@code{gnus-summary-post-forward}).  If given a prefix, include the full
5210 headers of the forwarded article.
5211
5212 @item S O p
5213 @kindex S O p (Summary)
5214 @findex gnus-summary-digest-post-forward
5215 @cindex digests
5216 @cindex making digests
5217 Digest the current series and forward the result to a newsgroup
5218 (@code{gnus-summary-digest-post-forward}).  This command uses the
5219 process/prefix convention.
5220
5221 @item S u
5222 @kindex S u (Summary)
5223 @findex gnus-uu-post-news
5224 @c @icon{gnus-uu-post-news}
5225 Uuencode a file, split it into parts, and post it as a series
5226 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5227 @end table
5228
5229 Also @xref{Header Commands, ,Header Commands, message, The Message
5230 Manual}, for more information.
5231
5232
5233 @node Summary Message Commands
5234 @subsection Summary Message Commands
5235
5236 @table @kbd
5237 @item S y
5238 @kindex S y (Summary)
5239 @findex gnus-summary-yank-message
5240 Yank the current article into an already existing Message composition
5241 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5242 what message buffer you want to yank into, and understands the
5243 process/prefix convention (@pxref{Process/Prefix}).
5244
5245 @end table
5246
5247
5248 @node Canceling and Superseding
5249 @subsection Canceling Articles
5250 @cindex canceling articles
5251 @cindex superseding articles
5252
5253 Have you ever written something, and then decided that you really,
5254 really, really wish you hadn't posted that?
5255
5256 Well, you can't cancel mail, but you can cancel posts.
5257
5258 @findex gnus-summary-cancel-article
5259 @kindex C (Summary)
5260 @c @icon{gnus-summary-cancel-article}
5261 Find the article you wish to cancel (you can only cancel your own
5262 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5263 c} (@code{gnus-summary-cancel-article}).  Your article will be
5264 canceled---machines all over the world will be deleting your article.
5265 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5266
5267 Be aware, however, that not all sites honor cancels, so your article may
5268 live on here and there, while most sites will delete the article in
5269 question.
5270
5271 Gnus will use the ``current'' select method when canceling.  If you
5272 want to use the standard posting method, use the @samp{a} symbolic
5273 prefix (@pxref{Symbolic Prefixes}).
5274
5275 If you discover that you have made some mistakes and want to do some
5276 corrections, you can post a @dfn{superseding} article that will replace
5277 your original article.
5278
5279 @findex gnus-summary-supersede-article
5280 @kindex S (Summary)
5281 Go to the original article and press @kbd{S s}
5282 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5283 where you can edit the article all you want before sending it off the
5284 usual way.
5285
5286 The same goes for superseding as for canceling, only more so: Some
5287 sites do not honor superseding.  On those sites, it will appear that you
5288 have posted almost the same article twice.
5289
5290 If you have just posted the article, and change your mind right away,
5291 there is a trick you can use to cancel/supersede the article without
5292 waiting for the article to appear on your site first.  You simply return
5293 to the post buffer (which is called @code{*sent ...*}).  There you will
5294 find the article you just posted, with all the headers intact.  Change
5295 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5296 header by substituting one of those words for the word
5297 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5298 you would do normally.  The previous article will be
5299 canceled/superseded.
5300
5301 Just remember, kids: There is no 'c' in 'supersede'.
5302
5303 @node Delayed Articles
5304 @section Delayed Articles
5305 @cindex delayed sending
5306 @cindex send delayed
5307
5308 Sometimes, you might wish to delay the sending of a message.  For
5309 example, you might wish to arrange for a message to turn up just in time
5310 to remind your about the birthday of your Significant Other.  For this,
5311 there is the @code{gnus-delay} package.  Setup is simple:
5312
5313 @lisp
5314 (gnus-delay-initialize)
5315 @end lisp
5316
5317 @findex gnus-delay-article
5318 Normally, to send a message you use the @kbd{C-c C-c} command from
5319 Message mode.  To delay a message, use @kbd{C-c C-j}
5320 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5321 message should be delayed.  Possible answers are:
5322
5323 @itemize @bullet
5324 @item
5325 A time span.  Consists of an integer and a letter.  For example,
5326 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5327 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5328 (months) and @code{Y} (years).
5329
5330 @item
5331 A specific date.  Looks like @code{YYYYY-MM-DD}.  The message will be
5332 delayed until that day, at a specific time (eight o'clock by default).
5333 See also @code{gnus-delay-default-hour}.
5334
5335 @item
5336 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5337 stuff.  The deadline will be at that time today, except if that time has
5338 already passed, then it's at the given time tomorrow.  So if it's ten
5339 o'clock in the morning and you specify @code{11:15}, then the deadline
5340 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5341 that means a time tomorrow.
5342 @end itemize
5343
5344 The action of the @code{gnus-delay-article} command is influenced by a
5345 couple of variables:
5346
5347 @table @code
5348 @item gnus-delay-default-hour
5349 @vindex gnus-delay-default-hour
5350 When you specify a specific date, the message will be due on that hour
5351 on the given date.  Possible values are integers 0 through 23.
5352
5353 @item gnus-delay-default-delay
5354 @vindex gnus-delay-default-delay
5355 This is a string and gives the default delay.  It can be of any of the
5356 formats described above.
5357
5358 @item gnus-delay-group
5359 @vindex gnus-delay-group
5360 Delayed articles will be kept in this group on the drafts server until
5361 they are due.  You probably don't need to change this.  The default
5362 value is @code{"delayed"}.
5363
5364 @item gnus-delay-header
5365 @vindex gnus-delay-header
5366 The deadline for each article will be stored in a header.  This variable
5367 is a string and gives the header name.  You probably don't need to
5368 change this.  The default value is @code{"X-Gnus-Delayed"}.
5369 @end table
5370
5371 The way delaying works is like this: when you use the
5372 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5373 calculates the deadline of the message and stores it in the
5374 @code{X-Gnus-Delayed} header and puts the message in the
5375 @code{nndraft:delayed} group.
5376
5377 And whenever you get new news, Gnus looks through the group for articles
5378 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5379 function for this.  By default, this function is added to the hook
5380 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5381 Maybe you want to use the demon to send drafts?  Just tell the demon to
5382 execute the @code{gnus-delay-send-queue} function.
5383
5384 @table @code
5385 @item gnus-delay-initialize
5386 @findex gnus-delay-initialize
5387 By default, this function installs the @kbd{C-c C-j} key binding in
5388 Message mode and @code{gnus-delay-send-queue} in
5389 @code{gnus-get-new-news-hook}.  But it accepts two optional arguments,
5390 @code{no-keymap} and @code{no-check}.  If @code{no-keymap} is non-nil,
5391 the @kbd{C-c C-j} binding is not intalled.  If @code{no-check} is
5392 non-nil, @code{gnus-get-new-news-hook} is not changed.
5393
5394 For example, @code{(gnus-delay-initialize nil t)} means to change the
5395 keymap but not to change @code{gnus-get-new-news-hook}.  Presumably, you
5396 want to use the demon for sending due delayed articles.  Just don't
5397 forget to set that up :-)
5398 @end table
5399
5400
5401 @node Marking Articles
5402 @section Marking Articles
5403 @cindex article marking
5404 @cindex article ticking
5405 @cindex marks
5406
5407 There are several marks you can set on an article.
5408
5409 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5410 neologism ohoy!) of the article.  Alphabetic marks generally mean
5411 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5412
5413 In addition, you also have marks that do not affect readedness.
5414
5415 @menu
5416 * Unread Articles::             Marks for unread articles.
5417 * Read Articles::               Marks for read articles.
5418 * Other Marks::                 Marks that do not affect readedness.
5419 @end menu
5420
5421 @ifinfo
5422 There's a plethora of commands for manipulating these marks:
5423 @end ifinfo
5424
5425 @menu
5426 * Setting Marks::             How to set and remove marks.
5427 * Generic Marking Commands::  How to customize the marking.
5428 * Setting Process Marks::     How to mark articles for later processing.
5429 @end menu
5430
5431
5432 @node Unread Articles
5433 @subsection Unread Articles
5434
5435 The following marks mark articles as (kinda) unread, in one form or
5436 other.
5437
5438 @table @samp
5439 @item !
5440 @vindex gnus-ticked-mark
5441 Marked as ticked (@code{gnus-ticked-mark}).
5442
5443 @dfn{Ticked articles} are articles that will remain visible always.  If
5444 you see an article that you find interesting, or you want to put off
5445 reading it, or replying to it, until sometime later, you'd typically
5446 tick it.  However, articles can be expired (from news servers by the
5447 news server software, Gnus itself never expires ticked messages), so if
5448 you want to keep an article forever, you'll have to make it persistent
5449 (@pxref{Persistent Articles}).
5450
5451 @item ?
5452 @vindex gnus-dormant-mark
5453 Marked as dormant (@code{gnus-dormant-mark}).
5454
5455 @dfn{Dormant articles} will only appear in the summary buffer if there
5456 are followups to it.  If you want to see them even if they don't have
5457 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5458 Otherwise (except for the visibility issue), they are just like ticked
5459 messages.
5460
5461 @item SPACE
5462 @vindex gnus-unread-mark
5463 Marked as unread (@code{gnus-unread-mark}).
5464
5465 @dfn{Unread articles} are articles that haven't been read at all yet.
5466 @end table
5467
5468
5469 @node Read Articles
5470 @subsection Read Articles
5471 @cindex expirable mark
5472
5473 All the following marks mark articles as read.
5474
5475 @table @samp
5476
5477 @item r
5478 @vindex gnus-del-mark
5479 These are articles that the user has marked as read with the @kbd{d}
5480 command manually, more or less (@code{gnus-del-mark}).
5481
5482 @item R
5483 @vindex gnus-read-mark
5484 Articles that have actually been read (@code{gnus-read-mark}).
5485
5486 @item O
5487 @vindex gnus-ancient-mark
5488 Articles that were marked as read in previous sessions and are now
5489 @dfn{old} (@code{gnus-ancient-mark}).
5490
5491 @item K
5492 @vindex gnus-killed-mark
5493 Marked as killed (@code{gnus-killed-mark}).
5494
5495 @item X
5496 @vindex gnus-kill-file-mark
5497 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5498
5499 @item Y
5500 @vindex gnus-low-score-mark
5501 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5502
5503 @item C
5504 @vindex gnus-catchup-mark
5505 Marked as read by a catchup (@code{gnus-catchup-mark}).
5506
5507 @item G
5508 @vindex gnus-canceled-mark
5509 Canceled article (@code{gnus-canceled-mark})
5510
5511 @item F
5512 @vindex gnus-souped-mark
5513 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5514
5515 @item Q
5516 @vindex gnus-sparse-mark
5517 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5518 Threading}.
5519
5520 @item M
5521 @vindex gnus-duplicate-mark
5522 Article marked as read by duplicate suppression
5523 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5524
5525 @end table
5526
5527 All these marks just mean that the article is marked as read, really.
5528 They are interpreted differently when doing adaptive scoring, though.
5529
5530 One more special mark, though:
5531
5532 @table @samp
5533 @item E
5534 @vindex gnus-expirable-mark
5535 Marked as expirable (@code{gnus-expirable-mark}).
5536
5537 Marking articles as @dfn{expirable} (or have them marked as such
5538 automatically) doesn't make much sense in normal groups---a user doesn't
5539 control expiring of news articles, but in mail groups, for instance,
5540 articles marked as @dfn{expirable} can be deleted by gnus at
5541 any time.
5542 @end table
5543
5544
5545 @node Other Marks
5546 @subsection Other Marks
5547 @cindex process mark
5548 @cindex bookmarks
5549
5550 There are some marks that have nothing to do with whether the article is
5551 read or not.
5552
5553 @itemize @bullet
5554
5555 @item
5556 You can set a bookmark in the current article.  Say you are reading a
5557 long thesis on cats' urinary tracts, and have to go home for dinner
5558 before you've finished reading the thesis.  You can then set a bookmark
5559 in the article, and gnus will jump to this bookmark the next time it
5560 encounters the article.  @xref{Setting Marks}.
5561
5562 @item
5563 @vindex gnus-replied-mark
5564 All articles that you have replied to or made a followup to (i.e., have
5565 answered) will be marked with an @samp{A} in the second column
5566 (@code{gnus-replied-mark}).
5567
5568 @item
5569 @vindex gnus-forwarded-mark
5570 All articles that you have forwarded will be marked with an @samp{F} in
5571 the second column (@code{gnus-forwarded-mark}).
5572
5573 @item
5574 @vindex gnus-cached-mark
5575 Articles stored in the article cache will be marked with an @samp{*} in
5576 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5577
5578 @item
5579 @vindex gnus-saved-mark
5580 Articles ``saved'' (in some manner or other; not necessarily
5581 religiously) are marked with an @samp{S} in the second column
5582 (@code{gnus-saved-mark}).
5583
5584 @item
5585 @vindex gnus-recent-mark
5586 Articles that according to the back end haven't been seen by the user
5587 before are marked with a @samp{N} in the second column
5588 (@code{gnus-recent-mark}).  Note that not all back ends support this
5589 mark, in which case it simply never appears.
5590
5591 @item
5592 @vindex gnus-unseen-mark
5593 Articles that haven't been seen by the user before are marked with a
5594 @samp{.} in the second column (@code{gnus-unseen-mark}).
5595
5596 @item
5597 @vindex gnus-not-empty-thread-mark
5598 @vindex gnus-empty-thread-mark
5599 If the @samp{%e} spec is used, the presence of threads or not will be
5600 marked with @code{gnus-not-empty-thread-mark} and
5601 @code{gnus-empty-thread-mark} in the third column, respectively.
5602
5603 @item
5604 @vindex gnus-process-mark
5605 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5606 variety of commands react to the presence of the process mark.  For
5607 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5608 all articles that have been marked with the process mark.  Articles
5609 marked with the process mark have a @samp{#} in the second column.
5610
5611 @end itemize
5612
5613 You might have noticed that most of these ``non-readedness'' marks
5614 appear in the second column by default.  So if you have a cached, saved,
5615 replied article that you have process-marked, what will that look like?
5616
5617 Nothing much.  The precedence rules go as follows: process -> cache ->
5618 replied -> saved.  So if the article is in the cache and is replied,
5619 you'll only see the cache mark and not the replied mark.
5620
5621
5622 @node Setting Marks
5623 @subsection Setting Marks
5624 @cindex setting marks
5625
5626 All the marking commands understand the numeric prefix.
5627
5628 @table @kbd
5629 @item M c
5630 @itemx M-u
5631 @kindex M c (Summary)
5632 @kindex M-u (Summary)
5633 @findex gnus-summary-clear-mark-forward
5634 @cindex mark as unread
5635 Clear all readedness-marks from the current article
5636 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5637 article as unread.
5638
5639 @item M t
5640 @itemx !
5641 @kindex ! (Summary)
5642 @kindex M t (Summary)
5643 @findex gnus-summary-tick-article-forward
5644 Tick the current article (@code{gnus-summary-tick-article-forward}).
5645 @xref{Article Caching}.
5646
5647 @item M ?
5648 @itemx ?
5649 @kindex ? (Summary)
5650 @kindex M ? (Summary)
5651 @findex gnus-summary-mark-as-dormant
5652 Mark the current article as dormant
5653 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5654
5655 @item M d
5656 @itemx d
5657 @kindex M d (Summary)
5658 @kindex d (Summary)
5659 @findex gnus-summary-mark-as-read-forward
5660 Mark the current article as read
5661 (@code{gnus-summary-mark-as-read-forward}).
5662
5663 @item D
5664 @kindex D (Summary)
5665 @findex gnus-summary-mark-as-read-backward
5666 Mark the current article as read and move point to the previous line
5667 (@code{gnus-summary-mark-as-read-backward}).
5668
5669 @item M k
5670 @itemx k
5671 @kindex k (Summary)
5672 @kindex M k (Summary)
5673 @findex gnus-summary-kill-same-subject-and-select
5674 Mark all articles that have the same subject as the current one as read,
5675 and then select the next unread article
5676 (@code{gnus-summary-kill-same-subject-and-select}).
5677
5678 @item M K
5679 @itemx C-k
5680 @kindex M K (Summary)
5681 @kindex C-k (Summary)
5682 @findex gnus-summary-kill-same-subject
5683 Mark all articles that have the same subject as the current one as read
5684 (@code{gnus-summary-kill-same-subject}).
5685
5686 @item M C
5687 @kindex M C (Summary)
5688 @findex gnus-summary-catchup
5689 @c @icon{gnus-summary-catchup}
5690 Mark all unread articles as read (@code{gnus-summary-catchup}).
5691
5692 @item M C-c
5693 @kindex M C-c (Summary)
5694 @findex gnus-summary-catchup-all
5695 Mark all articles in the group as read---even the ticked and dormant
5696 articles (@code{gnus-summary-catchup-all}).
5697
5698 @item M H
5699 @kindex M H (Summary)
5700 @findex gnus-summary-catchup-to-here
5701 Catchup the current group to point (before the point)
5702 (@code{gnus-summary-catchup-to-here}).
5703
5704 @item M h
5705 @kindex M h (Summary)
5706 @findex gnus-summary-catchup-from-here
5707 Catchup the current group from point (after the point)
5708 (@code{gnus-summary-catchup-from-here}).
5709
5710 @item C-w
5711 @kindex C-w (Summary)
5712 @findex gnus-summary-mark-region-as-read
5713 Mark all articles between point and mark as read
5714 (@code{gnus-summary-mark-region-as-read}).
5715
5716 @item M V k
5717 @kindex M V k (Summary)
5718 @findex gnus-summary-kill-below
5719 Kill all articles with scores below the default score (or below the
5720 numeric prefix) (@code{gnus-summary-kill-below}).
5721
5722 @item M e
5723 @itemx E
5724 @kindex M e (Summary)
5725 @kindex E (Summary)
5726 @findex gnus-summary-mark-as-expirable
5727 Mark the current article as expirable
5728 (@code{gnus-summary-mark-as-expirable}).
5729
5730 @item M b
5731 @kindex M b (Summary)
5732 @findex gnus-summary-set-bookmark
5733 Set a bookmark in the current article
5734 (@code{gnus-summary-set-bookmark}).
5735
5736 @item M B
5737 @kindex M B (Summary)
5738 @findex gnus-summary-remove-bookmark
5739 Remove the bookmark from the current article
5740 (@code{gnus-summary-remove-bookmark}).
5741
5742 @item M V c
5743 @kindex M V c (Summary)
5744 @findex gnus-summary-clear-above
5745 Clear all marks from articles with scores over the default score (or
5746 over the numeric prefix) (@code{gnus-summary-clear-above}).
5747
5748 @item M V u
5749 @kindex M V u (Summary)
5750 @findex gnus-summary-tick-above
5751 Tick all articles with scores over the default score (or over the
5752 numeric prefix) (@code{gnus-summary-tick-above}).
5753
5754 @item M V m
5755 @kindex M V m (Summary)
5756 @findex gnus-summary-mark-above
5757 Prompt for a mark, and mark all articles with scores over the default
5758 score (or over the numeric prefix) with this mark
5759 (@code{gnus-summary-clear-above}).
5760 @end table
5761
5762 @vindex gnus-summary-goto-unread
5763 The @code{gnus-summary-goto-unread} variable controls what action should
5764 be taken after setting a mark.  If non-@code{nil}, point will move to
5765 the next/previous unread article.  If @code{nil}, point will just move
5766 one line up or down.  As a special case, if this variable is
5767 @code{never}, all the marking commands as well as other commands (like
5768 @kbd{SPACE}) will move to the next article, whether it is unread or not.
5769 The default is @code{t}.
5770
5771
5772 @node Generic Marking Commands
5773 @subsection Generic Marking Commands
5774
5775 Some people would like the command that ticks an article (@kbd{!}) go to
5776 the next article.  Others would like it to go to the next unread
5777 article.  Yet others would like it to stay on the current article.  And
5778 even though I haven't heard of anybody wanting it to go to the
5779 previous (unread) article, I'm sure there are people that want that as
5780 well.
5781
5782 Multiply these five behaviors with five different marking commands, and
5783 you get a potentially complex set of variable to control what each
5784 command should do.
5785
5786 To sidestep that mess, Gnus provides commands that do all these
5787 different things.  They can be found on the @kbd{M M} map in the summary
5788 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
5789 to list in this manual.
5790
5791 While you can use these commands directly, most users would prefer
5792 altering the summary mode keymap.  For instance, if you would like the
5793 @kbd{!} command to go to the next article instead of the next unread
5794 article, you could say something like:
5795
5796 @lisp
5797 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
5798 (defun my-alter-summary-map ()
5799   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
5800 @end lisp
5801
5802 or
5803
5804 @lisp
5805 (defun my-alter-summary-map ()
5806   (local-set-key "!" "MM!n"))
5807 @end lisp
5808
5809
5810 @node Setting Process Marks
5811 @subsection Setting Process Marks
5812 @cindex setting process marks
5813
5814 @table @kbd
5815
5816 @item M P p
5817 @itemx #
5818 @kindex # (Summary)
5819 @kindex M P p (Summary)
5820 @findex gnus-summary-mark-as-processable
5821 Mark the current article with the process mark
5822 (@code{gnus-summary-mark-as-processable}).
5823 @findex gnus-summary-unmark-as-processable
5824
5825 @item M P u
5826 @itemx M-#
5827 @kindex M P u (Summary)
5828 @kindex M-# (Summary)
5829 Remove the process mark, if any, from the current article
5830 (@code{gnus-summary-unmark-as-processable}).
5831
5832 @item M P U
5833 @kindex M P U (Summary)
5834 @findex gnus-summary-unmark-all-processable
5835 Remove the process mark from all articles
5836 (@code{gnus-summary-unmark-all-processable}).
5837
5838 @item M P i
5839 @kindex M P i (Summary)
5840 @findex gnus-uu-invert-processable
5841 Invert the list of process marked articles
5842 (@code{gnus-uu-invert-processable}).
5843
5844 @item M P R
5845 @kindex M P R (Summary)
5846 @findex gnus-uu-mark-by-regexp
5847 Mark articles that have a @code{Subject} header that matches a regular
5848 expression (@code{gnus-uu-mark-by-regexp}).
5849
5850 @item M P G
5851 @kindex M P G (Summary)
5852 @findex gnus-uu-unmark-by-regexp
5853 Unmark articles that have a @code{Subject} header that matches a regular
5854 expression (@code{gnus-uu-unmark-by-regexp}).
5855
5856 @item M P r
5857 @kindex M P r (Summary)
5858 @findex gnus-uu-mark-region
5859 Mark articles in region (@code{gnus-uu-mark-region}).
5860
5861 @item M P t
5862 @kindex M P t (Summary)
5863 @findex gnus-uu-mark-thread
5864 Mark all articles in the current (sub)thread
5865 (@code{gnus-uu-mark-thread}).
5866
5867 @item M P T
5868 @kindex M P T (Summary)
5869 @findex gnus-uu-unmark-thread
5870 Unmark all articles in the current (sub)thread
5871 (@code{gnus-uu-unmark-thread}).
5872
5873 @item M P v
5874 @kindex M P v (Summary)
5875 @findex gnus-uu-mark-over
5876 Mark all articles that have a score above the prefix argument
5877 (@code{gnus-uu-mark-over}).
5878
5879 @item M P s
5880 @kindex M P s (Summary)
5881 @findex gnus-uu-mark-series
5882 Mark all articles in the current series (@code{gnus-uu-mark-series}).
5883
5884 @item M P S
5885 @kindex M P S (Summary)
5886 @findex gnus-uu-mark-sparse
5887 Mark all series that have already had some articles marked
5888 (@code{gnus-uu-mark-sparse}).
5889
5890 @item M P a
5891 @kindex M P a (Summary)
5892 @findex gnus-uu-mark-all
5893 Mark all articles in series order (@code{gnus-uu-mark-series}).
5894
5895 @item M P b
5896 @kindex M P b (Summary)
5897 @findex gnus-uu-mark-buffer
5898 Mark all articles in the buffer in the order they appear
5899 (@code{gnus-uu-mark-buffer}).
5900
5901 @item M P k
5902 @kindex M P k (Summary)
5903 @findex gnus-summary-kill-process-mark
5904 Push the current process mark set onto the stack and unmark all articles
5905 (@code{gnus-summary-kill-process-mark}).
5906
5907 @item M P y
5908 @kindex M P y (Summary)
5909 @findex gnus-summary-yank-process-mark
5910 Pop the previous process mark set from the stack and restore it
5911 (@code{gnus-summary-yank-process-mark}).
5912
5913 @item M P w
5914 @kindex M P w (Summary)
5915 @findex gnus-summary-save-process-mark
5916 Push the current process mark set onto the stack
5917 (@code{gnus-summary-save-process-mark}).
5918
5919 @end table
5920
5921 Also see the @kbd{&} command in @pxref{Searching for Articles} for how to
5922 set process marks based on article body contents.
5923
5924
5925 @node Limiting
5926 @section Limiting
5927 @cindex limiting
5928
5929 It can be convenient to limit the summary buffer to just show some
5930 subset of the articles currently in the group.  The effect most limit
5931 commands have is to remove a few (or many) articles from the summary
5932 buffer.
5933
5934 All limiting commands work on subsets of the articles already fetched
5935 from the servers.  None of these commands query the server for
5936 additional articles.
5937
5938 @table @kbd
5939
5940 @item / /
5941 @itemx / s
5942 @kindex / / (Summary)
5943 @findex gnus-summary-limit-to-subject
5944 Limit the summary buffer to articles that match some subject
5945 (@code{gnus-summary-limit-to-subject}). If given a prefix, exclude
5946 matching articles.
5947
5948 @item / a
5949 @kindex / a (Summary)
5950 @findex gnus-summary-limit-to-author
5951 Limit the summary buffer to articles that match some author
5952 (@code{gnus-summary-limit-to-author}). If given a prefix, exclude
5953 matching articles.
5954
5955 @item / x
5956 @kindex / x (Summary)
5957 @findex gnus-summary-limit-to-extra
5958 Limit the summary buffer to articles that match one of the ``extra''
5959 headers (@pxref{To From Newsgroups})
5960 (@code{gnus-summary-limit-to-extra}). If given a prefix, exclude
5961 matching articles.
5962
5963 @item / u
5964 @itemx x
5965 @kindex / u (Summary)
5966 @kindex x (Summary)
5967 @findex gnus-summary-limit-to-unread
5968 Limit the summary buffer to articles not marked as read
5969 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
5970 buffer to articles strictly unread.  This means that ticked and
5971 dormant articles will also be excluded.
5972
5973 @item / m
5974 @kindex / m (Summary)
5975 @findex gnus-summary-limit-to-marks
5976 Ask for a mark and then limit to all articles that have been marked
5977 with that mark (@code{gnus-summary-limit-to-marks}).
5978
5979 @item / t
5980 @kindex / t (Summary)
5981 @findex gnus-summary-limit-to-age
5982 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
5983 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
5984 articles younger than that number of days.
5985
5986 @item / n
5987 @kindex / n (Summary)
5988 @findex gnus-summary-limit-to-articles
5989 Limit the summary buffer to the current article
5990 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
5991 convention (@pxref{Process/Prefix}).
5992
5993 @item / w
5994 @kindex / w (Summary)
5995 @findex gnus-summary-pop-limit
5996 Pop the previous limit off the stack and restore it
5997 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
5998 the stack.
5999
6000 @item / v
6001 @kindex / v (Summary)
6002 @findex gnus-summary-limit-to-score
6003 Limit the summary buffer to articles that have a score at or above some
6004 score (@code{gnus-summary-limit-to-score}).
6005
6006 @item / p
6007 @kindex / p (Summary)
6008 @findex gnus-summary-limit-to-display-predicate
6009 Limit the summary buffer to articles that satisfy the @code{display}
6010 group parameter predicate
6011 (@code{gnus-summary-limit-to-display-predicate}).  See @pxref{Group
6012 Parameters} for more on this predicate.
6013
6014 @item / E
6015 @itemx M S
6016 @kindex M S (Summary)
6017 @kindex / E (Summary)
6018 @findex gnus-summary-limit-include-expunged
6019 Include all expunged articles in the limit
6020 (@code{gnus-summary-limit-include-expunged}).
6021
6022 @item / D
6023 @kindex / D (Summary)
6024 @findex gnus-summary-limit-include-dormant
6025 Include all dormant articles in the limit
6026 (@code{gnus-summary-limit-include-dormant}).
6027
6028 @item / *
6029 @kindex / * (Summary)
6030 @findex gnus-summary-limit-include-cached
6031 Include all cached articles in the limit
6032 (@code{gnus-summary-limit-include-cached}).
6033
6034 @item / d
6035 @kindex / d (Summary)
6036 @findex gnus-summary-limit-exclude-dormant
6037 Exclude all dormant articles from the limit
6038 (@code{gnus-summary-limit-exclude-dormant}).
6039
6040 @item / M
6041 @kindex / M (Summary)
6042 @findex gnus-summary-limit-exclude-marks
6043 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6044
6045 @item / T
6046 @kindex / T (Summary)
6047 @findex gnus-summary-limit-include-thread
6048 Include all the articles in the current thread in the limit.
6049
6050 @item / c
6051 @kindex / c (Summary)
6052 @findex gnus-summary-limit-exclude-childless-dormant
6053 Exclude all dormant articles that have no children from the limit
6054 (@code{gnus-summary-limit-exclude-childless-dormant}).
6055
6056 @item / C
6057 @kindex / C (Summary)
6058 @findex gnus-summary-limit-mark-excluded-as-read
6059 Mark all excluded unread articles as read
6060 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
6061 also mark excluded ticked and dormant articles as read.
6062
6063 @item / N
6064 @kindex / N (Summary)
6065 @findex gnus-summary-insert-new-articles
6066 Insert all new articles in the summary buffer. It scans for new emails
6067 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6068
6069 @item / o
6070 @kindex / o (Summary)
6071 @findex gnus-summary-insert-old-articles
6072 Insert all old articles in the summary buffer. If given a numbered
6073 prefix, fetch this number of articles.
6074
6075 @end table
6076
6077
6078 @node Threading
6079 @section Threading
6080 @cindex threading
6081 @cindex article threading
6082
6083 Gnus threads articles by default.  @dfn{To thread} is to put responses
6084 to articles directly after the articles they respond to---in a
6085 hierarchical fashion.
6086
6087 Threading is done by looking at the @code{References} headers of the
6088 articles.  In a perfect world, this would be enough to build pretty
6089 trees, but unfortunately, the @code{References} header is often broken
6090 or simply missing.  Weird news propagation exacerbates the problem,
6091 so one has to employ other heuristics to get pleasing results.  A
6092 plethora of approaches exists, as detailed in horrible detail in
6093 @pxref{Customizing Threading}.
6094
6095 First, a quick overview of the concepts:
6096
6097 @table @dfn
6098 @item root
6099 The top-most article in a thread; the first article in the thread.
6100
6101 @item thread
6102 A tree-like article structure.
6103
6104 @item sub-thread
6105 A small(er) section of this tree-like structure.
6106
6107 @item loose threads
6108 Threads often lose their roots due to article expiry, or due to the root
6109 already having been read in a previous session, and not displayed in the
6110 summary buffer.  We then typically have many sub-threads that really
6111 belong to one thread, but are without connecting roots.  These are
6112 called loose threads.
6113
6114 @item thread gathering
6115 An attempt to gather loose threads into bigger threads.
6116
6117 @item sparse threads
6118 A thread where the missing articles have been ``guessed'' at, and are
6119 displayed as empty lines in the summary buffer.
6120
6121 @end table
6122
6123
6124 @menu
6125 * Customizing Threading::       Variables you can change to affect the threading.
6126 * Thread Commands::             Thread based commands in the summary buffer.
6127 @end menu
6128
6129
6130 @node Customizing Threading
6131 @subsection Customizing Threading
6132 @cindex customizing threading
6133
6134 @menu
6135 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6136 * Filling In Threads::          Making the threads displayed look fuller.
6137 * More Threading::              Even more variables for fiddling with threads.
6138 * Low-Level Threading::         You thought it was over... but you were wrong!
6139 @end menu
6140
6141
6142 @node Loose Threads
6143 @subsubsection Loose Threads
6144 @cindex <
6145 @cindex >
6146 @cindex loose threads
6147
6148 @table @code
6149 @item gnus-summary-make-false-root
6150 @vindex gnus-summary-make-false-root
6151 If non-@code{nil}, gnus will gather all loose subtrees into one big tree
6152 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6153 Yup.)  Loose subtrees occur when the real root has expired, or you've
6154 read or killed the root in a previous session.
6155
6156 When there is no real root of a thread, gnus will have to fudge
6157 something.  This variable says what fudging method gnus should use.
6158 There are four possible values:
6159
6160 @iftex
6161 @iflatex
6162 \gnusfigure{The Summary Buffer}{390}{
6163 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6164 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6165 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6166 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6167 }
6168 @end iflatex
6169 @end iftex
6170
6171 @cindex adopting articles
6172
6173 @table @code
6174
6175 @item adopt
6176 Gnus will make the first of the orphaned articles the parent.  This
6177 parent will adopt all the other articles.  The adopted articles will be
6178 marked as such by pointy brackets (@samp{<>}) instead of the standard
6179 square brackets (@samp{[]}).  This is the default method.
6180
6181 @item dummy
6182 @vindex gnus-summary-dummy-line-format
6183 Gnus will create a dummy summary line that will pretend to be the
6184 parent.  This dummy line does not correspond to any real article, so
6185 selecting it will just select the first real article after the dummy
6186 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6187 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6188 which is the subject of the article.  @xref{Formatting Variables}.
6189
6190 @item empty
6191 Gnus won't actually make any article the parent, but simply leave the
6192 subject field of all orphans except the first empty.  (Actually, it will
6193 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6194 Buffer Format}).)
6195
6196 @item none
6197 Don't make any article parent at all.  Just gather the threads and
6198 display them after one another.
6199
6200 @item nil
6201 Don't gather loose threads.
6202 @end table
6203
6204 @item gnus-summary-gather-subject-limit
6205 @vindex gnus-summary-gather-subject-limit
6206 Loose threads are gathered by comparing subjects of articles.  If this
6207 variable is @code{nil}, gnus requires an exact match between the
6208 subjects of the loose threads before gathering them into one big
6209 super-thread.  This might be too strict a requirement, what with the
6210 presence of stupid newsreaders that chop off long subject lines.  If
6211 you think so, set this variable to, say, 20 to require that only the
6212 first 20 characters of the subjects have to match.  If you set this
6213 variable to a really low number, you'll find that gnus will gather
6214 everything in sight into one thread, which isn't very helpful.
6215
6216 @cindex fuzzy article gathering
6217 If you set this variable to the special value @code{fuzzy}, gnus will
6218 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6219 Matching}).
6220
6221 @item gnus-simplify-subject-fuzzy-regexp
6222 @vindex gnus-simplify-subject-fuzzy-regexp
6223 This can either be a regular expression or list of regular expressions
6224 that match strings that will be removed from subjects if fuzzy subject
6225 simplification is used.
6226
6227 @item gnus-simplify-ignored-prefixes
6228 @vindex gnus-simplify-ignored-prefixes
6229 If you set @code{gnus-summary-gather-subject-limit} to something as low
6230 as 10, you might consider setting this variable to something sensible:
6231
6232 @c Written by Michael Ernst <mernst@cs.rice.edu>
6233 @lisp
6234 (setq gnus-simplify-ignored-prefixes
6235       (concat
6236        "\\`\\[?\\("
6237        (mapconcat
6238         'identity
6239         '("looking"
6240           "wanted" "followup" "summary\\( of\\)?"
6241           "help" "query" "problem" "question"
6242           "answer" "reference" "announce"
6243           "How can I" "How to" "Comparison of"
6244           ;; ...
6245           )
6246         "\\|")
6247        "\\)\\s *\\("
6248        (mapconcat 'identity
6249                   '("for" "for reference" "with" "about")
6250                   "\\|")
6251        "\\)?\\]?:?[ \t]*"))
6252 @end lisp
6253
6254 All words that match this regexp will be removed before comparing two
6255 subjects.
6256
6257 @item gnus-simplify-subject-functions
6258 @vindex gnus-simplify-subject-functions
6259 If non-@code{nil}, this variable overrides
6260 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6261 list of functions to apply to the @code{Subject} string iteratively to
6262 arrive at the simplified version of the string.
6263
6264 Useful functions to put in this list include:
6265
6266 @table @code
6267 @item gnus-simplify-subject-re
6268 @findex gnus-simplify-subject-re
6269 Strip the leading @samp{Re:}.
6270
6271 @item gnus-simplify-subject-fuzzy
6272 @findex gnus-simplify-subject-fuzzy
6273 Simplify fuzzily.
6274
6275 @item gnus-simplify-whitespace
6276 @findex gnus-simplify-whitespace
6277 Remove excessive whitespace.
6278 @end table
6279
6280 You may also write your own functions, of course.
6281
6282
6283 @item gnus-summary-gather-exclude-subject
6284 @vindex gnus-summary-gather-exclude-subject
6285 Since loose thread gathering is done on subjects only, that might lead
6286 to many false hits, especially with certain common subjects like
6287 @samp{} and @samp{(none)}.  To make the situation slightly better,
6288 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6289 what subjects should be excluded from the gathering process.@*
6290 The default is @samp{^ *$\\|^(none)$}.
6291
6292 @item gnus-summary-thread-gathering-function
6293 @vindex gnus-summary-thread-gathering-function
6294 Gnus gathers threads by looking at @code{Subject} headers.  This means
6295 that totally unrelated articles may end up in the same ``thread'', which
6296 is confusing.  An alternate approach is to look at all the
6297 @code{Message-ID}s in all the @code{References} headers to find matches.
6298 This will ensure that no gathered threads ever include unrelated
6299 articles, but it also means that people who have posted with broken
6300 newsreaders won't be gathered properly.  The choice is yours---plague or
6301 cholera:
6302
6303 @table @code
6304 @item gnus-gather-threads-by-subject
6305 @findex gnus-gather-threads-by-subject
6306 This function is the default gathering function and looks at
6307 @code{Subject}s exclusively.
6308
6309 @item gnus-gather-threads-by-references
6310 @findex gnus-gather-threads-by-references
6311 This function looks at @code{References} headers exclusively.
6312 @end table
6313
6314 If you want to test gathering by @code{References}, you could say
6315 something like:
6316
6317 @lisp
6318 (setq gnus-summary-thread-gathering-function
6319       'gnus-gather-threads-by-references)
6320 @end lisp
6321
6322 @end table
6323
6324
6325 @node Filling In Threads
6326 @subsubsection Filling In Threads
6327
6328 @table @code
6329 @item gnus-fetch-old-headers
6330 @vindex gnus-fetch-old-headers
6331 If non-@code{nil}, gnus will attempt to build old threads by fetching
6332 more old headers---headers to articles marked as read.  If you
6333 would like to display as few summary lines as possible, but still
6334 connect as many loose threads as possible, you should set this variable
6335 to @code{some} or a number.  If you set it to a number, no more than
6336 that number of extra old headers will be fetched.  In either case,
6337 fetching old headers only works if the back end you are using carries
6338 overview files---this would normally be @code{nntp}, @code{nnspool},
6339 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6340 the thread has been expired by the server, there's not much Gnus can do
6341 about that.
6342
6343 This variable can also be set to @code{invisible}.  This won't have any
6344 visible effects, but is useful if you use the @kbd{A T} command a lot
6345 (@pxref{Finding the Parent}).
6346
6347 @item gnus-build-sparse-threads
6348 @vindex gnus-build-sparse-threads
6349 Fetching old headers can be slow.  A low-rent similar effect can be
6350 gotten by setting this variable to @code{some}.  Gnus will then look at
6351 the complete @code{References} headers of all articles and try to string
6352 together articles that belong in the same thread.  This will leave
6353 @dfn{gaps} in the threading display where gnus guesses that an article
6354 is missing from the thread.  (These gaps appear like normal summary
6355 lines.  If you select a gap, gnus will try to fetch the article in
6356 question.)  If this variable is @code{t}, gnus will display all these
6357 ``gaps'' without regard for whether they are useful for completing the
6358 thread or not.  Finally, if this variable is @code{more}, gnus won't cut
6359 off sparse leaf nodes that don't lead anywhere.  This variable is
6360 @code{nil} by default.
6361
6362 @item gnus-read-all-available-headers
6363 @vindex gnus-read-all-available-headers
6364 This is a rather obscure variable that few will find useful.  It's
6365 intended for those non-news newsgroups where the back end has to fetch
6366 quite a lot to present the summary buffer, and where it's impossible to
6367 go back to parents of articles.  This is mostly the case in the
6368 web-based groups, like the @code{nnultimate} groups.
6369
6370 If you don't use those, then it's safe to leave this as the default
6371 @code{nil}.  If you want to use this variable, it should be a regexp
6372 that matches the group name, or @code{t} for all groups.
6373
6374 @end table
6375
6376
6377 @node More Threading
6378 @subsubsection More Threading
6379
6380 @table @code
6381 @item gnus-show-threads
6382 @vindex gnus-show-threads
6383 If this variable is @code{nil}, no threading will be done, and all of
6384 the rest of the variables here will have no effect.  Turning threading
6385 off will speed group selection up a bit, but it is sure to make reading
6386 slower and more awkward.
6387
6388 @item gnus-thread-hide-subtree
6389 @vindex gnus-thread-hide-subtree
6390 If non-@code{nil}, all threads will be hidden when the summary buffer is
6391 generated.
6392
6393 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6394 Avaliable predicates are @code{gnus-article-unread-p} and
6395 @code{gnus-article-unseen-p}).
6396
6397 Here's an example:
6398
6399 @lisp
6400 (setq gnus-thread-hide-subtree
6401       '(or gnus-article-unread-p
6402            gnus-article-unseen-p))
6403 @end lisp
6404
6405 (It's a pretty nonsensical example, since all unseen articles are also
6406 unread, but you get my drift.)
6407
6408
6409 @item gnus-thread-expunge-below
6410 @vindex gnus-thread-expunge-below
6411 All threads that have a total score (as defined by
6412 @code{gnus-thread-score-function}) less than this number will be
6413 expunged.  This variable is @code{nil} by default, which means that no
6414 threads are expunged.
6415
6416 @item gnus-thread-hide-killed
6417 @vindex gnus-thread-hide-killed
6418 if you kill a thread and this variable is non-@code{nil}, the subtree
6419 will be hidden.
6420
6421 @item gnus-thread-ignore-subject
6422 @vindex gnus-thread-ignore-subject
6423 Sometimes somebody changes the subject in the middle of a thread.  If
6424 this variable is non-@code{nil}, which is the default, the subject
6425 change is ignored.  If it is @code{nil}, a change in the subject will
6426 result in a new thread.
6427
6428 @item gnus-thread-indent-level
6429 @vindex gnus-thread-indent-level
6430 This is a number that says how much each sub-thread should be indented.
6431 The default is 4.
6432
6433 @item gnus-sort-gathered-threads-function
6434 @vindex gnus-sort-gathered-threads-function
6435 Sometimes, particularly with mailing lists, the order in which mails
6436 arrive locally is not necessarily the same as the order in which they
6437 arrived on the mailing list.  Consequently, when sorting sub-threads
6438 using the default @code{gnus-thread-sort-by-number}, responses can end
6439 up appearing before the article to which they are responding to.
6440 Setting this variable to an alternate value
6441 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6442 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6443 more logical sub-thread ordering in such instances.
6444
6445 @end table
6446
6447
6448 @node Low-Level Threading
6449 @subsubsection Low-Level Threading
6450
6451 @table @code
6452
6453 @item gnus-parse-headers-hook
6454 @vindex gnus-parse-headers-hook
6455 Hook run before parsing any headers.  The default value is
6456 @code{(gnus-set-summary-default-charset)}, which sets up local value of
6457 @code{default-mime-charset} in summary buffer based on variable
6458 @code{gnus-newsgroup-default-charset-alist}.
6459
6460 @item gnus-alter-header-function
6461 @vindex gnus-alter-header-function
6462 If non-@code{nil}, this function will be called to allow alteration of
6463 article header structures.  The function is called with one parameter,
6464 the article header vector, which it may alter in any way.  For instance,
6465 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6466 in systematic ways (by adding prefixes and such), you can use this
6467 variable to un-scramble the @code{Message-ID}s so that they are more
6468 meaningful.  Here's one example:
6469
6470 @lisp
6471 (setq gnus-alter-header-function 'my-alter-message-id)
6472
6473 (defun my-alter-message-id (header)
6474   (let ((id (mail-header-id header)))
6475     (when (string-match
6476            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6477       (mail-header-set-id
6478        (concat (match-string 1 id) "@@" (match-string 2 id))
6479        header))))
6480 @end lisp
6481
6482 @end table
6483
6484
6485 @node Thread Commands
6486 @subsection Thread Commands
6487 @cindex thread commands
6488
6489 @table @kbd
6490
6491 @item T k
6492 @itemx C-M-k
6493 @kindex T k (Summary)
6494 @kindex C-M-k (Summary)
6495 @findex gnus-summary-kill-thread
6496 Mark all articles in the current (sub-)thread as read
6497 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6498 remove all marks instead.  If the prefix argument is negative, tick
6499 articles instead.
6500
6501 @item T l
6502 @itemx C-M-l
6503 @kindex T l (Summary)
6504 @kindex C-M-l (Summary)
6505 @findex gnus-summary-lower-thread
6506 Lower the score of the current (sub-)thread
6507 (@code{gnus-summary-lower-thread}).
6508
6509 @item T i
6510 @kindex T i (Summary)
6511 @findex gnus-summary-raise-thread
6512 Increase the score of the current (sub-)thread
6513 (@code{gnus-summary-raise-thread}).
6514
6515 @item T #
6516 @kindex T # (Summary)
6517 @findex gnus-uu-mark-thread
6518 Set the process mark on the current (sub-)thread
6519 (@code{gnus-uu-mark-thread}).
6520
6521 @item T M-#
6522 @kindex T M-# (Summary)
6523 @findex gnus-uu-unmark-thread
6524 Remove the process mark from the current (sub-)thread
6525 (@code{gnus-uu-unmark-thread}).
6526
6527 @item T T
6528 @kindex T T (Summary)
6529 @findex gnus-summary-toggle-threads
6530 Toggle threading (@code{gnus-summary-toggle-threads}).
6531
6532 @item T s
6533 @kindex T s (Summary)
6534 @findex gnus-summary-show-thread
6535 Expose the (sub-)thread hidden under the current article, if any
6536 (@code{gnus-summary-show-thread}).
6537
6538 @item T h
6539 @kindex T h (Summary)
6540 @findex gnus-summary-hide-thread
6541 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6542
6543 @item T S
6544 @kindex T S (Summary)
6545 @findex gnus-summary-show-all-threads
6546 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6547
6548 @item T H
6549 @kindex T H (Summary)
6550 @findex gnus-summary-hide-all-threads
6551 Hide all threads (@code{gnus-summary-hide-all-threads}).
6552
6553 @item T t
6554 @kindex T t (Summary)
6555 @findex gnus-summary-rethread-current
6556 Re-thread the current article's thread
6557 (@code{gnus-summary-rethread-current}).  This works even when the
6558 summary buffer is otherwise unthreaded.
6559
6560 @item T ^
6561 @kindex T ^ (Summary)
6562 @findex gnus-summary-reparent-thread
6563 Make the current article the child of the marked (or previous) article
6564 (@code{gnus-summary-reparent-thread}).
6565
6566 @end table
6567
6568 The following commands are thread movement commands.  They all
6569 understand the numeric prefix.
6570
6571 @table @kbd
6572
6573 @item T n
6574 @kindex T n (Summary)
6575 @itemx C-M-f
6576 @kindex C-M-n (Summary)
6577 @itemx M-down
6578 @kindex M-down (Summary)
6579 @findex gnus-summary-next-thread
6580 Go to the next thread (@code{gnus-summary-next-thread}).
6581
6582 @item T p
6583 @kindex T p (Summary)
6584 @itemx C-M-b
6585 @kindex C-M-p (Summary)
6586 @itemx M-up
6587 @kindex M-up (Summary)
6588 @findex gnus-summary-prev-thread
6589 Go to the previous thread (@code{gnus-summary-prev-thread}).
6590
6591 @item T d
6592 @kindex T d (Summary)
6593 @findex gnus-summary-down-thread
6594 Descend the thread (@code{gnus-summary-down-thread}).
6595
6596 @item T u
6597 @kindex T u (Summary)
6598 @findex gnus-summary-up-thread
6599 Ascend the thread (@code{gnus-summary-up-thread}).
6600
6601 @item T o
6602 @kindex T o (Summary)
6603 @findex gnus-summary-top-thread
6604 Go to the top of the thread (@code{gnus-summary-top-thread}).
6605 @end table
6606
6607 @vindex gnus-thread-operation-ignore-subject
6608 If you ignore subject while threading, you'll naturally end up with
6609 threads that have several different subjects in them.  If you then issue
6610 a command like `T k' (@code{gnus-summary-kill-thread}) you might not
6611 wish to kill the entire thread, but just those parts of the thread that
6612 have the same subject as the current article.  If you like this idea,
6613 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6614 is non-@code{nil} (which it is by default), subjects will be ignored
6615 when doing thread commands.  If this variable is @code{nil}, articles in
6616 the same thread with different subjects will not be included in the
6617 operation in question.  If this variable is @code{fuzzy}, only articles
6618 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6619 Matching}).
6620
6621
6622 @node Sorting the Summary Buffer
6623 @section Sorting the Summary Buffer
6624
6625 @findex gnus-thread-sort-by-total-score
6626 @findex gnus-thread-sort-by-date
6627 @findex gnus-thread-sort-by-score
6628 @findex gnus-thread-sort-by-subject
6629 @findex gnus-thread-sort-by-author
6630 @findex gnus-thread-sort-by-number
6631 @vindex gnus-thread-sort-functions
6632 @findex gnus-thread-sort-by-most-recent-thread
6633 If you are using a threaded summary display, you can sort the threads by
6634 setting @code{gnus-thread-sort-functions}, which can be either a single
6635 function, a list of functions, or a list containing functions and
6636 @code{(not some-function)} elements.
6637
6638 By default, sorting is done on article numbers.  Ready-made sorting
6639 predicate functions include @code{gnus-thread-sort-by-number},
6640 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6641 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6642 @code{gnus-thread-sort-by-most-recent-number},
6643 @code{gnus-thread-sort-by-most-recent-date} and
6644 @code{gnus-thread-sort-by-total-score}.
6645
6646 Each function takes two threads and returns non-@code{nil} if the first
6647 thread should be sorted before the other.  Note that sorting really is
6648 normally done by looking only at the roots of each thread.
6649
6650 If you use more than one function, the primary sort key should be the
6651 last function in the list.  You should probably always include
6652 @code{gnus-thread-sort-by-number} in the list of sorting
6653 functions---preferably first.  This will ensure that threads that are
6654 equal with respect to the other sort criteria will be displayed in
6655 ascending article order.
6656
6657 If you would like to sort by reverse score, then by subject, and finally
6658 by number, you could do something like:
6659
6660 @lisp
6661 (setq gnus-thread-sort-functions
6662       '(gnus-thread-sort-by-number
6663         gnus-thread-sort-by-subject
6664         (not gnus-thread-sort-by-total-score)))
6665 @end lisp
6666
6667 The threads that have highest score will be displayed first in the
6668 summary buffer.  When threads have the same score, they will be sorted
6669 alphabetically.  The threads that have the same score and the same
6670 subject will be sorted by number, which is (normally) the sequence in
6671 which the articles arrived.
6672
6673 If you want to sort by score and then reverse arrival order, you could
6674 say something like:
6675
6676 @lisp
6677 (setq gnus-thread-sort-functions
6678       '((lambda (t1 t2)
6679           (not (gnus-thread-sort-by-number t1 t2)))
6680         gnus-thread-sort-by-score))
6681 @end lisp
6682
6683 @vindex gnus-thread-score-function
6684 The function in the @code{gnus-thread-score-function} variable (default
6685 @code{+}) is used for calculating the total score of a thread.  Useful
6686 functions might be @code{max}, @code{min}, or squared means, or whatever
6687 tickles your fancy.
6688
6689 @findex gnus-article-sort-functions
6690 @findex gnus-article-sort-by-date
6691 @findex gnus-article-sort-by-score
6692 @findex gnus-article-sort-by-subject
6693 @findex gnus-article-sort-by-author
6694 @findex gnus-article-sort-by-number
6695 If you are using an unthreaded display for some strange reason or other,
6696 you have to fiddle with the @code{gnus-article-sort-functions} variable.
6697 It is very similar to the @code{gnus-thread-sort-functions}, except that
6698 it uses slightly different functions for article comparison.  Available
6699 sorting predicate functions are @code{gnus-article-sort-by-number},
6700 @code{gnus-article-sort-by-author}, @code{gnus-article-sort-by-subject},
6701 @code{gnus-article-sort-by-date}, and @code{gnus-article-sort-by-score}.
6702
6703 If you want to sort an unthreaded summary display by subject, you could
6704 say something like:
6705
6706 @lisp
6707 (setq gnus-article-sort-functions
6708       '(gnus-article-sort-by-number
6709         gnus-article-sort-by-subject))
6710 @end lisp
6711
6712
6713
6714 @node Asynchronous Fetching
6715 @section Asynchronous Article Fetching
6716 @cindex asynchronous article fetching
6717 @cindex article pre-fetch
6718 @cindex pre-fetch
6719
6720 If you read your news from an @sc{nntp} server that's far away, the
6721 network latencies may make reading articles a chore.  You have to wait
6722 for a while after pressing @kbd{n} to go to the next article before the
6723 article appears.  Why can't gnus just go ahead and fetch the article
6724 while you are reading the previous one?  Why not, indeed.
6725
6726 First, some caveats.  There are some pitfalls to using asynchronous
6727 article fetching, especially the way gnus does it.
6728
6729 Let's say you are reading article 1, which is short, and article 2 is
6730 quite long, and you are not interested in reading that.  Gnus does not
6731 know this, so it goes ahead and fetches article 2.  You decide to read
6732 article 3, but since gnus is in the process of fetching article 2, the
6733 connection is blocked.
6734
6735 To avoid these situations, gnus will open two (count 'em two)
6736 connections to the server.  Some people may think this isn't a very nice
6737 thing to do, but I don't see any real alternatives.  Setting up that
6738 extra connection takes some time, so gnus startup will be slower.
6739
6740 Gnus will fetch more articles than you will read.  This will mean that
6741 the link between your machine and the @sc{nntp} server will become more
6742 loaded than if you didn't use article pre-fetch.  The server itself will
6743 also become more loaded---both with the extra article requests, and the
6744 extra connection.
6745
6746 Ok, so now you know that you shouldn't really use this thing...  unless
6747 you really want to.
6748
6749 @vindex gnus-asynchronous
6750 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
6751 happen automatically.
6752
6753 @vindex gnus-use-article-prefetch
6754 You can control how many articles are to be pre-fetched by setting
6755 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
6756 that when you read an article in the group, the back end will pre-fetch
6757 the next 30 articles.  If this variable is @code{t}, the back end will
6758 pre-fetch all the articles it can without bound.  If it is
6759 @code{nil}, no pre-fetching will be done.
6760
6761 @vindex gnus-async-prefetch-article-p
6762 @findex gnus-async-read-p
6763 There are probably some articles that you don't want to pre-fetch---read
6764 articles, for instance.  The @code{gnus-async-prefetch-article-p} variable controls whether an article is to be pre-fetched.  This function should
6765 return non-@code{nil} when the article in question is to be
6766 pre-fetched.  The default is @code{gnus-async-read-p}, which returns
6767 @code{nil} on read articles.  The function is called with an article
6768 data structure as the only parameter.
6769
6770 If, for instance, you wish to pre-fetch only unread articles shorter than 100 lines, you could say something like:
6771
6772 @lisp
6773 (defun my-async-short-unread-p (data)
6774   "Return non-nil for short, unread articles."
6775   (and (gnus-data-unread-p data)
6776        (< (mail-header-lines (gnus-data-header data))
6777           100)))
6778
6779 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
6780 @end lisp
6781
6782 These functions will be called many, many times, so they should
6783 preferably be short and sweet to avoid slowing down gnus too much.
6784 It's probably a good idea to byte-compile things like this.
6785
6786 @vindex gnus-prefetched-article-deletion-strategy
6787 Articles have to be removed from the asynch buffer sooner or later.  The
6788 @code{gnus-prefetched-article-deletion-strategy} says when to remove
6789 articles.  This is a list that may contain the following elements:
6790
6791 @table @code
6792 @item read
6793 Remove articles when they are read.
6794
6795 @item exit
6796 Remove articles when exiting the group.
6797 @end table
6798
6799 The default value is @code{(read exit)}.
6800
6801 @c @vindex gnus-use-header-prefetch
6802 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
6803 @c from the next group.
6804
6805
6806 @node Article Caching
6807 @section Article Caching
6808 @cindex article caching
6809 @cindex caching
6810
6811 If you have an @emph{extremely} slow @sc{nntp} connection, you may
6812 consider turning article caching on.  Each article will then be stored
6813 locally under your home directory.  As you may surmise, this could
6814 potentially use @emph{huge} amounts of disk space, as well as eat up all
6815 your inodes so fast it will make your head swim.  In vodka.
6816
6817 Used carefully, though, it could be just an easier way to save articles.
6818
6819 @vindex gnus-use-long-file-name
6820 @vindex gnus-cache-directory
6821 @vindex gnus-use-cache
6822 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
6823 all articles ticked or marked as dormant will then be copied
6824 over to your local cache (@code{gnus-cache-directory}).  Whether this
6825 cache is flat or hierarchical is controlled by the
6826 @code{gnus-use-long-file-name} variable, as usual.
6827
6828 When re-selecting a ticked or dormant article, it will be fetched from the
6829 cache instead of from the server.  As articles in your cache will never
6830 expire, this might serve as a method of saving articles while still
6831 keeping them where they belong.  Just mark all articles you want to save
6832 as dormant, and don't worry.
6833
6834 When an article is marked as read, is it removed from the cache.
6835
6836 @vindex gnus-cache-remove-articles
6837 @vindex gnus-cache-enter-articles
6838 The entering/removal of articles from the cache is controlled by the
6839 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
6840 variables.  Both are lists of symbols.  The first is @code{(ticked
6841 dormant)} by default, meaning that ticked and dormant articles will be
6842 put in the cache.  The latter is @code{(read)} by default, meaning that
6843 articles marked as read are removed from the cache.  Possibly
6844 symbols in these two lists are @code{ticked}, @code{dormant},
6845 @code{unread} and @code{read}.
6846
6847 @findex gnus-jog-cache
6848 So where does the massive article-fetching and storing come into the
6849 picture?  The @code{gnus-jog-cache} command will go through all
6850 subscribed newsgroups, request all unread articles, score them, and
6851 store them in the cache.  You should only ever, ever ever ever, use this
6852 command if 1) your connection to the @sc{nntp} server is really, really,
6853 really slow and 2) you have a really, really, really huge disk.
6854 Seriously.  One way to cut down on the number of articles downloaded is
6855 to score unwanted articles down and have them marked as read.  They will
6856 not then be downloaded by this command.
6857
6858 @vindex gnus-uncacheable-groups
6859 @vindex gnus-cacheable-groups
6860 It is likely that you do not want caching on all groups.  For instance,
6861 if your @code{nnml} mail is located under your home directory, it makes no
6862 sense to cache it somewhere else under your home directory.  Unless you
6863 feel that it's neat to use twice as much space.
6864
6865 To limit the caching, you could set @code{gnus-cacheable-groups} to a
6866 regexp of groups to cache, @samp{^nntp} for instance, or set the
6867 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
6868 Both variables are @code{nil} by default.  If a group matches both
6869 variables, the group is not cached.
6870
6871 @findex gnus-cache-generate-nov-databases
6872 @findex gnus-cache-generate-active
6873 @vindex gnus-cache-active-file
6874 The cache stores information on what articles it contains in its active
6875 file (@code{gnus-cache-active-file}).  If this file (or any other parts
6876 of the cache) becomes all messed up for some reason or other, gnus
6877 offers two functions that will try to set things right.  @kbd{M-x
6878 gnus-cache-generate-nov-databases} will (re)build all the @sc{nov}
6879 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
6880 file.
6881
6882 @findex gnus-cache-move-cache
6883 @code{gnus-cache-move-cache} will move your whole
6884 @code{gnus-cache-directory} to some other location. You get asked to
6885 where, isn't that cool?
6886
6887 @node Persistent Articles
6888 @section Persistent Articles
6889 @cindex persistent articles
6890
6891 Closely related to article caching, we have @dfn{persistent articles}.
6892 In fact, it's just a different way of looking at caching, and much more
6893 useful in my opinion.
6894
6895 Say you're reading a newsgroup, and you happen on to some valuable gem
6896 that you want to keep and treasure forever.  You'd normally just save it
6897 (using one of the many saving commands) in some file.  The problem with
6898 that is that it's just, well, yucky.  Ideally you'd prefer just having
6899 the article remain in the group where you found it forever; untouched by
6900 the expiry going on at the news server.
6901
6902 This is what a @dfn{persistent article} is---an article that just won't
6903 be deleted.  It's implemented using the normal cache functions, but
6904 you use two explicit commands for managing persistent articles:
6905
6906 @table @kbd
6907
6908 @item *
6909 @kindex * (Summary)
6910 @findex gnus-cache-enter-article
6911 Make the current article persistent (@code{gnus-cache-enter-article}).
6912
6913 @item M-*
6914 @kindex M-* (Summary)
6915 @findex gnus-cache-remove-article
6916 Remove the current article from the persistent articles
6917 (@code{gnus-cache-remove-article}).  This will normally delete the
6918 article.
6919 @end table
6920
6921 Both these commands understand the process/prefix convention.
6922
6923 To avoid having all ticked articles (and stuff) entered into the cache,
6924 you should set @code{gnus-use-cache} to @code{passive} if you're just
6925 interested in persistent articles:
6926
6927 @lisp
6928 (setq gnus-use-cache 'passive)
6929 @end lisp
6930
6931
6932 @node Article Backlog
6933 @section Article Backlog
6934 @cindex backlog
6935 @cindex article backlog
6936
6937 If you have a slow connection, but the idea of using caching seems
6938 unappealing to you (and it is, really), you can help the situation some
6939 by switching on the @dfn{backlog}.  This is where gnus will buffer
6940 already read articles so that it doesn't have to re-fetch articles
6941 you've already read.  This only helps if you are in the habit of
6942 re-selecting articles you've recently read, of course.  If you never do
6943 that, turning the backlog on will slow gnus down a little bit, and
6944 increase memory usage some.
6945
6946 @vindex gnus-keep-backlog
6947 If you set @code{gnus-keep-backlog} to a number @var{n}, gnus will store
6948 at most @var{n} old articles in a buffer for later re-fetching.  If this
6949 variable is non-@code{nil} and is not a number, gnus will store
6950 @emph{all} read articles, which means that your Emacs will grow without
6951 bound before exploding and taking your machine down with you.  I put
6952 that in there just to keep y'all on your toes.
6953
6954 This variable is @code{nil} by default.
6955
6956
6957 @node Saving Articles
6958 @section Saving Articles
6959 @cindex saving articles
6960
6961 Gnus can save articles in a number of ways.  Below is the documentation
6962 for saving articles in a fairly straight-forward fashion (i.e., little
6963 processing of the article is done before it is saved).  For a different
6964 approach (uudecoding, unsharing) you should use @code{gnus-uu}
6965 (@pxref{Decoding Articles}).
6966
6967 For the commands listed here, the target is a file.  If you want to
6968 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
6969 command (@pxref{Mail Group Commands}).
6970
6971 @vindex gnus-save-all-headers
6972 If @code{gnus-save-all-headers} is non-@code{nil}, gnus will not delete
6973 unwanted headers before saving the article.
6974
6975 @vindex gnus-saved-headers
6976 If the preceding variable is @code{nil}, all headers that match the
6977 @code{gnus-saved-headers} regexp will be kept, while the rest will be
6978 deleted before saving.
6979
6980 @table @kbd
6981
6982 @item O o
6983 @itemx o
6984 @kindex O o (Summary)
6985 @kindex o (Summary)
6986 @findex gnus-summary-save-article
6987 @c @icon{gnus-summary-save-article}
6988 Save the current article using the default article saver
6989 (@code{gnus-summary-save-article}).
6990
6991 @item O m
6992 @kindex O m (Summary)
6993 @findex gnus-summary-save-article-mail
6994 Save the current article in mail format
6995 (@code{gnus-summary-save-article-mail}).
6996
6997 @item O r
6998 @kindex O r (Summary)
6999 @findex gnus-summary-save-article-rmail
7000 Save the current article in rmail format
7001 (@code{gnus-summary-save-article-rmail}).
7002
7003 @item O f
7004 @kindex O f (Summary)
7005 @findex gnus-summary-save-article-file
7006 @c @icon{gnus-summary-save-article-file}
7007 Save the current article in plain file format
7008 (@code{gnus-summary-save-article-file}).
7009
7010 @item O F
7011 @kindex O F (Summary)
7012 @findex gnus-summary-write-article-file
7013 Write the current article in plain file format, overwriting any previous
7014 file contents (@code{gnus-summary-write-article-file}).
7015
7016 @item O b
7017 @kindex O b (Summary)
7018 @findex gnus-summary-save-article-body-file
7019 Save the current article body in plain file format
7020 (@code{gnus-summary-save-article-body-file}).
7021
7022 @item O h
7023 @kindex O h (Summary)
7024 @findex gnus-summary-save-article-folder
7025 Save the current article in mh folder format
7026 (@code{gnus-summary-save-article-folder}).
7027
7028 @item O v
7029 @kindex O v (Summary)
7030 @findex gnus-summary-save-article-vm
7031 Save the current article in a VM folder
7032 (@code{gnus-summary-save-article-vm}).
7033
7034 @item O p
7035 @itemx |
7036 @kindex O p (Summary)
7037 @kindex | (Summary)
7038 @findex gnus-summary-pipe-output
7039 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7040 the current article to a process (@code{gnus-summary-pipe-output}).
7041
7042 @item O P
7043 @kindex O P (Summary)
7044 @findex gnus-summary-muttprint
7045 @vindex gnus-summary-muttprint-program
7046 Save the current article into muttprint. That is, print it using the
7047 external program Muttprint (see
7048 @uref{http://muttprint.sourceforge.net/}). The program name and
7049 options to use is controlled by the variable
7050 @code{gnus-summary-muttprint-program}. (@code{gnus-summary-muttprint}).
7051
7052 @end table
7053
7054 @vindex gnus-prompt-before-saving
7055 All these commands use the process/prefix convention
7056 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7057 functions, you might get tired of being prompted for files to save each
7058 and every article in.  The prompting action is controlled by
7059 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7060 default, giving you that excessive prompting action you know and
7061 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7062 just once for each series of articles you save.  If you like to really
7063 have Gnus do all your thinking for you, you can even set this variable
7064 to @code{nil}, which means that you will never be prompted for files to
7065 save articles in.  Gnus will simply save all the articles in the default
7066 files.
7067
7068
7069 @vindex gnus-default-article-saver
7070 You can customize the @code{gnus-default-article-saver} variable to make
7071 gnus do what you want it to.  You can use any of the six ready-made
7072 functions below, or you can create your own.
7073
7074 @table @code
7075
7076 @item gnus-summary-save-in-rmail
7077 @findex gnus-summary-save-in-rmail
7078 @vindex gnus-rmail-save-name
7079 @findex gnus-plain-save-name
7080 This is the default format, @dfn{babyl}.  Uses the function in the
7081 @code{gnus-rmail-save-name} variable to get a file name to save the
7082 article in.  The default is @code{gnus-plain-save-name}.
7083
7084 @item gnus-summary-save-in-mail
7085 @findex gnus-summary-save-in-mail
7086 @vindex gnus-mail-save-name
7087 Save in a Unix mail (mbox) file.  Uses the function in the
7088 @code{gnus-mail-save-name} variable to get a file name to save the
7089 article in.  The default is @code{gnus-plain-save-name}.
7090
7091 @item gnus-summary-save-in-file
7092 @findex gnus-summary-save-in-file
7093 @vindex gnus-file-save-name
7094 @findex gnus-numeric-save-name
7095 Append the article straight to an ordinary file.  Uses the function in
7096 the @code{gnus-file-save-name} variable to get a file name to save the
7097 article in.  The default is @code{gnus-numeric-save-name}.
7098
7099 @item gnus-summary-write-to-file
7100 @findex gnus-summary-write-to-file
7101 Write the article straight to an ordinary file.  The file is
7102 overwritten if it exists.  Uses the function in the
7103 @code{gnus-file-save-name} variable to get a file name to save the
7104 article in.  The default is @code{gnus-numeric-save-name}.
7105
7106 @item gnus-summary-save-body-in-file
7107 @findex gnus-summary-save-body-in-file
7108 Append the article body to an ordinary file.  Uses the function in the
7109 @code{gnus-file-save-name} variable to get a file name to save the
7110 article in.  The default is @code{gnus-numeric-save-name}.
7111
7112 @item gnus-summary-save-in-folder
7113 @findex gnus-summary-save-in-folder
7114 @findex gnus-folder-save-name
7115 @findex gnus-Folder-save-name
7116 @vindex gnus-folder-save-name
7117 @cindex rcvstore
7118 @cindex MH folders
7119 Save the article to an MH folder using @code{rcvstore} from the MH
7120 library.  Uses the function in the @code{gnus-folder-save-name} variable
7121 to get a file name to save the article in.  The default is
7122 @code{gnus-folder-save-name}, but you can also use
7123 @code{gnus-Folder-save-name}, which creates capitalized names.
7124
7125 @item gnus-summary-save-in-vm
7126 @findex gnus-summary-save-in-vm
7127 Save the article in a VM folder.  You have to have the VM mail
7128 reader to use this setting.
7129 @end table
7130
7131 @vindex gnus-article-save-directory
7132 All of these functions, except for the last one, will save the article
7133 in the @code{gnus-article-save-directory}, which is initialized from the
7134 @code{SAVEDIR} environment variable.  This is @file{~/News/} by
7135 default.
7136
7137 As you can see above, the functions use different functions to find a
7138 suitable name of a file to save the article in.  Below is a list of
7139 available functions that generate names:
7140
7141 @table @code
7142
7143 @item gnus-Numeric-save-name
7144 @findex gnus-Numeric-save-name
7145 File names like @file{~/News/Alt.andrea-dworkin/45}.
7146
7147 @item gnus-numeric-save-name
7148 @findex gnus-numeric-save-name
7149 File names like @file{~/News/alt.andrea-dworkin/45}.
7150
7151 @item gnus-Plain-save-name
7152 @findex gnus-Plain-save-name
7153 File names like @file{~/News/Alt.andrea-dworkin}.
7154
7155 @item gnus-plain-save-name
7156 @findex gnus-plain-save-name
7157 File names like @file{~/News/alt.andrea-dworkin}.
7158
7159 @item gnus-sender-save-name
7160 @findex gnus-sender-save-name
7161 File names like @file{~/News/larsi}.
7162 @end table
7163
7164 @vindex gnus-split-methods
7165 You can have gnus suggest where to save articles by plonking a regexp into
7166 the @code{gnus-split-methods} alist.  For instance, if you would like to
7167 save articles related to gnus in the file @file{gnus-stuff}, and articles
7168 related to VM in @code{vm-stuff}, you could set this variable to something
7169 like:
7170
7171 @lisp
7172 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7173  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7174  (my-choosing-function "../other-dir/my-stuff")
7175  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7176 @end lisp
7177
7178 We see that this is a list where each element is a list that has two
7179 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7180 a string (in which case it is used as a regexp to match on the article
7181 head); it can be a symbol (which will be called as a function with the
7182 group name as a parameter); or it can be a list (which will be
7183 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7184 the @dfn{file} will be used as a default prompt.  In addition, the
7185 result of the operation itself will be used if the function or form
7186 called returns a string or a list of strings.
7187
7188 You basically end up with a list of file names that might be used when
7189 saving the current article.  (All ``matches'' will be used.)  You will
7190 then be prompted for what you really want to use as a name, with file
7191 name completion over the results from applying this variable.
7192
7193 This variable is @code{((gnus-article-archive-name))} by default, which
7194 means that gnus will look at the articles it saves for an
7195 @code{Archive-name} line and use that as a suggestion for the file
7196 name.
7197
7198 Here's an example function to clean up file names somewhat.  If you have
7199 lots of mail groups called things like
7200 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7201 these group names before creating the file name to save to.  The
7202 following will do just that:
7203
7204 @lisp
7205 (defun my-save-name (group)
7206   (when (string-match "^nnml:mail." group)
7207     (substring group (match-end 0))))
7208
7209 (setq gnus-split-methods
7210       '((gnus-article-archive-name)
7211         (my-save-name)))
7212 @end lisp
7213
7214
7215 @vindex gnus-use-long-file-name
7216 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7217 @code{nil}, all the preceding functions will replace all periods
7218 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7219 the functions will generate hierarchies of directories instead of having
7220 all the files in the top level directory
7221 (@file{~/News/alt/andrea-dworkin} instead of
7222 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7223 on most systems.  However, for historical reasons, this is @code{nil} on
7224 Xenix and usg-unix-v machines by default.
7225
7226 This function also affects kill and score file names.  If this variable
7227 is a list, and the list contains the element @code{not-score}, long file
7228 names will not be used for score files, if it contains the element
7229 @code{not-save}, long file names will not be used for saving, and if it
7230 contains the element @code{not-kill}, long file names will not be used
7231 for kill files.
7232
7233 If you'd like to save articles in a hierarchy that looks something like
7234 a spool, you could
7235
7236 @lisp
7237 (setq gnus-use-long-file-name '(not-save)) ; to get a hierarchy
7238 (setq gnus-default-article-saver
7239       'gnus-summary-save-in-file) ; no encoding
7240 @end lisp
7241
7242 Then just save with @kbd{o}.  You'd then read this hierarchy with
7243 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7244 the top level directory as the argument (@file{~/News/}).  Then just walk
7245 around to the groups/directories with @code{nneething}.
7246
7247
7248 @node Decoding Articles
7249 @section Decoding Articles
7250 @cindex decoding articles
7251
7252 Sometime users post articles (or series of articles) that have been
7253 encoded in some way or other.  Gnus can decode them for you.
7254
7255 @menu
7256 * Uuencoded Articles::          Uudecode articles.
7257 * Shell Archives::              Unshar articles.
7258 * PostScript Files::            Split PostScript.
7259 * Other Files::                 Plain save and binhex.
7260 * Decoding Variables::          Variables for a happy decoding.
7261 * Viewing Files::               You want to look at the result of the decoding?
7262 @end menu
7263
7264 @cindex series
7265 @cindex article series
7266 All these functions use the process/prefix convention
7267 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7268 the extension that a ``single article'' means ``a single series''.  Gnus
7269 can find out by itself what articles belong to a series, decode all the
7270 articles and unpack/view/save the resulting file(s).
7271
7272 Gnus guesses what articles are in the series according to the following
7273 simplish rule: The subjects must be (nearly) identical, except for the
7274 last two numbers of the line.  (Spaces are largely ignored, however.)
7275
7276 For example: If you choose a subject called @samp{cat.gif (2/3)}, gnus
7277 will find all the articles that match the regexp @samp{^cat.gif
7278 ([0-9]+/[0-9]+).*$}.
7279
7280 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7281 series}, will not be properly recognized by any of the automatic viewing
7282 commands, and you have to mark the articles manually with @kbd{#}.
7283
7284
7285 @node Uuencoded Articles
7286 @subsection Uuencoded Articles
7287 @cindex uudecode
7288 @cindex uuencoded articles
7289
7290 @table @kbd
7291
7292 @item X u
7293 @kindex X u (Summary)
7294 @findex gnus-uu-decode-uu
7295 @c @icon{gnus-uu-decode-uu}
7296 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7297
7298 @item X U
7299 @kindex X U (Summary)
7300 @findex gnus-uu-decode-uu-and-save
7301 Uudecodes and saves the current series
7302 (@code{gnus-uu-decode-uu-and-save}).
7303
7304 @item X v u
7305 @kindex X v u (Summary)
7306 @findex gnus-uu-decode-uu-view
7307 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7308
7309 @item X v U
7310 @kindex X v U (Summary)
7311 @findex gnus-uu-decode-uu-and-save-view
7312 Uudecodes, views and saves the current series
7313 (@code{gnus-uu-decode-uu-and-save-view}).
7314
7315 @end table
7316
7317 Remember that these all react to the presence of articles marked with
7318 the process mark.  If, for instance, you'd like to decode and save an
7319 entire newsgroup, you'd typically do @kbd{M P a}
7320 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7321 (@code{gnus-uu-decode-uu-and-save}).
7322
7323 All this is very much different from how @code{gnus-uu} worked with
7324 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7325 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7326 articles in some way (@pxref{Setting Process Marks}) and then press
7327 @kbd{X u}.
7328
7329 @vindex gnus-uu-notify-files
7330 Note: When trying to decode articles that have names matching
7331 @code{gnus-uu-notify-files}, which is hard-coded to
7332 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7333 automatically post an article on @samp{comp.unix.wizards} saying that
7334 you have just viewed the file in question.  This feature can't be turned
7335 off.
7336
7337
7338 @node Shell Archives
7339 @subsection Shell Archives
7340 @cindex unshar
7341 @cindex shell archives
7342 @cindex shared articles
7343
7344 Shell archives (``shar files'') used to be a popular way to distribute
7345 sources, but it isn't used all that much today.  In any case, we have
7346 some commands to deal with these:
7347
7348 @table @kbd
7349
7350 @item X s
7351 @kindex X s (Summary)
7352 @findex gnus-uu-decode-unshar
7353 Unshars the current series (@code{gnus-uu-decode-unshar}).
7354
7355 @item X S
7356 @kindex X S (Summary)
7357 @findex gnus-uu-decode-unshar-and-save
7358 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7359
7360 @item X v s
7361 @kindex X v s (Summary)
7362 @findex gnus-uu-decode-unshar-view
7363 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7364
7365 @item X v S
7366 @kindex X v S (Summary)
7367 @findex gnus-uu-decode-unshar-and-save-view
7368 Unshars, views and saves the current series
7369 (@code{gnus-uu-decode-unshar-and-save-view}).
7370 @end table
7371
7372
7373 @node PostScript Files
7374 @subsection PostScript Files
7375 @cindex PostScript
7376
7377 @table @kbd
7378
7379 @item X p
7380 @kindex X p (Summary)
7381 @findex gnus-uu-decode-postscript
7382 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7383
7384 @item X P
7385 @kindex X P (Summary)
7386 @findex gnus-uu-decode-postscript-and-save
7387 Unpack and save the current PostScript series
7388 (@code{gnus-uu-decode-postscript-and-save}).
7389
7390 @item X v p
7391 @kindex X v p (Summary)
7392 @findex gnus-uu-decode-postscript-view
7393 View the current PostScript series
7394 (@code{gnus-uu-decode-postscript-view}).
7395
7396 @item X v P
7397 @kindex X v P (Summary)
7398 @findex gnus-uu-decode-postscript-and-save-view
7399 View and save the current PostScript series
7400 (@code{gnus-uu-decode-postscript-and-save-view}).
7401 @end table
7402
7403
7404 @node Other Files
7405 @subsection Other Files
7406
7407 @table @kbd
7408 @item X o
7409 @kindex X o (Summary)
7410 @findex gnus-uu-decode-save
7411 Save the current series
7412 (@code{gnus-uu-decode-save}).
7413
7414 @item X b
7415 @kindex X b (Summary)
7416 @findex gnus-uu-decode-binhex
7417 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7418 doesn't really work yet.
7419 @end table
7420
7421
7422 @node Decoding Variables
7423 @subsection Decoding Variables
7424
7425 Adjective, not verb.
7426
7427 @menu
7428 * Rule Variables::              Variables that say how a file is to be viewed.
7429 * Other Decode Variables::      Other decode variables.
7430 * Uuencoding and Posting::      Variables for customizing uuencoding.
7431 @end menu
7432
7433
7434 @node Rule Variables
7435 @subsubsection Rule Variables
7436 @cindex rule variables
7437
7438 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7439 variables are of the form
7440
7441 @lisp
7442       (list '(regexp1 command2)
7443             '(regexp2 command2)
7444             ...)
7445 @end lisp
7446
7447 @table @code
7448
7449 @item gnus-uu-user-view-rules
7450 @vindex gnus-uu-user-view-rules
7451 @cindex sox
7452 This variable is consulted first when viewing files.  If you wish to use,
7453 for instance, @code{sox} to convert an @samp{.au} sound file, you could
7454 say something like:
7455 @lisp
7456 (setq gnus-uu-user-view-rules
7457       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7458 @end lisp
7459
7460 @item gnus-uu-user-view-rules-end
7461 @vindex gnus-uu-user-view-rules-end
7462 This variable is consulted if gnus couldn't make any matches from the
7463 user and default view rules.
7464
7465 @item gnus-uu-user-archive-rules
7466 @vindex gnus-uu-user-archive-rules
7467 This variable can be used to say what commands should be used to unpack
7468 archives.
7469 @end table
7470
7471
7472 @node Other Decode Variables
7473 @subsubsection Other Decode Variables
7474
7475 @table @code
7476 @vindex gnus-uu-grabbed-file-functions
7477
7478 @item gnus-uu-grabbed-file-functions
7479 All functions in this list will be called right after each file has been
7480 successfully decoded---so that you can move or view files right away,
7481 and don't have to wait for all files to be decoded before you can do
7482 anything.  Ready-made functions you can put in this list are:
7483
7484 @table @code
7485
7486 @item gnus-uu-grab-view
7487 @findex gnus-uu-grab-view
7488 View the file.
7489
7490 @item gnus-uu-grab-move
7491 @findex gnus-uu-grab-move
7492 Move the file (if you're using a saving function.)
7493 @end table
7494
7495 @item gnus-uu-be-dangerous
7496 @vindex gnus-uu-be-dangerous
7497 Specifies what to do if unusual situations arise during decoding.  If
7498 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7499 that didn't work, and overwrite existing files.  Otherwise, ask each
7500 time.
7501
7502 @item gnus-uu-ignore-files-by-name
7503 @vindex gnus-uu-ignore-files-by-name
7504 Files with name matching this regular expression won't be viewed.
7505
7506 @item gnus-uu-ignore-files-by-type
7507 @vindex gnus-uu-ignore-files-by-type
7508 Files with a @sc{mime} type matching this variable won't be viewed.
7509 Note that Gnus tries to guess what type the file is based on the name.
7510 @code{gnus-uu} is not a @sc{mime} package (yet), so this is slightly
7511 kludgey.
7512
7513 @item gnus-uu-tmp-dir
7514 @vindex gnus-uu-tmp-dir
7515 Where @code{gnus-uu} does its work.
7516
7517 @item gnus-uu-do-not-unpack-archives
7518 @vindex gnus-uu-do-not-unpack-archives
7519 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7520 looking for files to display.
7521
7522 @item gnus-uu-view-and-save
7523 @vindex gnus-uu-view-and-save
7524 Non-@code{nil} means that the user will always be asked to save a file
7525 after viewing it.
7526
7527 @item gnus-uu-ignore-default-view-rules
7528 @vindex gnus-uu-ignore-default-view-rules
7529 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7530 rules.
7531
7532 @item gnus-uu-ignore-default-archive-rules
7533 @vindex gnus-uu-ignore-default-archive-rules
7534 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7535 unpacking commands.
7536
7537 @item gnus-uu-kill-carriage-return
7538 @vindex gnus-uu-kill-carriage-return
7539 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7540 from articles.
7541
7542 @item gnus-uu-unmark-articles-not-decoded
7543 @vindex gnus-uu-unmark-articles-not-decoded
7544 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7545 decoded articles as unread.
7546
7547 @item gnus-uu-correct-stripped-uucode
7548 @vindex gnus-uu-correct-stripped-uucode
7549 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7550 uuencoded files that have had trailing spaces deleted.
7551
7552 @item gnus-uu-pre-uudecode-hook
7553 @vindex gnus-uu-pre-uudecode-hook
7554 Hook run before sending a message to @code{uudecode}.
7555
7556 @item gnus-uu-view-with-metamail
7557 @vindex gnus-uu-view-with-metamail
7558 @cindex metamail
7559 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7560 commands defined by the rule variables and just fudge a @sc{mime}
7561 content type based on the file name.  The result will be fed to
7562 @code{metamail} for viewing.
7563
7564 @item gnus-uu-save-in-digest
7565 @vindex gnus-uu-save-in-digest
7566 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7567 decoding, will save in digests.  If this variable is @code{nil},
7568 @code{gnus-uu} will just save everything in a file without any
7569 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7570 to specify any meaningful volume and issue numbers were found, so I
7571 simply dropped them.
7572
7573 @end table
7574
7575
7576 @node Uuencoding and Posting
7577 @subsubsection Uuencoding and Posting
7578
7579 @table @code
7580
7581 @item gnus-uu-post-include-before-composing
7582 @vindex gnus-uu-post-include-before-composing
7583 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7584 before you compose the article.  If this variable is @code{t}, you can
7585 either include an encoded file with @kbd{C-c C-i} or have one included
7586 for you when you post the article.
7587
7588 @item gnus-uu-post-length
7589 @vindex gnus-uu-post-length
7590 Maximum length of an article.  The encoded file will be split into how
7591 many articles it takes to post the entire file.
7592
7593 @item gnus-uu-post-threaded
7594 @vindex gnus-uu-post-threaded
7595 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7596 thread.  This may not be smart, as no other decoder I have seen is able
7597 to follow threads when collecting uuencoded articles.  (Well, I have
7598 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7599 think that counts...) Default is @code{nil}.
7600
7601 @item gnus-uu-post-separate-description
7602 @vindex gnus-uu-post-separate-description
7603 Non-@code{nil} means that the description will be posted in a separate
7604 article.  The first article will typically be numbered (0/x).  If this
7605 variable is @code{nil}, the description the user enters will be included
7606 at the beginning of the first article, which will be numbered (1/x).
7607 Default is @code{t}.
7608
7609 @end table
7610
7611
7612 @node Viewing Files
7613 @subsection Viewing Files
7614 @cindex viewing files
7615 @cindex pseudo-articles
7616
7617 After decoding, if the file is some sort of archive, gnus will attempt
7618 to unpack the archive and see if any of the files in the archive can be
7619 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7620 containing the files @file{pic1.jpg} and @file{pic2.gif}, gnus will
7621 uncompress and de-tar the main file, and then view the two pictures.
7622 This unpacking process is recursive, so if the archive contains archives
7623 of archives, it'll all be unpacked.
7624
7625 Finally, gnus will normally insert a @dfn{pseudo-article} for each
7626 extracted file into the summary buffer.  If you go to these
7627 ``articles'', you will be prompted for a command to run (usually Gnus
7628 will make a suggestion), and then the command will be run.
7629
7630 @vindex gnus-view-pseudo-asynchronously
7631 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7632 until the viewing is done before proceeding.
7633
7634 @vindex gnus-view-pseudos
7635 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7636 the pseudo-articles into the summary buffer, but view them
7637 immediately.  If this variable is @code{not-confirm}, the user won't even
7638 be asked for a confirmation before viewing is done.
7639
7640 @vindex gnus-view-pseudos-separately
7641 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7642 pseudo-article will be created for each file to be viewed.  If
7643 @code{nil}, all files that use the same viewing command will be given as
7644 a list of parameters to that command.
7645
7646 @vindex gnus-insert-pseudo-articles
7647 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7648 pseudo-articles when decoding.  It is @code{t} by default.
7649
7650 So; there you are, reading your @emph{pseudo-articles} in your
7651 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7652 Why isn't anything real anymore? How did we get here?
7653
7654
7655 @node Article Treatment
7656 @section Article Treatment
7657
7658 Reading through this huge manual, you may have quite forgotten that the
7659 object of newsreaders is to actually, like, read what people have
7660 written.  Reading articles.  Unfortunately, people are quite bad at
7661 writing, so there are tons of functions and variables to make reading
7662 these articles easier.
7663
7664 @menu
7665 * Article Highlighting::        You want to make the article look like fruit salad.
7666 * Article Fontisizing::         Making emphasized text look nice.
7667 * Article Hiding::              You also want to make certain info go away.
7668 * Article Washing::             Lots of way-neat functions to make life better.
7669 * Article Header::              Doing various header transformations.
7670 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7671 * Article Date::                Grumble, UT!
7672 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7673 * Article Signature::           What is a signature?
7674 * Article Miscellania::         Various other stuff.
7675 @end menu
7676
7677
7678 @node Article Highlighting
7679 @subsection Article Highlighting
7680 @cindex highlighting
7681
7682 Not only do you want your article buffer to look like fruit salad, but
7683 you want it to look like technicolor fruit salad.
7684
7685 @table @kbd
7686
7687 @item W H a
7688 @kindex W H a (Summary)
7689 @findex gnus-article-highlight
7690 @findex gnus-article-maybe-highlight
7691 Do much highlighting of the current article
7692 (@code{gnus-article-highlight}).  This function highlights header, cited
7693 text, the signature, and adds buttons to the body and the head.
7694
7695 @item W H h
7696 @kindex W H h (Summary)
7697 @findex gnus-article-highlight-headers
7698 @vindex gnus-header-face-alist
7699 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7700 highlighting will be done according to the @code{gnus-header-face-alist}
7701 variable, which is a list where each element has the form
7702 @code{(@var{regexp} @var{name} @var{content})}.
7703 @var{regexp} is a regular expression for matching the
7704 header, @var{name} is the face used for highlighting the header name
7705 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7706 the header value.  The first match made will be used.  Note that
7707 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7708
7709 @item W H c
7710 @kindex W H c (Summary)
7711 @findex gnus-article-highlight-citation
7712 Highlight cited text (@code{gnus-article-highlight-citation}).
7713
7714 Some variables to customize the citation highlights:
7715
7716 @table @code
7717 @vindex gnus-cite-parse-max-size
7718
7719 @item gnus-cite-parse-max-size
7720 If the article size if bigger than this variable (which is 25000 by
7721 default), no citation highlighting will be performed.
7722
7723 @item gnus-cite-max-prefix
7724 @vindex gnus-cite-max-prefix
7725 Maximum possible length for a citation prefix (default 20).
7726
7727 @item gnus-cite-face-list
7728 @vindex gnus-cite-face-list
7729 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
7730 When there are citations from multiple articles in the same message,
7731 gnus will try to give each citation from each article its own face.
7732 This should make it easier to see who wrote what.
7733
7734 @item gnus-supercite-regexp
7735 @vindex gnus-supercite-regexp
7736 Regexp matching normal Supercite attribution lines.
7737
7738 @item gnus-supercite-secondary-regexp
7739 @vindex gnus-supercite-secondary-regexp
7740 Regexp matching mangled Supercite attribution lines.
7741
7742 @item gnus-cite-minimum-match-count
7743 @vindex gnus-cite-minimum-match-count
7744 Minimum number of identical prefixes we have to see before we believe
7745 that it's a citation.
7746
7747 @item gnus-cite-attribution-prefix
7748 @vindex gnus-cite-attribution-prefix
7749 Regexp matching the beginning of an attribution line.
7750
7751 @item gnus-cite-attribution-suffix
7752 @vindex gnus-cite-attribution-suffix
7753 Regexp matching the end of an attribution line.
7754
7755 @item gnus-cite-attribution-face
7756 @vindex gnus-cite-attribution-face
7757 Face used for attribution lines.  It is merged with the face for the
7758 cited text belonging to the attribution.
7759
7760 @end table
7761
7762
7763 @item W H s
7764 @kindex W H s (Summary)
7765 @vindex gnus-signature-separator
7766 @vindex gnus-signature-face
7767 @findex gnus-article-highlight-signature
7768 Highlight the signature (@code{gnus-article-highlight-signature}).
7769 Everything after @code{gnus-signature-separator} (@pxref{Article
7770 Signature}) in an article will be considered a signature and will be
7771 highlighted with @code{gnus-signature-face}, which is @code{italic} by
7772 default.
7773
7774 @end table
7775
7776 @xref{Customizing Articles}, for how to highlight articles automatically.
7777
7778
7779 @node Article Fontisizing
7780 @subsection Article Fontisizing
7781 @cindex emphasis
7782 @cindex article emphasis
7783
7784 @findex gnus-article-emphasize
7785 @kindex W e (Summary)
7786 People commonly add emphasis to words in news articles by writing things
7787 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
7788 this look nicer by running the article through the @kbd{W e}
7789 (@code{gnus-article-emphasize}) command.
7790
7791 @vindex gnus-emphasis-alist
7792 How the emphasis is computed is controlled by the
7793 @code{gnus-emphasis-alist} variable.  This is an alist where the first
7794 element is a regular expression to be matched.  The second is a number
7795 that says what regular expression grouping is used to find the entire
7796 emphasized word.  The third is a number that says what regexp grouping
7797 should be displayed and highlighted.  (The text between these two
7798 groupings will be hidden.)  The fourth is the face used for
7799 highlighting.
7800
7801 @lisp
7802 (setq gnus-emphasis-alist
7803       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
7804         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
7805 @end lisp
7806
7807 @cindex slash
7808 @cindex asterisk
7809 @cindex underline
7810 @cindex /
7811 @cindex *
7812
7813 @vindex gnus-emphasis-underline
7814 @vindex gnus-emphasis-bold
7815 @vindex gnus-emphasis-italic
7816 @vindex gnus-emphasis-underline-bold
7817 @vindex gnus-emphasis-underline-italic
7818 @vindex gnus-emphasis-bold-italic
7819 @vindex gnus-emphasis-underline-bold-italic
7820 By default, there are seven rules, and they use the following faces:
7821 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
7822 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
7823 @code{gnus-emphasis-underline-italic},
7824 @code{gnus-emphasis-underline-bold}, and
7825 @code{gnus-emphasis-underline-bold-italic}.
7826
7827 If you want to change these faces, you can either use @kbd{M-x
7828 customize}, or you can use @code{copy-face}.  For instance, if you want
7829 to make @code{gnus-emphasis-italic} use a red face instead, you could
7830 say something like:
7831
7832 @lisp
7833 (copy-face 'red 'gnus-emphasis-italic)
7834 @end lisp
7835
7836 @vindex gnus-group-highlight-words-alist
7837
7838 If you want to highlight arbitrary words, you can use the
7839 @code{gnus-group-highlight-words-alist} variable, which uses the same
7840 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
7841 parameter (@pxref{Group Parameters}) can also be used.
7842
7843 @xref{Customizing Articles}, for how to fontize articles automatically.
7844
7845
7846 @node Article Hiding
7847 @subsection Article Hiding
7848 @cindex article hiding
7849
7850 Or rather, hiding certain things in each article.  There usually is much
7851 too much cruft in most articles.
7852
7853 @table @kbd
7854
7855 @item W W a
7856 @kindex W W a (Summary)
7857 @findex gnus-article-hide
7858 Do quite a lot of hiding on the article buffer
7859 (@kbd{gnus-article-hide}).  In particular, this function will hide
7860 headers, PGP, cited text and the signature.
7861
7862 @item W W h
7863 @kindex W W h (Summary)
7864 @findex gnus-article-toggle-headers
7865 Toggle hiding of headers (@code{gnus-article-toggle-headers}).  @xref{Hiding
7866 Headers}.
7867
7868 @item W W b
7869 @kindex W W b (Summary)
7870 @findex gnus-article-hide-boring-headers
7871 Hide headers that aren't particularly interesting
7872 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
7873
7874 @item W W s
7875 @kindex W W s (Summary)
7876 @findex gnus-article-hide-signature
7877 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
7878 Signature}.
7879
7880 @item W W l
7881 @kindex W W l (Summary)
7882 @findex gnus-article-hide-list-identifiers
7883 @vindex gnus-list-identifiers
7884 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
7885 are strings some mailing list servers add to the beginning of all
7886 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
7887 @samp{Re: } is skipped before stripping. @code{gnus-list-identifiers}
7888 may not contain @code{\\(..\\)}.
7889
7890 @table @code
7891
7892 @item gnus-list-identifiers
7893 @vindex gnus-list-identifiers
7894 A regular expression that matches list identifiers to be removed from
7895 subject.  This can also be a list of regular expressions.
7896
7897 @end table
7898
7899 @item W W p
7900 @kindex W W p (Summary)
7901 @findex gnus-article-hide-pgp
7902 @vindex gnus-article-hide-pgp-hook
7903 Hide @sc{pgp} signatures (@code{gnus-article-hide-pgp}).  The
7904 @code{gnus-article-hide-pgp-hook} hook will be run after a @sc{pgp}
7905 signature has been hidden.  For example, to automatically verify
7906 articles that have signatures in them do:
7907 @lisp
7908 ;;; Hide pgp cruft if any.
7909
7910 (setq gnus-treat-strip-pgp t)
7911
7912 ;;; After hiding pgp, verify the message;
7913 ;;; only happens if pgp signature is found.
7914
7915 (add-hook 'gnus-article-hide-pgp-hook
7916           (lambda ()
7917             (save-excursion
7918               (set-buffer gnus-original-article-buffer)
7919               (mc-verify))))
7920 @end lisp
7921
7922 @item W W P
7923 @kindex W W P (Summary)
7924 @findex gnus-article-hide-pem
7925 Hide @sc{pem} (privacy enhanced messages) cruft
7926 (@code{gnus-article-hide-pem}).
7927
7928 @item W W B
7929 @kindex W W B (Summary)
7930 @findex gnus-article-strip-banner
7931 @cindex banner
7932 @cindex OneList
7933 @cindex stripping advertisements
7934 @cindex advertisements
7935 Strip the banner specified by the @code{banner} group parameter
7936 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
7937 annoying banners and/or signatures that some mailing lists and moderated
7938 groups adds to all the messages.  The way to use this function is to add
7939 the @code{banner} group parameter (@pxref{Group Parameters}) to the
7940 group you want banners stripped from.  The parameter either be a string,
7941 which will be interpreted as a regular expression matching text to be
7942 removed, or the symbol @code{signature}, meaning that the (last)
7943 signature should be removed, or other symbol, meaning that the
7944 corresponding regular expression in @code{gnus-article-banner-alist} is
7945 used.
7946
7947 @item W W c
7948 @kindex W W c (Summary)
7949 @findex gnus-article-hide-citation
7950 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
7951 customizing the hiding:
7952
7953 @table @code
7954
7955 @item gnus-cited-opened-text-button-line-format
7956 @itemx gnus-cited-closed-text-button-line-format
7957 @vindex gnus-cited-closed-text-button-line-format
7958 @vindex gnus-cited-opened-text-button-line-format
7959 Gnus adds buttons to show where the cited text has been hidden, and to
7960 allow toggle hiding the text.  The format of the variable is specified
7961 by these format-like variable (@pxref{Formatting Variables}).  These
7962 specs are valid:
7963
7964 @table @samp
7965 @item b
7966 Starting point of the hidden text.
7967 @item e
7968 Ending point of the hidden text.
7969 @item l
7970 Number of characters in the hidden region.
7971 @item n
7972 Number of lines of hidden text.
7973 @end table
7974
7975 @item gnus-cited-lines-visible
7976 @vindex gnus-cited-lines-visible
7977 The number of lines at the beginning of the cited text to leave
7978 shown. This can also be a cons cell with the number of lines at the top
7979 and bottom of the text, respectively, to remain visible.
7980
7981 @end table
7982
7983 @item W W C-c
7984 @kindex W W C-c (Summary)
7985 @findex gnus-article-hide-citation-maybe
7986
7987 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
7988 following two variables:
7989
7990 @table @code
7991 @item gnus-cite-hide-percentage
7992 @vindex gnus-cite-hide-percentage
7993 If the cited text is of a bigger percentage than this variable (default
7994 50), hide the cited text.
7995
7996 @item gnus-cite-hide-absolute
7997 @vindex gnus-cite-hide-absolute
7998 The cited text must have at least this length (default 10) before it
7999 is hidden.
8000 @end table
8001
8002 @item W W C
8003 @kindex W W C (Summary)
8004 @findex gnus-article-hide-citation-in-followups
8005 Hide cited text in articles that aren't roots
8006 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8007 useful as an interactive command, but might be a handy function to stick
8008 have happen automatically (@pxref{Customizing Articles}).
8009
8010 @end table
8011
8012 All these ``hiding'' commands are toggles, but if you give a negative
8013 prefix to these commands, they will show what they have previously
8014 hidden.  If you give a positive prefix, they will always hide.
8015
8016 Also @pxref{Article Highlighting} for further variables for
8017 citation customization.
8018
8019 @xref{Customizing Articles}, for how to hide article elements
8020 automatically.
8021
8022
8023 @node Article Washing
8024 @subsection Article Washing
8025 @cindex washing
8026 @cindex article washing
8027
8028 We call this ``article washing'' for a really good reason.  Namely, the
8029 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8030
8031 @dfn{Washing} is defined by us as ``changing something from something to
8032 something else'', but normally results in something looking better.
8033 Cleaner, perhaps.
8034
8035 @xref{Customizing Articles}, if you want to change how Gnus displays
8036 articles by default.
8037
8038 @table @kbd
8039
8040 @item C-u g
8041 This is not really washing, it's sort of the opposite of washing.  If
8042 you type this, you see the article exactly as it exists on disk or on
8043 the server.
8044
8045 @item W l
8046 @kindex W l (Summary)
8047 @findex gnus-summary-stop-page-breaking
8048 Remove page breaks from the current article
8049 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8050 delimiters.
8051
8052 @item W r
8053 @kindex W r (Summary)
8054 @findex gnus-summary-caesar-message
8055 @c @icon{gnus-summary-caesar-message}
8056 Do a Caesar rotate (rot13) on the article buffer
8057 (@code{gnus-summary-caesar-message}).
8058 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8059 (Typically offensive jokes and such.)
8060
8061 It's commonly called ``rot13'' because each letter is rotated 13
8062 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8063 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8064 is rumored to have employed this form of, uh, somewhat weak encryption.
8065
8066 @item W t
8067 @item t
8068 @kindex W t (Summary)
8069 @kindex t (Summary)
8070 @findex gnus-article-toggle-headers
8071 Toggle whether to display all headers in the article buffer
8072 (@code{gnus-article-toggle-headers}).
8073
8074 @item W v
8075 @kindex W v (Summary)
8076 @findex gnus-summary-verbose-headers
8077 Toggle whether to display all headers in the article buffer permanently
8078 (@code{gnus-summary-verbose-headers}).
8079
8080 @item W m
8081 @kindex W m (Summary)
8082 @findex gnus-summary-toggle-mime
8083 Toggle whether to run the article through @sc{mime} before displaying
8084 (@code{gnus-summary-toggle-mime}).
8085
8086 @item W o
8087 @kindex W o (Summary)
8088 @findex gnus-article-treat-overstrike
8089 Treat overstrike (@code{gnus-article-treat-overstrike}).
8090
8091 @item W d
8092 @kindex W d (Summary)
8093 @findex gnus-article-treat-dumbquotes
8094 @vindex gnus-article-dumbquotes-map
8095 @cindex Smartquotes
8096 @cindex M****s*** sm*rtq**t*s
8097 @cindex Latin 1
8098 Treat M****s*** sm*rtq**t*s according to
8099 @code{gnus-article-dumbquotes-map}
8100 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8101 whether a character is a sm*rtq**t* or not, so it should only be used
8102 interactively.
8103
8104 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8105 an attempt to provide more quoting characters.  If you see something
8106 like @code{\222} or @code{\264} where you're expecting some kind of
8107 apostrophe or quotation mark, then try this wash.
8108
8109 @item W k
8110 @kindex W k (Summary)
8111 @findex gnus-article-outlook-deuglify-article
8112 @cindex Outlook Express
8113 Deuglify broken Outlook (Express) articles and redisplay
8114 (@code{gnus-article-outlook-deuglify-article}).
8115
8116 @item W w
8117 @kindex W w (Summary)
8118 @findex gnus-article-fill-cited-article
8119 Do word wrap (@code{gnus-article-fill-cited-article}).
8120
8121 You can give the command a numerical prefix to specify the width to use
8122 when filling.
8123
8124 @item W Q
8125 @kindex W Q (Summary)
8126 @findex gnus-article-fill-long-lines
8127 Fill long lines (@code{gnus-article-fill-long-lines}).
8128
8129 @item W C
8130 @kindex W C (Summary)
8131 @findex gnus-article-capitalize-sentences
8132 Capitalize the first word in each sentence
8133 (@code{gnus-article-capitalize-sentences}).
8134
8135 @item W c
8136 @kindex W c (Summary)
8137 @findex gnus-article-remove-cr
8138 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8139 (this takes care of DOS line endings), and then translate any remaining
8140 CRs into LF (this takes care of Mac line endings)
8141 (@code{gnus-article-remove-cr}).
8142
8143 @item W 6
8144 @kindex W 6 (Summary)
8145 @findex gnus-article-de-base64-unreadable
8146 Treat base64 (@code{gnus-article-de-base64-unreadable}).
8147 Base64 is one common @sc{mime} encoding employed when sending non-ASCII
8148 (i. e., 8-bit) articles.  Note that this is usually done
8149 automatically by Gnus if the message in question has a
8150 @code{Content-Transfer-Encoding} header that says that this encoding has
8151 been done.
8152 If a prefix is given, a charset will be asked for.
8153
8154 @item W Z
8155 @kindex W Z (Summary)
8156 @findex gnus-article-decode-HZ
8157 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8158 common encoding employed when sending Chinese articles.  It typically
8159 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8160
8161 @item W u
8162 @kindex W u (Summary)
8163 @findex gnus-article-unsplit-urls
8164 Remove newlines from within URLs.  Some mailers insert newlines into
8165 outgoing email messages to keep lines short.  This reformatting can
8166 split long URLs onto multiple lines.  Repair those URLs by removing
8167 the newlines (@code{gnus-article-unsplit-urls}).
8168
8169 @item W h
8170 @kindex W h (Summary)
8171 @findex gnus-article-wash-html
8172 Treat @sc{html} (@code{gnus-article-wash-html}).  Note that this is
8173 usually done automatically by Gnus if the message in question has a
8174 @code{Content-Type} header that says that the message is @sc{html}.
8175
8176 If a prefix is given, a charset will be asked for.
8177
8178 @vindex gnus-article-wash-function
8179 The default is to use the function specified by
8180 @code{mm-inline-text-html-renderer} (@pxref{Customization, , , emacs-mime}) 
8181 to convert the @sc{html}, but this is controlled by the
8182 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8183 can use include:
8184
8185 @table @code
8186 @item w3
8187 Use Emacs/w3.
8188
8189 @item w3m
8190 Use emacs-w3m (see @uref{http://emacs-w3m.namazu.org/} for more
8191 information).
8192
8193 @item links
8194 Use Links (see @uref{http://artax.karlin.mff.cuni.cz/~mikulas/links/}).
8195
8196 @item lynx
8197 Use Lynx (see @uref{http://lynx.browser.org/}).
8198
8199 @item html2text
8200 Use html2text -- a simple @sc{html} converter included with Gnus.
8201
8202 @end table
8203
8204 @item W b
8205 @kindex W b (Summary)
8206 @findex gnus-article-add-buttons
8207 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8208 @xref{Article Buttons}.
8209
8210 @item W B
8211 @kindex W B (Summary)
8212 @findex gnus-article-add-buttons-to-head
8213 Add clickable buttons to the article headers
8214 (@code{gnus-article-add-buttons-to-head}).
8215
8216 @item W p
8217 @kindex W p (Summary)
8218 @findex gnus-article-verify-x-pgp-sig
8219 Verify a signed control message (@code{gnus-article-verify-x-pgp-sig}).
8220 Control messages such as @code{newgroup} and @code{checkgroups} are
8221 usually signed by the hierarchy maintainer.  You need to add the PGP
8222 public key of the maintainer to your keyring to verify the
8223 message.@footnote{PGP keys for many hierarchies are available at
8224 @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8225
8226 @item W s
8227 @kindex W s (Summary)
8228 @findex gnus-summary-force-verify-and-decrypt
8229 Verify a signed (PGP, @sc{pgp/mime} or @sc{s/mime}) message
8230 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8231
8232 @item W a
8233 @kindex W a (Summary)
8234 @findex gnus-article-strip-headers-in-body
8235 Strip headers like the @code{X-No-Archive} header from the beginning of
8236 article bodies (@code{gnus-article-strip-headers-in-body}).
8237
8238 @item W E l
8239 @kindex W E l (Summary)
8240 @findex gnus-article-strip-leading-blank-lines
8241 Remove all blank lines from the beginning of the article
8242 (@code{gnus-article-strip-leading-blank-lines}).
8243
8244 @item W E m
8245 @kindex W E m (Summary)
8246 @findex gnus-article-strip-multiple-blank-lines
8247 Replace all blank lines with empty lines and then all multiple empty
8248 lines with a single empty line.
8249 (@code{gnus-article-strip-multiple-blank-lines}).
8250
8251 @item W E t
8252 @kindex W E t (Summary)
8253 @findex gnus-article-remove-trailing-blank-lines
8254 Remove all blank lines at the end of the article
8255 (@code{gnus-article-remove-trailing-blank-lines}).
8256
8257 @item W E a
8258 @kindex W E a (Summary)
8259 @findex gnus-article-strip-blank-lines
8260 Do all the three commands above
8261 (@code{gnus-article-strip-blank-lines}).
8262
8263 @item W E A
8264 @kindex W E A (Summary)
8265 @findex gnus-article-strip-all-blank-lines
8266 Remove all blank lines
8267 (@code{gnus-article-strip-all-blank-lines}).
8268
8269 @item W E s
8270 @kindex W E s (Summary)
8271 @findex gnus-article-strip-leading-space
8272 Remove all white space from the beginning of all lines of the article
8273 body (@code{gnus-article-strip-leading-space}).
8274
8275 @item W E e
8276 @kindex W E e (Summary)
8277 @findex gnus-article-strip-trailing-space
8278 Remove all white space from the end of all lines of the article
8279 body (@code{gnus-article-strip-trailing-space}).
8280
8281 @end table
8282
8283 @xref{Customizing Articles}, for how to wash articles automatically.
8284
8285
8286 @node Article Header
8287 @subsection Article Header
8288
8289 These commands perform various transformations of article header.
8290
8291 @table @kbd
8292
8293 @item W G u
8294 @kindex W G u (Summary)
8295 @findex gnus-article-treat-unfold-headers
8296 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8297
8298 @item W G n
8299 @kindex W G n (Summary)
8300 @findex gnus-article-treat-fold-newsgroups
8301 Fold the @code{Newsgroups} and @code{Followup-To} headers
8302 (@code{gnus-article-treat-fold-newsgroups}).
8303
8304 @item W G f
8305 @kindex W G f (Summary)
8306 @findex gnus-article-treat-fold-header
8307 Fold all the message headers
8308 (@code{gnus-article-treat-fold-headers}).
8309
8310 @item W E w
8311 @kindex W E w
8312 @findex gnus-article-remove-leading-whitespace
8313 Remove excessive whitespace from all headers
8314 (@code{gnus-article-remove-leading-whitespace}).
8315
8316 @end table
8317
8318
8319 @node Article Buttons
8320 @subsection Article Buttons
8321 @cindex buttons
8322
8323 People often include references to other stuff in articles, and it would
8324 be nice if Gnus could just fetch whatever it is that people talk about
8325 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8326 button on these references.
8327
8328 Gnus adds @dfn{buttons} to certain standard references by default:
8329 Well-formed URLs, mail addresses and Message-IDs.  This is controlled by
8330 two variables, one that handles article bodies and one that handles
8331 article heads:
8332
8333 @table @code
8334
8335 @item gnus-button-alist
8336 @vindex gnus-button-alist
8337 This is an alist where each entry has this form:
8338
8339 @lisp
8340 (REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
8341 @end lisp
8342
8343 @table @var
8344
8345 @item regexp
8346 All text that match this regular expression will be considered an
8347 external reference.  Here's a typical regexp that matches embedded URLs:
8348 @samp{<URL:\\([^\n\r>]*\\)>}.
8349
8350 @item button-par
8351 Gnus has to know which parts of the matches is to be highlighted.  This
8352 is a number that says what sub-expression of the regexp is to be
8353 highlighted.  If you want it all highlighted, you use 0 here.
8354
8355 @item use-p
8356 This form will be @code{eval}ed, and if the result is non-@code{nil},
8357 this is considered a match.  This is useful if you want extra sifting to
8358 avoid false matches.
8359
8360 @item function
8361 This function will be called when you click on this button.
8362
8363 @item data-par
8364 As with @var{button-par}, this is a sub-expression number, but this one
8365 says which part of the match is to be sent as data to @var{function}.
8366
8367 @end table
8368
8369 So the full entry for buttonizing URLs is then
8370
8371 @lisp
8372 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8373 @end lisp
8374
8375 @item gnus-header-button-alist
8376 @vindex gnus-header-button-alist
8377 This is just like the other alist, except that it is applied to the
8378 article head only, and that each entry has an additional element that is
8379 used to say what headers to apply the buttonize coding to:
8380
8381 @lisp
8382 (HEADER REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
8383 @end lisp
8384
8385 @var{header} is a regular expression.
8386
8387 @item gnus-button-url-regexp
8388 @vindex gnus-button-url-regexp
8389 A regular expression that matches embedded URLs.  It is used in the
8390 default values of the variables above.
8391
8392 @item gnus-article-button-face
8393 @vindex gnus-article-button-face
8394 Face used on buttons.
8395
8396 @item gnus-article-mouse-face
8397 @vindex gnus-article-mouse-face
8398 Face used when the mouse cursor is over a button.
8399
8400 @end table
8401
8402 @xref{Customizing Articles}, for how to buttonize articles automatically.
8403
8404
8405 @node Article Date
8406 @subsection Article Date
8407
8408 The date is most likely generated in some obscure timezone you've never
8409 heard of, so it's quite nice to be able to find out what the time was
8410 when the article was sent.
8411
8412 @table @kbd
8413
8414 @item W T u
8415 @kindex W T u (Summary)
8416 @findex gnus-article-date-ut
8417 Display the date in UT (aka. GMT, aka ZULU)
8418 (@code{gnus-article-date-ut}).
8419
8420 @item W T i
8421 @kindex W T i (Summary)
8422 @findex gnus-article-date-iso8601
8423 @cindex ISO 8601
8424 Display the date in international format, aka. ISO 8601
8425 (@code{gnus-article-date-iso8601}).
8426
8427 @item W T l
8428 @kindex W T l (Summary)
8429 @findex gnus-article-date-local
8430 Display the date in the local timezone (@code{gnus-article-date-local}).
8431
8432 @item W T p
8433 @kindex W T p (Summary)
8434 @findex gnus-article-date-english
8435 Display the date in a format that's easily pronounceable in English
8436 (@code{gnus-article-date-english}).
8437
8438 @item W T s
8439 @kindex W T s (Summary)
8440 @vindex gnus-article-time-format
8441 @findex gnus-article-date-user
8442 @findex format-time-string
8443 Display the date using a user-defined format
8444 (@code{gnus-article-date-user}).  The format is specified by the
8445 @code{gnus-article-time-format} variable, and is a string that's passed
8446 to @code{format-time-string}.  See the documentation of that variable
8447 for a list of possible format specs.
8448
8449 @item W T e
8450 @kindex W T e (Summary)
8451 @findex gnus-article-date-lapsed
8452 @findex gnus-start-date-timer
8453 @findex gnus-stop-date-timer
8454 Say how much time has elapsed between the article was posted and now
8455 (@code{gnus-article-date-lapsed}).  It looks something like:
8456
8457 @example
8458 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8459 @end example
8460
8461 The value of @code{gnus-article-date-lapsed-new-header} determines
8462 whether this header will just be added below the old Date one, or will
8463 replace it.
8464
8465 An advantage of using Gnus to read mail is that it converts simple bugs
8466 into wonderful absurdities.
8467
8468 If you want to have this line updated continually, you can put
8469
8470 @lisp
8471 (gnus-start-date-timer)
8472 @end lisp
8473
8474 in your @file{.gnus.el} file, or you can run it off of some hook.  If
8475 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8476 command.
8477
8478 @item W T o
8479 @kindex W T o (Summary)
8480 @findex gnus-article-date-original
8481 Display the original date (@code{gnus-article-date-original}).  This can
8482 be useful if you normally use some other conversion function and are
8483 worried that it might be doing something totally wrong.  Say, claiming
8484 that the article was posted in 1854.  Although something like that is
8485 @emph{totally} impossible.  Don't you trust me? *titter*
8486
8487 @end table
8488
8489 @xref{Customizing Articles}, for how to display the date in your
8490 preferred format automatically.
8491
8492
8493 @node Article Display
8494 @subsection Article Display
8495 @cindex picons
8496 @cindex x-face
8497 @cindex smileys
8498
8499 These commands add various frivolous display gimmics to the article
8500 buffer in Emacs versions that support them.
8501
8502 @code{X-Face} headers are small black-and-white images supplied by the
8503 message headers (@pxref{X-Face}).
8504
8505 Picons, on the other hand, reside on your own system, and Gnus will
8506 try to match the headers to what you have (@pxref{Picons}).
8507
8508 Smileys are those little @samp{:-)} symbols that people like to litter
8509 their messages with (@pxref{Smileys}).
8510
8511 All these functions are toggles--if the elements already exist,
8512 they'll be removed.
8513
8514 @table @kbd
8515 @item W D x
8516 @kindex W D x (Summary)
8517 @findex gnus-article-display-x-face
8518 Display an @code{X-Face} in the @code{From} header.
8519 (@code{gnus-article-display-x-face}).
8520
8521 @item W D s
8522 @kindex W D s (Summary)
8523 @findex gnus-treat-smiley
8524 Display smileys (@code{gnus-treat-smiley}).
8525
8526 @item W D f
8527 @kindex W D f (Summary)
8528 @findex gnus-treat-from-picon
8529 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
8530
8531 @item W D m
8532 @kindex W D m (Summary)
8533 @findex gnus-treat-mail-picon
8534 Piconify all mail headers (i. e., @code{Cc}, @code{To})
8535 (@code{gnus-treat-mail-picon}).
8536
8537 @item W D n
8538 @kindex W D n (Summary)
8539 @findex gnus-treat-newsgroups-picon
8540 Piconify all news headers (i. e., @code{Newsgroups} and
8541 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
8542
8543 @item W D D
8544 @kindex W D D (Summary)
8545 @findex gnus-article-remove-images
8546 Remove all images from the article buffer
8547 (@code{gnus-article-remove-images}).
8548
8549 @end table
8550
8551
8552
8553 @node Article Signature
8554 @subsection Article Signature
8555 @cindex signatures
8556 @cindex article signature
8557
8558 @vindex gnus-signature-separator
8559 Each article is divided into two parts---the head and the body.  The
8560 body can be divided into a signature part and a text part.  The variable
8561 that says what is to be considered a signature is
8562 @code{gnus-signature-separator}.  This is normally the standard
8563 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
8564 non-standard signature separators, so this variable can also be a list
8565 of regular expressions to be tested, one by one.  (Searches are done
8566 from the end of the body towards the beginning.)  One likely value is:
8567
8568 @lisp
8569 (setq gnus-signature-separator
8570       '("^-- $"         ; The standard
8571         "^-- *$"        ; A common mangling
8572         "^-------*$"    ; Many people just use a looong
8573                         ; line of dashes.  Shame!
8574         "^ *--------*$" ; Double-shame!
8575         "^________*$"   ; Underscores are also popular
8576         "^========*$")) ; Pervert!
8577 @end lisp
8578
8579 The more permissive you are, the more likely it is that you'll get false
8580 positives.
8581
8582 @vindex gnus-signature-limit
8583 @code{gnus-signature-limit} provides a limit to what is considered a
8584 signature when displaying articles.
8585
8586 @enumerate
8587 @item
8588 If it is an integer, no signature may be longer (in characters) than
8589 that integer.
8590 @item
8591 If it is a floating point number, no signature may be longer (in lines)
8592 than that number.
8593 @item
8594 If it is a function, the function will be called without any parameters,
8595 and if it returns @code{nil}, there is no signature in the buffer.
8596 @item
8597 If it is a string, it will be used as a regexp.  If it matches, the text
8598 in question is not a signature.
8599 @end enumerate
8600
8601 This variable can also be a list where the elements may be of the types
8602 listed above.  Here's an example:
8603
8604 @lisp
8605 (setq gnus-signature-limit
8606       '(200.0 "^---*Forwarded article"))
8607 @end lisp
8608
8609 This means that if there are more than 200 lines after the signature
8610 separator, or the text after the signature separator is matched by
8611 the regular expression @samp{^---*Forwarded article}, then it isn't a
8612 signature after all.
8613
8614
8615 @node Article Miscellania
8616 @subsection Article Miscellania
8617
8618 @table @kbd
8619 @item A t
8620 @kindex A t (Summary)
8621 @findex gnus-article-babel
8622 Translate the article from one language to another
8623 (@code{gnus-article-babel}).
8624
8625 @end table
8626
8627
8628 @node MIME Commands
8629 @section MIME Commands
8630 @cindex MIME decoding
8631 @cindex attachments
8632 @cindex viewing attachments
8633
8634 The following commands all understand the numerical prefix.  For
8635 instance, @kbd{3 b} means ``view the third @sc{mime} part''.
8636
8637 @table @kbd
8638 @item b
8639 @itemx K v
8640 @kindex b (Summary)
8641 @kindex K v (Summary)
8642 View the @sc{mime} part.
8643
8644 @item K o
8645 @kindex K o (Summary)
8646 Save the @sc{mime} part.
8647
8648 @item K c
8649 @kindex K c (Summary)
8650 Copy the @sc{mime} part.
8651
8652 @item K e
8653 @kindex K e (Summary)
8654 View the @sc{mime} part externally.
8655
8656 @item K i
8657 @kindex K i (Summary)
8658 View the @sc{mime} part internally.
8659
8660 @item K |
8661 @kindex K | (Summary)
8662 Pipe the @sc{mime} part to an external command.
8663 @end table
8664
8665 The rest of these @sc{mime} commands do not use the numerical prefix in
8666 the same manner:
8667
8668 @table @kbd
8669 @item K b
8670 @kindex K b (Summary)
8671 Make all the @sc{mime} parts have buttons in front of them.  This is
8672 mostly useful if you wish to save (or perform other actions) on inlined
8673 parts.
8674
8675 @item K m
8676 @kindex K m (Summary)
8677 @findex gnus-summary-repair-multipart
8678 Some multipart messages are transmitted with missing or faulty headers.
8679 This command will attempt to ``repair'' these messages so that they can
8680 be viewed in a more pleasant manner
8681 (@code{gnus-summary-repair-multipart}).
8682
8683 @item X m
8684 @kindex X m (Summary)
8685 @findex gnus-summary-save-parts
8686 Save all parts matching a @sc{mime} type to a directory
8687 (@code{gnus-summary-save-parts}).  Understands the process/prefix
8688 convention (@pxref{Process/Prefix}).
8689
8690 @item M-t
8691 @kindex M-t (Summary)
8692 @findex gnus-summary-display-buttonized
8693 Toggle the buttonized display of the article buffer
8694 (@code{gnus-summary-toggle-display-buttonized}).
8695
8696 @item W M w
8697 @kindex W M w (Summary)
8698 Decode RFC 2047-encoded words in the article headers
8699 (@code{gnus-article-decode-mime-words}).
8700
8701 @item W M c
8702 @kindex W M c (Summary)
8703 Decode encoded article bodies as well as charsets
8704 (@code{gnus-article-decode-charset}).
8705
8706 This command looks in the @code{Content-Type} header to determine the
8707 charset.  If there is no such header in the article, you can give it a
8708 prefix, which will prompt for the charset to decode as.  In regional
8709 groups where people post using some common encoding (but do not
8710 include @sc{mime} headers), you can set the @code{charset} group/topic
8711 parameter to the required charset (@pxref{Group Parameters}).
8712
8713 @item W M v
8714 @kindex W M v (Summary)
8715 View all the @sc{mime} parts in the current article
8716 (@code{gnus-mime-view-all-parts}).
8717
8718 @end table
8719
8720 Relevant variables:
8721
8722 @table @code
8723 @item gnus-ignored-mime-types
8724 @vindex gnus-ignored-mime-types
8725 This is a list of regexps.  @sc{mime} types that match a regexp from
8726 this list will be completely ignored by Gnus.  The default value is
8727 @code{nil}.
8728
8729 To have all Vcards be ignored, you'd say something like this:
8730
8731 @lisp
8732 (setq gnus-ignored-mime-types
8733       '("text/x-vcard"))
8734 @end lisp
8735
8736 @item gnus-unbuttonized-mime-types
8737 @vindex gnus-unbuttonized-mime-types
8738 This is a list of regexps.  @sc{mime} types that match a regexp from
8739 this list won't have @sc{mime} buttons inserted unless they aren't
8740 displayed or this variable is overriden by
8741 @code{gnus-buttonized-mime-types}.  The default value is
8742 @code{(".*/.*")}.
8743
8744 @item gnus-buttonized-mime-types
8745 @vindex gnus-buttonized-mime-types
8746 This is a list of regexps.  @sc{mime} types that match a regexp from
8747 this list will have @sc{mime} buttons inserted unless they aren't
8748 displayed.  This variable overrides
8749 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
8750
8751 To see e.g. security buttons but no other buttons, you could set this
8752 variable to @code{("multipart/signed")} and leave
8753 @code{gnus-unbuttonized-mime-types} to the default value.
8754
8755 @item gnus-article-mime-part-function
8756 @vindex gnus-article-mime-part-function
8757 For each @sc{mime} part, this function will be called with the @sc{mime}
8758 handle as the parameter.  The function is meant to be used to allow
8759 users to gather information from the article (e. g., add Vcard info to
8760 the bbdb database) or to do actions based on parts (e. g., automatically
8761 save all jpegs into some directory).
8762
8763 Here's an example function the does the latter:
8764
8765 @lisp
8766 (defun my-save-all-jpeg-parts (handle)
8767   (when (equal (car (mm-handle-type handle)) "image/jpeg")
8768     (with-temp-buffer
8769       (insert (mm-get-part handle))
8770       (write-region (point-min) (point-max)
8771                     (read-file-name "Save jpeg to: ")))))
8772 (setq gnus-article-mime-part-function
8773       'my-save-all-jpeg-parts)
8774 @end lisp
8775
8776 @vindex gnus-mime-multipart-functions
8777 @item gnus-mime-multipart-functions
8778 Alist of @sc{mime} multipart types and functions to handle them.
8779
8780 @vindex mm-file-name-rewrite-functions
8781 @item mm-file-name-rewrite-functions
8782 List of functions used for rewriting file names of @sc{mime} parts.
8783 Each function takes a file name as input and returns a file name.
8784
8785 Ready-made functions include@*
8786 @code{mm-file-name-delete-whitespace},
8787 @code{mm-file-name-trim-whitespace},
8788 @code{mm-file-name-collapse-whitespace}, and
8789 @code{mm-file-name-replace-whitespace}.  The later uses the value of
8790 the variable @code{mm-file-name-replace-whitespace} to replace each
8791 whitespace character in a file name with that string; default value
8792 is @code{"_"} (a single underscore).
8793 @findex mm-file-name-delete-whitespace
8794 @findex mm-file-name-trim-whitespace
8795 @findex mm-file-name-collapse-whitespace
8796 @findex mm-file-name-replace-whitespace
8797 @vindex mm-file-name-replace-whitespace
8798
8799 The standard functions @code{capitalize}, @code{downcase},
8800 @code{upcase}, and @code{upcase-initials} may be useful, too.
8801
8802 Everybody knows that whitespace characters in file names are evil,
8803 except those who don't know.  If you receive lots of attachments from
8804 such unenlightened users, you can make live easier by adding
8805
8806 @lisp
8807 (setq mm-file-name-rewrite-functions
8808       '(mm-file-name-trim-whitespace
8809         mm-file-name-collapse-whitespace
8810         mm-file-name-replace-whitespace))
8811 @end lisp
8812
8813 @noindent
8814 to your @file{.gnus} file.
8815
8816 @end table
8817
8818
8819 @node Charsets
8820 @section Charsets
8821 @cindex charsets
8822
8823 People use different charsets, and we have @sc{mime} to let us know what
8824 charsets they use.  Or rather, we wish we had.  Many people use
8825 newsreaders and mailers that do not understand or use @sc{mime}, and
8826 just send out messages without saying what character sets they use.  To
8827 help a bit with this, some local news hierarchies have policies that say
8828 what character set is the default.  For instance, the @samp{fj}
8829 hierarchy uses @code{iso-2022-jp-2}.
8830
8831 @vindex gnus-group-charset-alist
8832 This knowledge is encoded in the @code{gnus-group-charset-alist}
8833 variable, which is an alist of regexps (use the first item to match full
8834 group names) and default charsets to be used when reading these groups.
8835
8836 In addition, some people do use soi-disant @sc{mime}-aware agents that
8837 aren't.  These blithely mark messages as being in @code{iso-8859-1}
8838 even if they really are in @code{koi-8}.  To help here, the
8839 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
8840 charsets that are listed here will be ignored.  The variable can be
8841 set on a group-by-group basis using the group parameters (@pxref{Group
8842 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
8843 which includes values some agents insist on having in there.
8844
8845 @vindex gnus-group-posting-charset-alist
8846 When posting, @code{gnus-group-posting-charset-alist} is used to
8847 determine which charsets should not be encoded using the @sc{mime}
8848 encodings.  For instance, some hierarchies discourage using
8849 quoted-printable header encoding.
8850
8851 This variable is an alist of regexps and permitted unencoded charsets
8852 for posting.  Each element of the alist has the form @code{(}@var{test
8853 header body-list}@code{)}, where:
8854
8855 @table @var
8856 @item test
8857 is either a regular expression matching the newsgroup header or a
8858 variable to query,
8859 @item header
8860 is the charset which may be left unencoded in the header (@code{nil}
8861 means encode all charsets),
8862 @item body-list
8863 is a list of charsets which may be encoded using 8bit content-transfer
8864 encoding in the body, or one of the special values @code{nil} (always
8865 encode using quoted-printable) or @code{t} (always use 8bit).
8866 @end table
8867
8868 @cindex Russian
8869 @cindex koi8-r
8870 @cindex koi8-u
8871 @cindex iso-8859-5
8872 @cindex coding system aliases
8873 @cindex preferred charset
8874
8875 Other charset tricks that may be useful, although not Gnus-specific:
8876
8877 If there are several @sc{mime} charsets that encode the same Emacs
8878 charset, you can choose what charset to use by saying the following:
8879
8880 @lisp
8881 (put-charset-property 'cyrillic-iso8859-5
8882                       'preferred-coding-system 'koi8-r)
8883 @end lisp
8884
8885 This means that Russian will be encoded using @code{koi8-r} instead of
8886 the default @code{iso-8859-5} @sc{mime} charset.
8887
8888 If you want to read messages in @code{koi8-u}, you can cheat and say
8889
8890 @lisp
8891 (define-coding-system-alias 'koi8-u 'koi8-r)
8892 @end lisp
8893
8894 This will almost do the right thing.
8895
8896 And finally, to read charsets like @code{windows-1251}, you can say
8897 something like
8898
8899 @lisp
8900 (codepage-setup 1251)
8901 (define-coding-system-alias 'windows-1251 'cp1251)
8902 @end lisp
8903
8904
8905 @node Article Commands
8906 @section Article Commands
8907
8908 @table @kbd
8909
8910 @item A P
8911 @cindex PostScript
8912 @cindex printing
8913 @kindex A P (Summary)
8914 @vindex gnus-ps-print-hook
8915 @findex gnus-summary-print-article
8916 Generate and print a PostScript image of the article buffer
8917 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
8918 be run just before printing the buffer.  An alternative way to print
8919 article is to use Muttprint (@pxref{Saving Articles}).
8920
8921 @end table
8922
8923
8924 @node Summary Sorting
8925 @section Summary Sorting
8926 @cindex summary sorting
8927
8928 You can have the summary buffer sorted in various ways, even though I
8929 can't really see why you'd want that.
8930
8931 @table @kbd
8932
8933 @item C-c C-s C-n
8934 @kindex C-c C-s C-n (Summary)
8935 @findex gnus-summary-sort-by-number
8936 Sort by article number (@code{gnus-summary-sort-by-number}).
8937
8938 @item C-c C-s C-a
8939 @kindex C-c C-s C-a (Summary)
8940 @findex gnus-summary-sort-by-author
8941 Sort by author (@code{gnus-summary-sort-by-author}).
8942
8943 @item C-c C-s C-s
8944 @kindex C-c C-s C-s (Summary)
8945 @findex gnus-summary-sort-by-subject
8946 Sort by subject (@code{gnus-summary-sort-by-subject}).
8947
8948 @item C-c C-s C-d
8949 @kindex C-c C-s C-d (Summary)
8950 @findex gnus-summary-sort-by-date
8951 Sort by date (@code{gnus-summary-sort-by-date}).
8952
8953 @item C-c C-s C-l
8954 @kindex C-c C-s C-l (Summary)
8955 @findex gnus-summary-sort-by-lines
8956 Sort by lines (@code{gnus-summary-sort-by-lines}).
8957
8958 @item C-c C-s C-c
8959 @kindex C-c C-s C-c (Summary)
8960 @findex gnus-summary-sort-by-chars
8961 Sort by article length (@code{gnus-summary-sort-by-chars}).
8962
8963 @item C-c C-s C-i
8964 @kindex C-c C-s C-i (Summary)
8965 @findex gnus-summary-sort-by-score
8966 Sort by score (@code{gnus-summary-sort-by-score}).
8967
8968 @item C-c C-s C-o
8969 @kindex C-c C-s C-o (Summary)
8970 @findex gnus-summary-sort-by-original
8971 Sort using the default sorting method
8972 (@code{gnus-summary-sort-by-original}).
8973 @end table
8974
8975 These functions will work both when you use threading and when you don't
8976 use threading.  In the latter case, all summary lines will be sorted,
8977 line by line.  In the former case, sorting will be done on a
8978 root-by-root basis, which might not be what you were looking for.  To
8979 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
8980 Commands}).
8981
8982
8983 @node Finding the Parent
8984 @section Finding the Parent
8985 @cindex parent articles
8986 @cindex referring articles
8987
8988 @table @kbd
8989 @item ^
8990 @kindex ^ (Summary)
8991 @findex gnus-summary-refer-parent-article
8992 If you'd like to read the parent of the current article, and it is not
8993 displayed in the summary buffer, you might still be able to.  That is,
8994 if the current group is fetched by @sc{nntp}, the parent hasn't expired
8995 and the @code{References} in the current article are not mangled, you
8996 can just press @kbd{^} or @kbd{A r}
8997 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
8998 you'll get the parent.  If the parent is already displayed in the
8999 summary buffer, point will just move to this article.
9000
9001 If given a positive numerical prefix, fetch that many articles back into
9002 the ancestry.  If given a negative numerical prefix, fetch just that
9003 ancestor.  So if you say @kbd{3 ^}, gnus will fetch the parent, the
9004 grandparent and the grandgrandparent of the current article.  If you say
9005 @kbd{-3 ^}, gnus will only fetch the grandgrandparent of the current
9006 article.
9007
9008 @item A R (Summary)
9009 @findex gnus-summary-refer-references
9010 @kindex A R (Summary)
9011 Fetch all articles mentioned in the @code{References} header of the
9012 article (@code{gnus-summary-refer-references}).
9013
9014 @item A T (Summary)
9015 @findex gnus-summary-refer-thread
9016 @kindex A T (Summary)
9017 Display the full thread where the current article appears
9018 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9019 headers in the current group to work, so it usually takes a while.  If
9020 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9021 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9022 visible effects normally, but it'll make this command work a whole lot
9023 faster.  Of course, it'll make group entry somewhat slow.
9024
9025 @vindex gnus-refer-thread-limit
9026 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9027 articles before the first displayed in the current group) headers to
9028 fetch when doing this command.  The default is 200.  If @code{t}, all
9029 the available headers will be fetched.  This variable can be overridden
9030 by giving the @kbd{A T} command a numerical prefix.
9031
9032 @item M-^ (Summary)
9033 @findex gnus-summary-refer-article
9034 @kindex M-^ (Summary)
9035 @cindex Message-ID
9036 @cindex fetching by Message-ID
9037 You can also ask the @sc{nntp} server for an arbitrary article, no
9038 matter what group it belongs to.  @kbd{M-^}
9039 (@code{gnus-summary-refer-article}) will ask you for a
9040 @code{Message-ID}, which is one of those long, hard-to-read thingies
9041 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9042 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9043 @end table
9044
9045 The current select method will be used when fetching by
9046 @code{Message-ID} from non-news select method, but you can override this
9047 by giving this command a prefix.
9048
9049 @vindex gnus-refer-article-method
9050 If the group you are reading is located on a back end that does not
9051 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9052 you can set @code{gnus-refer-article-method} to an @sc{nntp} method.  It
9053 would, perhaps, be best if the @sc{nntp} server you consult is the one
9054 updating the spool you are reading from, but that's not really
9055 necessary.
9056
9057 It can also be a list of select methods, as well as the special symbol
9058 @code{current}, which means to use the current select method.  If it
9059 is a list, Gnus will try all the methods in the list until it finds a
9060 match.
9061
9062 Here's an example setting that will first try the current method, and
9063 then ask Deja if that fails:
9064
9065 @lisp
9066 (setq gnus-refer-article-method
9067       '(current
9068         (nnweb "refer" (nnweb-type dejanews))))
9069 @end lisp
9070
9071 Most of the mail back ends support fetching by @code{Message-ID}, but
9072 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9073 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9074 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9075 only able to locate articles that have been posted to the current group.
9076 (Anything else would be too time consuming.)  @code{nnmh} does not
9077 support this at all.
9078
9079
9080 @node Alternative Approaches
9081 @section Alternative Approaches
9082
9083 Different people like to read news using different methods.  This being
9084 gnus, we offer a small selection of minor modes for the summary buffers.
9085
9086 @menu
9087 * Pick and Read::               First mark articles and then read them.
9088 * Binary Groups::               Auto-decode all articles.
9089 @end menu
9090
9091
9092 @node Pick and Read
9093 @subsection Pick and Read
9094 @cindex pick and read
9095
9096 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9097 a two-phased reading interface.  The user first marks in a summary
9098 buffer the articles she wants to read.  Then she starts reading the
9099 articles with just an article buffer displayed.
9100
9101 @findex gnus-pick-mode
9102 @kindex M-x gnus-pick-mode
9103 Gnus provides a summary buffer minor mode that allows
9104 this---@code{gnus-pick-mode}.  This basically means that a few process
9105 mark commands become one-keystroke commands to allow easy marking, and
9106 it provides one additional command for switching to the summary buffer.
9107
9108 Here are the available keystrokes when using pick mode:
9109
9110 @table @kbd
9111 @item .
9112 @kindex . (Pick)
9113 @findex gnus-pick-article-or-thread
9114 Pick the article or thread on the current line
9115 (@code{gnus-pick-article-or-thread}).  If the variable
9116 @code{gnus-thread-hide-subtree} is true, then this key selects the
9117 entire thread when used at the first article of the thread.  Otherwise,
9118 it selects just the article.  If given a numerical prefix, go to that
9119 thread or article and pick it.  (The line number is normally displayed
9120 at the beginning of the summary pick lines.)
9121
9122 @item SPACE
9123 @kindex SPACE (Pick)
9124 @findex gnus-pick-next-page
9125 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9126 at the end of the buffer, start reading the picked articles.
9127
9128 @item u
9129 @kindex u (Pick)
9130 @findex gnus-pick-unmark-article-or-thread.
9131 Unpick the thread or article
9132 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9133 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9134 thread if used at the first article of the thread.  Otherwise it unpicks
9135 just the article.  You can give this key a numerical prefix to unpick
9136 the thread or article at that line.
9137
9138 @item RET
9139 @kindex RET (Pick)
9140 @findex gnus-pick-start-reading
9141 @vindex gnus-pick-display-summary
9142 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9143 given a prefix, mark all unpicked articles as read first.  If
9144 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9145 will still be visible when you are reading.
9146
9147 @end table
9148
9149 All the normal summary mode commands are still available in the
9150 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9151 which is mapped to the same function
9152 @code{gnus-summary-tick-article-forward}.
9153
9154 If this sounds like a good idea to you, you could say:
9155
9156 @lisp
9157 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9158 @end lisp
9159
9160 @vindex gnus-pick-mode-hook
9161 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9162
9163 @vindex gnus-mark-unpicked-articles-as-read
9164 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9165 all unpicked articles as read.  The default is @code{nil}.
9166
9167 @vindex gnus-summary-pick-line-format
9168 The summary line format in pick mode is slightly different from the
9169 standard format.  At the beginning of each line the line number is
9170 displayed.  The pick mode line format is controlled by the
9171 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9172 Variables}).  It accepts the same format specs that
9173 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9174
9175
9176 @node Binary Groups
9177 @subsection Binary Groups
9178 @cindex binary groups
9179
9180 @findex gnus-binary-mode
9181 @kindex M-x gnus-binary-mode
9182 If you spend much time in binary groups, you may grow tired of hitting
9183 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9184 is a minor mode for summary buffers that makes all ordinary Gnus article
9185 selection functions uudecode series of articles and display the result
9186 instead of just displaying the articles the normal way.
9187
9188 @kindex g (Binary)
9189 @findex gnus-binary-show-article
9190 The only way, in fact, to see the actual articles is the @kbd{g}
9191 command, when you have turned on this mode
9192 (@code{gnus-binary-show-article}).
9193
9194 @vindex gnus-binary-mode-hook
9195 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9196
9197
9198 @node Tree Display
9199 @section Tree Display
9200 @cindex trees
9201
9202 @vindex gnus-use-trees
9203 If you don't like the normal gnus summary display, you might try setting
9204 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9205 additional @dfn{tree buffer}.  You can execute all summary mode commands
9206 in the tree buffer.
9207
9208 There are a few variables to customize the tree display, of course:
9209
9210 @table @code
9211 @item gnus-tree-mode-hook
9212 @vindex gnus-tree-mode-hook
9213 A hook called in all tree mode buffers.
9214
9215 @item gnus-tree-mode-line-format
9216 @vindex gnus-tree-mode-line-format
9217 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9218 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9219 of valid specs, @pxref{Summary Buffer Mode Line}.
9220
9221 @item gnus-selected-tree-face
9222 @vindex gnus-selected-tree-face
9223 Face used for highlighting the selected article in the tree buffer.  The
9224 default is @code{modeline}.
9225
9226 @item gnus-tree-line-format
9227 @vindex gnus-tree-line-format
9228 A format string for the tree nodes.  The name is a bit of a misnomer,
9229 though---it doesn't define a line, but just the node.  The default value
9230 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9231 the name of the poster.  It is vital that all nodes are of the same
9232 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9233
9234 Valid specs are:
9235
9236 @table @samp
9237 @item n
9238 The name of the poster.
9239 @item f
9240 The @code{From} header.
9241 @item N
9242 The number of the article.
9243 @item [
9244 The opening bracket.
9245 @item ]
9246 The closing bracket.
9247 @item s
9248 The subject.
9249 @end table
9250
9251 @xref{Formatting Variables}.
9252
9253 Variables related to the display are:
9254
9255 @table @code
9256 @item gnus-tree-brackets
9257 @vindex gnus-tree-brackets
9258 This is used for differentiating between ``real'' articles and
9259 ``sparse'' articles.  The format is @code{((@var{real-open} . @var{real-close})
9260 (@var{sparse-open} . @var{sparse-close}) (@var{dummy-open} . @var{dummy-close}))}, and the
9261 default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9262
9263 @item gnus-tree-parent-child-edges
9264 @vindex gnus-tree-parent-child-edges
9265 This is a list that contains the characters used for connecting parent
9266 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9267
9268 @end table
9269
9270 @item gnus-tree-minimize-window
9271 @vindex gnus-tree-minimize-window
9272 If this variable is non-@code{nil}, gnus will try to keep the tree
9273 buffer as small as possible to allow more room for the other gnus
9274 windows.  If this variable is a number, the tree buffer will never be
9275 higher than that number.  The default is @code{t}.  Note that if you
9276 have several windows displayed side-by-side in a frame and the tree
9277 buffer is one of these, minimizing the tree window will also resize all
9278 other windows displayed next to it.
9279
9280 You may also wish to add the following hook to keep the window minimized
9281 at all times:
9282
9283 @lisp
9284 (add-hook 'gnus-configure-windows-hook
9285           'gnus-tree-perhaps-minimize)
9286 @end lisp
9287
9288 @item gnus-generate-tree-function
9289 @vindex gnus-generate-tree-function
9290 @findex gnus-generate-horizontal-tree
9291 @findex gnus-generate-vertical-tree
9292 The function that actually generates the thread tree.  Two predefined
9293 functions are available: @code{gnus-generate-horizontal-tree} and
9294 @code{gnus-generate-vertical-tree} (which is the default).
9295
9296 @end table
9297
9298 Here's an example from a horizontal tree buffer:
9299
9300 @example
9301 @{***@}-(***)-[odd]-[Gun]
9302      |      \[Jan]
9303      |      \[odd]-[Eri]
9304      |      \(***)-[Eri]
9305      |            \[odd]-[Paa]
9306      \[Bjo]
9307      \[Gun]
9308      \[Gun]-[Jor]
9309 @end example
9310
9311 Here's the same thread displayed in a vertical tree buffer:
9312
9313 @example
9314 @{***@}
9315   |--------------------------\-----\-----\
9316 (***)                         [Bjo] [Gun] [Gun]
9317   |--\-----\-----\                          |
9318 [odd] [Jan] [odd] (***)                   [Jor]
9319   |           |     |--\
9320 [Gun]       [Eri] [Eri] [odd]
9321                           |
9322                         [Paa]
9323 @end example
9324
9325 If you're using horizontal trees, it might be nice to display the trees
9326 side-by-side with the summary buffer.  You could add something like the
9327 following to your @file{.gnus.el} file:
9328
9329 @lisp
9330 (setq gnus-use-trees t
9331       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9332       gnus-tree-minimize-window nil)
9333 (gnus-add-configuration
9334  '(article
9335    (vertical 1.0
9336              (horizontal 0.25
9337                          (summary 0.75 point)
9338                          (tree 1.0))
9339              (article 1.0))))
9340 @end lisp
9341
9342 @xref{Window Layout}.
9343
9344
9345 @node Mail Group Commands
9346 @section Mail Group Commands
9347 @cindex mail group commands
9348
9349 Some commands only make sense in mail groups.  If these commands are
9350 invalid in the current group, they will raise a hell and let you know.
9351
9352 All these commands (except the expiry and edit commands) use the
9353 process/prefix convention (@pxref{Process/Prefix}).
9354
9355 @table @kbd
9356
9357 @item B e
9358 @kindex B e (Summary)
9359 @findex gnus-summary-expire-articles
9360 Run all expirable articles in the current group through the expiry
9361 process (@code{gnus-summary-expire-articles}).  That is, delete all
9362 expirable articles in the group that have been around for a while.
9363 (@pxref{Expiring Mail}).
9364
9365 @item B C-M-e
9366 @kindex B C-M-e (Summary)
9367 @findex gnus-summary-expire-articles-now
9368 Delete all the expirable articles in the group
9369 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9370 articles eligible for expiry in the current group will
9371 disappear forever into that big @file{/dev/null} in the sky.
9372
9373 @item B DEL
9374 @kindex B DEL (Summary)
9375 @findex gnus-summary-delete-article
9376 @c @icon{gnus-summary-mail-delete}
9377 Delete the mail article.  This is ``delete'' as in ``delete it from your
9378 disk forever and ever, never to return again.'' Use with caution.
9379 (@code{gnus-summary-delete-article}).
9380
9381 @item B m
9382 @kindex B m (Summary)
9383 @cindex move mail
9384 @findex gnus-summary-move-article
9385 @vindex gnus-preserve-marks
9386 Move the article from one mail group to another
9387 (@code{gnus-summary-move-article}).  Marks will be preserved if
9388 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9389
9390 @item B c
9391 @kindex B c (Summary)
9392 @cindex copy mail
9393 @findex gnus-summary-copy-article
9394 @c @icon{gnus-summary-mail-copy}
9395 Copy the article from one group (mail group or not) to a mail group
9396 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9397 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9398
9399 @item B B
9400 @kindex B B (Summary)
9401 @cindex crosspost mail
9402 @findex gnus-summary-crosspost-article
9403 Crosspost the current article to some other group
9404 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9405 the article in the other group, and the Xref headers of the article will
9406 be properly updated.
9407
9408 @item B i
9409 @kindex B i (Summary)
9410 @findex gnus-summary-import-article
9411 Import an arbitrary file into the current mail newsgroup
9412 (@code{gnus-summary-import-article}).  You will be prompted for a file
9413 name, a @code{From} header and a @code{Subject} header.
9414
9415 @item B I
9416 @kindex B I (Summary)
9417 @findex gnus-summary-create-article
9418 Create an empty article in the current mail newsgroups
9419 (@code{gnus-summary-create-article}).  You will be prompted for a
9420 @code{From} header and a @code{Subject} header.
9421
9422 @item B r
9423 @kindex B r (Summary)
9424 @findex gnus-summary-respool-article
9425 Respool the mail article (@code{gnus-summary-respool-article}).
9426 @code{gnus-summary-respool-default-method} will be used as the default
9427 select method when respooling.  This variable is @code{nil} by default,
9428 which means that the current group select method will be used instead.
9429 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9430 (which is the default).
9431
9432 @item B w
9433 @itemx e
9434 @kindex B w (Summary)
9435 @kindex e (Summary)
9436 @findex gnus-summary-edit-article
9437 @kindex C-c C-c (Article)
9438 @findex gnus-summary-edit-article-done
9439 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9440 editing and make the changes permanent, type @kbd{C-c C-c}
9441 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9442 @kbd{C-c C-c} command, gnus won't re-highlight the article.
9443
9444 @item B q
9445 @kindex B q (Summary)
9446 @findex gnus-summary-respool-query
9447 If you want to re-spool an article, you might be curious as to what group
9448 the article will end up in before you do the re-spooling.  This command
9449 will tell you (@code{gnus-summary-respool-query}).
9450
9451 @item B t
9452 @kindex B t (Summary)
9453 @findex gnus-summary-respool-trace
9454 Similarly, this command will display all fancy splitting patterns used
9455 when repooling, if any (@code{gnus-summary-respool-trace}).
9456
9457 @item B p
9458 @kindex B p (Summary)
9459 @findex gnus-summary-article-posted-p
9460 Some people have a tendency to send you "courtesy" copies when they
9461 follow up to articles you have posted.  These usually have a
9462 @code{Newsgroups} header in them, but not always.  This command
9463 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9464 article from your news server (or rather, from
9465 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9466 report back whether it found the article or not.  Even if it says that
9467 it didn't find the article, it may have been posted anyway---mail
9468 propagation is much faster than news propagation, and the news copy may
9469 just not have arrived yet.
9470
9471 @item K E
9472 @kindex K E (Summary)
9473 @findex gnus-article-encrypt-body
9474 @vindex gnus-article-encrypt-protocol
9475 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
9476 The body is encrypted with the encryption protocol specified by the
9477 variable @code{gnus-article-encrypt-protocol}.
9478
9479 @end table
9480
9481 @vindex gnus-move-split-methods
9482 @cindex moving articles
9483 If you move (or copy) articles regularly, you might wish to have gnus
9484 suggest where to put the articles.  @code{gnus-move-split-methods} is a
9485 variable that uses the same syntax as @code{gnus-split-methods}
9486 (@pxref{Saving Articles}).  You may customize that variable to create
9487 suggestions you find reasonable.  (Note that
9488 @code{gnus-move-split-methods} uses group names where
9489 @code{gnus-split-methods} uses file names.)
9490
9491 @lisp
9492 (setq gnus-move-split-methods
9493       '(("^From:.*Lars Magne" "nnml:junk")
9494         ("^Subject:.*gnus" "nnfolder:important")
9495         (".*" "nnml:misc")))
9496 @end lisp
9497
9498
9499 @node Various Summary Stuff
9500 @section Various Summary Stuff
9501
9502 @menu
9503 * Summary Group Information::   Information oriented commands.
9504 * Searching for Articles::      Multiple article commands.
9505 * Summary Generation Commands::  
9506 * Really Various Summary Commands::  Those pesky non-conformant commands.
9507 @end menu
9508
9509 @table @code
9510 @vindex gnus-summary-mode-hook
9511 @item gnus-summary-mode-hook
9512 This hook is called when creating a summary mode buffer.
9513
9514 @vindex gnus-summary-generate-hook
9515 @item gnus-summary-generate-hook
9516 This is called as the last thing before doing the threading and the
9517 generation of the summary buffer.  It's quite convenient for customizing
9518 the threading variables based on what data the newsgroup has.  This hook
9519 is called from the summary buffer after most summary buffer variables
9520 have been set.
9521
9522 @vindex gnus-summary-prepare-hook
9523 @item gnus-summary-prepare-hook
9524 It is called after the summary buffer has been generated.  You might use
9525 it to, for instance, highlight lines or modify the look of the buffer in
9526 some other ungodly manner.  I don't care.
9527
9528 @vindex gnus-summary-prepared-hook
9529 @item gnus-summary-prepared-hook
9530 A hook called as the very last thing after the summary buffer has been
9531 generated.
9532
9533 @vindex gnus-summary-ignore-duplicates
9534 @item gnus-summary-ignore-duplicates
9535 When gnus discovers two articles that have the same @code{Message-ID},
9536 it has to do something drastic.  No articles are allowed to have the
9537 same @code{Message-ID}, but this may happen when reading mail from some
9538 sources.  Gnus allows you to customize what happens with this variable.
9539 If it is @code{nil} (which is the default), gnus will rename the
9540 @code{Message-ID} (for display purposes only) and display the article as
9541 any other article.  If this variable is @code{t}, it won't display the
9542 article---it'll be as if it never existed.
9543
9544 @vindex gnus-alter-articles-to-read-function
9545 @item gnus-alter-articles-to-read-function
9546 This function, which takes two parameters (the group name and the list
9547 of articles to be selected), is called to allow the user to alter the
9548 list of articles to be selected.
9549
9550 For instance, the following function adds the list of cached articles to
9551 the list in one particular group:
9552
9553 @lisp
9554 (defun my-add-cached-articles (group articles)
9555   (if (string= group "some.group")
9556       (append gnus-newsgroup-cached articles)
9557     articles))
9558 @end lisp
9559
9560 @vindex gnus-newsgroup-variables
9561 @item gnus-newsgroup-variables
9562 A list of newsgroup (summary buffer) local variables, or cons of
9563 variables and their default values (when the default values are not
9564 nil), that should be made global while the summary buffer is active.
9565 These variables can be used to set variables in the group parameters
9566 while still allowing them to affect operations done in other
9567 buffers. For example:
9568
9569 @lisp
9570 (setq gnus-newsgroup-variables
9571      '(message-use-followup-to
9572        (gnus-visible-headers .
9573          "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
9574 @end lisp
9575
9576 @end table
9577
9578
9579 @node Summary Group Information
9580 @subsection Summary Group Information
9581
9582 @table @kbd
9583
9584 @item H f
9585 @kindex H f (Summary)
9586 @findex gnus-summary-fetch-faq
9587 @vindex gnus-group-faq-directory
9588 Try to fetch the FAQ (list of frequently asked questions) for the
9589 current group (@code{gnus-summary-fetch-faq}).  Gnus will try to get the
9590 FAQ from @code{gnus-group-faq-directory}, which is usually a directory
9591 on a remote machine.  This variable can also be a list of directories.
9592 In that case, giving a prefix to this command will allow you to choose
9593 between the various sites.  @code{ange-ftp} or @code{efs} will probably
9594 be used for fetching the file.
9595
9596 @item H d
9597 @kindex H d (Summary)
9598 @findex gnus-summary-describe-group
9599 Give a brief description of the current group
9600 (@code{gnus-summary-describe-group}).  If given a prefix, force
9601 rereading the description from the server.
9602
9603 @item H h
9604 @kindex H h (Summary)
9605 @findex gnus-summary-describe-briefly
9606 Give an extremely brief description of the most important summary
9607 keystrokes (@code{gnus-summary-describe-briefly}).
9608
9609 @item H i
9610 @kindex H i (Summary)
9611 @findex gnus-info-find-node
9612 Go to the gnus info node (@code{gnus-info-find-node}).
9613 @end table
9614
9615
9616 @node Searching for Articles
9617 @subsection Searching for Articles
9618
9619 @table @kbd
9620
9621 @item M-s
9622 @kindex M-s (Summary)
9623 @findex gnus-summary-search-article-forward
9624 Search through all subsequent (raw) articles for a regexp
9625 (@code{gnus-summary-search-article-forward}).
9626
9627 @item M-r
9628 @kindex M-r (Summary)
9629 @findex gnus-summary-search-article-backward
9630 Search through all previous (raw) articles for a regexp
9631 (@code{gnus-summary-search-article-backward}).
9632
9633 @item &
9634 @kindex & (Summary)
9635 @findex gnus-summary-execute-command
9636 This command will prompt you for a header, a regular expression to match
9637 on this field, and a command to be executed if the match is made
9638 (@code{gnus-summary-execute-command}).  If the header is an empty
9639 string, the match is done on the entire article.  If given a prefix,
9640 search backward instead.
9641
9642 For instance, @kbd{& RET some.*string #} will put the process mark on
9643 all articles that have heads or bodies that match @samp{some.*string}.
9644
9645 @item M-&
9646 @kindex M-& (Summary)
9647 @findex gnus-summary-universal-argument
9648 Perform any operation on all articles that have been marked with
9649 the process mark (@code{gnus-summary-universal-argument}).
9650 @end table
9651
9652 @node Summary Generation Commands
9653 @subsection Summary Generation Commands
9654
9655 @table @kbd
9656
9657 @item Y g
9658 @kindex Y g (Summary)
9659 @findex gnus-summary-prepare
9660 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
9661
9662 @item Y c
9663 @kindex Y c (Summary)
9664 @findex gnus-summary-insert-cached-articles
9665 Pull all cached articles (for the current group) into the summary buffer
9666 (@code{gnus-summary-insert-cached-articles}).
9667
9668 @end table
9669
9670
9671 @node Really Various Summary Commands
9672 @subsection Really Various Summary Commands
9673
9674 @table @kbd
9675
9676 @item A D
9677 @itemx C-d
9678 @kindex C-d (Summary)
9679 @kindex A D (Summary)
9680 @findex gnus-summary-enter-digest-group
9681 If the current article is a collection of other articles (for instance,
9682 a digest), you might use this command to enter a group based on the that
9683 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
9684 guess what article type is currently displayed unless you give a prefix
9685 to this command, which forces a ``digest'' interpretation.  Basically,
9686 whenever you see a message that is a collection of other messages of
9687 some format, you @kbd{C-d} and read these messages in a more convenient
9688 fashion.
9689
9690 @item C-M-d
9691 @kindex C-M-d (Summary)
9692 @findex gnus-summary-read-document
9693 This command is very similar to the one above, but lets you gather
9694 several documents into one biiig group
9695 (@code{gnus-summary-read-document}).  It does this by opening several
9696 @code{nndoc} groups for each document, and then opening an
9697 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
9698 command understands the process/prefix convention
9699 (@pxref{Process/Prefix}).
9700
9701 @item C-t
9702 @kindex C-t (Summary)
9703 @findex gnus-summary-toggle-truncation
9704 Toggle truncation of summary lines
9705 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
9706 line centering function in the summary buffer, so it's not a good idea
9707 to have truncation switched off while reading articles.
9708
9709 @item =
9710 @kindex = (Summary)
9711 @findex gnus-summary-expand-window
9712 Expand the summary buffer window (@code{gnus-summary-expand-window}).
9713 If given a prefix, force an @code{article} window configuration.
9714
9715 @item C-M-e
9716 @kindex C-M-e (Summary)
9717 @findex gnus-summary-edit-parameters
9718 Edit the group parameters (@pxref{Group Parameters}) of the current
9719 group (@code{gnus-summary-edit-parameters}).
9720
9721 @item C-M-a
9722 @kindex C-M-a (Summary)
9723 @findex gnus-summary-customize-parameters
9724 Customize the group parameters (@pxref{Group Parameters}) of the current
9725 group (@code{gnus-summary-customize-parameters}).
9726
9727 @end table
9728
9729
9730 @node Exiting the Summary Buffer
9731 @section Exiting the Summary Buffer
9732 @cindex summary exit
9733 @cindex exiting groups
9734
9735 Exiting from the summary buffer will normally update all info on the
9736 group and return you to the group buffer.
9737
9738 @table @kbd
9739
9740 @item Z Z
9741 @itemx q
9742 @kindex Z Z (Summary)
9743 @kindex q (Summary)
9744 @findex gnus-summary-exit
9745 @vindex gnus-summary-exit-hook
9746 @vindex gnus-summary-prepare-exit-hook
9747 @c @icon{gnus-summary-exit}
9748 Exit the current group and update all information on the group
9749 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
9750 called before doing much of the exiting, which calls
9751 @code{gnus-summary-expire-articles} by default.
9752 @code{gnus-summary-exit-hook} is called after finishing the exit
9753 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
9754 group mode having no more (unread) groups.
9755
9756 @item Z E
9757 @itemx Q
9758 @kindex Z E (Summary)
9759 @kindex Q (Summary)
9760 @findex gnus-summary-exit-no-update
9761 Exit the current group without updating any information on the group
9762 (@code{gnus-summary-exit-no-update}).
9763
9764 @item Z c
9765 @itemx c
9766 @kindex Z c (Summary)
9767 @kindex c (Summary)
9768 @findex gnus-summary-catchup-and-exit
9769 @c @icon{gnus-summary-catchup-and-exit}
9770 Mark all unticked articles in the group as read and then exit
9771 (@code{gnus-summary-catchup-and-exit}).
9772
9773 @item Z C
9774 @kindex Z C (Summary)
9775 @findex gnus-summary-catchup-all-and-exit
9776 Mark all articles, even the ticked ones, as read and then exit
9777 (@code{gnus-summary-catchup-all-and-exit}).
9778
9779 @item Z n
9780 @kindex Z n (Summary)
9781 @findex gnus-summary-catchup-and-goto-next-group
9782 Mark all articles as read and go to the next group
9783 (@code{gnus-summary-catchup-and-goto-next-group}).
9784
9785 @item Z R
9786 @kindex Z R (Summary)
9787 @findex gnus-summary-reselect-current-group
9788 Exit this group, and then enter it again
9789 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
9790 all articles, both read and unread.
9791
9792 @item Z G
9793 @itemx M-g
9794 @kindex Z G (Summary)
9795 @kindex M-g (Summary)
9796 @findex gnus-summary-rescan-group
9797 @c @icon{gnus-summary-mail-get}
9798 Exit the group, check for new articles in the group, and select the
9799 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
9800 articles, both read and unread.
9801
9802 @item Z N
9803 @kindex Z N (Summary)
9804 @findex gnus-summary-next-group
9805 Exit the group and go to the next group
9806 (@code{gnus-summary-next-group}).
9807
9808 @item Z P
9809 @kindex Z P (Summary)
9810 @findex gnus-summary-prev-group
9811 Exit the group and go to the previous group
9812 (@code{gnus-summary-prev-group}).
9813
9814 @item Z s
9815 @kindex Z s (Summary)
9816 @findex gnus-summary-save-newsrc
9817 Save the current number of read/marked articles in the dribble buffer
9818 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
9819 given a prefix, also save the @file{.newsrc} file(s).  Using this
9820 command will make exit without updating (the @kbd{Q} command) worthless.
9821 @end table
9822
9823 @vindex gnus-exit-group-hook
9824 @code{gnus-exit-group-hook} is called when you exit the current group
9825 with an ``updating'' exit.  For instance @kbd{Q}
9826 (@code{gnus-summary-exit-no-update}) does not call this hook.
9827
9828 @findex gnus-summary-wake-up-the-dead
9829 @findex gnus-dead-summary-mode
9830 @vindex gnus-kill-summary-on-exit
9831 If you're in the habit of exiting groups, and then changing your mind
9832 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
9833 If you do that, gnus won't kill the summary buffer when you exit it.
9834 (Quelle surprise!)  Instead it will change the name of the buffer to
9835 something like @samp{*Dead Summary ... *} and install a minor mode
9836 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
9837 buffer, you'll find that all keys are mapped to a function called
9838 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
9839 summary buffer will result in a live, normal summary buffer.
9840
9841 There will never be more than one dead summary buffer at any one time.
9842
9843 @vindex gnus-use-cross-reference
9844 The data on the current group will be updated (which articles you have
9845 read, which articles you have replied to, etc.) when you exit the
9846 summary buffer.  If the @code{gnus-use-cross-reference} variable is
9847 @code{t} (which is the default), articles that are cross-referenced to
9848 this group and are marked as read, will also be marked as read in the
9849 other subscribed groups they were cross-posted to.  If this variable is
9850 neither @code{nil} nor @code{t}, the article will be marked as read in
9851 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
9852
9853
9854 @node Crosspost Handling
9855 @section Crosspost Handling
9856
9857 @cindex velveeta
9858 @cindex spamming
9859 Marking cross-posted articles as read ensures that you'll never have to
9860 read the same article more than once.  Unless, of course, somebody has
9861 posted it to several groups separately.  Posting the same article to
9862 several groups (not cross-posting) is called @dfn{spamming}, and you are
9863 by law required to send nasty-grams to anyone who perpetrates such a
9864 heinous crime.  You may want to try NoCeM handling to filter out spam
9865 (@pxref{NoCeM}).
9866
9867 Remember: Cross-posting is kinda ok, but posting the same article
9868 separately to several groups is not.  Massive cross-posting (aka.
9869 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
9870 @code{gnus-summary-mail-crosspost-complaint} command to complain about
9871 excessive crossposting (@pxref{Summary Mail Commands}).
9872
9873 @cindex cross-posting
9874 @cindex Xref
9875 @cindex @sc{nov}
9876 One thing that may cause Gnus to not do the cross-posting thing
9877 correctly is if you use an @sc{nntp} server that supports @sc{xover}
9878 (which is very nice, because it speeds things up considerably) which
9879 does not include the @code{Xref} header in its @sc{nov} lines.  This is
9880 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
9881 even with @sc{xover} by registering the @code{Xref} lines of all
9882 articles you actually read, but if you kill the articles, or just mark
9883 them as read without reading them, Gnus will not get a chance to snoop
9884 the @code{Xref} lines out of these articles, and will be unable to use
9885 the cross reference mechanism.
9886
9887 @cindex LIST overview.fmt
9888 @cindex overview.fmt
9889 To check whether your @sc{nntp} server includes the @code{Xref} header
9890 in its overview files, try @samp{telnet your.nntp.server nntp},
9891 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
9892 overview.fmt}.  This may not work, but if it does, and the last line you
9893 get does not read @samp{Xref:full}, then you should shout and whine at
9894 your news admin until she includes the @code{Xref} header in the
9895 overview files.
9896
9897 @vindex gnus-nov-is-evil
9898 If you want Gnus to get the @code{Xref}s right all the time, you have to
9899 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
9900 considerably.
9901
9902 C'est la vie.
9903
9904 For an alternative approach, @pxref{Duplicate Suppression}.
9905
9906
9907 @node Duplicate Suppression
9908 @section Duplicate Suppression
9909
9910 By default, gnus tries to make sure that you don't have to read the same
9911 article more than once by utilizing the crossposting mechanism
9912 (@pxref{Crosspost Handling}).  However, that simple and efficient
9913 approach may not work satisfactory for some users for various
9914 reasons.
9915
9916 @enumerate
9917 @item
9918 The @sc{nntp} server may fail to generate the @code{Xref} header.  This
9919 is evil and not very common.
9920
9921 @item
9922 The @sc{nntp} server may fail to include the @code{Xref} header in the
9923 @file{.overview} data bases.  This is evil and all too common, alas.
9924
9925 @item
9926 You may be reading the same group (or several related groups) from
9927 different @sc{nntp} servers.
9928
9929 @item
9930 You may be getting mail that duplicates articles posted to groups.
9931 @end enumerate
9932
9933 I'm sure there are other situations where @code{Xref} handling fails as
9934 well, but these four are the most common situations.
9935
9936 If, and only if, @code{Xref} handling fails for you, then you may
9937 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
9938 will remember the @code{Message-ID}s of all articles you have read or
9939 otherwise marked as read, and then, as if by magic, mark them as read
9940 all subsequent times you see them---in @emph{all} groups.  Using this
9941 mechanism is quite likely to be somewhat inefficient, but not overly
9942 so.  It's certainly preferable to reading the same articles more than
9943 once.
9944
9945 Duplicate suppression is not a very subtle instrument.  It's more like a
9946 sledge hammer than anything else.  It works in a very simple
9947 fashion---if you have marked an article as read, it adds this Message-ID
9948 to a cache.  The next time it sees this Message-ID, it will mark the
9949 article as read with the @samp{M} mark.  It doesn't care what group it
9950 saw the article in.
9951
9952 @table @code
9953 @item gnus-suppress-duplicates
9954 @vindex gnus-suppress-duplicates
9955 If non-@code{nil}, suppress duplicates.
9956
9957 @item gnus-save-duplicate-list
9958 @vindex gnus-save-duplicate-list
9959 If non-@code{nil}, save the list of duplicates to a file.  This will
9960 make startup and shutdown take longer, so the default is @code{nil}.
9961 However, this means that only duplicate articles read in a single gnus
9962 session are suppressed.
9963
9964 @item gnus-duplicate-list-length
9965 @vindex gnus-duplicate-list-length
9966 This variable says how many @code{Message-ID}s to keep in the duplicate
9967 suppression list.  The default is 10000.
9968
9969 @item gnus-duplicate-file
9970 @vindex gnus-duplicate-file
9971 The name of the file to store the duplicate suppression list in.  The
9972 default is @file{~/News/suppression}.
9973 @end table
9974
9975 If you have a tendency to stop and start gnus often, setting
9976 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
9977 you leave gnus running for weeks on end, you may have it @code{nil}.  On
9978 the other hand, saving the list makes startup and shutdown much slower,
9979 so that means that if you stop and start gnus often, you should set
9980 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
9981 to you to figure out, I think.
9982
9983 @node Security
9984 @section Security
9985
9986 Gnus is able to verify signed messages or decrypt encrypted messages.
9987 The formats that are supported are PGP, @sc{pgp/mime} and @sc{s/mime},
9988 however you need some external programs to get things to work:
9989
9990 @enumerate
9991 @item
9992 To handle PGP messages, you have to install mailcrypt or gpg.el as
9993 well as a OpenPGP implementation (such as GnuPG).
9994
9995 @item
9996 To handle @sc{s/mime} message, you need to install OpenSSL.  OpenSSL 0.9.6
9997 or newer is recommended.
9998
9999 @end enumerate
10000
10001 More information on how to set things up can be found in the message
10002 manual (@pxref{Security, ,Security, message, Message Manual}).
10003
10004 @table @code
10005 @item mm-verify-option
10006 @vindex mm-verify-option
10007 Option of verifying signed parts.  @code{never}, not verify;
10008 @code{always}, always verify; @code{known}, only verify known
10009 protocols. Otherwise, ask user.
10010
10011 @item mm-decrypt-option
10012 @vindex mm-decrypt-option
10013 Option of decrypting encrypted parts.  @code{never}, no decryption;
10014 @code{always}, always decrypt; @code{known}, only decrypt known
10015 protocols. Otherwise, ask user.
10016
10017 @end table
10018
10019 @node Mailing List
10020 @section Mailing List
10021
10022 @kindex A M (summary)
10023 @findex gnus-mailing-list-insinuate
10024 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10025 either add a `to-list' group parameter (@pxref{Group Parameters}),
10026 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10027 summary buffer, or say:
10028
10029 @lisp
10030 (add-hook 'gnus-summary-mode-hook 'turn-on-gnus-mailing-list-mode)
10031 @end lisp
10032
10033 That enables the following commands to the summary buffer:
10034
10035 @table @kbd
10036
10037 @item C-c C-n h
10038 @kindex C-c C-n h (Summary)
10039 @findex gnus-mailing-list-help
10040 Send a message to fetch mailing list help, if List-Help field exists.
10041
10042 @item C-c C-n s
10043 @kindex C-c C-n s (Summary)
10044 @findex gnus-mailing-list-subscribe
10045 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10046
10047 @item C-c C-n u
10048 @kindex C-c C-n u (Summary)
10049 @findex gnus-mailing-list-unsubscribe
10050 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10051 field exists.
10052
10053 @item C-c C-n p
10054 @kindex C-c C-n p (Summary)
10055 @findex gnus-mailing-list-post
10056 Post to the mailing list, if List-Post field exists.
10057
10058 @item C-c C-n o
10059 @kindex C-c C-n o (Summary)
10060 @findex gnus-mailing-list-owner
10061 Send a message to the mailing list owner, if List-Owner field exists.
10062
10063 @item C-c C-n a
10064 @kindex C-c C-n a (Summary)
10065 @findex gnus-mailing-list-owner
10066 Browse the mailing list archive, if List-Archive field exists.
10067
10068 @end table
10069
10070 @node Article Buffer
10071 @chapter Article Buffer
10072 @cindex article buffer
10073
10074 The articles are displayed in the article buffer, of which there is only
10075 one.  All the summary buffers share the same article buffer unless you
10076 tell gnus otherwise.
10077
10078 @menu
10079 * Hiding Headers::              Deciding what headers should be displayed.
10080 * Using MIME::                  Pushing articles through @sc{mime} before reading them.
10081 * Customizing Articles::        Tailoring the look of the articles.
10082 * Article Keymap::              Keystrokes available in the article buffer.
10083 * Misc Article::                Other stuff.
10084 @end menu
10085
10086
10087 @node Hiding Headers
10088 @section Hiding Headers
10089 @cindex hiding headers
10090 @cindex deleting headers
10091
10092 The top section of each article is the @dfn{head}.  (The rest is the
10093 @dfn{body}, but you may have guessed that already.)
10094
10095 @vindex gnus-show-all-headers
10096 There is a lot of useful information in the head: the name of the person
10097 who wrote the article, the date it was written and the subject of the
10098 article.  That's well and nice, but there's also lots of information
10099 most people do not want to see---what systems the article has passed
10100 through before reaching you, the @code{Message-ID}, the
10101 @code{References}, etc. ad nauseum---and you'll probably want to get rid
10102 of some of those lines.  If you want to keep all those lines in the
10103 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10104
10105 Gnus provides you with two variables for sifting headers:
10106
10107 @table @code
10108
10109 @item gnus-visible-headers
10110 @vindex gnus-visible-headers
10111 If this variable is non-@code{nil}, it should be a regular expression
10112 that says what headers you wish to keep in the article buffer.  All
10113 headers that do not match this variable will be hidden.
10114
10115 For instance, if you only want to see the name of the person who wrote
10116 the article and the subject, you'd say:
10117
10118 @lisp
10119 (setq gnus-visible-headers "^From:\\|^Subject:")
10120 @end lisp
10121
10122 This variable can also be a list of regexps to match headers to
10123 remain visible.
10124
10125 @item gnus-ignored-headers
10126 @vindex gnus-ignored-headers
10127 This variable is the reverse of @code{gnus-visible-headers}.  If this
10128 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10129 should be a regular expression that matches all lines that you want to
10130 hide.  All lines that do not match this variable will remain visible.
10131
10132 For instance, if you just want to get rid of the @code{References} field
10133 and the @code{Xref} field, you might say:
10134
10135 @lisp
10136 (setq gnus-ignored-headers "^References:\\|^Xref:")
10137 @end lisp
10138
10139 This variable can also be a list of regexps to match headers to
10140 be removed.
10141
10142 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10143 variable will have no effect.
10144
10145 @end table
10146
10147 @vindex gnus-sorted-header-list
10148 Gnus can also sort the headers for you.  (It does this by default.)  You
10149 can control the sorting by setting the @code{gnus-sorted-header-list}
10150 variable.  It is a list of regular expressions that says in what order
10151 the headers are to be displayed.
10152
10153 For instance, if you want the name of the author of the article first,
10154 and then the subject, you might say something like:
10155
10156 @lisp
10157 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10158 @end lisp
10159
10160 Any headers that are to remain visible, but are not listed in this
10161 variable, will be displayed in random order after all the headers listed in this variable.
10162
10163 @findex gnus-article-hide-boring-headers
10164 @vindex gnus-boring-article-headers
10165 You can hide further boring headers by setting
10166 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10167 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10168 list, but this list doesn't actually contain header names.  Instead is
10169 lists various @dfn{boring conditions} that Gnus can check and remove
10170 from sight.
10171
10172 These conditions are:
10173 @table @code
10174 @item empty
10175 Remove all empty headers.
10176 @item followup-to
10177 Remove the @code{Followup-To} header if it is identical to the
10178 @code{Newsgroups} header.
10179 @item reply-to
10180 Remove the @code{Reply-To} header if it lists the same address as the
10181 @code{From} header.
10182 @item newsgroups
10183 Remove the @code{Newsgroups} header if it only contains the current group
10184 name.
10185 @item to-address
10186 Remove the @code{To} header if it only contains the address identical to
10187 the current groups's @code{to-address} parameter.
10188 @item date
10189 Remove the @code{Date} header if the article is less than three days
10190 old.
10191 @item long-to
10192 Remove the @code{To} header if it is very long.
10193 @item many-to
10194 Remove all @code{To} headers if there are more than one.
10195 @end table
10196
10197 To include these three elements, you could say something like:
10198
10199 @lisp
10200 (setq gnus-boring-article-headers
10201       '(empty followup-to reply-to))
10202 @end lisp
10203
10204 This is also the default value for this variable.
10205
10206
10207 @node Using MIME
10208 @section Using MIME
10209 @cindex @sc{mime}
10210
10211 Mime is a standard for waving your hands through the air, aimlessly,
10212 while people stand around yawning.
10213
10214 @sc{mime}, however, is a standard for encoding your articles, aimlessly,
10215 while all newsreaders die of fear.
10216
10217 @sc{mime} may specify what character set the article uses, the encoding
10218 of the characters, and it also makes it possible to embed pictures and
10219 other naughty stuff in innocent-looking articles.
10220
10221 @vindex gnus-show-mime
10222 @vindex gnus-article-display-method-for-mime
10223 @findex gnus-article-display-mime-message
10224 Gnus handles @sc{mime} by pushing the articles through
10225 @code{gnus-article-display-method-for-mime}, which is
10226 @code{gnus-article-display-mime-message} by default.  This function
10227 calls the @sc{semi} MIME-View program to actually do the work.  For more
10228 information on @sc{semi} MIME-View, see its manual page (however it is
10229 not existed yet, sorry).
10230
10231 Set @code{gnus-show-mime} to @code{t} if you want to use
10232 @sc{mime} all the time.  If you have @code{gnus-show-mime} set, then
10233 you'll see some unfortunate display glitches in the article buffer.
10234 These can't be avoided.
10235
10236 In GNUS or Gnus, it might be best to just use the toggling functions
10237 from the summary buffer to avoid getting nasty surprises. (For instance,
10238 you enter the group @samp{alt.sing-a-long} and, before you know it,
10239 @sc{mime} has decoded the sound file in the article and some horrible
10240 sing-a-long song comes screaming out your speakers, and you can't find
10241 the volume button, because there isn't one, and people are starting to
10242 look at you, and you try to stop the program, but you can't, and you
10243 can't find the program to control the volume, and everybody else in the
10244 room suddenly decides to look at you disdainfully, and you'll feel
10245 rather stupid.)
10246
10247 Any similarity to real events and people is purely coincidental.  Ahem.
10248
10249 To avoid such kind of situation, gnus stops to use
10250 @code{metamail-buffer}.  So now, you can set @code{gnus-show-mime} to
10251 non-@code{nil} every-time, then you can push button in the article
10252 buffer when there are nobody else.
10253
10254 Also see @pxref{MIME Commands}.
10255
10256
10257 @node Customizing Articles
10258 @section Customizing Articles
10259 @cindex article customization
10260
10261 A slew of functions for customizing how the articles are to look like
10262 exist.  You can call these functions interactively, or you can have them
10263 called automatically when you select the articles.
10264
10265 To have them called automatically, you should set the corresponding
10266 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10267 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10268 be set, but first we discuss the values these variables can have.
10269
10270 Note: Some values, while valid, make little sense.  Check the list below
10271 for sensible values.
10272
10273 @enumerate
10274 @item
10275 @code{nil}: Don't do this treatment.
10276
10277 @item
10278 @code{t}: Do this treatment on all body parts.
10279
10280 @item
10281 @code{head}: Do the treatment on the headers.
10282
10283 @item
10284 @code{last}: Do this treatment on the last part.
10285
10286 @item
10287 An integer: Do this treatment on all body parts that have a length less
10288 than this number.
10289
10290 @item
10291 A list of strings: Do this treatment on all body parts that are in
10292 articles that are read in groups that have names that match one of the
10293 regexps in the list.
10294
10295 @item
10296 A list where the first element is not a string:
10297
10298 The list is evaluated recursively.  The first element of the list is a
10299 predicate.  The following predicates are recognized: @code{or},
10300 @code{and}, @code{not} and @code{typep}.  Here's an example:
10301
10302 @lisp
10303 (or last
10304     (typep "text/x-vcard"))
10305 @end lisp
10306
10307 @item
10308 @code{mime}: Do this treatment if the value of @code{gnus-show-mime}' is
10309 non-nil.
10310
10311 @end enumerate
10312
10313 You may have noticed that the word @dfn{part} is used here.  This refers
10314 to the fact that some messages are @sc{mime} multipart articles that may
10315 be divided into several parts.  Articles that are not multiparts are
10316 considered to contain just a single part.
10317
10318 @vindex gnus-article-treat-types
10319 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10320 want to, but by default, only @samp{text/plain} parts are given the
10321 treatment.  This is controlled by the @code{gnus-article-treat-types}
10322 variable, which is a list of regular expressions that are matched to the
10323 type of the part.  This variable is ignored if the value of the
10324 controlling variable is a predicate list, as described above.
10325
10326 The following treatment options are available.  The easiest way to
10327 customize this is to examine the @code{gnus-article-treat} customization
10328 group.  Values in parenthesis are suggested sensible values.  Others are
10329 possible but those listed are probably sufficient for most people.
10330
10331 @table @code
10332 @item gnus-treat-buttonize (t, integer)
10333 @item gnus-treat-buttonize-head (head)
10334
10335 @xref{Article Buttons}.
10336
10337 @item gnus-treat-capitalize-sentences (t, integer)
10338 @item gnus-treat-overstrike (t, integer)
10339 @item gnus-treat-strip-cr (t, integer)
10340 @item gnus-treat-strip-headers-in-body (t, integer)
10341 @item gnus-treat-strip-leading-blank-lines (t, integer)
10342 @item gnus-treat-strip-multiple-blank-lines (t, integer)
10343 @item gnus-treat-strip-pem (t, last, integer)
10344 @item gnus-treat-strip-pgp (t, last, integer)
10345 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
10346 @item gnus-treat-unsplit-urls (t, integer)
10347 @item gnus-treat-decode-article-as-default-mime-charset (t, integer)
10348
10349 @xref{Article Washing}.
10350
10351 @item gnus-treat-date-english (head)
10352 @item gnus-treat-date-iso8601 (head)
10353 @item gnus-treat-date-lapsed (head)
10354 @item gnus-treat-date-local (head)
10355 @item gnus-treat-date-original (head)
10356 @item gnus-treat-date-user-defined (head)
10357 @item gnus-treat-date-ut (head)
10358
10359 @xref{Article Date}.
10360
10361 @item gnus-treat-from-picon (head)
10362 @item gnus-treat-mail-picon (head)
10363 @item gnus-treat-newsgroups-picon (head)
10364
10365 @xref{Picons}.
10366
10367 @item gnus-treat-display-smileys (t, integer)
10368
10369 @item gnus-treat-body-boundary (head)
10370
10371 @vindex gnus-body-boundary-delimiter
10372 Adds a delimiter between header and body, the string used as delimiter
10373 is controlled by @code{gnus-body-boundary-delimiter}.
10374
10375 @xref{Smileys}.
10376
10377 @item gnus-treat-display-xface (head)
10378
10379 @xref{X-Face}.
10380
10381 @item gnus-treat-emphasize (t, head, integer)
10382 @item gnus-treat-fill-article (t, integer)
10383 @item gnus-treat-fill-long-lines (t, integer)
10384 @item gnus-treat-hide-boring-headers (head)
10385 @item gnus-treat-hide-citation (t, integer)
10386 @item gnus-treat-hide-citation-maybe (t, integer)
10387 @item gnus-treat-hide-headers (head)
10388 @item gnus-treat-hide-signature (t, last)
10389
10390 @xref{Article Hiding}.
10391
10392 @item gnus-treat-highlight-citation (t, integer)
10393 @item gnus-treat-highlight-headers (head)
10394 @item gnus-treat-highlight-signature (t, last, integer)
10395
10396 @xref{Article Highlighting}.
10397
10398 @item gnus-treat-play-sounds
10399 @item gnus-treat-translate
10400 @item gnus-treat-x-pgp-sig (head)
10401
10402 @item gnus-treat-unfold-headers (head)
10403 @item gnus-treat-fold-headers (head)
10404 @item gnus-treat-fold-newsgroups (head)
10405 @item gnus-treat-leading-whitespace (head)
10406
10407 @xref{Article Header}.
10408
10409
10410 @end table
10411
10412 @vindex gnus-part-display-hook
10413 You can, of course, write your own functions to be called from
10414 @code{gnus-part-display-hook}.  The functions are called narrowed to the
10415 part, and you can do anything you like, pretty much.  There is no
10416 information that you have to keep in the buffer---you can change
10417 everything.
10418
10419
10420 @node Article Keymap
10421 @section Article Keymap
10422
10423 Most of the keystrokes in the summary buffer can also be used in the
10424 article buffer.  They should behave as if you typed them in the summary
10425 buffer, which means that you don't actually have to have a summary
10426 buffer displayed while reading.  You can do it all from the article
10427 buffer.
10428
10429 A few additional keystrokes are available:
10430
10431 @table @kbd
10432
10433 @item SPACE
10434 @kindex SPACE (Article)
10435 @findex gnus-article-next-page
10436 Scroll forwards one page (@code{gnus-article-next-page}).
10437
10438 @item DEL
10439 @kindex DEL (Article)
10440 @findex gnus-article-prev-page
10441 Scroll backwards one page (@code{gnus-article-prev-page}).
10442
10443 @item C-c ^
10444 @kindex C-c ^ (Article)
10445 @findex gnus-article-refer-article
10446 If point is in the neighborhood of a @code{Message-ID} and you press
10447 @kbd{C-c ^}, Gnus will try to get that article from the server
10448 (@code{gnus-article-refer-article}).
10449
10450 @item C-c C-m
10451 @kindex C-c C-m (Article)
10452 @findex gnus-article-mail
10453 Send a reply to the address near point (@code{gnus-article-mail}).  If
10454 given a prefix, include the mail.
10455
10456 @item s
10457 @kindex s (Article)
10458 @findex gnus-article-show-summary
10459 Reconfigure the buffers so that the summary buffer becomes visible
10460 (@code{gnus-article-show-summary}).
10461
10462 @item ?
10463 @kindex ? (Article)
10464 @findex gnus-article-describe-briefly
10465 Give a very brief description of the available keystrokes
10466 (@code{gnus-article-describe-briefly}).
10467
10468 @item TAB
10469 @kindex TAB (Article)
10470 @findex gnus-article-next-button
10471 Go to the next button, if any (@code{gnus-article-next-button}).  This
10472 only makes sense if you have buttonizing turned on.
10473
10474 @item M-TAB
10475 @kindex M-TAB (Article)
10476 @findex gnus-article-prev-button
10477 Go to the previous button, if any (@code{gnus-article-prev-button}).
10478
10479 @item R
10480 @kindex R (Article)
10481 @findex gnus-article-reply-with-original
10482 Send a reply to the current article and yank the current article
10483 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
10484 wide reply.  If the region is active, only yank the text in the
10485 region.
10486
10487 @item F
10488 @kindex F (Article)
10489 @findex gnus-article-followup-with-original
10490 Send a followup to the current article and yank the current article
10491 (@code{gnus-article-followup-with-original}).  If given a prefix, make
10492 a wide reply.  If the region is active, only yank the text in the
10493 region.
10494
10495
10496 @end table
10497
10498
10499 @node Misc Article
10500 @section Misc Article
10501
10502 @table @code
10503
10504 @item gnus-single-article-buffer
10505 @vindex gnus-single-article-buffer
10506 If non-@code{nil}, use the same article buffer for all the groups.
10507 (This is the default.)  If @code{nil}, each group will have its own
10508 article buffer.
10509
10510 @vindex gnus-article-decode-hook
10511 @item gnus-article-decode-hook
10512 @cindex MIME
10513 Hook used to decode @sc{mime} articles.  The default value is
10514 @code{(article-decode-charset article-decode-encoded-words)}
10515
10516 @vindex gnus-article-prepare-hook
10517 @item gnus-article-prepare-hook
10518 This hook is called right after the article has been inserted into the
10519 article buffer.  It is mainly intended for functions that do something
10520 depending on the contents; it should probably not be used for changing
10521 the contents of the article buffer.
10522
10523 @item gnus-article-mode-hook
10524 @vindex gnus-article-mode-hook
10525 Hook called in article mode buffers.
10526
10527 @item gnus-article-mode-syntax-table
10528 @vindex gnus-article-mode-syntax-table
10529 Syntax table used in article buffers.  It is initialized from
10530 @code{text-mode-syntax-table}.
10531
10532 @vindex gnus-article-mode-line-format
10533 @item gnus-article-mode-line-format
10534 This variable is a format string along the same lines as
10535 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
10536 accepts the same format specifications as that variable, with two
10537 extensions:
10538
10539 @table @samp
10540
10541 @item w
10542 The @dfn{wash status} of the article.  This is a short string with one
10543 character for each possible article wash operation that may have been
10544 performed.  The characters and their meaning:
10545
10546 @table @samp
10547
10548 @item c
10549 Displayed when cited text may be hidden in the article buffer.
10550
10551 @item h
10552 Displayed when headers are hidden in the article buffer.
10553
10554 @item p
10555 Displayed when article is digitally signed or encrypted, and Gnus has
10556 hidden the security headers.  (N.B. does not tell anything about
10557 security status, i.e. good or bad signature.)
10558
10559 @item s
10560 Displayed when the signature has been hidden in the Article buffer.
10561
10562 @item o
10563 Displayed when Gnus has treated overstrike characters in the article buffer.
10564
10565 @item e
10566 Displayed when Gnus has treated emphasised strings in the article buffer.
10567
10568 @end table
10569
10570 @item m
10571 The number of @sc{mime} parts in the article.
10572
10573 @end table
10574
10575 @vindex gnus-break-pages
10576
10577 @item gnus-break-pages
10578 Controls whether @dfn{page breaking} is to take place.  If this variable
10579 is non-@code{nil}, the articles will be divided into pages whenever a
10580 page delimiter appears in the article.  If this variable is @code{nil},
10581 paging will not be done.
10582
10583 @item gnus-page-delimiter
10584 @vindex gnus-page-delimiter
10585 This is the delimiter mentioned above.  By default, it is @samp{^L}
10586 (formfeed).
10587 @end table
10588
10589
10590 @node Composing Messages
10591 @chapter Composing Messages
10592 @cindex composing messages
10593 @cindex messages
10594 @cindex mail
10595 @cindex sending mail
10596 @cindex reply
10597 @cindex followup
10598 @cindex post
10599 @cindex using gpg
10600 @cindex using s/mime
10601 @cindex using smime
10602
10603 @kindex C-c C-c (Post)
10604 All commands for posting and mailing will put you in a message buffer
10605 where you can edit the article all you like, before you send the
10606 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
10607 Message Manual}.  Where the message will be posted/mailed to depends
10608 on your setup (@pxref{Posting Server}).
10609
10610 @menu
10611 * Mail::                        Mailing and replying.
10612 * Posting Server::              What server should you post and mail via?
10613 * Mail and Post::               Mailing and posting at the same time.
10614 * Archived Messages::           Where Gnus stores the messages you've sent.
10615 * Posting Styles::              An easier way to specify who you are.
10616 * Drafts::                      Postponing messages and rejected messages.
10617 * Rejected Articles::           What happens if the server doesn't like your article?
10618 * Signing and encrypting::      How to compose secure messages.
10619 @end menu
10620
10621 Also see @pxref{Canceling and Superseding} for information on how to
10622 remove articles you shouldn't have posted.
10623
10624
10625 @node Mail
10626 @section Mail
10627
10628 Variables for customizing outgoing mail:
10629
10630 @table @code
10631 @item gnus-uu-digest-headers
10632 @vindex gnus-uu-digest-headers
10633 List of regexps to match headers included in digested messages.  The
10634 headers will be included in the sequence they are matched.
10635
10636 @item gnus-add-to-list
10637 @vindex gnus-add-to-list
10638 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
10639 that have none when you do a @kbd{a}.
10640
10641 @end table
10642
10643
10644 @node Posting Server
10645 @section Posting Server
10646
10647 When you press those magical @kbd{C-c C-c} keys to ship off your latest
10648 (extremely intelligent, of course) article, where does it go?
10649
10650 Thank you for asking.  I hate you.
10651
10652 It can be quite complicated.  
10653
10654 @vindex gnus-post-method
10655 When posting news, Message usually invokes @code{message-send-news}
10656 (@pxref{News Variables, , News Variables, message, Message Manual}).
10657 Normally, Gnus will post using the same select method as you're
10658 reading from (which might be convenient if you're reading lots of
10659 groups from different private servers).  However.  If the server
10660 you're reading from doesn't allow posting, just reading, you probably
10661 want to use some other server to post your (extremely intelligent and
10662 fabulously interesting) articles.  You can then set the
10663 @code{gnus-post-method} to some other method:
10664
10665 @lisp
10666 (setq gnus-post-method '(nnspool ""))
10667 @end lisp
10668
10669 Now, if you've done this, and then this server rejects your article, or
10670 this server is down, what do you do then?  To override this variable you
10671 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
10672 the ``current'' server, to get back the default behavior, for posting.
10673
10674 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
10675 gnus will prompt you for what method to use for posting.
10676
10677 You can also set @code{gnus-post-method} to a list of select methods.
10678 If that's the case, gnus will always prompt you for what method to use
10679 for posting.
10680
10681 Finally, if you want to always post using the native select method,
10682 you can set this variable to @code{native}.
10683
10684 When sending mail, Message invokes @code{message-send-mail-function}.
10685 The default function, @code{message-send-mail-with-sendmail}, pipes
10686 your article to the @code{sendmail} binary for further queuing and
10687 sending.  When your local system is not configured for sending mail
10688 using @code{sendmail}, and you have access to a remote @sc{smtp}
10689 server, you can set @code{message-send-mail-function} to
10690 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
10691 package correctly.  An example:
10692
10693 @lisp
10694 (setq message-send-mail-function 'smtpmail-send-it
10695       smtpmail-default-smtp-server "YOUR SMTP HOST")
10696 @end lisp
10697
10698 Other possible choises for @code{message-send-mail-function} includes
10699 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
10700 and @code{feedmail-send-it}.
10701
10702 @node Mail and Post
10703 @section Mail and Post
10704
10705 Here's a list of variables relevant to both mailing and
10706 posting:
10707
10708 @table @code
10709 @item gnus-mailing-list-groups
10710 @findex gnus-mailing-list-groups
10711 @cindex mailing lists
10712
10713 If your news server offers groups that are really mailing lists
10714 gatewayed to the @sc{nntp} server, you can read those groups without
10715 problems, but you can't post/followup to them without some difficulty.
10716 One solution is to add a @code{to-address} to the group parameters
10717 (@pxref{Group Parameters}).  An easier thing to do is set the
10718 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
10719 really are mailing lists.  Then, at least, followups to the mailing
10720 lists will work most of the time.  Posting to these groups (@kbd{a}) is
10721 still a pain, though.
10722
10723 @end table
10724
10725 You may want to do spell-checking on messages that you send out.  Or, if
10726 you don't want to spell-check by hand, you could add automatic
10727 spell-checking via the @code{ispell} package:
10728
10729 @cindex ispell
10730 @findex ispell-message
10731 @lisp
10732 (add-hook 'message-send-hook 'ispell-message)
10733 @end lisp
10734
10735 If you want to change the @code{ispell} dictionary based on what group
10736 you're in, you could say something like the following:
10737
10738 @lisp
10739 (add-hook 'gnus-select-group-hook
10740           (lambda ()
10741             (cond
10742              ((string-match
10743                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
10744               (ispell-change-dictionary "deutsch"))
10745              (t
10746               (ispell-change-dictionary "english")))))
10747 @end lisp
10748
10749 Modify to suit your needs.
10750
10751
10752 @node Archived Messages
10753 @section Archived Messages
10754 @cindex archived messages
10755 @cindex sent messages
10756
10757 Gnus provides a few different methods for storing the mail and news you
10758 send.  The default method is to use the @dfn{archive virtual server} to
10759 store the messages.  If you want to disable this completely, the
10760 @code{gnus-message-archive-group} variable should be @code{nil}, which
10761 is the default.
10762
10763 For archiving interesting messages in a group you read, see the
10764 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
10765 Group Commands}).
10766
10767 @vindex gnus-message-archive-method
10768 @code{gnus-message-archive-method} says what virtual server gnus is to
10769 use to store sent messages.  The default is:
10770
10771 @lisp
10772 (nnfolder "archive"
10773           (nnfolder-directory   "~/Mail/archive")
10774           (nnfolder-active-file "~/Mail/archive/active")
10775           (nnfolder-get-new-mail nil)
10776           (nnfolder-inhibit-expiry t))
10777 @end lisp
10778
10779 You can, however, use any mail select method (@code{nnml},
10780 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
10781 for doing this sort of thing, though.  If you don't like the default
10782 directory chosen, you could say something like:
10783
10784 @lisp
10785 (setq gnus-message-archive-method
10786       '(nnfolder "archive"
10787                  (nnfolder-inhibit-expiry t)
10788                  (nnfolder-active-file "~/News/sent-mail/active")
10789                  (nnfolder-directory "~/News/sent-mail/")))
10790 @end lisp
10791
10792 @vindex gnus-message-archive-group
10793 @cindex Gcc
10794 Gnus will insert @code{Gcc} headers in all outgoing messages that point
10795 to one or more group(s) on that server.  Which group to use is
10796 determined by the @code{gnus-message-archive-group} variable.
10797
10798 This variable can be used to do the following:
10799
10800 @itemize @bullet
10801 @item
10802 a string
10803 Messages will be saved in that group.
10804
10805 Note that you can include a select method in the group name, then the
10806 message will not be stored in the select method given by
10807 @code{gnus-message-archive-method}, but in the select method specified
10808 by the group name, instead.  Suppose @code{gnus-message-archive-method}
10809 has the default value shown above.  Then setting
10810 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
10811 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
10812 value @code{"nnml:foo"}, then outgoing messages will be stored in
10813 @samp{nnml:foo}.
10814 @item
10815 a list of strings
10816 Messages will be saved in all those groups.
10817 @item
10818 an alist of regexps, functions and forms
10819 When a key ``matches'', the result is used.
10820 @item
10821 @code{nil}
10822 No message archiving will take place.  This is the default.
10823 @end itemize
10824
10825 Let's illustrate:
10826
10827 Just saving to a single group called @samp{MisK}:
10828 @lisp
10829 (setq gnus-message-archive-group "MisK")
10830 @end lisp
10831
10832 Saving to two groups, @samp{MisK} and @samp{safe}:
10833 @lisp
10834 (setq gnus-message-archive-group '("MisK" "safe"))
10835 @end lisp
10836
10837 Save to different groups based on what group you are in:
10838 @lisp
10839 (setq gnus-message-archive-group
10840       '(("^alt" "sent-to-alt")
10841         ("mail" "sent-to-mail")
10842         (".*" "sent-to-misc")))
10843 @end lisp
10844
10845 More complex stuff:
10846 @lisp
10847 (setq gnus-message-archive-group
10848       '((if (message-news-p)
10849             "misc-news"
10850           "misc-mail")))
10851 @end lisp
10852
10853 How about storing all news messages in one file, but storing all mail
10854 messages in one file per month:
10855
10856 @lisp
10857 (setq gnus-message-archive-group
10858       '((if (message-news-p)
10859             "misc-news"
10860           (concat "mail." (format-time-string "%Y-%m")))))
10861 @end lisp
10862
10863 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
10864 @c use a different value for @code{gnus-message-archive-group} there.)
10865
10866 Now, when you send a message off, it will be stored in the appropriate
10867 group.  (If you want to disable storing for just one particular message,
10868 you can just remove the @code{Gcc} header that has been inserted.)  The
10869 archive group will appear in the group buffer the next time you start
10870 gnus, or the next time you press @kbd{F} in the group buffer.  You can
10871 enter it and read the articles in it just like you'd read any other
10872 group.  If the group gets really big and annoying, you can simply rename
10873 if (using @kbd{G r} in the group buffer) to something
10874 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
10875 continue to be stored in the old (now empty) group.
10876
10877 That's the default method of archiving sent messages.  Gnus offers a
10878 different way for the people who don't like the default method.  In that
10879 case you should set @code{gnus-message-archive-group} to @code{nil};
10880 this will disable archiving.
10881
10882 @table @code
10883 @item gnus-outgoing-message-group
10884 @vindex gnus-outgoing-message-group
10885 All outgoing messages will be put in this group.  If you want to store
10886 all your outgoing mail and articles in the group @samp{nnml:archive},
10887 you set this variable to that value.  This variable can also be a list of
10888 group names.
10889
10890 If you want to have greater control over what group to put each
10891 message in, you can set this variable to a function that checks the
10892 current newsgroup name and then returns a suitable group name (or list
10893 of names).
10894
10895 This variable can be used instead of @code{gnus-message-archive-group},
10896 but the latter is the preferred method.
10897
10898 @item gnus-gcc-mark-as-read
10899 @vindex gnus-gcc-mark-as-read
10900 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
10901
10902 @item gnus-gcc-externalize-attachments
10903 @vindex gnus-gcc-externalize-attachments
10904 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
10905 and matches the Gcc group name, attach files as external parts; if it is
10906 @code{all}, attach local files as external parts; if it is other
10907 non-@code{nil}, the behavior is the same as @code{all}, but it may be
10908 changed in the future.
10909
10910 @end table
10911
10912
10913 @node Posting Styles
10914 @section Posting Styles
10915 @cindex posting styles
10916 @cindex styles
10917
10918 All them variables, they make my head swim.
10919
10920 So what if you want a different @code{Organization} and signature based
10921 on what groups you post to?  And you post both from your home machine
10922 and your work machine, and you want different @code{From} lines, and so
10923 on?
10924
10925 @vindex gnus-posting-styles
10926 One way to do stuff like that is to write clever hooks that change the
10927 variables you need to have changed.  That's a bit boring, so somebody
10928 came up with the bright idea of letting the user specify these things in
10929 a handy alist.  Here's an example of a @code{gnus-posting-styles}
10930 variable:
10931
10932 @lisp
10933 ((".*"
10934   (signature "Peace and happiness")
10935   (organization "What me?"))
10936  ("^comp"
10937   (signature "Death to everybody"))
10938  ("comp.emacs.i-love-it"
10939   (organization "Emacs is it")))
10940 @end lisp
10941
10942 As you might surmise from this example, this alist consists of several
10943 @dfn{styles}.  Each style will be applicable if the first element
10944 ``matches'', in some form or other.  The entire alist will be iterated
10945 over, from the beginning towards the end, and each match will be
10946 applied, which means that attributes in later styles that match override
10947 the same attributes in earlier matching styles.  So
10948 @samp{comp.programming.literate} will have the @samp{Death to everybody}
10949 signature and the @samp{What me?} @code{Organization} header.
10950
10951 The first element in each style is called the @code{match}.  If it's a
10952 string, then Gnus will try to regexp match it against the group name.
10953 If it is the form @code{(header MATCH REGEXP)}, then Gnus will look in
10954 the original article for a header whose name is MATCH and compare that
10955 REGEXP.  MATCH and REGEXP are strings. If it's a function symbol, that
10956 function will be called with no arguments.  If it's a variable symbol,
10957 then the variable will be referenced.  If it's a list, then that list
10958 will be @code{eval}ed.  In any case, if this returns a non-@code{nil}
10959 value, then the style is said to @dfn{match}.
10960
10961 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
10962 attribute consists of a @code{(@var{name} @var{value})} pair.  The
10963 attribute name can be one of @code{signature}, @code{signature-file},
10964 @code{x-face-file}, @code{address} (overriding
10965 @code{user-mail-address}), @code{name} (overriding
10966 @code{(user-full-name)}) or @code{body}.  The attribute name can also
10967 be a string or a symbol.  In that case, this will be used as a header
10968 name, and the value will be inserted in the headers of the article; if
10969 the value is @code{nil}, the header name will be removed.  If the
10970 attribute name is @code{eval}, the form is evaluated, and the result
10971 is thrown away.
10972
10973 The attribute value can be a string (used verbatim), a function with
10974 zero arguments (the return value will be used), a variable (its value
10975 will be used) or a list (it will be @code{eval}ed and the return value
10976 will be used).  The functions and sexps are called/@code{eval}ed in the
10977 message buffer that is being set up.  The headers of the current article
10978 are available through the @code{message-reply-headers} variable, which
10979 is a vector of the following headers: number subject from date id
10980 references chars lines xref extra.
10981
10982 @vindex message-reply-headers
10983
10984 If you wish to check whether the message you are about to compose is
10985 meant to be a news article or a mail message, you can check the values
10986 of the @code{message-news-p} and @code{message-mail-p} functions.
10987
10988 @findex message-mail-p
10989 @findex message-news-p
10990
10991 So here's a new example:
10992
10993 @lisp
10994 (setq gnus-posting-styles
10995       '((".*"
10996          (signature-file "~/.signature")
10997          (name "User Name")
10998          ("X-Home-Page" (getenv "WWW_HOME"))
10999          (organization "People's Front Against MWM"))
11000         ("^rec.humor"
11001          (signature my-funny-signature-randomizer))
11002         ((equal (system-name) "gnarly")  ;; A form
11003          (signature my-quote-randomizer))
11004         (message-news-p        ;; A function symbol
11005          (signature my-news-signature))
11006         (window-system         ;; A value symbol
11007          ("X-Window-System" (format "%s" window-system)))
11008         ;; If I'm replying to Larsi, set the Organization header.
11009         ((header "to" "larsi.*org")
11010          (Organization "Somewhere, Inc."))
11011         ((posting-from-work-p) ;; A user defined function
11012          (signature-file "~/.work-signature")
11013          (address "user@@bar.foo")
11014          (body "You are fired.\n\nSincerely, your boss.")
11015          (organization "Important Work, Inc"))
11016         ("nnml:.*"
11017          (From (save-excursion
11018                  (set-buffer gnus-article-buffer)
11019                  (message-fetch-field "to"))))
11020         ("^nn.+:"
11021          (signature-file "~/.mail-signature"))))
11022 @end lisp
11023
11024 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11025 @code{From} address in all your outgoing replies, which might be handy
11026 if you fill many roles.
11027
11028
11029 @node Drafts
11030 @section Drafts
11031 @cindex drafts
11032
11033 If you are writing a message (mail or news) and suddenly remember that
11034 you have a steak in the oven (or some pesto in the food processor, you
11035 craaazy vegetarians), you'll probably wish there was a method to save
11036 the message you are writing so that you can continue editing it some
11037 other day, and send it when you feel its finished.
11038
11039 Well, don't worry about it.  Whenever you start composing a message of
11040 some sort using the gnus mail and post commands, the buffer you get will
11041 automatically associate to an article in a special @dfn{draft} group.
11042 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11043 article will be saved there.  (Auto-save files also go to the draft
11044 group.)
11045
11046 @cindex nndraft
11047 @vindex nndraft-directory
11048 The draft group is a special group (which is implemented as an
11049 @code{nndraft} group, if you absolutely have to know) called
11050 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11051 @code{nndraft} is to store its files.  What makes this group special is
11052 that you can't tick any articles in it or mark any articles as
11053 read---all articles in the group are permanently unread.
11054
11055 If the group doesn't exist, it will be created and you'll be subscribed
11056 to it.  The only way to make it disappear from the Group buffer is to
11057 unsubscribe it.
11058
11059 @c @findex gnus-dissociate-buffer-from-draft
11060 @c @kindex C-c M-d (Mail)
11061 @c @kindex C-c M-d (Post)
11062 @c @findex gnus-associate-buffer-with-draft
11063 @c @kindex C-c C-d (Mail)
11064 @c @kindex C-c C-d (Post)
11065 @c If you're writing some super-secret message that you later want to
11066 @c encode with PGP before sending, you may wish to turn the auto-saving
11067 @c (and association with the draft group) off.  You never know who might be
11068 @c interested in reading all your extremely valuable and terribly horrible
11069 @c and interesting secrets.  The @kbd{C-c M-d}
11070 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11071 @c If you change your mind and want to turn the auto-saving back on again,
11072 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11073 @c
11074 @c @vindex gnus-use-draft
11075 @c To leave association with the draft group off by default, set
11076 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11077
11078 @findex gnus-draft-edit-message
11079 @kindex D e (Draft)
11080 When you want to continue editing the article, you simply enter the
11081 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11082 that.  You will be placed in a buffer where you left off.
11083
11084 Rejected articles will also be put in this draft group (@pxref{Rejected
11085 Articles}).
11086
11087 @findex gnus-draft-send-all-messages
11088 @findex gnus-draft-send-message
11089 If you have lots of rejected messages you want to post (or mail) without
11090 doing further editing, you can use the @kbd{D s} command
11091 (@code{gnus-draft-send-message}).  This command understands the
11092 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11093 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11094 in the buffer.
11095
11096 If you have some messages that you wish not to send, you can use the
11097 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11098 as unsendable.  This is a toggling command.
11099
11100
11101 @node Rejected Articles
11102 @section Rejected Articles
11103 @cindex rejected articles
11104
11105 Sometimes a news server will reject an article.  Perhaps the server
11106 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11107 @emph{there be demons}.  Perhaps you have included too much cited text.
11108 Perhaps the disk is full.  Perhaps the server is down.
11109
11110 These situations are, of course, totally beyond the control of gnus.
11111 (Gnus, of course, loves the way you look, always feels great, has angels
11112 fluttering around inside of it, doesn't care about how much cited text
11113 you include, never runs full and never goes down.)  So gnus saves these
11114 articles until some later time when the server feels better.
11115
11116 The rejected articles will automatically be put in a special draft group
11117 (@pxref{Drafts}).  When the server comes back up again, you'd then
11118 typically enter that group and send all the articles off.
11119
11120 @node Signing and encrypting
11121 @section Signing and encrypting
11122 @cindex using gpg
11123 @cindex using s/mime
11124 @cindex using smime
11125
11126 Gnus can digitally sign and encrypt your messages, using vanilla PGP
11127 format or @sc{pgp/mime} or @sc{s/mime}.  For decoding such messages,
11128 see the @code{mm-verify-option} and @code{mm-decrypt-option} options
11129 (@pxref{Security}).
11130
11131 For PGP, Gnus supports two external libraries, @sc{gpg.el} and
11132 @sc{Mailcrypt}, you need to install at least one of them.  The
11133 @sc{s/mime} support in Gnus requires the external program OpenSSL.
11134
11135 Instructing MML to perform security operations on a @sc{mime} part is
11136 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11137 C-m c} key map for encryption, as follows.
11138
11139 @table @kbd
11140
11141 @item C-c C-m s s
11142 @kindex C-c C-m s s
11143 @findex mml-secure-sign-smime
11144
11145 Digitally sign current @sc{mime} part using @sc{s/mime}.
11146
11147 @item C-c C-m s o
11148 @kindex C-c C-m s o
11149 @findex mml-secure-sign-pgp
11150
11151 Digitally sign current @sc{mime} part using PGP.
11152
11153 @item C-c C-m s p
11154 @kindex C-c C-m s p
11155 @findex mml-secure-sign-pgp
11156
11157 Digitally sign current @sc{mime} part using @sc{pgp/mime}.
11158
11159 @item C-c C-m c s
11160 @kindex C-c C-m c s
11161 @findex mml-secure-encrypt-smime
11162
11163 Digitally encrypt current @sc{mime} part using @sc{s/mime}.
11164
11165 @item C-c C-m c o
11166 @kindex C-c C-m c o
11167 @findex mml-secure-encrypt-pgp
11168
11169 Digitally encrypt current @sc{mime} part using PGP.
11170
11171 @item C-c C-m c p
11172 @kindex C-c C-m c p
11173 @findex mml-secure-encrypt-pgpmime
11174
11175 Digitally encrypt current @sc{mime} part using @sc{pgp/mime}.
11176
11177 @item C-c C-m C-n
11178 @kindex C-c C-m C-n
11179 @findex mml-unsecure-message
11180 Remove security related MML tags from message.
11181
11182 @end table
11183
11184 Also @xref{Security, ,Security, message, Message Manual}.
11185
11186 @node Select Methods
11187 @chapter Select Methods
11188 @cindex foreign groups
11189 @cindex select methods
11190
11191 A @dfn{foreign group} is a group not read by the usual (or
11192 default) means.  It could be, for instance, a group from a different
11193 @sc{nntp} server, it could be a virtual group, or it could be your own
11194 personal mail group.
11195
11196 A foreign group (or any group, really) is specified by a @dfn{name} and
11197 a @dfn{select method}.  To take the latter first, a select method is a
11198 list where the first element says what back end to use (e.g. @code{nntp},
11199 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11200 name}.  There may be additional elements in the select method, where the
11201 value may have special meaning for the back end in question.
11202
11203 One could say that a select method defines a @dfn{virtual server}---so
11204 we do just that (@pxref{Server Buffer}).
11205
11206 The @dfn{name} of the group is the name the back end will recognize the
11207 group as.
11208
11209 For instance, the group @samp{soc.motss} on the @sc{nntp} server
11210 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11211 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11212 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11213 back end just knows this group as @samp{soc.motss}.
11214
11215 The different methods all have their peculiarities, of course.
11216
11217 @menu
11218 * Server Buffer::               Making and editing virtual servers.
11219 * Getting News::                Reading USENET news with Gnus.
11220 * Getting Mail::                Reading your personal mail with Gnus.
11221 * Browsing the Web::            Getting messages from a plethora of Web sources.
11222 * IMAP::                        Using Gnus as a @sc{imap} client.
11223 * Other Sources::               Reading directories, files, SOUP packets.
11224 * Combined Groups::             Combining groups into one group.
11225 * Gnus Unplugged::              Reading news and mail offline.
11226 @end menu
11227
11228
11229 @node Server Buffer
11230 @section Server Buffer
11231
11232 Traditionally, a @dfn{server} is a machine or a piece of software that
11233 one connects to, and then requests information from.  Gnus does not
11234 connect directly to any real servers, but does all transactions through
11235 one back end or other.  But that's just putting one layer more between
11236 the actual media and Gnus, so we might just as well say that each
11237 back end represents a virtual server.
11238
11239 For instance, the @code{nntp} back end may be used to connect to several
11240 different actual @sc{nntp} servers, or, perhaps, to many different ports
11241 on the same actual @sc{nntp} server.  You tell Gnus which back end to
11242 use, and what parameters to set by specifying a @dfn{select method}.
11243
11244 These select method specifications can sometimes become quite
11245 complicated---say, for instance, that you want to read from the
11246 @sc{nntp} server @samp{news.funet.fi} on port number 13, which
11247 hangs if queried for @sc{nov} headers and has a buggy select.  Ahem.
11248 Anyway, if you had to specify that for each group that used this
11249 server, that would be too much work, so Gnus offers a way of naming
11250 select methods, which is what you do in the server buffer.
11251
11252 To enter the server buffer, use the @kbd{^}
11253 (@code{gnus-group-enter-server-mode}) command in the group buffer.
11254
11255 @menu
11256 * Server Buffer Format::        You can customize the look of this buffer.
11257 * Server Commands::             Commands to manipulate servers.
11258 * Example Methods::             Examples server specifications.
11259 * Creating a Virtual Server::   An example session.
11260 * Server Variables::            Which variables to set.
11261 * Servers and Methods::         You can use server names as select methods.
11262 * Unavailable Servers::         Some servers you try to contact may be down.
11263 @end menu
11264
11265 @vindex gnus-server-mode-hook
11266 @code{gnus-server-mode-hook} is run when creating the server buffer.
11267
11268
11269 @node Server Buffer Format
11270 @subsection Server Buffer Format
11271 @cindex server buffer format
11272
11273 @vindex gnus-server-line-format
11274 You can change the look of the server buffer lines by changing the
11275 @code{gnus-server-line-format} variable.  This is a @code{format}-like
11276 variable, with some simple extensions:
11277
11278 @table @samp
11279
11280 @item h
11281 How the news is fetched---the back end name.
11282
11283 @item n
11284 The name of this server.
11285
11286 @item w
11287 Where the news is to be fetched from---the address.
11288
11289 @item s
11290 The opened/closed/denied status of the server.
11291 @end table
11292
11293 @vindex gnus-server-mode-line-format
11294 The mode line can also be customized by using the
11295 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
11296 Formatting}).  The following specs are understood:
11297
11298 @table @samp
11299 @item S
11300 Server name.
11301
11302 @item M
11303 Server method.
11304 @end table
11305
11306 Also @pxref{Formatting Variables}.
11307
11308
11309 @node Server Commands
11310 @subsection Server Commands
11311 @cindex server commands
11312
11313 @table @kbd
11314
11315 @item a
11316 @kindex a (Server)
11317 @findex gnus-server-add-server
11318 Add a new server (@code{gnus-server-add-server}).
11319
11320 @item e
11321 @kindex e (Server)
11322 @findex gnus-server-edit-server
11323 Edit a server (@code{gnus-server-edit-server}).
11324
11325 @item SPACE
11326 @kindex SPACE (Server)
11327 @findex gnus-server-read-server
11328 Browse the current server (@code{gnus-server-read-server}).
11329
11330 @item q
11331 @kindex q (Server)
11332 @findex gnus-server-exit
11333 Return to the group buffer (@code{gnus-server-exit}).
11334
11335 @item k
11336 @kindex k (Server)
11337 @findex gnus-server-kill-server
11338 Kill the current server (@code{gnus-server-kill-server}).
11339
11340 @item y
11341 @kindex y (Server)
11342 @findex gnus-server-yank-server
11343 Yank the previously killed server (@code{gnus-server-yank-server}).
11344
11345 @item c
11346 @kindex c (Server)
11347 @findex gnus-server-copy-server
11348 Copy the current server (@code{gnus-server-copy-server}).
11349
11350 @item l
11351 @kindex l (Server)
11352 @findex gnus-server-list-servers
11353 List all servers (@code{gnus-server-list-servers}).
11354
11355 @item s
11356 @kindex s (Server)
11357 @findex gnus-server-scan-server
11358 Request that the server scan its sources for new articles
11359 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
11360 servers.
11361
11362 @item g
11363 @kindex g (Server)
11364 @findex gnus-server-regenerate-server
11365 Request that the server regenerate all its data structures
11366 (@code{gnus-server-regenerate-server}).  This can be useful if you have
11367 a mail back end that has gotten out of sync.
11368
11369 @end table
11370
11371
11372 @node Example Methods
11373 @subsection Example Methods
11374
11375 Most select methods are pretty simple and self-explanatory:
11376
11377 @lisp
11378 (nntp "news.funet.fi")
11379 @end lisp
11380
11381 Reading directly from the spool is even simpler:
11382
11383 @lisp
11384 (nnspool "")
11385 @end lisp
11386
11387 As you can see, the first element in a select method is the name of the
11388 back end, and the second is the @dfn{address}, or @dfn{name}, if you
11389 will.
11390
11391 After these two elements, there may be an arbitrary number of
11392 @code{(@var{variable} @var{form})} pairs.
11393
11394 To go back to the first example---imagine that you want to read from
11395 port 15 on that machine.  This is what the select method should
11396 look like then:
11397
11398 @lisp
11399 (nntp "news.funet.fi" (nntp-port-number 15))
11400 @end lisp
11401
11402 You should read the documentation to each back end to find out what
11403 variables are relevant, but here's an @code{nnmh} example:
11404
11405 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
11406 you have two structures that you wish to access: One is your private
11407 mail spool, and the other is a public one.  Here's the possible spec for
11408 your private mail:
11409
11410 @lisp
11411 (nnmh "private" (nnmh-directory "~/private/mail/"))
11412 @end lisp
11413
11414 (This server is then called @samp{private}, but you may have guessed
11415 that.)
11416
11417 Here's the method for a public spool:
11418
11419 @lisp
11420 (nnmh "public"
11421       (nnmh-directory "/usr/information/spool/")
11422       (nnmh-get-new-mail nil))
11423 @end lisp
11424
11425 @cindex proxy
11426 @cindex firewall
11427
11428 If you are behind a firewall and only have access to the @sc{nntp}
11429 server from the firewall machine, you can instruct Gnus to @code{rlogin}
11430 on the firewall machine and telnet from there to the @sc{nntp} server.
11431 Doing this can be rather fiddly, but your virtual server definition
11432 should probably look something like this:
11433
11434 @lisp
11435 (nntp "firewall"
11436       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
11437       (nntp-via-address "the.firewall.machine")
11438       (nntp-address "the.real.nntp.host")
11439       (nntp-end-of-line "\n"))
11440 @end lisp
11441
11442 If you want to use the wonderful @code{ssh} program to provide a
11443 compressed connection over the modem line, you could add the following
11444 configuration to the example above:
11445
11446 @lisp
11447       (nntp-via-rlogin-command "ssh")
11448 @end lisp
11449
11450 If you're behind a firewall, but have direct access to the outside world
11451 through a wrapper command like "runsocks", you could open a socksified
11452 telnet connection to the news server as follows:
11453
11454 @lisp
11455 (nntp "outside"
11456       (nntp-pre-command "runsocks")
11457       (nntp-open-connection-function nntp-open-via-telnet)
11458       (nntp-address "the.news.server")
11459       (nntp-end-of-line "\n"))
11460 @end lisp
11461
11462 This means that you have to have set up @code{ssh-agent} correctly to
11463 provide automatic authorization, of course.  And to get a compressed
11464 connection, you have to have the @samp{Compression} option in the
11465 @code{ssh} @file{config} file.
11466
11467
11468 @node Creating a Virtual Server
11469 @subsection Creating a Virtual Server
11470
11471 If you're saving lots of articles in the cache by using persistent
11472 articles, you may want to create a virtual server to read the cache.
11473
11474 First you need to add a new server.  The @kbd{a} command does that.  It
11475 would probably be best to use @code{nnspool} to read the cache.  You
11476 could also use @code{nnml} or @code{nnmh}, though.
11477
11478 Type @kbd{a nnspool RET cache RET}.
11479
11480 You should now have a brand new @code{nnspool} virtual server called
11481 @samp{cache}.  You now need to edit it to have the right definitions.
11482 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
11483 will contain the following:
11484
11485 @lisp
11486 (nnspool "cache")
11487 @end lisp
11488
11489 Change that to:
11490
11491 @lisp
11492 (nnspool "cache"
11493          (nnspool-spool-directory "~/News/cache/")
11494          (nnspool-nov-directory "~/News/cache/")
11495          (nnspool-active-file "~/News/cache/active"))
11496 @end lisp
11497
11498 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
11499 @kbd{RET} over this virtual server, you should be entered into a browse
11500 buffer, and you should be able to enter any of the groups displayed.
11501
11502
11503 @node Server Variables
11504 @subsection Server Variables
11505
11506 One sticky point when defining variables (both on back ends and in Emacs
11507 in general) is that some variables are typically initialized from other
11508 variables when the definition of the variables is being loaded.  If you
11509 change the "base" variable after the variables have been loaded, you
11510 won't change the "derived" variables.
11511
11512 This typically affects directory and file variables.  For instance,
11513 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
11514 directory variables are initialized from that variable, so
11515 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
11516 new virtual @code{nnml} server, it will @emph{not} suffice to set just
11517 @code{nnml-directory}---you have to explicitly set all the file
11518 variables to be what you want them to be.  For a complete list of
11519 variables for each back end, see each back end's section later in this
11520 manual, but here's an example @code{nnml} definition:
11521
11522 @lisp
11523 (nnml "public"
11524       (nnml-directory "~/my-mail/")
11525       (nnml-active-file "~/my-mail/active")
11526       (nnml-newsgroups-file "~/my-mail/newsgroups"))
11527 @end lisp
11528
11529
11530 @node Servers and Methods
11531 @subsection Servers and Methods
11532
11533 Wherever you would normally use a select method
11534 (e.g. @code{gnus-secondary-select-method}, in the group select method,
11535 when browsing a foreign server) you can use a virtual server name
11536 instead.  This could potentially save lots of typing.  And it's nice all
11537 over.
11538
11539
11540 @node Unavailable Servers
11541 @subsection Unavailable Servers
11542
11543 If a server seems to be unreachable, Gnus will mark that server as
11544 @code{denied}.  That means that any subsequent attempt to make contact
11545 with that server will just be ignored.  ``It can't be opened,'' Gnus
11546 will tell you, without making the least effort to see whether that is
11547 actually the case or not.
11548
11549 That might seem quite naughty, but it does make sense most of the time.
11550 Let's say you have 10 groups subscribed to on server
11551 @samp{nephelococcygia.com}.  This server is located somewhere quite far
11552 away from you and the machine is quite slow, so it takes 1 minute just
11553 to find out that it refuses connection to you today.  If Gnus were to
11554 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
11555 attempt to do that.  Once it has gotten a single ``connection refused'',
11556 it will regard that server as ``down''.
11557
11558 So, what happens if the machine was only feeling unwell temporarily?
11559 How do you test to see whether the machine has come up again?
11560
11561 You jump to the server buffer (@pxref{Server Buffer}) and poke it
11562 with the following commands:
11563
11564 @table @kbd
11565
11566 @item O
11567 @kindex O (Server)
11568 @findex gnus-server-open-server
11569 Try to establish connection to the server on the current line
11570 (@code{gnus-server-open-server}).
11571
11572 @item C
11573 @kindex C (Server)
11574 @findex gnus-server-close-server
11575 Close the connection (if any) to the server
11576 (@code{gnus-server-close-server}).
11577
11578 @item D
11579 @kindex D (Server)
11580 @findex gnus-server-deny-server
11581 Mark the current server as unreachable
11582 (@code{gnus-server-deny-server}).
11583
11584 @item M-o
11585 @kindex M-o (Server)
11586 @findex gnus-server-open-all-servers
11587 Open the connections to all servers in the buffer
11588 (@code{gnus-server-open-all-servers}).
11589
11590 @item M-c
11591 @kindex M-c (Server)
11592 @findex gnus-server-close-all-servers
11593 Close the connections to all servers in the buffer
11594 (@code{gnus-server-close-all-servers}).
11595
11596 @item R
11597 @kindex R (Server)
11598 @findex gnus-server-remove-denials
11599 Remove all marks to whether Gnus was denied connection from any servers
11600 (@code{gnus-server-remove-denials}).
11601
11602 @item L
11603 @kindex L (Server)
11604 @findex gnus-server-offline-server
11605 Set server status to offline (@code{gnus-server-offline-server}).
11606
11607 @end table
11608
11609
11610 @node Getting News
11611 @section Getting News
11612 @cindex reading news
11613 @cindex news back ends
11614
11615 A newsreader is normally used for reading news.  Gnus currently provides
11616 only two methods of getting news---it can read from an @sc{nntp} server,
11617 or it can read from a local spool.
11618
11619 @menu
11620 * NNTP::                        Reading news from an @sc{nntp} server.
11621 * News Spool::                  Reading news from the local spool.
11622 @end menu
11623
11624
11625 @node NNTP
11626 @subsection NNTP
11627 @cindex nntp
11628
11629 Subscribing to a foreign group from an @sc{nntp} server is rather easy.
11630 You just specify @code{nntp} as method and the address of the @sc{nntp}
11631 server as the, uhm, address.
11632
11633 If the @sc{nntp} server is located at a non-standard port, setting the
11634 third element of the select method to this port number should allow you
11635 to connect to the right port.  You'll have to edit the group info for
11636 that (@pxref{Foreign Groups}).
11637
11638 The name of the foreign group can be the same as a native group.  In
11639 fact, you can subscribe to the same group from as many different servers
11640 you feel like.  There will be no name collisions.
11641
11642 The following variables can be used to create a virtual @code{nntp}
11643 server:
11644
11645 @table @code
11646
11647 @item nntp-server-opened-hook
11648 @vindex nntp-server-opened-hook
11649 @cindex @sc{mode reader}
11650 @cindex authinfo
11651 @cindex authentification
11652 @cindex nntp authentification
11653 @findex nntp-send-authinfo
11654 @findex nntp-send-mode-reader
11655 is run after a connection has been made.  It can be used to send
11656 commands to the @sc{nntp} server after it has been contacted.  By
11657 default it sends the command @code{MODE READER} to the server with the
11658 @code{nntp-send-mode-reader} function.  This function should always be
11659 present in this hook.
11660
11661 @item nntp-authinfo-function
11662 @vindex nntp-authinfo-function
11663 @findex nntp-send-authinfo
11664 @vindex nntp-authinfo-file
11665 This function will be used to send @samp{AUTHINFO} to the @sc{nntp}
11666 server.  The default function is @code{nntp-send-authinfo}, which looks
11667 through your @file{~/.authinfo} (or whatever you've set the
11668 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
11669 are found, it will prompt you for a login name and a password.  The
11670 format of the @file{~/.authinfo} file is (almost) the same as the
11671 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
11672 manual page, but here are the salient facts:
11673
11674 @enumerate
11675 @item
11676 The file contains one or more line, each of which define one server.
11677
11678 @item
11679 Each line may contain an arbitrary number of token/value pairs.
11680
11681 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
11682 @samp{default}.  In addition Gnus introduces two new tokens, not present
11683 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
11684 @samp{force}.  (This is the only way the @file{.authinfo} file format
11685 deviates from the @file{.netrc} file format.)  @samp{port} is used to
11686 indicate what port on the server the credentials apply to and
11687 @samp{force} is explained below.
11688
11689 @end enumerate
11690
11691 Here's an example file:
11692
11693 @example
11694 machine news.uio.no login larsi password geheimnis
11695 machine nntp.ifi.uio.no login larsi force yes
11696 @end example
11697
11698 The token/value pairs may appear in any order; @samp{machine} doesn't
11699 have to be first, for instance.
11700
11701 In this example, both login name and password have been supplied for the
11702 former server, while the latter has only the login name listed, and the
11703 user will be prompted for the password.  The latter also has the
11704 @samp{force} tag, which means that the authinfo will be sent to the
11705 @var{nntp} server upon connection; the default (i.e., when there is not
11706 @samp{force} tag) is to not send authinfo to the @var{nntp} server
11707 until the @var{nntp} server asks for it.
11708
11709 You can also add @samp{default} lines that will apply to all servers
11710 that don't have matching @samp{machine} lines.
11711
11712 @example
11713 default force yes
11714 @end example
11715
11716 This will force sending @samp{AUTHINFO} commands to all servers not
11717 previously mentioned.
11718
11719 Remember to not leave the @file{~/.authinfo} file world-readable.
11720
11721 @item nntp-server-action-alist
11722 @vindex nntp-server-action-alist
11723 This is a list of regexps to match on server types and actions to be
11724 taken when matches are made.  For instance, if you want Gnus to beep
11725 every time you connect to innd, you could say something like:
11726
11727 @lisp
11728 (setq nntp-server-action-alist
11729       '(("innd" (ding))))
11730 @end lisp
11731
11732 You probably don't want to do that, though.
11733
11734 The default value is
11735
11736 @lisp
11737 '(("nntpd 1\\.5\\.11t"
11738    (remove-hook 'nntp-server-opened-hook
11739                 'nntp-send-mode-reader)))
11740 @end lisp
11741
11742 This ensures that Gnus doesn't send the @code{MODE READER} command to
11743 nntpd 1.5.11t, since that command chokes that server, I've been told.
11744
11745 @item nntp-maximum-request
11746 @vindex nntp-maximum-request
11747 If the @sc{nntp} server doesn't support @sc{nov} headers, this back end
11748 will collect headers by sending a series of @code{head} commands.  To
11749 speed things up, the back end sends lots of these commands without
11750 waiting for reply, and then reads all the replies.  This is controlled
11751 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
11752 your network is buggy, you should set this to 1.
11753
11754 @item nntp-connection-timeout
11755 @vindex nntp-connection-timeout
11756 If you have lots of foreign @code{nntp} groups that you connect to
11757 regularly, you're sure to have problems with @sc{nntp} servers not
11758 responding properly, or being too loaded to reply within reasonable
11759 time.  This is can lead to awkward problems, which can be helped
11760 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
11761 that says how many seconds the @code{nntp} back end should wait for a
11762 connection before giving up.  If it is @code{nil}, which is the default,
11763 no timeouts are done.
11764
11765 @c @item nntp-command-timeout
11766 @c @vindex nntp-command-timeout
11767 @c @cindex PPP connections
11768 @c @cindex dynamic IP addresses
11769 @c If you're running Gnus on a machine that has a dynamically assigned
11770 @c address, Gnus may become confused.  If the address of your machine
11771 @c changes after connecting to the @sc{nntp} server, Gnus will simply sit
11772 @c waiting forever for replies from the server.  To help with this
11773 @c unfortunate problem, you can set this command to a number.  Gnus will
11774 @c then, if it sits waiting for a reply from the server longer than that
11775 @c number of seconds, shut down the connection, start a new one, and resend
11776 @c the command.  This should hopefully be transparent to the user.  A
11777 @c likely number is 30 seconds.
11778 @c
11779 @c @item nntp-retry-on-break
11780 @c @vindex nntp-retry-on-break
11781 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
11782 @c hangs.  This will have much the same effect as the command timeout
11783 @c described above.
11784
11785 @item nntp-server-hook
11786 @vindex nntp-server-hook
11787 This hook is run as the last step when connecting to an @sc{nntp}
11788 server.
11789
11790 @item nntp-buggy-select
11791 @vindex nntp-buggy-select
11792 Set this to non-@code{nil} if your select routine is buggy.
11793
11794 @item nntp-nov-is-evil
11795 @vindex nntp-nov-is-evil
11796 If the @sc{nntp} server does not support @sc{nov}, you could set this
11797 variable to @code{t}, but @code{nntp} usually checks automatically whether @sc{nov}
11798 can be used.
11799
11800 @item nntp-xover-commands
11801 @vindex nntp-xover-commands
11802 @cindex nov
11803 @cindex XOVER
11804 List of strings used as commands to fetch @sc{nov} lines from a
11805 server.  The default value of this variable is @code{("XOVER"
11806 "XOVERVIEW")}.
11807
11808 @item nntp-nov-gap
11809 @vindex nntp-nov-gap
11810 @code{nntp} normally sends just one big request for @sc{nov} lines to
11811 the server.  The server responds with one huge list of lines.  However,
11812 if you have read articles 2-5000 in the group, and only want to read
11813 article 1 and 5001, that means that @code{nntp} will fetch 4999 @sc{nov}
11814 lines that you will not need.  This variable says how
11815 big a gap between two consecutive articles is allowed to be before the
11816 @code{XOVER} request is split into several request.  Note that if your
11817 network is fast, setting this variable to a really small number means
11818 that fetching will probably be slower.  If this variable is @code{nil},
11819 @code{nntp} will never split requests.  The default is 5.
11820
11821 @item nntp-prepare-server-hook
11822 @vindex nntp-prepare-server-hook
11823 A hook run before attempting to connect to an @sc{nntp} server.
11824
11825 @item nntp-warn-about-losing-connection
11826 @vindex nntp-warn-about-losing-connection
11827 If this variable is non-@code{nil}, some noise will be made when a
11828 server closes connection.
11829
11830 @item nntp-record-commands
11831 @vindex nntp-record-commands
11832 If non-@code{nil}, @code{nntp} will log all commands it sends to the
11833 @sc{nntp} server (along with a timestamp) in the @samp{*nntp-log*}
11834 buffer.  This is useful if you are debugging a Gnus/@sc{nntp} connection
11835 that doesn't seem to work.
11836
11837 @item nntp-open-connection-function
11838 @vindex nntp-open-connection-function
11839 It is possible to customize how the connection to the nntp server will
11840 be opened.  If you specify an @code{nntp-open-connection-function}
11841 parameter, Gnus will use that function to establish the connection.
11842 Five pre-made functions are supplied.  These functions can be grouped in
11843 two categories: direct connection functions (three pre-made), and
11844 indirect ones (two pre-made).
11845
11846 @item nntp-prepare-post-hook
11847 @vindex nntp-prepare-post-hook
11848 A hook run just before posting an article.  If there is no
11849 @code{Message-ID} header in the article and the news server provides the
11850 recommended ID, it will be added to the article before running this
11851 hook.  It is useful to make @code{Cancel-Lock} headers even if you
11852 inhibit Gnus to add a @code{Message-ID} header, you could say:
11853
11854 @lisp
11855 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
11856 @end lisp
11857
11858 Note that not all servers support the recommended ID.  This works for
11859 INN versions 2.3.0 and later, for instance.
11860
11861 @item nntp-list-options
11862 @vindex nntp-list-options
11863 List of newsgroup name used for a option of the LIST command to restrict
11864 the listing output to only the specified newsgroups.  Each newsgroup name
11865 can be a shell-style wildcard, for instance, @dfn{fj.*}, @dfn{japan.*},
11866 etc.  Fortunately, if the server can accept such a option, it will
11867 probably make gnus run faster.  You may use it as a server variable as
11868 follows:
11869
11870 @lisp
11871 (setq gnus-select-method
11872       '(nntp "news.somewhere.edu"
11873              (nntp-list-options ("fj.*" "japan.*"))))
11874 @end lisp
11875
11876 @item nntp-options-subscribe
11877 @vindex nntp-options-subscribe
11878 Regexp matching the newsgroup names which will be subscribed
11879 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
11880 It may be effective as well as @code{nntp-list-options} even though the
11881 server could not accept a shell-style wildcard as a option of the LIST
11882 command.  You may use it as a server variable as follows:
11883
11884 @lisp
11885 (setq gnus-select-method
11886       '(nntp "news.somewhere.edu"
11887              (nntp-options-subscribe "^fj\\.\\|^japan\\.")))
11888 @end lisp
11889
11890 @item nntp-options-not-subscribe
11891 @vindex nntp-options-not-subscribe
11892 Regexp matching the newsgroup names which will not be subscribed
11893 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
11894 It may be effective as well as @code{nntp-list-options} even though the
11895 server could not accept a shell-style wildcard as a option of the LIST
11896 command.  You may use it as a server variable as follows:
11897
11898 @lisp
11899 (setq gnus-select-method
11900       '(nntp "news.somewhere.edu"
11901              (nntp-options-not-subscribe "\\.binaries\\.")))
11902 @end lisp
11903 @end table
11904
11905 @menu
11906 * Direct Functions::            Connecting directly to the server.
11907 * Indirect Functions::          Connecting indirectly to the server.
11908 * Common Variables::            Understood by several connection functions.
11909 @end menu
11910
11911
11912 @node Direct Functions
11913 @subsubsection Direct Functions
11914 @cindex direct connection functions
11915
11916 These functions are called direct because they open a direct connection
11917 between your machine and the @sc{nntp} server.  The behavior of these
11918 functions is also affected by commonly understood variables
11919 (@pxref{Common Variables}).
11920
11921 @table @code
11922 @findex nntp-open-network-stream
11923 @item nntp-open-network-stream
11924 This is the default, and simply connects to some port or other on the
11925 remote system.
11926
11927 @findex nntp-open-ssl-stream
11928 @item nntp-open-ssl-stream
11929 Opens a connection to a server over a @dfn{secure} channel.  To use
11930 this you must have OpenSSL (@uref{http://www.openssl.org}) or SSLeay
11931 installed (@uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL}, and you also
11932 need @file{ssl.el} (from the W3 distribution, for instance).  You then
11933 define a server as follows:
11934
11935 @lisp
11936 ;; Type `C-c C-c' after you've finished editing.
11937 ;;
11938 ;; "snews" is port 563 and is predefined in our /etc/services
11939 ;;
11940 (nntp "snews.bar.com"
11941       (nntp-open-connection-function nntp-open-ssl-stream)
11942       (nntp-port-number "snews")
11943       (nntp-address "snews.bar.com"))
11944 @end lisp
11945
11946 @findex nntp-open-telnet-stream
11947 @item nntp-open-telnet-stream
11948 Opens a connection to an @sc{nntp} server by simply @samp{telnet}'ing
11949 it.  You might wonder why this function exists, since we have the
11950 default @code{nntp-open-network-stream} which would do the job.  (One
11951 of) the reason(s) is that if you are behind a firewall but have direct
11952 connections to the outside world thanks to a command wrapper like
11953 @code{runsocks}, you can use it like this:
11954
11955 @lisp
11956 (nntp "socksified"
11957       (nntp-pre-command "runsocks")
11958       (nntp-open-connection-function nntp-open-telnet-stream)
11959       (nntp-address "the.news.server"))
11960 @end lisp
11961
11962 With the default method, you would need to wrap your whole Emacs
11963 session, which is not a good idea.
11964 @end table
11965
11966
11967 @node Indirect Functions
11968 @subsubsection Indirect Functions
11969 @cindex indirect connection functions
11970
11971 These functions are called indirect because they connect to an
11972 intermediate host before actually connecting to the @sc{nntp} server.
11973 All of these functions and related variables are also said to belong to
11974 the "via" family of connection: they're all prefixed with "via" to make
11975 things cleaner.  The behavior of these functions is also affected by
11976 commonly understood variables (@pxref{Common Variables}).
11977
11978 @table @code
11979 @item nntp-open-via-rlogin-and-telnet
11980 @findex nntp-open-via-rlogin-and-telnet
11981 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
11982 to the real @sc{nntp} server from there.  This is useful for instance if
11983 you need to connect to a firewall machine first.
11984
11985 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
11986
11987 @table @code
11988 @item nntp-via-rlogin-command
11989 @vindex nntp-via-rlogin-command
11990 Command used to log in on the intermediate host.  The default is
11991 @samp{rsh}, but @samp{ssh} is a popular alternative.
11992 @end table
11993
11994 @item nntp-open-via-telnet-and-telnet
11995 @findex nntp-open-via-telnet-and-telnet
11996 Does essentially the same, but uses @samp{telnet} instead of
11997 @samp{rlogin} to connect to the intermediate host.
11998
11999 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12000
12001 @table @code
12002 @item nntp-via-telnet-command
12003 @vindex nntp-via-telnet-command
12004 Command used to @code{telnet} the intermediate host.  The default is
12005 @samp{telnet}.
12006
12007 @item nntp-via-telnet-switches
12008 @vindex nntp-via-telnet-switches
12009 List of strings to be used as the switches to the
12010 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12011
12012 @item nntp-via-user-password
12013 @vindex nntp-via-user-password
12014 Password to use when logging in on the intermediate host.
12015
12016 @item nntp-via-envuser
12017 @vindex nntp-via-envuser
12018 If non-@code{nil}, the intermediate @code{telnet} session (client and
12019 server both) will support the @code{ENVIRON} option and not prompt for
12020 login name. This works for Solaris @code{telnet}, for instance.
12021
12022 @item nntp-via-shell-prompt
12023 @vindex nntp-via-shell-prompt
12024 Regexp matching the shell prompt on the intermediate host.  The default
12025 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12026
12027 @end table
12028
12029 @end table
12030
12031
12032 Here are some additional variables that are understood by all the above
12033 functions:
12034
12035 @table @code
12036
12037 @item nntp-via-user-name
12038 @vindex nntp-via-user-name
12039 User name to use when connecting to the intermediate host.
12040
12041 @item nntp-via-address
12042 @vindex nntp-via-address
12043 Address of the intermediate host to connect to.
12044
12045 @end table
12046
12047
12048 @node Common Variables
12049 @subsubsection Common Variables
12050
12051 The following variables affect the behavior of all, or several of the
12052 pre-made connection functions. When not specified, all functions are
12053 affected.
12054
12055 @table @code
12056
12057 @item nntp-pre-command
12058 @vindex nntp-pre-command
12059 A command wrapper to use when connecting through a non native connection
12060 function (all except @code{nntp-open-network-stream} and
12061 @code{nntp-open-ssl-stream}.  This is where you would put a @samp{SOCKS}
12062 wrapper for instance.
12063
12064 @item nntp-address
12065 @vindex nntp-address
12066 The address of the @sc{nntp} server.
12067
12068 @item nntp-port-number
12069 @vindex nntp-port-number
12070 Port number to connect to the @sc{nntp} server.  The default is @samp{nntp}.
12071
12072 @item nntp-end-of-line
12073 @vindex nntp-end-of-line
12074 String to use as end-of-line marker when talking to the @sc{nntp}
12075 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12076 using a non native connection function.
12077
12078 @item nntp-telnet-command
12079 @vindex nntp-telnet-command
12080 Command to use when connecting to the @sc{nntp} server through
12081 @samp{telnet}.  This is NOT for an intermediate host.  This is just for
12082 the real @sc{nntp} server.  The default is @samp{telnet}.
12083
12084 @item nntp-telnet-switches
12085 @vindex nntp-telnet-switches
12086 A list of switches to pass to @code{nntp-telnet-command}.  The default
12087 is @samp{("-8")}.
12088
12089 @end table
12090
12091
12092 @node News Spool
12093 @subsection News Spool
12094 @cindex nnspool
12095 @cindex news spool
12096
12097 Subscribing to a foreign group from the local spool is extremely easy,
12098 and might be useful, for instance, to speed up reading groups that
12099 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12100 instance.
12101
12102 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12103 anything else) as the address.
12104
12105 If you have access to a local spool, you should probably use that as the
12106 native select method (@pxref{Finding the News}).  It is normally faster
12107 than using an @code{nntp} select method, but might not be.  It depends.
12108 You just have to try to find out what's best at your site.
12109
12110 @table @code
12111
12112 @item nnspool-inews-program
12113 @vindex nnspool-inews-program
12114 Program used to post an article.
12115
12116 @item nnspool-inews-switches
12117 @vindex nnspool-inews-switches
12118 Parameters given to the inews program when posting an article.
12119
12120 @item nnspool-spool-directory
12121 @vindex nnspool-spool-directory
12122 Where @code{nnspool} looks for the articles.  This is normally
12123 @file{/usr/spool/news/}.
12124
12125 @item nnspool-nov-directory
12126 @vindex nnspool-nov-directory
12127 Where @code{nnspool} will look for @sc{nov} files.  This is normally
12128 @file{/usr/spool/news/over.view/}.
12129
12130 @item nnspool-lib-dir
12131 @vindex nnspool-lib-dir
12132 Where the news lib dir is (@file{/usr/lib/news/} by default).
12133
12134 @item nnspool-active-file
12135 @vindex nnspool-active-file
12136 The path to the active file.
12137
12138 @item nnspool-newsgroups-file
12139 @vindex nnspool-newsgroups-file
12140 The path to the group descriptions file.
12141
12142 @item nnspool-history-file
12143 @vindex nnspool-history-file
12144 The path to the news history file.
12145
12146 @item nnspool-active-times-file
12147 @vindex nnspool-active-times-file
12148 The path to the active date file.
12149
12150 @item nnspool-nov-is-evil
12151 @vindex nnspool-nov-is-evil
12152 If non-@code{nil}, @code{nnspool} won't try to use any @sc{nov} files
12153 that it finds.
12154
12155 @item nnspool-sift-nov-with-sed
12156 @vindex nnspool-sift-nov-with-sed
12157 @cindex sed
12158 If non-@code{nil}, which is the default, use @code{sed} to get the
12159 relevant portion from the overview file.  If nil, @code{nnspool} will
12160 load the entire file into a buffer and process it there.
12161
12162 @end table
12163
12164
12165 @node Getting Mail
12166 @section Getting Mail
12167 @cindex reading mail
12168 @cindex mail
12169
12170 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12171 course.
12172
12173 @menu
12174 * Mail in a Newsreader::        Important introductory notes.
12175 * Getting Started Reading Mail::  A simple cookbook example.
12176 * Splitting Mail::              How to create mail groups.
12177 * Mail Sources::                How to tell Gnus where to get mail from.
12178 * Mail Back End Variables::     Variables for customizing mail handling.
12179 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12180 * Group Mail Splitting::        Use group customize to drive mail splitting.
12181 * Incorporating Old Mail::      What about the old mail you have?
12182 * Expiring Mail::               Getting rid of unwanted mail.
12183 * Washing Mail::                Removing gruft from the mail you get.
12184 * Duplicates::                  Dealing with duplicated mail.
12185 * Not Reading Mail::            Using mail back ends for reading other files.
12186 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12187 @end menu
12188
12189
12190 @node Mail in a Newsreader
12191 @subsection Mail in a Newsreader
12192
12193 If you are used to traditional mail readers, but have decided to switch
12194 to reading mail with Gnus, you may find yourself experiencing something
12195 of a culture shock.
12196
12197 Gnus does not behave like traditional mail readers.  If you want to make
12198 it behave that way, you can, but it's an uphill battle.
12199
12200 Gnus, by default, handles all its groups using the same approach.  This
12201 approach is very newsreaderly---you enter a group, see the new/unread
12202 messages, and when you read the messages, they get marked as read, and
12203 you don't see them any more.  (Unless you explicitly ask for them.)
12204
12205 In particular, you do not do anything explicitly to delete messages.
12206
12207 Does this mean that all the messages that have been marked as read are
12208 deleted?  How awful!
12209
12210 But, no, it means that old messages are @dfn{expired} according to some
12211 scheme or other.  For news messages, the expire process is controlled by
12212 the news administrator; for mail, the expire process is controlled by
12213 you.  The expire process for mail is covered in depth in @pxref{Expiring
12214 Mail}.
12215
12216 What many Gnus users find, after using it a while for both news and
12217 mail, is that the transport mechanism has very little to do with how
12218 they want to treat a message.
12219
12220 Many people subscribe to several mailing lists.  These are transported
12221 via @sc{smtp}, and are therefore mail.  But we might go for weeks without
12222 answering, or even reading these messages very carefully.  We may not
12223 need to save them because if we should need to read one again, they are
12224 archived somewhere else.
12225
12226 Some people have local news groups which have only a handful of readers.
12227 These are transported via @sc{nntp}, and are therefore news.  But we may need
12228 to read and answer a large fraction of the messages very carefully in
12229 order to do our work.  And there may not be an archive, so we may need
12230 to save the interesting messages the same way we would personal mail.
12231
12232 The important distinction turns out to be not the transport mechanism,
12233 but other factors such as how interested we are in the subject matter,
12234 or how easy it is to retrieve the message if we need to read it again.
12235
12236 Gnus provides many options for sorting mail into ``groups'' which behave
12237 like newsgroups, and for treating each group (whether mail or news)
12238 differently.
12239
12240 Some users never get comfortable using the Gnus (ahem) paradigm and wish
12241 that Gnus should grow up and be a male, er, mail reader.  It is possible
12242 to whip Gnus into a more mailreaderly being, but, as said before, it's
12243 not easy.  People who prefer proper mail readers should try @sc{vm}
12244 instead, which is an excellent, and proper, mail reader.
12245
12246 I don't mean to scare anybody off, but I want to make it clear that you
12247 may be required to learn a new way of thinking about messages.  After
12248 you've been subjected to The Gnus Way, you will come to love it.  I can
12249 guarantee it.  (At least the guy who sold me the Emacs Subliminal
12250 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
12251 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
12252 You Do.)
12253
12254
12255 @node Getting Started Reading Mail
12256 @subsection Getting Started Reading Mail
12257
12258 It's quite easy to use Gnus to read your new mail.  You just plonk the
12259 mail back end of your choice into @code{gnus-secondary-select-methods},
12260 and things will happen automatically.
12261
12262 For instance, if you want to use @code{nnml} (which is a "one file per
12263 mail" back end), you could put the following in your @file{.gnus} file:
12264
12265 @lisp
12266 (setq gnus-secondary-select-methods '((nnml "")))
12267 @end lisp
12268
12269 Now, the next time you start Gnus, this back end will be queried for new
12270 articles, and it will move all the messages in your spool file to its
12271 directory, which is @code{~/Mail/} by default.  The new group that will
12272 be created (@samp{mail.misc}) will be subscribed, and you can read it
12273 like any other group.
12274
12275 You will probably want to split the mail into several groups, though:
12276
12277 @lisp
12278 (setq nnmail-split-methods
12279       '(("junk" "^From:.*Lars Ingebrigtsen")
12280         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
12281         ("other" "")))
12282 @end lisp
12283
12284 This will result in three new @code{nnml} mail groups being created:
12285 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
12286 mail that doesn't fit into the first two groups will be placed in the
12287 last group.
12288
12289 This should be sufficient for reading mail with Gnus.  You might want to
12290 give the other sections in this part of the manual a perusal, though.
12291 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
12292
12293
12294 @node Splitting Mail
12295 @subsection Splitting Mail
12296 @cindex splitting mail
12297 @cindex mail splitting
12298
12299 @vindex nnmail-split-methods
12300 The @code{nnmail-split-methods} variable says how the incoming mail is
12301 to be split into groups.
12302
12303 @lisp
12304 (setq nnmail-split-methods
12305   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
12306     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
12307     ("mail.other" "")))
12308 @end lisp
12309
12310 This variable is a list of lists, where the first element of each of
12311 these lists is the name of the mail group (they do not have to be called
12312 something beginning with @samp{mail}, by the way), and the second
12313 element is a regular expression used on the header of each mail to
12314 determine if it belongs in this mail group.  The first string may
12315 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
12316 insert sub-expressions from the matched text.  For instance:
12317
12318 @lisp
12319 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
12320 @end lisp
12321
12322 The second element can also be a function.  In that case, it will be
12323 called narrowed to the headers with the first element of the rule as the
12324 argument.  It should return a non-@code{nil} value if it thinks that the
12325 mail belongs in that group.
12326
12327 The last of these groups should always be a general one, and the regular
12328 expression should @emph{always} be @samp{} so that it matches any mails
12329 that haven't been matched by any of the other regexps.  (These rules are
12330 processed from the beginning of the alist toward the end.  The first
12331 rule to make a match will "win", unless you have crossposting enabled.
12332 In that case, all matching rules will "win".)
12333
12334 If you like to tinker with this yourself, you can set this variable to a
12335 function of your choice.  This function will be called without any
12336 arguments in a buffer narrowed to the headers of an incoming mail
12337 message.  The function should return a list of group names that it
12338 thinks should carry this mail message.
12339
12340 Note that the mail back ends are free to maul the poor, innocent,
12341 incoming headers all they want to.  They all add @code{Lines} headers;
12342 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
12343 @code{From<SPACE>} line to something else.
12344
12345 @vindex nnmail-crosspost
12346 The mail back ends all support cross-posting.  If several regexps match,
12347 the mail will be ``cross-posted'' to all those groups.
12348 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
12349 that no articles are crossposted to the general (@samp{}) group.
12350
12351 @vindex nnmail-crosspost-link-function
12352 @cindex crosspost
12353 @cindex links
12354 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
12355 the crossposted articles.  However, not all file systems support hard
12356 links.  If that's the case for you, set
12357 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
12358 variable is @code{add-name-to-file} by default.)
12359
12360 @kindex M-x nnmail-split-history
12361 @kindex nnmail-split-history
12362 If you wish to see where the previous mail split put the messages, you
12363 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
12364 where re-spooling messages would put the messages, you can use
12365 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
12366 Group Commands}).
12367
12368 @vindex nnmail-split-header-length-limit
12369 Header lines longer than the value of
12370 @code{nnmail-split-header-length-limit} are excluded from the split
12371 function.
12372
12373 Gnus gives you all the opportunity you could possibly want for shooting
12374 yourself in the foot.  Let's say you create a group that will contain
12375 all the mail you get from your boss.  And then you accidentally
12376 unsubscribe from the group.  Gnus will still put all the mail from your
12377 boss in the unsubscribed group, and so, when your boss mails you ``Have
12378 that report ready by Monday or you're fired!'', you'll never see it and,
12379 come Tuesday, you'll still believe that you're gainfully employed while
12380 you really should be out collecting empty bottles to save up for next
12381 month's rent money.
12382
12383
12384 @node Mail Sources
12385 @subsection Mail Sources
12386
12387 Mail can be gotten from many different sources---the mail spool, from a
12388 POP mail server, from a procmail directory, or from a maildir, for
12389 instance.
12390
12391 @menu
12392 * Mail Source Specifiers::      How to specify what a mail source is.
12393 * Mail Source Customization::   Some variables that influence things.
12394 * Fetching Mail::               Using the mail source specifiers.
12395 @end menu
12396
12397
12398 @node Mail Source Specifiers
12399 @subsubsection Mail Source Specifiers
12400 @cindex POP
12401 @cindex mail server
12402 @cindex procmail
12403 @cindex mail spool
12404 @cindex mail source
12405
12406 You tell Gnus how to fetch mail by setting @code{mail-sources}
12407 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
12408
12409 Here's an example:
12410
12411 @lisp
12412 (pop :server "pop3.mailserver.com" :user "myname")
12413 @end lisp
12414
12415 As can be observed, a mail source specifier is a list where the first
12416 element is a @dfn{mail source type}, followed by an arbitrary number of
12417 @dfn{keywords}.  Keywords that are not explicitly specified are given
12418 default values.
12419
12420 The following mail source types are available:
12421
12422 @table @code
12423 @item file
12424 Get mail from a single file; typically from the mail spool.
12425
12426 Keywords:
12427
12428 @table @code
12429 @item :path
12430 The path of the file.  Defaults to the value of the @code{MAIL}
12431 environment variable or @file{/usr/mail/spool/user-name}.
12432 @end table
12433
12434 An example file mail source:
12435
12436 @lisp
12437 (file :path "/usr/spool/mail/user-name")
12438 @end lisp
12439
12440 Or using the default path:
12441
12442 @lisp
12443 (file)
12444 @end lisp
12445
12446 If the mail spool file is not located on the local machine, it's best to
12447 use POP or @sc{imap} or the like to fetch the mail.  You can not use ange-ftp
12448 file names here---it has no way to lock the mail spool while moving the
12449 mail.
12450
12451 If it's impossible to set up a proper server, you can use ssh instead.
12452
12453 @lisp
12454 (setq mail-sources
12455       '((file :prescript "ssh host bin/getmail >%t")))
12456 @end lisp
12457
12458 The @samp{getmail} script would look something like the following:
12459
12460 @example
12461 #!/bin/sh
12462 #  getmail - move mail from spool to stdout
12463 #  flu@@iki.fi
12464
12465 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
12466 TMP=$HOME/Mail/tmp
12467 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
12468 @end example
12469
12470 Alter this script to fit find the @samp{movemail} you want to use.
12471
12472
12473 @item directory
12474 Get mail from several files in a directory.  This is typically used
12475 when you have procmail split the incoming mail into several files.
12476 That is, mail from the file @file{foo.bar.spool} will be put in the
12477 group @code{foo.bar}.  (You can change the suffix to be used instead
12478 of @code{.spool}.)  Setting
12479 @code{nnmail-scan-directory-mail-source-once} to non-nil forces Gnus
12480 to scan the mail source only once. This is particularly useful if you
12481 want to scan mail groups at a specified level.
12482
12483 Keywords:
12484
12485 @table @code
12486 @item :path
12487 The path of the directory where the files are.  There is no default
12488 value.
12489
12490 @item :suffix
12491 Only files ending with this suffix are used.  The default is
12492 @samp{.spool}.
12493
12494 @item :predicate
12495 Only files that have this predicate return non-@code{nil} are returned.
12496 The default is @code{identity}.  This is used as an additional
12497 filter---only files that have the right suffix @emph{and} satisfy this
12498 predicate are considered.
12499
12500 @item :prescript
12501 @itemx :postscript
12502 Script run before/after fetching mail.
12503
12504 @end table
12505
12506 An example directory mail source:
12507
12508 @lisp
12509 (directory :path "/home/user-name/procmail-dir/"
12510            :suffix ".prcml")
12511 @end lisp
12512
12513 @item pop
12514 Get mail from a POP server.
12515
12516 Keywords:
12517
12518 @table @code
12519 @item :server
12520 The name of the POP server.  The default is taken from the
12521 @code{MAILHOST} environment variable.
12522
12523 @item :port
12524 The port number of the POP server.  This can be a number (eg,
12525 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
12526 string, it should be a service name as listed in @file{/etc/services} on
12527 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
12528 need to specify it as @samp{"pop-3"} instead.
12529
12530 @item :user
12531 The user name to give to the POP server.  The default is the login
12532 name.
12533
12534 @item :password
12535 The password to give to the POP server.  If not specified, the user is
12536 prompted.
12537
12538 @item :program
12539 The program to use to fetch mail from the POP server.  This should be
12540 a @code{format}-like string.  Here's an example:
12541
12542 @example
12543 fetchmail %u@@%s -P %p %t
12544 @end example
12545
12546 The valid format specifier characters are:
12547
12548 @table @samp
12549 @item t
12550 The name of the file the mail is to be moved to.  This must always be
12551 included in this string.
12552
12553 @item s
12554 The name of the server.
12555
12556 @item P
12557 The port number of the server.
12558
12559 @item u
12560 The user name to use.
12561
12562 @item p
12563 The password to use.
12564 @end table
12565
12566 The values used for these specs are taken from the values you give the
12567 corresponding keywords.
12568
12569 @item :prescript
12570 A script to be run before fetching the mail.  The syntax is the same as
12571 the @code{:program} keyword.  This can also be a function to be run.
12572
12573 @item :postscript
12574 A script to be run after fetching the mail.  The syntax is the same as
12575 the @code{:program} keyword.  This can also be a function to be run.
12576
12577 @item :function
12578 The function to use to fetch mail from the POP server.  The function is
12579 called with one parameter---the name of the file where the mail should
12580 be moved to.
12581
12582 @item :authentication
12583 This can be either the symbol @code{password} or the symbol @code{apop}
12584 and says what authentication scheme to use.  The default is
12585 @code{password}.
12586
12587 @item :connection
12588 What stream to use for connecting to the server, this can be the symbol
12589 @code{ssl}, the symbol @code{tls} or others.  The default is @code{nil}
12590 and use insecure connections.  Note that for SSL/TLS, you need external
12591 programs and libraries:
12592
12593 @itemize @bullet
12594 @item
12595 @dfn{ssl:} Connect through SSL@. Requires OpenSSL (the program
12596 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
12597 library @samp{ssl.el}.
12598 @item
12599 @dfn{starttls:} Connect via the STARTTLS extension (similar to SSL)@.
12600 Requires the external library @samp{starttls.el} and program
12601 @samp{starttls}.
12602 @end itemize
12603
12604 @item :leave
12605 Non-@code{nil} if mail is to be left on the server and UIDL used for
12606 message retrieval.  The default is @code{nil}.
12607
12608 @end table
12609
12610 If the @code{:program} and @code{:function} keywords aren't specified,
12611 @code{pop3-movemail} will be used.
12612
12613 Here are some examples.  Fetch from the default POP server, using the
12614 default user name, and default fetcher:
12615
12616 @lisp
12617 (pop)
12618 @end lisp
12619
12620 Fetch from a named server with a named user and password:
12621
12622 @lisp
12623 (pop :server "my.pop.server"
12624      :user "user-name" :password "secret")
12625 @end lisp
12626
12627 Use @samp{movemail} to move the mail:
12628
12629 @lisp
12630 (pop :program "movemail po:%u %t %p")
12631 @end lisp
12632
12633 @item maildir
12634 Get mail from a maildir.  This is a type of mailbox that is supported by
12635 at least qmail and postfix, where each file in a special directory
12636 contains exactly one mail.
12637
12638 Keywords:
12639
12640 @table @code
12641 @item :path
12642 The path of the directory where the mails are stored.  The default is
12643 taken from the @code{MAILDIR} environment variable or
12644 @samp{~/Maildir/}.
12645 @item :subdirs
12646 The subdirectories of the Maildir.  The default is
12647 @samp{("new" "cur")}.
12648
12649 @c If you sometimes look at your mail through a pop3 daemon before fetching
12650 @c them with Gnus, you may also have to fetch your mails from the
12651 @c @code{cur} directory inside the maildir, like in the first example
12652 @c below.
12653
12654 You can also get mails from remote hosts (because maildirs don't suffer
12655 from locking problems).
12656
12657 @end table
12658
12659 Two example maildir mail sources:
12660
12661 @lisp
12662 (maildir :path "/home/user-name/Maildir/"
12663          :subdirs ("cur" "new"))
12664 @end lisp
12665
12666 @lisp
12667 (maildir :path "/user@@remotehost.org:~/Maildir/"
12668          :subdirs ("new"))
12669 @end lisp
12670
12671 @item imap
12672 Get mail from a @sc{imap} server.  If you don't want to use @sc{imap}
12673 as intended, as a network mail reading protocol (ie with nnimap), for
12674 some reason or other, Gnus let you treat it similar to a POP server
12675 and fetches articles from a given @sc{imap} mailbox.  @xref{IMAP}, for
12676 more information.
12677
12678 Note that for the Kerberos, GSSAPI, SSL/TLS and STARTTLS support you
12679 may need external programs and libraries, @xref{IMAP}.
12680
12681 Keywords:
12682
12683 @table @code
12684 @item :server
12685 The name of the @sc{imap} server.  The default is taken from the
12686 @code{MAILHOST} environment variable.
12687
12688 @item :port
12689 The port number of the @sc{imap} server.  The default is @samp{143}, or
12690 @samp{993} for SSL/TLS connections.
12691
12692 @item :user
12693 The user name to give to the @sc{imap} server.  The default is the login
12694 name.
12695
12696 @item :password
12697 The password to give to the @sc{imap} server.  If not specified, the user is
12698 prompted.
12699
12700 @item :stream
12701 What stream to use for connecting to the server, this is one of the
12702 symbols in @code{imap-stream-alist}.  Right now, this means
12703 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{ssl},
12704 @samp{shell} or the default @samp{network}.
12705
12706 @item :authentication
12707 Which authenticator to use for authenticating to the server, this is
12708 one of the symbols in @code{imap-authenticator-alist}.  Right now,
12709 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
12710 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
12711
12712 @item :program
12713 When using the `shell' :stream, the contents of this variable is
12714 mapped into the `imap-shell-program' variable.  This should be a
12715 @code{format}-like string (or list of strings).  Here's an example:
12716
12717 @example
12718 ssh %s imapd
12719 @end example
12720
12721 The valid format specifier characters are:
12722
12723 @table @samp
12724 @item s
12725 The name of the server.
12726
12727 @item l
12728 User name from `imap-default-user'.
12729
12730 @item p
12731 The port number of the server.
12732 @end table
12733
12734 The values used for these specs are taken from the values you give the
12735 corresponding keywords.
12736
12737 @item :mailbox
12738 The name of the mailbox to get mail from.  The default is @samp{INBOX}
12739 which normally is the mailbox which receive incoming mail.
12740
12741 @item :predicate
12742 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
12743 UNDELETED}, is probably the best choice for most people, but if you
12744 sometimes peek in your mailbox with a @sc{imap} client and mark some
12745 articles as read (or; SEEN) you might want to set this to @samp{nil}.
12746 Then all articles in the mailbox is fetched, no matter what.  For a
12747 complete list of predicates, see RFC 2060 section 6.4.4.
12748
12749 @item :fetchflag
12750 How to flag fetched articles on the server, the default @samp{\Deleted}
12751 will mark them as deleted, an alternative would be @samp{\Seen} which
12752 would simply mark them as read.  These are the two most likely choices,
12753 but more flags are defined in RFC 2060 section 2.3.2.
12754
12755 @item :dontexpunge
12756 If non-nil, don't remove all articles marked as deleted in the mailbox
12757 after finishing the fetch.
12758
12759 @end table
12760
12761 An example @sc{imap} mail source:
12762
12763 @lisp
12764 (imap :server "mail.mycorp.com"
12765       :stream kerberos4
12766       :fetchflag "\\Seen")
12767 @end lisp
12768
12769 @item webmail
12770 Get mail from a webmail server, such as @uref{www.hotmail.com},
12771 @uref{webmail.netscape.com}, @uref{www.netaddress.com},
12772 @uref{www.my-deja.com}.
12773
12774 NOTE: Now @uref{mail.yahoo.com} provides POP3 service, so @sc{pop} mail source
12775 is suggested.
12776
12777 NOTE: Webmail largely depends cookies. A "one-line-cookie" patch is
12778 required for url "4.0pre.46".
12779
12780 WARNING: Mails may lost.  NO WARRANTY.
12781
12782 Keywords:
12783
12784 @table @code
12785 @item :subtype
12786 The type of the webmail server.  The default is @code{hotmail}.  The
12787 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
12788
12789 @item :user
12790 The user name to give to the webmail server.  The default is the login
12791 name.
12792
12793 @item :password
12794 The password to give to the webmail server.  If not specified, the user is
12795 prompted.
12796
12797 @item :dontexpunge
12798 If non-nil, only fetch unread articles and don't move them to trash
12799 folder after finishing the fetch.
12800
12801 @end table
12802
12803 An example webmail source:
12804
12805 @lisp
12806 (webmail :subtype 'hotmail
12807          :user "user-name"
12808          :password "secret")
12809 @end lisp
12810 @end table
12811
12812 @table @dfn
12813 @item Common Keywords
12814 Common keywords can be used in any type of mail source.
12815
12816 Keywords:
12817
12818 @table @code
12819 @item :plugged
12820 If non-nil, fetch the mail even when Gnus is unplugged.  If you use
12821 directory source to get mail, you can specify it as in this example:
12822
12823 @lisp
12824 (setq mail-sources
12825       '((directory :path "/home/pavel/.Spool/"
12826                    :suffix ""
12827                    :plugged t)))
12828 @end lisp
12829
12830 Gnus will then fetch your mail even when you are unplugged.  This is
12831 useful when you use local mail and news.
12832
12833 @end table
12834 @end table
12835
12836 @subsubsection Function Interface
12837
12838 Some of the above keywords specify a Lisp function to be executed.
12839 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
12840 the value of the keyword while the function is executing.  For example,
12841 consider the following mail-source setting:
12842
12843 @lisp
12844 (setq mail-sources '((pop :user "jrl"
12845                           :server "pophost" :function fetchfunc)))
12846 @end lisp
12847
12848 While the function @code{fetchfunc} is executing, the symbol @code{user}
12849 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
12850 @code{"pophost"}.  The symbols @code{port}, @code{password},
12851 @code{program}, @code{prescript}, @code{postscript}, @code{function},
12852 and @code{authentication} are also bound (to their default values).
12853
12854 See above for a list of keywords for each type of mail source.
12855
12856
12857 @node Mail Source Customization
12858 @subsubsection Mail Source Customization
12859
12860 The following is a list of variables that influence how the mail is
12861 fetched.  You would normally not need to set or change any of these
12862 variables.
12863
12864 @table @code
12865 @item mail-source-crash-box
12866 @vindex mail-source-crash-box
12867 File where mail will be stored while processing it.  The default is
12868 @file{~/.emacs-mail-crash-box}.
12869
12870 @item mail-source-delete-incoming
12871 @vindex mail-source-delete-incoming
12872 If non-@code{nil}, delete incoming files after handling them.
12873
12874 @item mail-source-directory
12875 @vindex mail-source-directory
12876 Directory where files (if any) will be stored.  The default is
12877 @file{~/Mail/}.  At present, the only thing this is used for is to say
12878 where the incoming files will be stored if the previous variable is
12879 @code{nil}.
12880
12881 @item mail-source-incoming-file-prefix
12882 @vindex mail-source-incoming-file-prefix
12883 Prefix for file name for storing incoming mail.  The default is
12884 @file{Incoming}, in which case files will end up with names like
12885 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
12886 relevant if @code{mail-source-delete-incoming} is @code{nil}.
12887
12888 @item mail-source-default-file-modes
12889 @vindex mail-source-default-file-modes
12890 All new mail files will get this file mode.  The default is 384.
12891
12892 @item mail-source-movemail-program
12893 @vindex mail-source-movemail-program
12894 If non-nil, name of program for fetching new mail.  If nil,
12895 @code{movemail} in @var{exec-directory}.
12896
12897 @end table
12898
12899
12900 @node Fetching Mail
12901 @subsubsection Fetching Mail
12902
12903 @vindex mail-sources
12904 @vindex nnmail-spool-file
12905 The way to actually tell Gnus where to get new mail from is to set
12906 @code{mail-sources} to a list of mail source specifiers
12907 (@pxref{Mail Source Specifiers}).
12908
12909 If this variable (and the obsolescent @code{nnmail-spool-file}) is
12910 @code{nil}, the mail back ends will never attempt to fetch mail by
12911 themselves.
12912
12913 If you want to fetch mail both from your local spool as well as a POP
12914 mail server, you'd say something like:
12915
12916 @lisp
12917 (setq mail-sources
12918       '((file)
12919         (pop :server "pop3.mail.server"
12920              :password "secret")))
12921 @end lisp
12922
12923 Or, if you don't want to use any of the keyword defaults:
12924
12925 @lisp
12926 (setq mail-sources
12927       '((file :path "/var/spool/mail/user-name")
12928         (pop :server "pop3.mail.server"
12929              :user "user-name"
12930              :port "pop3"
12931              :password "secret")))
12932 @end lisp
12933
12934
12935 When you use a mail back end, Gnus will slurp all your mail from your
12936 inbox and plonk it down in your home directory.  Gnus doesn't move any
12937 mail if you're not using a mail back end---you have to do a lot of magic
12938 invocations first.  At the time when you have finished drawing the
12939 pentagram, lightened the candles, and sacrificed the goat, you really
12940 shouldn't be too surprised when Gnus moves your mail.
12941
12942
12943
12944 @node Mail Back End Variables
12945 @subsection Mail Back End Variables
12946
12947 These variables are (for the most part) pertinent to all the various
12948 mail back ends.
12949
12950 @table @code
12951 @vindex nnmail-read-incoming-hook
12952 @item nnmail-read-incoming-hook
12953 The mail back ends all call this hook after reading new mail.  You can
12954 use this hook to notify any mail watch programs, if you want to.
12955
12956 @vindex nnmail-split-hook
12957 @item nnmail-split-hook
12958 @findex article-decode-encoded-words
12959 @findex RFC 1522 decoding
12960 @findex RFC 2047 decoding
12961 Hook run in the buffer where the mail headers of each message is kept
12962 just before the splitting based on these headers is done.  The hook is
12963 free to modify the buffer contents in any way it sees fit---the buffer
12964 is discarded after the splitting has been done, and no changes performed
12965 in the buffer will show up in any files.
12966 @code{gnus-article-decode-encoded-words} is one likely function to add
12967 to this hook.
12968
12969 @vindex nnmail-pre-get-new-mail-hook
12970 @vindex nnmail-post-get-new-mail-hook
12971 @item nnmail-pre-get-new-mail-hook
12972 @itemx nnmail-post-get-new-mail-hook
12973 These are two useful hooks executed when treating new incoming
12974 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
12975 starting to handle the new mail) and
12976 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
12977 is done).  Here's and example of using these two hooks to change the
12978 default file modes the new mail files get:
12979
12980 @lisp
12981 (add-hook 'nnmail-pre-get-new-mail-hook
12982           (lambda () (set-default-file-modes 511)))
12983
12984 (add-hook 'nnmail-post-get-new-mail-hook
12985           (lambda () (set-default-file-modes 551)))
12986 @end lisp
12987
12988 @item nnmail-use-long-file-names
12989 @vindex nnmail-use-long-file-names
12990 If non-@code{nil}, the mail back ends will use long file and directory
12991 names.  Groups like @samp{mail.misc} will end up in directories
12992 (assuming use of @code{nnml} back end) or files (assuming use of
12993 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
12994 the same group will end up in @file{mail/misc}.
12995
12996 @item nnmail-delete-file-function
12997 @vindex nnmail-delete-file-function
12998 @findex delete-file
12999 Function called to delete files.  It is @code{delete-file} by default.
13000
13001 @item nnmail-cache-accepted-message-ids
13002 @vindex nnmail-cache-accepted-message-ids
13003 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13004 the back end (via @code{Gcc}, for instance) into the mail duplication
13005 discovery cache.  The default is @code{nil}.
13006
13007 @end table
13008
13009
13010 @node Fancy Mail Splitting
13011 @subsection Fancy Mail Splitting
13012 @cindex mail splitting
13013 @cindex fancy mail splitting
13014
13015 @vindex nnmail-split-fancy
13016 @findex nnmail-split-fancy
13017 If the rather simple, standard method for specifying how to split mail
13018 doesn't allow you to do what you want, you can set
13019 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13020 play with the @code{nnmail-split-fancy} variable.
13021
13022 Let's look at an example value of this variable first:
13023
13024 @lisp
13025 ;; Messages from the mailer daemon are not crossposted to any of
13026 ;; the ordinary groups.  Warnings are put in a separate group
13027 ;; from real errors.
13028 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13029                    "mail.misc"))
13030    ;; Non-error messages are crossposted to all relevant
13031    ;; groups, but we don't crosspost between the group for the
13032    ;; (ding) list and the group for other (ding) related mail.
13033    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13034          ("subject" "ding" "ding.misc"))
13035       ;; Other mailing lists...
13036       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13037       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13038       ;; Both lists below have the same suffix, so prevent
13039       ;; cross-posting to mkpkg.list of messages posted only to
13040       ;; the bugs- list, but allow cross-posting when the
13041       ;; message was really cross-posted.
13042       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13043       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13044       ;; People...
13045       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13046    ;; Unmatched mail goes to the catch all group.
13047    "misc.misc")
13048 @end lisp
13049
13050 This variable has the format of a @dfn{split}.  A split is a (possibly)
13051 recursive structure where each split may contain other splits.  Here are
13052 the five possible split syntaxes:
13053
13054 @enumerate
13055
13056 @item
13057 @samp{group}: If the split is a string, that will be taken as a group
13058 name.  Normal regexp match expansion will be done.  See below for
13059 examples.
13060
13061 @item
13062 @code{(@var{field} @var{value} @code{[-} @var{restrict}
13063 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
13064 first element of which is a string, then store the message as
13065 specified by @var{split}, if header @var{field} (a regexp) contains
13066 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
13067 matches some string after @var{field} and before the end of the
13068 matched @var{value}, the @var{split} is ignored.  If none of the
13069 @var{restrict} clauses match, @var{split} is processed.
13070
13071 @item
13072 @code{(| @var{split}@dots{})}: If the split is a list, and the first
13073 element is @code{|} (vertical bar), then process each @var{split} until
13074 one of them matches.  A @var{split} is said to match if it will cause
13075 the mail message to be stored in one or more groups.
13076
13077 @item
13078 @code{(& @var{split}@dots{})}: If the split is a list, and the first
13079 element is @code{&}, then process all @var{split}s in the list.
13080
13081 @item
13082 @code{junk}: If the split is the symbol @code{junk}, then don't save
13083 (i.e., delete) this message.  Use with extreme caution.
13084
13085 @item
13086 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
13087 a list, and the first element is @code{:}, then the second element will
13088 be called as a function with @var{args} given as arguments.  The
13089 function should return a @var{split}.
13090
13091 @cindex body split
13092 For instance, the following function could be used to split based on the
13093 body of the messages:
13094
13095 @lisp
13096 (defun split-on-body ()
13097   (save-excursion
13098     (set-buffer " *nnmail incoming*")
13099     (goto-char (point-min))
13100     (when (re-search-forward "Some.*string" nil t)
13101       "string.group")))
13102 @end lisp
13103
13104 The @samp{" *nnmail incoming*"} is narrowed to the message in question
13105 when the @code{:} function is run.
13106
13107 @item
13108 @code{(! @var{func} @var{split})}: If the split is a list, and the first
13109 element is @code{!}, then SPLIT will be processed, and FUNC will be
13110 called as a function with the result of SPLIT as argument.  FUNC should
13111 return a split.
13112
13113 @item
13114 @code{nil}: If the split is @code{nil}, it is ignored.
13115
13116 @end enumerate
13117
13118 In these splits, @var{field} must match a complete field name.
13119 @var{value} must match a complete word according to the fundamental mode
13120 syntax table.  You can use @code{.*} in the regexps to match partial
13121 field names or words.  In other words, all @var{value}'s are wrapped in
13122 @samp{\<} and @samp{\>} pairs.
13123
13124 @vindex nnmail-split-abbrev-alist
13125 @var{field} and @var{value} can also be lisp symbols, in that case they
13126 are expanded as specified by the variable
13127 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells, where
13128 the @code{car} of a cell contains the key, and the @code{cdr} contains the associated
13129 value.
13130
13131 @vindex nnmail-split-fancy-syntax-table
13132 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13133 when all this splitting is performed.
13134
13135 If you want to have Gnus create groups dynamically based on some
13136 information in the headers (i.e., do @code{replace-match}-like
13137 substitutions in the group names), you can say things like:
13138
13139 @example
13140 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13141 @end example
13142
13143 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13144 will be filed in @samp{mail.debian.foo}.
13145
13146 If the string contains the element @samp{\&}, then the previously
13147 matched string will be substituted.  Similarly, the elements @samp{\\1}
13148 up to @samp{\\9} will be substituted with the text matched by the
13149 groupings 1 through 9.
13150
13151 @findex nnmail-split-fancy-with-parent
13152 @code{nnmail-split-fancy-with-parent} is a function which allows you to
13153 split followups into the same groups their parents are in.  Sometimes
13154 you can't make splitting rules for all your mail.  For example, your
13155 boss might send you personal mail regarding different projects you are
13156 working on, and as you can't tell your boss to put a distinguishing
13157 string into the subject line, you have to resort to manually moving the
13158 messages into the right group.  With this function, you only have to do
13159 it once per thread.
13160
13161 To use this feature, you have to set @code{nnmail-treat-duplicates} and
13162 @code{nnmail-cache-accepted-message-ids} to a non-nil value.  And then
13163 you can include @code{nnmail-split-fancy-with-parent} using the colon
13164 feature, like so:
13165 @lisp
13166 (setq nnmail-split-fancy
13167       '(| (: nnmail-split-fancy-with-parent)
13168           ;; other splits go here
13169         ))
13170 @end lisp
13171
13172 This feature works as follows: when @code{nnmail-treat-duplicates} is
13173 non-nil, Gnus records the message id of every message it sees in the
13174 file specified by the variable @code{nnmail-message-id-cache-file},
13175 together with the group it is in (the group is omitted for non-mail
13176 messages).  When mail splitting is invoked, the function
13177 @code{nnmail-split-fancy-with-parent} then looks at the References (and
13178 In-Reply-To) header of each message to split and searches the file
13179 specified by @code{nnmail-message-id-cache-file} for the message ids.
13180 When it has found a parent, it returns the corresponding group name
13181 unless the group name matches the regexp
13182 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is recommended
13183 that you set @code{nnmail-message-id-cache-length} to a somewhat higher
13184 number than the default so that the message ids are still in the cache.
13185 (A value of 5000 appears to create a file some 300 kBytes in size.)
13186 @vindex nnmail-cache-accepted-message-ids
13187 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
13188 also records the message ids of moved articles, so that the followup
13189 messages goes into the new group.
13190
13191
13192 @node Group Mail Splitting
13193 @subsection Group Mail Splitting
13194 @cindex mail splitting
13195 @cindex group mail splitting
13196
13197 @findex gnus-group-split
13198 If you subscribe to dozens of mailing lists but you don't want to
13199 maintain mail splitting rules manually, group mail splitting is for you.
13200 You just have to set @var{to-list} and/or @var{to-address} in group
13201 parameters or group customization and set @code{nnmail-split-methods} to
13202 @code{gnus-group-split}.  This splitting function will scan all groups
13203 for those parameters and split mail accordingly, i.e., messages posted
13204 from or to the addresses specified in the parameters @var{to-list} or
13205 @var{to-address} of a mail group will be stored in that group.
13206
13207 Sometimes, mailing lists have multiple addresses, and you may want mail
13208 splitting to recognize them all: just set the @var{extra-aliases} group
13209 parameter to the list of additional addresses and it's done.  If you'd
13210 rather use a regular expression, set @var{split-regexp}.
13211
13212 All these parameters in a group will be used to create an
13213 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
13214 the @var{value} is a single regular expression that matches
13215 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
13216 matches of @var{split-regexp}, and the @var{split} is the name of the
13217 group.  @var{restrict}s are also supported: just set the
13218 @var{split-exclude} parameter to a list of regular expressions.
13219
13220 If you can't get the right split to be generated using all these
13221 parameters, or you just need something fancier, you can set the
13222 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
13223 this case, all other aforementioned parameters will be ignored by
13224 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
13225 @code{nil}, in which case the group will be ignored by
13226 @code{gnus-group-split}.
13227
13228 @vindex gnus-group-split-default-catch-all-group
13229 @code{gnus-group-split} will do cross-posting on all groups that match,
13230 by defining a single @code{&} fancy split containing one split for each
13231 group.  If a message doesn't match any split, it will be stored in the
13232 group named in @code{gnus-group-split-default-catch-all-group}, unless
13233 some group has @var{split-spec} set to @code{catch-all}, in which case
13234 that group is used as the catch-all group.  Even though this variable is
13235 often used just to name a group, it may also be set to an arbitrarily
13236 complex fancy split (after all, a group name is a fancy split), and this
13237 may be useful to split mail that doesn't go to any mailing list to
13238 personal mail folders.  Note that this fancy split is added as the last
13239 element of a @code{|} split list that also contains a @code{&} split
13240 with the rules extracted from group parameters.
13241
13242 It's time for an example.  Assume the following group parameters have
13243 been defined:
13244
13245 @example
13246 nnml:mail.bar:
13247 ((to-address . "bar@@femail.com")
13248  (split-regexp . ".*@@femail\\.com"))
13249 nnml:mail.foo:
13250 ((to-list . "foo@@nowhere.gov")
13251  (extra-aliases "foo@@localhost" "foo-redist@@home")
13252  (split-exclude "bugs-foo" "rambling-foo")
13253  (admin-address . "foo-request@@nowhere.gov"))
13254 nnml:mail.others:
13255 ((split-spec . catch-all))
13256 @end example
13257
13258 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
13259 behave as if @code{nnmail-split-fancy} had been selected and variable
13260 @code{nnmail-split-fancy} had been set as follows:
13261
13262 @lisp
13263 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
13264       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
13265            - "bugs-foo" - "rambling-foo" "mail.foo"))
13266    "mail.others")
13267 @end lisp
13268
13269 @findex gnus-group-split-fancy
13270 If you'd rather not use group splitting for all your mail groups, you
13271 may use it for only some of them, by using @code{nnmail-split-fancy}
13272 splits like this:
13273
13274 @lisp
13275 (: gnus-mlsplt-fancy GROUPS NO-CROSSPOST CATCH-ALL)
13276 @end lisp
13277
13278 @var{groups} may be a regular expression or a list of group names whose
13279 parameters will be scanned to generate the output split.
13280 @var{no-crosspost} can be used to disable cross-posting; in this case, a
13281 single @code{|} split will be output.  @var{catch-all} is the fallback
13282 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
13283 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
13284 empty string in any selected group, no catch-all split will be issued.
13285 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
13286 this group will override the value of the @var{catch-all} argument.
13287
13288 @findex gnus-group-split-setup
13289 Unfortunately, scanning all groups and their parameters can be quite
13290 slow, especially considering that it has to be done for every message.
13291 But don't despair!  The function @code{gnus-group-split-setup} can be
13292 used to enable @code{gnus-group-split} in a much more efficient way.  It
13293 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
13294 @code{nnmail-split-fancy} to the split produced by
13295 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
13296 scanned once, no matter how many messages are split.
13297
13298 @findex gnus-group-split-update
13299 However, if you change group parameters, you'd have to update
13300 @code{nnmail-split-fancy} manually.  You can do it by running
13301 @code{gnus-group-split-update}.  If you'd rather have it updated
13302 automatically, just tell @code{gnus-group-split-setup} to do it for
13303 you.  For example, add to your @file{.gnus}:
13304
13305 @lisp
13306 (gnus-group-split-setup AUTO-UPDATE CATCH-ALL)
13307 @end lisp
13308
13309 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
13310 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
13311 have to worry about updating @code{nnmail-split-fancy} again.  If you
13312 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
13313 @code{gnus-group-split-default-catch-all-group} will be set to its
13314 value.
13315
13316 @vindex gnus-group-split-updated-hook
13317 Because you may want to change @code{nnmail-split-fancy} after it is set
13318 by @code{gnus-group-split-update}, this function will run
13319 @code{gnus-group-split-updated-hook} just before finishing.
13320
13321 @node Incorporating Old Mail
13322 @subsection Incorporating Old Mail
13323 @cindex incorporating old mail
13324 @cindex import old mail
13325
13326 Most people have lots of old mail stored in various file formats.  If
13327 you have set up Gnus to read mail using one of the spiffy Gnus mail
13328 back ends, you'll probably wish to have that old mail incorporated into
13329 your mail groups.
13330
13331 Doing so can be quite easy.
13332
13333 To take an example: You're reading mail using @code{nnml}
13334 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
13335 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
13336 file filled with important, but old, mail.  You want to move it into
13337 your @code{nnml} groups.
13338
13339 Here's how:
13340
13341 @enumerate
13342 @item
13343 Go to the group buffer.
13344
13345 @item
13346 Type `G f' and give the path to the mbox file when prompted to create an
13347 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
13348
13349 @item
13350 Type `SPACE' to enter the newly created group.
13351
13352 @item
13353 Type `M P b' to process-mark all articles in this group's buffer
13354 (@pxref{Setting Process Marks}).
13355
13356 @item
13357 Type `B r' to respool all the process-marked articles, and answer
13358 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
13359 @end enumerate
13360
13361 All the mail messages in the mbox file will now also be spread out over
13362 all your @code{nnml} groups.  Try entering them and check whether things
13363 have gone without a glitch.  If things look ok, you may consider
13364 deleting the mbox file, but I wouldn't do that unless I was absolutely
13365 sure that all the mail has ended up where it should be.
13366
13367 Respooling is also a handy thing to do if you're switching from one mail
13368 back end to another.  Just respool all the mail in the old mail groups
13369 using the new mail back end.
13370
13371
13372 @node Expiring Mail
13373 @subsection Expiring Mail
13374 @cindex article expiry
13375
13376 Traditional mail readers have a tendency to remove mail articles when
13377 you mark them as read, in some way.  Gnus takes a fundamentally
13378 different approach to mail reading.
13379
13380 Gnus basically considers mail just to be news that has been received in
13381 a rather peculiar manner.  It does not think that it has the power to
13382 actually change the mail, or delete any mail messages.  If you enter a
13383 mail group, and mark articles as ``read'', or kill them in some other
13384 fashion, the mail articles will still exist on the system.  I repeat:
13385 Gnus will not delete your old, read mail.  Unless you ask it to, of
13386 course.
13387
13388 To make Gnus get rid of your unwanted mail, you have to mark the
13389 articles as @dfn{expirable}.  This does not mean that the articles will
13390 disappear right away, however.  In general, a mail article will be
13391 deleted from your system if, 1) it is marked as expirable, AND 2) it is
13392 more than one week old.  If you do not mark an article as expirable, it
13393 will remain on your system until hell freezes over.  This bears
13394 repeating one more time, with some spurious capitalizations: IF you do
13395 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
13396
13397 @vindex gnus-auto-expirable-newsgroups
13398 You do not have to mark articles as expirable by hand.  Groups that
13399 match the regular expression @code{gnus-auto-expirable-newsgroups} will
13400 have all articles that you read marked as expirable automatically.  All
13401 articles marked as expirable have an @samp{E} in the first
13402 column in the summary buffer.
13403
13404 By default, if you have auto expiry switched on, Gnus will mark all the
13405 articles you read as expirable, no matter if they were read or unread
13406 before.  To avoid having articles marked as read marked as expirable
13407 automatically, you can put something like the following in your
13408 @file{.gnus} file:
13409
13410 @vindex gnus-mark-article-hook
13411 @lisp
13412 (remove-hook 'gnus-mark-article-hook
13413              'gnus-summary-mark-read-and-unread-as-read)
13414 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
13415 @end lisp
13416
13417 Note that making a group auto-expirable doesn't mean that all read
13418 articles are expired---only the articles marked as expirable
13419 will be expired.  Also note that using the @kbd{d} command won't make
13420 articles expirable---only semi-automatic marking of articles as read will
13421 mark the articles as expirable in auto-expirable groups.
13422
13423 Let's say you subscribe to a couple of mailing lists, and you want the
13424 articles you have read to disappear after a while:
13425
13426 @lisp
13427 (setq gnus-auto-expirable-newsgroups
13428       "mail.nonsense-list\\|mail.nice-list")
13429 @end lisp
13430
13431 Another way to have auto-expiry happen is to have the element
13432 @code{auto-expire} in the group parameters of the group.
13433
13434 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
13435 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
13436 don't really mix very well.
13437
13438 @vindex nnmail-expiry-wait
13439 The @code{nnmail-expiry-wait} variable supplies the default time an
13440 expirable article has to live.  Gnus starts counting days from when the
13441 message @emph{arrived}, not from when it was sent.  The default is seven
13442 days.
13443
13444 Gnus also supplies a function that lets you fine-tune how long articles
13445 are to live, based on what group they are in.  Let's say you want to
13446 have one month expiry period in the @samp{mail.private} group, a one day
13447 expiry period in the @samp{mail.junk} group, and a six day expiry period
13448 everywhere else:
13449
13450 @vindex nnmail-expiry-wait-function
13451 @lisp
13452 (setq nnmail-expiry-wait-function
13453       (lambda (group)
13454        (cond ((string= group "mail.private")
13455                31)
13456              ((string= group "mail.junk")
13457                1)
13458              ((string= group "important")
13459                'never)
13460              (t
13461                6))))
13462 @end lisp
13463
13464 The group names this function is fed are ``unadorned'' group
13465 names---no @samp{nnml:} prefixes and the like.
13466
13467 The @code{nnmail-expiry-wait} variable and
13468 @code{nnmail-expiry-wait-function} function can either be a number (not
13469 necessarily an integer) or one of the symbols @code{immediate} or
13470 @code{never}.
13471
13472 You can also use the @code{expiry-wait} group parameter to selectively
13473 change the expiry period (@pxref{Group Parameters}).
13474
13475 @vindex nnmail-expiry-target
13476 The normal action taken when expiring articles is to delete them.
13477 However, in some circumstances it might make more sense to move them
13478 to other groups instead of deleting them.  The variable
13479 @code{nnmail-expiry-target} (and the @code{expiry-target} group
13480 parameter) controls this.  The variable supplies a default value for
13481 all groups, which can be overridden for specific groups by the group
13482 parameter.  default value is @code{delete}, but this can also be a
13483 string (which should be the name of the group the message should be
13484 moved to), or a function (which will be called in a buffer narrowed to
13485 the message in question, and with the name of the group being moved
13486 from as its parameter) which should return a target -- either a group
13487 name or @code{delete}.
13488
13489 Here's an example for specifying a group name:
13490 @lisp
13491 (setq nnmail-expiry-target "nnml:expired")
13492 @end lisp
13493
13494 @findex nnmail-fancy-expiry-target
13495 @vindex nnmail-fancy-expiry-targets
13496 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
13497 expire mail to groups according to the variable
13498 @code{nnmail-fancy-expiry-targets}.  Here's an example:
13499
13500 @lisp
13501  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
13502        nnmail-fancy-expiry-targets
13503        '((to-from "boss" "nnfolder:Work")
13504          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
13505          ("from" ".*" "nnfolder:Archive-%Y")))
13506 @end lisp
13507
13508 With this setup, any mail that has @code{IMPORTANT} in its Subject
13509 header and was sent in the year @code{YYYY} and month @code{MMM}, will
13510 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}. If its
13511 From or To header contains the string @code{boss}, it will get expired
13512 to @code{nnfolder:Work}. All other mail will get expired to
13513 @code{nnfolder:Archive-YYYY}.
13514
13515 @vindex nnmail-keep-last-article
13516 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
13517 expire the final article in a mail newsgroup.  This is to make life
13518 easier for procmail users.
13519
13520 @vindex gnus-total-expirable-newsgroups
13521 By the way: That line up there, about Gnus never expiring non-expirable
13522 articles, is a lie.  If you put @code{total-expire} in the group
13523 parameters, articles will not be marked as expirable, but all read
13524 articles will be put through the expiry process.  Use with extreme
13525 caution.  Even more dangerous is the
13526 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
13527 this regexp will have all read articles put through the expiry process,
13528 which means that @emph{all} old mail articles in the groups in question
13529 will be deleted after a while.  Use with extreme caution, and don't come
13530 crying to me when you discover that the regexp you used matched the
13531 wrong group and all your important mail has disappeared.  Be a
13532 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
13533 with!  So there!
13534
13535 Most people make most of their mail groups total-expirable, though.
13536
13537 @vindex gnus-inhibit-user-auto-expire
13538 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
13539 commands will not mark an article as expirable, even if the group has
13540 auto-expire turned on.
13541
13542
13543 @node Washing Mail
13544 @subsection Washing Mail
13545 @cindex mail washing
13546 @cindex list server brain damage
13547 @cindex incoming mail treatment
13548
13549 Mailers and list servers are notorious for doing all sorts of really,
13550 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
13551 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
13552 end of all lines passing through our server, so let's do that!!!!1!''
13553 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
13554 considered to be self-evident were not discussed.  So.  Here we are.
13555
13556 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
13557 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
13558 be shocked and dismayed by this, but I haven't got the energy.  It is to
13559 laugh.
13560
13561 Gnus provides a plethora of functions for washing articles while
13562 displaying them, but it might be nicer to do the filtering before
13563 storing the mail to disc.  For that purpose, we have three hooks and
13564 various functions that can be put in these hooks.
13565
13566 @table @code
13567 @item nnmail-prepare-incoming-hook
13568 @vindex nnmail-prepare-incoming-hook
13569 This hook is called before doing anything with the mail and is meant for
13570 grand, sweeping gestures.  It is called in a buffer that contains all
13571 the new, incoming mail.  Functions to be used include:
13572
13573 @table @code
13574 @item nnheader-ms-strip-cr
13575 @findex nnheader-ms-strip-cr
13576 Remove trailing carriage returns from each line.  This is default on
13577 Emacs running on MS machines.
13578
13579 @end table
13580
13581 @item nnmail-prepare-incoming-header-hook
13582 @vindex nnmail-prepare-incoming-header-hook
13583 This hook is called narrowed to each header.  It can be used when
13584 cleaning up the headers.  Functions that can be used include:
13585
13586 @table @code
13587 @item nnmail-remove-leading-whitespace
13588 @findex nnmail-remove-leading-whitespace
13589 Clear leading white space that ``helpful'' listservs have added to the
13590 headers to make them look nice.  Aaah.
13591
13592 @item nnmail-remove-list-identifiers
13593 @findex nnmail-remove-list-identifiers
13594 Some list servers add an identifier---for example, @samp{(idm)}---to the
13595 beginning of all @code{Subject} headers.  I'm sure that's nice for
13596 people who use stone age mail readers.  This function will remove
13597 strings that match the @code{nnmail-list-identifiers} regexp, which can
13598 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
13599 @code{\\(..\\)}.
13600
13601 For instance, if you want to remove the @samp{(idm)} and the
13602 @samp{nagnagnag} identifiers:
13603
13604 @lisp
13605 (setq nnmail-list-identifiers
13606       '("(idm)" "nagnagnag"))
13607 @end lisp
13608
13609 This can also be done non-destructively with
13610 @code{gnus-list-identifiers}, @xref{Article Hiding}.
13611
13612 @item nnmail-remove-tabs
13613 @findex nnmail-remove-tabs
13614 Translate all @samp{TAB} characters into @samp{SPACE} characters.
13615
13616 @item nnmail-fix-eudora-headers
13617 @findex nnmail-fix-eudora-headers
13618 @cindex Eudora
13619 Eudora produces broken @code{References} headers, but OK
13620 @code{In-Reply-To} headers.  This function will get rid of the
13621 @code{References} headers.
13622
13623 @end table
13624
13625 @item nnmail-prepare-incoming-message-hook
13626 @vindex nnmail-prepare-incoming-message-hook
13627 This hook is called narrowed to each message.  Functions to be used
13628 include:
13629
13630 @table @code
13631 @item article-de-quoted-unreadable
13632 @findex article-de-quoted-unreadable
13633 Decode Quoted Readable encoding.
13634
13635 @end table
13636 @end table
13637
13638
13639 @node Duplicates
13640 @subsection Duplicates
13641
13642 @vindex nnmail-treat-duplicates
13643 @vindex nnmail-message-id-cache-length
13644 @vindex nnmail-message-id-cache-file
13645 @cindex duplicate mails
13646 If you are a member of a couple of mailing lists, you will sometimes
13647 receive two copies of the same mail.  This can be quite annoying, so
13648 @code{nnmail} checks for and treats any duplicates it might find.  To do
13649 this, it keeps a cache of old @code{Message-ID}s---
13650 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
13651 default.  The approximate maximum number of @code{Message-ID}s stored
13652 there is controlled by the @code{nnmail-message-id-cache-length}
13653 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
13654 stored.) If all this sounds scary to you, you can set
13655 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
13656 default), and @code{nnmail} won't delete duplicate mails.  Instead it
13657 will insert a warning into the head of the mail saying that it thinks
13658 that this is a duplicate of a different message.
13659
13660 This variable can also be a function.  If that's the case, the function
13661 will be called from a buffer narrowed to the message in question with
13662 the @code{Message-ID} as a parameter.  The function must return either
13663 @code{nil}, @code{warn}, or @code{delete}.
13664
13665 You can turn this feature off completely by setting the variable to
13666 @code{nil}.
13667
13668 If you want all the duplicate mails to be put into a special
13669 @dfn{duplicates} group, you could do that using the normal mail split
13670 methods:
13671
13672 @lisp
13673 (setq nnmail-split-fancy
13674       '(| ;; Messages duplicates go to a separate group.
13675           ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
13676           ;; Message from daemons, postmaster, and the like to another.
13677           (any mail "mail.misc")
13678           ;; Other rules.
13679           [ ... ] ))
13680 @end lisp
13681
13682 Or something like:
13683 @lisp
13684 (setq nnmail-split-methods
13685       '(("duplicates" "^Gnus-Warning:.*duplicate")
13686         ;; Other rules.
13687         [...]))
13688 @end lisp
13689
13690 Here's a neat feature: If you know that the recipient reads her mail
13691 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
13692 @code{delete}, you can send her as many insults as you like, just by
13693 using a @code{Message-ID} of a mail that you know that she's already
13694 received.  Think of all the fun!  She'll never see any of it!  Whee!
13695
13696
13697 @node Not Reading Mail
13698 @subsection Not Reading Mail
13699
13700 If you start using any of the mail back ends, they have the annoying
13701 habit of assuming that you want to read mail with them.  This might not
13702 be unreasonable, but it might not be what you want.
13703
13704 If you set @code{mail-sources} and @code{nnmail-spool-file} to
13705 @code{nil}, none of the back ends will ever attempt to read incoming
13706 mail, which should help.
13707
13708 @vindex nnbabyl-get-new-mail
13709 @vindex nnmbox-get-new-mail
13710 @vindex nnml-get-new-mail
13711 @vindex nnmh-get-new-mail
13712 @vindex nnfolder-get-new-mail
13713 This might be too much, if, for instance, you are reading mail quite
13714 happily with @code{nnml} and just want to peek at some old @sc{rmail}
13715 file you have stashed away with @code{nnbabyl}.  All back ends have
13716 variables called back-end-@code{get-new-mail}.  If you want to disable
13717 the @code{nnbabyl} mail reading, you edit the virtual server for the
13718 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
13719
13720 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
13721 narrowed to the article to be saved before saving it when reading
13722 incoming mail.
13723
13724
13725 @node Choosing a Mail Back End
13726 @subsection Choosing a Mail Back End
13727
13728 Gnus will read the mail spool when you activate a mail group.  The mail
13729 file is first copied to your home directory.  What happens after that
13730 depends on what format you want to store your mail in.
13731
13732 There are six different mail back ends in the standard Gnus, and more
13733 back ends are available separately.  The mail back end most people use
13734 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
13735 Spool}).  You might notice that only five back ends are listed below;
13736 @code{nnmaildir}'s documentation has not yet been completely
13737 incorporated into this manual.  Until it is, you can find it at
13738 @uref{http://multivac.cwru.edu./nnmaildir/}.
13739
13740 @menu
13741 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
13742 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
13743 * Mail Spool::                  Store your mail in a private spool?
13744 * MH Spool::                    An mhspool-like back end.
13745 * Mail Folders::                Having one file for each group.
13746 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
13747 @end menu
13748
13749
13750 @node Unix Mail Box
13751 @subsubsection Unix Mail Box
13752 @cindex nnmbox
13753 @cindex unix mail box
13754
13755 @vindex nnmbox-active-file
13756 @vindex nnmbox-mbox-file
13757 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
13758 mail.  @code{nnmbox} will add extra headers to each mail article to say
13759 which group it belongs in.
13760
13761 Virtual server settings:
13762
13763 @table @code
13764 @item nnmbox-mbox-file
13765 @vindex nnmbox-mbox-file
13766 The name of the mail box in the user's home directory.  Default is
13767 @file{~/mbox}.
13768
13769 @item nnmbox-active-file
13770 @vindex nnmbox-active-file
13771 The name of the active file for the mail box.  Default is
13772 @file{~/.mbox-active}.
13773
13774 @item nnmbox-get-new-mail
13775 @vindex nnmbox-get-new-mail
13776 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
13777 into groups.  Default is @code{t}.
13778 @end table
13779
13780
13781 @node Rmail Babyl
13782 @subsubsection Rmail Babyl
13783 @cindex nnbabyl
13784 @cindex rmail mbox
13785
13786 @vindex nnbabyl-active-file
13787 @vindex nnbabyl-mbox-file
13788 The @dfn{nnbabyl} back end will use a babyl mail box (aka. @dfn{rmail
13789 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
13790 mail article to say which group it belongs in.
13791
13792 Virtual server settings:
13793
13794 @table @code
13795 @item nnbabyl-mbox-file
13796 @vindex nnbabyl-mbox-file
13797 The name of the rmail mbox file.  The default is @file{~/RMAIL}
13798
13799 @item nnbabyl-active-file
13800 @vindex nnbabyl-active-file
13801 The name of the active file for the rmail box.  The default is
13802 @file{~/.rmail-active}
13803
13804 @item nnbabyl-get-new-mail
13805 @vindex nnbabyl-get-new-mail
13806 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
13807 @code{t}
13808 @end table
13809
13810
13811 @node Mail Spool
13812 @subsubsection Mail Spool
13813 @cindex nnml
13814 @cindex mail @sc{nov} spool
13815
13816 The @dfn{nnml} spool mail format isn't compatible with any other known
13817 format.  It should be used with some caution.
13818
13819 @vindex nnml-directory
13820 If you use this back end, Gnus will split all incoming mail into files,
13821 one file for each mail, and put the articles into the corresponding
13822 directories under the directory specified by the @code{nnml-directory}
13823 variable.  The default value is @file{~/Mail/}.
13824
13825 You do not have to create any directories beforehand; Gnus will take
13826 care of all that.
13827
13828 If you have a strict limit as to how many files you are allowed to store
13829 in your account, you should not use this back end.  As each mail gets its
13830 own file, you might very well occupy thousands of inodes within a few
13831 weeks.  If this is no problem for you, and it isn't a problem for you
13832 having your friendly systems administrator walking around, madly,
13833 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
13834 know that this is probably the fastest format to use.  You do not have
13835 to trudge through a big mbox file just to read your new mail.
13836
13837 @code{nnml} is probably the slowest back end when it comes to article
13838 splitting.  It has to create lots of files, and it also generates
13839 @sc{nov} databases for the incoming mails.  This makes it possibly the
13840 fastest back end when it comes to reading mail.
13841
13842 @cindex self contained nnml servers
13843 @cindex marks
13844 When the marks file is used (which it is by default), @code{nnml}
13845 servers have the property that you may backup them using @code{tar} or
13846 similar, and later be able to restore them into Gnus (by adding the
13847 proper @code{nnml} server) and have all your marks be preserved.  Marks
13848 for a group is usually stored in the @code{.marks} file (but see
13849 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
13850 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
13851 to restore the group (after restoring the backup into the nnml
13852 directory).
13853
13854 If for some reason you believe your @file{.marks} files are screwed
13855 up, you can just delete them all.  Gnus will then correctly regenerate
13856 them next time it starts.
13857
13858 Virtual server settings:
13859
13860 @table @code
13861 @item nnml-directory
13862 @vindex nnml-directory
13863 All @code{nnml} directories will be placed under this directory.
13864 The default is the value of `message-directory' (whose default value is
13865 @file{~/Mail}).
13866
13867 @item nnml-active-file
13868 @vindex nnml-active-file
13869 The active file for the @code{nnml} server.  The default is
13870 @file{~/Mail/active"}.
13871
13872 @item nnml-newsgroups-file
13873 @vindex nnml-newsgroups-file
13874 The @code{nnml} group descriptions file.  @xref{Newsgroups File
13875 Format}.  The default is @file{~/Mail/newsgroups"}.
13876
13877 @item nnml-get-new-mail
13878 @vindex nnml-get-new-mail
13879 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
13880 @code{t}.
13881
13882 @item nnml-nov-is-evil
13883 @vindex nnml-nov-is-evil
13884 If non-@code{nil}, this back end will ignore any @sc{nov} files.  The
13885 default is @code{nil}.
13886
13887 @item nnml-nov-file-name
13888 @vindex nnml-nov-file-name
13889 The name of the @sc{nov} files.  The default is @file{.overview}.
13890
13891 @item nnml-prepare-save-mail-hook
13892 @vindex nnml-prepare-save-mail-hook
13893 Hook run narrowed to an article before saving.
13894
13895 @item nnml-marks-is-evil
13896 @vindex nnml-marks-is-evil
13897 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
13898 default is @code{nil}.
13899
13900 @item nnml-marks-file-name
13901 @vindex nnml-marks-file-name
13902 The name of the @dfn{marks} files.  The default is @file{.marks}.
13903
13904 @item nnml-use-compressed-files
13905 @vindex nnml-use-compressed-files
13906 If non-@code{nil}, @code{nnml} will allow using compressed message
13907 files.
13908
13909 @end table
13910
13911 @findex nnml-generate-nov-databases
13912 If your @code{nnml} groups and @sc{nov} files get totally out of whack,
13913 you can do a complete update by typing @kbd{M-x
13914 nnml-generate-nov-databases}.  This command will trawl through the
13915 entire @code{nnml} hierarchy, looking at each and every article, so it
13916 might take a while to complete.  A better interface to this
13917 functionality can be found in the server buffer (@pxref{Server
13918 Commands}).
13919
13920
13921 @node MH Spool
13922 @subsubsection MH Spool
13923 @cindex nnmh
13924 @cindex mh-e mail spool
13925
13926 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
13927 @sc{nov} databases and it doesn't keep an active file or marks file.
13928 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
13929 but it also makes it easier to write procmail scripts for.
13930
13931 Virtual server settings:
13932
13933 @table @code
13934 @item nnmh-directory
13935 @vindex nnmh-directory
13936 All @code{nnmh} directories will be located under this directory.  The
13937 default is the value of @code{message-directory} (whose default is
13938 @file{~/Mail})
13939
13940 @item nnmh-get-new-mail
13941 @vindex nnmh-get-new-mail
13942 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
13943 @code{t}.
13944
13945 @item nnmh-be-safe
13946 @vindex nnmh-be-safe
13947 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
13948 sure that the articles in the folder are actually what Gnus thinks they
13949 are.  It will check date stamps and stat everything in sight, so
13950 setting this to @code{t} will mean a serious slow-down.  If you never
13951 use anything but Gnus to read the @code{nnmh} articles, you do not have
13952 to set this variable to @code{t}.  The default is @code{nil}.
13953 @end table
13954
13955
13956 @node Mail Folders
13957 @subsubsection Mail Folders
13958 @cindex nnfolder
13959 @cindex mbox folders
13960 @cindex mail folders
13961
13962 @code{nnfolder} is a back end for storing each mail group in a separate
13963 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
13964 will add extra headers to keep track of article numbers and arrival
13965 dates.
13966
13967 @cindex self contained nnfolder servers
13968 @cindex marks
13969 When the marks file is used (which it is by default), @code{nnfolder}
13970 servers have the property that you may backup them using @code{tar} or
13971 similar, and later be able to restore them into Gnus (by adding the
13972 proper @code{nnfolder} server) and have all your marks be preserved.
13973 Marks for a group is usually stored in a file named as the mbox file
13974 with @code{.mrk} concatenated to it (but see
13975 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
13976 Individual @code{nnfolder} groups are also possible to backup, use
13977 @kbd{G m} to restore the group (after restoring the backup into the
13978 @code{nnfolder} directory).
13979
13980 Virtual server settings:
13981
13982 @table @code
13983 @item nnfolder-directory
13984 @vindex nnfolder-directory
13985 All the @code{nnfolder} mail boxes will be stored under this directory.
13986 The default is the value of @code{message-directory} (whose default is
13987 @file{~/Mail})
13988
13989 @item nnfolder-active-file
13990 @vindex nnfolder-active-file
13991 The name of the active file.  The default is @file{~/Mail/active}.
13992
13993 @item nnfolder-newsgroups-file
13994 @vindex nnfolder-newsgroups-file
13995 The name of the group descriptions file.  @xref{Newsgroups File
13996 Format}.  The default is @file{~/Mail/newsgroups"}
13997
13998 @item nnfolder-get-new-mail
13999 @vindex nnfolder-get-new-mail
14000 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
14001 is @code{t}
14002
14003 @item nnfolder-save-buffer-hook
14004 @vindex nnfolder-save-buffer-hook
14005 @cindex backup files
14006 Hook run before saving the folders.  Note that Emacs does the normal
14007 backup renaming of files even with the @code{nnfolder} buffers.  If you
14008 wish to switch this off, you could say something like the following in
14009 your @file{.emacs} file:
14010
14011 @lisp
14012 (defun turn-off-backup ()
14013   (set (make-local-variable 'backup-inhibited) t))
14014
14015 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
14016 @end lisp
14017
14018 @item nnfolder-delete-mail-hook
14019 @vindex nnfolder-delete-mail-hook
14020 Hook run in a buffer narrowed to the message that is to be deleted.
14021 This function can be used to copy the message to somewhere else, or to
14022 extract some information from it before removing it.
14023
14024 @item nnfolder-nov-is-evil
14025 @vindex nnfolder-nov-is-evil
14026 If non-@code{nil}, this back end will ignore any @sc{nov} files.  The
14027 default is @code{nil}.
14028
14029 @item nnfolder-nov-file-suffix
14030 @vindex nnfolder-nov-file-suffix
14031 The extension for @sc{nov} files.  The default is @file{.nov}.
14032
14033 @item nnfolder-nov-directory
14034 @vindex nnfolder-nov-directory
14035 The directory where the @sc{nov} files should be stored.  If nil,
14036 @code{nnfolder-directory} is used.
14037
14038 @item nnfolder-marks-is-evil
14039 @vindex nnfolder-marks-is-evil
14040 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14041 default is @code{nil}.
14042
14043 @item nnfolder-marks-file-suffix
14044 @vindex nnfolder-marks-file-suffix
14045 The extension for @sc{marks} files.  The default is @file{.mrk}.
14046
14047 @item nnfolder-marks-directory
14048 @vindex nnfolder-marks-directory
14049 The directory where the @sc{marks} files should be stored.  If nil,
14050 @code{nnfolder-directory} is used.
14051
14052 @end table
14053
14054
14055 @findex nnfolder-generate-active-file
14056 @kindex M-x nnfolder-generate-active-file
14057 If you have lots of @code{nnfolder}-like files you'd like to read with
14058 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
14059 command to make @code{nnfolder} aware of all likely files in
14060 @code{nnfolder-directory}.  This only works if you use long file names,
14061 though.
14062
14063 @node Comparing Mail Back Ends
14064 @subsubsection Comparing Mail Back Ends
14065
14066 First, just for terminology, the @dfn{back end} is the common word for a
14067 low-level access method---a transport, if you will, by which something
14068 is acquired.  The sense is that one's mail has to come from somewhere,
14069 and so selection of a suitable back end is required in order to get that
14070 mail within spitting distance of Gnus.
14071
14072 The same concept exists for Usenet itself: Though access to articles is
14073 typically done by @sc{nntp} these days, once upon a midnight dreary, everyone
14074 in the world got at Usenet by running a reader on the machine where the
14075 articles lay (the machine which today we call an @sc{nntp} server), and
14076 access was by the reader stepping into the articles' directory spool
14077 area directly.  One can still select between either the @code{nntp} or
14078 @code{nnspool} back ends, to select between these methods, if one happens
14079 actually to live on the server (or can see its spool directly, anyway,
14080 via NFS).
14081
14082 The goal in selecting a mail back end is to pick one which
14083 simultaneously represents a suitable way of dealing with the original
14084 format plus leaving mail in a form that is convenient to use in the
14085 future.  Here are some high and low points on each:
14086
14087 @table @code
14088 @item nnmbox
14089
14090 UNIX systems have historically had a single, very common, and well-
14091 defined format.  All messages arrive in a single @dfn{spool file}, and
14092 they are delineated by a line whose regular expression matches
14093 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
14094 to make it clear in this instance that this is not the RFC-specified
14095 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
14096 historically from the Unix environment, it is simplest if one does not
14097 mess a great deal with the original mailbox format, so if one chooses
14098 this back end, Gnus' primary activity in getting mail from the real spool
14099 area to Gnus' preferred directory is simply to copy it, with no
14100 (appreciable) format change in the process.  It is the ``dumbest'' way
14101 to move mail into availability in the Gnus environment.  This makes it
14102 fast to move into place, but slow to parse, when Gnus has to look at
14103 what's where.
14104
14105 @item nnbabyl
14106
14107 Once upon a time, there was the DEC-10 and DEC-20, running operating
14108 systems called TOPS and related things, and the usual (only?) mail
14109 reading environment was a thing called Babyl.  I don't know what format
14110 was used for mail landing on the system, but Babyl had its own internal
14111 format to which mail was converted, primarily involving creating a
14112 spool-file-like entity with a scheme for inserting Babyl-specific
14113 headers and status bits above the top of each message in the file.
14114 RMAIL was Emacs' first mail reader, it was written by Richard Stallman,
14115 and Stallman came out of that TOPS/Babyl environment, so he wrote RMAIL
14116 to understand the mail files folks already had in existence.  Gnus (and
14117 VM, for that matter) continue to support this format because it's
14118 perceived as having some good qualities in those mailer-specific
14119 headers/status bits stuff.  RMAIL itself still exists as well, of
14120 course, and is still maintained by Stallman.
14121
14122 Both of the above forms leave your mail in a single file on your
14123 filesystem, and they must parse that entire file each time you take a
14124 look at your mail.
14125
14126 @item nnml
14127
14128 @code{nnml} is the back end which smells the most as though you were
14129 actually operating with an @code{nnspool}-accessed Usenet system.  (In
14130 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
14131 lo these years ago.)  One's mail is taken from the original spool file,
14132 and is then cut up into individual message files, 1:1.  It maintains a
14133 Usenet-style active file (analogous to what one finds in an INN- or
14134 CNews-based news system in (for instance) @file{/var/lib/news/active},
14135 or what is returned via the @samp{NNTP LIST} verb) and also creates
14136 @dfn{overview} files for efficient group entry, as has been defined for
14137 @sc{nntp} servers for some years now.  It is slower in mail-splitting,
14138 due to the creation of lots of files, updates to the @code{nnml} active
14139 file, and additions to overview files on a per-message basis, but it is
14140 extremely fast on access because of what amounts to the indexing support
14141 provided by the active file and overviews.
14142
14143 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
14144 resource which defines available places in the filesystem to put new
14145 files.  Sysadmins take a dim view of heavy inode occupation within
14146 tight, shared filesystems.  But if you live on a personal machine where
14147 the filesystem is your own and space is not at a premium, @code{nnml}
14148 wins big.
14149
14150 It is also problematic using this back end if you are living in a
14151 FAT16-based Windows world, since much space will be wasted on all these
14152 tiny files.
14153
14154 @item nnmh
14155
14156 The Rand MH mail-reading system has been around UNIX systems for a very
14157 long time; it operates by splitting one's spool file of messages into
14158 individual files, but with little or no indexing support -- @code{nnmh}
14159 is considered to be semantically equivalent to ``@code{nnml} without
14160 active file or overviews''.  This is arguably the worst choice, because
14161 one gets the slowness of individual file creation married to the
14162 slowness of access parsing when learning what's new in one's groups.
14163
14164 @item nnfolder
14165
14166 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
14167 method described above) on a per-group basis.  That is, @code{nnmbox}
14168 itself puts *all* one's mail in one file; @code{nnfolder} provides a
14169 little bit of optimization to this so that each of one's mail groups has
14170 a Unix mail box file.  It's faster than @code{nnmbox} because each group
14171 can be parsed separately, and still provides the simple Unix mail box
14172 format requiring minimal effort in moving the mail around.  In addition,
14173 it maintains an ``active'' file making it much faster for Gnus to figure
14174 out how many messages there are in each separate group.
14175
14176 If you have groups that are expected to have a massive amount of
14177 messages, @code{nnfolder} is not the best choice, but if you receive
14178 only a moderate amount of mail, @code{nnfolder} is probably the most
14179 friendly mail back end all over.
14180
14181 @item nnmaildir
14182
14183 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
14184 differences.  Each message is stored in a separate file, but the
14185 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
14186 also stores the equivalent of @code{nnml}'s overview files in one file
14187 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
14188 @code{df -i} to see how plentiful your inode supply is.)  If this slows
14189 you down or takes up very much space, consider switching to ReiserFS
14190 (@uref{http://www.namesys.com/}) or another non-block-structured
14191 filesystem.
14192
14193 Since maildirs don't require locking for delivery, the maildirs you use
14194 as groups can also be the maildirs your mail is directly delivered to.
14195 This means you can skip Gnus's mail splitting if your mail is already
14196 organized into different mailboxes during delivery.  A @code{directory}
14197 entry in @code{mail-sources} would have a similar effect, but would
14198 require one set of mailboxes for spooling deliveries (in mbox format,
14199 thus damaging message bodies), and another set to be used as groups (in
14200 whatever format you like).  A maildir has a built-in spool, in the
14201 @code{new/} subdirectory.  Beware that currently, mail moved from
14202 @code{new/} to @code{cur/} instead of via mail splitting will undergo
14203 treatment such as duplicate checking.
14204
14205 An article will not necessarily keep the same number across Gnus
14206 sessions; articles are renumbered starting from 1 for each Gnus session
14207 (more precisely, each time you open the @code{nnmaildir} server).  This
14208 way, you don't get gaps in your article number ranges, and when entering
14209 large groups, Gnus is likely to give a more accurate article count.  The
14210 price is that @code{nnmaildir} doesn't work with the cache or agent.
14211 This will probably be changed in the future.
14212
14213 @code{nnmaildir} stores article marks for a given group in the
14214 corresponding maildir, in a way designed so that it's easy to manipulate
14215 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
14216 else, and still have your marks.  @code{nnml} also stores marks, but
14217 it's not as easy to work with them from outside Gnus as with
14218 @code{nnmaildir}.
14219
14220 For configuring expiry and other things, @code{nnmaildir} uses group
14221 parameters slightly different from those of other mail backends.
14222
14223 @code{nnmaildir} uses a significant amount of memory to speed things up.
14224 (It keeps in memory some of the things that @code{nnml} stores in files
14225 and that @code{nnmh} repeatedly parses out of message files.)  If this
14226 is a problem for you, you can set the @code{nov-cache-size} group
14227 parameter to somthing small (0 would probably not work, but 1 probably
14228 would) to make it use less memory.
14229
14230 Startup and shutdown are likely to be slower with @code{nnmaildir} than
14231 with other backends.  Everything in between is likely to be faster,
14232 depending in part on your filesystem.
14233
14234 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
14235 to write an @code{nnmaildir}-derived backend.
14236
14237 @end table
14238
14239
14240 @node Browsing the Web
14241 @section Browsing the Web
14242 @cindex web
14243 @cindex browsing the web
14244 @cindex www
14245 @cindex http
14246
14247 Web-based discussion forums are getting more and more popular.  On many
14248 subjects, the web-based forums have become the most important forums,
14249 eclipsing the importance of mailing lists and news groups.  The reason
14250 is easy to understand---they are friendly to new users; you just point
14251 and click, and there's the discussion.  With mailing lists, you have to
14252 go through a cumbersome subscription procedure, and most people don't
14253 even know what a news group is.
14254
14255 The problem with this scenario is that web browsers are not very good at
14256 being newsreaders.  They do not keep track of what articles you've read;
14257 they do not allow you to score on subjects you're interested in; they do
14258 not allow off-line browsing; they require you to click around and drive
14259 you mad in the end.
14260
14261 So---if web browsers suck at reading discussion forums, why not use Gnus
14262 to do it instead?
14263
14264 Gnus has been getting a bit of a collection of back ends for providing
14265 interfaces to these sources.
14266
14267 @menu
14268 * Archiving Mail::              
14269 * Web Searches::                Creating groups from articles that match a string.
14270 * Slashdot::                    Reading the Slashdot comments.
14271 * Ultimate::                    The Ultimate Bulletin Board systems.
14272 * Web Archive::                 Reading mailing list archived on web.
14273 * RSS::                         Reading RDF site summary.
14274 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
14275 @end menu
14276
14277 All the web sources require Emacs/w3 and the url library to work.
14278
14279 The main caveat with all these web sources is that they probably won't
14280 work for a very long time.  Gleaning information from the @sc{html} data
14281 is guesswork at best, and when the layout is altered, the Gnus back end
14282 will fail.  If you have reasonably new versions of these back ends,
14283 though, you should be ok.
14284
14285 One thing all these Web methods have in common is that the Web sources
14286 are often down, unavailable or just plain too slow to be fun.  In those
14287 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
14288 Unplugged}) handle downloading articles, and then you can read them at
14289 leisure from your local disk.  No more World Wide Wait for you.
14290
14291 @node Archiving Mail
14292 @subsection Archiving Mail
14293 @cindex archiving mail
14294 @cindex backup of mail
14295
14296 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
14297 @code{nnmaildir}, now actually store the article marks with each group.
14298 For these servers, archiving and restoring a group while preserving
14299 marks is fairly simple.
14300
14301 (Preserving the group level and group parameters as well still
14302 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
14303 though.)
14304
14305 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
14306 server, take a recursive copy of the server directory.  There is no need
14307 to shut down Gnus, so archiving may be invoked by @code{cron} or
14308 similar.  You restore the data by restoring the directory tree, and
14309 adding a server definition pointing to that directory in Gnus. The
14310 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
14311 might interfer with overwriting data, so you may want to shut down Gnus
14312 before you restore the data.
14313
14314 It is also possible to archive individual @code{nnml},
14315 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
14316 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
14317 directory.  For @code{nnfolder} you need to copy both the base folder
14318 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
14319 this example). Restoring the group is done with @kbd{G m} from the Group
14320 buffer.  The last step makes Gnus notice the new directory.
14321 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
14322 is unnecessary in that case.
14323
14324 @node Web Searches
14325 @subsection Web Searches
14326 @cindex nnweb
14327 @cindex DejaNews
14328 @cindex Alta Vista
14329 @cindex InReference
14330 @cindex Usenet searches
14331 @cindex searching the Usenet
14332
14333 It's, like, too neat to search the Usenet for articles that match a
14334 string, but it, like, totally @emph{sucks}, like, totally, to use one of
14335 those, like, Web browsers, and you, like, have to, rilly, like, look at
14336 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
14337 searches without having to use a browser.
14338
14339 The @code{nnweb} back end allows an easy interface to the mighty search
14340 engine.  You create an @code{nnweb} group, enter a search pattern, and
14341 then enter the group and read the articles like you would any normal
14342 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
14343 Groups}) will do this in an easy-to-use fashion.
14344
14345 @code{nnweb} groups don't really lend themselves to being solid
14346 groups---they have a very fleeting idea of article numbers.  In fact,
14347 each time you enter an @code{nnweb} group (not even changing the search
14348 pattern), you are likely to get the articles ordered in a different
14349 manner.  Not even using duplicate suppression (@pxref{Duplicate
14350 Suppression}) will help, since @code{nnweb} doesn't even know the
14351 @code{Message-ID} of the articles before reading them using some search
14352 engines (DejaNews, for instance).  The only possible way to keep track
14353 of which articles you've read is by scoring on the @code{Date}
14354 header---mark all articles posted before the last date you read the
14355 group as read.
14356
14357 If the search engine changes its output substantially, @code{nnweb}
14358 won't be able to parse it and will fail.  One could hardly fault the Web
14359 providers if they were to do this---their @emph{raison d'être} is to
14360 make money off of advertisements, not to provide services to the
14361 community.  Since @code{nnweb} washes the ads off all the articles, one
14362 might think that the providers might be somewhat miffed.  We'll see.
14363
14364 You must have the @code{url} and @code{w3} package installed to be able
14365 to use @code{nnweb}.
14366
14367 Virtual server variables:
14368
14369 @table @code
14370 @item nnweb-type
14371 @vindex nnweb-type
14372 What search engine type is being used.  The currently supported types
14373 are @code{dejanews}, @code{dejanewsold}, @code{altavista} and
14374 @code{reference}.
14375
14376 @item nnweb-search
14377 @vindex nnweb-search
14378 The search string to feed to the search engine.
14379
14380 @item nnweb-max-hits
14381 @vindex nnweb-max-hits
14382 Advisory maximum number of hits per search to display.  The default is
14383 100.
14384
14385 @item nnweb-type-definition
14386 @vindex nnweb-type-definition
14387 Type-to-definition alist.  This alist says what @code{nnweb} should do
14388 with the various search engine types.  The following elements must be
14389 present:
14390
14391 @table @code
14392 @item article
14393 Function to decode the article and provide something that Gnus
14394 understands.
14395
14396 @item map
14397 Function to create an article number to message header and URL alist.
14398
14399 @item search
14400 Function to send the search string to the search engine.
14401
14402 @item address
14403 The address the aforementioned function should send the search string
14404 to.
14405
14406 @item id
14407 Format string URL to fetch an article by @code{Message-ID}.
14408 @end table
14409
14410 @end table
14411
14412
14413 @node Slashdot
14414 @subsection Slashdot
14415 @cindex Slashdot
14416 @cindex nnslashdot
14417
14418 Slashdot (@uref{http://slashdot.org/}) is a popular news site, with
14419 lively discussion following the news articles.  @code{nnslashdot} will
14420 let you read this forum in a convenient manner.
14421
14422 The easiest way to read this source is to put something like the
14423 following in your @file{.gnus.el} file:
14424
14425 @lisp
14426 (setq gnus-secondary-select-methods
14427       '((nnslashdot "")))
14428 @end lisp
14429
14430 This will make Gnus query the @code{nnslashdot} back end for new comments
14431 and groups.  The @kbd{F} command will subscribe each new news article as
14432 a new Gnus group, and you can read the comments by entering these
14433 groups.  (Note that the default subscription method is to subscribe new
14434 groups as zombies.  Other methods are available (@pxref{Subscription
14435 Methods}).
14436
14437 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
14438 command is the most handy tool (@pxref{Foreign Groups}).
14439
14440 When following up to @code{nnslashdot} comments (or posting new
14441 comments), some light @sc{html}izations will be performed.  In
14442 particular, text quoted with @samp{> } will be quoted with
14443 @code{blockquote} instead, and signatures will have @code{br} added to
14444 the end of each line.  Other than that, you can just write @sc{html}
14445 directly into the message buffer.  Note that Slashdot filters out some
14446 @sc{html} forms.
14447
14448 The following variables can be altered to change its behavior:
14449
14450 @table @code
14451 @item nnslashdot-threaded
14452 Whether @code{nnslashdot} should display threaded groups or not.  The
14453 default is @code{t}.  To be able to display threads, @code{nnslashdot}
14454 has to retrieve absolutely all comments in a group upon entry.  If a
14455 threaded display is not required, @code{nnslashdot} will only retrieve
14456 the comments that are actually wanted by the user.  Threading is nicer,
14457 but much, much slower than untreaded.
14458
14459 @item nnslashdot-login-name
14460 @vindex nnslashdot-login-name
14461 The login name to use when posting.
14462
14463 @item nnslashdot-password
14464 @vindex nnslashdot-password
14465 The password to use when posting.
14466
14467 @item nnslashdot-directory
14468 @vindex nnslashdot-directory
14469 Where @code{nnslashdot} will store its files.  The default is
14470 @samp{~/News/slashdot/}.
14471
14472 @item nnslashdot-active-url
14473 @vindex nnslashdot-active-url
14474 The @sc{url} format string that will be used to fetch the information on
14475 news articles and comments.  The default is
14476 @samp{http://slashdot.org/search.pl?section=&min=%d}.
14477
14478 @item nnslashdot-comments-url
14479 @vindex nnslashdot-comments-url
14480 The @sc{url} format string that will be used to fetch comments.  The
14481 default is
14482 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
14483
14484 @item nnslashdot-article-url
14485 @vindex nnslashdot-article-url
14486 The @sc{url} format string that will be used to fetch the news article.  The
14487 default is
14488 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
14489
14490 @item nnslashdot-threshold
14491 @vindex nnslashdot-threshold
14492 The score threshold.  The default is -1.
14493
14494 @item nnslashdot-group-number
14495 @vindex nnslashdot-group-number
14496 The number of old groups, in addition to the ten latest, to keep
14497 updated.  The default is 0.
14498
14499 @end table
14500
14501
14502
14503 @node Ultimate
14504 @subsection Ultimate
14505 @cindex nnultimate
14506 @cindex Ultimate Bulletin Board
14507
14508 The Ultimate Bulletin Board (@uref{http://www.ultimatebb.com/}) is
14509 probably the most popular Web bulletin board system used.  It has a
14510 quite regular and nice interface, and it's possible to get the
14511 information Gnus needs to keep groups updated.
14512
14513 The easiest way to get started with @code{nnultimate} is to say
14514 something like the following in the group buffer:  @kbd{B nnultimate RET
14515 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
14516 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
14517 you're interested in; there's quite a list of them on the Ultimate web
14518 site.)  Then subscribe to the groups you're interested in from the
14519 server buffer, and read them from the group buffer.
14520
14521 The following @code{nnultimate} variables can be altered:
14522
14523 @table @code
14524 @item nnultimate-directory
14525 @vindex nnultimate-directory
14526 The directory where @code{nnultimate} stores its files.  The default is
14527 @samp{~/News/ultimate/}.
14528 @end table
14529
14530
14531 @node Web Archive
14532 @subsection Web Archive
14533 @cindex nnwarchive
14534 @cindex Web Archive
14535
14536 Some mailing lists only have archives on Web servers, such as
14537 @uref{http://www.egroups.com/} and
14538 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
14539 interface, and it's possible to get the information Gnus needs to keep
14540 groups updated.
14541
14542 The easiest way to get started with @code{nnwarchive} is to say
14543 something like the following in the group buffer: @kbd{M-x
14544 gnus-group-make-warchive-group RET an_egroup RET egroups RET
14545 www.egroups.com RET your@@email.address RET}.  (Substitute the
14546 @sc{an_egroup} with the mailing list you subscribed, the
14547 @sc{your@@email.address} with your email address.), or to browse the
14548 back end by @kbd{B nnwarchive RET mail-archive RET}.
14549
14550 The following @code{nnwarchive} variables can be altered:
14551
14552 @table @code
14553 @item nnwarchive-directory
14554 @vindex nnwarchive-directory
14555 The directory where @code{nnwarchive} stores its files.  The default is
14556 @samp{~/News/warchive/}.
14557
14558 @item nnwarchive-login
14559 @vindex nnwarchive-login
14560 The account name on the web server.
14561
14562 @item nnwarchive-passwd
14563 @vindex nnwarchive-passwd
14564 The password for your account on the web server.
14565 @end table
14566
14567 @node RSS
14568 @subsection RSS
14569 @cindex nnrss
14570 @cindex RSS
14571
14572 Some sites have RDF site summary (RSS)
14573 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
14574 interface, and it's possible to get the information Gnus needs to keep
14575 groups updated.
14576
14577 The easiest way to get started with @code{nnrss} is to say something
14578 like the following in the group buffer: @kbd{B nnrss RET RET}, then
14579 subscribe groups.
14580
14581 The following @code{nnrss} variables can be altered:
14582
14583 @table @code
14584 @item nnrss-directory
14585 @vindex nnrss-directory
14586 The directory where @code{nnrss} stores its files.  The default is
14587 @samp{~/News/rss/}.
14588
14589 @end table
14590
14591 The following code may be helpful, if you want to show the description in
14592 the summary buffer.
14593
14594 @lisp
14595 (add-to-list 'nnmail-extra-headers nnrss-description-field)
14596 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
14597
14598 (defun gnus-user-format-function-X (header)
14599   (let ((descr
14600          (assq nnrss-description-field (mail-header-extra header))))
14601     (if descr (concat "\n\t" (cdr descr)) "")))
14602 @end lisp
14603
14604 The following code may be useful to open an nnrss url directly from the
14605 summary buffer.
14606 @lisp
14607 (require 'browse-url)
14608
14609 (defun browse-nnrss-url( arg )
14610   (interactive "p")
14611   (let ((url (assq nnrss-url-field
14612                    (mail-header-extra
14613                     (gnus-data-header
14614                      (assq (gnus-summary-article-number)
14615                            gnus-newsgroup-data))))))
14616     (if url
14617         (browse-url (cdr url))
14618       (gnus-summary-scroll-up arg))))
14619
14620 (eval-after-load "gnus"
14621   #'(define-key gnus-summary-mode-map
14622       (kbd "<RET>") 'browse-nnrss-url))
14623 (add-to-list 'nnmail-extra-headers nnrss-url-field)
14624 @end lisp
14625
14626 @node Customizing w3
14627 @subsection Customizing w3
14628 @cindex w3
14629 @cindex html
14630 @cindex url
14631 @cindex Netscape
14632
14633 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
14634 pages.  Emacs/w3 is documented in its own manual, but there are some
14635 things that may be more relevant for Gnus users.
14636
14637 For instance, a common question is how to make Emacs/w3 follow links
14638 using the @code{browse-url} functions (which will call some external web
14639 browser like Netscape).  Here's one way:
14640
14641 @lisp
14642 (eval-after-load "w3"
14643   '(progn
14644     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
14645     (defun w3-fetch (&optional url target)
14646       (interactive (list (w3-read-url-with-default)))
14647       (if (eq major-mode 'gnus-article-mode)
14648           (browse-url url)
14649         (w3-fetch-orig url target)))))
14650 @end lisp
14651
14652 Put that in your @file{.emacs} file, and hitting links in w3-rendered
14653 @sc{html} in the Gnus article buffers will use @code{browse-url} to
14654 follow the link.
14655
14656
14657 @node IMAP
14658 @section IMAP
14659 @cindex nnimap
14660 @cindex @sc{imap}
14661
14662 @sc{imap} is a network protocol for reading mail (or news, or ...),
14663 think of it as a modernized @sc{nntp}.  Connecting to a @sc{imap}
14664 server is much similar to connecting to a news server, you just
14665 specify the network address of the server.
14666
14667 @sc{imap} has two properties.  First, @sc{imap} can do everything that
14668 POP can, it can hence be viewed as a POP++.  Secondly, @sc{imap} is a
14669 mail storage protocol, similar to @sc{nntp} being a news storage
14670 protocol -- however, @sc{imap} offers more features than @sc{nntp}
14671 because news is more or less read-only whereas mail is read-write.
14672
14673 If you want to use @sc{imap} as a POP++, use an imap entry in
14674 @code{mail-sources}.  With this, Gnus will fetch mails from the
14675 @sc{imap} server and store them on the local disk.  This is not the
14676 usage described in this section--@xref{Mail Sources}.
14677
14678 If you want to use @sc{imap} as a mail storage protocol, use an nnimap
14679 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
14680 manipulate mails stored on the @sc{imap} server.  This is the kind of
14681 usage explained in this section.
14682
14683 A server configuration in @code{~/.gnus} with a few @sc{imap} servers
14684 might look something like the following. (Note that for SSL/TLS, you
14685 need external programs and libraries, see below.)
14686
14687 @lisp
14688 (setq gnus-secondary-select-methods
14689       '((nnimap "simpleserver") ; no special configuration
14690         ; perhaps a ssh port forwarded server:
14691         (nnimap "dolk"
14692                 (nnimap-address "localhost")
14693                 (nnimap-server-port 1430))
14694         ; a UW server running on localhost
14695         (nnimap "barbar"
14696                 (nnimap-server-port 143)
14697                 (nnimap-address "localhost")
14698                 (nnimap-list-pattern ("INBOX" "mail/*")))
14699         ; anonymous public cyrus server:
14700         (nnimap "cyrus.andrew.cmu.edu"
14701                 (nnimap-authenticator anonymous)
14702                 (nnimap-list-pattern "archive.*")
14703                 (nnimap-stream network))
14704         ; a ssl server on a non-standard port:
14705         (nnimap "vic20"
14706                 (nnimap-address "vic20.somewhere.com")
14707                 (nnimap-server-port 9930)
14708                 (nnimap-stream ssl))))
14709 @end lisp
14710
14711 The following variables can be used to create a virtual @code{nnimap}
14712 server:
14713
14714 @table @code
14715
14716 @item nnimap-address
14717 @vindex nnimap-address
14718
14719 The address of the remote @sc{imap} server.  Defaults to the virtual
14720 server name if not specified.
14721
14722 @item nnimap-server-port
14723 @vindex nnimap-server-port
14724 Port on server to contact.  Defaults to port 143, or 993 for SSL.
14725
14726 Note that this should be an integer, example server specification:
14727
14728 @lisp
14729 (nnimap "mail.server.com"
14730         (nnimap-server-port 4711))
14731 @end lisp
14732
14733 @item nnimap-list-pattern
14734 @vindex nnimap-list-pattern
14735 String or list of strings of mailboxes to limit available groups to.
14736 This is used when the server has very many mailboxes and you're only
14737 interested in a few -- some servers export your home directory via
14738 @sc{imap}, you'll probably want to limit the mailboxes to those in
14739 @file{~/Mail/*} then.
14740
14741 The string can also be a cons of REFERENCE and the string as above, what
14742 REFERENCE is used for is server specific, but on the University of
14743 Washington server it's a directory that will be concatenated with the
14744 mailbox.
14745
14746 Example server specification:
14747
14748 @lisp
14749 (nnimap "mail.server.com"
14750         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
14751                                ("~friend/Mail/" . "list/*"))))
14752 @end lisp
14753
14754 @item nnimap-stream
14755 @vindex nnimap-stream
14756 The type of stream used to connect to your server.  By default, nnimap
14757 will detect and automatically use all of the below, with the exception
14758 of SSL/TLS. (@sc{imap} over SSL/TLS is being replaced by STARTTLS, which
14759 can be automatically detected, but it's not widely deployed yet.)
14760
14761 Example server specification:
14762
14763 @lisp
14764 (nnimap "mail.server.com"
14765         (nnimap-stream ssl))
14766 @end lisp
14767
14768 Please note that the value of @code{nnimap-stream} is a symbol!
14769
14770 @itemize @bullet
14771 @item
14772 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5). Requires the
14773 @samp{imtest} program.
14774 @item
14775 @dfn{kerberos4:} Connect with Kerberos 4. Requires the @samp{imtest} program.
14776 @item
14777 @dfn{starttls:} Connect via the STARTTLS extension (similar to
14778 SSL).  Requires the external library @samp{starttls.el} and program
14779 @samp{starttls}.
14780 @item
14781 @dfn{ssl:} Connect through SSL.  Requires OpenSSL (the program
14782 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
14783 library @samp{ssl.el}.
14784 @item
14785 @dfn{shell:} Use a shell command to start @sc{imap} connection.
14786 @item
14787 @dfn{network:} Plain, TCP/IP network connection.
14788 @end itemize
14789
14790 @vindex imap-kerberos4-program
14791 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
14792 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
14793 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
14794 to make @code{imap.el} use a pty instead of a pipe when communicating
14795 with @samp{imtest}.  You will then suffer from a line length
14796 restrictions on @sc{imap} commands, which might make Gnus seem to hang
14797 indefinitely if you have many articles in a mailbox.  The variable
14798 @code{imap-kerberos4-program} contain parameters to pass to the imtest
14799 program.
14800
14801 @vindex imap-ssl-program
14802 For SSL connections, the OpenSSL program is available from
14803 @uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay,
14804 and nnimap support it too - altough the most recent versions of
14805 SSLeay, 0.9.x, are known to have serious bugs making it
14806 useless. Earlier versions, especially 0.8.x, of SSLeay are known to
14807 work. The variable @code{imap-ssl-program} contain parameters to pass
14808 to OpenSSL/SSLeay.  You also need @samp{ssl.el} (from the W3
14809 distribution, for instance).
14810
14811 @vindex imap-shell-program
14812 @vindex imap-shell-host
14813 For @sc{imap} connections using the @code{shell} stream, the variable
14814 @code{imap-shell-program} specify what program to call.
14815
14816 @item nnimap-authenticator
14817 @vindex nnimap-authenticator
14818
14819 The authenticator used to connect to the server.  By default, nnimap
14820 will use the most secure authenticator your server is capable of.
14821
14822 Example server specification:
14823
14824 @lisp
14825 (nnimap "mail.server.com"
14826         (nnimap-authenticator anonymous))
14827 @end lisp
14828
14829 Please note that the value of @code{nnimap-authenticator} is a symbol!
14830
14831 @itemize @bullet
14832 @item
14833 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication. Requires
14834 external program @code{imtest}.
14835 @item
14836 @dfn{kerberos4:} Kerberos 4 authentication. Requires external program
14837 @code{imtest}.
14838 @item
14839 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5. Requires
14840 external library @code{digest-md5.el}.
14841 @item
14842 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
14843 @item
14844 @dfn{login:} Plain-text username/password via LOGIN.
14845 @item
14846 @dfn{anonymous:} Login as `anonymous', supplying your emailadress as password.
14847 @end itemize
14848
14849 @item nnimap-expunge-on-close
14850 @cindex Expunging
14851 @vindex nnimap-expunge-on-close
14852 Unlike Parmenides the @sc{imap} designers has decided that things that
14853 doesn't exist actually does exist.  More specifically, @sc{imap} has
14854 this concept of marking articles @code{Deleted} which doesn't actually
14855 delete them, and this (marking them @code{Deleted}, that is) is what
14856 nnimap does when you delete a article in Gnus (with @kbd{G DEL} or
14857 similar).
14858
14859 Since the articles aren't really removed when we mark them with the
14860 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
14861 running in circles yet?
14862
14863 Traditionally, nnimap has removed all articles marked as @code{Deleted}
14864 when closing a mailbox but this is now configurable by this server
14865 variable.
14866
14867 The possible options are:
14868
14869 @table @code
14870
14871 @item always
14872 The default behavior, delete all articles marked as "Deleted" when
14873 closing a mailbox.
14874 @item never
14875 Never actually delete articles.  Currently there is no way of showing
14876 the articles marked for deletion in nnimap, but other @sc{imap} clients
14877 may allow you to do this.  If you ever want to run the EXPUNGE command
14878 manually, @xref{Expunging mailboxes}.
14879 @item ask
14880 When closing mailboxes, nnimap will ask if you wish to expunge deleted
14881 articles or not.
14882
14883 @end table
14884
14885 @item nnimap-importantize-dormant
14886 @vindex nnimap-importantize-dormant
14887
14888 If non-nil, marks dormant articles as ticked (as well), for other
14889 @sc{imap} clients. Within Gnus, dormant articles will naturally still
14890 (only) be marked as ticked.  This is to make dormant articles stand
14891 out, just like ticked articles, in other @sc{imap} clients. (In other
14892 words, Gnus has two ``Tick'' marks and @sc{imap} has only one.)
14893
14894 Probably the only reason for frobing this would be if you're trying
14895 enable per-user persistant dormant flags, using something like:
14896
14897 @lisp
14898 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
14899         (format "gnus-dormant-%s" (user-login-name)))
14900 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
14901         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
14902 @end lisp
14903
14904 In this case, you would not want the per-user dormant flag showing up
14905 as ticked for other users.
14906
14907 @item nnimap-expunge-search-string
14908 @cindex Expunging
14909 @vindex nnimap-expunge-search-string
14910
14911 This variable contain the @sc{imap} search command sent to server when
14912 searching for articles eligible for expiring.  The default is
14913 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
14914 UID set and the second @code{%s} is replaced by a date.
14915
14916 Probably the only useful value to change this to is
14917 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
14918 messages instead of the internal article date. See section 6.4.4 of
14919 RFC 2060 for more information on valid strings.
14920
14921 @item nnimap-authinfo-file
14922 @vindex nnimap-authinfo-file
14923
14924 A file containing credentials used to log in on servers.  The format is
14925 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
14926 variable @code{nntp-authinfo-file} for exact syntax; also see
14927 @ref{NNTP}.
14928
14929 @end table
14930
14931 @menu
14932 * Splitting in IMAP::           Splitting mail with nnimap.
14933 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
14934 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
14935 @end menu
14936
14937
14938
14939 @node Splitting in IMAP
14940 @subsection Splitting in IMAP
14941 @cindex splitting imap mail
14942
14943 Splitting is something Gnus users has loved and used for years, and now
14944 the rest of the world is catching up.  Yeah, dream on, not many
14945 @sc{imap} server has server side splitting and those that have splitting
14946 seem to use some non-standard protocol.  This means that @sc{imap}
14947 support for Gnus has to do it's own splitting.
14948
14949 And it does.
14950
14951 Here are the variables of interest:
14952
14953 @table @code
14954
14955 @item nnimap-split-crosspost
14956 @cindex splitting, crosspost
14957 @cindex crosspost
14958 @vindex nnimap-split-crosspost
14959
14960 If non-nil, do crossposting if several split methods match the mail.  If
14961 nil, the first match in @code{nnimap-split-rule} found will be used.
14962
14963 Nnmail equivalent: @code{nnmail-crosspost}.
14964
14965 @item nnimap-split-inbox
14966 @cindex splitting, inbox
14967 @cindex inbox
14968 @vindex nnimap-split-inbox
14969
14970 A string or a list of strings that gives the name(s) of @sc{imap}
14971 mailboxes to split from.  Defaults to nil, which means that splitting is
14972 disabled!
14973
14974 @lisp
14975 (setq nnimap-split-inbox
14976       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
14977 @end lisp
14978
14979 No nnmail equivalent.
14980
14981 @item nnimap-split-rule
14982 @cindex Splitting, rules
14983 @vindex nnimap-split-rule
14984
14985 New mail found in @code{nnimap-split-inbox} will be split according to
14986 this variable.
14987
14988 This variable contains a list of lists, where the first element in the
14989 sublist gives the name of the @sc{imap} mailbox to move articles
14990 matching the regexp in the second element in the sublist.  Got that?
14991 Neither did I, we need examples.
14992
14993 @lisp
14994 (setq nnimap-split-rule
14995       '(("INBOX.nnimap"
14996          "^Sender: owner-nnimap@@vic20.globalcom.se")
14997         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
14998         ("INBOX.private" "")))
14999 @end lisp
15000
15001 This will put all articles from the nnimap mailing list into mailbox
15002 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
15003 into INBOX.junk and everything else in INBOX.private.
15004
15005 The first string may contain `\\1' forms, like the ones used by
15006 replace-match to insert sub-expressions from the matched text.  For
15007 instance:
15008
15009 @lisp
15010 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
15011 @end lisp
15012
15013 The second element can also be a function.  In that case, it will be
15014 called with the first element of the rule as the argument, in a buffer
15015 containing the headers of the article.  It should return a non-nil value
15016 if it thinks that the mail belongs in that group.
15017
15018 Nnmail users might recollect that the last regexp had to be empty to
15019 match all articles (like in the example above).  This is not required in
15020 nnimap.  Articles not matching any of the regexps will not be moved out
15021 of your inbox.  (This might affect performance if you keep lots of
15022 unread articles in your inbox, since the splitting code would go over
15023 them every time you fetch new mail.)
15024
15025 These rules are processed from the beginning of the alist toward the
15026 end.  The first rule to make a match will "win", unless you have
15027 crossposting enabled.  In that case, all matching rules will "win".
15028
15029 This variable can also have a function as its value, the function will
15030 be called with the headers narrowed and should return a group where it
15031 thinks the article should be split to.  See @code{nnimap-split-fancy}.
15032
15033 The splitting code tries to create mailboxes if it needs to.
15034
15035 To allow for different split rules on different virtual servers, and
15036 even different split rules in different inboxes on the same server,
15037 the syntax of this variable have been extended along the lines of:
15038
15039 @lisp
15040 (setq nnimap-split-rule
15041       '(("my1server"    (".*"    (("ding"    "ding@@gnus.org")
15042                                   ("junk"    "From:.*Simon")))
15043         ("my2server"    ("INBOX" nnimap-split-fancy))
15044         ("my[34]server" (".*"    (("private" "To:.*Simon")
15045                                   ("junk"    my-junk-func)))))
15046 @end lisp
15047
15048 The virtual server name is in fact a regexp, so that the same rules
15049 may apply to several servers.  In the example, the servers
15050 @code{my3server} and @code{my4server} both use the same rules.
15051 Similarly, the inbox string is also a regexp.  The actual splitting
15052 rules are as before, either a function, or a list with group/regexp or
15053 group/function elements.
15054
15055 Nnmail equivalent: @code{nnmail-split-methods}.
15056
15057 @item nnimap-split-predicate
15058 @cindex splitting
15059 @vindex nnimap-split-predicate
15060
15061 Mail matching this predicate in @code{nnimap-split-inbox} will be
15062 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
15063
15064 This might be useful if you use another @sc{imap} client to read mail in
15065 your inbox but would like Gnus to split all articles in the inbox
15066 regardless of readedness. Then you might change this to
15067 @samp{UNDELETED}.
15068
15069 @item nnimap-split-fancy
15070 @cindex splitting, fancy
15071 @findex nnimap-split-fancy
15072 @vindex nnimap-split-fancy
15073
15074 It's possible to set @code{nnimap-split-rule} to
15075 @code{nnmail-split-fancy} if you want to use fancy
15076 splitting. @xref{Fancy Mail Splitting}.
15077
15078 However, to be able to have different fancy split rules for nnmail and
15079 nnimap back ends you can set @code{nnimap-split-rule} to
15080 @code{nnimap-split-fancy} and define the nnimap specific fancy split
15081 rule in @code{nnimap-split-fancy}.
15082
15083 Example:
15084
15085 @lisp
15086 (setq nnimap-split-rule 'nnimap-split-fancy
15087       nnimap-split-fancy ...)
15088 @end lisp
15089
15090 Nnmail equivalent: @code{nnmail-split-fancy}.
15091
15092 @end table
15093
15094 @node Editing IMAP ACLs
15095 @subsection Editing IMAP ACLs
15096 @cindex editing imap acls
15097 @cindex Access Control Lists
15098 @cindex Editing @sc{imap} ACLs
15099 @kindex G l
15100 @findex gnus-group-nnimap-edit-acl
15101
15102 ACL stands for Access Control List.  ACLs are used in @sc{imap} for
15103 limiting (or enabling) other users access to your mail boxes.  Not all
15104 @sc{imap} servers support this, this function will give an error if it
15105 doesn't.
15106
15107 To edit a ACL for a mailbox, type @kbd{G l}
15108 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with a ACL
15109 editing window with detailed instructions.
15110
15111 Some possible uses:
15112
15113 @itemize @bullet
15114 @item
15115 Giving "anyone" the "lrs" rights (lookup, read, keep seen/unseen flags)
15116 on your mailing list mailboxes enables other users on the same server to
15117 follow the list without subscribing to it.
15118 @item
15119 At least with the Cyrus server, you are required to give the user
15120 "anyone" posting ("p") capabilities to have "plussing" work (that is,
15121 mail sent to user+mailbox@@domain ending up in the @sc{imap} mailbox
15122 INBOX.mailbox).
15123 @end itemize
15124
15125 @node Expunging mailboxes
15126 @subsection Expunging mailboxes
15127 @cindex expunging
15128
15129 @cindex Expunge
15130 @cindex Manual expunging
15131 @kindex G x
15132 @findex gnus-group-nnimap-expunge
15133
15134 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
15135 you may want the option of expunging all deleted articles in a mailbox
15136 manually.  This is exactly what @kbd{G x} does.
15137
15138 Currently there is no way of showing deleted articles, you can just
15139 delete them.
15140
15141
15142
15143 @node Other Sources
15144 @section Other Sources
15145
15146 Gnus can do more than just read news or mail.  The methods described
15147 below allow Gnus to view directories and files as if they were
15148 newsgroups.
15149
15150 @menu
15151 * Directory Groups::            You can read a directory as if it was a newsgroup.
15152 * Anything Groups::             Dired?  Who needs dired?
15153 * Document Groups::             Single files can be the basis of a group.
15154 * SOUP::                        Reading @sc{soup} packets ``offline''.
15155 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
15156 @end menu
15157
15158
15159 @node Directory Groups
15160 @subsection Directory Groups
15161 @cindex nndir
15162 @cindex directory groups
15163
15164 If you have a directory that has lots of articles in separate files in
15165 it, you might treat it as a newsgroup.  The files have to have numerical
15166 names, of course.
15167
15168 This might be an opportune moment to mention @code{ange-ftp} (and its
15169 successor @code{efs}), that most wonderful of all wonderful Emacs
15170 packages.  When I wrote @code{nndir}, I didn't think much about it---a
15171 back end to read directories.  Big deal.
15172
15173 @code{ange-ftp} changes that picture dramatically.  For instance, if you
15174 enter the @code{ange-ftp} file name
15175 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
15176 @code{ange-ftp} or @code{efs} will actually allow you to read this
15177 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
15178
15179 @code{nndir} will use @sc{nov} files if they are present.
15180
15181 @code{nndir} is a ``read-only'' back end---you can't delete or expire
15182 articles with this method.  You can use @code{nnmh} or @code{nnml} for
15183 whatever you use @code{nndir} for, so you could switch to any of those
15184 methods if you feel the need to have a non-read-only @code{nndir}.
15185
15186
15187 @node Anything Groups
15188 @subsection Anything Groups
15189 @cindex nneething
15190
15191 From the @code{nndir} back end (which reads a single spool-like
15192 directory), it's just a hop and a skip to @code{nneething}, which
15193 pretends that any arbitrary directory is a newsgroup.  Strange, but
15194 true.
15195
15196 When @code{nneething} is presented with a directory, it will scan this
15197 directory and assign article numbers to each file.  When you enter such
15198 a group, @code{nneething} must create ``headers'' that Gnus can use.
15199 After all, Gnus is a newsreader, in case you're forgetting.
15200 @code{nneething} does this in a two-step process.  First, it snoops each
15201 file in question.  If the file looks like an article (i.e., the first
15202 few lines look like headers), it will use this as the head.  If this is
15203 just some arbitrary file without a head (e.g. a C source file),
15204 @code{nneething} will cobble up a header out of thin air.  It will use
15205 file ownership, name and date and do whatever it can with these
15206 elements.
15207
15208 All this should happen automatically for you, and you will be presented
15209 with something that looks very much like a newsgroup.  Totally like a
15210 newsgroup, to be precise.  If you select an article, it will be displayed
15211 in the article buffer, just as usual.
15212
15213 If you select a line that represents a directory, Gnus will pop you into
15214 a new summary buffer for this @code{nneething} group.  And so on.  You can
15215 traverse the entire disk this way, if you feel like, but remember that
15216 Gnus is not dired, really, and does not intend to be, either.
15217
15218 There are two overall modes to this action---ephemeral or solid.  When
15219 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
15220 will not store information on what files you have read, and what files
15221 are new, and so on.  If you create a solid @code{nneething} group the
15222 normal way with @kbd{G m}, Gnus will store a mapping table between
15223 article numbers and file names, and you can treat this group like any
15224 other groups.  When you activate a solid @code{nneething} group, you will
15225 be told how many unread articles it contains, etc., etc.
15226
15227 Some variables:
15228
15229 @table @code
15230 @item nneething-map-file-directory
15231 @vindex nneething-map-file-directory
15232 All the mapping files for solid @code{nneething} groups will be stored
15233 in this directory, which defaults to @file{~/.nneething/}.
15234
15235 @item nneething-exclude-files
15236 @vindex nneething-exclude-files
15237 All files that match this regexp will be ignored.  Nice to use to exclude
15238 auto-save files and the like, which is what it does by default.
15239
15240 @item nneething-include-files
15241 @vindex nneething-include-files
15242 Regexp saying what files to include in the group.  If this variable is
15243 non-@code{nil}, only files matching this regexp will be included.
15244
15245 @item nneething-map-file
15246 @vindex nneething-map-file
15247 Name of the map files.
15248 @end table
15249
15250
15251 @node Document Groups
15252 @subsection Document Groups
15253 @cindex nndoc
15254 @cindex documentation group
15255 @cindex help group
15256
15257 @code{nndoc} is a cute little thing that will let you read a single file
15258 as a newsgroup.  Several files types are supported:
15259
15260 @table @code
15261 @cindex babyl
15262 @cindex rmail mbox
15263
15264 @item babyl
15265 The babyl (rmail) mail box.
15266 @cindex mbox
15267 @cindex Unix mbox
15268
15269 @item mbox
15270 The standard Unix mbox file.
15271
15272 @cindex MMDF mail box
15273 @item mmdf
15274 The MMDF mail box format.
15275
15276 @item news
15277 Several news articles appended into a file.
15278
15279 @item rnews
15280 @cindex rnews batch files
15281 The rnews batch transport format.
15282 @cindex forwarded messages
15283
15284 @item forward
15285 Forwarded articles.
15286
15287 @item nsmail
15288 Netscape mail boxes.
15289
15290 @item mime-parts
15291 @sc{mime} multipart messages.
15292
15293 @item standard-digest
15294 The standard (RFC 1153) digest format.
15295
15296 @item mime-digest
15297 A @sc{mime} digest of messages.
15298
15299 @item lanl-gov-announce
15300 Announcement messages from LANL Gov Announce.
15301
15302 @item rfc822-forward
15303 A message forwarded according to RFC822.
15304
15305 @item outlook
15306 The Outlook mail box.
15307
15308 @item oe-dbx
15309 The Outlook Express dbx mail box.
15310
15311 @item exim-bounce
15312 A bounce message from the Exim MTA.
15313
15314 @item forward
15315 A message forwarded according to informal rules.
15316
15317 @item rfc934
15318 An RFC934-forwarded message.
15319
15320 @item mailman
15321 A mailman digest.
15322
15323 @item clari-briefs
15324 A digest of Clarinet brief news items.
15325
15326 @item slack-digest
15327 Non-standard digest format---matches most things, but does it badly.
15328
15329 @item mail-in-mail
15330 The last resort.
15331 @end table
15332
15333 You can also use the special ``file type'' @code{guess}, which means
15334 that @code{nndoc} will try to guess what file type it is looking at.
15335 @code{digest} means that @code{nndoc} should guess what digest type the
15336 file is.
15337
15338 @code{nndoc} will not try to change the file or insert any extra headers into
15339 it---it will simply, like, let you use the file as the basis for a
15340 group.  And that's it.
15341
15342 If you have some old archived articles that you want to insert into your
15343 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
15344 that.  Say you have an old @file{RMAIL} file with mail that you now want
15345 to split into your new @code{nnml} groups.  You look at that file using
15346 @code{nndoc} (using the @kbd{G f} command in the group buffer
15347 (@pxref{Foreign Groups})), set the process mark on all the articles in
15348 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
15349 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
15350 file is now also stored in lots of @code{nnml} directories, and you can
15351 delete that pesky @file{RMAIL} file.  If you have the guts!
15352
15353 Virtual server variables:
15354
15355 @table @code
15356 @item nndoc-article-type
15357 @vindex nndoc-article-type
15358 This should be one of @code{mbox}, @code{babyl}, @code{digest},
15359 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
15360 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
15361 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
15362 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
15363
15364 @item nndoc-post-type
15365 @vindex nndoc-post-type
15366 This variable says whether Gnus is to consider the group a news group or
15367 a mail group.  There are two valid values:  @code{mail} (the default)
15368 and @code{news}.
15369 @end table
15370
15371 @menu
15372 * Document Server Internals::   How to add your own document types.
15373 @end menu
15374
15375
15376 @node Document Server Internals
15377 @subsubsection Document Server Internals
15378
15379 Adding new document types to be recognized by @code{nndoc} isn't
15380 difficult.  You just have to whip up a definition of what the document
15381 looks like, write a predicate function to recognize that document type,
15382 and then hook into @code{nndoc}.
15383
15384 First, here's an example document type definition:
15385
15386 @example
15387 (mmdf
15388  (article-begin .  "^\^A\^A\^A\^A\n")
15389  (body-end .  "^\^A\^A\^A\^A\n"))
15390 @end example
15391
15392 The definition is simply a unique @dfn{name} followed by a series of
15393 regexp pseudo-variable settings.  Below are the possible
15394 variables---don't be daunted by the number of variables; most document
15395 types can be defined with very few settings:
15396
15397 @table @code
15398 @item first-article
15399 If present, @code{nndoc} will skip past all text until it finds
15400 something that match this regexp.  All text before this will be
15401 totally ignored.
15402
15403 @item article-begin
15404 This setting has to be present in all document type definitions.  It
15405 says what the beginning of each article looks like.
15406
15407 @item head-begin-function
15408 If present, this should be a function that moves point to the head of
15409 the article.
15410
15411 @item nndoc-head-begin
15412 If present, this should be a regexp that matches the head of the
15413 article.
15414
15415 @item nndoc-head-end
15416 This should match the end of the head of the article.  It defaults to
15417 @samp{^$}---the empty line.
15418
15419 @item body-begin-function
15420 If present, this function should move point to the beginning of the body
15421 of the article.
15422
15423 @item body-begin
15424 This should match the beginning of the body of the article.  It defaults
15425 to @samp{^\n}.
15426
15427 @item body-end-function
15428 If present, this function should move point to the end of the body of
15429 the article.
15430
15431 @item body-end
15432 If present, this should match the end of the body of the article.
15433
15434 @item file-end
15435 If present, this should match the end of the file.  All text after this
15436 regexp will be totally ignored.
15437
15438 @end table
15439
15440 So, using these variables @code{nndoc} is able to dissect a document
15441 file into a series of articles, each with a head and a body.  However, a
15442 few more variables are needed since not all document types are all that
15443 news-like---variables needed to transform the head or the body into
15444 something that's palatable for Gnus:
15445
15446 @table @code
15447 @item prepare-body-function
15448 If present, this function will be called when requesting an article.  It
15449 will be called with point at the start of the body, and is useful if the
15450 document has encoded some parts of its contents.
15451
15452 @item article-transform-function
15453 If present, this function is called when requesting an article.  It's
15454 meant to be used for more wide-ranging transformation of both head and
15455 body of the article.
15456
15457 @item generate-head-function
15458 If present, this function is called to generate a head that Gnus can
15459 understand.  It is called with the article number as a parameter, and is
15460 expected to generate a nice head for the article in question.  It is
15461 called when requesting the headers of all articles.
15462
15463 @end table
15464
15465 Let's look at the most complicated example I can come up with---standard
15466 digests:
15467
15468 @example
15469 (standard-digest
15470  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
15471  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
15472  (prepare-body-function . nndoc-unquote-dashes)
15473  (body-end-function . nndoc-digest-body-end)
15474  (head-end . "^ ?$")
15475  (body-begin . "^ ?\n")
15476  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
15477  (subtype digest guess))
15478 @end example
15479
15480 We see that all text before a 70-width line of dashes is ignored; all
15481 text after a line that starts with that @samp{^End of} is also ignored;
15482 each article begins with a 30-width line of dashes; the line separating
15483 the head from the body may contain a single space; and that the body is
15484 run through @code{nndoc-unquote-dashes} before being delivered.
15485
15486 To hook your own document definition into @code{nndoc}, use the
15487 @code{nndoc-add-type} function.  It takes two parameters---the first is
15488 the definition itself and the second (optional) parameter says where in
15489 the document type definition alist to put this definition.  The alist is
15490 traversed sequentially, and @code{nndoc-TYPE-type-p} is called for a given type @code{TYPE}.  So @code{nndoc-mmdf-type-p} is called to see whether a document
15491 is of @code{mmdf} type, and so on.  These type predicates should return
15492 @code{nil} if the document is not of the correct type; @code{t} if it is
15493 of the correct type; and a number if the document might be of the
15494 correct type.  A high number means high probability; a low number means
15495 low probability with @samp{0} being the lowest valid number.
15496
15497
15498 @node SOUP
15499 @subsection SOUP
15500 @cindex SOUP
15501 @cindex offline
15502
15503 In the PC world people often talk about ``offline'' newsreaders.  These
15504 are thingies that are combined reader/news transport monstrosities.
15505 With built-in modem programs.  Yecchh!
15506
15507 Of course, us Unix Weenie types of human beans use things like
15508 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
15509 transport things like Ghod intended.  And then we just use normal
15510 newsreaders.
15511
15512 However, it can sometimes be convenient to do something that's a bit
15513 easier on the brain if you have a very slow modem, and you're not really
15514 that interested in doing things properly.
15515
15516 A file format called @sc{soup} has been developed for transporting news
15517 and mail from servers to home machines and back again.  It can be a bit
15518 fiddly.
15519
15520 First some terminology:
15521
15522 @table @dfn
15523
15524 @item server
15525 This is the machine that is connected to the outside world and where you
15526 get news and/or mail from.
15527
15528 @item home machine
15529 This is the machine that you want to do the actual reading and responding
15530 on.  It is typically not connected to the rest of the world in any way.
15531
15532 @item packet
15533 Something that contains messages and/or commands.  There are two kinds
15534 of packets:
15535
15536 @table @dfn
15537 @item message packets
15538 These are packets made at the server, and typically contain lots of
15539 messages for you to read.  These are called @file{SoupoutX.tgz} by
15540 default, where @var{x} is a number.
15541
15542 @item response packets
15543 These are packets made at the home machine, and typically contains
15544 replies that you've written.  These are called @file{SoupinX.tgz} by
15545 default, where @var{x} is a number.
15546
15547 @end table
15548
15549 @end table
15550
15551
15552 @enumerate
15553
15554 @item
15555 You log in on the server and create a @sc{soup} packet.  You can either
15556 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
15557 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
15558 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
15559
15560 @item
15561 You transfer the packet home.  Rail, boat, car or modem will do fine.
15562
15563 @item
15564 You put the packet in your home directory.
15565
15566 @item
15567 You fire up Gnus on your home machine using the @code{nnsoup} back end as
15568 the native or secondary server.
15569
15570 @item
15571 You read articles and mail and answer and followup to the things you
15572 want (@pxref{SOUP Replies}).
15573
15574 @item
15575 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
15576 packet.
15577
15578 @item
15579 You transfer this packet to the server.
15580
15581 @item
15582 You use Gnus to mail this packet out with the @kbd{G s s} command.
15583
15584 @item
15585 You then repeat until you die.
15586
15587 @end enumerate
15588
15589 So you basically have a bipartite system---you use @code{nnsoup} for
15590 reading and Gnus for packing/sending these @sc{soup} packets.
15591
15592 @menu
15593 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
15594 * SOUP Groups::                 A back end for reading @sc{soup} packets.
15595 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
15596 @end menu
15597
15598
15599 @node SOUP Commands
15600 @subsubsection SOUP Commands
15601
15602 These are commands for creating and manipulating @sc{soup} packets.
15603
15604 @table @kbd
15605 @item G s b
15606 @kindex G s b (Group)
15607 @findex gnus-group-brew-soup
15608 Pack all unread articles in the current group
15609 (@code{gnus-group-brew-soup}).  This command understands the
15610 process/prefix convention.
15611
15612 @item G s w
15613 @kindex G s w (Group)
15614 @findex gnus-soup-save-areas
15615 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
15616
15617 @item G s s
15618 @kindex G s s (Group)
15619 @findex gnus-soup-send-replies
15620 Send all replies from the replies packet
15621 (@code{gnus-soup-send-replies}).
15622
15623 @item G s p
15624 @kindex G s p (Group)
15625 @findex gnus-soup-pack-packet
15626 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
15627
15628 @item G s r
15629 @kindex G s r (Group)
15630 @findex nnsoup-pack-replies
15631 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
15632
15633 @item O s
15634 @kindex O s (Summary)
15635 @findex gnus-soup-add-article
15636 This summary-mode command adds the current article to a @sc{soup} packet
15637 (@code{gnus-soup-add-article}).  It understands the process/prefix
15638 convention (@pxref{Process/Prefix}).
15639
15640 @end table
15641
15642
15643 There are a few variables to customize where Gnus will put all these
15644 thingies:
15645
15646 @table @code
15647
15648 @item gnus-soup-directory
15649 @vindex gnus-soup-directory
15650 Directory where Gnus will save intermediate files while composing
15651 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
15652
15653 @item gnus-soup-replies-directory
15654 @vindex gnus-soup-replies-directory
15655 This is what Gnus will use as a temporary directory while sending our
15656 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
15657
15658 @item gnus-soup-prefix-file
15659 @vindex gnus-soup-prefix-file
15660 Name of the file where Gnus stores the last used prefix.  The default is
15661 @samp{gnus-prefix}.
15662
15663 @item gnus-soup-packer
15664 @vindex gnus-soup-packer
15665 A format string command for packing a @sc{soup} packet.  The default is
15666 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
15667
15668 @item gnus-soup-unpacker
15669 @vindex gnus-soup-unpacker
15670 Format string command for unpacking a @sc{soup} packet.  The default is
15671 @samp{gunzip -c %s | tar xvf -}.
15672
15673 @item gnus-soup-packet-directory
15674 @vindex gnus-soup-packet-directory
15675 Where Gnus will look for reply packets.  The default is @file{~/}.
15676
15677 @item gnus-soup-packet-regexp
15678 @vindex gnus-soup-packet-regexp
15679 Regular expression matching @sc{soup} reply packets in
15680 @code{gnus-soup-packet-directory}.
15681
15682 @end table
15683
15684
15685 @node SOUP Groups
15686 @subsubsection SOUP Groups
15687 @cindex nnsoup
15688
15689 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
15690 read incoming packets, unpack them, and put them in a directory where
15691 you can read them at leisure.
15692
15693 These are the variables you can use to customize its behavior:
15694
15695 @table @code
15696
15697 @item nnsoup-tmp-directory
15698 @vindex nnsoup-tmp-directory
15699 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
15700 directory.  (@file{/tmp/} by default.)
15701
15702 @item nnsoup-directory
15703 @vindex nnsoup-directory
15704 @code{nnsoup} then moves each message and index file to this directory.
15705 The default is @file{~/SOUP/}.
15706
15707 @item nnsoup-replies-directory
15708 @vindex nnsoup-replies-directory
15709 All replies will be stored in this directory before being packed into a
15710 reply packet.  The default is @file{~/SOUP/replies/"}.
15711
15712 @item nnsoup-replies-format-type
15713 @vindex nnsoup-replies-format-type
15714 The @sc{soup} format of the replies packets.  The default is @samp{?n}
15715 (rnews), and I don't think you should touch that variable.  I probably
15716 shouldn't even have documented it.  Drats!  Too late!
15717
15718 @item nnsoup-replies-index-type
15719 @vindex nnsoup-replies-index-type
15720 The index type of the replies packet.  The default is @samp{?n}, which
15721 means ``none''.  Don't fiddle with this one either!
15722
15723 @item nnsoup-active-file
15724 @vindex nnsoup-active-file
15725 Where @code{nnsoup} stores lots of information.  This is not an ``active
15726 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
15727 this file or mess it up in any way, you're dead.  The default is
15728 @file{~/SOUP/active}.
15729
15730 @item nnsoup-packer
15731 @vindex nnsoup-packer
15732 Format string command for packing a reply @sc{soup} packet.  The default
15733 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
15734
15735 @item nnsoup-unpacker
15736 @vindex nnsoup-unpacker
15737 Format string command for unpacking incoming @sc{soup} packets.  The
15738 default is @samp{gunzip -c %s | tar xvf -}.
15739
15740 @item nnsoup-packet-directory
15741 @vindex nnsoup-packet-directory
15742 Where @code{nnsoup} will look for incoming packets.  The default is
15743 @file{~/}.
15744
15745 @item nnsoup-packet-regexp
15746 @vindex nnsoup-packet-regexp
15747 Regular expression matching incoming @sc{soup} packets.  The default is
15748 @samp{Soupout}.
15749
15750 @item nnsoup-always-save
15751 @vindex nnsoup-always-save
15752 If non-@code{nil}, save the replies buffer after each posted message.
15753
15754 @end table
15755
15756
15757 @node SOUP Replies
15758 @subsubsection SOUP Replies
15759
15760 Just using @code{nnsoup} won't mean that your postings and mailings end
15761 up in @sc{soup} reply packets automagically.  You have to work a bit
15762 more for that to happen.
15763
15764 @findex nnsoup-set-variables
15765 The @code{nnsoup-set-variables} command will set the appropriate
15766 variables to ensure that all your followups and replies end up in the
15767 @sc{soup} system.
15768
15769 In specific, this is what it does:
15770
15771 @lisp
15772 (setq message-send-news-function 'nnsoup-request-post)
15773 (setq message-send-mail-function 'nnsoup-request-mail)
15774 @end lisp
15775
15776 And that's it, really.  If you only want news to go into the @sc{soup}
15777 system you just use the first line.  If you only want mail to be
15778 @sc{soup}ed you use the second.
15779
15780
15781 @node Mail-To-News Gateways
15782 @subsection Mail-To-News Gateways
15783 @cindex mail-to-news gateways
15784 @cindex gateways
15785
15786 If your local @code{nntp} server doesn't allow posting, for some reason
15787 or other, you can post using one of the numerous mail-to-news gateways.
15788 The @code{nngateway} back end provides the interface.
15789
15790 Note that you can't read anything from this back end---it can only be
15791 used to post with.
15792
15793 Server variables:
15794
15795 @table @code
15796 @item nngateway-address
15797 @vindex nngateway-address
15798 This is the address of the mail-to-news gateway.
15799
15800 @item nngateway-header-transformation
15801 @vindex nngateway-header-transformation
15802 News headers often have to be transformed in some odd way or other
15803 for the mail-to-news gateway to accept it.  This variable says what
15804 transformation should be called, and defaults to
15805 @code{nngateway-simple-header-transformation}.  The function is called
15806 narrowed to the headers to be transformed and with one parameter---the
15807 gateway address.
15808
15809 This default function just inserts a new @code{To} header based on the
15810 @code{Newsgroups} header and the gateway address.
15811 For instance, an article with this @code{Newsgroups} header:
15812
15813 @example
15814 Newsgroups: alt.religion.emacs
15815 @end example
15816
15817 will get this @code{From} header inserted:
15818
15819 @example
15820 To: alt-religion-emacs@@GATEWAY
15821 @end example
15822
15823 The following pre-defined functions exist:
15824
15825 @findex nngateway-simple-header-transformation
15826 @table @code
15827
15828 @item nngateway-simple-header-transformation
15829 Creates a @code{To} header that looks like
15830 @var{newsgroup}@@@code{nngateway-address}.
15831
15832 @findex nngateway-mail2news-header-transformation
15833
15834 @item nngateway-mail2news-header-transformation
15835 Creates a @code{To} header that looks like
15836 @code{nngateway-address}.
15837
15838 Here's an example:
15839
15840 @lisp
15841 (setq gnus-post-method
15842       '(nngateway
15843         "mail2news@@replay.com"
15844         (nngateway-header-transformation
15845          nngateway-mail2news-header-transformation)))
15846 @end lisp
15847
15848 @end table
15849
15850
15851 @end table
15852
15853 So, to use this, simply say something like:
15854
15855 @lisp
15856 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
15857 @end lisp
15858
15859
15860
15861 @node Combined Groups
15862 @section Combined Groups
15863
15864 Gnus allows combining a mixture of all the other group types into bigger
15865 groups.
15866
15867 @menu
15868 * Virtual Groups::              Combining articles from many groups.
15869 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
15870 @end menu
15871
15872
15873 @node Virtual Groups
15874 @subsection Virtual Groups
15875 @cindex nnvirtual
15876 @cindex virtual groups
15877 @cindex merging groups
15878
15879 An @dfn{nnvirtual group} is really nothing more than a collection of
15880 other groups.
15881
15882 For instance, if you are tired of reading many small groups, you can
15883 put them all in one big group, and then grow tired of reading one
15884 big, unwieldy group.  The joys of computing!
15885
15886 You specify @code{nnvirtual} as the method.  The address should be a
15887 regexp to match component groups.
15888
15889 All marks in the virtual group will stick to the articles in the
15890 component groups.  So if you tick an article in a virtual group, the
15891 article will also be ticked in the component group from whence it
15892 came.  (And vice versa---marks from the component groups will also be
15893 shown in the virtual group.). To create an empty virtual group, run
15894 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
15895 and edit the method regexp with @kbd{M-e}
15896 (@code{gnus-group-edit-group-method})
15897
15898 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
15899 newsgroups into one, big, happy newsgroup:
15900
15901 @lisp
15902 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
15903 @end lisp
15904
15905 The component groups can be native or foreign; everything should work
15906 smoothly, but if your computer explodes, it was probably my fault.
15907
15908 Collecting the same group from several servers might actually be a good
15909 idea if users have set the Distribution header to limit distribution.
15910 If you would like to read @samp{soc.motss} both from a server in Japan
15911 and a server in Norway, you could use the following as the group regexp:
15912
15913 @example
15914 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
15915 @end example
15916
15917 (Remember, though, that if you're creating the group with @kbd{G m}, you
15918 shouldn't double the backslashes, and you should leave off the quote
15919 characters at the beginning and the end of the string.)
15920
15921 This should work kinda smoothly---all articles from both groups should
15922 end up in this one, and there should be no duplicates.  Threading (and
15923 the rest) will still work as usual, but there might be problems with the
15924 sequence of articles.  Sorting on date might be an option here
15925 (@pxref{Selecting a Group}).
15926
15927 One limitation, however---all groups included in a virtual
15928 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
15929 zombie groups can't be component groups for @code{nnvirtual} groups.
15930
15931 @vindex nnvirtual-always-rescan
15932 If the @code{nnvirtual-always-rescan} is non-@code{nil},
15933 @code{nnvirtual} will always scan groups for unread articles when
15934 entering a virtual group.  If this variable is @code{nil} (which is the
15935 default) and you read articles in a component group after the virtual
15936 group has been activated, the read articles from the component group
15937 will show up when you enter the virtual group.  You'll also see this
15938 effect if you have two virtual groups that have a component group in
15939 common.  If that's the case, you should set this variable to @code{t}.
15940 Or you can just tap @code{M-g} on the virtual group every time before
15941 you enter it---it'll have much the same effect.
15942
15943 @code{nnvirtual} can have both mail and news groups as component groups.
15944 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
15945 has to ask the back end of the component group the article comes from
15946 whether it is a news or mail back end.  However, when you do a @kbd{^},
15947 there is typically no sure way for the component back end to know this,
15948 and in that case @code{nnvirtual} tells Gnus that the article came from a
15949 not-news back end.  (Just to be on the safe side.)
15950
15951 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
15952 line from the article you respond to in these cases.
15953
15954 @code{nnvirtual} groups do not inherit anything but articles and marks
15955 from component groups---group parameters, for instance, are not
15956 inherited. 
15957
15958
15959 @node Kibozed Groups
15960 @subsection Kibozed Groups
15961 @cindex nnkiboze
15962 @cindex kibozing
15963
15964 @dfn{Kibozing} is defined by @sc{oed} as ``grepping through (parts of)
15965 the news feed''.  @code{nnkiboze} is a back end that will do this for
15966 you.  Oh joy!  Now you can grind any @sc{nntp} server down to a halt
15967 with useless requests!  Oh happiness!
15968
15969 @kindex G k (Group)
15970 To create a kibozed group, use the @kbd{G k} command in the group
15971 buffer.
15972
15973 The address field of the @code{nnkiboze} method is, as with
15974 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
15975 @code{nnkiboze} group.  That's where most similarities between @code{nnkiboze}
15976 and @code{nnvirtual} end.
15977
15978 In addition to this regexp detailing component groups, an @code{nnkiboze} group
15979 must have a score file to say what articles are to be included in
15980 the group (@pxref{Scoring}).
15981
15982 @kindex M-x nnkiboze-generate-groups
15983 @findex nnkiboze-generate-groups
15984 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
15985 @code{nnkiboze} groups you want to have.  This command will take time.  Lots of
15986 time.  Oodles and oodles of time.  Gnus has to fetch the headers from
15987 all the articles in all the component groups and run them through the
15988 scoring process to determine if there are any articles in the groups
15989 that are to be part of the @code{nnkiboze} groups.
15990
15991 Please limit the number of component groups by using restrictive
15992 regexps.  Otherwise your sysadmin may become annoyed with you, and the
15993 @sc{nntp} site may throw you off and never let you back in again.
15994 Stranger things have happened.
15995
15996 @code{nnkiboze} component groups do not have to be alive---they can be dead,
15997 and they can be foreign.  No restrictions.
15998
15999 @vindex nnkiboze-directory
16000 The generation of an @code{nnkiboze} group means writing two files in
16001 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
16002 contains the @sc{nov} header lines for all the articles in the group,
16003 and the other is an additional @file{.newsrc} file to store information
16004 on what groups have been searched through to find component articles.
16005
16006 Articles marked as read in the @code{nnkiboze} group will have
16007 their @sc{nov} lines removed from the @sc{nov} file.
16008
16009
16010 @node Gnus Unplugged
16011 @section Gnus Unplugged
16012 @cindex offline
16013 @cindex unplugged
16014 @cindex Agent
16015 @cindex Gnus Agent
16016 @cindex Gnus Unplugged
16017
16018 In olden times (ca. February '88), people used to run their newsreaders
16019 on big machines with permanent connections to the net.  News transport
16020 was dealt with by news servers, and all the newsreaders had to do was to
16021 read news.  Believe it or not.
16022
16023 Nowadays most people read news and mail at home, and use some sort of
16024 modem to connect to the net.  To avoid running up huge phone bills, it
16025 would be nice to have a way to slurp down all the news and mail, hang up
16026 the phone, read for several hours, and then upload any responses you
16027 have to make.  And then you repeat the procedure.
16028
16029 Of course, you can use news servers for doing this as well.  I've used
16030 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
16031 for some years, but doing that's a bore.  Moving the news server
16032 functionality up to the newsreader makes sense if you're the only person
16033 reading news on a machine.
16034
16035 Using Gnus as an ``offline'' newsreader is quite simple.
16036
16037 @itemize @bullet
16038 @item
16039 First, set up Gnus as you would do if you were running it on a machine
16040 that has full connection to the net.  Go ahead.  I'll still be waiting
16041 here.
16042
16043 @item
16044 Then, put the following magical incantation in your @file{.gnus.el}
16045 file:
16046
16047 @lisp
16048 (setq gnus-agent t)
16049 @end lisp
16050 @end itemize
16051
16052 That's it.  Gnus is now an ``offline'' newsreader.
16053
16054 Of course, to use it as such, you have to learn a few new commands.
16055
16056 @menu
16057 * Agent Basics::                How it all is supposed to work.
16058 * Agent Categories::            How to tell the Gnus Agent what to download.
16059 * Agent Commands::              New commands for all the buffers.
16060 * Agent Expiry::                How to make old articles go away.
16061 * Agent and IMAP::              How to use the Agent with IMAP.
16062 * Outgoing Messages::           What happens when you post/mail something?
16063 * Agent Variables::             Customizing is fun.
16064 * Example Setup::               An example @file{.gnus.el} file for offline people.
16065 * Batching Agents::             How to fetch news from a @code{cron} job.
16066 * Agent Caveats::               What you think it'll do and what it does.
16067 @end menu
16068
16069
16070 @node Agent Basics
16071 @subsection Agent Basics
16072
16073 First, let's get some terminology out of the way.
16074
16075 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
16076 connection to the net (and notified the Agent that this is the case).
16077 When the connection to the net is up again (and Gnus knows this), the
16078 Agent is @dfn{plugged}.
16079
16080 The @dfn{local} machine is the one you're running on, and which isn't
16081 connected to the net continuously.
16082
16083 @dfn{Downloading} means fetching things from the net to your local
16084 machine.  @dfn{Uploading} is doing the opposite.
16085
16086 Let's take a typical Gnus session using the Agent.
16087
16088 @itemize @bullet
16089
16090 @item
16091 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
16092 Agent in a disconnected state.  You can read all the news that you have
16093 already fetched while in this mode.
16094
16095 @item
16096 You then decide to see whether any new news has arrived.  You connect
16097 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
16098 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
16099 as usual.  To check for new mail in unplugged mode, see (@pxref{Mail
16100 Source Specifiers}).
16101
16102 @item
16103 You can then read the new news immediately, or you can download the news
16104 onto your local machine.  If you want to do the latter, you press @kbd{g}
16105 to check if there are any new news and then @kbd{J
16106 s} to fetch all the eligible articles in all the groups.  (To let Gnus
16107 know which articles you want to download, @pxref{Agent Categories}.)
16108
16109 @item
16110 After fetching the articles, you press @kbd{J j} to make Gnus become
16111 unplugged again, and you shut down the PPP thing (or whatever).  And
16112 then you read the news offline.
16113
16114 @item
16115 And then you go to step 2.
16116 @end itemize
16117
16118 Here are some things you should do the first time (or so) that you use
16119 the Agent.
16120
16121 @itemize @bullet
16122
16123 @item
16124 Decide which servers should be covered by the Agent.  If you have a mail
16125 back end, it would probably be nonsensical to have it covered by the
16126 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
16127 @kbd{J a} the server (or servers) that you wish to have covered by the
16128 Agent (@pxref{Server Agent Commands}).  This will typically be only the
16129 primary select method, which is listed on the bottom in the buffer.
16130
16131 @item
16132 Decide on download policy.  @xref{Agent Categories}.
16133
16134 @item
16135 Uhm... that's it.
16136 @end itemize
16137
16138
16139 @node Agent Categories
16140 @subsection Agent Categories
16141
16142 One of the main reasons to integrate the news transport layer into the
16143 newsreader is to allow greater control over what articles to download.
16144 There's not much point in downloading huge amounts of articles, just to
16145 find out that you're not interested in reading any of them.  It's better
16146 to be somewhat more conservative in choosing what to download, and then
16147 mark the articles for downloading manually if it should turn out that
16148 you're interested in the articles anyway.
16149
16150 The main way to control what is to be downloaded is to create a
16151 @dfn{category} and then assign some (or all) groups to this category.
16152 Groups that do not belong in any other category belong to the
16153 @code{default} category.  Gnus has its own buffer for creating and
16154 managing categories.
16155
16156 @menu
16157 * Category Syntax::             What a category looks like.
16158 * Category Buffer::             A buffer for maintaining categories.
16159 * Category Variables::          Customize'r'Us.
16160 @end menu
16161
16162
16163 @node Category Syntax
16164 @subsubsection Category Syntax
16165
16166 A category consists of two things.
16167
16168 @enumerate
16169 @item
16170 A predicate which (generally) gives a rough outline of which articles
16171 are eligible for downloading; and
16172
16173 @item
16174 a score rule which (generally) gives you a finer granularity when
16175 deciding what articles to download.  (Note that this @dfn{download
16176 score} is not necessarily related to normal scores.)
16177 @end enumerate
16178
16179 A predicate in its simplest form can be a single predicate such as
16180 @code{true} or @code{false}.  These two will download every available
16181 article or nothing respectively.  In the case of these two special
16182 predicates an additional score rule is superfluous.
16183
16184 Predicates of @code{high} or @code{low} download articles in respect of
16185 their scores in relationship to @code{gnus-agent-high-score} and
16186 @code{gnus-agent-low-score} as described below.
16187
16188 To gain even finer control of what is to be regarded eligible for
16189 download a predicate can consist of a number of predicates with logical
16190 operators sprinkled in between.
16191
16192 Perhaps some examples are in order.
16193
16194 Here's a simple predicate.  (It's the default predicate, in fact, used
16195 for all groups that don't belong to any other category.)
16196
16197 @lisp
16198 short
16199 @end lisp
16200
16201 Quite simple, eh?  This predicate is true if and only if the article is
16202 short (for some value of ``short'').
16203
16204 Here's a more complex predicate:
16205
16206 @lisp
16207 (or high
16208     (and
16209      (not low)
16210      (not long)))
16211 @end lisp
16212
16213 This means that an article should be downloaded if it has a high score,
16214 or if the score is not low and the article is not long.  You get the
16215 drift.
16216
16217 The available logical operators are @code{or}, @code{and} and
16218 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
16219 @samp{|}, @code{&} and @code{!} instead.)
16220
16221 The following predicates are pre-defined, but if none of these fit what
16222 you want to do, you can write your own.
16223
16224 @table @code
16225 @item short
16226 True iff the article is shorter than @code{gnus-agent-short-article}
16227 lines; default 100.
16228
16229 @item long
16230 True iff the article is longer than @code{gnus-agent-long-article}
16231 lines; default 200.
16232
16233 @item low
16234 True iff the article has a download score less than
16235 @code{gnus-agent-low-score}; default 0.
16236
16237 @item high
16238 True iff the article has a download score greater than
16239 @code{gnus-agent-high-score}; default 0.
16240
16241 @item spam
16242 True iff the Gnus Agent guesses that the article is spam.  The
16243 heuristics may change over time, but at present it just computes a
16244 checksum and sees whether articles match.
16245
16246 @item true
16247 Always true.
16248
16249 @item false
16250 Always false.
16251 @end table
16252
16253 If you want to create your own predicate function, here's what you have
16254 to know:  The functions are called with no parameters, but the
16255 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
16256 useful values.
16257
16258 For example, you could decide that you don't want to download articles
16259 that were posted more than a certain number of days ago (e.g. posted
16260 more than @code{gnus-agent-expire-days} ago) you might write a function
16261 something along the lines of the following:
16262
16263 @lisp
16264 (defun my-article-old-p ()
16265   "Say whether an article is old."
16266   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
16267      (- (time-to-days (current-time)) gnus-agent-expire-days)))
16268 @end lisp
16269
16270 with the predicate then defined as:
16271
16272 @lisp
16273 (not my-article-old-p)
16274 @end lisp
16275
16276 or you could append your predicate to the predefined
16277 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
16278 wherever. 
16279
16280 @lisp
16281 (require 'gnus-agent)
16282 (setq  gnus-category-predicate-alist
16283   (append gnus-category-predicate-alist
16284          '((old . my-article-old-p))))
16285 @end lisp
16286
16287 and simply specify your predicate as:
16288
16289 @lisp
16290 (not old)
16291 @end lisp
16292
16293 If/when using something like the above, be aware that there are many
16294 misconfigured systems/mailers out there and so an article's date is not
16295 always a reliable indication of when it was posted.  Hell, some people
16296 just don't give a damn.
16297
16298 The above predicates apply to *all* the groups which belong to the
16299 category.  However, if you wish to have a specific predicate for an
16300 individual group within a category, or you're just too lazy to set up a
16301 new category, you can enter a group's individual predicate in it's group
16302 parameters like so:
16303
16304 @lisp
16305 (agent-predicate . short)
16306 @end lisp
16307
16308 This is the group parameter equivalent of the agent category default.
16309 Note that when specifying a single word predicate like this, the
16310 @code{agent-predicate} specification must be in dotted pair notation.
16311
16312 The equivalent of the longer example from above would be:
16313
16314 @lisp
16315 (agent-predicate or high (and (not low) (not long)))
16316 @end lisp
16317
16318 The outer parenthesis required in the category specification are not
16319 entered here as, not being in dotted pair notation, the value of the
16320 predicate is assumed to be a list.
16321
16322
16323 Now, the syntax of the download score is the same as the syntax of
16324 normal score files, except that all elements that require actually
16325 seeing the article itself are verboten.  This means that only the
16326 following headers can be scored on: @code{Subject}, @code{From},
16327 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
16328 @code{Lines}, and @code{Xref}.
16329
16330 As with predicates, the specification of the @code{download score rule}
16331 to use in respect of a group can be in either the category definition if
16332 it's to be applicable to all groups in therein, or a group's parameters
16333 if it's to be specific to that group.
16334
16335 In both of these places the @code{download score rule} can take one of
16336 three forms:
16337
16338 @enumerate
16339 @item
16340 Score rule
16341
16342 This has the same syntax as a normal gnus score file except only a
16343 subset of scoring keywords are available as mentioned above.
16344
16345 example:
16346
16347 @itemize @bullet
16348 @item
16349 Category specification
16350
16351 @lisp
16352 (("from"
16353        ("Lars Ingebrigtsen" 1000000 nil s))
16354 ("lines"
16355        (500 -100 nil <)))
16356 @end lisp
16357
16358 @item
16359 Group Parameter specification
16360
16361 @lisp
16362 (agent-score ("from"
16363                    ("Lars Ingebrigtsen" 1000000 nil s))
16364              ("lines"
16365                    (500 -100 nil <)))
16366 @end lisp
16367
16368 Again, note the omission of the outermost parenthesis here.
16369 @end itemize
16370
16371 @item
16372 Agent score file
16373
16374 These score files must *only* contain the permitted scoring keywords
16375 stated above.
16376
16377 example:
16378
16379 @itemize @bullet
16380 @item
16381 Category specification
16382
16383 @lisp
16384 ("~/News/agent.SCORE")
16385 @end lisp
16386
16387 or perhaps
16388
16389 @lisp
16390 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
16391 @end lisp
16392
16393 @item
16394 Group Parameter specification
16395
16396 @lisp
16397 (agent-score "~/News/agent.SCORE")
16398 @end lisp
16399
16400 Additional score files can be specified as above.  Need I say anything
16401 about parenthesis?
16402 @end itemize
16403
16404 @item
16405 Use @code{normal} score files
16406
16407 If you don't want to maintain two sets of scoring rules for a group, and
16408 your desired @code{downloading} criteria for a group are the same as your
16409 @code{reading} criteria then you can tell the agent to refer to your
16410 @code{normal} score files when deciding what to download.
16411
16412 These directives in either the category definition or a group's
16413 parameters will cause the agent to read in all the applicable score
16414 files for a group, *filtering out* those sections that do not
16415 relate to one of the permitted subset of scoring keywords.
16416
16417 @itemize @bullet
16418 @item
16419 Category Specification
16420
16421 @lisp
16422 file
16423 @end lisp
16424
16425 @item
16426 Group Parameter specification
16427
16428 @lisp
16429 (agent-score . file)
16430 @end lisp
16431 @end itemize
16432 @end enumerate
16433
16434 @node Category Buffer
16435 @subsubsection Category Buffer
16436
16437 You'd normally do all category maintenance from the category buffer.
16438 When you enter it for the first time (with the @kbd{J c} command from
16439 the group buffer), you'll only see the @code{default} category.
16440
16441 The following commands are available in this buffer:
16442
16443 @table @kbd
16444 @item q
16445 @kindex q (Category)
16446 @findex gnus-category-exit
16447 Return to the group buffer (@code{gnus-category-exit}).
16448
16449 @item k
16450 @kindex k (Category)
16451 @findex gnus-category-kill
16452 Kill the current category (@code{gnus-category-kill}).
16453
16454 @item c
16455 @kindex c (Category)
16456 @findex gnus-category-copy
16457 Copy the current category (@code{gnus-category-copy}).
16458
16459 @item a
16460 @kindex a (Category)
16461 @findex gnus-category-add
16462 Add a new category (@code{gnus-category-add}).
16463
16464 @item p
16465 @kindex p (Category)
16466 @findex gnus-category-edit-predicate
16467 Edit the predicate of the current category
16468 (@code{gnus-category-edit-predicate}).
16469
16470 @item g
16471 @kindex g (Category)
16472 @findex gnus-category-edit-groups
16473 Edit the list of groups belonging to the current category
16474 (@code{gnus-category-edit-groups}).
16475
16476 @item s
16477 @kindex s (Category)
16478 @findex gnus-category-edit-score
16479 Edit the download score rule of the current category
16480 (@code{gnus-category-edit-score}).
16481
16482 @item l
16483 @kindex l (Category)
16484 @findex gnus-category-list
16485 List all the categories (@code{gnus-category-list}).
16486 @end table
16487
16488
16489 @node Category Variables
16490 @subsubsection Category Variables
16491
16492 @table @code
16493 @item gnus-category-mode-hook
16494 @vindex gnus-category-mode-hook
16495 Hook run in category buffers.
16496
16497 @item gnus-category-line-format
16498 @vindex gnus-category-line-format
16499 Format of the lines in the category buffer (@pxref{Formatting
16500 Variables}).  Valid elements are:
16501
16502 @table @samp
16503 @item c
16504 The name of the category.
16505
16506 @item g
16507 The number of groups in the category.
16508 @end table
16509
16510 @item gnus-category-mode-line-format
16511 @vindex gnus-category-mode-line-format
16512 Format of the category mode line (@pxref{Mode Line Formatting}).
16513
16514 @item gnus-agent-short-article
16515 @vindex gnus-agent-short-article
16516 Articles that have fewer lines than this are short.  Default 100.
16517
16518 @item gnus-agent-long-article
16519 @vindex gnus-agent-long-article
16520 Articles that have more lines than this are long.  Default 200.
16521
16522 @item gnus-agent-low-score
16523 @vindex gnus-agent-low-score
16524 Articles that have a score lower than this have a low score.  Default
16525 0.
16526
16527 @item gnus-agent-high-score
16528 @vindex gnus-agent-high-score
16529 Articles that have a score higher than this have a high score.  Default
16530 0.
16531
16532 @end table
16533
16534
16535 @node Agent Commands
16536 @subsection Agent Commands
16537
16538 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
16539 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
16540 toggles the plugged/unplugged state of the Gnus Agent.
16541
16542
16543 @menu
16544 * Group Agent Commands::        
16545 * Summary Agent Commands::      
16546 * Server Agent Commands::       
16547 @end menu
16548
16549 You can run a complete batch command from the command line with the
16550 following incantation:
16551
16552 @cindex gnus-agent-batch
16553 @example
16554 $ emacs -batch -l ~/.gnus.el -f gnus-agent-batch
16555 @end example
16556
16557
16558
16559 @node Group Agent Commands
16560 @subsubsection Group Agent Commands
16561
16562 @table @kbd
16563 @item J u
16564 @kindex J u (Agent Group)
16565 @findex gnus-agent-fetch-groups
16566 Fetch all eligible articles in the current group
16567 (@code{gnus-agent-fetch-groups}).
16568
16569 @item J c
16570 @kindex J c (Agent Group)
16571 @findex gnus-enter-category-buffer
16572 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
16573
16574 @item J s
16575 @kindex J s (Agent Group)
16576 @findex gnus-agent-fetch-session
16577 Fetch all eligible articles in all groups
16578 (@code{gnus-agent-fetch-session}).
16579
16580 @item J S
16581 @kindex J S (Agent Group)
16582 @findex gnus-group-send-queue
16583 Send all sendable messages in the queue group
16584 (@code{gnus-group-send-queue}).  @xref{Drafts}.
16585
16586 @item J a
16587 @kindex J a (Agent Group)
16588 @findex gnus-agent-add-group
16589 Add the current group to an Agent category
16590 (@code{gnus-agent-add-group}).  This command understands the
16591 process/prefix convention (@pxref{Process/Prefix}).
16592
16593 @item J r
16594 @kindex J r (Agent Group)
16595 @findex gnus-agent-remove-group
16596 Remove the current group from its category, if any
16597 (@code{gnus-agent-remove-group}).  This command understands the
16598 process/prefix convention (@pxref{Process/Prefix}).
16599
16600 @item J Y
16601 @kindex J Y (Agent Group)
16602 @findex gnus-agent-synchronize-flags
16603 Synchronize flags changed while unplugged with remote server, if any.
16604
16605
16606 @end table
16607
16608
16609 @node Summary Agent Commands
16610 @subsubsection Summary Agent Commands
16611
16612 @table @kbd
16613 @item J #
16614 @kindex J # (Agent Summary)
16615 @findex gnus-agent-mark-article
16616 Mark the article for downloading (@code{gnus-agent-mark-article}).
16617
16618 @item J M-#
16619 @kindex J M-# (Agent Summary)
16620 @findex gnus-agent-unmark-article
16621 Remove the downloading mark from the article
16622 (@code{gnus-agent-unmark-article}).
16623
16624 @item @@
16625 @kindex @@ (Agent Summary)
16626 @findex gnus-agent-toggle-mark
16627 Toggle whether to download the article (@code{gnus-agent-toggle-mark}).
16628
16629 @item J c
16630 @kindex J c (Agent Summary)
16631 @findex gnus-agent-catchup
16632 Mark all undownloaded articles as read (@code{gnus-agent-catchup}).
16633
16634 @item J u
16635 @kindex J u (Agent Summary)
16636 @findex gnus-agent-summary-fetch-group
16637 Download all downloadable articles in the current group
16638 (@code{gnus-agent-summary-fetch-group}).
16639
16640 @end table
16641
16642
16643 @node Server Agent Commands
16644 @subsubsection Server Agent Commands
16645
16646 @table @kbd
16647 @item J a
16648 @kindex J a (Agent Server)
16649 @findex gnus-agent-add-server
16650 Add the current server to the list of servers covered by the Gnus Agent
16651 (@code{gnus-agent-add-server}).
16652
16653 @item J r
16654 @kindex J r (Agent Server)
16655 @findex gnus-agent-remove-server
16656 Remove the current server from the list of servers covered by the Gnus
16657 Agent (@code{gnus-agent-remove-server}).
16658
16659 @end table
16660
16661
16662 @node Agent Expiry
16663 @subsection Agent Expiry
16664
16665 @vindex gnus-agent-expire-days
16666 @findex gnus-agent-expire
16667 @kindex M-x gnus-agent-expire
16668 @cindex Agent expiry
16669 @cindex Gnus Agent expiry
16670 @cindex expiry
16671
16672 @code{nnagent} doesn't handle expiry.  Instead, there's a special
16673 @code{gnus-agent-expire} command that will expire all read articles that
16674 are older than @code{gnus-agent-expire-days} days.  It can be run
16675 whenever you feel that you're running out of space.  It's not
16676 particularly fast or efficient, and it's not a particularly good idea to
16677 interrupt it (with @kbd{C-g} or anything else) once you've started it.
16678
16679 @code{gnus-agent-expire-days} can also be a list of regexp/day pairs.
16680 The regexps will be matched against group names to allow differing
16681 expiry in different groups.
16682
16683 @lisp
16684 (setq gnus-agent-expire-days
16685       '(("alt\\." 7)
16686         (".*binary" 1)
16687         ("." 21)))
16688 @end lisp
16689
16690 If you use the list form, the last element must always be the default
16691 method---it must always match all groups.
16692
16693 @vindex gnus-agent-expire-all
16694 If @code{gnus-agent-expire-all} is non-@code{nil}, this command will
16695 expire all articles---unread, read, ticked and dormant.  If @code{nil}
16696 (which is the default), only read articles are eligible for expiry, and
16697 unread, ticked and dormant articles will be kept indefinitely.
16698
16699 @findex gnus-agent-regenerate
16700 If you find that some articles eligible for expiry are never expired,
16701 perhaps some Gnus Agent files are corrupted.  There's a special
16702 @code{gnus-agent-regenerate} command to fix possible problems.
16703
16704 @node Agent and IMAP
16705 @subsection Agent and IMAP
16706
16707 The Agent work with any Gnus back end, including nnimap.  However,
16708 since there are some conceptual differences between @sc{nntp} and
16709 @sc{imap}, this section (should) provide you with some information to
16710 make Gnus Agent work smoother as a @sc{imap} Disconnected Mode client.
16711
16712 The first thing to keep in mind is that all flags (read, ticked, etc)
16713 are kept on the @sc{imap} server, rather than in @code{.newsrc} as is the
16714 case for nntp.  Thus Gnus need to remember flag changes when
16715 disconnected, and synchronize these flags when you plug back in.
16716
16717 Gnus keep track of flag changes when reading nnimap groups under the
16718 Agent by default.  When you plug back in, by default Gnus will check if
16719 you have any changed any flags and ask if you wish to synchronize these
16720 with the server.  This behavior is customizable with
16721 @code{gnus-agent-synchronize-flags}.
16722
16723 @vindex gnus-agent-synchronize-flags
16724 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
16725 never automatically synchronize flags.  If it is @code{ask}, the
16726 default, the Agent will check if you made any changes and if so ask if
16727 you wish to synchronize these when you re-connect.  If it has any other
16728 value, all flags will be synchronized automatically.
16729
16730 If you do not wish to automatically synchronize flags when you
16731 re-connect, this can be done manually with the
16732 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
16733 in the group buffer by default.
16734
16735 Some things are currently not implemented in the Agent that you'd might
16736 expect from a disconnected @sc{imap} client, including:
16737
16738 @itemize @bullet
16739
16740 @item
16741 Copying/moving articles into nnimap groups when unplugged.
16742
16743 @item
16744 Creating/deleting nnimap groups when unplugged.
16745
16746 @end itemize
16747
16748 Technical note: the synchronization algorithm does not work by "pushing"
16749 all local flags to the server, but rather incrementally update the
16750 server view of flags by changing only those flags that were changed by
16751 the user.  Thus, if you set one flag on a article, quit the group and
16752 re-select the group and remove the flag; the flag will be set and
16753 removed from the server when you "synchronize".  The queued flag
16754 operations can be found in the per-server @code{flags} file in the Agent
16755 directory.  It's emptied when you synchronize flags.
16756
16757
16758 @node Outgoing Messages
16759 @subsection Outgoing Messages
16760
16761 When Gnus is unplugged, all outgoing messages (both mail and news) are
16762 stored in the draft groups (@pxref{Drafts}).  You can view them there
16763 after posting, and edit them at will.
16764
16765 When Gnus is plugged again, you can send the messages either from the
16766 draft group with the special commands available there, or you can use
16767 the @kbd{J S} command in the group buffer to send all the sendable
16768 messages in the draft group.
16769
16770
16771
16772 @node Agent Variables
16773 @subsection Agent Variables
16774
16775 @table @code
16776 @item gnus-agent-directory
16777 @vindex gnus-agent-directory
16778 Where the Gnus Agent will store its files.  The default is
16779 @file{~/News/agent/}.
16780
16781 @item gnus-agent-handle-level
16782 @vindex gnus-agent-handle-level
16783 Groups on levels (@pxref{Group Levels}) higher than this variable will
16784 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
16785 which means that only subscribed group will be considered by the Agent
16786 by default.
16787
16788 @item gnus-agent-plugged-hook
16789 @vindex gnus-agent-plugged-hook
16790 Hook run when connecting to the network.
16791
16792 @item gnus-agent-unplugged-hook
16793 @vindex gnus-agent-unplugged-hook
16794 Hook run when disconnecting from the network.
16795
16796 @item gnus-agent-fetched-hook
16797 @vindex gnus-agent-fetched-hook
16798 Hook run when after finishing fetching articles.
16799
16800 @item gnus-agent-cache
16801 @vindex gnus-agent-cache
16802 Variable to control whether use the locally stored @sc{nov} and articles when
16803 plugged.
16804
16805 @item gnus-agent-go-online
16806 @vindex gnus-agent-go-online
16807 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
16808 automatically switch offline servers into online status.  If it is
16809 @code{ask}, the default, the Agent will ask if you wish to switch
16810 offline servers into online status when you re-connect.  If it has any
16811 other value, all offline servers will be automatically switched into
16812 online status.
16813
16814 @end table
16815
16816
16817 @node Example Setup
16818 @subsection Example Setup
16819
16820 If you don't want to read this manual, and you have a fairly standard
16821 setup, you may be able to use something like the following as your
16822 @file{.gnus.el} file to get started.
16823
16824 @lisp
16825 ;;; Define how Gnus is to fetch news.  We do this over @sc{nntp}
16826 ;;; from your ISP's server.
16827 (setq gnus-select-method '(nntp "news.your-isp.com"))
16828
16829 ;;; Define how Gnus is to read your mail.  We read mail from
16830 ;;; your ISP's POP server.
16831 (setq mail-sources '((pop :server "pop.your-isp.com")))
16832
16833 ;;; Say how Gnus is to store the mail.  We use nnml groups.
16834 (setq gnus-secondary-select-methods '((nnml "")))
16835
16836 ;;; Make Gnus into an offline newsreader.
16837 ;;; (gnus-agentize) ; The obsolete setting.
16838 (setq gnus-agent t)
16839 @end lisp
16840
16841 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
16842 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
16843 gnus}.
16844
16845 If this is the first time you've run Gnus, you will be subscribed
16846 automatically to a few default newsgroups.  You'll probably want to
16847 subscribe to more groups, and to do that, you have to query the
16848 @sc{nntp} server for a complete list of groups with the @kbd{A A}
16849 command.  This usually takes quite a while, but you only have to do it
16850 once.
16851
16852 After reading and parsing a while, you'll be presented with a list of
16853 groups.  Subscribe to the ones you want to read with the @kbd{u}
16854 command.  @kbd{l} to make all the killed groups disappear after you've
16855 subscribe to all the groups you want to read.  (@kbd{A k} will bring
16856 back all the killed groups.)
16857
16858 You can now read the groups at once, or you can download the articles
16859 with the @kbd{J s} command.  And then read the rest of this manual to
16860 find out which of the other gazillion things you want to customize.
16861
16862
16863 @node Batching Agents
16864 @subsection Batching Agents
16865
16866 Having the Gnus Agent fetch articles (and post whatever messages you've
16867 written) is quite easy once you've gotten things set up properly.  The
16868 following shell script will do everything that is necessary:
16869
16870 @example
16871 #!/bin/sh
16872 emacs -batch -l ~/.emacs -f gnus-agent-batch >/dev/null
16873 @end example
16874
16875
16876 @node Agent Caveats
16877 @subsection Agent Caveats
16878
16879 The Gnus Agent doesn't seem to work like most other offline
16880 newsreaders.  Here are some common questions that some imaginary people
16881 may ask:
16882
16883 @table @dfn
16884 @item If I read an article while plugged, do they get entered into the Agent?
16885
16886 @strong{No}.
16887
16888 @item If I read an article while plugged, and the article already exists in the Agent, will it get downloaded once more?
16889
16890 @strong{No}, unless @code{gnus-agent-cache} is `nil'.
16891
16892 @end table
16893
16894 In short, when Gnus is unplugged, it only looks into the locally stored
16895 articles; when it's plugged, it only talks to your ISP and also uses the
16896 locally stored articles.
16897
16898
16899 @node Scoring
16900 @chapter Scoring
16901 @cindex scoring
16902
16903 Other people use @dfn{kill files}, but we here at Gnus Towers like
16904 scoring better than killing, so we'd rather switch than fight.  They do
16905 something completely different as well, so sit up straight and pay
16906 attention!
16907
16908 @vindex gnus-summary-mark-below
16909 All articles have a default score (@code{gnus-summary-default-score}),
16910 which is 0 by default.  This score may be raised or lowered either
16911 interactively or by score files.  Articles that have a score lower than
16912 @code{gnus-summary-mark-below} are marked as read.
16913
16914 Gnus will read any @dfn{score files} that apply to the current group
16915 before generating the summary buffer.
16916
16917 There are several commands in the summary buffer that insert score
16918 entries based on the current article.  You can, for instance, ask Gnus to
16919 lower or increase the score of all articles with a certain subject.
16920
16921 There are two sorts of scoring entries: Permanent and temporary.
16922 Temporary score entries are self-expiring entries.  Any entries that are
16923 temporary and have not been used for, say, a week, will be removed
16924 silently to help keep the sizes of the score files down.
16925
16926 @menu
16927 * Summary Score Commands::      Adding score entries for the current group.
16928 * Group Score Commands::        General score commands.
16929 * Score Variables::             Customize your scoring.  (My, what terminology).
16930 * Score File Format::           What a score file may contain.
16931 * Score File Editing::          You can edit score files by hand as well.
16932 * Adaptive Scoring::            Big Sister Gnus knows what you read.
16933 * Home Score File::             How to say where new score entries are to go.
16934 * Followups To Yourself::       Having Gnus notice when people answer you.
16935 * Scoring On Other Headers::    Scoring on non-standard headers.
16936 * Scoring Tips::                How to score effectively.
16937 * Reverse Scoring::             That problem child of old is not problem.
16938 * Global Score Files::          Earth-spanning, ear-splitting score files.
16939 * Kill Files::                  They are still here, but they can be ignored.
16940 * Converting Kill Files::       Translating kill files to score files.
16941 * GroupLens::                   Getting predictions on what you like to read.
16942 * Advanced Scoring::            Using logical expressions to build score rules.
16943 * Score Decays::                It can be useful to let scores wither away.
16944 @end menu
16945
16946
16947 @node Summary Score Commands
16948 @section Summary Score Commands
16949 @cindex score commands
16950
16951 The score commands that alter score entries do not actually modify real
16952 score files.  That would be too inefficient.  Gnus maintains a cache of
16953 previously loaded score files, one of which is considered the
16954 @dfn{current score file alist}.  The score commands simply insert
16955 entries into this list, and upon group exit, this list is saved.
16956
16957 The current score file is by default the group's local score file, even
16958 if no such score file actually exists.  To insert score commands into
16959 some other score file (e.g. @file{all.SCORE}), you must first make this
16960 score file the current one.
16961
16962 General score commands that don't actually change the score file:
16963
16964 @table @kbd
16965
16966 @item V s
16967 @kindex V s (Summary)
16968 @findex gnus-summary-set-score
16969 Set the score of the current article (@code{gnus-summary-set-score}).
16970
16971 @item V S
16972 @kindex V S (Summary)
16973 @findex gnus-summary-current-score
16974 Display the score of the current article
16975 (@code{gnus-summary-current-score}).
16976
16977 @item V t
16978 @kindex V t (Summary)
16979 @findex gnus-score-find-trace
16980 Display all score rules that have been used on the current article
16981 (@code{gnus-score-find-trace}).
16982
16983 @item V w
16984 @kindex V w (Summary)
16985 @findex gnus-score-find-favourite-words
16986 List words used in scoring (@code{gnus-score-find-favourite-words}).
16987
16988 @item V R
16989 @kindex V R (Summary)
16990 @findex gnus-summary-rescore
16991 Run the current summary through the scoring process
16992 (@code{gnus-summary-rescore}).  This might be useful if you're playing
16993 around with your score files behind Gnus' back and want to see the
16994 effect you're having.
16995
16996 @item V c
16997 @kindex V c (Summary)
16998 @findex gnus-score-change-score-file
16999 Make a different score file the current
17000 (@code{gnus-score-change-score-file}).
17001
17002 @item V e
17003 @kindex V e (Summary)
17004 @findex gnus-score-edit-current-scores
17005 Edit the current score file (@code{gnus-score-edit-current-scores}).
17006 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
17007 File Editing}).
17008
17009 @item V f
17010 @kindex V f (Summary)
17011 @findex gnus-score-edit-file
17012 Edit a score file and make this score file the current one
17013 (@code{gnus-score-edit-file}).
17014
17015 @item V F
17016 @kindex V F (Summary)
17017 @findex gnus-score-flush-cache
17018 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
17019 after editing score files.
17020
17021 @item V C
17022 @kindex V C (Summary)
17023 @findex gnus-score-customize
17024 Customize a score file in a visually pleasing manner
17025 (@code{gnus-score-customize}).
17026
17027 @end table
17028
17029 The rest of these commands modify the local score file.
17030
17031 @table @kbd
17032
17033 @item V m
17034 @kindex V m (Summary)
17035 @findex gnus-score-set-mark-below
17036 Prompt for a score, and mark all articles with a score below this as
17037 read (@code{gnus-score-set-mark-below}).
17038
17039 @item V x
17040 @kindex V x (Summary)
17041 @findex gnus-score-set-expunge-below
17042 Prompt for a score, and add a score rule to the current score file to
17043 expunge all articles below this score
17044 (@code{gnus-score-set-expunge-below}).
17045 @end table
17046
17047 The keystrokes for actually making score entries follow a very regular
17048 pattern, so there's no need to list all the commands.  (Hundreds of
17049 them.)
17050
17051 @findex gnus-summary-increase-score
17052 @findex gnus-summary-lower-score
17053
17054 @enumerate
17055 @item
17056 The first key is either @kbd{I} (upper case i) for increasing the score
17057 or @kbd{L} for lowering the score.
17058 @item
17059 The second key says what header you want to score on.  The following
17060 keys are available:
17061 @table @kbd
17062
17063 @item a
17064 Score on the author name.
17065
17066 @item s
17067 Score on the subject line.
17068
17069 @item x
17070 Score on the @code{Xref} line---i.e., the cross-posting line.
17071
17072 @item r
17073 Score on the @code{References} line.
17074
17075 @item d
17076 Score on the date.
17077
17078 @item l
17079 Score on the number of lines.
17080
17081 @item i
17082 Score on the @code{Message-ID} header.
17083
17084 @item e
17085 Score on an "extra" header, that is, one of those in gnus-extra-headers,
17086 if your @sc{nntp} server tracks additional header data in overviews.
17087
17088 @item f
17089 Score on followups---this matches the author name, and adds scores to
17090 the followups to this author.  (Using this key leads to the creation of
17091 @file{ADAPT} files.)
17092
17093 @item b
17094 Score on the body.
17095
17096 @item h
17097 Score on the head.
17098
17099 @item t
17100 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
17101 files.)
17102
17103 @end table
17104
17105 @item
17106 The third key is the match type.  Which match types are valid depends on
17107 what headers you are scoring on.
17108
17109 @table @code
17110
17111 @item strings
17112
17113 @table @kbd
17114
17115 @item e
17116 Exact matching.
17117
17118 @item s
17119 Substring matching.
17120
17121 @item f
17122 Fuzzy matching (@pxref{Fuzzy Matching}).
17123
17124 @item r
17125 Regexp matching
17126 @end table
17127
17128 @item date
17129 @table @kbd
17130
17131 @item b
17132 Before date.
17133
17134 @item a
17135 After date.
17136
17137 @item n
17138 This date.
17139 @end table
17140
17141 @item number
17142 @table @kbd
17143
17144 @item <
17145 Less than number.
17146
17147 @item =
17148 Equal to number.
17149
17150 @item >
17151 Greater than number.
17152 @end table
17153 @end table
17154
17155 @item
17156 The fourth and usually final key says whether this is a temporary (i.e.,
17157 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
17158 or whether it is to be done immediately, without adding to the score
17159 file.
17160 @table @kbd
17161
17162 @item t
17163 Temporary score entry.
17164
17165 @item p
17166 Permanent score entry.
17167
17168 @item i
17169 Immediately scoring.
17170 @end table
17171
17172 @item
17173 If you are scoring on `e' (extra) headers, you will then be prompted for
17174 the header name on which you wish to score.  This must be a header named
17175 in gnus-extra-headers, and @samp{TAB} completion is available.
17176
17177 @end enumerate
17178
17179 So, let's say you want to increase the score on the current author with
17180 exact matching permanently: @kbd{I a e p}.  If you want to lower the
17181 score based on the subject line, using substring matching, and make a
17182 temporary score entry: @kbd{L s s t}.  Pretty easy.
17183
17184 To make things a bit more complicated, there are shortcuts.  If you use
17185 a capital letter on either the second or third keys, Gnus will use
17186 defaults for the remaining one or two keystrokes.  The defaults are
17187 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
17188 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
17189
17190 These functions take both the numerical prefix and the symbolic prefix
17191 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
17192 (or increase) the score of the article.  A symbolic prefix of @code{a}
17193 says to use the @file{all.SCORE} file for the command instead of the
17194 current score file.
17195
17196 @vindex gnus-score-mimic-keymap
17197 The @code{gnus-score-mimic-keymap} says whether these commands will
17198 pretend they are keymaps or not.
17199
17200
17201 @node Group Score Commands
17202 @section Group Score Commands
17203 @cindex group score commands
17204
17205 There aren't many of these as yet, I'm afraid.
17206
17207 @table @kbd
17208
17209 @item W f
17210 @kindex W f (Group)
17211 @findex gnus-score-flush-cache
17212 Gnus maintains a cache of score alists to avoid having to reload them
17213 all the time.  This command will flush the cache
17214 (@code{gnus-score-flush-cache}).
17215
17216 @end table
17217
17218 You can do scoring from the command line by saying something like:
17219
17220 @findex gnus-batch-score
17221 @cindex batch scoring
17222 @example
17223 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
17224 @end example
17225
17226
17227 @node Score Variables
17228 @section Score Variables
17229 @cindex score variables
17230
17231 @table @code
17232
17233 @item gnus-use-scoring
17234 @vindex gnus-use-scoring
17235 If @code{nil}, Gnus will not check for score files, and will not, in
17236 general, do any score-related work.  This is @code{t} by default.
17237
17238 @item gnus-kill-killed
17239 @vindex gnus-kill-killed
17240 If this variable is @code{nil}, Gnus will never apply score files to
17241 articles that have already been through the kill process.  While this
17242 may save you lots of time, it also means that if you apply a kill file
17243 to a group, and then change the kill file and want to run it over you
17244 group again to kill more articles, it won't work.  You have to set this
17245 variable to @code{t} to do that.  (It is @code{t} by default.)
17246
17247 @item gnus-kill-files-directory
17248 @vindex gnus-kill-files-directory
17249 All kill and score files will be stored in this directory, which is
17250 initialized from the @code{SAVEDIR} environment variable by default.
17251 This is @file{~/News/} by default.
17252
17253 @item gnus-score-file-suffix
17254 @vindex gnus-score-file-suffix
17255 Suffix to add to the group name to arrive at the score file name
17256 (@samp{SCORE} by default.)
17257
17258 @item gnus-score-uncacheable-files
17259 @vindex gnus-score-uncacheable-files
17260 @cindex score cache
17261 All score files are normally cached to avoid excessive re-loading of
17262 score files.  However, if this might make your Emacs grow big and
17263 bloated, so this regexp can be used to weed out score files unlikely to be needed again.  It would be a bad idea to deny caching of
17264 @file{all.SCORE}, while it might be a good idea to not cache
17265 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
17266 variable is @samp{ADAPT$} by default, so no adaptive score files will
17267 be cached.
17268
17269 @item gnus-save-score
17270 @vindex gnus-save-score
17271 If you have really complicated score files, and do lots of batch
17272 scoring, then you might set this variable to @code{t}.  This will make
17273 Gnus save the scores into the @file{.newsrc.eld} file.
17274
17275 If you do not set this to @code{t}, then manual scores (like those set
17276 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
17277 across group visits.
17278
17279 @item gnus-score-interactive-default-score
17280 @vindex gnus-score-interactive-default-score
17281 Score used by all the interactive raise/lower commands to raise/lower
17282 score with.  Default is 1000, which may seem excessive, but this is to
17283 ensure that the adaptive scoring scheme gets enough room to play with.
17284 We don't want the small changes from the adaptive scoring to overwrite
17285 manually entered data.
17286
17287 @item gnus-summary-default-score
17288 @vindex gnus-summary-default-score
17289 Default score of an article, which is 0 by default.
17290
17291 @item gnus-summary-expunge-below
17292 @vindex gnus-summary-expunge-below
17293 Don't display the summary lines of articles that have scores lower than
17294 this variable.  This is @code{nil} by default, which means that no
17295 articles will be hidden.  This variable is local to the summary buffers,
17296 and has to be set from @code{gnus-summary-mode-hook}.
17297
17298 @item gnus-score-over-mark
17299 @vindex gnus-score-over-mark
17300 Mark (in the third column) used for articles with a score over the
17301 default.  Default is @samp{+}.
17302
17303 @item gnus-score-below-mark
17304 @vindex gnus-score-below-mark
17305 Mark (in the third column) used for articles with a score below the
17306 default.  Default is @samp{-}.
17307
17308 @item gnus-score-find-score-files-function
17309 @vindex gnus-score-find-score-files-function
17310 Function used to find score files for the current group.  This function
17311 is called with the name of the group as the argument.
17312
17313 Predefined functions available are:
17314 @table @code
17315
17316 @item gnus-score-find-single
17317 @findex gnus-score-find-single
17318 Only apply the group's own score file.
17319
17320 @item gnus-score-find-bnews
17321 @findex gnus-score-find-bnews
17322 Apply all score files that match, using bnews syntax.  This is the
17323 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
17324 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
17325 @file{gnu.all.SCORE} would all apply.  In short, the instances of
17326 @samp{all} in the score file names are translated into @samp{.*}, and
17327 then a regexp match is done.
17328
17329 This means that if you have some score entries that you want to apply to
17330 all groups, then you put those entries in the @file{all.SCORE} file.
17331
17332 The score files are applied in a semi-random order, although Gnus will
17333 try to apply the more general score files before the more specific score
17334 files.  It does this by looking at the number of elements in the score
17335 file names---discarding the @samp{all} elements.
17336
17337 @item gnus-score-find-hierarchical
17338 @findex gnus-score-find-hierarchical
17339 Apply all score files from all the parent groups.  This means that you
17340 can't have score files like @file{all.SCORE}, but you can have
17341 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
17342 server.
17343
17344 @end table
17345 This variable can also be a list of functions.  In that case, all
17346 these functions will be called with the group name as argument, and
17347 all the returned lists of score files will be applied.  These
17348 functions can also return lists of lists of score alists directly.  In
17349 that case, the functions that return these non-file score alists
17350 should probably be placed before the ``real'' score file functions, to
17351 ensure that the last score file returned is the local score file.
17352 Phu.
17353
17354 For example, to do hierarchical scoring but use a non-server-specific
17355 overall score file, you could use the value
17356 @example
17357 (list (lambda (group) ("all.SCORE"))
17358       'gnus-score-find-hierarchical)
17359 @end example
17360
17361 @item gnus-score-expiry-days
17362 @vindex gnus-score-expiry-days
17363 This variable says how many days should pass before an unused score file
17364 entry is expired.  If this variable is @code{nil}, no score file entries
17365 are expired.  It's 7 by default.
17366
17367 @item gnus-update-score-entry-dates
17368 @vindex gnus-update-score-entry-dates
17369 If this variable is non-@code{nil}, temporary score entries that have
17370 been triggered (matched) will have their dates updated.  (This is how Gnus
17371 controls expiry---all non-matched-entries will become too old while
17372 matched entries will stay fresh and young.)  However, if you set this
17373 variable to @code{nil}, even matched entries will grow old and will
17374 have to face that oh-so grim reaper.
17375
17376 @item gnus-score-after-write-file-function
17377 @vindex gnus-score-after-write-file-function
17378 Function called with the name of the score file just written.
17379
17380 @item gnus-score-thread-simplify
17381 @vindex gnus-score-thread-simplify
17382 If this variable is non-@code{nil}, article subjects will be simplified
17383 for subject scoring purposes in the same manner as with
17384 threading---according to the current value of
17385 gnus-simplify-subject-functions.  If the scoring entry uses
17386 @code{substring} or @code{exact} matching, the match will also be
17387 simplified in this manner.
17388
17389 @end table
17390
17391
17392 @node Score File Format
17393 @section Score File Format
17394 @cindex score file format
17395
17396 A score file is an @code{emacs-lisp} file that normally contains just a
17397 single form.  Casual users are not expected to edit these files;
17398 everything can be changed from the summary buffer.
17399
17400 Anyway, if you'd like to dig into it yourself, here's an example:
17401
17402 @lisp
17403 (("from"
17404   ("Lars Ingebrigtsen" -10000)
17405   ("Per Abrahamsen")
17406   ("larsi\\|lmi" -50000 nil R))
17407  ("subject"
17408   ("Ding is Badd" nil 728373))
17409  ("xref"
17410   ("alt.politics" -1000 728372 s))
17411  ("lines"
17412   (2 -100 nil <))
17413  (mark 0)
17414  (expunge -1000)
17415  (mark-and-expunge -10)
17416  (read-only nil)
17417  (orphan -10)
17418  (adapt t)
17419  (files "/hom/larsi/News/gnu.SCORE")
17420  (exclude-files "all.SCORE")
17421  (local (gnus-newsgroup-auto-expire t)
17422         (gnus-summary-make-false-root empty))
17423  (eval (ding)))
17424 @end lisp
17425
17426 This example demonstrates most score file elements.  For a different
17427 approach, see @pxref{Advanced Scoring}.
17428
17429 Even though this looks much like lisp code, nothing here is actually
17430 @code{eval}ed.  The lisp reader is used to read this form, though, so it
17431 has to be valid syntactically, if not semantically.
17432
17433 Six keys are supported by this alist:
17434
17435 @table @code
17436
17437 @item STRING
17438 If the key is a string, it is the name of the header to perform the
17439 match on.  Scoring can only be performed on these eight headers:
17440 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
17441 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
17442 these headers, there are three strings to tell Gnus to fetch the entire
17443 article and do the match on larger parts of the article: @code{Body}
17444 will perform the match on the body of the article, @code{Head} will
17445 perform the match on the head of the article, and @code{All} will
17446 perform the match on the entire article.  Note that using any of these
17447 last three keys will slow down group entry @emph{considerably}.  The
17448 final ``header'' you can score on is @code{Followup}.  These score
17449 entries will result in new score entries being added for all follow-ups
17450 to articles that matches these score entries.
17451
17452 Following this key is a arbitrary number of score entries, where each
17453 score entry has one to four elements.
17454 @enumerate
17455
17456 @item
17457 The first element is the @dfn{match element}.  On most headers this will
17458 be a string, but on the Lines and Chars headers, this must be an
17459 integer.
17460
17461 @item
17462 If the second element is present, it should be a number---the @dfn{score
17463 element}.  This number should be an integer in the neginf to posinf
17464 interval.  This number is added to the score of the article if the match
17465 is successful.  If this element is not present, the
17466 @code{gnus-score-interactive-default-score} number will be used
17467 instead.  This is 1000 by default.
17468
17469 @item
17470 If the third element is present, it should be a number---the @dfn{date
17471 element}.  This date says when the last time this score entry matched,
17472 which provides a mechanism for expiring the score entries.  It this
17473 element is not present, the score entry is permanent.  The date is
17474 represented by the number of days since December 31, 1 BCE.
17475
17476 @item
17477 If the fourth element is present, it should be a symbol---the @dfn{type
17478 element}.  This element specifies what function should be used to see
17479 whether this score entry matches the article.  What match types that can
17480 be used depends on what header you wish to perform the match on.
17481 @table @dfn
17482
17483 @item From, Subject, References, Xref, Message-ID
17484 For most header types, there are the @code{r} and @code{R} (regexp), as
17485 well as @code{s} and @code{S} (substring) types, and @code{e} and
17486 @code{E} (exact match), and @code{w} (word match) types.  If this
17487 element is not present, Gnus will assume that substring matching should
17488 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
17489 that the matches will be done in a case-sensitive manner.  All these
17490 one-letter types are really just abbreviations for the @code{regexp},
17491 @code{string}, @code{exact}, and @code{word} types, which you can use
17492 instead, if you feel like.
17493
17494 @item Extra
17495 Just as for the standard string overview headers, if you are using
17496 gnus-extra-headers, you can score on these headers' values.  In this
17497 case, there is a 5th element in the score entry, being the name of the
17498 header to be scored.  The following entry is useful in your
17499 @file{all.SCORE} file in case of spam attacks from a single origin host,
17500 if your @sc{nntp} server tracks NNTP-Posting-Host in overviews:
17501
17502 @lisp
17503 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
17504 @end lisp
17505
17506 @item Lines, Chars
17507 These two headers use different match types: @code{<}, @code{>},
17508 @code{=}, @code{>=} and @code{<=}.
17509
17510 These predicates are true if
17511
17512 @example
17513 (PREDICATE HEADER MATCH)
17514 @end example
17515
17516 evaluates to non-@code{nil}.  For instance, the advanced match
17517 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
17518 following form:
17519
17520 @lisp
17521 (< header-value 4)
17522 @end lisp
17523
17524 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
17525 the match, we get the score added if the article has less than 4 lines.
17526 (It's easy to get confused and think it's the other way around.  But
17527 it's not.  I think.)
17528
17529 When matching on @code{Lines}, be careful because some back ends (like
17530 @code{nndir}) do not generate @code{Lines} header, so every article ends
17531 up being marked as having 0 lines.  This can lead to strange results if
17532 you happen to lower score of the articles with few lines.
17533
17534 @item Date
17535 For the Date header we have three kinda silly match types:
17536 @code{before}, @code{at} and @code{after}.  I can't really imagine this
17537 ever being useful, but, like, it would feel kinda silly not to provide
17538 this function.  Just in case.  You never know.  Better safe than sorry.
17539 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
17540 sex on a first date.  (I have been told that at least one person, and I
17541 quote, ``found this function indispensable'', however.)
17542
17543 @cindex ISO8601
17544 @cindex date
17545 A more useful match type is @code{regexp}.  With it, you can match the
17546 date string using a regular expression.  The date is normalized to
17547 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
17548 you want to match all articles that have been posted on April 1st in
17549 every year, you could use @samp{....0401.........} as a match string,
17550 for instance.  (Note that the date is kept in its original time zone, so
17551 this will match articles that were posted when it was April 1st where
17552 the article was posted from.  Time zones are such wholesome fun for the
17553 whole family, eh?)
17554
17555 @item Head, Body, All
17556 These three match keys use the same match types as the @code{From} (etc)
17557 header uses.
17558
17559 @item Followup
17560 This match key is somewhat special, in that it will match the
17561 @code{From} header, and affect the score of not only the matching
17562 articles, but also all followups to the matching articles.  This allows
17563 you e.g. increase the score of followups to your own articles, or
17564 decrease the score of followups to the articles of some known
17565 trouble-maker.  Uses the same match types as the @code{From} header
17566 uses.  (Using this match key will lead to creation of @file{ADAPT}
17567 files.)
17568
17569 @item Thread
17570 This match key works along the same lines as the @code{Followup} match
17571 key.  If you say that you want to score on a (sub-)thread started by an
17572 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
17573 match.  This will add a new @samp{thread} match for each article that
17574 has @var{x} in its @code{References} header.  (These new @samp{thread}
17575 matches will use the @code{Message-ID}s of these matching articles.)
17576 This will ensure that you can raise/lower the score of an entire thread,
17577 even though some articles in the thread may not have complete
17578 @code{References} headers.  Note that using this may lead to
17579 undeterministic scores of the articles in the thread.  (Using this match
17580 key will lead to creation of @file{ADAPT} files.)
17581 @end table
17582 @end enumerate
17583
17584 @cindex Score File Atoms
17585 @item mark
17586 The value of this entry should be a number.  Any articles with a score
17587 lower than this number will be marked as read.
17588
17589 @item expunge
17590 The value of this entry should be a number.  Any articles with a score
17591 lower than this number will be removed from the summary buffer.
17592
17593 @item mark-and-expunge
17594 The value of this entry should be a number.  Any articles with a score
17595 lower than this number will be marked as read and removed from the
17596 summary buffer.
17597
17598 @item thread-mark-and-expunge
17599 The value of this entry should be a number.  All articles that belong to
17600 a thread that has a total score below this number will be marked as read
17601 and removed from the summary buffer.  @code{gnus-thread-score-function}
17602 says how to compute the total score for a thread.
17603
17604 @item files
17605 The value of this entry should be any number of file names.  These files
17606 are assumed to be score files as well, and will be loaded the same way
17607 this one was.
17608
17609 @item exclude-files
17610 The clue of this entry should be any number of files.  These files will
17611 not be loaded, even though they would normally be so, for some reason or
17612 other.
17613
17614 @item eval
17615 The value of this entry will be @code{eval}el.  This element will be
17616 ignored when handling global score files.
17617
17618 @item read-only
17619 Read-only score files will not be updated or saved.  Global score files
17620 should feature this atom (@pxref{Global Score Files}).  (Note:
17621 @dfn{Global} here really means @dfn{global}; not your personal
17622 apply-to-all-groups score files.)
17623
17624 @item orphan
17625 The value of this entry should be a number.  Articles that do not have
17626 parents will get this number added to their scores.  Imagine you follow
17627 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
17628 will only follow a few of the threads, also want to see any new threads.
17629
17630 You can do this with the following two score file entries:
17631
17632 @example
17633         (orphan -500)
17634         (mark-and-expunge -100)
17635 @end example
17636
17637 When you enter the group the first time, you will only see the new
17638 threads.  You then raise the score of the threads that you find
17639 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
17640 rest.  Next time you enter the group, you will see new articles in the
17641 interesting threads, plus any new threads.
17642
17643 I.e.---the orphan score atom is for high-volume groups where a few
17644 interesting threads which can't be found automatically by ordinary
17645 scoring rules exist.
17646
17647 @item adapt
17648 This entry controls the adaptive scoring.  If it is @code{t}, the
17649 default adaptive scoring rules will be used.  If it is @code{ignore}, no
17650 adaptive scoring will be performed on this group.  If it is a list, this
17651 list will be used as the adaptive scoring rules.  If it isn't present,
17652 or is something other than @code{t} or @code{ignore}, the default
17653 adaptive scoring rules will be used.  If you want to use adaptive
17654 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
17655 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
17656 not want adaptive scoring.  If you only want adaptive scoring in a few
17657 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
17658 insert @code{(adapt t)} in the score files of the groups where you want
17659 it.
17660
17661 @item adapt-file
17662 All adaptive score entries will go to the file named by this entry.  It
17663 will also be applied when entering the group.  This atom might be handy
17664 if you want to adapt on several groups at once, using the same adaptive
17665 file for a number of groups.
17666
17667 @item local
17668 @cindex local variables
17669 The value of this entry should be a list of @code{(VAR VALUE)} pairs.
17670 Each @var{var} will be made buffer-local to the current summary buffer,
17671 and set to the value specified.  This is a convenient, if somewhat
17672 strange, way of setting variables in some groups if you don't like hooks
17673 much.  Note that the @var{value} won't be evaluated.
17674 @end table
17675
17676
17677 @node Score File Editing
17678 @section Score File Editing
17679
17680 You normally enter all scoring commands from the summary buffer, but you
17681 might feel the urge to edit them by hand as well, so we've supplied you
17682 with a mode for that.
17683
17684 It's simply a slightly customized @code{emacs-lisp} mode, with these
17685 additional commands:
17686
17687 @table @kbd
17688
17689 @item C-c C-c
17690 @kindex C-c C-c (Score)
17691 @findex gnus-score-edit-done
17692 Save the changes you have made and return to the summary buffer
17693 (@code{gnus-score-edit-done}).
17694
17695 @item C-c C-d
17696 @kindex C-c C-d (Score)
17697 @findex gnus-score-edit-insert-date
17698 Insert the current date in numerical format
17699 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
17700 you were wondering.
17701
17702 @item C-c C-p
17703 @kindex C-c C-p (Score)
17704 @findex gnus-score-pretty-print
17705 The adaptive score files are saved in an unformatted fashion.  If you
17706 intend to read one of these files, you want to @dfn{pretty print} it
17707 first.  This command (@code{gnus-score-pretty-print}) does that for
17708 you.
17709
17710 @end table
17711
17712 Type @kbd{M-x gnus-score-mode} to use this mode.
17713
17714 @vindex gnus-score-mode-hook
17715 @code{gnus-score-menu-hook} is run in score mode buffers.
17716
17717 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
17718 e} to begin editing score files.
17719
17720
17721 @node Adaptive Scoring
17722 @section Adaptive Scoring
17723 @cindex adaptive scoring
17724
17725 If all this scoring is getting you down, Gnus has a way of making it all
17726 happen automatically---as if by magic.  Or rather, as if by artificial
17727 stupidity, to be precise.
17728
17729 @vindex gnus-use-adaptive-scoring
17730 When you read an article, or mark an article as read, or kill an
17731 article, you leave marks behind.  On exit from the group, Gnus can sniff
17732 these marks and add score elements depending on what marks it finds.
17733 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
17734 @code{t} or @code{(line)}.  If you want score adaptively on separate
17735 words appearing in the subjects, you should set this variable to
17736 @code{(word)}.  If you want to use both adaptive methods, set this
17737 variable to @code{(word line)}.
17738
17739 @vindex gnus-default-adaptive-score-alist
17740 To give you complete control over the scoring process, you can customize
17741 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
17742 might look something like this:
17743
17744 @lisp
17745 (setq gnus-default-adaptive-score-alist
17746   '((gnus-unread-mark)
17747     (gnus-ticked-mark (from 4))
17748     (gnus-dormant-mark (from 5))
17749     (gnus-del-mark (from -4) (subject -1))
17750     (gnus-read-mark (from 4) (subject 2))
17751     (gnus-expirable-mark (from -1) (subject -1))
17752     (gnus-killed-mark (from -1) (subject -3))
17753     (gnus-kill-file-mark)
17754     (gnus-ancient-mark)
17755     (gnus-low-score-mark)
17756     (gnus-catchup-mark (from -1) (subject -1))))
17757 @end lisp
17758
17759 As you see, each element in this alist has a mark as a key (either a
17760 variable name or a ``real'' mark---a character).  Following this key is
17761 a arbitrary number of header/score pairs.  If there are no header/score
17762 pairs following the key, no adaptive scoring will be done on articles
17763 that have that key as the article mark.  For instance, articles with
17764 @code{gnus-unread-mark} in the example above will not get adaptive score
17765 entries.
17766
17767 Each article can have only one mark, so just a single of these rules
17768 will be applied to each article.
17769
17770 To take @code{gnus-del-mark} as an example---this alist says that all
17771 articles that have that mark (i.e., are marked with @samp{D}) will have a
17772 score entry added to lower based on the @code{From} header by -4, and
17773 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
17774
17775 If you have marked 10 articles with the same subject with
17776 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
17777 That means that that subject will get a score of ten times -1, which
17778 should be, unless I'm much mistaken, -10.
17779
17780 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
17781 the read articles will be marked with the @samp{E} mark.  This'll
17782 probably make adaptive scoring slightly impossible, so auto-expiring and
17783 adaptive scoring doesn't really mix very well.
17784
17785 The headers you can score on are @code{from}, @code{subject},
17786 @code{message-id}, @code{references}, @code{xref}, @code{lines},
17787 @code{chars} and @code{date}.  In addition, you can score on
17788 @code{followup}, which will create an adaptive score entry that matches
17789 on the @code{References} header using the @code{Message-ID} of the
17790 current article, thereby matching the following thread.
17791
17792 You can also score on @code{thread}, which will try to score all
17793 articles that appear in a thread.  @code{thread} matches uses a
17794 @code{Message-ID} to match on the @code{References} header of the
17795 article.  If the match is made, the @code{Message-ID} of the article is
17796 added to the @code{thread} rule.  (Think about it.  I'd recommend two
17797 aspirins afterwards.)
17798
17799 If you use this scheme, you should set the score file atom @code{mark}
17800 to something small---like -300, perhaps, to avoid having small random
17801 changes result in articles getting marked as read.
17802
17803 After using adaptive scoring for a week or so, Gnus should start to
17804 become properly trained and enhance the authors you like best, and kill
17805 the authors you like least, without you having to say so explicitly.
17806
17807 You can control what groups the adaptive scoring is to be performed on
17808 by using the score files (@pxref{Score File Format}).  This will also
17809 let you use different rules in different groups.
17810
17811 @vindex gnus-adaptive-file-suffix
17812 The adaptive score entries will be put into a file where the name is the
17813 group name with @code{gnus-adaptive-file-suffix} appended.  The default
17814 is @samp{ADAPT}.
17815
17816 @vindex gnus-score-exact-adapt-limit
17817 When doing adaptive scoring, substring or fuzzy matching would probably
17818 give you the best results in most cases.  However, if the header one
17819 matches is short, the possibility for false positives is great, so if
17820 the length of the match is less than
17821 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
17822 this variable is @code{nil}, exact matching will always be used to avoid
17823 this problem.
17824
17825 @vindex gnus-default-adaptive-word-score-alist
17826 As mentioned above, you can adapt either on individual words or entire
17827 headers.  If you adapt on words, the
17828 @code{gnus-default-adaptive-word-score-alist} variable says what score
17829 each instance of a word should add given a mark.
17830
17831 @lisp
17832 (setq gnus-default-adaptive-word-score-alist
17833       `((,gnus-read-mark . 30)
17834         (,gnus-catchup-mark . -10)
17835         (,gnus-killed-mark . -20)
17836         (,gnus-del-mark . -15)))
17837 @end lisp
17838
17839 This is the default value.  If you have adaption on words enabled, every
17840 word that appears in subjects of articles marked with
17841 @code{gnus-read-mark} will result in a score rule that increase the
17842 score with 30 points.
17843
17844 @vindex gnus-default-ignored-adaptive-words
17845 @vindex gnus-ignored-adaptive-words
17846 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
17847 will be ignored.  If you wish to add more words to be ignored, use the
17848 @code{gnus-ignored-adaptive-words} list instead.
17849
17850 @vindex gnus-adaptive-word-length-limit
17851 Some may feel that short words shouldn't count when doing adaptive
17852 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
17853 an integer.  Words shorter than this number will be ignored.  This
17854 variable defaults til @code{nil}.
17855
17856 @vindex gnus-adaptive-word-syntax-table
17857 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
17858 syntax table in effect.  It is similar to the standard syntax table, but
17859 it considers numbers to be non-word-constituent characters.
17860
17861 @vindex gnus-adaptive-word-minimum
17862 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
17863 word scoring process will never bring down the score of an article to
17864 below this number.  The default is @code{nil}.
17865
17866 @vindex gnus-adaptive-word-no-group-words
17867 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
17868 won't adaptively word score any of the words in the group name.  Useful
17869 for groups like @samp{comp.editors.emacs}, where most of the subject
17870 lines contain the word @samp{emacs}.
17871
17872 After using this scheme for a while, it might be nice to write a
17873 @code{gnus-psychoanalyze-user} command to go through the rules and see
17874 what words you like and what words you don't like.  Or perhaps not.
17875
17876 Note that the adaptive word scoring thing is highly experimental and is
17877 likely to change in the future.  Initial impressions seem to indicate
17878 that it's totally useless as it stands.  Some more work (involving more
17879 rigorous statistical methods) will have to be done to make this useful.
17880
17881
17882 @node Home Score File
17883 @section Home Score File
17884
17885 The score file where new score file entries will go is called the
17886 @dfn{home score file}.  This is normally (and by default) the score file
17887 for the group itself.  For instance, the home score file for
17888 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
17889
17890 However, this may not be what you want.  It is often convenient to share
17891 a common home score file among many groups---all @samp{emacs} groups
17892 could perhaps use the same home score file.
17893
17894 @vindex gnus-home-score-file
17895 The variable that controls this is @code{gnus-home-score-file}.  It can
17896 be:
17897
17898 @enumerate
17899 @item
17900 A string.  Then this file will be used as the home score file for all
17901 groups.
17902
17903 @item
17904 A function.  The result of this function will be used as the home score
17905 file.  The function will be called with the name of the group as the
17906 parameter.
17907
17908 @item
17909 A list.  The elements in this list can be:
17910
17911 @enumerate
17912 @item
17913 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
17914 group name, the @var{file-name} will be used as the home score file.
17915
17916 @item
17917 A function.  If the function returns non-nil, the result will be used as
17918 the home score file.
17919
17920 @item
17921 A string.  Use the string as the home score file.
17922 @end enumerate
17923
17924 The list will be traversed from the beginning towards the end looking
17925 for matches.
17926
17927 @end enumerate
17928
17929 So, if you want to use just a single score file, you could say:
17930
17931 @lisp
17932 (setq gnus-home-score-file
17933       "my-total-score-file.SCORE")
17934 @end lisp
17935
17936 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
17937 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
17938
17939 @findex gnus-hierarchial-home-score-file
17940 @lisp
17941 (setq gnus-home-score-file
17942       'gnus-hierarchial-home-score-file)
17943 @end lisp
17944
17945 This is a ready-made function provided for your convenience.
17946 Other functions include
17947
17948 @table @code
17949 @item gnus-current-home-score-file
17950 @findex gnus-current-home-score-file
17951 Return the ``current'' regular score file.  This will make scoring
17952 commands add entry to the ``innermost'' matching score file.
17953
17954 @end table
17955
17956 If you want to have one score file for the @samp{emacs} groups and
17957 another for the @samp{comp} groups, while letting all other groups use
17958 their own home score files:
17959
17960 @lisp
17961 (setq gnus-home-score-file
17962       ;; All groups that match the regexp "\\.emacs"
17963       '(("\\.emacs" "emacs.SCORE")
17964         ;; All the comp groups in one score file
17965         ("^comp" "comp.SCORE")))
17966 @end lisp
17967
17968 @vindex gnus-home-adapt-file
17969 @code{gnus-home-adapt-file} works exactly the same way as
17970 @code{gnus-home-score-file}, but says what the home adaptive score file
17971 is instead.  All new adaptive file entries will go into the file
17972 specified by this variable, and the same syntax is allowed.
17973
17974 In addition to using @code{gnus-home-score-file} and
17975 @code{gnus-home-adapt-file}, you can also use group parameters
17976 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
17977 Parameters}) to achieve much the same.  Group and topic parameters take
17978 precedence over this variable.
17979
17980
17981 @node Followups To Yourself
17982 @section Followups To Yourself
17983
17984 Gnus offers two commands for picking out the @code{Message-ID} header in
17985 the current buffer.  Gnus will then add a score rule that scores using
17986 this @code{Message-ID} on the @code{References} header of other
17987 articles.  This will, in effect, increase the score of all articles that
17988 respond to the article in the current buffer.  Quite useful if you want
17989 to easily note when people answer what you've said.
17990
17991 @table @code
17992
17993 @item gnus-score-followup-article
17994 @findex gnus-score-followup-article
17995 This will add a score to articles that directly follow up your own
17996 article.
17997
17998 @item gnus-score-followup-thread
17999 @findex gnus-score-followup-thread
18000 This will add a score to all articles that appear in a thread ``below''
18001 your own article.
18002 @end table
18003
18004 @vindex message-sent-hook
18005 These two functions are both primarily meant to be used in hooks like
18006 @code{message-sent-hook}, like this:
18007 @lisp
18008 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
18009 @end lisp
18010
18011
18012 If you look closely at your own @code{Message-ID}, you'll notice that
18013 the first two or three characters are always the same.  Here's two of
18014 mine:
18015
18016 @example
18017 <x6u3u47icf.fsf@@eyesore.no>
18018 <x6sp9o7ibw.fsf@@eyesore.no>
18019 @end example
18020
18021 So ``my'' ident on this machine is @samp{x6}.  This can be
18022 exploited---the following rule will raise the score on all followups to
18023 myself:
18024
18025 @lisp
18026 ("references"
18027  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
18028   1000 nil r))
18029 @end lisp
18030
18031 Whether it's the first two or first three characters that are ``yours''
18032 is system-dependent.
18033
18034
18035 @node Scoring On Other Headers
18036 @section Scoring On Other Headers
18037 @cindex scoring on other headers
18038
18039 Gnus is quite fast when scoring the ``traditional''
18040 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
18041 other headers requires writing a @code{head} scoring rule, which means
18042 that Gnus has to request every single article from the back end to find
18043 matches.  This takes a long time in big groups.
18044
18045 Now, there's not much you can do about this for news groups, but for
18046 mail groups, you have greater control.  In the @pxref{To From
18047 Newsgroups} section of the manual, it's explained in greater detail what
18048 this mechanism does, but here's a cookbook example for @code{nnml} on
18049 how to allow scoring on the @samp{To} and @samp{Cc} headers.
18050
18051 Put the following in your @file{.gnus.el} file.
18052
18053 @lisp
18054 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
18055       nnmail-extra-headers gnus-extra-headers)
18056 @end lisp
18057
18058 Restart Gnus and rebuild your @code{nnml} overview files with the
18059 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
18060 time if you have much mail.
18061
18062 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
18063 so: @kbd{I e s p To RET <your name> RET}.
18064
18065 See?  Simple.
18066
18067
18068 @node Scoring Tips
18069 @section Scoring Tips
18070 @cindex scoring tips
18071
18072 @table @dfn
18073
18074 @item Crossposts
18075 @cindex crossposts
18076 @cindex scoring crossposts
18077 If you want to lower the score of crossposts, the line to match on is
18078 the @code{Xref} header.
18079 @lisp
18080 ("xref" (" talk.politics.misc:" -1000))
18081 @end lisp
18082
18083 @item Multiple crossposts
18084 If you want to lower the score of articles that have been crossposted to
18085 more than, say, 3 groups:
18086 @lisp
18087 ("xref"
18088   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
18089    -1000 nil r))
18090 @end lisp
18091
18092 @item Matching on the body
18093 This is generally not a very good idea---it takes a very long time.
18094 Gnus actually has to fetch each individual article from the server.  But
18095 you might want to anyway, I guess.  Even though there are three match
18096 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
18097 and stick with it in each score file.  If you use any two, each article
18098 will be fetched @emph{twice}.  If you want to match a bit on the
18099 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
18100 the matches.
18101
18102 @item Marking as read
18103 You will probably want to mark articles that have scores below a certain
18104 number as read.  This is most easily achieved by putting the following
18105 in your @file{all.SCORE} file:
18106 @lisp
18107 ((mark -100))
18108 @end lisp
18109 You may also consider doing something similar with @code{expunge}.
18110
18111 @item Negated character classes
18112 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
18113 That will match newlines, which might lead to, well, The Unknown.  Say
18114 @code{[^abcd\n]*} instead.
18115 @end table
18116
18117
18118 @node Reverse Scoring
18119 @section Reverse Scoring
18120 @cindex reverse scoring
18121
18122 If you want to keep just articles that have @samp{Sex with Emacs} in the
18123 subject header, and expunge all other articles, you could put something
18124 like this in your score file:
18125
18126 @lisp
18127 (("subject"
18128   ("Sex with Emacs" 2))
18129  (mark 1)
18130  (expunge 1))
18131 @end lisp
18132
18133 So, you raise all articles that match @samp{Sex with Emacs} and mark the
18134 rest as read, and expunge them to boot.
18135
18136
18137 @node Global Score Files
18138 @section Global Score Files
18139 @cindex global score files
18140
18141 Sure, other newsreaders have ``global kill files''.  These are usually
18142 nothing more than a single kill file that applies to all groups, stored
18143 in the user's home directory.  Bah!  Puny, weak newsreaders!
18144
18145 What I'm talking about here are Global Score Files.  Score files from
18146 all over the world, from users everywhere, uniting all nations in one
18147 big, happy score file union!  Ange-score!  New and untested!
18148
18149 @vindex gnus-global-score-files
18150 All you have to do to use other people's score files is to set the
18151 @code{gnus-global-score-files} variable.  One entry for each score file,
18152 or each score file directory.  Gnus will decide by itself what score
18153 files are applicable to which group.
18154
18155 To use the score file
18156 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
18157 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
18158 say this:
18159
18160 @lisp
18161 (setq gnus-global-score-files
18162       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
18163         "/ftp@@ftp.some-where:/pub/score/"))
18164 @end lisp
18165
18166 @findex gnus-score-search-global-directories
18167 @noindent
18168 Simple, eh?  Directory names must end with a @samp{/}.  These
18169 directories are typically scanned only once during each Gnus session.
18170 If you feel the need to manually re-scan the remote directories, you can
18171 use the @code{gnus-score-search-global-directories} command.
18172
18173 Note that, at present, using this option will slow down group entry
18174 somewhat.  (That is---a lot.)
18175
18176 If you want to start maintaining score files for other people to use,
18177 just put your score file up for anonymous ftp and announce it to the
18178 world.  Become a retro-moderator!  Participate in the retro-moderator
18179 wars sure to ensue, where retro-moderators battle it out for the
18180 sympathy of the people, luring them to use their score files on false
18181 premises!  Yay!  The net is saved!
18182
18183 Here are some tips for the would-be retro-moderator, off the top of my
18184 head:
18185
18186 @itemize @bullet
18187
18188 @item
18189 Articles heavily crossposted are probably junk.
18190 @item
18191 To lower a single inappropriate article, lower by @code{Message-ID}.
18192 @item
18193 Particularly brilliant authors can be raised on a permanent basis.
18194 @item
18195 Authors that repeatedly post off-charter for the group can safely be
18196 lowered out of existence.
18197 @item
18198 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
18199 articles completely.
18200
18201 @item
18202 Use expiring score entries to keep the size of the file down.  You
18203 should probably have a long expiry period, though, as some sites keep
18204 old articles for a long time.
18205 @end itemize
18206
18207 ... I wonder whether other newsreaders will support global score files
18208 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
18209 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
18210 holding our breath yet?
18211
18212
18213 @node Kill Files
18214 @section Kill Files
18215 @cindex kill files
18216
18217 Gnus still supports those pesky old kill files.  In fact, the kill file
18218 entries can now be expiring, which is something I wrote before Daniel
18219 Quinlan thought of doing score files, so I've left the code in there.
18220
18221 In short, kill processing is a lot slower (and I do mean @emph{a lot})
18222 than score processing, so it might be a good idea to rewrite your kill
18223 files into score files.
18224
18225 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
18226 forms into this file, which means that you can use kill files as some
18227 sort of primitive hook function to be run on group entry, even though
18228 that isn't a very good idea.
18229
18230 Normal kill files look like this:
18231
18232 @lisp
18233 (gnus-kill "From" "Lars Ingebrigtsen")
18234 (gnus-kill "Subject" "ding")
18235 (gnus-expunge "X")
18236 @end lisp
18237
18238 This will mark every article written by me as read, and remove the
18239 marked articles from the summary buffer.  Very useful, you'll agree.
18240
18241 Other programs use a totally different kill file syntax.  If Gnus
18242 encounters what looks like a @code{rn} kill file, it will take a stab at
18243 interpreting it.
18244
18245 Two summary functions for editing a GNUS kill file:
18246
18247 @table @kbd
18248
18249 @item M-k
18250 @kindex M-k (Summary)
18251 @findex gnus-summary-edit-local-kill
18252 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
18253
18254 @item M-K
18255 @kindex M-K (Summary)
18256 @findex gnus-summary-edit-global-kill
18257 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
18258 @end table
18259
18260 Two group mode functions for editing the kill files:
18261
18262 @table @kbd
18263
18264 @item M-k
18265 @kindex M-k (Group)
18266 @findex gnus-group-edit-local-kill
18267 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
18268
18269 @item M-K
18270 @kindex M-K (Group)
18271 @findex gnus-group-edit-global-kill
18272 Edit the general kill file (@code{gnus-group-edit-global-kill}).
18273 @end table
18274
18275 Kill file variables:
18276
18277 @table @code
18278 @item gnus-kill-file-name
18279 @vindex gnus-kill-file-name
18280 A kill file for the group @samp{soc.motss} is normally called
18281 @file{soc.motss.KILL}.  The suffix appended to the group name to get
18282 this file name is detailed by the @code{gnus-kill-file-name} variable.
18283 The ``global'' kill file (not in the score file sense of ``global'', of
18284 course) is just called @file{KILL}.
18285
18286 @vindex gnus-kill-save-kill-file
18287 @item gnus-kill-save-kill-file
18288 If this variable is non-@code{nil}, Gnus will save the
18289 kill file after processing, which is necessary if you use expiring
18290 kills.
18291
18292 @item gnus-apply-kill-hook
18293 @vindex gnus-apply-kill-hook
18294 @findex gnus-apply-kill-file-unless-scored
18295 @findex gnus-apply-kill-file
18296 A hook called to apply kill files to a group.  It is
18297 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
18298 kill file if you have a score file for the same group, you can set this
18299 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
18300 kill files to be processed, you should set this variable to @code{nil}.
18301
18302 @item gnus-kill-file-mode-hook
18303 @vindex gnus-kill-file-mode-hook
18304 A hook called in kill-file mode buffers.
18305
18306 @end table
18307
18308
18309 @node Converting Kill Files
18310 @section Converting Kill Files
18311 @cindex kill files
18312 @cindex converting kill files
18313
18314 If you have loads of old kill files, you may want to convert them into
18315 score files.  If they are ``regular'', you can use
18316 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
18317 by hand.
18318
18319 The kill to score conversion package isn't included in Gnus by default.
18320 You can fetch it from
18321 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
18322
18323 If your old kill files are very complex---if they contain more
18324 non-@code{gnus-kill} forms than not, you'll have to convert them by
18325 hand.  Or just let them be as they are.  Gnus will still use them as
18326 before.
18327
18328
18329 @node GroupLens
18330 @section GroupLens
18331 @cindex GroupLens
18332
18333 GroupLens (@uref{http://www.cs.umn.edu/Research/GroupLens/}) is a
18334 collaborative filtering system that helps you work together with other
18335 people to find the quality news articles out of the huge volume of
18336 news articles generated every day.
18337
18338 To accomplish this the GroupLens system combines your opinions about
18339 articles you have already read with the opinions of others who have done
18340 likewise and gives you a personalized prediction for each unread news
18341 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
18342 rate articles, and finds other people that rate articles the same way.
18343 Once it has found some people you agree with it tells you, in the form
18344 of a prediction, what they thought of the article.  You can use this
18345 prediction to help you decide whether or not you want to read the
18346 article.
18347
18348 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
18349 so this section is mostly of historical interest.
18350
18351 @menu
18352 * Using GroupLens::             How to make Gnus use GroupLens.
18353 * Rating Articles::             Letting GroupLens know how you rate articles.
18354 * Displaying Predictions::      Displaying predictions given by GroupLens.
18355 * GroupLens Variables::         Customizing GroupLens.
18356 @end menu
18357
18358
18359 @node Using GroupLens
18360 @subsection Using GroupLens
18361
18362 To use GroupLens you must register a pseudonym with your local Better
18363 Bit Bureau (BBB).
18364 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html} is the only
18365 better bit in town at the moment.
18366
18367 Once you have registered you'll need to set a couple of variables.
18368
18369 @table @code
18370
18371 @item gnus-use-grouplens
18372 @vindex gnus-use-grouplens
18373 Setting this variable to a non-@code{nil} value will make Gnus hook into
18374 all the relevant GroupLens functions.
18375
18376 @item grouplens-pseudonym
18377 @vindex grouplens-pseudonym
18378 This variable should be set to the pseudonym you got when registering
18379 with the Better Bit Bureau.
18380
18381 @item grouplens-newsgroups
18382 @vindex grouplens-newsgroups
18383 A list of groups that you want to get GroupLens predictions for.
18384
18385 @end table
18386
18387 That's the minimum of what you need to get up and running with GroupLens.
18388 Once you've registered, GroupLens will start giving you scores for
18389 articles based on the average of what other people think.  But, to get
18390 the real benefit of GroupLens you need to start rating articles
18391 yourself.  Then the scores GroupLens gives you will be personalized for
18392 you, based on how the people you usually agree with have already rated.
18393
18394
18395 @node Rating Articles
18396 @subsection Rating Articles
18397
18398 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
18399 Where 1 means something like this article is a waste of bandwidth and 5
18400 means that the article was really good.  The basic question to ask
18401 yourself is, "on a scale from 1 to 5 would I like to see more articles
18402 like this one?"
18403
18404 There are four ways to enter a rating for an article in GroupLens.
18405
18406 @table @kbd
18407
18408 @item r
18409 @kindex r (GroupLens)
18410 @findex bbb-summary-rate-article
18411 This function will prompt you for a rating on a scale of one to five.
18412
18413 @item k
18414 @kindex k (GroupLens)
18415 @findex grouplens-score-thread
18416 This function will prompt you for a rating, and rate all the articles in
18417 the thread.  This is really useful for some of those long running giant
18418 threads in rec.humor.
18419
18420 @end table
18421
18422 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
18423 the score of the article you're reading.
18424
18425 @table @kbd
18426
18427 @item 1-5 n
18428 @kindex n (GroupLens)
18429 @findex grouplens-next-unread-article
18430 Rate the article and go to the next unread article.
18431
18432 @item 1-5 ,
18433 @kindex , (GroupLens)
18434 @findex grouplens-best-unread-article
18435 Rate the article and go to the next unread article with the highest score.
18436
18437 @end table
18438
18439 If you want to give the current article a score of 4 and then go to the
18440 next article, just type @kbd{4 n}.
18441
18442
18443 @node Displaying Predictions
18444 @subsection Displaying Predictions
18445
18446 GroupLens makes a prediction for you about how much you will like a
18447 news article.  The predictions from GroupLens are on a scale from 1 to
18448 5, where 1 is the worst and 5 is the best.  You can use the predictions
18449 from GroupLens in one of three ways controlled by the variable
18450 @code{gnus-grouplens-override-scoring}.
18451
18452 @vindex gnus-grouplens-override-scoring
18453 There are three ways to display predictions in grouplens.  You may
18454 choose to have the GroupLens scores contribute to, or override the
18455 regular gnus scoring mechanism.  override is the default; however, some
18456 people prefer to see the Gnus scores plus the grouplens scores.  To get
18457 the separate scoring behavior you need to set
18458 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
18459 GroupLens predictions combined with the grouplens scores set it to
18460 @code{'override} and to combine the scores set
18461 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
18462 the combine option you will also want to set the values for
18463 @code{grouplens-prediction-offset} and
18464 @code{grouplens-score-scale-factor}.
18465
18466 @vindex grouplens-prediction-display
18467 In either case, GroupLens gives you a few choices for how you would like
18468 to see your predictions displayed.  The display of predictions is
18469 controlled by the @code{grouplens-prediction-display} variable.
18470
18471 The following are valid values for that variable.
18472
18473 @table @code
18474 @item prediction-spot
18475 The higher the prediction, the further to the right an @samp{*} is
18476 displayed.
18477
18478 @item confidence-interval
18479 A numeric confidence interval.
18480
18481 @item prediction-bar
18482 The higher the prediction, the longer the bar.
18483
18484 @item confidence-bar
18485 Numerical confidence.
18486
18487 @item confidence-spot
18488 The spot gets bigger with more confidence.
18489
18490 @item prediction-num
18491 Plain-old numeric value.
18492
18493 @item confidence-plus-minus
18494 Prediction +/- confidence.
18495
18496 @end table
18497
18498
18499 @node GroupLens Variables
18500 @subsection GroupLens Variables
18501
18502 @table @code
18503
18504 @item gnus-summary-grouplens-line-format
18505 The summary line format used in GroupLens-enhanced summary buffers.  It
18506 accepts the same specs as the normal summary line format (@pxref{Summary
18507 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
18508 %s\n}.
18509
18510 @item grouplens-bbb-host
18511 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
18512 default.
18513
18514 @item grouplens-bbb-port
18515 Port of the host running the bbbd server.  The default is 9000.
18516
18517 @item grouplens-score-offset
18518 Offset the prediction by this value.  In other words, subtract the
18519 prediction value by this number to arrive at the effective score.  The
18520 default is 0.
18521
18522 @item grouplens-score-scale-factor
18523 This variable allows the user to magnify the effect of GroupLens scores.
18524 The scale factor is applied after the offset.  The default is 1.
18525
18526 @end table
18527
18528
18529 @node Advanced Scoring
18530 @section Advanced Scoring
18531
18532 Scoring on Subjects and From headers is nice enough, but what if you're
18533 really interested in what a person has to say only when she's talking
18534 about a particular subject?  Or what if you really don't want to
18535 read what person A has to say when she's following up to person B, but
18536 want to read what she says when she's following up to person C?
18537
18538 By using advanced scoring rules you may create arbitrarily complex
18539 scoring patterns.
18540
18541 @menu
18542 * Advanced Scoring Syntax::     A definition.
18543 * Advanced Scoring Examples::   What they look like.
18544 * Advanced Scoring Tips::       Getting the most out of it.
18545 @end menu
18546
18547
18548 @node Advanced Scoring Syntax
18549 @subsection Advanced Scoring Syntax
18550
18551 Ordinary scoring rules have a string as the first element in the rule.
18552 Advanced scoring rules have a list as the first element.  The second
18553 element is the score to be applied if the first element evaluated to a
18554 non-@code{nil} value.
18555
18556 These lists may consist of three logical operators, one redirection
18557 operator, and various match operators.
18558
18559 Logical operators:
18560
18561 @table @code
18562 @item &
18563 @itemx and
18564 This logical operator will evaluate each of its arguments until it finds
18565 one that evaluates to @code{false}, and then it'll stop.  If all arguments
18566 evaluate to @code{true} values, then this operator will return
18567 @code{true}.
18568
18569 @item |
18570 @itemx or
18571 This logical operator will evaluate each of its arguments until it finds
18572 one that evaluates to @code{true}.  If no arguments are @code{true},
18573 then this operator will return @code{false}.
18574
18575 @item !
18576 @itemx not
18577 @itemx Â¬
18578 This logical operator only takes a single argument.  It returns the
18579 logical negation of the value of its argument.
18580
18581 @end table
18582
18583 There is an @dfn{indirection operator} that will make its arguments
18584 apply to the ancestors of the current article being scored.  For
18585 instance, @code{1-} will make score rules apply to the parent of the
18586 current article.  @code{2-} will make score rules apply to the
18587 grandparent of the current article.  Alternatively, you can write
18588 @code{^^}, where the number of @code{^}s (carets) says how far back into
18589 the ancestry you want to go.
18590
18591 Finally, we have the match operators.  These are the ones that do the
18592 real work.  Match operators are header name strings followed by a match
18593 and a match type.  A typical match operator looks like @samp{("from"
18594 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
18595 simple scoring, and the match types are also the same.
18596
18597
18598 @node Advanced Scoring Examples
18599 @subsection Advanced Scoring Examples
18600
18601 Please note that the following examples are score file rules.  To
18602 make a complete score file from them, surround them with another pair
18603 of parentheses.
18604
18605 Let's say you want to increase the score of articles written by Lars
18606 when he's talking about Gnus:
18607
18608 @example
18609 ((&
18610   ("from" "Lars Ingebrigtsen")
18611   ("subject" "Gnus"))
18612  1000)
18613 @end example
18614
18615 Quite simple, huh?
18616
18617 When he writes long articles, he sometimes has something nice to say:
18618
18619 @example
18620 ((&
18621   ("from" "Lars Ingebrigtsen")
18622   (|
18623    ("subject" "Gnus")
18624    ("lines" 100 >)))
18625  1000)
18626 @end example
18627
18628 However, when he responds to things written by Reig Eigil Logge, you
18629 really don't want to read what he's written:
18630
18631 @example
18632 ((&
18633   ("from" "Lars Ingebrigtsen")
18634   (1- ("from" "Reig Eigir Logge")))
18635  -100000)
18636 @end example
18637
18638 Everybody that follows up Redmondo when he writes about disappearing
18639 socks should have their scores raised, but only when they talk about
18640 white socks.  However, when Lars talks about socks, it's usually not
18641 very interesting:
18642
18643 @example
18644 ((&
18645   (1-
18646    (&
18647     ("from" "redmondo@@.*no" r)
18648     ("body" "disappearing.*socks" t)))
18649   (! ("from" "Lars Ingebrigtsen"))
18650   ("body" "white.*socks"))
18651  1000)
18652 @end example
18653
18654 The possibilities are endless.
18655
18656
18657 @node Advanced Scoring Tips
18658 @subsection Advanced Scoring Tips
18659
18660 The @code{&} and @code{|} logical operators do short-circuit logic.
18661 That is, they stop processing their arguments when it's clear what the
18662 result of the operation will be.  For instance, if one of the arguments
18663 of an @code{&} evaluates to @code{false}, there's no point in evaluating
18664 the rest of the arguments.  This means that you should put slow matches
18665 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
18666 @samp{subject}) first.
18667
18668 The indirection arguments (@code{1-} and so on) will make their
18669 arguments work on previous generations of the thread.  If you say
18670 something like:
18671
18672 @example
18673 ...
18674 (1-
18675  (1-
18676   ("from" "lars")))
18677 ...
18678 @end example
18679
18680 Then that means "score on the from header of the grandparent of the
18681 current article".  An indirection is quite fast, but it's better to say:
18682
18683 @example
18684 (1-
18685  (&
18686   ("from" "Lars")
18687   ("subject" "Gnus")))
18688 @end example
18689
18690 than it is to say:
18691
18692 @example
18693 (&
18694  (1- ("from" "Lars"))
18695  (1- ("subject" "Gnus")))
18696 @end example
18697
18698
18699 @node Score Decays
18700 @section Score Decays
18701 @cindex score decays
18702 @cindex decays
18703
18704 You may find that your scores have a tendency to grow without
18705 bounds, especially if you're using adaptive scoring.  If scores get too
18706 big, they lose all meaning---they simply max out and it's difficult to
18707 use them in any sensible way.
18708
18709 @vindex gnus-decay-scores
18710 @findex gnus-decay-score
18711 @vindex gnus-decay-score-function
18712 Gnus provides a mechanism for decaying scores to help with this problem.
18713 When score files are loaded and @code{gnus-decay-scores} is
18714 non-@code{nil}, Gnus will run the score files through the decaying
18715 mechanism thereby lowering the scores of all non-permanent score rules.
18716 The decay itself if performed by the @code{gnus-decay-score-function}
18717 function, which is @code{gnus-decay-score} by default.  Here's the
18718 definition of that function:
18719
18720 @lisp
18721 (defun gnus-decay-score (score)
18722   "Decay SCORE.
18723 This is done according to `gnus-score-decay-constant'
18724 and `gnus-score-decay-scale'."
18725   (floor
18726    (- score
18727       (* (if (< score 0) 1 -1)
18728          (min (abs score)
18729               (max gnus-score-decay-constant
18730                    (* (abs score)
18731                       gnus-score-decay-scale)))))))
18732 @end lisp
18733
18734 @vindex gnus-score-decay-scale
18735 @vindex gnus-score-decay-constant
18736 @code{gnus-score-decay-constant} is 3 by default and
18737 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
18738
18739 @enumerate
18740 @item
18741 Scores between -3 and 3 will be set to 0 when this function is called.
18742
18743 @item
18744 Scores with magnitudes between 3 and 60 will be shrunk by 3.
18745
18746 @item
18747 Scores with magnitudes greater than 60 will be shrunk by 5% of the
18748 score.
18749 @end enumerate
18750
18751 If you don't like this decay function, write your own.  It is called
18752 with the score to be decayed as its only parameter, and it should return
18753 the new score, which should be an integer.
18754
18755 Gnus will try to decay scores once a day.  If you haven't run Gnus for
18756 four days, Gnus will decay the scores four times, for instance.
18757
18758 @iftex
18759 @iflatex
18760 @chapter Message
18761 @include message.texi
18762 @chapter Emacs MIME
18763 @include emacs-mime.texi
18764 @chapter Sieve
18765 @include sieve.texi
18766 @end iflatex
18767 @end iftex
18768
18769 @node Various
18770 @chapter Various
18771
18772 @menu
18773 * Process/Prefix::              A convention used by many treatment commands.
18774 * Interactive::                 Making Gnus ask you many questions.
18775 * Symbolic Prefixes::           How to supply some Gnus functions with options.
18776 * Formatting Variables::        You can specify what buffers should look like.
18777 * Window Layout::               Configuring the Gnus buffer windows.
18778 * Faces and Fonts::             How to change how faces look.
18779 * Compilation::                 How to speed Gnus up.
18780 * Mode Lines::                  Displaying information in the mode lines.
18781 * Highlighting and Menus::      Making buffers look all nice and cozy.
18782 * Buttons::                     Get tendinitis in ten easy steps!
18783 * Daemons::                     Gnus can do things behind your back.
18784 * NoCeM::                       How to avoid spam and other fatty foods.
18785 * Undo::                        Some actions can be undone.
18786 * Predicate Specifiers::        Specifying predicates.
18787 * Moderation::                  What to do if you're a moderator.
18788 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
18789 * Fuzzy Matching::              What's the big fuzz?
18790 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
18791 * Various Various::             Things that are really various.
18792 @end menu
18793
18794
18795 @node Process/Prefix
18796 @section Process/Prefix
18797 @cindex process/prefix convention
18798
18799 Many functions, among them functions for moving, decoding and saving
18800 articles, use what is known as the @dfn{Process/Prefix convention}.
18801
18802 This is a method for figuring out what articles the user wants the
18803 command to be performed on.
18804
18805 It goes like this:
18806
18807 If the numeric prefix is N, perform the operation on the next N
18808 articles, starting with the current one.  If the numeric prefix is
18809 negative, perform the operation on the previous N articles, starting
18810 with the current one.
18811
18812 @vindex transient-mark-mode
18813 If @code{transient-mark-mode} in non-@code{nil} and the region is
18814 active, all articles in the region will be worked upon.
18815
18816 If there is no numeric prefix, but some articles are marked with the
18817 process mark, perform the operation on the articles marked with
18818 the process mark.
18819
18820 If there is neither a numeric prefix nor any articles marked with the
18821 process mark, just perform the operation on the current article.
18822
18823 Quite simple, really, but it needs to be made clear so that surprises
18824 are avoided.
18825
18826 Commands that react to the process mark will push the current list of
18827 process marked articles onto a stack and will then clear all process
18828 marked articles.  You can restore the previous configuration with the
18829 @kbd{M P y} command (@pxref{Setting Process Marks}).
18830
18831 @vindex gnus-summary-goto-unread
18832 One thing that seems to shock & horrify lots of people is that, for
18833 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
18834 Since each @kbd{d} (which marks the current article as read) by default
18835 goes to the next unread article after marking, this means that @kbd{3 d}
18836 will mark the next three unread articles as read, no matter what the
18837 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
18838 @code{nil} for a more straightforward action.
18839
18840 Many commands do not use the process/prefix convention.  All commands
18841 that do explicitly say so in this manual.  To apply the process/prefix
18842 convention to commands that do not use it, you can use the @kbd{M-&}
18843 command.  For instance, to mark all the articles in the group as
18844 expirable, you could say `M P b M-& E'.
18845
18846
18847 @node Interactive
18848 @section Interactive
18849 @cindex interaction
18850
18851 @table @code
18852
18853 @item gnus-novice-user
18854 @vindex gnus-novice-user
18855 If this variable is non-@code{nil}, you are either a newcomer to the
18856 World of Usenet, or you are very cautious, which is a nice thing to be,
18857 really.  You will be given questions of the type ``Are you sure you want
18858 to do this?'' before doing anything dangerous.  This is @code{t} by
18859 default.
18860
18861 @item gnus-expert-user
18862 @vindex gnus-expert-user
18863 If this variable is non-@code{nil}, you will seldom be asked any
18864 questions by Gnus.  It will simply assume you know what you're doing, no
18865 matter how strange.
18866
18867 @item gnus-interactive-catchup
18868 @vindex gnus-interactive-catchup
18869 Require confirmation before catching up a group if non-@code{nil}.  It
18870 is @code{t} by default.
18871
18872 @item gnus-interactive-exit
18873 @vindex gnus-interactive-exit
18874 Require confirmation before exiting Gnus.  This variable is @code{t} by
18875 default.
18876 @end table
18877
18878
18879 @node Symbolic Prefixes
18880 @section Symbolic Prefixes
18881 @cindex symbolic prefixes
18882
18883 Quite a lot of Emacs commands react to the (numeric) prefix.  For
18884 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
18885 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
18886 rule of 900 to the current article.
18887
18888 This is all nice and well, but what if you want to give a command some
18889 additional information?  Well, what most commands do is interpret the
18890 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
18891 doesn't want a backup file to be created when saving the current buffer,
18892 for instance.  But what if you want to save without making a backup
18893 file, and you want Emacs to flash lights and play a nice tune at the
18894 same time?  You can't, and you're probably perfectly happy that way.
18895
18896 @kindex M-i (Summary)
18897 @findex gnus-symbolic-argument
18898 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
18899 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
18900 character typed in is the value.  You can stack as many @kbd{M-i}
18901 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
18902 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
18903 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
18904 @code{b}''.  You get the drift.
18905
18906 Typing in symbolic prefixes to commands that don't accept them doesn't
18907 hurt, but it doesn't do any good either.  Currently not many Gnus
18908 functions make use of the symbolic prefix.
18909
18910 If you're interested in how Gnus implements this, @pxref{Extended
18911 Interactive}.
18912
18913
18914 @node Formatting Variables
18915 @section Formatting Variables
18916 @cindex formatting variables
18917
18918 Throughout this manual you've probably noticed lots of variables called
18919 things like @code{gnus-group-line-format} and
18920 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
18921 output lines in the various buffers.  There's quite a lot of them.
18922 Fortunately, they all use the same syntax, so there's not that much to
18923 be annoyed by.
18924
18925 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
18926 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
18927 lots of percentages everywhere.
18928
18929 @menu
18930 * Formatting Basics::           A formatting variable is basically a format string.
18931 * Mode Line Formatting::        Some rules about mode line formatting variables.
18932 * Advanced Formatting::         Modifying output in various ways.
18933 * User-Defined Specs::          Having Gnus call your own functions.
18934 * Formatting Fonts::            Making the formatting look colorful and nice.
18935 * Positioning Point::           Moving point to a position after an operation.
18936 * Tabulation::                  Tabulating your output.
18937 * Wide Characters::             Dealing with wide characters.
18938 @end menu
18939
18940 Currently Gnus uses the following formatting variables:
18941 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
18942 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
18943 @code{gnus-group-mode-line-format},
18944 @code{gnus-summary-mode-line-format},
18945 @code{gnus-article-mode-line-format},
18946 @code{gnus-server-mode-line-format}, and
18947 @code{gnus-summary-pick-line-format}.
18948
18949 All these format variables can also be arbitrary elisp forms.  In that
18950 case, they will be @code{eval}ed to insert the required lines.
18951
18952 @kindex M-x gnus-update-format
18953 @findex gnus-update-format
18954 Gnus includes a command to help you while creating your own format
18955 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
18956 update the spec in question and pop you to a buffer where you can
18957 examine the resulting lisp code to be run to generate the line.
18958
18959
18960
18961 @node Formatting Basics
18962 @subsection Formatting Basics
18963
18964 Each @samp{%} element will be replaced by some string or other when the
18965 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
18966 spec, and pad with spaces to get a 5-character field''.
18967
18968 As with normal C and Emacs Lisp formatting strings, the numerical
18969 modifier between the @samp{%} and the formatting type character will
18970 @dfn{pad} the output so that it is always at least that long.
18971 @samp{%5y} will make the field always (at least) five characters wide by
18972 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
18973 the right instead.
18974
18975 You may also wish to limit the length of the field to protect against
18976 particularly wide values.  For that you can say @samp{%4,6y}, which
18977 means that the field will never be more than 6 characters wide and never
18978 less than 4 characters wide.
18979
18980 Also Gnus supports some extended format specifications, such as
18981 @samp{%&user-date;}.
18982
18983
18984 @node Mode Line Formatting
18985 @subsection Mode Line Formatting
18986
18987 Mode line formatting variables (e.g.,
18988 @code{gnus-summary-mode-line-format}) follow the same rules as other,
18989 buffer line oriented formatting variables (@pxref{Formatting Basics})
18990 with the following two differences:
18991
18992 @enumerate
18993
18994 @item
18995 There must be no newline (@samp{\n}) at the end.
18996
18997 @item
18998 The special @samp{%%b} spec can be used to display the buffer name.
18999 Well, it's no spec at all, really---@samp{%%} is just a way to quote
19000 @samp{%} to allow it to pass through the formatting machinery unmangled,
19001 so that Emacs receives @samp{%b}, which is something the Emacs mode line
19002 display interprets to mean ``show the buffer name''.  For a full list of
19003 mode line specs Emacs understands, see the documentation of the
19004 @code{mode-line-format} variable.
19005
19006 @end enumerate
19007
19008
19009 @node Advanced Formatting
19010 @subsection Advanced Formatting
19011
19012 It is frequently useful to post-process the fields in some way.
19013 Padding, limiting, cutting off parts and suppressing certain values can
19014 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
19015 look like @samp{%~(cut 3)~(ignore "0")y}.
19016
19017 These are the valid modifiers:
19018
19019 @table @code
19020 @item pad
19021 @itemx pad-left
19022 Pad the field to the left with spaces until it reaches the required
19023 length.
19024
19025 @item pad-right
19026 Pad the field to the right with spaces until it reaches the required
19027 length.
19028
19029 @item max
19030 @itemx max-left
19031 Cut off characters from the left until it reaches the specified length.
19032
19033 @item max-right
19034 Cut off characters from the right until it reaches the specified
19035 length.
19036
19037 @item cut
19038 @itemx cut-left
19039 Cut off the specified number of characters from the left.
19040
19041 @item cut-right
19042 Cut off the specified number of characters from the right.
19043
19044 @item ignore
19045 Return an empty string if the field is equal to the specified value.
19046
19047 @item form
19048 Use the specified form as the field value when the @samp{@@} spec is
19049 used.
19050
19051 Here's an example:
19052
19053 @lisp
19054 "~(form (current-time-string))@@"
19055 @end lisp
19056
19057 @end table
19058
19059 Let's take an example.  The @samp{%o} spec in the summary mode lines
19060 will return a date in compact ISO8601 format---@samp{19960809T230410}.
19061 This is quite a mouthful, so we want to shave off the century number and
19062 the time, leaving us with a six-character date.  That would be
19063 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
19064 maxing, and we need the padding to ensure that the date is never less
19065 than 6 characters to make it look nice in columns.)
19066
19067 Ignoring is done first; then cutting; then maxing; and then as the very
19068 last operation, padding.
19069
19070 @vindex gnus-compile-user-specs
19071 If @code{gnus-compile-user-specs} is set to @code{nil} (@code{t} by
19072 default) with your strong personality, and use a lots of these advanced
19073 thingies, you'll find that Gnus gets quite slow.  This can be helped
19074 enormously by running @kbd{M-x gnus-compile} when you are satisfied with
19075 the look of your lines.
19076 @xref{Compilation}.
19077
19078
19079 @node User-Defined Specs
19080 @subsection User-Defined Specs
19081
19082 All the specs allow for inserting user defined specifiers---@samp{u}.
19083 The next character in the format string should be a letter.  Gnus
19084 will call the function @code{gnus-user-format-function-}@samp{X}, where
19085 @samp{X} is the letter following @samp{%u}.  The function will be passed
19086 a single parameter---what the parameter means depends on what buffer
19087 it's being called from.  The function should return a string, which will
19088 be inserted into the buffer just like information from any other
19089 specifier.  This function may also be called with dummy values, so it
19090 should protect against that.
19091
19092 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
19093 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
19094
19095 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
19096 much the same without defining new functions.  Here's an example:
19097 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
19098 given here will be evaluated to yield the current line number, and then
19099 inserted.
19100
19101
19102 @node Formatting Fonts
19103 @subsection Formatting Fonts
19104
19105 There are specs for highlighting, and these are shared by all the format
19106 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
19107 the special @code{mouse-face} property set, which means that it will be
19108 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
19109 over it.
19110
19111 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
19112 normal faces set using @code{gnus-face-0}, which is @code{bold} by
19113 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
19114 and so on.  Create as many faces as you wish.  The same goes for the
19115 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
19116 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
19117
19118 Text inside the @samp{%<} and @samp{%>} specifiers will get the special
19119 @code{balloon-help} property set to @code{gnus-balloon-face-0}.  If you
19120 say @samp{%1<}, you'll get @code{gnus-balloon-face-1} and so on.  The
19121 @code{gnus-balloon-face-*} variables should be either strings or symbols
19122 naming functions that return a string.  Under @code{balloon-help-mode},
19123 when the mouse passes over text with this property set, a balloon window
19124 will appear and display the string.  Please refer to the doc string of
19125 @code{balloon-help-mode} for more information on this.
19126
19127 Here's an alternative recipe for the group buffer:
19128
19129 @lisp
19130 ;; Create three face types.
19131 (setq gnus-face-1 'bold)
19132 (setq gnus-face-3 'italic)
19133
19134 ;; We want the article count to be in
19135 ;; a bold and green face.  So we create
19136 ;; a new face called `my-green-bold'.
19137 (copy-face 'bold 'my-green-bold)
19138 ;; Set the color.
19139 (set-face-foreground 'my-green-bold "ForestGreen")
19140 (setq gnus-face-2 'my-green-bold)
19141
19142 ;; Set the new & fancy format.
19143 (setq gnus-group-line-format
19144       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
19145 @end lisp
19146
19147 I'm sure you'll be able to use this scheme to create totally unreadable
19148 and extremely vulgar displays.  Have fun!
19149
19150 Note that the @samp{%(} specs (and friends) do not make any sense on the
19151 mode-line variables.
19152
19153 @node Positioning Point
19154 @subsection Positioning Point
19155
19156 Gnus usually moves point to a pre-defined place on each line in most
19157 buffers.  By default, point move to the first colon character on the
19158 line.  You can customize this behaviour in three different ways.
19159
19160 You can move the colon character to somewhere else on the line.
19161
19162 @findex gnus-goto-colon
19163 You can redefine the function that moves the point to the colon.  The
19164 function is called @code{gnus-goto-colon}.
19165
19166 But perhaps the most convenient way to deal with this, if you don't want
19167 to have a colon in your line, is to use the @samp{%C} specifier.  If you
19168 put a @samp{%C} somewhere in your format line definition, Gnus will
19169 place point there.
19170
19171
19172 @node Tabulation
19173 @subsection Tabulation
19174
19175 You can usually line up your displays by padding and cutting your
19176 strings.  However, when combining various strings of different size, it
19177 can often be more convenient to just output the strings, and then worry
19178 about lining up the following text afterwards.
19179
19180 To do that, Gnus supplies tabulator specs--@samp{%=}.  There are two
19181 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
19182
19183 @samp{%50=} will insert space characters to pad the line up to column
19184 50.  If the text is already past column 50, nothing will be inserted.
19185 This is the soft tabulator.
19186
19187 @samp{%-50=} will insert space characters to pad the line up to column
19188 50.  If the text is already past column 50, the excess text past column
19189 50 will be removed.  This is the hard tabulator.
19190
19191
19192 @node Wide Characters
19193 @subsection Wide Characters
19194
19195 Proportional fonts in most countries have characters of the same width.
19196 Some countries, however, use Latin characters mixed with wider
19197 characters---most notable East Asian countries.
19198
19199 The problem is that when formatting, Gnus assumes that if a string is 10
19200 characters wide, it'll be 10 Latin characters wide on the screen.  In
19201 these coutries, that's not true.
19202
19203 @vindex gnus-use-correct-string-widths
19204 To help fix this, you can set @code{gnus-use-correct-string-widths} to
19205 @code{t}.  This makes buffer generation slower, but the results will be
19206 prettieer.  The default value is @code{t}.
19207
19208
19209
19210 @node Window Layout
19211 @section Window Layout
19212 @cindex window layout
19213
19214 No, there's nothing here about X, so be quiet.
19215
19216 @vindex gnus-use-full-window
19217 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
19218 other windows and occupy the entire Emacs screen by itself.  It is
19219 @code{t} by default.
19220
19221 Setting this variable to @code{nil} kinda works, but there are
19222 glitches.  Use at your own peril.
19223
19224 @vindex gnus-buffer-configuration
19225 @code{gnus-buffer-configuration} describes how much space each Gnus
19226 buffer should be given.  Here's an excerpt of this variable:
19227
19228 @lisp
19229 ((group (vertical 1.0 (group 1.0 point)
19230                       (if gnus-carpal (group-carpal 4))))
19231  (article (vertical 1.0 (summary 0.25 point)
19232                         (article 1.0))))
19233 @end lisp
19234
19235 This is an alist.  The @dfn{key} is a symbol that names some action or
19236 other.  For instance, when displaying the group buffer, the window
19237 configuration function will use @code{group} as the key.  A full list of
19238 possible names is listed below.
19239
19240 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
19241 should occupy.  To take the @code{article} split as an example -
19242
19243 @lisp
19244 (article (vertical 1.0 (summary 0.25 point)
19245                        (article 1.0)))
19246 @end lisp
19247
19248 This @dfn{split} says that the summary buffer should occupy 25% of upper
19249 half of the screen, and that it is placed over the article buffer.  As
19250 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
19251 reaching for that calculator there).  However, the special number
19252 @code{1.0} is used to signal that this buffer should soak up all the
19253 rest of the space available after the rest of the buffers have taken
19254 whatever they need.  There should be only one buffer with the @code{1.0}
19255 size spec per split.
19256
19257 Point will be put in the buffer that has the optional third element
19258 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
19259 split where the tag @code{frame-focus} is a member (i.e. is the third or
19260 fourth element in the list, depending on whether the @code{point} tag is
19261 present) gets focus.
19262
19263 Here's a more complicated example:
19264
19265 @lisp
19266 (article (vertical 1.0 (group 4)
19267                        (summary 0.25 point)
19268                        (if gnus-carpal (summary-carpal 4))
19269                        (article 1.0)))
19270 @end lisp
19271
19272 If the size spec is an integer instead of a floating point number,
19273 then that number will be used to say how many lines a buffer should
19274 occupy, not a percentage.
19275
19276 If the @dfn{split} looks like something that can be @code{eval}ed (to be
19277 precise---if the @code{car} of the split is a function or a subr), this
19278 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
19279 be used as a split.  This means that there will be three buffers if
19280 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
19281 is non-@code{nil}.
19282
19283 Not complicated enough for you?  Well, try this on for size:
19284
19285 @lisp
19286 (article (horizontal 1.0
19287              (vertical 0.5
19288                  (group 1.0)
19289                  (gnus-carpal 4))
19290              (vertical 1.0
19291                  (summary 0.25 point)
19292                  (summary-carpal 4)
19293                  (article 1.0))))
19294 @end lisp
19295
19296 Whoops.  Two buffers with the mystery 100% tag.  And what's that
19297 @code{horizontal} thingie?
19298
19299 If the first element in one of the split is @code{horizontal}, Gnus will
19300 split the window horizontally, giving you two windows side-by-side.
19301 Inside each of these strips you may carry on all you like in the normal
19302 fashion.  The number following @code{horizontal} says what percentage of
19303 the screen is to be given to this strip.
19304
19305 For each split, there @emph{must} be one element that has the 100% tag.
19306 The splitting is never accurate, and this buffer will eat any leftover
19307 lines from the splits.
19308
19309 To be slightly more formal, here's a definition of what a valid split
19310 may look like:
19311
19312 @example
19313 split      = frame | horizontal | vertical | buffer | form
19314 frame      = "(frame " size *split ")"
19315 horizontal = "(horizontal " size *split ")"
19316 vertical   = "(vertical " size *split ")"
19317 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
19318 size       = number | frame-params
19319 buf-name   = group | article | summary ...
19320 @end example
19321
19322 The limitations are that the @code{frame} split can only appear as the
19323 top-level split.  @var{form} should be an Emacs Lisp form that should
19324 return a valid split.  We see that each split is fully recursive, and
19325 may contain any number of @code{vertical} and @code{horizontal} splits.
19326
19327 @vindex gnus-window-min-width
19328 @vindex gnus-window-min-height
19329 @cindex window height
19330 @cindex window width
19331 Finding the right sizes can be a bit complicated.  No window may be less
19332 than @code{gnus-window-min-height} (default 1) characters high, and all
19333 windows must be at least @code{gnus-window-min-width} (default 1)
19334 characters wide.  Gnus will try to enforce this before applying the
19335 splits.  If you want to use the normal Emacs window width/height limit,
19336 you can just set these two variables to @code{nil}.
19337
19338 If you're not familiar with Emacs terminology, @code{horizontal} and
19339 @code{vertical} splits may work the opposite way of what you'd expect.
19340 Windows inside a @code{horizontal} split are shown side-by-side, and
19341 windows within a @code{vertical} split are shown above each other.
19342
19343 @findex gnus-configure-frame
19344 If you want to experiment with window placement, a good tip is to call
19345 @code{gnus-configure-frame} directly with a split.  This is the function
19346 that does all the real work when splitting buffers.  Below is a pretty
19347 nonsensical configuration with 5 windows; two for the group buffer and
19348 three for the article buffer.  (I said it was nonsensical.)  If you
19349 @code{eval} the statement below, you can get an idea of how that would
19350 look straight away, without going through the normal Gnus channels.
19351 Play with it until you're satisfied, and then use
19352 @code{gnus-add-configuration} to add your new creation to the buffer
19353 configuration list.
19354
19355 @lisp
19356 (gnus-configure-frame
19357  '(horizontal 1.0
19358     (vertical 10
19359       (group 1.0)
19360       (article 0.3 point))
19361     (vertical 1.0
19362       (article 1.0)
19363       (horizontal 4
19364         (group 1.0)
19365         (article 10)))))
19366 @end lisp
19367
19368 You might want to have several frames as well.  No prob---just use the
19369 @code{frame} split:
19370
19371 @lisp
19372 (gnus-configure-frame
19373  '(frame 1.0
19374          (vertical 1.0
19375                    (summary 0.25 point frame-focus)
19376                    (article 1.0))
19377          (vertical ((height . 5) (width . 15)
19378                     (user-position . t)
19379                     (left . -1) (top . 1))
19380                    (picon 1.0))))
19381
19382 @end lisp
19383
19384 This split will result in the familiar summary/article window
19385 configuration in the first (or ``main'') frame, while a small additional
19386 frame will be created where picons will be shown.  As you can see,
19387 instead of the normal @code{1.0} top-level spec, each additional split
19388 should have a frame parameter alist as the size spec.
19389 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
19390 Reference Manual}.  Under XEmacs, a frame property list will be
19391 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
19392 is such a plist.
19393 The list of all possible keys for @code{gnus-buffer-configuration} can
19394 be found in its default value.
19395
19396 Note that the @code{message} key is used for both
19397 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
19398 it is desirable to distinguish between the two, something like this
19399 might be used:
19400
19401 @lisp
19402 (message (horizontal 1.0
19403                      (vertical 1.0 (message 1.0 point))
19404                      (vertical 0.24
19405                                (if (buffer-live-p gnus-summary-buffer)
19406                                    '(summary 0.5))
19407                                (group 1.0)))))
19408 @end lisp
19409
19410 One common desire for a multiple frame split is to have a separate frame
19411 for composing mail and news while leaving the original frame intact.  To
19412 accomplish that, something like the following can be done:
19413
19414 @lisp
19415 (message
19416   (frame 1.0
19417          (if (not (buffer-live-p gnus-summary-buffer))
19418              (car (cdr (assoc 'group gnus-buffer-configuration)))
19419            (car (cdr (assoc 'summary gnus-buffer-configuration))))
19420          (vertical ((user-position . t) (top . 1) (left . 1)
19421                     (name . "Message"))
19422                    (message 1.0 point))))
19423 @end lisp
19424
19425 @findex gnus-add-configuration
19426 Since the @code{gnus-buffer-configuration} variable is so long and
19427 complicated, there's a function you can use to ease changing the config
19428 of a single setting: @code{gnus-add-configuration}.  If, for instance,
19429 you want to change the @code{article} setting, you could say:
19430
19431 @lisp
19432 (gnus-add-configuration
19433  '(article (vertical 1.0
19434                (group 4)
19435                (summary .25 point)
19436                (article 1.0))))
19437 @end lisp
19438
19439 You'd typically stick these @code{gnus-add-configuration} calls in your
19440 @file{.gnus.el} file or in some startup hook---they should be run after
19441 Gnus has been loaded.
19442
19443 @vindex gnus-always-force-window-configuration
19444 If all windows mentioned in the configuration are already visible, Gnus
19445 won't change the window configuration.  If you always want to force the
19446 ``right'' window configuration, you can set
19447 @code{gnus-always-force-window-configuration} to non-@code{nil}.
19448
19449 If you're using tree displays (@pxref{Tree Display}), and the tree
19450 window is displayed vertically next to another window, you may also want
19451 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
19452 windows resized.
19453
19454 @subsection Example Window Configurations
19455
19456 @itemize @bullet
19457 @item
19458 Narrow left hand side occupied by group buffer.  Right hand side split
19459 between summary buffer (top one-sixth) and article buffer (bottom).
19460
19461 @ifinfo
19462 @example
19463 +---+---------+
19464 | G | Summary |
19465 | r +---------+
19466 | o |         |
19467 | u | Article |
19468 | p |         |
19469 +---+---------+
19470 @end example
19471 @end ifinfo
19472
19473 @lisp
19474 (gnus-add-configuration
19475  '(article
19476    (horizontal 1.0
19477                (vertical 25 (group 1.0))
19478                (vertical 1.0
19479                          (summary 0.16 point)
19480                          (article 1.0)))))
19481
19482 (gnus-add-configuration
19483  '(summary
19484    (horizontal 1.0
19485                (vertical 25 (group 1.0))
19486                (vertical 1.0 (summary 1.0 point)))))
19487 @end lisp
19488
19489 @end itemize
19490
19491
19492 @node Faces and Fonts
19493 @section Faces and Fonts
19494 @cindex faces
19495 @cindex fonts
19496 @cindex colors
19497
19498 Fiddling with fonts and faces used to be very difficult, but these days
19499 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
19500 the face you want to alter, and alter it via the standard Customize
19501 interface.
19502
19503
19504 @node Compilation
19505 @section Compilation
19506 @cindex compilation
19507 @cindex byte-compilation
19508
19509 @findex gnus-compile
19510
19511 Remember all those line format specification variables?
19512 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
19513 on.  By default, T-gnus will use the byte-compiled codes of these
19514 variables and we can keep a slow-down to a minimum.  However, if you set
19515 @code{gnus-compile-user-specs} to @code{nil} (@code{t} by default),
19516 unfortunately, changing them will mean a quite significant slow-down.
19517 (The default values of these variables have byte-compiled functions
19518 associated with them, while the user-generated versions do not, of
19519 course.)
19520
19521 To help with this, you can run @kbd{M-x gnus-compile} after you've
19522 fiddled around with the variables and feel that you're (kind of)
19523 satisfied.  This will result in the new specs being byte-compiled, and
19524 you'll get top speed again.  Note that T-gnus will not save these
19525 compiled specs in the @file{.newsrc.eld} file.
19526
19527 @table @code
19528 @item gnus-compile-user-specs
19529 @vindex gnus-compile-user-specs
19530 If it is non-nil, the user-defined format specs will be byte-compiled
19531 automatically.  The default value of this variable is @code{t}.  It has
19532 an effect on the values of @code{gnus-*-line-format-spec}.
19533 @end table
19534
19535
19536 @node Mode Lines
19537 @section Mode Lines
19538 @cindex mode lines
19539
19540 @vindex gnus-updated-mode-lines
19541 @code{gnus-updated-mode-lines} says what buffers should keep their mode
19542 lines updated.  It is a list of symbols.  Supported symbols include
19543 @code{group}, @code{article}, @code{summary}, @code{server},
19544 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
19545 Gnus will keep that mode line updated with information that may be
19546 pertinent.  If this variable is @code{nil}, screen refresh may be
19547 quicker.
19548
19549 @cindex display-time
19550
19551 @vindex gnus-mode-non-string-length
19552 By default, Gnus displays information on the current article in the mode
19553 lines of the summary and article buffers.  The information Gnus wishes
19554 to display (e.g. the subject of the article) is often longer than the
19555 mode lines, and therefore have to be cut off at some point.  The
19556 @code{gnus-mode-non-string-length} variable says how long the other
19557 elements on the line is (i.e., the non-info part).  If you put
19558 additional elements on the mode line (e.g. a clock), you should modify
19559 this variable:
19560
19561 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
19562 @lisp
19563 (add-hook 'display-time-hook
19564           (lambda () (setq gnus-mode-non-string-length
19565                            (+ 21
19566                               (if line-number-mode 5 0)
19567                               (if column-number-mode 4 0)
19568                               (length display-time-string)))))
19569 @end lisp
19570
19571 If this variable is @code{nil} (which is the default), the mode line
19572 strings won't be chopped off, and they won't be padded either.  Note
19573 that the default is unlikely to be desirable, as even the percentage
19574 complete in the buffer may be crowded off the mode line; the user should
19575 configure this variable appropriately for her configuration.
19576
19577
19578 @node Highlighting and Menus
19579 @section Highlighting and Menus
19580 @cindex visual
19581 @cindex highlighting
19582 @cindex menus
19583
19584 @vindex gnus-visual
19585 The @code{gnus-visual} variable controls most of the Gnus-prettifying
19586 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
19587 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
19588 file.
19589
19590 This variable can be a list of visual properties that are enabled.  The
19591 following elements are valid, and are all included by default:
19592
19593 @table @code
19594 @item group-highlight
19595 Do highlights in the group buffer.
19596 @item summary-highlight
19597 Do highlights in the summary buffer.
19598 @item article-highlight
19599 Do highlights in the article buffer.
19600 @item highlight
19601 Turn on highlighting in all buffers.
19602 @item group-menu
19603 Create menus in the group buffer.
19604 @item summary-menu
19605 Create menus in the summary buffers.
19606 @item article-menu
19607 Create menus in the article buffer.
19608 @item browse-menu
19609 Create menus in the browse buffer.
19610 @item server-menu
19611 Create menus in the server buffer.
19612 @item score-menu
19613 Create menus in the score buffers.
19614 @item menu
19615 Create menus in all buffers.
19616 @end table
19617
19618 So if you only want highlighting in the article buffer and menus in all
19619 buffers, you could say something like:
19620
19621 @lisp
19622 (setq gnus-visual '(article-highlight menu))
19623 @end lisp
19624
19625 If you want highlighting only and no menus whatsoever, you'd say:
19626
19627 @lisp
19628 (setq gnus-visual '(highlight))
19629 @end lisp
19630
19631 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
19632 in all Gnus buffers.
19633
19634 Other general variables that influence the look of all buffers include:
19635
19636 @table @code
19637 @item gnus-mouse-face
19638 @vindex gnus-mouse-face
19639 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
19640 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
19641
19642 @end table
19643
19644 There are hooks associated with the creation of all the different menus:
19645
19646 @table @code
19647
19648 @item gnus-article-menu-hook
19649 @vindex gnus-article-menu-hook
19650 Hook called after creating the article mode menu.
19651
19652 @item gnus-group-menu-hook
19653 @vindex gnus-group-menu-hook
19654 Hook called after creating the group mode menu.
19655
19656 @item gnus-summary-menu-hook
19657 @vindex gnus-summary-menu-hook
19658 Hook called after creating the summary mode menu.
19659
19660 @item gnus-server-menu-hook
19661 @vindex gnus-server-menu-hook
19662 Hook called after creating the server mode menu.
19663
19664 @item gnus-browse-menu-hook
19665 @vindex gnus-browse-menu-hook
19666 Hook called after creating the browse mode menu.
19667
19668 @item gnus-score-menu-hook
19669 @vindex gnus-score-menu-hook
19670 Hook called after creating the score mode menu.
19671
19672 @end table
19673
19674
19675 @node Buttons
19676 @section Buttons
19677 @cindex buttons
19678 @cindex mouse
19679 @cindex click
19680
19681 Those new-fangled @dfn{mouse} contraptions is very popular with the
19682 young, hep kids who don't want to learn the proper way to do things
19683 these days.  Why, I remember way back in the summer of '89, when I was
19684 using Emacs on a Tops 20 system.  Three hundred users on one single
19685 machine, and every user was running Simula compilers.  Bah!
19686
19687 Right.
19688
19689 @vindex gnus-carpal
19690 Well, you can make Gnus display bufferfuls of buttons you can click to
19691 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
19692 really.  Tell the chiropractor I sent you.
19693
19694
19695 @table @code
19696
19697 @item gnus-carpal-mode-hook
19698 @vindex gnus-carpal-mode-hook
19699 Hook run in all carpal mode buffers.
19700
19701 @item gnus-carpal-button-face
19702 @vindex gnus-carpal-button-face
19703 Face used on buttons.
19704
19705 @item gnus-carpal-header-face
19706 @vindex gnus-carpal-header-face
19707 Face used on carpal buffer headers.
19708
19709 @item gnus-carpal-group-buffer-buttons
19710 @vindex gnus-carpal-group-buffer-buttons
19711 Buttons in the group buffer.
19712
19713 @item gnus-carpal-summary-buffer-buttons
19714 @vindex gnus-carpal-summary-buffer-buttons
19715 Buttons in the summary buffer.
19716
19717 @item gnus-carpal-server-buffer-buttons
19718 @vindex gnus-carpal-server-buffer-buttons
19719 Buttons in the server buffer.
19720
19721 @item gnus-carpal-browse-buffer-buttons
19722 @vindex gnus-carpal-browse-buffer-buttons
19723 Buttons in the browse buffer.
19724 @end table
19725
19726 All the @code{buttons} variables are lists.  The elements in these list
19727 are either cons cells where the @code{car} contains a text to be displayed and
19728 the @code{cdr} contains a function symbol, or a simple string.
19729
19730
19731 @node Daemons
19732 @section Daemons
19733 @cindex demons
19734 @cindex daemons
19735
19736 Gnus, being larger than any program ever written (allegedly), does lots
19737 of strange stuff that you may wish to have done while you're not
19738 present.  For instance, you may want it to check for new mail once in a
19739 while.  Or you may want it to close down all connections to all servers
19740 when you leave Emacs idle.  And stuff like that.
19741
19742 Gnus will let you do stuff like that by defining various
19743 @dfn{handlers}.  Each handler consists of three elements:  A
19744 @var{function}, a @var{time}, and an @var{idle} parameter.
19745
19746 Here's an example of a handler that closes connections when Emacs has
19747 been idle for thirty minutes:
19748
19749 @lisp
19750 (gnus-demon-close-connections nil 30)
19751 @end lisp
19752
19753 Here's a handler that scans for PGP headers every hour when Emacs is
19754 idle:
19755
19756 @lisp
19757 (gnus-demon-scan-pgp 60 t)
19758 @end lisp
19759
19760 This @var{time} parameter and than @var{idle} parameter work together
19761 in a strange, but wonderful fashion.  Basically, if @var{idle} is
19762 @code{nil}, then the function will be called every @var{time} minutes.
19763
19764 If @var{idle} is @code{t}, then the function will be called after
19765 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
19766 the function will never be called.  But once Emacs goes idle, the
19767 function will be called every @var{time} minutes.
19768
19769 If @var{idle} is a number and @var{time} is a number, the function will
19770 be called every @var{time} minutes only when Emacs has been idle for
19771 @var{idle} minutes.
19772
19773 If @var{idle} is a number and @var{time} is @code{nil}, the function
19774 will be called once every time Emacs has been idle for @var{idle}
19775 minutes.
19776
19777 And if @var{time} is a string, it should look like @samp{07:31}, and
19778 the function will then be called once every day somewhere near that
19779 time.  Modified by the @var{idle} parameter, of course.
19780
19781 @vindex gnus-demon-timestep
19782 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
19783 seconds.  This is 60 by default.  If you change that variable,
19784 all the timings in the handlers will be affected.)
19785
19786 So, if you want to add a handler, you could put something like this in
19787 your @file{.gnus} file:
19788
19789 @findex gnus-demon-add-handler
19790 @lisp
19791 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
19792 @end lisp
19793
19794 @findex gnus-demon-add-nocem
19795 @findex gnus-demon-add-scanmail
19796 @findex gnus-demon-add-rescan
19797 @findex gnus-demon-add-scan-timestamps
19798 @findex gnus-demon-add-disconnection
19799 Some ready-made functions to do this have been created:
19800 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
19801 @code{gnus-demon-add-nntp-close-connection},
19802 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
19803 @code{gnus-demon-add-scanmail}.  Just put those functions in your
19804 @file{.gnus} if you want those abilities.
19805
19806 @findex gnus-demon-init
19807 @findex gnus-demon-cancel
19808 @vindex gnus-demon-handlers
19809 If you add handlers to @code{gnus-demon-handlers} directly, you should
19810 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
19811 daemons, you can use the @code{gnus-demon-cancel} function.
19812
19813 Note that adding daemons can be pretty naughty if you over do it.  Adding
19814 functions that scan all news and mail from all servers every two seconds
19815 is a sure-fire way of getting booted off any respectable system.  So
19816 behave.
19817
19818
19819 @node NoCeM
19820 @section NoCeM
19821 @cindex nocem
19822 @cindex spam
19823
19824 @dfn{Spamming} is posting the same article lots and lots of times.
19825 Spamming is bad.  Spamming is evil.
19826
19827 Spamming is usually canceled within a day or so by various anti-spamming
19828 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
19829 NoCeM is pronounced ``no see-'em'', and means what the name
19830 implies---these are messages that make the offending articles, like, go
19831 away.
19832
19833 What use are these NoCeM messages if the articles are canceled anyway?
19834 Some sites do not honor cancel messages and some sites just honor cancels
19835 from a select few people.  Then you may wish to make use of the NoCeM
19836 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
19837
19838 Gnus can read and parse the messages in this group automatically, and
19839 this will make spam disappear.
19840
19841 There are some variables to customize, of course:
19842
19843 @table @code
19844 @item gnus-use-nocem
19845 @vindex gnus-use-nocem
19846 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
19847 by default.
19848
19849 @item gnus-nocem-groups
19850 @vindex gnus-nocem-groups
19851 Gnus will look for NoCeM messages in the groups in this list.  The
19852 default is @code{("news.lists.filters" "news.admin.net-abuse.bulletins"
19853 "alt.nocem.misc" "news.admin.net-abuse.announce")}.
19854
19855 @item gnus-nocem-issuers
19856 @vindex gnus-nocem-issuers
19857 There are many people issuing NoCeM messages.  This list says what
19858 people you want to listen to.  The default is @code{("Automoose-1"
19859 "clewis@@ferret.ocunix.on.ca" "cosmo.roadkill" "SpamHippo"
19860 "hweede@@snafu.de")}; fine, upstanding citizens all of them.
19861
19862 Known despammers that you can put in this list are listed at
19863 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
19864
19865 You do not have to heed NoCeM messages from all these people---just the
19866 ones you want to listen to.  You also don't have to accept all NoCeM
19867 messages from the people you like.  Each NoCeM message has a @dfn{type}
19868 header that gives the message a (more or less, usually less) rigorous
19869 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
19870 @samp{binary}, and @samp{troll}.  To specify this, you have to use
19871 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
19872 Each condition is either a string (which is a regexp that matches types
19873 you want to use) or a list on the form @code{(not @var{string})}, where
19874 @var{string} is a regexp that matches types you don't want to use.
19875
19876 For instance, if you want all NoCeM messages from Chris Lewis except his
19877 @samp{troll} messages, you'd say:
19878
19879 @lisp
19880 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
19881 @end lisp
19882
19883 On the other hand, if you just want nothing but his @samp{spam} and
19884 @samp{spew} messages, you'd say:
19885
19886 @lisp
19887 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
19888 @end lisp
19889
19890 The specs are applied left-to-right.
19891
19892
19893 @item gnus-nocem-verifyer
19894 @vindex gnus-nocem-verifyer
19895 @findex mc-verify
19896 This should be a function for verifying that the NoCeM issuer is who she
19897 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
19898 function.  If this is too slow and you don't care for verification
19899 (which may be dangerous), you can set this variable to @code{nil}.
19900
19901 If you want signed NoCeM messages to be verified and unsigned messages
19902 not to be verified (but used anyway), you could do something like:
19903
19904 @lisp
19905 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
19906
19907 (defun my-gnus-mc-verify ()
19908   (not (eq 'forged
19909            (ignore-errors
19910              (if (mc-verify)
19911                  t
19912                'forged)))))
19913 @end lisp
19914
19915 This might be dangerous, though.
19916
19917 @item gnus-nocem-directory
19918 @vindex gnus-nocem-directory
19919 This is where Gnus will store its NoCeM cache files.  The default is
19920 @file{~/News/NoCeM/}.
19921
19922 @item gnus-nocem-expiry-wait
19923 @vindex gnus-nocem-expiry-wait
19924 The number of days before removing old NoCeM entries from the cache.
19925 The default is 15.  If you make it shorter Gnus will be faster, but you
19926 might then see old spam.
19927
19928 @item gnus-nocem-check-from
19929 @vindex gnus-nocem-check-from
19930 Non-@code{nil} means check for valid issuers in message bodies.
19931 Otherwise don't bother fetching articles unless their author matches a
19932 valid issuer; that is much faster if you are selective about the
19933 issuers.
19934
19935 @item gnus-nocem-check-article-limit
19936 @vindex gnus-nocem-check-article-limit
19937 If non-@code{nil}, the maximum number of articles to check in any NoCeM
19938 group.  NoCeM groups can be huge and very slow to process.
19939
19940 @end table
19941
19942 Using NoCeM could potentially be a memory hog.  If you have many living
19943 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
19944 big.  If this is a problem, you should kill off all (or most) of your
19945 unsubscribed groups (@pxref{Subscription Commands}).
19946
19947
19948 @node Undo
19949 @section Undo
19950 @cindex undo
19951
19952 It is very useful to be able to undo actions one has done.  In normal
19953 Emacs buffers, it's easy enough---you just push the @code{undo} button.
19954 In Gnus buffers, however, it isn't that simple.
19955
19956 The things Gnus displays in its buffer is of no value whatsoever to
19957 Gnus---it's all just data designed to look nice to the user.
19958 Killing a group in the group buffer with @kbd{C-k} makes the line
19959 disappear, but that's just a side-effect of the real action---the
19960 removal of the group in question from the internal Gnus structures.
19961 Undoing something like that can't be done by the normal Emacs
19962 @code{undo} function.
19963
19964 Gnus tries to remedy this somewhat by keeping track of what the user
19965 does and coming up with actions that would reverse the actions the user
19966 takes.  When the user then presses the @code{undo} key, Gnus will run
19967 the code to reverse the previous action, or the previous actions.
19968 However, not all actions are easily reversible, so Gnus currently offers
19969 a few key functions to be undoable.  These include killing groups,
19970 yanking groups, and changing the list of read articles of groups.
19971 That's it, really.  More functions may be added in the future, but each
19972 added function means an increase in data to be stored, so Gnus will
19973 never be totally undoable.
19974
19975 @findex gnus-undo-mode
19976 @vindex gnus-use-undo
19977 @findex gnus-undo
19978 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
19979 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
19980 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
19981 command, which should feel kinda like the normal Emacs @code{undo}
19982 command.
19983
19984
19985 @node Predicate Specifiers
19986 @section Predicate Specifiers
19987 @cindex predicate specifiers
19988
19989 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
19990 form that allows flexible specification of predicates without having
19991 to type all that much.
19992
19993 These specifiers are lists consisting of functions, symbols and lists.
19994
19995 Here's an example:
19996
19997 @lisp
19998 (or gnus-article-unseen-p
19999     gnus-article-unread-p)
20000 @end lisp
20001
20002 The available symbols are @code{or}, @code{and} and @code{not}.  The
20003 functions all take one parameter.
20004
20005 @findex gnus-make-predicate
20006 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
20007 to create a function that can be called.  This input parameter to this
20008 function will be passed along to all the functions in the predicate
20009 specifier. 
20010
20011
20012 @node Moderation
20013 @section Moderation
20014 @cindex moderation
20015
20016 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
20017 It is not included in the standard Gnus package.  Write a mail to
20018 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
20019 get a copy.
20020
20021 The moderation package is implemented as a minor mode for summary
20022 buffers.  Put
20023
20024 @lisp
20025 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
20026 @end lisp
20027
20028 in your @file{.gnus.el} file.
20029
20030 If you are the moderator of @samp{rec.zoofle}, this is how it's
20031 supposed to work:
20032
20033 @enumerate
20034 @item
20035 You split your incoming mail by matching on
20036 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
20037 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
20038
20039 @item
20040 You enter that group once in a while and post articles using the @kbd{e}
20041 (edit-and-post) or @kbd{s} (just send unedited) commands.
20042
20043 @item
20044 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
20045 articles that weren't approved by you, you can cancel them with the
20046 @kbd{c} command.
20047 @end enumerate
20048
20049 To use moderation mode in these two groups, say:
20050
20051 @lisp
20052 (setq gnus-moderated-list
20053       "^nnml:rec.zoofle$\\|^rec.zoofle$")
20054 @end lisp
20055
20056
20057 @node Image Enhancements
20058 @section Image Enhancements
20059
20060 XEmacs, as well as Emacs 21, is able to display pictures and stuff, so
20061 Gnus has taken advantage of that.
20062
20063 @menu
20064 * Picons::                      How to display pictures of what you're reading.
20065 * Smileys::                     Show all those happy faces the way they were meant to be shown.
20066 * X-Face::                      Display a funky, teensy black-and-white image.
20067 * Toolbar::                     Click'n'drool.
20068 * XVarious::                    Other XEmacsy Gnusey variables.
20069 @end menu
20070
20071
20072 @node Picons
20073 @subsection Picons
20074
20075 @iftex
20076 @iflatex
20077 \include{picons}
20078 @end iflatex
20079 @end iftex
20080
20081 So@dots{}  You want to slow down your news reader even more!  This is a
20082 good way to do so.  Its also a great way to impress people staring
20083 over your shoulder as you read news.
20084
20085 @menu
20086 * Picon Basics::                What are picons and How do I get them.
20087 * Picon Requirements::          Don't go further if you aren't using XEmacs.
20088 * Easy Picons::                 Displaying Picons---the easy way.
20089 * Hard Picons::                 The way you should do it.  You'll learn something.
20090 * Picon Useless Configuration::  Other variables you can trash/tweak/munge/play with.
20091 @end menu
20092
20093
20094 @node Picon Basics
20095 @subsubsection Picon Basics
20096
20097 What are Picons?  To quote directly from the Picons Web site:
20098
20099 @iftex
20100 @iflatex
20101 \margindex{}
20102 @end iflatex
20103 @end iftex
20104
20105 @quotation
20106 @dfn{Picons} is short for ``personal icons''.  They're small,
20107 constrained images used to represent users and domains on the net,
20108 organized into databases so that the appropriate image for a given
20109 e-mail address can be found.  Besides users and domains, there are picon
20110 databases for Usenet newsgroups and weather forecasts.  The picons are
20111 in either monochrome @code{XBM} format or color @code{XPM} and
20112 @code{GIF} formats.
20113 @end quotation
20114
20115 @vindex gnus-picons-piconsearch-url
20116 If you have a permanent connection to the Internet you can use Steve
20117 Kinzler's Picons Search engine by setting
20118 @code{gnus-picons-piconsearch-url} to the string @*
20119 @uref{http://www.cs.indiana.edu/picons/search.html}.
20120
20121 @vindex gnus-picons-database
20122 Otherwise you need a local copy of his database.  For instructions on
20123 obtaining and installing the picons databases, point your Web browser at @*
20124 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.  Gnus expects
20125 picons to be installed into a location pointed to by
20126 @code{gnus-picons-database}.
20127
20128 If you are using Debian GNU/Linux, saying @samp{apt-get install
20129 picons.*} will install the picons where Gnus can find them.
20130
20131
20132 @node Picon Requirements
20133 @subsubsection Picon Requirements
20134
20135 To have Gnus display Picons for you, you must have @code{x} support
20136 compiled into XEmacs.  To display color picons which are much nicer
20137 than the black & white one, you also need one of @code{xpm} or
20138 @code{gif} compiled into XEmacs.
20139
20140 @vindex gnus-picons-convert-x-face
20141 If you want to display faces from @code{X-Face} headers, you should have
20142 the @code{xface} support compiled into XEmacs.  Otherwise you must have
20143 the @code{netpbm} utilities installed, or munge the
20144 @code{gnus-picons-convert-x-face} variable to use something else.
20145 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20146
20147 @node Easy Picons
20148 @subsubsection Easy Picons
20149
20150 To enable displaying picons, simply put the following line in your
20151 @file{~/.gnus} file and start Gnus.
20152
20153 @lisp
20154 (setq gnus-use-picons t)
20155 (setq gnus-treat-display-picons t)
20156 @end lisp
20157
20158 and make sure @code{gnus-picons-database} points to the directory
20159 containing the Picons databases.
20160
20161 Alternatively if you want to use the web piconsearch engine add this:
20162
20163 @lisp
20164 (setq gnus-picons-piconsearch-url
20165       "http://www.cs.indiana.edu:800/piconsearch")
20166 @end lisp
20167
20168
20169 @node Hard Picons
20170 @subsubsection Hard Picons
20171
20172 @iftex
20173 @iflatex
20174 \margindex{}
20175 @end iflatex
20176 @end iftex
20177
20178 Gnus can display picons for you as you enter and leave groups and
20179 articles.  It knows how to interact with three sections of the picons
20180 database.  Namely, it can display the picons newsgroup pictures,
20181 author's face picture(s), and the authors domain.  To enable this
20182 feature, you need to select where to get the picons from, and where to
20183 display them.
20184
20185 @table @code
20186
20187 @item gnus-picons-database
20188 @vindex gnus-picons-database
20189 The location of the picons database.  Should point to a directory
20190 containing the @file{news}, @file{domains}, @file{users} (and so on)
20191 subdirectories.  This is only useful if
20192 @code{gnus-picons-piconsearch-url} is @code{nil}.  Defaults to
20193 @file{/usr/local/faces/}.
20194
20195 @item gnus-picons-piconsearch-url
20196 @vindex gnus-picons-piconsearch-url
20197 The URL for the web picons search engine.  The only currently known
20198 engine is @uref{http://www.cs.indiana.edu:800/piconsearch}.  To
20199 workaround network delays, icons will be fetched in the background.  If
20200 this is @code{nil} 'the default), then picons are fetched from local
20201 database indicated by @code{gnus-picons-database}.
20202
20203 @item gnus-picons-display-where
20204 @vindex gnus-picons-display-where
20205 Where the picon images should be displayed.  It is @code{picons} by
20206 default (which by default maps to the buffer @samp{*Picons*}).  Other
20207 valid places could be @code{article}, @code{summary}, or
20208 @samp{*scratch*} for all I care.  Just make sure that you've made the
20209 buffer visible using the standard Gnus window configuration
20210 routines---@pxref{Window Layout}.
20211
20212 @item gnus-picons-group-excluded-groups
20213 @vindex gnus-picons-group-excluded-groups
20214 Groups that are matched by this regexp won't have their group icons
20215 displayed.
20216
20217 @end table
20218
20219 Note: If you set @code{gnus-use-picons} to @code{t}, it will set up your
20220 window configuration for you to include the @code{picons} buffer.
20221
20222 Now that you've made those decision, you need to add the following
20223 functions to the appropriate hooks so these pictures will get displayed
20224 at the right time.
20225
20226 @vindex gnus-picons-display-where
20227 @table @code
20228 @item gnus-article-display-picons
20229 @findex gnus-article-display-picons
20230 Looks up and displays the picons for the author and the author's domain
20231 in the @code{gnus-picons-display-where} buffer.
20232
20233 @item gnus-picons-article-display-x-face
20234 @findex gnus-picons-article-display-x-face
20235 Decodes and displays the X-Face header if present.
20236 (NOTE: @code{x-face} is used in the function name, not @code{xface})
20237
20238 @end table
20239
20240
20241
20242 @node Picon Useless Configuration
20243 @subsubsection Picon Useless Configuration
20244
20245 @iftex
20246 @iflatex
20247 \margindex{}
20248 @end iflatex
20249 @end iftex
20250
20251 The following variables offer further control over how things are
20252 done, where things are located, and other useless stuff you really
20253 don't need to worry about.
20254
20255 @table @code
20256
20257 @item gnus-picons-news-directories
20258 @vindex gnus-picons-news-directories
20259 List of subdirectories to search in @code{gnus-picons-database} for
20260 newsgroups faces.  @code{("news")} is the default.
20261
20262 @item gnus-picons-user-directories
20263 @vindex gnus-picons-user-directories
20264 List of subdirectories to search in @code{gnus-picons-database} for user
20265 faces.  @code{("local" "users" "usenix" "misc")} is the default.
20266
20267 @item gnus-picons-domain-directories
20268 @vindex gnus-picons-domain-directories
20269 List of subdirectories to search in @code{gnus-picons-database} for
20270 domain name faces.  Defaults to @code{("domains")}.  Some people may
20271 want to add @samp{"unknown"} to this list.
20272
20273 @item gnus-picons-convert-x-face
20274 @vindex gnus-picons-convert-x-face
20275 If you don't have @code{xface} support builtin XEmacs, this is the
20276 command to use to convert the @code{X-Face} header to an X bitmap
20277 (@code{xbm}).  Defaults to @code{(format "@{ echo '/* Width=48,
20278 Height=48 */'; uncompface; @} | icontopbm | pbmtoxbm > %s"
20279 gnus-picons-x-face-file-name)}
20280 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20281
20282 @item gnus-picons-x-face-file-name
20283 @vindex gnus-picons-x-face-file-name
20284 Names a temporary file to store the @code{X-Face} bitmap in.  Defaults
20285 to @code{(format "/tmp/picon-xface.%s.xbm" (user-login-name))}.
20286 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20287
20288 @item gnus-picons-has-modeline-p
20289 @vindex gnus-picons-has-modeline-p
20290 If you have set @code{gnus-picons-display-where} to @code{picons}, your
20291 XEmacs frame will become really cluttered.  To alleviate this a bit you
20292 can set @code{gnus-picons-has-modeline-p} to @code{nil}; this will
20293 remove the mode line from the Picons buffer.  This is only useful if
20294 @code{gnus-picons-display-where} is @code{picons}.
20295
20296 @item gnus-picons-refresh-before-display
20297 @vindex gnus-picons-refresh-before-display
20298 If non-nil, display the article buffer before computing the picons.
20299 Defaults to @code{nil}.
20300
20301 @item gnus-picons-display-as-address
20302 @vindex gnus-picons-display-as-address
20303 If @code{t} display textual email addresses along with pictures.
20304 Defaults to @code{t}.
20305
20306 @item gnus-picons-file-suffixes
20307 @vindex gnus-picons-file-suffixes
20308 Ordered list of suffixes on picon file names to try.  Defaults to
20309 @code{("xpm" "gif" "xbm")} minus those not builtin your XEmacs.
20310
20311 @item gnus-picons-setup-hook
20312 @vindex gnus-picons-setup-hook
20313 Hook run in the picon buffer, if that is displayed.
20314
20315 @item gnus-picons-display-article-move-p
20316 @vindex gnus-picons-display-article-move-p
20317 Whether to move point to first empty line when displaying picons.  This
20318 has only an effect if `gnus-picons-display-where' has value `article'.
20319
20320 If @code{nil}, display the picons in the @code{From} and
20321 @code{Newsgroups} lines.  This is the default.
20322
20323 @item gnus-picons-clear-cache-on-shutdown
20324 @vindex gnus-picons-clear-cache-on-shutdown
20325 Whether to clear the picons cache when exiting gnus.  Gnus caches every
20326 picons it finds while it is running.  This saves some time in the search
20327 process but eats some memory.  If this variable is set to @code{nil},
20328 Gnus will never clear the cache itself; you will have to manually call
20329 @code{gnus-picons-clear-cache} to clear it.  Otherwise the cache will be
20330 cleared every time you exit Gnus.  Defaults to @code{t}.
20331
20332 @iftex
20333 @iflatex
20334 \margindex{}
20335 @end iflatex
20336 @end iftex
20337
20338 @end table
20339
20340 @node Smileys
20341 @subsection Smileys
20342 @cindex smileys
20343
20344 @iftex
20345 @iflatex
20346 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
20347 \input{smiley}
20348 @end iflatex
20349 @end iftex
20350
20351 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
20352 currently the only package that uses Smiley, it is documented here.
20353
20354 In short---to use Smiley in Gnus, put the following in your
20355 @file{.gnus.el} file:
20356
20357 @lisp
20358 (setq gnus-treat-display-smileys t)
20359 @end lisp
20360
20361 Smiley maps text smiley faces---@samp{:-)}, @samp{:-=}, @samp{:-(} and
20362 the like---to pictures and displays those instead of the text smiley
20363 faces.  The conversion is controlled by a list of regexps that matches
20364 text and maps that to file names.
20365
20366 @vindex smiley-nosey-regexp-alist
20367 @vindex smiley-deformed-regexp-alist
20368 Smiley supplies two example conversion alists by default:
20369 @code{smiley-deformed-regexp-alist} (which matches @samp{:)}, @samp{:(}
20370 and so on), and @code{smiley-nosey-regexp-alist} (which matches
20371 @samp{:-)}, @samp{:-(} and so on).
20372
20373 The alist used is specified by the @code{smiley-regexp-alist} variable,
20374 which defaults to the value of @code{smiley-deformed-regexp-alist}.
20375
20376 The first item in each element is the regexp to be matched; the second
20377 element is the regexp match group that is to be replaced by the picture;
20378 and the third element is the name of the file to be displayed.
20379
20380 The following variables customize where Smiley will look for these
20381 files, as well as the color to be used and stuff:
20382
20383 @table @code
20384
20385 @item smiley-data-directory
20386 @vindex smiley-data-directory
20387 Where Smiley will look for smiley faces files.
20388
20389 @item smiley-flesh-color
20390 @vindex smiley-flesh-color
20391 Skin color.  The default is @samp{yellow}, which is really racist.
20392
20393 @item smiley-features-color
20394 @vindex smiley-features-color
20395 Color of the features of the face.  The default is @samp{black}.
20396
20397 @item smiley-tongue-color
20398 @vindex smiley-tongue-color
20399 Color of the tongue.  The default is @samp{red}.
20400
20401 @item smiley-circle-color
20402 @vindex smiley-circle-color
20403 Color of the circle around the face.  The default is @samp{black}.
20404
20405 @item smiley-mouse-face
20406 @vindex smiley-mouse-face
20407 Face used for mouse highlighting over the smiley face.
20408
20409 @end table
20410
20411
20412 @node X-Face
20413 @subsection X-Face
20414 @cindex x-face
20415
20416 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
20417 depth) image that's supposed to represent the author of the message.
20418 It seems to be supported by an ever-growing number of mail and news
20419 readers.
20420
20421 @cindex x-face
20422 @findex gnus-article-display-x-face
20423 @findex gnus-article-x-face-command
20424 @vindex gnus-article-x-face-command
20425 @vindex gnus-article-x-face-too-ugly
20426 @iftex
20427 @iflatex
20428 \include{xface}
20429 @end iflatex
20430 @end iftex
20431 @c @anchor{X-Face}
20432
20433 Decoding an @code{X-Face} header either requires an Emacs that has
20434 @samp{compface} support (which most XEmacs versions has), or that you
20435 have @samp{compface} installed on your system.  If either is true,
20436 Gnus will default to displaying @code{X-Face} headers.
20437
20438 The variable that controls this is the
20439 @code{gnus-article-x-face-command} variable.  If this variable is a
20440 string, this string will be executed in a sub-shell.  If it is a
20441 function, this function will be called with the face as the argument.
20442 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
20443 the @code{From} header, the face will not be shown.
20444
20445 The default action under Emacs 20 is to fork off the @code{display}
20446 program@footnote{@code{display} is from the ImageMagick package.  For
20447 the @code{uncompface} and @code{icontopbm} programs look for a package
20448 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
20449 view the face.
20450
20451 Under XEmacs or Emacs 21+ with suitable image support, the default
20452 action is to display the face before the @code{From} header.  (It's
20453 nicer if XEmacs has been compiled with @code{X-Face} support---that
20454 will make display somewhat faster.  If there's no native @code{X-Face}
20455 support, Gnus will try to convert the @code{X-Face} header using
20456 external programs from the @code{pbmplus} package and
20457 friends.@footnote{On a GNU/Linux system look for packages with names
20458 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
20459
20460 (NOTE: @code{x-face} is used in the variable/function names, not
20461 @code{xface}).
20462
20463 Gnus provides a few convenience functions and variables to allow
20464 easier insertion of X-Face headers in outgoing messages.
20465
20466 @findex gnus-random-x-face
20467 @code{gnus-random-x-face} goes through all the @samp{pbm} files
20468 in @code{gnus-x-face-directory} and picks one at random, and then
20469 converts it to the X-Face format by using the
20470 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
20471 @samp{pbm} files should be 48x48 pixels big.
20472
20473 @code{gnus-x-face-from-file} takes a file as the parameter, and then
20474 converts the file to X-Face format by using the
20475 @code{gnus-convert-image-to-x-face-command} shell command.
20476
20477 Here's how you would typically use the former function.  Put something
20478 like the folllowing in your @file{.gnus.el} file:
20479
20480 @lisp
20481 (setq message-required-news-headers
20482       (nconc message-required-news-headers
20483              (list '(X-Face . gnus-random-x-face))))
20484 @end lisp
20485
20486 Using the latter function would be something like this:
20487
20488 @lisp
20489 (setq message-required-news-headers
20490       (nconc message-required-news-headers
20491              (list '(X-Face . (lambda ()
20492                                 (gnus-x-face-from-file
20493                                  "~/My-face.gif"))))))
20494 @end lisp
20495
20496
20497 @node Toolbar
20498 @subsection Toolbar
20499
20500 @table @code
20501
20502 @iftex
20503 @iflatex
20504 \margindex{}
20505 @end iflatex
20506 @end iftex
20507
20508 @item gnus-use-toolbar
20509 @vindex gnus-use-toolbar
20510 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
20511 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
20512 @code{right-toolbar}, or @code{left-toolbar}.
20513
20514 @item gnus-group-toolbar
20515 @vindex gnus-group-toolbar
20516 The toolbar in the group buffer.
20517
20518 @item gnus-summary-toolbar
20519 @vindex gnus-summary-toolbar
20520 The toolbar in the summary buffer.
20521
20522 @item gnus-summary-mail-toolbar
20523 @vindex gnus-summary-mail-toolbar
20524 The toolbar in the summary buffer of mail groups.
20525
20526 @end table
20527
20528
20529 @node XVarious
20530 @subsection Various XEmacs Variables
20531
20532 @table @code
20533 @item gnus-xmas-glyph-directory
20534 @vindex gnus-xmas-glyph-directory
20535 This is where Gnus will look for pictures.  Gnus will normally
20536 auto-detect this directory, but you may set it manually if you have an
20537 unusual directory structure.
20538
20539 @item gnus-xmas-logo-color-alist
20540 @vindex gnus-xmas-logo-color-alist
20541 This is an alist where the key is a type symbol and the values are the
20542 foreground and background color of the splash page glyph.
20543
20544 @item gnus-xmas-logo-color-style
20545 @vindex gnus-xmas-logo-color-style
20546 This is the key used to look up the color in the alist described above.
20547 Valid values include @code{flame}, @code{pine}, @code{moss},
20548 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
20549 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
20550
20551 @item gnus-xmas-modeline-glyph
20552 @vindex gnus-xmas-modeline-glyph
20553 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
20554 default.
20555
20556 @iftex
20557 @iflatex
20558 \margindex{}
20559 @end iflatex
20560 @end iftex
20561
20562 @end table
20563
20564
20565
20566
20567 @node Fuzzy Matching
20568 @section Fuzzy Matching
20569 @cindex fuzzy matching
20570
20571 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
20572 things like scoring, thread gathering and thread comparison.
20573
20574 As opposed to regular expression matching, fuzzy matching is very fuzzy.
20575 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
20576 means, and the implementation has changed over time.
20577
20578 Basically, it tries to remove all noise from lines before comparing.
20579 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
20580 out of the strings before comparing the results.  This often leads to
20581 adequate results---even when faced with strings generated by text
20582 manglers masquerading as newsreaders.
20583
20584
20585 @node Thwarting Email Spam
20586 @section Thwarting Email Spam
20587 @cindex email spam
20588 @cindex spam
20589 @cindex UCE
20590 @cindex unsolicited commercial email
20591
20592 In these last days of the Usenet, commercial vultures are hanging about
20593 and grepping through news like crazy to find email addresses they can
20594 foist off their scams and products to.  As a reaction to this, many
20595 people have started putting nonsense addresses into their @code{From}
20596 lines.  I think this is counterproductive---it makes it difficult for
20597 people to send you legitimate mail in response to things you write, as
20598 well as making it difficult to see who wrote what.  This rewriting may
20599 perhaps be a bigger menace than the unsolicited commercial email itself
20600 in the end.
20601
20602 The biggest problem I have with email spam is that it comes in under
20603 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
20604 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
20605 mail group, only to find two pyramid schemes, seven advertisements
20606 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
20607 and one mail asking me to repent and find some god.
20608
20609 This is annoying.
20610
20611 The way to deal with this is having Gnus split out all spam into a
20612 @samp{spam} mail group (@pxref{Splitting Mail}).
20613
20614 First, pick one (1) valid mail address that you can be reached at, and
20615 put it in your @code{From} header of all your news articles.  (I've
20616 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
20617 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
20618 sysadmin whether your sendmail installation accepts keywords in the local
20619 part of the mail address.)
20620
20621 @lisp
20622 (setq message-default-news-headers
20623       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
20624 @end lisp
20625
20626 Then put the following split rule in @code{nnmail-split-fancy}
20627 (@pxref{Fancy Mail Splitting}):
20628
20629 @lisp
20630 (
20631  ...
20632  (to "larsi@@trym.ifi.uio.no"
20633       (| ("subject" "re:.*" "misc")
20634          ("references" ".*@@.*" "misc")
20635          "spam"))
20636  ...
20637 )
20638 @end lisp
20639
20640 This says that all mail to this address is suspect, but if it has a
20641 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
20642 header, it's probably ok.  All the rest goes to the @samp{spam} group.
20643 (This idea probably comes from Tim Pierce.)
20644
20645 In addition, many mail spammers talk directly to your @sc{smtp} server
20646 and do not include your email address explicitly in the @code{To}
20647 header.  Why they do this is unknown---perhaps it's to thwart this
20648 thwarting scheme?  In any case, this is trivial to deal with---you just
20649 put anything not addressed to you in the @samp{spam} group by ending
20650 your fancy split rule in this way:
20651
20652 @lisp
20653 (
20654  ...
20655  (to "larsi" "misc")
20656  "spam")
20657 @end lisp
20658
20659 In my experience, this will sort virtually everything into the right
20660 group.  You still have to check the @samp{spam} group from time to time to
20661 check for legitimate mail, though.  If you feel like being a good net
20662 citizen, you can even send off complaints to the proper authorities on
20663 each unsolicited commercial email---at your leisure.
20664
20665 If you are also a lazy net citizen, you will probably prefer complaining
20666 automatically with the @file{gnus-junk.el} package, available FOR FREE
20667 at @* @uref{http://stud2.tuwien.ac.at/~e9426626/gnus-junk.html}.
20668 Since most e-mail spam is sent automatically, this may reconcile the
20669 cosmic balance somewhat.
20670
20671 This works for me.  It allows people an easy way to contact me (they can
20672 just press @kbd{r} in the usual way), and I'm not bothered at all with
20673 spam.  It's a win-win situation.  Forging @code{From} headers to point
20674 to non-existent domains is yucky, in my opinion.
20675
20676
20677 @node Various Various
20678 @section Various Various
20679 @cindex mode lines
20680 @cindex highlights
20681
20682 @table @code
20683
20684 @item gnus-home-directory
20685 All Gnus path variables will be initialized from this variable, which
20686 defaults to @file{~/}.
20687
20688 @item gnus-directory
20689 @vindex gnus-directory
20690 Most Gnus storage path variables will be initialized from this variable,
20691 which defaults to the @samp{SAVEDIR} environment variable, or
20692 @file{~/News/} if that variable isn't set.
20693
20694 Note that gnus is mostly loaded when the @file{.gnus.el} file is read.
20695 This means that other directory variables that are initialized from this
20696 variable won't be set properly if you set this variable in
20697 @file{.gnus.el}.  Set this variable in @file{.emacs} instead.
20698
20699 @item gnus-default-directory
20700 @vindex gnus-default-directory
20701 Not related to the above variable at all---this variable says what the
20702 default directory of all Gnus buffers should be.  If you issue commands
20703 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
20704 default directory.  If this variable is @code{nil} (which is the
20705 default), the default directory will be the default directory of the
20706 buffer you were in when you started Gnus.
20707
20708 @item gnus-verbose
20709 @vindex gnus-verbose
20710 This variable is an integer between zero and ten.  The higher the value,
20711 the more messages will be displayed.  If this variable is zero, Gnus
20712 will never flash any messages, if it is seven (which is the default),
20713 most important messages will be shown, and if it is ten, Gnus won't ever
20714 shut up, but will flash so many messages it will make your head swim.
20715
20716 @item gnus-verbose-backends
20717 @vindex gnus-verbose-backends
20718 This variable works the same way as @code{gnus-verbose}, but it applies
20719 to the Gnus back ends instead of Gnus proper.
20720
20721 @item nnheader-max-head-length
20722 @vindex nnheader-max-head-length
20723 When the back ends read straight heads of articles, they all try to read
20724 as little as possible.  This variable (default 4096) specifies
20725 the absolute max length the back ends will try to read before giving up
20726 on finding a separator line between the head and the body.  If this
20727 variable is @code{nil}, there is no upper read bound.  If it is
20728 @code{t}, the back ends won't try to read the articles piece by piece,
20729 but read the entire articles.  This makes sense with some versions of
20730 @code{ange-ftp} or @code{efs}.
20731
20732 @item nnheader-head-chop-length
20733 @vindex nnheader-head-chop-length
20734 This variable (default 2048) says how big a piece of each article to
20735 read when doing the operation described above.
20736
20737 @item nnheader-file-name-translation-alist
20738 @vindex nnheader-file-name-translation-alist
20739 @cindex file names
20740 @cindex invalid characters in file names
20741 @cindex characters in file names
20742 This is an alist that says how to translate characters in file names.
20743 For instance, if @samp{:} is invalid as a file character in file names
20744 on your system (you OS/2 user you), you could say something like:
20745
20746 @lisp
20747 (setq nnheader-file-name-translation-alist
20748       '((?: . ?_)))
20749 @end lisp
20750
20751 In fact, this is the default value for this variable on OS/2 and MS
20752 Windows (phooey) systems.
20753
20754 @item gnus-hidden-properties
20755 @vindex gnus-hidden-properties
20756 This is a list of properties to use to hide ``invisible'' text.  It is
20757 @code{(invisible t intangible t)} by default on most systems, which
20758 makes invisible text invisible and intangible.
20759
20760 @item gnus-parse-headers-hook
20761 @vindex gnus-parse-headers-hook
20762 A hook called before parsing headers.  It can be used, for instance, to
20763 gather statistics on the headers fetched, or perhaps you'd like to prune
20764 some headers.  I don't see why you'd want that, though.
20765
20766 @item gnus-shell-command-separator
20767 @vindex gnus-shell-command-separator
20768 String used to separate two shell commands.  The default is @samp{;}.
20769
20770 @item gnus-invalid-group-regexp
20771 @vindex gnus-invalid-group-regexp
20772
20773 Regexp to match ``invalid'' group names when querying user for a group
20774 name.  The default value catches some @strong{really} invalid group
20775 names who could possibly mess up Gnus internally (like allowing
20776 @samp{:} in a group name, which is normally used to delimit method and
20777 group).
20778
20779 @sc{imap} users might want to allow @samp{/} in group names though.
20780
20781
20782 @end table
20783
20784 @node The End
20785 @chapter The End
20786
20787 Well, that's the manual---you can get on with your life now.  Keep in
20788 touch.  Say hello to your cats from me.
20789
20790 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
20791
20792 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
20793
20794 @quotation
20795 @strong{Te Deum}
20796
20797 @sp 1
20798 Not because of victories @*
20799 I sing,@*
20800 having none,@*
20801 but for the common sunshine,@*
20802 the breeze,@*
20803 the largess of the spring.
20804
20805 @sp 1
20806 Not for victory@*
20807 but for the day's work done@*
20808 as well as I was able;@*
20809 not for a seat upon the dais@*
20810 but at the common table.@*
20811 @end quotation
20812
20813
20814 @node Appendices
20815 @chapter Appendices
20816
20817 @menu
20818 * XEmacs::                      Requirements for installing under XEmacs.
20819 * History::                     How Gnus got where it is today.
20820 * On Writing Manuals::          Why this is not a beginner's guide.
20821 * Terminology::                 We use really difficult, like, words here.
20822 * Customization::               Tailoring Gnus to your needs.
20823 * Troubleshooting::             What you might try if things do not work.
20824 * Gnus Reference Guide::        Rilly, rilly technical stuff.
20825 * Emacs for Heathens::          A short introduction to Emacsian terms.
20826 * Frequently Asked Questions::
20827 @end menu
20828
20829
20830 @node XEmacs
20831 @section XEmacs
20832 @cindex XEmacs
20833 @cindex Installing under XEmacs
20834
20835 XEmacs is distributed as a collection of packages.  You should install
20836 whatever packages the Gnus XEmacs package requires.  The current
20837 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
20838 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
20839 @samp{xemacs-base}, and @samp{fsf-compat}.
20840
20841
20842 @node History
20843 @section History
20844
20845 @cindex history
20846 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
20847 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
20848
20849 If you want to investigate the person responsible for this outrage,
20850 you can point your (feh!) web browser to
20851 @uref{http://quimby.gnus.org/}.  This is also the primary
20852 distribution point for the new and spiffy versions of Gnus, and is
20853 known as The Site That Destroys Newsrcs And Drives People Mad.
20854
20855 During the first extended alpha period of development, the new Gnus was
20856 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
20857 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
20858 (Besides, the ``Gnus'' in this abbreviation should probably be
20859 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
20860 appropriate name, don't you think?)
20861
20862 In any case, after spending all that energy on coming up with a new and
20863 spunky name, we decided that the name was @emph{too} spunky, so we
20864 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
20865 ``@sc{gnus}''.  New vs. old.
20866
20867 @menu
20868 * Gnus Versions::               What Gnus versions have been released.
20869 * Other Gnus Versions::         Other Gnus versions that also have been released.
20870 * Why?::                        What's the point of Gnus?
20871 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
20872 * Conformity::                  Gnus tries to conform to all standards.
20873 * Emacsen::                     Gnus can be run on a few modern Emacsen.
20874 * Gnus Development::            How Gnus is developed.
20875 * Contributors::                Oodles of people.
20876 * New Features::                Pointers to some of the new stuff in Gnus.
20877 @end menu
20878
20879
20880 @node Gnus Versions
20881 @subsection Gnus Versions
20882 @cindex ding Gnus
20883 @cindex September Gnus
20884 @cindex Red Gnus
20885 @cindex Quassia Gnus
20886 @cindex Pterodactyl Gnus
20887 @cindex Oort Gnus
20888 @cindex No Gnus
20889
20890 The first ``proper'' release of Gnus 5 was done in November 1995 when it
20891 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
20892 plus 15 Gnus 5.0 releases).
20893
20894 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
20895 releases)) was released under the name ``Gnus 5.2'' (40 releases).
20896
20897 On July 28th 1996 work on Red Gnus was begun, and it was released on
20898 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
20899
20900 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
20901 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
20902
20903 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
20904 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
20905 1999.
20906
20907 On the 26th of October 2000, Oort Gnus was begun.
20908
20909 If you happen upon a version of Gnus that has a prefixed name --
20910 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
20911 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
20912 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
20913 run.  Walk away, calmly, until you're out of its reach.  Find a proper
20914 released version of Gnus and snuggle up to that instead.
20915
20916
20917 @node Other Gnus Versions
20918 @subsection Other Gnus Versions
20919 @cindex Semi-gnus
20920
20921 In addition to the versions of Gnus which have had their releases
20922 coordinated by Lars, one major development has been Semi-gnus from
20923 Japan.  It's based on a library called @sc{semi}, which provides
20924 @sc{mime} capabilities.
20925
20926 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
20927 Collectively, they are called ``Semi-gnus'', and different strains are
20928 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
20929 @sc{mime} and multilingualization things, especially important for
20930 Japanese users.
20931
20932
20933 @node Why?
20934 @subsection Why?
20935
20936 What's the point of Gnus?
20937
20938 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
20939 newsreader, that lets you do anything you can think of.  That was my
20940 original motivation, but while working on Gnus, it has become clear to
20941 me that this generation of newsreaders really belong in the stone age.
20942 Newsreaders haven't developed much since the infancy of the net.  If the
20943 volume continues to rise with the current rate of increase, all current
20944 newsreaders will be pretty much useless.  How do you deal with
20945 newsgroups that have thousands of new articles each day?  How do you
20946 keep track of millions of people who post?
20947
20948 Gnus offers no real solutions to these questions, but I would very much
20949 like to see Gnus being used as a testing ground for new methods of
20950 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
20951 to separate the newsreader from the back ends, Gnus now offers a simple
20952 interface for anybody who wants to write new back ends for fetching mail
20953 and news from different sources.  I have added hooks for customizations
20954 everywhere I could imagine it being useful.  By doing so, I'm inviting
20955 every one of you to explore and invent.
20956
20957 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
20958 @kbd{C-u 100 M-x all-hail-xemacs}.
20959
20960
20961 @node Compatibility
20962 @subsection Compatibility
20963
20964 @cindex compatibility
20965 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
20966 bindings have been kept.  More key bindings have been added, of course,
20967 but only in one or two obscure cases have old bindings been changed.
20968
20969 Our motto is:
20970 @quotation
20971 @cartouche
20972 @center In a cloud bones of steel.
20973 @end cartouche
20974 @end quotation
20975
20976 All commands have kept their names.  Some internal functions have changed
20977 their names.
20978
20979 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
20980 Articles}.
20981
20982 One major compatibility question is the presence of several summary
20983 buffers.  All variables relevant while reading a group are
20984 buffer-local to the summary buffer they belong in.  Although many
20985 important variables have their values copied into their global
20986 counterparts whenever a command is executed in the summary buffer, this
20987 change might lead to incorrect values being used unless you are careful.
20988
20989 All code that relies on knowledge of @sc{gnus} internals will probably
20990 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
20991 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
20992 maintains a hash table that points to the entries in this alist (which
20993 speeds up many functions), and changing the alist directly will lead to
20994 peculiar results.
20995
20996 @cindex hilit19
20997 @cindex highlighting
20998 Old hilit19 code does not work at all.  In fact, you should probably
20999 remove all hilit code from all Gnus hooks
21000 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
21001 Gnus provides various integrated functions for highlighting.  These are
21002 faster and more accurate.  To make life easier for everybody, Gnus will
21003 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
21004 Away!
21005
21006 Packages like @code{expire-kill} will no longer work.  As a matter of
21007 fact, you should probably remove all old @sc{gnus} packages (and other
21008 code) when you start using Gnus.  More likely than not, Gnus already
21009 does what you have written code to make @sc{gnus} do.  (Snicker.)
21010
21011 Even though old methods of doing things are still supported, only the
21012 new methods are documented in this manual.  If you detect a new method of
21013 doing something while reading this manual, that does not mean you have
21014 to stop doing it the old way.
21015
21016 Gnus understands all @sc{gnus} startup files.
21017
21018 @kindex M-x gnus-bug
21019 @findex gnus-bug
21020 @cindex reporting bugs
21021 @cindex bugs
21022 Overall, a casual user who hasn't written much code that depends on
21023 @sc{gnus} internals should suffer no problems.  If problems occur,
21024 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
21025
21026 @vindex gnus-bug-create-help-buffer
21027 If you are in the habit of sending bug reports @emph{very} often, you
21028 may find the helpful help buffer annoying after a while.  If so, set
21029 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
21030 up at you.
21031
21032
21033 @node Conformity
21034 @subsection Conformity
21035
21036 No rebels without a clue here, ma'am.  We conform to all standards known
21037 to (wo)man.  Except for those standards and/or conventions we disagree
21038 with, of course.
21039
21040 @table @strong
21041
21042 @item RFC (2)822
21043 @cindex RFC 822
21044 @cindex RFC 2822
21045 There are no known breaches of this standard.
21046
21047 @item RFC 1036
21048 @cindex RFC 1036
21049 There are no known breaches of this standard, either.
21050
21051 @item Son-of-RFC 1036
21052 @cindex Son-of-RFC 1036
21053 We do have some breaches to this one.
21054
21055 @table @emph
21056
21057 @item X-Newsreader
21058 @itemx User-Agent
21059 These are considered to be ``vanity headers'', while I consider them
21060 to be consumer information.  After seeing so many badly formatted
21061 articles coming from @code{tin} and @code{Netscape} I know not to use
21062 either of those for posting articles.  I would not have known that if
21063 it wasn't for the @code{X-Newsreader} header.
21064 @end table
21065
21066 @item USEFOR
21067 @cindex USEFOR
21068 USEFOR is an IETF working group writing a successor to RFC 1036, based
21069 on Son-of-RFC 1036.  They have produced a number of drafts proposing
21070 various changes to the format of news articles.  The Gnus towers will
21071 look into implementing the changes when the draft is accepted as an RFC.
21072
21073 @item MIME - RFC 2045-2049 etc
21074 @cindex MIME
21075 All the various @sc{mime} RFCs are supported.
21076
21077 @item Disposition Notifications - RFC 2298
21078 Message Mode is able to request notifications from the receiver.
21079
21080 @item PGP - RFC 1991 and RFC 2440
21081 @cindex RFC 1991
21082 @cindex RFC 2440
21083 RFC 1991 is the original PGP message specification, published as a
21084 Information RFC.  RFC 2440 was the follow-up, now called Open PGP, and
21085 put on the Standards Track.  Both document a non-@sc{mime} aware PGP
21086 format.  Gnus supports both encoding (signing and encryption) and
21087 decoding (verification and decryption).
21088
21089 @item PGP/MIME - RFC 2015/3156
21090 RFC 2015 (superceded by 3156 which references RFC 2440 instead of RFC
21091 1991) describes the @sc{mime}-wrapping around the RF 1991/2440 format.
21092 Gnus supports both encoding and decoding.
21093
21094 @item S/MIME - RFC 2633
21095 RFC 2633 describes the @sc{s/mime} format.
21096
21097 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
21098 RFC 1730 is @sc{imap} version 4, updated somewhat by RFC 2060 (@sc{imap} 4
21099 revision 1).  RFC 2195 describes CRAM-MD5 authentication for @sc{imap}. RFC
21100 2086 describes access control lists (ACLs) for @sc{imap}. RFC 2359
21101 describes a @sc{imap} protocol enhancement.  RFC 2595 describes the proper
21102 TLS integration (STARTTLS) with @sc{imap}.  RFC 1731 describes the
21103 GSSAPI/Kerberos4 mechanisms for @sc{imap}.
21104
21105 @end table
21106
21107 If you ever notice Gnus acting non-compliant with regards to the texts
21108 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
21109 know.
21110
21111
21112 @node Emacsen
21113 @subsection Emacsen
21114 @cindex Emacsen
21115 @cindex XEmacs
21116 @cindex Mule
21117 @cindex Emacs
21118
21119 Gnus should work on :
21120
21121 @itemize @bullet
21122
21123 @item
21124 Emacs 20.3 and up.
21125
21126 @item
21127 XEmacs 21.1.1 and up.
21128
21129 @end itemize
21130
21131 This Gnus version will absolutely not work on any Emacsen older than
21132 that.  Not reliably, at least.  Older versions of Gnus may work on older
21133 Emacs versions.  However, T-gnus does support ``Mule 2.3 based on Emacs
21134 19.34'' and possibly the versions of XEmacs prior to 21.1.1, e.g. 20.4.
21135 See the file ``README'' in the T-gnus distribution for more details.
21136
21137 There are some vague differences between Gnus on the various
21138 platforms---XEmacs features more graphics (a logo and a toolbar)---but
21139 other than that, things should look pretty much the same under all
21140 Emacsen.
21141
21142
21143 @node Gnus Development
21144 @subsection Gnus Development
21145
21146 Gnus is developed in a two-phased cycle.  The first phase involves much
21147 discussion on the @samp{ding@@gnus.org} mailing list, where people
21148 propose changes and new features, post patches and new back ends.  This
21149 phase is called the @dfn{alpha} phase, since the Gnusae released in this
21150 phase are @dfn{alpha releases}, or (perhaps more commonly in other
21151 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
21152 unstable and should not be used by casual users.  Gnus alpha releases
21153 have names like ``Red Gnus'' and ``Quassia Gnus''.
21154
21155 After futzing around for 50-100 alpha releases, Gnus is declared
21156 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
21157 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
21158 supposed to be able to use these, and these are mostly discussed on the
21159 @samp{gnu.emacs.gnus} newsgroup.
21160
21161 @cindex Incoming*
21162 @vindex mail-source-delete-incoming
21163 Some variable defaults differ between alpha Gnusae and released Gnusae.
21164 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
21165 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
21166 lossage of mail if an alpha release hiccups while handling the mail.
21167
21168 The division of discussion between the ding mailing list and the Gnus
21169 newsgroup is not purely based on publicity concerns.  It's true that
21170 having people write about the horrible things that an alpha Gnus release
21171 can do (sometimes) in a public forum may scare people off, but more
21172 importantly, talking about new experimental features that have been
21173 introduced may confuse casual users.  New features are frequently
21174 introduced, fiddled with, and judged to be found wanting, and then
21175 either discarded or totally rewritten.  People reading the mailing list
21176 usually keep up with these rapid changes, while people on the newsgroup
21177 can't be assumed to do so.
21178
21179
21180
21181 @node Contributors
21182 @subsection Contributors
21183 @cindex contributors
21184
21185 The new Gnus version couldn't have been done without the help of all the
21186 people on the (ding) mailing list.  Every day for over a year I have
21187 gotten billions of nice bug reports from them, filling me with joy,
21188 every single one of them.  Smooches.  The people on the list have been
21189 tried beyond endurance, what with my ``oh, that's a neat idea <type
21190 type>, yup, I'll release it right away <ship off> no wait, that doesn't
21191 work at all <type type>, yup, I'll ship that one off right away <ship
21192 off> no, wait, that absolutely does not work'' policy for releases.
21193 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
21194 ``worser''? ``much worser''?  ``worsest''?)
21195
21196 I would like to take this opportunity to thank the Academy for...  oops,
21197 wrong show.
21198
21199 @itemize @bullet
21200
21201 @item
21202 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
21203
21204 @item
21205 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
21206 nnwarchive and many, many other things connected with @sc{mime} and
21207 other types of en/decoding, as well as general bug fixing, new
21208 functionality and stuff.
21209
21210 @item
21211 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
21212 well as numerous other things).
21213
21214 @item
21215 Luis Fernandes---design and graphics.
21216
21217 @item
21218 Joe Reiss---creator of the smiley faces.
21219
21220 @item
21221 Justin Sheehy--the FAQ maintainer.
21222
21223 @item
21224 Erik Naggum---help, ideas, support, code and stuff.
21225
21226 @item
21227 Wes Hardaker---@file{gnus-picon.el} and the manual section on
21228 @dfn{picons} (@pxref{Picons}).
21229
21230 @item
21231 Kim-Minh Kaplan---further work on the picon code.
21232
21233 @item
21234 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
21235 (@pxref{GroupLens}).
21236
21237 @item
21238 Sudish Joseph---innumerable bug fixes.
21239
21240 @item
21241 Ilja Weis---@file{gnus-topic.el}.
21242
21243 @item
21244 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
21245
21246 @item
21247 Vladimir Alexiev---the refcard and reference booklets.
21248
21249 @item
21250 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
21251 distribution by Felix Lee and JWZ.
21252
21253 @item
21254 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
21255
21256 @item
21257 Peter Mutsaers---orphan article scoring code.
21258
21259 @item
21260 Ken Raeburn---POP mail support.
21261
21262 @item
21263 Hallvard B Furuseth---various bits and pieces, especially dealing with
21264 .newsrc files.
21265
21266 @item
21267 Brian Edmonds---@file{gnus-bbdb.el}.
21268
21269 @item
21270 David Moore---rewrite of @file{nnvirtual.el} and many other things.
21271
21272 @item
21273 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
21274
21275 @item
21276 François Pinard---many, many interesting and thorough bug reports, as
21277 well as autoconf support.
21278
21279 @end itemize
21280
21281 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
21282 Borges, and Jost Krieger proof-reading parts of the manual.
21283
21284 The following people have contributed many patches and suggestions:
21285
21286 Christopher Davis,
21287 Andrew Eskilsson,
21288 Kai Grossjohann,
21289 David KÃ¥gedal,
21290 Richard Pieri,
21291 Fabrice Popineau,
21292 Daniel Quinlan,
21293 Jason L. Tibbitts, III,
21294 and
21295 Jack Vinson.
21296
21297 Also thanks to the following for patches and stuff:
21298
21299 Jari Aalto,
21300 Adrian Aichner,
21301 Vladimir Alexiev,
21302 Russ Allbery,
21303 Peter Arius,
21304 Matt Armstrong,
21305 Marc Auslander,
21306 Miles Bader,
21307 Alexei V. Barantsev,
21308 Frank Bennett,
21309 Robert Bihlmeyer,
21310 Chris Bone,
21311 Mark Borges,
21312 Mark Boyns,
21313 Lance A. Brown,
21314 Rob Browning,
21315 Kees de Bruin,
21316 Martin Buchholz,
21317 Joe Buehler,
21318 Kevin Buhr,
21319 Alastair Burt,
21320 Joao Cachopo,
21321 Zlatko Calusic,
21322 Massimo Campostrini,
21323 Castor,
21324 David Charlap,
21325 Dan Christensen,
21326 Kevin Christian,
21327 Jae-you Chung, @c ?
21328 James H. Cloos, Jr.,
21329 Laura Conrad,
21330 Michael R. Cook,
21331 Glenn Coombs,
21332 Andrew J. Cosgriff,
21333 Neil Crellin,
21334 Frank D. Cringle,
21335 Geoffrey T. Dairiki,
21336 Andre Deparade,
21337 Ulrik Dickow,
21338 Dave Disser,
21339 Rui-Tao Dong, @c ?
21340 Joev Dubach,
21341 Michael Welsh Duggan,
21342 Dave Edmondson,
21343 Paul Eggert,
21344 Mark W. Eichin,
21345 Karl Eichwalder,
21346 Enami Tsugutomo, @c Enami
21347 Michael Ernst,
21348 Luc Van Eycken,
21349 Sam Falkner,
21350 Nelson Jose dos Santos Ferreira,
21351 Sigbjorn Finne,
21352 Sven Fischer,
21353 Paul Fisher,
21354 Decklin Foster,
21355 Gary D. Foster,
21356 Paul Franklin,
21357 Guy Geens,
21358 Arne Georg Gleditsch,
21359 David S. Goldberg,
21360 Michelangelo Grigni,
21361 Dale Hagglund,
21362 D. Hall,
21363 Magnus Hammerin,
21364 Kenichi Handa, @c Handa
21365 Raja R. Harinath,
21366 Yoshiki Hayashi, @c ?
21367 P. E. Jareth Hein,
21368 Hisashige Kenji, @c Hisashige
21369 Scott Hofmann,
21370 Marc Horowitz,
21371 Gunnar Horrigmo,
21372 Richard Hoskins,
21373 Brad Howes,
21374 Miguel de Icaza,
21375 François Felix Ingrand,
21376 Tatsuya Ichikawa, @c ?
21377 Ishikawa Ichiro, @c Ishikawa
21378 Lee Iverson,
21379 Iwamuro Motonori, @c Iwamuro
21380 Rajappa Iyer,
21381 Andreas Jaeger,
21382 Adam P. Jenkins,
21383 Randell Jesup,
21384 Fred Johansen,
21385 Gareth Jones,
21386 Simon Josefsson,
21387 Greg Klanderman,
21388 Karl Kleinpaste,
21389 Michael Klingbeil,
21390 Peter Skov Knudsen,
21391 Shuhei Kobayashi, @c Kobayashi
21392 Petr Konecny,
21393 Koseki Yoshinori, @c Koseki
21394 Thor Kristoffersen,
21395 Jens Lautenbacher,
21396 Martin Larose,
21397 Seokchan Lee, @c Lee
21398 Joerg Lenneis,
21399 Carsten Leonhardt,
21400 James LewisMoss,
21401 Christian Limpach,
21402 Markus Linnala,
21403 Dave Love,
21404 Mike McEwan,
21405 Tonny Madsen,
21406 Shlomo Mahlab,
21407 Nat Makarevitch,
21408 Istvan Marko,
21409 David Martin,
21410 Jason R. Mastaler,
21411 Gordon Matzigkeit,
21412 Timo Metzemakers,
21413 Richard Mlynarik,
21414 Lantz Moore,
21415 Morioka Tomohiko, @c Morioka
21416 Erik Toubro Nielsen,
21417 Hrvoje Niksic,
21418 Andy Norman,
21419 Fred Oberhauser,
21420 C. R. Oldham,
21421 Alexandre Oliva,
21422 Ken Olstad,
21423 Masaharu Onishi, @c Onishi
21424 Hideki Ono, @c Ono
21425 Ettore Perazzoli,
21426 William Perry,
21427 Stephen Peters,
21428 Jens-Ulrik Holger Petersen,
21429 Ulrich Pfeifer,
21430 Matt Pharr,
21431 Andy Piper,
21432 John McClary Prevost,
21433 Bill Pringlemeir,
21434 Mike Pullen,
21435 Jim Radford,
21436 Colin Rafferty,
21437 Lasse Rasinen,
21438 Lars Balker Rasmussen,
21439 Joe Reiss,
21440 Renaud Rioboo,
21441 Roland B. Roberts,
21442 Bart Robinson,
21443 Christian von Roques,
21444 Markus Rost,
21445 Jason Rumney,
21446 Wolfgang Rupprecht,
21447 Jay Sachs,
21448 Dewey M. Sasser,
21449 Conrad Sauerwald,
21450 Loren Schall,
21451 Dan Schmidt,
21452 Ralph Schleicher,
21453 Philippe Schnoebelen,
21454 Andreas Schwab,
21455 Randal L. Schwartz,
21456 Danny Siu,
21457 Matt Simmons,
21458 Paul D. Smith,
21459 Jeff Sparkes,
21460 Toby Speight,
21461 Michael Sperber,
21462 Darren Stalder,
21463 Richard Stallman,
21464 Greg Stark,
21465 Sam Steingold,
21466 Paul Stevenson,
21467 Jonas Steverud,
21468 Paul Stodghill,
21469 Kiyokazu Suto, @c Suto
21470 Kurt Swanson,
21471 Samuel Tardieu,
21472 Teddy,
21473 Chuck Thompson,
21474 Tozawa Akihiko, @c Tozawa
21475 Philippe Troin,
21476 James Troup,
21477 Trung Tran-Duc,
21478 Jack Twilley,
21479 Aaron M. Ucko,
21480 Aki Vehtari,
21481 Didier Verna,
21482 Vladimir Volovich,
21483 Jan Vroonhof,
21484 Stefan Waldherr,
21485 Pete Ware,
21486 Barry A. Warsaw,
21487 Christoph Wedler,
21488 Joe Wells,
21489 Lee Willis,
21490 Katsumi Yamaoka @c Yamaoka
21491 and
21492 Lloyd Zusman.
21493
21494
21495 For a full overview of what each person has done, the ChangeLogs
21496 included in the Gnus alpha distributions should give ample reading
21497 (550kB and counting).
21498
21499 Apologies to everybody that I've forgotten, of which there are many, I'm
21500 sure.
21501
21502 Gee, that's quite a list of people.  I guess that must mean that there
21503 actually are people who are using Gnus.  Who'd'a thunk it!
21504
21505
21506 @node New Features
21507 @subsection New Features
21508 @cindex new features
21509
21510 @menu
21511 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
21512 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
21513 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
21514 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
21515 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
21516 @end menu
21517
21518 These lists are, of course, just @emph{short} overviews of the
21519 @emph{most} important new features.  No, really.  There are tons more.
21520 Yes, we have feeping creaturism in full effect.
21521
21522 @node ding Gnus
21523 @subsubsection (ding) Gnus
21524
21525 New features in Gnus 5.0/5.1:
21526
21527 @itemize @bullet
21528
21529 @item
21530 The look of all buffers can be changed by setting format-like variables
21531 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
21532
21533 @item
21534 Local spool and several @sc{nntp} servers can be used at once
21535 (@pxref{Select Methods}).
21536
21537 @item
21538 You can combine groups into virtual groups (@pxref{Virtual Groups}).
21539
21540 @item
21541 You can read a number of different mail formats (@pxref{Getting Mail}).
21542 All the mail back ends implement a convenient mail expiry scheme
21543 (@pxref{Expiring Mail}).
21544
21545 @item
21546 Gnus can use various strategies for gathering threads that have lost
21547 their roots (thereby gathering loose sub-threads into one thread) or it
21548 can go back and retrieve enough headers to build a complete thread
21549 (@pxref{Customizing Threading}).
21550
21551 @item
21552 Killed groups can be displayed in the group buffer, and you can read
21553 them as well (@pxref{Listing Groups}).
21554
21555 @item
21556 Gnus can do partial group updates---you do not have to retrieve the
21557 entire active file just to check for new articles in a few groups
21558 (@pxref{The Active File}).
21559
21560 @item
21561 Gnus implements a sliding scale of subscribedness to groups
21562 (@pxref{Group Levels}).
21563
21564 @item
21565 You can score articles according to any number of criteria
21566 (@pxref{Scoring}).  You can even get Gnus to find out how to score
21567 articles for you (@pxref{Adaptive Scoring}).
21568
21569 @item
21570 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
21571 manner, so it should be difficult to lose much data on what you have
21572 read if your machine should go down (@pxref{Auto Save}).
21573
21574 @item
21575 Gnus now has its own startup file (@file{.gnus}) to avoid cluttering up
21576 the @file{.emacs} file.
21577
21578 @item
21579 You can set the process mark on both groups and articles and perform
21580 operations on all the marked items (@pxref{Process/Prefix}).
21581
21582 @item
21583 You can grep through a subset of groups and create a group from the
21584 results (@pxref{Kibozed Groups}).
21585
21586 @item
21587 You can list subsets of groups according to, well, anything
21588 (@pxref{Listing Groups}).
21589
21590 @item
21591 You can browse foreign servers and subscribe to groups from those
21592 servers (@pxref{Browse Foreign Server}).
21593
21594 @item
21595 Gnus can fetch articles, asynchronously, on a second connection to the
21596 server (@pxref{Asynchronous Fetching}).
21597
21598 @item
21599 You can cache articles locally (@pxref{Article Caching}).
21600
21601 @item
21602 The uudecode functions have been expanded and generalized
21603 (@pxref{Decoding Articles}).
21604
21605 @item
21606 You can still post uuencoded articles, which was a little-known feature
21607 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
21608
21609 @item
21610 Fetching parents (and other articles) now actually works without
21611 glitches (@pxref{Finding the Parent}).
21612
21613 @item
21614 Gnus can fetch FAQs and group descriptions (@pxref{Group Information}).
21615
21616 @item
21617 Digests (and other files) can be used as the basis for groups
21618 (@pxref{Document Groups}).
21619
21620 @item
21621 Articles can be highlighted and customized (@pxref{Customizing
21622 Articles}).
21623
21624 @item
21625 URLs and other external references can be buttonized (@pxref{Article
21626 Buttons}).
21627
21628 @item
21629 You can do lots of strange stuff with the Gnus window & frame
21630 configuration (@pxref{Window Layout}).
21631
21632 @item
21633 You can click on buttons instead of using the keyboard
21634 (@pxref{Buttons}).
21635
21636 @end itemize
21637
21638
21639 @node September Gnus
21640 @subsubsection September Gnus
21641
21642 @iftex
21643 @iflatex
21644 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
21645 @end iflatex
21646 @end iftex
21647
21648 New features in Gnus 5.2/5.3:
21649
21650 @itemize @bullet
21651
21652 @item
21653 A new message composition mode is used.  All old customization variables
21654 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
21655 now obsolete.
21656
21657 @item
21658 Gnus is now able to generate @dfn{sparse} threads---threads where
21659 missing articles are represented by empty nodes (@pxref{Customizing
21660 Threading}).
21661
21662 @lisp
21663 (setq gnus-build-sparse-threads 'some)
21664 @end lisp
21665
21666 @item
21667 Outgoing articles are stored on a special archive server
21668 (@pxref{Archived Messages}).
21669
21670 @item
21671 Partial thread regeneration now happens when articles are
21672 referred.
21673
21674 @item
21675 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
21676
21677 @item
21678 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
21679
21680 @item
21681 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
21682
21683 @lisp
21684 (setq gnus-use-trees t)
21685 @end lisp
21686
21687 @item
21688 An @code{nn}-like pick-and-read minor mode is available for the summary
21689 buffers (@pxref{Pick and Read}).
21690
21691 @lisp
21692 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
21693 @end lisp
21694
21695 @item
21696 In binary groups you can use a special binary minor mode (@pxref{Binary
21697 Groups}).
21698
21699 @item
21700 Groups can be grouped in a folding topic hierarchy (@pxref{Group
21701 Topics}).
21702
21703 @lisp
21704 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
21705 @end lisp
21706
21707 @item
21708 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
21709
21710 @item
21711 Groups can now have a score, and bubbling based on entry frequency
21712 is possible (@pxref{Group Score}).
21713
21714 @lisp
21715 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
21716 @end lisp
21717
21718 @item
21719 Groups can be process-marked, and commands can be performed on
21720 groups of groups (@pxref{Marking Groups}).
21721
21722 @item
21723 Caching is possible in virtual groups.
21724
21725 @item
21726 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
21727 news batches, ClariNet briefs collections, and just about everything
21728 else (@pxref{Document Groups}).
21729
21730 @item
21731 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
21732 (@pxref{SOUP}).
21733
21734 @item
21735 The Gnus cache is much faster.
21736
21737 @item
21738 Groups can be sorted according to many criteria (@pxref{Sorting
21739 Groups}).
21740
21741 @item
21742 New group parameters have been introduced to set list-addresses and
21743 expiry times (@pxref{Group Parameters}).
21744
21745 @item
21746 All formatting specs allow specifying faces to be used
21747 (@pxref{Formatting Fonts}).
21748
21749 @item
21750 There are several more commands for setting/removing/acting on process
21751 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
21752
21753 @item
21754 The summary buffer can be limited to show parts of the available
21755 articles based on a wide range of criteria.  These commands have been
21756 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
21757
21758 @item
21759 Articles can be made persistent with the @kbd{*} command
21760 (@pxref{Persistent Articles}).
21761
21762 @item
21763 All functions for hiding article elements are now toggles.
21764
21765 @item
21766 Article headers can be buttonized (@pxref{Article Washing}).
21767
21768 @item
21769 All mail back ends support fetching articles by @code{Message-ID}.
21770
21771 @item
21772 Duplicate mail can now be treated properly (@pxref{Duplicates}).
21773
21774 @item
21775 All summary mode commands are available directly from the article
21776 buffer (@pxref{Article Keymap}).
21777
21778 @item
21779 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
21780 Layout}).
21781
21782 @item
21783 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
21784 @iftex
21785 @iflatex
21786 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
21787 @end iflatex
21788 @end iftex
21789
21790 @item
21791 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
21792
21793 @lisp
21794 (setq gnus-use-nocem t)
21795 @end lisp
21796
21797 @item
21798 Groups can be made permanently visible (@pxref{Listing Groups}).
21799
21800 @lisp
21801 (setq gnus-permanently-visible-groups "^nnml:")
21802 @end lisp
21803
21804 @item
21805 Many new hooks have been introduced to make customizing easier.
21806
21807 @item
21808 Gnus respects the @code{Mail-Copies-To} header.
21809
21810 @item
21811 Threads can be gathered by looking at the @code{References} header
21812 (@pxref{Customizing Threading}).
21813
21814 @lisp
21815 (setq gnus-summary-thread-gathering-function
21816       'gnus-gather-threads-by-references)
21817 @end lisp
21818
21819 @item
21820 Read articles can be stored in a special backlog buffer to avoid
21821 refetching (@pxref{Article Backlog}).
21822
21823 @lisp
21824 (setq gnus-keep-backlog 50)
21825 @end lisp
21826
21827 @item
21828 A clean copy of the current article is always stored in a separate
21829 buffer to allow easier treatment.
21830
21831 @item
21832 Gnus can suggest where to save articles (@pxref{Saving Articles}).
21833
21834 @item
21835 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
21836 Articles}).
21837
21838 @lisp
21839 (setq gnus-prompt-before-saving t)
21840 @end lisp
21841
21842 @item
21843 @code{gnus-uu} can view decoded files asynchronously while fetching
21844 articles (@pxref{Other Decode Variables}).
21845
21846 @lisp
21847 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
21848 @end lisp
21849
21850 @item
21851 Filling in the article buffer now works properly on cited text
21852 (@pxref{Article Washing}).
21853
21854 @item
21855 Hiding cited text adds buttons to toggle hiding, and how much
21856 cited text to hide is now customizable (@pxref{Article Hiding}).
21857
21858 @lisp
21859 (setq gnus-cited-lines-visible 2)
21860 @end lisp
21861
21862 @item
21863 Boring headers can be hidden (@pxref{Article Hiding}).
21864
21865 @item
21866 Default scoring values can now be set from the menu bar.
21867
21868 @item
21869 Further syntax checking of outgoing articles have been added.
21870
21871 @end itemize
21872
21873
21874 @node Red Gnus
21875 @subsubsection Red Gnus
21876
21877 New features in Gnus 5.4/5.5:
21878
21879 @iftex
21880 @iflatex
21881 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
21882 @end iflatex
21883 @end iftex
21884
21885 @itemize @bullet
21886
21887 @item
21888 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
21889
21890 @item
21891 Article prefetching functionality has been moved up into
21892 Gnus (@pxref{Asynchronous Fetching}).
21893
21894 @item
21895 Scoring can now be performed with logical operators like @code{and},
21896 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
21897 Scoring}).
21898
21899 @item
21900 Article washing status can be displayed in the
21901 article mode line (@pxref{Misc Article}).
21902
21903 @item
21904 @file{gnus.el} has been split into many smaller files.
21905
21906 @item
21907 Suppression of duplicate articles based on Message-ID can be done
21908 (@pxref{Duplicate Suppression}).
21909
21910 @lisp
21911 (setq gnus-suppress-duplicates t)
21912 @end lisp
21913
21914 @item
21915 New variables for specifying what score and adapt files are to be
21916 considered home score and adapt files (@pxref{Home Score File}) have
21917 been added.
21918
21919 @item
21920 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
21921 Server Internals}).
21922
21923 @item
21924 Groups can inherit group parameters from parent topics (@pxref{Topic
21925 Parameters}).
21926
21927 @item
21928 Article editing has been revamped and is now actually usable.
21929
21930 @item
21931 Signatures can be recognized in more intelligent fashions
21932 (@pxref{Article Signature}).
21933
21934 @item
21935 Summary pick mode has been made to look more @code{nn}-like.  Line
21936 numbers are displayed and the @kbd{.} command can be used to pick
21937 articles (@code{Pick and Read}).
21938
21939 @item
21940 Commands for moving the @file{.newsrc.eld} from one server to
21941 another have been added (@pxref{Changing Servers}).
21942
21943 @item
21944 There's a way now to specify that ``uninteresting'' fields be suppressed
21945 when generating lines in buffers (@pxref{Advanced Formatting}).
21946
21947 @item
21948 Several commands in the group buffer can be undone with @kbd{C-M-_}
21949 (@pxref{Undo}).
21950
21951 @item
21952 Scoring can be done on words using the new score type @code{w}
21953 (@pxref{Score File Format}).
21954
21955 @item
21956 Adaptive scoring can be done on a Subject word-by-word basis
21957 (@pxref{Adaptive Scoring}).
21958
21959 @lisp
21960 (setq gnus-use-adaptive-scoring '(word))
21961 @end lisp
21962
21963 @item
21964 Scores can be decayed (@pxref{Score Decays}).
21965
21966 @lisp
21967 (setq gnus-decay-scores t)
21968 @end lisp
21969
21970 @item
21971 Scoring can be performed using a regexp on the Date header.  The Date is
21972 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
21973
21974 @item
21975 A new command has been added to remove all data on articles from
21976 the native server (@pxref{Changing Servers}).
21977
21978 @item
21979 A new command for reading collections of documents
21980 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
21981 (@pxref{Really Various Summary Commands}).
21982
21983 @item
21984 Process mark sets can be pushed and popped (@pxref{Setting Process
21985 Marks}).
21986
21987 @item
21988 A new mail-to-news back end makes it possible to post even when the @sc{nntp}
21989 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
21990
21991 @item
21992 A new back end for reading searches from Web search engines
21993 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
21994 (@pxref{Web Searches}).
21995
21996 @item
21997 Groups inside topics can now be sorted using the standard sorting
21998 functions, and each topic can be sorted independently (@pxref{Topic
21999 Sorting}).
22000
22001 @item
22002 Subsets of the groups can be sorted independently (@code{Sorting
22003 Groups}).
22004
22005 @item
22006 Cached articles can be pulled into the groups (@pxref{Summary Generation
22007 Commands}).
22008 @iftex
22009 @iflatex
22010 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
22011 @end iflatex
22012 @end iftex
22013
22014 @item
22015 Score files are now applied in a more reliable order (@pxref{Score
22016 Variables}).
22017
22018 @item
22019 Reports on where mail messages end up can be generated (@pxref{Splitting
22020 Mail}).
22021
22022 @item
22023 More hooks and functions have been added to remove junk from incoming
22024 mail before saving the mail (@pxref{Washing Mail}).
22025
22026 @item
22027 Emphasized text can be properly fontisized:
22028
22029 @end itemize
22030
22031
22032 @node Quassia Gnus
22033 @subsubsection Quassia Gnus
22034
22035 New features in Gnus 5.6:
22036
22037 @itemize @bullet
22038
22039 @item
22040 New functionality for using Gnus as an offline newsreader has been
22041 added.  A plethora of new commands and modes have been added.  See
22042 @pxref{Gnus Unplugged} for the full story.
22043
22044 @item
22045  The @code{nndraft} back end has returned, but works differently than
22046 before.  All Message buffers are now also articles in the @code{nndraft}
22047 group, which is created automatically.
22048
22049 @item
22050 @code{gnus-alter-header-function} can now be used to alter header
22051 values.
22052
22053 @item
22054  @code{gnus-summary-goto-article} now accept Message-ID's.
22055
22056 @item
22057  A new Message command for deleting text in the body of a message
22058 outside the region: @kbd{C-c C-v}.
22059
22060 @item
22061  You can now post to component group in @code{nnvirtual} groups with
22062 @kbd{C-u C-c C-c}.
22063
22064 @item
22065  @code{nntp-rlogin-program}---new variable to ease customization.
22066
22067 @item
22068  @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
22069 re-highlighting of the article buffer.
22070
22071 @item
22072  New element in @code{gnus-boring-article-headers}---@code{long-to}.
22073
22074 @item
22075  @kbd{M-i} symbolic prefix command.  See the section "Symbolic
22076 Prefixes" in the Gnus manual for details.
22077
22078 @item
22079  @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
22080 @kbd{a} to add the score rule to the "all.SCORE" file.
22081
22082 @item
22083  @code{gnus-simplify-subject-functions} variable to allow greater
22084 control over simplification.
22085
22086 @item
22087  @kbd{A T}---new command for fetching the current thread.
22088
22089 @item
22090  @kbd{/ T}---new command for including the current thread in the
22091 limit.
22092
22093 @item
22094  @kbd{M-RET} is a new Message command for breaking cited text.
22095
22096 @item
22097  @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
22098
22099 @item
22100  The @code{custom-face-lookup} function has been removed.
22101 If you used this function in your initialization files, you must
22102 rewrite them to use @code{face-spec-set} instead.
22103
22104 @item
22105  Canceling now uses the current select method.  Symbolic prefix
22106 @kbd{a} forces normal posting method.
22107
22108 @item
22109  New command to translate M******** sm*rtq**t*s into proper
22110 text---@kbd{W d}.
22111
22112 @item
22113  For easier debugging of @code{nntp}, you can set
22114 @code{nntp-record-commands} to a non-@code{nil} value.
22115
22116 @item
22117  @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
22118 controlling where and how to send @sc{authinfo} to @sc{nntp} servers.
22119
22120 @item
22121  A command for editing group parameters from the summary buffer
22122 has been added.
22123
22124 @item
22125  A history of where mails have been split is available.
22126
22127 @item
22128  A new article date command has been added---@code{article-date-iso8601}.
22129
22130 @item
22131  Subjects can be simplified when threading by setting
22132 @code{gnus-score-thread-simplify}.
22133
22134 @item
22135  A new function for citing in Message has been
22136 added---@code{message-cite-original-without-signature}.
22137
22138 @item
22139  @code{article-strip-all-blank-lines}---new article command.
22140
22141 @item
22142  A new Message command to kill to the end of the article has
22143 been added.
22144
22145 @item
22146  A minimum adaptive score can be specified by using the
22147 @code{gnus-adaptive-word-minimum} variable.
22148
22149 @item
22150  The "lapsed date" article header can be kept continually
22151 updated by the @code{gnus-start-date-timer} command.
22152
22153 @item
22154  Web listserv archives can be read with the @code{nnlistserv} back end.
22155
22156 @item
22157  Old dejanews archives can now be read by @code{nnweb}.
22158
22159 @end itemize
22160
22161 @node Pterodactyl Gnus
22162 @subsubsection Pterodactyl Gnus
22163
22164 New features in Gnus 5.8:
22165
22166 @itemize @bullet
22167
22168 @item
22169 The mail-fetching functions have changed.  See the manual for the
22170 many details.  In particular, all procmail fetching variables are gone.
22171
22172 If you used procmail like in
22173
22174 @lisp
22175 (setq nnmail-use-procmail t)
22176 (setq nnmail-spool-file 'procmail)
22177 (setq nnmail-procmail-directory "~/mail/incoming/")
22178 (setq nnmail-procmail-suffix "\\.in")
22179 @end lisp
22180
22181 this now has changed to
22182
22183 @lisp
22184 (setq mail-sources
22185       '((directory :path "~/mail/incoming/"
22186                    :suffix ".in")))
22187 @end lisp
22188
22189 More information is available in the info doc at Select Methods ->
22190 Getting Mail -> Mail Sources
22191
22192 @item
22193 Gnus is now a @sc{mime}-capable reader.  This affects many parts of
22194 Gnus, and adds a slew of new commands.  See the manual for details.
22195
22196 @item
22197 Gnus has also been multilingualized.  This also affects too
22198 many parts of Gnus to summarize here, and adds many new variables.
22199
22200 @item
22201 @code{gnus-auto-select-first} can now be a function to be
22202 called to position point.
22203
22204 @item
22205 The user can now decide which extra headers should be included in
22206 summary buffers and @sc{nov} files.
22207
22208 @item
22209 @code{gnus-article-display-hook} has been removed.  Instead, a number
22210 of variables starting with @code{gnus-treat-} have been added.
22211
22212 @item
22213 The Gnus posting styles have been redone again and now works in a
22214 subtly different manner.
22215
22216 @item
22217 New web-based back ends have been added: @code{nnslashdot},
22218 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
22219 again, to keep up with ever-changing layouts.
22220
22221 @item
22222 Gnus can now read @sc{imap} mail via @code{nnimap}.
22223
22224 @end itemize
22225
22226 @iftex
22227
22228 @page
22229 @node The Manual
22230 @section The Manual
22231 @cindex colophon
22232 @cindex manual
22233
22234 This manual was generated from a TeXinfo file and then run through
22235 either @code{texi2dvi}
22236 @iflatex
22237 or my own home-brewed TeXinfo to \LaTeX\ transformer,
22238 and then run through @code{latex} and @code{dvips}
22239 @end iflatex
22240 to get what you hold in your hands now.
22241
22242 The following conventions have been used:
22243
22244 @enumerate
22245
22246 @item
22247 This is a @samp{string}
22248
22249 @item
22250 This is a @kbd{keystroke}
22251
22252 @item
22253 This is a @file{file}
22254
22255 @item
22256 This is a @code{symbol}
22257
22258 @end enumerate
22259
22260 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
22261 mean:
22262
22263 @lisp
22264 (setq flargnoze "yes")
22265 @end lisp
22266
22267 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
22268
22269 @lisp
22270 (setq flumphel 'yes)
22271 @end lisp
22272
22273 @samp{yes} and @code{yes} are two @emph{very} different things---don't
22274 ever get them confused.
22275
22276 @iflatex
22277 @c @head
22278 Of course, everything in this manual is of vital interest, so you should
22279 read it all.  Several times.  However, if you feel like skimming the
22280 manual, look for that gnu head you should see in the margin over
22281 there---it means that what's being discussed is of more importance than
22282 the rest of the stuff.  (On the other hand, if everything is infinitely
22283 important, how can anything be more important than that?  Just one more
22284 of the mysteries of this world, I guess.)
22285 @end iflatex
22286
22287 @end iftex
22288
22289
22290 @node On Writing Manuals
22291 @section On Writing Manuals
22292
22293 I guess most manuals are written after-the-fact; documenting a program
22294 that's already there.  This is not how this manual is written.  When
22295 implementing something, I write the manual entry for that something
22296 straight away.  I then see that it's difficult to explain the
22297 functionality, so I write how it's supposed to be, and then I change the
22298 implementation.  Writing the documentation and writing the code goes
22299 hand in hand.
22300
22301 This, of course, means that this manual has no, or little, flow.  It
22302 documents absolutely everything in Gnus, but often not where you're
22303 looking for it.  It is a reference manual, and not a guide to how to get
22304 started with Gnus.
22305
22306 That would be a totally different book, that should be written using the
22307 reference manual as source material.  It would look quite differently.
22308
22309
22310 @page
22311 @node Terminology
22312 @section Terminology
22313
22314 @cindex terminology
22315 @table @dfn
22316
22317 @item news
22318 @cindex news
22319 This is what you are supposed to use this thing for---reading news.
22320 News is generally fetched from a nearby @sc{nntp} server, and is
22321 generally publicly available to everybody.  If you post news, the entire
22322 world is likely to read just what you have written, and they'll all
22323 snigger mischievously.  Behind your back.
22324
22325 @item mail
22326 @cindex mail
22327 Everything that's delivered to you personally is mail.  Some news/mail
22328 readers (like Gnus) blur the distinction between mail and news, but
22329 there is a difference.  Mail is private.  News is public.  Mailing is
22330 not posting, and replying is not following up.
22331
22332 @item reply
22333 @cindex reply
22334 Send a mail to the person who has written what you are reading.
22335
22336 @item follow up
22337 @cindex follow up
22338 Post an article to the current newsgroup responding to the article you
22339 are reading.
22340
22341 @item back end
22342 @cindex back end
22343 Gnus gets fed articles from a number of back ends, both news and mail
22344 back ends.  Gnus does not handle the underlying media, so to speak---this
22345 is all done by the back ends.
22346
22347 @item native
22348 @cindex native
22349 Gnus will always use one method (and back end) as the @dfn{native}, or
22350 default, way of getting news.
22351
22352 @item foreign
22353 @cindex foreign
22354 You can also have any number of foreign groups active at the same time.
22355 These are groups that use non-native non-secondary back ends for getting
22356 news.
22357
22358 @item secondary
22359 @cindex secondary
22360 Secondary back ends are somewhere half-way between being native and being
22361 foreign, but they mostly act like they are native.
22362
22363 @item article
22364 @cindex article
22365 A message that has been posted as news.
22366
22367 @item mail message
22368 @cindex mail message
22369 A message that has been mailed.
22370
22371 @item message
22372 @cindex message
22373 A mail message or news article
22374
22375 @item head
22376 @cindex head
22377 The top part of a message, where administrative information (etc.) is
22378 put.
22379
22380 @item body
22381 @cindex body
22382 The rest of an article.  Everything not in the head is in the
22383 body.
22384
22385 @item header
22386 @cindex header
22387 A line from the head of an article.
22388
22389 @item headers
22390 @cindex headers
22391 A collection of such lines, or a collection of heads.  Or even a
22392 collection of @sc{nov} lines.
22393
22394 @item @sc{nov}
22395 @cindex nov
22396 When Gnus enters a group, it asks the back end for the headers of all
22397 unread articles in the group.  Most servers support the News OverView
22398 format, which is more compact and much faster to read and parse than the
22399 normal @sc{head} format.
22400
22401 @item level
22402 @cindex levels
22403 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
22404 that have a lower level are ``more'' subscribed than the groups with a
22405 higher level.  In fact, groups on levels 1-5 are considered
22406 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
22407 are @dfn{killed}.  Commands for listing groups and scanning for new
22408 articles will all use the numeric prefix as @dfn{working level}.
22409
22410 @item killed groups
22411 @cindex killed groups
22412 No information on killed groups is stored or updated, which makes killed
22413 groups much easier to handle than subscribed groups.
22414
22415 @item zombie groups
22416 @cindex zombie groups
22417 Just like killed groups, only slightly less dead.
22418
22419 @item active file
22420 @cindex active file
22421 The news server has to keep track of what articles it carries, and what
22422 groups exist.  All this information in stored in the active file, which
22423 is rather large, as you might surmise.
22424
22425 @item bogus groups
22426 @cindex bogus groups
22427 A group that exists in the @file{.newsrc} file, but isn't known to the
22428 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
22429 This means that the group probably doesn't exist (any more).
22430
22431 @item activating
22432 @cindex activating groups
22433 The act of asking the server for info on a group and computing the
22434 number of unread articles is called @dfn{activating the group}.
22435 Un-activated groups are listed with @samp{*} in the group buffer.
22436
22437 @item server
22438 @cindex server
22439 A machine one can connect to and get news (or mail) from.
22440
22441 @item select method
22442 @cindex select method
22443 A structure that specifies the back end, the server and the virtual
22444 server settings.
22445
22446 @item virtual server
22447 @cindex virtual server
22448 A named select method.  Since a select method defines all there is to
22449 know about connecting to a (physical) server, taking the thing as a
22450 whole is a virtual server.
22451
22452 @item washing
22453 @cindex washing
22454 Taking a buffer and running it through a filter of some sort.  The
22455 result will (more often than not) be cleaner and more pleasing than the
22456 original.
22457
22458 @item ephemeral groups
22459 @cindex ephemeral groups
22460 Most groups store data on what articles you have read.  @dfn{Ephemeral}
22461 groups are groups that will have no data stored---when you exit the
22462 group, it'll disappear into the aether.
22463
22464 @item solid groups
22465 @cindex solid groups
22466 This is the opposite of ephemeral groups.  All groups listed in the
22467 group buffer are solid groups.
22468
22469 @item sparse articles
22470 @cindex sparse articles
22471 These are article placeholders shown in the summary buffer when
22472 @code{gnus-build-sparse-threads} has been switched on.
22473
22474 @item threading
22475 @cindex threading
22476 To put responses to articles directly after the articles they respond
22477 to---in a hierarchical fashion.
22478
22479 @item root
22480 @cindex root
22481 @cindex thread root
22482 The first article in a thread is the root.  It is the ancestor of all
22483 articles in the thread.
22484
22485 @item parent
22486 @cindex parent
22487 An article that has responses.
22488
22489 @item child
22490 @cindex child
22491 An article that responds to a different article---its parent.
22492
22493 @item digest
22494 @cindex digest
22495 A collection of messages in one file.  The most common digest format is
22496 specified by RFC 1153.
22497
22498 @end table
22499
22500
22501 @page
22502 @node Customization
22503 @section Customization
22504 @cindex general customization
22505
22506 All variables are properly documented elsewhere in this manual.  This
22507 section is designed to give general pointers on how to customize Gnus
22508 for some quite common situations.
22509
22510 @menu
22511 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
22512 * Slow Terminal Connection::    You run a remote Emacs.
22513 * Little Disk Space::           You feel that having large setup files is icky.
22514 * Slow Machine::                You feel like buying a faster machine.
22515 @end menu
22516
22517
22518 @node Slow/Expensive Connection
22519 @subsection Slow/Expensive NNTP Connection
22520
22521 If you run Emacs on a machine locally, and get your news from a machine
22522 over some very thin strings, you want to cut down on the amount of data
22523 Gnus has to get from the @sc{nntp} server.
22524
22525 @table @code
22526
22527 @item gnus-read-active-file
22528 Set this to @code{nil}, which will inhibit Gnus from requesting the
22529 entire active file from the server.  This file is often v.  large.  You
22530 also have to set @code{gnus-check-new-newsgroups} and
22531 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
22532 doesn't suddenly decide to fetch the active file anyway.
22533
22534 @item gnus-nov-is-evil
22535 This one has to be @code{nil}.  If not, grabbing article headers from
22536 the @sc{nntp} server will not be very fast.  Not all @sc{nntp} servers
22537 support @sc{xover}; Gnus will detect this by itself.
22538 @end table
22539
22540
22541 @node Slow Terminal Connection
22542 @subsection Slow Terminal Connection
22543
22544 Let's say you use your home computer for dialing up the system that runs
22545 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
22546 possible) the amount of data sent over the wires.
22547
22548 @table @code
22549
22550 @item gnus-auto-center-summary
22551 Set this to @code{nil} to inhibit Gnus from re-centering the summary
22552 buffer all the time.  If it is @code{vertical}, do only vertical
22553 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
22554 horizontal and vertical recentering.
22555
22556 @item gnus-visible-headers
22557 Cut down on the headers included in the articles to the
22558 minimum.  You can, in fact, make do without them altogether---most of the
22559 useful data is in the summary buffer, anyway.  Set this variable to
22560 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
22561
22562 Set this hook to all the available hiding commands:
22563 @lisp
22564 (setq gnus-treat-hide-headers 'head
22565       gnus-treat-hide-signature t
22566       gnus-treat-hide-citation t)
22567 @end lisp
22568
22569 @item gnus-use-full-window
22570 By setting this to @code{nil}, you can make all the windows smaller.
22571 While this doesn't really cut down much generally, it means that you
22572 have to see smaller portions of articles before deciding that you didn't
22573 want to read them anyway.
22574
22575 @item gnus-thread-hide-subtree
22576 If this is non-@code{nil}, all threads in the summary buffer will be
22577 hidden initially.
22578
22579
22580 @item gnus-updated-mode-lines
22581 If this is @code{nil}, Gnus will not put information in the buffer mode
22582 lines, which might save some time.
22583 @end table
22584
22585
22586 @node Little Disk Space
22587 @subsection Little Disk Space
22588 @cindex disk space
22589
22590 The startup files can get rather large, so you may want to cut their
22591 sizes a bit if you are running out of space.
22592
22593 @table @code
22594
22595 @item gnus-save-newsrc-file
22596 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
22597 only save @file{.newsrc.eld}.  This means that you will not be able to
22598 use any other newsreaders than Gnus.  This variable is @code{t} by
22599 default.
22600
22601 @item gnus-read-newsrc-file
22602 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
22603 only read @file{.newsrc.eld}.  This means that you will not be able to
22604 use any other newsreaders than Gnus.  This variable is @code{t} by
22605 default.
22606
22607 @item gnus-save-killed-list
22608 If this is @code{nil}, Gnus will not save the list of dead groups.  You
22609 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
22610 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
22611 variable to @code{nil}.  This variable is @code{t} by default.
22612
22613 @end table
22614
22615
22616 @node Slow Machine
22617 @subsection Slow Machine
22618 @cindex slow machine
22619
22620 If you have a slow machine, or are just really impatient, there are a
22621 few things you can do to make Gnus run faster.
22622
22623 Set @code{gnus-check-new-newsgroups} and
22624 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
22625
22626 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
22627 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
22628 summary buffer faster.
22629
22630
22631 @page
22632 @node Troubleshooting
22633 @section Troubleshooting
22634 @cindex troubleshooting
22635
22636 Gnus works @emph{so} well straight out of the box---I can't imagine any
22637 problems, really.
22638
22639 Ahem.
22640
22641 @enumerate
22642
22643 @item
22644 Make sure your computer is switched on.
22645
22646 @item
22647 Make sure that you really load the current Gnus version.  If you have
22648 been running @sc{gnus}, you need to exit Emacs and start it up again before
22649 Gnus will work.
22650
22651 @item
22652 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
22653 like @samp{T-gnus 6.15.* (based on Oort Gnus v0.*; for SEMI 1.1*, FLIM
22654 1.1*)} you have the right files loaded.  If, on the other hand, you get
22655 something like @samp{NNTP 3.x} or @samp{nntp flee}, you have some old
22656 @file{.el} files lying around.  Delete these.
22657
22658 @item
22659 Read the help group (@kbd{G h} in the group buffer) for a FAQ and a
22660 how-to.
22661
22662 @item
22663 @vindex max-lisp-eval-depth
22664 Gnus works on many recursive structures, and in some extreme (and very
22665 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
22666 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
22667 something like that.
22668 @end enumerate
22669
22670 If all else fails, report the problem as a bug.
22671
22672 @cindex bugs
22673 @cindex reporting bugs
22674
22675 @kindex M-x gnus-bug
22676 @findex gnus-bug
22677 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
22678 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
22679 me the backtrace.  I will fix bugs, but I can only fix them if you send
22680 me a precise description as to how to reproduce the bug.
22681
22682 You really can never be too detailed in a bug report.  Always use the
22683 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
22684 a 10Kb mail each time you use it, and even if you have sent me your
22685 environment 500 times before.  I don't care.  I want the full info each
22686 time.
22687
22688 It is also important to remember that I have no memory whatsoever.  If
22689 you send a bug report, and I send you a reply, and then you just send
22690 back ``No, it's not! Moron!'', I will have no idea what you are
22691 insulting me about.  Always over-explain everything.  It's much easier
22692 for all of us---if I don't have all the information I need, I will just
22693 mail you and ask for more info, and everything takes more time.
22694
22695 If the problem you're seeing is very visual, and you can't quite explain
22696 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
22697 it somewhere it can be reached, and include the URL of the picture in
22698 the bug report.
22699
22700 @cindex patches
22701 If you would like to contribute a patch to fix bugs or make
22702 improvements, please produce the patch using @samp{diff -u}.
22703
22704 If you just need help, you are better off asking on
22705 @samp{gnu.emacs.gnus}.  I'm not very helpful.
22706
22707 @cindex gnu.emacs.gnus
22708 @cindex ding mailing list
22709 You can also ask on the ding mailing list---@samp{ding@@gnus.org}.
22710 Write to @samp{ding-request@@gnus.org} to subscribe.
22711
22712
22713 @page
22714 @node Gnus Reference Guide
22715 @section Gnus Reference Guide
22716
22717 It is my hope that other people will figure out smart stuff that Gnus
22718 can do, and that other people will write those smart things as well.  To
22719 facilitate that I thought it would be a good idea to describe the inner
22720 workings of Gnus.  And some of the not-so-inner workings, while I'm at
22721 it.
22722
22723 You can never expect the internals of a program not to change, but I
22724 will be defining (in some details) the interface between Gnus and its
22725 back ends (this is written in stone), the format of the score files
22726 (ditto), data structures (some are less likely to change than others)
22727 and general methods of operation.
22728
22729 @menu
22730 * Gnus Utility Functions::      Common functions and variable to use.
22731 * Back End Interface::          How Gnus communicates with the servers.
22732 * Score File Syntax::           A BNF definition of the score file standard.
22733 * Headers::                     How Gnus stores headers internally.
22734 * Ranges::                      A handy format for storing mucho numbers.
22735 * Group Info::                  The group info format.
22736 * Extended Interactive::        Symbolic prefixes and stuff.
22737 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
22738 * Various File Formats::        Formats of files that Gnus use.
22739 @end menu
22740
22741
22742 @node Gnus Utility Functions
22743 @subsection Gnus Utility Functions
22744 @cindex Gnus utility functions
22745 @cindex utility functions
22746 @cindex functions
22747 @cindex internal variables
22748
22749 When writing small functions to be run from hooks (and stuff), it's
22750 vital to have access to the Gnus internal functions and variables.
22751 Below is a list of the most common ones.
22752
22753 @table @code
22754
22755 @item gnus-newsgroup-name
22756 @vindex gnus-newsgroup-name
22757 This variable holds the name of the current newsgroup.
22758
22759 @item gnus-find-method-for-group
22760 @findex gnus-find-method-for-group
22761 A function that returns the select method for @var{group}.
22762
22763 @item gnus-group-real-name
22764 @findex gnus-group-real-name
22765 Takes a full (prefixed) Gnus group name, and returns the unprefixed
22766 name.
22767
22768 @item gnus-group-prefixed-name
22769 @findex gnus-group-prefixed-name
22770 Takes an unprefixed group name and a select method, and returns the full
22771 (prefixed) Gnus group name.
22772
22773 @item gnus-get-info
22774 @findex gnus-get-info
22775 Returns the group info list for @var{group}.
22776
22777 @item gnus-group-unread
22778 @findex gnus-group-unread
22779 The number of unread articles in @var{group}, or @code{t} if that is
22780 unknown.
22781
22782 @item gnus-active
22783 @findex gnus-active
22784 The active entry for @var{group}.
22785
22786 @item gnus-set-active
22787 @findex gnus-set-active
22788 Set the active entry for @var{group}.
22789
22790 @item gnus-add-current-to-buffer-list
22791 @findex gnus-add-current-to-buffer-list
22792 Adds the current buffer to the list of buffers to be killed on Gnus
22793 exit.
22794
22795 @item gnus-continuum-version
22796 @findex gnus-continuum-version
22797 Takes a Gnus version string as a parameter and returns a floating point
22798 number.  Earlier versions will always get a lower number than later
22799 versions.
22800
22801 @item gnus-group-read-only-p
22802 @findex gnus-group-read-only-p
22803 Says whether @var{group} is read-only or not.
22804
22805 @item gnus-news-group-p
22806 @findex gnus-news-group-p
22807 Says whether @var{group} came from a news back end.
22808
22809 @item gnus-ephemeral-group-p
22810 @findex gnus-ephemeral-group-p
22811 Says whether @var{group} is ephemeral or not.
22812
22813 @item gnus-server-to-method
22814 @findex gnus-server-to-method
22815 Returns the select method corresponding to @var{server}.
22816
22817 @item gnus-server-equal
22818 @findex gnus-server-equal
22819 Says whether two virtual servers are equal.
22820
22821 @item gnus-group-native-p
22822 @findex gnus-group-native-p
22823 Says whether @var{group} is native or not.
22824
22825 @item gnus-group-secondary-p
22826 @findex gnus-group-secondary-p
22827 Says whether @var{group} is secondary or not.
22828
22829 @item gnus-group-foreign-p
22830 @findex gnus-group-foreign-p
22831 Says whether @var{group} is foreign or not.
22832
22833 @item group-group-find-parameter
22834 @findex group-group-find-parameter
22835 Returns the parameter list of @var{group}.  If given a second parameter,
22836 returns the value of that parameter for @var{group}.
22837
22838 @item gnus-group-set-parameter
22839 @findex gnus-group-set-parameter
22840 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
22841
22842 @item gnus-narrow-to-body
22843 @findex gnus-narrow-to-body
22844 Narrows the current buffer to the body of the article.
22845
22846 @item gnus-check-backend-function
22847 @findex gnus-check-backend-function
22848 Takes two parameters, @var{function} and @var{group}.  If the back end
22849 @var{group} comes from supports @var{function}, return non-@code{nil}.
22850
22851 @lisp
22852 (gnus-check-backend-function "request-scan" "nnml:misc")
22853 @result{} t
22854 @end lisp
22855
22856 @item gnus-read-method
22857 @findex gnus-read-method
22858 Prompts the user for a select method.
22859
22860 @end table
22861
22862
22863 @node Back End Interface
22864 @subsection Back End Interface
22865
22866 Gnus doesn't know anything about @sc{nntp}, spools, mail or virtual
22867 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
22868 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
22869 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
22870 examples of the latter we have @code{nntp-port-number} and
22871 @code{nnmbox-directory}.
22872
22873 When Gnus asks for information from a back end---say @code{nntp}---on
22874 something, it will normally include a virtual server name in the
22875 function parameters.  (If not, the back end should use the ``current''
22876 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
22877 server as its only (optional) parameter.  If this virtual server hasn't
22878 been opened, the function should fail.
22879
22880 Note that a virtual server name has no relation to some physical server
22881 name.  Take this example:
22882
22883 @lisp
22884 (nntp "odd-one"
22885       (nntp-address "ifi.uio.no")
22886       (nntp-port-number 4324))
22887 @end lisp
22888
22889 Here the virtual server name is @samp{odd-one} while the name of
22890 the physical server is @samp{ifi.uio.no}.
22891
22892 The back ends should be able to switch between several virtual servers.
22893 The standard back ends implement this by keeping an alist of virtual
22894 server environments that they pull down/push up when needed.
22895
22896 There are two groups of interface functions: @dfn{required functions},
22897 which must be present, and @dfn{optional functions}, which Gnus will
22898 always check for presence before attempting to call 'em.
22899
22900 All these functions are expected to return data in the buffer
22901 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
22902 unfortunately named, but we'll have to live with it.  When I talk about
22903 @dfn{resulting data}, I always refer to the data in that buffer.  When I
22904 talk about @dfn{return value}, I talk about the function value returned by
22905 the function call.  Functions that fail should return @code{nil} as the
22906 return value.
22907
22908 Some back ends could be said to be @dfn{server-forming} back ends, and
22909 some might be said not to be.  The latter are back ends that generally
22910 only operate on one group at a time, and have no concept of ``server''
22911 -- they have a group, and they deliver info on that group and nothing
22912 more.
22913
22914 Gnus identifies each message by way of group name and article number.  A
22915 few remarks about these article numbers might be useful.  First of all,
22916 the numbers are positive integers.  Secondly, it is normally not
22917 possible for later articles to `re-use' older article numbers without
22918 confusing Gnus.  That is, if a group has ever contained a message
22919 numbered 42, then no other message may get that number, or Gnus will get
22920 mightily confused.@footnote{See the function
22921 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
22922 Third, article numbers must be assigned in order of arrival in the
22923 group; this is not necessarily the same as the date of the message.
22924
22925 The previous paragraph already mentions all the `hard' restrictions that
22926 article numbers must fulfill.  But it seems that it might be useful to
22927 assign @emph{consecutive} article numbers, for Gnus gets quite confused
22928 if there are holes in the article numbering sequence.  However, due to
22929 the `no-reuse' restriction, holes cannot be avoided altogether.  It's
22930 also useful for the article numbers to start at 1 to avoid running out
22931 of numbers as long as possible.
22932
22933 In the examples and definitions I will refer to the imaginary back end
22934 @code{nnchoke}.
22935
22936 @cindex @code{nnchoke}
22937
22938 @menu
22939 * Required Back End Functions::  Functions that must be implemented.
22940 * Optional Back End Functions::  Functions that need not be implemented.
22941 * Error Messaging::             How to get messages and report errors.
22942 * Writing New Back Ends::       Extending old back ends.
22943 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
22944 * Mail-like Back Ends::         Some tips on mail back ends.
22945 @end menu
22946
22947
22948 @node Required Back End Functions
22949 @subsubsection Required Back End Functions
22950
22951 @table @code
22952
22953 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
22954
22955 @var{articles} is either a range of article numbers or a list of
22956 @code{Message-ID}s.  Current back ends do not fully support either---only
22957 sequences (lists) of article numbers, and most back ends do not support
22958 retrieval of @code{Message-ID}s.  But they should try for both.
22959
22960 The result data should either be HEADs or @sc{nov} lines, and the result
22961 value should either be @code{headers} or @code{nov} to reflect this.
22962 This might later be expanded to @code{various}, which will be a mixture
22963 of HEADs and @sc{nov} lines, but this is currently not supported by Gnus.
22964
22965 If @var{fetch-old} is non-@code{nil} it says to try fetching "extra
22966 headers", in some meaning of the word.  This is generally done by
22967 fetching (at most) @var{fetch-old} extra headers less than the smallest
22968 article number in @code{articles}, and filling the gaps as well.  The
22969 presence of this parameter can be ignored if the back end finds it
22970 cumbersome to follow the request.  If this is non-@code{nil} and not a
22971 number, do maximum fetches.
22972
22973 Here's an example HEAD:
22974
22975 @example
22976 221 1056 Article retrieved.
22977 Path: ifi.uio.no!sturles
22978 From: sturles@@ifi.uio.no (Sturle Sunde)
22979 Newsgroups: ifi.discussion
22980 Subject: Re: Something very droll
22981 Date: 27 Oct 1994 14:02:57 +0100
22982 Organization: Dept. of Informatics, University of Oslo, Norway
22983 Lines: 26
22984 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
22985 References: <38jdmq$4qu@@visbur.ifi.uio.no>
22986 NNTP-Posting-Host: holmenkollen.ifi.uio.no
22987 .
22988 @end example
22989
22990 So a @code{headers} return value would imply that there's a number of
22991 these in the data buffer.
22992
22993 Here's a BNF definition of such a buffer:
22994
22995 @example
22996 headers        = *head
22997 head           = error / valid-head
22998 error-message  = [ "4" / "5" ] 2number " " <error message> eol
22999 valid-head     = valid-message *header "." eol
23000 valid-message  = "221 " <number> " Article retrieved." eol
23001 header         = <text> eol
23002 @end example
23003
23004 If the return value is @code{nov}, the data buffer should contain
23005 @dfn{network overview database} lines.  These are basically fields
23006 separated by tabs.
23007
23008 @example
23009 nov-buffer = *nov-line
23010 nov-line   = 8*9 [ field <TAB> ] eol
23011 field      = <text except TAB>
23012 @end example
23013
23014 For a closer look at what should be in those fields,
23015 @pxref{Headers}.
23016
23017
23018 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
23019
23020 @var{server} is here the virtual server name.  @var{definitions} is a
23021 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
23022
23023 If the server can't be opened, no error should be signaled.  The back end
23024 may then choose to refuse further attempts at connecting to this
23025 server.  In fact, it should do so.
23026
23027 If the server is opened already, this function should return a
23028 non-@code{nil} value.  There should be no data returned.
23029
23030
23031 @item (nnchoke-close-server &optional SERVER)
23032
23033 Close connection to @var{server} and free all resources connected
23034 to it.  Return @code{nil} if the server couldn't be closed for some
23035 reason.
23036
23037 There should be no data returned.
23038
23039
23040 @item (nnchoke-request-close)
23041
23042 Close connection to all servers and free all resources that the back end
23043 have reserved.  All buffers that have been created by that back end
23044 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
23045 function is generally only called when Gnus is shutting down.
23046
23047 There should be no data returned.
23048
23049
23050 @item (nnchoke-server-opened &optional SERVER)
23051
23052 If @var{server} is the current virtual server, and the connection to the
23053 physical server is alive, then this function should return a
23054 non-@code{nil} vlue.  This function should under no circumstances
23055 attempt to reconnect to a server we have lost connection to.
23056
23057 There should be no data returned.
23058
23059
23060 @item (nnchoke-status-message &optional SERVER)
23061
23062 This function should return the last error message from @var{server}.
23063
23064 There should be no data returned.
23065
23066
23067 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
23068
23069 The result data from this function should be the article specified by
23070 @var{article}.  This might either be a @code{Message-ID} or a number.
23071 It is optional whether to implement retrieval by @code{Message-ID}, but
23072 it would be nice if that were possible.
23073
23074 If @var{to-buffer} is non-@code{nil}, the result data should be returned
23075 in this buffer instead of the normal data buffer.  This is to make it
23076 possible to avoid copying large amounts of data from one buffer to
23077 another, while Gnus mainly requests articles to be inserted directly
23078 into its article buffer.
23079
23080 If it is at all possible, this function should return a cons cell where
23081 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
23082 the article number.  This will enable Gnus to find out what the real
23083 group and article numbers are when fetching articles by
23084 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
23085 on successful article retrieval.
23086
23087
23088 @item (nnchoke-request-group GROUP &optional SERVER FAST)
23089
23090 Get data on @var{group}.  This function also has the side effect of
23091 making @var{group} the current group.
23092
23093 If @var{fast}, don't bother to return useful data, just make @var{group}
23094 the current group.
23095
23096 Here's an example of some result data and a definition of the same:
23097
23098 @example
23099 211 56 1000 1059 ifi.discussion
23100 @end example
23101
23102 The first number is the status, which should be 211.  Next is the
23103 total number of articles in the group, the lowest article number, the
23104 highest article number, and finally the group name.  Note that the total
23105 number of articles may be less than one might think while just
23106 considering the highest and lowest article numbers, but some articles
23107 may have been canceled.  Gnus just discards the total-number, so
23108 whether one should take the bother to generate it properly (if that is a
23109 problem) is left as an exercise to the reader.  If the group contains no
23110 articles, the lowest article number should be reported as 1 and the
23111 highest as 0.
23112
23113 @example
23114 group-status = [ error / info ] eol
23115 error        = [ "4" / "5" ] 2<number> " " <Error message>
23116 info         = "211 " 3* [ <number> " " ] <string>
23117 @end example
23118
23119
23120 @item (nnchoke-close-group GROUP &optional SERVER)
23121
23122 Close @var{group} and free any resources connected to it.  This will be
23123 a no-op on most back ends.
23124
23125 There should be no data returned.
23126
23127
23128 @item (nnchoke-request-list &optional SERVER)
23129
23130 Return a list of all groups available on @var{server}.  And that means
23131 @emph{all}.
23132
23133 Here's an example from a server that only carries two groups:
23134
23135 @example
23136 ifi.test 0000002200 0000002000 y
23137 ifi.discussion 3324 3300 n
23138 @end example
23139
23140 On each line we have a group name, then the highest article number in
23141 that group, the lowest article number, and finally a flag.  If the group
23142 contains no articles, the lowest article number should be reported as 1
23143 and the highest as 0.
23144
23145 @example
23146 active-file = *active-line
23147 active-line = name " " <number> " " <number> " " flags eol
23148 name        = <string>
23149 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
23150 @end example
23151
23152 The flag says whether the group is read-only (@samp{n}), is moderated
23153 (@samp{m}), is dead (@samp{x}), is aliased to some other group
23154 (@samp{=other-group}) or none of the above (@samp{y}).
23155
23156
23157 @item (nnchoke-request-post &optional SERVER)
23158
23159 This function should post the current buffer.  It might return whether
23160 the posting was successful or not, but that's not required.  If, for
23161 instance, the posting is done asynchronously, it has generally not been
23162 completed by the time this function concludes.  In that case, this
23163 function should set up some kind of sentinel to beep the user loud and
23164 clear if the posting could not be completed.
23165
23166 There should be no result data from this function.
23167
23168 @end table
23169
23170
23171 @node Optional Back End Functions
23172 @subsubsection Optional Back End Functions
23173
23174 @table @code
23175
23176 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
23177
23178 @var{groups} is a list of groups, and this function should request data
23179 on all those groups.  How it does it is of no concern to Gnus, but it
23180 should attempt to do this in a speedy fashion.
23181
23182 The return value of this function can be either @code{active} or
23183 @code{group}, which says what the format of the result data is.  The
23184 former is in the same format as the data from
23185 @code{nnchoke-request-list}, while the latter is a buffer full of lines
23186 in the same format as @code{nnchoke-request-group} gives.
23187
23188 @example
23189 group-buffer = *active-line / *group-status
23190 @end example
23191
23192
23193 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
23194
23195 A Gnus group info (@pxref{Group Info}) is handed to the back end for
23196 alterations.  This comes in handy if the back end really carries all the
23197 information (as is the case with virtual and imap groups).  This
23198 function should destructively alter the info to suit its needs, and
23199 should return the (altered) group info.
23200
23201 There should be no result data from this function.
23202
23203
23204 @item (nnchoke-request-type GROUP &optional ARTICLE)
23205
23206 When the user issues commands for ``sending news'' (@kbd{F} in the
23207 summary buffer, for instance), Gnus has to know whether the article the
23208 user is following up on is news or mail.  This function should return
23209 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
23210 is mail and @code{unknown} if the type can't be decided.  (The
23211 @var{article} parameter is necessary in @code{nnvirtual} groups which
23212 might very well combine mail groups and news groups.)  Both @var{group}
23213 and @var{article} may be @code{nil}.
23214
23215 There should be no result data from this function.
23216
23217
23218 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
23219
23220 Set/remove/add marks on articles.  Normally Gnus handles the article
23221 marks (such as read, ticked, expired etc) internally, and store them in
23222 @code{~/.newsrc.eld}.  Some back ends (such as @sc{imap}) however carry
23223 all information about the articles on the server, so Gnus need to
23224 propagate the mark information to the server.
23225
23226 ACTION is a list of mark setting requests, having this format:
23227
23228 @example
23229 (RANGE ACTION MARK)
23230 @end example
23231
23232 RANGE is a range of articles you wish to update marks on.  ACTION is
23233 @code{add} or @code{del}, used to add marks or remove marks
23234 (preserving all marks not mentioned).  MARK is a list of marks; where
23235 each mark is a symbol.  Currently used marks are @code{read},
23236 @code{tick}, @code{reply}, @code{expire}, @code{killed},
23237 @code{dormant}, @code{save}, @code{download}, @code{unsend},
23238 @code{forward} and @code{recent}, but your back end should, if
23239 possible, not limit itself to these.
23240
23241 Given contradictory actions, the last action in the list should be the
23242 effective one.  That is, if your action contains a request to add the
23243 @code{tick} mark on article 1 and, later in the list, a request to
23244 remove the mark on the same article, the mark should in fact be removed.
23245
23246 An example action list:
23247
23248 @example
23249 (((5 12 30) 'del '(tick))
23250  ((10 . 90) 'add '(read expire))
23251  ((92 94) 'del '(read)))
23252 @end example
23253
23254 The function should return a range of articles it wasn't able to set the
23255 mark on (currently not used for anything).
23256
23257 There should be no result data from this function.
23258
23259 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
23260
23261 If the user tries to set a mark that the back end doesn't like, this
23262 function may change the mark.  Gnus will use whatever this function
23263 returns as the mark for @var{article} instead of the original
23264 @var{mark}.  If the back end doesn't care, it must return the original
23265 @var{mark}, and not @code{nil} or any other type of garbage.
23266
23267 The only use for this I can see is what @code{nnvirtual} does with
23268 it---if a component group is auto-expirable, marking an article as read
23269 in the virtual group should result in the article being marked as
23270 expirable.
23271
23272 There should be no result data from this function.
23273
23274
23275 @item (nnchoke-request-scan &optional GROUP SERVER)
23276
23277 This function may be called at any time (by Gnus or anything else) to
23278 request that the back end check for incoming articles, in one way or
23279 another.  A mail back end will typically read the spool file or query the
23280 POP server when this function is invoked.  The @var{group} doesn't have
23281 to be heeded---if the back end decides that it is too much work just
23282 scanning for a single group, it may do a total scan of all groups.  It
23283 would be nice, however, to keep things local if that's practical.
23284
23285 There should be no result data from this function.
23286
23287
23288 @item (nnchoke-request-group-description GROUP &optional SERVER)
23289
23290 The result data from this function should be a description of
23291 @var{group}.
23292
23293 @example
23294 description-line = name <TAB> description eol
23295 name             = <string>
23296 description      = <text>
23297 @end example
23298
23299 @item (nnchoke-request-list-newsgroups &optional SERVER)
23300
23301 The result data from this function should be the description of all
23302 groups available on the server.
23303
23304 @example
23305 description-buffer = *description-line
23306 @end example
23307
23308
23309 @item (nnchoke-request-newgroups DATE &optional SERVER)
23310
23311 The result data from this function should be all groups that were
23312 created after @samp{date}, which is in normal human-readable date format
23313 (i.e., the date format used in mail and news headers, and returned by
23314 the function @code{message-make-date} by default).  The data should be
23315 in the active buffer format.
23316
23317 It is okay for this function to return `too many' groups; some back ends
23318 might find it cheaper to return the full list of groups, rather than
23319 just the new groups.  But don't do this for back ends with many groups.
23320 Normally, if the user creates the groups herself, there won't be too
23321 many groups, so @code{nnml} and the like are probably safe.  But for
23322 back ends like @code{nntp}, where the groups have been created by the
23323 server, it is quite likely that there can be many groups.
23324
23325
23326 @item (nnchoke-request-create-group GROUP &optional SERVER)
23327
23328 This function should create an empty group with name @var{group}.
23329
23330 There should be no return data.
23331
23332
23333 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
23334
23335 This function should run the expiry process on all articles in the
23336 @var{articles} range (which is currently a simple list of article
23337 numbers.)  It is left up to the back end to decide how old articles
23338 should be before they are removed by this function.  If @var{force} is
23339 non-@code{nil}, all @var{articles} should be deleted, no matter how new
23340 they are.
23341
23342 This function should return a list of articles that it did not/was not
23343 able to delete.
23344
23345 There should be no result data returned.
23346
23347
23348 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM
23349 &optional LAST)
23350
23351 This function should move @var{article} (which is a number) from
23352 @var{group} by calling @var{accept-form}.
23353
23354 This function should ready the article in question for moving by
23355 removing any header lines it has added to the article, and generally
23356 should ``tidy up'' the article.  Then it should @code{eval}
23357 @var{accept-form} in the buffer where the ``tidy'' article is.  This
23358 will do the actual copying.  If this @code{eval} returns a
23359 non-@code{nil} value, the article should be removed.
23360
23361 If @var{last} is @code{nil}, that means that there is a high likelihood
23362 that there will be more requests issued shortly, so that allows some
23363 optimizations.
23364
23365 The function should return a cons where the @code{car} is the group name and
23366 the @code{cdr} is the article number that the article was entered as.
23367
23368 There should be no data returned.
23369
23370
23371 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
23372
23373 This function takes the current buffer and inserts it into @var{group}.
23374 If @var{last} in @code{nil}, that means that there will be more calls to
23375 this function in short order.
23376
23377 The function should return a cons where the @code{car} is the group name and
23378 the @code{cdr} is the article number that the article was entered as.
23379
23380 There should be no data returned.
23381
23382
23383 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
23384
23385 This function should remove @var{article} (which is a number) from
23386 @var{group} and insert @var{buffer} there instead.
23387
23388 There should be no data returned.
23389
23390
23391 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
23392
23393 This function should delete @var{group}.  If @var{force}, it should
23394 really delete all the articles in the group, and then delete the group
23395 itself.  (If there is such a thing as ``the group itself''.)
23396
23397 There should be no data returned.
23398
23399
23400 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
23401
23402 This function should rename @var{group} into @var{new-name}.  All
23403 articles in @var{group} should move to @var{new-name}.
23404
23405 There should be no data returned.
23406
23407 @end table
23408
23409
23410 @node Error Messaging
23411 @subsubsection Error Messaging
23412
23413 @findex nnheader-report
23414 @findex nnheader-get-report
23415 The back ends should use the function @code{nnheader-report} to report
23416 error conditions---they should not raise errors when they aren't able to
23417 perform a request.  The first argument to this function is the back end
23418 symbol, and the rest are interpreted as arguments to @code{format} if
23419 there are multiple of them, or just a string if there is one of them.
23420 This function must always returns @code{nil}.
23421
23422 @lisp
23423 (nnheader-report 'nnchoke "You did something totally bogus")
23424
23425 (nnheader-report 'nnchoke "Could not request group %s" group)
23426 @end lisp
23427
23428 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
23429 @code{nil} back from a server, and this function returns the most
23430 recently reported message for the back end in question.  This function
23431 takes one argument---the server symbol.
23432
23433 Internally, these functions access @var{back-end}@code{-status-string},
23434 so the @code{nnchoke} back end will have its error message stored in
23435 @code{nnchoke-status-string}.
23436
23437
23438 @node Writing New Back Ends
23439 @subsubsection Writing New Back Ends
23440
23441 Many back ends are quite similar.  @code{nnml} is just like
23442 @code{nnspool}, but it allows you to edit the articles on the server.
23443 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
23444 and it doesn't maintain overview databases.  @code{nndir} is just like
23445 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
23446 editing articles.
23447
23448 It would make sense if it were possible to ``inherit'' functions from
23449 back ends when writing new back ends.  And, indeed, you can do that if you
23450 want to.  (You don't have to if you don't want to, of course.)
23451
23452 All the back ends declare their public variables and functions by using a
23453 package called @code{nnoo}.
23454
23455 To inherit functions from other back ends (and allow other back ends to
23456 inherit functions from the current back end), you should use the
23457 following macros:
23458
23459 @table @code
23460
23461 @item nnoo-declare
23462 This macro declares the first parameter to be a child of the subsequent
23463 parameters.  For instance:
23464
23465 @lisp
23466 (nnoo-declare nndir
23467   nnml nnmh)
23468 @end lisp
23469
23470 @code{nndir} has declared here that it intends to inherit functions from
23471 both @code{nnml} and @code{nnmh}.
23472
23473 @item defvoo
23474 This macro is equivalent to @code{defvar}, but registers the variable as
23475 a public server variable.  Most state-oriented variables should be
23476 declared with @code{defvoo} instead of @code{defvar}.
23477
23478 In addition to the normal @code{defvar} parameters, it takes a list of
23479 variables in the parent back ends to map the variable to when executing
23480 a function in those back ends.
23481
23482 @lisp
23483 (defvoo nndir-directory nil
23484   "Where nndir will look for groups."
23485   nnml-current-directory nnmh-current-directory)
23486 @end lisp
23487
23488 This means that @code{nnml-current-directory} will be set to
23489 @code{nndir-directory} when an @code{nnml} function is called on behalf
23490 of @code{nndir}.  (The same with @code{nnmh}.)
23491
23492 @item nnoo-define-basics
23493 This macro defines some common functions that almost all back ends should
23494 have.
23495
23496 @example
23497 (nnoo-define-basics nndir)
23498 @end example
23499
23500 @item deffoo
23501 This macro is just like @code{defun} and takes the same parameters.  In
23502 addition to doing the normal @code{defun} things, it registers the
23503 function as being public so that other back ends can inherit it.
23504
23505 @item nnoo-map-functions
23506 This macro allows mapping of functions from the current back end to
23507 functions from the parent back ends.
23508
23509 @example
23510 (nnoo-map-functions nndir
23511   (nnml-retrieve-headers 0 nndir-current-group 0 0)
23512   (nnmh-request-article 0 nndir-current-group 0 0))
23513 @end example
23514
23515 This means that when @code{nndir-retrieve-headers} is called, the first,
23516 third, and fourth parameters will be passed on to
23517 @code{nnml-retrieve-headers}, while the second parameter is set to the
23518 value of @code{nndir-current-group}.
23519
23520 @item nnoo-import
23521 This macro allows importing functions from back ends.  It should be the
23522 last thing in the source file, since it will only define functions that
23523 haven't already been defined.
23524
23525 @example
23526 (nnoo-import nndir
23527   (nnmh
23528    nnmh-request-list
23529    nnmh-request-newgroups)
23530   (nnml))
23531 @end example
23532
23533 This means that calls to @code{nndir-request-list} should just be passed
23534 on to @code{nnmh-request-list}, while all public functions from
23535 @code{nnml} that haven't been defined in @code{nndir} yet should be
23536 defined now.
23537
23538 @end table
23539
23540 Below is a slightly shortened version of the @code{nndir} back end.
23541
23542 @lisp
23543 ;;; nndir.el --- single directory newsgroup access for Gnus
23544 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
23545
23546 ;;; Code:
23547
23548 (require 'nnheader)
23549 (require 'nnmh)
23550 (require 'nnml)
23551 (require 'nnoo)
23552 (eval-when-compile (require 'cl))
23553
23554 (nnoo-declare nndir
23555   nnml nnmh)
23556
23557 (defvoo nndir-directory nil
23558   "Where nndir will look for groups."
23559   nnml-current-directory nnmh-current-directory)
23560
23561 (defvoo nndir-nov-is-evil nil
23562   "*Non-nil means that nndir will never retrieve NOV headers."
23563   nnml-nov-is-evil)
23564
23565 (defvoo nndir-current-group ""
23566   nil
23567   nnml-current-group nnmh-current-group)
23568 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
23569 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
23570
23571 (defvoo nndir-status-string "" nil nnmh-status-string)
23572 (defconst nndir-version "nndir 1.0")
23573
23574 ;;; Interface functions.
23575
23576 (nnoo-define-basics nndir)
23577
23578 (deffoo nndir-open-server (server &optional defs)
23579   (setq nndir-directory
23580         (or (cadr (assq 'nndir-directory defs))
23581             server))
23582   (unless (assq 'nndir-directory defs)
23583     (push `(nndir-directory ,server) defs))
23584   (push `(nndir-current-group
23585           ,(file-name-nondirectory
23586             (directory-file-name nndir-directory)))
23587         defs)
23588   (push `(nndir-top-directory
23589           ,(file-name-directory (directory-file-name nndir-directory)))
23590         defs)
23591   (nnoo-change-server 'nndir server defs))
23592
23593 (nnoo-map-functions nndir
23594   (nnml-retrieve-headers 0 nndir-current-group 0 0)
23595   (nnmh-request-article 0 nndir-current-group 0 0)
23596   (nnmh-request-group nndir-current-group 0 0)
23597   (nnmh-close-group nndir-current-group 0))
23598
23599 (nnoo-import nndir
23600   (nnmh
23601    nnmh-status-message
23602    nnmh-request-list
23603    nnmh-request-newgroups))
23604
23605 (provide 'nndir)
23606 @end lisp
23607
23608
23609 @node Hooking New Back Ends Into Gnus
23610 @subsubsection Hooking New Back Ends Into Gnus
23611
23612 @vindex gnus-valid-select-methods
23613 @findex gnus-declare-backend
23614 Having Gnus start using your new back end is rather easy---you just
23615 declare it with the @code{gnus-declare-backend} functions.  This will
23616 enter the back end into the @code{gnus-valid-select-methods} variable.
23617
23618 @code{gnus-declare-backend} takes two parameters---the back end name and
23619 an arbitrary number of @dfn{abilities}.
23620
23621 Here's an example:
23622
23623 @lisp
23624 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
23625 @end lisp
23626
23627 The above line would then go in the @file{nnchoke.el} file.
23628
23629 The abilities can be:
23630
23631 @table @code
23632 @item mail
23633 This is a mailish back end---followups should (probably) go via mail.
23634 @item post
23635 This is a newsish back end---followups should (probably) go via news.
23636 @item post-mail
23637 This back end supports both mail and news.
23638 @item none
23639 This is neither a post nor mail back end---it's something completely
23640 different.
23641 @item respool
23642 It supports respooling---or rather, it is able to modify its source
23643 articles and groups.
23644 @item address
23645 The name of the server should be in the virtual server name.  This is
23646 true for almost all back ends.
23647 @item prompt-address
23648 The user should be prompted for an address when doing commands like
23649 @kbd{B} in the group buffer.  This is true for back ends like
23650 @code{nntp}, but not @code{nnmbox}, for instance.
23651 @end table
23652
23653
23654 @node Mail-like Back Ends
23655 @subsubsection Mail-like Back Ends
23656
23657 One of the things that separate the mail back ends from the rest of the
23658 back ends is the heavy dependence by most of the mail back ends on
23659 common functions in @file{nnmail.el}.  For instance, here's the
23660 definition of @code{nnml-request-scan}:
23661
23662 @lisp
23663 (deffoo nnml-request-scan (&optional group server)
23664   (setq nnml-article-file-alist nil)
23665   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
23666 @end lisp
23667
23668 It simply calls @code{nnmail-get-new-mail} with a few parameters,
23669 and @code{nnmail} takes care of all the moving and splitting of the
23670 mail.
23671
23672 This function takes four parameters.
23673
23674 @table @var
23675 @item method
23676 This should be a symbol to designate which back end is responsible for
23677 the call.
23678
23679 @item exit-function
23680 This function should be called after the splitting has been performed.
23681
23682 @item temp-directory
23683 Where the temporary files should be stored.
23684
23685 @item group
23686 This optional argument should be a group name if the splitting is to be
23687 performed for one group only.
23688 @end table
23689
23690 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
23691 save each article.  @var{back-end}@code{-active-number} will be called to
23692 find the article number assigned to this article.
23693
23694 The function also uses the following variables:
23695 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
23696 this back end); and @var{back-end}@code{-group-alist} and
23697 @var{back-end}@code{-active-file} to generate the new active file.
23698 @var{back-end}@code{-group-alist} should be a group-active alist, like
23699 this:
23700
23701 @example
23702 (("a-group" (1 . 10))
23703  ("some-group" (34 . 39)))
23704 @end example
23705
23706
23707 @node Score File Syntax
23708 @subsection Score File Syntax
23709
23710 Score files are meant to be easily parseable, but yet extremely
23711 mallable.   It was decided that something that had the same read syntax
23712 as an Emacs Lisp list would fit that spec.
23713
23714 Here's a typical score file:
23715
23716 @lisp
23717 (("summary"
23718   ("win95" -10000 nil s)
23719   ("Gnus"))
23720  ("from"
23721   ("Lars" -1000))
23722  (mark -100))
23723 @end lisp
23724
23725 BNF definition of a score file:
23726
23727 @example
23728 score-file      = "" / "(" *element ")"
23729 element         = rule / atom
23730 rule            = string-rule / number-rule / date-rule
23731 string-rule     = "(" quote string-header quote space *string-match ")"
23732 number-rule     = "(" quote number-header quote space *number-match ")"
23733 date-rule       = "(" quote date-header quote space *date-match ")"
23734 quote           = <ascii 34>
23735 string-header   = "subject" / "from" / "references" / "message-id" /
23736                   "xref" / "body" / "head" / "all" / "followup"
23737 number-header   = "lines" / "chars"
23738 date-header     = "date"
23739 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
23740                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
23741 score           = "nil" / <integer>
23742 date            = "nil" / <natural number>
23743 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
23744                   "r" / "regex" / "R" / "Regex" /
23745                   "e" / "exact" / "E" / "Exact" /
23746                   "f" / "fuzzy" / "F" / "Fuzzy"
23747 number-match    = "(" <integer> [ "" / [ space score [ "" /
23748                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
23749 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
23750 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
23751                   space date [ "" / [ space date-match-t ] ] ] ] ")"
23752 date-match-t    = "nil" / "at" / "before" / "after"
23753 atom            = "(" [ required-atom / optional-atom ] ")"
23754 required-atom   = mark / expunge / mark-and-expunge / files /
23755                   exclude-files / read-only / touched
23756 optional-atom   = adapt / local / eval
23757 mark            = "mark" space nil-or-number
23758 nil-or-number   = "nil" / <integer>
23759 expunge         = "expunge" space nil-or-number
23760 mark-and-expunge = "mark-and-expunge" space nil-or-number
23761 files           = "files" *[ space <string> ]
23762 exclude-files   = "exclude-files" *[ space <string> ]
23763 read-only       = "read-only" [ space "nil" / space "t" ]
23764 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
23765 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
23766 local           = "local" *[ space "(" <string> space <form> ")" ]
23767 eval            = "eval" space <form>
23768 space           = *[ " " / <TAB> / <NEWLINE> ]
23769 @end example
23770
23771 Any unrecognized elements in a score file should be ignored, but not
23772 discarded.
23773
23774 As you can see, white space is needed, but the type and amount of white
23775 space is irrelevant.  This means that formatting of the score file is
23776 left up to the programmer---if it's simpler to just spew it all out on
23777 one looong line, then that's ok.
23778
23779 The meaning of the various atoms are explained elsewhere in this
23780 manual (@pxref{Score File Format}).
23781
23782
23783 @node Headers
23784 @subsection Headers
23785
23786 Internally Gnus uses a format for storing article headers that
23787 corresponds to the @sc{nov} format in a mysterious fashion.  One could
23788 almost suspect that the author looked at the @sc{nov} specification and
23789 just shamelessly @emph{stole} the entire thing, and one would be right.
23790
23791 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
23792 RFC 1036 to talk about lines in the head of an article (e.g.,
23793 @code{From}).  It is used by many people as a synonym for
23794 ``head''---``the header and the body''.  (That should be avoided, in my
23795 opinion.)  And Gnus uses a format internally that it calls ``header'',
23796 which is what I'm talking about here.  This is a 9-element vector,
23797 basically, with each header (ouch) having one slot.
23798
23799 These slots are, in order: @code{number}, @code{subject}, @code{from},
23800 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
23801 @code{xref}, and @code{extra}.  There are macros for accessing and
23802 setting these slots---they all have predictable names beginning with
23803 @code{mail-header-} and @code{mail-header-set-}, respectively.
23804
23805 All these slots contain strings, except the @code{extra} slot, which
23806 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
23807
23808
23809 @node Ranges
23810 @subsection Ranges
23811
23812 @sc{gnus} introduced a concept that I found so useful that I've started
23813 using it a lot and have elaborated on it greatly.
23814
23815 The question is simple: If you have a large amount of objects that are
23816 identified by numbers (say, articles, to take a @emph{wild} example)
23817 that you want to qualify as being ``included'', a normal sequence isn't
23818 very useful.  (A 200,000 length sequence is a bit long-winded.)
23819
23820 The solution is as simple as the question: You just collapse the
23821 sequence.
23822
23823 @example
23824 (1 2 3 4 5 6 10 11 12)
23825 @end example
23826
23827 is transformed into
23828
23829 @example
23830 ((1 . 6) (10 . 12))
23831 @end example
23832
23833 To avoid having those nasty @samp{(13 . 13)} elements to denote a
23834 lonesome object, a @samp{13} is a valid element:
23835
23836 @example
23837 ((1 . 6) 7 (10 . 12))
23838 @end example
23839
23840 This means that comparing two ranges to find out whether they are equal
23841 is slightly tricky:
23842
23843 @example
23844 ((1 . 5) 7 8 (10 . 12))
23845 @end example
23846
23847 and
23848
23849 @example
23850 ((1 . 5) (7 . 8) (10 . 12))
23851 @end example
23852
23853 are equal.  In fact, any non-descending list is a range:
23854
23855 @example
23856 (1 2 3 4 5)
23857 @end example
23858
23859 is a perfectly valid range, although a pretty long-winded one.  This is
23860 also valid:
23861
23862 @example
23863 (1 . 5)
23864 @end example
23865
23866 and is equal to the previous range.
23867
23868 Here's a BNF definition of ranges.  Of course, one must remember the
23869 semantic requirement that the numbers are non-descending.  (Any number
23870 of repetition of the same number is allowed, but apt to disappear in
23871 range handling.)
23872
23873 @example
23874 range           = simple-range / normal-range
23875 simple-range    = "(" number " . " number ")"
23876 normal-range    = "(" start-contents ")"
23877 contents        = "" / simple-range *[ " " contents ] /
23878                   number *[ " " contents ]
23879 @end example
23880
23881 Gnus currently uses ranges to keep track of read articles and article
23882 marks.  I plan on implementing a number of range operators in C if The
23883 Powers That Be are willing to let me.  (I haven't asked yet, because I
23884 need to do some more thinking on what operators I need to make life
23885 totally range-based without ever having to convert back to normal
23886 sequences.)
23887
23888
23889 @node Group Info
23890 @subsection Group Info
23891
23892 Gnus stores all permanent info on groups in a @dfn{group info} list.
23893 This list is from three to six elements (or more) long and exhaustively
23894 describes the group.
23895
23896 Here are two example group infos; one is a very simple group while the
23897 second is a more complex one:
23898
23899 @example
23900 ("no.group" 5 ((1 . 54324)))
23901
23902 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
23903                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
23904                 (nnml "")
23905                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
23906 @end example
23907
23908 The first element is the @dfn{group name}---as Gnus knows the group,
23909 anyway.  The second element is the @dfn{subscription level}, which
23910 normally is a small integer.  (It can also be the @dfn{rank}, which is a
23911 cons cell where the @code{car} is the level and the @code{cdr} is the
23912 score.)  The third element is a list of ranges of read articles.  The
23913 fourth element is a list of lists of article marks of various kinds.
23914 The fifth element is the select method (or virtual server, if you like).
23915 The sixth element is a list of @dfn{group parameters}, which is what
23916 this section is about.
23917
23918 Any of the last three elements may be missing if they are not required.
23919 In fact, the vast majority of groups will normally only have the first
23920 three elements, which saves quite a lot of cons cells.
23921
23922 Here's a BNF definition of the group info format:
23923
23924 @example
23925 info          = "(" group space ralevel space read
23926                 [ "" / [ space marks-list [ "" / [ space method [ "" /
23927                 space parameters ] ] ] ] ] ")"
23928 group         = quote <string> quote
23929 ralevel       = rank / level
23930 level         = <integer in the range of 1 to inf>
23931 rank          = "(" level "." score ")"
23932 score         = <integer in the range of 1 to inf>
23933 read          = range
23934 marks-lists   = nil / "(" *marks ")"
23935 marks         = "(" <string> range ")"
23936 method        = "(" <string> *elisp-forms ")"
23937 parameters    = "(" *elisp-forms ")"
23938 @end example
23939
23940 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
23941 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
23942 in pseudo-BNF.
23943
23944 If you have a Gnus info and want to access the elements, Gnus offers a
23945 series of macros for getting/setting these elements.
23946
23947 @table @code
23948 @item gnus-info-group
23949 @itemx gnus-info-set-group
23950 @findex gnus-info-group
23951 @findex gnus-info-set-group
23952 Get/set the group name.
23953
23954 @item gnus-info-rank
23955 @itemx gnus-info-set-rank
23956 @findex gnus-info-rank
23957 @findex gnus-info-set-rank
23958 Get/set the group rank (@pxref{Group Score}).
23959
23960 @item gnus-info-level
23961 @itemx gnus-info-set-level
23962 @findex gnus-info-level
23963 @findex gnus-info-set-level
23964 Get/set the group level.
23965
23966 @item gnus-info-score
23967 @itemx gnus-info-set-score
23968 @findex gnus-info-score
23969 @findex gnus-info-set-score
23970 Get/set the group score (@pxref{Group Score}).
23971
23972 @item gnus-info-read
23973 @itemx gnus-info-set-read
23974 @findex gnus-info-read
23975 @findex gnus-info-set-read
23976 Get/set the ranges of read articles.
23977
23978 @item gnus-info-marks
23979 @itemx gnus-info-set-marks
23980 @findex gnus-info-marks
23981 @findex gnus-info-set-marks
23982 Get/set the lists of ranges of marked articles.
23983
23984 @item gnus-info-method
23985 @itemx gnus-info-set-method
23986 @findex gnus-info-method
23987 @findex gnus-info-set-method
23988 Get/set the group select method.
23989
23990 @item gnus-info-params
23991 @itemx gnus-info-set-params
23992 @findex gnus-info-params
23993 @findex gnus-info-set-params
23994 Get/set the group parameters.
23995 @end table
23996
23997 All the getter functions take one parameter---the info list.  The setter
23998 functions take two parameters---the info list and the new value.
23999
24000 The last three elements in the group info aren't mandatory, so it may be
24001 necessary to extend the group info before setting the element.  If this
24002 is necessary, you can just pass on a non-@code{nil} third parameter to
24003 the three final setter functions to have this happen automatically.
24004
24005
24006 @node Extended Interactive
24007 @subsection Extended Interactive
24008 @cindex interactive
24009 @findex gnus-interactive
24010
24011 Gnus extends the standard Emacs @code{interactive} specification
24012 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
24013 Prefixes}).  Here's an example of how this is used:
24014
24015 @lisp
24016 (defun gnus-summary-increase-score (&optional score symp)
24017   (interactive (gnus-interactive "P\ny"))
24018   ...
24019   )
24020 @end lisp
24021
24022 The best thing to do would have been to implement
24023 @code{gnus-interactive} as a macro which would have returned an
24024 @code{interactive} form, but this isn't possible since Emacs checks
24025 whether a function is interactive or not by simply doing an @code{assq}
24026 on the lambda form.  So, instead we have @code{gnus-interactive}
24027 function that takes a string and returns values that are usable to
24028 @code{interactive}.
24029
24030 This function accepts (almost) all normal @code{interactive} specs, but
24031 adds a few more.
24032
24033 @table @samp
24034 @item y
24035 @vindex gnus-current-prefix-symbol
24036 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
24037 variable.
24038
24039 @item Y
24040 @vindex gnus-current-prefix-symbols
24041 A list of the current symbolic prefixes---the
24042 @code{gnus-current-prefix-symbol} variable.
24043
24044 @item A
24045 The current article number---the @code{gnus-summary-article-number}
24046 function.
24047
24048 @item H
24049 The current article header---the @code{gnus-summary-article-header}
24050 function.
24051
24052 @item g
24053 The current group name---the @code{gnus-group-group-name}
24054 function.
24055
24056 @end table
24057
24058
24059 @node Emacs/XEmacs Code
24060 @subsection Emacs/XEmacs Code
24061 @cindex XEmacs
24062 @cindex Emacsen
24063
24064 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
24065 platforms must be the primary one.  I chose Emacs.  Not because I don't
24066 like XEmacs or Mule, but because it comes first alphabetically.
24067
24068 This means that Gnus will byte-compile under Emacs with nary a warning,
24069 while XEmacs will pump out gigabytes of warnings while byte-compiling.
24070 As I use byte-compilation warnings to help me root out trivial errors in
24071 Gnus, that's very useful.
24072
24073 I've also consistently used Emacs function interfaces, but have used
24074 Gnusey aliases for the functions.  To take an example:  Emacs defines a
24075 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
24076 function.  I then define a function called @code{gnus-run-at-time} that
24077 takes the same parameters as the Emacs @code{run-at-time}.  When running
24078 Gnus under Emacs, the former function is just an alias for the latter.
24079 However, when running under XEmacs, the former is an alias for the
24080 following function:
24081
24082 @lisp
24083 (defun gnus-xmas-run-at-time (time repeat function &rest args)
24084   (start-itimer
24085    "gnus-run-at-time"
24086    `(lambda ()
24087       (,function ,@@args))
24088    time repeat))
24089 @end lisp
24090
24091 This sort of thing has been done for bunches of functions.  Gnus does
24092 not redefine any native Emacs functions while running under XEmacs---it
24093 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
24094 all over.
24095
24096 In the cases where the XEmacs function interface was obviously cleaner,
24097 I used it instead.  For example @code{gnus-region-active-p} is an alias
24098 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
24099
24100 Of course, I could have chosen XEmacs as my native platform and done
24101 mapping functions the other way around.  But I didn't.  The performance
24102 hit these indirections impose on Gnus under XEmacs should be slight.
24103
24104
24105 @node Various File Formats
24106 @subsection Various File Formats
24107
24108 @menu
24109 * Active File Format::          Information on articles and groups available.
24110 * Newsgroups File Format::      Group descriptions.
24111 @end menu
24112
24113
24114 @node Active File Format
24115 @subsubsection Active File Format
24116
24117 The active file lists all groups available on the server in
24118 question.  It also lists the highest and lowest current article numbers
24119 in each group.
24120
24121 Here's an excerpt from a typical active file:
24122
24123 @example
24124 soc.motss 296030 293865 y
24125 alt.binaries.pictures.fractals 3922 3913 n
24126 comp.sources.unix 1605 1593 m
24127 comp.binaries.ibm.pc 5097 5089 y
24128 no.general 1000 900 y
24129 @end example
24130
24131 Here's a pseudo-BNF definition of this file:
24132
24133 @example
24134 active      = *group-line
24135 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
24136 group       = <non-white-space string>
24137 spc         = " "
24138 high-number = <non-negative integer>
24139 low-number  = <positive integer>
24140 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
24141 @end example
24142
24143 For a full description of this file, see the manual pages for
24144 @samp{innd}, in particular @samp{active(5)}.
24145
24146
24147 @node Newsgroups File Format
24148 @subsubsection Newsgroups File Format
24149
24150 The newsgroups file lists groups along with their descriptions.  Not all
24151 groups on the server have to be listed,  and not all groups in the file
24152 have to exist on the server.  The file is meant purely as information to
24153 the user.
24154
24155 The format is quite simple; a group name, a tab, and the description.
24156 Here's the definition:
24157
24158 @example
24159 newsgroups    = *line
24160 line          = group tab description <NEWLINE>
24161 group         = <non-white-space string>
24162 tab           = <TAB>
24163 description   = <string>
24164 @end example
24165
24166
24167 @page
24168 @node Emacs for Heathens
24169 @section Emacs for Heathens
24170
24171 Believe it or not, but some people who use Gnus haven't really used
24172 Emacs much before they embarked on their journey on the Gnus Love Boat.
24173 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
24174 region'', and ``set @code{gnus-flargblossen} to an alist where the key
24175 is a regexp that is used for matching on the group name'' are magical
24176 phrases with little or no meaning, then this appendix is for you.  If
24177 you are already familiar with Emacs, just ignore this and go fondle your
24178 cat instead.
24179
24180 @menu
24181 * Keystrokes::                  Entering text and executing commands.
24182 * Emacs Lisp::                  The built-in Emacs programming language.
24183 @end menu
24184
24185
24186 @node Keystrokes
24187 @subsection Keystrokes
24188
24189 @itemize @bullet
24190 @item
24191 Q: What is an experienced Emacs user?
24192
24193 @item
24194 A: A person who wishes that the terminal had pedals.
24195 @end itemize
24196
24197 Yes, when you use Emacs, you are apt to use the control key, the shift
24198 key and the meta key a lot.  This is very annoying to some people
24199 (notably @code{vi}le users), and the rest of us just love the hell out
24200 of it.  Just give up and submit.  Emacs really does stand for
24201 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
24202 may have heard from other disreputable sources (like the Emacs author).
24203
24204 The shift keys are normally located near your pinky fingers, and are
24205 normally used to get capital letters and stuff.  You probably use it all
24206 the time.  The control key is normally marked ``CTRL'' or something like
24207 that.  The meta key is, funnily enough, never marked as such on any
24208 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
24209 which is the meta key on this keyboard.  It's usually located somewhere
24210 to the left hand side of the keyboard, usually on the bottom row.
24211
24212 Now, us Emacs people don't say ``press the meta-control-m key'',
24213 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
24214 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
24215 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
24216 down the control key, and hold it down while you press @kbd{k}''.
24217 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
24218 the control key and then press @kbd{k}''.  Simple, ay?
24219
24220 This is somewhat complicated by the fact that not all keyboards have a
24221 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
24222 means ``press escape, release escape, press @kbd{k}''.  That's much more
24223 work than if you have a meta key, so if that's the case, I respectfully
24224 suggest you get a real keyboard with a meta key.  You can't live without
24225 it.
24226
24227
24228
24229 @node Emacs Lisp
24230 @subsection Emacs Lisp
24231
24232 Emacs is the King of Editors because it's really a Lisp interpreter.
24233 Each and every key you tap runs some Emacs Lisp code snippet, and since
24234 Emacs Lisp is an interpreted language, that means that you can configure
24235 any key to run any arbitrary code.  You just, like, do it.
24236
24237 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
24238 functions.  (These are byte-compiled for speed, but it's still
24239 interpreted.)  If you decide that you don't like the way Gnus does
24240 certain things, it's trivial to have it do something a different way.
24241 (Well, at least if you know how to write Lisp code.)  However, that's
24242 beyond the scope of this manual, so we are simply going to talk about
24243 some common constructs that you normally use in your @file{.emacs} file
24244 to customize Gnus.
24245
24246 If you want to set the variable @code{gnus-florgbnize} to four (4), you
24247 write the following:
24248
24249 @lisp
24250 (setq gnus-florgbnize 4)
24251 @end lisp
24252
24253 This function (really ``special form'') @code{setq} is the one that can
24254 set a variable to some value.  This is really all you need to know.  Now
24255 you can go and fill your @code{.emacs} file with lots of these to change
24256 how Gnus works.
24257
24258 If you have put that thing in your @code{.emacs} file, it will be read
24259 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
24260 start Emacs.  If you want to change the variable right away, simply say
24261 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
24262 previous ``form'', which is a simple @code{setq} statement here.
24263
24264 Go ahead---just try it, if you're located at your Emacs.  After you
24265 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
24266 is the return value of the form you @code{eval}ed.
24267
24268 Some pitfalls:
24269
24270 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
24271 that means:
24272
24273 @lisp
24274 (setq gnus-read-active-file 'some)
24275 @end lisp
24276
24277 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
24278 @samp{nntp.ifi.uio.no}'', that means:
24279
24280 @lisp
24281 (setq gnus-nntp-server "nntp.ifi.uio.no")
24282 @end lisp
24283
24284 So be careful not to mix up strings (the latter) with symbols (the
24285 former).  The manual is unambiguous, but it can be confusing.
24286
24287 @page
24288 @include gnus-faq.texi
24289
24290 @node Index
24291 @chapter Index
24292 @printindex cp
24293
24294 @node Key Index
24295 @chapter Key Index
24296 @printindex ky
24297
24298 @summarycontents
24299 @contents
24300 @bye
24301
24302 @iftex
24303 @iflatex
24304 \end{document}
24305 @end iflatex
24306 @end iftex
24307
24308 @c Local Variables:
24309 @c mode: texinfo
24310 @c coding: iso-8859-1
24311 @c End:
24312 % LocalWords:  BNF mucho detailmenu cindex kindex kbd
24313 % LocalWords:  findex Gnusae vindex dfn dfn samp nntp setq nnspool nntpserver
24314 % LocalWords:  nnmbox newusers Blllrph NEWGROUPS dingnusdingnusdingnus
24315 % LocalWords:  pre fab rec comp nnslashdot regex ga ga sci nnml nnbabyl nnmh
24316 % LocalWords:  nnfolder emph looong eld newsreaders defun init elc pxref