* gnus-vers.el (gnus-revision-number): Increment to 02.
[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 the 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 the 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 w3 to convert the @sc{html}, but this is
8180 controlled by the @code{gnus-article-wash-function} variable.
8181 Pre-defined functions you can use include:
8182
8183 @table @code
8184 @item gnus-article-wash-html-with-w3
8185 @findex gnus-article-wash-html-with-w3
8186 Use w3 (this is the default).
8187
8188 @item gnus-article-wash-html-with-w3m
8189 @findex gnus-article-wash-html-with-w3m
8190 Use emacs-w3m (see @uref{http://emacs-w3m.namazu.org/} for more
8191 information).
8192 @end table
8193
8194 @item W b
8195 @kindex W b (Summary)
8196 @findex gnus-article-add-buttons
8197 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8198 @xref{Article Buttons}.
8199
8200 @item W B
8201 @kindex W B (Summary)
8202 @findex gnus-article-add-buttons-to-head
8203 Add clickable buttons to the article headers
8204 (@code{gnus-article-add-buttons-to-head}).
8205
8206 @item W p
8207 @kindex W p (Summary)
8208 @findex gnus-article-verify-x-pgp-sig
8209 Verify a signed control message (@code{gnus-article-verify-x-pgp-sig}).
8210 Control messages such as @code{newgroup} and @code{checkgroups} are
8211 usually signed by the hierarchy maintainer.  You need to add the PGP
8212 public key of the maintainer to your keyring to verify the
8213 message.@footnote{PGP keys for many hierarchies are available at
8214 @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8215
8216 @item W s
8217 @kindex W s (Summary)
8218 @findex gnus-summary-force-verify-and-decrypt
8219 Verify a signed (PGP, @sc{pgp/mime} or @sc{s/mime}) message
8220 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8221
8222 @item W a
8223 @kindex W a (Summary)
8224 @findex gnus-article-strip-headers-in-body
8225 Strip headers like the @code{X-No-Archive} header from the beginning of
8226 article bodies (@code{gnus-article-strip-headers-in-body}).
8227
8228 @item W E l
8229 @kindex W E l (Summary)
8230 @findex gnus-article-strip-leading-blank-lines
8231 Remove all blank lines from the beginning of the article
8232 (@code{gnus-article-strip-leading-blank-lines}).
8233
8234 @item W E m
8235 @kindex W E m (Summary)
8236 @findex gnus-article-strip-multiple-blank-lines
8237 Replace all blank lines with empty lines and then all multiple empty
8238 lines with a single empty line.
8239 (@code{gnus-article-strip-multiple-blank-lines}).
8240
8241 @item W E t
8242 @kindex W E t (Summary)
8243 @findex gnus-article-remove-trailing-blank-lines
8244 Remove all blank lines at the end of the article
8245 (@code{gnus-article-remove-trailing-blank-lines}).
8246
8247 @item W E a
8248 @kindex W E a (Summary)
8249 @findex gnus-article-strip-blank-lines
8250 Do all the three commands above
8251 (@code{gnus-article-strip-blank-lines}).
8252
8253 @item W E A
8254 @kindex W E A (Summary)
8255 @findex gnus-article-strip-all-blank-lines
8256 Remove all blank lines
8257 (@code{gnus-article-strip-all-blank-lines}).
8258
8259 @item W E s
8260 @kindex W E s (Summary)
8261 @findex gnus-article-strip-leading-space
8262 Remove all white space from the beginning of all lines of the article
8263 body (@code{gnus-article-strip-leading-space}).
8264
8265 @item W E e
8266 @kindex W E e (Summary)
8267 @findex gnus-article-strip-trailing-space
8268 Remove all white space from the end of all lines of the article
8269 body (@code{gnus-article-strip-trailing-space}).
8270
8271 @end table
8272
8273 @xref{Customizing Articles}, for how to wash articles automatically.
8274
8275
8276 @node Article Header
8277 @subsection Article Header
8278
8279 These commands perform various transformations of article header.
8280
8281 @table @kbd
8282
8283 @item W G u
8284 @kindex W G u (Summary)
8285 @findex gnus-article-treat-unfold-headers
8286 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8287
8288 @item W G n
8289 @kindex W G n (Summary)
8290 @findex gnus-article-treat-fold-newsgroups
8291 Fold the @code{Newsgroups} and @code{Followup-To} headers
8292 (@code{gnus-article-treat-fold-newsgroups}).
8293
8294 @item W G f
8295 @kindex W G f (Summary)
8296 @findex gnus-article-treat-fold-header
8297 Fold all the message headers
8298 (@code{gnus-article-treat-fold-headers}).
8299
8300 @item W E w
8301 @kindex W E w
8302 @findex gnus-article-remove-leading-whitespace
8303 Remove excessive whitespace from all headers
8304 (@code{gnus-article-remove-leading-whitespace}).
8305
8306 @end table
8307
8308
8309 @node Article Buttons
8310 @subsection Article Buttons
8311 @cindex buttons
8312
8313 People often include references to other stuff in articles, and it would
8314 be nice if Gnus could just fetch whatever it is that people talk about
8315 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8316 button on these references.
8317
8318 Gnus adds @dfn{buttons} to certain standard references by default:
8319 Well-formed URLs, mail addresses and Message-IDs.  This is controlled by
8320 two variables, one that handles article bodies and one that handles
8321 article heads:
8322
8323 @table @code
8324
8325 @item gnus-button-alist
8326 @vindex gnus-button-alist
8327 This is an alist where each entry has this form:
8328
8329 @lisp
8330 (REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
8331 @end lisp
8332
8333 @table @var
8334
8335 @item regexp
8336 All text that match this regular expression will be considered an
8337 external reference.  Here's a typical regexp that matches embedded URLs:
8338 @samp{<URL:\\([^\n\r>]*\\)>}.
8339
8340 @item button-par
8341 Gnus has to know which parts of the matches is to be highlighted.  This
8342 is a number that says what sub-expression of the regexp is to be
8343 highlighted.  If you want it all highlighted, you use 0 here.
8344
8345 @item use-p
8346 This form will be @code{eval}ed, and if the result is non-@code{nil},
8347 this is considered a match.  This is useful if you want extra sifting to
8348 avoid false matches.
8349
8350 @item function
8351 This function will be called when you click on this button.
8352
8353 @item data-par
8354 As with @var{button-par}, this is a sub-expression number, but this one
8355 says which part of the match is to be sent as data to @var{function}.
8356
8357 @end table
8358
8359 So the full entry for buttonizing URLs is then
8360
8361 @lisp
8362 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8363 @end lisp
8364
8365 @item gnus-header-button-alist
8366 @vindex gnus-header-button-alist
8367 This is just like the other alist, except that it is applied to the
8368 article head only, and that each entry has an additional element that is
8369 used to say what headers to apply the buttonize coding to:
8370
8371 @lisp
8372 (HEADER REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
8373 @end lisp
8374
8375 @var{header} is a regular expression.
8376
8377 @item gnus-button-url-regexp
8378 @vindex gnus-button-url-regexp
8379 A regular expression that matches embedded URLs.  It is used in the
8380 default values of the variables above.
8381
8382 @item gnus-article-button-face
8383 @vindex gnus-article-button-face
8384 Face used on buttons.
8385
8386 @item gnus-article-mouse-face
8387 @vindex gnus-article-mouse-face
8388 Face used when the mouse cursor is over a button.
8389
8390 @end table
8391
8392 @xref{Customizing Articles}, for how to buttonize articles automatically.
8393
8394
8395 @node Article Date
8396 @subsection Article Date
8397
8398 The date is most likely generated in some obscure timezone you've never
8399 heard of, so it's quite nice to be able to find out what the time was
8400 when the article was sent.
8401
8402 @table @kbd
8403
8404 @item W T u
8405 @kindex W T u (Summary)
8406 @findex gnus-article-date-ut
8407 Display the date in UT (aka. GMT, aka ZULU)
8408 (@code{gnus-article-date-ut}).
8409
8410 @item W T i
8411 @kindex W T i (Summary)
8412 @findex gnus-article-date-iso8601
8413 @cindex ISO 8601
8414 Display the date in international format, aka. ISO 8601
8415 (@code{gnus-article-date-iso8601}).
8416
8417 @item W T l
8418 @kindex W T l (Summary)
8419 @findex gnus-article-date-local
8420 Display the date in the local timezone (@code{gnus-article-date-local}).
8421
8422 @item W T p
8423 @kindex W T p (Summary)
8424 @findex gnus-article-date-english
8425 Display the date in a format that's easily pronounceable in English
8426 (@code{gnus-article-date-english}).
8427
8428 @item W T s
8429 @kindex W T s (Summary)
8430 @vindex gnus-article-time-format
8431 @findex gnus-article-date-user
8432 @findex format-time-string
8433 Display the date using a user-defined format
8434 (@code{gnus-article-date-user}).  The format is specified by the
8435 @code{gnus-article-time-format} variable, and is a string that's passed
8436 to @code{format-time-string}.  See the documentation of that variable
8437 for a list of possible format specs.
8438
8439 @item W T e
8440 @kindex W T e (Summary)
8441 @findex gnus-article-date-lapsed
8442 @findex gnus-start-date-timer
8443 @findex gnus-stop-date-timer
8444 Say how much time has elapsed between the article was posted and now
8445 (@code{gnus-article-date-lapsed}).  It looks something like:
8446
8447 @example
8448 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8449 @end example
8450
8451 The value of @code{gnus-article-date-lapsed-new-header} determines
8452 whether this header will just be added below the old Date one, or will
8453 replace it.
8454
8455 An advantage of using Gnus to read mail is that it converts simple bugs
8456 into wonderful absurdities.
8457
8458 If you want to have this line updated continually, you can put
8459
8460 @lisp
8461 (gnus-start-date-timer)
8462 @end lisp
8463
8464 in your @file{.gnus.el} file, or you can run it off of some hook.  If
8465 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8466 command.
8467
8468 @item W T o
8469 @kindex W T o (Summary)
8470 @findex gnus-article-date-original
8471 Display the original date (@code{gnus-article-date-original}).  This can
8472 be useful if you normally use some other conversion function and are
8473 worried that it might be doing something totally wrong.  Say, claiming
8474 that the article was posted in 1854.  Although something like that is
8475 @emph{totally} impossible.  Don't you trust me? *titter*
8476
8477 @end table
8478
8479 @xref{Customizing Articles}, for how to display the date in your
8480 preferred format automatically.
8481
8482
8483 @node Article Display
8484 @subsection Article Display
8485 @cindex picons
8486 @cindex x-face
8487 @cindex smileys
8488
8489 These commands add various frivolous display gimmics to the article
8490 buffer in Emacs versions that support them.
8491
8492 @code{X-Face} headers are small black-and-white images supplied by the
8493 message headers (@pxref{X-Face}).
8494
8495 Picons, on the other hand, reside on your own system, and Gnus will
8496 try to match the headers to what you have (@pxref{Picons}).
8497
8498 Smileys are those little @samp{:-)} symbols that people like to litter
8499 their messages with (@pxref{Smileys}).
8500
8501 All these functions are toggles--if the elements already exist,
8502 they'll be removed.
8503
8504 @table @kbd
8505 @item W D x
8506 @kindex W D x (Summary)
8507 @findex gnus-article-display-x-face
8508 Display an @code{X-Face} in the @code{From} header.
8509 (@code{gnus-article-display-x-face}).
8510
8511 @item W D s
8512 @kindex W D s (Summary)
8513 @findex gnus-treat-smiley
8514 Display smileys (@code{gnus-treat-smiley}).
8515
8516 @item W D f
8517 @kindex W D f (Summary)
8518 @findex gnus-treat-from-picon
8519 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
8520
8521 @item W D m
8522 @kindex W D m (Summary)
8523 @findex gnus-treat-mail-picon
8524 Piconify all mail headers (i. e., @code{Cc}, @code{To})
8525 (@code{gnus-treat-mail-picon}).
8526
8527 @item W D n
8528 @kindex W D n (Summary)
8529 @findex gnus-treat-newsgroups-picon
8530 Piconify all news headers (i. e., @code{Newsgroups} and
8531 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
8532
8533 @item W D D
8534 @kindex W D D (Summary)
8535 @findex gnus-article-remove-images
8536 Remove all images from the article buffer
8537 (@code{gnus-article-remove-images}).
8538
8539 @end table
8540
8541
8542
8543 @node Article Signature
8544 @subsection Article Signature
8545 @cindex signatures
8546 @cindex article signature
8547
8548 @vindex gnus-signature-separator
8549 Each article is divided into two parts---the head and the body.  The
8550 body can be divided into a signature part and a text part.  The variable
8551 that says what is to be considered a signature is
8552 @code{gnus-signature-separator}.  This is normally the standard
8553 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
8554 non-standard signature separators, so this variable can also be a list
8555 of regular expressions to be tested, one by one.  (Searches are done
8556 from the end of the body towards the beginning.)  One likely value is:
8557
8558 @lisp
8559 (setq gnus-signature-separator
8560       '("^-- $"         ; The standard
8561         "^-- *$"        ; A common mangling
8562         "^-------*$"    ; Many people just use a looong
8563                         ; line of dashes.  Shame!
8564         "^ *--------*$" ; Double-shame!
8565         "^________*$"   ; Underscores are also popular
8566         "^========*$")) ; Pervert!
8567 @end lisp
8568
8569 The more permissive you are, the more likely it is that you'll get false
8570 positives.
8571
8572 @vindex gnus-signature-limit
8573 @code{gnus-signature-limit} provides a limit to what is considered a
8574 signature when displaying articles.
8575
8576 @enumerate
8577 @item
8578 If it is an integer, no signature may be longer (in characters) than
8579 that integer.
8580 @item
8581 If it is a floating point number, no signature may be longer (in lines)
8582 than that number.
8583 @item
8584 If it is a function, the function will be called without any parameters,
8585 and if it returns @code{nil}, there is no signature in the buffer.
8586 @item
8587 If it is a string, it will be used as a regexp.  If it matches, the text
8588 in question is not a signature.
8589 @end enumerate
8590
8591 This variable can also be a list where the elements may be of the types
8592 listed above.  Here's an example:
8593
8594 @lisp
8595 (setq gnus-signature-limit
8596       '(200.0 "^---*Forwarded article"))
8597 @end lisp
8598
8599 This means that if there are more than 200 lines after the signature
8600 separator, or the text after the signature separator is matched by
8601 the regular expression @samp{^---*Forwarded article}, then it isn't a
8602 signature after all.
8603
8604
8605 @node Article Miscellania
8606 @subsection Article Miscellania
8607
8608 @table @kbd
8609 @item A t
8610 @kindex A t (Summary)
8611 @findex gnus-article-babel
8612 Translate the article from one language to another
8613 (@code{gnus-article-babel}).
8614
8615 @end table
8616
8617
8618 @node MIME Commands
8619 @section MIME Commands
8620 @cindex MIME decoding
8621 @cindex attachments
8622 @cindex viewing attachments
8623
8624 The following commands all understand the numerical prefix.  For
8625 instance, @kbd{3 b} means ``view the third @sc{mime} part''.
8626
8627 @table @kbd
8628 @item b
8629 @itemx K v
8630 @kindex b (Summary)
8631 @kindex K v (Summary)
8632 View the @sc{mime} part.
8633
8634 @item K o
8635 @kindex K o (Summary)
8636 Save the @sc{mime} part.
8637
8638 @item K c
8639 @kindex K c (Summary)
8640 Copy the @sc{mime} part.
8641
8642 @item K e
8643 @kindex K e (Summary)
8644 View the @sc{mime} part externally.
8645
8646 @item K i
8647 @kindex K i (Summary)
8648 View the @sc{mime} part internally.
8649
8650 @item K |
8651 @kindex K | (Summary)
8652 Pipe the @sc{mime} part to an external command.
8653 @end table
8654
8655 The rest of these @sc{mime} commands do not use the numerical prefix in
8656 the same manner:
8657
8658 @table @kbd
8659 @item K b
8660 @kindex K b (Summary)
8661 Make all the @sc{mime} parts have buttons in front of them.  This is
8662 mostly useful if you wish to save (or perform other actions) on inlined
8663 parts.
8664
8665 @item K m
8666 @kindex K m (Summary)
8667 @findex gnus-summary-repair-multipart
8668 Some multipart messages are transmitted with missing or faulty headers.
8669 This command will attempt to ``repair'' these messages so that they can
8670 be viewed in a more pleasant manner
8671 (@code{gnus-summary-repair-multipart}).
8672
8673 @item X m
8674 @kindex X m (Summary)
8675 @findex gnus-summary-save-parts
8676 Save all parts matching a @sc{mime} type to a directory
8677 (@code{gnus-summary-save-parts}).  Understands the process/prefix
8678 convention (@pxref{Process/Prefix}).
8679
8680 @item M-t
8681 @kindex M-t (Summary)
8682 @findex gnus-summary-display-buttonized
8683 Toggle the buttonized display of the article buffer
8684 (@code{gnus-summary-toggle-display-buttonized}).
8685
8686 @item W M w
8687 @kindex W M w (Summary)
8688 Decode RFC 2047-encoded words in the article headers
8689 (@code{gnus-article-decode-mime-words}).
8690
8691 @item W M c
8692 @kindex W M c (Summary)
8693 Decode encoded article bodies as well as charsets
8694 (@code{gnus-article-decode-charset}).
8695
8696 This command looks in the @code{Content-Type} header to determine the
8697 charset.  If there is no such header in the article, you can give it a
8698 prefix, which will prompt for the charset to decode as.  In regional
8699 groups where people post using some common encoding (but do not
8700 include @sc{mime} headers), you can set the @code{charset} group/topic
8701 parameter to the required charset (@pxref{Group Parameters}).
8702
8703 @item W M v
8704 @kindex W M v (Summary)
8705 View all the @sc{mime} parts in the current article
8706 (@code{gnus-mime-view-all-parts}).
8707
8708 @end table
8709
8710 Relevant variables:
8711
8712 @table @code
8713 @item gnus-ignored-mime-types
8714 @vindex gnus-ignored-mime-types
8715 This is a list of regexps.  @sc{mime} types that match a regexp from
8716 this list will be completely ignored by Gnus.  The default value is
8717 @code{nil}.
8718
8719 To have all Vcards be ignored, you'd say something like this:
8720
8721 @lisp
8722 (setq gnus-ignored-mime-types
8723       '("text/x-vcard"))
8724 @end lisp
8725
8726 @item gnus-unbuttonized-mime-types
8727 @vindex gnus-unbuttonized-mime-types
8728 This is a list of regexps.  @sc{mime} types that match a regexp from
8729 this list won't have @sc{mime} buttons inserted unless they aren't
8730 displayed or this variable is overriden by
8731 @code{gnus-buttonized-mime-types}.  The default value is
8732 @code{(".*/.*")}.
8733
8734 @item gnus-buttonized-mime-types
8735 @vindex gnus-buttonized-mime-types
8736 This is a list of regexps.  @sc{mime} types that match a regexp from
8737 this list will have @sc{mime} buttons inserted unless they aren't
8738 displayed.  This variable overrides
8739 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
8740
8741 To see e.g. security buttons but no other buttons, you could set this
8742 variable to @code{("multipart/signed")} and leave
8743 @code{gnus-unbuttonized-mime-types} to the default value.
8744
8745 @item gnus-article-mime-part-function
8746 @vindex gnus-article-mime-part-function
8747 For each @sc{mime} part, this function will be called with the @sc{mime}
8748 handle as the parameter.  The function is meant to be used to allow
8749 users to gather information from the article (e. g., add Vcard info to
8750 the bbdb database) or to do actions based on parts (e. g., automatically
8751 save all jpegs into some directory).
8752
8753 Here's an example function the does the latter:
8754
8755 @lisp
8756 (defun my-save-all-jpeg-parts (handle)
8757   (when (equal (car (mm-handle-type handle)) "image/jpeg")
8758     (with-temp-buffer
8759       (insert (mm-get-part handle))
8760       (write-region (point-min) (point-max)
8761                     (read-file-name "Save jpeg to: ")))))
8762 (setq gnus-article-mime-part-function
8763       'my-save-all-jpeg-parts)
8764 @end lisp
8765
8766 @vindex gnus-mime-multipart-functions
8767 @item gnus-mime-multipart-functions
8768 Alist of @sc{mime} multipart types and functions to handle them.
8769
8770 @vindex mm-file-name-rewrite-functions
8771 @item mm-file-name-rewrite-functions
8772 List of functions used for rewriting file names of @sc{mime} parts.
8773 Each function takes a file name as input and returns a file name.
8774
8775 Ready-made functions include@*
8776 @code{mm-file-name-delete-whitespace},
8777 @code{mm-file-name-trim-whitespace},
8778 @code{mm-file-name-collapse-whitespace}, and
8779 @code{mm-file-name-replace-whitespace}.  The later uses the value of
8780 the variable @code{mm-file-name-replace-whitespace} to replace each
8781 whitespace character in a file name with that string; default value
8782 is @code{"_"} (a single underscore).
8783 @findex mm-file-name-delete-whitespace
8784 @findex mm-file-name-trim-whitespace
8785 @findex mm-file-name-collapse-whitespace
8786 @findex mm-file-name-replace-whitespace
8787 @vindex mm-file-name-replace-whitespace
8788
8789 The standard functions @code{capitalize}, @code{downcase},
8790 @code{upcase}, and @code{upcase-initials} may be useful, too.
8791
8792 Everybody knows that whitespace characters in file names are evil,
8793 except those who don't know.  If you receive lots of attachments from
8794 such unenlightened users, you can make live easier by adding
8795
8796 @lisp
8797 (setq mm-file-name-rewrite-functions
8798       '(mm-file-name-trim-whitespace
8799         mm-file-name-collapse-whitespace
8800         mm-file-name-replace-whitespace))
8801 @end lisp
8802
8803 @noindent
8804 to your @file{.gnus} file.
8805
8806 @end table
8807
8808
8809 @node Charsets
8810 @section Charsets
8811 @cindex charsets
8812
8813 People use different charsets, and we have @sc{mime} to let us know what
8814 charsets they use.  Or rather, we wish we had.  Many people use
8815 newsreaders and mailers that do not understand or use @sc{mime}, and
8816 just send out messages without saying what character sets they use.  To
8817 help a bit with this, some local news hierarchies have policies that say
8818 what character set is the default.  For instance, the @samp{fj}
8819 hierarchy uses @code{iso-2022-jp-2}.
8820
8821 @vindex gnus-group-charset-alist
8822 This knowledge is encoded in the @code{gnus-group-charset-alist}
8823 variable, which is an alist of regexps (use the first item to match full
8824 group names) and default charsets to be used when reading these groups.
8825
8826 In addition, some people do use soi-disant @sc{mime}-aware agents that
8827 aren't.  These blithely mark messages as being in @code{iso-8859-1}
8828 even if they really are in @code{koi-8}.  To help here, the
8829 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
8830 charsets that are listed here will be ignored.  The variable can be
8831 set on a group-by-group basis using the group parameters (@pxref{Group
8832 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
8833 which includes values some agents insist on having in there.
8834
8835 @vindex gnus-group-posting-charset-alist
8836 When posting, @code{gnus-group-posting-charset-alist} is used to
8837 determine which charsets should not be encoded using the @sc{mime}
8838 encodings.  For instance, some hierarchies discourage using
8839 quoted-printable header encoding.
8840
8841 This variable is an alist of regexps and permitted unencoded charsets
8842 for posting.  Each element of the alist has the form @code{(}@var{test
8843 header body-list}@code{)}, where:
8844
8845 @table @var
8846 @item test
8847 is either a regular expression matching the newsgroup header or a
8848 variable to query,
8849 @item header
8850 is the charset which may be left unencoded in the header (@code{nil}
8851 means encode all charsets),
8852 @item body-list
8853 is a list of charsets which may be encoded using 8bit content-transfer
8854 encoding in the body, or one of the special values @code{nil} (always
8855 encode using quoted-printable) or @code{t} (always use 8bit).
8856 @end table
8857
8858 @cindex Russian
8859 @cindex koi8-r
8860 @cindex koi8-u
8861 @cindex iso-8859-5
8862 @cindex coding system aliases
8863 @cindex preferred charset
8864
8865 Other charset tricks that may be useful, although not Gnus-specific:
8866
8867 If there are several @sc{mime} charsets that encode the same Emacs
8868 charset, you can choose what charset to use by saying the following:
8869
8870 @lisp
8871 (put-charset-property 'cyrillic-iso8859-5
8872                       'preferred-coding-system 'koi8-r)
8873 @end lisp
8874
8875 This means that Russian will be encoded using @code{koi8-r} instead of
8876 the default @code{iso-8859-5} @sc{mime} charset.
8877
8878 If you want to read messages in @code{koi8-u}, you can cheat and say
8879
8880 @lisp
8881 (define-coding-system-alias 'koi8-u 'koi8-r)
8882 @end lisp
8883
8884 This will almost do the right thing.
8885
8886 And finally, to read charsets like @code{windows-1251}, you can say
8887 something like
8888
8889 @lisp
8890 (codepage-setup 1251)
8891 (define-coding-system-alias 'windows-1251 'cp1251)
8892 @end lisp
8893
8894
8895 @node Article Commands
8896 @section Article Commands
8897
8898 @table @kbd
8899
8900 @item A P
8901 @cindex PostScript
8902 @cindex printing
8903 @kindex A P (Summary)
8904 @vindex gnus-ps-print-hook
8905 @findex gnus-summary-print-article
8906 Generate and print a PostScript image of the article buffer
8907 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
8908 be run just before printing the buffer.  An alternative way to print
8909 article is to use Muttprint (@pxref{Saving Articles}).
8910
8911 @end table
8912
8913
8914 @node Summary Sorting
8915 @section Summary Sorting
8916 @cindex summary sorting
8917
8918 You can have the summary buffer sorted in various ways, even though I
8919 can't really see why you'd want that.
8920
8921 @table @kbd
8922
8923 @item C-c C-s C-n
8924 @kindex C-c C-s C-n (Summary)
8925 @findex gnus-summary-sort-by-number
8926 Sort by article number (@code{gnus-summary-sort-by-number}).
8927
8928 @item C-c C-s C-a
8929 @kindex C-c C-s C-a (Summary)
8930 @findex gnus-summary-sort-by-author
8931 Sort by author (@code{gnus-summary-sort-by-author}).
8932
8933 @item C-c C-s C-s
8934 @kindex C-c C-s C-s (Summary)
8935 @findex gnus-summary-sort-by-subject
8936 Sort by subject (@code{gnus-summary-sort-by-subject}).
8937
8938 @item C-c C-s C-d
8939 @kindex C-c C-s C-d (Summary)
8940 @findex gnus-summary-sort-by-date
8941 Sort by date (@code{gnus-summary-sort-by-date}).
8942
8943 @item C-c C-s C-l
8944 @kindex C-c C-s C-l (Summary)
8945 @findex gnus-summary-sort-by-lines
8946 Sort by lines (@code{gnus-summary-sort-by-lines}).
8947
8948 @item C-c C-s C-c
8949 @kindex C-c C-s C-c (Summary)
8950 @findex gnus-summary-sort-by-chars
8951 Sort by article length (@code{gnus-summary-sort-by-chars}).
8952
8953 @item C-c C-s C-i
8954 @kindex C-c C-s C-i (Summary)
8955 @findex gnus-summary-sort-by-score
8956 Sort by score (@code{gnus-summary-sort-by-score}).
8957
8958 @item C-c C-s C-o
8959 @kindex C-c C-s C-o (Summary)
8960 @findex gnus-summary-sort-by-original
8961 Sort using the default sorting method
8962 (@code{gnus-summary-sort-by-original}).
8963 @end table
8964
8965 These functions will work both when you use threading and when you don't
8966 use threading.  In the latter case, all summary lines will be sorted,
8967 line by line.  In the former case, sorting will be done on a
8968 root-by-root basis, which might not be what you were looking for.  To
8969 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
8970 Commands}).
8971
8972
8973 @node Finding the Parent
8974 @section Finding the Parent
8975 @cindex parent articles
8976 @cindex referring articles
8977
8978 @table @kbd
8979 @item ^
8980 @kindex ^ (Summary)
8981 @findex gnus-summary-refer-parent-article
8982 If you'd like to read the parent of the current article, and it is not
8983 displayed in the summary buffer, you might still be able to.  That is,
8984 if the current group is fetched by @sc{nntp}, the parent hasn't expired
8985 and the @code{References} in the current article are not mangled, you
8986 can just press @kbd{^} or @kbd{A r}
8987 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
8988 you'll get the parent.  If the parent is already displayed in the
8989 summary buffer, point will just move to this article.
8990
8991 If given a positive numerical prefix, fetch that many articles back into
8992 the ancestry.  If given a negative numerical prefix, fetch just that
8993 ancestor.  So if you say @kbd{3 ^}, gnus will fetch the parent, the
8994 grandparent and the grandgrandparent of the current article.  If you say
8995 @kbd{-3 ^}, gnus will only fetch the grandgrandparent of the current
8996 article.
8997
8998 @item A R (Summary)
8999 @findex gnus-summary-refer-references
9000 @kindex A R (Summary)
9001 Fetch all articles mentioned in the @code{References} header of the
9002 article (@code{gnus-summary-refer-references}).
9003
9004 @item A T (Summary)
9005 @findex gnus-summary-refer-thread
9006 @kindex A T (Summary)
9007 Display the full thread where the current article appears
9008 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9009 headers in the current group to work, so it usually takes a while.  If
9010 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9011 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9012 visible effects normally, but it'll make this command work a whole lot
9013 faster.  Of course, it'll make group entry somewhat slow.
9014
9015 @vindex gnus-refer-thread-limit
9016 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9017 articles before the first displayed in the current group) headers to
9018 fetch when doing this command.  The default is 200.  If @code{t}, all
9019 the available headers will be fetched.  This variable can be overridden
9020 by giving the @kbd{A T} command a numerical prefix.
9021
9022 @item M-^ (Summary)
9023 @findex gnus-summary-refer-article
9024 @kindex M-^ (Summary)
9025 @cindex Message-ID
9026 @cindex fetching by Message-ID
9027 You can also ask the @sc{nntp} server for an arbitrary article, no
9028 matter what group it belongs to.  @kbd{M-^}
9029 (@code{gnus-summary-refer-article}) will ask you for a
9030 @code{Message-ID}, which is one of those long, hard-to-read thingies
9031 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9032 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9033 @end table
9034
9035 The current select method will be used when fetching by
9036 @code{Message-ID} from non-news select method, but you can override this
9037 by giving this command a prefix.
9038
9039 @vindex gnus-refer-article-method
9040 If the group you are reading is located on a back end that does not
9041 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9042 you can set @code{gnus-refer-article-method} to an @sc{nntp} method.  It
9043 would, perhaps, be best if the @sc{nntp} server you consult is the one
9044 updating the spool you are reading from, but that's not really
9045 necessary.
9046
9047 It can also be a list of select methods, as well as the special symbol
9048 @code{current}, which means to use the current select method.  If it
9049 is a list, Gnus will try all the methods in the list until it finds a
9050 match.
9051
9052 Here's an example setting that will first try the current method, and
9053 then ask Deja if that fails:
9054
9055 @lisp
9056 (setq gnus-refer-article-method
9057       '(current
9058         (nnweb "refer" (nnweb-type dejanews))))
9059 @end lisp
9060
9061 Most of the mail back ends support fetching by @code{Message-ID}, but
9062 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9063 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9064 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9065 only able to locate articles that have been posted to the current group.
9066 (Anything else would be too time consuming.)  @code{nnmh} does not
9067 support this at all.
9068
9069
9070 @node Alternative Approaches
9071 @section Alternative Approaches
9072
9073 Different people like to read news using different methods.  This being
9074 gnus, we offer a small selection of minor modes for the summary buffers.
9075
9076 @menu
9077 * Pick and Read::               First mark articles and then read them.
9078 * Binary Groups::               Auto-decode all articles.
9079 @end menu
9080
9081
9082 @node Pick and Read
9083 @subsection Pick and Read
9084 @cindex pick and read
9085
9086 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9087 a two-phased reading interface.  The user first marks in a summary
9088 buffer the articles she wants to read.  Then she starts reading the
9089 articles with just an article buffer displayed.
9090
9091 @findex gnus-pick-mode
9092 @kindex M-x gnus-pick-mode
9093 Gnus provides a summary buffer minor mode that allows
9094 this---@code{gnus-pick-mode}.  This basically means that a few process
9095 mark commands become one-keystroke commands to allow easy marking, and
9096 it provides one additional command for switching to the summary buffer.
9097
9098 Here are the available keystrokes when using pick mode:
9099
9100 @table @kbd
9101 @item .
9102 @kindex . (Pick)
9103 @findex gnus-pick-article-or-thread
9104 Pick the article or thread on the current line
9105 (@code{gnus-pick-article-or-thread}).  If the variable
9106 @code{gnus-thread-hide-subtree} is true, then this key selects the
9107 entire thread when used at the first article of the thread.  Otherwise,
9108 it selects just the article.  If given a numerical prefix, go to that
9109 thread or article and pick it.  (The line number is normally displayed
9110 at the beginning of the summary pick lines.)
9111
9112 @item SPACE
9113 @kindex SPACE (Pick)
9114 @findex gnus-pick-next-page
9115 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9116 at the end of the buffer, start reading the picked articles.
9117
9118 @item u
9119 @kindex u (Pick)
9120 @findex gnus-pick-unmark-article-or-thread.
9121 Unpick the thread or article
9122 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9123 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9124 thread if used at the first article of the thread.  Otherwise it unpicks
9125 just the article.  You can give this key a numerical prefix to unpick
9126 the thread or article at that line.
9127
9128 @item RET
9129 @kindex RET (Pick)
9130 @findex gnus-pick-start-reading
9131 @vindex gnus-pick-display-summary
9132 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9133 given a prefix, mark all unpicked articles as read first.  If
9134 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9135 will still be visible when you are reading.
9136
9137 @end table
9138
9139 All the normal summary mode commands are still available in the
9140 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9141 which is mapped to the same function
9142 @code{gnus-summary-tick-article-forward}.
9143
9144 If this sounds like a good idea to you, you could say:
9145
9146 @lisp
9147 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9148 @end lisp
9149
9150 @vindex gnus-pick-mode-hook
9151 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9152
9153 @vindex gnus-mark-unpicked-articles-as-read
9154 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9155 all unpicked articles as read.  The default is @code{nil}.
9156
9157 @vindex gnus-summary-pick-line-format
9158 The summary line format in pick mode is slightly different from the
9159 standard format.  At the beginning of each line the line number is
9160 displayed.  The pick mode line format is controlled by the
9161 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9162 Variables}).  It accepts the same format specs that
9163 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9164
9165
9166 @node Binary Groups
9167 @subsection Binary Groups
9168 @cindex binary groups
9169
9170 @findex gnus-binary-mode
9171 @kindex M-x gnus-binary-mode
9172 If you spend much time in binary groups, you may grow tired of hitting
9173 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9174 is a minor mode for summary buffers that makes all ordinary Gnus article
9175 selection functions uudecode series of articles and display the result
9176 instead of just displaying the articles the normal way.
9177
9178 @kindex g (Binary)
9179 @findex gnus-binary-show-article
9180 The only way, in fact, to see the actual articles is the @kbd{g}
9181 command, when you have turned on this mode
9182 (@code{gnus-binary-show-article}).
9183
9184 @vindex gnus-binary-mode-hook
9185 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9186
9187
9188 @node Tree Display
9189 @section Tree Display
9190 @cindex trees
9191
9192 @vindex gnus-use-trees
9193 If you don't like the normal gnus summary display, you might try setting
9194 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9195 additional @dfn{tree buffer}.  You can execute all summary mode commands
9196 in the tree buffer.
9197
9198 There are a few variables to customize the tree display, of course:
9199
9200 @table @code
9201 @item gnus-tree-mode-hook
9202 @vindex gnus-tree-mode-hook
9203 A hook called in all tree mode buffers.
9204
9205 @item gnus-tree-mode-line-format
9206 @vindex gnus-tree-mode-line-format
9207 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9208 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9209 of valid specs, @pxref{Summary Buffer Mode Line}.
9210
9211 @item gnus-selected-tree-face
9212 @vindex gnus-selected-tree-face
9213 Face used for highlighting the selected article in the tree buffer.  The
9214 default is @code{modeline}.
9215
9216 @item gnus-tree-line-format
9217 @vindex gnus-tree-line-format
9218 A format string for the tree nodes.  The name is a bit of a misnomer,
9219 though---it doesn't define a line, but just the node.  The default value
9220 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9221 the name of the poster.  It is vital that all nodes are of the same
9222 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9223
9224 Valid specs are:
9225
9226 @table @samp
9227 @item n
9228 The name of the poster.
9229 @item f
9230 The @code{From} header.
9231 @item N
9232 The number of the article.
9233 @item [
9234 The opening bracket.
9235 @item ]
9236 The closing bracket.
9237 @item s
9238 The subject.
9239 @end table
9240
9241 @xref{Formatting Variables}.
9242
9243 Variables related to the display are:
9244
9245 @table @code
9246 @item gnus-tree-brackets
9247 @vindex gnus-tree-brackets
9248 This is used for differentiating between ``real'' articles and
9249 ``sparse'' articles.  The format is @code{((@var{real-open} . @var{real-close})
9250 (@var{sparse-open} . @var{sparse-close}) (@var{dummy-open} . @var{dummy-close}))}, and the
9251 default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9252
9253 @item gnus-tree-parent-child-edges
9254 @vindex gnus-tree-parent-child-edges
9255 This is a list that contains the characters used for connecting parent
9256 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9257
9258 @end table
9259
9260 @item gnus-tree-minimize-window
9261 @vindex gnus-tree-minimize-window
9262 If this variable is non-@code{nil}, gnus will try to keep the tree
9263 buffer as small as possible to allow more room for the other gnus
9264 windows.  If this variable is a number, the tree buffer will never be
9265 higher than that number.  The default is @code{t}.  Note that if you
9266 have several windows displayed side-by-side in a frame and the tree
9267 buffer is one of these, minimizing the tree window will also resize all
9268 other windows displayed next to it.
9269
9270 You may also wish to add the following hook to keep the window minimized
9271 at all times:
9272
9273 @lisp
9274 (add-hook 'gnus-configure-windows-hook
9275           'gnus-tree-perhaps-minimize)
9276 @end lisp
9277
9278 @item gnus-generate-tree-function
9279 @vindex gnus-generate-tree-function
9280 @findex gnus-generate-horizontal-tree
9281 @findex gnus-generate-vertical-tree
9282 The function that actually generates the thread tree.  Two predefined
9283 functions are available: @code{gnus-generate-horizontal-tree} and
9284 @code{gnus-generate-vertical-tree} (which is the default).
9285
9286 @end table
9287
9288 Here's an example from a horizontal tree buffer:
9289
9290 @example
9291 @{***@}-(***)-[odd]-[Gun]
9292      |      \[Jan]
9293      |      \[odd]-[Eri]
9294      |      \(***)-[Eri]
9295      |            \[odd]-[Paa]
9296      \[Bjo]
9297      \[Gun]
9298      \[Gun]-[Jor]
9299 @end example
9300
9301 Here's the same thread displayed in a vertical tree buffer:
9302
9303 @example
9304 @{***@}
9305   |--------------------------\-----\-----\
9306 (***)                         [Bjo] [Gun] [Gun]
9307   |--\-----\-----\                          |
9308 [odd] [Jan] [odd] (***)                   [Jor]
9309   |           |     |--\
9310 [Gun]       [Eri] [Eri] [odd]
9311                           |
9312                         [Paa]
9313 @end example
9314
9315 If you're using horizontal trees, it might be nice to display the trees
9316 side-by-side with the summary buffer.  You could add something like the
9317 following to your @file{.gnus.el} file:
9318
9319 @lisp
9320 (setq gnus-use-trees t
9321       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9322       gnus-tree-minimize-window nil)
9323 (gnus-add-configuration
9324  '(article
9325    (vertical 1.0
9326              (horizontal 0.25
9327                          (summary 0.75 point)
9328                          (tree 1.0))
9329              (article 1.0))))
9330 @end lisp
9331
9332 @xref{Window Layout}.
9333
9334
9335 @node Mail Group Commands
9336 @section Mail Group Commands
9337 @cindex mail group commands
9338
9339 Some commands only make sense in mail groups.  If these commands are
9340 invalid in the current group, they will raise a hell and let you know.
9341
9342 All these commands (except the expiry and edit commands) use the
9343 process/prefix convention (@pxref{Process/Prefix}).
9344
9345 @table @kbd
9346
9347 @item B e
9348 @kindex B e (Summary)
9349 @findex gnus-summary-expire-articles
9350 Run all expirable articles in the current group through the expiry
9351 process (@code{gnus-summary-expire-articles}).  That is, delete all
9352 expirable articles in the group that have been around for a while.
9353 (@pxref{Expiring Mail}).
9354
9355 @item B C-M-e
9356 @kindex B C-M-e (Summary)
9357 @findex gnus-summary-expire-articles-now
9358 Delete all the expirable articles in the group
9359 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9360 articles eligible for expiry in the current group will
9361 disappear forever into that big @file{/dev/null} in the sky.
9362
9363 @item B DEL
9364 @kindex B DEL (Summary)
9365 @findex gnus-summary-delete-article
9366 @c @icon{gnus-summary-mail-delete}
9367 Delete the mail article.  This is ``delete'' as in ``delete it from your
9368 disk forever and ever, never to return again.'' Use with caution.
9369 (@code{gnus-summary-delete-article}).
9370
9371 @item B m
9372 @kindex B m (Summary)
9373 @cindex move mail
9374 @findex gnus-summary-move-article
9375 @vindex gnus-preserve-marks
9376 Move the article from one mail group to another
9377 (@code{gnus-summary-move-article}).  Marks will be preserved if
9378 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9379
9380 @item B c
9381 @kindex B c (Summary)
9382 @cindex copy mail
9383 @findex gnus-summary-copy-article
9384 @c @icon{gnus-summary-mail-copy}
9385 Copy the article from one group (mail group or not) to a mail group
9386 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9387 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9388
9389 @item B B
9390 @kindex B B (Summary)
9391 @cindex crosspost mail
9392 @findex gnus-summary-crosspost-article
9393 Crosspost the current article to some other group
9394 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9395 the article in the other group, and the Xref headers of the article will
9396 be properly updated.
9397
9398 @item B i
9399 @kindex B i (Summary)
9400 @findex gnus-summary-import-article
9401 Import an arbitrary file into the current mail newsgroup
9402 (@code{gnus-summary-import-article}).  You will be prompted for a file
9403 name, a @code{From} header and a @code{Subject} header.
9404
9405 @item B I
9406 @kindex B I (Summary)
9407 @findex gnus-summary-create-article
9408 Create an empty article in the current mail newsgroups
9409 (@code{gnus-summary-create-article}).  You will be prompted for a
9410 @code{From} header and a @code{Subject} header.
9411
9412 @item B r
9413 @kindex B r (Summary)
9414 @findex gnus-summary-respool-article
9415 Respool the mail article (@code{gnus-summary-respool-article}).
9416 @code{gnus-summary-respool-default-method} will be used as the default
9417 select method when respooling.  This variable is @code{nil} by default,
9418 which means that the current group select method will be used instead.
9419 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9420 (which is the default).
9421
9422 @item B w
9423 @itemx e
9424 @kindex B w (Summary)
9425 @kindex e (Summary)
9426 @findex gnus-summary-edit-article
9427 @kindex C-c C-c (Article)
9428 @findex gnus-summary-edit-article-done
9429 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9430 editing and make the changes permanent, type @kbd{C-c C-c}
9431 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9432 @kbd{C-c C-c} command, gnus won't re-highlight the article.
9433
9434 @item B q
9435 @kindex B q (Summary)
9436 @findex gnus-summary-respool-query
9437 If you want to re-spool an article, you might be curious as to what group
9438 the article will end up in before you do the re-spooling.  This command
9439 will tell you (@code{gnus-summary-respool-query}).
9440
9441 @item B t
9442 @kindex B t (Summary)
9443 @findex gnus-summary-respool-trace
9444 Similarly, this command will display all fancy splitting patterns used
9445 when repooling, if any (@code{gnus-summary-respool-trace}).
9446
9447 @item B p
9448 @kindex B p (Summary)
9449 @findex gnus-summary-article-posted-p
9450 Some people have a tendency to send you "courtesy" copies when they
9451 follow up to articles you have posted.  These usually have a
9452 @code{Newsgroups} header in them, but not always.  This command
9453 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9454 article from your news server (or rather, from
9455 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9456 report back whether it found the article or not.  Even if it says that
9457 it didn't find the article, it may have been posted anyway---mail
9458 propagation is much faster than news propagation, and the news copy may
9459 just not have arrived yet.
9460
9461 @item K E
9462 @kindex K E (Summary)
9463 @findex gnus-article-encrypt-body
9464 @vindex gnus-article-encrypt-protocol
9465 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
9466 The body is encrypted with the encryption protocol specified by the
9467 variable @code{gnus-article-encrypt-protocol}.
9468
9469 @end table
9470
9471 @vindex gnus-move-split-methods
9472 @cindex moving articles
9473 If you move (or copy) articles regularly, you might wish to have gnus
9474 suggest where to put the articles.  @code{gnus-move-split-methods} is a
9475 variable that uses the same syntax as @code{gnus-split-methods}
9476 (@pxref{Saving Articles}).  You may customize that variable to create
9477 suggestions you find reasonable.  (Note that
9478 @code{gnus-move-split-methods} uses group names where
9479 @code{gnus-split-methods} uses file names.)
9480
9481 @lisp
9482 (setq gnus-move-split-methods
9483       '(("^From:.*Lars Magne" "nnml:junk")
9484         ("^Subject:.*gnus" "nnfolder:important")
9485         (".*" "nnml:misc")))
9486 @end lisp
9487
9488
9489 @node Various Summary Stuff
9490 @section Various Summary Stuff
9491
9492 @menu
9493 * Summary Group Information::   Information oriented commands.
9494 * Searching for Articles::      Multiple article commands.
9495 * Summary Generation Commands::  
9496 * Really Various Summary Commands::  Those pesky non-conformant commands.
9497 @end menu
9498
9499 @table @code
9500 @vindex gnus-summary-mode-hook
9501 @item gnus-summary-mode-hook
9502 This hook is called when creating a summary mode buffer.
9503
9504 @vindex gnus-summary-generate-hook
9505 @item gnus-summary-generate-hook
9506 This is called as the last thing before doing the threading and the
9507 generation of the summary buffer.  It's quite convenient for customizing
9508 the threading variables based on what data the newsgroup has.  This hook
9509 is called from the summary buffer after most summary buffer variables
9510 have been set.
9511
9512 @vindex gnus-summary-prepare-hook
9513 @item gnus-summary-prepare-hook
9514 It is called after the summary buffer has been generated.  You might use
9515 it to, for instance, highlight lines or modify the look of the buffer in
9516 some other ungodly manner.  I don't care.
9517
9518 @vindex gnus-summary-prepared-hook
9519 @item gnus-summary-prepared-hook
9520 A hook called as the very last thing after the summary buffer has been
9521 generated.
9522
9523 @vindex gnus-summary-ignore-duplicates
9524 @item gnus-summary-ignore-duplicates
9525 When gnus discovers two articles that have the same @code{Message-ID},
9526 it has to do something drastic.  No articles are allowed to have the
9527 same @code{Message-ID}, but this may happen when reading mail from some
9528 sources.  Gnus allows you to customize what happens with this variable.
9529 If it is @code{nil} (which is the default), gnus will rename the
9530 @code{Message-ID} (for display purposes only) and display the article as
9531 any other article.  If this variable is @code{t}, it won't display the
9532 article---it'll be as if it never existed.
9533
9534 @vindex gnus-alter-articles-to-read-function
9535 @item gnus-alter-articles-to-read-function
9536 This function, which takes two parameters (the group name and the list
9537 of articles to be selected), is called to allow the user to alter the
9538 list of articles to be selected.
9539
9540 For instance, the following function adds the list of cached articles to
9541 the list in one particular group:
9542
9543 @lisp
9544 (defun my-add-cached-articles (group articles)
9545   (if (string= group "some.group")
9546       (append gnus-newsgroup-cached articles)
9547     articles))
9548 @end lisp
9549
9550 @vindex gnus-newsgroup-variables
9551 @item gnus-newsgroup-variables
9552 A list of newsgroup (summary buffer) local variables, or cons of
9553 variables and their default values (when the default values are not
9554 nil), that should be made global while the summary buffer is active.
9555 These variables can be used to set variables in the group parameters
9556 while still allowing them to affect operations done in other
9557 buffers. For example:
9558
9559 @lisp
9560 (setq gnus-newsgroup-variables
9561      '(message-use-followup-to
9562        (gnus-visible-headers .
9563          "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
9564 @end lisp
9565
9566 @end table
9567
9568
9569 @node Summary Group Information
9570 @subsection Summary Group Information
9571
9572 @table @kbd
9573
9574 @item H f
9575 @kindex H f (Summary)
9576 @findex gnus-summary-fetch-faq
9577 @vindex gnus-group-faq-directory
9578 Try to fetch the FAQ (list of frequently asked questions) for the
9579 current group (@code{gnus-summary-fetch-faq}).  Gnus will try to get the
9580 FAQ from @code{gnus-group-faq-directory}, which is usually a directory
9581 on a remote machine.  This variable can also be a list of directories.
9582 In that case, giving a prefix to this command will allow you to choose
9583 between the various sites.  @code{ange-ftp} or @code{efs} will probably
9584 be used for fetching the file.
9585
9586 @item H d
9587 @kindex H d (Summary)
9588 @findex gnus-summary-describe-group
9589 Give a brief description of the current group
9590 (@code{gnus-summary-describe-group}).  If given a prefix, force
9591 rereading the description from the server.
9592
9593 @item H h
9594 @kindex H h (Summary)
9595 @findex gnus-summary-describe-briefly
9596 Give an extremely brief description of the most important summary
9597 keystrokes (@code{gnus-summary-describe-briefly}).
9598
9599 @item H i
9600 @kindex H i (Summary)
9601 @findex gnus-info-find-node
9602 Go to the gnus info node (@code{gnus-info-find-node}).
9603 @end table
9604
9605
9606 @node Searching for Articles
9607 @subsection Searching for Articles
9608
9609 @table @kbd
9610
9611 @item M-s
9612 @kindex M-s (Summary)
9613 @findex gnus-summary-search-article-forward
9614 Search through all subsequent (raw) articles for a regexp
9615 (@code{gnus-summary-search-article-forward}).
9616
9617 @item M-r
9618 @kindex M-r (Summary)
9619 @findex gnus-summary-search-article-backward
9620 Search through all previous (raw) articles for a regexp
9621 (@code{gnus-summary-search-article-backward}).
9622
9623 @item &
9624 @kindex & (Summary)
9625 @findex gnus-summary-execute-command
9626 This command will prompt you for a header, a regular expression to match
9627 on this field, and a command to be executed if the match is made
9628 (@code{gnus-summary-execute-command}).  If the header is an empty
9629 string, the match is done on the entire article.  If given a prefix,
9630 search backward instead.
9631
9632 For instance, @kbd{& RET some.*string #} will put the process mark on
9633 all articles that have heads or bodies that match @samp{some.*string}.
9634
9635 @item M-&
9636 @kindex M-& (Summary)
9637 @findex gnus-summary-universal-argument
9638 Perform any operation on all articles that have been marked with
9639 the process mark (@code{gnus-summary-universal-argument}).
9640 @end table
9641
9642 @node Summary Generation Commands
9643 @subsection Summary Generation Commands
9644
9645 @table @kbd
9646
9647 @item Y g
9648 @kindex Y g (Summary)
9649 @findex gnus-summary-prepare
9650 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
9651
9652 @item Y c
9653 @kindex Y c (Summary)
9654 @findex gnus-summary-insert-cached-articles
9655 Pull all cached articles (for the current group) into the summary buffer
9656 (@code{gnus-summary-insert-cached-articles}).
9657
9658 @end table
9659
9660
9661 @node Really Various Summary Commands
9662 @subsection Really Various Summary Commands
9663
9664 @table @kbd
9665
9666 @item A D
9667 @itemx C-d
9668 @kindex C-d (Summary)
9669 @kindex A D (Summary)
9670 @findex gnus-summary-enter-digest-group
9671 If the current article is a collection of other articles (for instance,
9672 a digest), you might use this command to enter a group based on the that
9673 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
9674 guess what article type is currently displayed unless you give a prefix
9675 to this command, which forces a ``digest'' interpretation.  Basically,
9676 whenever you see a message that is a collection of other messages of
9677 some format, you @kbd{C-d} and read these messages in a more convenient
9678 fashion.
9679
9680 @item C-M-d
9681 @kindex C-M-d (Summary)
9682 @findex gnus-summary-read-document
9683 This command is very similar to the one above, but lets you gather
9684 several documents into one biiig group
9685 (@code{gnus-summary-read-document}).  It does this by opening several
9686 @code{nndoc} groups for each document, and then opening an
9687 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
9688 command understands the process/prefix convention
9689 (@pxref{Process/Prefix}).
9690
9691 @item C-t
9692 @kindex C-t (Summary)
9693 @findex gnus-summary-toggle-truncation
9694 Toggle truncation of summary lines
9695 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
9696 line centering function in the summary buffer, so it's not a good idea
9697 to have truncation switched off while reading articles.
9698
9699 @item =
9700 @kindex = (Summary)
9701 @findex gnus-summary-expand-window
9702 Expand the summary buffer window (@code{gnus-summary-expand-window}).
9703 If given a prefix, force an @code{article} window configuration.
9704
9705 @item C-M-e
9706 @kindex C-M-e (Summary)
9707 @findex gnus-summary-edit-parameters
9708 Edit the group parameters (@pxref{Group Parameters}) of the current
9709 group (@code{gnus-summary-edit-parameters}).
9710
9711 @item C-M-a
9712 @kindex C-M-a (Summary)
9713 @findex gnus-summary-customize-parameters
9714 Customize the group parameters (@pxref{Group Parameters}) of the current
9715 group (@code{gnus-summary-customize-parameters}).
9716
9717 @end table
9718
9719
9720 @node Exiting the Summary Buffer
9721 @section Exiting the Summary Buffer
9722 @cindex summary exit
9723 @cindex exiting groups
9724
9725 Exiting from the summary buffer will normally update all info on the
9726 group and return you to the group buffer.
9727
9728 @table @kbd
9729
9730 @item Z Z
9731 @itemx q
9732 @kindex Z Z (Summary)
9733 @kindex q (Summary)
9734 @findex gnus-summary-exit
9735 @vindex gnus-summary-exit-hook
9736 @vindex gnus-summary-prepare-exit-hook
9737 @c @icon{gnus-summary-exit}
9738 Exit the current group and update all information on the group
9739 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
9740 called before doing much of the exiting, which calls
9741 @code{gnus-summary-expire-articles} by default.
9742 @code{gnus-summary-exit-hook} is called after finishing the exit
9743 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
9744 group mode having no more (unread) groups.
9745
9746 @item Z E
9747 @itemx Q
9748 @kindex Z E (Summary)
9749 @kindex Q (Summary)
9750 @findex gnus-summary-exit-no-update
9751 Exit the current group without updating any information on the group
9752 (@code{gnus-summary-exit-no-update}).
9753
9754 @item Z c
9755 @itemx c
9756 @kindex Z c (Summary)
9757 @kindex c (Summary)
9758 @findex gnus-summary-catchup-and-exit
9759 @c @icon{gnus-summary-catchup-and-exit}
9760 Mark all unticked articles in the group as read and then exit
9761 (@code{gnus-summary-catchup-and-exit}).
9762
9763 @item Z C
9764 @kindex Z C (Summary)
9765 @findex gnus-summary-catchup-all-and-exit
9766 Mark all articles, even the ticked ones, as read and then exit
9767 (@code{gnus-summary-catchup-all-and-exit}).
9768
9769 @item Z n
9770 @kindex Z n (Summary)
9771 @findex gnus-summary-catchup-and-goto-next-group
9772 Mark all articles as read and go to the next group
9773 (@code{gnus-summary-catchup-and-goto-next-group}).
9774
9775 @item Z R
9776 @kindex Z R (Summary)
9777 @findex gnus-summary-reselect-current-group
9778 Exit this group, and then enter it again
9779 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
9780 all articles, both read and unread.
9781
9782 @item Z G
9783 @itemx M-g
9784 @kindex Z G (Summary)
9785 @kindex M-g (Summary)
9786 @findex gnus-summary-rescan-group
9787 @c @icon{gnus-summary-mail-get}
9788 Exit the group, check for new articles in the group, and select the
9789 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
9790 articles, both read and unread.
9791
9792 @item Z N
9793 @kindex Z N (Summary)
9794 @findex gnus-summary-next-group
9795 Exit the group and go to the next group
9796 (@code{gnus-summary-next-group}).
9797
9798 @item Z P
9799 @kindex Z P (Summary)
9800 @findex gnus-summary-prev-group
9801 Exit the group and go to the previous group
9802 (@code{gnus-summary-prev-group}).
9803
9804 @item Z s
9805 @kindex Z s (Summary)
9806 @findex gnus-summary-save-newsrc
9807 Save the current number of read/marked articles in the dribble buffer
9808 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
9809 given a prefix, also save the @file{.newsrc} file(s).  Using this
9810 command will make exit without updating (the @kbd{Q} command) worthless.
9811 @end table
9812
9813 @vindex gnus-exit-group-hook
9814 @code{gnus-exit-group-hook} is called when you exit the current group
9815 with an ``updating'' exit.  For instance @kbd{Q}
9816 (@code{gnus-summary-exit-no-update}) does not call this hook.
9817
9818 @findex gnus-summary-wake-up-the-dead
9819 @findex gnus-dead-summary-mode
9820 @vindex gnus-kill-summary-on-exit
9821 If you're in the habit of exiting groups, and then changing your mind
9822 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
9823 If you do that, gnus won't kill the summary buffer when you exit it.
9824 (Quelle surprise!)  Instead it will change the name of the buffer to
9825 something like @samp{*Dead Summary ... *} and install a minor mode
9826 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
9827 buffer, you'll find that all keys are mapped to a function called
9828 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
9829 summary buffer will result in a live, normal summary buffer.
9830
9831 There will never be more than one dead summary buffer at any one time.
9832
9833 @vindex gnus-use-cross-reference
9834 The data on the current group will be updated (which articles you have
9835 read, which articles you have replied to, etc.) when you exit the
9836 summary buffer.  If the @code{gnus-use-cross-reference} variable is
9837 @code{t} (which is the default), articles that are cross-referenced to
9838 this group and are marked as read, will also be marked as read in the
9839 other subscribed groups they were cross-posted to.  If this variable is
9840 neither @code{nil} nor @code{t}, the article will be marked as read in
9841 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
9842
9843
9844 @node Crosspost Handling
9845 @section Crosspost Handling
9846
9847 @cindex velveeta
9848 @cindex spamming
9849 Marking cross-posted articles as read ensures that you'll never have to
9850 read the same article more than once.  Unless, of course, somebody has
9851 posted it to several groups separately.  Posting the same article to
9852 several groups (not cross-posting) is called @dfn{spamming}, and you are
9853 by law required to send nasty-grams to anyone who perpetrates such a
9854 heinous crime.  You may want to try NoCeM handling to filter out spam
9855 (@pxref{NoCeM}).
9856
9857 Remember: Cross-posting is kinda ok, but posting the same article
9858 separately to several groups is not.  Massive cross-posting (aka.
9859 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
9860 @code{gnus-summary-mail-crosspost-complaint} command to complain about
9861 excessive crossposting (@pxref{Summary Mail Commands}).
9862
9863 @cindex cross-posting
9864 @cindex Xref
9865 @cindex @sc{nov}
9866 One thing that may cause Gnus to not do the cross-posting thing
9867 correctly is if you use an @sc{nntp} server that supports @sc{xover}
9868 (which is very nice, because it speeds things up considerably) which
9869 does not include the @code{Xref} header in its @sc{nov} lines.  This is
9870 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
9871 even with @sc{xover} by registering the @code{Xref} lines of all
9872 articles you actually read, but if you kill the articles, or just mark
9873 them as read without reading them, Gnus will not get a chance to snoop
9874 the @code{Xref} lines out of these articles, and will be unable to use
9875 the cross reference mechanism.
9876
9877 @cindex LIST overview.fmt
9878 @cindex overview.fmt
9879 To check whether your @sc{nntp} server includes the @code{Xref} header
9880 in its overview files, try @samp{telnet your.nntp.server nntp},
9881 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
9882 overview.fmt}.  This may not work, but if it does, and the last line you
9883 get does not read @samp{Xref:full}, then you should shout and whine at
9884 your news admin until she includes the @code{Xref} header in the
9885 overview files.
9886
9887 @vindex gnus-nov-is-evil
9888 If you want Gnus to get the @code{Xref}s right all the time, you have to
9889 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
9890 considerably.
9891
9892 C'est la vie.
9893
9894 For an alternative approach, @pxref{Duplicate Suppression}.
9895
9896
9897 @node Duplicate Suppression
9898 @section Duplicate Suppression
9899
9900 By default, gnus tries to make sure that you don't have to read the same
9901 article more than once by utilizing the crossposting mechanism
9902 (@pxref{Crosspost Handling}).  However, that simple and efficient
9903 approach may not work satisfactory for some users for various
9904 reasons.
9905
9906 @enumerate
9907 @item
9908 The @sc{nntp} server may fail to generate the @code{Xref} header.  This
9909 is evil and not very common.
9910
9911 @item
9912 The @sc{nntp} server may fail to include the @code{Xref} header in the
9913 @file{.overview} data bases.  This is evil and all too common, alas.
9914
9915 @item
9916 You may be reading the same group (or several related groups) from
9917 different @sc{nntp} servers.
9918
9919 @item
9920 You may be getting mail that duplicates articles posted to groups.
9921 @end enumerate
9922
9923 I'm sure there are other situations where @code{Xref} handling fails as
9924 well, but these four are the most common situations.
9925
9926 If, and only if, @code{Xref} handling fails for you, then you may
9927 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
9928 will remember the @code{Message-ID}s of all articles you have read or
9929 otherwise marked as read, and then, as if by magic, mark them as read
9930 all subsequent times you see them---in @emph{all} groups.  Using this
9931 mechanism is quite likely to be somewhat inefficient, but not overly
9932 so.  It's certainly preferable to reading the same articles more than
9933 once.
9934
9935 Duplicate suppression is not a very subtle instrument.  It's more like a
9936 sledge hammer than anything else.  It works in a very simple
9937 fashion---if you have marked an article as read, it adds this Message-ID
9938 to a cache.  The next time it sees this Message-ID, it will mark the
9939 article as read with the @samp{M} mark.  It doesn't care what group it
9940 saw the article in.
9941
9942 @table @code
9943 @item gnus-suppress-duplicates
9944 @vindex gnus-suppress-duplicates
9945 If non-@code{nil}, suppress duplicates.
9946
9947 @item gnus-save-duplicate-list
9948 @vindex gnus-save-duplicate-list
9949 If non-@code{nil}, save the list of duplicates to a file.  This will
9950 make startup and shutdown take longer, so the default is @code{nil}.
9951 However, this means that only duplicate articles read in a single gnus
9952 session are suppressed.
9953
9954 @item gnus-duplicate-list-length
9955 @vindex gnus-duplicate-list-length
9956 This variable says how many @code{Message-ID}s to keep in the duplicate
9957 suppression list.  The default is 10000.
9958
9959 @item gnus-duplicate-file
9960 @vindex gnus-duplicate-file
9961 The name of the file to store the duplicate suppression list in.  The
9962 default is @file{~/News/suppression}.
9963 @end table
9964
9965 If you have a tendency to stop and start gnus often, setting
9966 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
9967 you leave gnus running for weeks on end, you may have it @code{nil}.  On
9968 the other hand, saving the list makes startup and shutdown much slower,
9969 so that means that if you stop and start gnus often, you should set
9970 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
9971 to you to figure out, I think.
9972
9973 @node Security
9974 @section Security
9975
9976 Gnus is able to verify signed messages or decrypt encrypted messages.
9977 The formats that are supported are PGP, @sc{pgp/mime} and @sc{s/mime},
9978 however you need some external programs to get things to work:
9979
9980 @enumerate
9981 @item
9982 To handle PGP messages, you have to install mailcrypt or gpg.el as
9983 well as a OpenPGP implementation (such as GnuPG).
9984
9985 @item
9986 To handle @sc{s/mime} message, you need to install OpenSSL.  OpenSSL 0.9.6
9987 or newer is recommended.
9988
9989 @end enumerate
9990
9991 More information on how to set things up can be found in the message
9992 manual (@pxref{Security, ,Security, message, Message Manual}).
9993
9994 @table @code
9995 @item mm-verify-option
9996 @vindex mm-verify-option
9997 Option of verifying signed parts.  @code{never}, not verify;
9998 @code{always}, always verify; @code{known}, only verify known
9999 protocols. Otherwise, ask user.
10000
10001 @item mm-decrypt-option
10002 @vindex mm-decrypt-option
10003 Option of decrypting encrypted parts.  @code{never}, no decryption;
10004 @code{always}, always decrypt; @code{known}, only decrypt known
10005 protocols. Otherwise, ask user.
10006
10007 @end table
10008
10009 @node Mailing List
10010 @section Mailing List
10011
10012 @kindex A M (summary)
10013 @findex gnus-mailing-list-insinuate
10014 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10015 either add a `to-list' group parameter (@pxref{Group Parameters}),
10016 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10017 summary buffer, or say:
10018
10019 @lisp
10020 (add-hook 'gnus-summary-mode-hook 'turn-on-gnus-mailing-list-mode)
10021 @end lisp
10022
10023 That enables the following commands to the summary buffer:
10024
10025 @table @kbd
10026
10027 @item C-c C-n h
10028 @kindex C-c C-n h (Summary)
10029 @findex gnus-mailing-list-help
10030 Send a message to fetch mailing list help, if List-Help field exists.
10031
10032 @item C-c C-n s
10033 @kindex C-c C-n s (Summary)
10034 @findex gnus-mailing-list-subscribe
10035 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10036
10037 @item C-c C-n u
10038 @kindex C-c C-n u (Summary)
10039 @findex gnus-mailing-list-unsubscribe
10040 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10041 field exists.
10042
10043 @item C-c C-n p
10044 @kindex C-c C-n p (Summary)
10045 @findex gnus-mailing-list-post
10046 Post to the mailing list, if List-Post field exists.
10047
10048 @item C-c C-n o
10049 @kindex C-c C-n o (Summary)
10050 @findex gnus-mailing-list-owner
10051 Send a message to the mailing list owner, if List-Owner field exists.
10052
10053 @item C-c C-n a
10054 @kindex C-c C-n a (Summary)
10055 @findex gnus-mailing-list-owner
10056 Browse the mailing list archive, if List-Archive field exists.
10057
10058 @end table
10059
10060 @node Article Buffer
10061 @chapter Article Buffer
10062 @cindex article buffer
10063
10064 The articles are displayed in the article buffer, of which there is only
10065 one.  All the summary buffers share the same article buffer unless you
10066 tell gnus otherwise.
10067
10068 @menu
10069 * Hiding Headers::              Deciding what headers should be displayed.
10070 * Using MIME::                  Pushing articles through @sc{mime} before reading them.
10071 * Customizing Articles::        Tailoring the look of the articles.
10072 * Article Keymap::              Keystrokes available in the article buffer.
10073 * Misc Article::                Other stuff.
10074 @end menu
10075
10076
10077 @node Hiding Headers
10078 @section Hiding Headers
10079 @cindex hiding headers
10080 @cindex deleting headers
10081
10082 The top section of each article is the @dfn{head}.  (The rest is the
10083 @dfn{body}, but you may have guessed that already.)
10084
10085 @vindex gnus-show-all-headers
10086 There is a lot of useful information in the head: the name of the person
10087 who wrote the article, the date it was written and the subject of the
10088 article.  That's well and nice, but there's also lots of information
10089 most people do not want to see---what systems the article has passed
10090 through before reaching you, the @code{Message-ID}, the
10091 @code{References}, etc. ad nauseum---and you'll probably want to get rid
10092 of some of those lines.  If you want to keep all those lines in the
10093 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10094
10095 Gnus provides you with two variables for sifting headers:
10096
10097 @table @code
10098
10099 @item gnus-visible-headers
10100 @vindex gnus-visible-headers
10101 If this variable is non-@code{nil}, it should be a regular expression
10102 that says what headers you wish to keep in the article buffer.  All
10103 headers that do not match this variable will be hidden.
10104
10105 For instance, if you only want to see the name of the person who wrote
10106 the article and the subject, you'd say:
10107
10108 @lisp
10109 (setq gnus-visible-headers "^From:\\|^Subject:")
10110 @end lisp
10111
10112 This variable can also be a list of regexps to match headers to
10113 remain visible.
10114
10115 @item gnus-ignored-headers
10116 @vindex gnus-ignored-headers
10117 This variable is the reverse of @code{gnus-visible-headers}.  If this
10118 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10119 should be a regular expression that matches all lines that you want to
10120 hide.  All lines that do not match this variable will remain visible.
10121
10122 For instance, if you just want to get rid of the @code{References} field
10123 and the @code{Xref} field, you might say:
10124
10125 @lisp
10126 (setq gnus-ignored-headers "^References:\\|^Xref:")
10127 @end lisp
10128
10129 This variable can also be a list of regexps to match headers to
10130 be removed.
10131
10132 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10133 variable will have no effect.
10134
10135 @end table
10136
10137 @vindex gnus-sorted-header-list
10138 Gnus can also sort the headers for you.  (It does this by default.)  You
10139 can control the sorting by setting the @code{gnus-sorted-header-list}
10140 variable.  It is a list of regular expressions that says in what order
10141 the headers are to be displayed.
10142
10143 For instance, if you want the name of the author of the article first,
10144 and then the subject, you might say something like:
10145
10146 @lisp
10147 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10148 @end lisp
10149
10150 Any headers that are to remain visible, but are not listed in this
10151 variable, will be displayed in random order after all the headers listed in this variable.
10152
10153 @findex gnus-article-hide-boring-headers
10154 @vindex gnus-boring-article-headers
10155 You can hide further boring headers by setting
10156 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10157 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10158 list, but this list doesn't actually contain header names.  Instead is
10159 lists various @dfn{boring conditions} that Gnus can check and remove
10160 from sight.
10161
10162 These conditions are:
10163 @table @code
10164 @item empty
10165 Remove all empty headers.
10166 @item followup-to
10167 Remove the @code{Followup-To} header if it is identical to the
10168 @code{Newsgroups} header.
10169 @item reply-to
10170 Remove the @code{Reply-To} header if it lists the same address as the
10171 @code{From} header.
10172 @item newsgroups
10173 Remove the @code{Newsgroups} header if it only contains the current group
10174 name.
10175 @item to-address
10176 Remove the @code{To} header if it only contains the address identical to
10177 the current groups's @code{to-address} parameter.
10178 @item date
10179 Remove the @code{Date} header if the article is less than three days
10180 old.
10181 @item long-to
10182 Remove the @code{To} header if it is very long.
10183 @item many-to
10184 Remove all @code{To} headers if there are more than one.
10185 @end table
10186
10187 To include these three elements, you could say something like:
10188
10189 @lisp
10190 (setq gnus-boring-article-headers
10191       '(empty followup-to reply-to))
10192 @end lisp
10193
10194 This is also the default value for this variable.
10195
10196
10197 @node Using MIME
10198 @section Using MIME
10199 @cindex @sc{mime}
10200
10201 Mime is a standard for waving your hands through the air, aimlessly,
10202 while people stand around yawning.
10203
10204 @sc{mime}, however, is a standard for encoding your articles, aimlessly,
10205 while all newsreaders die of fear.
10206
10207 @sc{mime} may specify what character set the article uses, the encoding
10208 of the characters, and it also makes it possible to embed pictures and
10209 other naughty stuff in innocent-looking articles.
10210
10211 @vindex gnus-show-mime
10212 @vindex gnus-article-display-method-for-mime
10213 @findex gnus-article-display-mime-message
10214 Gnus handles @sc{mime} by pushing the articles through
10215 @code{gnus-article-display-method-for-mime}, which is
10216 @code{gnus-article-display-mime-message} by default.  This function
10217 calls the @sc{semi} MIME-View program to actually do the work.  For more
10218 information on @sc{semi} MIME-View, see its manual page (however it is
10219 not existed yet, sorry).
10220
10221 Set @code{gnus-show-mime} to @code{t} if you want to use
10222 @sc{mime} all the time.  If you have @code{gnus-show-mime} set, then
10223 you'll see some unfortunate display glitches in the article buffer.
10224 These can't be avoided.
10225
10226 In GNUS or Gnus, it might be best to just use the toggling functions
10227 from the summary buffer to avoid getting nasty surprises. (For instance,
10228 you enter the group @samp{alt.sing-a-long} and, before you know it,
10229 @sc{mime} has decoded the sound file in the article and some horrible
10230 sing-a-long song comes screaming out your speakers, and you can't find
10231 the volume button, because there isn't one, and people are starting to
10232 look at you, and you try to stop the program, but you can't, and you
10233 can't find the program to control the volume, and everybody else in the
10234 room suddenly decides to look at you disdainfully, and you'll feel
10235 rather stupid.)
10236
10237 Any similarity to real events and people is purely coincidental.  Ahem.
10238
10239 To avoid such kind of situation, gnus stops to use
10240 @code{metamail-buffer}.  So now, you can set @code{gnus-show-mime} to
10241 non-@code{nil} every-time, then you can push button in the article
10242 buffer when there are nobody else.
10243
10244 Also see @pxref{MIME Commands}.
10245
10246
10247 @node Customizing Articles
10248 @section Customizing Articles
10249 @cindex article customization
10250
10251 A slew of functions for customizing how the articles are to look like
10252 exist.  You can call these functions interactively, or you can have them
10253 called automatically when you select the articles.
10254
10255 To have them called automatically, you should set the corresponding
10256 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10257 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10258 be set, but first we discuss the values these variables can have.
10259
10260 Note: Some values, while valid, make little sense.  Check the list below
10261 for sensible values.
10262
10263 @enumerate
10264 @item
10265 @code{nil}: Don't do this treatment.
10266
10267 @item
10268 @code{t}: Do this treatment on all body parts.
10269
10270 @item
10271 @code{head}: Do the treatment on the headers.
10272
10273 @item
10274 @code{last}: Do this treatment on the last part.
10275
10276 @item
10277 An integer: Do this treatment on all body parts that have a length less
10278 than this number.
10279
10280 @item
10281 A list of strings: Do this treatment on all body parts that are in
10282 articles that are read in groups that have names that match one of the
10283 regexps in the list.
10284
10285 @item
10286 A list where the first element is not a string:
10287
10288 The list is evaluated recursively.  The first element of the list is a
10289 predicate.  The following predicates are recognized: @code{or},
10290 @code{and}, @code{not} and @code{typep}.  Here's an example:
10291
10292 @lisp
10293 (or last
10294     (typep "text/x-vcard"))
10295 @end lisp
10296
10297 @item
10298 @code{mime}: Do this treatment if the value of @code{gnus-show-mime}' is
10299 non-nil.
10300
10301 @end enumerate
10302
10303 You may have noticed that the word @dfn{part} is used here.  This refers
10304 to the fact that some messages are @sc{mime} multipart articles that may
10305 be divided into several parts.  Articles that are not multiparts are
10306 considered to contain just a single part.
10307
10308 @vindex gnus-article-treat-types
10309 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10310 want to, but by default, only @samp{text/plain} parts are given the
10311 treatment.  This is controlled by the @code{gnus-article-treat-types}
10312 variable, which is a list of regular expressions that are matched to the
10313 type of the part.  This variable is ignored if the value of the
10314 controlling variable is a predicate list, as described above.
10315
10316 The following treatment options are available.  The easiest way to
10317 customize this is to examine the @code{gnus-article-treat} customization
10318 group.  Values in parenthesis are suggested sensible values.  Others are
10319 possible but those listed are probably sufficient for most people.
10320
10321 @table @code
10322 @item gnus-treat-buttonize (t, integer)
10323 @item gnus-treat-buttonize-head (head)
10324
10325 @xref{Article Buttons}.
10326
10327 @item gnus-treat-capitalize-sentences (t, integer)
10328 @item gnus-treat-overstrike (t, integer)
10329 @item gnus-treat-strip-cr (t, integer)
10330 @item gnus-treat-strip-headers-in-body (t, integer)
10331 @item gnus-treat-strip-leading-blank-lines (t, integer)
10332 @item gnus-treat-strip-multiple-blank-lines (t, integer)
10333 @item gnus-treat-strip-pem (t, last, integer)
10334 @item gnus-treat-strip-pgp (t, last, integer)
10335 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
10336 @item gnus-treat-unsplit-urls (t, integer)
10337 @item gnus-treat-decode-article-as-default-mime-charset (t, integer)
10338
10339 @xref{Article Washing}.
10340
10341 @item gnus-treat-date-english (head)
10342 @item gnus-treat-date-iso8601 (head)
10343 @item gnus-treat-date-lapsed (head)
10344 @item gnus-treat-date-local (head)
10345 @item gnus-treat-date-original (head)
10346 @item gnus-treat-date-user-defined (head)
10347 @item gnus-treat-date-ut (head)
10348
10349 @xref{Article Date}.
10350
10351 @item gnus-treat-from-picon (head)
10352 @item gnus-treat-mail-picon (head)
10353 @item gnus-treat-newsgroups-picon (head)
10354
10355 @xref{Picons}.
10356
10357 @item gnus-treat-display-smileys (t, integer)
10358
10359 @item gnus-treat-body-boundary (head)
10360
10361 @vindex gnus-body-boundary-delimiter
10362 Adds a delimiter between header and body, the string used as delimiter
10363 is controlled by @code{gnus-body-boundary-delimiter}.
10364
10365 @xref{Smileys}.
10366
10367 @item gnus-treat-display-xface (head)
10368
10369 @xref{X-Face}.
10370
10371 @item gnus-treat-emphasize (t, head, integer)
10372 @item gnus-treat-fill-article (t, integer)
10373 @item gnus-treat-fill-long-lines (t, integer)
10374 @item gnus-treat-hide-boring-headers (head)
10375 @item gnus-treat-hide-citation (t, integer)
10376 @item gnus-treat-hide-citation-maybe (t, integer)
10377 @item gnus-treat-hide-headers (head)
10378 @item gnus-treat-hide-signature (t, last)
10379
10380 @xref{Article Hiding}.
10381
10382 @item gnus-treat-highlight-citation (t, integer)
10383 @item gnus-treat-highlight-headers (head)
10384 @item gnus-treat-highlight-signature (t, last, integer)
10385
10386 @xref{Article Highlighting}.
10387
10388 @item gnus-treat-play-sounds
10389 @item gnus-treat-translate
10390 @item gnus-treat-x-pgp-sig (head)
10391
10392 @item gnus-treat-unfold-headers (head)
10393 @item gnus-treat-fold-headers (head)
10394 @item gnus-treat-fold-newsgroups (head)
10395 @item gnus-treat-leading-whitespace (head)
10396
10397 @xref{Article Header}.
10398
10399
10400 @end table
10401
10402 @vindex gnus-part-display-hook
10403 You can, of course, write your own functions to be called from
10404 @code{gnus-part-display-hook}.  The functions are called narrowed to the
10405 part, and you can do anything you like, pretty much.  There is no
10406 information that you have to keep in the buffer---you can change
10407 everything.
10408
10409
10410 @node Article Keymap
10411 @section Article Keymap
10412
10413 Most of the keystrokes in the summary buffer can also be used in the
10414 article buffer.  They should behave as if you typed them in the summary
10415 buffer, which means that you don't actually have to have a summary
10416 buffer displayed while reading.  You can do it all from the article
10417 buffer.
10418
10419 A few additional keystrokes are available:
10420
10421 @table @kbd
10422
10423 @item SPACE
10424 @kindex SPACE (Article)
10425 @findex gnus-article-next-page
10426 Scroll forwards one page (@code{gnus-article-next-page}).
10427
10428 @item DEL
10429 @kindex DEL (Article)
10430 @findex gnus-article-prev-page
10431 Scroll backwards one page (@code{gnus-article-prev-page}).
10432
10433 @item C-c ^
10434 @kindex C-c ^ (Article)
10435 @findex gnus-article-refer-article
10436 If point is in the neighborhood of a @code{Message-ID} and you press
10437 @kbd{C-c ^}, Gnus will try to get that article from the server
10438 (@code{gnus-article-refer-article}).
10439
10440 @item C-c C-m
10441 @kindex C-c C-m (Article)
10442 @findex gnus-article-mail
10443 Send a reply to the address near point (@code{gnus-article-mail}).  If
10444 given a prefix, include the mail.
10445
10446 @item s
10447 @kindex s (Article)
10448 @findex gnus-article-show-summary
10449 Reconfigure the buffers so that the summary buffer becomes visible
10450 (@code{gnus-article-show-summary}).
10451
10452 @item ?
10453 @kindex ? (Article)
10454 @findex gnus-article-describe-briefly
10455 Give a very brief description of the available keystrokes
10456 (@code{gnus-article-describe-briefly}).
10457
10458 @item TAB
10459 @kindex TAB (Article)
10460 @findex gnus-article-next-button
10461 Go to the next button, if any (@code{gnus-article-next-button}).  This
10462 only makes sense if you have buttonizing turned on.
10463
10464 @item M-TAB
10465 @kindex M-TAB (Article)
10466 @findex gnus-article-prev-button
10467 Go to the previous button, if any (@code{gnus-article-prev-button}).
10468
10469 @item R
10470 @kindex R (Article)
10471 @findex gnus-article-reply-with-original
10472 Send a reply to the current article and yank the current article
10473 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
10474 wide reply.  If the region is active, only yank the text in the
10475 region.
10476
10477 @item F
10478 @kindex F (Article)
10479 @findex gnus-article-followup-with-original
10480 Send a followup to the current article and yank the current article
10481 (@code{gnus-article-followup-with-original}).  If given a prefix, make
10482 a wide reply.  If the region is active, only yank the text in the
10483 region.
10484
10485
10486 @end table
10487
10488
10489 @node Misc Article
10490 @section Misc Article
10491
10492 @table @code
10493
10494 @item gnus-single-article-buffer
10495 @vindex gnus-single-article-buffer
10496 If non-@code{nil}, use the same article buffer for all the groups.
10497 (This is the default.)  If @code{nil}, each group will have its own
10498 article buffer.
10499
10500 @vindex gnus-article-decode-hook
10501 @item gnus-article-decode-hook
10502 @cindex MIME
10503 Hook used to decode @sc{mime} articles.  The default value is
10504 @code{(article-decode-charset article-decode-encoded-words)}
10505
10506 @vindex gnus-article-prepare-hook
10507 @item gnus-article-prepare-hook
10508 This hook is called right after the article has been inserted into the
10509 article buffer.  It is mainly intended for functions that do something
10510 depending on the contents; it should probably not be used for changing
10511 the contents of the article buffer.
10512
10513 @item gnus-article-mode-hook
10514 @vindex gnus-article-mode-hook
10515 Hook called in article mode buffers.
10516
10517 @item gnus-article-mode-syntax-table
10518 @vindex gnus-article-mode-syntax-table
10519 Syntax table used in article buffers.  It is initialized from
10520 @code{text-mode-syntax-table}.
10521
10522 @vindex gnus-article-mode-line-format
10523 @item gnus-article-mode-line-format
10524 This variable is a format string along the same lines as
10525 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
10526 accepts the same format specifications as that variable, with two
10527 extensions:
10528
10529 @table @samp
10530
10531 @item w
10532 The @dfn{wash status} of the article.  This is a short string with one
10533 character for each possible article wash operation that may have been
10534 performed.  The characters and their meaning:
10535
10536 @table @samp
10537
10538 @item c
10539 Displayed when cited text may be hidden in the article buffer.
10540
10541 @item h
10542 Displayed when headers are hidden in the article buffer.
10543
10544 @item p
10545 Displayed when article is digitally signed or encrypted, and Gnus has
10546 hidden the security headers.  (N.B. does not tell anything about
10547 security status, i.e. good or bad signature.)
10548
10549 @item s
10550 Displayed when the signature has been hidden in the Article buffer.
10551
10552 @item o
10553 Displayed when Gnus has treated overstrike characters in the article buffer.
10554
10555 @item e
10556 Displayed when Gnus has treated emphasised strings in the article buffer.
10557
10558 @end table
10559
10560 @item m
10561 The number of @sc{mime} parts in the article.
10562
10563 @end table
10564
10565 @vindex gnus-break-pages
10566
10567 @item gnus-break-pages
10568 Controls whether @dfn{page breaking} is to take place.  If this variable
10569 is non-@code{nil}, the articles will be divided into pages whenever a
10570 page delimiter appears in the article.  If this variable is @code{nil},
10571 paging will not be done.
10572
10573 @item gnus-page-delimiter
10574 @vindex gnus-page-delimiter
10575 This is the delimiter mentioned above.  By default, it is @samp{^L}
10576 (formfeed).
10577 @end table
10578
10579
10580 @node Composing Messages
10581 @chapter Composing Messages
10582 @cindex composing messages
10583 @cindex messages
10584 @cindex mail
10585 @cindex sending mail
10586 @cindex reply
10587 @cindex followup
10588 @cindex post
10589 @cindex using gpg
10590 @cindex using s/mime
10591 @cindex using smime
10592
10593 @kindex C-c C-c (Post)
10594 All commands for posting and mailing will put you in a message buffer
10595 where you can edit the article all you like, before you send the
10596 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
10597 Message Manual}.  Where the message will be posted/mailed to depends
10598 on your setup (@pxref{Posting Server}).
10599
10600 @menu
10601 * Mail::                        Mailing and replying.
10602 * Posting Server::              What server should you post and mail via?
10603 * Mail and Post::               Mailing and posting at the same time.
10604 * Archived Messages::           Where Gnus stores the messages you've sent.
10605 * Posting Styles::              An easier way to specify who you are.
10606 * Drafts::                      Postponing messages and rejected messages.
10607 * Rejected Articles::           What happens if the server doesn't like your article?
10608 * Signing and encrypting::      How to compose secure messages.
10609 @end menu
10610
10611 Also see @pxref{Canceling and Superseding} for information on how to
10612 remove articles you shouldn't have posted.
10613
10614
10615 @node Mail
10616 @section Mail
10617
10618 Variables for customizing outgoing mail:
10619
10620 @table @code
10621 @item gnus-uu-digest-headers
10622 @vindex gnus-uu-digest-headers
10623 List of regexps to match headers included in digested messages.  The
10624 headers will be included in the sequence they are matched.
10625
10626 @item gnus-add-to-list
10627 @vindex gnus-add-to-list
10628 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
10629 that have none when you do a @kbd{a}.
10630
10631 @end table
10632
10633
10634 @node Posting Server
10635 @section Posting Server
10636
10637 When you press those magical @kbd{C-c C-c} keys to ship off your latest
10638 (extremely intelligent, of course) article, where does it go?
10639
10640 Thank you for asking.  I hate you.
10641
10642 It can be quite complicated.  
10643
10644 @vindex gnus-post-method
10645 When posting news, Message usually invokes @code{message-send-news}
10646 (@pxref{News Variables, , News Variables, message, Message Manual}).
10647 Normally, Gnus will post using the same select method as you're
10648 reading from (which might be convenient if you're reading lots of
10649 groups from different private servers).  However.  If the server
10650 you're reading from doesn't allow posting, just reading, you probably
10651 want to use some other server to post your (extremely intelligent and
10652 fabulously interesting) articles.  You can then set the
10653 @code{gnus-post-method} to some other method:
10654
10655 @lisp
10656 (setq gnus-post-method '(nnspool ""))
10657 @end lisp
10658
10659 Now, if you've done this, and then this server rejects your article, or
10660 this server is down, what do you do then?  To override this variable you
10661 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
10662 the ``current'' server, to get back the default behavior, for posting.
10663
10664 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
10665 gnus will prompt you for what method to use for posting.
10666
10667 You can also set @code{gnus-post-method} to a list of select methods.
10668 If that's the case, gnus will always prompt you for what method to use
10669 for posting.
10670
10671 Finally, if you want to always post using the native select method,
10672 you can set this variable to @code{native}.
10673
10674 When sending mail, Message invokes @code{message-send-mail-function}.
10675 The default function, @code{message-send-mail-with-sendmail}, pipes
10676 your article to the @code{sendmail} binary for further queuing and
10677 sending.  When your local system is not configured for sending mail
10678 using @code{sendmail}, and you have access to a remote @sc{smtp}
10679 server, you can set @code{message-send-mail-function} to
10680 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
10681 package correctly.  An example:
10682
10683 @lisp
10684 (setq message-send-mail-function 'smtpmail-send-it
10685       smtpmail-default-smtp-server "YOUR SMTP HOST")
10686 @end lisp
10687
10688 Other possible choises for @code{message-send-mail-function} includes
10689 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
10690 and @code{feedmail-send-it}.
10691
10692 @node Mail and Post
10693 @section Mail and Post
10694
10695 Here's a list of variables relevant to both mailing and
10696 posting:
10697
10698 @table @code
10699 @item gnus-mailing-list-groups
10700 @findex gnus-mailing-list-groups
10701 @cindex mailing lists
10702
10703 If your news server offers groups that are really mailing lists
10704 gatewayed to the @sc{nntp} server, you can read those groups without
10705 problems, but you can't post/followup to them without some difficulty.
10706 One solution is to add a @code{to-address} to the group parameters
10707 (@pxref{Group Parameters}).  An easier thing to do is set the
10708 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
10709 really are mailing lists.  Then, at least, followups to the mailing
10710 lists will work most of the time.  Posting to these groups (@kbd{a}) is
10711 still a pain, though.
10712
10713 @end table
10714
10715 You may want to do spell-checking on messages that you send out.  Or, if
10716 you don't want to spell-check by hand, you could add automatic
10717 spell-checking via the @code{ispell} package:
10718
10719 @cindex ispell
10720 @findex ispell-message
10721 @lisp
10722 (add-hook 'message-send-hook 'ispell-message)
10723 @end lisp
10724
10725 If you want to change the @code{ispell} dictionary based on what group
10726 you're in, you could say something like the following:
10727
10728 @lisp
10729 (add-hook 'gnus-select-group-hook
10730           (lambda ()
10731             (cond
10732              ((string-match
10733                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
10734               (ispell-change-dictionary "deutsch"))
10735              (t
10736               (ispell-change-dictionary "english")))))
10737 @end lisp
10738
10739 Modify to suit your needs.
10740
10741
10742 @node Archived Messages
10743 @section Archived Messages
10744 @cindex archived messages
10745 @cindex sent messages
10746
10747 Gnus provides a few different methods for storing the mail and news you
10748 send.  The default method is to use the @dfn{archive virtual server} to
10749 store the messages.  If you want to disable this completely, the
10750 @code{gnus-message-archive-group} variable should be @code{nil}, which
10751 is the default.
10752
10753 For archiving interesting messages in a group you read, see the
10754 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
10755 Group Commands}).
10756
10757 @vindex gnus-message-archive-method
10758 @code{gnus-message-archive-method} says what virtual server gnus is to
10759 use to store sent messages.  The default is:
10760
10761 @lisp
10762 (nnfolder "archive"
10763           (nnfolder-directory   "~/Mail/archive")
10764           (nnfolder-active-file "~/Mail/archive/active")
10765           (nnfolder-get-new-mail nil)
10766           (nnfolder-inhibit-expiry t))
10767 @end lisp
10768
10769 You can, however, use any mail select method (@code{nnml},
10770 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
10771 for doing this sort of thing, though.  If you don't like the default
10772 directory chosen, you could say something like:
10773
10774 @lisp
10775 (setq gnus-message-archive-method
10776       '(nnfolder "archive"
10777                  (nnfolder-inhibit-expiry t)
10778                  (nnfolder-active-file "~/News/sent-mail/active")
10779                  (nnfolder-directory "~/News/sent-mail/")))
10780 @end lisp
10781
10782 @vindex gnus-message-archive-group
10783 @cindex Gcc
10784 Gnus will insert @code{Gcc} headers in all outgoing messages that point
10785 to one or more group(s) on that server.  Which group to use is
10786 determined by the @code{gnus-message-archive-group} variable.
10787
10788 This variable can be used to do the following:
10789
10790 @itemize @bullet
10791 @item
10792 a string
10793 Messages will be saved in that group.
10794
10795 Note that you can include a select method in the group name, then the
10796 message will not be stored in the select method given by
10797 @code{gnus-message-archive-method}, but in the select method specified
10798 by the group name, instead.  Suppose @code{gnus-message-archive-method}
10799 has the default value shown above.  Then setting
10800 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
10801 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
10802 value @code{"nnml:foo"}, then outgoing messages will be stored in
10803 @samp{nnml:foo}.
10804 @item
10805 a list of strings
10806 Messages will be saved in all those groups.
10807 @item
10808 an alist of regexps, functions and forms
10809 When a key ``matches'', the result is used.
10810 @item
10811 @code{nil}
10812 No message archiving will take place.  This is the default.
10813 @end itemize
10814
10815 Let's illustrate:
10816
10817 Just saving to a single group called @samp{MisK}:
10818 @lisp
10819 (setq gnus-message-archive-group "MisK")
10820 @end lisp
10821
10822 Saving to two groups, @samp{MisK} and @samp{safe}:
10823 @lisp
10824 (setq gnus-message-archive-group '("MisK" "safe"))
10825 @end lisp
10826
10827 Save to different groups based on what group you are in:
10828 @lisp
10829 (setq gnus-message-archive-group
10830       '(("^alt" "sent-to-alt")
10831         ("mail" "sent-to-mail")
10832         (".*" "sent-to-misc")))
10833 @end lisp
10834
10835 More complex stuff:
10836 @lisp
10837 (setq gnus-message-archive-group
10838       '((if (message-news-p)
10839             "misc-news"
10840           "misc-mail")))
10841 @end lisp
10842
10843 How about storing all news messages in one file, but storing all mail
10844 messages in one file per month:
10845
10846 @lisp
10847 (setq gnus-message-archive-group
10848       '((if (message-news-p)
10849             "misc-news"
10850           (concat "mail." (format-time-string "%Y-%m")))))
10851 @end lisp
10852
10853 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
10854 @c use a different value for @code{gnus-message-archive-group} there.)
10855
10856 Now, when you send a message off, it will be stored in the appropriate
10857 group.  (If you want to disable storing for just one particular message,
10858 you can just remove the @code{Gcc} header that has been inserted.)  The
10859 archive group will appear in the group buffer the next time you start
10860 gnus, or the next time you press @kbd{F} in the group buffer.  You can
10861 enter it and read the articles in it just like you'd read any other
10862 group.  If the group gets really big and annoying, you can simply rename
10863 if (using @kbd{G r} in the group buffer) to something
10864 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
10865 continue to be stored in the old (now empty) group.
10866
10867 That's the default method of archiving sent messages.  Gnus offers a
10868 different way for the people who don't like the default method.  In that
10869 case you should set @code{gnus-message-archive-group} to @code{nil};
10870 this will disable archiving.
10871
10872 @table @code
10873 @item gnus-outgoing-message-group
10874 @vindex gnus-outgoing-message-group
10875 All outgoing messages will be put in this group.  If you want to store
10876 all your outgoing mail and articles in the group @samp{nnml:archive},
10877 you set this variable to that value.  This variable can also be a list of
10878 group names.
10879
10880 If you want to have greater control over what group to put each
10881 message in, you can set this variable to a function that checks the
10882 current newsgroup name and then returns a suitable group name (or list
10883 of names).
10884
10885 This variable can be used instead of @code{gnus-message-archive-group},
10886 but the latter is the preferred method.
10887
10888 @item gnus-gcc-mark-as-read
10889 @vindex gnus-gcc-mark-as-read
10890 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
10891
10892 @item gnus-gcc-externalize-attachments
10893 @vindex gnus-gcc-externalize-attachments
10894 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
10895 and matches the Gcc group name, attach files as external parts; if it is
10896 @code{all}, attach local files as external parts; if it is other
10897 non-@code{nil}, the behavior is the same as @code{all}, but it may be
10898 changed in the future.
10899
10900 @end table
10901
10902
10903 @node Posting Styles
10904 @section Posting Styles
10905 @cindex posting styles
10906 @cindex styles
10907
10908 All them variables, they make my head swim.
10909
10910 So what if you want a different @code{Organization} and signature based
10911 on what groups you post to?  And you post both from your home machine
10912 and your work machine, and you want different @code{From} lines, and so
10913 on?
10914
10915 @vindex gnus-posting-styles
10916 One way to do stuff like that is to write clever hooks that change the
10917 variables you need to have changed.  That's a bit boring, so somebody
10918 came up with the bright idea of letting the user specify these things in
10919 a handy alist.  Here's an example of a @code{gnus-posting-styles}
10920 variable:
10921
10922 @lisp
10923 ((".*"
10924   (signature "Peace and happiness")
10925   (organization "What me?"))
10926  ("^comp"
10927   (signature "Death to everybody"))
10928  ("comp.emacs.i-love-it"
10929   (organization "Emacs is it")))
10930 @end lisp
10931
10932 As you might surmise from this example, this alist consists of several
10933 @dfn{styles}.  Each style will be applicable if the first element
10934 ``matches'', in some form or other.  The entire alist will be iterated
10935 over, from the beginning towards the end, and each match will be
10936 applied, which means that attributes in later styles that match override
10937 the same attributes in earlier matching styles.  So
10938 @samp{comp.programming.literate} will have the @samp{Death to everybody}
10939 signature and the @samp{What me?} @code{Organization} header.
10940
10941 The first element in each style is called the @code{match}.  If it's a
10942 string, then Gnus will try to regexp match it against the group name.
10943 If it is the form @code{(header MATCH REGEXP)}, then Gnus will look in
10944 the original article for a header whose name is MATCH and compare that
10945 REGEXP.  MATCH and REGEXP are strings. If it's a function symbol, that
10946 function will be called with no arguments.  If it's a variable symbol,
10947 then the variable will be referenced.  If it's a list, then that list
10948 will be @code{eval}ed.  In any case, if this returns a non-@code{nil}
10949 value, then the style is said to @dfn{match}.
10950
10951 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
10952 attribute consists of a @code{(@var{name} @var{value})} pair.  The
10953 attribute name can be one of @code{signature}, @code{signature-file},
10954 @code{x-face-file}, @code{address} (overriding
10955 @code{user-mail-address}), @code{name} (overriding
10956 @code{(user-full-name)}) or @code{body}.  The attribute name can also
10957 be a string or a symbol.  In that case, this will be used as a header
10958 name, and the value will be inserted in the headers of the article; if
10959 the value is @code{nil}, the header name will be removed.  If the
10960 attribute name is @code{eval}, the form is evaluated, and the result
10961 is thrown away.
10962
10963 The attribute value can be a string (used verbatim), a function with
10964 zero arguments (the return value will be used), a variable (its value
10965 will be used) or a list (it will be @code{eval}ed and the return value
10966 will be used).  The functions and sexps are called/@code{eval}ed in the
10967 message buffer that is being set up.  The headers of the current article
10968 are available through the @code{message-reply-headers} variable, which
10969 is a vector of the following headers: number subject from date id
10970 references chars lines xref extra.
10971
10972 @vindex message-reply-headers
10973
10974 If you wish to check whether the message you are about to compose is
10975 meant to be a news article or a mail message, you can check the values
10976 of the @code{message-news-p} and @code{message-mail-p} functions.
10977
10978 @findex message-mail-p
10979 @findex message-news-p
10980
10981 So here's a new example:
10982
10983 @lisp
10984 (setq gnus-posting-styles
10985       '((".*"
10986          (signature-file "~/.signature")
10987          (name "User Name")
10988          ("X-Home-Page" (getenv "WWW_HOME"))
10989          (organization "People's Front Against MWM"))
10990         ("^rec.humor"
10991          (signature my-funny-signature-randomizer))
10992         ((equal (system-name) "gnarly")  ;; A form
10993          (signature my-quote-randomizer))
10994         (message-news-p        ;; A function symbol
10995          (signature my-news-signature))
10996         (window-system         ;; A value symbol
10997          ("X-Window-System" (format "%s" window-system)))
10998         ;; If I'm replying to Larsi, set the Organization header.
10999         ((header "to" "larsi.*org")
11000          (Organization "Somewhere, Inc."))
11001         ((posting-from-work-p) ;; A user defined function
11002          (signature-file "~/.work-signature")
11003          (address "user@@bar.foo")
11004          (body "You are fired.\n\nSincerely, your boss.")
11005          (organization "Important Work, Inc"))
11006         ("nnml:.*"
11007          (From (save-excursion
11008                  (set-buffer gnus-article-buffer)
11009                  (message-fetch-field "to"))))
11010         ("^nn.+:"
11011          (signature-file "~/.mail-signature"))))
11012 @end lisp
11013
11014 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11015 @code{From} address in all your outgoing replies, which might be handy
11016 if you fill many roles.
11017
11018
11019 @node Drafts
11020 @section Drafts
11021 @cindex drafts
11022
11023 If you are writing a message (mail or news) and suddenly remember that
11024 you have a steak in the oven (or some pesto in the food processor, you
11025 craaazy vegetarians), you'll probably wish there was a method to save
11026 the message you are writing so that you can continue editing it some
11027 other day, and send it when you feel its finished.
11028
11029 Well, don't worry about it.  Whenever you start composing a message of
11030 some sort using the gnus mail and post commands, the buffer you get will
11031 automatically associate to an article in a special @dfn{draft} group.
11032 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11033 article will be saved there.  (Auto-save files also go to the draft
11034 group.)
11035
11036 @cindex nndraft
11037 @vindex nndraft-directory
11038 The draft group is a special group (which is implemented as an
11039 @code{nndraft} group, if you absolutely have to know) called
11040 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11041 @code{nndraft} is to store its files.  What makes this group special is
11042 that you can't tick any articles in it or mark any articles as
11043 read---all articles in the group are permanently unread.
11044
11045 If the group doesn't exist, it will be created and you'll be subscribed
11046 to it.  The only way to make it disappear from the Group buffer is to
11047 unsubscribe it.
11048
11049 @c @findex gnus-dissociate-buffer-from-draft
11050 @c @kindex C-c M-d (Mail)
11051 @c @kindex C-c M-d (Post)
11052 @c @findex gnus-associate-buffer-with-draft
11053 @c @kindex C-c C-d (Mail)
11054 @c @kindex C-c C-d (Post)
11055 @c If you're writing some super-secret message that you later want to
11056 @c encode with PGP before sending, you may wish to turn the auto-saving
11057 @c (and association with the draft group) off.  You never know who might be
11058 @c interested in reading all your extremely valuable and terribly horrible
11059 @c and interesting secrets.  The @kbd{C-c M-d}
11060 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11061 @c If you change your mind and want to turn the auto-saving back on again,
11062 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11063 @c
11064 @c @vindex gnus-use-draft
11065 @c To leave association with the draft group off by default, set
11066 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11067
11068 @findex gnus-draft-edit-message
11069 @kindex D e (Draft)
11070 When you want to continue editing the article, you simply enter the
11071 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11072 that.  You will be placed in a buffer where you left off.
11073
11074 Rejected articles will also be put in this draft group (@pxref{Rejected
11075 Articles}).
11076
11077 @findex gnus-draft-send-all-messages
11078 @findex gnus-draft-send-message
11079 If you have lots of rejected messages you want to post (or mail) without
11080 doing further editing, you can use the @kbd{D s} command
11081 (@code{gnus-draft-send-message}).  This command understands the
11082 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11083 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11084 in the buffer.
11085
11086 If you have some messages that you wish not to send, you can use the
11087 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11088 as unsendable.  This is a toggling command.
11089
11090
11091 @node Rejected Articles
11092 @section Rejected Articles
11093 @cindex rejected articles
11094
11095 Sometimes a news server will reject an article.  Perhaps the server
11096 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11097 @emph{there be demons}.  Perhaps you have included too much cited text.
11098 Perhaps the disk is full.  Perhaps the server is down.
11099
11100 These situations are, of course, totally beyond the control of gnus.
11101 (Gnus, of course, loves the way you look, always feels great, has angels
11102 fluttering around inside of it, doesn't care about how much cited text
11103 you include, never runs full and never goes down.)  So gnus saves these
11104 articles until some later time when the server feels better.
11105
11106 The rejected articles will automatically be put in a special draft group
11107 (@pxref{Drafts}).  When the server comes back up again, you'd then
11108 typically enter that group and send all the articles off.
11109
11110 @node Signing and encrypting
11111 @section Signing and encrypting
11112 @cindex using gpg
11113 @cindex using s/mime
11114 @cindex using smime
11115
11116 Gnus can digitally sign and encrypt your messages, using vanilla PGP
11117 format or @sc{pgp/mime} or @sc{s/mime}.  For decoding such messages,
11118 see the @code{mm-verify-option} and @code{mm-decrypt-option} options
11119 (@pxref{Security}).
11120
11121 For PGP, Gnus supports two external libraries, @sc{gpg.el} and
11122 @sc{Mailcrypt}, you need to install at least one of them.  The
11123 @sc{s/mime} support in Gnus requires the external program OpenSSL.
11124
11125 Instructing MML to perform security operations on a @sc{mime} part is
11126 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11127 C-m c} key map for encryption, as follows.
11128
11129 @table @kbd
11130
11131 @item C-c C-m s s
11132 @kindex C-c C-m s s
11133 @findex mml-secure-sign-smime
11134
11135 Digitally sign current @sc{mime} part using @sc{s/mime}.
11136
11137 @item C-c C-m s o
11138 @kindex C-c C-m s o
11139 @findex mml-secure-sign-pgp
11140
11141 Digitally sign current @sc{mime} part using PGP.
11142
11143 @item C-c C-m s p
11144 @kindex C-c C-m s p
11145 @findex mml-secure-sign-pgp
11146
11147 Digitally sign current @sc{mime} part using @sc{pgp/mime}.
11148
11149 @item C-c C-m c s
11150 @kindex C-c C-m c s
11151 @findex mml-secure-encrypt-smime
11152
11153 Digitally encrypt current @sc{mime} part using @sc{s/mime}.
11154
11155 @item C-c C-m c o
11156 @kindex C-c C-m c o
11157 @findex mml-secure-encrypt-pgp
11158
11159 Digitally encrypt current @sc{mime} part using PGP.
11160
11161 @item C-c C-m c p
11162 @kindex C-c C-m c p
11163 @findex mml-secure-encrypt-pgpmime
11164
11165 Digitally encrypt current @sc{mime} part using @sc{pgp/mime}.
11166
11167 @item C-c C-m C-n
11168 @kindex C-c C-m C-n
11169 @findex mml-unsecure-message
11170 Remove security related MML tags from message.
11171
11172 @end table
11173
11174 Also @xref{Security, ,Security, message, Message Manual}.
11175
11176 @node Select Methods
11177 @chapter Select Methods
11178 @cindex foreign groups
11179 @cindex select methods
11180
11181 A @dfn{foreign group} is a group not read by the usual (or
11182 default) means.  It could be, for instance, a group from a different
11183 @sc{nntp} server, it could be a virtual group, or it could be your own
11184 personal mail group.
11185
11186 A foreign group (or any group, really) is specified by a @dfn{name} and
11187 a @dfn{select method}.  To take the latter first, a select method is a
11188 list where the first element says what back end to use (e.g. @code{nntp},
11189 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11190 name}.  There may be additional elements in the select method, where the
11191 value may have special meaning for the back end in question.
11192
11193 One could say that a select method defines a @dfn{virtual server}---so
11194 we do just that (@pxref{Server Buffer}).
11195
11196 The @dfn{name} of the group is the name the back end will recognize the
11197 group as.
11198
11199 For instance, the group @samp{soc.motss} on the @sc{nntp} server
11200 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11201 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11202 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11203 back end just knows this group as @samp{soc.motss}.
11204
11205 The different methods all have their peculiarities, of course.
11206
11207 @menu
11208 * Server Buffer::               Making and editing virtual servers.
11209 * Getting News::                Reading USENET news with Gnus.
11210 * Getting Mail::                Reading your personal mail with Gnus.
11211 * Browsing the Web::            Getting messages from a plethora of Web sources.
11212 * IMAP::                        Using Gnus as a @sc{imap} client.
11213 * Other Sources::               Reading directories, files, SOUP packets.
11214 * Combined Groups::             Combining groups into one group.
11215 * Gnus Unplugged::              Reading news and mail offline.
11216 @end menu
11217
11218
11219 @node Server Buffer
11220 @section Server Buffer
11221
11222 Traditionally, a @dfn{server} is a machine or a piece of software that
11223 one connects to, and then requests information from.  Gnus does not
11224 connect directly to any real servers, but does all transactions through
11225 one back end or other.  But that's just putting one layer more between
11226 the actual media and Gnus, so we might just as well say that each
11227 back end represents a virtual server.
11228
11229 For instance, the @code{nntp} back end may be used to connect to several
11230 different actual @sc{nntp} servers, or, perhaps, to many different ports
11231 on the same actual @sc{nntp} server.  You tell Gnus which back end to
11232 use, and what parameters to set by specifying a @dfn{select method}.
11233
11234 These select method specifications can sometimes become quite
11235 complicated---say, for instance, that you want to read from the
11236 @sc{nntp} server @samp{news.funet.fi} on port number 13, which
11237 hangs if queried for @sc{nov} headers and has a buggy select.  Ahem.
11238 Anyway, if you had to specify that for each group that used this
11239 server, that would be too much work, so Gnus offers a way of naming
11240 select methods, which is what you do in the server buffer.
11241
11242 To enter the server buffer, use the @kbd{^}
11243 (@code{gnus-group-enter-server-mode}) command in the group buffer.
11244
11245 @menu
11246 * Server Buffer Format::        You can customize the look of this buffer.
11247 * Server Commands::             Commands to manipulate servers.
11248 * Example Methods::             Examples server specifications.
11249 * Creating a Virtual Server::   An example session.
11250 * Server Variables::            Which variables to set.
11251 * Servers and Methods::         You can use server names as select methods.
11252 * Unavailable Servers::         Some servers you try to contact may be down.
11253 @end menu
11254
11255 @vindex gnus-server-mode-hook
11256 @code{gnus-server-mode-hook} is run when creating the server buffer.
11257
11258
11259 @node Server Buffer Format
11260 @subsection Server Buffer Format
11261 @cindex server buffer format
11262
11263 @vindex gnus-server-line-format
11264 You can change the look of the server buffer lines by changing the
11265 @code{gnus-server-line-format} variable.  This is a @code{format}-like
11266 variable, with some simple extensions:
11267
11268 @table @samp
11269
11270 @item h
11271 How the news is fetched---the back end name.
11272
11273 @item n
11274 The name of this server.
11275
11276 @item w
11277 Where the news is to be fetched from---the address.
11278
11279 @item s
11280 The opened/closed/denied status of the server.
11281 @end table
11282
11283 @vindex gnus-server-mode-line-format
11284 The mode line can also be customized by using the
11285 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
11286 Formatting}).  The following specs are understood:
11287
11288 @table @samp
11289 @item S
11290 Server name.
11291
11292 @item M
11293 Server method.
11294 @end table
11295
11296 Also @pxref{Formatting Variables}.
11297
11298
11299 @node Server Commands
11300 @subsection Server Commands
11301 @cindex server commands
11302
11303 @table @kbd
11304
11305 @item a
11306 @kindex a (Server)
11307 @findex gnus-server-add-server
11308 Add a new server (@code{gnus-server-add-server}).
11309
11310 @item e
11311 @kindex e (Server)
11312 @findex gnus-server-edit-server
11313 Edit a server (@code{gnus-server-edit-server}).
11314
11315 @item SPACE
11316 @kindex SPACE (Server)
11317 @findex gnus-server-read-server
11318 Browse the current server (@code{gnus-server-read-server}).
11319
11320 @item q
11321 @kindex q (Server)
11322 @findex gnus-server-exit
11323 Return to the group buffer (@code{gnus-server-exit}).
11324
11325 @item k
11326 @kindex k (Server)
11327 @findex gnus-server-kill-server
11328 Kill the current server (@code{gnus-server-kill-server}).
11329
11330 @item y
11331 @kindex y (Server)
11332 @findex gnus-server-yank-server
11333 Yank the previously killed server (@code{gnus-server-yank-server}).
11334
11335 @item c
11336 @kindex c (Server)
11337 @findex gnus-server-copy-server
11338 Copy the current server (@code{gnus-server-copy-server}).
11339
11340 @item l
11341 @kindex l (Server)
11342 @findex gnus-server-list-servers
11343 List all servers (@code{gnus-server-list-servers}).
11344
11345 @item s
11346 @kindex s (Server)
11347 @findex gnus-server-scan-server
11348 Request that the server scan its sources for new articles
11349 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
11350 servers.
11351
11352 @item g
11353 @kindex g (Server)
11354 @findex gnus-server-regenerate-server
11355 Request that the server regenerate all its data structures
11356 (@code{gnus-server-regenerate-server}).  This can be useful if you have
11357 a mail back end that has gotten out of sync.
11358
11359 @end table
11360
11361
11362 @node Example Methods
11363 @subsection Example Methods
11364
11365 Most select methods are pretty simple and self-explanatory:
11366
11367 @lisp
11368 (nntp "news.funet.fi")
11369 @end lisp
11370
11371 Reading directly from the spool is even simpler:
11372
11373 @lisp
11374 (nnspool "")
11375 @end lisp
11376
11377 As you can see, the first element in a select method is the name of the
11378 back end, and the second is the @dfn{address}, or @dfn{name}, if you
11379 will.
11380
11381 After these two elements, there may be an arbitrary number of
11382 @code{(@var{variable} @var{form})} pairs.
11383
11384 To go back to the first example---imagine that you want to read from
11385 port 15 on that machine.  This is what the select method should
11386 look like then:
11387
11388 @lisp
11389 (nntp "news.funet.fi" (nntp-port-number 15))
11390 @end lisp
11391
11392 You should read the documentation to each back end to find out what
11393 variables are relevant, but here's an @code{nnmh} example:
11394
11395 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
11396 you have two structures that you wish to access: One is your private
11397 mail spool, and the other is a public one.  Here's the possible spec for
11398 your private mail:
11399
11400 @lisp
11401 (nnmh "private" (nnmh-directory "~/private/mail/"))
11402 @end lisp
11403
11404 (This server is then called @samp{private}, but you may have guessed
11405 that.)
11406
11407 Here's the method for a public spool:
11408
11409 @lisp
11410 (nnmh "public"
11411       (nnmh-directory "/usr/information/spool/")
11412       (nnmh-get-new-mail nil))
11413 @end lisp
11414
11415 @cindex proxy
11416 @cindex firewall
11417
11418 If you are behind a firewall and only have access to the @sc{nntp}
11419 server from the firewall machine, you can instruct Gnus to @code{rlogin}
11420 on the firewall machine and telnet from there to the @sc{nntp} server.
11421 Doing this can be rather fiddly, but your virtual server definition
11422 should probably look something like this:
11423
11424 @lisp
11425 (nntp "firewall"
11426       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
11427       (nntp-via-address "the.firewall.machine")
11428       (nntp-address "the.real.nntp.host")
11429       (nntp-end-of-line "\n"))
11430 @end lisp
11431
11432 If you want to use the wonderful @code{ssh} program to provide a
11433 compressed connection over the modem line, you could add the following
11434 configuration to the example above:
11435
11436 @lisp
11437       (nntp-via-rlogin-command "ssh")
11438 @end lisp
11439
11440 If you're behind a firewall, but have direct access to the outside world
11441 through a wrapper command like "runsocks", you could open a socksified
11442 telnet connection to the news server as follows:
11443
11444 @lisp
11445 (nntp "outside"
11446       (nntp-pre-command "runsocks")
11447       (nntp-open-connection-function nntp-open-via-telnet)
11448       (nntp-address "the.news.server")
11449       (nntp-end-of-line "\n"))
11450 @end lisp
11451
11452 This means that you have to have set up @code{ssh-agent} correctly to
11453 provide automatic authorization, of course.  And to get a compressed
11454 connection, you have to have the @samp{Compression} option in the
11455 @code{ssh} @file{config} file.
11456
11457
11458 @node Creating a Virtual Server
11459 @subsection Creating a Virtual Server
11460
11461 If you're saving lots of articles in the cache by using persistent
11462 articles, you may want to create a virtual server to read the cache.
11463
11464 First you need to add a new server.  The @kbd{a} command does that.  It
11465 would probably be best to use @code{nnspool} to read the cache.  You
11466 could also use @code{nnml} or @code{nnmh}, though.
11467
11468 Type @kbd{a nnspool RET cache RET}.
11469
11470 You should now have a brand new @code{nnspool} virtual server called
11471 @samp{cache}.  You now need to edit it to have the right definitions.
11472 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
11473 will contain the following:
11474
11475 @lisp
11476 (nnspool "cache")
11477 @end lisp
11478
11479 Change that to:
11480
11481 @lisp
11482 (nnspool "cache"
11483          (nnspool-spool-directory "~/News/cache/")
11484          (nnspool-nov-directory "~/News/cache/")
11485          (nnspool-active-file "~/News/cache/active"))
11486 @end lisp
11487
11488 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
11489 @kbd{RET} over this virtual server, you should be entered into a browse
11490 buffer, and you should be able to enter any of the groups displayed.
11491
11492
11493 @node Server Variables
11494 @subsection Server Variables
11495
11496 One sticky point when defining variables (both on back ends and in Emacs
11497 in general) is that some variables are typically initialized from other
11498 variables when the definition of the variables is being loaded.  If you
11499 change the "base" variable after the variables have been loaded, you
11500 won't change the "derived" variables.
11501
11502 This typically affects directory and file variables.  For instance,
11503 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
11504 directory variables are initialized from that variable, so
11505 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
11506 new virtual @code{nnml} server, it will @emph{not} suffice to set just
11507 @code{nnml-directory}---you have to explicitly set all the file
11508 variables to be what you want them to be.  For a complete list of
11509 variables for each back end, see each back end's section later in this
11510 manual, but here's an example @code{nnml} definition:
11511
11512 @lisp
11513 (nnml "public"
11514       (nnml-directory "~/my-mail/")
11515       (nnml-active-file "~/my-mail/active")
11516       (nnml-newsgroups-file "~/my-mail/newsgroups"))
11517 @end lisp
11518
11519
11520 @node Servers and Methods
11521 @subsection Servers and Methods
11522
11523 Wherever you would normally use a select method
11524 (e.g. @code{gnus-secondary-select-method}, in the group select method,
11525 when browsing a foreign server) you can use a virtual server name
11526 instead.  This could potentially save lots of typing.  And it's nice all
11527 over.
11528
11529
11530 @node Unavailable Servers
11531 @subsection Unavailable Servers
11532
11533 If a server seems to be unreachable, Gnus will mark that server as
11534 @code{denied}.  That means that any subsequent attempt to make contact
11535 with that server will just be ignored.  ``It can't be opened,'' Gnus
11536 will tell you, without making the least effort to see whether that is
11537 actually the case or not.
11538
11539 That might seem quite naughty, but it does make sense most of the time.
11540 Let's say you have 10 groups subscribed to on server
11541 @samp{nephelococcygia.com}.  This server is located somewhere quite far
11542 away from you and the machine is quite slow, so it takes 1 minute just
11543 to find out that it refuses connection to you today.  If Gnus were to
11544 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
11545 attempt to do that.  Once it has gotten a single ``connection refused'',
11546 it will regard that server as ``down''.
11547
11548 So, what happens if the machine was only feeling unwell temporarily?
11549 How do you test to see whether the machine has come up again?
11550
11551 You jump to the server buffer (@pxref{Server Buffer}) and poke it
11552 with the following commands:
11553
11554 @table @kbd
11555
11556 @item O
11557 @kindex O (Server)
11558 @findex gnus-server-open-server
11559 Try to establish connection to the server on the current line
11560 (@code{gnus-server-open-server}).
11561
11562 @item C
11563 @kindex C (Server)
11564 @findex gnus-server-close-server
11565 Close the connection (if any) to the server
11566 (@code{gnus-server-close-server}).
11567
11568 @item D
11569 @kindex D (Server)
11570 @findex gnus-server-deny-server
11571 Mark the current server as unreachable
11572 (@code{gnus-server-deny-server}).
11573
11574 @item M-o
11575 @kindex M-o (Server)
11576 @findex gnus-server-open-all-servers
11577 Open the connections to all servers in the buffer
11578 (@code{gnus-server-open-all-servers}).
11579
11580 @item M-c
11581 @kindex M-c (Server)
11582 @findex gnus-server-close-all-servers
11583 Close the connections to all servers in the buffer
11584 (@code{gnus-server-close-all-servers}).
11585
11586 @item R
11587 @kindex R (Server)
11588 @findex gnus-server-remove-denials
11589 Remove all marks to whether Gnus was denied connection from any servers
11590 (@code{gnus-server-remove-denials}).
11591
11592 @item L
11593 @kindex L (Server)
11594 @findex gnus-server-offline-server
11595 Set server status to offline (@code{gnus-server-offline-server}).
11596
11597 @end table
11598
11599
11600 @node Getting News
11601 @section Getting News
11602 @cindex reading news
11603 @cindex news back ends
11604
11605 A newsreader is normally used for reading news.  Gnus currently provides
11606 only two methods of getting news---it can read from an @sc{nntp} server,
11607 or it can read from a local spool.
11608
11609 @menu
11610 * NNTP::                        Reading news from an @sc{nntp} server.
11611 * News Spool::                  Reading news from the local spool.
11612 @end menu
11613
11614
11615 @node NNTP
11616 @subsection NNTP
11617 @cindex nntp
11618
11619 Subscribing to a foreign group from an @sc{nntp} server is rather easy.
11620 You just specify @code{nntp} as method and the address of the @sc{nntp}
11621 server as the, uhm, address.
11622
11623 If the @sc{nntp} server is located at a non-standard port, setting the
11624 third element of the select method to this port number should allow you
11625 to connect to the right port.  You'll have to edit the group info for
11626 that (@pxref{Foreign Groups}).
11627
11628 The name of the foreign group can be the same as a native group.  In
11629 fact, you can subscribe to the same group from as many different servers
11630 you feel like.  There will be no name collisions.
11631
11632 The following variables can be used to create a virtual @code{nntp}
11633 server:
11634
11635 @table @code
11636
11637 @item nntp-server-opened-hook
11638 @vindex nntp-server-opened-hook
11639 @cindex @sc{mode reader}
11640 @cindex authinfo
11641 @cindex authentification
11642 @cindex nntp authentification
11643 @findex nntp-send-authinfo
11644 @findex nntp-send-mode-reader
11645 is run after a connection has been made.  It can be used to send
11646 commands to the @sc{nntp} server after it has been contacted.  By
11647 default it sends the command @code{MODE READER} to the server with the
11648 @code{nntp-send-mode-reader} function.  This function should always be
11649 present in this hook.
11650
11651 @item nntp-authinfo-function
11652 @vindex nntp-authinfo-function
11653 @findex nntp-send-authinfo
11654 @vindex nntp-authinfo-file
11655 This function will be used to send @samp{AUTHINFO} to the @sc{nntp}
11656 server.  The default function is @code{nntp-send-authinfo}, which looks
11657 through your @file{~/.authinfo} (or whatever you've set the
11658 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
11659 are found, it will prompt you for a login name and a password.  The
11660 format of the @file{~/.authinfo} file is (almost) the same as the
11661 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
11662 manual page, but here are the salient facts:
11663
11664 @enumerate
11665 @item
11666 The file contains one or more line, each of which define one server.
11667
11668 @item
11669 Each line may contain an arbitrary number of token/value pairs.
11670
11671 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
11672 @samp{default}.  In addition Gnus introduces two new tokens, not present
11673 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
11674 @samp{force}.  (This is the only way the @file{.authinfo} file format
11675 deviates from the @file{.netrc} file format.)  @samp{port} is used to
11676 indicate what port on the server the credentials apply to and
11677 @samp{force} is explained below.
11678
11679 @end enumerate
11680
11681 Here's an example file:
11682
11683 @example
11684 machine news.uio.no login larsi password geheimnis
11685 machine nntp.ifi.uio.no login larsi force yes
11686 @end example
11687
11688 The token/value pairs may appear in any order; @samp{machine} doesn't
11689 have to be first, for instance.
11690
11691 In this example, both login name and password have been supplied for the
11692 former server, while the latter has only the login name listed, and the
11693 user will be prompted for the password.  The latter also has the
11694 @samp{force} tag, which means that the authinfo will be sent to the
11695 @var{nntp} server upon connection; the default (i.e., when there is not
11696 @samp{force} tag) is to not send authinfo to the @var{nntp} server
11697 until the @var{nntp} server asks for it.
11698
11699 You can also add @samp{default} lines that will apply to all servers
11700 that don't have matching @samp{machine} lines.
11701
11702 @example
11703 default force yes
11704 @end example
11705
11706 This will force sending @samp{AUTHINFO} commands to all servers not
11707 previously mentioned.
11708
11709 Remember to not leave the @file{~/.authinfo} file world-readable.
11710
11711 @item nntp-server-action-alist
11712 @vindex nntp-server-action-alist
11713 This is a list of regexps to match on server types and actions to be
11714 taken when matches are made.  For instance, if you want Gnus to beep
11715 every time you connect to innd, you could say something like:
11716
11717 @lisp
11718 (setq nntp-server-action-alist
11719       '(("innd" (ding))))
11720 @end lisp
11721
11722 You probably don't want to do that, though.
11723
11724 The default value is
11725
11726 @lisp
11727 '(("nntpd 1\\.5\\.11t"
11728    (remove-hook 'nntp-server-opened-hook
11729                 'nntp-send-mode-reader)))
11730 @end lisp
11731
11732 This ensures that Gnus doesn't send the @code{MODE READER} command to
11733 nntpd 1.5.11t, since that command chokes that server, I've been told.
11734
11735 @item nntp-maximum-request
11736 @vindex nntp-maximum-request
11737 If the @sc{nntp} server doesn't support @sc{nov} headers, this back end
11738 will collect headers by sending a series of @code{head} commands.  To
11739 speed things up, the back end sends lots of these commands without
11740 waiting for reply, and then reads all the replies.  This is controlled
11741 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
11742 your network is buggy, you should set this to 1.
11743
11744 @item nntp-connection-timeout
11745 @vindex nntp-connection-timeout
11746 If you have lots of foreign @code{nntp} groups that you connect to
11747 regularly, you're sure to have problems with @sc{nntp} servers not
11748 responding properly, or being too loaded to reply within reasonable
11749 time.  This is can lead to awkward problems, which can be helped
11750 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
11751 that says how many seconds the @code{nntp} back end should wait for a
11752 connection before giving up.  If it is @code{nil}, which is the default,
11753 no timeouts are done.
11754
11755 @c @item nntp-command-timeout
11756 @c @vindex nntp-command-timeout
11757 @c @cindex PPP connections
11758 @c @cindex dynamic IP addresses
11759 @c If you're running Gnus on a machine that has a dynamically assigned
11760 @c address, Gnus may become confused.  If the address of your machine
11761 @c changes after connecting to the @sc{nntp} server, Gnus will simply sit
11762 @c waiting forever for replies from the server.  To help with this
11763 @c unfortunate problem, you can set this command to a number.  Gnus will
11764 @c then, if it sits waiting for a reply from the server longer than that
11765 @c number of seconds, shut down the connection, start a new one, and resend
11766 @c the command.  This should hopefully be transparent to the user.  A
11767 @c likely number is 30 seconds.
11768 @c
11769 @c @item nntp-retry-on-break
11770 @c @vindex nntp-retry-on-break
11771 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
11772 @c hangs.  This will have much the same effect as the command timeout
11773 @c described above.
11774
11775 @item nntp-server-hook
11776 @vindex nntp-server-hook
11777 This hook is run as the last step when connecting to an @sc{nntp}
11778 server.
11779
11780 @item nntp-buggy-select
11781 @vindex nntp-buggy-select
11782 Set this to non-@code{nil} if your select routine is buggy.
11783
11784 @item nntp-nov-is-evil
11785 @vindex nntp-nov-is-evil
11786 If the @sc{nntp} server does not support @sc{nov}, you could set this
11787 variable to @code{t}, but @code{nntp} usually checks automatically whether @sc{nov}
11788 can be used.
11789
11790 @item nntp-xover-commands
11791 @vindex nntp-xover-commands
11792 @cindex nov
11793 @cindex XOVER
11794 List of strings used as commands to fetch @sc{nov} lines from a
11795 server.  The default value of this variable is @code{("XOVER"
11796 "XOVERVIEW")}.
11797
11798 @item nntp-nov-gap
11799 @vindex nntp-nov-gap
11800 @code{nntp} normally sends just one big request for @sc{nov} lines to
11801 the server.  The server responds with one huge list of lines.  However,
11802 if you have read articles 2-5000 in the group, and only want to read
11803 article 1 and 5001, that means that @code{nntp} will fetch 4999 @sc{nov}
11804 lines that you will not need.  This variable says how
11805 big a gap between two consecutive articles is allowed to be before the
11806 @code{XOVER} request is split into several request.  Note that if your
11807 network is fast, setting this variable to a really small number means
11808 that fetching will probably be slower.  If this variable is @code{nil},
11809 @code{nntp} will never split requests.  The default is 5.
11810
11811 @item nntp-prepare-server-hook
11812 @vindex nntp-prepare-server-hook
11813 A hook run before attempting to connect to an @sc{nntp} server.
11814
11815 @item nntp-warn-about-losing-connection
11816 @vindex nntp-warn-about-losing-connection
11817 If this variable is non-@code{nil}, some noise will be made when a
11818 server closes connection.
11819
11820 @item nntp-record-commands
11821 @vindex nntp-record-commands
11822 If non-@code{nil}, @code{nntp} will log all commands it sends to the
11823 @sc{nntp} server (along with a timestamp) in the @samp{*nntp-log*}
11824 buffer.  This is useful if you are debugging a Gnus/@sc{nntp} connection
11825 that doesn't seem to work.
11826
11827 @item nntp-open-connection-function
11828 @vindex nntp-open-connection-function
11829 It is possible to customize how the connection to the nntp server will
11830 be opened.  If you specify an @code{nntp-open-connection-function}
11831 parameter, Gnus will use that function to establish the connection.
11832 Five pre-made functions are supplied.  These functions can be grouped in
11833 two categories: direct connection functions (three pre-made), and
11834 indirect ones (two pre-made).
11835
11836 @item nntp-prepare-post-hook
11837 @vindex nntp-prepare-post-hook
11838 A hook run just before posting an article.  If there is no
11839 @code{Message-ID} header in the article and the news server provides the
11840 recommended ID, it will be added to the article before running this
11841 hook.  It is useful to make @code{Cancel-Lock} headers even if you
11842 inhibit Gnus to add a @code{Message-ID} header, you could say:
11843
11844 @lisp
11845 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
11846 @end lisp
11847
11848 Note that not all servers support the recommended ID.  This works for
11849 INN versions 2.3.0 and later, for instance.
11850
11851 @item nntp-list-options
11852 @vindex nntp-list-options
11853 List of newsgroup name used for a option of the LIST command to restrict
11854 the listing output to only the specified newsgroups.  Each newsgroup name
11855 can be a shell-style wildcard, for instance, @dfn{fj.*}, @dfn{japan.*},
11856 etc.  Fortunately, if the server can accept such a option, it will
11857 probably make gnus run faster.  You may use it as a server variable as
11858 follows:
11859
11860 @lisp
11861 (setq gnus-select-method
11862       '(nntp "news.somewhere.edu"
11863              (nntp-list-options ("fj.*" "japan.*"))))
11864 @end lisp
11865
11866 @item nntp-options-subscribe
11867 @vindex nntp-options-subscribe
11868 Regexp matching the newsgroup names which will be subscribed
11869 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
11870 It may be effective as well as @code{nntp-list-options} even though the
11871 server could not accept a shell-style wildcard as a option of the LIST
11872 command.  You may use it as a server variable as follows:
11873
11874 @lisp
11875 (setq gnus-select-method
11876       '(nntp "news.somewhere.edu"
11877              (nntp-options-subscribe "^fj\\.\\|^japan\\.")))
11878 @end lisp
11879
11880 @item nntp-options-not-subscribe
11881 @vindex nntp-options-not-subscribe
11882 Regexp matching the newsgroup names which will not be subscribed
11883 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
11884 It may be effective as well as @code{nntp-list-options} even though the
11885 server could not accept a shell-style wildcard as a option of the LIST
11886 command.  You may use it as a server variable as follows:
11887
11888 @lisp
11889 (setq gnus-select-method
11890       '(nntp "news.somewhere.edu"
11891              (nntp-options-not-subscribe "\\.binaries\\.")))
11892 @end lisp
11893 @end table
11894
11895 @menu
11896 * Direct Functions::            Connecting directly to the server.
11897 * Indirect Functions::          Connecting indirectly to the server.
11898 * Common Variables::            Understood by several connection functions.
11899 @end menu
11900
11901
11902 @node Direct Functions
11903 @subsubsection Direct Functions
11904 @cindex direct connection functions
11905
11906 These functions are called direct because they open a direct connection
11907 between your machine and the @sc{nntp} server.  The behavior of these
11908 functions is also affected by commonly understood variables
11909 (@pxref{Common Variables}).
11910
11911 @table @code
11912 @findex nntp-open-network-stream
11913 @item nntp-open-network-stream
11914 This is the default, and simply connects to some port or other on the
11915 remote system.
11916
11917 @findex nntp-open-ssl-stream
11918 @item nntp-open-ssl-stream
11919 Opens a connection to a server over a @dfn{secure} channel.  To use
11920 this you must have OpenSSL (@uref{http://www.openssl.org}) or SSLeay
11921 installed (@uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL}, and you also
11922 need @file{ssl.el} (from the W3 distribution, for instance).  You then
11923 define a server as follows:
11924
11925 @lisp
11926 ;; Type `C-c C-c' after you've finished editing.
11927 ;;
11928 ;; "snews" is port 563 and is predefined in our /etc/services
11929 ;;
11930 (nntp "snews.bar.com"
11931       (nntp-open-connection-function nntp-open-ssl-stream)
11932       (nntp-port-number "snews")
11933       (nntp-address "snews.bar.com"))
11934 @end lisp
11935
11936 @findex nntp-open-telnet-stream
11937 @item nntp-open-telnet-stream
11938 Opens a connection to an @sc{nntp} server by simply @samp{telnet}'ing
11939 it.  You might wonder why this function exists, since we have the
11940 default @code{nntp-open-network-stream} which would do the job.  (One
11941 of) the reason(s) is that if you are behind a firewall but have direct
11942 connections to the outside world thanks to a command wrapper like
11943 @code{runsocks}, you can use it like this:
11944
11945 @lisp
11946 (nntp "socksified"
11947       (nntp-pre-command "runsocks")
11948       (nntp-open-connection-function nntp-open-telnet-stream)
11949       (nntp-address "the.news.server"))
11950 @end lisp
11951
11952 With the default method, you would need to wrap your whole Emacs
11953 session, which is not a good idea.
11954 @end table
11955
11956
11957 @node Indirect Functions
11958 @subsubsection Indirect Functions
11959 @cindex indirect connection functions
11960
11961 These functions are called indirect because they connect to an
11962 intermediate host before actually connecting to the @sc{nntp} server.
11963 All of these functions and related variables are also said to belong to
11964 the "via" family of connection: they're all prefixed with "via" to make
11965 things cleaner.  The behavior of these functions is also affected by
11966 commonly understood variables (@pxref{Common Variables}).
11967
11968 @table @code
11969 @item nntp-open-via-rlogin-and-telnet
11970 @findex nntp-open-via-rlogin-and-telnet
11971 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
11972 to the real @sc{nntp} server from there.  This is useful for instance if
11973 you need to connect to a firewall machine first.
11974
11975 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
11976
11977 @table @code
11978 @item nntp-via-rlogin-command
11979 @vindex nntp-via-rlogin-command
11980 Command used to log in on the intermediate host.  The default is
11981 @samp{rsh}, but @samp{ssh} is a popular alternative.
11982 @end table
11983
11984 @item nntp-open-via-telnet-and-telnet
11985 @findex nntp-open-via-telnet-and-telnet
11986 Does essentially the same, but uses @samp{telnet} instead of
11987 @samp{rlogin} to connect to the intermediate host.
11988
11989 @code{nntp-open-via-telnet-and-telnet}-specific variables:
11990
11991 @table @code
11992 @item nntp-via-telnet-command
11993 @vindex nntp-via-telnet-command
11994 Command used to @code{telnet} the intermediate host.  The default is
11995 @samp{telnet}.
11996
11997 @item nntp-via-telnet-switches
11998 @vindex nntp-via-telnet-switches
11999 List of strings to be used as the switches to the
12000 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12001
12002 @item nntp-via-user-password
12003 @vindex nntp-via-user-password
12004 Password to use when logging in on the intermediate host.
12005
12006 @item nntp-via-envuser
12007 @vindex nntp-via-envuser
12008 If non-@code{nil}, the intermediate @code{telnet} session (client and
12009 server both) will support the @code{ENVIRON} option and not prompt for
12010 login name. This works for Solaris @code{telnet}, for instance.
12011
12012 @item nntp-via-shell-prompt
12013 @vindex nntp-via-shell-prompt
12014 Regexp matching the shell prompt on the intermediate host.  The default
12015 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12016
12017 @end table
12018
12019 @end table
12020
12021
12022 Here are some additional variables that are understood by all the above
12023 functions:
12024
12025 @table @code
12026
12027 @item nntp-via-user-name
12028 @vindex nntp-via-user-name
12029 User name to use when connecting to the intermediate host.
12030
12031 @item nntp-via-address
12032 @vindex nntp-via-address
12033 Address of the intermediate host to connect to.
12034
12035 @end table
12036
12037
12038 @node Common Variables
12039 @subsubsection Common Variables
12040
12041 The following variables affect the behavior of all, or several of the
12042 pre-made connection functions. When not specified, all functions are
12043 affected.
12044
12045 @table @code
12046
12047 @item nntp-pre-command
12048 @vindex nntp-pre-command
12049 A command wrapper to use when connecting through a non native connection
12050 function (all except @code{nntp-open-network-stream} and
12051 @code{nntp-open-ssl-stream}.  This is where you would put a @samp{SOCKS}
12052 wrapper for instance.
12053
12054 @item nntp-address
12055 @vindex nntp-address
12056 The address of the @sc{nntp} server.
12057
12058 @item nntp-port-number
12059 @vindex nntp-port-number
12060 Port number to connect to the @sc{nntp} server.  The default is @samp{nntp}.
12061
12062 @item nntp-end-of-line
12063 @vindex nntp-end-of-line
12064 String to use as end-of-line marker when talking to the @sc{nntp}
12065 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12066 using a non native connection function.
12067
12068 @item nntp-telnet-command
12069 @vindex nntp-telnet-command
12070 Command to use when connecting to the @sc{nntp} server through
12071 @samp{telnet}.  This is NOT for an intermediate host.  This is just for
12072 the real @sc{nntp} server.  The default is @samp{telnet}.
12073
12074 @item nntp-telnet-switches
12075 @vindex nntp-telnet-switches
12076 A list of switches to pass to @code{nntp-telnet-command}.  The default
12077 is @samp{("-8")}.
12078
12079 @end table
12080
12081
12082 @node News Spool
12083 @subsection News Spool
12084 @cindex nnspool
12085 @cindex news spool
12086
12087 Subscribing to a foreign group from the local spool is extremely easy,
12088 and might be useful, for instance, to speed up reading groups that
12089 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12090 instance.
12091
12092 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12093 anything else) as the address.
12094
12095 If you have access to a local spool, you should probably use that as the
12096 native select method (@pxref{Finding the News}).  It is normally faster
12097 than using an @code{nntp} select method, but might not be.  It depends.
12098 You just have to try to find out what's best at your site.
12099
12100 @table @code
12101
12102 @item nnspool-inews-program
12103 @vindex nnspool-inews-program
12104 Program used to post an article.
12105
12106 @item nnspool-inews-switches
12107 @vindex nnspool-inews-switches
12108 Parameters given to the inews program when posting an article.
12109
12110 @item nnspool-spool-directory
12111 @vindex nnspool-spool-directory
12112 Where @code{nnspool} looks for the articles.  This is normally
12113 @file{/usr/spool/news/}.
12114
12115 @item nnspool-nov-directory
12116 @vindex nnspool-nov-directory
12117 Where @code{nnspool} will look for @sc{nov} files.  This is normally
12118 @file{/usr/spool/news/over.view/}.
12119
12120 @item nnspool-lib-dir
12121 @vindex nnspool-lib-dir
12122 Where the news lib dir is (@file{/usr/lib/news/} by default).
12123
12124 @item nnspool-active-file
12125 @vindex nnspool-active-file
12126 The path to the active file.
12127
12128 @item nnspool-newsgroups-file
12129 @vindex nnspool-newsgroups-file
12130 The path to the group descriptions file.
12131
12132 @item nnspool-history-file
12133 @vindex nnspool-history-file
12134 The path to the news history file.
12135
12136 @item nnspool-active-times-file
12137 @vindex nnspool-active-times-file
12138 The path to the active date file.
12139
12140 @item nnspool-nov-is-evil
12141 @vindex nnspool-nov-is-evil
12142 If non-@code{nil}, @code{nnspool} won't try to use any @sc{nov} files
12143 that it finds.
12144
12145 @item nnspool-sift-nov-with-sed
12146 @vindex nnspool-sift-nov-with-sed
12147 @cindex sed
12148 If non-@code{nil}, which is the default, use @code{sed} to get the
12149 relevant portion from the overview file.  If nil, @code{nnspool} will
12150 load the entire file into a buffer and process it there.
12151
12152 @end table
12153
12154
12155 @node Getting Mail
12156 @section Getting Mail
12157 @cindex reading mail
12158 @cindex mail
12159
12160 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12161 course.
12162
12163 @menu
12164 * Mail in a Newsreader::        Important introductory notes.
12165 * Getting Started Reading Mail::  A simple cookbook example.
12166 * Splitting Mail::              How to create mail groups.
12167 * Mail Sources::                How to tell Gnus where to get mail from.
12168 * Mail Back End Variables::     Variables for customizing mail handling.
12169 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12170 * Group Mail Splitting::        Use group customize to drive mail splitting.
12171 * Incorporating Old Mail::      What about the old mail you have?
12172 * Expiring Mail::               Getting rid of unwanted mail.
12173 * Washing Mail::                Removing gruft from the mail you get.
12174 * Duplicates::                  Dealing with duplicated mail.
12175 * Not Reading Mail::            Using mail back ends for reading other files.
12176 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12177 @end menu
12178
12179
12180 @node Mail in a Newsreader
12181 @subsection Mail in a Newsreader
12182
12183 If you are used to traditional mail readers, but have decided to switch
12184 to reading mail with Gnus, you may find yourself experiencing something
12185 of a culture shock.
12186
12187 Gnus does not behave like traditional mail readers.  If you want to make
12188 it behave that way, you can, but it's an uphill battle.
12189
12190 Gnus, by default, handles all its groups using the same approach.  This
12191 approach is very newsreaderly---you enter a group, see the new/unread
12192 messages, and when you read the messages, they get marked as read, and
12193 you don't see them any more.  (Unless you explicitly ask for them.)
12194
12195 In particular, you do not do anything explicitly to delete messages.
12196
12197 Does this mean that all the messages that have been marked as read are
12198 deleted?  How awful!
12199
12200 But, no, it means that old messages are @dfn{expired} according to some
12201 scheme or other.  For news messages, the expire process is controlled by
12202 the news administrator; for mail, the expire process is controlled by
12203 you.  The expire process for mail is covered in depth in @pxref{Expiring
12204 Mail}.
12205
12206 What many Gnus users find, after using it a while for both news and
12207 mail, is that the transport mechanism has very little to do with how
12208 they want to treat a message.
12209
12210 Many people subscribe to several mailing lists.  These are transported
12211 via @sc{smtp}, and are therefore mail.  But we might go for weeks without
12212 answering, or even reading these messages very carefully.  We may not
12213 need to save them because if we should need to read one again, they are
12214 archived somewhere else.
12215
12216 Some people have local news groups which have only a handful of readers.
12217 These are transported via @sc{nntp}, and are therefore news.  But we may need
12218 to read and answer a large fraction of the messages very carefully in
12219 order to do our work.  And there may not be an archive, so we may need
12220 to save the interesting messages the same way we would personal mail.
12221
12222 The important distinction turns out to be not the transport mechanism,
12223 but other factors such as how interested we are in the subject matter,
12224 or how easy it is to retrieve the message if we need to read it again.
12225
12226 Gnus provides many options for sorting mail into ``groups'' which behave
12227 like newsgroups, and for treating each group (whether mail or news)
12228 differently.
12229
12230 Some users never get comfortable using the Gnus (ahem) paradigm and wish
12231 that Gnus should grow up and be a male, er, mail reader.  It is possible
12232 to whip Gnus into a more mailreaderly being, but, as said before, it's
12233 not easy.  People who prefer proper mail readers should try @sc{vm}
12234 instead, which is an excellent, and proper, mail reader.
12235
12236 I don't mean to scare anybody off, but I want to make it clear that you
12237 may be required to learn a new way of thinking about messages.  After
12238 you've been subjected to The Gnus Way, you will come to love it.  I can
12239 guarantee it.  (At least the guy who sold me the Emacs Subliminal
12240 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
12241 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
12242 You Do.)
12243
12244
12245 @node Getting Started Reading Mail
12246 @subsection Getting Started Reading Mail
12247
12248 It's quite easy to use Gnus to read your new mail.  You just plonk the
12249 mail back end of your choice into @code{gnus-secondary-select-methods},
12250 and things will happen automatically.
12251
12252 For instance, if you want to use @code{nnml} (which is a "one file per
12253 mail" back end), you could put the following in your @file{.gnus} file:
12254
12255 @lisp
12256 (setq gnus-secondary-select-methods '((nnml "")))
12257 @end lisp
12258
12259 Now, the next time you start Gnus, this back end will be queried for new
12260 articles, and it will move all the messages in your spool file to its
12261 directory, which is @code{~/Mail/} by default.  The new group that will
12262 be created (@samp{mail.misc}) will be subscribed, and you can read it
12263 like any other group.
12264
12265 You will probably want to split the mail into several groups, though:
12266
12267 @lisp
12268 (setq nnmail-split-methods
12269       '(("junk" "^From:.*Lars Ingebrigtsen")
12270         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
12271         ("other" "")))
12272 @end lisp
12273
12274 This will result in three new @code{nnml} mail groups being created:
12275 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
12276 mail that doesn't fit into the first two groups will be placed in the
12277 last group.
12278
12279 This should be sufficient for reading mail with Gnus.  You might want to
12280 give the other sections in this part of the manual a perusal, though.
12281 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
12282
12283
12284 @node Splitting Mail
12285 @subsection Splitting Mail
12286 @cindex splitting mail
12287 @cindex mail splitting
12288
12289 @vindex nnmail-split-methods
12290 The @code{nnmail-split-methods} variable says how the incoming mail is
12291 to be split into groups.
12292
12293 @lisp
12294 (setq nnmail-split-methods
12295   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
12296     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
12297     ("mail.other" "")))
12298 @end lisp
12299
12300 This variable is a list of lists, where the first element of each of
12301 these lists is the name of the mail group (they do not have to be called
12302 something beginning with @samp{mail}, by the way), and the second
12303 element is a regular expression used on the header of each mail to
12304 determine if it belongs in this mail group.  The first string may
12305 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
12306 insert sub-expressions from the matched text.  For instance:
12307
12308 @lisp
12309 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
12310 @end lisp
12311
12312 The second element can also be a function.  In that case, it will be
12313 called narrowed to the headers with the first element of the rule as the
12314 argument.  It should return a non-@code{nil} value if it thinks that the
12315 mail belongs in that group.
12316
12317 The last of these groups should always be a general one, and the regular
12318 expression should @emph{always} be @samp{} so that it matches any mails
12319 that haven't been matched by any of the other regexps.  (These rules are
12320 processed from the beginning of the alist toward the end.  The first
12321 rule to make a match will "win", unless you have crossposting enabled.
12322 In that case, all matching rules will "win".)
12323
12324 If you like to tinker with this yourself, you can set this variable to a
12325 function of your choice.  This function will be called without any
12326 arguments in a buffer narrowed to the headers of an incoming mail
12327 message.  The function should return a list of group names that it
12328 thinks should carry this mail message.
12329
12330 Note that the mail back ends are free to maul the poor, innocent,
12331 incoming headers all they want to.  They all add @code{Lines} headers;
12332 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
12333 @code{From<SPACE>} line to something else.
12334
12335 @vindex nnmail-crosspost
12336 The mail back ends all support cross-posting.  If several regexps match,
12337 the mail will be ``cross-posted'' to all those groups.
12338 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
12339 that no articles are crossposted to the general (@samp{}) group.
12340
12341 @vindex nnmail-crosspost-link-function
12342 @cindex crosspost
12343 @cindex links
12344 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
12345 the crossposted articles.  However, not all file systems support hard
12346 links.  If that's the case for you, set
12347 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
12348 variable is @code{add-name-to-file} by default.)
12349
12350 @kindex M-x nnmail-split-history
12351 @kindex nnmail-split-history
12352 If you wish to see where the previous mail split put the messages, you
12353 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
12354 where re-spooling messages would put the messages, you can use
12355 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
12356 Group Commands}).
12357
12358 @vindex nnmail-split-header-length-limit
12359 Header lines longer than the value of
12360 @code{nnmail-split-header-length-limit} are excluded from the split
12361 function.
12362
12363 Gnus gives you all the opportunity you could possibly want for shooting
12364 yourself in the foot.  Let's say you create a group that will contain
12365 all the mail you get from your boss.  And then you accidentally
12366 unsubscribe from the group.  Gnus will still put all the mail from your
12367 boss in the unsubscribed group, and so, when your boss mails you ``Have
12368 that report ready by Monday or you're fired!'', you'll never see it and,
12369 come Tuesday, you'll still believe that you're gainfully employed while
12370 you really should be out collecting empty bottles to save up for next
12371 month's rent money.
12372
12373
12374 @node Mail Sources
12375 @subsection Mail Sources
12376
12377 Mail can be gotten from many different sources---the mail spool, from a
12378 POP mail server, from a procmail directory, or from a maildir, for
12379 instance.
12380
12381 @menu
12382 * Mail Source Specifiers::      How to specify what a mail source is.
12383 * Mail Source Customization::   Some variables that influence things.
12384 * Fetching Mail::               Using the mail source specifiers.
12385 @end menu
12386
12387
12388 @node Mail Source Specifiers
12389 @subsubsection Mail Source Specifiers
12390 @cindex POP
12391 @cindex mail server
12392 @cindex procmail
12393 @cindex mail spool
12394 @cindex mail source
12395
12396 You tell Gnus how to fetch mail by setting @code{mail-sources}
12397 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
12398
12399 Here's an example:
12400
12401 @lisp
12402 (pop :server "pop3.mailserver.com" :user "myname")
12403 @end lisp
12404
12405 As can be observed, a mail source specifier is a list where the first
12406 element is a @dfn{mail source type}, followed by an arbitrary number of
12407 @dfn{keywords}.  Keywords that are not explicitly specified are given
12408 default values.
12409
12410 The following mail source types are available:
12411
12412 @table @code
12413 @item file
12414 Get mail from a single file; typically from the mail spool.
12415
12416 Keywords:
12417
12418 @table @code
12419 @item :path
12420 The path of the file.  Defaults to the value of the @code{MAIL}
12421 environment variable or @file{/usr/mail/spool/user-name}.
12422 @end table
12423
12424 An example file mail source:
12425
12426 @lisp
12427 (file :path "/usr/spool/mail/user-name")
12428 @end lisp
12429
12430 Or using the default path:
12431
12432 @lisp
12433 (file)
12434 @end lisp
12435
12436 If the mail spool file is not located on the local machine, it's best to
12437 use POP or @sc{imap} or the like to fetch the mail.  You can not use ange-ftp
12438 file names here---it has no way to lock the mail spool while moving the
12439 mail.
12440
12441 If it's impossible to set up a proper server, you can use ssh instead.
12442
12443 @lisp
12444 (setq mail-sources
12445       '((file :prescript "ssh host bin/getmail >%t")))
12446 @end lisp
12447
12448 The @samp{getmail} script would look something like the following:
12449
12450 @example
12451 #!/bin/sh
12452 #  getmail - move mail from spool to stdout
12453 #  flu@@iki.fi
12454
12455 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
12456 TMP=$HOME/Mail/tmp
12457 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
12458 @end example
12459
12460 Alter this script to fit find the @samp{movemail} you want to use.
12461
12462
12463 @item directory
12464 Get mail from several files in a directory.  This is typically used
12465 when you have procmail split the incoming mail into several files.
12466 That is, mail from the file @file{foo.bar.spool} will be put in the
12467 group @code{foo.bar}.  (You can change the suffix to be used instead
12468 of @code{.spool}.)  Setting
12469 @code{nnmail-scan-directory-mail-source-once} to non-nil forces Gnus
12470 to scan the mail source only once. This is particularly useful if you
12471 want to scan mail groups at a specified level.
12472
12473 Keywords:
12474
12475 @table @code
12476 @item :path
12477 The path of the directory where the files are.  There is no default
12478 value.
12479
12480 @item :suffix
12481 Only files ending with this suffix are used.  The default is
12482 @samp{.spool}.
12483
12484 @item :predicate
12485 Only files that have this predicate return non-@code{nil} are returned.
12486 The default is @code{identity}.  This is used as an additional
12487 filter---only files that have the right suffix @emph{and} satisfy this
12488 predicate are considered.
12489
12490 @item :prescript
12491 @itemx :postscript
12492 Script run before/after fetching mail.
12493
12494 @end table
12495
12496 An example directory mail source:
12497
12498 @lisp
12499 (directory :path "/home/user-name/procmail-dir/"
12500            :suffix ".prcml")
12501 @end lisp
12502
12503 @item pop
12504 Get mail from a POP server.
12505
12506 Keywords:
12507
12508 @table @code
12509 @item :server
12510 The name of the POP server.  The default is taken from the
12511 @code{MAILHOST} environment variable.
12512
12513 @item :port
12514 The port number of the POP server.  This can be a number (eg,
12515 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
12516 string, it should be a service name as listed in @file{/etc/services} on
12517 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
12518 need to specify it as @samp{"pop-3"} instead.
12519
12520 @item :user
12521 The user name to give to the POP server.  The default is the login
12522 name.
12523
12524 @item :password
12525 The password to give to the POP server.  If not specified, the user is
12526 prompted.
12527
12528 @item :program
12529 The program to use to fetch mail from the POP server.  This should be
12530 a @code{format}-like string.  Here's an example:
12531
12532 @example
12533 fetchmail %u@@%s -P %p %t
12534 @end example
12535
12536 The valid format specifier characters are:
12537
12538 @table @samp
12539 @item t
12540 The name of the file the mail is to be moved to.  This must always be
12541 included in this string.
12542
12543 @item s
12544 The name of the server.
12545
12546 @item P
12547 The port number of the server.
12548
12549 @item u
12550 The user name to use.
12551
12552 @item p
12553 The password to use.
12554 @end table
12555
12556 The values used for these specs are taken from the values you give the
12557 corresponding keywords.
12558
12559 @item :prescript
12560 A script to be run before fetching the mail.  The syntax is the same as
12561 the @code{:program} keyword.  This can also be a function to be run.
12562
12563 @item :postscript
12564 A script to be run after fetching the mail.  The syntax is the same as
12565 the @code{:program} keyword.  This can also be a function to be run.
12566
12567 @item :function
12568 The function to use to fetch mail from the POP server.  The function is
12569 called with one parameter---the name of the file where the mail should
12570 be moved to.
12571
12572 @item :authentication
12573 This can be either the symbol @code{password} or the symbol @code{apop}
12574 and says what authentication scheme to use.  The default is
12575 @code{password}.
12576
12577 @item :connection
12578 What stream to use for connecting to the server, this can be the symbol
12579 @code{ssl}, the symbol @code{tls} or others.  The default is @code{nil}
12580 and use insecure connections.  Note that for SSL/TLS, you need external
12581 programs and libraries:
12582
12583 @itemize @bullet
12584 @item
12585 @dfn{ssl:} Connect through SSL@. Requires OpenSSL (the program
12586 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
12587 library @samp{ssl.el}.
12588 @item
12589 @dfn{starttls:} Connect via the STARTTLS extension (similar to SSL)@.
12590 Requires the external library @samp{starttls.el} and program
12591 @samp{starttls}.
12592 @end itemize
12593
12594 @item :leave
12595 Non-@code{nil} if mail is to be left on the server and UIDL used for
12596 message retrieval.  The default is @code{nil}.
12597
12598 @end table
12599
12600 If the @code{:program} and @code{:function} keywords aren't specified,
12601 @code{pop3-movemail} will be used.
12602
12603 Here are some examples.  Fetch from the default POP server, using the
12604 default user name, and default fetcher:
12605
12606 @lisp
12607 (pop)
12608 @end lisp
12609
12610 Fetch from a named server with a named user and password:
12611
12612 @lisp
12613 (pop :server "my.pop.server"
12614      :user "user-name" :password "secret")
12615 @end lisp
12616
12617 Use @samp{movemail} to move the mail:
12618
12619 @lisp
12620 (pop :program "movemail po:%u %t %p")
12621 @end lisp
12622
12623 @item maildir
12624 Get mail from a maildir.  This is a type of mailbox that is supported by
12625 at least qmail and postfix, where each file in a special directory
12626 contains exactly one mail.
12627
12628 Keywords:
12629
12630 @table @code
12631 @item :path
12632 The path of the directory where the mails are stored.  The default is
12633 taken from the @code{MAILDIR} environment variable or
12634 @samp{~/Maildir/}.
12635 @item :subdirs
12636 The subdirectories of the Maildir.  The default is
12637 @samp{("new" "cur")}.
12638
12639 @c If you sometimes look at your mail through a pop3 daemon before fetching
12640 @c them with Gnus, you may also have to fetch your mails from the
12641 @c @code{cur} directory inside the maildir, like in the first example
12642 @c below.
12643
12644 You can also get mails from remote hosts (because maildirs don't suffer
12645 from locking problems).
12646
12647 @end table
12648
12649 Two example maildir mail sources:
12650
12651 @lisp
12652 (maildir :path "/home/user-name/Maildir/"
12653          :subdirs ("cur" "new"))
12654 @end lisp
12655
12656 @lisp
12657 (maildir :path "/user@@remotehost.org:~/Maildir/"
12658          :subdirs ("new"))
12659 @end lisp
12660
12661 @item imap
12662 Get mail from a @sc{imap} server.  If you don't want to use @sc{imap}
12663 as intended, as a network mail reading protocol (ie with nnimap), for
12664 some reason or other, Gnus let you treat it similar to a POP server
12665 and fetches articles from a given @sc{imap} mailbox.  @xref{IMAP}, for
12666 more information.
12667
12668 Note that for the Kerberos, GSSAPI, SSL/TLS and STARTTLS support you
12669 may need external programs and libraries, @xref{IMAP}.
12670
12671 Keywords:
12672
12673 @table @code
12674 @item :server
12675 The name of the @sc{imap} server.  The default is taken from the
12676 @code{MAILHOST} environment variable.
12677
12678 @item :port
12679 The port number of the @sc{imap} server.  The default is @samp{143}, or
12680 @samp{993} for SSL/TLS connections.
12681
12682 @item :user
12683 The user name to give to the @sc{imap} server.  The default is the login
12684 name.
12685
12686 @item :password
12687 The password to give to the @sc{imap} server.  If not specified, the user is
12688 prompted.
12689
12690 @item :stream
12691 What stream to use for connecting to the server, this is one of the
12692 symbols in @code{imap-stream-alist}.  Right now, this means
12693 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{ssl},
12694 @samp{shell} or the default @samp{network}.
12695
12696 @item :authentication
12697 Which authenticator to use for authenticating to the server, this is
12698 one of the symbols in @code{imap-authenticator-alist}.  Right now,
12699 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
12700 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
12701
12702 @item :program
12703 When using the `shell' :stream, the contents of this variable is
12704 mapped into the `imap-shell-program' variable.  This should be a
12705 @code{format}-like string (or list of strings).  Here's an example:
12706
12707 @example
12708 ssh %s imapd
12709 @end example
12710
12711 The valid format specifier characters are:
12712
12713 @table @samp
12714 @item s
12715 The name of the server.
12716
12717 @item l
12718 User name from `imap-default-user'.
12719
12720 @item p
12721 The port number of the server.
12722 @end table
12723
12724 The values used for these specs are taken from the values you give the
12725 corresponding keywords.
12726
12727 @item :mailbox
12728 The name of the mailbox to get mail from.  The default is @samp{INBOX}
12729 which normally is the mailbox which receive incoming mail.
12730
12731 @item :predicate
12732 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
12733 UNDELETED}, is probably the best choice for most people, but if you
12734 sometimes peek in your mailbox with a @sc{imap} client and mark some
12735 articles as read (or; SEEN) you might want to set this to @samp{nil}.
12736 Then all articles in the mailbox is fetched, no matter what.  For a
12737 complete list of predicates, see RFC 2060 section 6.4.4.
12738
12739 @item :fetchflag
12740 How to flag fetched articles on the server, the default @samp{\Deleted}
12741 will mark them as deleted, an alternative would be @samp{\Seen} which
12742 would simply mark them as read.  These are the two most likely choices,
12743 but more flags are defined in RFC 2060 section 2.3.2.
12744
12745 @item :dontexpunge
12746 If non-nil, don't remove all articles marked as deleted in the mailbox
12747 after finishing the fetch.
12748
12749 @end table
12750
12751 An example @sc{imap} mail source:
12752
12753 @lisp
12754 (imap :server "mail.mycorp.com"
12755       :stream kerberos4
12756       :fetchflag "\\Seen")
12757 @end lisp
12758
12759 @item webmail
12760 Get mail from a webmail server, such as @uref{www.hotmail.com},
12761 @uref{webmail.netscape.com}, @uref{www.netaddress.com},
12762 @uref{www.my-deja.com}.
12763
12764 NOTE: Now @uref{mail.yahoo.com} provides POP3 service, so @sc{pop} mail source
12765 is suggested.
12766
12767 NOTE: Webmail largely depends cookies. A "one-line-cookie" patch is
12768 required for url "4.0pre.46".
12769
12770 WARNING: Mails may lost.  NO WARRANTY.
12771
12772 Keywords:
12773
12774 @table @code
12775 @item :subtype
12776 The type of the webmail server.  The default is @code{hotmail}.  The
12777 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
12778
12779 @item :user
12780 The user name to give to the webmail server.  The default is the login
12781 name.
12782
12783 @item :password
12784 The password to give to the webmail server.  If not specified, the user is
12785 prompted.
12786
12787 @item :dontexpunge
12788 If non-nil, only fetch unread articles and don't move them to trash
12789 folder after finishing the fetch.
12790
12791 @end table
12792
12793 An example webmail source:
12794
12795 @lisp
12796 (webmail :subtype 'hotmail
12797          :user "user-name"
12798          :password "secret")
12799 @end lisp
12800 @end table
12801
12802 @table @dfn
12803 @item Common Keywords
12804 Common keywords can be used in any type of mail source.
12805
12806 Keywords:
12807
12808 @table @code
12809 @item :plugged
12810 If non-nil, fetch the mail even when Gnus is unplugged.  If you use
12811 directory source to get mail, you can specify it as in this example:
12812
12813 @lisp
12814 (setq mail-sources
12815       '((directory :path "/home/pavel/.Spool/"
12816                    :suffix ""
12817                    :plugged t)))
12818 @end lisp
12819
12820 Gnus will then fetch your mail even when you are unplugged.  This is
12821 useful when you use local mail and news.
12822
12823 @end table
12824 @end table
12825
12826 @subsubsection Function Interface
12827
12828 Some of the above keywords specify a Lisp function to be executed.
12829 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
12830 the value of the keyword while the function is executing.  For example,
12831 consider the following mail-source setting:
12832
12833 @lisp
12834 (setq mail-sources '((pop :user "jrl"
12835                           :server "pophost" :function fetchfunc)))
12836 @end lisp
12837
12838 While the function @code{fetchfunc} is executing, the symbol @code{user}
12839 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
12840 @code{"pophost"}.  The symbols @code{port}, @code{password},
12841 @code{program}, @code{prescript}, @code{postscript}, @code{function},
12842 and @code{authentication} are also bound (to their default values).
12843
12844 See above for a list of keywords for each type of mail source.
12845
12846
12847 @node Mail Source Customization
12848 @subsubsection Mail Source Customization
12849
12850 The following is a list of variables that influence how the mail is
12851 fetched.  You would normally not need to set or change any of these
12852 variables.
12853
12854 @table @code
12855 @item mail-source-crash-box
12856 @vindex mail-source-crash-box
12857 File where mail will be stored while processing it.  The default is
12858 @file{~/.emacs-mail-crash-box}.
12859
12860 @item mail-source-delete-incoming
12861 @vindex mail-source-delete-incoming
12862 If non-@code{nil}, delete incoming files after handling them.
12863
12864 @item mail-source-directory
12865 @vindex mail-source-directory
12866 Directory where files (if any) will be stored.  The default is
12867 @file{~/Mail/}.  At present, the only thing this is used for is to say
12868 where the incoming files will be stored if the previous variable is
12869 @code{nil}.
12870
12871 @item mail-source-incoming-file-prefix
12872 @vindex mail-source-incoming-file-prefix
12873 Prefix for file name for storing incoming mail.  The default is
12874 @file{Incoming}, in which case files will end up with names like
12875 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
12876 relevant if @code{mail-source-delete-incoming} is @code{nil}.
12877
12878 @item mail-source-default-file-modes
12879 @vindex mail-source-default-file-modes
12880 All new mail files will get this file mode.  The default is 384.
12881
12882 @item mail-source-movemail-program
12883 @vindex mail-source-movemail-program
12884 If non-nil, name of program for fetching new mail.  If nil,
12885 @code{movemail} in @var{exec-directory}.
12886
12887 @end table
12888
12889
12890 @node Fetching Mail
12891 @subsubsection Fetching Mail
12892
12893 @vindex mail-sources
12894 @vindex nnmail-spool-file
12895 The way to actually tell Gnus where to get new mail from is to set
12896 @code{mail-sources} to a list of mail source specifiers
12897 (@pxref{Mail Source Specifiers}).
12898
12899 If this variable (and the obsolescent @code{nnmail-spool-file}) is
12900 @code{nil}, the mail back ends will never attempt to fetch mail by
12901 themselves.
12902
12903 If you want to fetch mail both from your local spool as well as a POP
12904 mail server, you'd say something like:
12905
12906 @lisp
12907 (setq mail-sources
12908       '((file)
12909         (pop :server "pop3.mail.server"
12910              :password "secret")))
12911 @end lisp
12912
12913 Or, if you don't want to use any of the keyword defaults:
12914
12915 @lisp
12916 (setq mail-sources
12917       '((file :path "/var/spool/mail/user-name")
12918         (pop :server "pop3.mail.server"
12919              :user "user-name"
12920              :port "pop3"
12921              :password "secret")))
12922 @end lisp
12923
12924
12925 When you use a mail back end, Gnus will slurp all your mail from your
12926 inbox and plonk it down in your home directory.  Gnus doesn't move any
12927 mail if you're not using a mail back end---you have to do a lot of magic
12928 invocations first.  At the time when you have finished drawing the
12929 pentagram, lightened the candles, and sacrificed the goat, you really
12930 shouldn't be too surprised when Gnus moves your mail.
12931
12932
12933
12934 @node Mail Back End Variables
12935 @subsection Mail Back End Variables
12936
12937 These variables are (for the most part) pertinent to all the various
12938 mail back ends.
12939
12940 @table @code
12941 @vindex nnmail-read-incoming-hook
12942 @item nnmail-read-incoming-hook
12943 The mail back ends all call this hook after reading new mail.  You can
12944 use this hook to notify any mail watch programs, if you want to.
12945
12946 @vindex nnmail-split-hook
12947 @item nnmail-split-hook
12948 @findex article-decode-encoded-words
12949 @findex RFC 1522 decoding
12950 @findex RFC 2047 decoding
12951 Hook run in the buffer where the mail headers of each message is kept
12952 just before the splitting based on these headers is done.  The hook is
12953 free to modify the buffer contents in any way it sees fit---the buffer
12954 is discarded after the splitting has been done, and no changes performed
12955 in the buffer will show up in any files.
12956 @code{gnus-article-decode-encoded-words} is one likely function to add
12957 to this hook.
12958
12959 @vindex nnmail-pre-get-new-mail-hook
12960 @vindex nnmail-post-get-new-mail-hook
12961 @item nnmail-pre-get-new-mail-hook
12962 @itemx nnmail-post-get-new-mail-hook
12963 These are two useful hooks executed when treating new incoming
12964 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
12965 starting to handle the new mail) and
12966 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
12967 is done).  Here's and example of using these two hooks to change the
12968 default file modes the new mail files get:
12969
12970 @lisp
12971 (add-hook 'nnmail-pre-get-new-mail-hook
12972           (lambda () (set-default-file-modes 511)))
12973
12974 (add-hook 'nnmail-post-get-new-mail-hook
12975           (lambda () (set-default-file-modes 551)))
12976 @end lisp
12977
12978 @item nnmail-use-long-file-names
12979 @vindex nnmail-use-long-file-names
12980 If non-@code{nil}, the mail back ends will use long file and directory
12981 names.  Groups like @samp{mail.misc} will end up in directories
12982 (assuming use of @code{nnml} back end) or files (assuming use of
12983 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
12984 the same group will end up in @file{mail/misc}.
12985
12986 @item nnmail-delete-file-function
12987 @vindex nnmail-delete-file-function
12988 @findex delete-file
12989 Function called to delete files.  It is @code{delete-file} by default.
12990
12991 @item nnmail-cache-accepted-message-ids
12992 @vindex nnmail-cache-accepted-message-ids
12993 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
12994 the back end (via @code{Gcc}, for instance) into the mail duplication
12995 discovery cache.  The default is @code{nil}.
12996
12997 @end table
12998
12999
13000 @node Fancy Mail Splitting
13001 @subsection Fancy Mail Splitting
13002 @cindex mail splitting
13003 @cindex fancy mail splitting
13004
13005 @vindex nnmail-split-fancy
13006 @findex nnmail-split-fancy
13007 If the rather simple, standard method for specifying how to split mail
13008 doesn't allow you to do what you want, you can set
13009 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13010 play with the @code{nnmail-split-fancy} variable.
13011
13012 Let's look at an example value of this variable first:
13013
13014 @lisp
13015 ;; Messages from the mailer daemon are not crossposted to any of
13016 ;; the ordinary groups.  Warnings are put in a separate group
13017 ;; from real errors.
13018 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13019                    "mail.misc"))
13020    ;; Non-error messages are crossposted to all relevant
13021    ;; groups, but we don't crosspost between the group for the
13022    ;; (ding) list and the group for other (ding) related mail.
13023    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13024          ("subject" "ding" "ding.misc"))
13025       ;; Other mailing lists...
13026       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13027       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13028       ;; Both lists below have the same suffix, so prevent
13029       ;; cross-posting to mkpkg.list of messages posted only to
13030       ;; the bugs- list, but allow cross-posting when the
13031       ;; message was really cross-posted.
13032       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13033       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13034       ;; People...
13035       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13036    ;; Unmatched mail goes to the catch all group.
13037    "misc.misc")
13038 @end lisp
13039
13040 This variable has the format of a @dfn{split}.  A split is a (possibly)
13041 recursive structure where each split may contain other splits.  Here are
13042 the five possible split syntaxes:
13043
13044 @enumerate
13045
13046 @item
13047 @samp{group}: If the split is a string, that will be taken as a group
13048 name.  Normal regexp match expansion will be done.  See below for
13049 examples.
13050
13051 @item
13052 @code{(@var{field} @var{value} @code{[-} @var{restrict}
13053 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
13054 first element of which is a string, then store the message as
13055 specified by @var{split}, if header @var{field} (a regexp) contains
13056 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
13057 matches some string after @var{field} and before the end of the
13058 matched @var{value}, the @var{split} is ignored.  If none of the
13059 @var{restrict} clauses match, @var{split} is processed.
13060
13061 @item
13062 @code{(| @var{split}@dots{})}: If the split is a list, and the first
13063 element is @code{|} (vertical bar), then process each @var{split} until
13064 one of them matches.  A @var{split} is said to match if it will cause
13065 the mail message to be stored in one or more groups.
13066
13067 @item
13068 @code{(& @var{split}@dots{})}: If the split is a list, and the first
13069 element is @code{&}, then process all @var{split}s in the list.
13070
13071 @item
13072 @code{junk}: If the split is the symbol @code{junk}, then don't save
13073 (i.e., delete) this message.  Use with extreme caution.
13074
13075 @item
13076 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
13077 a list, and the first element is @code{:}, then the second element will
13078 be called as a function with @var{args} given as arguments.  The
13079 function should return a @var{split}.
13080
13081 @cindex body split
13082 For instance, the following function could be used to split based on the
13083 body of the messages:
13084
13085 @lisp
13086 (defun split-on-body ()
13087   (save-excursion
13088     (set-buffer " *nnmail incoming*")
13089     (goto-char (point-min))
13090     (when (re-search-forward "Some.*string" nil t)
13091       "string.group")))
13092 @end lisp
13093
13094 The @samp{" *nnmail incoming*"} is narrowed to the message in question
13095 when the @code{:} function is run.
13096
13097 @item
13098 @code{(! @var{func} @var{split})}: If the split is a list, and the first
13099 element is @code{!}, then SPLIT will be processed, and FUNC will be
13100 called as a function with the result of SPLIT as argument.  FUNC should
13101 return a split.
13102
13103 @item
13104 @code{nil}: If the split is @code{nil}, it is ignored.
13105
13106 @end enumerate
13107
13108 In these splits, @var{field} must match a complete field name.
13109 @var{value} must match a complete word according to the fundamental mode
13110 syntax table.  You can use @code{.*} in the regexps to match partial
13111 field names or words.  In other words, all @var{value}'s are wrapped in
13112 @samp{\<} and @samp{\>} pairs.
13113
13114 @vindex nnmail-split-abbrev-alist
13115 @var{field} and @var{value} can also be lisp symbols, in that case they
13116 are expanded as specified by the variable
13117 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells, where
13118 the @code{car} of a cell contains the key, and the @code{cdr} contains the associated
13119 value.
13120
13121 @vindex nnmail-split-fancy-syntax-table
13122 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13123 when all this splitting is performed.
13124
13125 If you want to have Gnus create groups dynamically based on some
13126 information in the headers (i.e., do @code{replace-match}-like
13127 substitutions in the group names), you can say things like:
13128
13129 @example
13130 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13131 @end example
13132
13133 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13134 will be filed in @samp{mail.debian.foo}.
13135
13136 If the string contains the element @samp{\&}, then the previously
13137 matched string will be substituted.  Similarly, the elements @samp{\\1}
13138 up to @samp{\\9} will be substituted with the text matched by the
13139 groupings 1 through 9.
13140
13141 @findex nnmail-split-fancy-with-parent
13142 @code{nnmail-split-fancy-with-parent} is a function which allows you to
13143 split followups into the same groups their parents are in.  Sometimes
13144 you can't make splitting rules for all your mail.  For example, your
13145 boss might send you personal mail regarding different projects you are
13146 working on, and as you can't tell your boss to put a distinguishing
13147 string into the subject line, you have to resort to manually moving the
13148 messages into the right group.  With this function, you only have to do
13149 it once per thread.
13150
13151 To use this feature, you have to set @code{nnmail-treat-duplicates} and
13152 @code{nnmail-cache-accepted-message-ids} to a non-nil value.  And then
13153 you can include @code{nnmail-split-fancy-with-parent} using the colon
13154 feature, like so:
13155 @lisp
13156 (setq nnmail-split-fancy
13157       '(| (: nnmail-split-fancy-with-parent)
13158           ;; other splits go here
13159         ))
13160 @end lisp
13161
13162 This feature works as follows: when @code{nnmail-treat-duplicates} is
13163 non-nil, Gnus records the message id of every message it sees in the
13164 file specified by the variable @code{nnmail-message-id-cache-file},
13165 together with the group it is in (the group is omitted for non-mail
13166 messages).  When mail splitting is invoked, the function
13167 @code{nnmail-split-fancy-with-parent} then looks at the References (and
13168 In-Reply-To) header of each message to split and searches the file
13169 specified by @code{nnmail-message-id-cache-file} for the message ids.
13170 When it has found a parent, it returns the corresponding group name
13171 unless the group name matches the regexp
13172 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is recommended
13173 that you set @code{nnmail-message-id-cache-length} to a somewhat higher
13174 number than the default so that the message ids are still in the cache.
13175 (A value of 5000 appears to create a file some 300 kBytes in size.)
13176 @vindex nnmail-cache-accepted-message-ids
13177 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
13178 also records the message ids of moved articles, so that the followup
13179 messages goes into the new group.
13180
13181
13182 @node Group Mail Splitting
13183 @subsection Group Mail Splitting
13184 @cindex mail splitting
13185 @cindex group mail splitting
13186
13187 @findex gnus-group-split
13188 If you subscribe to dozens of mailing lists but you don't want to
13189 maintain mail splitting rules manually, group mail splitting is for you.
13190 You just have to set @var{to-list} and/or @var{to-address} in group
13191 parameters or group customization and set @code{nnmail-split-methods} to
13192 @code{gnus-group-split}.  This splitting function will scan all groups
13193 for those parameters and split mail accordingly, i.e., messages posted
13194 from or to the addresses specified in the parameters @var{to-list} or
13195 @var{to-address} of a mail group will be stored in that group.
13196
13197 Sometimes, mailing lists have multiple addresses, and you may want mail
13198 splitting to recognize them all: just set the @var{extra-aliases} group
13199 parameter to the list of additional addresses and it's done.  If you'd
13200 rather use a regular expression, set @var{split-regexp}.
13201
13202 All these parameters in a group will be used to create an
13203 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
13204 the @var{value} is a single regular expression that matches
13205 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
13206 matches of @var{split-regexp}, and the @var{split} is the name of the
13207 group.  @var{restrict}s are also supported: just set the
13208 @var{split-exclude} parameter to a list of regular expressions.
13209
13210 If you can't get the right split to be generated using all these
13211 parameters, or you just need something fancier, you can set the
13212 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
13213 this case, all other aforementioned parameters will be ignored by
13214 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
13215 @code{nil}, in which case the group will be ignored by
13216 @code{gnus-group-split}.
13217
13218 @vindex gnus-group-split-default-catch-all-group
13219 @code{gnus-group-split} will do cross-posting on all groups that match,
13220 by defining a single @code{&} fancy split containing one split for each
13221 group.  If a message doesn't match any split, it will be stored in the
13222 group named in @code{gnus-group-split-default-catch-all-group}, unless
13223 some group has @var{split-spec} set to @code{catch-all}, in which case
13224 that group is used as the catch-all group.  Even though this variable is
13225 often used just to name a group, it may also be set to an arbitrarily
13226 complex fancy split (after all, a group name is a fancy split), and this
13227 may be useful to split mail that doesn't go to any mailing list to
13228 personal mail folders.  Note that this fancy split is added as the last
13229 element of a @code{|} split list that also contains a @code{&} split
13230 with the rules extracted from group parameters.
13231
13232 It's time for an example.  Assume the following group parameters have
13233 been defined:
13234
13235 @example
13236 nnml:mail.bar:
13237 ((to-address . "bar@@femail.com")
13238  (split-regexp . ".*@@femail\\.com"))
13239 nnml:mail.foo:
13240 ((to-list . "foo@@nowhere.gov")
13241  (extra-aliases "foo@@localhost" "foo-redist@@home")
13242  (split-exclude "bugs-foo" "rambling-foo")
13243  (admin-address . "foo-request@@nowhere.gov"))
13244 nnml:mail.others:
13245 ((split-spec . catch-all))
13246 @end example
13247
13248 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
13249 behave as if @code{nnmail-split-fancy} had been selected and variable
13250 @code{nnmail-split-fancy} had been set as follows:
13251
13252 @lisp
13253 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
13254       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
13255            - "bugs-foo" - "rambling-foo" "mail.foo"))
13256    "mail.others")
13257 @end lisp
13258
13259 @findex gnus-group-split-fancy
13260 If you'd rather not use group splitting for all your mail groups, you
13261 may use it for only some of them, by using @code{nnmail-split-fancy}
13262 splits like this:
13263
13264 @lisp
13265 (: gnus-mlsplt-fancy GROUPS NO-CROSSPOST CATCH-ALL)
13266 @end lisp
13267
13268 @var{groups} may be a regular expression or a list of group names whose
13269 parameters will be scanned to generate the output split.
13270 @var{no-crosspost} can be used to disable cross-posting; in this case, a
13271 single @code{|} split will be output.  @var{catch-all} is the fallback
13272 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
13273 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
13274 empty string in any selected group, no catch-all split will be issued.
13275 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
13276 this group will override the value of the @var{catch-all} argument.
13277
13278 @findex gnus-group-split-setup
13279 Unfortunately, scanning all groups and their parameters can be quite
13280 slow, especially considering that it has to be done for every message.
13281 But don't despair!  The function @code{gnus-group-split-setup} can be
13282 used to enable @code{gnus-group-split} in a much more efficient way.  It
13283 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
13284 @code{nnmail-split-fancy} to the split produced by
13285 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
13286 scanned once, no matter how many messages are split.
13287
13288 @findex gnus-group-split-update
13289 However, if you change group parameters, you'd have to update
13290 @code{nnmail-split-fancy} manually.  You can do it by running
13291 @code{gnus-group-split-update}.  If you'd rather have it updated
13292 automatically, just tell @code{gnus-group-split-setup} to do it for
13293 you.  For example, add to your @file{.gnus}:
13294
13295 @lisp
13296 (gnus-group-split-setup AUTO-UPDATE CATCH-ALL)
13297 @end lisp
13298
13299 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
13300 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
13301 have to worry about updating @code{nnmail-split-fancy} again.  If you
13302 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
13303 @code{gnus-group-split-default-catch-all-group} will be set to its
13304 value.
13305
13306 @vindex gnus-group-split-updated-hook
13307 Because you may want to change @code{nnmail-split-fancy} after it is set
13308 by @code{gnus-group-split-update}, this function will run
13309 @code{gnus-group-split-updated-hook} just before finishing.
13310
13311 @node Incorporating Old Mail
13312 @subsection Incorporating Old Mail
13313 @cindex incorporating old mail
13314 @cindex import old mail
13315
13316 Most people have lots of old mail stored in various file formats.  If
13317 you have set up Gnus to read mail using one of the spiffy Gnus mail
13318 back ends, you'll probably wish to have that old mail incorporated into
13319 your mail groups.
13320
13321 Doing so can be quite easy.
13322
13323 To take an example: You're reading mail using @code{nnml}
13324 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
13325 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
13326 file filled with important, but old, mail.  You want to move it into
13327 your @code{nnml} groups.
13328
13329 Here's how:
13330
13331 @enumerate
13332 @item
13333 Go to the group buffer.
13334
13335 @item
13336 Type `G f' and give the path to the mbox file when prompted to create an
13337 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
13338
13339 @item
13340 Type `SPACE' to enter the newly created group.
13341
13342 @item
13343 Type `M P b' to process-mark all articles in this group's buffer
13344 (@pxref{Setting Process Marks}).
13345
13346 @item
13347 Type `B r' to respool all the process-marked articles, and answer
13348 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
13349 @end enumerate
13350
13351 All the mail messages in the mbox file will now also be spread out over
13352 all your @code{nnml} groups.  Try entering them and check whether things
13353 have gone without a glitch.  If things look ok, you may consider
13354 deleting the mbox file, but I wouldn't do that unless I was absolutely
13355 sure that all the mail has ended up where it should be.
13356
13357 Respooling is also a handy thing to do if you're switching from one mail
13358 back end to another.  Just respool all the mail in the old mail groups
13359 using the new mail back end.
13360
13361
13362 @node Expiring Mail
13363 @subsection Expiring Mail
13364 @cindex article expiry
13365
13366 Traditional mail readers have a tendency to remove mail articles when
13367 you mark them as read, in some way.  Gnus takes a fundamentally
13368 different approach to mail reading.
13369
13370 Gnus basically considers mail just to be news that has been received in
13371 a rather peculiar manner.  It does not think that it has the power to
13372 actually change the mail, or delete any mail messages.  If you enter a
13373 mail group, and mark articles as ``read'', or kill them in some other
13374 fashion, the mail articles will still exist on the system.  I repeat:
13375 Gnus will not delete your old, read mail.  Unless you ask it to, of
13376 course.
13377
13378 To make Gnus get rid of your unwanted mail, you have to mark the
13379 articles as @dfn{expirable}.  This does not mean that the articles will
13380 disappear right away, however.  In general, a mail article will be
13381 deleted from your system if, 1) it is marked as expirable, AND 2) it is
13382 more than one week old.  If you do not mark an article as expirable, it
13383 will remain on your system until hell freezes over.  This bears
13384 repeating one more time, with some spurious capitalizations: IF you do
13385 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
13386
13387 @vindex gnus-auto-expirable-newsgroups
13388 You do not have to mark articles as expirable by hand.  Groups that
13389 match the regular expression @code{gnus-auto-expirable-newsgroups} will
13390 have all articles that you read marked as expirable automatically.  All
13391 articles marked as expirable have an @samp{E} in the first
13392 column in the summary buffer.
13393
13394 By default, if you have auto expiry switched on, Gnus will mark all the
13395 articles you read as expirable, no matter if they were read or unread
13396 before.  To avoid having articles marked as read marked as expirable
13397 automatically, you can put something like the following in your
13398 @file{.gnus} file:
13399
13400 @vindex gnus-mark-article-hook
13401 @lisp
13402 (remove-hook 'gnus-mark-article-hook
13403              'gnus-summary-mark-read-and-unread-as-read)
13404 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
13405 @end lisp
13406
13407 Note that making a group auto-expirable doesn't mean that all read
13408 articles are expired---only the articles marked as expirable
13409 will be expired.  Also note that using the @kbd{d} command won't make
13410 articles expirable---only semi-automatic marking of articles as read will
13411 mark the articles as expirable in auto-expirable groups.
13412
13413 Let's say you subscribe to a couple of mailing lists, and you want the
13414 articles you have read to disappear after a while:
13415
13416 @lisp
13417 (setq gnus-auto-expirable-newsgroups
13418       "mail.nonsense-list\\|mail.nice-list")
13419 @end lisp
13420
13421 Another way to have auto-expiry happen is to have the element
13422 @code{auto-expire} in the group parameters of the group.
13423
13424 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
13425 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
13426 don't really mix very well.
13427
13428 @vindex nnmail-expiry-wait
13429 The @code{nnmail-expiry-wait} variable supplies the default time an
13430 expirable article has to live.  Gnus starts counting days from when the
13431 message @emph{arrived}, not from when it was sent.  The default is seven
13432 days.
13433
13434 Gnus also supplies a function that lets you fine-tune how long articles
13435 are to live, based on what group they are in.  Let's say you want to
13436 have one month expiry period in the @samp{mail.private} group, a one day
13437 expiry period in the @samp{mail.junk} group, and a six day expiry period
13438 everywhere else:
13439
13440 @vindex nnmail-expiry-wait-function
13441 @lisp
13442 (setq nnmail-expiry-wait-function
13443       (lambda (group)
13444        (cond ((string= group "mail.private")
13445                31)
13446              ((string= group "mail.junk")
13447                1)
13448              ((string= group "important")
13449                'never)
13450              (t
13451                6))))
13452 @end lisp
13453
13454 The group names this function is fed are ``unadorned'' group
13455 names---no @samp{nnml:} prefixes and the like.
13456
13457 The @code{nnmail-expiry-wait} variable and
13458 @code{nnmail-expiry-wait-function} function can either be a number (not
13459 necessarily an integer) or one of the symbols @code{immediate} or
13460 @code{never}.
13461
13462 You can also use the @code{expiry-wait} group parameter to selectively
13463 change the expiry period (@pxref{Group Parameters}).
13464
13465 @vindex nnmail-expiry-target
13466 The normal action taken when expiring articles is to delete them.
13467 However, in some circumstances it might make more sense to move them
13468 to other groups instead of deleting them.  The variable
13469 @code{nnmail-expiry-target} (and the @code{expiry-target} group
13470 parameter) controls this.  The variable supplies a default value for
13471 all groups, which can be overridden for specific groups by the group
13472 parameter.  default value is @code{delete}, but this can also be a
13473 string (which should be the name of the group the message should be
13474 moved to), or a function (which will be called in a buffer narrowed to
13475 the message in question, and with the name of the group being moved
13476 from as its parameter) which should return a target -- either a group
13477 name or @code{delete}.
13478
13479 Here's an example for specifying a group name:
13480 @lisp
13481 (setq nnmail-expiry-target "nnml:expired")
13482 @end lisp
13483
13484 @findex nnmail-fancy-expiry-target
13485 @vindex nnmail-fancy-expiry-targets
13486 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
13487 expire mail to groups according to the variable
13488 @code{nnmail-fancy-expiry-targets}.  Here's an example:
13489
13490 @lisp
13491  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
13492        nnmail-fancy-expiry-targets
13493        '((to-from "boss" "nnfolder:Work")
13494          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
13495          ("from" ".*" "nnfolder:Archive-%Y")))
13496 @end lisp
13497
13498 With this setup, any mail that has @code{IMPORTANT} in its Subject
13499 header and was sent in the year @code{YYYY} and month @code{MMM}, will
13500 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}. If its
13501 From or To header contains the string @code{boss}, it will get expired
13502 to @code{nnfolder:Work}. All other mail will get expired to
13503 @code{nnfolder:Archive-YYYY}.
13504
13505 @vindex nnmail-keep-last-article
13506 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
13507 expire the final article in a mail newsgroup.  This is to make life
13508 easier for procmail users.
13509
13510 @vindex gnus-total-expirable-newsgroups
13511 By the way: That line up there, about Gnus never expiring non-expirable
13512 articles, is a lie.  If you put @code{total-expire} in the group
13513 parameters, articles will not be marked as expirable, but all read
13514 articles will be put through the expiry process.  Use with extreme
13515 caution.  Even more dangerous is the
13516 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
13517 this regexp will have all read articles put through the expiry process,
13518 which means that @emph{all} old mail articles in the groups in question
13519 will be deleted after a while.  Use with extreme caution, and don't come
13520 crying to me when you discover that the regexp you used matched the
13521 wrong group and all your important mail has disappeared.  Be a
13522 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
13523 with!  So there!
13524
13525 Most people make most of their mail groups total-expirable, though.
13526
13527 @vindex gnus-inhibit-user-auto-expire
13528 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
13529 commands will not mark an article as expirable, even if the group has
13530 auto-expire turned on.
13531
13532
13533 @node Washing Mail
13534 @subsection Washing Mail
13535 @cindex mail washing
13536 @cindex list server brain damage
13537 @cindex incoming mail treatment
13538
13539 Mailers and list servers are notorious for doing all sorts of really,
13540 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
13541 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
13542 end of all lines passing through our server, so let's do that!!!!1!''
13543 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
13544 considered to be self-evident were not discussed.  So.  Here we are.
13545
13546 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
13547 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
13548 be shocked and dismayed by this, but I haven't got the energy.  It is to
13549 laugh.
13550
13551 Gnus provides a plethora of functions for washing articles while
13552 displaying them, but it might be nicer to do the filtering before
13553 storing the mail to disc.  For that purpose, we have three hooks and
13554 various functions that can be put in these hooks.
13555
13556 @table @code
13557 @item nnmail-prepare-incoming-hook
13558 @vindex nnmail-prepare-incoming-hook
13559 This hook is called before doing anything with the mail and is meant for
13560 grand, sweeping gestures.  It is called in a buffer that contains all
13561 the new, incoming mail.  Functions to be used include:
13562
13563 @table @code
13564 @item nnheader-ms-strip-cr
13565 @findex nnheader-ms-strip-cr
13566 Remove trailing carriage returns from each line.  This is default on
13567 Emacs running on MS machines.
13568
13569 @end table
13570
13571 @item nnmail-prepare-incoming-header-hook
13572 @vindex nnmail-prepare-incoming-header-hook
13573 This hook is called narrowed to each header.  It can be used when
13574 cleaning up the headers.  Functions that can be used include:
13575
13576 @table @code
13577 @item nnmail-remove-leading-whitespace
13578 @findex nnmail-remove-leading-whitespace
13579 Clear leading white space that ``helpful'' listservs have added to the
13580 headers to make them look nice.  Aaah.
13581
13582 @item nnmail-remove-list-identifiers
13583 @findex nnmail-remove-list-identifiers
13584 Some list servers add an identifier---for example, @samp{(idm)}---to the
13585 beginning of all @code{Subject} headers.  I'm sure that's nice for
13586 people who use stone age mail readers.  This function will remove
13587 strings that match the @code{nnmail-list-identifiers} regexp, which can
13588 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
13589 @code{\\(..\\)}.
13590
13591 For instance, if you want to remove the @samp{(idm)} and the
13592 @samp{nagnagnag} identifiers:
13593
13594 @lisp
13595 (setq nnmail-list-identifiers
13596       '("(idm)" "nagnagnag"))
13597 @end lisp
13598
13599 This can also be done non-destructively with
13600 @code{gnus-list-identifiers}, @xref{Article Hiding}.
13601
13602 @item nnmail-remove-tabs
13603 @findex nnmail-remove-tabs
13604 Translate all @samp{TAB} characters into @samp{SPACE} characters.
13605
13606 @item nnmail-fix-eudora-headers
13607 @findex nnmail-fix-eudora-headers
13608 @cindex Eudora
13609 Eudora produces broken @code{References} headers, but OK
13610 @code{In-Reply-To} headers.  This function will get rid of the
13611 @code{References} headers.
13612
13613 @end table
13614
13615 @item nnmail-prepare-incoming-message-hook
13616 @vindex nnmail-prepare-incoming-message-hook
13617 This hook is called narrowed to each message.  Functions to be used
13618 include:
13619
13620 @table @code
13621 @item article-de-quoted-unreadable
13622 @findex article-de-quoted-unreadable
13623 Decode Quoted Readable encoding.
13624
13625 @end table
13626 @end table
13627
13628
13629 @node Duplicates
13630 @subsection Duplicates
13631
13632 @vindex nnmail-treat-duplicates
13633 @vindex nnmail-message-id-cache-length
13634 @vindex nnmail-message-id-cache-file
13635 @cindex duplicate mails
13636 If you are a member of a couple of mailing lists, you will sometimes
13637 receive two copies of the same mail.  This can be quite annoying, so
13638 @code{nnmail} checks for and treats any duplicates it might find.  To do
13639 this, it keeps a cache of old @code{Message-ID}s---
13640 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
13641 default.  The approximate maximum number of @code{Message-ID}s stored
13642 there is controlled by the @code{nnmail-message-id-cache-length}
13643 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
13644 stored.) If all this sounds scary to you, you can set
13645 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
13646 default), and @code{nnmail} won't delete duplicate mails.  Instead it
13647 will insert a warning into the head of the mail saying that it thinks
13648 that this is a duplicate of a different message.
13649
13650 This variable can also be a function.  If that's the case, the function
13651 will be called from a buffer narrowed to the message in question with
13652 the @code{Message-ID} as a parameter.  The function must return either
13653 @code{nil}, @code{warn}, or @code{delete}.
13654
13655 You can turn this feature off completely by setting the variable to
13656 @code{nil}.
13657
13658 If you want all the duplicate mails to be put into a special
13659 @dfn{duplicates} group, you could do that using the normal mail split
13660 methods:
13661
13662 @lisp
13663 (setq nnmail-split-fancy
13664       '(| ;; Messages duplicates go to a separate group.
13665           ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
13666           ;; Message from daemons, postmaster, and the like to another.
13667           (any mail "mail.misc")
13668           ;; Other rules.
13669           [ ... ] ))
13670 @end lisp
13671
13672 Or something like:
13673 @lisp
13674 (setq nnmail-split-methods
13675       '(("duplicates" "^Gnus-Warning:.*duplicate")
13676         ;; Other rules.
13677         [...]))
13678 @end lisp
13679
13680 Here's a neat feature: If you know that the recipient reads her mail
13681 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
13682 @code{delete}, you can send her as many insults as you like, just by
13683 using a @code{Message-ID} of a mail that you know that she's already
13684 received.  Think of all the fun!  She'll never see any of it!  Whee!
13685
13686
13687 @node Not Reading Mail
13688 @subsection Not Reading Mail
13689
13690 If you start using any of the mail back ends, they have the annoying
13691 habit of assuming that you want to read mail with them.  This might not
13692 be unreasonable, but it might not be what you want.
13693
13694 If you set @code{mail-sources} and @code{nnmail-spool-file} to
13695 @code{nil}, none of the back ends will ever attempt to read incoming
13696 mail, which should help.
13697
13698 @vindex nnbabyl-get-new-mail
13699 @vindex nnmbox-get-new-mail
13700 @vindex nnml-get-new-mail
13701 @vindex nnmh-get-new-mail
13702 @vindex nnfolder-get-new-mail
13703 This might be too much, if, for instance, you are reading mail quite
13704 happily with @code{nnml} and just want to peek at some old @sc{rmail}
13705 file you have stashed away with @code{nnbabyl}.  All back ends have
13706 variables called back-end-@code{get-new-mail}.  If you want to disable
13707 the @code{nnbabyl} mail reading, you edit the virtual server for the
13708 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
13709
13710 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
13711 narrowed to the article to be saved before saving it when reading
13712 incoming mail.
13713
13714
13715 @node Choosing a Mail Back End
13716 @subsection Choosing a Mail Back End
13717
13718 Gnus will read the mail spool when you activate a mail group.  The mail
13719 file is first copied to your home directory.  What happens after that
13720 depends on what format you want to store your mail in.
13721
13722 There are six different mail back ends in the standard Gnus, and more
13723 back ends are available separately.  The mail back end most people use
13724 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
13725 Spool}).  You might notice that only five back ends are listed below;
13726 @code{nnmaildir}'s documentation has not yet been completely
13727 incorporated into this manual.  Until it is, you can find it at
13728 @uref{http://multivac.cwru.edu./nnmaildir/}.
13729
13730 @menu
13731 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
13732 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
13733 * Mail Spool::                  Store your mail in a private spool?
13734 * MH Spool::                    An mhspool-like back end.
13735 * Mail Folders::                Having one file for each group.
13736 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
13737 @end menu
13738
13739
13740 @node Unix Mail Box
13741 @subsubsection Unix Mail Box
13742 @cindex nnmbox
13743 @cindex unix mail box
13744
13745 @vindex nnmbox-active-file
13746 @vindex nnmbox-mbox-file
13747 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
13748 mail.  @code{nnmbox} will add extra headers to each mail article to say
13749 which group it belongs in.
13750
13751 Virtual server settings:
13752
13753 @table @code
13754 @item nnmbox-mbox-file
13755 @vindex nnmbox-mbox-file
13756 The name of the mail box in the user's home directory.  Default is
13757 @file{~/mbox}.
13758
13759 @item nnmbox-active-file
13760 @vindex nnmbox-active-file
13761 The name of the active file for the mail box.  Default is
13762 @file{~/.mbox-active}.
13763
13764 @item nnmbox-get-new-mail
13765 @vindex nnmbox-get-new-mail
13766 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
13767 into groups.  Default is @code{t}.
13768 @end table
13769
13770
13771 @node Rmail Babyl
13772 @subsubsection Rmail Babyl
13773 @cindex nnbabyl
13774 @cindex rmail mbox
13775
13776 @vindex nnbabyl-active-file
13777 @vindex nnbabyl-mbox-file
13778 The @dfn{nnbabyl} back end will use a babyl mail box (aka. @dfn{rmail
13779 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
13780 mail article to say which group it belongs in.
13781
13782 Virtual server settings:
13783
13784 @table @code
13785 @item nnbabyl-mbox-file
13786 @vindex nnbabyl-mbox-file
13787 The name of the rmail mbox file.  The default is @file{~/RMAIL}
13788
13789 @item nnbabyl-active-file
13790 @vindex nnbabyl-active-file
13791 The name of the active file for the rmail box.  The default is
13792 @file{~/.rmail-active}
13793
13794 @item nnbabyl-get-new-mail
13795 @vindex nnbabyl-get-new-mail
13796 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
13797 @code{t}
13798 @end table
13799
13800
13801 @node Mail Spool
13802 @subsubsection Mail Spool
13803 @cindex nnml
13804 @cindex mail @sc{nov} spool
13805
13806 The @dfn{nnml} spool mail format isn't compatible with any other known
13807 format.  It should be used with some caution.
13808
13809 @vindex nnml-directory
13810 If you use this back end, Gnus will split all incoming mail into files,
13811 one file for each mail, and put the articles into the corresponding
13812 directories under the directory specified by the @code{nnml-directory}
13813 variable.  The default value is @file{~/Mail/}.
13814
13815 You do not have to create any directories beforehand; Gnus will take
13816 care of all that.
13817
13818 If you have a strict limit as to how many files you are allowed to store
13819 in your account, you should not use this back end.  As each mail gets its
13820 own file, you might very well occupy thousands of inodes within a few
13821 weeks.  If this is no problem for you, and it isn't a problem for you
13822 having your friendly systems administrator walking around, madly,
13823 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
13824 know that this is probably the fastest format to use.  You do not have
13825 to trudge through a big mbox file just to read your new mail.
13826
13827 @code{nnml} is probably the slowest back end when it comes to article
13828 splitting.  It has to create lots of files, and it also generates
13829 @sc{nov} databases for the incoming mails.  This makes it possibly the
13830 fastest back end when it comes to reading mail.
13831
13832 @cindex self contained nnml servers
13833 @cindex marks
13834 When the marks file is used (which it is by default), @code{nnml}
13835 servers have the property that you may backup them using @code{tar} or
13836 similar, and later be able to restore them into Gnus (by adding the
13837 proper @code{nnml} server) and have all your marks be preserved.  Marks
13838 for a group is usually stored in the @code{.marks} file (but see
13839 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
13840 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
13841 to restore the group (after restoring the backup into the nnml
13842 directory).
13843
13844 If for some reason you believe your @file{.marks} files are screwed
13845 up, you can just delete them all.  Gnus will then correctly regenerate
13846 them next time it starts.
13847
13848 Virtual server settings:
13849
13850 @table @code
13851 @item nnml-directory
13852 @vindex nnml-directory
13853 All @code{nnml} directories will be placed under this directory.
13854 The default is the value of `message-directory' (whose default value is
13855 @file{~/Mail}).
13856
13857 @item nnml-active-file
13858 @vindex nnml-active-file
13859 The active file for the @code{nnml} server.  The default is
13860 @file{~/Mail/active"}.
13861
13862 @item nnml-newsgroups-file
13863 @vindex nnml-newsgroups-file
13864 The @code{nnml} group descriptions file.  @xref{Newsgroups File
13865 Format}.  The default is @file{~/Mail/newsgroups"}.
13866
13867 @item nnml-get-new-mail
13868 @vindex nnml-get-new-mail
13869 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
13870 @code{t}.
13871
13872 @item nnml-nov-is-evil
13873 @vindex nnml-nov-is-evil
13874 If non-@code{nil}, this back end will ignore any @sc{nov} files.  The
13875 default is @code{nil}.
13876
13877 @item nnml-nov-file-name
13878 @vindex nnml-nov-file-name
13879 The name of the @sc{nov} files.  The default is @file{.overview}.
13880
13881 @item nnml-prepare-save-mail-hook
13882 @vindex nnml-prepare-save-mail-hook
13883 Hook run narrowed to an article before saving.
13884
13885 @item nnml-marks-is-evil
13886 @vindex nnml-marks-is-evil
13887 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
13888 default is @code{nil}.
13889
13890 @item nnml-marks-file-name
13891 @vindex nnml-marks-file-name
13892 The name of the @dfn{marks} files.  The default is @file{.marks}.
13893
13894 @item nnml-use-compressed-files
13895 @vindex nnml-use-compressed-files
13896 If non-@code{nil}, @code{nnml} will allow using compressed message
13897 files.
13898
13899 @end table
13900
13901 @findex nnml-generate-nov-databases
13902 If your @code{nnml} groups and @sc{nov} files get totally out of whack,
13903 you can do a complete update by typing @kbd{M-x
13904 nnml-generate-nov-databases}.  This command will trawl through the
13905 entire @code{nnml} hierarchy, looking at each and every article, so it
13906 might take a while to complete.  A better interface to this
13907 functionality can be found in the server buffer (@pxref{Server
13908 Commands}).
13909
13910
13911 @node MH Spool
13912 @subsubsection MH Spool
13913 @cindex nnmh
13914 @cindex mh-e mail spool
13915
13916 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
13917 @sc{nov} databases and it doesn't keep an active file or marks file.
13918 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
13919 but it also makes it easier to write procmail scripts for.
13920
13921 Virtual server settings:
13922
13923 @table @code
13924 @item nnmh-directory
13925 @vindex nnmh-directory
13926 All @code{nnmh} directories will be located under this directory.  The
13927 default is the value of @code{message-directory} (whose default is
13928 @file{~/Mail})
13929
13930 @item nnmh-get-new-mail
13931 @vindex nnmh-get-new-mail
13932 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
13933 @code{t}.
13934
13935 @item nnmh-be-safe
13936 @vindex nnmh-be-safe
13937 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
13938 sure that the articles in the folder are actually what Gnus thinks they
13939 are.  It will check date stamps and stat everything in sight, so
13940 setting this to @code{t} will mean a serious slow-down.  If you never
13941 use anything but Gnus to read the @code{nnmh} articles, you do not have
13942 to set this variable to @code{t}.  The default is @code{nil}.
13943 @end table
13944
13945
13946 @node Mail Folders
13947 @subsubsection Mail Folders
13948 @cindex nnfolder
13949 @cindex mbox folders
13950 @cindex mail folders
13951
13952 @code{nnfolder} is a back end for storing each mail group in a separate
13953 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
13954 will add extra headers to keep track of article numbers and arrival
13955 dates.
13956
13957 @cindex self contained nnfolder servers
13958 @cindex marks
13959 When the marks file is used (which it is by default), @code{nnfolder}
13960 servers have the property that you may backup them using @code{tar} or
13961 similar, and later be able to restore them into Gnus (by adding the
13962 proper @code{nnfolder} server) and have all your marks be preserved.
13963 Marks for a group is usually stored in a file named as the mbox file
13964 with @code{.mrk} concatenated to it (but see
13965 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
13966 Individual @code{nnfolder} groups are also possible to backup, use
13967 @kbd{G m} to restore the group (after restoring the backup into the
13968 @code{nnfolder} directory).
13969
13970 Virtual server settings:
13971
13972 @table @code
13973 @item nnfolder-directory
13974 @vindex nnfolder-directory
13975 All the @code{nnfolder} mail boxes will be stored under this directory.
13976 The default is the value of @code{message-directory} (whose default is
13977 @file{~/Mail})
13978
13979 @item nnfolder-active-file
13980 @vindex nnfolder-active-file
13981 The name of the active file.  The default is @file{~/Mail/active}.
13982
13983 @item nnfolder-newsgroups-file
13984 @vindex nnfolder-newsgroups-file
13985 The name of the group descriptions file.  @xref{Newsgroups File
13986 Format}.  The default is @file{~/Mail/newsgroups"}
13987
13988 @item nnfolder-get-new-mail
13989 @vindex nnfolder-get-new-mail
13990 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
13991 is @code{t}
13992
13993 @item nnfolder-save-buffer-hook
13994 @vindex nnfolder-save-buffer-hook
13995 @cindex backup files
13996 Hook run before saving the folders.  Note that Emacs does the normal
13997 backup renaming of files even with the @code{nnfolder} buffers.  If you
13998 wish to switch this off, you could say something like the following in
13999 your @file{.emacs} file:
14000
14001 @lisp
14002 (defun turn-off-backup ()
14003   (set (make-local-variable 'backup-inhibited) t))
14004
14005 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
14006 @end lisp
14007
14008 @item nnfolder-delete-mail-hook
14009 @vindex nnfolder-delete-mail-hook
14010 Hook run in a buffer narrowed to the message that is to be deleted.
14011 This function can be used to copy the message to somewhere else, or to
14012 extract some information from it before removing it.
14013
14014 @item nnfolder-nov-is-evil
14015 @vindex nnfolder-nov-is-evil
14016 If non-@code{nil}, this back end will ignore any @sc{nov} files.  The
14017 default is @code{nil}.
14018
14019 @item nnfolder-nov-file-suffix
14020 @vindex nnfolder-nov-file-suffix
14021 The extension for @sc{nov} files.  The default is @file{.nov}.
14022
14023 @item nnfolder-nov-directory
14024 @vindex nnfolder-nov-directory
14025 The directory where the @sc{nov} files should be stored.  If nil,
14026 @code{nnfolder-directory} is used.
14027
14028 @item nnfolder-marks-is-evil
14029 @vindex nnfolder-marks-is-evil
14030 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14031 default is @code{nil}.
14032
14033 @item nnfolder-marks-file-suffix
14034 @vindex nnfolder-marks-file-suffix
14035 The extension for @sc{marks} files.  The default is @file{.mrk}.
14036
14037 @item nnfolder-marks-directory
14038 @vindex nnfolder-marks-directory
14039 The directory where the @sc{marks} files should be stored.  If nil,
14040 @code{nnfolder-directory} is used.
14041
14042 @end table
14043
14044
14045 @findex nnfolder-generate-active-file
14046 @kindex M-x nnfolder-generate-active-file
14047 If you have lots of @code{nnfolder}-like files you'd like to read with
14048 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
14049 command to make @code{nnfolder} aware of all likely files in
14050 @code{nnfolder-directory}.  This only works if you use long file names,
14051 though.
14052
14053 @node Comparing Mail Back Ends
14054 @subsubsection Comparing Mail Back Ends
14055
14056 First, just for terminology, the @dfn{back end} is the common word for a
14057 low-level access method---a transport, if you will, by which something
14058 is acquired.  The sense is that one's mail has to come from somewhere,
14059 and so selection of a suitable back end is required in order to get that
14060 mail within spitting distance of Gnus.
14061
14062 The same concept exists for Usenet itself: Though access to articles is
14063 typically done by @sc{nntp} these days, once upon a midnight dreary, everyone
14064 in the world got at Usenet by running a reader on the machine where the
14065 articles lay (the machine which today we call an @sc{nntp} server), and
14066 access was by the reader stepping into the articles' directory spool
14067 area directly.  One can still select between either the @code{nntp} or
14068 @code{nnspool} back ends, to select between these methods, if one happens
14069 actually to live on the server (or can see its spool directly, anyway,
14070 via NFS).
14071
14072 The goal in selecting a mail back end is to pick one which
14073 simultaneously represents a suitable way of dealing with the original
14074 format plus leaving mail in a form that is convenient to use in the
14075 future.  Here are some high and low points on each:
14076
14077 @table @code
14078 @item nnmbox
14079
14080 UNIX systems have historically had a single, very common, and well-
14081 defined format.  All messages arrive in a single @dfn{spool file}, and
14082 they are delineated by a line whose regular expression matches
14083 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
14084 to make it clear in this instance that this is not the RFC-specified
14085 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
14086 historically from the Unix environment, it is simplest if one does not
14087 mess a great deal with the original mailbox format, so if one chooses
14088 this back end, Gnus' primary activity in getting mail from the real spool
14089 area to Gnus' preferred directory is simply to copy it, with no
14090 (appreciable) format change in the process.  It is the ``dumbest'' way
14091 to move mail into availability in the Gnus environment.  This makes it
14092 fast to move into place, but slow to parse, when Gnus has to look at
14093 what's where.
14094
14095 @item nnbabyl
14096
14097 Once upon a time, there was the DEC-10 and DEC-20, running operating
14098 systems called TOPS and related things, and the usual (only?) mail
14099 reading environment was a thing called Babyl.  I don't know what format
14100 was used for mail landing on the system, but Babyl had its own internal
14101 format to which mail was converted, primarily involving creating a
14102 spool-file-like entity with a scheme for inserting Babyl-specific
14103 headers and status bits above the top of each message in the file.
14104 RMAIL was Emacs' first mail reader, it was written by Richard Stallman,
14105 and Stallman came out of that TOPS/Babyl environment, so he wrote RMAIL
14106 to understand the mail files folks already had in existence.  Gnus (and
14107 VM, for that matter) continue to support this format because it's
14108 perceived as having some good qualities in those mailer-specific
14109 headers/status bits stuff.  RMAIL itself still exists as well, of
14110 course, and is still maintained by Stallman.
14111
14112 Both of the above forms leave your mail in a single file on your
14113 filesystem, and they must parse that entire file each time you take a
14114 look at your mail.
14115
14116 @item nnml
14117
14118 @code{nnml} is the back end which smells the most as though you were
14119 actually operating with an @code{nnspool}-accessed Usenet system.  (In
14120 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
14121 lo these years ago.)  One's mail is taken from the original spool file,
14122 and is then cut up into individual message files, 1:1.  It maintains a
14123 Usenet-style active file (analogous to what one finds in an INN- or
14124 CNews-based news system in (for instance) @file{/var/lib/news/active},
14125 or what is returned via the @samp{NNTP LIST} verb) and also creates
14126 @dfn{overview} files for efficient group entry, as has been defined for
14127 @sc{nntp} servers for some years now.  It is slower in mail-splitting,
14128 due to the creation of lots of files, updates to the @code{nnml} active
14129 file, and additions to overview files on a per-message basis, but it is
14130 extremely fast on access because of what amounts to the indexing support
14131 provided by the active file and overviews.
14132
14133 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
14134 resource which defines available places in the filesystem to put new
14135 files.  Sysadmins take a dim view of heavy inode occupation within
14136 tight, shared filesystems.  But if you live on a personal machine where
14137 the filesystem is your own and space is not at a premium, @code{nnml}
14138 wins big.
14139
14140 It is also problematic using this back end if you are living in a
14141 FAT16-based Windows world, since much space will be wasted on all these
14142 tiny files.
14143
14144 @item nnmh
14145
14146 The Rand MH mail-reading system has been around UNIX systems for a very
14147 long time; it operates by splitting one's spool file of messages into
14148 individual files, but with little or no indexing support -- @code{nnmh}
14149 is considered to be semantically equivalent to ``@code{nnml} without
14150 active file or overviews''.  This is arguably the worst choice, because
14151 one gets the slowness of individual file creation married to the
14152 slowness of access parsing when learning what's new in one's groups.
14153
14154 @item nnfolder
14155
14156 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
14157 method described above) on a per-group basis.  That is, @code{nnmbox}
14158 itself puts *all* one's mail in one file; @code{nnfolder} provides a
14159 little bit of optimization to this so that each of one's mail groups has
14160 a Unix mail box file.  It's faster than @code{nnmbox} because each group
14161 can be parsed separately, and still provides the simple Unix mail box
14162 format requiring minimal effort in moving the mail around.  In addition,
14163 it maintains an ``active'' file making it much faster for Gnus to figure
14164 out how many messages there are in each separate group.
14165
14166 If you have groups that are expected to have a massive amount of
14167 messages, @code{nnfolder} is not the best choice, but if you receive
14168 only a moderate amount of mail, @code{nnfolder} is probably the most
14169 friendly mail back end all over.
14170
14171 @item nnmaildir
14172
14173 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
14174 differences.  Each message is stored in a separate file, but the
14175 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
14176 also stores the equivalent of @code{nnml}'s overview files in one file
14177 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
14178 @code{df -i} to see how plentiful your inode supply is.)  If this slows
14179 you down or takes up very much space, consider switching to ReiserFS
14180 (@uref{http://www.namesys.com/}) or another non-block-structured
14181 filesystem.
14182
14183 Since maildirs don't require locking for delivery, the maildirs you use
14184 as groups can also be the maildirs your mail is directly delivered to.
14185 This means you can skip Gnus's mail splitting if your mail is already
14186 organized into different mailboxes during delivery.  A @code{directory}
14187 entry in @code{mail-sources} would have a similar effect, but would
14188 require one set of mailboxes for spooling deliveries (in mbox format,
14189 thus damaging message bodies), and another set to be used as groups (in
14190 whatever format you like).  A maildir has a built-in spool, in the
14191 @code{new/} subdirectory.  Beware that currently, mail moved from
14192 @code{new/} to @code{cur/} instead of via mail splitting will undergo
14193 treatment such as duplicate checking.
14194
14195 An article will not necessarily keep the same number across Gnus
14196 sessions; articles are renumbered starting from 1 for each Gnus session
14197 (more precisely, each time you open the @code{nnmaildir} server).  This
14198 way, you don't get gaps in your article number ranges, and when entering
14199 large groups, Gnus is likely to give a more accurate article count.  The
14200 price is that @code{nnmaildir} doesn't work with the cache or agent.
14201 This will probably be changed in the future.
14202
14203 @code{nnmaildir} stores article marks for a given group in the
14204 corresponding maildir, in a way designed so that it's easy to manipulate
14205 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
14206 else, and still have your marks.  @code{nnml} also stores marks, but
14207 it's not as easy to work with them from outside Gnus as with
14208 @code{nnmaildir}.
14209
14210 For configuring expiry and other things, @code{nnmaildir} uses group
14211 parameters slightly different from those of other mail backends.
14212
14213 @code{nnmaildir} uses a significant amount of memory to speed things up.
14214 (It keeps in memory some of the things that @code{nnml} stores in files
14215 and that @code{nnmh} repeatedly parses out of message files.)  If this
14216 is a problem for you, you can set the @code{nov-cache-size} group
14217 parameter to somthing small (0 would probably not work, but 1 probably
14218 would) to make it use less memory.
14219
14220 Startup and shutdown are likely to be slower with @code{nnmaildir} than
14221 with other backends.  Everything in between is likely to be faster,
14222 depending in part on your filesystem.
14223
14224 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
14225 to write an @code{nnmaildir}-derived backend.
14226
14227 @end table
14228
14229
14230 @node Browsing the Web
14231 @section Browsing the Web
14232 @cindex web
14233 @cindex browsing the web
14234 @cindex www
14235 @cindex http
14236
14237 Web-based discussion forums are getting more and more popular.  On many
14238 subjects, the web-based forums have become the most important forums,
14239 eclipsing the importance of mailing lists and news groups.  The reason
14240 is easy to understand---they are friendly to new users; you just point
14241 and click, and there's the discussion.  With mailing lists, you have to
14242 go through a cumbersome subscription procedure, and most people don't
14243 even know what a news group is.
14244
14245 The problem with this scenario is that web browsers are not very good at
14246 being newsreaders.  They do not keep track of what articles you've read;
14247 they do not allow you to score on subjects you're interested in; they do
14248 not allow off-line browsing; they require you to click around and drive
14249 you mad in the end.
14250
14251 So---if web browsers suck at reading discussion forums, why not use Gnus
14252 to do it instead?
14253
14254 Gnus has been getting a bit of a collection of back ends for providing
14255 interfaces to these sources.
14256
14257 @menu
14258 * Archiving Mail::              
14259 * Web Searches::                Creating groups from articles that match a string.
14260 * Slashdot::                    Reading the Slashdot comments.
14261 * Ultimate::                    The Ultimate Bulletin Board systems.
14262 * Web Archive::                 Reading mailing list archived on web.
14263 * RSS::                         Reading RDF site summary.
14264 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
14265 @end menu
14266
14267 All the web sources require Emacs/w3 and the url library to work.
14268
14269 The main caveat with all these web sources is that they probably won't
14270 work for a very long time.  Gleaning information from the @sc{html} data
14271 is guesswork at best, and when the layout is altered, the Gnus back end
14272 will fail.  If you have reasonably new versions of these back ends,
14273 though, you should be ok.
14274
14275 One thing all these Web methods have in common is that the Web sources
14276 are often down, unavailable or just plain too slow to be fun.  In those
14277 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
14278 Unplugged}) handle downloading articles, and then you can read them at
14279 leisure from your local disk.  No more World Wide Wait for you.
14280
14281 @node Archiving Mail
14282 @subsection Archiving Mail
14283 @cindex archiving mail
14284 @cindex backup of mail
14285
14286 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
14287 @code{nnmaildir}, now actually store the article marks with each group.
14288 For these servers, archiving and restoring a group while preserving
14289 marks is fairly simple.
14290
14291 (Preserving the group level and group parameters as well still
14292 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
14293 though.)
14294
14295 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
14296 server, take a recursive copy of the server directory.  There is no need
14297 to shut down Gnus, so archiving may be invoked by @code{cron} or
14298 similar.  You restore the data by restoring the directory tree, and
14299 adding a server definition pointing to that directory in Gnus. The
14300 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
14301 might interfer with overwriting data, so you may want to shut down Gnus
14302 before you restore the data.
14303
14304 It is also possible to archive individual @code{nnml},
14305 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
14306 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
14307 directory.  For @code{nnfolder} you need to copy both the base folder
14308 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
14309 this example). Restoring the group is done with @kbd{G m} from the Group
14310 buffer.  The last step makes Gnus notice the new directory.
14311 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
14312 is unnecessary in that case.
14313
14314 @node Web Searches
14315 @subsection Web Searches
14316 @cindex nnweb
14317 @cindex DejaNews
14318 @cindex Alta Vista
14319 @cindex InReference
14320 @cindex Usenet searches
14321 @cindex searching the Usenet
14322
14323 It's, like, too neat to search the Usenet for articles that match a
14324 string, but it, like, totally @emph{sucks}, like, totally, to use one of
14325 those, like, Web browsers, and you, like, have to, rilly, like, look at
14326 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
14327 searches without having to use a browser.
14328
14329 The @code{nnweb} back end allows an easy interface to the mighty search
14330 engine.  You create an @code{nnweb} group, enter a search pattern, and
14331 then enter the group and read the articles like you would any normal
14332 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
14333 Groups}) will do this in an easy-to-use fashion.
14334
14335 @code{nnweb} groups don't really lend themselves to being solid
14336 groups---they have a very fleeting idea of article numbers.  In fact,
14337 each time you enter an @code{nnweb} group (not even changing the search
14338 pattern), you are likely to get the articles ordered in a different
14339 manner.  Not even using duplicate suppression (@pxref{Duplicate
14340 Suppression}) will help, since @code{nnweb} doesn't even know the
14341 @code{Message-ID} of the articles before reading them using some search
14342 engines (DejaNews, for instance).  The only possible way to keep track
14343 of which articles you've read is by scoring on the @code{Date}
14344 header---mark all articles posted before the last date you read the
14345 group as read.
14346
14347 If the search engine changes its output substantially, @code{nnweb}
14348 won't be able to parse it and will fail.  One could hardly fault the Web
14349 providers if they were to do this---their @emph{raison d'être} is to
14350 make money off of advertisements, not to provide services to the
14351 community.  Since @code{nnweb} washes the ads off all the articles, one
14352 might think that the providers might be somewhat miffed.  We'll see.
14353
14354 You must have the @code{url} and @code{w3} package installed to be able
14355 to use @code{nnweb}.
14356
14357 Virtual server variables:
14358
14359 @table @code
14360 @item nnweb-type
14361 @vindex nnweb-type
14362 What search engine type is being used.  The currently supported types
14363 are @code{dejanews}, @code{dejanewsold}, @code{altavista} and
14364 @code{reference}.
14365
14366 @item nnweb-search
14367 @vindex nnweb-search
14368 The search string to feed to the search engine.
14369
14370 @item nnweb-max-hits
14371 @vindex nnweb-max-hits
14372 Advisory maximum number of hits per search to display.  The default is
14373 100.
14374
14375 @item nnweb-type-definition
14376 @vindex nnweb-type-definition
14377 Type-to-definition alist.  This alist says what @code{nnweb} should do
14378 with the various search engine types.  The following elements must be
14379 present:
14380
14381 @table @code
14382 @item article
14383 Function to decode the article and provide something that Gnus
14384 understands.
14385
14386 @item map
14387 Function to create an article number to message header and URL alist.
14388
14389 @item search
14390 Function to send the search string to the search engine.
14391
14392 @item address
14393 The address the aforementioned function should send the search string
14394 to.
14395
14396 @item id
14397 Format string URL to fetch an article by @code{Message-ID}.
14398 @end table
14399
14400 @end table
14401
14402
14403 @node Slashdot
14404 @subsection Slashdot
14405 @cindex Slashdot
14406 @cindex nnslashdot
14407
14408 Slashdot (@uref{http://slashdot.org/}) is a popular news site, with
14409 lively discussion following the news articles.  @code{nnslashdot} will
14410 let you read this forum in a convenient manner.
14411
14412 The easiest way to read this source is to put something like the
14413 following in your @file{.gnus.el} file:
14414
14415 @lisp
14416 (setq gnus-secondary-select-methods
14417       '((nnslashdot "")))
14418 @end lisp
14419
14420 This will make Gnus query the @code{nnslashdot} back end for new comments
14421 and groups.  The @kbd{F} command will subscribe each new news article as
14422 a new Gnus group, and you can read the comments by entering these
14423 groups.  (Note that the default subscription method is to subscribe new
14424 groups as zombies.  Other methods are available (@pxref{Subscription
14425 Methods}).
14426
14427 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
14428 command is the most handy tool (@pxref{Foreign Groups}).
14429
14430 When following up to @code{nnslashdot} comments (or posting new
14431 comments), some light @sc{html}izations will be performed.  In
14432 particular, text quoted with @samp{> } will be quoted with
14433 @code{blockquote} instead, and signatures will have @code{br} added to
14434 the end of each line.  Other than that, you can just write @sc{html}
14435 directly into the message buffer.  Note that Slashdot filters out some
14436 @sc{html} forms.
14437
14438 The following variables can be altered to change its behavior:
14439
14440 @table @code
14441 @item nnslashdot-threaded
14442 Whether @code{nnslashdot} should display threaded groups or not.  The
14443 default is @code{t}.  To be able to display threads, @code{nnslashdot}
14444 has to retrieve absolutely all comments in a group upon entry.  If a
14445 threaded display is not required, @code{nnslashdot} will only retrieve
14446 the comments that are actually wanted by the user.  Threading is nicer,
14447 but much, much slower than untreaded.
14448
14449 @item nnslashdot-login-name
14450 @vindex nnslashdot-login-name
14451 The login name to use when posting.
14452
14453 @item nnslashdot-password
14454 @vindex nnslashdot-password
14455 The password to use when posting.
14456
14457 @item nnslashdot-directory
14458 @vindex nnslashdot-directory
14459 Where @code{nnslashdot} will store its files.  The default is
14460 @samp{~/News/slashdot/}.
14461
14462 @item nnslashdot-active-url
14463 @vindex nnslashdot-active-url
14464 The @sc{url} format string that will be used to fetch the information on
14465 news articles and comments.  The default is
14466 @samp{http://slashdot.org/search.pl?section=&min=%d}.
14467
14468 @item nnslashdot-comments-url
14469 @vindex nnslashdot-comments-url
14470 The @sc{url} format string that will be used to fetch comments.  The
14471 default is
14472 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
14473
14474 @item nnslashdot-article-url
14475 @vindex nnslashdot-article-url
14476 The @sc{url} format string that will be used to fetch the news article.  The
14477 default is
14478 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
14479
14480 @item nnslashdot-threshold
14481 @vindex nnslashdot-threshold
14482 The score threshold.  The default is -1.
14483
14484 @item nnslashdot-group-number
14485 @vindex nnslashdot-group-number
14486 The number of old groups, in addition to the ten latest, to keep
14487 updated.  The default is 0.
14488
14489 @end table
14490
14491
14492
14493 @node Ultimate
14494 @subsection Ultimate
14495 @cindex nnultimate
14496 @cindex Ultimate Bulletin Board
14497
14498 The Ultimate Bulletin Board (@uref{http://www.ultimatebb.com/}) is
14499 probably the most popular Web bulletin board system used.  It has a
14500 quite regular and nice interface, and it's possible to get the
14501 information Gnus needs to keep groups updated.
14502
14503 The easiest way to get started with @code{nnultimate} is to say
14504 something like the following in the group buffer:  @kbd{B nnultimate RET
14505 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
14506 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
14507 you're interested in; there's quite a list of them on the Ultimate web
14508 site.)  Then subscribe to the groups you're interested in from the
14509 server buffer, and read them from the group buffer.
14510
14511 The following @code{nnultimate} variables can be altered:
14512
14513 @table @code
14514 @item nnultimate-directory
14515 @vindex nnultimate-directory
14516 The directory where @code{nnultimate} stores its files.  The default is
14517 @samp{~/News/ultimate/}.
14518 @end table
14519
14520
14521 @node Web Archive
14522 @subsection Web Archive
14523 @cindex nnwarchive
14524 @cindex Web Archive
14525
14526 Some mailing lists only have archives on Web servers, such as
14527 @uref{http://www.egroups.com/} and
14528 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
14529 interface, and it's possible to get the information Gnus needs to keep
14530 groups updated.
14531
14532 The easiest way to get started with @code{nnwarchive} is to say
14533 something like the following in the group buffer: @kbd{M-x
14534 gnus-group-make-warchive-group RET an_egroup RET egroups RET
14535 www.egroups.com RET your@@email.address RET}.  (Substitute the
14536 @sc{an_egroup} with the mailing list you subscribed, the
14537 @sc{your@@email.address} with your email address.), or to browse the
14538 back end by @kbd{B nnwarchive RET mail-archive RET}.
14539
14540 The following @code{nnwarchive} variables can be altered:
14541
14542 @table @code
14543 @item nnwarchive-directory
14544 @vindex nnwarchive-directory
14545 The directory where @code{nnwarchive} stores its files.  The default is
14546 @samp{~/News/warchive/}.
14547
14548 @item nnwarchive-login
14549 @vindex nnwarchive-login
14550 The account name on the web server.
14551
14552 @item nnwarchive-passwd
14553 @vindex nnwarchive-passwd
14554 The password for your account on the web server.
14555 @end table
14556
14557 @node RSS
14558 @subsection RSS
14559 @cindex nnrss
14560 @cindex RSS
14561
14562 Some sites have RDF site summary (RSS)
14563 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
14564 interface, and it's possible to get the information Gnus needs to keep
14565 groups updated.
14566
14567 The easiest way to get started with @code{nnrss} is to say something
14568 like the following in the group buffer: @kbd{B nnrss RET RET}, then
14569 subscribe groups.
14570
14571 The following @code{nnrss} variables can be altered:
14572
14573 @table @code
14574 @item nnrss-directory
14575 @vindex nnrss-directory
14576 The directory where @code{nnrss} stores its files.  The default is
14577 @samp{~/News/rss/}.
14578
14579 @end table
14580
14581 The following code may be helpful, if you want to show the description in
14582 the summary buffer.
14583
14584 @lisp
14585 (add-to-list 'nnmail-extra-headers nnrss-description-field)
14586 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
14587
14588 (defun gnus-user-format-function-X (header)
14589   (let ((descr
14590          (assq nnrss-description-field (mail-header-extra header))))
14591     (if descr (concat "\n\t" (cdr descr)) "")))
14592 @end lisp
14593
14594 The following code may be useful to open an nnrss url directly from the
14595 summary buffer.
14596 @lisp
14597 (require 'browse-url)
14598
14599 (defun browse-nnrss-url( arg )
14600   (interactive "p")
14601   (let ((url (assq nnrss-url-field
14602                    (mail-header-extra
14603                     (gnus-data-header
14604                      (assq (gnus-summary-article-number)
14605                            gnus-newsgroup-data))))))
14606     (if url
14607         (browse-url (cdr url))
14608       (gnus-summary-scroll-up arg))))
14609
14610 (eval-after-load "gnus"
14611   #'(define-key gnus-summary-mode-map
14612       (kbd "<RET>") 'browse-nnrss-url))
14613 (add-to-list 'nnmail-extra-headers nnrss-url-field)
14614 @end lisp
14615
14616 @node Customizing w3
14617 @subsection Customizing w3
14618 @cindex w3
14619 @cindex html
14620 @cindex url
14621 @cindex Netscape
14622
14623 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
14624 pages.  Emacs/w3 is documented in its own manual, but there are some
14625 things that may be more relevant for Gnus users.
14626
14627 For instance, a common question is how to make Emacs/w3 follow links
14628 using the @code{browse-url} functions (which will call some external web
14629 browser like Netscape).  Here's one way:
14630
14631 @lisp
14632 (eval-after-load "w3"
14633   '(progn
14634     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
14635     (defun w3-fetch (&optional url target)
14636       (interactive (list (w3-read-url-with-default)))
14637       (if (eq major-mode 'gnus-article-mode)
14638           (browse-url url)
14639         (w3-fetch-orig url target)))))
14640 @end lisp
14641
14642 Put that in your @file{.emacs} file, and hitting links in w3-rendered
14643 @sc{html} in the Gnus article buffers will use @code{browse-url} to
14644 follow the link.
14645
14646
14647 @node IMAP
14648 @section IMAP
14649 @cindex nnimap
14650 @cindex @sc{imap}
14651
14652 @sc{imap} is a network protocol for reading mail (or news, or ...),
14653 think of it as a modernized @sc{nntp}.  Connecting to a @sc{imap}
14654 server is much similar to connecting to a news server, you just
14655 specify the network address of the server.
14656
14657 @sc{imap} has two properties.  First, @sc{imap} can do everything that
14658 POP can, it can hence be viewed as a POP++.  Secondly, @sc{imap} is a
14659 mail storage protocol, similar to @sc{nntp} being a news storage
14660 protocol -- however, @sc{imap} offers more features than @sc{nntp}
14661 because news is more or less read-only whereas mail is read-write.
14662
14663 If you want to use @sc{imap} as a POP++, use an imap entry in
14664 @code{mail-sources}.  With this, Gnus will fetch mails from the
14665 @sc{imap} server and store them on the local disk.  This is not the
14666 usage described in this section--@xref{Mail Sources}.
14667
14668 If you want to use @sc{imap} as a mail storage protocol, use an nnimap
14669 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
14670 manipulate mails stored on the @sc{imap} server.  This is the kind of
14671 usage explained in this section.
14672
14673 A server configuration in @code{~/.gnus} with a few @sc{imap} servers
14674 might look something like the following. (Note that for SSL/TLS, you
14675 need external programs and libraries, see below.)
14676
14677 @lisp
14678 (setq gnus-secondary-select-methods
14679       '((nnimap "simpleserver") ; no special configuration
14680         ; perhaps a ssh port forwarded server:
14681         (nnimap "dolk"
14682                 (nnimap-address "localhost")
14683                 (nnimap-server-port 1430))
14684         ; a UW server running on localhost
14685         (nnimap "barbar"
14686                 (nnimap-server-port 143)
14687                 (nnimap-address "localhost")
14688                 (nnimap-list-pattern ("INBOX" "mail/*")))
14689         ; anonymous public cyrus server:
14690         (nnimap "cyrus.andrew.cmu.edu"
14691                 (nnimap-authenticator anonymous)
14692                 (nnimap-list-pattern "archive.*")
14693                 (nnimap-stream network))
14694         ; a ssl server on a non-standard port:
14695         (nnimap "vic20"
14696                 (nnimap-address "vic20.somewhere.com")
14697                 (nnimap-server-port 9930)
14698                 (nnimap-stream ssl))))
14699 @end lisp
14700
14701 The following variables can be used to create a virtual @code{nnimap}
14702 server:
14703
14704 @table @code
14705
14706 @item nnimap-address
14707 @vindex nnimap-address
14708
14709 The address of the remote @sc{imap} server.  Defaults to the virtual
14710 server name if not specified.
14711
14712 @item nnimap-server-port
14713 @vindex nnimap-server-port
14714 Port on server to contact.  Defaults to port 143, or 993 for SSL.
14715
14716 Note that this should be an integer, example server specification:
14717
14718 @lisp
14719 (nnimap "mail.server.com"
14720         (nnimap-server-port 4711))
14721 @end lisp
14722
14723 @item nnimap-list-pattern
14724 @vindex nnimap-list-pattern
14725 String or list of strings of mailboxes to limit available groups to.
14726 This is used when the server has very many mailboxes and you're only
14727 interested in a few -- some servers export your home directory via
14728 @sc{imap}, you'll probably want to limit the mailboxes to those in
14729 @file{~/Mail/*} then.
14730
14731 The string can also be a cons of REFERENCE and the string as above, what
14732 REFERENCE is used for is server specific, but on the University of
14733 Washington server it's a directory that will be concatenated with the
14734 mailbox.
14735
14736 Example server specification:
14737
14738 @lisp
14739 (nnimap "mail.server.com"
14740         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
14741                                ("~friend/Mail/" . "list/*"))))
14742 @end lisp
14743
14744 @item nnimap-stream
14745 @vindex nnimap-stream
14746 The type of stream used to connect to your server.  By default, nnimap
14747 will detect and automatically use all of the below, with the exception
14748 of SSL/TLS. (@sc{imap} over SSL/TLS is being replaced by STARTTLS, which
14749 can be automatically detected, but it's not widely deployed yet.)
14750
14751 Example server specification:
14752
14753 @lisp
14754 (nnimap "mail.server.com"
14755         (nnimap-stream ssl))
14756 @end lisp
14757
14758 Please note that the value of @code{nnimap-stream} is a symbol!
14759
14760 @itemize @bullet
14761 @item
14762 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5). Requires the
14763 @samp{imtest} program.
14764 @item
14765 @dfn{kerberos4:} Connect with Kerberos 4. Requires the @samp{imtest} program.
14766 @item
14767 @dfn{starttls:} Connect via the STARTTLS extension (similar to
14768 SSL).  Requires the external library @samp{starttls.el} and program
14769 @samp{starttls}.
14770 @item
14771 @dfn{ssl:} Connect through SSL.  Requires OpenSSL (the program
14772 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
14773 library @samp{ssl.el}.
14774 @item
14775 @dfn{shell:} Use a shell command to start @sc{imap} connection.
14776 @item
14777 @dfn{network:} Plain, TCP/IP network connection.
14778 @end itemize
14779
14780 @vindex imap-kerberos4-program
14781 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
14782 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
14783 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
14784 to make @code{imap.el} use a pty instead of a pipe when communicating
14785 with @samp{imtest}.  You will then suffer from a line length
14786 restrictions on @sc{imap} commands, which might make Gnus seem to hang
14787 indefinitely if you have many articles in a mailbox.  The variable
14788 @code{imap-kerberos4-program} contain parameters to pass to the imtest
14789 program.
14790
14791 @vindex imap-ssl-program
14792 For SSL connections, the OpenSSL program is available from
14793 @uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay,
14794 and nnimap support it too - altough the most recent versions of
14795 SSLeay, 0.9.x, are known to have serious bugs making it
14796 useless. Earlier versions, especially 0.8.x, of SSLeay are known to
14797 work. The variable @code{imap-ssl-program} contain parameters to pass
14798 to OpenSSL/SSLeay.  You also need @samp{ssl.el} (from the W3
14799 distribution, for instance).
14800
14801 @vindex imap-shell-program
14802 @vindex imap-shell-host
14803 For @sc{imap} connections using the @code{shell} stream, the variable
14804 @code{imap-shell-program} specify what program to call.
14805
14806 @item nnimap-authenticator
14807 @vindex nnimap-authenticator
14808
14809 The authenticator used to connect to the server.  By default, nnimap
14810 will use the most secure authenticator your server is capable of.
14811
14812 Example server specification:
14813
14814 @lisp
14815 (nnimap "mail.server.com"
14816         (nnimap-authenticator anonymous))
14817 @end lisp
14818
14819 Please note that the value of @code{nnimap-authenticator} is a symbol!
14820
14821 @itemize @bullet
14822 @item
14823 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication. Requires
14824 external program @code{imtest}.
14825 @item
14826 @dfn{kerberos4:} Kerberos 4 authentication. Requires external program
14827 @code{imtest}.
14828 @item
14829 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5. Requires
14830 external library @code{digest-md5.el}.
14831 @item
14832 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
14833 @item
14834 @dfn{login:} Plain-text username/password via LOGIN.
14835 @item
14836 @dfn{anonymous:} Login as `anonymous', supplying your emailadress as password.
14837 @end itemize
14838
14839 @item nnimap-expunge-on-close
14840 @cindex Expunging
14841 @vindex nnimap-expunge-on-close
14842 Unlike Parmenides the @sc{imap} designers has decided that things that
14843 doesn't exist actually does exist.  More specifically, @sc{imap} has
14844 this concept of marking articles @code{Deleted} which doesn't actually
14845 delete them, and this (marking them @code{Deleted}, that is) is what
14846 nnimap does when you delete a article in Gnus (with @kbd{G DEL} or
14847 similar).
14848
14849 Since the articles aren't really removed when we mark them with the
14850 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
14851 running in circles yet?
14852
14853 Traditionally, nnimap has removed all articles marked as @code{Deleted}
14854 when closing a mailbox but this is now configurable by this server
14855 variable.
14856
14857 The possible options are:
14858
14859 @table @code
14860
14861 @item always
14862 The default behavior, delete all articles marked as "Deleted" when
14863 closing a mailbox.
14864 @item never
14865 Never actually delete articles.  Currently there is no way of showing
14866 the articles marked for deletion in nnimap, but other @sc{imap} clients
14867 may allow you to do this.  If you ever want to run the EXPUNGE command
14868 manually, @xref{Expunging mailboxes}.
14869 @item ask
14870 When closing mailboxes, nnimap will ask if you wish to expunge deleted
14871 articles or not.
14872
14873 @end table
14874
14875 @item nnimap-importantize-dormant
14876 @vindex nnimap-importantize-dormant
14877
14878 If non-nil, marks dormant articles as ticked (as well), for other
14879 @sc{imap} clients. Within Gnus, dormant articles will naturally still
14880 (only) be marked as ticked.  This is to make dormant articles stand
14881 out, just like ticked articles, in other @sc{imap} clients. (In other
14882 words, Gnus has two ``Tick'' marks and @sc{imap} has only one.)
14883
14884 Probably the only reason for frobing this would be if you're trying
14885 enable per-user persistant dormant flags, using something like:
14886
14887 @lisp
14888 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
14889         (format "gnus-dormant-%s" (user-login-name)))
14890 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
14891         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
14892 @end lisp
14893
14894 In this case, you would not want the per-user dormant flag showing up
14895 as ticked for other users.
14896
14897 @item nnimap-expunge-search-string
14898 @cindex Expunging
14899 @vindex nnimap-expunge-search-string
14900
14901 This variable contain the @sc{imap} search command sent to server when
14902 searching for articles eligible for expiring.  The default is
14903 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
14904 UID set and the second @code{%s} is replaced by a date.
14905
14906 Probably the only useful value to change this to is
14907 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
14908 messages instead of the internal article date. See section 6.4.4 of
14909 RFC 2060 for more information on valid strings.
14910
14911 @item nnimap-authinfo-file
14912 @vindex nnimap-authinfo-file
14913
14914 A file containing credentials used to log in on servers.  The format is
14915 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
14916 variable @code{nntp-authinfo-file} for exact syntax; also see
14917 @ref{NNTP}.
14918
14919 @end table
14920
14921 @menu
14922 * Splitting in IMAP::           Splitting mail with nnimap.
14923 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
14924 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
14925 @end menu
14926
14927
14928
14929 @node Splitting in IMAP
14930 @subsection Splitting in IMAP
14931 @cindex splitting imap mail
14932
14933 Splitting is something Gnus users has loved and used for years, and now
14934 the rest of the world is catching up.  Yeah, dream on, not many
14935 @sc{imap} server has server side splitting and those that have splitting
14936 seem to use some non-standard protocol.  This means that @sc{imap}
14937 support for Gnus has to do it's own splitting.
14938
14939 And it does.
14940
14941 Here are the variables of interest:
14942
14943 @table @code
14944
14945 @item nnimap-split-crosspost
14946 @cindex splitting, crosspost
14947 @cindex crosspost
14948 @vindex nnimap-split-crosspost
14949
14950 If non-nil, do crossposting if several split methods match the mail.  If
14951 nil, the first match in @code{nnimap-split-rule} found will be used.
14952
14953 Nnmail equivalent: @code{nnmail-crosspost}.
14954
14955 @item nnimap-split-inbox
14956 @cindex splitting, inbox
14957 @cindex inbox
14958 @vindex nnimap-split-inbox
14959
14960 A string or a list of strings that gives the name(s) of @sc{imap}
14961 mailboxes to split from.  Defaults to nil, which means that splitting is
14962 disabled!
14963
14964 @lisp
14965 (setq nnimap-split-inbox
14966       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
14967 @end lisp
14968
14969 No nnmail equivalent.
14970
14971 @item nnimap-split-rule
14972 @cindex Splitting, rules
14973 @vindex nnimap-split-rule
14974
14975 New mail found in @code{nnimap-split-inbox} will be split according to
14976 this variable.
14977
14978 This variable contains a list of lists, where the first element in the
14979 sublist gives the name of the @sc{imap} mailbox to move articles
14980 matching the regexp in the second element in the sublist.  Got that?
14981 Neither did I, we need examples.
14982
14983 @lisp
14984 (setq nnimap-split-rule
14985       '(("INBOX.nnimap"
14986          "^Sender: owner-nnimap@@vic20.globalcom.se")
14987         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
14988         ("INBOX.private" "")))
14989 @end lisp
14990
14991 This will put all articles from the nnimap mailing list into mailbox
14992 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
14993 into INBOX.junk and everything else in INBOX.private.
14994
14995 The first string may contain `\\1' forms, like the ones used by
14996 replace-match to insert sub-expressions from the matched text.  For
14997 instance:
14998
14999 @lisp
15000 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
15001 @end lisp
15002
15003 The second element can also be a function.  In that case, it will be
15004 called with the first element of the rule as the argument, in a buffer
15005 containing the headers of the article.  It should return a non-nil value
15006 if it thinks that the mail belongs in that group.
15007
15008 Nnmail users might recollect that the last regexp had to be empty to
15009 match all articles (like in the example above).  This is not required in
15010 nnimap.  Articles not matching any of the regexps will not be moved out
15011 of your inbox.  (This might affect performance if you keep lots of
15012 unread articles in your inbox, since the splitting code would go over
15013 them every time you fetch new mail.)
15014
15015 These rules are processed from the beginning of the alist toward the
15016 end.  The first rule to make a match will "win", unless you have
15017 crossposting enabled.  In that case, all matching rules will "win".
15018
15019 This variable can also have a function as its value, the function will
15020 be called with the headers narrowed and should return a group where it
15021 thinks the article should be split to.  See @code{nnimap-split-fancy}.
15022
15023 The splitting code tries to create mailboxes if it needs to.
15024
15025 To allow for different split rules on different virtual servers, and
15026 even different split rules in different inboxes on the same server,
15027 the syntax of this variable have been extended along the lines of:
15028
15029 @lisp
15030 (setq nnimap-split-rule
15031       '(("my1server"    (".*"    (("ding"    "ding@@gnus.org")
15032                                   ("junk"    "From:.*Simon")))
15033         ("my2server"    ("INBOX" nnimap-split-fancy))
15034         ("my[34]server" (".*"    (("private" "To:.*Simon")
15035                                   ("junk"    my-junk-func)))))
15036 @end lisp
15037
15038 The virtual server name is in fact a regexp, so that the same rules
15039 may apply to several servers.  In the example, the servers
15040 @code{my3server} and @code{my4server} both use the same rules.
15041 Similarly, the inbox string is also a regexp.  The actual splitting
15042 rules are as before, either a function, or a list with group/regexp or
15043 group/function elements.
15044
15045 Nnmail equivalent: @code{nnmail-split-methods}.
15046
15047 @item nnimap-split-predicate
15048 @cindex splitting
15049 @vindex nnimap-split-predicate
15050
15051 Mail matching this predicate in @code{nnimap-split-inbox} will be
15052 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
15053
15054 This might be useful if you use another @sc{imap} client to read mail in
15055 your inbox but would like Gnus to split all articles in the inbox
15056 regardless of readedness. Then you might change this to
15057 @samp{UNDELETED}.
15058
15059 @item nnimap-split-fancy
15060 @cindex splitting, fancy
15061 @findex nnimap-split-fancy
15062 @vindex nnimap-split-fancy
15063
15064 It's possible to set @code{nnimap-split-rule} to
15065 @code{nnmail-split-fancy} if you want to use fancy
15066 splitting. @xref{Fancy Mail Splitting}.
15067
15068 However, to be able to have different fancy split rules for nnmail and
15069 nnimap back ends you can set @code{nnimap-split-rule} to
15070 @code{nnimap-split-fancy} and define the nnimap specific fancy split
15071 rule in @code{nnimap-split-fancy}.
15072
15073 Example:
15074
15075 @lisp
15076 (setq nnimap-split-rule 'nnimap-split-fancy
15077       nnimap-split-fancy ...)
15078 @end lisp
15079
15080 Nnmail equivalent: @code{nnmail-split-fancy}.
15081
15082 @end table
15083
15084 @node Editing IMAP ACLs
15085 @subsection Editing IMAP ACLs
15086 @cindex editing imap acls
15087 @cindex Access Control Lists
15088 @cindex Editing @sc{imap} ACLs
15089 @kindex G l
15090 @findex gnus-group-nnimap-edit-acl
15091
15092 ACL stands for Access Control List.  ACLs are used in @sc{imap} for
15093 limiting (or enabling) other users access to your mail boxes.  Not all
15094 @sc{imap} servers support this, this function will give an error if it
15095 doesn't.
15096
15097 To edit a ACL for a mailbox, type @kbd{G l}
15098 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with a ACL
15099 editing window with detailed instructions.
15100
15101 Some possible uses:
15102
15103 @itemize @bullet
15104 @item
15105 Giving "anyone" the "lrs" rights (lookup, read, keep seen/unseen flags)
15106 on your mailing list mailboxes enables other users on the same server to
15107 follow the list without subscribing to it.
15108 @item
15109 At least with the Cyrus server, you are required to give the user
15110 "anyone" posting ("p") capabilities to have "plussing" work (that is,
15111 mail sent to user+mailbox@@domain ending up in the @sc{imap} mailbox
15112 INBOX.mailbox).
15113 @end itemize
15114
15115 @node Expunging mailboxes
15116 @subsection Expunging mailboxes
15117 @cindex expunging
15118
15119 @cindex Expunge
15120 @cindex Manual expunging
15121 @kindex G x
15122 @findex gnus-group-nnimap-expunge
15123
15124 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
15125 you may want the option of expunging all deleted articles in a mailbox
15126 manually.  This is exactly what @kbd{G x} does.
15127
15128 Currently there is no way of showing deleted articles, you can just
15129 delete them.
15130
15131
15132
15133 @node Other Sources
15134 @section Other Sources
15135
15136 Gnus can do more than just read news or mail.  The methods described
15137 below allow Gnus to view directories and files as if they were
15138 newsgroups.
15139
15140 @menu
15141 * Directory Groups::            You can read a directory as if it was a newsgroup.
15142 * Anything Groups::             Dired?  Who needs dired?
15143 * Document Groups::             Single files can be the basis of a group.
15144 * SOUP::                        Reading @sc{soup} packets ``offline''.
15145 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
15146 @end menu
15147
15148
15149 @node Directory Groups
15150 @subsection Directory Groups
15151 @cindex nndir
15152 @cindex directory groups
15153
15154 If you have a directory that has lots of articles in separate files in
15155 it, you might treat it as a newsgroup.  The files have to have numerical
15156 names, of course.
15157
15158 This might be an opportune moment to mention @code{ange-ftp} (and its
15159 successor @code{efs}), that most wonderful of all wonderful Emacs
15160 packages.  When I wrote @code{nndir}, I didn't think much about it---a
15161 back end to read directories.  Big deal.
15162
15163 @code{ange-ftp} changes that picture dramatically.  For instance, if you
15164 enter the @code{ange-ftp} file name
15165 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
15166 @code{ange-ftp} or @code{efs} will actually allow you to read this
15167 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
15168
15169 @code{nndir} will use @sc{nov} files if they are present.
15170
15171 @code{nndir} is a ``read-only'' back end---you can't delete or expire
15172 articles with this method.  You can use @code{nnmh} or @code{nnml} for
15173 whatever you use @code{nndir} for, so you could switch to any of those
15174 methods if you feel the need to have a non-read-only @code{nndir}.
15175
15176
15177 @node Anything Groups
15178 @subsection Anything Groups
15179 @cindex nneething
15180
15181 From the @code{nndir} back end (which reads a single spool-like
15182 directory), it's just a hop and a skip to @code{nneething}, which
15183 pretends that any arbitrary directory is a newsgroup.  Strange, but
15184 true.
15185
15186 When @code{nneething} is presented with a directory, it will scan this
15187 directory and assign article numbers to each file.  When you enter such
15188 a group, @code{nneething} must create ``headers'' that Gnus can use.
15189 After all, Gnus is a newsreader, in case you're forgetting.
15190 @code{nneething} does this in a two-step process.  First, it snoops each
15191 file in question.  If the file looks like an article (i.e., the first
15192 few lines look like headers), it will use this as the head.  If this is
15193 just some arbitrary file without a head (e.g. a C source file),
15194 @code{nneething} will cobble up a header out of thin air.  It will use
15195 file ownership, name and date and do whatever it can with these
15196 elements.
15197
15198 All this should happen automatically for you, and you will be presented
15199 with something that looks very much like a newsgroup.  Totally like a
15200 newsgroup, to be precise.  If you select an article, it will be displayed
15201 in the article buffer, just as usual.
15202
15203 If you select a line that represents a directory, Gnus will pop you into
15204 a new summary buffer for this @code{nneething} group.  And so on.  You can
15205 traverse the entire disk this way, if you feel like, but remember that
15206 Gnus is not dired, really, and does not intend to be, either.
15207
15208 There are two overall modes to this action---ephemeral or solid.  When
15209 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
15210 will not store information on what files you have read, and what files
15211 are new, and so on.  If you create a solid @code{nneething} group the
15212 normal way with @kbd{G m}, Gnus will store a mapping table between
15213 article numbers and file names, and you can treat this group like any
15214 other groups.  When you activate a solid @code{nneething} group, you will
15215 be told how many unread articles it contains, etc., etc.
15216
15217 Some variables:
15218
15219 @table @code
15220 @item nneething-map-file-directory
15221 @vindex nneething-map-file-directory
15222 All the mapping files for solid @code{nneething} groups will be stored
15223 in this directory, which defaults to @file{~/.nneething/}.
15224
15225 @item nneething-exclude-files
15226 @vindex nneething-exclude-files
15227 All files that match this regexp will be ignored.  Nice to use to exclude
15228 auto-save files and the like, which is what it does by default.
15229
15230 @item nneething-include-files
15231 @vindex nneething-include-files
15232 Regexp saying what files to include in the group.  If this variable is
15233 non-@code{nil}, only files matching this regexp will be included.
15234
15235 @item nneething-map-file
15236 @vindex nneething-map-file
15237 Name of the map files.
15238 @end table
15239
15240
15241 @node Document Groups
15242 @subsection Document Groups
15243 @cindex nndoc
15244 @cindex documentation group
15245 @cindex help group
15246
15247 @code{nndoc} is a cute little thing that will let you read a single file
15248 as a newsgroup.  Several files types are supported:
15249
15250 @table @code
15251 @cindex babyl
15252 @cindex rmail mbox
15253
15254 @item babyl
15255 The babyl (rmail) mail box.
15256 @cindex mbox
15257 @cindex Unix mbox
15258
15259 @item mbox
15260 The standard Unix mbox file.
15261
15262 @cindex MMDF mail box
15263 @item mmdf
15264 The MMDF mail box format.
15265
15266 @item news
15267 Several news articles appended into a file.
15268
15269 @item rnews
15270 @cindex rnews batch files
15271 The rnews batch transport format.
15272 @cindex forwarded messages
15273
15274 @item forward
15275 Forwarded articles.
15276
15277 @item nsmail
15278 Netscape mail boxes.
15279
15280 @item mime-parts
15281 @sc{mime} multipart messages.
15282
15283 @item standard-digest
15284 The standard (RFC 1153) digest format.
15285
15286 @item mime-digest
15287 A @sc{mime} digest of messages.
15288
15289 @item lanl-gov-announce
15290 Announcement messages from LANL Gov Announce.
15291
15292 @item rfc822-forward
15293 A message forwarded according to RFC822.
15294
15295 @item outlook
15296 The Outlook mail box.
15297
15298 @item oe-dbx
15299 The Outlook Express dbx mail box.
15300
15301 @item exim-bounce
15302 A bounce message from the Exim MTA.
15303
15304 @item forward
15305 A message forwarded according to informal rules.
15306
15307 @item rfc934
15308 An RFC934-forwarded message.
15309
15310 @item mailman
15311 A mailman digest.
15312
15313 @item clari-briefs
15314 A digest of Clarinet brief news items.
15315
15316 @item slack-digest
15317 Non-standard digest format---matches most things, but does it badly.
15318
15319 @item mail-in-mail
15320 The last resort.
15321 @end table
15322
15323 You can also use the special ``file type'' @code{guess}, which means
15324 that @code{nndoc} will try to guess what file type it is looking at.
15325 @code{digest} means that @code{nndoc} should guess what digest type the
15326 file is.
15327
15328 @code{nndoc} will not try to change the file or insert any extra headers into
15329 it---it will simply, like, let you use the file as the basis for a
15330 group.  And that's it.
15331
15332 If you have some old archived articles that you want to insert into your
15333 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
15334 that.  Say you have an old @file{RMAIL} file with mail that you now want
15335 to split into your new @code{nnml} groups.  You look at that file using
15336 @code{nndoc} (using the @kbd{G f} command in the group buffer
15337 (@pxref{Foreign Groups})), set the process mark on all the articles in
15338 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
15339 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
15340 file is now also stored in lots of @code{nnml} directories, and you can
15341 delete that pesky @file{RMAIL} file.  If you have the guts!
15342
15343 Virtual server variables:
15344
15345 @table @code
15346 @item nndoc-article-type
15347 @vindex nndoc-article-type
15348 This should be one of @code{mbox}, @code{babyl}, @code{digest},
15349 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
15350 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
15351 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
15352 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
15353
15354 @item nndoc-post-type
15355 @vindex nndoc-post-type
15356 This variable says whether Gnus is to consider the group a news group or
15357 a mail group.  There are two valid values:  @code{mail} (the default)
15358 and @code{news}.
15359 @end table
15360
15361 @menu
15362 * Document Server Internals::   How to add your own document types.
15363 @end menu
15364
15365
15366 @node Document Server Internals
15367 @subsubsection Document Server Internals
15368
15369 Adding new document types to be recognized by @code{nndoc} isn't
15370 difficult.  You just have to whip up a definition of what the document
15371 looks like, write a predicate function to recognize that document type,
15372 and then hook into @code{nndoc}.
15373
15374 First, here's an example document type definition:
15375
15376 @example
15377 (mmdf
15378  (article-begin .  "^\^A\^A\^A\^A\n")
15379  (body-end .  "^\^A\^A\^A\^A\n"))
15380 @end example
15381
15382 The definition is simply a unique @dfn{name} followed by a series of
15383 regexp pseudo-variable settings.  Below are the possible
15384 variables---don't be daunted by the number of variables; most document
15385 types can be defined with very few settings:
15386
15387 @table @code
15388 @item first-article
15389 If present, @code{nndoc} will skip past all text until it finds
15390 something that match this regexp.  All text before this will be
15391 totally ignored.
15392
15393 @item article-begin
15394 This setting has to be present in all document type definitions.  It
15395 says what the beginning of each article looks like.
15396
15397 @item head-begin-function
15398 If present, this should be a function that moves point to the head of
15399 the article.
15400
15401 @item nndoc-head-begin
15402 If present, this should be a regexp that matches the head of the
15403 article.
15404
15405 @item nndoc-head-end
15406 This should match the end of the head of the article.  It defaults to
15407 @samp{^$}---the empty line.
15408
15409 @item body-begin-function
15410 If present, this function should move point to the beginning of the body
15411 of the article.
15412
15413 @item body-begin
15414 This should match the beginning of the body of the article.  It defaults
15415 to @samp{^\n}.
15416
15417 @item body-end-function
15418 If present, this function should move point to the end of the body of
15419 the article.
15420
15421 @item body-end
15422 If present, this should match the end of the body of the article.
15423
15424 @item file-end
15425 If present, this should match the end of the file.  All text after this
15426 regexp will be totally ignored.
15427
15428 @end table
15429
15430 So, using these variables @code{nndoc} is able to dissect a document
15431 file into a series of articles, each with a head and a body.  However, a
15432 few more variables are needed since not all document types are all that
15433 news-like---variables needed to transform the head or the body into
15434 something that's palatable for Gnus:
15435
15436 @table @code
15437 @item prepare-body-function
15438 If present, this function will be called when requesting an article.  It
15439 will be called with point at the start of the body, and is useful if the
15440 document has encoded some parts of its contents.
15441
15442 @item article-transform-function
15443 If present, this function is called when requesting an article.  It's
15444 meant to be used for more wide-ranging transformation of both head and
15445 body of the article.
15446
15447 @item generate-head-function
15448 If present, this function is called to generate a head that Gnus can
15449 understand.  It is called with the article number as a parameter, and is
15450 expected to generate a nice head for the article in question.  It is
15451 called when requesting the headers of all articles.
15452
15453 @end table
15454
15455 Let's look at the most complicated example I can come up with---standard
15456 digests:
15457
15458 @example
15459 (standard-digest
15460  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
15461  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
15462  (prepare-body-function . nndoc-unquote-dashes)
15463  (body-end-function . nndoc-digest-body-end)
15464  (head-end . "^ ?$")
15465  (body-begin . "^ ?\n")
15466  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
15467  (subtype digest guess))
15468 @end example
15469
15470 We see that all text before a 70-width line of dashes is ignored; all
15471 text after a line that starts with that @samp{^End of} is also ignored;
15472 each article begins with a 30-width line of dashes; the line separating
15473 the head from the body may contain a single space; and that the body is
15474 run through @code{nndoc-unquote-dashes} before being delivered.
15475
15476 To hook your own document definition into @code{nndoc}, use the
15477 @code{nndoc-add-type} function.  It takes two parameters---the first is
15478 the definition itself and the second (optional) parameter says where in
15479 the document type definition alist to put this definition.  The alist is
15480 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
15481 is of @code{mmdf} type, and so on.  These type predicates should return
15482 @code{nil} if the document is not of the correct type; @code{t} if it is
15483 of the correct type; and a number if the document might be of the
15484 correct type.  A high number means high probability; a low number means
15485 low probability with @samp{0} being the lowest valid number.
15486
15487
15488 @node SOUP
15489 @subsection SOUP
15490 @cindex SOUP
15491 @cindex offline
15492
15493 In the PC world people often talk about ``offline'' newsreaders.  These
15494 are thingies that are combined reader/news transport monstrosities.
15495 With built-in modem programs.  Yecchh!
15496
15497 Of course, us Unix Weenie types of human beans use things like
15498 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
15499 transport things like Ghod intended.  And then we just use normal
15500 newsreaders.
15501
15502 However, it can sometimes be convenient to do something that's a bit
15503 easier on the brain if you have a very slow modem, and you're not really
15504 that interested in doing things properly.
15505
15506 A file format called @sc{soup} has been developed for transporting news
15507 and mail from servers to home machines and back again.  It can be a bit
15508 fiddly.
15509
15510 First some terminology:
15511
15512 @table @dfn
15513
15514 @item server
15515 This is the machine that is connected to the outside world and where you
15516 get news and/or mail from.
15517
15518 @item home machine
15519 This is the machine that you want to do the actual reading and responding
15520 on.  It is typically not connected to the rest of the world in any way.
15521
15522 @item packet
15523 Something that contains messages and/or commands.  There are two kinds
15524 of packets:
15525
15526 @table @dfn
15527 @item message packets
15528 These are packets made at the server, and typically contain lots of
15529 messages for you to read.  These are called @file{SoupoutX.tgz} by
15530 default, where @var{x} is a number.
15531
15532 @item response packets
15533 These are packets made at the home machine, and typically contains
15534 replies that you've written.  These are called @file{SoupinX.tgz} by
15535 default, where @var{x} is a number.
15536
15537 @end table
15538
15539 @end table
15540
15541
15542 @enumerate
15543
15544 @item
15545 You log in on the server and create a @sc{soup} packet.  You can either
15546 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
15547 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
15548 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
15549
15550 @item
15551 You transfer the packet home.  Rail, boat, car or modem will do fine.
15552
15553 @item
15554 You put the packet in your home directory.
15555
15556 @item
15557 You fire up Gnus on your home machine using the @code{nnsoup} back end as
15558 the native or secondary server.
15559
15560 @item
15561 You read articles and mail and answer and followup to the things you
15562 want (@pxref{SOUP Replies}).
15563
15564 @item
15565 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
15566 packet.
15567
15568 @item
15569 You transfer this packet to the server.
15570
15571 @item
15572 You use Gnus to mail this packet out with the @kbd{G s s} command.
15573
15574 @item
15575 You then repeat until you die.
15576
15577 @end enumerate
15578
15579 So you basically have a bipartite system---you use @code{nnsoup} for
15580 reading and Gnus for packing/sending these @sc{soup} packets.
15581
15582 @menu
15583 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
15584 * SOUP Groups::                 A back end for reading @sc{soup} packets.
15585 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
15586 @end menu
15587
15588
15589 @node SOUP Commands
15590 @subsubsection SOUP Commands
15591
15592 These are commands for creating and manipulating @sc{soup} packets.
15593
15594 @table @kbd
15595 @item G s b
15596 @kindex G s b (Group)
15597 @findex gnus-group-brew-soup
15598 Pack all unread articles in the current group
15599 (@code{gnus-group-brew-soup}).  This command understands the
15600 process/prefix convention.
15601
15602 @item G s w
15603 @kindex G s w (Group)
15604 @findex gnus-soup-save-areas
15605 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
15606
15607 @item G s s
15608 @kindex G s s (Group)
15609 @findex gnus-soup-send-replies
15610 Send all replies from the replies packet
15611 (@code{gnus-soup-send-replies}).
15612
15613 @item G s p
15614 @kindex G s p (Group)
15615 @findex gnus-soup-pack-packet
15616 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
15617
15618 @item G s r
15619 @kindex G s r (Group)
15620 @findex nnsoup-pack-replies
15621 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
15622
15623 @item O s
15624 @kindex O s (Summary)
15625 @findex gnus-soup-add-article
15626 This summary-mode command adds the current article to a @sc{soup} packet
15627 (@code{gnus-soup-add-article}).  It understands the process/prefix
15628 convention (@pxref{Process/Prefix}).
15629
15630 @end table
15631
15632
15633 There are a few variables to customize where Gnus will put all these
15634 thingies:
15635
15636 @table @code
15637
15638 @item gnus-soup-directory
15639 @vindex gnus-soup-directory
15640 Directory where Gnus will save intermediate files while composing
15641 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
15642
15643 @item gnus-soup-replies-directory
15644 @vindex gnus-soup-replies-directory
15645 This is what Gnus will use as a temporary directory while sending our
15646 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
15647
15648 @item gnus-soup-prefix-file
15649 @vindex gnus-soup-prefix-file
15650 Name of the file where Gnus stores the last used prefix.  The default is
15651 @samp{gnus-prefix}.
15652
15653 @item gnus-soup-packer
15654 @vindex gnus-soup-packer
15655 A format string command for packing a @sc{soup} packet.  The default is
15656 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
15657
15658 @item gnus-soup-unpacker
15659 @vindex gnus-soup-unpacker
15660 Format string command for unpacking a @sc{soup} packet.  The default is
15661 @samp{gunzip -c %s | tar xvf -}.
15662
15663 @item gnus-soup-packet-directory
15664 @vindex gnus-soup-packet-directory
15665 Where Gnus will look for reply packets.  The default is @file{~/}.
15666
15667 @item gnus-soup-packet-regexp
15668 @vindex gnus-soup-packet-regexp
15669 Regular expression matching @sc{soup} reply packets in
15670 @code{gnus-soup-packet-directory}.
15671
15672 @end table
15673
15674
15675 @node SOUP Groups
15676 @subsubsection SOUP Groups
15677 @cindex nnsoup
15678
15679 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
15680 read incoming packets, unpack them, and put them in a directory where
15681 you can read them at leisure.
15682
15683 These are the variables you can use to customize its behavior:
15684
15685 @table @code
15686
15687 @item nnsoup-tmp-directory
15688 @vindex nnsoup-tmp-directory
15689 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
15690 directory.  (@file{/tmp/} by default.)
15691
15692 @item nnsoup-directory
15693 @vindex nnsoup-directory
15694 @code{nnsoup} then moves each message and index file to this directory.
15695 The default is @file{~/SOUP/}.
15696
15697 @item nnsoup-replies-directory
15698 @vindex nnsoup-replies-directory
15699 All replies will be stored in this directory before being packed into a
15700 reply packet.  The default is @file{~/SOUP/replies/"}.
15701
15702 @item nnsoup-replies-format-type
15703 @vindex nnsoup-replies-format-type
15704 The @sc{soup} format of the replies packets.  The default is @samp{?n}
15705 (rnews), and I don't think you should touch that variable.  I probably
15706 shouldn't even have documented it.  Drats!  Too late!
15707
15708 @item nnsoup-replies-index-type
15709 @vindex nnsoup-replies-index-type
15710 The index type of the replies packet.  The default is @samp{?n}, which
15711 means ``none''.  Don't fiddle with this one either!
15712
15713 @item nnsoup-active-file
15714 @vindex nnsoup-active-file
15715 Where @code{nnsoup} stores lots of information.  This is not an ``active
15716 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
15717 this file or mess it up in any way, you're dead.  The default is
15718 @file{~/SOUP/active}.
15719
15720 @item nnsoup-packer
15721 @vindex nnsoup-packer
15722 Format string command for packing a reply @sc{soup} packet.  The default
15723 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
15724
15725 @item nnsoup-unpacker
15726 @vindex nnsoup-unpacker
15727 Format string command for unpacking incoming @sc{soup} packets.  The
15728 default is @samp{gunzip -c %s | tar xvf -}.
15729
15730 @item nnsoup-packet-directory
15731 @vindex nnsoup-packet-directory
15732 Where @code{nnsoup} will look for incoming packets.  The default is
15733 @file{~/}.
15734
15735 @item nnsoup-packet-regexp
15736 @vindex nnsoup-packet-regexp
15737 Regular expression matching incoming @sc{soup} packets.  The default is
15738 @samp{Soupout}.
15739
15740 @item nnsoup-always-save
15741 @vindex nnsoup-always-save
15742 If non-@code{nil}, save the replies buffer after each posted message.
15743
15744 @end table
15745
15746
15747 @node SOUP Replies
15748 @subsubsection SOUP Replies
15749
15750 Just using @code{nnsoup} won't mean that your postings and mailings end
15751 up in @sc{soup} reply packets automagically.  You have to work a bit
15752 more for that to happen.
15753
15754 @findex nnsoup-set-variables
15755 The @code{nnsoup-set-variables} command will set the appropriate
15756 variables to ensure that all your followups and replies end up in the
15757 @sc{soup} system.
15758
15759 In specific, this is what it does:
15760
15761 @lisp
15762 (setq message-send-news-function 'nnsoup-request-post)
15763 (setq message-send-mail-function 'nnsoup-request-mail)
15764 @end lisp
15765
15766 And that's it, really.  If you only want news to go into the @sc{soup}
15767 system you just use the first line.  If you only want mail to be
15768 @sc{soup}ed you use the second.
15769
15770
15771 @node Mail-To-News Gateways
15772 @subsection Mail-To-News Gateways
15773 @cindex mail-to-news gateways
15774 @cindex gateways
15775
15776 If your local @code{nntp} server doesn't allow posting, for some reason
15777 or other, you can post using one of the numerous mail-to-news gateways.
15778 The @code{nngateway} back end provides the interface.
15779
15780 Note that you can't read anything from this back end---it can only be
15781 used to post with.
15782
15783 Server variables:
15784
15785 @table @code
15786 @item nngateway-address
15787 @vindex nngateway-address
15788 This is the address of the mail-to-news gateway.
15789
15790 @item nngateway-header-transformation
15791 @vindex nngateway-header-transformation
15792 News headers often have to be transformed in some odd way or other
15793 for the mail-to-news gateway to accept it.  This variable says what
15794 transformation should be called, and defaults to
15795 @code{nngateway-simple-header-transformation}.  The function is called
15796 narrowed to the headers to be transformed and with one parameter---the
15797 gateway address.
15798
15799 This default function just inserts a new @code{To} header based on the
15800 @code{Newsgroups} header and the gateway address.
15801 For instance, an article with this @code{Newsgroups} header:
15802
15803 @example
15804 Newsgroups: alt.religion.emacs
15805 @end example
15806
15807 will get this @code{From} header inserted:
15808
15809 @example
15810 To: alt-religion-emacs@@GATEWAY
15811 @end example
15812
15813 The following pre-defined functions exist:
15814
15815 @findex nngateway-simple-header-transformation
15816 @table @code
15817
15818 @item nngateway-simple-header-transformation
15819 Creates a @code{To} header that looks like
15820 @var{newsgroup}@@@code{nngateway-address}.
15821
15822 @findex nngateway-mail2news-header-transformation
15823
15824 @item nngateway-mail2news-header-transformation
15825 Creates a @code{To} header that looks like
15826 @code{nngateway-address}.
15827
15828 Here's an example:
15829
15830 @lisp
15831 (setq gnus-post-method
15832       '(nngateway
15833         "mail2news@@replay.com"
15834         (nngateway-header-transformation
15835          nngateway-mail2news-header-transformation)))
15836 @end lisp
15837
15838 @end table
15839
15840
15841 @end table
15842
15843 So, to use this, simply say something like:
15844
15845 @lisp
15846 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
15847 @end lisp
15848
15849
15850
15851 @node Combined Groups
15852 @section Combined Groups
15853
15854 Gnus allows combining a mixture of all the other group types into bigger
15855 groups.
15856
15857 @menu
15858 * Virtual Groups::              Combining articles from many groups.
15859 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
15860 @end menu
15861
15862
15863 @node Virtual Groups
15864 @subsection Virtual Groups
15865 @cindex nnvirtual
15866 @cindex virtual groups
15867 @cindex merging groups
15868
15869 An @dfn{nnvirtual group} is really nothing more than a collection of
15870 other groups.
15871
15872 For instance, if you are tired of reading many small groups, you can
15873 put them all in one big group, and then grow tired of reading one
15874 big, unwieldy group.  The joys of computing!
15875
15876 You specify @code{nnvirtual} as the method.  The address should be a
15877 regexp to match component groups.
15878
15879 All marks in the virtual group will stick to the articles in the
15880 component groups.  So if you tick an article in a virtual group, the
15881 article will also be ticked in the component group from whence it
15882 came.  (And vice versa---marks from the component groups will also be
15883 shown in the virtual group.). To create an empty virtual group, run
15884 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
15885 and edit the method regexp with @kbd{M-e}
15886 (@code{gnus-group-edit-group-method})
15887
15888 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
15889 newsgroups into one, big, happy newsgroup:
15890
15891 @lisp
15892 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
15893 @end lisp
15894
15895 The component groups can be native or foreign; everything should work
15896 smoothly, but if your computer explodes, it was probably my fault.
15897
15898 Collecting the same group from several servers might actually be a good
15899 idea if users have set the Distribution header to limit distribution.
15900 If you would like to read @samp{soc.motss} both from a server in Japan
15901 and a server in Norway, you could use the following as the group regexp:
15902
15903 @example
15904 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
15905 @end example
15906
15907 (Remember, though, that if you're creating the group with @kbd{G m}, you
15908 shouldn't double the backslashes, and you should leave off the quote
15909 characters at the beginning and the end of the string.)
15910
15911 This should work kinda smoothly---all articles from both groups should
15912 end up in this one, and there should be no duplicates.  Threading (and
15913 the rest) will still work as usual, but there might be problems with the
15914 sequence of articles.  Sorting on date might be an option here
15915 (@pxref{Selecting a Group}).
15916
15917 One limitation, however---all groups included in a virtual
15918 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
15919 zombie groups can't be component groups for @code{nnvirtual} groups.
15920
15921 @vindex nnvirtual-always-rescan
15922 If the @code{nnvirtual-always-rescan} is non-@code{nil},
15923 @code{nnvirtual} will always scan groups for unread articles when
15924 entering a virtual group.  If this variable is @code{nil} (which is the
15925 default) and you read articles in a component group after the virtual
15926 group has been activated, the read articles from the component group
15927 will show up when you enter the virtual group.  You'll also see this
15928 effect if you have two virtual groups that have a component group in
15929 common.  If that's the case, you should set this variable to @code{t}.
15930 Or you can just tap @code{M-g} on the virtual group every time before
15931 you enter it---it'll have much the same effect.
15932
15933 @code{nnvirtual} can have both mail and news groups as component groups.
15934 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
15935 has to ask the back end of the component group the article comes from
15936 whether it is a news or mail back end.  However, when you do a @kbd{^},
15937 there is typically no sure way for the component back end to know this,
15938 and in that case @code{nnvirtual} tells Gnus that the article came from a
15939 not-news back end.  (Just to be on the safe side.)
15940
15941 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
15942 line from the article you respond to in these cases.
15943
15944 @code{nnvirtual} groups do not inherit anything but articles and marks
15945 from component groups---group parameters, for instance, are not
15946 inherited. 
15947
15948
15949 @node Kibozed Groups
15950 @subsection Kibozed Groups
15951 @cindex nnkiboze
15952 @cindex kibozing
15953
15954 @dfn{Kibozing} is defined by @sc{oed} as ``grepping through (parts of)
15955 the news feed''.  @code{nnkiboze} is a back end that will do this for
15956 you.  Oh joy!  Now you can grind any @sc{nntp} server down to a halt
15957 with useless requests!  Oh happiness!
15958
15959 @kindex G k (Group)
15960 To create a kibozed group, use the @kbd{G k} command in the group
15961 buffer.
15962
15963 The address field of the @code{nnkiboze} method is, as with
15964 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
15965 @code{nnkiboze} group.  That's where most similarities between @code{nnkiboze}
15966 and @code{nnvirtual} end.
15967
15968 In addition to this regexp detailing component groups, an @code{nnkiboze} group
15969 must have a score file to say what articles are to be included in
15970 the group (@pxref{Scoring}).
15971
15972 @kindex M-x nnkiboze-generate-groups
15973 @findex nnkiboze-generate-groups
15974 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
15975 @code{nnkiboze} groups you want to have.  This command will take time.  Lots of
15976 time.  Oodles and oodles of time.  Gnus has to fetch the headers from
15977 all the articles in all the component groups and run them through the
15978 scoring process to determine if there are any articles in the groups
15979 that are to be part of the @code{nnkiboze} groups.
15980
15981 Please limit the number of component groups by using restrictive
15982 regexps.  Otherwise your sysadmin may become annoyed with you, and the
15983 @sc{nntp} site may throw you off and never let you back in again.
15984 Stranger things have happened.
15985
15986 @code{nnkiboze} component groups do not have to be alive---they can be dead,
15987 and they can be foreign.  No restrictions.
15988
15989 @vindex nnkiboze-directory
15990 The generation of an @code{nnkiboze} group means writing two files in
15991 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
15992 contains the @sc{nov} header lines for all the articles in the group,
15993 and the other is an additional @file{.newsrc} file to store information
15994 on what groups have been searched through to find component articles.
15995
15996 Articles marked as read in the @code{nnkiboze} group will have
15997 their @sc{nov} lines removed from the @sc{nov} file.
15998
15999
16000 @node Gnus Unplugged
16001 @section Gnus Unplugged
16002 @cindex offline
16003 @cindex unplugged
16004 @cindex Agent
16005 @cindex Gnus Agent
16006 @cindex Gnus Unplugged
16007
16008 In olden times (ca. February '88), people used to run their newsreaders
16009 on big machines with permanent connections to the net.  News transport
16010 was dealt with by news servers, and all the newsreaders had to do was to
16011 read news.  Believe it or not.
16012
16013 Nowadays most people read news and mail at home, and use some sort of
16014 modem to connect to the net.  To avoid running up huge phone bills, it
16015 would be nice to have a way to slurp down all the news and mail, hang up
16016 the phone, read for several hours, and then upload any responses you
16017 have to make.  And then you repeat the procedure.
16018
16019 Of course, you can use news servers for doing this as well.  I've used
16020 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
16021 for some years, but doing that's a bore.  Moving the news server
16022 functionality up to the newsreader makes sense if you're the only person
16023 reading news on a machine.
16024
16025 Using Gnus as an ``offline'' newsreader is quite simple.
16026
16027 @itemize @bullet
16028 @item
16029 First, set up Gnus as you would do if you were running it on a machine
16030 that has full connection to the net.  Go ahead.  I'll still be waiting
16031 here.
16032
16033 @item
16034 Then, put the following magical incantation in your @file{.gnus.el}
16035 file:
16036
16037 @lisp
16038 (setq gnus-agent t)
16039 @end lisp
16040 @end itemize
16041
16042 That's it.  Gnus is now an ``offline'' newsreader.
16043
16044 Of course, to use it as such, you have to learn a few new commands.
16045
16046 @menu
16047 * Agent Basics::                How it all is supposed to work.
16048 * Agent Categories::            How to tell the Gnus Agent what to download.
16049 * Agent Commands::              New commands for all the buffers.
16050 * Agent Expiry::                How to make old articles go away.
16051 * Agent and IMAP::              How to use the Agent with IMAP.
16052 * Outgoing Messages::           What happens when you post/mail something?
16053 * Agent Variables::             Customizing is fun.
16054 * Example Setup::               An example @file{.gnus.el} file for offline people.
16055 * Batching Agents::             How to fetch news from a @code{cron} job.
16056 * Agent Caveats::               What you think it'll do and what it does.
16057 @end menu
16058
16059
16060 @node Agent Basics
16061 @subsection Agent Basics
16062
16063 First, let's get some terminology out of the way.
16064
16065 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
16066 connection to the net (and notified the Agent that this is the case).
16067 When the connection to the net is up again (and Gnus knows this), the
16068 Agent is @dfn{plugged}.
16069
16070 The @dfn{local} machine is the one you're running on, and which isn't
16071 connected to the net continuously.
16072
16073 @dfn{Downloading} means fetching things from the net to your local
16074 machine.  @dfn{Uploading} is doing the opposite.
16075
16076 Let's take a typical Gnus session using the Agent.
16077
16078 @itemize @bullet
16079
16080 @item
16081 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
16082 Agent in a disconnected state.  You can read all the news that you have
16083 already fetched while in this mode.
16084
16085 @item
16086 You then decide to see whether any new news has arrived.  You connect
16087 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
16088 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
16089 as usual.  To check for new mail in unplugged mode, see (@pxref{Mail
16090 Source Specifiers}).
16091
16092 @item
16093 You can then read the new news immediately, or you can download the news
16094 onto your local machine.  If you want to do the latter, you press @kbd{g}
16095 to check if there are any new news and then @kbd{J
16096 s} to fetch all the eligible articles in all the groups.  (To let Gnus
16097 know which articles you want to download, @pxref{Agent Categories}.)
16098
16099 @item
16100 After fetching the articles, you press @kbd{J j} to make Gnus become
16101 unplugged again, and you shut down the PPP thing (or whatever).  And
16102 then you read the news offline.
16103
16104 @item
16105 And then you go to step 2.
16106 @end itemize
16107
16108 Here are some things you should do the first time (or so) that you use
16109 the Agent.
16110
16111 @itemize @bullet
16112
16113 @item
16114 Decide which servers should be covered by the Agent.  If you have a mail
16115 back end, it would probably be nonsensical to have it covered by the
16116 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
16117 @kbd{J a} the server (or servers) that you wish to have covered by the
16118 Agent (@pxref{Server Agent Commands}).  This will typically be only the
16119 primary select method, which is listed on the bottom in the buffer.
16120
16121 @item
16122 Decide on download policy.  @xref{Agent Categories}.
16123
16124 @item
16125 Uhm... that's it.
16126 @end itemize
16127
16128
16129 @node Agent Categories
16130 @subsection Agent Categories
16131
16132 One of the main reasons to integrate the news transport layer into the
16133 newsreader is to allow greater control over what articles to download.
16134 There's not much point in downloading huge amounts of articles, just to
16135 find out that you're not interested in reading any of them.  It's better
16136 to be somewhat more conservative in choosing what to download, and then
16137 mark the articles for downloading manually if it should turn out that
16138 you're interested in the articles anyway.
16139
16140 The main way to control what is to be downloaded is to create a
16141 @dfn{category} and then assign some (or all) groups to this category.
16142 Groups that do not belong in any other category belong to the
16143 @code{default} category.  Gnus has its own buffer for creating and
16144 managing categories.
16145
16146 @menu
16147 * Category Syntax::             What a category looks like.
16148 * Category Buffer::             A buffer for maintaining categories.
16149 * Category Variables::          Customize'r'Us.
16150 @end menu
16151
16152
16153 @node Category Syntax
16154 @subsubsection Category Syntax
16155
16156 A category consists of two things.
16157
16158 @enumerate
16159 @item
16160 A predicate which (generally) gives a rough outline of which articles
16161 are eligible for downloading; and
16162
16163 @item
16164 a score rule which (generally) gives you a finer granularity when
16165 deciding what articles to download.  (Note that this @dfn{download
16166 score} is not necessarily related to normal scores.)
16167 @end enumerate
16168
16169 A predicate in its simplest form can be a single predicate such as
16170 @code{true} or @code{false}.  These two will download every available
16171 article or nothing respectively.  In the case of these two special
16172 predicates an additional score rule is superfluous.
16173
16174 Predicates of @code{high} or @code{low} download articles in respect of
16175 their scores in relationship to @code{gnus-agent-high-score} and
16176 @code{gnus-agent-low-score} as described below.
16177
16178 To gain even finer control of what is to be regarded eligible for
16179 download a predicate can consist of a number of predicates with logical
16180 operators sprinkled in between.
16181
16182 Perhaps some examples are in order.
16183
16184 Here's a simple predicate.  (It's the default predicate, in fact, used
16185 for all groups that don't belong to any other category.)
16186
16187 @lisp
16188 short
16189 @end lisp
16190
16191 Quite simple, eh?  This predicate is true if and only if the article is
16192 short (for some value of ``short'').
16193
16194 Here's a more complex predicate:
16195
16196 @lisp
16197 (or high
16198     (and
16199      (not low)
16200      (not long)))
16201 @end lisp
16202
16203 This means that an article should be downloaded if it has a high score,
16204 or if the score is not low and the article is not long.  You get the
16205 drift.
16206
16207 The available logical operators are @code{or}, @code{and} and
16208 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
16209 @samp{|}, @code{&} and @code{!} instead.)
16210
16211 The following predicates are pre-defined, but if none of these fit what
16212 you want to do, you can write your own.
16213
16214 @table @code
16215 @item short
16216 True iff the article is shorter than @code{gnus-agent-short-article}
16217 lines; default 100.
16218
16219 @item long
16220 True iff the article is longer than @code{gnus-agent-long-article}
16221 lines; default 200.
16222
16223 @item low
16224 True iff the article has a download score less than
16225 @code{gnus-agent-low-score}; default 0.
16226
16227 @item high
16228 True iff the article has a download score greater than
16229 @code{gnus-agent-high-score}; default 0.
16230
16231 @item spam
16232 True iff the Gnus Agent guesses that the article is spam.  The
16233 heuristics may change over time, but at present it just computes a
16234 checksum and sees whether articles match.
16235
16236 @item true
16237 Always true.
16238
16239 @item false
16240 Always false.
16241 @end table
16242
16243 If you want to create your own predicate function, here's what you have
16244 to know:  The functions are called with no parameters, but the
16245 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
16246 useful values.
16247
16248 For example, you could decide that you don't want to download articles
16249 that were posted more than a certain number of days ago (e.g. posted
16250 more than @code{gnus-agent-expire-days} ago) you might write a function
16251 something along the lines of the following:
16252
16253 @lisp
16254 (defun my-article-old-p ()
16255   "Say whether an article is old."
16256   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
16257      (- (time-to-days (current-time)) gnus-agent-expire-days)))
16258 @end lisp
16259
16260 with the predicate then defined as:
16261
16262 @lisp
16263 (not my-article-old-p)
16264 @end lisp
16265
16266 or you could append your predicate to the predefined
16267 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
16268 wherever. 
16269
16270 @lisp
16271 (require 'gnus-agent)
16272 (setq  gnus-category-predicate-alist
16273   (append gnus-category-predicate-alist
16274          '((old . my-article-old-p))))
16275 @end lisp
16276
16277 and simply specify your predicate as:
16278
16279 @lisp
16280 (not old)
16281 @end lisp
16282
16283 If/when using something like the above, be aware that there are many
16284 misconfigured systems/mailers out there and so an article's date is not
16285 always a reliable indication of when it was posted.  Hell, some people
16286 just don't give a damn.
16287
16288 The above predicates apply to *all* the groups which belong to the
16289 category.  However, if you wish to have a specific predicate for an
16290 individual group within a category, or you're just too lazy to set up a
16291 new category, you can enter a group's individual predicate in it's group
16292 parameters like so:
16293
16294 @lisp
16295 (agent-predicate . short)
16296 @end lisp
16297
16298 This is the group parameter equivalent of the agent category default.
16299 Note that when specifying a single word predicate like this, the
16300 @code{agent-predicate} specification must be in dotted pair notation.
16301
16302 The equivalent of the longer example from above would be:
16303
16304 @lisp
16305 (agent-predicate or high (and (not low) (not long)))
16306 @end lisp
16307
16308 The outer parenthesis required in the category specification are not
16309 entered here as, not being in dotted pair notation, the value of the
16310 predicate is assumed to be a list.
16311
16312
16313 Now, the syntax of the download score is the same as the syntax of
16314 normal score files, except that all elements that require actually
16315 seeing the article itself are verboten.  This means that only the
16316 following headers can be scored on: @code{Subject}, @code{From},
16317 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
16318 @code{Lines}, and @code{Xref}.
16319
16320 As with predicates, the specification of the @code{download score rule}
16321 to use in respect of a group can be in either the category definition if
16322 it's to be applicable to all groups in therein, or a group's parameters
16323 if it's to be specific to that group.
16324
16325 In both of these places the @code{download score rule} can take one of
16326 three forms:
16327
16328 @enumerate
16329 @item
16330 Score rule
16331
16332 This has the same syntax as a normal gnus score file except only a
16333 subset of scoring keywords are available as mentioned above.
16334
16335 example:
16336
16337 @itemize @bullet
16338 @item
16339 Category specification
16340
16341 @lisp
16342 (("from"
16343        ("Lars Ingebrigtsen" 1000000 nil s))
16344 ("lines"
16345        (500 -100 nil <)))
16346 @end lisp
16347
16348 @item
16349 Group Parameter specification
16350
16351 @lisp
16352 (agent-score ("from"
16353                    ("Lars Ingebrigtsen" 1000000 nil s))
16354              ("lines"
16355                    (500 -100 nil <)))
16356 @end lisp
16357
16358 Again, note the omission of the outermost parenthesis here.
16359 @end itemize
16360
16361 @item
16362 Agent score file
16363
16364 These score files must *only* contain the permitted scoring keywords
16365 stated above.
16366
16367 example:
16368
16369 @itemize @bullet
16370 @item
16371 Category specification
16372
16373 @lisp
16374 ("~/News/agent.SCORE")
16375 @end lisp
16376
16377 or perhaps
16378
16379 @lisp
16380 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
16381 @end lisp
16382
16383 @item
16384 Group Parameter specification
16385
16386 @lisp
16387 (agent-score "~/News/agent.SCORE")
16388 @end lisp
16389
16390 Additional score files can be specified as above.  Need I say anything
16391 about parenthesis?
16392 @end itemize
16393
16394 @item
16395 Use @code{normal} score files
16396
16397 If you don't want to maintain two sets of scoring rules for a group, and
16398 your desired @code{downloading} criteria for a group are the same as your
16399 @code{reading} criteria then you can tell the agent to refer to your
16400 @code{normal} score files when deciding what to download.
16401
16402 These directives in either the category definition or a group's
16403 parameters will cause the agent to read in all the applicable score
16404 files for a group, *filtering out* those sections that do not
16405 relate to one of the permitted subset of scoring keywords.
16406
16407 @itemize @bullet
16408 @item
16409 Category Specification
16410
16411 @lisp
16412 file
16413 @end lisp
16414
16415 @item
16416 Group Parameter specification
16417
16418 @lisp
16419 (agent-score . file)
16420 @end lisp
16421 @end itemize
16422 @end enumerate
16423
16424 @node Category Buffer
16425 @subsubsection Category Buffer
16426
16427 You'd normally do all category maintenance from the category buffer.
16428 When you enter it for the first time (with the @kbd{J c} command from
16429 the group buffer), you'll only see the @code{default} category.
16430
16431 The following commands are available in this buffer:
16432
16433 @table @kbd
16434 @item q
16435 @kindex q (Category)
16436 @findex gnus-category-exit
16437 Return to the group buffer (@code{gnus-category-exit}).
16438
16439 @item k
16440 @kindex k (Category)
16441 @findex gnus-category-kill
16442 Kill the current category (@code{gnus-category-kill}).
16443
16444 @item c
16445 @kindex c (Category)
16446 @findex gnus-category-copy
16447 Copy the current category (@code{gnus-category-copy}).
16448
16449 @item a
16450 @kindex a (Category)
16451 @findex gnus-category-add
16452 Add a new category (@code{gnus-category-add}).
16453
16454 @item p
16455 @kindex p (Category)
16456 @findex gnus-category-edit-predicate
16457 Edit the predicate of the current category
16458 (@code{gnus-category-edit-predicate}).
16459
16460 @item g
16461 @kindex g (Category)
16462 @findex gnus-category-edit-groups
16463 Edit the list of groups belonging to the current category
16464 (@code{gnus-category-edit-groups}).
16465
16466 @item s
16467 @kindex s (Category)
16468 @findex gnus-category-edit-score
16469 Edit the download score rule of the current category
16470 (@code{gnus-category-edit-score}).
16471
16472 @item l
16473 @kindex l (Category)
16474 @findex gnus-category-list
16475 List all the categories (@code{gnus-category-list}).
16476 @end table
16477
16478
16479 @node Category Variables
16480 @subsubsection Category Variables
16481
16482 @table @code
16483 @item gnus-category-mode-hook
16484 @vindex gnus-category-mode-hook
16485 Hook run in category buffers.
16486
16487 @item gnus-category-line-format
16488 @vindex gnus-category-line-format
16489 Format of the lines in the category buffer (@pxref{Formatting
16490 Variables}).  Valid elements are:
16491
16492 @table @samp
16493 @item c
16494 The name of the category.
16495
16496 @item g
16497 The number of groups in the category.
16498 @end table
16499
16500 @item gnus-category-mode-line-format
16501 @vindex gnus-category-mode-line-format
16502 Format of the category mode line (@pxref{Mode Line Formatting}).
16503
16504 @item gnus-agent-short-article
16505 @vindex gnus-agent-short-article
16506 Articles that have fewer lines than this are short.  Default 100.
16507
16508 @item gnus-agent-long-article
16509 @vindex gnus-agent-long-article
16510 Articles that have more lines than this are long.  Default 200.
16511
16512 @item gnus-agent-low-score
16513 @vindex gnus-agent-low-score
16514 Articles that have a score lower than this have a low score.  Default
16515 0.
16516
16517 @item gnus-agent-high-score
16518 @vindex gnus-agent-high-score
16519 Articles that have a score higher than this have a high score.  Default
16520 0.
16521
16522 @end table
16523
16524
16525 @node Agent Commands
16526 @subsection Agent Commands
16527
16528 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
16529 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
16530 toggles the plugged/unplugged state of the Gnus Agent.
16531
16532
16533 @menu
16534 * Group Agent Commands::        
16535 * Summary Agent Commands::      
16536 * Server Agent Commands::       
16537 @end menu
16538
16539 You can run a complete batch command from the command line with the
16540 following incantation:
16541
16542 @cindex gnus-agent-batch
16543 @example
16544 $ emacs -batch -l ~/.gnus.el -f gnus-agent-batch
16545 @end example
16546
16547
16548
16549 @node Group Agent Commands
16550 @subsubsection Group Agent Commands
16551
16552 @table @kbd
16553 @item J u
16554 @kindex J u (Agent Group)
16555 @findex gnus-agent-fetch-groups
16556 Fetch all eligible articles in the current group
16557 (@code{gnus-agent-fetch-groups}).
16558
16559 @item J c
16560 @kindex J c (Agent Group)
16561 @findex gnus-enter-category-buffer
16562 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
16563
16564 @item J s
16565 @kindex J s (Agent Group)
16566 @findex gnus-agent-fetch-session
16567 Fetch all eligible articles in all groups
16568 (@code{gnus-agent-fetch-session}).
16569
16570 @item J S
16571 @kindex J S (Agent Group)
16572 @findex gnus-group-send-queue
16573 Send all sendable messages in the queue group
16574 (@code{gnus-group-send-queue}).  @xref{Drafts}.
16575
16576 @item J a
16577 @kindex J a (Agent Group)
16578 @findex gnus-agent-add-group
16579 Add the current group to an Agent category
16580 (@code{gnus-agent-add-group}).  This command understands the
16581 process/prefix convention (@pxref{Process/Prefix}).
16582
16583 @item J r
16584 @kindex J r (Agent Group)
16585 @findex gnus-agent-remove-group
16586 Remove the current group from its category, if any
16587 (@code{gnus-agent-remove-group}).  This command understands the
16588 process/prefix convention (@pxref{Process/Prefix}).
16589
16590 @item J Y
16591 @kindex J Y (Agent Group)
16592 @findex gnus-agent-synchronize-flags
16593 Synchronize flags changed while unplugged with remote server, if any.
16594
16595
16596 @end table
16597
16598
16599 @node Summary Agent Commands
16600 @subsubsection Summary Agent Commands
16601
16602 @table @kbd
16603 @item J #
16604 @kindex J # (Agent Summary)
16605 @findex gnus-agent-mark-article
16606 Mark the article for downloading (@code{gnus-agent-mark-article}).
16607
16608 @item J M-#
16609 @kindex J M-# (Agent Summary)
16610 @findex gnus-agent-unmark-article
16611 Remove the downloading mark from the article
16612 (@code{gnus-agent-unmark-article}).
16613
16614 @item @@
16615 @kindex @@ (Agent Summary)
16616 @findex gnus-agent-toggle-mark
16617 Toggle whether to download the article (@code{gnus-agent-toggle-mark}).
16618
16619 @item J c
16620 @kindex J c (Agent Summary)
16621 @findex gnus-agent-catchup
16622 Mark all undownloaded articles as read (@code{gnus-agent-catchup}).
16623
16624 @item J u
16625 @kindex J u (Agent Summary)
16626 @findex gnus-agent-summary-fetch-group
16627 Download all downloadable articles in the current group
16628 (@code{gnus-agent-summary-fetch-group}).
16629
16630 @end table
16631
16632
16633 @node Server Agent Commands
16634 @subsubsection Server Agent Commands
16635
16636 @table @kbd
16637 @item J a
16638 @kindex J a (Agent Server)
16639 @findex gnus-agent-add-server
16640 Add the current server to the list of servers covered by the Gnus Agent
16641 (@code{gnus-agent-add-server}).
16642
16643 @item J r
16644 @kindex J r (Agent Server)
16645 @findex gnus-agent-remove-server
16646 Remove the current server from the list of servers covered by the Gnus
16647 Agent (@code{gnus-agent-remove-server}).
16648
16649 @end table
16650
16651
16652 @node Agent Expiry
16653 @subsection Agent Expiry
16654
16655 @vindex gnus-agent-expire-days
16656 @findex gnus-agent-expire
16657 @kindex M-x gnus-agent-expire
16658 @cindex Agent expiry
16659 @cindex Gnus Agent expiry
16660 @cindex expiry
16661
16662 @code{nnagent} doesn't handle expiry.  Instead, there's a special
16663 @code{gnus-agent-expire} command that will expire all read articles that
16664 are older than @code{gnus-agent-expire-days} days.  It can be run
16665 whenever you feel that you're running out of space.  It's not
16666 particularly fast or efficient, and it's not a particularly good idea to
16667 interrupt it (with @kbd{C-g} or anything else) once you've started it.
16668
16669 @code{gnus-agent-expire-days} can also be a list of regexp/day pairs.
16670 The regexps will be matched against group names to allow differing
16671 expiry in different groups.
16672
16673 @lisp
16674 (setq gnus-agent-expire-days
16675       '(("alt\\." 7)
16676         (".*binary" 1)
16677         ("." 21)))
16678 @end lisp
16679
16680 If you use the list form, the last element must always be the default
16681 method---it must always match all groups.
16682
16683 @vindex gnus-agent-expire-all
16684 If @code{gnus-agent-expire-all} is non-@code{nil}, this command will
16685 expire all articles---unread, read, ticked and dormant.  If @code{nil}
16686 (which is the default), only read articles are eligible for expiry, and
16687 unread, ticked and dormant articles will be kept indefinitely.
16688
16689 @findex gnus-agent-regenerate
16690 If you find that some articles eligible for expiry are never expired,
16691 perhaps some Gnus Agent files are corrupted.  There's a special
16692 @code{gnus-agent-regenerate} command to fix possible problems.
16693
16694 @node Agent and IMAP
16695 @subsection Agent and IMAP
16696
16697 The Agent work with any Gnus back end, including nnimap.  However,
16698 since there are some conceptual differences between @sc{nntp} and
16699 @sc{imap}, this section (should) provide you with some information to
16700 make Gnus Agent work smoother as a @sc{imap} Disconnected Mode client.
16701
16702 The first thing to keep in mind is that all flags (read, ticked, etc)
16703 are kept on the @sc{imap} server, rather than in @code{.newsrc} as is the
16704 case for nntp.  Thus Gnus need to remember flag changes when
16705 disconnected, and synchronize these flags when you plug back in.
16706
16707 Gnus keep track of flag changes when reading nnimap groups under the
16708 Agent by default.  When you plug back in, by default Gnus will check if
16709 you have any changed any flags and ask if you wish to synchronize these
16710 with the server.  This behavior is customizable with
16711 @code{gnus-agent-synchronize-flags}.
16712
16713 @vindex gnus-agent-synchronize-flags
16714 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
16715 never automatically synchronize flags.  If it is @code{ask}, the
16716 default, the Agent will check if you made any changes and if so ask if
16717 you wish to synchronize these when you re-connect.  If it has any other
16718 value, all flags will be synchronized automatically.
16719
16720 If you do not wish to automatically synchronize flags when you
16721 re-connect, this can be done manually with the
16722 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
16723 in the group buffer by default.
16724
16725 Some things are currently not implemented in the Agent that you'd might
16726 expect from a disconnected @sc{imap} client, including:
16727
16728 @itemize @bullet
16729
16730 @item
16731 Copying/moving articles into nnimap groups when unplugged.
16732
16733 @item
16734 Creating/deleting nnimap groups when unplugged.
16735
16736 @end itemize
16737
16738 Technical note: the synchronization algorithm does not work by "pushing"
16739 all local flags to the server, but rather incrementally update the
16740 server view of flags by changing only those flags that were changed by
16741 the user.  Thus, if you set one flag on a article, quit the group and
16742 re-select the group and remove the flag; the flag will be set and
16743 removed from the server when you "synchronize".  The queued flag
16744 operations can be found in the per-server @code{flags} file in the Agent
16745 directory.  It's emptied when you synchronize flags.
16746
16747
16748 @node Outgoing Messages
16749 @subsection Outgoing Messages
16750
16751 When Gnus is unplugged, all outgoing messages (both mail and news) are
16752 stored in the draft groups (@pxref{Drafts}).  You can view them there
16753 after posting, and edit them at will.
16754
16755 When Gnus is plugged again, you can send the messages either from the
16756 draft group with the special commands available there, or you can use
16757 the @kbd{J S} command in the group buffer to send all the sendable
16758 messages in the draft group.
16759
16760
16761
16762 @node Agent Variables
16763 @subsection Agent Variables
16764
16765 @table @code
16766 @item gnus-agent-directory
16767 @vindex gnus-agent-directory
16768 Where the Gnus Agent will store its files.  The default is
16769 @file{~/News/agent/}.
16770
16771 @item gnus-agent-handle-level
16772 @vindex gnus-agent-handle-level
16773 Groups on levels (@pxref{Group Levels}) higher than this variable will
16774 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
16775 which means that only subscribed group will be considered by the Agent
16776 by default.
16777
16778 @item gnus-agent-plugged-hook
16779 @vindex gnus-agent-plugged-hook
16780 Hook run when connecting to the network.
16781
16782 @item gnus-agent-unplugged-hook
16783 @vindex gnus-agent-unplugged-hook
16784 Hook run when disconnecting from the network.
16785
16786 @item gnus-agent-fetched-hook
16787 @vindex gnus-agent-fetched-hook
16788 Hook run when after finishing fetching articles.
16789
16790 @item gnus-agent-cache
16791 @vindex gnus-agent-cache
16792 Variable to control whether use the locally stored @sc{nov} and articles when
16793 plugged.
16794
16795 @item gnus-agent-go-online
16796 @vindex gnus-agent-go-online
16797 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
16798 automatically switch offline servers into online status.  If it is
16799 @code{ask}, the default, the Agent will ask if you wish to switch
16800 offline servers into online status when you re-connect.  If it has any
16801 other value, all offline servers will be automatically switched into
16802 online status.
16803
16804 @end table
16805
16806
16807 @node Example Setup
16808 @subsection Example Setup
16809
16810 If you don't want to read this manual, and you have a fairly standard
16811 setup, you may be able to use something like the following as your
16812 @file{.gnus.el} file to get started.
16813
16814 @lisp
16815 ;;; Define how Gnus is to fetch news.  We do this over @sc{nntp}
16816 ;;; from your ISP's server.
16817 (setq gnus-select-method '(nntp "news.your-isp.com"))
16818
16819 ;;; Define how Gnus is to read your mail.  We read mail from
16820 ;;; your ISP's POP server.
16821 (setq mail-sources '((pop :server "pop.your-isp.com")))
16822
16823 ;;; Say how Gnus is to store the mail.  We use nnml groups.
16824 (setq gnus-secondary-select-methods '((nnml "")))
16825
16826 ;;; Make Gnus into an offline newsreader.
16827 ;;; (gnus-agentize) ; The obsolete setting.
16828 (setq gnus-agent t)
16829 @end lisp
16830
16831 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
16832 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
16833 gnus}.
16834
16835 If this is the first time you've run Gnus, you will be subscribed
16836 automatically to a few default newsgroups.  You'll probably want to
16837 subscribe to more groups, and to do that, you have to query the
16838 @sc{nntp} server for a complete list of groups with the @kbd{A A}
16839 command.  This usually takes quite a while, but you only have to do it
16840 once.
16841
16842 After reading and parsing a while, you'll be presented with a list of
16843 groups.  Subscribe to the ones you want to read with the @kbd{u}
16844 command.  @kbd{l} to make all the killed groups disappear after you've
16845 subscribe to all the groups you want to read.  (@kbd{A k} will bring
16846 back all the killed groups.)
16847
16848 You can now read the groups at once, or you can download the articles
16849 with the @kbd{J s} command.  And then read the rest of this manual to
16850 find out which of the other gazillion things you want to customize.
16851
16852
16853 @node Batching Agents
16854 @subsection Batching Agents
16855
16856 Having the Gnus Agent fetch articles (and post whatever messages you've
16857 written) is quite easy once you've gotten things set up properly.  The
16858 following shell script will do everything that is necessary:
16859
16860 @example
16861 #!/bin/sh
16862 emacs -batch -l ~/.emacs -f gnus-agent-batch >/dev/null
16863 @end example
16864
16865
16866 @node Agent Caveats
16867 @subsection Agent Caveats
16868
16869 The Gnus Agent doesn't seem to work like most other offline
16870 newsreaders.  Here are some common questions that some imaginary people
16871 may ask:
16872
16873 @table @dfn
16874 @item If I read an article while plugged, do they get entered into the Agent?
16875
16876 @strong{No}.
16877
16878 @item If I read an article while plugged, and the article already exists in the Agent, will it get downloaded once more?
16879
16880 @strong{No}, unless @code{gnus-agent-cache} is `nil'.
16881
16882 @end table
16883
16884 In short, when Gnus is unplugged, it only looks into the locally stored
16885 articles; when it's plugged, it only talks to your ISP and also uses the
16886 locally stored articles.
16887
16888
16889 @node Scoring
16890 @chapter Scoring
16891 @cindex scoring
16892
16893 Other people use @dfn{kill files}, but we here at Gnus Towers like
16894 scoring better than killing, so we'd rather switch than fight.  They do
16895 something completely different as well, so sit up straight and pay
16896 attention!
16897
16898 @vindex gnus-summary-mark-below
16899 All articles have a default score (@code{gnus-summary-default-score}),
16900 which is 0 by default.  This score may be raised or lowered either
16901 interactively or by score files.  Articles that have a score lower than
16902 @code{gnus-summary-mark-below} are marked as read.
16903
16904 Gnus will read any @dfn{score files} that apply to the current group
16905 before generating the summary buffer.
16906
16907 There are several commands in the summary buffer that insert score
16908 entries based on the current article.  You can, for instance, ask Gnus to
16909 lower or increase the score of all articles with a certain subject.
16910
16911 There are two sorts of scoring entries: Permanent and temporary.
16912 Temporary score entries are self-expiring entries.  Any entries that are
16913 temporary and have not been used for, say, a week, will be removed
16914 silently to help keep the sizes of the score files down.
16915
16916 @menu
16917 * Summary Score Commands::      Adding score entries for the current group.
16918 * Group Score Commands::        General score commands.
16919 * Score Variables::             Customize your scoring.  (My, what terminology).
16920 * Score File Format::           What a score file may contain.
16921 * Score File Editing::          You can edit score files by hand as well.
16922 * Adaptive Scoring::            Big Sister Gnus knows what you read.
16923 * Home Score File::             How to say where new score entries are to go.
16924 * Followups To Yourself::       Having Gnus notice when people answer you.
16925 * Scoring On Other Headers::    Scoring on non-standard headers.
16926 * Scoring Tips::                How to score effectively.
16927 * Reverse Scoring::             That problem child of old is not problem.
16928 * Global Score Files::          Earth-spanning, ear-splitting score files.
16929 * Kill Files::                  They are still here, but they can be ignored.
16930 * Converting Kill Files::       Translating kill files to score files.
16931 * GroupLens::                   Getting predictions on what you like to read.
16932 * Advanced Scoring::            Using logical expressions to build score rules.
16933 * Score Decays::                It can be useful to let scores wither away.
16934 @end menu
16935
16936
16937 @node Summary Score Commands
16938 @section Summary Score Commands
16939 @cindex score commands
16940
16941 The score commands that alter score entries do not actually modify real
16942 score files.  That would be too inefficient.  Gnus maintains a cache of
16943 previously loaded score files, one of which is considered the
16944 @dfn{current score file alist}.  The score commands simply insert
16945 entries into this list, and upon group exit, this list is saved.
16946
16947 The current score file is by default the group's local score file, even
16948 if no such score file actually exists.  To insert score commands into
16949 some other score file (e.g. @file{all.SCORE}), you must first make this
16950 score file the current one.
16951
16952 General score commands that don't actually change the score file:
16953
16954 @table @kbd
16955
16956 @item V s
16957 @kindex V s (Summary)
16958 @findex gnus-summary-set-score
16959 Set the score of the current article (@code{gnus-summary-set-score}).
16960
16961 @item V S
16962 @kindex V S (Summary)
16963 @findex gnus-summary-current-score
16964 Display the score of the current article
16965 (@code{gnus-summary-current-score}).
16966
16967 @item V t
16968 @kindex V t (Summary)
16969 @findex gnus-score-find-trace
16970 Display all score rules that have been used on the current article
16971 (@code{gnus-score-find-trace}).
16972
16973 @item V w
16974 @kindex V w (Summary)
16975 @findex gnus-score-find-favourite-words
16976 List words used in scoring (@code{gnus-score-find-favourite-words}).
16977
16978 @item V R
16979 @kindex V R (Summary)
16980 @findex gnus-summary-rescore
16981 Run the current summary through the scoring process
16982 (@code{gnus-summary-rescore}).  This might be useful if you're playing
16983 around with your score files behind Gnus' back and want to see the
16984 effect you're having.
16985
16986 @item V c
16987 @kindex V c (Summary)
16988 @findex gnus-score-change-score-file
16989 Make a different score file the current
16990 (@code{gnus-score-change-score-file}).
16991
16992 @item V e
16993 @kindex V e (Summary)
16994 @findex gnus-score-edit-current-scores
16995 Edit the current score file (@code{gnus-score-edit-current-scores}).
16996 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
16997 File Editing}).
16998
16999 @item V f
17000 @kindex V f (Summary)
17001 @findex gnus-score-edit-file
17002 Edit a score file and make this score file the current one
17003 (@code{gnus-score-edit-file}).
17004
17005 @item V F
17006 @kindex V F (Summary)
17007 @findex gnus-score-flush-cache
17008 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
17009 after editing score files.
17010
17011 @item V C
17012 @kindex V C (Summary)
17013 @findex gnus-score-customize
17014 Customize a score file in a visually pleasing manner
17015 (@code{gnus-score-customize}).
17016
17017 @end table
17018
17019 The rest of these commands modify the local score file.
17020
17021 @table @kbd
17022
17023 @item V m
17024 @kindex V m (Summary)
17025 @findex gnus-score-set-mark-below
17026 Prompt for a score, and mark all articles with a score below this as
17027 read (@code{gnus-score-set-mark-below}).
17028
17029 @item V x
17030 @kindex V x (Summary)
17031 @findex gnus-score-set-expunge-below
17032 Prompt for a score, and add a score rule to the current score file to
17033 expunge all articles below this score
17034 (@code{gnus-score-set-expunge-below}).
17035 @end table
17036
17037 The keystrokes for actually making score entries follow a very regular
17038 pattern, so there's no need to list all the commands.  (Hundreds of
17039 them.)
17040
17041 @findex gnus-summary-increase-score
17042 @findex gnus-summary-lower-score
17043
17044 @enumerate
17045 @item
17046 The first key is either @kbd{I} (upper case i) for increasing the score
17047 or @kbd{L} for lowering the score.
17048 @item
17049 The second key says what header you want to score on.  The following
17050 keys are available:
17051 @table @kbd
17052
17053 @item a
17054 Score on the author name.
17055
17056 @item s
17057 Score on the subject line.
17058
17059 @item x
17060 Score on the @code{Xref} line---i.e., the cross-posting line.
17061
17062 @item r
17063 Score on the @code{References} line.
17064
17065 @item d
17066 Score on the date.
17067
17068 @item l
17069 Score on the number of lines.
17070
17071 @item i
17072 Score on the @code{Message-ID} header.
17073
17074 @item e
17075 Score on an "extra" header, that is, one of those in gnus-extra-headers,
17076 if your @sc{nntp} server tracks additional header data in overviews.
17077
17078 @item f
17079 Score on followups---this matches the author name, and adds scores to
17080 the followups to this author.  (Using this key leads to the creation of
17081 @file{ADAPT} files.)
17082
17083 @item b
17084 Score on the body.
17085
17086 @item h
17087 Score on the head.
17088
17089 @item t
17090 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
17091 files.)
17092
17093 @end table
17094
17095 @item
17096 The third key is the match type.  Which match types are valid depends on
17097 what headers you are scoring on.
17098
17099 @table @code
17100
17101 @item strings
17102
17103 @table @kbd
17104
17105 @item e
17106 Exact matching.
17107
17108 @item s
17109 Substring matching.
17110
17111 @item f
17112 Fuzzy matching (@pxref{Fuzzy Matching}).
17113
17114 @item r
17115 Regexp matching
17116 @end table
17117
17118 @item date
17119 @table @kbd
17120
17121 @item b
17122 Before date.
17123
17124 @item a
17125 After date.
17126
17127 @item n
17128 This date.
17129 @end table
17130
17131 @item number
17132 @table @kbd
17133
17134 @item <
17135 Less than number.
17136
17137 @item =
17138 Equal to number.
17139
17140 @item >
17141 Greater than number.
17142 @end table
17143 @end table
17144
17145 @item
17146 The fourth and usually final key says whether this is a temporary (i.e.,
17147 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
17148 or whether it is to be done immediately, without adding to the score
17149 file.
17150 @table @kbd
17151
17152 @item t
17153 Temporary score entry.
17154
17155 @item p
17156 Permanent score entry.
17157
17158 @item i
17159 Immediately scoring.
17160 @end table
17161
17162 @item
17163 If you are scoring on `e' (extra) headers, you will then be prompted for
17164 the header name on which you wish to score.  This must be a header named
17165 in gnus-extra-headers, and @samp{TAB} completion is available.
17166
17167 @end enumerate
17168
17169 So, let's say you want to increase the score on the current author with
17170 exact matching permanently: @kbd{I a e p}.  If you want to lower the
17171 score based on the subject line, using substring matching, and make a
17172 temporary score entry: @kbd{L s s t}.  Pretty easy.
17173
17174 To make things a bit more complicated, there are shortcuts.  If you use
17175 a capital letter on either the second or third keys, Gnus will use
17176 defaults for the remaining one or two keystrokes.  The defaults are
17177 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
17178 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
17179
17180 These functions take both the numerical prefix and the symbolic prefix
17181 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
17182 (or increase) the score of the article.  A symbolic prefix of @code{a}
17183 says to use the @file{all.SCORE} file for the command instead of the
17184 current score file.
17185
17186 @vindex gnus-score-mimic-keymap
17187 The @code{gnus-score-mimic-keymap} says whether these commands will
17188 pretend they are keymaps or not.
17189
17190
17191 @node Group Score Commands
17192 @section Group Score Commands
17193 @cindex group score commands
17194
17195 There aren't many of these as yet, I'm afraid.
17196
17197 @table @kbd
17198
17199 @item W f
17200 @kindex W f (Group)
17201 @findex gnus-score-flush-cache
17202 Gnus maintains a cache of score alists to avoid having to reload them
17203 all the time.  This command will flush the cache
17204 (@code{gnus-score-flush-cache}).
17205
17206 @end table
17207
17208 You can do scoring from the command line by saying something like:
17209
17210 @findex gnus-batch-score
17211 @cindex batch scoring
17212 @example
17213 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
17214 @end example
17215
17216
17217 @node Score Variables
17218 @section Score Variables
17219 @cindex score variables
17220
17221 @table @code
17222
17223 @item gnus-use-scoring
17224 @vindex gnus-use-scoring
17225 If @code{nil}, Gnus will not check for score files, and will not, in
17226 general, do any score-related work.  This is @code{t} by default.
17227
17228 @item gnus-kill-killed
17229 @vindex gnus-kill-killed
17230 If this variable is @code{nil}, Gnus will never apply score files to
17231 articles that have already been through the kill process.  While this
17232 may save you lots of time, it also means that if you apply a kill file
17233 to a group, and then change the kill file and want to run it over you
17234 group again to kill more articles, it won't work.  You have to set this
17235 variable to @code{t} to do that.  (It is @code{t} by default.)
17236
17237 @item gnus-kill-files-directory
17238 @vindex gnus-kill-files-directory
17239 All kill and score files will be stored in this directory, which is
17240 initialized from the @code{SAVEDIR} environment variable by default.
17241 This is @file{~/News/} by default.
17242
17243 @item gnus-score-file-suffix
17244 @vindex gnus-score-file-suffix
17245 Suffix to add to the group name to arrive at the score file name
17246 (@samp{SCORE} by default.)
17247
17248 @item gnus-score-uncacheable-files
17249 @vindex gnus-score-uncacheable-files
17250 @cindex score cache
17251 All score files are normally cached to avoid excessive re-loading of
17252 score files.  However, if this might make your Emacs grow big and
17253 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
17254 @file{all.SCORE}, while it might be a good idea to not cache
17255 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
17256 variable is @samp{ADAPT$} by default, so no adaptive score files will
17257 be cached.
17258
17259 @item gnus-save-score
17260 @vindex gnus-save-score
17261 If you have really complicated score files, and do lots of batch
17262 scoring, then you might set this variable to @code{t}.  This will make
17263 Gnus save the scores into the @file{.newsrc.eld} file.
17264
17265 If you do not set this to @code{t}, then manual scores (like those set
17266 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
17267 across group visits.
17268
17269 @item gnus-score-interactive-default-score
17270 @vindex gnus-score-interactive-default-score
17271 Score used by all the interactive raise/lower commands to raise/lower
17272 score with.  Default is 1000, which may seem excessive, but this is to
17273 ensure that the adaptive scoring scheme gets enough room to play with.
17274 We don't want the small changes from the adaptive scoring to overwrite
17275 manually entered data.
17276
17277 @item gnus-summary-default-score
17278 @vindex gnus-summary-default-score
17279 Default score of an article, which is 0 by default.
17280
17281 @item gnus-summary-expunge-below
17282 @vindex gnus-summary-expunge-below
17283 Don't display the summary lines of articles that have scores lower than
17284 this variable.  This is @code{nil} by default, which means that no
17285 articles will be hidden.  This variable is local to the summary buffers,
17286 and has to be set from @code{gnus-summary-mode-hook}.
17287
17288 @item gnus-score-over-mark
17289 @vindex gnus-score-over-mark
17290 Mark (in the third column) used for articles with a score over the
17291 default.  Default is @samp{+}.
17292
17293 @item gnus-score-below-mark
17294 @vindex gnus-score-below-mark
17295 Mark (in the third column) used for articles with a score below the
17296 default.  Default is @samp{-}.
17297
17298 @item gnus-score-find-score-files-function
17299 @vindex gnus-score-find-score-files-function
17300 Function used to find score files for the current group.  This function
17301 is called with the name of the group as the argument.
17302
17303 Predefined functions available are:
17304 @table @code
17305
17306 @item gnus-score-find-single
17307 @findex gnus-score-find-single
17308 Only apply the group's own score file.
17309
17310 @item gnus-score-find-bnews
17311 @findex gnus-score-find-bnews
17312 Apply all score files that match, using bnews syntax.  This is the
17313 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
17314 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
17315 @file{gnu.all.SCORE} would all apply.  In short, the instances of
17316 @samp{all} in the score file names are translated into @samp{.*}, and
17317 then a regexp match is done.
17318
17319 This means that if you have some score entries that you want to apply to
17320 all groups, then you put those entries in the @file{all.SCORE} file.
17321
17322 The score files are applied in a semi-random order, although Gnus will
17323 try to apply the more general score files before the more specific score
17324 files.  It does this by looking at the number of elements in the score
17325 file names---discarding the @samp{all} elements.
17326
17327 @item gnus-score-find-hierarchical
17328 @findex gnus-score-find-hierarchical
17329 Apply all score files from all the parent groups.  This means that you
17330 can't have score files like @file{all.SCORE}, but you can have
17331 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
17332 server.
17333
17334 @end table
17335 This variable can also be a list of functions.  In that case, all
17336 these functions will be called with the group name as argument, and
17337 all the returned lists of score files will be applied.  These
17338 functions can also return lists of lists of score alists directly.  In
17339 that case, the functions that return these non-file score alists
17340 should probably be placed before the ``real'' score file functions, to
17341 ensure that the last score file returned is the local score file.
17342 Phu.
17343
17344 For example, to do hierarchical scoring but use a non-server-specific
17345 overall score file, you could use the value
17346 @example
17347 (list (lambda (group) ("all.SCORE"))
17348       'gnus-score-find-hierarchical)
17349 @end example
17350
17351 @item gnus-score-expiry-days
17352 @vindex gnus-score-expiry-days
17353 This variable says how many days should pass before an unused score file
17354 entry is expired.  If this variable is @code{nil}, no score file entries
17355 are expired.  It's 7 by default.
17356
17357 @item gnus-update-score-entry-dates
17358 @vindex gnus-update-score-entry-dates
17359 If this variable is non-@code{nil}, temporary score entries that have
17360 been triggered (matched) will have their dates updated.  (This is how Gnus
17361 controls expiry---all non-matched-entries will become too old while
17362 matched entries will stay fresh and young.)  However, if you set this
17363 variable to @code{nil}, even matched entries will grow old and will
17364 have to face that oh-so grim reaper.
17365
17366 @item gnus-score-after-write-file-function
17367 @vindex gnus-score-after-write-file-function
17368 Function called with the name of the score file just written.
17369
17370 @item gnus-score-thread-simplify
17371 @vindex gnus-score-thread-simplify
17372 If this variable is non-@code{nil}, article subjects will be simplified
17373 for subject scoring purposes in the same manner as with
17374 threading---according to the current value of
17375 gnus-simplify-subject-functions.  If the scoring entry uses
17376 @code{substring} or @code{exact} matching, the match will also be
17377 simplified in this manner.
17378
17379 @end table
17380
17381
17382 @node Score File Format
17383 @section Score File Format
17384 @cindex score file format
17385
17386 A score file is an @code{emacs-lisp} file that normally contains just a
17387 single form.  Casual users are not expected to edit these files;
17388 everything can be changed from the summary buffer.
17389
17390 Anyway, if you'd like to dig into it yourself, here's an example:
17391
17392 @lisp
17393 (("from"
17394   ("Lars Ingebrigtsen" -10000)
17395   ("Per Abrahamsen")
17396   ("larsi\\|lmi" -50000 nil R))
17397  ("subject"
17398   ("Ding is Badd" nil 728373))
17399  ("xref"
17400   ("alt.politics" -1000 728372 s))
17401  ("lines"
17402   (2 -100 nil <))
17403  (mark 0)
17404  (expunge -1000)
17405  (mark-and-expunge -10)
17406  (read-only nil)
17407  (orphan -10)
17408  (adapt t)
17409  (files "/hom/larsi/News/gnu.SCORE")
17410  (exclude-files "all.SCORE")
17411  (local (gnus-newsgroup-auto-expire t)
17412         (gnus-summary-make-false-root empty))
17413  (eval (ding)))
17414 @end lisp
17415
17416 This example demonstrates most score file elements.  For a different
17417 approach, see @pxref{Advanced Scoring}.
17418
17419 Even though this looks much like lisp code, nothing here is actually
17420 @code{eval}ed.  The lisp reader is used to read this form, though, so it
17421 has to be valid syntactically, if not semantically.
17422
17423 Six keys are supported by this alist:
17424
17425 @table @code
17426
17427 @item STRING
17428 If the key is a string, it is the name of the header to perform the
17429 match on.  Scoring can only be performed on these eight headers:
17430 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
17431 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
17432 these headers, there are three strings to tell Gnus to fetch the entire
17433 article and do the match on larger parts of the article: @code{Body}
17434 will perform the match on the body of the article, @code{Head} will
17435 perform the match on the head of the article, and @code{All} will
17436 perform the match on the entire article.  Note that using any of these
17437 last three keys will slow down group entry @emph{considerably}.  The
17438 final ``header'' you can score on is @code{Followup}.  These score
17439 entries will result in new score entries being added for all follow-ups
17440 to articles that matches these score entries.
17441
17442 Following this key is a arbitrary number of score entries, where each
17443 score entry has one to four elements.
17444 @enumerate
17445
17446 @item
17447 The first element is the @dfn{match element}.  On most headers this will
17448 be a string, but on the Lines and Chars headers, this must be an
17449 integer.
17450
17451 @item
17452 If the second element is present, it should be a number---the @dfn{score
17453 element}.  This number should be an integer in the neginf to posinf
17454 interval.  This number is added to the score of the article if the match
17455 is successful.  If this element is not present, the
17456 @code{gnus-score-interactive-default-score} number will be used
17457 instead.  This is 1000 by default.
17458
17459 @item
17460 If the third element is present, it should be a number---the @dfn{date
17461 element}.  This date says when the last time this score entry matched,
17462 which provides a mechanism for expiring the score entries.  It this
17463 element is not present, the score entry is permanent.  The date is
17464 represented by the number of days since December 31, 1 BCE.
17465
17466 @item
17467 If the fourth element is present, it should be a symbol---the @dfn{type
17468 element}.  This element specifies what function should be used to see
17469 whether this score entry matches the article.  What match types that can
17470 be used depends on what header you wish to perform the match on.
17471 @table @dfn
17472
17473 @item From, Subject, References, Xref, Message-ID
17474 For most header types, there are the @code{r} and @code{R} (regexp), as
17475 well as @code{s} and @code{S} (substring) types, and @code{e} and
17476 @code{E} (exact match), and @code{w} (word match) types.  If this
17477 element is not present, Gnus will assume that substring matching should
17478 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
17479 that the matches will be done in a case-sensitive manner.  All these
17480 one-letter types are really just abbreviations for the @code{regexp},
17481 @code{string}, @code{exact}, and @code{word} types, which you can use
17482 instead, if you feel like.
17483
17484 @item Extra
17485 Just as for the standard string overview headers, if you are using
17486 gnus-extra-headers, you can score on these headers' values.  In this
17487 case, there is a 5th element in the score entry, being the name of the
17488 header to be scored.  The following entry is useful in your
17489 @file{all.SCORE} file in case of spam attacks from a single origin host,
17490 if your @sc{nntp} server tracks NNTP-Posting-Host in overviews:
17491
17492 @lisp
17493 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
17494 @end lisp
17495
17496 @item Lines, Chars
17497 These two headers use different match types: @code{<}, @code{>},
17498 @code{=}, @code{>=} and @code{<=}.
17499
17500 These predicates are true if
17501
17502 @example
17503 (PREDICATE HEADER MATCH)
17504 @end example
17505
17506 evaluates to non-@code{nil}.  For instance, the advanced match
17507 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
17508 following form:
17509
17510 @lisp
17511 (< header-value 4)
17512 @end lisp
17513
17514 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
17515 the match, we get the score added if the article has less than 4 lines.
17516 (It's easy to get confused and think it's the other way around.  But
17517 it's not.  I think.)
17518
17519 When matching on @code{Lines}, be careful because some back ends (like
17520 @code{nndir}) do not generate @code{Lines} header, so every article ends
17521 up being marked as having 0 lines.  This can lead to strange results if
17522 you happen to lower score of the articles with few lines.
17523
17524 @item Date
17525 For the Date header we have three kinda silly match types:
17526 @code{before}, @code{at} and @code{after}.  I can't really imagine this
17527 ever being useful, but, like, it would feel kinda silly not to provide
17528 this function.  Just in case.  You never know.  Better safe than sorry.
17529 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
17530 sex on a first date.  (I have been told that at least one person, and I
17531 quote, ``found this function indispensable'', however.)
17532
17533 @cindex ISO8601
17534 @cindex date
17535 A more useful match type is @code{regexp}.  With it, you can match the
17536 date string using a regular expression.  The date is normalized to
17537 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
17538 you want to match all articles that have been posted on April 1st in
17539 every year, you could use @samp{....0401.........} as a match string,
17540 for instance.  (Note that the date is kept in its original time zone, so
17541 this will match articles that were posted when it was April 1st where
17542 the article was posted from.  Time zones are such wholesome fun for the
17543 whole family, eh?)
17544
17545 @item Head, Body, All
17546 These three match keys use the same match types as the @code{From} (etc)
17547 header uses.
17548
17549 @item Followup
17550 This match key is somewhat special, in that it will match the
17551 @code{From} header, and affect the score of not only the matching
17552 articles, but also all followups to the matching articles.  This allows
17553 you e.g. increase the score of followups to your own articles, or
17554 decrease the score of followups to the articles of some known
17555 trouble-maker.  Uses the same match types as the @code{From} header
17556 uses.  (Using this match key will lead to creation of @file{ADAPT}
17557 files.)
17558
17559 @item Thread
17560 This match key works along the same lines as the @code{Followup} match
17561 key.  If you say that you want to score on a (sub-)thread started by an
17562 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
17563 match.  This will add a new @samp{thread} match for each article that
17564 has @var{x} in its @code{References} header.  (These new @samp{thread}
17565 matches will use the @code{Message-ID}s of these matching articles.)
17566 This will ensure that you can raise/lower the score of an entire thread,
17567 even though some articles in the thread may not have complete
17568 @code{References} headers.  Note that using this may lead to
17569 undeterministic scores of the articles in the thread.  (Using this match
17570 key will lead to creation of @file{ADAPT} files.)
17571 @end table
17572 @end enumerate
17573
17574 @cindex Score File Atoms
17575 @item mark
17576 The value of this entry should be a number.  Any articles with a score
17577 lower than this number will be marked as read.
17578
17579 @item expunge
17580 The value of this entry should be a number.  Any articles with a score
17581 lower than this number will be removed from the summary buffer.
17582
17583 @item mark-and-expunge
17584 The value of this entry should be a number.  Any articles with a score
17585 lower than this number will be marked as read and removed from the
17586 summary buffer.
17587
17588 @item thread-mark-and-expunge
17589 The value of this entry should be a number.  All articles that belong to
17590 a thread that has a total score below this number will be marked as read
17591 and removed from the summary buffer.  @code{gnus-thread-score-function}
17592 says how to compute the total score for a thread.
17593
17594 @item files
17595 The value of this entry should be any number of file names.  These files
17596 are assumed to be score files as well, and will be loaded the same way
17597 this one was.
17598
17599 @item exclude-files
17600 The clue of this entry should be any number of files.  These files will
17601 not be loaded, even though they would normally be so, for some reason or
17602 other.
17603
17604 @item eval
17605 The value of this entry will be @code{eval}el.  This element will be
17606 ignored when handling global score files.
17607
17608 @item read-only
17609 Read-only score files will not be updated or saved.  Global score files
17610 should feature this atom (@pxref{Global Score Files}).  (Note:
17611 @dfn{Global} here really means @dfn{global}; not your personal
17612 apply-to-all-groups score files.)
17613
17614 @item orphan
17615 The value of this entry should be a number.  Articles that do not have
17616 parents will get this number added to their scores.  Imagine you follow
17617 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
17618 will only follow a few of the threads, also want to see any new threads.
17619
17620 You can do this with the following two score file entries:
17621
17622 @example
17623         (orphan -500)
17624         (mark-and-expunge -100)
17625 @end example
17626
17627 When you enter the group the first time, you will only see the new
17628 threads.  You then raise the score of the threads that you find
17629 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
17630 rest.  Next time you enter the group, you will see new articles in the
17631 interesting threads, plus any new threads.
17632
17633 I.e.---the orphan score atom is for high-volume groups where a few
17634 interesting threads which can't be found automatically by ordinary
17635 scoring rules exist.
17636
17637 @item adapt
17638 This entry controls the adaptive scoring.  If it is @code{t}, the
17639 default adaptive scoring rules will be used.  If it is @code{ignore}, no
17640 adaptive scoring will be performed on this group.  If it is a list, this
17641 list will be used as the adaptive scoring rules.  If it isn't present,
17642 or is something other than @code{t} or @code{ignore}, the default
17643 adaptive scoring rules will be used.  If you want to use adaptive
17644 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
17645 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
17646 not want adaptive scoring.  If you only want adaptive scoring in a few
17647 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
17648 insert @code{(adapt t)} in the score files of the groups where you want
17649 it.
17650
17651 @item adapt-file
17652 All adaptive score entries will go to the file named by this entry.  It
17653 will also be applied when entering the group.  This atom might be handy
17654 if you want to adapt on several groups at once, using the same adaptive
17655 file for a number of groups.
17656
17657 @item local
17658 @cindex local variables
17659 The value of this entry should be a list of @code{(VAR VALUE)} pairs.
17660 Each @var{var} will be made buffer-local to the current summary buffer,
17661 and set to the value specified.  This is a convenient, if somewhat
17662 strange, way of setting variables in some groups if you don't like hooks
17663 much.  Note that the @var{value} won't be evaluated.
17664 @end table
17665
17666
17667 @node Score File Editing
17668 @section Score File Editing
17669
17670 You normally enter all scoring commands from the summary buffer, but you
17671 might feel the urge to edit them by hand as well, so we've supplied you
17672 with a mode for that.
17673
17674 It's simply a slightly customized @code{emacs-lisp} mode, with these
17675 additional commands:
17676
17677 @table @kbd
17678
17679 @item C-c C-c
17680 @kindex C-c C-c (Score)
17681 @findex gnus-score-edit-done
17682 Save the changes you have made and return to the summary buffer
17683 (@code{gnus-score-edit-done}).
17684
17685 @item C-c C-d
17686 @kindex C-c C-d (Score)
17687 @findex gnus-score-edit-insert-date
17688 Insert the current date in numerical format
17689 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
17690 you were wondering.
17691
17692 @item C-c C-p
17693 @kindex C-c C-p (Score)
17694 @findex gnus-score-pretty-print
17695 The adaptive score files are saved in an unformatted fashion.  If you
17696 intend to read one of these files, you want to @dfn{pretty print} it
17697 first.  This command (@code{gnus-score-pretty-print}) does that for
17698 you.
17699
17700 @end table
17701
17702 Type @kbd{M-x gnus-score-mode} to use this mode.
17703
17704 @vindex gnus-score-mode-hook
17705 @code{gnus-score-menu-hook} is run in score mode buffers.
17706
17707 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
17708 e} to begin editing score files.
17709
17710
17711 @node Adaptive Scoring
17712 @section Adaptive Scoring
17713 @cindex adaptive scoring
17714
17715 If all this scoring is getting you down, Gnus has a way of making it all
17716 happen automatically---as if by magic.  Or rather, as if by artificial
17717 stupidity, to be precise.
17718
17719 @vindex gnus-use-adaptive-scoring
17720 When you read an article, or mark an article as read, or kill an
17721 article, you leave marks behind.  On exit from the group, Gnus can sniff
17722 these marks and add score elements depending on what marks it finds.
17723 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
17724 @code{t} or @code{(line)}.  If you want score adaptively on separate
17725 words appearing in the subjects, you should set this variable to
17726 @code{(word)}.  If you want to use both adaptive methods, set this
17727 variable to @code{(word line)}.
17728
17729 @vindex gnus-default-adaptive-score-alist
17730 To give you complete control over the scoring process, you can customize
17731 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
17732 might look something like this:
17733
17734 @lisp
17735 (setq gnus-default-adaptive-score-alist
17736   '((gnus-unread-mark)
17737     (gnus-ticked-mark (from 4))
17738     (gnus-dormant-mark (from 5))
17739     (gnus-del-mark (from -4) (subject -1))
17740     (gnus-read-mark (from 4) (subject 2))
17741     (gnus-expirable-mark (from -1) (subject -1))
17742     (gnus-killed-mark (from -1) (subject -3))
17743     (gnus-kill-file-mark)
17744     (gnus-ancient-mark)
17745     (gnus-low-score-mark)
17746     (gnus-catchup-mark (from -1) (subject -1))))
17747 @end lisp
17748
17749 As you see, each element in this alist has a mark as a key (either a
17750 variable name or a ``real'' mark---a character).  Following this key is
17751 a arbitrary number of header/score pairs.  If there are no header/score
17752 pairs following the key, no adaptive scoring will be done on articles
17753 that have that key as the article mark.  For instance, articles with
17754 @code{gnus-unread-mark} in the example above will not get adaptive score
17755 entries.
17756
17757 Each article can have only one mark, so just a single of these rules
17758 will be applied to each article.
17759
17760 To take @code{gnus-del-mark} as an example---this alist says that all
17761 articles that have that mark (i.e., are marked with @samp{D}) will have a
17762 score entry added to lower based on the @code{From} header by -4, and
17763 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
17764
17765 If you have marked 10 articles with the same subject with
17766 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
17767 That means that that subject will get a score of ten times -1, which
17768 should be, unless I'm much mistaken, -10.
17769
17770 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
17771 the read articles will be marked with the @samp{E} mark.  This'll
17772 probably make adaptive scoring slightly impossible, so auto-expiring and
17773 adaptive scoring doesn't really mix very well.
17774
17775 The headers you can score on are @code{from}, @code{subject},
17776 @code{message-id}, @code{references}, @code{xref}, @code{lines},
17777 @code{chars} and @code{date}.  In addition, you can score on
17778 @code{followup}, which will create an adaptive score entry that matches
17779 on the @code{References} header using the @code{Message-ID} of the
17780 current article, thereby matching the following thread.
17781
17782 You can also score on @code{thread}, which will try to score all
17783 articles that appear in a thread.  @code{thread} matches uses a
17784 @code{Message-ID} to match on the @code{References} header of the
17785 article.  If the match is made, the @code{Message-ID} of the article is
17786 added to the @code{thread} rule.  (Think about it.  I'd recommend two
17787 aspirins afterwards.)
17788
17789 If you use this scheme, you should set the score file atom @code{mark}
17790 to something small---like -300, perhaps, to avoid having small random
17791 changes result in articles getting marked as read.
17792
17793 After using adaptive scoring for a week or so, Gnus should start to
17794 become properly trained and enhance the authors you like best, and kill
17795 the authors you like least, without you having to say so explicitly.
17796
17797 You can control what groups the adaptive scoring is to be performed on
17798 by using the score files (@pxref{Score File Format}).  This will also
17799 let you use different rules in different groups.
17800
17801 @vindex gnus-adaptive-file-suffix
17802 The adaptive score entries will be put into a file where the name is the
17803 group name with @code{gnus-adaptive-file-suffix} appended.  The default
17804 is @samp{ADAPT}.
17805
17806 @vindex gnus-score-exact-adapt-limit
17807 When doing adaptive scoring, substring or fuzzy matching would probably
17808 give you the best results in most cases.  However, if the header one
17809 matches is short, the possibility for false positives is great, so if
17810 the length of the match is less than
17811 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
17812 this variable is @code{nil}, exact matching will always be used to avoid
17813 this problem.
17814
17815 @vindex gnus-default-adaptive-word-score-alist
17816 As mentioned above, you can adapt either on individual words or entire
17817 headers.  If you adapt on words, the
17818 @code{gnus-default-adaptive-word-score-alist} variable says what score
17819 each instance of a word should add given a mark.
17820
17821 @lisp
17822 (setq gnus-default-adaptive-word-score-alist
17823       `((,gnus-read-mark . 30)
17824         (,gnus-catchup-mark . -10)
17825         (,gnus-killed-mark . -20)
17826         (,gnus-del-mark . -15)))
17827 @end lisp
17828
17829 This is the default value.  If you have adaption on words enabled, every
17830 word that appears in subjects of articles marked with
17831 @code{gnus-read-mark} will result in a score rule that increase the
17832 score with 30 points.
17833
17834 @vindex gnus-default-ignored-adaptive-words
17835 @vindex gnus-ignored-adaptive-words
17836 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
17837 will be ignored.  If you wish to add more words to be ignored, use the
17838 @code{gnus-ignored-adaptive-words} list instead.
17839
17840 @vindex gnus-adaptive-word-length-limit
17841 Some may feel that short words shouldn't count when doing adaptive
17842 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
17843 an integer.  Words shorter than this number will be ignored.  This
17844 variable defaults til @code{nil}.
17845
17846 @vindex gnus-adaptive-word-syntax-table
17847 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
17848 syntax table in effect.  It is similar to the standard syntax table, but
17849 it considers numbers to be non-word-constituent characters.
17850
17851 @vindex gnus-adaptive-word-minimum
17852 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
17853 word scoring process will never bring down the score of an article to
17854 below this number.  The default is @code{nil}.
17855
17856 @vindex gnus-adaptive-word-no-group-words
17857 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
17858 won't adaptively word score any of the words in the group name.  Useful
17859 for groups like @samp{comp.editors.emacs}, where most of the subject
17860 lines contain the word @samp{emacs}.
17861
17862 After using this scheme for a while, it might be nice to write a
17863 @code{gnus-psychoanalyze-user} command to go through the rules and see
17864 what words you like and what words you don't like.  Or perhaps not.
17865
17866 Note that the adaptive word scoring thing is highly experimental and is
17867 likely to change in the future.  Initial impressions seem to indicate
17868 that it's totally useless as it stands.  Some more work (involving more
17869 rigorous statistical methods) will have to be done to make this useful.
17870
17871
17872 @node Home Score File
17873 @section Home Score File
17874
17875 The score file where new score file entries will go is called the
17876 @dfn{home score file}.  This is normally (and by default) the score file
17877 for the group itself.  For instance, the home score file for
17878 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
17879
17880 However, this may not be what you want.  It is often convenient to share
17881 a common home score file among many groups---all @samp{emacs} groups
17882 could perhaps use the same home score file.
17883
17884 @vindex gnus-home-score-file
17885 The variable that controls this is @code{gnus-home-score-file}.  It can
17886 be:
17887
17888 @enumerate
17889 @item
17890 A string.  Then this file will be used as the home score file for all
17891 groups.
17892
17893 @item
17894 A function.  The result of this function will be used as the home score
17895 file.  The function will be called with the name of the group as the
17896 parameter.
17897
17898 @item
17899 A list.  The elements in this list can be:
17900
17901 @enumerate
17902 @item
17903 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
17904 group name, the @var{file-name} will be used as the home score file.
17905
17906 @item
17907 A function.  If the function returns non-nil, the result will be used as
17908 the home score file.
17909
17910 @item
17911 A string.  Use the string as the home score file.
17912 @end enumerate
17913
17914 The list will be traversed from the beginning towards the end looking
17915 for matches.
17916
17917 @end enumerate
17918
17919 So, if you want to use just a single score file, you could say:
17920
17921 @lisp
17922 (setq gnus-home-score-file
17923       "my-total-score-file.SCORE")
17924 @end lisp
17925
17926 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
17927 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
17928
17929 @findex gnus-hierarchial-home-score-file
17930 @lisp
17931 (setq gnus-home-score-file
17932       'gnus-hierarchial-home-score-file)
17933 @end lisp
17934
17935 This is a ready-made function provided for your convenience.
17936 Other functions include
17937
17938 @table @code
17939 @item gnus-current-home-score-file
17940 @findex gnus-current-home-score-file
17941 Return the ``current'' regular score file.  This will make scoring
17942 commands add entry to the ``innermost'' matching score file.
17943
17944 @end table
17945
17946 If you want to have one score file for the @samp{emacs} groups and
17947 another for the @samp{comp} groups, while letting all other groups use
17948 their own home score files:
17949
17950 @lisp
17951 (setq gnus-home-score-file
17952       ;; All groups that match the regexp "\\.emacs"
17953       '(("\\.emacs" "emacs.SCORE")
17954         ;; All the comp groups in one score file
17955         ("^comp" "comp.SCORE")))
17956 @end lisp
17957
17958 @vindex gnus-home-adapt-file
17959 @code{gnus-home-adapt-file} works exactly the same way as
17960 @code{gnus-home-score-file}, but says what the home adaptive score file
17961 is instead.  All new adaptive file entries will go into the file
17962 specified by this variable, and the same syntax is allowed.
17963
17964 In addition to using @code{gnus-home-score-file} and
17965 @code{gnus-home-adapt-file}, you can also use group parameters
17966 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
17967 Parameters}) to achieve much the same.  Group and topic parameters take
17968 precedence over this variable.
17969
17970
17971 @node Followups To Yourself
17972 @section Followups To Yourself
17973
17974 Gnus offers two commands for picking out the @code{Message-ID} header in
17975 the current buffer.  Gnus will then add a score rule that scores using
17976 this @code{Message-ID} on the @code{References} header of other
17977 articles.  This will, in effect, increase the score of all articles that
17978 respond to the article in the current buffer.  Quite useful if you want
17979 to easily note when people answer what you've said.
17980
17981 @table @code
17982
17983 @item gnus-score-followup-article
17984 @findex gnus-score-followup-article
17985 This will add a score to articles that directly follow up your own
17986 article.
17987
17988 @item gnus-score-followup-thread
17989 @findex gnus-score-followup-thread
17990 This will add a score to all articles that appear in a thread ``below''
17991 your own article.
17992 @end table
17993
17994 @vindex message-sent-hook
17995 These two functions are both primarily meant to be used in hooks like
17996 @code{message-sent-hook}, like this:
17997 @lisp
17998 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
17999 @end lisp
18000
18001
18002 If you look closely at your own @code{Message-ID}, you'll notice that
18003 the first two or three characters are always the same.  Here's two of
18004 mine:
18005
18006 @example
18007 <x6u3u47icf.fsf@@eyesore.no>
18008 <x6sp9o7ibw.fsf@@eyesore.no>
18009 @end example
18010
18011 So ``my'' ident on this machine is @samp{x6}.  This can be
18012 exploited---the following rule will raise the score on all followups to
18013 myself:
18014
18015 @lisp
18016 ("references"
18017  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
18018   1000 nil r))
18019 @end lisp
18020
18021 Whether it's the first two or first three characters that are ``yours''
18022 is system-dependent.
18023
18024
18025 @node Scoring On Other Headers
18026 @section Scoring On Other Headers
18027 @cindex scoring on other headers
18028
18029 Gnus is quite fast when scoring the ``traditional''
18030 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
18031 other headers requires writing a @code{head} scoring rule, which means
18032 that Gnus has to request every single article from the back end to find
18033 matches.  This takes a long time in big groups.
18034
18035 Now, there's not much you can do about this for news groups, but for
18036 mail groups, you have greater control.  In the @pxref{To From
18037 Newsgroups} section of the manual, it's explained in greater detail what
18038 this mechanism does, but here's a cookbook example for @code{nnml} on
18039 how to allow scoring on the @samp{To} and @samp{Cc} headers.
18040
18041 Put the following in your @file{.gnus.el} file.
18042
18043 @lisp
18044 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
18045       nnmail-extra-headers gnus-extra-headers)
18046 @end lisp
18047
18048 Restart Gnus and rebuild your @code{nnml} overview files with the
18049 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
18050 time if you have much mail.
18051
18052 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
18053 so: @kbd{I e s p To RET <your name> RET}.
18054
18055 See?  Simple.
18056
18057
18058 @node Scoring Tips
18059 @section Scoring Tips
18060 @cindex scoring tips
18061
18062 @table @dfn
18063
18064 @item Crossposts
18065 @cindex crossposts
18066 @cindex scoring crossposts
18067 If you want to lower the score of crossposts, the line to match on is
18068 the @code{Xref} header.
18069 @lisp
18070 ("xref" (" talk.politics.misc:" -1000))
18071 @end lisp
18072
18073 @item Multiple crossposts
18074 If you want to lower the score of articles that have been crossposted to
18075 more than, say, 3 groups:
18076 @lisp
18077 ("xref"
18078   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
18079    -1000 nil r))
18080 @end lisp
18081
18082 @item Matching on the body
18083 This is generally not a very good idea---it takes a very long time.
18084 Gnus actually has to fetch each individual article from the server.  But
18085 you might want to anyway, I guess.  Even though there are three match
18086 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
18087 and stick with it in each score file.  If you use any two, each article
18088 will be fetched @emph{twice}.  If you want to match a bit on the
18089 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
18090 the matches.
18091
18092 @item Marking as read
18093 You will probably want to mark articles that have scores below a certain
18094 number as read.  This is most easily achieved by putting the following
18095 in your @file{all.SCORE} file:
18096 @lisp
18097 ((mark -100))
18098 @end lisp
18099 You may also consider doing something similar with @code{expunge}.
18100
18101 @item Negated character classes
18102 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
18103 That will match newlines, which might lead to, well, The Unknown.  Say
18104 @code{[^abcd\n]*} instead.
18105 @end table
18106
18107
18108 @node Reverse Scoring
18109 @section Reverse Scoring
18110 @cindex reverse scoring
18111
18112 If you want to keep just articles that have @samp{Sex with Emacs} in the
18113 subject header, and expunge all other articles, you could put something
18114 like this in your score file:
18115
18116 @lisp
18117 (("subject"
18118   ("Sex with Emacs" 2))
18119  (mark 1)
18120  (expunge 1))
18121 @end lisp
18122
18123 So, you raise all articles that match @samp{Sex with Emacs} and mark the
18124 rest as read, and expunge them to boot.
18125
18126
18127 @node Global Score Files
18128 @section Global Score Files
18129 @cindex global score files
18130
18131 Sure, other newsreaders have ``global kill files''.  These are usually
18132 nothing more than a single kill file that applies to all groups, stored
18133 in the user's home directory.  Bah!  Puny, weak newsreaders!
18134
18135 What I'm talking about here are Global Score Files.  Score files from
18136 all over the world, from users everywhere, uniting all nations in one
18137 big, happy score file union!  Ange-score!  New and untested!
18138
18139 @vindex gnus-global-score-files
18140 All you have to do to use other people's score files is to set the
18141 @code{gnus-global-score-files} variable.  One entry for each score file,
18142 or each score file directory.  Gnus will decide by itself what score
18143 files are applicable to which group.
18144
18145 To use the score file
18146 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
18147 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
18148 say this:
18149
18150 @lisp
18151 (setq gnus-global-score-files
18152       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
18153         "/ftp@@ftp.some-where:/pub/score/"))
18154 @end lisp
18155
18156 @findex gnus-score-search-global-directories
18157 @noindent
18158 Simple, eh?  Directory names must end with a @samp{/}.  These
18159 directories are typically scanned only once during each Gnus session.
18160 If you feel the need to manually re-scan the remote directories, you can
18161 use the @code{gnus-score-search-global-directories} command.
18162
18163 Note that, at present, using this option will slow down group entry
18164 somewhat.  (That is---a lot.)
18165
18166 If you want to start maintaining score files for other people to use,
18167 just put your score file up for anonymous ftp and announce it to the
18168 world.  Become a retro-moderator!  Participate in the retro-moderator
18169 wars sure to ensue, where retro-moderators battle it out for the
18170 sympathy of the people, luring them to use their score files on false
18171 premises!  Yay!  The net is saved!
18172
18173 Here are some tips for the would-be retro-moderator, off the top of my
18174 head:
18175
18176 @itemize @bullet
18177
18178 @item
18179 Articles heavily crossposted are probably junk.
18180 @item
18181 To lower a single inappropriate article, lower by @code{Message-ID}.
18182 @item
18183 Particularly brilliant authors can be raised on a permanent basis.
18184 @item
18185 Authors that repeatedly post off-charter for the group can safely be
18186 lowered out of existence.
18187 @item
18188 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
18189 articles completely.
18190
18191 @item
18192 Use expiring score entries to keep the size of the file down.  You
18193 should probably have a long expiry period, though, as some sites keep
18194 old articles for a long time.
18195 @end itemize
18196
18197 ... I wonder whether other newsreaders will support global score files
18198 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
18199 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
18200 holding our breath yet?
18201
18202
18203 @node Kill Files
18204 @section Kill Files
18205 @cindex kill files
18206
18207 Gnus still supports those pesky old kill files.  In fact, the kill file
18208 entries can now be expiring, which is something I wrote before Daniel
18209 Quinlan thought of doing score files, so I've left the code in there.
18210
18211 In short, kill processing is a lot slower (and I do mean @emph{a lot})
18212 than score processing, so it might be a good idea to rewrite your kill
18213 files into score files.
18214
18215 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
18216 forms into this file, which means that you can use kill files as some
18217 sort of primitive hook function to be run on group entry, even though
18218 that isn't a very good idea.
18219
18220 Normal kill files look like this:
18221
18222 @lisp
18223 (gnus-kill "From" "Lars Ingebrigtsen")
18224 (gnus-kill "Subject" "ding")
18225 (gnus-expunge "X")
18226 @end lisp
18227
18228 This will mark every article written by me as read, and remove the
18229 marked articles from the summary buffer.  Very useful, you'll agree.
18230
18231 Other programs use a totally different kill file syntax.  If Gnus
18232 encounters what looks like a @code{rn} kill file, it will take a stab at
18233 interpreting it.
18234
18235 Two summary functions for editing a GNUS kill file:
18236
18237 @table @kbd
18238
18239 @item M-k
18240 @kindex M-k (Summary)
18241 @findex gnus-summary-edit-local-kill
18242 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
18243
18244 @item M-K
18245 @kindex M-K (Summary)
18246 @findex gnus-summary-edit-global-kill
18247 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
18248 @end table
18249
18250 Two group mode functions for editing the kill files:
18251
18252 @table @kbd
18253
18254 @item M-k
18255 @kindex M-k (Group)
18256 @findex gnus-group-edit-local-kill
18257 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
18258
18259 @item M-K
18260 @kindex M-K (Group)
18261 @findex gnus-group-edit-global-kill
18262 Edit the general kill file (@code{gnus-group-edit-global-kill}).
18263 @end table
18264
18265 Kill file variables:
18266
18267 @table @code
18268 @item gnus-kill-file-name
18269 @vindex gnus-kill-file-name
18270 A kill file for the group @samp{soc.motss} is normally called
18271 @file{soc.motss.KILL}.  The suffix appended to the group name to get
18272 this file name is detailed by the @code{gnus-kill-file-name} variable.
18273 The ``global'' kill file (not in the score file sense of ``global'', of
18274 course) is just called @file{KILL}.
18275
18276 @vindex gnus-kill-save-kill-file
18277 @item gnus-kill-save-kill-file
18278 If this variable is non-@code{nil}, Gnus will save the
18279 kill file after processing, which is necessary if you use expiring
18280 kills.
18281
18282 @item gnus-apply-kill-hook
18283 @vindex gnus-apply-kill-hook
18284 @findex gnus-apply-kill-file-unless-scored
18285 @findex gnus-apply-kill-file
18286 A hook called to apply kill files to a group.  It is
18287 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
18288 kill file if you have a score file for the same group, you can set this
18289 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
18290 kill files to be processed, you should set this variable to @code{nil}.
18291
18292 @item gnus-kill-file-mode-hook
18293 @vindex gnus-kill-file-mode-hook
18294 A hook called in kill-file mode buffers.
18295
18296 @end table
18297
18298
18299 @node Converting Kill Files
18300 @section Converting Kill Files
18301 @cindex kill files
18302 @cindex converting kill files
18303
18304 If you have loads of old kill files, you may want to convert them into
18305 score files.  If they are ``regular'', you can use
18306 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
18307 by hand.
18308
18309 The kill to score conversion package isn't included in Gnus by default.
18310 You can fetch it from
18311 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
18312
18313 If your old kill files are very complex---if they contain more
18314 non-@code{gnus-kill} forms than not, you'll have to convert them by
18315 hand.  Or just let them be as they are.  Gnus will still use them as
18316 before.
18317
18318
18319 @node GroupLens
18320 @section GroupLens
18321 @cindex GroupLens
18322
18323 GroupLens (@uref{http://www.cs.umn.edu/Research/GroupLens/}) is a
18324 collaborative filtering system that helps you work together with other
18325 people to find the quality news articles out of the huge volume of
18326 news articles generated every day.
18327
18328 To accomplish this the GroupLens system combines your opinions about
18329 articles you have already read with the opinions of others who have done
18330 likewise and gives you a personalized prediction for each unread news
18331 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
18332 rate articles, and finds other people that rate articles the same way.
18333 Once it has found some people you agree with it tells you, in the form
18334 of a prediction, what they thought of the article.  You can use this
18335 prediction to help you decide whether or not you want to read the
18336 article.
18337
18338 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
18339 so this section is mostly of historical interest.
18340
18341 @menu
18342 * Using GroupLens::             How to make Gnus use GroupLens.
18343 * Rating Articles::             Letting GroupLens know how you rate articles.
18344 * Displaying Predictions::      Displaying predictions given by GroupLens.
18345 * GroupLens Variables::         Customizing GroupLens.
18346 @end menu
18347
18348
18349 @node Using GroupLens
18350 @subsection Using GroupLens
18351
18352 To use GroupLens you must register a pseudonym with your local Better
18353 Bit Bureau (BBB).
18354 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html} is the only
18355 better bit in town at the moment.
18356
18357 Once you have registered you'll need to set a couple of variables.
18358
18359 @table @code
18360
18361 @item gnus-use-grouplens
18362 @vindex gnus-use-grouplens
18363 Setting this variable to a non-@code{nil} value will make Gnus hook into
18364 all the relevant GroupLens functions.
18365
18366 @item grouplens-pseudonym
18367 @vindex grouplens-pseudonym
18368 This variable should be set to the pseudonym you got when registering
18369 with the Better Bit Bureau.
18370
18371 @item grouplens-newsgroups
18372 @vindex grouplens-newsgroups
18373 A list of groups that you want to get GroupLens predictions for.
18374
18375 @end table
18376
18377 That's the minimum of what you need to get up and running with GroupLens.
18378 Once you've registered, GroupLens will start giving you scores for
18379 articles based on the average of what other people think.  But, to get
18380 the real benefit of GroupLens you need to start rating articles
18381 yourself.  Then the scores GroupLens gives you will be personalized for
18382 you, based on how the people you usually agree with have already rated.
18383
18384
18385 @node Rating Articles
18386 @subsection Rating Articles
18387
18388 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
18389 Where 1 means something like this article is a waste of bandwidth and 5
18390 means that the article was really good.  The basic question to ask
18391 yourself is, "on a scale from 1 to 5 would I like to see more articles
18392 like this one?"
18393
18394 There are four ways to enter a rating for an article in GroupLens.
18395
18396 @table @kbd
18397
18398 @item r
18399 @kindex r (GroupLens)
18400 @findex bbb-summary-rate-article
18401 This function will prompt you for a rating on a scale of one to five.
18402
18403 @item k
18404 @kindex k (GroupLens)
18405 @findex grouplens-score-thread
18406 This function will prompt you for a rating, and rate all the articles in
18407 the thread.  This is really useful for some of those long running giant
18408 threads in rec.humor.
18409
18410 @end table
18411
18412 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
18413 the score of the article you're reading.
18414
18415 @table @kbd
18416
18417 @item 1-5 n
18418 @kindex n (GroupLens)
18419 @findex grouplens-next-unread-article
18420 Rate the article and go to the next unread article.
18421
18422 @item 1-5 ,
18423 @kindex , (GroupLens)
18424 @findex grouplens-best-unread-article
18425 Rate the article and go to the next unread article with the highest score.
18426
18427 @end table
18428
18429 If you want to give the current article a score of 4 and then go to the
18430 next article, just type @kbd{4 n}.
18431
18432
18433 @node Displaying Predictions
18434 @subsection Displaying Predictions
18435
18436 GroupLens makes a prediction for you about how much you will like a
18437 news article.  The predictions from GroupLens are on a scale from 1 to
18438 5, where 1 is the worst and 5 is the best.  You can use the predictions
18439 from GroupLens in one of three ways controlled by the variable
18440 @code{gnus-grouplens-override-scoring}.
18441
18442 @vindex gnus-grouplens-override-scoring
18443 There are three ways to display predictions in grouplens.  You may
18444 choose to have the GroupLens scores contribute to, or override the
18445 regular gnus scoring mechanism.  override is the default; however, some
18446 people prefer to see the Gnus scores plus the grouplens scores.  To get
18447 the separate scoring behavior you need to set
18448 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
18449 GroupLens predictions combined with the grouplens scores set it to
18450 @code{'override} and to combine the scores set
18451 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
18452 the combine option you will also want to set the values for
18453 @code{grouplens-prediction-offset} and
18454 @code{grouplens-score-scale-factor}.
18455
18456 @vindex grouplens-prediction-display
18457 In either case, GroupLens gives you a few choices for how you would like
18458 to see your predictions displayed.  The display of predictions is
18459 controlled by the @code{grouplens-prediction-display} variable.
18460
18461 The following are valid values for that variable.
18462
18463 @table @code
18464 @item prediction-spot
18465 The higher the prediction, the further to the right an @samp{*} is
18466 displayed.
18467
18468 @item confidence-interval
18469 A numeric confidence interval.
18470
18471 @item prediction-bar
18472 The higher the prediction, the longer the bar.
18473
18474 @item confidence-bar
18475 Numerical confidence.
18476
18477 @item confidence-spot
18478 The spot gets bigger with more confidence.
18479
18480 @item prediction-num
18481 Plain-old numeric value.
18482
18483 @item confidence-plus-minus
18484 Prediction +/- confidence.
18485
18486 @end table
18487
18488
18489 @node GroupLens Variables
18490 @subsection GroupLens Variables
18491
18492 @table @code
18493
18494 @item gnus-summary-grouplens-line-format
18495 The summary line format used in GroupLens-enhanced summary buffers.  It
18496 accepts the same specs as the normal summary line format (@pxref{Summary
18497 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
18498 %s\n}.
18499
18500 @item grouplens-bbb-host
18501 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
18502 default.
18503
18504 @item grouplens-bbb-port
18505 Port of the host running the bbbd server.  The default is 9000.
18506
18507 @item grouplens-score-offset
18508 Offset the prediction by this value.  In other words, subtract the
18509 prediction value by this number to arrive at the effective score.  The
18510 default is 0.
18511
18512 @item grouplens-score-scale-factor
18513 This variable allows the user to magnify the effect of GroupLens scores.
18514 The scale factor is applied after the offset.  The default is 1.
18515
18516 @end table
18517
18518
18519 @node Advanced Scoring
18520 @section Advanced Scoring
18521
18522 Scoring on Subjects and From headers is nice enough, but what if you're
18523 really interested in what a person has to say only when she's talking
18524 about a particular subject?  Or what if you really don't want to
18525 read what person A has to say when she's following up to person B, but
18526 want to read what she says when she's following up to person C?
18527
18528 By using advanced scoring rules you may create arbitrarily complex
18529 scoring patterns.
18530
18531 @menu
18532 * Advanced Scoring Syntax::     A definition.
18533 * Advanced Scoring Examples::   What they look like.
18534 * Advanced Scoring Tips::       Getting the most out of it.
18535 @end menu
18536
18537
18538 @node Advanced Scoring Syntax
18539 @subsection Advanced Scoring Syntax
18540
18541 Ordinary scoring rules have a string as the first element in the rule.
18542 Advanced scoring rules have a list as the first element.  The second
18543 element is the score to be applied if the first element evaluated to a
18544 non-@code{nil} value.
18545
18546 These lists may consist of three logical operators, one redirection
18547 operator, and various match operators.
18548
18549 Logical operators:
18550
18551 @table @code
18552 @item &
18553 @itemx and
18554 This logical operator will evaluate each of its arguments until it finds
18555 one that evaluates to @code{false}, and then it'll stop.  If all arguments
18556 evaluate to @code{true} values, then this operator will return
18557 @code{true}.
18558
18559 @item |
18560 @itemx or
18561 This logical operator will evaluate each of its arguments until it finds
18562 one that evaluates to @code{true}.  If no arguments are @code{true},
18563 then this operator will return @code{false}.
18564
18565 @item !
18566 @itemx not
18567 @itemx Â¬
18568 This logical operator only takes a single argument.  It returns the
18569 logical negation of the value of its argument.
18570
18571 @end table
18572
18573 There is an @dfn{indirection operator} that will make its arguments
18574 apply to the ancestors of the current article being scored.  For
18575 instance, @code{1-} will make score rules apply to the parent of the
18576 current article.  @code{2-} will make score rules apply to the
18577 grandparent of the current article.  Alternatively, you can write
18578 @code{^^}, where the number of @code{^}s (carets) says how far back into
18579 the ancestry you want to go.
18580
18581 Finally, we have the match operators.  These are the ones that do the
18582 real work.  Match operators are header name strings followed by a match
18583 and a match type.  A typical match operator looks like @samp{("from"
18584 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
18585 simple scoring, and the match types are also the same.
18586
18587
18588 @node Advanced Scoring Examples
18589 @subsection Advanced Scoring Examples
18590
18591 Please note that the following examples are score file rules.  To
18592 make a complete score file from them, surround them with another pair
18593 of parentheses.
18594
18595 Let's say you want to increase the score of articles written by Lars
18596 when he's talking about Gnus:
18597
18598 @example
18599 ((&
18600   ("from" "Lars Ingebrigtsen")
18601   ("subject" "Gnus"))
18602  1000)
18603 @end example
18604
18605 Quite simple, huh?
18606
18607 When he writes long articles, he sometimes has something nice to say:
18608
18609 @example
18610 ((&
18611   ("from" "Lars Ingebrigtsen")
18612   (|
18613    ("subject" "Gnus")
18614    ("lines" 100 >)))
18615  1000)
18616 @end example
18617
18618 However, when he responds to things written by Reig Eigil Logge, you
18619 really don't want to read what he's written:
18620
18621 @example
18622 ((&
18623   ("from" "Lars Ingebrigtsen")
18624   (1- ("from" "Reig Eigir Logge")))
18625  -100000)
18626 @end example
18627
18628 Everybody that follows up Redmondo when he writes about disappearing
18629 socks should have their scores raised, but only when they talk about
18630 white socks.  However, when Lars talks about socks, it's usually not
18631 very interesting:
18632
18633 @example
18634 ((&
18635   (1-
18636    (&
18637     ("from" "redmondo@@.*no" r)
18638     ("body" "disappearing.*socks" t)))
18639   (! ("from" "Lars Ingebrigtsen"))
18640   ("body" "white.*socks"))
18641  1000)
18642 @end example
18643
18644 The possibilities are endless.
18645
18646
18647 @node Advanced Scoring Tips
18648 @subsection Advanced Scoring Tips
18649
18650 The @code{&} and @code{|} logical operators do short-circuit logic.
18651 That is, they stop processing their arguments when it's clear what the
18652 result of the operation will be.  For instance, if one of the arguments
18653 of an @code{&} evaluates to @code{false}, there's no point in evaluating
18654 the rest of the arguments.  This means that you should put slow matches
18655 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
18656 @samp{subject}) first.
18657
18658 The indirection arguments (@code{1-} and so on) will make their
18659 arguments work on previous generations of the thread.  If you say
18660 something like:
18661
18662 @example
18663 ...
18664 (1-
18665  (1-
18666   ("from" "lars")))
18667 ...
18668 @end example
18669
18670 Then that means "score on the from header of the grandparent of the
18671 current article".  An indirection is quite fast, but it's better to say:
18672
18673 @example
18674 (1-
18675  (&
18676   ("from" "Lars")
18677   ("subject" "Gnus")))
18678 @end example
18679
18680 than it is to say:
18681
18682 @example
18683 (&
18684  (1- ("from" "Lars"))
18685  (1- ("subject" "Gnus")))
18686 @end example
18687
18688
18689 @node Score Decays
18690 @section Score Decays
18691 @cindex score decays
18692 @cindex decays
18693
18694 You may find that your scores have a tendency to grow without
18695 bounds, especially if you're using adaptive scoring.  If scores get too
18696 big, they lose all meaning---they simply max out and it's difficult to
18697 use them in any sensible way.
18698
18699 @vindex gnus-decay-scores
18700 @findex gnus-decay-score
18701 @vindex gnus-decay-score-function
18702 Gnus provides a mechanism for decaying scores to help with this problem.
18703 When score files are loaded and @code{gnus-decay-scores} is
18704 non-@code{nil}, Gnus will run the score files through the decaying
18705 mechanism thereby lowering the scores of all non-permanent score rules.
18706 The decay itself if performed by the @code{gnus-decay-score-function}
18707 function, which is @code{gnus-decay-score} by default.  Here's the
18708 definition of that function:
18709
18710 @lisp
18711 (defun gnus-decay-score (score)
18712   "Decay SCORE.
18713 This is done according to `gnus-score-decay-constant'
18714 and `gnus-score-decay-scale'."
18715   (floor
18716    (- score
18717       (* (if (< score 0) 1 -1)
18718          (min (abs score)
18719               (max gnus-score-decay-constant
18720                    (* (abs score)
18721                       gnus-score-decay-scale)))))))
18722 @end lisp
18723
18724 @vindex gnus-score-decay-scale
18725 @vindex gnus-score-decay-constant
18726 @code{gnus-score-decay-constant} is 3 by default and
18727 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
18728
18729 @enumerate
18730 @item
18731 Scores between -3 and 3 will be set to 0 when this function is called.
18732
18733 @item
18734 Scores with magnitudes between 3 and 60 will be shrunk by 3.
18735
18736 @item
18737 Scores with magnitudes greater than 60 will be shrunk by 5% of the
18738 score.
18739 @end enumerate
18740
18741 If you don't like this decay function, write your own.  It is called
18742 with the score to be decayed as its only parameter, and it should return
18743 the new score, which should be an integer.
18744
18745 Gnus will try to decay scores once a day.  If you haven't run Gnus for
18746 four days, Gnus will decay the scores four times, for instance.
18747
18748 @iftex
18749 @iflatex
18750 @chapter Message
18751 @include message.texi
18752 @chapter Emacs MIME
18753 @include emacs-mime.texi
18754 @chapter Sieve
18755 @include sieve.texi
18756 @end iflatex
18757 @end iftex
18758
18759 @node Various
18760 @chapter Various
18761
18762 @menu
18763 * Process/Prefix::              A convention used by many treatment commands.
18764 * Interactive::                 Making Gnus ask you many questions.
18765 * Symbolic Prefixes::           How to supply some Gnus functions with options.
18766 * Formatting Variables::        You can specify what buffers should look like.
18767 * Window Layout::               Configuring the Gnus buffer windows.
18768 * Faces and Fonts::             How to change how faces look.
18769 * Compilation::                 How to speed Gnus up.
18770 * Mode Lines::                  Displaying information in the mode lines.
18771 * Highlighting and Menus::      Making buffers look all nice and cozy.
18772 * Buttons::                     Get tendinitis in ten easy steps!
18773 * Daemons::                     Gnus can do things behind your back.
18774 * NoCeM::                       How to avoid spam and other fatty foods.
18775 * Undo::                        Some actions can be undone.
18776 * Predicate Specifiers::        Specifying predicates.
18777 * Moderation::                  What to do if you're a moderator.
18778 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
18779 * Fuzzy Matching::              What's the big fuzz?
18780 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
18781 * Various Various::             Things that are really various.
18782 @end menu
18783
18784
18785 @node Process/Prefix
18786 @section Process/Prefix
18787 @cindex process/prefix convention
18788
18789 Many functions, among them functions for moving, decoding and saving
18790 articles, use what is known as the @dfn{Process/Prefix convention}.
18791
18792 This is a method for figuring out what articles the user wants the
18793 command to be performed on.
18794
18795 It goes like this:
18796
18797 If the numeric prefix is N, perform the operation on the next N
18798 articles, starting with the current one.  If the numeric prefix is
18799 negative, perform the operation on the previous N articles, starting
18800 with the current one.
18801
18802 @vindex transient-mark-mode
18803 If @code{transient-mark-mode} in non-@code{nil} and the region is
18804 active, all articles in the region will be worked upon.
18805
18806 If there is no numeric prefix, but some articles are marked with the
18807 process mark, perform the operation on the articles marked with
18808 the process mark.
18809
18810 If there is neither a numeric prefix nor any articles marked with the
18811 process mark, just perform the operation on the current article.
18812
18813 Quite simple, really, but it needs to be made clear so that surprises
18814 are avoided.
18815
18816 Commands that react to the process mark will push the current list of
18817 process marked articles onto a stack and will then clear all process
18818 marked articles.  You can restore the previous configuration with the
18819 @kbd{M P y} command (@pxref{Setting Process Marks}).
18820
18821 @vindex gnus-summary-goto-unread
18822 One thing that seems to shock & horrify lots of people is that, for
18823 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
18824 Since each @kbd{d} (which marks the current article as read) by default
18825 goes to the next unread article after marking, this means that @kbd{3 d}
18826 will mark the next three unread articles as read, no matter what the
18827 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
18828 @code{nil} for a more straightforward action.
18829
18830 Many commands do not use the process/prefix convention.  All commands
18831 that do explicitly say so in this manual.  To apply the process/prefix
18832 convention to commands that do not use it, you can use the @kbd{M-&}
18833 command.  For instance, to mark all the articles in the group as
18834 expirable, you could say `M P b M-& E'.
18835
18836
18837 @node Interactive
18838 @section Interactive
18839 @cindex interaction
18840
18841 @table @code
18842
18843 @item gnus-novice-user
18844 @vindex gnus-novice-user
18845 If this variable is non-@code{nil}, you are either a newcomer to the
18846 World of Usenet, or you are very cautious, which is a nice thing to be,
18847 really.  You will be given questions of the type ``Are you sure you want
18848 to do this?'' before doing anything dangerous.  This is @code{t} by
18849 default.
18850
18851 @item gnus-expert-user
18852 @vindex gnus-expert-user
18853 If this variable is non-@code{nil}, you will seldom be asked any
18854 questions by Gnus.  It will simply assume you know what you're doing, no
18855 matter how strange.
18856
18857 @item gnus-interactive-catchup
18858 @vindex gnus-interactive-catchup
18859 Require confirmation before catching up a group if non-@code{nil}.  It
18860 is @code{t} by default.
18861
18862 @item gnus-interactive-exit
18863 @vindex gnus-interactive-exit
18864 Require confirmation before exiting Gnus.  This variable is @code{t} by
18865 default.
18866 @end table
18867
18868
18869 @node Symbolic Prefixes
18870 @section Symbolic Prefixes
18871 @cindex symbolic prefixes
18872
18873 Quite a lot of Emacs commands react to the (numeric) prefix.  For
18874 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
18875 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
18876 rule of 900 to the current article.
18877
18878 This is all nice and well, but what if you want to give a command some
18879 additional information?  Well, what most commands do is interpret the
18880 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
18881 doesn't want a backup file to be created when saving the current buffer,
18882 for instance.  But what if you want to save without making a backup
18883 file, and you want Emacs to flash lights and play a nice tune at the
18884 same time?  You can't, and you're probably perfectly happy that way.
18885
18886 @kindex M-i (Summary)
18887 @findex gnus-symbolic-argument
18888 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
18889 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
18890 character typed in is the value.  You can stack as many @kbd{M-i}
18891 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
18892 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
18893 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
18894 @code{b}''.  You get the drift.
18895
18896 Typing in symbolic prefixes to commands that don't accept them doesn't
18897 hurt, but it doesn't do any good either.  Currently not many Gnus
18898 functions make use of the symbolic prefix.
18899
18900 If you're interested in how Gnus implements this, @pxref{Extended
18901 Interactive}.
18902
18903
18904 @node Formatting Variables
18905 @section Formatting Variables
18906 @cindex formatting variables
18907
18908 Throughout this manual you've probably noticed lots of variables called
18909 things like @code{gnus-group-line-format} and
18910 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
18911 output lines in the various buffers.  There's quite a lot of them.
18912 Fortunately, they all use the same syntax, so there's not that much to
18913 be annoyed by.
18914
18915 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
18916 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
18917 lots of percentages everywhere.
18918
18919 @menu
18920 * Formatting Basics::           A formatting variable is basically a format string.
18921 * Mode Line Formatting::        Some rules about mode line formatting variables.
18922 * Advanced Formatting::         Modifying output in various ways.
18923 * User-Defined Specs::          Having Gnus call your own functions.
18924 * Formatting Fonts::            Making the formatting look colorful and nice.
18925 * Positioning Point::           Moving point to a position after an operation.
18926 * Tabulation::                  Tabulating your output.
18927 * Wide Characters::             Dealing with wide characters.
18928 @end menu
18929
18930 Currently Gnus uses the following formatting variables:
18931 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
18932 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
18933 @code{gnus-group-mode-line-format},
18934 @code{gnus-summary-mode-line-format},
18935 @code{gnus-article-mode-line-format},
18936 @code{gnus-server-mode-line-format}, and
18937 @code{gnus-summary-pick-line-format}.
18938
18939 All these format variables can also be arbitrary elisp forms.  In that
18940 case, they will be @code{eval}ed to insert the required lines.
18941
18942 @kindex M-x gnus-update-format
18943 @findex gnus-update-format
18944 Gnus includes a command to help you while creating your own format
18945 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
18946 update the spec in question and pop you to a buffer where you can
18947 examine the resulting lisp code to be run to generate the line.
18948
18949
18950
18951 @node Formatting Basics
18952 @subsection Formatting Basics
18953
18954 Each @samp{%} element will be replaced by some string or other when the
18955 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
18956 spec, and pad with spaces to get a 5-character field''.
18957
18958 As with normal C and Emacs Lisp formatting strings, the numerical
18959 modifier between the @samp{%} and the formatting type character will
18960 @dfn{pad} the output so that it is always at least that long.
18961 @samp{%5y} will make the field always (at least) five characters wide by
18962 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
18963 the right instead.
18964
18965 You may also wish to limit the length of the field to protect against
18966 particularly wide values.  For that you can say @samp{%4,6y}, which
18967 means that the field will never be more than 6 characters wide and never
18968 less than 4 characters wide.
18969
18970 Also Gnus supports some extended format specifications, such as
18971 @samp{%&user-date;}.
18972
18973
18974 @node Mode Line Formatting
18975 @subsection Mode Line Formatting
18976
18977 Mode line formatting variables (e.g.,
18978 @code{gnus-summary-mode-line-format}) follow the same rules as other,
18979 buffer line oriented formatting variables (@pxref{Formatting Basics})
18980 with the following two differences:
18981
18982 @enumerate
18983
18984 @item
18985 There must be no newline (@samp{\n}) at the end.
18986
18987 @item
18988 The special @samp{%%b} spec can be used to display the buffer name.
18989 Well, it's no spec at all, really---@samp{%%} is just a way to quote
18990 @samp{%} to allow it to pass through the formatting machinery unmangled,
18991 so that Emacs receives @samp{%b}, which is something the Emacs mode line
18992 display interprets to mean ``show the buffer name''.  For a full list of
18993 mode line specs Emacs understands, see the documentation of the
18994 @code{mode-line-format} variable.
18995
18996 @end enumerate
18997
18998
18999 @node Advanced Formatting
19000 @subsection Advanced Formatting
19001
19002 It is frequently useful to post-process the fields in some way.
19003 Padding, limiting, cutting off parts and suppressing certain values can
19004 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
19005 look like @samp{%~(cut 3)~(ignore "0")y}.
19006
19007 These are the valid modifiers:
19008
19009 @table @code
19010 @item pad
19011 @itemx pad-left
19012 Pad the field to the left with spaces until it reaches the required
19013 length.
19014
19015 @item pad-right
19016 Pad the field to the right with spaces until it reaches the required
19017 length.
19018
19019 @item max
19020 @itemx max-left
19021 Cut off characters from the left until it reaches the specified length.
19022
19023 @item max-right
19024 Cut off characters from the right until it reaches the specified
19025 length.
19026
19027 @item cut
19028 @itemx cut-left
19029 Cut off the specified number of characters from the left.
19030
19031 @item cut-right
19032 Cut off the specified number of characters from the right.
19033
19034 @item ignore
19035 Return an empty string if the field is equal to the specified value.
19036
19037 @item form
19038 Use the specified form as the field value when the @samp{@@} spec is
19039 used.
19040
19041 Here's an example:
19042
19043 @lisp
19044 "~(form (current-time-string))@@"
19045 @end lisp
19046
19047 @end table
19048
19049 Let's take an example.  The @samp{%o} spec in the summary mode lines
19050 will return a date in compact ISO8601 format---@samp{19960809T230410}.
19051 This is quite a mouthful, so we want to shave off the century number and
19052 the time, leaving us with a six-character date.  That would be
19053 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
19054 maxing, and we need the padding to ensure that the date is never less
19055 than 6 characters to make it look nice in columns.)
19056
19057 Ignoring is done first; then cutting; then maxing; and then as the very
19058 last operation, padding.
19059
19060 @vindex gnus-compile-user-specs
19061 If @code{gnus-compile-user-specs} is set to @code{nil} (@code{t} by
19062 default) with your strong personality, and use a lots of these advanced
19063 thingies, you'll find that Gnus gets quite slow.  This can be helped
19064 enormously by running @kbd{M-x gnus-compile} when you are satisfied with
19065 the look of your lines.
19066 @xref{Compilation}.
19067
19068
19069 @node User-Defined Specs
19070 @subsection User-Defined Specs
19071
19072 All the specs allow for inserting user defined specifiers---@samp{u}.
19073 The next character in the format string should be a letter.  Gnus
19074 will call the function @code{gnus-user-format-function-}@samp{X}, where
19075 @samp{X} is the letter following @samp{%u}.  The function will be passed
19076 a single parameter---what the parameter means depends on what buffer
19077 it's being called from.  The function should return a string, which will
19078 be inserted into the buffer just like information from any other
19079 specifier.  This function may also be called with dummy values, so it
19080 should protect against that.
19081
19082 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
19083 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
19084
19085 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
19086 much the same without defining new functions.  Here's an example:
19087 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
19088 given here will be evaluated to yield the current line number, and then
19089 inserted.
19090
19091
19092 @node Formatting Fonts
19093 @subsection Formatting Fonts
19094
19095 There are specs for highlighting, and these are shared by all the format
19096 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
19097 the special @code{mouse-face} property set, which means that it will be
19098 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
19099 over it.
19100
19101 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
19102 normal faces set using @code{gnus-face-0}, which is @code{bold} by
19103 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
19104 and so on.  Create as many faces as you wish.  The same goes for the
19105 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
19106 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
19107
19108 Text inside the @samp{%<} and @samp{%>} specifiers will get the special
19109 @code{balloon-help} property set to @code{gnus-balloon-face-0}.  If you
19110 say @samp{%1<}, you'll get @code{gnus-balloon-face-1} and so on.  The
19111 @code{gnus-balloon-face-*} variables should be either strings or symbols
19112 naming functions that return a string.  Under @code{balloon-help-mode},
19113 when the mouse passes over text with this property set, a balloon window
19114 will appear and display the string.  Please refer to the doc string of
19115 @code{balloon-help-mode} for more information on this.
19116
19117 Here's an alternative recipe for the group buffer:
19118
19119 @lisp
19120 ;; Create three face types.
19121 (setq gnus-face-1 'bold)
19122 (setq gnus-face-3 'italic)
19123
19124 ;; We want the article count to be in
19125 ;; a bold and green face.  So we create
19126 ;; a new face called `my-green-bold'.
19127 (copy-face 'bold 'my-green-bold)
19128 ;; Set the color.
19129 (set-face-foreground 'my-green-bold "ForestGreen")
19130 (setq gnus-face-2 'my-green-bold)
19131
19132 ;; Set the new & fancy format.
19133 (setq gnus-group-line-format
19134       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
19135 @end lisp
19136
19137 I'm sure you'll be able to use this scheme to create totally unreadable
19138 and extremely vulgar displays.  Have fun!
19139
19140 Note that the @samp{%(} specs (and friends) do not make any sense on the
19141 mode-line variables.
19142
19143 @node Positioning Point
19144 @subsection Positioning Point
19145
19146 Gnus usually moves point to a pre-defined place on each line in most
19147 buffers.  By default, point move to the first colon character on the
19148 line.  You can customize this behaviour in three different ways.
19149
19150 You can move the colon character to somewhere else on the line.
19151
19152 @findex gnus-goto-colon
19153 You can redefine the function that moves the point to the colon.  The
19154 function is called @code{gnus-goto-colon}.
19155
19156 But perhaps the most convenient way to deal with this, if you don't want
19157 to have a colon in your line, is to use the @samp{%C} specifier.  If you
19158 put a @samp{%C} somewhere in your format line definition, Gnus will
19159 place point there.
19160
19161
19162 @node Tabulation
19163 @subsection Tabulation
19164
19165 You can usually line up your displays by padding and cutting your
19166 strings.  However, when combining various strings of different size, it
19167 can often be more convenient to just output the strings, and then worry
19168 about lining up the following text afterwards.
19169
19170 To do that, Gnus supplies tabulator specs--@samp{%=}.  There are two
19171 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
19172
19173 @samp{%50=} will insert space characters to pad the line up to column
19174 50.  If the text is already past column 50, nothing will be inserted.
19175 This is the soft tabulator.
19176
19177 @samp{%-50=} will insert space characters to pad the line up to column
19178 50.  If the text is already past column 50, the excess text past column
19179 50 will be removed.  This is the hard tabulator.
19180
19181
19182 @node Wide Characters
19183 @subsection Wide Characters
19184
19185 Proportional fonts in most countries have characters of the same width.
19186 Some countries, however, use Latin characters mixed with wider
19187 characters---most notable East Asian countries.
19188
19189 The problem is that when formatting, Gnus assumes that if a string is 10
19190 characters wide, it'll be 10 Latin characters wide on the screen.  In
19191 these coutries, that's not true.
19192
19193 @vindex gnus-use-correct-string-widths
19194 To help fix this, you can set @code{gnus-use-correct-string-widths} to
19195 @code{t}.  This makes buffer generation slower, but the results will be
19196 prettieer.  The default value is @code{t}.
19197
19198
19199
19200 @node Window Layout
19201 @section Window Layout
19202 @cindex window layout
19203
19204 No, there's nothing here about X, so be quiet.
19205
19206 @vindex gnus-use-full-window
19207 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
19208 other windows and occupy the entire Emacs screen by itself.  It is
19209 @code{t} by default.
19210
19211 Setting this variable to @code{nil} kinda works, but there are
19212 glitches.  Use at your own peril.
19213
19214 @vindex gnus-buffer-configuration
19215 @code{gnus-buffer-configuration} describes how much space each Gnus
19216 buffer should be given.  Here's an excerpt of this variable:
19217
19218 @lisp
19219 ((group (vertical 1.0 (group 1.0 point)
19220                       (if gnus-carpal (group-carpal 4))))
19221  (article (vertical 1.0 (summary 0.25 point)
19222                         (article 1.0))))
19223 @end lisp
19224
19225 This is an alist.  The @dfn{key} is a symbol that names some action or
19226 other.  For instance, when displaying the group buffer, the window
19227 configuration function will use @code{group} as the key.  A full list of
19228 possible names is listed below.
19229
19230 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
19231 should occupy.  To take the @code{article} split as an example -
19232
19233 @lisp
19234 (article (vertical 1.0 (summary 0.25 point)
19235                        (article 1.0)))
19236 @end lisp
19237
19238 This @dfn{split} says that the summary buffer should occupy 25% of upper
19239 half of the screen, and that it is placed over the article buffer.  As
19240 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
19241 reaching for that calculator there).  However, the special number
19242 @code{1.0} is used to signal that this buffer should soak up all the
19243 rest of the space available after the rest of the buffers have taken
19244 whatever they need.  There should be only one buffer with the @code{1.0}
19245 size spec per split.
19246
19247 Point will be put in the buffer that has the optional third element
19248 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
19249 split where the tag @code{frame-focus} is a member (i.e. is the third or
19250 fourth element in the list, depending on whether the @code{point} tag is
19251 present) gets focus.
19252
19253 Here's a more complicated example:
19254
19255 @lisp
19256 (article (vertical 1.0 (group 4)
19257                        (summary 0.25 point)
19258                        (if gnus-carpal (summary-carpal 4))
19259                        (article 1.0)))
19260 @end lisp
19261
19262 If the size spec is an integer instead of a floating point number,
19263 then that number will be used to say how many lines a buffer should
19264 occupy, not a percentage.
19265
19266 If the @dfn{split} looks like something that can be @code{eval}ed (to be
19267 precise---if the @code{car} of the split is a function or a subr), this
19268 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
19269 be used as a split.  This means that there will be three buffers if
19270 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
19271 is non-@code{nil}.
19272
19273 Not complicated enough for you?  Well, try this on for size:
19274
19275 @lisp
19276 (article (horizontal 1.0
19277              (vertical 0.5
19278                  (group 1.0)
19279                  (gnus-carpal 4))
19280              (vertical 1.0
19281                  (summary 0.25 point)
19282                  (summary-carpal 4)
19283                  (article 1.0))))
19284 @end lisp
19285
19286 Whoops.  Two buffers with the mystery 100% tag.  And what's that
19287 @code{horizontal} thingie?
19288
19289 If the first element in one of the split is @code{horizontal}, Gnus will
19290 split the window horizontally, giving you two windows side-by-side.
19291 Inside each of these strips you may carry on all you like in the normal
19292 fashion.  The number following @code{horizontal} says what percentage of
19293 the screen is to be given to this strip.
19294
19295 For each split, there @emph{must} be one element that has the 100% tag.
19296 The splitting is never accurate, and this buffer will eat any leftover
19297 lines from the splits.
19298
19299 To be slightly more formal, here's a definition of what a valid split
19300 may look like:
19301
19302 @example
19303 split      = frame | horizontal | vertical | buffer | form
19304 frame      = "(frame " size *split ")"
19305 horizontal = "(horizontal " size *split ")"
19306 vertical   = "(vertical " size *split ")"
19307 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
19308 size       = number | frame-params
19309 buf-name   = group | article | summary ...
19310 @end example
19311
19312 The limitations are that the @code{frame} split can only appear as the
19313 top-level split.  @var{form} should be an Emacs Lisp form that should
19314 return a valid split.  We see that each split is fully recursive, and
19315 may contain any number of @code{vertical} and @code{horizontal} splits.
19316
19317 @vindex gnus-window-min-width
19318 @vindex gnus-window-min-height
19319 @cindex window height
19320 @cindex window width
19321 Finding the right sizes can be a bit complicated.  No window may be less
19322 than @code{gnus-window-min-height} (default 1) characters high, and all
19323 windows must be at least @code{gnus-window-min-width} (default 1)
19324 characters wide.  Gnus will try to enforce this before applying the
19325 splits.  If you want to use the normal Emacs window width/height limit,
19326 you can just set these two variables to @code{nil}.
19327
19328 If you're not familiar with Emacs terminology, @code{horizontal} and
19329 @code{vertical} splits may work the opposite way of what you'd expect.
19330 Windows inside a @code{horizontal} split are shown side-by-side, and
19331 windows within a @code{vertical} split are shown above each other.
19332
19333 @findex gnus-configure-frame
19334 If you want to experiment with window placement, a good tip is to call
19335 @code{gnus-configure-frame} directly with a split.  This is the function
19336 that does all the real work when splitting buffers.  Below is a pretty
19337 nonsensical configuration with 5 windows; two for the group buffer and
19338 three for the article buffer.  (I said it was nonsensical.)  If you
19339 @code{eval} the statement below, you can get an idea of how that would
19340 look straight away, without going through the normal Gnus channels.
19341 Play with it until you're satisfied, and then use
19342 @code{gnus-add-configuration} to add your new creation to the buffer
19343 configuration list.
19344
19345 @lisp
19346 (gnus-configure-frame
19347  '(horizontal 1.0
19348     (vertical 10
19349       (group 1.0)
19350       (article 0.3 point))
19351     (vertical 1.0
19352       (article 1.0)
19353       (horizontal 4
19354         (group 1.0)
19355         (article 10)))))
19356 @end lisp
19357
19358 You might want to have several frames as well.  No prob---just use the
19359 @code{frame} split:
19360
19361 @lisp
19362 (gnus-configure-frame
19363  '(frame 1.0
19364          (vertical 1.0
19365                    (summary 0.25 point frame-focus)
19366                    (article 1.0))
19367          (vertical ((height . 5) (width . 15)
19368                     (user-position . t)
19369                     (left . -1) (top . 1))
19370                    (picon 1.0))))
19371
19372 @end lisp
19373
19374 This split will result in the familiar summary/article window
19375 configuration in the first (or ``main'') frame, while a small additional
19376 frame will be created where picons will be shown.  As you can see,
19377 instead of the normal @code{1.0} top-level spec, each additional split
19378 should have a frame parameter alist as the size spec.
19379 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
19380 Reference Manual}.  Under XEmacs, a frame property list will be
19381 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
19382 is such a plist.
19383 The list of all possible keys for @code{gnus-buffer-configuration} can
19384 be found in its default value.
19385
19386 Note that the @code{message} key is used for both
19387 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
19388 it is desirable to distinguish between the two, something like this
19389 might be used:
19390
19391 @lisp
19392 (message (horizontal 1.0
19393                      (vertical 1.0 (message 1.0 point))
19394                      (vertical 0.24
19395                                (if (buffer-live-p gnus-summary-buffer)
19396                                    '(summary 0.5))
19397                                (group 1.0)))))
19398 @end lisp
19399
19400 One common desire for a multiple frame split is to have a separate frame
19401 for composing mail and news while leaving the original frame intact.  To
19402 accomplish that, something like the following can be done:
19403
19404 @lisp
19405 (message
19406   (frame 1.0
19407          (if (not (buffer-live-p gnus-summary-buffer))
19408              (car (cdr (assoc 'group gnus-buffer-configuration)))
19409            (car (cdr (assoc 'summary gnus-buffer-configuration))))
19410          (vertical ((user-position . t) (top . 1) (left . 1)
19411                     (name . "Message"))
19412                    (message 1.0 point))))
19413 @end lisp
19414
19415 @findex gnus-add-configuration
19416 Since the @code{gnus-buffer-configuration} variable is so long and
19417 complicated, there's a function you can use to ease changing the config
19418 of a single setting: @code{gnus-add-configuration}.  If, for instance,
19419 you want to change the @code{article} setting, you could say:
19420
19421 @lisp
19422 (gnus-add-configuration
19423  '(article (vertical 1.0
19424                (group 4)
19425                (summary .25 point)
19426                (article 1.0))))
19427 @end lisp
19428
19429 You'd typically stick these @code{gnus-add-configuration} calls in your
19430 @file{.gnus.el} file or in some startup hook---they should be run after
19431 Gnus has been loaded.
19432
19433 @vindex gnus-always-force-window-configuration
19434 If all windows mentioned in the configuration are already visible, Gnus
19435 won't change the window configuration.  If you always want to force the
19436 ``right'' window configuration, you can set
19437 @code{gnus-always-force-window-configuration} to non-@code{nil}.
19438
19439 If you're using tree displays (@pxref{Tree Display}), and the tree
19440 window is displayed vertically next to another window, you may also want
19441 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
19442 windows resized.
19443
19444 @subsection Example Window Configurations
19445
19446 @itemize @bullet
19447 @item
19448 Narrow left hand side occupied by group buffer.  Right hand side split
19449 between summary buffer (top one-sixth) and article buffer (bottom).
19450
19451 @ifinfo
19452 @example
19453 +---+---------+
19454 | G | Summary |
19455 | r +---------+
19456 | o |         |
19457 | u | Article |
19458 | p |         |
19459 +---+---------+
19460 @end example
19461 @end ifinfo
19462
19463 @lisp
19464 (gnus-add-configuration
19465  '(article
19466    (horizontal 1.0
19467                (vertical 25 (group 1.0))
19468                (vertical 1.0
19469                          (summary 0.16 point)
19470                          (article 1.0)))))
19471
19472 (gnus-add-configuration
19473  '(summary
19474    (horizontal 1.0
19475                (vertical 25 (group 1.0))
19476                (vertical 1.0 (summary 1.0 point)))))
19477 @end lisp
19478
19479 @end itemize
19480
19481
19482 @node Faces and Fonts
19483 @section Faces and Fonts
19484 @cindex faces
19485 @cindex fonts
19486 @cindex colors
19487
19488 Fiddling with fonts and faces used to be very difficult, but these days
19489 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
19490 the face you want to alter, and alter it via the standard Customize
19491 interface.
19492
19493
19494 @node Compilation
19495 @section Compilation
19496 @cindex compilation
19497 @cindex byte-compilation
19498
19499 @findex gnus-compile
19500
19501 Remember all those line format specification variables?
19502 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
19503 on.  By default, T-gnus will use the byte-compiled codes of these
19504 variables and we can keep a slow-down to a minimum.  However, if you set
19505 @code{gnus-compile-user-specs} to @code{nil} (@code{t} by default),
19506 unfortunately, changing them will mean a quite significant slow-down.
19507 (The default values of these variables have byte-compiled functions
19508 associated with them, while the user-generated versions do not, of
19509 course.)
19510
19511 To help with this, you can run @kbd{M-x gnus-compile} after you've
19512 fiddled around with the variables and feel that you're (kind of)
19513 satisfied.  This will result in the new specs being byte-compiled, and
19514 you'll get top speed again.  Note that T-gnus will not save these
19515 compiled specs in the @file{.newsrc.eld} file.
19516
19517 @table @code
19518 @item gnus-compile-user-specs
19519 @vindex gnus-compile-user-specs
19520 If it is non-nil, the user-defined format specs will be byte-compiled
19521 automatically.  The default value of this variable is @code{t}.  It has
19522 an effect on the values of @code{gnus-*-line-format-spec}.
19523 @end table
19524
19525
19526 @node Mode Lines
19527 @section Mode Lines
19528 @cindex mode lines
19529
19530 @vindex gnus-updated-mode-lines
19531 @code{gnus-updated-mode-lines} says what buffers should keep their mode
19532 lines updated.  It is a list of symbols.  Supported symbols include
19533 @code{group}, @code{article}, @code{summary}, @code{server},
19534 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
19535 Gnus will keep that mode line updated with information that may be
19536 pertinent.  If this variable is @code{nil}, screen refresh may be
19537 quicker.
19538
19539 @cindex display-time
19540
19541 @vindex gnus-mode-non-string-length
19542 By default, Gnus displays information on the current article in the mode
19543 lines of the summary and article buffers.  The information Gnus wishes
19544 to display (e.g. the subject of the article) is often longer than the
19545 mode lines, and therefore have to be cut off at some point.  The
19546 @code{gnus-mode-non-string-length} variable says how long the other
19547 elements on the line is (i.e., the non-info part).  If you put
19548 additional elements on the mode line (e.g. a clock), you should modify
19549 this variable:
19550
19551 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
19552 @lisp
19553 (add-hook 'display-time-hook
19554           (lambda () (setq gnus-mode-non-string-length
19555                            (+ 21
19556                               (if line-number-mode 5 0)
19557                               (if column-number-mode 4 0)
19558                               (length display-time-string)))))
19559 @end lisp
19560
19561 If this variable is @code{nil} (which is the default), the mode line
19562 strings won't be chopped off, and they won't be padded either.  Note
19563 that the default is unlikely to be desirable, as even the percentage
19564 complete in the buffer may be crowded off the mode line; the user should
19565 configure this variable appropriately for her configuration.
19566
19567
19568 @node Highlighting and Menus
19569 @section Highlighting and Menus
19570 @cindex visual
19571 @cindex highlighting
19572 @cindex menus
19573
19574 @vindex gnus-visual
19575 The @code{gnus-visual} variable controls most of the Gnus-prettifying
19576 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
19577 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
19578 file.
19579
19580 This variable can be a list of visual properties that are enabled.  The
19581 following elements are valid, and are all included by default:
19582
19583 @table @code
19584 @item group-highlight
19585 Do highlights in the group buffer.
19586 @item summary-highlight
19587 Do highlights in the summary buffer.
19588 @item article-highlight
19589 Do highlights in the article buffer.
19590 @item highlight
19591 Turn on highlighting in all buffers.
19592 @item group-menu
19593 Create menus in the group buffer.
19594 @item summary-menu
19595 Create menus in the summary buffers.
19596 @item article-menu
19597 Create menus in the article buffer.
19598 @item browse-menu
19599 Create menus in the browse buffer.
19600 @item server-menu
19601 Create menus in the server buffer.
19602 @item score-menu
19603 Create menus in the score buffers.
19604 @item menu
19605 Create menus in all buffers.
19606 @end table
19607
19608 So if you only want highlighting in the article buffer and menus in all
19609 buffers, you could say something like:
19610
19611 @lisp
19612 (setq gnus-visual '(article-highlight menu))
19613 @end lisp
19614
19615 If you want highlighting only and no menus whatsoever, you'd say:
19616
19617 @lisp
19618 (setq gnus-visual '(highlight))
19619 @end lisp
19620
19621 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
19622 in all Gnus buffers.
19623
19624 Other general variables that influence the look of all buffers include:
19625
19626 @table @code
19627 @item gnus-mouse-face
19628 @vindex gnus-mouse-face
19629 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
19630 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
19631
19632 @end table
19633
19634 There are hooks associated with the creation of all the different menus:
19635
19636 @table @code
19637
19638 @item gnus-article-menu-hook
19639 @vindex gnus-article-menu-hook
19640 Hook called after creating the article mode menu.
19641
19642 @item gnus-group-menu-hook
19643 @vindex gnus-group-menu-hook
19644 Hook called after creating the group mode menu.
19645
19646 @item gnus-summary-menu-hook
19647 @vindex gnus-summary-menu-hook
19648 Hook called after creating the summary mode menu.
19649
19650 @item gnus-server-menu-hook
19651 @vindex gnus-server-menu-hook
19652 Hook called after creating the server mode menu.
19653
19654 @item gnus-browse-menu-hook
19655 @vindex gnus-browse-menu-hook
19656 Hook called after creating the browse mode menu.
19657
19658 @item gnus-score-menu-hook
19659 @vindex gnus-score-menu-hook
19660 Hook called after creating the score mode menu.
19661
19662 @end table
19663
19664
19665 @node Buttons
19666 @section Buttons
19667 @cindex buttons
19668 @cindex mouse
19669 @cindex click
19670
19671 Those new-fangled @dfn{mouse} contraptions is very popular with the
19672 young, hep kids who don't want to learn the proper way to do things
19673 these days.  Why, I remember way back in the summer of '89, when I was
19674 using Emacs on a Tops 20 system.  Three hundred users on one single
19675 machine, and every user was running Simula compilers.  Bah!
19676
19677 Right.
19678
19679 @vindex gnus-carpal
19680 Well, you can make Gnus display bufferfuls of buttons you can click to
19681 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
19682 really.  Tell the chiropractor I sent you.
19683
19684
19685 @table @code
19686
19687 @item gnus-carpal-mode-hook
19688 @vindex gnus-carpal-mode-hook
19689 Hook run in all carpal mode buffers.
19690
19691 @item gnus-carpal-button-face
19692 @vindex gnus-carpal-button-face
19693 Face used on buttons.
19694
19695 @item gnus-carpal-header-face
19696 @vindex gnus-carpal-header-face
19697 Face used on carpal buffer headers.
19698
19699 @item gnus-carpal-group-buffer-buttons
19700 @vindex gnus-carpal-group-buffer-buttons
19701 Buttons in the group buffer.
19702
19703 @item gnus-carpal-summary-buffer-buttons
19704 @vindex gnus-carpal-summary-buffer-buttons
19705 Buttons in the summary buffer.
19706
19707 @item gnus-carpal-server-buffer-buttons
19708 @vindex gnus-carpal-server-buffer-buttons
19709 Buttons in the server buffer.
19710
19711 @item gnus-carpal-browse-buffer-buttons
19712 @vindex gnus-carpal-browse-buffer-buttons
19713 Buttons in the browse buffer.
19714 @end table
19715
19716 All the @code{buttons} variables are lists.  The elements in these list
19717 are either cons cells where the @code{car} contains a text to be displayed and
19718 the @code{cdr} contains a function symbol, or a simple string.
19719
19720
19721 @node Daemons
19722 @section Daemons
19723 @cindex demons
19724 @cindex daemons
19725
19726 Gnus, being larger than any program ever written (allegedly), does lots
19727 of strange stuff that you may wish to have done while you're not
19728 present.  For instance, you may want it to check for new mail once in a
19729 while.  Or you may want it to close down all connections to all servers
19730 when you leave Emacs idle.  And stuff like that.
19731
19732 Gnus will let you do stuff like that by defining various
19733 @dfn{handlers}.  Each handler consists of three elements:  A
19734 @var{function}, a @var{time}, and an @var{idle} parameter.
19735
19736 Here's an example of a handler that closes connections when Emacs has
19737 been idle for thirty minutes:
19738
19739 @lisp
19740 (gnus-demon-close-connections nil 30)
19741 @end lisp
19742
19743 Here's a handler that scans for PGP headers every hour when Emacs is
19744 idle:
19745
19746 @lisp
19747 (gnus-demon-scan-pgp 60 t)
19748 @end lisp
19749
19750 This @var{time} parameter and than @var{idle} parameter work together
19751 in a strange, but wonderful fashion.  Basically, if @var{idle} is
19752 @code{nil}, then the function will be called every @var{time} minutes.
19753
19754 If @var{idle} is @code{t}, then the function will be called after
19755 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
19756 the function will never be called.  But once Emacs goes idle, the
19757 function will be called every @var{time} minutes.
19758
19759 If @var{idle} is a number and @var{time} is a number, the function will
19760 be called every @var{time} minutes only when Emacs has been idle for
19761 @var{idle} minutes.
19762
19763 If @var{idle} is a number and @var{time} is @code{nil}, the function
19764 will be called once every time Emacs has been idle for @var{idle}
19765 minutes.
19766
19767 And if @var{time} is a string, it should look like @samp{07:31}, and
19768 the function will then be called once every day somewhere near that
19769 time.  Modified by the @var{idle} parameter, of course.
19770
19771 @vindex gnus-demon-timestep
19772 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
19773 seconds.  This is 60 by default.  If you change that variable,
19774 all the timings in the handlers will be affected.)
19775
19776 So, if you want to add a handler, you could put something like this in
19777 your @file{.gnus} file:
19778
19779 @findex gnus-demon-add-handler
19780 @lisp
19781 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
19782 @end lisp
19783
19784 @findex gnus-demon-add-nocem
19785 @findex gnus-demon-add-scanmail
19786 @findex gnus-demon-add-rescan
19787 @findex gnus-demon-add-scan-timestamps
19788 @findex gnus-demon-add-disconnection
19789 Some ready-made functions to do this have been created:
19790 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
19791 @code{gnus-demon-add-nntp-close-connection},
19792 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
19793 @code{gnus-demon-add-scanmail}.  Just put those functions in your
19794 @file{.gnus} if you want those abilities.
19795
19796 @findex gnus-demon-init
19797 @findex gnus-demon-cancel
19798 @vindex gnus-demon-handlers
19799 If you add handlers to @code{gnus-demon-handlers} directly, you should
19800 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
19801 daemons, you can use the @code{gnus-demon-cancel} function.
19802
19803 Note that adding daemons can be pretty naughty if you over do it.  Adding
19804 functions that scan all news and mail from all servers every two seconds
19805 is a sure-fire way of getting booted off any respectable system.  So
19806 behave.
19807
19808
19809 @node NoCeM
19810 @section NoCeM
19811 @cindex nocem
19812 @cindex spam
19813
19814 @dfn{Spamming} is posting the same article lots and lots of times.
19815 Spamming is bad.  Spamming is evil.
19816
19817 Spamming is usually canceled within a day or so by various anti-spamming
19818 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
19819 NoCeM is pronounced ``no see-'em'', and means what the name
19820 implies---these are messages that make the offending articles, like, go
19821 away.
19822
19823 What use are these NoCeM messages if the articles are canceled anyway?
19824 Some sites do not honor cancel messages and some sites just honor cancels
19825 from a select few people.  Then you may wish to make use of the NoCeM
19826 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
19827
19828 Gnus can read and parse the messages in this group automatically, and
19829 this will make spam disappear.
19830
19831 There are some variables to customize, of course:
19832
19833 @table @code
19834 @item gnus-use-nocem
19835 @vindex gnus-use-nocem
19836 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
19837 by default.
19838
19839 @item gnus-nocem-groups
19840 @vindex gnus-nocem-groups
19841 Gnus will look for NoCeM messages in the groups in this list.  The
19842 default is @code{("news.lists.filters" "news.admin.net-abuse.bulletins"
19843 "alt.nocem.misc" "news.admin.net-abuse.announce")}.
19844
19845 @item gnus-nocem-issuers
19846 @vindex gnus-nocem-issuers
19847 There are many people issuing NoCeM messages.  This list says what
19848 people you want to listen to.  The default is @code{("Automoose-1"
19849 "clewis@@ferret.ocunix.on.ca" "cosmo.roadkill" "SpamHippo"
19850 "hweede@@snafu.de")}; fine, upstanding citizens all of them.
19851
19852 Known despammers that you can put in this list are listed at
19853 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
19854
19855 You do not have to heed NoCeM messages from all these people---just the
19856 ones you want to listen to.  You also don't have to accept all NoCeM
19857 messages from the people you like.  Each NoCeM message has a @dfn{type}
19858 header that gives the message a (more or less, usually less) rigorous
19859 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
19860 @samp{binary}, and @samp{troll}.  To specify this, you have to use
19861 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
19862 Each condition is either a string (which is a regexp that matches types
19863 you want to use) or a list on the form @code{(not @var{string})}, where
19864 @var{string} is a regexp that matches types you don't want to use.
19865
19866 For instance, if you want all NoCeM messages from Chris Lewis except his
19867 @samp{troll} messages, you'd say:
19868
19869 @lisp
19870 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
19871 @end lisp
19872
19873 On the other hand, if you just want nothing but his @samp{spam} and
19874 @samp{spew} messages, you'd say:
19875
19876 @lisp
19877 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
19878 @end lisp
19879
19880 The specs are applied left-to-right.
19881
19882
19883 @item gnus-nocem-verifyer
19884 @vindex gnus-nocem-verifyer
19885 @findex mc-verify
19886 This should be a function for verifying that the NoCeM issuer is who she
19887 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
19888 function.  If this is too slow and you don't care for verification
19889 (which may be dangerous), you can set this variable to @code{nil}.
19890
19891 If you want signed NoCeM messages to be verified and unsigned messages
19892 not to be verified (but used anyway), you could do something like:
19893
19894 @lisp
19895 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
19896
19897 (defun my-gnus-mc-verify ()
19898   (not (eq 'forged
19899            (ignore-errors
19900              (if (mc-verify)
19901                  t
19902                'forged)))))
19903 @end lisp
19904
19905 This might be dangerous, though.
19906
19907 @item gnus-nocem-directory
19908 @vindex gnus-nocem-directory
19909 This is where Gnus will store its NoCeM cache files.  The default is
19910 @file{~/News/NoCeM/}.
19911
19912 @item gnus-nocem-expiry-wait
19913 @vindex gnus-nocem-expiry-wait
19914 The number of days before removing old NoCeM entries from the cache.
19915 The default is 15.  If you make it shorter Gnus will be faster, but you
19916 might then see old spam.
19917
19918 @item gnus-nocem-check-from
19919 @vindex gnus-nocem-check-from
19920 Non-@code{nil} means check for valid issuers in message bodies.
19921 Otherwise don't bother fetching articles unless their author matches a
19922 valid issuer; that is much faster if you are selective about the
19923 issuers.
19924
19925 @item gnus-nocem-check-article-limit
19926 @vindex gnus-nocem-check-article-limit
19927 If non-@code{nil}, the maximum number of articles to check in any NoCeM
19928 group.  NoCeM groups can be huge and very slow to process.
19929
19930 @end table
19931
19932 Using NoCeM could potentially be a memory hog.  If you have many living
19933 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
19934 big.  If this is a problem, you should kill off all (or most) of your
19935 unsubscribed groups (@pxref{Subscription Commands}).
19936
19937
19938 @node Undo
19939 @section Undo
19940 @cindex undo
19941
19942 It is very useful to be able to undo actions one has done.  In normal
19943 Emacs buffers, it's easy enough---you just push the @code{undo} button.
19944 In Gnus buffers, however, it isn't that simple.
19945
19946 The things Gnus displays in its buffer is of no value whatsoever to
19947 Gnus---it's all just data designed to look nice to the user.
19948 Killing a group in the group buffer with @kbd{C-k} makes the line
19949 disappear, but that's just a side-effect of the real action---the
19950 removal of the group in question from the internal Gnus structures.
19951 Undoing something like that can't be done by the normal Emacs
19952 @code{undo} function.
19953
19954 Gnus tries to remedy this somewhat by keeping track of what the user
19955 does and coming up with actions that would reverse the actions the user
19956 takes.  When the user then presses the @code{undo} key, Gnus will run
19957 the code to reverse the previous action, or the previous actions.
19958 However, not all actions are easily reversible, so Gnus currently offers
19959 a few key functions to be undoable.  These include killing groups,
19960 yanking groups, and changing the list of read articles of groups.
19961 That's it, really.  More functions may be added in the future, but each
19962 added function means an increase in data to be stored, so Gnus will
19963 never be totally undoable.
19964
19965 @findex gnus-undo-mode
19966 @vindex gnus-use-undo
19967 @findex gnus-undo
19968 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
19969 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
19970 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
19971 command, which should feel kinda like the normal Emacs @code{undo}
19972 command.
19973
19974
19975 @node Predicate Specifiers
19976 @section Predicate Specifiers
19977 @cindex predicate specifiers
19978
19979 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
19980 form that allows flexible specification of predicates without having
19981 to type all that much.
19982
19983 These specifiers are lists consisting of functions, symbols and lists.
19984
19985 Here's an example:
19986
19987 @lisp
19988 (or gnus-article-unseen-p
19989     gnus-article-unread-p)
19990 @end lisp
19991
19992 The available symbols are @code{or}, @code{and} and @code{not}.  The
19993 functions all take one parameter.
19994
19995 @findex gnus-make-predicate
19996 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
19997 to create a function that can be called.  This input parameter to this
19998 function will be passed along to all the functions in the predicate
19999 specifier. 
20000
20001
20002 @node Moderation
20003 @section Moderation
20004 @cindex moderation
20005
20006 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
20007 It is not included in the standard Gnus package.  Write a mail to
20008 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
20009 get a copy.
20010
20011 The moderation package is implemented as a minor mode for summary
20012 buffers.  Put
20013
20014 @lisp
20015 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
20016 @end lisp
20017
20018 in your @file{.gnus.el} file.
20019
20020 If you are the moderator of @samp{rec.zoofle}, this is how it's
20021 supposed to work:
20022
20023 @enumerate
20024 @item
20025 You split your incoming mail by matching on
20026 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
20027 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
20028
20029 @item
20030 You enter that group once in a while and post articles using the @kbd{e}
20031 (edit-and-post) or @kbd{s} (just send unedited) commands.
20032
20033 @item
20034 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
20035 articles that weren't approved by you, you can cancel them with the
20036 @kbd{c} command.
20037 @end enumerate
20038
20039 To use moderation mode in these two groups, say:
20040
20041 @lisp
20042 (setq gnus-moderated-list
20043       "^nnml:rec.zoofle$\\|^rec.zoofle$")
20044 @end lisp
20045
20046
20047 @node Image Enhancements
20048 @section Image Enhancements
20049
20050 XEmacs, as well as Emacs 21, is able to display pictures and stuff, so
20051 Gnus has taken advantage of that.
20052
20053 @menu
20054 * Picons::                      How to display pictures of what you're reading.
20055 * Smileys::                     Show all those happy faces the way they were meant to be shown.
20056 * X-Face::                      Display a funky, teensy black-and-white image.
20057 * Toolbar::                     Click'n'drool.
20058 * XVarious::                    Other XEmacsy Gnusey variables.
20059 @end menu
20060
20061
20062 @node Picons
20063 @subsection Picons
20064
20065 @iftex
20066 @iflatex
20067 \include{picons}
20068 @end iflatex
20069 @end iftex
20070
20071 So@dots{}  You want to slow down your news reader even more!  This is a
20072 good way to do so.  Its also a great way to impress people staring
20073 over your shoulder as you read news.
20074
20075 @menu
20076 * Picon Basics::                What are picons and How do I get them.
20077 * Picon Requirements::          Don't go further if you aren't using XEmacs.
20078 * Easy Picons::                 Displaying Picons---the easy way.
20079 * Hard Picons::                 The way you should do it.  You'll learn something.
20080 * Picon Useless Configuration::  Other variables you can trash/tweak/munge/play with.
20081 @end menu
20082
20083
20084 @node Picon Basics
20085 @subsubsection Picon Basics
20086
20087 What are Picons?  To quote directly from the Picons Web site:
20088
20089 @iftex
20090 @iflatex
20091 \margindex{}
20092 @end iflatex
20093 @end iftex
20094
20095 @quotation
20096 @dfn{Picons} is short for ``personal icons''.  They're small,
20097 constrained images used to represent users and domains on the net,
20098 organized into databases so that the appropriate image for a given
20099 e-mail address can be found.  Besides users and domains, there are picon
20100 databases for Usenet newsgroups and weather forecasts.  The picons are
20101 in either monochrome @code{XBM} format or color @code{XPM} and
20102 @code{GIF} formats.
20103 @end quotation
20104
20105 @vindex gnus-picons-piconsearch-url
20106 If you have a permanent connection to the Internet you can use Steve
20107 Kinzler's Picons Search engine by setting
20108 @code{gnus-picons-piconsearch-url} to the string @*
20109 @uref{http://www.cs.indiana.edu/picons/search.html}.
20110
20111 @vindex gnus-picons-database
20112 Otherwise you need a local copy of his database.  For instructions on
20113 obtaining and installing the picons databases, point your Web browser at @*
20114 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.  Gnus expects
20115 picons to be installed into a location pointed to by
20116 @code{gnus-picons-database}.
20117
20118 If you are using Debian GNU/Linux, saying @samp{apt-get install
20119 picons.*} will install the picons where Gnus can find them.
20120
20121
20122 @node Picon Requirements
20123 @subsubsection Picon Requirements
20124
20125 To have Gnus display Picons for you, you must have @code{x} support
20126 compiled into XEmacs.  To display color picons which are much nicer
20127 than the black & white one, you also need one of @code{xpm} or
20128 @code{gif} compiled into XEmacs.
20129
20130 @vindex gnus-picons-convert-x-face
20131 If you want to display faces from @code{X-Face} headers, you should have
20132 the @code{xface} support compiled into XEmacs.  Otherwise you must have
20133 the @code{netpbm} utilities installed, or munge the
20134 @code{gnus-picons-convert-x-face} variable to use something else.
20135 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20136
20137 @node Easy Picons
20138 @subsubsection Easy Picons
20139
20140 To enable displaying picons, simply put the following line in your
20141 @file{~/.gnus} file and start Gnus.
20142
20143 @lisp
20144 (setq gnus-use-picons t)
20145 (setq gnus-treat-display-picons t)
20146 @end lisp
20147
20148 and make sure @code{gnus-picons-database} points to the directory
20149 containing the Picons databases.
20150
20151 Alternatively if you want to use the web piconsearch engine add this:
20152
20153 @lisp
20154 (setq gnus-picons-piconsearch-url
20155       "http://www.cs.indiana.edu:800/piconsearch")
20156 @end lisp
20157
20158
20159 @node Hard Picons
20160 @subsubsection Hard Picons
20161
20162 @iftex
20163 @iflatex
20164 \margindex{}
20165 @end iflatex
20166 @end iftex
20167
20168 Gnus can display picons for you as you enter and leave groups and
20169 articles.  It knows how to interact with three sections of the picons
20170 database.  Namely, it can display the picons newsgroup pictures,
20171 author's face picture(s), and the authors domain.  To enable this
20172 feature, you need to select where to get the picons from, and where to
20173 display them.
20174
20175 @table @code
20176
20177 @item gnus-picons-database
20178 @vindex gnus-picons-database
20179 The location of the picons database.  Should point to a directory
20180 containing the @file{news}, @file{domains}, @file{users} (and so on)
20181 subdirectories.  This is only useful if
20182 @code{gnus-picons-piconsearch-url} is @code{nil}.  Defaults to
20183 @file{/usr/local/faces/}.
20184
20185 @item gnus-picons-piconsearch-url
20186 @vindex gnus-picons-piconsearch-url
20187 The URL for the web picons search engine.  The only currently known
20188 engine is @uref{http://www.cs.indiana.edu:800/piconsearch}.  To
20189 workaround network delays, icons will be fetched in the background.  If
20190 this is @code{nil} 'the default), then picons are fetched from local
20191 database indicated by @code{gnus-picons-database}.
20192
20193 @item gnus-picons-display-where
20194 @vindex gnus-picons-display-where
20195 Where the picon images should be displayed.  It is @code{picons} by
20196 default (which by default maps to the buffer @samp{*Picons*}).  Other
20197 valid places could be @code{article}, @code{summary}, or
20198 @samp{*scratch*} for all I care.  Just make sure that you've made the
20199 buffer visible using the standard Gnus window configuration
20200 routines---@pxref{Window Layout}.
20201
20202 @item gnus-picons-group-excluded-groups
20203 @vindex gnus-picons-group-excluded-groups
20204 Groups that are matched by this regexp won't have their group icons
20205 displayed.
20206
20207 @end table
20208
20209 Note: If you set @code{gnus-use-picons} to @code{t}, it will set up your
20210 window configuration for you to include the @code{picons} buffer.
20211
20212 Now that you've made those decision, you need to add the following
20213 functions to the appropriate hooks so these pictures will get displayed
20214 at the right time.
20215
20216 @vindex gnus-picons-display-where
20217 @table @code
20218 @item gnus-article-display-picons
20219 @findex gnus-article-display-picons
20220 Looks up and displays the picons for the author and the author's domain
20221 in the @code{gnus-picons-display-where} buffer.
20222
20223 @item gnus-picons-article-display-x-face
20224 @findex gnus-picons-article-display-x-face
20225 Decodes and displays the X-Face header if present.
20226 (NOTE: @code{x-face} is used in the function name, not @code{xface})
20227
20228 @end table
20229
20230
20231
20232 @node Picon Useless Configuration
20233 @subsubsection Picon Useless Configuration
20234
20235 @iftex
20236 @iflatex
20237 \margindex{}
20238 @end iflatex
20239 @end iftex
20240
20241 The following variables offer further control over how things are
20242 done, where things are located, and other useless stuff you really
20243 don't need to worry about.
20244
20245 @table @code
20246
20247 @item gnus-picons-news-directories
20248 @vindex gnus-picons-news-directories
20249 List of subdirectories to search in @code{gnus-picons-database} for
20250 newsgroups faces.  @code{("news")} is the default.
20251
20252 @item gnus-picons-user-directories
20253 @vindex gnus-picons-user-directories
20254 List of subdirectories to search in @code{gnus-picons-database} for user
20255 faces.  @code{("local" "users" "usenix" "misc")} is the default.
20256
20257 @item gnus-picons-domain-directories
20258 @vindex gnus-picons-domain-directories
20259 List of subdirectories to search in @code{gnus-picons-database} for
20260 domain name faces.  Defaults to @code{("domains")}.  Some people may
20261 want to add @samp{"unknown"} to this list.
20262
20263 @item gnus-picons-convert-x-face
20264 @vindex gnus-picons-convert-x-face
20265 If you don't have @code{xface} support builtin XEmacs, this is the
20266 command to use to convert the @code{X-Face} header to an X bitmap
20267 (@code{xbm}).  Defaults to @code{(format "@{ echo '/* Width=48,
20268 Height=48 */'; uncompface; @} | icontopbm | pbmtoxbm > %s"
20269 gnus-picons-x-face-file-name)}
20270 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20271
20272 @item gnus-picons-x-face-file-name
20273 @vindex gnus-picons-x-face-file-name
20274 Names a temporary file to store the @code{X-Face} bitmap in.  Defaults
20275 to @code{(format "/tmp/picon-xface.%s.xbm" (user-login-name))}.
20276 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20277
20278 @item gnus-picons-has-modeline-p
20279 @vindex gnus-picons-has-modeline-p
20280 If you have set @code{gnus-picons-display-where} to @code{picons}, your
20281 XEmacs frame will become really cluttered.  To alleviate this a bit you
20282 can set @code{gnus-picons-has-modeline-p} to @code{nil}; this will
20283 remove the mode line from the Picons buffer.  This is only useful if
20284 @code{gnus-picons-display-where} is @code{picons}.
20285
20286 @item gnus-picons-refresh-before-display
20287 @vindex gnus-picons-refresh-before-display
20288 If non-nil, display the article buffer before computing the picons.
20289 Defaults to @code{nil}.
20290
20291 @item gnus-picons-display-as-address
20292 @vindex gnus-picons-display-as-address
20293 If @code{t} display textual email addresses along with pictures.
20294 Defaults to @code{t}.
20295
20296 @item gnus-picons-file-suffixes
20297 @vindex gnus-picons-file-suffixes
20298 Ordered list of suffixes on picon file names to try.  Defaults to
20299 @code{("xpm" "gif" "xbm")} minus those not builtin your XEmacs.
20300
20301 @item gnus-picons-setup-hook
20302 @vindex gnus-picons-setup-hook
20303 Hook run in the picon buffer, if that is displayed.
20304
20305 @item gnus-picons-display-article-move-p
20306 @vindex gnus-picons-display-article-move-p
20307 Whether to move point to first empty line when displaying picons.  This
20308 has only an effect if `gnus-picons-display-where' has value `article'.
20309
20310 If @code{nil}, display the picons in the @code{From} and
20311 @code{Newsgroups} lines.  This is the default.
20312
20313 @item gnus-picons-clear-cache-on-shutdown
20314 @vindex gnus-picons-clear-cache-on-shutdown
20315 Whether to clear the picons cache when exiting gnus.  Gnus caches every
20316 picons it finds while it is running.  This saves some time in the search
20317 process but eats some memory.  If this variable is set to @code{nil},
20318 Gnus will never clear the cache itself; you will have to manually call
20319 @code{gnus-picons-clear-cache} to clear it.  Otherwise the cache will be
20320 cleared every time you exit Gnus.  Defaults to @code{t}.
20321
20322 @iftex
20323 @iflatex
20324 \margindex{}
20325 @end iflatex
20326 @end iftex
20327
20328 @end table
20329
20330 @node Smileys
20331 @subsection Smileys
20332 @cindex smileys
20333
20334 @iftex
20335 @iflatex
20336 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
20337 \input{smiley}
20338 @end iflatex
20339 @end iftex
20340
20341 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
20342 currently the only package that uses Smiley, it is documented here.
20343
20344 In short---to use Smiley in Gnus, put the following in your
20345 @file{.gnus.el} file:
20346
20347 @lisp
20348 (setq gnus-treat-display-smileys t)
20349 @end lisp
20350
20351 Smiley maps text smiley faces---@samp{:-)}, @samp{:-=}, @samp{:-(} and
20352 the like---to pictures and displays those instead of the text smiley
20353 faces.  The conversion is controlled by a list of regexps that matches
20354 text and maps that to file names.
20355
20356 @vindex smiley-nosey-regexp-alist
20357 @vindex smiley-deformed-regexp-alist
20358 Smiley supplies two example conversion alists by default:
20359 @code{smiley-deformed-regexp-alist} (which matches @samp{:)}, @samp{:(}
20360 and so on), and @code{smiley-nosey-regexp-alist} (which matches
20361 @samp{:-)}, @samp{:-(} and so on).
20362
20363 The alist used is specified by the @code{smiley-regexp-alist} variable,
20364 which defaults to the value of @code{smiley-deformed-regexp-alist}.
20365
20366 The first item in each element is the regexp to be matched; the second
20367 element is the regexp match group that is to be replaced by the picture;
20368 and the third element is the name of the file to be displayed.
20369
20370 The following variables customize where Smiley will look for these
20371 files, as well as the color to be used and stuff:
20372
20373 @table @code
20374
20375 @item smiley-data-directory
20376 @vindex smiley-data-directory
20377 Where Smiley will look for smiley faces files.
20378
20379 @item smiley-flesh-color
20380 @vindex smiley-flesh-color
20381 Skin color.  The default is @samp{yellow}, which is really racist.
20382
20383 @item smiley-features-color
20384 @vindex smiley-features-color
20385 Color of the features of the face.  The default is @samp{black}.
20386
20387 @item smiley-tongue-color
20388 @vindex smiley-tongue-color
20389 Color of the tongue.  The default is @samp{red}.
20390
20391 @item smiley-circle-color
20392 @vindex smiley-circle-color
20393 Color of the circle around the face.  The default is @samp{black}.
20394
20395 @item smiley-mouse-face
20396 @vindex smiley-mouse-face
20397 Face used for mouse highlighting over the smiley face.
20398
20399 @end table
20400
20401
20402 @node X-Face
20403 @subsection X-Face
20404 @cindex x-face
20405
20406 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
20407 depth) image that's supposed to represent the author of the message.
20408 It seems to be supported by an ever-growing number of mail and news
20409 readers.
20410
20411 @cindex x-face
20412 @findex gnus-article-display-x-face
20413 @findex gnus-article-x-face-command
20414 @vindex gnus-article-x-face-command
20415 @vindex gnus-article-x-face-too-ugly
20416 @iftex
20417 @iflatex
20418 \include{xface}
20419 @end iflatex
20420 @end iftex
20421 @c @anchor{X-Face}
20422
20423 Decoding an @code{X-Face} header either requires an Emacs that has
20424 @samp{compface} support (which most XEmacs versions has), or that you
20425 have @samp{compface} installed on your system.  If either is true,
20426 Gnus will default to displaying @code{X-Face} headers.
20427
20428 The variable that controls this is the
20429 @code{gnus-article-x-face-command} variable.  If this variable is a
20430 string, this string will be executed in a sub-shell.  If it is a
20431 function, this function will be called with the face as the argument.
20432 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
20433 the @code{From} header, the face will not be shown.
20434
20435 The default action under Emacs 20 is to fork off the @code{display}
20436 program@footnote{@code{display} is from the ImageMagick package.  For
20437 the @code{uncompface} and @code{icontopbm} programs look for a package
20438 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
20439 view the face.
20440
20441 Under XEmacs or Emacs 21+ with suitable image support, the default
20442 action is to display the face before the @code{From} header.  (It's
20443 nicer if XEmacs has been compiled with @code{X-Face} support---that
20444 will make display somewhat faster.  If there's no native @code{X-Face}
20445 support, Gnus will try to convert the @code{X-Face} header using
20446 external programs from the @code{pbmplus} package and
20447 friends.@footnote{On a GNU/Linux system look for packages with names
20448 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
20449
20450 (NOTE: @code{x-face} is used in the variable/function names, not
20451 @code{xface}).
20452
20453 Gnus provides a few convenience functions and variables to allow
20454 easier insertion of X-Face headers in outgoing messages.
20455
20456 @findex gnus-random-x-face
20457 @code{gnus-random-x-face} goes through all the @samp{pbm} files
20458 in @code{gnus-x-face-directory} and picks one at random, and then
20459 converts it to the X-Face format by using the
20460 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
20461 @samp{pbm} files should be 48x48 pixels big.
20462
20463 @code{gnus-x-face-from-file} takes a file as the parameter, and then
20464 converts the file to X-Face format by using the
20465 @code{gnus-convert-image-to-x-face-command} shell command.
20466
20467 Here's how you would typically use the former function.  Put something
20468 like the folllowing in your @file{.gnus.el} file:
20469
20470 @lisp
20471 (setq message-required-news-headers
20472       (nconc message-required-news-headers
20473              (list '(X-Face . gnus-random-x-face))))
20474 @end lisp
20475
20476 Using the latter function would be something like this:
20477
20478 @lisp
20479 (setq message-required-news-headers
20480       (nconc message-required-news-headers
20481              (list '(X-Face . (lambda ()
20482                                 (gnus-x-face-from-file
20483                                  "~/My-face.gif"))))))
20484 @end lisp
20485
20486
20487 @node Toolbar
20488 @subsection Toolbar
20489
20490 @table @code
20491
20492 @iftex
20493 @iflatex
20494 \margindex{}
20495 @end iflatex
20496 @end iftex
20497
20498 @item gnus-use-toolbar
20499 @vindex gnus-use-toolbar
20500 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
20501 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
20502 @code{right-toolbar}, or @code{left-toolbar}.
20503
20504 @item gnus-group-toolbar
20505 @vindex gnus-group-toolbar
20506 The toolbar in the group buffer.
20507
20508 @item gnus-summary-toolbar
20509 @vindex gnus-summary-toolbar
20510 The toolbar in the summary buffer.
20511
20512 @item gnus-summary-mail-toolbar
20513 @vindex gnus-summary-mail-toolbar
20514 The toolbar in the summary buffer of mail groups.
20515
20516 @end table
20517
20518
20519 @node XVarious
20520 @subsection Various XEmacs Variables
20521
20522 @table @code
20523 @item gnus-xmas-glyph-directory
20524 @vindex gnus-xmas-glyph-directory
20525 This is where Gnus will look for pictures.  Gnus will normally
20526 auto-detect this directory, but you may set it manually if you have an
20527 unusual directory structure.
20528
20529 @item gnus-xmas-logo-color-alist
20530 @vindex gnus-xmas-logo-color-alist
20531 This is an alist where the key is a type symbol and the values are the
20532 foreground and background color of the splash page glyph.
20533
20534 @item gnus-xmas-logo-color-style
20535 @vindex gnus-xmas-logo-color-style
20536 This is the key used to look up the color in the alist described above.
20537 Valid values include @code{flame}, @code{pine}, @code{moss},
20538 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
20539 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
20540
20541 @item gnus-xmas-modeline-glyph
20542 @vindex gnus-xmas-modeline-glyph
20543 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
20544 default.
20545
20546 @iftex
20547 @iflatex
20548 \margindex{}
20549 @end iflatex
20550 @end iftex
20551
20552 @end table
20553
20554
20555
20556
20557 @node Fuzzy Matching
20558 @section Fuzzy Matching
20559 @cindex fuzzy matching
20560
20561 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
20562 things like scoring, thread gathering and thread comparison.
20563
20564 As opposed to regular expression matching, fuzzy matching is very fuzzy.
20565 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
20566 means, and the implementation has changed over time.
20567
20568 Basically, it tries to remove all noise from lines before comparing.
20569 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
20570 out of the strings before comparing the results.  This often leads to
20571 adequate results---even when faced with strings generated by text
20572 manglers masquerading as newsreaders.
20573
20574
20575 @node Thwarting Email Spam
20576 @section Thwarting Email Spam
20577 @cindex email spam
20578 @cindex spam
20579 @cindex UCE
20580 @cindex unsolicited commercial email
20581
20582 In these last days of the Usenet, commercial vultures are hanging about
20583 and grepping through news like crazy to find email addresses they can
20584 foist off their scams and products to.  As a reaction to this, many
20585 people have started putting nonsense addresses into their @code{From}
20586 lines.  I think this is counterproductive---it makes it difficult for
20587 people to send you legitimate mail in response to things you write, as
20588 well as making it difficult to see who wrote what.  This rewriting may
20589 perhaps be a bigger menace than the unsolicited commercial email itself
20590 in the end.
20591
20592 The biggest problem I have with email spam is that it comes in under
20593 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
20594 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
20595 mail group, only to find two pyramid schemes, seven advertisements
20596 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
20597 and one mail asking me to repent and find some god.
20598
20599 This is annoying.
20600
20601 The way to deal with this is having Gnus split out all spam into a
20602 @samp{spam} mail group (@pxref{Splitting Mail}).
20603
20604 First, pick one (1) valid mail address that you can be reached at, and
20605 put it in your @code{From} header of all your news articles.  (I've
20606 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
20607 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
20608 sysadmin whether your sendmail installation accepts keywords in the local
20609 part of the mail address.)
20610
20611 @lisp
20612 (setq message-default-news-headers
20613       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
20614 @end lisp
20615
20616 Then put the following split rule in @code{nnmail-split-fancy}
20617 (@pxref{Fancy Mail Splitting}):
20618
20619 @lisp
20620 (
20621  ...
20622  (to "larsi@@trym.ifi.uio.no"
20623       (| ("subject" "re:.*" "misc")
20624          ("references" ".*@@.*" "misc")
20625          "spam"))
20626  ...
20627 )
20628 @end lisp
20629
20630 This says that all mail to this address is suspect, but if it has a
20631 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
20632 header, it's probably ok.  All the rest goes to the @samp{spam} group.
20633 (This idea probably comes from Tim Pierce.)
20634
20635 In addition, many mail spammers talk directly to your @sc{smtp} server
20636 and do not include your email address explicitly in the @code{To}
20637 header.  Why they do this is unknown---perhaps it's to thwart this
20638 thwarting scheme?  In any case, this is trivial to deal with---you just
20639 put anything not addressed to you in the @samp{spam} group by ending
20640 your fancy split rule in this way:
20641
20642 @lisp
20643 (
20644  ...
20645  (to "larsi" "misc")
20646  "spam")
20647 @end lisp
20648
20649 In my experience, this will sort virtually everything into the right
20650 group.  You still have to check the @samp{spam} group from time to time to
20651 check for legitimate mail, though.  If you feel like being a good net
20652 citizen, you can even send off complaints to the proper authorities on
20653 each unsolicited commercial email---at your leisure.
20654
20655 If you are also a lazy net citizen, you will probably prefer complaining
20656 automatically with the @file{gnus-junk.el} package, available FOR FREE
20657 at @* @uref{http://stud2.tuwien.ac.at/~e9426626/gnus-junk.html}.
20658 Since most e-mail spam is sent automatically, this may reconcile the
20659 cosmic balance somewhat.
20660
20661 This works for me.  It allows people an easy way to contact me (they can
20662 just press @kbd{r} in the usual way), and I'm not bothered at all with
20663 spam.  It's a win-win situation.  Forging @code{From} headers to point
20664 to non-existent domains is yucky, in my opinion.
20665
20666
20667 @node Various Various
20668 @section Various Various
20669 @cindex mode lines
20670 @cindex highlights
20671
20672 @table @code
20673
20674 @item gnus-home-directory
20675 All Gnus path variables will be initialized from this variable, which
20676 defaults to @file{~/}.
20677
20678 @item gnus-directory
20679 @vindex gnus-directory
20680 Most Gnus storage path variables will be initialized from this variable,
20681 which defaults to the @samp{SAVEDIR} environment variable, or
20682 @file{~/News/} if that variable isn't set.
20683
20684 Note that gnus is mostly loaded when the @file{.gnus.el} file is read.
20685 This means that other directory variables that are initialized from this
20686 variable won't be set properly if you set this variable in
20687 @file{.gnus.el}.  Set this variable in @file{.emacs} instead.
20688
20689 @item gnus-default-directory
20690 @vindex gnus-default-directory
20691 Not related to the above variable at all---this variable says what the
20692 default directory of all Gnus buffers should be.  If you issue commands
20693 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
20694 default directory.  If this variable is @code{nil} (which is the
20695 default), the default directory will be the default directory of the
20696 buffer you were in when you started Gnus.
20697
20698 @item gnus-verbose
20699 @vindex gnus-verbose
20700 This variable is an integer between zero and ten.  The higher the value,
20701 the more messages will be displayed.  If this variable is zero, Gnus
20702 will never flash any messages, if it is seven (which is the default),
20703 most important messages will be shown, and if it is ten, Gnus won't ever
20704 shut up, but will flash so many messages it will make your head swim.
20705
20706 @item gnus-verbose-backends
20707 @vindex gnus-verbose-backends
20708 This variable works the same way as @code{gnus-verbose}, but it applies
20709 to the Gnus back ends instead of Gnus proper.
20710
20711 @item nnheader-max-head-length
20712 @vindex nnheader-max-head-length
20713 When the back ends read straight heads of articles, they all try to read
20714 as little as possible.  This variable (default 4096) specifies
20715 the absolute max length the back ends will try to read before giving up
20716 on finding a separator line between the head and the body.  If this
20717 variable is @code{nil}, there is no upper read bound.  If it is
20718 @code{t}, the back ends won't try to read the articles piece by piece,
20719 but read the entire articles.  This makes sense with some versions of
20720 @code{ange-ftp} or @code{efs}.
20721
20722 @item nnheader-head-chop-length
20723 @vindex nnheader-head-chop-length
20724 This variable (default 2048) says how big a piece of each article to
20725 read when doing the operation described above.
20726
20727 @item nnheader-file-name-translation-alist
20728 @vindex nnheader-file-name-translation-alist
20729 @cindex file names
20730 @cindex invalid characters in file names
20731 @cindex characters in file names
20732 This is an alist that says how to translate characters in file names.
20733 For instance, if @samp{:} is invalid as a file character in file names
20734 on your system (you OS/2 user you), you could say something like:
20735
20736 @lisp
20737 (setq nnheader-file-name-translation-alist
20738       '((?: . ?_)))
20739 @end lisp
20740
20741 In fact, this is the default value for this variable on OS/2 and MS
20742 Windows (phooey) systems.
20743
20744 @item gnus-hidden-properties
20745 @vindex gnus-hidden-properties
20746 This is a list of properties to use to hide ``invisible'' text.  It is
20747 @code{(invisible t intangible t)} by default on most systems, which
20748 makes invisible text invisible and intangible.
20749
20750 @item gnus-parse-headers-hook
20751 @vindex gnus-parse-headers-hook
20752 A hook called before parsing headers.  It can be used, for instance, to
20753 gather statistics on the headers fetched, or perhaps you'd like to prune
20754 some headers.  I don't see why you'd want that, though.
20755
20756 @item gnus-shell-command-separator
20757 @vindex gnus-shell-command-separator
20758 String used to separate two shell commands.  The default is @samp{;}.
20759
20760 @item gnus-invalid-group-regexp
20761 @vindex gnus-invalid-group-regexp
20762
20763 Regexp to match ``invalid'' group names when querying user for a group
20764 name.  The default value catches some @strong{really} invalid group
20765 names who could possibly mess up Gnus internally (like allowing
20766 @samp{:} in a group name, which is normally used to delimit method and
20767 group).
20768
20769 @sc{imap} users might want to allow @samp{/} in group names though.
20770
20771
20772 @end table
20773
20774 @node The End
20775 @chapter The End
20776
20777 Well, that's the manual---you can get on with your life now.  Keep in
20778 touch.  Say hello to your cats from me.
20779
20780 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
20781
20782 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
20783
20784 @quotation
20785 @strong{Te Deum}
20786
20787 @sp 1
20788 Not because of victories @*
20789 I sing,@*
20790 having none,@*
20791 but for the common sunshine,@*
20792 the breeze,@*
20793 the largess of the spring.
20794
20795 @sp 1
20796 Not for victory@*
20797 but for the day's work done@*
20798 as well as I was able;@*
20799 not for a seat upon the dais@*
20800 but at the common table.@*
20801 @end quotation
20802
20803
20804 @node Appendices
20805 @chapter Appendices
20806
20807 @menu
20808 * XEmacs::                      Requirements for installing under XEmacs.
20809 * History::                     How Gnus got where it is today.
20810 * On Writing Manuals::          Why this is not a beginner's guide.
20811 * Terminology::                 We use really difficult, like, words here.
20812 * Customization::               Tailoring Gnus to your needs.
20813 * Troubleshooting::             What you might try if things do not work.
20814 * Gnus Reference Guide::        Rilly, rilly technical stuff.
20815 * Emacs for Heathens::          A short introduction to Emacsian terms.
20816 * Frequently Asked Questions::
20817 @end menu
20818
20819
20820 @node XEmacs
20821 @section XEmacs
20822 @cindex XEmacs
20823 @cindex Installing under XEmacs
20824
20825 XEmacs is distributed as a collection of packages.  You should install
20826 whatever packages the Gnus XEmacs package requires.  The current
20827 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
20828 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
20829 @samp{xemacs-base}, and @samp{fsf-compat}.
20830
20831
20832 @node History
20833 @section History
20834
20835 @cindex history
20836 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
20837 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
20838
20839 If you want to investigate the person responsible for this outrage,
20840 you can point your (feh!) web browser to
20841 @uref{http://quimby.gnus.org/}.  This is also the primary
20842 distribution point for the new and spiffy versions of Gnus, and is
20843 known as The Site That Destroys Newsrcs And Drives People Mad.
20844
20845 During the first extended alpha period of development, the new Gnus was
20846 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
20847 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
20848 (Besides, the ``Gnus'' in this abbreviation should probably be
20849 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
20850 appropriate name, don't you think?)
20851
20852 In any case, after spending all that energy on coming up with a new and
20853 spunky name, we decided that the name was @emph{too} spunky, so we
20854 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
20855 ``@sc{gnus}''.  New vs. old.
20856
20857 @menu
20858 * Gnus Versions::               What Gnus versions have been released.
20859 * Other Gnus Versions::         Other Gnus versions that also have been released.
20860 * Why?::                        What's the point of Gnus?
20861 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
20862 * Conformity::                  Gnus tries to conform to all standards.
20863 * Emacsen::                     Gnus can be run on a few modern Emacsen.
20864 * Gnus Development::            How Gnus is developed.
20865 * Contributors::                Oodles of people.
20866 * New Features::                Pointers to some of the new stuff in Gnus.
20867 @end menu
20868
20869
20870 @node Gnus Versions
20871 @subsection Gnus Versions
20872 @cindex ding Gnus
20873 @cindex September Gnus
20874 @cindex Red Gnus
20875 @cindex Quassia Gnus
20876 @cindex Pterodactyl Gnus
20877 @cindex Oort Gnus
20878 @cindex No Gnus
20879
20880 The first ``proper'' release of Gnus 5 was done in November 1995 when it
20881 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
20882 plus 15 Gnus 5.0 releases).
20883
20884 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
20885 releases)) was released under the name ``Gnus 5.2'' (40 releases).
20886
20887 On July 28th 1996 work on Red Gnus was begun, and it was released on
20888 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
20889
20890 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
20891 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
20892
20893 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
20894 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
20895 1999.
20896
20897 On the 26th of October 2000, Oort Gnus was begun.
20898
20899 If you happen upon a version of Gnus that has a prefixed name --
20900 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
20901 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
20902 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
20903 run.  Walk away, calmly, until you're out of its reach.  Find a proper
20904 released version of Gnus and snuggle up to that instead.
20905
20906
20907 @node Other Gnus Versions
20908 @subsection Other Gnus Versions
20909 @cindex Semi-gnus
20910
20911 In addition to the versions of Gnus which have had their releases
20912 coordinated by Lars, one major development has been Semi-gnus from
20913 Japan.  It's based on a library called @sc{semi}, which provides
20914 @sc{mime} capabilities.
20915
20916 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
20917 Collectively, they are called ``Semi-gnus'', and different strains are
20918 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
20919 @sc{mime} and multilingualization things, especially important for
20920 Japanese users.
20921
20922
20923 @node Why?
20924 @subsection Why?
20925
20926 What's the point of Gnus?
20927
20928 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
20929 newsreader, that lets you do anything you can think of.  That was my
20930 original motivation, but while working on Gnus, it has become clear to
20931 me that this generation of newsreaders really belong in the stone age.
20932 Newsreaders haven't developed much since the infancy of the net.  If the
20933 volume continues to rise with the current rate of increase, all current
20934 newsreaders will be pretty much useless.  How do you deal with
20935 newsgroups that have thousands of new articles each day?  How do you
20936 keep track of millions of people who post?
20937
20938 Gnus offers no real solutions to these questions, but I would very much
20939 like to see Gnus being used as a testing ground for new methods of
20940 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
20941 to separate the newsreader from the back ends, Gnus now offers a simple
20942 interface for anybody who wants to write new back ends for fetching mail
20943 and news from different sources.  I have added hooks for customizations
20944 everywhere I could imagine it being useful.  By doing so, I'm inviting
20945 every one of you to explore and invent.
20946
20947 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
20948 @kbd{C-u 100 M-x all-hail-xemacs}.
20949
20950
20951 @node Compatibility
20952 @subsection Compatibility
20953
20954 @cindex compatibility
20955 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
20956 bindings have been kept.  More key bindings have been added, of course,
20957 but only in one or two obscure cases have old bindings been changed.
20958
20959 Our motto is:
20960 @quotation
20961 @cartouche
20962 @center In a cloud bones of steel.
20963 @end cartouche
20964 @end quotation
20965
20966 All commands have kept their names.  Some internal functions have changed
20967 their names.
20968
20969 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
20970 Articles}.
20971
20972 One major compatibility question is the presence of several summary
20973 buffers.  All variables relevant while reading a group are
20974 buffer-local to the summary buffer they belong in.  Although many
20975 important variables have their values copied into their global
20976 counterparts whenever a command is executed in the summary buffer, this
20977 change might lead to incorrect values being used unless you are careful.
20978
20979 All code that relies on knowledge of @sc{gnus} internals will probably
20980 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
20981 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
20982 maintains a hash table that points to the entries in this alist (which
20983 speeds up many functions), and changing the alist directly will lead to
20984 peculiar results.
20985
20986 @cindex hilit19
20987 @cindex highlighting
20988 Old hilit19 code does not work at all.  In fact, you should probably
20989 remove all hilit code from all Gnus hooks
20990 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
20991 Gnus provides various integrated functions for highlighting.  These are
20992 faster and more accurate.  To make life easier for everybody, Gnus will
20993 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
20994 Away!
20995
20996 Packages like @code{expire-kill} will no longer work.  As a matter of
20997 fact, you should probably remove all old @sc{gnus} packages (and other
20998 code) when you start using Gnus.  More likely than not, Gnus already
20999 does what you have written code to make @sc{gnus} do.  (Snicker.)
21000
21001 Even though old methods of doing things are still supported, only the
21002 new methods are documented in this manual.  If you detect a new method of
21003 doing something while reading this manual, that does not mean you have
21004 to stop doing it the old way.
21005
21006 Gnus understands all @sc{gnus} startup files.
21007
21008 @kindex M-x gnus-bug
21009 @findex gnus-bug
21010 @cindex reporting bugs
21011 @cindex bugs
21012 Overall, a casual user who hasn't written much code that depends on
21013 @sc{gnus} internals should suffer no problems.  If problems occur,
21014 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
21015
21016 @vindex gnus-bug-create-help-buffer
21017 If you are in the habit of sending bug reports @emph{very} often, you
21018 may find the helpful help buffer annoying after a while.  If so, set
21019 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
21020 up at you.
21021
21022
21023 @node Conformity
21024 @subsection Conformity
21025
21026 No rebels without a clue here, ma'am.  We conform to all standards known
21027 to (wo)man.  Except for those standards and/or conventions we disagree
21028 with, of course.
21029
21030 @table @strong
21031
21032 @item RFC (2)822
21033 @cindex RFC 822
21034 @cindex RFC 2822
21035 There are no known breaches of this standard.
21036
21037 @item RFC 1036
21038 @cindex RFC 1036
21039 There are no known breaches of this standard, either.
21040
21041 @item Son-of-RFC 1036
21042 @cindex Son-of-RFC 1036
21043 We do have some breaches to this one.
21044
21045 @table @emph
21046
21047 @item X-Newsreader
21048 @itemx User-Agent
21049 These are considered to be ``vanity headers'', while I consider them
21050 to be consumer information.  After seeing so many badly formatted
21051 articles coming from @code{tin} and @code{Netscape} I know not to use
21052 either of those for posting articles.  I would not have known that if
21053 it wasn't for the @code{X-Newsreader} header.
21054 @end table
21055
21056 @item USEFOR
21057 @cindex USEFOR
21058 USEFOR is an IETF working group writing a successor to RFC 1036, based
21059 on Son-of-RFC 1036.  They have produced a number of drafts proposing
21060 various changes to the format of news articles.  The Gnus towers will
21061 look into implementing the changes when the draft is accepted as an RFC.
21062
21063 @item MIME - RFC 2045-2049 etc
21064 @cindex MIME
21065 All the various @sc{mime} RFCs are supported.
21066
21067 @item Disposition Notifications - RFC 2298
21068 Message Mode is able to request notifications from the receiver.
21069
21070 @item PGP - RFC 1991 and RFC 2440
21071 @cindex RFC 1991
21072 @cindex RFC 2440
21073 RFC 1991 is the original PGP message specification, published as a
21074 Information RFC.  RFC 2440 was the follow-up, now called Open PGP, and
21075 put on the Standards Track.  Both document a non-@sc{mime} aware PGP
21076 format.  Gnus supports both encoding (signing and encryption) and
21077 decoding (verification and decryption).
21078
21079 @item PGP/MIME - RFC 2015/3156
21080 RFC 2015 (superceded by 3156 which references RFC 2440 instead of RFC
21081 1991) describes the @sc{mime}-wrapping around the RF 1991/2440 format.
21082 Gnus supports both encoding and decoding.
21083
21084 @item S/MIME - RFC 2633
21085 RFC 2633 describes the @sc{s/mime} format.
21086
21087 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
21088 RFC 1730 is @sc{imap} version 4, updated somewhat by RFC 2060 (@sc{imap} 4
21089 revision 1).  RFC 2195 describes CRAM-MD5 authentication for @sc{imap}. RFC
21090 2086 describes access control lists (ACLs) for @sc{imap}. RFC 2359
21091 describes a @sc{imap} protocol enhancement.  RFC 2595 describes the proper
21092 TLS integration (STARTTLS) with @sc{imap}.  RFC 1731 describes the
21093 GSSAPI/Kerberos4 mechanisms for @sc{imap}.
21094
21095 @end table
21096
21097 If you ever notice Gnus acting non-compliant with regards to the texts
21098 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
21099 know.
21100
21101
21102 @node Emacsen
21103 @subsection Emacsen
21104 @cindex Emacsen
21105 @cindex XEmacs
21106 @cindex Mule
21107 @cindex Emacs
21108
21109 Gnus should work on :
21110
21111 @itemize @bullet
21112
21113 @item
21114 Emacs 20.3 and up.
21115
21116 @item
21117 XEmacs 21.1.1 and up.
21118
21119 @end itemize
21120
21121 This Gnus version will absolutely not work on any Emacsen older than
21122 that.  Not reliably, at least.  Older versions of Gnus may work on older
21123 Emacs versions.  However, T-gnus does support ``Mule 2.3 based on Emacs
21124 19.34'' and possibly the versions of XEmacs prior to 21.1.1, e.g. 20.4.
21125 See the file ``README'' in the T-gnus distribution for more details.
21126
21127 There are some vague differences between Gnus on the various
21128 platforms---XEmacs features more graphics (a logo and a toolbar)---but
21129 other than that, things should look pretty much the same under all
21130 Emacsen.
21131
21132
21133 @node Gnus Development
21134 @subsection Gnus Development
21135
21136 Gnus is developed in a two-phased cycle.  The first phase involves much
21137 discussion on the @samp{ding@@gnus.org} mailing list, where people
21138 propose changes and new features, post patches and new back ends.  This
21139 phase is called the @dfn{alpha} phase, since the Gnusae released in this
21140 phase are @dfn{alpha releases}, or (perhaps more commonly in other
21141 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
21142 unstable and should not be used by casual users.  Gnus alpha releases
21143 have names like ``Red Gnus'' and ``Quassia Gnus''.
21144
21145 After futzing around for 50-100 alpha releases, Gnus is declared
21146 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
21147 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
21148 supposed to be able to use these, and these are mostly discussed on the
21149 @samp{gnu.emacs.gnus} newsgroup.
21150
21151 @cindex Incoming*
21152 @vindex mail-source-delete-incoming
21153 Some variable defaults differ between alpha Gnusae and released Gnusae.
21154 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
21155 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
21156 lossage of mail if an alpha release hiccups while handling the mail.
21157
21158 The division of discussion between the ding mailing list and the Gnus
21159 newsgroup is not purely based on publicity concerns.  It's true that
21160 having people write about the horrible things that an alpha Gnus release
21161 can do (sometimes) in a public forum may scare people off, but more
21162 importantly, talking about new experimental features that have been
21163 introduced may confuse casual users.  New features are frequently
21164 introduced, fiddled with, and judged to be found wanting, and then
21165 either discarded or totally rewritten.  People reading the mailing list
21166 usually keep up with these rapid changes, while people on the newsgroup
21167 can't be assumed to do so.
21168
21169
21170
21171 @node Contributors
21172 @subsection Contributors
21173 @cindex contributors
21174
21175 The new Gnus version couldn't have been done without the help of all the
21176 people on the (ding) mailing list.  Every day for over a year I have
21177 gotten billions of nice bug reports from them, filling me with joy,
21178 every single one of them.  Smooches.  The people on the list have been
21179 tried beyond endurance, what with my ``oh, that's a neat idea <type
21180 type>, yup, I'll release it right away <ship off> no wait, that doesn't
21181 work at all <type type>, yup, I'll ship that one off right away <ship
21182 off> no, wait, that absolutely does not work'' policy for releases.
21183 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
21184 ``worser''? ``much worser''?  ``worsest''?)
21185
21186 I would like to take this opportunity to thank the Academy for...  oops,
21187 wrong show.
21188
21189 @itemize @bullet
21190
21191 @item
21192 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
21193
21194 @item
21195 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
21196 nnwarchive and many, many other things connected with @sc{mime} and
21197 other types of en/decoding, as well as general bug fixing, new
21198 functionality and stuff.
21199
21200 @item
21201 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
21202 well as numerous other things).
21203
21204 @item
21205 Luis Fernandes---design and graphics.
21206
21207 @item
21208 Joe Reiss---creator of the smiley faces.
21209
21210 @item
21211 Justin Sheehy--the FAQ maintainer.
21212
21213 @item
21214 Erik Naggum---help, ideas, support, code and stuff.
21215
21216 @item
21217 Wes Hardaker---@file{gnus-picon.el} and the manual section on
21218 @dfn{picons} (@pxref{Picons}).
21219
21220 @item
21221 Kim-Minh Kaplan---further work on the picon code.
21222
21223 @item
21224 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
21225 (@pxref{GroupLens}).
21226
21227 @item
21228 Sudish Joseph---innumerable bug fixes.
21229
21230 @item
21231 Ilja Weis---@file{gnus-topic.el}.
21232
21233 @item
21234 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
21235
21236 @item
21237 Vladimir Alexiev---the refcard and reference booklets.
21238
21239 @item
21240 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
21241 distribution by Felix Lee and JWZ.
21242
21243 @item
21244 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
21245
21246 @item
21247 Peter Mutsaers---orphan article scoring code.
21248
21249 @item
21250 Ken Raeburn---POP mail support.
21251
21252 @item
21253 Hallvard B Furuseth---various bits and pieces, especially dealing with
21254 .newsrc files.
21255
21256 @item
21257 Brian Edmonds---@file{gnus-bbdb.el}.
21258
21259 @item
21260 David Moore---rewrite of @file{nnvirtual.el} and many other things.
21261
21262 @item
21263 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
21264
21265 @item
21266 François Pinard---many, many interesting and thorough bug reports, as
21267 well as autoconf support.
21268
21269 @end itemize
21270
21271 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
21272 Borges, and Jost Krieger proof-reading parts of the manual.
21273
21274 The following people have contributed many patches and suggestions:
21275
21276 Christopher Davis,
21277 Andrew Eskilsson,
21278 Kai Grossjohann,
21279 David KÃ¥gedal,
21280 Richard Pieri,
21281 Fabrice Popineau,
21282 Daniel Quinlan,
21283 Jason L. Tibbitts, III,
21284 and
21285 Jack Vinson.
21286
21287 Also thanks to the following for patches and stuff:
21288
21289 Jari Aalto,
21290 Adrian Aichner,
21291 Vladimir Alexiev,
21292 Russ Allbery,
21293 Peter Arius,
21294 Matt Armstrong,
21295 Marc Auslander,
21296 Miles Bader,
21297 Alexei V. Barantsev,
21298 Frank Bennett,
21299 Robert Bihlmeyer,
21300 Chris Bone,
21301 Mark Borges,
21302 Mark Boyns,
21303 Lance A. Brown,
21304 Rob Browning,
21305 Kees de Bruin,
21306 Martin Buchholz,
21307 Joe Buehler,
21308 Kevin Buhr,
21309 Alastair Burt,
21310 Joao Cachopo,
21311 Zlatko Calusic,
21312 Massimo Campostrini,
21313 Castor,
21314 David Charlap,
21315 Dan Christensen,
21316 Kevin Christian,
21317 Jae-you Chung, @c ?
21318 James H. Cloos, Jr.,
21319 Laura Conrad,
21320 Michael R. Cook,
21321 Glenn Coombs,
21322 Andrew J. Cosgriff,
21323 Neil Crellin,
21324 Frank D. Cringle,
21325 Geoffrey T. Dairiki,
21326 Andre Deparade,
21327 Ulrik Dickow,
21328 Dave Disser,
21329 Rui-Tao Dong, @c ?
21330 Joev Dubach,
21331 Michael Welsh Duggan,
21332 Dave Edmondson,
21333 Paul Eggert,
21334 Mark W. Eichin,
21335 Karl Eichwalder,
21336 Enami Tsugutomo, @c Enami
21337 Michael Ernst,
21338 Luc Van Eycken,
21339 Sam Falkner,
21340 Nelson Jose dos Santos Ferreira,
21341 Sigbjorn Finne,
21342 Sven Fischer,
21343 Paul Fisher,
21344 Decklin Foster,
21345 Gary D. Foster,
21346 Paul Franklin,
21347 Guy Geens,
21348 Arne Georg Gleditsch,
21349 David S. Goldberg,
21350 Michelangelo Grigni,
21351 Dale Hagglund,
21352 D. Hall,
21353 Magnus Hammerin,
21354 Kenichi Handa, @c Handa
21355 Raja R. Harinath,
21356 Yoshiki Hayashi, @c ?
21357 P. E. Jareth Hein,
21358 Hisashige Kenji, @c Hisashige
21359 Scott Hofmann,
21360 Marc Horowitz,
21361 Gunnar Horrigmo,
21362 Richard Hoskins,
21363 Brad Howes,
21364 Miguel de Icaza,
21365 François Felix Ingrand,
21366 Tatsuya Ichikawa, @c ?
21367 Ishikawa Ichiro, @c Ishikawa
21368 Lee Iverson,
21369 Iwamuro Motonori, @c Iwamuro
21370 Rajappa Iyer,
21371 Andreas Jaeger,
21372 Adam P. Jenkins,
21373 Randell Jesup,
21374 Fred Johansen,
21375 Gareth Jones,
21376 Simon Josefsson,
21377 Greg Klanderman,
21378 Karl Kleinpaste,
21379 Michael Klingbeil,
21380 Peter Skov Knudsen,
21381 Shuhei Kobayashi, @c Kobayashi
21382 Petr Konecny,
21383 Koseki Yoshinori, @c Koseki
21384 Thor Kristoffersen,
21385 Jens Lautenbacher,
21386 Martin Larose,
21387 Seokchan Lee, @c Lee
21388 Joerg Lenneis,
21389 Carsten Leonhardt,
21390 James LewisMoss,
21391 Christian Limpach,
21392 Markus Linnala,
21393 Dave Love,
21394 Mike McEwan,
21395 Tonny Madsen,
21396 Shlomo Mahlab,
21397 Nat Makarevitch,
21398 Istvan Marko,
21399 David Martin,
21400 Jason R. Mastaler,
21401 Gordon Matzigkeit,
21402 Timo Metzemakers,
21403 Richard Mlynarik,
21404 Lantz Moore,
21405 Morioka Tomohiko, @c Morioka
21406 Erik Toubro Nielsen,
21407 Hrvoje Niksic,
21408 Andy Norman,
21409 Fred Oberhauser,
21410 C. R. Oldham,
21411 Alexandre Oliva,
21412 Ken Olstad,
21413 Masaharu Onishi, @c Onishi
21414 Hideki Ono, @c Ono
21415 Ettore Perazzoli,
21416 William Perry,
21417 Stephen Peters,
21418 Jens-Ulrik Holger Petersen,
21419 Ulrich Pfeifer,
21420 Matt Pharr,
21421 Andy Piper,
21422 John McClary Prevost,
21423 Bill Pringlemeir,
21424 Mike Pullen,
21425 Jim Radford,
21426 Colin Rafferty,
21427 Lasse Rasinen,
21428 Lars Balker Rasmussen,
21429 Joe Reiss,
21430 Renaud Rioboo,
21431 Roland B. Roberts,
21432 Bart Robinson,
21433 Christian von Roques,
21434 Markus Rost,
21435 Jason Rumney,
21436 Wolfgang Rupprecht,
21437 Jay Sachs,
21438 Dewey M. Sasser,
21439 Conrad Sauerwald,
21440 Loren Schall,
21441 Dan Schmidt,
21442 Ralph Schleicher,
21443 Philippe Schnoebelen,
21444 Andreas Schwab,
21445 Randal L. Schwartz,
21446 Danny Siu,
21447 Matt Simmons,
21448 Paul D. Smith,
21449 Jeff Sparkes,
21450 Toby Speight,
21451 Michael Sperber,
21452 Darren Stalder,
21453 Richard Stallman,
21454 Greg Stark,
21455 Sam Steingold,
21456 Paul Stevenson,
21457 Jonas Steverud,
21458 Paul Stodghill,
21459 Kiyokazu Suto, @c Suto
21460 Kurt Swanson,
21461 Samuel Tardieu,
21462 Teddy,
21463 Chuck Thompson,
21464 Tozawa Akihiko, @c Tozawa
21465 Philippe Troin,
21466 James Troup,
21467 Trung Tran-Duc,
21468 Jack Twilley,
21469 Aaron M. Ucko,
21470 Aki Vehtari,
21471 Didier Verna,
21472 Vladimir Volovich,
21473 Jan Vroonhof,
21474 Stefan Waldherr,
21475 Pete Ware,
21476 Barry A. Warsaw,
21477 Christoph Wedler,
21478 Joe Wells,
21479 Lee Willis,
21480 Katsumi Yamaoka @c Yamaoka
21481 and
21482 Lloyd Zusman.
21483
21484
21485 For a full overview of what each person has done, the ChangeLogs
21486 included in the Gnus alpha distributions should give ample reading
21487 (550kB and counting).
21488
21489 Apologies to everybody that I've forgotten, of which there are many, I'm
21490 sure.
21491
21492 Gee, that's quite a list of people.  I guess that must mean that there
21493 actually are people who are using Gnus.  Who'd'a thunk it!
21494
21495
21496 @node New Features
21497 @subsection New Features
21498 @cindex new features
21499
21500 @menu
21501 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
21502 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
21503 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
21504 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
21505 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
21506 @end menu
21507
21508 These lists are, of course, just @emph{short} overviews of the
21509 @emph{most} important new features.  No, really.  There are tons more.
21510 Yes, we have feeping creaturism in full effect.
21511
21512 @node ding Gnus
21513 @subsubsection (ding) Gnus
21514
21515 New features in Gnus 5.0/5.1:
21516
21517 @itemize @bullet
21518
21519 @item
21520 The look of all buffers can be changed by setting format-like variables
21521 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
21522
21523 @item
21524 Local spool and several @sc{nntp} servers can be used at once
21525 (@pxref{Select Methods}).
21526
21527 @item
21528 You can combine groups into virtual groups (@pxref{Virtual Groups}).
21529
21530 @item
21531 You can read a number of different mail formats (@pxref{Getting Mail}).
21532 All the mail back ends implement a convenient mail expiry scheme
21533 (@pxref{Expiring Mail}).
21534
21535 @item
21536 Gnus can use various strategies for gathering threads that have lost
21537 their roots (thereby gathering loose sub-threads into one thread) or it
21538 can go back and retrieve enough headers to build a complete thread
21539 (@pxref{Customizing Threading}).
21540
21541 @item
21542 Killed groups can be displayed in the group buffer, and you can read
21543 them as well (@pxref{Listing Groups}).
21544
21545 @item
21546 Gnus can do partial group updates---you do not have to retrieve the
21547 entire active file just to check for new articles in a few groups
21548 (@pxref{The Active File}).
21549
21550 @item
21551 Gnus implements a sliding scale of subscribedness to groups
21552 (@pxref{Group Levels}).
21553
21554 @item
21555 You can score articles according to any number of criteria
21556 (@pxref{Scoring}).  You can even get Gnus to find out how to score
21557 articles for you (@pxref{Adaptive Scoring}).
21558
21559 @item
21560 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
21561 manner, so it should be difficult to lose much data on what you have
21562 read if your machine should go down (@pxref{Auto Save}).
21563
21564 @item
21565 Gnus now has its own startup file (@file{.gnus}) to avoid cluttering up
21566 the @file{.emacs} file.
21567
21568 @item
21569 You can set the process mark on both groups and articles and perform
21570 operations on all the marked items (@pxref{Process/Prefix}).
21571
21572 @item
21573 You can grep through a subset of groups and create a group from the
21574 results (@pxref{Kibozed Groups}).
21575
21576 @item
21577 You can list subsets of groups according to, well, anything
21578 (@pxref{Listing Groups}).
21579
21580 @item
21581 You can browse foreign servers and subscribe to groups from those
21582 servers (@pxref{Browse Foreign Server}).
21583
21584 @item
21585 Gnus can fetch articles, asynchronously, on a second connection to the
21586 server (@pxref{Asynchronous Fetching}).
21587
21588 @item
21589 You can cache articles locally (@pxref{Article Caching}).
21590
21591 @item
21592 The uudecode functions have been expanded and generalized
21593 (@pxref{Decoding Articles}).
21594
21595 @item
21596 You can still post uuencoded articles, which was a little-known feature
21597 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
21598
21599 @item
21600 Fetching parents (and other articles) now actually works without
21601 glitches (@pxref{Finding the Parent}).
21602
21603 @item
21604 Gnus can fetch FAQs and group descriptions (@pxref{Group Information}).
21605
21606 @item
21607 Digests (and other files) can be used as the basis for groups
21608 (@pxref{Document Groups}).
21609
21610 @item
21611 Articles can be highlighted and customized (@pxref{Customizing
21612 Articles}).
21613
21614 @item
21615 URLs and other external references can be buttonized (@pxref{Article
21616 Buttons}).
21617
21618 @item
21619 You can do lots of strange stuff with the Gnus window & frame
21620 configuration (@pxref{Window Layout}).
21621
21622 @item
21623 You can click on buttons instead of using the keyboard
21624 (@pxref{Buttons}).
21625
21626 @end itemize
21627
21628
21629 @node September Gnus
21630 @subsubsection September Gnus
21631
21632 @iftex
21633 @iflatex
21634 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
21635 @end iflatex
21636 @end iftex
21637
21638 New features in Gnus 5.2/5.3:
21639
21640 @itemize @bullet
21641
21642 @item
21643 A new message composition mode is used.  All old customization variables
21644 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
21645 now obsolete.
21646
21647 @item
21648 Gnus is now able to generate @dfn{sparse} threads---threads where
21649 missing articles are represented by empty nodes (@pxref{Customizing
21650 Threading}).
21651
21652 @lisp
21653 (setq gnus-build-sparse-threads 'some)
21654 @end lisp
21655
21656 @item
21657 Outgoing articles are stored on a special archive server
21658 (@pxref{Archived Messages}).
21659
21660 @item
21661 Partial thread regeneration now happens when articles are
21662 referred.
21663
21664 @item
21665 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
21666
21667 @item
21668 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
21669
21670 @item
21671 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
21672
21673 @lisp
21674 (setq gnus-use-trees t)
21675 @end lisp
21676
21677 @item
21678 An @code{nn}-like pick-and-read minor mode is available for the summary
21679 buffers (@pxref{Pick and Read}).
21680
21681 @lisp
21682 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
21683 @end lisp
21684
21685 @item
21686 In binary groups you can use a special binary minor mode (@pxref{Binary
21687 Groups}).
21688
21689 @item
21690 Groups can be grouped in a folding topic hierarchy (@pxref{Group
21691 Topics}).
21692
21693 @lisp
21694 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
21695 @end lisp
21696
21697 @item
21698 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
21699
21700 @item
21701 Groups can now have a score, and bubbling based on entry frequency
21702 is possible (@pxref{Group Score}).
21703
21704 @lisp
21705 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
21706 @end lisp
21707
21708 @item
21709 Groups can be process-marked, and commands can be performed on
21710 groups of groups (@pxref{Marking Groups}).
21711
21712 @item
21713 Caching is possible in virtual groups.
21714
21715 @item
21716 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
21717 news batches, ClariNet briefs collections, and just about everything
21718 else (@pxref{Document Groups}).
21719
21720 @item
21721 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
21722 (@pxref{SOUP}).
21723
21724 @item
21725 The Gnus cache is much faster.
21726
21727 @item
21728 Groups can be sorted according to many criteria (@pxref{Sorting
21729 Groups}).
21730
21731 @item
21732 New group parameters have been introduced to set list-addresses and
21733 expiry times (@pxref{Group Parameters}).
21734
21735 @item
21736 All formatting specs allow specifying faces to be used
21737 (@pxref{Formatting Fonts}).
21738
21739 @item
21740 There are several more commands for setting/removing/acting on process
21741 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
21742
21743 @item
21744 The summary buffer can be limited to show parts of the available
21745 articles based on a wide range of criteria.  These commands have been
21746 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
21747
21748 @item
21749 Articles can be made persistent with the @kbd{*} command
21750 (@pxref{Persistent Articles}).
21751
21752 @item
21753 All functions for hiding article elements are now toggles.
21754
21755 @item
21756 Article headers can be buttonized (@pxref{Article Washing}).
21757
21758 @item
21759 All mail back ends support fetching articles by @code{Message-ID}.
21760
21761 @item
21762 Duplicate mail can now be treated properly (@pxref{Duplicates}).
21763
21764 @item
21765 All summary mode commands are available directly from the article
21766 buffer (@pxref{Article Keymap}).
21767
21768 @item
21769 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
21770 Layout}).
21771
21772 @item
21773 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
21774 @iftex
21775 @iflatex
21776 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
21777 @end iflatex
21778 @end iftex
21779
21780 @item
21781 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
21782
21783 @lisp
21784 (setq gnus-use-nocem t)
21785 @end lisp
21786
21787 @item
21788 Groups can be made permanently visible (@pxref{Listing Groups}).
21789
21790 @lisp
21791 (setq gnus-permanently-visible-groups "^nnml:")
21792 @end lisp
21793
21794 @item
21795 Many new hooks have been introduced to make customizing easier.
21796
21797 @item
21798 Gnus respects the @code{Mail-Copies-To} header.
21799
21800 @item
21801 Threads can be gathered by looking at the @code{References} header
21802 (@pxref{Customizing Threading}).
21803
21804 @lisp
21805 (setq gnus-summary-thread-gathering-function
21806       'gnus-gather-threads-by-references)
21807 @end lisp
21808
21809 @item
21810 Read articles can be stored in a special backlog buffer to avoid
21811 refetching (@pxref{Article Backlog}).
21812
21813 @lisp
21814 (setq gnus-keep-backlog 50)
21815 @end lisp
21816
21817 @item
21818 A clean copy of the current article is always stored in a separate
21819 buffer to allow easier treatment.
21820
21821 @item
21822 Gnus can suggest where to save articles (@pxref{Saving Articles}).
21823
21824 @item
21825 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
21826 Articles}).
21827
21828 @lisp
21829 (setq gnus-prompt-before-saving t)
21830 @end lisp
21831
21832 @item
21833 @code{gnus-uu} can view decoded files asynchronously while fetching
21834 articles (@pxref{Other Decode Variables}).
21835
21836 @lisp
21837 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
21838 @end lisp
21839
21840 @item
21841 Filling in the article buffer now works properly on cited text
21842 (@pxref{Article Washing}).
21843
21844 @item
21845 Hiding cited text adds buttons to toggle hiding, and how much
21846 cited text to hide is now customizable (@pxref{Article Hiding}).
21847
21848 @lisp
21849 (setq gnus-cited-lines-visible 2)
21850 @end lisp
21851
21852 @item
21853 Boring headers can be hidden (@pxref{Article Hiding}).
21854
21855 @item
21856 Default scoring values can now be set from the menu bar.
21857
21858 @item
21859 Further syntax checking of outgoing articles have been added.
21860
21861 @end itemize
21862
21863
21864 @node Red Gnus
21865 @subsubsection Red Gnus
21866
21867 New features in Gnus 5.4/5.5:
21868
21869 @iftex
21870 @iflatex
21871 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
21872 @end iflatex
21873 @end iftex
21874
21875 @itemize @bullet
21876
21877 @item
21878 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
21879
21880 @item
21881 Article prefetching functionality has been moved up into
21882 Gnus (@pxref{Asynchronous Fetching}).
21883
21884 @item
21885 Scoring can now be performed with logical operators like @code{and},
21886 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
21887 Scoring}).
21888
21889 @item
21890 Article washing status can be displayed in the
21891 article mode line (@pxref{Misc Article}).
21892
21893 @item
21894 @file{gnus.el} has been split into many smaller files.
21895
21896 @item
21897 Suppression of duplicate articles based on Message-ID can be done
21898 (@pxref{Duplicate Suppression}).
21899
21900 @lisp
21901 (setq gnus-suppress-duplicates t)
21902 @end lisp
21903
21904 @item
21905 New variables for specifying what score and adapt files are to be
21906 considered home score and adapt files (@pxref{Home Score File}) have
21907 been added.
21908
21909 @item
21910 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
21911 Server Internals}).
21912
21913 @item
21914 Groups can inherit group parameters from parent topics (@pxref{Topic
21915 Parameters}).
21916
21917 @item
21918 Article editing has been revamped and is now actually usable.
21919
21920 @item
21921 Signatures can be recognized in more intelligent fashions
21922 (@pxref{Article Signature}).
21923
21924 @item
21925 Summary pick mode has been made to look more @code{nn}-like.  Line
21926 numbers are displayed and the @kbd{.} command can be used to pick
21927 articles (@code{Pick and Read}).
21928
21929 @item
21930 Commands for moving the @file{.newsrc.eld} from one server to
21931 another have been added (@pxref{Changing Servers}).
21932
21933 @item
21934 There's a way now to specify that ``uninteresting'' fields be suppressed
21935 when generating lines in buffers (@pxref{Advanced Formatting}).
21936
21937 @item
21938 Several commands in the group buffer can be undone with @kbd{C-M-_}
21939 (@pxref{Undo}).
21940
21941 @item
21942 Scoring can be done on words using the new score type @code{w}
21943 (@pxref{Score File Format}).
21944
21945 @item
21946 Adaptive scoring can be done on a Subject word-by-word basis
21947 (@pxref{Adaptive Scoring}).
21948
21949 @lisp
21950 (setq gnus-use-adaptive-scoring '(word))
21951 @end lisp
21952
21953 @item
21954 Scores can be decayed (@pxref{Score Decays}).
21955
21956 @lisp
21957 (setq gnus-decay-scores t)
21958 @end lisp
21959
21960 @item
21961 Scoring can be performed using a regexp on the Date header.  The Date is
21962 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
21963
21964 @item
21965 A new command has been added to remove all data on articles from
21966 the native server (@pxref{Changing Servers}).
21967
21968 @item
21969 A new command for reading collections of documents
21970 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
21971 (@pxref{Really Various Summary Commands}).
21972
21973 @item
21974 Process mark sets can be pushed and popped (@pxref{Setting Process
21975 Marks}).
21976
21977 @item
21978 A new mail-to-news back end makes it possible to post even when the @sc{nntp}
21979 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
21980
21981 @item
21982 A new back end for reading searches from Web search engines
21983 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
21984 (@pxref{Web Searches}).
21985
21986 @item
21987 Groups inside topics can now be sorted using the standard sorting
21988 functions, and each topic can be sorted independently (@pxref{Topic
21989 Sorting}).
21990
21991 @item
21992 Subsets of the groups can be sorted independently (@code{Sorting
21993 Groups}).
21994
21995 @item
21996 Cached articles can be pulled into the groups (@pxref{Summary Generation
21997 Commands}).
21998 @iftex
21999 @iflatex
22000 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
22001 @end iflatex
22002 @end iftex
22003
22004 @item
22005 Score files are now applied in a more reliable order (@pxref{Score
22006 Variables}).
22007
22008 @item
22009 Reports on where mail messages end up can be generated (@pxref{Splitting
22010 Mail}).
22011
22012 @item
22013 More hooks and functions have been added to remove junk from incoming
22014 mail before saving the mail (@pxref{Washing Mail}).
22015
22016 @item
22017 Emphasized text can be properly fontisized:
22018
22019 @end itemize
22020
22021
22022 @node Quassia Gnus
22023 @subsubsection Quassia Gnus
22024
22025 New features in Gnus 5.6:
22026
22027 @itemize @bullet
22028
22029 @item
22030 New functionality for using Gnus as an offline newsreader has been
22031 added.  A plethora of new commands and modes have been added.  See
22032 @pxref{Gnus Unplugged} for the full story.
22033
22034 @item
22035  The @code{nndraft} back end has returned, but works differently than
22036 before.  All Message buffers are now also articles in the @code{nndraft}
22037 group, which is created automatically.
22038
22039 @item
22040 @code{gnus-alter-header-function} can now be used to alter header
22041 values.
22042
22043 @item
22044  @code{gnus-summary-goto-article} now accept Message-ID's.
22045
22046 @item
22047  A new Message command for deleting text in the body of a message
22048 outside the region: @kbd{C-c C-v}.
22049
22050 @item
22051  You can now post to component group in @code{nnvirtual} groups with
22052 @kbd{C-u C-c C-c}.
22053
22054 @item
22055  @code{nntp-rlogin-program}---new variable to ease customization.
22056
22057 @item
22058  @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
22059 re-highlighting of the article buffer.
22060
22061 @item
22062  New element in @code{gnus-boring-article-headers}---@code{long-to}.
22063
22064 @item
22065  @kbd{M-i} symbolic prefix command.  See the section "Symbolic
22066 Prefixes" in the Gnus manual for details.
22067
22068 @item
22069  @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
22070 @kbd{a} to add the score rule to the "all.SCORE" file.
22071
22072 @item
22073  @code{gnus-simplify-subject-functions} variable to allow greater
22074 control over simplification.
22075
22076 @item
22077  @kbd{A T}---new command for fetching the current thread.
22078
22079 @item
22080  @kbd{/ T}---new command for including the current thread in the
22081 limit.
22082
22083 @item
22084  @kbd{M-RET} is a new Message command for breaking cited text.
22085
22086 @item
22087  @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
22088
22089 @item
22090  The @code{custom-face-lookup} function has been removed.
22091 If you used this function in your initialization files, you must
22092 rewrite them to use @code{face-spec-set} instead.
22093
22094 @item
22095  Canceling now uses the current select method.  Symbolic prefix
22096 @kbd{a} forces normal posting method.
22097
22098 @item
22099  New command to translate M******** sm*rtq**t*s into proper
22100 text---@kbd{W d}.
22101
22102 @item
22103  For easier debugging of @code{nntp}, you can set
22104 @code{nntp-record-commands} to a non-@code{nil} value.
22105
22106 @item
22107  @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
22108 controlling where and how to send @sc{authinfo} to @sc{nntp} servers.
22109
22110 @item
22111  A command for editing group parameters from the summary buffer
22112 has been added.
22113
22114 @item
22115  A history of where mails have been split is available.
22116
22117 @item
22118  A new article date command has been added---@code{article-date-iso8601}.
22119
22120 @item
22121  Subjects can be simplified when threading by setting
22122 @code{gnus-score-thread-simplify}.
22123
22124 @item
22125  A new function for citing in Message has been
22126 added---@code{message-cite-original-without-signature}.
22127
22128 @item
22129  @code{article-strip-all-blank-lines}---new article command.
22130
22131 @item
22132  A new Message command to kill to the end of the article has
22133 been added.
22134
22135 @item
22136  A minimum adaptive score can be specified by using the
22137 @code{gnus-adaptive-word-minimum} variable.
22138
22139 @item
22140  The "lapsed date" article header can be kept continually
22141 updated by the @code{gnus-start-date-timer} command.
22142
22143 @item
22144  Web listserv archives can be read with the @code{nnlistserv} back end.
22145
22146 @item
22147  Old dejanews archives can now be read by @code{nnweb}.
22148
22149 @end itemize
22150
22151 @node Pterodactyl Gnus
22152 @subsubsection Pterodactyl Gnus
22153
22154 New features in Gnus 5.8:
22155
22156 @itemize @bullet
22157
22158 @item
22159 The mail-fetching functions have changed.  See the manual for the
22160 many details.  In particular, all procmail fetching variables are gone.
22161
22162 If you used procmail like in
22163
22164 @lisp
22165 (setq nnmail-use-procmail t)
22166 (setq nnmail-spool-file 'procmail)
22167 (setq nnmail-procmail-directory "~/mail/incoming/")
22168 (setq nnmail-procmail-suffix "\\.in")
22169 @end lisp
22170
22171 this now has changed to
22172
22173 @lisp
22174 (setq mail-sources
22175       '((directory :path "~/mail/incoming/"
22176                    :suffix ".in")))
22177 @end lisp
22178
22179 More information is available in the info doc at Select Methods ->
22180 Getting Mail -> Mail Sources
22181
22182 @item
22183 Gnus is now a @sc{mime}-capable reader.  This affects many parts of
22184 Gnus, and adds a slew of new commands.  See the manual for details.
22185
22186 @item
22187 Gnus has also been multilingualized.  This also affects too
22188 many parts of Gnus to summarize here, and adds many new variables.
22189
22190 @item
22191 @code{gnus-auto-select-first} can now be a function to be
22192 called to position point.
22193
22194 @item
22195 The user can now decide which extra headers should be included in
22196 summary buffers and @sc{nov} files.
22197
22198 @item
22199 @code{gnus-article-display-hook} has been removed.  Instead, a number
22200 of variables starting with @code{gnus-treat-} have been added.
22201
22202 @item
22203 The Gnus posting styles have been redone again and now works in a
22204 subtly different manner.
22205
22206 @item
22207 New web-based back ends have been added: @code{nnslashdot},
22208 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
22209 again, to keep up with ever-changing layouts.
22210
22211 @item
22212 Gnus can now read @sc{imap} mail via @code{nnimap}.
22213
22214 @end itemize
22215
22216 @iftex
22217
22218 @page
22219 @node The Manual
22220 @section The Manual
22221 @cindex colophon
22222 @cindex manual
22223
22224 This manual was generated from a TeXinfo file and then run through
22225 either @code{texi2dvi}
22226 @iflatex
22227 or my own home-brewed TeXinfo to \LaTeX\ transformer,
22228 and then run through @code{latex} and @code{dvips}
22229 @end iflatex
22230 to get what you hold in your hands now.
22231
22232 The following conventions have been used:
22233
22234 @enumerate
22235
22236 @item
22237 This is a @samp{string}
22238
22239 @item
22240 This is a @kbd{keystroke}
22241
22242 @item
22243 This is a @file{file}
22244
22245 @item
22246 This is a @code{symbol}
22247
22248 @end enumerate
22249
22250 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
22251 mean:
22252
22253 @lisp
22254 (setq flargnoze "yes")
22255 @end lisp
22256
22257 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
22258
22259 @lisp
22260 (setq flumphel 'yes)
22261 @end lisp
22262
22263 @samp{yes} and @code{yes} are two @emph{very} different things---don't
22264 ever get them confused.
22265
22266 @iflatex
22267 @c @head
22268 Of course, everything in this manual is of vital interest, so you should
22269 read it all.  Several times.  However, if you feel like skimming the
22270 manual, look for that gnu head you should see in the margin over
22271 there---it means that what's being discussed is of more importance than
22272 the rest of the stuff.  (On the other hand, if everything is infinitely
22273 important, how can anything be more important than that?  Just one more
22274 of the mysteries of this world, I guess.)
22275 @end iflatex
22276
22277 @end iftex
22278
22279
22280 @node On Writing Manuals
22281 @section On Writing Manuals
22282
22283 I guess most manuals are written after-the-fact; documenting a program
22284 that's already there.  This is not how this manual is written.  When
22285 implementing something, I write the manual entry for that something
22286 straight away.  I then see that it's difficult to explain the
22287 functionality, so I write how it's supposed to be, and then I change the
22288 implementation.  Writing the documentation and writing the code goes
22289 hand in hand.
22290
22291 This, of course, means that this manual has no, or little, flow.  It
22292 documents absolutely everything in Gnus, but often not where you're
22293 looking for it.  It is a reference manual, and not a guide to how to get
22294 started with Gnus.
22295
22296 That would be a totally different book, that should be written using the
22297 reference manual as source material.  It would look quite differently.
22298
22299
22300 @page
22301 @node Terminology
22302 @section Terminology
22303
22304 @cindex terminology
22305 @table @dfn
22306
22307 @item news
22308 @cindex news
22309 This is what you are supposed to use this thing for---reading news.
22310 News is generally fetched from a nearby @sc{nntp} server, and is
22311 generally publicly available to everybody.  If you post news, the entire
22312 world is likely to read just what you have written, and they'll all
22313 snigger mischievously.  Behind your back.
22314
22315 @item mail
22316 @cindex mail
22317 Everything that's delivered to you personally is mail.  Some news/mail
22318 readers (like Gnus) blur the distinction between mail and news, but
22319 there is a difference.  Mail is private.  News is public.  Mailing is
22320 not posting, and replying is not following up.
22321
22322 @item reply
22323 @cindex reply
22324 Send a mail to the person who has written what you are reading.
22325
22326 @item follow up
22327 @cindex follow up
22328 Post an article to the current newsgroup responding to the article you
22329 are reading.
22330
22331 @item back end
22332 @cindex back end
22333 Gnus gets fed articles from a number of back ends, both news and mail
22334 back ends.  Gnus does not handle the underlying media, so to speak---this
22335 is all done by the back ends.
22336
22337 @item native
22338 @cindex native
22339 Gnus will always use one method (and back end) as the @dfn{native}, or
22340 default, way of getting news.
22341
22342 @item foreign
22343 @cindex foreign
22344 You can also have any number of foreign groups active at the same time.
22345 These are groups that use non-native non-secondary back ends for getting
22346 news.
22347
22348 @item secondary
22349 @cindex secondary
22350 Secondary back ends are somewhere half-way between being native and being
22351 foreign, but they mostly act like they are native.
22352
22353 @item article
22354 @cindex article
22355 A message that has been posted as news.
22356
22357 @item mail message
22358 @cindex mail message
22359 A message that has been mailed.
22360
22361 @item message
22362 @cindex message
22363 A mail message or news article
22364
22365 @item head
22366 @cindex head
22367 The top part of a message, where administrative information (etc.) is
22368 put.
22369
22370 @item body
22371 @cindex body
22372 The rest of an article.  Everything not in the head is in the
22373 body.
22374
22375 @item header
22376 @cindex header
22377 A line from the head of an article.
22378
22379 @item headers
22380 @cindex headers
22381 A collection of such lines, or a collection of heads.  Or even a
22382 collection of @sc{nov} lines.
22383
22384 @item @sc{nov}
22385 @cindex nov
22386 When Gnus enters a group, it asks the back end for the headers of all
22387 unread articles in the group.  Most servers support the News OverView
22388 format, which is more compact and much faster to read and parse than the
22389 normal @sc{head} format.
22390
22391 @item level
22392 @cindex levels
22393 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
22394 that have a lower level are ``more'' subscribed than the groups with a
22395 higher level.  In fact, groups on levels 1-5 are considered
22396 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
22397 are @dfn{killed}.  Commands for listing groups and scanning for new
22398 articles will all use the numeric prefix as @dfn{working level}.
22399
22400 @item killed groups
22401 @cindex killed groups
22402 No information on killed groups is stored or updated, which makes killed
22403 groups much easier to handle than subscribed groups.
22404
22405 @item zombie groups
22406 @cindex zombie groups
22407 Just like killed groups, only slightly less dead.
22408
22409 @item active file
22410 @cindex active file
22411 The news server has to keep track of what articles it carries, and what
22412 groups exist.  All this information in stored in the active file, which
22413 is rather large, as you might surmise.
22414
22415 @item bogus groups
22416 @cindex bogus groups
22417 A group that exists in the @file{.newsrc} file, but isn't known to the
22418 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
22419 This means that the group probably doesn't exist (any more).
22420
22421 @item activating
22422 @cindex activating groups
22423 The act of asking the server for info on a group and computing the
22424 number of unread articles is called @dfn{activating the group}.
22425 Un-activated groups are listed with @samp{*} in the group buffer.
22426
22427 @item server
22428 @cindex server
22429 A machine one can connect to and get news (or mail) from.
22430
22431 @item select method
22432 @cindex select method
22433 A structure that specifies the back end, the server and the virtual
22434 server settings.
22435
22436 @item virtual server
22437 @cindex virtual server
22438 A named select method.  Since a select method defines all there is to
22439 know about connecting to a (physical) server, taking the thing as a
22440 whole is a virtual server.
22441
22442 @item washing
22443 @cindex washing
22444 Taking a buffer and running it through a filter of some sort.  The
22445 result will (more often than not) be cleaner and more pleasing than the
22446 original.
22447
22448 @item ephemeral groups
22449 @cindex ephemeral groups
22450 Most groups store data on what articles you have read.  @dfn{Ephemeral}
22451 groups are groups that will have no data stored---when you exit the
22452 group, it'll disappear into the aether.
22453
22454 @item solid groups
22455 @cindex solid groups
22456 This is the opposite of ephemeral groups.  All groups listed in the
22457 group buffer are solid groups.
22458
22459 @item sparse articles
22460 @cindex sparse articles
22461 These are article placeholders shown in the summary buffer when
22462 @code{gnus-build-sparse-threads} has been switched on.
22463
22464 @item threading
22465 @cindex threading
22466 To put responses to articles directly after the articles they respond
22467 to---in a hierarchical fashion.
22468
22469 @item root
22470 @cindex root
22471 @cindex thread root
22472 The first article in a thread is the root.  It is the ancestor of all
22473 articles in the thread.
22474
22475 @item parent
22476 @cindex parent
22477 An article that has responses.
22478
22479 @item child
22480 @cindex child
22481 An article that responds to a different article---its parent.
22482
22483 @item digest
22484 @cindex digest
22485 A collection of messages in one file.  The most common digest format is
22486 specified by RFC 1153.
22487
22488 @end table
22489
22490
22491 @page
22492 @node Customization
22493 @section Customization
22494 @cindex general customization
22495
22496 All variables are properly documented elsewhere in this manual.  This
22497 section is designed to give general pointers on how to customize Gnus
22498 for some quite common situations.
22499
22500 @menu
22501 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
22502 * Slow Terminal Connection::    You run a remote Emacs.
22503 * Little Disk Space::           You feel that having large setup files is icky.
22504 * Slow Machine::                You feel like buying a faster machine.
22505 @end menu
22506
22507
22508 @node Slow/Expensive Connection
22509 @subsection Slow/Expensive NNTP Connection
22510
22511 If you run Emacs on a machine locally, and get your news from a machine
22512 over some very thin strings, you want to cut down on the amount of data
22513 Gnus has to get from the @sc{nntp} server.
22514
22515 @table @code
22516
22517 @item gnus-read-active-file
22518 Set this to @code{nil}, which will inhibit Gnus from requesting the
22519 entire active file from the server.  This file is often v.  large.  You
22520 also have to set @code{gnus-check-new-newsgroups} and
22521 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
22522 doesn't suddenly decide to fetch the active file anyway.
22523
22524 @item gnus-nov-is-evil
22525 This one has to be @code{nil}.  If not, grabbing article headers from
22526 the @sc{nntp} server will not be very fast.  Not all @sc{nntp} servers
22527 support @sc{xover}; Gnus will detect this by itself.
22528 @end table
22529
22530
22531 @node Slow Terminal Connection
22532 @subsection Slow Terminal Connection
22533
22534 Let's say you use your home computer for dialing up the system that runs
22535 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
22536 possible) the amount of data sent over the wires.
22537
22538 @table @code
22539
22540 @item gnus-auto-center-summary
22541 Set this to @code{nil} to inhibit Gnus from re-centering the summary
22542 buffer all the time.  If it is @code{vertical}, do only vertical
22543 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
22544 horizontal and vertical recentering.
22545
22546 @item gnus-visible-headers
22547 Cut down on the headers included in the articles to the
22548 minimum.  You can, in fact, make do without them altogether---most of the
22549 useful data is in the summary buffer, anyway.  Set this variable to
22550 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
22551
22552 Set this hook to all the available hiding commands:
22553 @lisp
22554 (setq gnus-treat-hide-headers 'head
22555       gnus-treat-hide-signature t
22556       gnus-treat-hide-citation t)
22557 @end lisp
22558
22559 @item gnus-use-full-window
22560 By setting this to @code{nil}, you can make all the windows smaller.
22561 While this doesn't really cut down much generally, it means that you
22562 have to see smaller portions of articles before deciding that you didn't
22563 want to read them anyway.
22564
22565 @item gnus-thread-hide-subtree
22566 If this is non-@code{nil}, all threads in the summary buffer will be
22567 hidden initially.
22568
22569
22570 @item gnus-updated-mode-lines
22571 If this is @code{nil}, Gnus will not put information in the buffer mode
22572 lines, which might save some time.
22573 @end table
22574
22575
22576 @node Little Disk Space
22577 @subsection Little Disk Space
22578 @cindex disk space
22579
22580 The startup files can get rather large, so you may want to cut their
22581 sizes a bit if you are running out of space.
22582
22583 @table @code
22584
22585 @item gnus-save-newsrc-file
22586 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
22587 only save @file{.newsrc.eld}.  This means that you will not be able to
22588 use any other newsreaders than Gnus.  This variable is @code{t} by
22589 default.
22590
22591 @item gnus-read-newsrc-file
22592 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
22593 only read @file{.newsrc.eld}.  This means that you will not be able to
22594 use any other newsreaders than Gnus.  This variable is @code{t} by
22595 default.
22596
22597 @item gnus-save-killed-list
22598 If this is @code{nil}, Gnus will not save the list of dead groups.  You
22599 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
22600 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
22601 variable to @code{nil}.  This variable is @code{t} by default.
22602
22603 @end table
22604
22605
22606 @node Slow Machine
22607 @subsection Slow Machine
22608 @cindex slow machine
22609
22610 If you have a slow machine, or are just really impatient, there are a
22611 few things you can do to make Gnus run faster.
22612
22613 Set @code{gnus-check-new-newsgroups} and
22614 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
22615
22616 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
22617 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
22618 summary buffer faster.
22619
22620
22621 @page
22622 @node Troubleshooting
22623 @section Troubleshooting
22624 @cindex troubleshooting
22625
22626 Gnus works @emph{so} well straight out of the box---I can't imagine any
22627 problems, really.
22628
22629 Ahem.
22630
22631 @enumerate
22632
22633 @item
22634 Make sure your computer is switched on.
22635
22636 @item
22637 Make sure that you really load the current Gnus version.  If you have
22638 been running @sc{gnus}, you need to exit Emacs and start it up again before
22639 Gnus will work.
22640
22641 @item
22642 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
22643 like @samp{T-gnus 6.15.* (based on Oort Gnus v0.*; for SEMI 1.1*, FLIM
22644 1.1*)} you have the right files loaded.  If, on the other hand, you get
22645 something like @samp{NNTP 3.x} or @samp{nntp flee}, you have some old
22646 @file{.el} files lying around.  Delete these.
22647
22648 @item
22649 Read the help group (@kbd{G h} in the group buffer) for a FAQ and a
22650 how-to.
22651
22652 @item
22653 @vindex max-lisp-eval-depth
22654 Gnus works on many recursive structures, and in some extreme (and very
22655 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
22656 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
22657 something like that.
22658 @end enumerate
22659
22660 If all else fails, report the problem as a bug.
22661
22662 @cindex bugs
22663 @cindex reporting bugs
22664
22665 @kindex M-x gnus-bug
22666 @findex gnus-bug
22667 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
22668 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
22669 me the backtrace.  I will fix bugs, but I can only fix them if you send
22670 me a precise description as to how to reproduce the bug.
22671
22672 You really can never be too detailed in a bug report.  Always use the
22673 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
22674 a 10Kb mail each time you use it, and even if you have sent me your
22675 environment 500 times before.  I don't care.  I want the full info each
22676 time.
22677
22678 It is also important to remember that I have no memory whatsoever.  If
22679 you send a bug report, and I send you a reply, and then you just send
22680 back ``No, it's not! Moron!'', I will have no idea what you are
22681 insulting me about.  Always over-explain everything.  It's much easier
22682 for all of us---if I don't have all the information I need, I will just
22683 mail you and ask for more info, and everything takes more time.
22684
22685 If the problem you're seeing is very visual, and you can't quite explain
22686 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
22687 it somewhere it can be reached, and include the URL of the picture in
22688 the bug report.
22689
22690 @cindex patches
22691 If you would like to contribute a patch to fix bugs or make
22692 improvements, please produce the patch using @samp{diff -u}.
22693
22694 If you just need help, you are better off asking on
22695 @samp{gnu.emacs.gnus}.  I'm not very helpful.
22696
22697 @cindex gnu.emacs.gnus
22698 @cindex ding mailing list
22699 You can also ask on the ding mailing list---@samp{ding@@gnus.org}.
22700 Write to @samp{ding-request@@gnus.org} to subscribe.
22701
22702
22703 @page
22704 @node Gnus Reference Guide
22705 @section Gnus Reference Guide
22706
22707 It is my hope that other people will figure out smart stuff that Gnus
22708 can do, and that other people will write those smart things as well.  To
22709 facilitate that I thought it would be a good idea to describe the inner
22710 workings of Gnus.  And some of the not-so-inner workings, while I'm at
22711 it.
22712
22713 You can never expect the internals of a program not to change, but I
22714 will be defining (in some details) the interface between Gnus and its
22715 back ends (this is written in stone), the format of the score files
22716 (ditto), data structures (some are less likely to change than others)
22717 and general methods of operation.
22718
22719 @menu
22720 * Gnus Utility Functions::      Common functions and variable to use.
22721 * Back End Interface::          How Gnus communicates with the servers.
22722 * Score File Syntax::           A BNF definition of the score file standard.
22723 * Headers::                     How Gnus stores headers internally.
22724 * Ranges::                      A handy format for storing mucho numbers.
22725 * Group Info::                  The group info format.
22726 * Extended Interactive::        Symbolic prefixes and stuff.
22727 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
22728 * Various File Formats::        Formats of files that Gnus use.
22729 @end menu
22730
22731
22732 @node Gnus Utility Functions
22733 @subsection Gnus Utility Functions
22734 @cindex Gnus utility functions
22735 @cindex utility functions
22736 @cindex functions
22737 @cindex internal variables
22738
22739 When writing small functions to be run from hooks (and stuff), it's
22740 vital to have access to the Gnus internal functions and variables.
22741 Below is a list of the most common ones.
22742
22743 @table @code
22744
22745 @item gnus-newsgroup-name
22746 @vindex gnus-newsgroup-name
22747 This variable holds the name of the current newsgroup.
22748
22749 @item gnus-find-method-for-group
22750 @findex gnus-find-method-for-group
22751 A function that returns the select method for @var{group}.
22752
22753 @item gnus-group-real-name
22754 @findex gnus-group-real-name
22755 Takes a full (prefixed) Gnus group name, and returns the unprefixed
22756 name.
22757
22758 @item gnus-group-prefixed-name
22759 @findex gnus-group-prefixed-name
22760 Takes an unprefixed group name and a select method, and returns the full
22761 (prefixed) Gnus group name.
22762
22763 @item gnus-get-info
22764 @findex gnus-get-info
22765 Returns the group info list for @var{group}.
22766
22767 @item gnus-group-unread
22768 @findex gnus-group-unread
22769 The number of unread articles in @var{group}, or @code{t} if that is
22770 unknown.
22771
22772 @item gnus-active
22773 @findex gnus-active
22774 The active entry for @var{group}.
22775
22776 @item gnus-set-active
22777 @findex gnus-set-active
22778 Set the active entry for @var{group}.
22779
22780 @item gnus-add-current-to-buffer-list
22781 @findex gnus-add-current-to-buffer-list
22782 Adds the current buffer to the list of buffers to be killed on Gnus
22783 exit.
22784
22785 @item gnus-continuum-version
22786 @findex gnus-continuum-version
22787 Takes a Gnus version string as a parameter and returns a floating point
22788 number.  Earlier versions will always get a lower number than later
22789 versions.
22790
22791 @item gnus-group-read-only-p
22792 @findex gnus-group-read-only-p
22793 Says whether @var{group} is read-only or not.
22794
22795 @item gnus-news-group-p
22796 @findex gnus-news-group-p
22797 Says whether @var{group} came from a news back end.
22798
22799 @item gnus-ephemeral-group-p
22800 @findex gnus-ephemeral-group-p
22801 Says whether @var{group} is ephemeral or not.
22802
22803 @item gnus-server-to-method
22804 @findex gnus-server-to-method
22805 Returns the select method corresponding to @var{server}.
22806
22807 @item gnus-server-equal
22808 @findex gnus-server-equal
22809 Says whether two virtual servers are equal.
22810
22811 @item gnus-group-native-p
22812 @findex gnus-group-native-p
22813 Says whether @var{group} is native or not.
22814
22815 @item gnus-group-secondary-p
22816 @findex gnus-group-secondary-p
22817 Says whether @var{group} is secondary or not.
22818
22819 @item gnus-group-foreign-p
22820 @findex gnus-group-foreign-p
22821 Says whether @var{group} is foreign or not.
22822
22823 @item group-group-find-parameter
22824 @findex group-group-find-parameter
22825 Returns the parameter list of @var{group}.  If given a second parameter,
22826 returns the value of that parameter for @var{group}.
22827
22828 @item gnus-group-set-parameter
22829 @findex gnus-group-set-parameter
22830 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
22831
22832 @item gnus-narrow-to-body
22833 @findex gnus-narrow-to-body
22834 Narrows the current buffer to the body of the article.
22835
22836 @item gnus-check-backend-function
22837 @findex gnus-check-backend-function
22838 Takes two parameters, @var{function} and @var{group}.  If the back end
22839 @var{group} comes from supports @var{function}, return non-@code{nil}.
22840
22841 @lisp
22842 (gnus-check-backend-function "request-scan" "nnml:misc")
22843 @result{} t
22844 @end lisp
22845
22846 @item gnus-read-method
22847 @findex gnus-read-method
22848 Prompts the user for a select method.
22849
22850 @end table
22851
22852
22853 @node Back End Interface
22854 @subsection Back End Interface
22855
22856 Gnus doesn't know anything about @sc{nntp}, spools, mail or virtual
22857 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
22858 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
22859 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
22860 examples of the latter we have @code{nntp-port-number} and
22861 @code{nnmbox-directory}.
22862
22863 When Gnus asks for information from a back end---say @code{nntp}---on
22864 something, it will normally include a virtual server name in the
22865 function parameters.  (If not, the back end should use the ``current''
22866 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
22867 server as its only (optional) parameter.  If this virtual server hasn't
22868 been opened, the function should fail.
22869
22870 Note that a virtual server name has no relation to some physical server
22871 name.  Take this example:
22872
22873 @lisp
22874 (nntp "odd-one"
22875       (nntp-address "ifi.uio.no")
22876       (nntp-port-number 4324))
22877 @end lisp
22878
22879 Here the virtual server name is @samp{odd-one} while the name of
22880 the physical server is @samp{ifi.uio.no}.
22881
22882 The back ends should be able to switch between several virtual servers.
22883 The standard back ends implement this by keeping an alist of virtual
22884 server environments that they pull down/push up when needed.
22885
22886 There are two groups of interface functions: @dfn{required functions},
22887 which must be present, and @dfn{optional functions}, which Gnus will
22888 always check for presence before attempting to call 'em.
22889
22890 All these functions are expected to return data in the buffer
22891 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
22892 unfortunately named, but we'll have to live with it.  When I talk about
22893 @dfn{resulting data}, I always refer to the data in that buffer.  When I
22894 talk about @dfn{return value}, I talk about the function value returned by
22895 the function call.  Functions that fail should return @code{nil} as the
22896 return value.
22897
22898 Some back ends could be said to be @dfn{server-forming} back ends, and
22899 some might be said not to be.  The latter are back ends that generally
22900 only operate on one group at a time, and have no concept of ``server''
22901 -- they have a group, and they deliver info on that group and nothing
22902 more.
22903
22904 Gnus identifies each message by way of group name and article number.  A
22905 few remarks about these article numbers might be useful.  First of all,
22906 the numbers are positive integers.  Secondly, it is normally not
22907 possible for later articles to `re-use' older article numbers without
22908 confusing Gnus.  That is, if a group has ever contained a message
22909 numbered 42, then no other message may get that number, or Gnus will get
22910 mightily confused.@footnote{See the function
22911 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
22912 Third, article numbers must be assigned in order of arrival in the
22913 group; this is not necessarily the same as the date of the message.
22914
22915 The previous paragraph already mentions all the `hard' restrictions that
22916 article numbers must fulfill.  But it seems that it might be useful to
22917 assign @emph{consecutive} article numbers, for Gnus gets quite confused
22918 if there are holes in the article numbering sequence.  However, due to
22919 the `no-reuse' restriction, holes cannot be avoided altogether.  It's
22920 also useful for the article numbers to start at 1 to avoid running out
22921 of numbers as long as possible.
22922
22923 In the examples and definitions I will refer to the imaginary back end
22924 @code{nnchoke}.
22925
22926 @cindex @code{nnchoke}
22927
22928 @menu
22929 * Required Back End Functions::  Functions that must be implemented.
22930 * Optional Back End Functions::  Functions that need not be implemented.
22931 * Error Messaging::             How to get messages and report errors.
22932 * Writing New Back Ends::       Extending old back ends.
22933 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
22934 * Mail-like Back Ends::         Some tips on mail back ends.
22935 @end menu
22936
22937
22938 @node Required Back End Functions
22939 @subsubsection Required Back End Functions
22940
22941 @table @code
22942
22943 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
22944
22945 @var{articles} is either a range of article numbers or a list of
22946 @code{Message-ID}s.  Current back ends do not fully support either---only
22947 sequences (lists) of article numbers, and most back ends do not support
22948 retrieval of @code{Message-ID}s.  But they should try for both.
22949
22950 The result data should either be HEADs or @sc{nov} lines, and the result
22951 value should either be @code{headers} or @code{nov} to reflect this.
22952 This might later be expanded to @code{various}, which will be a mixture
22953 of HEADs and @sc{nov} lines, but this is currently not supported by Gnus.
22954
22955 If @var{fetch-old} is non-@code{nil} it says to try fetching "extra
22956 headers", in some meaning of the word.  This is generally done by
22957 fetching (at most) @var{fetch-old} extra headers less than the smallest
22958 article number in @code{articles}, and filling the gaps as well.  The
22959 presence of this parameter can be ignored if the back end finds it
22960 cumbersome to follow the request.  If this is non-@code{nil} and not a
22961 number, do maximum fetches.
22962
22963 Here's an example HEAD:
22964
22965 @example
22966 221 1056 Article retrieved.
22967 Path: ifi.uio.no!sturles
22968 From: sturles@@ifi.uio.no (Sturle Sunde)
22969 Newsgroups: ifi.discussion
22970 Subject: Re: Something very droll
22971 Date: 27 Oct 1994 14:02:57 +0100
22972 Organization: Dept. of Informatics, University of Oslo, Norway
22973 Lines: 26
22974 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
22975 References: <38jdmq$4qu@@visbur.ifi.uio.no>
22976 NNTP-Posting-Host: holmenkollen.ifi.uio.no
22977 .
22978 @end example
22979
22980 So a @code{headers} return value would imply that there's a number of
22981 these in the data buffer.
22982
22983 Here's a BNF definition of such a buffer:
22984
22985 @example
22986 headers        = *head
22987 head           = error / valid-head
22988 error-message  = [ "4" / "5" ] 2number " " <error message> eol
22989 valid-head     = valid-message *header "." eol
22990 valid-message  = "221 " <number> " Article retrieved." eol
22991 header         = <text> eol
22992 @end example
22993
22994 If the return value is @code{nov}, the data buffer should contain
22995 @dfn{network overview database} lines.  These are basically fields
22996 separated by tabs.
22997
22998 @example
22999 nov-buffer = *nov-line
23000 nov-line   = 8*9 [ field <TAB> ] eol
23001 field      = <text except TAB>
23002 @end example
23003
23004 For a closer look at what should be in those fields,
23005 @pxref{Headers}.
23006
23007
23008 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
23009
23010 @var{server} is here the virtual server name.  @var{definitions} is a
23011 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
23012
23013 If the server can't be opened, no error should be signaled.  The back end
23014 may then choose to refuse further attempts at connecting to this
23015 server.  In fact, it should do so.
23016
23017 If the server is opened already, this function should return a
23018 non-@code{nil} value.  There should be no data returned.
23019
23020
23021 @item (nnchoke-close-server &optional SERVER)
23022
23023 Close connection to @var{server} and free all resources connected
23024 to it.  Return @code{nil} if the server couldn't be closed for some
23025 reason.
23026
23027 There should be no data returned.
23028
23029
23030 @item (nnchoke-request-close)
23031
23032 Close connection to all servers and free all resources that the back end
23033 have reserved.  All buffers that have been created by that back end
23034 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
23035 function is generally only called when Gnus is shutting down.
23036
23037 There should be no data returned.
23038
23039
23040 @item (nnchoke-server-opened &optional SERVER)
23041
23042 If @var{server} is the current virtual server, and the connection to the
23043 physical server is alive, then this function should return a
23044 non-@code{nil} vlue.  This function should under no circumstances
23045 attempt to reconnect to a server we have lost connection to.
23046
23047 There should be no data returned.
23048
23049
23050 @item (nnchoke-status-message &optional SERVER)
23051
23052 This function should return the last error message from @var{server}.
23053
23054 There should be no data returned.
23055
23056
23057 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
23058
23059 The result data from this function should be the article specified by
23060 @var{article}.  This might either be a @code{Message-ID} or a number.
23061 It is optional whether to implement retrieval by @code{Message-ID}, but
23062 it would be nice if that were possible.
23063
23064 If @var{to-buffer} is non-@code{nil}, the result data should be returned
23065 in this buffer instead of the normal data buffer.  This is to make it
23066 possible to avoid copying large amounts of data from one buffer to
23067 another, while Gnus mainly requests articles to be inserted directly
23068 into its article buffer.
23069
23070 If it is at all possible, this function should return a cons cell where
23071 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
23072 the article number.  This will enable Gnus to find out what the real
23073 group and article numbers are when fetching articles by
23074 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
23075 on successful article retrieval.
23076
23077
23078 @item (nnchoke-request-group GROUP &optional SERVER FAST)
23079
23080 Get data on @var{group}.  This function also has the side effect of
23081 making @var{group} the current group.
23082
23083 If @var{fast}, don't bother to return useful data, just make @var{group}
23084 the current group.
23085
23086 Here's an example of some result data and a definition of the same:
23087
23088 @example
23089 211 56 1000 1059 ifi.discussion
23090 @end example
23091
23092 The first number is the status, which should be 211.  Next is the
23093 total number of articles in the group, the lowest article number, the
23094 highest article number, and finally the group name.  Note that the total
23095 number of articles may be less than one might think while just
23096 considering the highest and lowest article numbers, but some articles
23097 may have been canceled.  Gnus just discards the total-number, so
23098 whether one should take the bother to generate it properly (if that is a
23099 problem) is left as an exercise to the reader.  If the group contains no
23100 articles, the lowest article number should be reported as 1 and the
23101 highest as 0.
23102
23103 @example
23104 group-status = [ error / info ] eol
23105 error        = [ "4" / "5" ] 2<number> " " <Error message>
23106 info         = "211 " 3* [ <number> " " ] <string>
23107 @end example
23108
23109
23110 @item (nnchoke-close-group GROUP &optional SERVER)
23111
23112 Close @var{group} and free any resources connected to it.  This will be
23113 a no-op on most back ends.
23114
23115 There should be no data returned.
23116
23117
23118 @item (nnchoke-request-list &optional SERVER)
23119
23120 Return a list of all groups available on @var{server}.  And that means
23121 @emph{all}.
23122
23123 Here's an example from a server that only carries two groups:
23124
23125 @example
23126 ifi.test 0000002200 0000002000 y
23127 ifi.discussion 3324 3300 n
23128 @end example
23129
23130 On each line we have a group name, then the highest article number in
23131 that group, the lowest article number, and finally a flag.  If the group
23132 contains no articles, the lowest article number should be reported as 1
23133 and the highest as 0.
23134
23135 @example
23136 active-file = *active-line
23137 active-line = name " " <number> " " <number> " " flags eol
23138 name        = <string>
23139 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
23140 @end example
23141
23142 The flag says whether the group is read-only (@samp{n}), is moderated
23143 (@samp{m}), is dead (@samp{x}), is aliased to some other group
23144 (@samp{=other-group}) or none of the above (@samp{y}).
23145
23146
23147 @item (nnchoke-request-post &optional SERVER)
23148
23149 This function should post the current buffer.  It might return whether
23150 the posting was successful or not, but that's not required.  If, for
23151 instance, the posting is done asynchronously, it has generally not been
23152 completed by the time this function concludes.  In that case, this
23153 function should set up some kind of sentinel to beep the user loud and
23154 clear if the posting could not be completed.
23155
23156 There should be no result data from this function.
23157
23158 @end table
23159
23160
23161 @node Optional Back End Functions
23162 @subsubsection Optional Back End Functions
23163
23164 @table @code
23165
23166 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
23167
23168 @var{groups} is a list of groups, and this function should request data
23169 on all those groups.  How it does it is of no concern to Gnus, but it
23170 should attempt to do this in a speedy fashion.
23171
23172 The return value of this function can be either @code{active} or
23173 @code{group}, which says what the format of the result data is.  The
23174 former is in the same format as the data from
23175 @code{nnchoke-request-list}, while the latter is a buffer full of lines
23176 in the same format as @code{nnchoke-request-group} gives.
23177
23178 @example
23179 group-buffer = *active-line / *group-status
23180 @end example
23181
23182
23183 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
23184
23185 A Gnus group info (@pxref{Group Info}) is handed to the back end for
23186 alterations.  This comes in handy if the back end really carries all the
23187 information (as is the case with virtual and imap groups).  This
23188 function should destructively alter the info to suit its needs, and
23189 should return the (altered) group info.
23190
23191 There should be no result data from this function.
23192
23193
23194 @item (nnchoke-request-type GROUP &optional ARTICLE)
23195
23196 When the user issues commands for ``sending news'' (@kbd{F} in the
23197 summary buffer, for instance), Gnus has to know whether the article the
23198 user is following up on is news or mail.  This function should return
23199 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
23200 is mail and @code{unknown} if the type can't be decided.  (The
23201 @var{article} parameter is necessary in @code{nnvirtual} groups which
23202 might very well combine mail groups and news groups.)  Both @var{group}
23203 and @var{article} may be @code{nil}.
23204
23205 There should be no result data from this function.
23206
23207
23208 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
23209
23210 Set/remove/add marks on articles.  Normally Gnus handles the article
23211 marks (such as read, ticked, expired etc) internally, and store them in
23212 @code{~/.newsrc.eld}.  Some back ends (such as @sc{imap}) however carry
23213 all information about the articles on the server, so Gnus need to
23214 propagate the mark information to the server.
23215
23216 ACTION is a list of mark setting requests, having this format:
23217
23218 @example
23219 (RANGE ACTION MARK)
23220 @end example
23221
23222 RANGE is a range of articles you wish to update marks on.  ACTION is
23223 @code{add} or @code{del}, used to add marks or remove marks
23224 (preserving all marks not mentioned).  MARK is a list of marks; where
23225 each mark is a symbol.  Currently used marks are @code{read},
23226 @code{tick}, @code{reply}, @code{expire}, @code{killed},
23227 @code{dormant}, @code{save}, @code{download}, @code{unsend},
23228 @code{forward} and @code{recent}, but your back end should, if
23229 possible, not limit itself to these.
23230
23231 Given contradictory actions, the last action in the list should be the
23232 effective one.  That is, if your action contains a request to add the
23233 @code{tick} mark on article 1 and, later in the list, a request to
23234 remove the mark on the same article, the mark should in fact be removed.
23235
23236 An example action list:
23237
23238 @example
23239 (((5 12 30) 'del '(tick))
23240  ((10 . 90) 'add '(read expire))
23241  ((92 94) 'del '(read)))
23242 @end example
23243
23244 The function should return a range of articles it wasn't able to set the
23245 mark on (currently not used for anything).
23246
23247 There should be no result data from this function.
23248
23249 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
23250
23251 If the user tries to set a mark that the back end doesn't like, this
23252 function may change the mark.  Gnus will use whatever this function
23253 returns as the mark for @var{article} instead of the original
23254 @var{mark}.  If the back end doesn't care, it must return the original
23255 @var{mark}, and not @code{nil} or any other type of garbage.
23256
23257 The only use for this I can see is what @code{nnvirtual} does with
23258 it---if a component group is auto-expirable, marking an article as read
23259 in the virtual group should result in the article being marked as
23260 expirable.
23261
23262 There should be no result data from this function.
23263
23264
23265 @item (nnchoke-request-scan &optional GROUP SERVER)
23266
23267 This function may be called at any time (by Gnus or anything else) to
23268 request that the back end check for incoming articles, in one way or
23269 another.  A mail back end will typically read the spool file or query the
23270 POP server when this function is invoked.  The @var{group} doesn't have
23271 to be heeded---if the back end decides that it is too much work just
23272 scanning for a single group, it may do a total scan of all groups.  It
23273 would be nice, however, to keep things local if that's practical.
23274
23275 There should be no result data from this function.
23276
23277
23278 @item (nnchoke-request-group-description GROUP &optional SERVER)
23279
23280 The result data from this function should be a description of
23281 @var{group}.
23282
23283 @example
23284 description-line = name <TAB> description eol
23285 name             = <string>
23286 description      = <text>
23287 @end example
23288
23289 @item (nnchoke-request-list-newsgroups &optional SERVER)
23290
23291 The result data from this function should be the description of all
23292 groups available on the server.
23293
23294 @example
23295 description-buffer = *description-line
23296 @end example
23297
23298
23299 @item (nnchoke-request-newgroups DATE &optional SERVER)
23300
23301 The result data from this function should be all groups that were
23302 created after @samp{date}, which is in normal human-readable date format
23303 (i.e., the date format used in mail and news headers, and returned by
23304 the function @code{message-make-date} by default).  The data should be
23305 in the active buffer format.
23306
23307 It is okay for this function to return `too many' groups; some back ends
23308 might find it cheaper to return the full list of groups, rather than
23309 just the new groups.  But don't do this for back ends with many groups.
23310 Normally, if the user creates the groups herself, there won't be too
23311 many groups, so @code{nnml} and the like are probably safe.  But for
23312 back ends like @code{nntp}, where the groups have been created by the
23313 server, it is quite likely that there can be many groups.
23314
23315
23316 @item (nnchoke-request-create-group GROUP &optional SERVER)
23317
23318 This function should create an empty group with name @var{group}.
23319
23320 There should be no return data.
23321
23322
23323 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
23324
23325 This function should run the expiry process on all articles in the
23326 @var{articles} range (which is currently a simple list of article
23327 numbers.)  It is left up to the back end to decide how old articles
23328 should be before they are removed by this function.  If @var{force} is
23329 non-@code{nil}, all @var{articles} should be deleted, no matter how new
23330 they are.
23331
23332 This function should return a list of articles that it did not/was not
23333 able to delete.
23334
23335 There should be no result data returned.
23336
23337
23338 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM
23339 &optional LAST)
23340
23341 This function should move @var{article} (which is a number) from
23342 @var{group} by calling @var{accept-form}.
23343
23344 This function should ready the article in question for moving by
23345 removing any header lines it has added to the article, and generally
23346 should ``tidy up'' the article.  Then it should @code{eval}
23347 @var{accept-form} in the buffer where the ``tidy'' article is.  This
23348 will do the actual copying.  If this @code{eval} returns a
23349 non-@code{nil} value, the article should be removed.
23350
23351 If @var{last} is @code{nil}, that means that there is a high likelihood
23352 that there will be more requests issued shortly, so that allows some
23353 optimizations.
23354
23355 The function should return a cons where the @code{car} is the group name and
23356 the @code{cdr} is the article number that the article was entered as.
23357
23358 There should be no data returned.
23359
23360
23361 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
23362
23363 This function takes the current buffer and inserts it into @var{group}.
23364 If @var{last} in @code{nil}, that means that there will be more calls to
23365 this function in short order.
23366
23367 The function should return a cons where the @code{car} is the group name and
23368 the @code{cdr} is the article number that the article was entered as.
23369
23370 There should be no data returned.
23371
23372
23373 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
23374
23375 This function should remove @var{article} (which is a number) from
23376 @var{group} and insert @var{buffer} there instead.
23377
23378 There should be no data returned.
23379
23380
23381 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
23382
23383 This function should delete @var{group}.  If @var{force}, it should
23384 really delete all the articles in the group, and then delete the group
23385 itself.  (If there is such a thing as ``the group itself''.)
23386
23387 There should be no data returned.
23388
23389
23390 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
23391
23392 This function should rename @var{group} into @var{new-name}.  All
23393 articles in @var{group} should move to @var{new-name}.
23394
23395 There should be no data returned.
23396
23397 @end table
23398
23399
23400 @node Error Messaging
23401 @subsubsection Error Messaging
23402
23403 @findex nnheader-report
23404 @findex nnheader-get-report
23405 The back ends should use the function @code{nnheader-report} to report
23406 error conditions---they should not raise errors when they aren't able to
23407 perform a request.  The first argument to this function is the back end
23408 symbol, and the rest are interpreted as arguments to @code{format} if
23409 there are multiple of them, or just a string if there is one of them.
23410 This function must always returns @code{nil}.
23411
23412 @lisp
23413 (nnheader-report 'nnchoke "You did something totally bogus")
23414
23415 (nnheader-report 'nnchoke "Could not request group %s" group)
23416 @end lisp
23417
23418 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
23419 @code{nil} back from a server, and this function returns the most
23420 recently reported message for the back end in question.  This function
23421 takes one argument---the server symbol.
23422
23423 Internally, these functions access @var{back-end}@code{-status-string},
23424 so the @code{nnchoke} back end will have its error message stored in
23425 @code{nnchoke-status-string}.
23426
23427
23428 @node Writing New Back Ends
23429 @subsubsection Writing New Back Ends
23430
23431 Many back ends are quite similar.  @code{nnml} is just like
23432 @code{nnspool}, but it allows you to edit the articles on the server.
23433 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
23434 and it doesn't maintain overview databases.  @code{nndir} is just like
23435 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
23436 editing articles.
23437
23438 It would make sense if it were possible to ``inherit'' functions from
23439 back ends when writing new back ends.  And, indeed, you can do that if you
23440 want to.  (You don't have to if you don't want to, of course.)
23441
23442 All the back ends declare their public variables and functions by using a
23443 package called @code{nnoo}.
23444
23445 To inherit functions from other back ends (and allow other back ends to
23446 inherit functions from the current back end), you should use the
23447 following macros:
23448
23449 @table @code
23450
23451 @item nnoo-declare
23452 This macro declares the first parameter to be a child of the subsequent
23453 parameters.  For instance:
23454
23455 @lisp
23456 (nnoo-declare nndir
23457   nnml nnmh)
23458 @end lisp
23459
23460 @code{nndir} has declared here that it intends to inherit functions from
23461 both @code{nnml} and @code{nnmh}.
23462
23463 @item defvoo
23464 This macro is equivalent to @code{defvar}, but registers the variable as
23465 a public server variable.  Most state-oriented variables should be
23466 declared with @code{defvoo} instead of @code{defvar}.
23467
23468 In addition to the normal @code{defvar} parameters, it takes a list of
23469 variables in the parent back ends to map the variable to when executing
23470 a function in those back ends.
23471
23472 @lisp
23473 (defvoo nndir-directory nil
23474   "Where nndir will look for groups."
23475   nnml-current-directory nnmh-current-directory)
23476 @end lisp
23477
23478 This means that @code{nnml-current-directory} will be set to
23479 @code{nndir-directory} when an @code{nnml} function is called on behalf
23480 of @code{nndir}.  (The same with @code{nnmh}.)
23481
23482 @item nnoo-define-basics
23483 This macro defines some common functions that almost all back ends should
23484 have.
23485
23486 @example
23487 (nnoo-define-basics nndir)
23488 @end example
23489
23490 @item deffoo
23491 This macro is just like @code{defun} and takes the same parameters.  In
23492 addition to doing the normal @code{defun} things, it registers the
23493 function as being public so that other back ends can inherit it.
23494
23495 @item nnoo-map-functions
23496 This macro allows mapping of functions from the current back end to
23497 functions from the parent back ends.
23498
23499 @example
23500 (nnoo-map-functions nndir
23501   (nnml-retrieve-headers 0 nndir-current-group 0 0)
23502   (nnmh-request-article 0 nndir-current-group 0 0))
23503 @end example
23504
23505 This means that when @code{nndir-retrieve-headers} is called, the first,
23506 third, and fourth parameters will be passed on to
23507 @code{nnml-retrieve-headers}, while the second parameter is set to the
23508 value of @code{nndir-current-group}.
23509
23510 @item nnoo-import
23511 This macro allows importing functions from back ends.  It should be the
23512 last thing in the source file, since it will only define functions that
23513 haven't already been defined.
23514
23515 @example
23516 (nnoo-import nndir
23517   (nnmh
23518    nnmh-request-list
23519    nnmh-request-newgroups)
23520   (nnml))
23521 @end example
23522
23523 This means that calls to @code{nndir-request-list} should just be passed
23524 on to @code{nnmh-request-list}, while all public functions from
23525 @code{nnml} that haven't been defined in @code{nndir} yet should be
23526 defined now.
23527
23528 @end table
23529
23530 Below is a slightly shortened version of the @code{nndir} back end.
23531
23532 @lisp
23533 ;;; nndir.el --- single directory newsgroup access for Gnus
23534 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
23535
23536 ;;; Code:
23537
23538 (require 'nnheader)
23539 (require 'nnmh)
23540 (require 'nnml)
23541 (require 'nnoo)
23542 (eval-when-compile (require 'cl))
23543
23544 (nnoo-declare nndir
23545   nnml nnmh)
23546
23547 (defvoo nndir-directory nil
23548   "Where nndir will look for groups."
23549   nnml-current-directory nnmh-current-directory)
23550
23551 (defvoo nndir-nov-is-evil nil
23552   "*Non-nil means that nndir will never retrieve NOV headers."
23553   nnml-nov-is-evil)
23554
23555 (defvoo nndir-current-group ""
23556   nil
23557   nnml-current-group nnmh-current-group)
23558 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
23559 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
23560
23561 (defvoo nndir-status-string "" nil nnmh-status-string)
23562 (defconst nndir-version "nndir 1.0")
23563
23564 ;;; Interface functions.
23565
23566 (nnoo-define-basics nndir)
23567
23568 (deffoo nndir-open-server (server &optional defs)
23569   (setq nndir-directory
23570         (or (cadr (assq 'nndir-directory defs))
23571             server))
23572   (unless (assq 'nndir-directory defs)
23573     (push `(nndir-directory ,server) defs))
23574   (push `(nndir-current-group
23575           ,(file-name-nondirectory
23576             (directory-file-name nndir-directory)))
23577         defs)
23578   (push `(nndir-top-directory
23579           ,(file-name-directory (directory-file-name nndir-directory)))
23580         defs)
23581   (nnoo-change-server 'nndir server defs))
23582
23583 (nnoo-map-functions nndir
23584   (nnml-retrieve-headers 0 nndir-current-group 0 0)
23585   (nnmh-request-article 0 nndir-current-group 0 0)
23586   (nnmh-request-group nndir-current-group 0 0)
23587   (nnmh-close-group nndir-current-group 0))
23588
23589 (nnoo-import nndir
23590   (nnmh
23591    nnmh-status-message
23592    nnmh-request-list
23593    nnmh-request-newgroups))
23594
23595 (provide 'nndir)
23596 @end lisp
23597
23598
23599 @node Hooking New Back Ends Into Gnus
23600 @subsubsection Hooking New Back Ends Into Gnus
23601
23602 @vindex gnus-valid-select-methods
23603 @findex gnus-declare-backend
23604 Having Gnus start using your new back end is rather easy---you just
23605 declare it with the @code{gnus-declare-backend} functions.  This will
23606 enter the back end into the @code{gnus-valid-select-methods} variable.
23607
23608 @code{gnus-declare-backend} takes two parameters---the back end name and
23609 an arbitrary number of @dfn{abilities}.
23610
23611 Here's an example:
23612
23613 @lisp
23614 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
23615 @end lisp
23616
23617 The above line would then go in the @file{nnchoke.el} file.
23618
23619 The abilities can be:
23620
23621 @table @code
23622 @item mail
23623 This is a mailish back end---followups should (probably) go via mail.
23624 @item post
23625 This is a newsish back end---followups should (probably) go via news.
23626 @item post-mail
23627 This back end supports both mail and news.
23628 @item none
23629 This is neither a post nor mail back end---it's something completely
23630 different.
23631 @item respool
23632 It supports respooling---or rather, it is able to modify its source
23633 articles and groups.
23634 @item address
23635 The name of the server should be in the virtual server name.  This is
23636 true for almost all back ends.
23637 @item prompt-address
23638 The user should be prompted for an address when doing commands like
23639 @kbd{B} in the group buffer.  This is true for back ends like
23640 @code{nntp}, but not @code{nnmbox}, for instance.
23641 @end table
23642
23643
23644 @node Mail-like Back Ends
23645 @subsubsection Mail-like Back Ends
23646
23647 One of the things that separate the mail back ends from the rest of the
23648 back ends is the heavy dependence by most of the mail back ends on
23649 common functions in @file{nnmail.el}.  For instance, here's the
23650 definition of @code{nnml-request-scan}:
23651
23652 @lisp
23653 (deffoo nnml-request-scan (&optional group server)
23654   (setq nnml-article-file-alist nil)
23655   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
23656 @end lisp
23657
23658 It simply calls @code{nnmail-get-new-mail} with a few parameters,
23659 and @code{nnmail} takes care of all the moving and splitting of the
23660 mail.
23661
23662 This function takes four parameters.
23663
23664 @table @var
23665 @item method
23666 This should be a symbol to designate which back end is responsible for
23667 the call.
23668
23669 @item exit-function
23670 This function should be called after the splitting has been performed.
23671
23672 @item temp-directory
23673 Where the temporary files should be stored.
23674
23675 @item group
23676 This optional argument should be a group name if the splitting is to be
23677 performed for one group only.
23678 @end table
23679
23680 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
23681 save each article.  @var{back-end}@code{-active-number} will be called to
23682 find the article number assigned to this article.
23683
23684 The function also uses the following variables:
23685 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
23686 this back end); and @var{back-end}@code{-group-alist} and
23687 @var{back-end}@code{-active-file} to generate the new active file.
23688 @var{back-end}@code{-group-alist} should be a group-active alist, like
23689 this:
23690
23691 @example
23692 (("a-group" (1 . 10))
23693  ("some-group" (34 . 39)))
23694 @end example
23695
23696
23697 @node Score File Syntax
23698 @subsection Score File Syntax
23699
23700 Score files are meant to be easily parseable, but yet extremely
23701 mallable.   It was decided that something that had the same read syntax
23702 as an Emacs Lisp list would fit that spec.
23703
23704 Here's a typical score file:
23705
23706 @lisp
23707 (("summary"
23708   ("win95" -10000 nil s)
23709   ("Gnus"))
23710  ("from"
23711   ("Lars" -1000))
23712  (mark -100))
23713 @end lisp
23714
23715 BNF definition of a score file:
23716
23717 @example
23718 score-file      = "" / "(" *element ")"
23719 element         = rule / atom
23720 rule            = string-rule / number-rule / date-rule
23721 string-rule     = "(" quote string-header quote space *string-match ")"
23722 number-rule     = "(" quote number-header quote space *number-match ")"
23723 date-rule       = "(" quote date-header quote space *date-match ")"
23724 quote           = <ascii 34>
23725 string-header   = "subject" / "from" / "references" / "message-id" /
23726                   "xref" / "body" / "head" / "all" / "followup"
23727 number-header   = "lines" / "chars"
23728 date-header     = "date"
23729 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
23730                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
23731 score           = "nil" / <integer>
23732 date            = "nil" / <natural number>
23733 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
23734                   "r" / "regex" / "R" / "Regex" /
23735                   "e" / "exact" / "E" / "Exact" /
23736                   "f" / "fuzzy" / "F" / "Fuzzy"
23737 number-match    = "(" <integer> [ "" / [ space score [ "" /
23738                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
23739 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
23740 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
23741                   space date [ "" / [ space date-match-t ] ] ] ] ")"
23742 date-match-t    = "nil" / "at" / "before" / "after"
23743 atom            = "(" [ required-atom / optional-atom ] ")"
23744 required-atom   = mark / expunge / mark-and-expunge / files /
23745                   exclude-files / read-only / touched
23746 optional-atom   = adapt / local / eval
23747 mark            = "mark" space nil-or-number
23748 nil-or-number   = "nil" / <integer>
23749 expunge         = "expunge" space nil-or-number
23750 mark-and-expunge = "mark-and-expunge" space nil-or-number
23751 files           = "files" *[ space <string> ]
23752 exclude-files   = "exclude-files" *[ space <string> ]
23753 read-only       = "read-only" [ space "nil" / space "t" ]
23754 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
23755 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
23756 local           = "local" *[ space "(" <string> space <form> ")" ]
23757 eval            = "eval" space <form>
23758 space           = *[ " " / <TAB> / <NEWLINE> ]
23759 @end example
23760
23761 Any unrecognized elements in a score file should be ignored, but not
23762 discarded.
23763
23764 As you can see, white space is needed, but the type and amount of white
23765 space is irrelevant.  This means that formatting of the score file is
23766 left up to the programmer---if it's simpler to just spew it all out on
23767 one looong line, then that's ok.
23768
23769 The meaning of the various atoms are explained elsewhere in this
23770 manual (@pxref{Score File Format}).
23771
23772
23773 @node Headers
23774 @subsection Headers
23775
23776 Internally Gnus uses a format for storing article headers that
23777 corresponds to the @sc{nov} format in a mysterious fashion.  One could
23778 almost suspect that the author looked at the @sc{nov} specification and
23779 just shamelessly @emph{stole} the entire thing, and one would be right.
23780
23781 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
23782 RFC 1036 to talk about lines in the head of an article (e.g.,
23783 @code{From}).  It is used by many people as a synonym for
23784 ``head''---``the header and the body''.  (That should be avoided, in my
23785 opinion.)  And Gnus uses a format internally that it calls ``header'',
23786 which is what I'm talking about here.  This is a 9-element vector,
23787 basically, with each header (ouch) having one slot.
23788
23789 These slots are, in order: @code{number}, @code{subject}, @code{from},
23790 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
23791 @code{xref}, and @code{extra}.  There are macros for accessing and
23792 setting these slots---they all have predictable names beginning with
23793 @code{mail-header-} and @code{mail-header-set-}, respectively.
23794
23795 All these slots contain strings, except the @code{extra} slot, which
23796 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
23797
23798
23799 @node Ranges
23800 @subsection Ranges
23801
23802 @sc{gnus} introduced a concept that I found so useful that I've started
23803 using it a lot and have elaborated on it greatly.
23804
23805 The question is simple: If you have a large amount of objects that are
23806 identified by numbers (say, articles, to take a @emph{wild} example)
23807 that you want to qualify as being ``included'', a normal sequence isn't
23808 very useful.  (A 200,000 length sequence is a bit long-winded.)
23809
23810 The solution is as simple as the question: You just collapse the
23811 sequence.
23812
23813 @example
23814 (1 2 3 4 5 6 10 11 12)
23815 @end example
23816
23817 is transformed into
23818
23819 @example
23820 ((1 . 6) (10 . 12))
23821 @end example
23822
23823 To avoid having those nasty @samp{(13 . 13)} elements to denote a
23824 lonesome object, a @samp{13} is a valid element:
23825
23826 @example
23827 ((1 . 6) 7 (10 . 12))
23828 @end example
23829
23830 This means that comparing two ranges to find out whether they are equal
23831 is slightly tricky:
23832
23833 @example
23834 ((1 . 5) 7 8 (10 . 12))
23835 @end example
23836
23837 and
23838
23839 @example
23840 ((1 . 5) (7 . 8) (10 . 12))
23841 @end example
23842
23843 are equal.  In fact, any non-descending list is a range:
23844
23845 @example
23846 (1 2 3 4 5)
23847 @end example
23848
23849 is a perfectly valid range, although a pretty long-winded one.  This is
23850 also valid:
23851
23852 @example
23853 (1 . 5)
23854 @end example
23855
23856 and is equal to the previous range.
23857
23858 Here's a BNF definition of ranges.  Of course, one must remember the
23859 semantic requirement that the numbers are non-descending.  (Any number
23860 of repetition of the same number is allowed, but apt to disappear in
23861 range handling.)
23862
23863 @example
23864 range           = simple-range / normal-range
23865 simple-range    = "(" number " . " number ")"
23866 normal-range    = "(" start-contents ")"
23867 contents        = "" / simple-range *[ " " contents ] /
23868                   number *[ " " contents ]
23869 @end example
23870
23871 Gnus currently uses ranges to keep track of read articles and article
23872 marks.  I plan on implementing a number of range operators in C if The
23873 Powers That Be are willing to let me.  (I haven't asked yet, because I
23874 need to do some more thinking on what operators I need to make life
23875 totally range-based without ever having to convert back to normal
23876 sequences.)
23877
23878
23879 @node Group Info
23880 @subsection Group Info
23881
23882 Gnus stores all permanent info on groups in a @dfn{group info} list.
23883 This list is from three to six elements (or more) long and exhaustively
23884 describes the group.
23885
23886 Here are two example group infos; one is a very simple group while the
23887 second is a more complex one:
23888
23889 @example
23890 ("no.group" 5 ((1 . 54324)))
23891
23892 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
23893                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
23894                 (nnml "")
23895                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
23896 @end example
23897
23898 The first element is the @dfn{group name}---as Gnus knows the group,
23899 anyway.  The second element is the @dfn{subscription level}, which
23900 normally is a small integer.  (It can also be the @dfn{rank}, which is a
23901 cons cell where the @code{car} is the level and the @code{cdr} is the
23902 score.)  The third element is a list of ranges of read articles.  The
23903 fourth element is a list of lists of article marks of various kinds.
23904 The fifth element is the select method (or virtual server, if you like).
23905 The sixth element is a list of @dfn{group parameters}, which is what
23906 this section is about.
23907
23908 Any of the last three elements may be missing if they are not required.
23909 In fact, the vast majority of groups will normally only have the first
23910 three elements, which saves quite a lot of cons cells.
23911
23912 Here's a BNF definition of the group info format:
23913
23914 @example
23915 info          = "(" group space ralevel space read
23916                 [ "" / [ space marks-list [ "" / [ space method [ "" /
23917                 space parameters ] ] ] ] ] ")"
23918 group         = quote <string> quote
23919 ralevel       = rank / level
23920 level         = <integer in the range of 1 to inf>
23921 rank          = "(" level "." score ")"
23922 score         = <integer in the range of 1 to inf>
23923 read          = range
23924 marks-lists   = nil / "(" *marks ")"
23925 marks         = "(" <string> range ")"
23926 method        = "(" <string> *elisp-forms ")"
23927 parameters    = "(" *elisp-forms ")"
23928 @end example
23929
23930 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
23931 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
23932 in pseudo-BNF.
23933
23934 If you have a Gnus info and want to access the elements, Gnus offers a
23935 series of macros for getting/setting these elements.
23936
23937 @table @code
23938 @item gnus-info-group
23939 @itemx gnus-info-set-group
23940 @findex gnus-info-group
23941 @findex gnus-info-set-group
23942 Get/set the group name.
23943
23944 @item gnus-info-rank
23945 @itemx gnus-info-set-rank
23946 @findex gnus-info-rank
23947 @findex gnus-info-set-rank
23948 Get/set the group rank (@pxref{Group Score}).
23949
23950 @item gnus-info-level
23951 @itemx gnus-info-set-level
23952 @findex gnus-info-level
23953 @findex gnus-info-set-level
23954 Get/set the group level.
23955
23956 @item gnus-info-score
23957 @itemx gnus-info-set-score
23958 @findex gnus-info-score
23959 @findex gnus-info-set-score
23960 Get/set the group score (@pxref{Group Score}).
23961
23962 @item gnus-info-read
23963 @itemx gnus-info-set-read
23964 @findex gnus-info-read
23965 @findex gnus-info-set-read
23966 Get/set the ranges of read articles.
23967
23968 @item gnus-info-marks
23969 @itemx gnus-info-set-marks
23970 @findex gnus-info-marks
23971 @findex gnus-info-set-marks
23972 Get/set the lists of ranges of marked articles.
23973
23974 @item gnus-info-method
23975 @itemx gnus-info-set-method
23976 @findex gnus-info-method
23977 @findex gnus-info-set-method
23978 Get/set the group select method.
23979
23980 @item gnus-info-params
23981 @itemx gnus-info-set-params
23982 @findex gnus-info-params
23983 @findex gnus-info-set-params
23984 Get/set the group parameters.
23985 @end table
23986
23987 All the getter functions take one parameter---the info list.  The setter
23988 functions take two parameters---the info list and the new value.
23989
23990 The last three elements in the group info aren't mandatory, so it may be
23991 necessary to extend the group info before setting the element.  If this
23992 is necessary, you can just pass on a non-@code{nil} third parameter to
23993 the three final setter functions to have this happen automatically.
23994
23995
23996 @node Extended Interactive
23997 @subsection Extended Interactive
23998 @cindex interactive
23999 @findex gnus-interactive
24000
24001 Gnus extends the standard Emacs @code{interactive} specification
24002 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
24003 Prefixes}).  Here's an example of how this is used:
24004
24005 @lisp
24006 (defun gnus-summary-increase-score (&optional score symp)
24007   (interactive (gnus-interactive "P\ny"))
24008   ...
24009   )
24010 @end lisp
24011
24012 The best thing to do would have been to implement
24013 @code{gnus-interactive} as a macro which would have returned an
24014 @code{interactive} form, but this isn't possible since Emacs checks
24015 whether a function is interactive or not by simply doing an @code{assq}
24016 on the lambda form.  So, instead we have @code{gnus-interactive}
24017 function that takes a string and returns values that are usable to
24018 @code{interactive}.
24019
24020 This function accepts (almost) all normal @code{interactive} specs, but
24021 adds a few more.
24022
24023 @table @samp
24024 @item y
24025 @vindex gnus-current-prefix-symbol
24026 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
24027 variable.
24028
24029 @item Y
24030 @vindex gnus-current-prefix-symbols
24031 A list of the current symbolic prefixes---the
24032 @code{gnus-current-prefix-symbol} variable.
24033
24034 @item A
24035 The current article number---the @code{gnus-summary-article-number}
24036 function.
24037
24038 @item H
24039 The current article header---the @code{gnus-summary-article-header}
24040 function.
24041
24042 @item g
24043 The current group name---the @code{gnus-group-group-name}
24044 function.
24045
24046 @end table
24047
24048
24049 @node Emacs/XEmacs Code
24050 @subsection Emacs/XEmacs Code
24051 @cindex XEmacs
24052 @cindex Emacsen
24053
24054 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
24055 platforms must be the primary one.  I chose Emacs.  Not because I don't
24056 like XEmacs or Mule, but because it comes first alphabetically.
24057
24058 This means that Gnus will byte-compile under Emacs with nary a warning,
24059 while XEmacs will pump out gigabytes of warnings while byte-compiling.
24060 As I use byte-compilation warnings to help me root out trivial errors in
24061 Gnus, that's very useful.
24062
24063 I've also consistently used Emacs function interfaces, but have used
24064 Gnusey aliases for the functions.  To take an example:  Emacs defines a
24065 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
24066 function.  I then define a function called @code{gnus-run-at-time} that
24067 takes the same parameters as the Emacs @code{run-at-time}.  When running
24068 Gnus under Emacs, the former function is just an alias for the latter.
24069 However, when running under XEmacs, the former is an alias for the
24070 following function:
24071
24072 @lisp
24073 (defun gnus-xmas-run-at-time (time repeat function &rest args)
24074   (start-itimer
24075    "gnus-run-at-time"
24076    `(lambda ()
24077       (,function ,@@args))
24078    time repeat))
24079 @end lisp
24080
24081 This sort of thing has been done for bunches of functions.  Gnus does
24082 not redefine any native Emacs functions while running under XEmacs---it
24083 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
24084 all over.
24085
24086 In the cases where the XEmacs function interface was obviously cleaner,
24087 I used it instead.  For example @code{gnus-region-active-p} is an alias
24088 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
24089
24090 Of course, I could have chosen XEmacs as my native platform and done
24091 mapping functions the other way around.  But I didn't.  The performance
24092 hit these indirections impose on Gnus under XEmacs should be slight.
24093
24094
24095 @node Various File Formats
24096 @subsection Various File Formats
24097
24098 @menu
24099 * Active File Format::          Information on articles and groups available.
24100 * Newsgroups File Format::      Group descriptions.
24101 @end menu
24102
24103
24104 @node Active File Format
24105 @subsubsection Active File Format
24106
24107 The active file lists all groups available on the server in
24108 question.  It also lists the highest and lowest current article numbers
24109 in each group.
24110
24111 Here's an excerpt from a typical active file:
24112
24113 @example
24114 soc.motss 296030 293865 y
24115 alt.binaries.pictures.fractals 3922 3913 n
24116 comp.sources.unix 1605 1593 m
24117 comp.binaries.ibm.pc 5097 5089 y
24118 no.general 1000 900 y
24119 @end example
24120
24121 Here's a pseudo-BNF definition of this file:
24122
24123 @example
24124 active      = *group-line
24125 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
24126 group       = <non-white-space string>
24127 spc         = " "
24128 high-number = <non-negative integer>
24129 low-number  = <positive integer>
24130 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
24131 @end example
24132
24133 For a full description of this file, see the manual pages for
24134 @samp{innd}, in particular @samp{active(5)}.
24135
24136
24137 @node Newsgroups File Format
24138 @subsubsection Newsgroups File Format
24139
24140 The newsgroups file lists groups along with their descriptions.  Not all
24141 groups on the server have to be listed,  and not all groups in the file
24142 have to exist on the server.  The file is meant purely as information to
24143 the user.
24144
24145 The format is quite simple; a group name, a tab, and the description.
24146 Here's the definition:
24147
24148 @example
24149 newsgroups    = *line
24150 line          = group tab description <NEWLINE>
24151 group         = <non-white-space string>
24152 tab           = <TAB>
24153 description   = <string>
24154 @end example
24155
24156
24157 @page
24158 @node Emacs for Heathens
24159 @section Emacs for Heathens
24160
24161 Believe it or not, but some people who use Gnus haven't really used
24162 Emacs much before they embarked on their journey on the Gnus Love Boat.
24163 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
24164 region'', and ``set @code{gnus-flargblossen} to an alist where the key
24165 is a regexp that is used for matching on the group name'' are magical
24166 phrases with little or no meaning, then this appendix is for you.  If
24167 you are already familiar with Emacs, just ignore this and go fondle your
24168 cat instead.
24169
24170 @menu
24171 * Keystrokes::                  Entering text and executing commands.
24172 * Emacs Lisp::                  The built-in Emacs programming language.
24173 @end menu
24174
24175
24176 @node Keystrokes
24177 @subsection Keystrokes
24178
24179 @itemize @bullet
24180 @item
24181 Q: What is an experienced Emacs user?
24182
24183 @item
24184 A: A person who wishes that the terminal had pedals.
24185 @end itemize
24186
24187 Yes, when you use Emacs, you are apt to use the control key, the shift
24188 key and the meta key a lot.  This is very annoying to some people
24189 (notably @code{vi}le users), and the rest of us just love the hell out
24190 of it.  Just give up and submit.  Emacs really does stand for
24191 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
24192 may have heard from other disreputable sources (like the Emacs author).
24193
24194 The shift keys are normally located near your pinky fingers, and are
24195 normally used to get capital letters and stuff.  You probably use it all
24196 the time.  The control key is normally marked ``CTRL'' or something like
24197 that.  The meta key is, funnily enough, never marked as such on any
24198 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
24199 which is the meta key on this keyboard.  It's usually located somewhere
24200 to the left hand side of the keyboard, usually on the bottom row.
24201
24202 Now, us Emacs people don't say ``press the meta-control-m key'',
24203 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
24204 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
24205 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
24206 down the control key, and hold it down while you press @kbd{k}''.
24207 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
24208 the control key and then press @kbd{k}''.  Simple, ay?
24209
24210 This is somewhat complicated by the fact that not all keyboards have a
24211 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
24212 means ``press escape, release escape, press @kbd{k}''.  That's much more
24213 work than if you have a meta key, so if that's the case, I respectfully
24214 suggest you get a real keyboard with a meta key.  You can't live without
24215 it.
24216
24217
24218
24219 @node Emacs Lisp
24220 @subsection Emacs Lisp
24221
24222 Emacs is the King of Editors because it's really a Lisp interpreter.
24223 Each and every key you tap runs some Emacs Lisp code snippet, and since
24224 Emacs Lisp is an interpreted language, that means that you can configure
24225 any key to run any arbitrary code.  You just, like, do it.
24226
24227 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
24228 functions.  (These are byte-compiled for speed, but it's still
24229 interpreted.)  If you decide that you don't like the way Gnus does
24230 certain things, it's trivial to have it do something a different way.
24231 (Well, at least if you know how to write Lisp code.)  However, that's
24232 beyond the scope of this manual, so we are simply going to talk about
24233 some common constructs that you normally use in your @file{.emacs} file
24234 to customize Gnus.
24235
24236 If you want to set the variable @code{gnus-florgbnize} to four (4), you
24237 write the following:
24238
24239 @lisp
24240 (setq gnus-florgbnize 4)
24241 @end lisp
24242
24243 This function (really ``special form'') @code{setq} is the one that can
24244 set a variable to some value.  This is really all you need to know.  Now
24245 you can go and fill your @code{.emacs} file with lots of these to change
24246 how Gnus works.
24247
24248 If you have put that thing in your @code{.emacs} file, it will be read
24249 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
24250 start Emacs.  If you want to change the variable right away, simply say
24251 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
24252 previous ``form'', which is a simple @code{setq} statement here.
24253
24254 Go ahead---just try it, if you're located at your Emacs.  After you
24255 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
24256 is the return value of the form you @code{eval}ed.
24257
24258 Some pitfalls:
24259
24260 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
24261 that means:
24262
24263 @lisp
24264 (setq gnus-read-active-file 'some)
24265 @end lisp
24266
24267 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
24268 @samp{nntp.ifi.uio.no}'', that means:
24269
24270 @lisp
24271 (setq gnus-nntp-server "nntp.ifi.uio.no")
24272 @end lisp
24273
24274 So be careful not to mix up strings (the latter) with symbols (the
24275 former).  The manual is unambiguous, but it can be confusing.
24276
24277 @page
24278 @include gnus-faq.texi
24279
24280 @node Index
24281 @chapter Index
24282 @printindex cp
24283
24284 @node Key Index
24285 @chapter Key Index
24286 @printindex ky
24287
24288 @summarycontents
24289 @contents
24290 @bye
24291
24292 @iftex
24293 @iflatex
24294 \end{document}
24295 @end iflatex
24296 @end iftex
24297
24298 @c Local Variables:
24299 @c mode: texinfo
24300 @c coding: iso-8859-1
24301 @c End:
24302 % LocalWords:  BNF mucho detailmenu cindex kindex kbd
24303 % LocalWords:  findex Gnusae vindex dfn dfn samp nntp setq nnspool nntpserver
24304 % LocalWords:  nnmbox newusers Blllrph NEWGROUPS dingnusdingnusdingnus
24305 % LocalWords:  pre fab rec comp nnslashdot regex ga ga sci nnml nnbabyl nnmh
24306 % LocalWords:  nnfolder emph looong eld newsreaders defun init elc pxref