ab28372600b3b3481f584cdfcaf963fb1f9da4ab
[elisp/gnus.git-] / texi / gnus.texi
1 \input texinfo                  @c -*-texinfo-*-  -*- coding: iso-latin-1 -*-
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{bembo}
24 \usepackage{pixidx}
25
26 \makeindex
27 \begin{document}
28
29 \newcommand{\gnuschaptername}{}
30 \newcommand{\gnussectionname}{}
31
32 \newcommand{\gnusbackslash}{/}
33
34 \newcommand{\gnusref}[1]{``#1'' on page \pageref{#1}}
35 \newcommand{\gnusuref}[1]{\gnustt{#1}}
36 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
37 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
38
39 \newcommand{\gnuskindex}[1]{\index{#1}}
40 \newcommand{\gnusindex}[1]{\index{#1}}
41
42 \newcommand{\gnustt}[1]{{\fontfamily{pfu}\fontsize{10pt}{10}\selectfont #1}}
43 \newcommand{\gnuscode}[1]{\gnustt{#1}}
44 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\fontfamily{pfu}\fontsize{10pt}{10}\selectfont #1}''}
45 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
46 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
47 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
48 \newcommand{\gnusdfn}[1]{\textit{#1}}
49 \newcommand{\gnusi}[1]{\textit{#1}}
50 \newcommand{\gnusstrong}[1]{\textbf{#1}}
51 \newcommand{\gnusemph}[1]{\textit{#1}}
52 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
53 \newcommand{\gnussc}[1]{\textsc{#1}}
54 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
55 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
56 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
57
58 \newcommand{\gnusbullet}{{${\bullet}$}}
59 \newcommand{\gnusdollar}{\$}
60 \newcommand{\gnusampersand}{\&}
61 \newcommand{\gnuspercent}{\%}
62 \newcommand{\gnushash}{\#}
63 \newcommand{\gnushat}{\symbol{"5E}}
64 \newcommand{\gnusunderline}{\symbol{"5F}}
65 \newcommand{\gnusnot}{$\neg$}
66 \newcommand{\gnustilde}{\symbol{"7E}}
67 \newcommand{\gnusless}{{$<$}}
68 \newcommand{\gnusgreater}{{$>$}}
69 \newcommand{\gnusbraceleft}{{$>$}}
70 \newcommand{\gnusbraceright}{{$>$}}
71
72 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head.eps,height=1cm}}}
73 \newcommand{\gnusinteresting}{
74 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
75 }
76
77 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
78
79 \newcommand{\gnuspagechapter}[1]{
80 {\mbox{}}
81 }
82
83 \newdimen{\gnusdimen}
84 \gnusdimen 0pt
85
86 \newcommand{\gnuschapter}[2]{
87 \gnuscleardoublepage
88 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
89 \chapter{#2}
90 \renewcommand{\gnussectionname}{}
91 \renewcommand{\gnuschaptername}{#2}
92 \thispagestyle{empty}
93 \hspace*{-2cm}
94 \begin{picture}(500,500)(0,0)
95 \put(480,350){\makebox(0,0)[tr]{#1}}
96 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
97 \end{picture}
98 \clearpage
99 }
100
101 \newcommand{\gnusfigure}[3]{
102 \begin{figure}
103 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
104 #3
105 \end{picture}
106 \caption{#1}
107 \end{figure}
108 }
109
110 \newcommand{\gnusicon}[1]{
111 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=tmp/#1-up.ps,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=tmp/#1-up.ps,height=1cm}}}
112 }
113
114 \newcommand{\gnuspicon}[1]{
115 \margindex{\epsfig{figure=#1,width=2cm}}
116 }
117
118 \newcommand{\gnusxface}[2]{
119 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
120 }
121
122 \newcommand{\gnussmiley}[2]{
123 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
124 }
125
126 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
127
128 \newcommand{\gnussection}[1]{
129 \renewcommand{\gnussectionname}{#1}
130 \section{#1}
131 }
132
133 \newenvironment{codelist}%
134 {\begin{list}{}{
135 }
136 }{\end{list}}
137
138 \newenvironment{kbdlist}%
139 {\begin{list}{}{
140 \labelwidth=0cm
141 }
142 }{\end{list}}
143
144 \newenvironment{dfnlist}%
145 {\begin{list}{}{
146 }
147 }{\end{list}}
148
149 \newenvironment{stronglist}%
150 {\begin{list}{}{
151 }
152 }{\end{list}}
153
154 \newenvironment{samplist}%
155 {\begin{list}{}{
156 }
157 }{\end{list}}
158
159 \newenvironment{varlist}%
160 {\begin{list}{}{
161 }
162 }{\end{list}}
163
164 \newenvironment{emphlist}%
165 {\begin{list}{}{
166 }
167 }{\end{list}}
168
169 \newlength\gnusheadtextwidth
170 \setlength{\gnusheadtextwidth}{\headtextwidth}
171 \addtolength{\gnusheadtextwidth}{1cm}
172
173 \newpagestyle{gnuspreamble}%
174 {
175 {
176 \ifodd\count0
177 {
178 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
179 }
180 \else
181 {
182 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
183 }
184 }
185 \fi
186 }
187 }
188 {
189 \ifodd\count0
190 \mbox{} \hfill
191 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo.eps,height=1cm}}
192 \else
193 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo.eps,height=1cm}}
194 \hfill \mbox{}
195 \fi
196 }
197
198 \newpagestyle{gnusindex}%
199 {
200 {
201 \ifodd\count0
202 {
203 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
204 }
205 \else
206 {
207 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
208 }
209 \fi
210 }
211 }
212 {
213 \ifodd\count0
214 \mbox{} \hfill
215 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo.eps,height=1cm}}
216 \else
217 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo.eps,height=1cm}}
218 \hfill \mbox{}
219 \fi
220 }
221
222 \newpagestyle{gnus}%
223 {
224 {
225 \ifodd\count0
226 {
227 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
228 }
229 \else
230 {
231 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
232 }
233 \fi
234 }
235 }
236 {
237 \ifodd\count0
238 \mbox{} \hfill
239 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo.eps,height=1cm}}
240 \else
241 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo.eps,height=1cm}}
242 \hfill \mbox{}
243 \fi
244 }
245
246 \pagenumbering{roman}
247 \pagestyle{gnuspreamble}
248
249 @end iflatex
250 @end iftex
251
252 @iftex
253 @iflatex
254 \begin{titlepage}
255 {
256
257 %\addtolength{\oddsidemargin}{-5cm}
258 %\addtolength{\evensidemargin}{-5cm}
259 \parindent=0cm
260 \addtolength{\textheight}{2cm}
261
262 \gnustitle{\gnustitlename}\\
263 \rule{15cm}{1mm}\\
264 \vfill
265 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo.eps,height=15cm}
266 \vfill
267 \rule{15cm}{1mm}\\
268 \gnusauthor{by Lars Magne Ingebrigtsen}
269 \newpage
270 }
271
272 \mbox{}
273 \vfill
274
275 \thispagestyle{empty}
276
277 Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000
278 Free Software Foundation, Inc.
279
280
281 Permission is granted to copy, distribute and/or modify this document
282 under the terms of the GNU Free Documentation License, Version 1.1 or
283 any later version published by the Free Software Foundation; with no
284 Invariant Sections, with the Front-Cover texts being ``A GNU
285 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
286 license is included in the section entitled ``GNU Free Documentation
287 License'' in the Emacs manual.
288
289 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
290 this GNU Manual, like GNU software.  Copies published by the Free
291 Software Foundation raise funds for GNU development.''
292
293 This document is part of a collection distributed under the GNU Free
294 Documentation License.  If you want to distribute this document
295 separately from the collection, you can do so by adding a copy of the
296 license to the document, as described in section 6 of the license.
297 \newpage
298 \end{titlepage}
299 @end iflatex
300 @end iftex
301
302 @ifnottex
303
304 This file documents gnus, the GNU Emacs newsreader.
305
306 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
307
308 Permission is granted to copy, distribute and/or modify this document
309 under the terms of the GNU Free Documentation License, Version 1.1 or
310 any later version published by the Free Software Foundation; with the
311 Invariant Sections being none, with the Front-Cover texts being ``A GNU
312 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
313 license is included in the section entitled ``GNU Free Documentation
314 License'' in the Emacs manual.
315
316 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
317 this GNU Manual, like GNU software.  Copies published by the Free
318 Software Foundation raise funds for GNU development.''
319
320 This document is part of a collection distributed under the GNU Free
321 Documentation License.  If you want to distribute this document
322 separately from the collection, you can do so by adding a copy of the
323 license to the document, as described in section 6 of the license.
324 @end ifnottex
325
326 @tex
327
328 @titlepage
329 @title T-gnus 6.15 Manual
330
331 @author by Lars Magne Ingebrigtsen
332 @page
333
334 @vskip 0pt plus 1filll
335 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
336
337 Permission is granted to copy, distribute and/or modify this document
338 under the terms of the GNU Free Documentation License, Version 1.1 or
339 any later version published by the Free Software Foundation; with no
340 Invariant Sections, with the Front-Cover texts being ``A GNU
341 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
342 license is included in the section entitled ``GNU Free Documentation
343 License'' in the Emacs manual.
344
345 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
346 this GNU Manual, like GNU software.  Copies published by the Free
347 Software Foundation raise funds for GNU development.''
348
349 This document is part of a collection distributed under the GNU Free
350 Documentation License.  If you want to distribute this document
351 separately from the collection, you can do so by adding a copy of the
352 license to the document, as described in section 6 of the license.
353
354 @end titlepage
355 @page
356
357 @end tex
358
359
360 @node Top
361 @top The gnus Newsreader
362
363 @ifinfo
364
365 You can read news (and mail) from within Emacs by using gnus.  The news
366 can be gotten by any nefarious means you can think of---@sc{nntp}, local
367 spool or your mbox file.  All at the same time, if you want to push your
368 luck.
369
370 T-gnus provides MIME features based on SEMI API.  So T-gnus supports
371 your right to read strange messages including big images or other
372 various kinds of formats.  T-gnus also supports
373 internationalization/localization and multiscript features based on MULE
374 API.  So T-gnus does not discriminate various language communities.
375 Oh, if you are a Klingon, please wait Unicode Next Generation.
376
377 This manual corresponds to T-gnus 6.15.
378
379 @end ifinfo
380
381 @iftex
382
383 @iflatex
384 \tableofcontents
385 \gnuscleardoublepage
386 @end iflatex
387
388 Gnus is the advanced, self-documenting, customizable, extensible
389 unreal-time newsreader for GNU Emacs.
390
391 Oops.  That sounds oddly familiar, so let's start over again to avoid
392 being accused of plagiarism:
393
394 Gnus is a message-reading laboratory.  It will let you look at just
395 about anything as if it were a newsgroup.  You can read mail with it,
396 you can browse directories with it, you can @code{ftp} with it---you
397 can even read news with it!
398
399 Gnus tries to empower people who read news the same way Emacs empowers
400 people who edit text.  Gnus sets no limits to what the user should be
401 allowed to do.  Users are encouraged to extend gnus to make it behave
402 like they want it to behave.  A program should not control people;
403 people should be empowered to do what they want by using (or abusing)
404 the program.
405
406 @end iftex
407
408 @menu
409 * Starting Up::                 Finding news can be a pain.
410 * Group Buffer::                Selecting, subscribing and killing groups.
411 * Summary Buffer::              Reading, saving and posting articles.
412 * Article Buffer::              Displaying and handling articles.
413 * Composing Messages::          Information on sending mail and news.
414 * Select Methods::              Gnus reads all messages from various select methods.
415 * Scoring::                     Assigning values to articles.
416 * Various::                     General purpose settings.
417 * The End::                     Farewell and goodbye.
418 * Appendices::                  Terminology, Emacs intro, FAQ, History, Internals.
419 * Index::                       Variable, function and concept index.
420 * Key Index::                   Key Index.
421
422 @detailmenu
423  --- The Detailed Node Listing ---
424
425 Starting Gnus
426
427 * Finding the News::            Choosing a method for getting news.
428 * The First Time::              What does Gnus do the first time you start it?
429 * The Server is Down::          How can I read my mail then?
430 * Slave Gnusae::                You can have more than one Gnus active at a time.
431 * Fetching a Group::            Starting Gnus just to read a group.
432 * New Groups::                  What is Gnus supposed to do with new groups?
433 * Changing Servers::            You may want to move from one server to another.
434 * Startup Files::               Those pesky startup files---@file{.newsrc}.
435 * Auto Save::                   Recovering from a crash.
436 * The Active File::             Reading the active file over a slow line Takes Time.
437 * Startup Variables::           Other variables you might change.
438
439 New Groups
440
441 * Checking New Groups::         Determining what groups are new.
442 * Subscription Methods::        What Gnus should do with new groups.
443 * Filtering New Groups::        Making Gnus ignore certain new groups.
444
445 Group Buffer
446
447 * Group Buffer Format::         Information listed and how you can change it.
448 * Group Maneuvering::           Commands for moving in the group buffer.
449 * Selecting a Group::           Actually reading news.
450 * Subscription Commands::       Unsubscribing, killing, subscribing.
451 * Group Data::                  Changing the info for a group.
452 * Group Levels::                Levels? What are those, then?
453 * Group Score::                 A mechanism for finding out what groups you like.
454 * Marking Groups::              You can mark groups for later processing.
455 * Foreign Groups::              Creating and editing groups.
456 * Group Parameters::            Each group may have different parameters set.
457 * Listing Groups::              Gnus can list various subsets of the groups.
458 * Sorting Groups::              Re-arrange the group order.
459 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
460 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
461 * Exiting Gnus::                Stop reading news and get some work done.
462 * Group Topics::                A folding group mode divided into topics.
463 * Misc Group Stuff::            Other stuff that you can to do.
464
465 Group Buffer Format
466
467 * Group Line Specification::    Deciding how the group buffer is to look.
468 * Group Modeline Specification::  The group buffer modeline.
469 * Group Highlighting::          Having nice colors in the group buffer.
470
471 Group Topics
472
473 * Topic Variables::             How to customize the topics the Lisp Way.
474 * Topic Commands::              Interactive E-Z commands.
475 * Topic Sorting::               Sorting each topic individually.
476 * Topic Topology::              A map of the world.
477 * Topic Parameters::            Parameters that apply to all groups in a topic.
478
479 Misc Group Stuff
480
481 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
482 * Group Information::           Information and help on groups and Gnus.
483 * Group Timestamp::             Making Gnus keep track of when you last read a group.
484 * File Commands::               Reading and writing the Gnus files.
485
486 Summary Buffer
487
488 * Summary Buffer Format::       Deciding how the summary buffer is to look.
489 * Summary Maneuvering::         Moving around the summary buffer.
490 * Choosing Articles::           Reading articles.
491 * Paging the Article::          Scrolling the current article.
492 * Reply Followup and Post::     Posting articles.
493 * Delayed Articles::            
494 * Marking Articles::            Marking articles as read, expirable, etc.
495 * Limiting::                    You can limit the summary buffer.
496 * Threading::                   How threads are made.
497 * Sorting the Summary Buffer::  How articles and threads are sorted.
498 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
499 * Article Caching::             You may store articles in a cache.
500 * Persistent Articles::         Making articles expiry-resistant.
501 * Article Backlog::             Having already read articles hang around.
502 * Saving Articles::             Ways of customizing article saving.
503 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
504 * Article Treatment::           The article buffer can be mangled at will.
505 * MIME Commands::               Doing MIMEy things with the articles.
506 * Charsets::                    Character set issues.
507 * Article Commands::            Doing various things with the article buffer.
508 * Summary Sorting::             Sorting the summary buffer in various ways.
509 * Finding the Parent::          No child support? Get the parent.
510 * Alternative Approaches::      Reading using non-default summaries.
511 * Tree Display::                A more visual display of threads.
512 * Mail Group Commands::         Some commands can only be used in mail groups.
513 * Various Summary Stuff::       What didn't fit anywhere else.
514 * Exiting the Summary Buffer::  Returning to the Group buffer,
515                                 or reselecting the current group.
516 * Crosspost Handling::          How crossposted articles are dealt with.
517 * Duplicate Suppression::       An alternative when crosspost handling fails.
518 * Security::                    Decrypt and Verify.
519 * Mailing List::                Mailing list minor mode.
520
521 Summary Buffer Format
522
523 * Summary Buffer Lines::        You can specify how summary lines should look.
524 * To From Newsgroups::          How to not display your own name.
525 * Summary Buffer Mode Line::    You can say how the mode line should look.
526 * Summary Highlighting::        Making the summary buffer all pretty and nice.
527
528 Choosing Articles
529
530 * Choosing Commands::           Commands for choosing articles.
531 * Choosing Variables::          Variables that influence these commands.
532
533 Reply, Followup and Post
534
535 * Summary Mail Commands::       Sending mail.
536 * Summary Post Commands::       Sending news.
537 * Summary Message Commands::    Other Message-related commands.
538 * Canceling and Superseding::   
539
540 Marking Articles
541
542 * Unread Articles::             Marks for unread articles.
543 * Read Articles::               Marks for read articles.
544 * Other Marks::                 Marks that do not affect readedness.
545 * Setting Marks::               
546 * Generic Marking Commands::    
547 * Setting Process Marks::       
548
549 Marking Articles
550
551 * Setting Marks::             How to set and remove marks.
552 * Generic Marking Commands::  How to customize the marking.
553 * Setting Process Marks::     How to mark articles for later processing.
554
555 Threading
556
557 * Customizing Threading::       Variables you can change to affect the threading.
558 * Thread Commands::             Thread based commands in the summary buffer.
559
560 Customizing Threading
561
562 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
563 * Filling In Threads::          Making the threads displayed look fuller.
564 * More Threading::              Even more variables for fiddling with threads.
565 * Low-Level Threading::         You thought it was over... but you were wrong!
566
567 Decoding Articles
568
569 * Uuencoded Articles::          Uudecode articles.
570 * Shell Archives::              Unshar articles.
571 * PostScript Files::            Split PostScript.
572 * Other Files::                 Plain save and binhex.
573 * Decoding Variables::          Variables for a happy decoding.
574 * Viewing Files::               You want to look at the result of the decoding?
575
576 Decoding Variables
577
578 * Rule Variables::              Variables that say how a file is to be viewed.
579 * Other Decode Variables::      Other decode variables.
580 * Uuencoding and Posting::      Variables for customizing uuencoding.
581
582 Article Treatment
583
584 * Article Highlighting::    You want to make the article look like fruit salad.
585 * Article Fontisizing::     Making emphasized text look nice.
586 * Article Hiding::          You also want to make certain info go away.
587 * Article Washing::         Lots of way-neat functions to make life better.
588 * Article Buttons::         Click on URLs, Message-IDs, addresses and the like.
589 * Article Date::            Grumble, UT!
590 * Article Signature::       What is a signature?
591 * Article Miscellania::     Various other stuff.
592
593 Alternative Approaches
594
595 * Pick and Read::               First mark articles and then read them.
596 * Binary Groups::               Auto-decode all articles.
597
598 Various Summary Stuff
599
600 * Summary Group Information::   Information oriented commands.
601 * Searching for Articles::      Multiple article commands.
602 * Summary Generation Commands::  
603 * Really Various Summary Commands::  Those pesky non-conformant commands.
604
605 Article Buffer
606
607 * Hiding Headers::              Deciding what headers should be displayed.
608 * Using MIME::                  Pushing articles through @sc{mime} before reading them.
609 * Customizing Articles::        Tailoring the look of the articles.
610 * Article Keymap::              Keystrokes available in the article buffer.
611 * Misc Article::                Other stuff.
612
613 Composing Messages
614
615 * Mail::                        Mailing and replying.
616 * Posting Server::              What server should you post via?
617 * Mail and Post::               Mailing and posting at the same time.
618 * Archived Messages::           Where Gnus stores the messages you've sent.
619 * Posting Styles::              An easier way to specify who you are.
620 * Drafts::                      Postponing messages and rejected messages.
621 * Rejected Articles::           What happens if the server doesn't like your article?
622 * Using GPG::                   How to use GPG and MML to sign and encrypt messages
623
624 Select Methods
625
626 * Server Buffer::               Making and editing virtual servers.
627 * Getting News::                Reading USENET news with Gnus.
628 * Getting Mail::                Reading your personal mail with Gnus.
629 * Browsing the Web::            Getting messages from a plethora of Web sources.
630 * Other Sources::               Reading directories, files, SOUP packets.
631 * Combined Groups::             Combining groups into one group.
632 * Gnus Unplugged::              Reading news and mail offline.
633
634 Server Buffer
635
636 * Server Buffer Format::        You can customize the look of this buffer.
637 * Server Commands::             Commands to manipulate servers.
638 * Example Methods::             Examples server specifications.
639 * Creating a Virtual Server::   An example session.
640 * Server Variables::            Which variables to set.
641 * Servers and Methods::         You can use server names as select methods.
642 * Unavailable Servers::         Some servers you try to contact may be down.
643
644 Getting News
645
646 * NNTP::                        Reading news from an @sc{nntp} server.
647 * News Spool::                  Reading news from the local spool.
648
649 @sc{nntp}
650
651 * Direct Functions::            Connecting directly to the server.
652 * Indirect Functions::          Connecting indirectly to the server.
653 * Common Variables::            Understood by several connection functions.
654
655 Getting Mail
656
657 * Mail in a Newsreader::        Important introductory notes.
658 * Getting Started Reading Mail::  A simple cookbook example.
659 * Splitting Mail::              How to create mail groups.
660 * Mail Sources::                How to tell Gnus where to get mail from.
661 * Mail Backend Variables::      Variables for customizing mail handling.
662 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
663 * Group Mail Splitting::        Use group customize to drive mail splitting.
664 * Incorporating Old Mail::      What about the old mail you have?
665 * Expiring Mail::               Getting rid of unwanted mail.
666 * Washing Mail::                Removing gruft from the mail you get.
667 * Duplicates::                  Dealing with duplicated mail.
668 * Not Reading Mail::            Using mail backends for reading other files.
669 * Choosing a Mail Backend::     Gnus can read a variety of mail formats.
670
671 Mail Sources
672
673 * Mail Source Specifiers::      How to specify what a mail source is.
674 * Mail Source Customization::   Some variables that influence things.
675 * Fetching Mail::               Using the mail source specifiers.
676
677 Choosing a Mail Backend
678
679 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
680 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
681 * Mail Spool::                  Store your mail in a private spool?
682 * MH Spool::                    An mhspool-like backend.
683 * Mail Folders::                Having one file for each group.
684 * Comparing Mail Backends::     An in-depth looks at pros and cons.
685
686 Browsing the Web
687
688 * Web Searches::                Creating groups from articles that match a string.
689 * Slashdot::                    Reading the Slashdot comments.
690 * Ultimate::                    The Ultimate Bulletin Board systems.
691 * Web Archive::                 Reading mailing list archived on web.
692 * RSS::                         Reading RDF site summary.
693 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
694
695 Other Sources
696
697 * Directory Groups::            You can read a directory as if it was a newsgroup.
698 * Anything Groups::             Dired?  Who needs dired?
699 * Document Groups::             Single files can be the basis of a group.
700 * SOUP::                        Reading @sc{soup} packets ``offline''.
701 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
702 * IMAP::                        Using Gnus as a @sc{imap} client.
703
704 Document Groups
705
706 * Document Server Internals::   How to add your own document types.
707
708 SOUP
709
710 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
711 * SOUP Groups::                 A backend for reading @sc{soup} packets.
712 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
713
714 @sc{imap}
715
716 * Splitting in IMAP::           Splitting mail with nnimap.
717 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
718 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
719
720 Combined Groups
721
722 * Virtual Groups::              Combining articles from many groups.
723 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
724
725 Gnus Unplugged
726
727 * Agent Basics::                How it all is supposed to work.
728 * Agent Categories::            How to tell the Gnus Agent what to download.
729 * Agent Commands::              New commands for all the buffers.
730 * Agent Expiry::                How to make old articles go away.
731 * Agent and IMAP::              How to use the Agent with IMAP.
732 * Outgoing Messages::           What happens when you post/mail something?
733 * Agent Variables::             Customizing is fun.
734 * Example Setup::               An example @file{.gnus.el} file for offline people.
735 * Batching Agents::             How to fetch news from a @code{cron} job.
736 * Agent Caveats::               What you think it'll do and what it does.
737
738 Agent Categories
739
740 * Category Syntax::             What a category looks like.
741 * Category Buffer::             A buffer for maintaining categories.
742 * Category Variables::          Customize'r'Us.
743
744 Agent Commands
745
746 * Group Agent Commands::        
747 * Summary Agent Commands::      
748 * Server Agent Commands::       
749
750 Scoring
751
752 * Summary Score Commands::      Adding score entries for the current group.
753 * Group Score Commands::        General score commands.
754 * Score Variables::             Customize your scoring.  (My, what terminology).
755 * Score File Format::           What a score file may contain.
756 * Score File Editing::          You can edit score files by hand as well.
757 * Adaptive Scoring::            Big Sister Gnus knows what you read.
758 * Home Score File::             How to say where new score entries are to go.
759 * Followups To Yourself::       Having Gnus notice when people answer you.
760 * Scoring On Other Headers::    Scoring on non-standard headers.
761 * Scoring Tips::                How to score effectively.
762 * Reverse Scoring::             That problem child of old is not problem.
763 * Global Score Files::          Earth-spanning, ear-splitting score files.
764 * Kill Files::                  They are still here, but they can be ignored.
765 * Converting Kill Files::       Translating kill files to score files.
766 * GroupLens::                   Getting predictions on what you like to read.
767 * Advanced Scoring::            Using logical expressions to build score rules.
768 * Score Decays::                It can be useful to let scores wither away.
769
770 GroupLens
771
772 * Using GroupLens::             How to make Gnus use GroupLens.
773 * Rating Articles::             Letting GroupLens know how you rate articles.
774 * Displaying Predictions::      Displaying predictions given by GroupLens.
775 * GroupLens Variables::         Customizing GroupLens.
776
777 Advanced Scoring
778
779 * Advanced Scoring Syntax::     A definition.
780 * Advanced Scoring Examples::   What they look like.
781 * Advanced Scoring Tips::       Getting the most out of it.
782
783 Various
784
785 * Process/Prefix::              A convention used by many treatment commands.
786 * Interactive::                 Making Gnus ask you many questions.
787 * Symbolic Prefixes::           How to supply some Gnus functions with options.
788 * Formatting Variables::        You can specify what buffers should look like.
789 * Window Layout::               Configuring the Gnus buffer windows.
790 * Faces and Fonts::             How to change how faces look.
791 * Compilation::                 How to speed Gnus up.
792 * Mode Lines::                  Displaying information in the mode lines.
793 * Highlighting and Menus::      Making buffers look all nice and cozy.
794 * Buttons::                     Get tendinitis in ten easy steps!
795 * Daemons::                     Gnus can do things behind your back.
796 * NoCeM::                       How to avoid spam and other fatty foods.
797 * Undo::                        Some actions can be undone.
798 * Moderation::                  What to do if you're a moderator.
799 * XEmacs Enhancements::         There are more pictures and stuff under XEmacs.
800 * Fuzzy Matching::              What's the big fuzz?
801 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
802 * Various Various::             Things that are really various.
803
804 Formatting Variables
805
806 * Formatting Basics::           A formatting variable is basically a format string.
807 * Mode Line Formatting::        Some rules about mode line formatting variables.
808 * Advanced Formatting::         Modifying output in various ways.
809 * User-Defined Specs::          Having Gnus call your own functions.
810 * Formatting Fonts::            Making the formatting look colorful and nice.
811 * Positioning Point::           Moving point to a position after an operation.
812 * Tabulation::                  Tabulating your output.
813 * Wide Characters::             Dealing with wide characters.
814
815 XEmacs Enhancements
816
817 * Picons::                      How to display pictures of what your reading.
818 * Smileys::                     Show all those happy faces the way they were meant to be shown.
819 * Toolbar::                     Click'n'drool.
820 * XVarious::                    Other XEmacsy Gnusey variables.
821
822 Picons
823
824 * Picon Basics::                What are picons and How do I get them.
825 * Picon Requirements::          Don't go further if you aren't using XEmacs.
826 * Easy Picons::                 Displaying Picons---the easy way.
827 * Hard Picons::                 The way you should do it.  You'll learn something.
828 * Picon Useless Configuration::  Other variables you can trash/tweak/munge/play with.
829
830 Appendices
831
832 * History::                     How Gnus got where it is today.
833 * On Writing Manuals::          Why this is not a beginner's guide.
834 * Terminology::                 We use really difficult, like, words here.
835 * Customization::               Tailoring Gnus to your needs.
836 * Troubleshooting::             What you might try if things do not work.
837 * Gnus Reference Guide::        Rilly, rilly technical stuff.
838 * Emacs for Heathens::          A short introduction to Emacsian terms.
839
840 History
841
842 * Gnus Versions::               What Gnus versions have been released.
843 * Other Gnus Versions::         Other Gnus versions that also have been released.
844 * Why?::                        What's the point of Gnus?
845 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
846 * Conformity::                  Gnus tries to conform to all standards.
847 * Emacsen::                     Gnus can be run on a few modern Emacsen.
848 * Gnus Development::            How Gnus is developed.
849 * Contributors::                Oodles of people.
850 * New Features::                Pointers to some of the new stuff in Gnus.
851
852 New Features
853
854 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
855 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
856 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
857 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
858 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
859
860 Customization
861
862 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
863 * Slow Terminal Connection::    You run a remote Emacs.
864 * Little Disk Space::           You feel that having large setup files is icky.
865 * Slow Machine::                You feel like buying a faster machine.
866
867 Gnus Reference Guide
868
869 * Gnus Utility Functions::      Common functions and variable to use.
870 * Backend Interface::           How Gnus communicates with the servers.
871 * Score File Syntax::           A BNF definition of the score file standard.
872 * Headers::                     How Gnus stores headers internally.
873 * Ranges::                      A handy format for storing mucho numbers.
874 * Group Info::                  The group info format.
875 * Extended Interactive::        Symbolic prefixes and stuff.
876 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
877 * Various File Formats::        Formats of files that Gnus use.
878
879 Backend Interface
880
881 * Required Backend Functions::  Functions that must be implemented.
882 * Optional Backend Functions::  Functions that need not be implemented.
883 * Error Messaging::             How to get messages and report errors.
884 * Writing New Backends::        Extending old backends.
885 * Hooking New Backends Into Gnus::  What has to be done on the Gnus end.
886 * Mail-like Backends::          Some tips on mail backends.
887
888 Various File Formats
889
890 * Active File Format::          Information on articles and groups available.
891 * Newsgroups File Format::      Group descriptions.
892
893 Emacs for Heathens
894
895 * Keystrokes::                  Entering text and executing commands.
896 * Emacs Lisp::                  The built-in Emacs programming language.
897
898 @end detailmenu
899 @end menu
900
901 @node Starting Up
902 @chapter Starting gnus
903 @cindex starting up
904
905 @kindex M-x gnus
906 @findex gnus
907 If your system administrator has set things up properly, starting gnus
908 and reading news is extremely easy---you just type @kbd{M-x gnus} in
909 your Emacs.
910
911 @findex gnus-other-frame
912 @kindex M-x gnus-other-frame
913 If you want to start gnus in a different frame, you can use the command
914 @kbd{M-x gnus-other-frame} instead.
915
916 If things do not go smoothly at startup, you have to twiddle some
917 variables in your @file{~/.gnus} file.  This file is similar to
918 @file{~/.emacs}, but is read when gnus starts.
919
920 If you puzzle at any terms used in this manual, please refer to the
921 terminology section (@pxref{Terminology}).
922
923 @menu
924 * Finding the News::            Choosing a method for getting news.
925 * The First Time::              What does Gnus do the first time you start it?
926 * The Server is Down::          How can I read my mail then?
927 * Slave Gnusae::                You can have more than one Gnus active at a time.
928 * Fetching a Group::            Starting Gnus just to read a group.
929 * New Groups::                  What is Gnus supposed to do with new groups?
930 * Changing Servers::            You may want to move from one server to another.
931 * Startup Files::               Those pesky startup files---@file{.newsrc}.
932 * Auto Save::                   Recovering from a crash.
933 * The Active File::             Reading the active file over a slow line Takes Time.
934 * Startup Variables::           Other variables you might change.
935 @end menu
936
937
938 @node Finding the News
939 @section Finding the News
940 @cindex finding news
941
942 @vindex gnus-select-method
943 @c @head
944 The @code{gnus-select-method} variable says where gnus should look for
945 news.  This variable should be a list where the first element says
946 @dfn{how} and the second element says @dfn{where}.  This method is your
947 native method.  All groups not fetched with this method are
948 foreign groups.
949
950 For instance, if the @samp{news.somewhere.edu} @sc{nntp} server is where
951 you want to get your daily dosage of news from, you'd say:
952
953 @lisp
954 (setq gnus-select-method '(nntp "news.somewhere.edu"))
955 @end lisp
956
957 If you want to read directly from the local spool, say:
958
959 @lisp
960 (setq gnus-select-method '(nnspool ""))
961 @end lisp
962
963 If you can use a local spool, you probably should, as it will almost
964 certainly be much faster.
965
966 @vindex gnus-nntpserver-file
967 @cindex NNTPSERVER
968 @cindex @sc{nntp} server
969 If this variable is not set, gnus will take a look at the
970 @code{NNTPSERVER} environment variable.  If that variable isn't set,
971 gnus will see whether @code{gnus-nntpserver-file}
972 (@file{/etc/nntpserver} by default) has any opinions on the matter.  If
973 that fails as well, gnus will try to use the machine running Emacs as an @sc{nntp} server.  That's a long shot, though.
974
975 @vindex gnus-nntp-server
976 If @code{gnus-nntp-server} is set, this variable will override
977 @code{gnus-select-method}.  You should therefore set
978 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
979
980 @vindex gnus-secondary-servers
981 @vindex gnus-nntp-server
982 You can also make gnus prompt you interactively for the name of an
983 @sc{nntp} server.  If you give a non-numerical prefix to @code{gnus}
984 (i.e., @kbd{C-u M-x gnus}), gnus will let you choose between the servers
985 in the @code{gnus-secondary-servers} list (if any).  You can also just
986 type in the name of any server you feel like visiting.  (Note that this
987 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
988 gnus} later in the same Emacs session, Gnus will contact the same
989 server.)
990
991 @findex gnus-group-browse-foreign-server
992 @kindex B (Group)
993 However, if you use one @sc{nntp} server regularly and are just
994 interested in a couple of groups from a different server, you would be
995 better served by using the @kbd{B} command in the group buffer.  It will
996 let you have a look at what groups are available, and you can subscribe
997 to any of the groups you want to.  This also makes @file{.newsrc}
998 maintenance much tidier.  @xref{Foreign Groups}.
999
1000 @vindex gnus-secondary-select-methods
1001 @c @head
1002 A slightly different approach to foreign groups is to set the
1003 @code{gnus-secondary-select-methods} variable.  The select methods
1004 listed in this variable are in many ways just as native as the
1005 @code{gnus-select-method} server.  They will also be queried for active
1006 files during startup (if that's required), and new newsgroups that
1007 appear on these servers will be subscribed (or not) just as native
1008 groups are.
1009
1010 For instance, if you use the @code{nnmbox} backend to read your mail, you
1011 would typically set this variable to
1012
1013 @lisp
1014 (setq gnus-secondary-select-methods '((nnmbox "")))
1015 @end lisp
1016
1017
1018 @node The First Time
1019 @section The First Time
1020 @cindex first time usage
1021
1022 If no startup files exist, gnus will try to determine what groups should
1023 be subscribed by default.
1024
1025 @vindex gnus-default-subscribed-newsgroups
1026 If the variable @code{gnus-default-subscribed-newsgroups} is set, gnus
1027 will subscribe you to just those groups in that list, leaving the rest
1028 killed.  Your system administrator should have set this variable to
1029 something useful.
1030
1031 Since she hasn't, gnus will just subscribe you to a few arbitrarily
1032 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1033 here as @dfn{whatever Lars thinks you should read}.)
1034
1035 You'll also be subscribed to the gnus documentation group, which should
1036 help you with most common problems.
1037
1038 If @code{gnus-default-subscribed-newsgroups} is @code{t}, gnus will just
1039 use the normal functions for handling new groups, and not do anything
1040 special.
1041
1042
1043 @node The Server is Down
1044 @section The Server is Down
1045 @cindex server errors
1046
1047 If the default server is down, gnus will understandably have some
1048 problems starting.  However, if you have some mail groups in addition to
1049 the news groups, you may want to start gnus anyway.
1050
1051 Gnus, being the trusting sort of program, will ask whether to proceed
1052 without a native select method if that server can't be contacted.  This
1053 will happen whether the server doesn't actually exist (i.e., you have
1054 given the wrong address) or the server has just momentarily taken ill
1055 for some reason or other.  If you decide to continue and have no foreign
1056 groups, you'll find it difficult to actually do anything in the group
1057 buffer.  But, hey, that's your problem.  Blllrph!
1058
1059 @findex gnus-no-server
1060 @kindex M-x gnus-no-server
1061 @c @head
1062 If you know that the server is definitely down, or you just want to read
1063 your mail without bothering with the server at all, you can use the
1064 @code{gnus-no-server} command to start gnus.  That might come in handy
1065 if you're in a hurry as well.  This command will not attempt to contact
1066 your primary server---instead, it will just activate all groups on level
1067 1 and 2.  (You should preferably keep no native groups on those two
1068 levels.) Also @pxref{Group Levels}.
1069
1070
1071 @node Slave Gnusae
1072 @section Slave Gnusae
1073 @cindex slave
1074
1075 You might want to run more than one Emacs with more than one gnus at the
1076 same time.  If you are using different @file{.newsrc} files (e.g., if you
1077 are using the two different gnusae to read from two different servers),
1078 that is no problem whatsoever.  You just do it.
1079
1080 The problem appears when you want to run two Gnusae that use the same
1081 @code{.newsrc} file.
1082
1083 To work around that problem some, we here at the Think-Tank at the gnus
1084 Towers have come up with a new concept: @dfn{Masters} and
1085 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1086 taken out a copyright on those words.  If you wish to use those words in
1087 conjunction with each other, you have to send $1 per usage instance to
1088 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1089 Applications}) will be much more expensive, of course.)
1090
1091 Anyway, you start one gnus up the normal way with @kbd{M-x gnus} (or
1092 however you do it).  Each subsequent slave gnusae should be started with
1093 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1094 files, but instead save @dfn{slave files} that contain information only
1095 on what groups have been read in the slave session.  When a master gnus
1096 starts, it will read (and delete) these slave files, incorporating all
1097 information from them.  (The slave files will be read in the sequence
1098 they were created, so the latest changes will have precedence.)
1099
1100 Information from the slave files has, of course, precedence over the
1101 information in the normal (i.e., master) @code{.newsrc} file.
1102
1103
1104 @node Fetching a Group
1105 @section Fetching a Group
1106 @cindex fetching a group
1107
1108 @findex gnus-fetch-group
1109 It is sometimes convenient to be able to just say ``I want to read this
1110 group and I don't care whether gnus has been started or not''.  This is
1111 perhaps more useful for people who write code than for users, but the
1112 command @code{gnus-fetch-group} provides this functionality in any case.
1113 It takes the group name as a parameter.
1114
1115
1116 @node New Groups
1117 @section New Groups
1118 @cindex new groups
1119 @cindex subscription
1120
1121 @vindex gnus-check-new-newsgroups
1122 If you are satisfied that you really never want to see any new groups,
1123 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1124 also save you some time at startup.  Even if this variable is
1125 @code{nil}, you can always subscribe to the new groups just by pressing
1126 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1127 is @code{ask-server} by default.  If you set this variable to
1128 @code{always}, then gnus will query the backends for new groups even
1129 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1130
1131 @menu
1132 * Checking New Groups::         Determining what groups are new.
1133 * Subscription Methods::        What Gnus should do with new groups.
1134 * Filtering New Groups::        Making Gnus ignore certain new groups.
1135 @end menu
1136
1137
1138 @node Checking New Groups
1139 @subsection Checking New Groups
1140
1141 Gnus normally determines whether a group is new or not by comparing the
1142 list of groups from the active file(s) with the lists of subscribed and
1143 dead groups.  This isn't a particularly fast method.  If
1144 @code{gnus-check-new-newsgroups} is @code{ask-server}, gnus will ask the
1145 server for new groups since the last time.  This is both faster and
1146 cheaper.  This also means that you can get rid of the list of killed
1147 groups altogether, so you may set @code{gnus-save-killed-list} to
1148 @code{nil}, which will save time both at startup, at exit, and all over.
1149 Saves disk space, too.  Why isn't this the default, then?
1150 Unfortunately, not all servers support this command.
1151
1152 I bet I know what you're thinking now: How do I find out whether my
1153 server supports @code{ask-server}?  No?  Good, because I don't have a
1154 fail-safe answer.  I would suggest just setting this variable to
1155 @code{ask-server} and see whether any new groups appear within the next
1156 few days.  If any do, then it works.  If none do, then it doesn't
1157 work.  I could write a function to make gnus guess whether the server
1158 supports @code{ask-server}, but it would just be a guess.  So I won't.
1159 You could @code{telnet} to the server and say @code{HELP} and see
1160 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1161 it does, then it might work.  (But there are servers that lists
1162 @samp{NEWGROUPS} without supporting the function properly.)
1163
1164 This variable can also be a list of select methods.  If so, gnus will
1165 issue an @code{ask-server} command to each of the select methods, and
1166 subscribe them (or not) using the normal methods.  This might be handy
1167 if you are monitoring a few servers for new groups.  A side effect is
1168 that startup will take much longer, so you can meditate while waiting.
1169 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1170
1171
1172 @node Subscription Methods
1173 @subsection Subscription Methods
1174
1175 @vindex gnus-subscribe-newsgroup-method
1176 What gnus does when it encounters a new group is determined by the
1177 @code{gnus-subscribe-newsgroup-method} variable.
1178
1179 This variable should contain a function.  This function will be called
1180 with the name of the new group as the only parameter.
1181
1182 Some handy pre-fab functions are:
1183
1184 @table @code
1185
1186 @item gnus-subscribe-zombies
1187 @vindex gnus-subscribe-zombies
1188 Make all new groups zombies.  This is the default.  You can browse the
1189 zombies later (with @kbd{A z}) and either kill them all off properly
1190 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1191
1192 @item gnus-subscribe-randomly
1193 @vindex gnus-subscribe-randomly
1194 Subscribe all new groups in arbitrary order.  This really means that all
1195 new groups will be added at ``the top'' of the group buffer.
1196
1197 @item gnus-subscribe-alphabetically
1198 @vindex gnus-subscribe-alphabetically
1199 Subscribe all new groups in alphabetical order.
1200
1201 @item gnus-subscribe-hierarchically
1202 @vindex gnus-subscribe-hierarchically
1203 Subscribe all new groups hierarchically.  The difference between this
1204 function and @code{gnus-subscribe-alphabetically} is slight.
1205 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1206 alphabetical fashion, while this function will enter groups into its
1207 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1208 @samp{comp} hierarchy, this function will not mess that configuration
1209 up.  Or something like that.
1210
1211 @item gnus-subscribe-interactively
1212 @vindex gnus-subscribe-interactively
1213 Subscribe new groups interactively.  This means that gnus will ask
1214 you about @strong{all} new groups.  The groups you choose to subscribe
1215 to will be subscribed hierarchically.
1216
1217 @item gnus-subscribe-killed
1218 @vindex gnus-subscribe-killed
1219 Kill all new groups.
1220
1221 @item gnus-subscribe-topics
1222 @vindex gnus-subscribe-topics
1223 Put the groups into the topic that has a matching @code{subscribe} topic
1224 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1225 topic parameter that looks like
1226
1227 @example
1228 "nnslashdot"
1229 @end example
1230
1231 will mean that all groups that match that regex will be subscribed under
1232 that topic.
1233
1234 If no topics match the groups, the groups will be subscribed in the
1235 top-level topic.
1236
1237 @end table
1238
1239 @vindex gnus-subscribe-hierarchical-interactive
1240 A closely related variable is
1241 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1242 mouthful.)  If this variable is non-@code{nil}, gnus will ask you in a
1243 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1244 will ask you for each sub-hierarchy whether you want to descend the
1245 hierarchy or not.
1246
1247 One common mistake is to set the variable a few paragraphs above
1248 (@code{gnus-subscribe-newsgroup-method}) to
1249 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1250 will not work.  This is ga-ga.  So don't do it.
1251
1252
1253 @node Filtering New Groups
1254 @subsection Filtering New Groups
1255
1256 A nice and portable way to control which new newsgroups should be
1257 subscribed (or ignored) is to put an @dfn{options} line at the start of
1258 the @file{.newsrc} file.  Here's an example:
1259
1260 @example
1261 options -n !alt.all !rec.all sci.all
1262 @end example
1263
1264 @vindex gnus-subscribe-options-newsgroup-method
1265 This line obviously belongs to a serious-minded intellectual scientific
1266 person (or she may just be plain old boring), because it says that all
1267 groups that have names beginning with @samp{alt} and @samp{rec} should
1268 be ignored, and all groups with names beginning with @samp{sci} should
1269 be subscribed.  Gnus will not use the normal subscription method for
1270 subscribing these groups.
1271 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1272 variable defaults to @code{gnus-subscribe-alphabetically}.
1273
1274 @vindex gnus-options-not-subscribe
1275 @vindex gnus-options-subscribe
1276 If you don't want to mess with your @file{.newsrc} file, you can just
1277 set the two variables @code{gnus-options-subscribe} and
1278 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1279 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1280 and if the new group matches the former, it will be unconditionally
1281 subscribed, and if it matches the latter, it will be ignored.
1282
1283 @vindex gnus-auto-subscribed-groups
1284 Yet another variable that meddles here is
1285 @code{gnus-auto-subscribed-groups}.  It works exactly like
1286 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1287 thought it would be nice to have two of these.  This variable is more
1288 meant for setting some ground rules, while the other variable is used
1289 more for user fiddling.  By default this variable makes all new groups
1290 that come from mail backends (@code{nnml}, @code{nnbabyl},
1291 @code{nnfolder}, @code{nnmbox}, and @code{nnmh}) subscribed.  If you
1292 don't like that, just set this variable to @code{nil}.
1293
1294 New groups that match this regexp are subscribed using
1295 @code{gnus-subscribe-options-newsgroup-method}.
1296
1297
1298 @node Changing Servers
1299 @section Changing Servers
1300 @cindex changing servers
1301
1302 Sometimes it is necessary to move from one @sc{nntp} server to another.
1303 This happens very rarely, but perhaps you change jobs, or one server is
1304 very flaky and you want to use another.
1305
1306 Changing the server is pretty easy, right?  You just change
1307 @code{gnus-select-method} to point to the new server?
1308
1309 @emph{Wrong!}
1310
1311 Article numbers are not (in any way) kept synchronized between different
1312 @sc{nntp} servers, and the only way Gnus keeps track of what articles
1313 you have read is by keeping track of article numbers.  So when you
1314 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1315 worthless.
1316
1317 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1318 file from one server to another.  They all have one thing in
1319 common---they take a looong time to run.  You don't want to use these
1320 functions more than absolutely necessary.
1321
1322 @kindex M-x gnus-change-server
1323 @findex gnus-change-server
1324 If you have access to both servers, Gnus can request the headers for all
1325 the articles you have read and compare @code{Message-ID}s and map the
1326 article numbers of the read articles and article marks.  The @kbd{M-x
1327 gnus-change-server} command will do this for all your native groups.  It
1328 will prompt for the method you want to move to.
1329
1330 @kindex M-x gnus-group-move-group-to-server
1331 @findex gnus-group-move-group-to-server
1332 You can also move individual groups with the @kbd{M-x
1333 gnus-group-move-group-to-server} command.  This is useful if you want to
1334 move a (foreign) group from one server to another.
1335
1336 @kindex M-x gnus-group-clear-data-on-native-groups
1337 @findex gnus-group-clear-data-on-native-groups
1338 If you don't have access to both the old and new server, all your marks
1339 and read ranges have become worthless.  You can use the @kbd{M-x
1340 gnus-group-clear-data-on-native-groups} command to clear out all data
1341 that you have on your native groups.  Use with caution.
1342
1343 After changing servers, you @strong{must} move the cache hierarchy away,
1344 since the cached articles will have wrong article numbers, which will
1345 affect which articles Gnus thinks are read.
1346
1347
1348 @node Startup Files
1349 @section Startup Files
1350 @cindex startup files
1351 @cindex .newsrc
1352 @cindex .newsrc.el
1353 @cindex .newsrc.eld
1354
1355 Now, you all know about the @file{.newsrc} file.  All subscription
1356 information is traditionally stored in this file.
1357
1358 Things got a bit more complicated with @sc{gnus}.  In addition to
1359 keeping the @file{.newsrc} file updated, it also used a file called
1360 @file{.newsrc.el} for storing all the information that didn't fit into
1361 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1362 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1363 files was the most recently saved, which enabled people to swap between
1364 @sc{gnus} and other newsreaders.
1365
1366 That was kinda silly, so Gnus went one better: In addition to the
1367 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1368 @file{.newsrc.eld}.  It will read whichever of these files that are most
1369 recent, but it will never write a @file{.newsrc.el} file.  You should
1370 never delete the @file{.newsrc.eld} file---it contains much information
1371 not stored in the @file{.newsrc} file.
1372
1373 @vindex gnus-save-newsrc-file
1374 @vindex gnus-read-newsrc-file
1375 You can turn off writing the @file{.newsrc} file by setting
1376 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1377 the file and save some space, as well as exiting from gnus faster.
1378 However, this will make it impossible to use other newsreaders than
1379 gnus.  But hey, who would want to, right?  Similarly, setting
1380 @code{gnus-read-newsrc-file} to @code{nil} makes gnus ignore the
1381 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1382 convenient if you have a tendency to use Netscape once in a while.
1383
1384 @vindex gnus-save-killed-list
1385 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1386 will not save the list of killed groups to the startup file.  This will
1387 save both time (when starting and quitting) and space (on disk).  It
1388 will also mean that Gnus has no record of what groups are new or old,
1389 so the automatic new groups subscription methods become meaningless.
1390 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1391 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1392 Groups}).  This variable can also be a regular expression.  If that's
1393 the case, remove all groups that do not match this regexp before
1394 saving.  This can be useful in certain obscure situations that involve
1395 several servers where not all servers support @code{ask-server}.
1396
1397 @vindex gnus-startup-file
1398 The @code{gnus-startup-file} variable says where the startup files are.
1399 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1400 file being whatever that one is, with a @samp{.eld} appended.
1401
1402 @vindex gnus-save-newsrc-hook
1403 @vindex gnus-save-quick-newsrc-hook
1404 @vindex gnus-save-standard-newsrc-hook
1405 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1406 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1407 saving the @file{.newsrc.eld} file, and
1408 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1409 @file{.newsrc} file.  The latter two are commonly used to turn version
1410 control on or off.  Version control is on by default when saving the
1411 startup files.  If you want to turn backup creation off, say something like:
1412
1413 @lisp
1414 (defun turn-off-backup ()
1415   (set (make-local-variable 'backup-inhibited) t))
1416
1417 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1418 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1419 @end lisp
1420
1421 @vindex gnus-init-file
1422 When gnus starts, it will read the @code{gnus-site-init-file}
1423 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1424 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1425 and can be used to avoid cluttering your @file{~/.emacs} and
1426 @file{site-init} files with gnus stuff.  Gnus will also check for files
1427 with the same names as these, but with @file{.elc} and @file{.el}
1428 suffixes.  In other words, if you have set @code{gnus-init-file} to
1429 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1430 and finally @file{~/.gnus} (in this order).
1431
1432
1433
1434 @node Auto Save
1435 @section Auto Save
1436 @cindex dribble file
1437 @cindex auto-save
1438
1439 Whenever you do something that changes the gnus data (reading articles,
1440 catching up, killing/subscribing groups), the change is added to a
1441 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1442 Emacs way.  If your Emacs should crash before you have saved the
1443 @file{.newsrc} files, all changes you have made can be recovered from
1444 this file.
1445
1446 If gnus detects this file at startup, it will ask the user whether to
1447 read it.  The auto save file is deleted whenever the real startup file is
1448 saved.
1449
1450 @vindex gnus-use-dribble-file
1451 If @code{gnus-use-dribble-file} is @code{nil}, gnus won't create and
1452 maintain a dribble buffer.  The default is @code{t}.
1453
1454 @vindex gnus-dribble-directory
1455 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1456 this variable is @code{nil}, which it is by default, gnus will dribble
1457 into the directory where the @file{.newsrc} file is located.  (This is
1458 normally the user's home directory.)  The dribble file will get the same
1459 file permissions as the @code{.newsrc} file.
1460
1461 @vindex gnus-always-read-dribble-file
1462 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1463 read the dribble file on startup without querying the user.
1464
1465
1466 @node The Active File
1467 @section The Active File
1468 @cindex active file
1469 @cindex ignored groups
1470
1471 When gnus starts, or indeed whenever it tries to determine whether new
1472 articles have arrived, it reads the active file.  This is a very large
1473 file that lists all the active groups and articles on the server.
1474
1475 @vindex gnus-ignored-newsgroups
1476 Before examining the active file, gnus deletes all lines that match the
1477 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1478 any groups with bogus names, but you can use this variable to make gnus
1479 ignore hierarchies you aren't ever interested in.  However, this is not
1480 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1481 Groups} for an overview of other variables that can be used instead.
1482
1483 @c This variable is
1484 @c @code{nil} by default, and will slow down active file handling somewhat
1485 @c if you set it to anything else.
1486
1487 @vindex gnus-read-active-file
1488 @c @head
1489 The active file can be rather Huge, so if you have a slow network, you
1490 can set @code{gnus-read-active-file} to @code{nil} to prevent gnus from
1491 reading the active file.  This variable is @code{some} by default.
1492
1493 Gnus will try to make do by getting information just on the groups that
1494 you actually subscribe to.
1495
1496 Note that if you subscribe to lots and lots of groups, setting this
1497 variable to @code{nil} will probably make gnus slower, not faster.  At
1498 present, having this variable @code{nil} will slow gnus down
1499 considerably, unless you read news over a 2400 baud modem.
1500
1501 This variable can also have the value @code{some}.  Gnus will then
1502 attempt to read active info only on the subscribed groups.  On some
1503 servers this is quite fast (on sparkling, brand new INN servers that
1504 support the @code{LIST ACTIVE group} command), on others this isn't fast
1505 at all.  In any case, @code{some} should be faster than @code{nil}, and
1506 is certainly faster than @code{t} over slow lines.
1507
1508 Some news servers (old versions of Leafnode and old versions of INN, for
1509 instance) do not support the @code{LIST ACTIVE group}.  For these
1510 servers, @code{nil} is probably the most efficient value for this
1511 variable.
1512
1513 If this variable is @code{nil}, gnus will ask for group info in total
1514 lock-step, which isn't very fast.  If it is @code{some} and you use an
1515 @sc{nntp} server, gnus will pump out commands as fast as it can, and
1516 read all the replies in one swoop.  This will normally result in better
1517 performance, but if the server does not support the aforementioned
1518 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1519
1520 If you think that starting up Gnus takes too long, try all the three
1521 different values for this variable and see what works best for you.
1522
1523 In any case, if you use @code{some} or @code{nil}, you should definitely
1524 kill all groups that you aren't interested in to speed things up.
1525
1526 Note that this variable also affects active file retrieval from
1527 secondary select methods.
1528
1529
1530 @node Startup Variables
1531 @section Startup Variables
1532
1533 @table @code
1534
1535 @item gnus-load-hook
1536 @vindex gnus-load-hook
1537 A hook run while gnus is being loaded.  Note that this hook will
1538 normally be run just once in each Emacs session, no matter how many
1539 times you start gnus.
1540
1541 @item gnus-before-startup-hook
1542 @vindex gnus-before-startup-hook
1543 A hook run after starting up gnus successfully.
1544
1545 @item gnus-startup-hook
1546 @vindex gnus-startup-hook
1547 A hook run as the very last thing after starting up gnus
1548
1549 @item gnus-started-hook
1550 @vindex gnus-started-hook
1551 A hook that is run as the very last thing after starting up gnus
1552 successfully.
1553
1554 @item gnus-setup-news-hook
1555 @vindex gnus-setup-news-hook
1556 A hook that is run after reading the @file{.newsrc} file(s), but before
1557 generating the group buffer.
1558
1559 @item gnus-check-bogus-newsgroups
1560 @vindex gnus-check-bogus-newsgroups
1561 If non-@code{nil}, gnus will check for and delete all bogus groups at
1562 startup.  A @dfn{bogus group} is a group that you have in your
1563 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1564 bogus groups can take quite a while, so to save time and resources it's
1565 best to leave this option off, and do the checking for bogus groups once
1566 in a while from the group buffer instead (@pxref{Group Maintenance}).
1567
1568 @item gnus-inhibit-startup-message
1569 @vindex gnus-inhibit-startup-message
1570 If non-@code{nil}, the startup message won't be displayed.  That way,
1571 your boss might not notice as easily that you are reading news instead
1572 of doing your job.  Note that this variable is used before
1573 @file{.gnus.el} is loaded, so it should be set in @code{.emacs} instead.
1574
1575 @item gnus-no-groups-message
1576 @vindex gnus-no-groups-message
1577 Message displayed by gnus when no groups are available.
1578
1579 @item gnus-play-startup-jingle
1580 @vindex gnus-play-startup-jingle
1581 If non-@code{nil}, play the gnus jingle at startup.
1582
1583 @item gnus-startup-jingle
1584 @vindex gnus-startup-jingle
1585 Jingle to be played if the above variable is non-@code{nil}.  The
1586 default is @samp{Tuxedomoon.Jingle4.au}.
1587
1588 @end table
1589
1590
1591 @node Group Buffer
1592 @chapter Group Buffer
1593 @cindex group buffer
1594
1595 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1596 is the first buffer shown when gnus starts, and will never be killed as
1597 long as gnus is active.
1598
1599 @iftex
1600 @iflatex
1601 \gnusfigure{The Group Buffer}{320}{
1602 \put(75,50){\epsfig{figure=tmp/group.ps,height=9cm}}
1603 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1604 \put(120,38){\vector(1,2){10}}
1605 \put(40,60){\makebox(0,0)[r]{Mode line}}
1606 \put(40,58){\vector(1,0){30}}
1607 \put(200,28){\makebox(0,0)[t]{Native select method}}
1608 \put(200,26){\vector(-1,2){15}}
1609 }
1610 @end iflatex
1611 @end iftex
1612
1613 @menu
1614 * Group Buffer Format::         Information listed and how you can change it.
1615 * Group Maneuvering::           Commands for moving in the group buffer.
1616 * Selecting a Group::           Actually reading news.
1617 * Subscription Commands::       Unsubscribing, killing, subscribing.
1618 * Group Data::                  Changing the info for a group.
1619 * Group Levels::                Levels? What are those, then?
1620 * Group Score::                 A mechanism for finding out what groups you like.
1621 * Marking Groups::              You can mark groups for later processing.
1622 * Foreign Groups::              Creating and editing groups.
1623 * Group Parameters::            Each group may have different parameters set.
1624 * Listing Groups::              Gnus can list various subsets of the groups.
1625 * Sorting Groups::              Re-arrange the group order.
1626 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1627 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1628 * Exiting Gnus::                Stop reading news and get some work done.
1629 * Group Topics::                A folding group mode divided into topics.
1630 * Misc Group Stuff::            Other stuff that you can to do.
1631 @end menu
1632
1633
1634 @node Group Buffer Format
1635 @section Group Buffer Format
1636
1637 @menu
1638 * Group Line Specification::    Deciding how the group buffer is to look.
1639 * Group Modeline Specification::  The group buffer modeline.
1640 * Group Highlighting::          Having nice colors in the group buffer.
1641 @end menu
1642
1643
1644 @node Group Line Specification
1645 @subsection Group Line Specification
1646 @cindex group buffer format
1647
1648 The default format of the group buffer is nice and dull, but you can
1649 make it as exciting and ugly as you feel like.
1650
1651 Here's a couple of example group lines:
1652
1653 @example
1654      25: news.announce.newusers
1655  *    0: alt.fan.andrea-dworkin
1656 @end example
1657
1658 Quite simple, huh?
1659
1660 You can see that there are 25 unread articles in
1661 @samp{news.announce.newusers}.  There are no unread articles, but some
1662 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1663 asterisk at the beginning of the line?).
1664
1665 @vindex gnus-group-line-format
1666 You can change that format to whatever you want by fiddling with the
1667 @code{gnus-group-line-format} variable.  This variable works along the
1668 lines of a @code{format} specification, which is pretty much the same as
1669 a @code{printf} specifications, for those of you who use (feh!) C.
1670 @xref{Formatting Variables}.
1671
1672 @samp{%M%S%5y: %(%g%)\n} is the value that produced those lines above.
1673
1674 There should always be a colon on the line; the cursor always moves to
1675 the colon after performing an operation.  Nothing else is required---not
1676 even the group name.  All displayed text is just window dressing, and is
1677 never examined by gnus.  Gnus stores all real information it needs using
1678 text properties.
1679
1680 (Note that if you make a really strange, wonderful, spreadsheet-like
1681 layout, everybody will believe you are hard at work with the accounting
1682 instead of wasting time reading news.)
1683
1684 Here's a list of all available format characters:
1685
1686 @table @samp
1687
1688 @item M
1689 An asterisk if the group only has marked articles.
1690
1691 @item S
1692 Whether the group is subscribed.
1693
1694 @item L
1695 Level of subscribedness.
1696
1697 @item N
1698 Number of unread articles.
1699
1700 @item I
1701 Number of dormant articles.
1702
1703 @item T
1704 Number of ticked articles.
1705
1706 @item R
1707 Number of read articles.
1708
1709 @item t
1710 Estimated total number of articles.  (This is really @var{max-number}
1711 minus @var{min-number} plus 1.)
1712
1713 Gnus uses this estimation because the NNTP protocol provides efficient
1714 access to @var{max-number} and @var{min-number} but getting the true
1715 unread message count is not possible efficiently.  For hysterical
1716 raisins, even the mail backends, where the true number of unread
1717 messages might be available efficiently, use the same limited
1718 interface.  To remove this restriction from Gnus means that the
1719 backend interface has to be changed, which is not an easy job.  If you
1720 want to work on this, please contact the Gnus mailing list.
1721
1722 @item y
1723 Number of unread, unticked, non-dormant articles.
1724
1725 @item i
1726 Number of ticked and dormant articles.
1727
1728 @item g
1729 Full group name.
1730
1731 @item G
1732 Group name.
1733
1734 @item D
1735 Newsgroup description.
1736
1737 @item o
1738 @samp{m} if moderated.
1739
1740 @item O
1741 @samp{(m)} if moderated.
1742
1743 @item s
1744 Select method.
1745
1746 @item n
1747 Select from where.
1748
1749 @item z
1750 A string that looks like @samp{<%s:%n>} if a foreign select method is
1751 used.
1752
1753 @item P
1754 Indentation based on the level of the topic (@pxref{Group Topics}).
1755
1756 @item c
1757 @vindex gnus-group-uncollapsed-levels
1758 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1759 variable says how many levels to leave at the end of the group name.
1760 The default is 1---this will mean that group names like
1761 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1762
1763 @item m
1764 @vindex gnus-new-mail-mark
1765 @cindex %
1766 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1767 the group lately.
1768
1769 @item p
1770 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1771
1772 @item d
1773 A string that says when you last read the group (@pxref{Group
1774 Timestamp}).
1775
1776 @item u
1777 User defined specifier.  The next character in the format string should
1778 be a letter.  Gnus will call the function
1779 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1780 following @samp{%u}.  The function will be passed a single dummy
1781 parameter as argument.  The function should return a string, which will
1782 be inserted into the buffer just like information from any other
1783 specifier.
1784 @end table
1785
1786 @cindex *
1787 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1788 if no info is available---for instance, if it is a non-activated foreign
1789 group, or a bogus native group.
1790
1791
1792 @node Group Modeline Specification
1793 @subsection Group Modeline Specification
1794 @cindex group modeline
1795
1796 @vindex gnus-group-mode-line-format
1797 The mode line can be changed by setting
1798 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1799 doesn't understand that many format specifiers:
1800
1801 @table @samp
1802 @item S
1803 The native news server.
1804 @item M
1805 The native select method.
1806 @end table
1807
1808
1809 @node Group Highlighting
1810 @subsection Group Highlighting
1811 @cindex highlighting
1812 @cindex group highlighting
1813
1814 @vindex gnus-group-highlight
1815 Highlighting in the group buffer is controlled by the
1816 @code{gnus-group-highlight} variable.  This is an alist with elements
1817 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1818 something non-@code{nil}, the @var{face} will be used on the line.
1819
1820 Here's an example value for this variable that might look nice if the
1821 background is dark:
1822
1823 @lisp
1824 (cond (window-system
1825        (setq custom-background-mode 'light)
1826        (defface my-group-face-1
1827          '((t (:foreground "Red" :bold t))) "First group face")
1828        (defface my-group-face-2
1829          '((t (:foreground "DarkSeaGreen4" :bold t))) "Second group face")
1830        (defface my-group-face-3
1831          '((t (:foreground "Green4" :bold t))) "Third group face")
1832        (defface my-group-face-4
1833          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1834        (defface my-group-face-5
1835          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1836
1837 (setq gnus-group-highlight
1838       '(((> unread 200) . my-group-face-1)
1839         ((and (< level 3) (zerop unread)) . my-group-face-2)
1840         ((< level 3) . my-group-face-3)
1841         ((zerop unread) . my-group-face-4)
1842         (t . my-group-face-5)))
1843 @end lisp
1844
1845 Also @pxref{Faces and Fonts}.
1846
1847 Variables that are dynamically bound when the forms are evaluated
1848 include:
1849
1850 @table @code
1851 @item group
1852 The group name.
1853 @item unread
1854 The number of unread articles in the group.
1855 @item method
1856 The select method.
1857 @item mailp
1858 Whether the group is a mail group.
1859 @item level
1860 The level of the group.
1861 @item score
1862 The score of the group.
1863 @item ticked
1864 The number of ticked articles in the group.
1865 @item total
1866 The total number of articles in the group.  Or rather, MAX-NUMBER minus
1867 MIN-NUMBER plus one.
1868 @item topic
1869 When using the topic minor mode, this variable is bound to the current
1870 topic being inserted.
1871 @end table
1872
1873 When the forms are @code{eval}ed, point is at the beginning of the line
1874 of the group in question, so you can use many of the normal gnus
1875 functions for snarfing info on the group.
1876
1877 @vindex gnus-group-update-hook
1878 @findex gnus-group-highlight-line
1879 @code{gnus-group-update-hook} is called when a group line is changed.
1880 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1881 calls @code{gnus-group-highlight-line} by default.
1882
1883
1884 @node Group Maneuvering
1885 @section Group Maneuvering
1886 @cindex group movement
1887
1888 All movement commands understand the numeric prefix and will behave as
1889 expected, hopefully.
1890
1891 @table @kbd
1892
1893 @item n
1894 @kindex n (Group)
1895 @findex gnus-group-next-unread-group
1896 Go to the next group that has unread articles
1897 (@code{gnus-group-next-unread-group}).
1898
1899 @item p
1900 @itemx DEL
1901 @kindex DEL (Group)
1902 @kindex p (Group)
1903 @findex gnus-group-prev-unread-group
1904 Go to the previous group that has unread articles
1905 (@code{gnus-group-prev-unread-group}).
1906
1907 @item N
1908 @kindex N (Group)
1909 @findex gnus-group-next-group
1910 Go to the next group (@code{gnus-group-next-group}).
1911
1912 @item P
1913 @kindex P (Group)
1914 @findex gnus-group-prev-group
1915 Go to the previous group (@code{gnus-group-prev-group}).
1916
1917 @item M-n
1918 @kindex M-n (Group)
1919 @findex gnus-group-next-unread-group-same-level
1920 Go to the next unread group on the same (or lower) level
1921 (@code{gnus-group-next-unread-group-same-level}).
1922
1923 @item M-p
1924 @kindex M-p (Group)
1925 @findex gnus-group-prev-unread-group-same-level
1926 Go to the previous unread group on the same (or lower) level
1927 (@code{gnus-group-prev-unread-group-same-level}).
1928 @end table
1929
1930 Three commands for jumping to groups:
1931
1932 @table @kbd
1933
1934 @item j
1935 @kindex j (Group)
1936 @findex gnus-group-jump-to-group
1937 Jump to a group (and make it visible if it isn't already)
1938 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
1939 like living groups.
1940
1941 @item ,
1942 @kindex , (Group)
1943 @findex gnus-group-best-unread-group
1944 Jump to the unread group with the lowest level
1945 (@code{gnus-group-best-unread-group}).
1946
1947 @item .
1948 @kindex . (Group)
1949 @findex gnus-group-first-unread-group
1950 Jump to the first group with unread articles
1951 (@code{gnus-group-first-unread-group}).
1952 @end table
1953
1954 @vindex gnus-group-goto-unread
1955 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
1956 commands will move to the next group, not the next unread group.  Even
1957 the commands that say they move to the next unread group.  The default
1958 is @code{t}.
1959
1960
1961 @node Selecting a Group
1962 @section Selecting a Group
1963 @cindex group selection
1964
1965 @table @kbd
1966
1967 @item SPACE
1968 @kindex SPACE (Group)
1969 @findex gnus-group-read-group
1970 Select the current group, switch to the summary buffer and display the
1971 first unread article (@code{gnus-group-read-group}).  If there are no
1972 unread articles in the group, or if you give a non-numerical prefix to
1973 this command, gnus will offer to fetch all the old articles in this
1974 group from the server.  If you give a numerical prefix @var{N}, @var{N}
1975 determines the number of articles gnus will fetch.  If @var{N} is
1976 positive, gnus fetches the @var{N} newest articles, if @var{N} is
1977 negative, Gnus fetches the @code{abs(@var{N})} oldest articles.
1978
1979 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
1980 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
1981 - 4 2 SPC} fetches the 42 oldest ones.
1982
1983 When you are in the group (in the Summary buffer), you can type
1984 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
1985 ones.
1986
1987 @item RET
1988 @kindex RET (Group)
1989 @findex gnus-group-select-group
1990 Select the current group and switch to the summary buffer
1991 (@code{gnus-group-select-group}).  Takes the same arguments as
1992 @code{gnus-group-read-group}---the only difference is that this command
1993 does not display the first unread article automatically upon group
1994 entry.
1995
1996 @item M-RET
1997 @kindex M-RET (Group)
1998 @findex gnus-group-quick-select-group
1999 This does the same as the command above, but tries to do it with the
2000 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2001 scoring/killing will be performed, there will be no highlights and no
2002 expunging.  This might be useful if you're in a real hurry and have to
2003 enter some humongous group.  If you give a 0 prefix to this command
2004 (i.e., @kbd{0 M-RET}), gnus won't even generate the summary buffer,
2005 which is useful if you want to toggle threading before generating the
2006 summary buffer (@pxref{Summary Generation Commands}).
2007
2008 @item M-SPACE
2009 @kindex M-SPACE (Group)
2010 @findex gnus-group-visible-select-group
2011 This is yet one more command that does the same as the @kbd{RET}
2012 command, but this one does it without expunging and hiding dormants
2013 (@code{gnus-group-visible-select-group}).
2014
2015 @item M-C-RET
2016 @kindex M-C-RET (Group)
2017 @findex gnus-group-select-group-ephemerally
2018 Finally, this command selects the current group ephemerally without
2019 doing any processing of its contents
2020 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2021 turned off.  Everything you do in the group after selecting it in this
2022 manner will have no permanent effects.
2023
2024 @end table
2025
2026 @vindex gnus-large-newsgroup
2027 The @code{gnus-large-newsgroup} variable says what gnus should consider
2028 to be a big group.  This is 200 by default.  If the group has more
2029 (unread and/or ticked) articles than this, gnus will query the user
2030 before entering the group.  The user can then specify how many articles
2031 should be fetched from the server.  If the user specifies a negative
2032 number (@code{-n}), the @code{n} oldest articles will be fetched.  If it
2033 is positive, the @code{n} articles that have arrived most recently will
2034 be fetched.
2035
2036 @vindex gnus-select-group-hook
2037 @vindex gnus-auto-select-first
2038 @code{gnus-auto-select-first} control whether any articles are selected
2039 automatically when entering a group with the @kbd{SPACE} command.
2040
2041 @table @code
2042
2043 @item nil
2044 Don't select any articles when entering the group.  Just display the
2045 full summary buffer.
2046
2047 @item t
2048 Select the first unread article when entering the group.
2049
2050 @item best
2051 Select the highest scored article in the group when entering the
2052 group.
2053
2054 @end table
2055
2056 This variable can also be a function.  In that case, that function will
2057 be called to place point on a subject line, and/or select some article.
2058 Useful functions include:
2059
2060 @table @code
2061 @item gnus-summary-first-unread-subject
2062 Place point on the subject line of the first unread article, but
2063 don't select the article.
2064
2065 @item gnus-summary-first-unread-article
2066 Select the first unread article.
2067
2068 @item gnus-summary-best-unread-article
2069 Select the highest-scored unread article.
2070 @end table
2071
2072
2073 If you want to prevent automatic selection in some group (say, in a
2074 binary group with Huge articles) you can set this variable to @code{nil}
2075 in @code{gnus-select-group-hook}, which is called when a group is
2076 selected.
2077
2078
2079 @node Subscription Commands
2080 @section Subscription Commands
2081 @cindex subscription
2082
2083 @table @kbd
2084
2085 @item S t
2086 @itemx u
2087 @kindex S t (Group)
2088 @kindex u (Group)
2089 @findex gnus-group-unsubscribe-current-group
2090 @c @icon{gnus-group-unsubscribe}
2091 Toggle subscription to the current group
2092 (@code{gnus-group-unsubscribe-current-group}).
2093
2094 @item S s
2095 @itemx U
2096 @kindex S s (Group)
2097 @kindex U (Group)
2098 @findex gnus-group-unsubscribe-group
2099 Prompt for a group to subscribe, and then subscribe it.  If it was
2100 subscribed already, unsubscribe it instead
2101 (@code{gnus-group-unsubscribe-group}).
2102
2103 @item S k
2104 @itemx C-k
2105 @kindex S k (Group)
2106 @kindex C-k (Group)
2107 @findex gnus-group-kill-group
2108 @c @icon{gnus-group-kill-group}
2109 Kill the current group (@code{gnus-group-kill-group}).
2110
2111 @item S y
2112 @itemx C-y
2113 @kindex S y (Group)
2114 @kindex C-y (Group)
2115 @findex gnus-group-yank-group
2116 Yank the last killed group (@code{gnus-group-yank-group}).
2117
2118 @item C-x C-t
2119 @kindex C-x C-t (Group)
2120 @findex gnus-group-transpose-groups
2121 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2122 really a subscription command, but you can use it instead of a
2123 kill-and-yank sequence sometimes.
2124
2125 @item S w
2126 @itemx C-w
2127 @kindex S w (Group)
2128 @kindex C-w (Group)
2129 @findex gnus-group-kill-region
2130 Kill all groups in the region (@code{gnus-group-kill-region}).
2131
2132 @item S z
2133 @kindex S z (Group)
2134 @findex gnus-group-kill-all-zombies
2135 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2136
2137 @item S C-k
2138 @kindex S C-k (Group)
2139 @findex gnus-group-kill-level
2140 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2141 These groups can't be yanked back after killing, so this command should
2142 be used with some caution.  The only time where this command comes in
2143 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2144 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2145 kill off all unsubscribed groups that do not have message numbers in the
2146 @file{.newsrc} file.
2147
2148 @end table
2149
2150 Also @pxref{Group Levels}.
2151
2152
2153 @node Group Data
2154 @section Group Data
2155
2156 @table @kbd
2157
2158 @item c
2159 @kindex c (Group)
2160 @findex gnus-group-catchup-current
2161 @vindex gnus-group-catchup-group-hook
2162 @c @icon{gnus-group-catchup-current}
2163 Mark all unticked articles in this group as read
2164 (@code{gnus-group-catchup-current}).
2165 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2166 the group buffer.
2167
2168 @item C
2169 @kindex C (Group)
2170 @findex gnus-group-catchup-current-all
2171 Mark all articles in this group, even the ticked ones, as read
2172 (@code{gnus-group-catchup-current-all}).
2173
2174 @item M-c
2175 @kindex M-c (Group)
2176 @findex gnus-group-clear-data
2177 Clear the data from the current group---nix out marks and the list of
2178 read articles (@code{gnus-group-clear-data}).
2179
2180 @item M-x gnus-group-clear-data-on-native-groups
2181 @kindex M-x gnus-group-clear-data-on-native-groups
2182 @findex gnus-group-clear-data-on-native-groups
2183 If you have switched from one @sc{nntp} server to another, all your marks
2184 and read ranges have become worthless.  You can use this command to
2185 clear out all data that you have on your native groups.  Use with
2186 caution.
2187
2188 @end table
2189
2190
2191 @node Group Levels
2192 @section Group Levels
2193 @cindex group level
2194 @cindex level
2195
2196 All groups have a level of @dfn{subscribedness}.  For instance, if a
2197 group is on level 2, it is more subscribed than a group on level 5.  You
2198 can ask gnus to just list groups on a given level or lower
2199 (@pxref{Listing Groups}), or to just check for new articles in groups on
2200 a given level or lower (@pxref{Scanning New Messages}).
2201
2202 Remember:  The higher the level of the group, the less important it is.
2203
2204 @table @kbd
2205
2206 @item S l
2207 @kindex S l (Group)
2208 @findex gnus-group-set-current-level
2209 Set the level of the current group.  If a numeric prefix is given, the
2210 next @var{n} groups will have their levels set.  The user will be
2211 prompted for a level.
2212 @end table
2213
2214 @vindex gnus-level-killed
2215 @vindex gnus-level-zombie
2216 @vindex gnus-level-unsubscribed
2217 @vindex gnus-level-subscribed
2218 Gnus considers groups from levels 1 to
2219 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2220 @code{gnus-level-subscribed} (exclusive) and
2221 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2222 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2223 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2224 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2225 same, but zombie and killed groups have no information on what articles
2226 you have read, etc, stored.  This distinction between dead and living
2227 groups isn't done because it is nice or clever, it is done purely for
2228 reasons of efficiency.
2229
2230 It is recommended that you keep all your mail groups (if any) on quite
2231 low levels (e.g. 1 or 2).
2232
2233 Maybe the following description of the default behavior of Gnus helps to
2234 understand what these levels are all about.  By default, Gnus shows you
2235 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2236 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2237 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2238 groups are hidden, in a way.
2239
2240 Zombie and killed groups are similar to unsubscribed groups in that they
2241 are hidden by default.  But they are different from subscribed and
2242 unsubscribed groups in that Gnus doesn't ask the news server for
2243 information (number of messages, number of unread messages) on zombie
2244 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2245 aren't interested in.  If most groups are killed, Gnus is faster.
2246
2247 Why does Gnus distinguish between zombie and killed groups?  Well, when
2248 a new group arrives on the server, Gnus by default makes it a zombie
2249 group.  This means that you are normally not bothered with new groups,
2250 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2251 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2252 list of killed groups.)
2253
2254 If you want to play with the level variables, you should show some care.
2255 Set them once, and don't touch them ever again.  Better yet, don't touch
2256 them at all unless you know exactly what you're doing.
2257
2258 @vindex gnus-level-default-unsubscribed
2259 @vindex gnus-level-default-subscribed
2260 Two closely related variables are @code{gnus-level-default-subscribed}
2261 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2262 which are the levels that new groups will be put on if they are
2263 (un)subscribed.  These two variables should, of course, be inside the
2264 relevant valid ranges.
2265
2266 @vindex gnus-keep-same-level
2267 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2268 will only move to groups of the same level (or lower).  In
2269 particular, going from the last article in one group to the next group
2270 will go to the next group of the same level (or lower).  This might be
2271 handy if you want to read the most important groups before you read the
2272 rest.
2273
2274 If this variable is @code{best}, Gnus will make the next newsgroup the
2275 one with the best level.
2276
2277 @vindex gnus-group-default-list-level
2278 All groups with a level less than or equal to
2279 @code{gnus-group-default-list-level} will be listed in the group buffer
2280 by default.
2281
2282 @vindex gnus-group-list-inactive-groups
2283 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2284 groups will be listed along with the unread groups.  This variable is
2285 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2286 listed.
2287
2288 @vindex gnus-group-use-permanent-levels
2289 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2290 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2291 use this level as the ``work'' level.
2292
2293 @vindex gnus-activate-level
2294 Gnus will normally just activate (i. e., query the server about) groups
2295 on level @code{gnus-activate-level} or less.  If you don't want to
2296 activate unsubscribed groups, for instance, you might set this variable
2297 to 5.  The default is 6.
2298
2299
2300 @node Group Score
2301 @section Group Score
2302 @cindex group score
2303 @cindex group rank
2304 @cindex rank
2305
2306 You would normally keep important groups on high levels, but that scheme
2307 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2308 group buffer according to how often you read groups, perhaps?  Within
2309 reason?
2310
2311 This is what @dfn{group score} is for.  You can have Gnus assign a score
2312 to each group through the mechanism described below.  You can then sort
2313 the group buffer based on this score.  Alternatively, you can sort on
2314 score and then level.  (Taken together, the level and the score is
2315 called the @dfn{rank} of the group.  A group that is on level 4 and has
2316 a score of 1 has a higher rank than a group on level 5 that has a score
2317 of 300.  (The level is the most significant part and the score is the
2318 least significant part.))
2319
2320 @findex gnus-summary-bubble-group
2321 If you want groups you read often to get higher scores than groups you
2322 read seldom you can add the @code{gnus-summary-bubble-group} function to
2323 the @code{gnus-summary-exit-hook} hook.  This will result (after
2324 sorting) in a bubbling sort of action.  If you want to see that in
2325 action after each summary exit, you can add
2326 @code{gnus-group-sort-groups-by-rank} or
2327 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2328 slow things down somewhat.
2329
2330
2331 @node Marking Groups
2332 @section Marking Groups
2333 @cindex marking groups
2334
2335 If you want to perform some command on several groups, and they appear
2336 subsequently in the group buffer, you would normally just give a
2337 numerical prefix to the command.  Most group commands will then do your
2338 bidding on those groups.
2339
2340 However, if the groups are not in sequential order, you can still
2341 perform a command on several groups.  You simply mark the groups first
2342 with the process mark and then execute the command.
2343
2344 @table @kbd
2345
2346 @item #
2347 @kindex # (Group)
2348 @itemx M m
2349 @kindex M m (Group)
2350 @findex gnus-group-mark-group
2351 Set the mark on the current group (@code{gnus-group-mark-group}).
2352
2353 @item M-#
2354 @kindex M-# (Group)
2355 @itemx M u
2356 @kindex M u (Group)
2357 @findex gnus-group-unmark-group
2358 Remove the mark from the current group
2359 (@code{gnus-group-unmark-group}).
2360
2361 @item M U
2362 @kindex M U (Group)
2363 @findex gnus-group-unmark-all-groups
2364 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2365
2366 @item M w
2367 @kindex M w (Group)
2368 @findex gnus-group-mark-region
2369 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2370
2371 @item M b
2372 @kindex M b (Group)
2373 @findex gnus-group-mark-buffer
2374 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2375
2376 @item M r
2377 @kindex M r (Group)
2378 @findex gnus-group-mark-regexp
2379 Mark all groups that match some regular expression
2380 (@code{gnus-group-mark-regexp}).
2381 @end table
2382
2383 Also @pxref{Process/Prefix}.
2384
2385 @findex gnus-group-universal-argument
2386 If you want to execute some command on all groups that have been marked
2387 with the process mark, you can use the @kbd{M-&}
2388 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2389 the command to be executed.
2390
2391
2392 @node Foreign Groups
2393 @section Foreign Groups
2394 @cindex foreign groups
2395
2396 Below are some group mode commands for making and editing general foreign
2397 groups, as well as commands to ease the creation of a few
2398 special-purpose groups.  All these commands insert the newly created
2399 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2400 consulted.
2401
2402 @table @kbd
2403
2404 @item G m
2405 @kindex G m (Group)
2406 @findex gnus-group-make-group
2407 @cindex making groups
2408 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2409 for a name, a method and possibly an @dfn{address}.  For an easier way
2410 to subscribe to @sc{nntp} groups, @pxref{Browse Foreign Server}.
2411
2412 @item G r
2413 @kindex G r (Group)
2414 @findex gnus-group-rename-group
2415 @cindex renaming groups
2416 Rename the current group to something else
2417 (@code{gnus-group-rename-group}).  This is valid only on some
2418 groups---mail groups mostly.  This command might very well be quite slow
2419 on some backends.
2420
2421 @item G c
2422 @kindex G c (Group)
2423 @cindex customizing
2424 @findex gnus-group-customize
2425 Customize the group parameters (@code{gnus-group-customize}).
2426
2427 @item G e
2428 @kindex G e (Group)
2429 @findex gnus-group-edit-group-method
2430 @cindex renaming groups
2431 Enter a buffer where you can edit the select method of the current
2432 group (@code{gnus-group-edit-group-method}).
2433
2434 @item G p
2435 @kindex G p (Group)
2436 @findex gnus-group-edit-group-parameters
2437 Enter a buffer where you can edit the group parameters
2438 (@code{gnus-group-edit-group-parameters}).
2439
2440 @item G E
2441 @kindex G E (Group)
2442 @findex gnus-group-edit-group
2443 Enter a buffer where you can edit the group info
2444 (@code{gnus-group-edit-group}).
2445
2446 @item G d
2447 @kindex G d (Group)
2448 @findex gnus-group-make-directory-group
2449 @cindex nndir
2450 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2451 for a directory name (@code{gnus-group-make-directory-group}).
2452
2453 @item G h
2454 @kindex G h (Group)
2455 @cindex help group
2456 @findex gnus-group-make-help-group
2457 Make the gnus help group (@code{gnus-group-make-help-group}).
2458
2459 @item G a
2460 @kindex G a (Group)
2461 @cindex (ding) archive
2462 @cindex archive group
2463 @findex gnus-group-make-archive-group
2464 @vindex gnus-group-archive-directory
2465 @vindex gnus-group-recent-archive-directory
2466 Make a gnus archive group (@code{gnus-group-make-archive-group}).  By
2467 default a group pointing to the most recent articles will be created
2468 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2469 group will be created from @code{gnus-group-archive-directory}.
2470
2471 @item G k
2472 @kindex G k (Group)
2473 @findex gnus-group-make-kiboze-group
2474 @cindex nnkiboze
2475 Make a kiboze group.  You will be prompted for a name, for a regexp to
2476 match groups to be ``included'' in the kiboze group, and a series of
2477 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2478 @xref{Kibozed Groups}.
2479
2480 @item G D
2481 @kindex G D (Group)
2482 @findex gnus-group-enter-directory
2483 @cindex nneething
2484 Read an arbitrary directory as if it were a newsgroup with the
2485 @code{nneething} backend (@code{gnus-group-enter-directory}).
2486 @xref{Anything Groups}.
2487
2488 @item G f
2489 @kindex G f (Group)
2490 @findex gnus-group-make-doc-group
2491 @cindex ClariNet Briefs
2492 @cindex nndoc
2493 Make a group based on some file or other
2494 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2495 command, you will be prompted for a file name and a file type.
2496 Currently supported types are @code{babyl}, @code{mbox}, @code{digest},
2497 @code{mmdf}, @code{news}, @code{rnews}, @code{clari-briefs},
2498 @code{rfc934}, @code{rfc822-forward}, @code{nsmail} and @code{forward}.
2499 If you run this command without a prefix, Gnus will guess at the file
2500 type.  @xref{Document Groups}.
2501
2502 @item G u
2503 @kindex G u (Group)
2504 @vindex gnus-useful-groups
2505 @findex gnus-group-make-useful-group
2506 Create one of the groups mentioned in @code{gnus-useful-groups}
2507 (@code{gnus-group-make-useful-group}).
2508
2509 @item G w
2510 @kindex G w (Group)
2511 @findex gnus-group-make-web-group
2512 @cindex DejaNews
2513 @cindex Alta Vista
2514 @cindex InReference
2515 @cindex nnweb
2516 Make an ephemeral group based on a web search
2517 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2518 command, make a solid group instead.  You will be prompted for the
2519 search engine type and the search string.  Valid search engine types
2520 include @code{dejanews}, @code{altavista} and @code{reference}.
2521 @xref{Web Searches}.
2522
2523 If you use the @code{dejanews} search engine, you can limit the search
2524 to a particular group by using a match string like
2525 @samp{~g alt.sysadmin.recovery shaving}.
2526
2527 @item G DEL
2528 @kindex G DEL (Group)
2529 @findex gnus-group-delete-group
2530 This function will delete the current group
2531 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2532 actually delete all the articles in the group, and forcibly remove the
2533 group itself from the face of the Earth.  Use a prefix only if you are
2534 absolutely sure of what you are doing.  This command can't be used on
2535 read-only groups (like @code{nntp} group), though.
2536
2537 @item G V
2538 @kindex G V (Group)
2539 @findex gnus-group-make-empty-virtual
2540 Make a new, fresh, empty @code{nnvirtual} group
2541 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2542
2543 @item G v
2544 @kindex G v (Group)
2545 @findex gnus-group-add-to-virtual
2546 Add the current group to an @code{nnvirtual} group
2547 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2548 @end table
2549
2550 @xref{Select Methods}, for more information on the various select
2551 methods.
2552
2553 @vindex gnus-activate-foreign-newsgroups
2554 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2555 gnus will check all foreign groups with this level or lower at startup.
2556 This might take quite a while, especially if you subscribe to lots of
2557 groups from different @sc{nntp} servers.  Also @pxref{Group Levels};
2558 @code{gnus-activate-level} also affects activation of foreign
2559 newsgroups.
2560
2561
2562 @node Group Parameters
2563 @section Group Parameters
2564 @cindex group parameters
2565
2566 The group parameters store information local to a particular group.
2567 Here's an example group parameter list:
2568
2569 @example
2570 ((to-address . "ding@@gnus.org")
2571  (auto-expire . t))
2572 @end example
2573
2574 We see that each element consists of a "dotted pair"---the thing before
2575 the dot is the key, while the thing after the dot is the value.  All the
2576 parameters have this form @emph{except} local variable specs, which are
2577 not dotted pairs, but proper lists.
2578
2579 Some parameters have correspondant customizable variables, each of which
2580 is an alist of regexps and values.
2581
2582 The following group parameters can be used:
2583
2584 @table @code
2585 @item to-address
2586 @cindex to-address
2587 Address used by when doing followups and new posts.
2588
2589 @example
2590 (to-address . "some@@where.com")
2591 @end example
2592
2593 This is primarily useful in mail groups that represent closed mailing
2594 lists---mailing lists where it's expected that everybody that writes to
2595 the mailing list is subscribed to it.  Since using this parameter
2596 ensures that the mail only goes to the mailing list itself, it means
2597 that members won't receive two copies of your followups.
2598
2599 Using @code{to-address} will actually work whether the group is foreign
2600 or not.  Let's say there's a group on the server that is called
2601 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2602 the articles from a mail-to-news gateway.  Posting directly to this
2603 group is therefore impossible---you have to send mail to the mailing
2604 list address instead.
2605
2606 See also @code{gnus-parameter-to-address-alist}.
2607
2608 @item to-list
2609 @cindex to-list
2610 Address used when doing @kbd{a} in that group.
2611
2612 @example
2613 (to-list . "some@@where.com")
2614 @end example
2615
2616 It is totally ignored
2617 when doing a followup---except that if it is present in a news group,
2618 you'll get mail group semantics when doing @kbd{f}.
2619
2620 If you do an @kbd{a} command in a mail group and you have neither a
2621 @code{to-list} group parameter nor a @code{to-address} group parameter,
2622 then a @code{to-list} group parameter will be added automatically upon
2623 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2624 @vindex gnus-add-to-list
2625
2626 If you do an @kbd{a} command in a mail group and you don't have a
2627 @code{to-list} group parameter, one will be added automatically upon
2628 sending the message.
2629
2630 @findex gnus-mailing-list-mode
2631 @cindex Mail List Groups
2632 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2633 entering summary buffer.
2634
2635 See also @code{gnus-parameter-to-list-alist}.
2636
2637 @item visible
2638 @cindex visible
2639 If the group parameter list has the element @code{(visible . t)},
2640 that group will always be visible in the Group buffer, regardless
2641 of whether it has any unread articles.
2642
2643 @item broken-reply-to
2644 @cindex broken-reply-to
2645 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2646 headers in this group are to be ignored.  This can be useful if you're
2647 reading a mailing list group where the listserv has inserted
2648 @code{Reply-To} headers that point back to the listserv itself.  This is
2649 broken behavior.  So there!
2650
2651 @item to-group
2652 @cindex to-group
2653 Elements like @code{(to-group . "some.group.name")} means that all
2654 posts in that group will be sent to @code{some.group.name}.
2655
2656 @item newsgroup
2657 @cindex newsgroup
2658 If you have @code{(newsgroup . t)} in the group parameter list, gnus
2659 will treat all responses as if they were responses to news articles.
2660 This can be useful if you have a mail group that's really a mirror of a
2661 news group.
2662
2663 @item gcc-self
2664 @cindex gcc-self
2665 If @code{(gcc-self . t)} is present in the group parameter list, newly
2666 composed messages will be @code{Gcc}'d to the current group.  If
2667 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2668 generated, if @code{(gcc-self . "string")} is present, this string will
2669 be inserted literally as a @code{gcc} header.  This parameter takes
2670 precedence over any default @code{Gcc} rules as described later
2671 (@pxref{Archived Messages}).
2672
2673 @item auto-expire
2674 @cindex auto-expire
2675 If the group parameter has an element that looks like @code{(auto-expire
2676 . t)}, all articles read will be marked as expirable.  For an
2677 alternative approach, @pxref{Expiring Mail}.
2678
2679 See also @code{gnus-auto-expirable-newsgroups}.
2680
2681 @item total-expire
2682 @cindex total-expire
2683 If the group parameter has an element that looks like
2684 @code{(total-expire . t)}, all read articles will be put through the
2685 expiry process, even if they are not marked as expirable.  Use with
2686 caution.  Unread, ticked and dormant articles are not eligible for
2687 expiry.
2688
2689 See also @code{gnus-total-expirable-newsgroups}.
2690
2691 @item expiry-wait
2692 @cindex expiry-wait
2693 @vindex nnmail-expiry-wait-function
2694 If the group parameter has an element that looks like @code{(expiry-wait
2695 . 10)}, this value will override any @code{nnmail-expiry-wait} and
2696 @code{nnmail-expiry-wait-function} when expiring expirable messages.
2697 The value can either be a number of days (not necessarily an integer) or
2698 the symbols @code{never} or @code{immediate}.
2699
2700 @item score-file
2701 @cindex score file group parameter
2702 Elements that look like @code{(score-file . "file")} will make
2703 @file{file} into the current score file for the group in question.  All
2704 interactive score entries will be put into this file.
2705
2706 @item adapt-file
2707 @cindex adapt file group parameter
2708 Elements that look like @code{(adapt-file . "file")} will make
2709 @file{file} into the current adaptive file for the group in question.
2710 All adaptive score entries will be put into this file.
2711
2712 @item admin-address
2713 When unsubscribing from a mailing list you should never send the
2714 unsubscription notice to the mailing list itself.  Instead, you'd send
2715 messages to the administrative address.  This parameter allows you to
2716 put the admin address somewhere convenient.
2717
2718 @item display
2719 Elements that look like @code{(display . MODE)} say which articles to
2720 display on entering the group.  Valid values are:
2721
2722 @table @code
2723 @item all
2724 Display all articles, both read and unread.
2725
2726 @item default
2727 Display the default visible articles, which normally includes unread and
2728 ticked articles.
2729
2730 @item an array
2731 Display articles that satisfy a predicate.
2732
2733 Here are some examples:
2734
2735 @table @code
2736 @item [unread]
2737 Display only unread articles.
2738
2739 @item [not expire]
2740 Display everything except expirable articles.
2741
2742 @item [and (not reply) (not expirable)]
2743 Display everything except expirable and articles you've already
2744 responded to.
2745 @end table
2746
2747 The available operators are @code{not}, @code{and} and @code{or}.
2748 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2749 @code{unread}, @code{read}, @code{dormant}, @code{}, @code{}, @code{},
2750 @code{expire}, @code{reply}, @code{killed}, @code{bookmark},
2751 @code{score}, @code{save}, @code{cache}, @code{forward}, and
2752 @code{recent}.
2753
2754 @end table
2755
2756
2757 @item comment
2758 Elements that look like @code{(comment . "This is a comment")}
2759 are arbitrary comments on the group.  They are currently ignored by
2760 gnus, but provide a place for you to store information on particular
2761 groups.
2762
2763 @item charset
2764 Elements that look like @code{(charset . iso-8859-1)} will make
2765 @code{iso-8859-1} the default charset; that is, the charset that will be
2766 used for all articles that do not specify a charset.
2767
2768 See also @code{gnus-group-charset-alist}.
2769
2770 @item ignored-charsets
2771 Elements that look like @code{(ignored-charsets x-known iso-8859-1)}
2772 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2773 default charset will be used for decoding articles.
2774
2775 See also @code{gnus-group-ignored-charsets-alist}.
2776
2777 @item posting-style
2778 You can store additional posting style information for this group only
2779 here (@pxref{Posting Styles}).  The format is that of an entry in the
2780 @code{gnus-posting-styles} alist, except that there's no regexp matching
2781 the group name (of course).  Style elements in this group parameter will
2782 take precedence over the ones found in @code{gnus-posting-styles}.
2783
2784 For instance, if you want a funky name and signature in this group only,
2785 instead of hacking @code{gnus-posting-styles}, you could put something
2786 like this in the group parameters:
2787
2788 @example
2789 (posting-style
2790   (name "Funky Name")
2791   (signature "Funky Signature"))
2792 @end example
2793
2794 @item post-method
2795 @cindex post-method
2796 If it is set, the value is used as the method for posting message
2797 instead of @code{gnus-post-method}.
2798
2799 @item banner
2800 An item like @code{(banner . "regex")} causes any part of an article
2801 that matches the regular expression "regex" to be stripped. Instead of
2802 "regex", you can also use the symbol @code{signature} which strips the
2803 last signature or any of the elements of the alist
2804 @code{gnus-article-banner-alist}.
2805
2806 @item (@var{variable} @var{form})
2807 You can use the group parameters to set variables local to the group you
2808 are entering.  If you want to turn threading off in @samp{news.answers},
2809 you could put @code{(gnus-show-threads nil)} in the group parameters of
2810 that group.  @code{gnus-show-threads} will be made into a local variable
2811 in the summary buffer you enter, and the form @code{nil} will be
2812 @code{eval}ed there.
2813
2814 This can also be used as a group-specific hook function, if you'd like.
2815 If you want to hear a beep when you enter a group, you could put
2816 something like @code{(dummy-variable (ding))} in the parameters of that
2817 group.  @code{dummy-variable} will be set to the result of the
2818 @code{(ding)} form, but who cares?
2819
2820 @end table
2821
2822 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2823 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2824 presents you with a Customize-like interface.  The latter helps avoid
2825 silly Lisp errors.)  You might also be interested in reading about topic
2826 parameters (@pxref{Topic Parameters}).
2827
2828 Group parameters can be set via the @code{gnus-parameters} variable too.
2829 But some variables, such as @code{visible}, have no effect.  For
2830 example:
2831
2832 @example
2833 (setq gnus-parameters
2834       '(("mail\\..*"
2835          (gnus-show-threads nil)
2836          (gnus-use-scoring nil)
2837          (gnus-summary-line-format
2838           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
2839          (gcc-self . t)
2840          (display . all))
2841
2842         ("^nnimap:\\(foo.bar\\)$"
2843          (to-group . "\\1"))
2844
2845         ("mail\\.me"
2846          (gnus-use-scoring  t))
2847
2848         ("list\\..*"
2849          (total-expire . t)
2850          (broken-reply-to . t))))
2851 @end example
2852
2853 String value of parameters will be subjected to regexp substitution, as
2854 the @code{to-group} example shows.
2855
2856
2857 @node Listing Groups
2858 @section Listing Groups
2859 @cindex group listing
2860
2861 These commands all list various slices of the groups available.
2862
2863 @table @kbd
2864
2865 @item l
2866 @itemx A s
2867 @kindex A s (Group)
2868 @kindex l (Group)
2869 @findex gnus-group-list-groups
2870 List all groups that have unread articles
2871 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
2872 command will list only groups of level ARG and lower.  By default, it
2873 only lists groups of level five (i. e.,
2874 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
2875 groups).
2876
2877 @item L
2878 @itemx A u
2879 @kindex A u (Group)
2880 @kindex L (Group)
2881 @findex gnus-group-list-all-groups
2882 List all groups, whether they have unread articles or not
2883 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
2884 this command will list only groups of level ARG and lower.  By default,
2885 it lists groups of level seven or lower (i.e., just subscribed and
2886 unsubscribed groups).
2887
2888 @item A l
2889 @kindex A l (Group)
2890 @findex gnus-group-list-level
2891 List all unread groups on a specific level
2892 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
2893 with no unread articles.
2894
2895 @item A k
2896 @kindex A k (Group)
2897 @findex gnus-group-list-killed
2898 List all killed groups (@code{gnus-group-list-killed}).  If given a
2899 prefix argument, really list all groups that are available, but aren't
2900 currently (un)subscribed.  This could entail reading the active file
2901 from the server.
2902
2903 @item A z
2904 @kindex A z (Group)
2905 @findex gnus-group-list-zombies
2906 List all zombie groups (@code{gnus-group-list-zombies}).
2907
2908 @item A m
2909 @kindex A m (Group)
2910 @findex gnus-group-list-matching
2911 List all unread, subscribed groups with names that match a regexp
2912 (@code{gnus-group-list-matching}).
2913
2914 @item A M
2915 @kindex A M (Group)
2916 @findex gnus-group-list-all-matching
2917 List groups that match a regexp (@code{gnus-group-list-all-matching}).
2918
2919 @item A A
2920 @kindex A A (Group)
2921 @findex gnus-group-list-active
2922 List absolutely all groups in the active file(s) of the
2923 server(s) you are connected to (@code{gnus-group-list-active}).  This
2924 might very well take quite a while.  It might actually be a better idea
2925 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
2926 thing to match on.  Also note that this command may list groups that
2927 don't exist (yet)---these will be listed as if they were killed groups.
2928 Take the output with some grains of salt.
2929
2930 @item A a
2931 @kindex A a (Group)
2932 @findex gnus-group-apropos
2933 List all groups that have names that match a regexp
2934 (@code{gnus-group-apropos}).
2935
2936 @item A d
2937 @kindex A d (Group)
2938 @findex gnus-group-description-apropos
2939 List all groups that have names or descriptions that match a regexp
2940 (@code{gnus-group-description-apropos}).
2941
2942 @item A c
2943 @kindex A c (Group)
2944 @findex gnus-group-list-cached
2945 List all groups with cached articles (@code{gnus-group-list-cached}).
2946
2947 @item A ?
2948 @kindex A ? (Group)
2949 @findex gnus-group-list-dormant
2950 List all groups with dormant articles (@code{gnus-group-list-dormant}).
2951
2952 @item A /
2953 @kindex A / (Group)
2954 @findex gnus-group-list-limit
2955 List groups limited within the current selection
2956 (@code{gnus-group-list-limit}).
2957
2958 @item A f
2959 @kindex A f (Group)
2960 @findex gnus-group-list-flush
2961 Flush groups from the current selection (@code{gnus-group-list-flush}).
2962
2963 @item A p
2964 @kindex A p (Group)
2965 @findex gnus-group-list-plus
2966 List groups plus the current selection (@code{gnus-group-list-plus}).
2967
2968 @end table
2969
2970 @vindex gnus-permanently-visible-groups
2971 @cindex visible group parameter
2972 Groups that match the @code{gnus-permanently-visible-groups} regexp will
2973 always be shown, whether they have unread articles or not.  You can also
2974 add the @code{visible} element to the group parameters in question to
2975 get the same effect.
2976
2977 @vindex gnus-list-groups-with-ticked-articles
2978 Groups that have just ticked articles in it are normally listed in the
2979 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
2980 @code{nil}, these groups will be treated just like totally empty
2981 groups.  It is @code{t} by default.
2982
2983
2984 @node Sorting Groups
2985 @section Sorting Groups
2986 @cindex sorting groups
2987
2988 @kindex C-c C-s (Group)
2989 @findex gnus-group-sort-groups
2990 @vindex gnus-group-sort-function
2991 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
2992 group buffer according to the function(s) given by the
2993 @code{gnus-group-sort-function} variable.  Available sorting functions
2994 include:
2995
2996 @table @code
2997
2998 @item gnus-group-sort-by-alphabet
2999 @findex gnus-group-sort-by-alphabet
3000 Sort the group names alphabetically.  This is the default.
3001
3002 @item gnus-group-sort-by-real-name
3003 @findex gnus-group-sort-by-real-name
3004 Sort the group alphabetically on the real (unprefixed) group names.
3005
3006 @item gnus-group-sort-by-level
3007 @findex gnus-group-sort-by-level
3008 Sort by group level.
3009
3010 @item gnus-group-sort-by-score
3011 @findex gnus-group-sort-by-score
3012 Sort by group score.  @xref{Group Score}.
3013
3014 @item gnus-group-sort-by-rank
3015 @findex gnus-group-sort-by-rank
3016 Sort by group score and then the group level.  The level and the score
3017 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3018
3019 @item gnus-group-sort-by-unread
3020 @findex gnus-group-sort-by-unread
3021 Sort by number of unread articles.
3022
3023 @item gnus-group-sort-by-method
3024 @findex gnus-group-sort-by-method
3025 Sort alphabetically on the select method.
3026
3027 @item gnus-group-sort-by-server
3028 @findex gnus-group-sort-by-server
3029 Sort alphabetically on the Gnus server name.
3030
3031
3032 @end table
3033
3034 @code{gnus-group-sort-function} can also be a list of sorting
3035 functions.  In that case, the most significant sort key function must be
3036 the last one.
3037
3038
3039 There are also a number of commands for sorting directly according to
3040 some sorting criteria:
3041
3042 @table @kbd
3043 @item G S a
3044 @kindex G S a (Group)
3045 @findex gnus-group-sort-groups-by-alphabet
3046 Sort the group buffer alphabetically by group name
3047 (@code{gnus-group-sort-groups-by-alphabet}).
3048
3049 @item G S u
3050 @kindex G S u (Group)
3051 @findex gnus-group-sort-groups-by-unread
3052 Sort the group buffer by the number of unread articles
3053 (@code{gnus-group-sort-groups-by-unread}).
3054
3055 @item G S l
3056 @kindex G S l (Group)
3057 @findex gnus-group-sort-groups-by-level
3058 Sort the group buffer by group level
3059 (@code{gnus-group-sort-groups-by-level}).
3060
3061 @item G S v
3062 @kindex G S v (Group)
3063 @findex gnus-group-sort-groups-by-score
3064 Sort the group buffer by group score
3065 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3066
3067 @item G S r
3068 @kindex G S r (Group)
3069 @findex gnus-group-sort-groups-by-rank
3070 Sort the group buffer by group rank
3071 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3072
3073 @item G S m
3074 @kindex G S m (Group)
3075 @findex gnus-group-sort-groups-by-method
3076 Sort the group buffer alphabetically by backend name
3077 (@code{gnus-group-sort-groups-by-method}).
3078
3079 @end table
3080
3081 All the commands below obey the process/prefix convention
3082 (@pxref{Process/Prefix}).
3083
3084 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3085 commands will sort in reverse order.
3086
3087 You can also sort a subset of the groups:
3088
3089 @table @kbd
3090 @item G P a
3091 @kindex G P a (Group)
3092 @findex gnus-group-sort-selected-groups-by-alphabet
3093 Sort the groups alphabetically by group name
3094 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3095
3096 @item G P u
3097 @kindex G P u (Group)
3098 @findex gnus-group-sort-selected-groups-by-unread
3099 Sort the groups by the number of unread articles
3100 (@code{gnus-group-sort-selected-groups-by-unread}).
3101
3102 @item G P l
3103 @kindex G P l (Group)
3104 @findex gnus-group-sort-selected-groups-by-level
3105 Sort the groups by group level
3106 (@code{gnus-group-sort-selected-groups-by-level}).
3107
3108 @item G P v
3109 @kindex G P v (Group)
3110 @findex gnus-group-sort-selected-groups-by-score
3111 Sort the groups by group score
3112 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3113
3114 @item G P r
3115 @kindex G P r (Group)
3116 @findex gnus-group-sort-selected-groups-by-rank
3117 Sort the groups by group rank
3118 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3119
3120 @item G P m
3121 @kindex G P m (Group)
3122 @findex gnus-group-sort-selected-groups-by-method
3123 Sort the groups alphabetically by backend name
3124 (@code{gnus-group-sort-selected-groups-by-method}).
3125
3126 @end table
3127
3128 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3129 move groups around.
3130
3131
3132 @node Group Maintenance
3133 @section Group Maintenance
3134 @cindex bogus groups
3135
3136 @table @kbd
3137 @item b
3138 @kindex b (Group)
3139 @findex gnus-group-check-bogus-groups
3140 Find bogus groups and delete them
3141 (@code{gnus-group-check-bogus-groups}).
3142
3143 @item F
3144 @kindex F (Group)
3145 @findex gnus-group-find-new-groups
3146 Find new groups and process them (@code{gnus-group-find-new-groups}).
3147 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3148 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3149 to query the server for new groups, and subscribe the new groups as
3150 zombies.
3151
3152 @item C-c C-x
3153 @kindex C-c C-x (Group)
3154 @findex gnus-group-expire-articles
3155 Run all expirable articles in the current group through the expiry
3156 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3157 all expirable articles in the group that have been around for a while.
3158 (@pxref{Expiring Mail}).
3159
3160 @item C-c M-C-x
3161 @kindex C-c M-C-x (Group)
3162 @findex gnus-group-expire-all-groups
3163 Run all expirable articles in all groups through the expiry process
3164 (@code{gnus-group-expire-all-groups}).
3165
3166 @end table
3167
3168
3169 @node Browse Foreign Server
3170 @section Browse Foreign Server
3171 @cindex foreign servers
3172 @cindex browsing servers
3173
3174 @table @kbd
3175 @item B
3176 @kindex B (Group)
3177 @findex gnus-group-browse-foreign-server
3178 You will be queried for a select method and a server name.  Gnus will
3179 then attempt to contact this server and let you browse the groups there
3180 (@code{gnus-group-browse-foreign-server}).
3181 @end table
3182
3183 @findex gnus-browse-mode
3184 A new buffer with a list of available groups will appear.  This buffer
3185 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3186 a lot) like a normal group buffer.
3187
3188 Here's a list of keystrokes available in the browse mode:
3189
3190 @table @kbd
3191 @item n
3192 @kindex n (Browse)
3193 @findex gnus-group-next-group
3194 Go to the next group (@code{gnus-group-next-group}).
3195
3196 @item p
3197 @kindex p (Browse)
3198 @findex gnus-group-prev-group
3199 Go to the previous group (@code{gnus-group-prev-group}).
3200
3201 @item SPACE
3202 @kindex SPACE (Browse)
3203 @findex gnus-browse-read-group
3204 Enter the current group and display the first article
3205 (@code{gnus-browse-read-group}).
3206
3207 @item RET
3208 @kindex RET (Browse)
3209 @findex gnus-browse-select-group
3210 Enter the current group (@code{gnus-browse-select-group}).
3211
3212 @item u
3213 @kindex u (Browse)
3214 @findex gnus-browse-unsubscribe-current-group
3215 Unsubscribe to the current group, or, as will be the case here,
3216 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3217
3218 @item l
3219 @itemx q
3220 @kindex q (Browse)
3221 @kindex l (Browse)
3222 @findex gnus-browse-exit
3223 Exit browse mode (@code{gnus-browse-exit}).
3224
3225 @item ?
3226 @kindex ? (Browse)
3227 @findex gnus-browse-describe-briefly
3228 Describe browse mode briefly (well, there's not much to describe, is
3229 there) (@code{gnus-browse-describe-briefly}).
3230 @end table
3231
3232
3233 @node Exiting Gnus
3234 @section Exiting gnus
3235 @cindex exiting gnus
3236
3237 Yes, gnus is ex(c)iting.
3238
3239 @table @kbd
3240 @item z
3241 @kindex z (Group)
3242 @findex gnus-group-suspend
3243 Suspend gnus (@code{gnus-group-suspend}).  This doesn't really exit gnus,
3244 but it kills all buffers except the Group buffer.  I'm not sure why this
3245 is a gain, but then who am I to judge?
3246
3247 @item q
3248 @kindex q (Group)
3249 @findex gnus-group-exit
3250 @c @icon{gnus-group-exit}
3251 Quit gnus (@code{gnus-group-exit}).
3252
3253 @item Q
3254 @kindex Q (Group)
3255 @findex gnus-group-quit
3256 Quit gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3257 The dribble file will be saved, though (@pxref{Auto Save}).
3258 @end table
3259
3260 @vindex gnus-exit-gnus-hook
3261 @vindex gnus-suspend-gnus-hook
3262 @code{gnus-suspend-gnus-hook} is called when you suspend gnus and
3263 @code{gnus-exit-gnus-hook} is called when you quit gnus, while
3264 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3265 exiting gnus.
3266
3267 @findex gnus-unload
3268 @cindex unloading
3269 If you wish to completely unload gnus and all its adherents, you can use
3270 the @code{gnus-unload} command.  This command is also very handy when
3271 trying to customize meta-variables.
3272
3273 Note:
3274
3275 @quotation
3276 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3277 numbly heavy and herself fall into a hazy trance as the boy sitting
3278 behind her drew repeated lines with his pencil across the back of her
3279 plastic chair.
3280 @end quotation
3281
3282
3283 @node Group Topics
3284 @section Group Topics
3285 @cindex topics
3286
3287 If you read lots and lots of groups, it might be convenient to group
3288 them hierarchically according to topics.  You put your Emacs groups over
3289 here, your sex groups over there, and the rest (what, two groups or so?)
3290 you put in some misc section that you never bother with anyway.  You can
3291 even group the Emacs sex groups as a sub-topic to either the Emacs
3292 groups or the sex groups---or both!  Go wild!
3293
3294 @iftex
3295 @iflatex
3296 \gnusfigure{Group Topics}{400}{
3297 \put(75,50){\epsfig{figure=tmp/group-topic.ps,height=9cm}}
3298 }
3299 @end iflatex
3300 @end iftex
3301
3302 Here's an example:
3303
3304 @example
3305 Gnus
3306   Emacs -- I wuw it!
3307      3: comp.emacs
3308      2: alt.religion.emacs
3309     Naughty Emacs
3310      452: alt.sex.emacs
3311        0: comp.talk.emacs.recovery
3312   Misc
3313      8: comp.binaries.fractals
3314     13: comp.sources.unix
3315 @end example
3316
3317 @findex gnus-topic-mode
3318 @kindex t (Group)
3319 To get this @emph{fab} functionality you simply turn on (ooh!) the
3320 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3321 is a toggling command.)
3322
3323 Go ahead, just try it.  I'll still be here when you get back.  La de
3324 dum...  Nice tune, that...  la la la...  What, you're back? Yes, and now
3325 press @kbd{l}.  There.  All your groups are now listed under
3326 @samp{misc}.  Doesn't that make you feel all warm and fuzzy?  Hot and
3327 bothered?
3328
3329 If you want this permanently enabled, you should add that minor mode to
3330 the hook for the group mode:
3331
3332 @lisp
3333 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3334 @end lisp
3335
3336 @menu
3337 * Topic Variables::             How to customize the topics the Lisp Way.
3338 * Topic Commands::              Interactive E-Z commands.
3339 * Topic Sorting::               Sorting each topic individually.
3340 * Topic Topology::              A map of the world.
3341 * Topic Parameters::            Parameters that apply to all groups in a topic.
3342 @end menu
3343
3344
3345 @node Topic Variables
3346 @subsection Topic Variables
3347 @cindex topic variables
3348
3349 Now, if you select a topic, it will fold/unfold that topic, which is
3350 really neat, I think.
3351
3352 @vindex gnus-topic-line-format
3353 The topic lines themselves are created according to the
3354 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3355 Valid elements are:
3356
3357 @table @samp
3358 @item i
3359 Indentation.
3360 @item n
3361 Topic name.
3362 @item v
3363 Visibility.
3364 @item l
3365 Level.
3366 @item g
3367 Number of groups in the topic.
3368 @item a
3369 Number of unread articles in the topic.
3370 @item A
3371 Number of unread articles in the topic and all its subtopics.
3372 @end table
3373
3374 @vindex gnus-topic-indent-level
3375 Each sub-topic (and the groups in the sub-topics) will be indented with
3376 @code{gnus-topic-indent-level} times the topic level number of spaces.
3377 The default is 2.
3378
3379 @vindex gnus-topic-mode-hook
3380 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3381
3382 @vindex gnus-topic-display-empty-topics
3383 The @code{gnus-topic-display-empty-topics} says whether to display even
3384 topics that have no unread articles in them.  The default is @code{t}.
3385
3386
3387 @node Topic Commands
3388 @subsection Topic Commands
3389 @cindex topic commands
3390
3391 When the topic minor mode is turned on, a new @kbd{T} submap will be
3392 available.  In addition, a few of the standard keys change their
3393 definitions slightly.
3394
3395 @table @kbd
3396
3397 @item T n
3398 @kindex T n (Topic)
3399 @findex gnus-topic-create-topic
3400 Prompt for a new topic name and create it
3401 (@code{gnus-topic-create-topic}).
3402
3403 @item T m
3404 @kindex T m (Topic)
3405 @findex gnus-topic-move-group
3406 Move the current group to some other topic
3407 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3408 convention (@pxref{Process/Prefix}).
3409
3410 @item T j
3411 @kindex T j (Topic)
3412 @findex gnus-topic-jump-to-topic
3413 Go to a topic (@code{gnus-topic-jump-to-topic}).
3414
3415 @item T c
3416 @kindex T c (Topic)
3417 @findex gnus-topic-copy-group
3418 Copy the current group to some other topic
3419 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3420 convention (@pxref{Process/Prefix}).
3421
3422 @item T h
3423 @kindex T h (Topic)
3424 @findex gnus-topic-hide-topic
3425 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3426 a prefix, hide the topic permanently.
3427
3428 @item T s
3429 @kindex T s (Topic)
3430 @findex gnus-topic-show-topic
3431 Show the current topic (@code{gnus-topic-show-topic}).  If given
3432 a prefix, show the topic permanently.
3433
3434 @item T D
3435 @kindex T D (Topic)
3436 @findex gnus-topic-remove-group
3437 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3438 This command is mainly useful if you have the same group in several
3439 topics and wish to remove it from one of the topics.  You may also
3440 remove a group from all topics, but in that case, Gnus will add it to
3441 the root topic the next time you start Gnus.  In fact, all new groups
3442 (which, naturally, don't belong to any topic) will show up in the root
3443 topic.
3444
3445 This command uses the process/prefix convention
3446 (@pxref{Process/Prefix}).
3447
3448 @item T M
3449 @kindex T M (Topic)
3450 @findex gnus-topic-move-matching
3451 Move all groups that match some regular expression to a topic
3452 (@code{gnus-topic-move-matching}).
3453
3454 @item T C
3455 @kindex T C (Topic)
3456 @findex gnus-topic-copy-matching
3457 Copy all groups that match some regular expression to a topic
3458 (@code{gnus-topic-copy-matching}).
3459
3460 @item T H
3461 @kindex T H (Topic)
3462 @findex gnus-topic-toggle-display-empty-topics
3463 Toggle hiding empty topics
3464 (@code{gnus-topic-toggle-display-empty-topics}).
3465
3466 @item T #
3467 @kindex T # (Topic)
3468 @findex gnus-topic-mark-topic
3469 Mark all groups in the current topic with the process mark
3470 (@code{gnus-topic-mark-topic}).
3471
3472 @item T M-#
3473 @kindex T M-# (Topic)
3474 @findex gnus-topic-unmark-topic
3475 Remove the process mark from all groups in the current topic
3476 (@code{gnus-topic-unmark-topic}).
3477
3478 @item T TAB
3479 @itemx TAB
3480 @kindex T TAB (Topic)
3481 @kindex TAB (Topic)
3482 @findex gnus-topic-indent
3483 ``Indent'' the current topic so that it becomes a sub-topic of the
3484 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3485 ``un-indent'' the topic instead.
3486
3487 @item M-TAB
3488 @kindex M-TAB (Topic)
3489 @findex gnus-topic-unindent
3490 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3491 parent of its current parent (@code{gnus-topic-unindent}).
3492
3493 @item RET
3494 @kindex RET (Topic)
3495 @findex gnus-topic-select-group
3496 @itemx SPACE
3497 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3498 When you perform this command on a group, you'll enter the group, as
3499 usual.  When done on a topic line, the topic will be folded (if it was
3500 visible) or unfolded (if it was folded already).  So it's basically a
3501 toggling command on topics.  In addition, if you give a numerical
3502 prefix, group on that level (and lower) will be displayed.
3503
3504 @item C-c C-x
3505 @kindex C-c C-x (Topic)
3506 @findex gnus-topic-expire-articles
3507 Run all expirable articles in the current group or topic through the
3508 expiry process (if any)
3509 (@code{gnus-topic-expire-articles}). (@pxref{Expiring Mail}).
3510
3511 @item C-k
3512 @kindex C-k (Topic)
3513 @findex gnus-topic-kill-group
3514 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3515 topic will be removed along with the topic.
3516
3517 @item C-y
3518 @kindex C-y (Topic)
3519 @findex gnus-topic-yank-group
3520 Yank the previously killed group or topic
3521 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3522 before all groups.
3523
3524 @item T r
3525 @kindex T r (Topic)
3526 @findex gnus-topic-rename
3527 Rename a topic (@code{gnus-topic-rename}).
3528
3529 @item T DEL
3530 @kindex T DEL (Topic)
3531 @findex gnus-topic-delete
3532 Delete an empty topic (@code{gnus-topic-delete}).
3533
3534 @item A T
3535 @kindex A T (Topic)
3536 @findex gnus-topic-list-active
3537 List all groups that gnus knows about in a topics-ified way
3538 (@code{gnus-topic-list-active}).
3539
3540 @item G p
3541 @kindex G p (Topic)
3542 @findex gnus-topic-edit-parameters
3543 @cindex group parameters
3544 @cindex topic parameters
3545 @cindex parameters
3546 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3547 @xref{Topic Parameters}.
3548
3549 @end table
3550
3551
3552 @node Topic Sorting
3553 @subsection Topic Sorting
3554 @cindex topic sorting
3555
3556 You can sort the groups in each topic individually with the following
3557 commands:
3558
3559
3560 @table @kbd
3561 @item T S a
3562 @kindex T S a (Topic)
3563 @findex gnus-topic-sort-groups-by-alphabet
3564 Sort the current topic alphabetically by group name
3565 (@code{gnus-topic-sort-groups-by-alphabet}).
3566
3567 @item T S u
3568 @kindex T S u (Topic)
3569 @findex gnus-topic-sort-groups-by-unread
3570 Sort the current topic by the number of unread articles
3571 (@code{gnus-topic-sort-groups-by-unread}).
3572
3573 @item T S l
3574 @kindex T S l (Topic)
3575 @findex gnus-topic-sort-groups-by-level
3576 Sort the current topic by group level
3577 (@code{gnus-topic-sort-groups-by-level}).
3578
3579 @item T S v
3580 @kindex T S v (Topic)
3581 @findex gnus-topic-sort-groups-by-score
3582 Sort the current topic by group score
3583 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3584
3585 @item T S r
3586 @kindex T S r (Topic)
3587 @findex gnus-topic-sort-groups-by-rank
3588 Sort the current topic by group rank
3589 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3590
3591 @item T S m
3592 @kindex T S m (Topic)
3593 @findex gnus-topic-sort-groups-by-method
3594 Sort the current topic alphabetically by backend name
3595 (@code{gnus-topic-sort-groups-by-method}).
3596
3597 @end table
3598
3599 @xref{Sorting Groups}, for more information about group sorting.
3600
3601
3602 @node Topic Topology
3603 @subsection Topic Topology
3604 @cindex topic topology
3605 @cindex topology
3606
3607 So, let's have a look at an example group buffer:
3608
3609 @example
3610 Gnus
3611   Emacs -- I wuw it!
3612      3: comp.emacs
3613      2: alt.religion.emacs
3614     Naughty Emacs
3615      452: alt.sex.emacs
3616        0: comp.talk.emacs.recovery
3617   Misc
3618      8: comp.binaries.fractals
3619     13: comp.sources.unix
3620 @end example
3621
3622 So, here we have one top-level topic (@samp{Gnus}), two topics under
3623 that, and one sub-topic under one of the sub-topics.  (There is always
3624 just one (1) top-level topic).  This topology can be expressed as
3625 follows:
3626
3627 @lisp
3628 (("Gnus" visible)
3629  (("Emacs -- I wuw it!" visible)
3630   (("Naughty Emacs" visible)))
3631  (("Misc" visible)))
3632 @end lisp
3633
3634 @vindex gnus-topic-topology
3635 This is in fact how the variable @code{gnus-topic-topology} would look
3636 for the display above.  That variable is saved in the @file{.newsrc.eld}
3637 file, and shouldn't be messed with manually---unless you really want
3638 to.  Since this variable is read from the @file{.newsrc.eld} file,
3639 setting it in any other startup files will have no effect.
3640
3641 This topology shows what topics are sub-topics of what topics (right),
3642 and which topics are visible.  Two settings are currently
3643 allowed---@code{visible} and @code{invisible}.
3644
3645
3646 @node Topic Parameters
3647 @subsection Topic Parameters
3648 @cindex topic parameters
3649
3650 All groups in a topic will inherit group parameters from the parent (and
3651 ancestor) topic parameters.  All valid group parameters are valid topic
3652 parameters (@pxref{Group Parameters}).
3653
3654 In addition, the following parameters are only valid as topic
3655 parameters:
3656
3657 @table @code
3658 @item subscribe
3659 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3660 @code{subscribe} topic parameter says what groups go in what topic.  Its
3661 value should be a regexp to match the groups that should go in that
3662 topic.
3663
3664 @end table
3665
3666 Group parameters (of course) override topic parameters, and topic
3667 parameters in sub-topics override topic parameters in super-topics.  You
3668 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3669 verb, although you may feel free to disagree with me here.)
3670
3671 @example
3672 Gnus
3673   Emacs
3674      3: comp.emacs
3675      2: alt.religion.emacs
3676    452: alt.sex.emacs
3677     Relief
3678      452: alt.sex.emacs
3679        0: comp.talk.emacs.recovery
3680   Misc
3681      8: comp.binaries.fractals
3682     13: comp.sources.unix
3683    452: alt.sex.emacs
3684 @end example
3685
3686 The @samp{Emacs} topic has the topic parameter @code{(score-file
3687 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3688 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3689 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3690 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3691 . "religion.SCORE")}.
3692
3693 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
3694 will get the @file{relief.SCORE} home score file.  If you enter the same
3695 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
3696 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
3697 get the @file{religion.SCORE} home score file.
3698
3699 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
3700 there are some problems, especially with the @code{total-expiry}
3701 parameter.  Say you have a mail group in two topics; one with
3702 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
3703 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
3704 of these topics you mean to expire articles from, so anything may
3705 happen.  In fact, I hereby declare that it is @dfn{undefined} what
3706 happens.  You just have to be careful if you do stuff like that.
3707
3708
3709 @node Misc Group Stuff
3710 @section Misc Group Stuff
3711
3712 @menu
3713 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
3714 * Group Information::           Information and help on groups and Gnus.
3715 * Group Timestamp::             Making Gnus keep track of when you last read a group.
3716 * File Commands::               Reading and writing the Gnus files.
3717 @end menu
3718
3719 @table @kbd
3720
3721 @item ^
3722 @kindex ^ (Group)
3723 @findex gnus-group-enter-server-mode
3724 Enter the server buffer (@code{gnus-group-enter-server-mode}).
3725 @xref{Server Buffer}.
3726
3727 @item a
3728 @kindex a (Group)
3729 @findex gnus-group-post-news
3730 Post an article to a group (@code{gnus-group-post-news}).  If given a
3731 prefix, the current group name will be used as the default.
3732
3733 @item m
3734 @kindex m (Group)
3735 @findex gnus-group-mail
3736 Mail a message somewhere (@code{gnus-group-mail}).
3737
3738 @end table
3739
3740 Variables for the group buffer:
3741
3742 @table @code
3743
3744 @item gnus-group-mode-hook
3745 @vindex gnus-group-mode-hook
3746 is called after the group buffer has been
3747 created.
3748
3749 @item gnus-group-prepare-hook
3750 @vindex gnus-group-prepare-hook
3751 is called after the group buffer is
3752 generated.  It may be used to modify the buffer in some strange,
3753 unnatural way.
3754
3755 @item gnus-group-prepared-hook
3756 @vindex gnus-group-prepare-hook
3757 is called as the very last thing after the group buffer has been
3758 generated.  It may be used to move point around, for instance.
3759
3760 @item gnus-permanently-visible-groups
3761 @vindex gnus-permanently-visible-groups
3762 Groups matching this regexp will always be listed in the group buffer,
3763 whether they are empty or not.
3764
3765 @item gnus-group-name-charset-method-alist
3766 @vindex gnus-group-name-charset-method-alist
3767 An alist of method and the charset for group names. It is used to show
3768 non-ASCII group names.
3769
3770 For example:
3771 @lisp
3772 (setq gnus-group-name-charset-method-alist
3773     '(((nntp "news.com.cn") . cn-gb-2312)))
3774 @end lisp
3775
3776 @item gnus-group-name-charset-group-alist
3777 @vindex gnus-group-name-charset-group-alist
3778 An alist of regexp of group name and the charset for group names.
3779 It is used to show non-ASCII group names.
3780
3781 For example:
3782 @lisp
3783 (setq gnus-group-name-charset-group-alist
3784     '(("\\.com\\.cn:" . cn-gb-2312)))
3785 @end lisp
3786
3787 @end table
3788
3789 @node Scanning New Messages
3790 @subsection Scanning New Messages
3791 @cindex new messages
3792 @cindex scanning new news
3793
3794 @table @kbd
3795
3796 @item g
3797 @kindex g (Group)
3798 @findex gnus-group-get-new-news
3799 @c @icon{gnus-group-get-new-news}
3800 Check the server(s) for new articles.  If the numerical prefix is used,
3801 this command will check only groups of level @var{arg} and lower
3802 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
3803 command will force a total re-reading of the active file(s) from the
3804 backend(s).
3805
3806 @item M-g
3807 @kindex M-g (Group)
3808 @findex gnus-group-get-new-news-this-group
3809 @vindex gnus-goto-next-group-when-activating
3810 @c @icon{gnus-group-get-new-news-this-group}
3811 Check whether new articles have arrived in the current group
3812 (@code{gnus-group-get-new-news-this-group}).
3813 @code{gnus-goto-next-group-when-activating} says whether this command is
3814 to move point to the next group or not.  It is @code{t} by default.
3815
3816 @findex gnus-activate-all-groups
3817 @cindex activating groups
3818 @item C-c M-g
3819 @kindex C-c M-g (Group)
3820 Activate absolutely all groups (@code{gnus-activate-all-groups}).
3821
3822 @item R
3823 @kindex R (Group)
3824 @cindex restarting
3825 @findex gnus-group-restart
3826 Restart gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
3827 file(s), closes the connection to all servers, clears up all run-time
3828 gnus variables, and then starts gnus all over again.
3829
3830 @end table
3831
3832 @vindex gnus-get-new-news-hook
3833 @code{gnus-get-new-news-hook} is run just before checking for new news.
3834
3835 @vindex gnus-after-getting-new-news-hook
3836 @code{gnus-after-getting-new-news-hook} is run after checking for new
3837 news.
3838
3839
3840 @node Group Information
3841 @subsection Group Information
3842 @cindex group information
3843 @cindex information on groups
3844
3845 @table @kbd
3846
3847
3848 @item H f
3849 @kindex H f (Group)
3850 @findex gnus-group-fetch-faq
3851 @vindex gnus-group-faq-directory
3852 @cindex FAQ
3853 @cindex ange-ftp
3854 Try to fetch the FAQ for the current group
3855 (@code{gnus-group-fetch-faq}).  Gnus will try to get the FAQ from
3856 @code{gnus-group-faq-directory}, which is usually a directory on a
3857 remote machine.  This variable can also be a list of directories.  In
3858 that case, giving a prefix to this command will allow you to choose
3859 between the various sites.  @code{ange-ftp} (or @code{efs}) will be used
3860 for fetching the file.
3861
3862 If fetching from the first site is unsuccessful, gnus will attempt to go
3863 through @code{gnus-group-faq-directory} and try to open them one by one.
3864
3865 @item H d
3866 @itemx C-c C-d
3867 @c @icon{gnus-group-describe-group}
3868 @kindex H d (Group)
3869 @kindex C-c C-d (Group)
3870 @cindex describing groups
3871 @cindex group description
3872 @findex gnus-group-describe-group
3873 Describe the current group (@code{gnus-group-describe-group}).  If given
3874 a prefix, force Gnus to re-read the description from the server.
3875
3876 @item M-d
3877 @kindex M-d (Group)
3878 @findex gnus-group-describe-all-groups
3879 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
3880 prefix, force gnus to re-read the description file from the server.
3881
3882 @item H v
3883 @itemx V
3884 @kindex V (Group)
3885 @kindex H v (Group)
3886 @cindex version
3887 @findex gnus-version
3888 Display current gnus version numbers (@code{gnus-version}).
3889
3890 @item ?
3891 @kindex ? (Group)
3892 @findex gnus-group-describe-briefly
3893 Give a very short help message (@code{gnus-group-describe-briefly}).
3894
3895 @item C-c C-i
3896 @kindex C-c C-i (Group)
3897 @cindex info
3898 @cindex manual
3899 @findex gnus-info-find-node
3900 Go to the gnus info node (@code{gnus-info-find-node}).
3901 @end table
3902
3903
3904 @node Group Timestamp
3905 @subsection Group Timestamp
3906 @cindex timestamps
3907 @cindex group timestamps
3908
3909 It can be convenient to let gnus keep track of when you last read a
3910 group.  To set the ball rolling, you should add
3911 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
3912
3913 @lisp
3914 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
3915 @end lisp
3916
3917 After doing this, each time you enter a group, it'll be recorded.
3918
3919 This information can be displayed in various ways---the easiest is to
3920 use the @samp{%d} spec in the group line format:
3921
3922 @lisp
3923 (setq gnus-group-line-format
3924       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
3925 @end lisp
3926
3927 This will result in lines looking like:
3928
3929 @example
3930 *        0: mail.ding                                19961002T012943
3931          0: custom                                   19961002T012713
3932 @end example
3933
3934 As you can see, the date is displayed in compact ISO 8601 format.  This
3935 may be a bit too much, so to just display the date, you could say
3936 something like:
3937
3938 @lisp
3939 (setq gnus-group-line-format
3940       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
3941 @end lisp
3942
3943
3944 @node File Commands
3945 @subsection File Commands
3946 @cindex file commands
3947
3948 @table @kbd
3949
3950 @item r
3951 @kindex r (Group)
3952 @findex gnus-group-read-init-file
3953 @vindex gnus-init-file
3954 @cindex reading init file
3955 Re-read the init file (@code{gnus-init-file}, which defaults to
3956 @file{~/.gnus}) (@code{gnus-group-read-init-file}).
3957
3958 @item s
3959 @kindex s (Group)
3960 @findex gnus-group-save-newsrc
3961 @cindex saving .newsrc
3962 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
3963 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
3964 file(s) whether Gnus thinks it is necessary or not.
3965
3966 @c @item Z
3967 @c @kindex Z (Group)
3968 @c @findex gnus-group-clear-dribble
3969 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
3970
3971 @end table
3972
3973
3974 @node Summary Buffer
3975 @chapter Summary Buffer
3976 @cindex summary buffer
3977
3978 A line for each article is displayed in the summary buffer.  You can
3979 move around, read articles, post articles and reply to articles.
3980
3981 The most common way to a summary buffer is to select a group from the
3982 group buffer (@pxref{Selecting a Group}).
3983
3984 You can have as many summary buffers open as you wish.
3985
3986 @menu
3987 * Summary Buffer Format::       Deciding how the summary buffer is to look.
3988 * Summary Maneuvering::         Moving around the summary buffer.
3989 * Choosing Articles::           Reading articles.
3990 * Paging the Article::          Scrolling the current article.
3991 * Reply Followup and Post::     Posting articles.
3992 * Delayed Articles::            
3993 * Marking Articles::            Marking articles as read, expirable, etc.
3994 * Limiting::                    You can limit the summary buffer.
3995 * Threading::                   How threads are made.
3996 * Sorting the Summary Buffer::  How articles and threads are sorted.
3997 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
3998 * Article Caching::             You may store articles in a cache.
3999 * Persistent Articles::         Making articles expiry-resistant.
4000 * Article Backlog::             Having already read articles hang around.
4001 * Saving Articles::             Ways of customizing article saving.
4002 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4003 * Article Treatment::           The article buffer can be mangled at will.
4004 * MIME Commands::               Doing MIMEy things with the articles.
4005 * Charsets::                    Character set issues.
4006 * Article Commands::            Doing various things with the article buffer.
4007 * Summary Sorting::             Sorting the summary buffer in various ways.
4008 * Finding the Parent::          No child support? Get the parent.
4009 * Alternative Approaches::      Reading using non-default summaries.
4010 * Tree Display::                A more visual display of threads.
4011 * Mail Group Commands::         Some commands can only be used in mail groups.
4012 * Various Summary Stuff::       What didn't fit anywhere else.
4013 * Exiting the Summary Buffer::  Returning to the Group buffer,
4014                                 or reselecting the current group.
4015 * Crosspost Handling::          How crossposted articles are dealt with.
4016 * Duplicate Suppression::       An alternative when crosspost handling fails.
4017 * Security::                    Decrypt and Verify.
4018 * Mailing List::                Mailing list minor mode.
4019 @end menu
4020
4021
4022 @node Summary Buffer Format
4023 @section Summary Buffer Format
4024 @cindex summary buffer format
4025
4026 @iftex
4027 @iflatex
4028 \gnusfigure{The Summary Buffer}{180}{
4029 \put(0,0){\epsfig{figure=tmp/summary.ps,width=7.5cm}}
4030 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=tmp/summary-article.ps,width=7.5cm}}}
4031 }
4032 @end iflatex
4033 @end iftex
4034
4035 @menu
4036 * Summary Buffer Lines::        You can specify how summary lines should look.
4037 * To From Newsgroups::          How to not display your own name.
4038 * Summary Buffer Mode Line::    You can say how the mode line should look.
4039 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4040 @end menu
4041
4042 @findex mail-extract-address-components
4043 @findex gnus-extract-address-components
4044 @vindex gnus-extract-address-components
4045 Gnus will use the value of the @code{gnus-extract-address-components}
4046 variable as a function for getting the name and address parts of a
4047 @code{From} header.  Three pre-defined functions exist:
4048 @code{gnus-extract-address-components}, which is the default, quite
4049 fast, and too simplistic solution;
4050 @code{mail-extract-address-components}, which works nicely, but is
4051 slower; and @code{std11-extract-address-components}, which works very
4052 nicely, but is slower.  The default function will return the wrong
4053 answer in 5% of the cases.  If this is unacceptable to you, use the
4054 other function instead:
4055
4056 @lisp
4057 (setq gnus-extract-address-components
4058       'mail-extract-address-components)
4059 @end lisp
4060
4061 @vindex gnus-summary-same-subject
4062 @code{gnus-summary-same-subject} is a string indicating that the current
4063 article has the same subject as the previous.  This string will be used
4064 with those specs that require it.  The default is @code{""}.
4065
4066
4067 @node Summary Buffer Lines
4068 @subsection Summary Buffer Lines
4069
4070 @vindex gnus-summary-line-format
4071 You can change the format of the lines in the summary buffer by changing
4072 the @code{gnus-summary-line-format} variable.  It works along the same
4073 lines as a normal @code{format} string, with some extensions
4074 (@pxref{Formatting Variables}).
4075
4076 There should always be a colon or a point position marker on the line;
4077 the cursor always moves to the point position marker or the colon after
4078 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4079 possible to change this.  Just write a new function
4080 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4081
4082 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23n%]%) %s\n}.
4083
4084 The following format specification characters are understood:
4085
4086 @table @samp
4087 @item N
4088 Article number.
4089 @item S
4090 Subject string.  List identifiers stripped,
4091 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4092 @item s
4093 Subject if the article is the root of the thread or the previous article
4094 had a different subject, @code{gnus-summary-same-subject} otherwise.
4095 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4096 @item F
4097 Full @code{From} header.
4098 @item n
4099 The name (from the @code{From} header).
4100 @item f
4101 The name, code @code{To} header or the @code{Newsgroups} header
4102 (@pxref{To From Newsgroups}).
4103 @item a
4104 The name (from the @code{From} header).  This differs from the @code{n}
4105 spec in that it uses the function designated by the
4106 @code{gnus-extract-address-components} variable, which is slower, but
4107 may be more thorough.
4108 @item A
4109 The address (from the @code{From} header).  This works the same way as
4110 the @code{a} spec.
4111 @item L
4112 Number of lines in the article.
4113 @item c
4114 Number of characters in the article. This specifier is not supported in some
4115 methods (like nnfolder).
4116 @item I
4117 Indentation based on thread level (@pxref{Customizing Threading}).
4118 @item B
4119 A complex trn-style thread tree, showing response-connecting trace lines.
4120 @item T
4121 Nothing if the article is a root and lots of spaces if it isn't (it
4122 pushes everything after it off the screen).
4123 @item [
4124 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4125 for adopted articles (@pxref{Customizing Threading}).
4126 @item ]
4127 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4128 for adopted articles.
4129 @item >
4130 One space for each thread level.
4131 @item <
4132 Twenty minus thread level spaces.
4133 @item U
4134 Unread.
4135
4136 @item R
4137 This misleadingly named specifier is the @dfn{secondary mark}.  This
4138 mark will say whether the article has been replied to, has been cached,
4139 or has been saved.
4140
4141 @item i
4142 Score as a number (@pxref{Scoring}).
4143 @item z
4144 @vindex gnus-summary-zcore-fuzz
4145 Zcore, @samp{+} if above the default level and @samp{-} if below the
4146 default level.  If the difference between
4147 @code{gnus-summary-default-score} and the score is less than
4148 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4149 @item V
4150 Total thread score.
4151 @item x
4152 @code{Xref}.
4153 @item D
4154 @code{Date}.
4155 @item d
4156 The @code{Date} in @code{DD-MMM} format.
4157 @item o
4158 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4159 @item M
4160 @code{Message-ID}.
4161 @item r
4162 @code{References}.
4163 @item t
4164 Number of articles in the current sub-thread.  Using this spec will slow
4165 down summary buffer generation somewhat.
4166 @item e
4167 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4168 article has any children.
4169 @item P
4170 The line number.
4171 @item O
4172 Download mark.
4173 @item u
4174 User defined specifier.  The next character in the format string should
4175 be a letter.  Gnus will call the function
4176 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
4177 following @samp{%u}.  The function will be passed the current header as
4178 argument.  The function should return a string, which will be inserted
4179 into the summary just like information from any other summary specifier.
4180 @end table
4181
4182 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4183 have to be handled with care.  For reasons of efficiency, gnus will
4184 compute what column these characters will end up in, and ``hard-code''
4185 that.  This means that it is invalid to have these specs after a
4186 variable-length spec.  Well, you might not be arrested, but your summary
4187 buffer will look strange, which is bad enough.
4188
4189 The smart choice is to have these specs as far to the left as possible.
4190 (Isn't that the case with everything, though?  But I digress.)
4191
4192 This restriction may disappear in later versions of gnus.
4193
4194
4195 @node To From Newsgroups
4196 @subsection To From Newsgroups
4197 @cindex To
4198 @cindex Newsgroups
4199
4200 In some groups (particularly in archive groups), the @code{From} header
4201 isn't very interesting, since all the articles there are written by
4202 you.  To display the information in the @code{To} or @code{Newsgroups}
4203 headers instead, you need to decide three things: What information to
4204 gather; where to display it; and when to display it.
4205
4206 @enumerate
4207 @item
4208 @vindex gnus-extra-headers
4209 The reading of extra header information is controlled by the
4210 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4211 instance:
4212
4213 @lisp
4214 (setq gnus-extra-headers
4215       '(To Newsgroups X-Newsreader))
4216 @end lisp
4217
4218 This will result in Gnus trying to obtain these three headers, and
4219 storing it in header structures for later easy retrieval.
4220
4221 @item
4222 @findex gnus-extra-header
4223 The value of these extra headers can be accessed via the
4224 @code{gnus-extra-header} function.  Here's a format line spec that will
4225 access the @code{X-Newsreader} header:
4226
4227 @example
4228 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4229 @end example
4230
4231 @item
4232 @vindex gnus-ignored-from-addresses
4233 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4234 summary line spec returns the @code{To}, @code{Newsreader} or
4235 @code{From} header.  If this regexp matches the contents of the
4236 @code{From} header, the value of the @code{To} or @code{Newsreader}
4237 headers are used instead.
4238
4239 @end enumerate
4240
4241 @vindex nnmail-extra-headers
4242 A related variable is @code{nnmail-extra-headers}, which controls when
4243 to include extra headers when generating overview (@sc{nov}) files.  If
4244 you have old overview files, you should regenerate them after changing
4245 this variable.
4246
4247 @vindex gnus-summary-line-format
4248 You also have to instruct Gnus to display the data by changing the
4249 @code{%n} spec to the @code{%f} spec in the
4250 @code{gnus-summary-line-format} variable.
4251
4252 In summary, you'd typically put something like the following in
4253 @file{~/.gnus}:
4254
4255 @lisp
4256 (setq gnus-extra-headers
4257       '(To Newsgroups))
4258 (setq nnmail-extra-headers gnus-extra-headers)
4259 (setq gnus-summary-line-format
4260       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4261 (setq gnus-ignored-from-addresses
4262       "Your Name Here")
4263 @end lisp
4264
4265 Now, this is mostly useful for mail groups, where you have control over
4266 the @sc{nov} files that are created.  However, if you can persuade your
4267 nntp admin to add:
4268
4269 @example
4270 Newsgroups:full
4271 @end example
4272
4273 to the end of her @file{overview.fmt} file, then you can use that just
4274 as you would the extra headers from the mail groups.
4275
4276
4277 @node Summary Buffer Mode Line
4278 @subsection Summary Buffer Mode Line
4279
4280 @vindex gnus-summary-mode-line-format
4281 You can also change the format of the summary mode bar (@pxref{Mode Line
4282 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4283 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4284
4285 Here are the elements you can play with:
4286
4287 @table @samp
4288 @item G
4289 Group name.
4290 @item p
4291 Unprefixed group name.
4292 @item A
4293 Current article number.
4294 @item z
4295 Current article score.
4296 @item V
4297 Gnus version.
4298 @item U
4299 Number of unread articles in this group.
4300 @item e
4301 Number of unread articles in this group that aren't displayed in the
4302 summary buffer.
4303 @item Z
4304 A string with the number of unread and unselected articles represented
4305 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4306 articles, and just as @samp{<%U more>} if there are just unread articles
4307 and no unselected ones.
4308 @item g
4309 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4310 shortened to @samp{r.a.anime}.
4311 @item S
4312 Subject of the current article.
4313 @item u
4314 User-defined spec (@pxref{User-Defined Specs}).
4315 @item s
4316 Name of the current score file (@pxref{Scoring}).
4317 @item d
4318 Number of dormant articles (@pxref{Unread Articles}).
4319 @item t
4320 Number of ticked articles (@pxref{Unread Articles}).
4321 @item r
4322 Number of articles that have been marked as read in this session.
4323 @item E
4324 Number of articles expunged by the score files.
4325 @end table
4326
4327
4328 @node Summary Highlighting
4329 @subsection Summary Highlighting
4330
4331 @table @code
4332
4333 @item gnus-visual-mark-article-hook
4334 @vindex gnus-visual-mark-article-hook
4335 This hook is run after selecting an article.  It is meant to be used for
4336 highlighting the article in some way.  It is not run if
4337 @code{gnus-visual} is @code{nil}.
4338
4339 @item gnus-summary-update-hook
4340 @vindex gnus-summary-update-hook
4341 This hook is called when a summary line is changed.  It is not run if
4342 @code{gnus-visual} is @code{nil}.
4343
4344 @item gnus-summary-selected-face
4345 @vindex gnus-summary-selected-face
4346 This is the face (or @dfn{font} as some people call it) used to
4347 highlight the current article in the summary buffer.
4348
4349 @item gnus-summary-highlight
4350 @vindex gnus-summary-highlight
4351 Summary lines are highlighted according to this variable, which is a
4352 list where the elements are of the format @code{(@var{form}
4353 . @var{face})}.  If you would, for instance, like ticked articles to be
4354 italic and high-scored articles to be bold, you could set this variable
4355 to something like
4356 @lisp
4357 (((eq mark gnus-ticked-mark) . italic)
4358  ((> score default) . bold))
4359 @end lisp
4360 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4361 @var{face} will be applied to the line.
4362 @end table
4363
4364
4365 @node Summary Maneuvering
4366 @section Summary Maneuvering
4367 @cindex summary movement
4368
4369 All the straight movement commands understand the numeric prefix and
4370 behave pretty much as you'd expect.
4371
4372 None of these commands select articles.
4373
4374 @table @kbd
4375 @item G M-n
4376 @itemx M-n
4377 @kindex M-n (Summary)
4378 @kindex G M-n (Summary)
4379 @findex gnus-summary-next-unread-subject
4380 Go to the next summary line of an unread article
4381 (@code{gnus-summary-next-unread-subject}).
4382
4383 @item G M-p
4384 @itemx M-p
4385 @kindex M-p (Summary)
4386 @kindex G M-p (Summary)
4387 @findex gnus-summary-prev-unread-subject
4388 Go to the previous summary line of an unread article
4389 (@code{gnus-summary-prev-unread-subject}).
4390
4391 @item G g
4392 @kindex G g (Summary)
4393 @findex gnus-summary-goto-subject
4394 Ask for an article number and then go to the summary line of that article
4395 without displaying the article (@code{gnus-summary-goto-subject}).
4396 @end table
4397
4398 If gnus asks you to press a key to confirm going to the next group, you
4399 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4400 buffer, searching for the next group to read without actually returning
4401 to the group buffer.
4402
4403 Variables related to summary movement:
4404
4405 @table @code
4406
4407 @vindex gnus-auto-select-next
4408 @item gnus-auto-select-next
4409 If you issue one of the movement commands (like @kbd{n}) and there are
4410 no more unread articles after the current one, gnus will offer to go to
4411 the next group.  If this variable is @code{t} and the next group is
4412 empty, gnus will exit summary mode and return to the group buffer.  If
4413 this variable is neither @code{t} nor @code{nil}, gnus will select the
4414 next group, no matter whether it has any unread articles or not.  As a
4415 special case, if this variable is @code{quietly}, gnus will select the
4416 next group without asking for confirmation.  If this variable is
4417 @code{almost-quietly}, the same will happen only if you are located on
4418 the last article in the group.  Finally, if this variable is
4419 @code{slightly-quietly}, the @kbd{Z n} command will go to the next group
4420 without confirmation.  Also @pxref{Group Levels}.
4421
4422 @item gnus-auto-select-same
4423 @vindex gnus-auto-select-same
4424 If non-@code{nil}, all the movement commands will try to go to the next
4425 article with the same subject as the current.  (@dfn{Same} here might
4426 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4427 for details (@pxref{Customizing Threading}).)  If there are no more
4428 articles with the same subject, go to the first unread article.
4429
4430 This variable is not particularly useful if you use a threaded display.
4431
4432 @item gnus-summary-check-current
4433 @vindex gnus-summary-check-current
4434 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4435 to the next (or previous) article if the current article is unread.
4436 Instead, they will choose the current article.
4437
4438 @item gnus-auto-center-summary
4439 @vindex gnus-auto-center-summary
4440 If non-@code{nil}, gnus will keep the point in the summary buffer
4441 centered at all times.  This makes things quite tidy, but if you have a
4442 slow network connection, or simply do not like this un-Emacsism, you can
4443 set this variable to @code{nil} to get the normal Emacs scrolling
4444 action.  This will also inhibit horizontal re-centering of the summary
4445 buffer, which might make it more inconvenient to read extremely long
4446 threads.
4447
4448 This variable can also be a number.  In that case, center the window at
4449 the given number of lines from the top.
4450
4451 @end table
4452
4453
4454 @node Choosing Articles
4455 @section Choosing Articles
4456 @cindex selecting articles
4457
4458 @menu
4459 * Choosing Commands::           Commands for choosing articles.
4460 * Choosing Variables::          Variables that influence these commands.
4461 @end menu
4462
4463
4464 @node Choosing Commands
4465 @subsection Choosing Commands
4466
4467 None of the following movement commands understand the numeric prefix,
4468 and they all select and display an article.
4469
4470 If you want to fetch new articles or redisplay the group, see
4471 @ref{Exiting the Summary Buffer}.
4472
4473 @table @kbd
4474 @item SPACE
4475 @kindex SPACE (Summary)
4476 @findex gnus-summary-next-page
4477 Select the current article, or, if that one's read already, the next
4478 unread article (@code{gnus-summary-next-page}).
4479
4480 @item G n
4481 @itemx n
4482 @kindex n (Summary)
4483 @kindex G n (Summary)
4484 @findex gnus-summary-next-unread-article
4485 @c @icon{gnus-summary-next-unread}
4486 Go to next unread article (@code{gnus-summary-next-unread-article}).
4487
4488 @item G p
4489 @itemx p
4490 @kindex p (Summary)
4491 @findex gnus-summary-prev-unread-article
4492 @c @icon{gnus-summary-prev-unread}
4493 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
4494
4495 @item G N
4496 @itemx N
4497 @kindex N (Summary)
4498 @kindex G N (Summary)
4499 @findex gnus-summary-next-article
4500 Go to the next article (@code{gnus-summary-next-article}).
4501
4502 @item G P
4503 @itemx P
4504 @kindex P (Summary)
4505 @kindex G P (Summary)
4506 @findex gnus-summary-prev-article
4507 Go to the previous article (@code{gnus-summary-prev-article}).
4508
4509 @item G C-n
4510 @kindex G C-n (Summary)
4511 @findex gnus-summary-next-same-subject
4512 Go to the next article with the same subject
4513 (@code{gnus-summary-next-same-subject}).
4514
4515 @item G C-p
4516 @kindex G C-p (Summary)
4517 @findex gnus-summary-prev-same-subject
4518 Go to the previous article with the same subject
4519 (@code{gnus-summary-prev-same-subject}).
4520
4521 @item G f
4522 @itemx .
4523 @kindex G f  (Summary)
4524 @kindex .  (Summary)
4525 @findex gnus-summary-first-unread-article
4526 Go to the first unread article
4527 (@code{gnus-summary-first-unread-article}).
4528
4529 @item G b
4530 @itemx ,
4531 @kindex G b (Summary)
4532 @kindex , (Summary)
4533 @findex gnus-summary-best-unread-article
4534 Go to the article with the highest score
4535 (@code{gnus-summary-best-unread-article}).
4536
4537 @item G l
4538 @itemx l
4539 @kindex l (Summary)
4540 @kindex G l (Summary)
4541 @findex gnus-summary-goto-last-article
4542 Go to the previous article read (@code{gnus-summary-goto-last-article}).
4543
4544 @item G o
4545 @kindex G o (Summary)
4546 @findex gnus-summary-pop-article
4547 @cindex history
4548 @cindex article history
4549 Pop an article off the summary history and go to this article
4550 (@code{gnus-summary-pop-article}).  This command differs from the
4551 command above in that you can pop as many previous articles off the
4552 history as you like, while @kbd{l} toggles the two last read articles.
4553 For a somewhat related issue (if you use these commands a lot),
4554 @pxref{Article Backlog}.
4555
4556 @item G j
4557 @itemx j
4558 @kindex j (Summary)
4559 @kindex G j (Summary)
4560 @findex gnus-summary-goto-article
4561 Ask for an article number or @code{Message-ID}, and then go to that
4562 article (@code{gnus-summary-goto-article}).
4563
4564 @end table
4565
4566
4567 @node Choosing Variables
4568 @subsection Choosing Variables
4569
4570 Some variables relevant for moving and selecting articles:
4571
4572 @table @code
4573 @item gnus-auto-extend-newsgroup
4574 @vindex gnus-auto-extend-newsgroup
4575 All the movement commands will try to go to the previous (or next)
4576 article, even if that article isn't displayed in the Summary buffer if
4577 this variable is non-@code{nil}.  Gnus will then fetch the article from
4578 the server and display it in the article buffer.
4579
4580 @item gnus-select-article-hook
4581 @vindex gnus-select-article-hook
4582 This hook is called whenever an article is selected.  By default it
4583 exposes any threads hidden under the selected article.
4584
4585 @item gnus-mark-article-hook
4586 @vindex gnus-mark-article-hook
4587 @findex gnus-summary-mark-unread-as-read
4588 @findex gnus-summary-mark-read-and-unread-as-read
4589 @findex gnus-unread-mark
4590 This hook is called whenever an article is selected.  It is intended to
4591 be used for marking articles as read.  The default value is
4592 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
4593 mark of almost any article you read to @code{gnus-unread-mark}.  The
4594 only articles not affected by this function are ticked, dormant, and
4595 expirable articles.  If you'd instead like to just have unread articles
4596 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
4597 instead.  It will leave marks like @code{gnus-low-score-mark},
4598 @code{gnus-del-mark} (and so on) alone.
4599
4600 @end table
4601
4602
4603 @node Paging the Article
4604 @section Scrolling the Article
4605 @cindex article scrolling
4606
4607 @table @kbd
4608
4609 @item SPACE
4610 @kindex SPACE (Summary)
4611 @findex gnus-summary-next-page
4612 Pressing @kbd{SPACE} will scroll the current article forward one page,
4613 or, if you have come to the end of the current article, will choose the
4614 next article (@code{gnus-summary-next-page}).
4615
4616 @item DEL
4617 @kindex DEL (Summary)
4618 @findex gnus-summary-prev-page
4619 Scroll the current article back one page (@code{gnus-summary-prev-page}).
4620
4621 @item RET
4622 @kindex RET (Summary)
4623 @findex gnus-summary-scroll-up
4624 Scroll the current article one line forward
4625 (@code{gnus-summary-scroll-up}).
4626
4627 @item M-RET
4628 @kindex M-RET (Summary)
4629 @findex gnus-summary-scroll-down
4630 Scroll the current article one line backward
4631 (@code{gnus-summary-scroll-down}).
4632
4633 @item A g
4634 @itemx g
4635 @kindex A g (Summary)
4636 @kindex g (Summary)
4637 @findex gnus-summary-show-article
4638 @vindex gnus-summary-show-article-charset-alist
4639 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
4640 given a prefix, fetch the current article, but don't run any of the
4641 article treatment functions.  This will give you a ``raw'' article, just
4642 the way it came from the server.
4643
4644 If given a numerical prefix, you can do semi-manual charset stuff.
4645 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
4646 encoded in the @code{cn-gb-2312} charset.  If you have
4647
4648 @lisp
4649 (setq gnus-summary-show-article-charset-alist
4650       '((1 . cn-gb-2312)
4651         (2 . big5)))
4652 @end lisp
4653
4654 then you can say @kbd{C-u 1 g} to get the same effect.
4655
4656 @item A <
4657 @itemx <
4658 @kindex < (Summary)
4659 @kindex A < (Summary)
4660 @findex gnus-summary-beginning-of-article
4661 Scroll to the beginning of the article
4662 (@code{gnus-summary-beginning-of-article}).
4663
4664 @item A >
4665 @itemx >
4666 @kindex > (Summary)
4667 @kindex A > (Summary)
4668 @findex gnus-summary-end-of-article
4669 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
4670
4671 @item A s
4672 @itemx s
4673 @kindex A s (Summary)
4674 @kindex s (Summary)
4675 @findex gnus-summary-isearch-article
4676 Perform an isearch in the article buffer
4677 (@code{gnus-summary-isearch-article}).
4678
4679 @item h
4680 @kindex h (Summary)
4681 @findex gnus-summary-select-article-buffer
4682 Select the article buffer (@code{gnus-summary-select-article-buffer}).
4683
4684 @end table
4685
4686
4687 @node Reply Followup and Post
4688 @section Reply, Followup and Post
4689
4690 @menu
4691 * Summary Mail Commands::       Sending mail.
4692 * Summary Post Commands::       Sending news.
4693 * Summary Message Commands::    Other Message-related commands.
4694 * Canceling and Superseding::   
4695 @end menu
4696
4697
4698 @node Summary Mail Commands
4699 @subsection Summary Mail Commands
4700 @cindex mail
4701 @cindex composing mail
4702
4703 Commands for composing a mail message:
4704
4705 @table @kbd
4706
4707 @item S r
4708 @itemx r
4709 @kindex S r (Summary)
4710 @kindex r (Summary)
4711 @findex gnus-summary-reply
4712 @c @icon{gnus-summary-mail-reply}
4713 @c @icon{gnus-summary-reply}
4714 Mail a reply to the author of the current article
4715 (@code{gnus-summary-reply}).
4716
4717 @item S R
4718 @itemx R
4719 @kindex R (Summary)
4720 @kindex S R (Summary)
4721 @findex gnus-summary-reply-with-original
4722 @c @icon{gnus-summary-reply-with-original}
4723 Mail a reply to the author of the current article and include the
4724 original message (@code{gnus-summary-reply-with-original}).  This
4725 command uses the process/prefix convention.
4726
4727 @item S w
4728 @kindex S w (Summary)
4729 @findex gnus-summary-wide-reply
4730 Mail a wide reply to the author of the current article
4731 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
4732 goes out to all people listed in the @code{To}, @code{From} (or
4733 @code{Reply-to}) and @code{Cc} headers.
4734
4735 @item S W
4736 @kindex S W (Summary)
4737 @findex gnus-summary-wide-reply-with-original
4738 Mail a wide reply to the current article and include the original
4739 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
4740 the process/prefix convention.
4741
4742 @item S v
4743 @kindex S v (Summary)
4744 @findex gnus-summary-very-wide-reply
4745 Mail a very wide reply to the author of the current article
4746 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
4747 that goes out to all people listed in the @code{To}, @code{From} (or
4748 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
4749 articles.  This command uses the process/prefix convention.
4750
4751 @item S o m
4752 @itemx C-c C-f
4753 @kindex S o m (Summary)
4754 @kindex C-c C-f (Summary)
4755 @findex gnus-summary-mail-forward
4756 @c @icon{gnus-summary-mail-forward}
4757 Forward the current article to some other person
4758 (@code{gnus-summary-mail-forward}).  If given a prefix, include the full
4759 headers of the forwarded article.
4760
4761 @item S m
4762 @itemx m
4763 @kindex m (Summary)
4764 @kindex S m (Summary)
4765 @findex gnus-summary-mail-other-window
4766 @c @icon{gnus-summary-mail-originate}
4767 Send a mail to some other person
4768 (@code{gnus-summary-mail-other-window}).
4769
4770 @item S D b
4771 @kindex S D b (Summary)
4772 @findex gnus-summary-resend-bounced-mail
4773 @cindex bouncing mail
4774 If you have sent a mail, but the mail was bounced back to you for some
4775 reason (wrong address, transient failure), you can use this command to
4776 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
4777 will be popped into a mail buffer where you can edit the headers before
4778 sending the mail off again.  If you give a prefix to this command, and
4779 the bounced mail is a reply to some other mail, gnus will try to fetch
4780 that mail and display it for easy perusal of its headers.  This might
4781 very well fail, though.
4782
4783 @item S D r
4784 @kindex S D r (Summary)
4785 @findex gnus-summary-resend-message
4786 Not to be confused with the previous command,
4787 @code{gnus-summary-resend-message} will prompt you for an address to
4788 send the current message off to, and then send it to that place.  The
4789 headers of the message won't be altered---but lots of headers that say
4790 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
4791 means that you actually send a mail to someone that has a @code{To}
4792 header that (probably) points to yourself.  This will confuse people.
4793 So, natcherly you'll only do that if you're really eVIl.
4794
4795 This command is mainly used if you have several accounts and want to
4796 ship a mail to a different account of yours.  (If you're both
4797 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
4798 to the @code{root} account, you may want to resend it to
4799 @code{postmaster}.  Ordnung muß sein!
4800
4801 This command understands the process/prefix convention
4802 (@pxref{Process/Prefix}).
4803
4804 @item S O m
4805 @kindex S O m (Summary)
4806 @findex gnus-summary-digest-mail-forward
4807 Digest the current series (@pxref{Decoding Articles}) and forward the
4808 result using mail (@code{gnus-summary-digest-mail-forward}).  This
4809 command uses the process/prefix convention (@pxref{Process/Prefix}).
4810
4811 @item S M-c
4812 @kindex S M-c (Summary)
4813 @findex gnus-summary-mail-crosspost-complaint
4814 @cindex crossposting
4815 @cindex excessive crossposting
4816 Send a complaint about excessive crossposting to the author of the
4817 current article (@code{gnus-summary-mail-crosspost-complaint}).
4818
4819 @findex gnus-crosspost-complaint
4820 This command is provided as a way to fight back against the current
4821 crossposting pandemic that's sweeping Usenet.  It will compose a reply
4822 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
4823 command understands the process/prefix convention
4824 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
4825
4826 @end table
4827
4828 Also @pxref{(message)Header Commands} for more information.
4829
4830
4831 @node Summary Post Commands
4832 @subsection Summary Post Commands
4833 @cindex post
4834 @cindex composing news
4835
4836 Commands for posting a news article:
4837
4838 @table @kbd
4839 @item S p
4840 @itemx a
4841 @kindex a (Summary)
4842 @kindex S p (Summary)
4843 @findex gnus-summary-post-news
4844 @c @icon{gnus-summary-post-news}
4845 Post an article to the current group
4846 (@code{gnus-summary-post-news}).
4847
4848 @item S f
4849 @itemx f
4850 @kindex f (Summary)
4851 @kindex S f (Summary)
4852 @findex gnus-summary-followup
4853 @c @icon{gnus-summary-followup}
4854 Post a followup to the current article (@code{gnus-summary-followup}).
4855
4856 @item S F
4857 @itemx F
4858 @kindex S F (Summary)
4859 @kindex F (Summary)
4860 @c @icon{gnus-summary-followup-with-original}
4861 @findex gnus-summary-followup-with-original
4862 Post a followup to the current article and include the original message
4863 (@code{gnus-summary-followup-with-original}).   This command uses the
4864 process/prefix convention.
4865
4866 @item S n
4867 @kindex S n (Summary)
4868 @findex gnus-summary-followup-to-mail
4869 Post a followup to the current article via news, even if you got the
4870 message through mail (@code{gnus-summary-followup-to-mail}).
4871
4872 @item S N
4873 @kindex S N (Summary)
4874 @findex gnus-summary-followup-to-mail-with-original
4875 Post a followup to the current article via news, even if you got the
4876 message through mail and include the original message
4877 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
4878 the process/prefix convention.
4879
4880 @item S o p
4881 @kindex S o p (Summary)
4882 @findex gnus-summary-post-forward
4883 Forward the current article to a newsgroup
4884 (@code{gnus-summary-post-forward}).  If given a prefix, include the full
4885 headers of the forwarded article.
4886
4887 @item S O p
4888 @kindex S O p (Summary)
4889 @findex gnus-summary-digest-post-forward
4890 @cindex digests
4891 @cindex making digests
4892 Digest the current series and forward the result to a newsgroup
4893 (@code{gnus-summary-digest-post-forward}).  This command uses the
4894 process/prefix convention.
4895
4896 @item S u
4897 @kindex S u (Summary)
4898 @findex gnus-uu-post-news
4899 @c @icon{gnus-uu-post-news}
4900 Uuencode a file, split it into parts, and post it as a series
4901 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
4902 @end table
4903
4904 Also @pxref{(message)Header Commands} for more information.
4905
4906
4907 @node Summary Message Commands
4908 @subsection Summary Message Commands
4909
4910 @table @kbd
4911 @item S y
4912 @kindex S y (Summary)
4913 @findex gnus-summary-yank-message
4914 Yank the current article into an already existing Message composition
4915 buffer (@code{gnus-summary-yank-message}).  This command prompts for
4916 what message buffer you want to yank into, and understands the
4917 process/prefix convention (@pxref{Process/Prefix}).
4918
4919 @end table
4920
4921
4922 @node Canceling and Superseding
4923 @subsection Canceling Articles
4924 @cindex canceling articles
4925 @cindex superseding articles
4926
4927 Have you ever written something, and then decided that you really,
4928 really, really wish you hadn't posted that?
4929
4930 Well, you can't cancel mail, but you can cancel posts.
4931
4932 @findex gnus-summary-cancel-article
4933 @kindex C (Summary)
4934 @c @icon{gnus-summary-cancel-article}
4935 Find the article you wish to cancel (you can only cancel your own
4936 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
4937 c} (@code{gnus-summary-cancel-article}).  Your article will be
4938 canceled---machines all over the world will be deleting your article.
4939 This command uses the process/prefix convention (@pxref{Process/Prefix}).
4940
4941 Be aware, however, that not all sites honor cancels, so your article may
4942 live on here and there, while most sites will delete the article in
4943 question.
4944
4945 Gnus will use the ``current'' select method when canceling.  If you
4946 want to use the standard posting method, use the @samp{a} symbolic
4947 prefix (@pxref{Symbolic Prefixes}).
4948
4949 If you discover that you have made some mistakes and want to do some
4950 corrections, you can post a @dfn{superseding} article that will replace
4951 your original article.
4952
4953 @findex gnus-summary-supersede-article
4954 @kindex S (Summary)
4955 Go to the original article and press @kbd{S s}
4956 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
4957 where you can edit the article all you want before sending it off the
4958 usual way.
4959
4960 The same goes for superseding as for canceling, only more so: Some
4961 sites do not honor superseding.  On those sites, it will appear that you
4962 have posted almost the same article twice.
4963
4964 If you have just posted the article, and change your mind right away,
4965 there is a trick you can use to cancel/supersede the article without
4966 waiting for the article to appear on your site first.  You simply return
4967 to the post buffer (which is called @code{*sent ...*}).  There you will
4968 find the article you just posted, with all the headers intact.  Change
4969 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
4970 header by substituting one of those words for the word
4971 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
4972 you would do normally.  The previous article will be
4973 canceled/superseded.
4974
4975 Just remember, kids: There is no 'c' in 'supersede'.
4976
4977 @node Delayed Articles
4978 @section Delayed Articles
4979 @cindex delayed sending
4980 @cindex send delayed
4981
4982 Sometimes, you might wish to delay the sending of a message.  For
4983 example, you might wish to arrange for a message to turn up just in time
4984 to remind your about the birthday of your Significant Other.  For this,
4985 there is the @code{gnus-delay} package.  Setup is simple:
4986
4987 @lisp
4988 (gnus-delay-initialize)
4989 @end lisp
4990
4991 @findex gnus-delay-article
4992 Normally, to send a message you use the @kbd{C-c C-c} command from
4993 Message mode.  To delay a message, use @kbd{C-c C-j}
4994 (@code{gnus-delay-article}) instead.  This will ask you for how long the
4995 message should be delayed.  Possible answers are:
4996
4997 @itemize
4998 @item
4999 A time span.  Consists of an integer and a letter.  For example,
5000 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5001 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5002 (months) and @code{Y} (years).
5003
5004 @item
5005 A specific date.  Looks like @code{YYYYY-MM-DD}.  The message will be
5006 delayed until that day, at a specific time (eight o'clock by default).
5007 See also @code{gnus-delay-default-hour}.
5008
5009 @item
5010 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5011 stuff.  The deadline will be at that time today, except if that time has
5012 already passed, then it's at the given time tomorrow.  So if it's ten
5013 o'clock in the morning and you specify @code{11:15}, then the deadline
5014 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5015 that means a time tomorrow.
5016 @end itemize
5017
5018 The action of the @code{gnus-delay-article} command is influenced by a
5019 couple of variables:
5020
5021 @table @code
5022 @item gnus-delay-default-hour
5023 @vindex gnus-delay-default-hour
5024 When you specify a specific date, the message will be due on that hour
5025 on the given date.  Possible values are integers 0 through 23.
5026
5027 @item gnus-delay-default-delay
5028 @vindex gnus-delay-default-delay
5029 This is a string and gives the default delay.  It can be of any of the
5030 formats described above.
5031
5032 @item gnus-delay-group
5033 @vindex gnus-delay-group
5034 Delayed articles will be kept in this group on the drafts server until
5035 they are due.  You probably don't need to change this.  The default
5036 value is @code{"delayed"}.
5037
5038 @item gnus-delay-header
5039 @vindex gnus-delay-header
5040 The deadline for each article will be stored in a header.  This variable
5041 is a string and gives the header name.  You probably don't need to
5042 change this.  The default value is @code{"X-Gnus-Delayed"}.
5043 @end table
5044
5045 The way delaying works is like this: when you use the
5046 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5047 calculates the deadline of the message and stores it in the
5048 @code{X-Gnus-Delayed} header and puts the message in the
5049 @code{nndraft:delayed} group.
5050
5051 And whenever you get new news, Gnus looks through the group for articles
5052 which are due and sends them.  It uses the @code{gnus-delay-send-drafts}
5053 function for this.  By default, this function is added to the hook
5054 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5055 Maybe you want to use the demon to send drafts?  Just tell the demon to
5056 execute the @code{gnus-delay-send-drafts} function.
5057
5058 @table @code
5059 @item gnus-delay-initialize
5060 @findex gnus-delay-initialize
5061 By default, this function installs the @kbd{C-c C-j} key binding in
5062 Message mode and @code{gnus-delay-send-drafts} in
5063 @code{gnus-get-new-news-hook}.  But it accepts two optional arguments,
5064 @code{no-keymap} and @code{no-check}.  If @code{no-keymap} is non-nil,
5065 the @kbd{C-c C-j} binding is not intalled.  If @code{no-check} is
5066 non-nil, @code{gnus-get-new-news-hook} is not changed.
5067
5068 For example, @code{(gnus-delay-initialize nil t)} means to change the
5069 keymap but not to change @code{gnus-get-new-news-hook}.  Presumably, you
5070 want to use the demon for sending due delayed articles.  Just don't
5071 forget to set that up :-)
5072 @end table
5073
5074
5075 @node Marking Articles
5076 @section Marking Articles
5077 @cindex article marking
5078 @cindex article ticking
5079 @cindex marks
5080
5081 There are several marks you can set on an article.
5082
5083 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5084 neologism ohoy!) of the article.  Alphabetic marks generally mean
5085 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5086
5087 In addition, you also have marks that do not affect readedness.
5088
5089 @menu
5090 * Unread Articles::             Marks for unread articles.
5091 * Read Articles::               Marks for read articles.
5092 * Other Marks::                 Marks that do not affect readedness.
5093 @end menu
5094
5095 @ifinfo
5096 There's a plethora of commands for manipulating these marks:
5097 @end ifinfo
5098
5099 @menu
5100 * Setting Marks::             How to set and remove marks.
5101 * Generic Marking Commands::  How to customize the marking.
5102 * Setting Process Marks::     How to mark articles for later processing.
5103 @end menu
5104
5105
5106 @node Unread Articles
5107 @subsection Unread Articles
5108
5109 The following marks mark articles as (kinda) unread, in one form or
5110 other.
5111
5112 @table @samp
5113 @item !
5114 @vindex gnus-ticked-mark
5115 Marked as ticked (@code{gnus-ticked-mark}).
5116
5117 @dfn{Ticked articles} are articles that will remain visible always.  If
5118 you see an article that you find interesting, or you want to put off
5119 reading it, or replying to it, until sometime later, you'd typically
5120 tick it.  However, articles can be expired (from news servers by the
5121 news server software, Gnus itself never expires ticked messages), so if
5122 you want to keep an article forever, you'll have to make it persistent
5123 (@pxref{Persistent Articles}).
5124
5125 @item ?
5126 @vindex gnus-dormant-mark
5127 Marked as dormant (@code{gnus-dormant-mark}).
5128
5129 @dfn{Dormant articles} will only appear in the summary buffer if there
5130 are followups to it.  If you want to see them even if they don't have
5131 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5132 Otherwise (except for the visibility issue), they are just like ticked
5133 messages.
5134
5135 @item SPACE
5136 @vindex gnus-unread-mark
5137 Marked as unread (@code{gnus-unread-mark}).
5138
5139 @dfn{Unread articles} are articles that haven't been read at all yet.
5140 @end table
5141
5142
5143 @node Read Articles
5144 @subsection Read Articles
5145 @cindex expirable mark
5146
5147 All the following marks mark articles as read.
5148
5149 @table @samp
5150
5151 @item r
5152 @vindex gnus-del-mark
5153 These are articles that the user has marked as read with the @kbd{d}
5154 command manually, more or less (@code{gnus-del-mark}).
5155
5156 @item R
5157 @vindex gnus-read-mark
5158 Articles that have actually been read (@code{gnus-read-mark}).
5159
5160 @item O
5161 @vindex gnus-ancient-mark
5162 Articles that were marked as read in previous sessions and are now
5163 @dfn{old} (@code{gnus-ancient-mark}).
5164
5165 @item K
5166 @vindex gnus-killed-mark
5167 Marked as killed (@code{gnus-killed-mark}).
5168
5169 @item X
5170 @vindex gnus-kill-file-mark
5171 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5172
5173 @item Y
5174 @vindex gnus-low-score-mark
5175 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5176
5177 @item C
5178 @vindex gnus-catchup-mark
5179 Marked as read by a catchup (@code{gnus-catchup-mark}).
5180
5181 @item G
5182 @vindex gnus-canceled-mark
5183 Canceled article (@code{gnus-canceled-mark})
5184
5185 @item F
5186 @vindex gnus-souped-mark
5187 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5188
5189 @item Q
5190 @vindex gnus-sparse-mark
5191 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5192 Threading}.
5193
5194 @item M
5195 @vindex gnus-duplicate-mark
5196 Article marked as read by duplicate suppression
5197 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5198
5199 @end table
5200
5201 All these marks just mean that the article is marked as read, really.
5202 They are interpreted differently when doing adaptive scoring, though.
5203
5204 One more special mark, though:
5205
5206 @table @samp
5207 @item E
5208 @vindex gnus-expirable-mark
5209 Marked as expirable (@code{gnus-expirable-mark}).
5210
5211 Marking articles as @dfn{expirable} (or have them marked as such
5212 automatically) doesn't make much sense in normal groups---a user doesn't
5213 control expiring of news articles, but in mail groups, for instance,
5214 articles marked as @dfn{expirable} can be deleted by gnus at
5215 any time.
5216 @end table
5217
5218
5219 @node Other Marks
5220 @subsection Other Marks
5221 @cindex process mark
5222 @cindex bookmarks
5223
5224 There are some marks that have nothing to do with whether the article is
5225 read or not.
5226
5227 @itemize @bullet
5228
5229 @item
5230 You can set a bookmark in the current article.  Say you are reading a
5231 long thesis on cats' urinary tracts, and have to go home for dinner
5232 before you've finished reading the thesis.  You can then set a bookmark
5233 in the article, and gnus will jump to this bookmark the next time it
5234 encounters the article.  @xref{Setting Marks}.
5235
5236 @item
5237 @vindex gnus-replied-mark
5238 All articles that you have replied to or made a followup to (i.e., have
5239 answered) will be marked with an @samp{A} in the second column
5240 (@code{gnus-replied-mark}).
5241
5242 @vindex gnus-forwarded-mark
5243 All articles that you have forwarded will be marked with an @samp{F} in
5244 the second column (@code{gnus-forwarded-mark}).
5245
5246 @vindex gnus-recent-mark
5247 Articles that are ``recently'' arrived in the group will be marked
5248 with an @samp{N} in the second column (@code{gnus-recent-mark}).  Most
5249 backend doesn't support the mark, in which case it's not shown.
5250
5251 @item
5252 @vindex gnus-cached-mark
5253 Articles stored in the article cache will be marked with an @samp{*} in
5254 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5255
5256 @item
5257 @vindex gnus-saved-mark
5258 Articles ``saved'' (in some manner or other; not necessarily
5259 religiously) are marked with an @samp{S} in the second column
5260 (@code{gnus-saved-mark}).
5261
5262 @item
5263 @vindex gnus-unseen-mark
5264 Articles that haven't been seen by the user before are marked with a
5265 @samp{.} in the second column (@code{gnus-unseen-mark}). 
5266
5267 @item
5268 @vindex gnus-not-empty-thread-mark
5269 @vindex gnus-empty-thread-mark
5270 If the @samp{%e} spec is used, the presence of threads or not will be
5271 marked with @code{gnus-not-empty-thread-mark} and
5272 @code{gnus-empty-thread-mark} in the third column, respectively.
5273
5274 @item
5275 @vindex gnus-process-mark
5276 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5277 variety of commands react to the presence of the process mark.  For
5278 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5279 all articles that have been marked with the process mark.  Articles
5280 marked with the process mark have a @samp{#} in the second column.
5281
5282 @end itemize
5283
5284 You might have noticed that most of these ``non-readedness'' marks
5285 appear in the second column by default.  So if you have a cached, saved,
5286 replied article that you have process-marked, what will that look like?
5287
5288 Nothing much.  The precedence rules go as follows: process -> cache ->
5289 replied -> saved.  So if the article is in the cache and is replied,
5290 you'll only see the cache mark and not the replied mark.
5291
5292
5293 @node Setting Marks
5294 @subsection Setting Marks
5295 @cindex setting marks
5296
5297 All the marking commands understand the numeric prefix.
5298
5299 @table @kbd
5300 @item M c
5301 @itemx M-u
5302 @kindex M c (Summary)
5303 @kindex M-u (Summary)
5304 @findex gnus-summary-clear-mark-forward
5305 @cindex mark as unread
5306 Clear all readedness-marks from the current article
5307 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5308 article as unread.
5309
5310 @item M t
5311 @itemx !
5312 @kindex ! (Summary)
5313 @kindex M t (Summary)
5314 @findex gnus-summary-tick-article-forward
5315 Tick the current article (@code{gnus-summary-tick-article-forward}).
5316 @xref{Article Caching}.
5317
5318 @item M ?
5319 @itemx ?
5320 @kindex ? (Summary)
5321 @kindex M ? (Summary)
5322 @findex gnus-summary-mark-as-dormant
5323 Mark the current article as dormant
5324 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5325
5326 @item M d
5327 @itemx d
5328 @kindex M d (Summary)
5329 @kindex d (Summary)
5330 @findex gnus-summary-mark-as-read-forward
5331 Mark the current article as read
5332 (@code{gnus-summary-mark-as-read-forward}).
5333
5334 @item D
5335 @kindex D (Summary)
5336 @findex gnus-summary-mark-as-read-backward
5337 Mark the current article as read and move point to the previous line
5338 (@code{gnus-summary-mark-as-read-backward}).
5339
5340 @item M k
5341 @itemx k
5342 @kindex k (Summary)
5343 @kindex M k (Summary)
5344 @findex gnus-summary-kill-same-subject-and-select
5345 Mark all articles that have the same subject as the current one as read,
5346 and then select the next unread article
5347 (@code{gnus-summary-kill-same-subject-and-select}).
5348
5349 @item M K
5350 @itemx C-k
5351 @kindex M K (Summary)
5352 @kindex C-k (Summary)
5353 @findex gnus-summary-kill-same-subject
5354 Mark all articles that have the same subject as the current one as read
5355 (@code{gnus-summary-kill-same-subject}).
5356
5357 @item M C
5358 @kindex M C (Summary)
5359 @findex gnus-summary-catchup
5360 @c @icon{gnus-summary-catchup}
5361 Mark all unread articles as read (@code{gnus-summary-catchup}).
5362
5363 @item M C-c
5364 @kindex M C-c (Summary)
5365 @findex gnus-summary-catchup-all
5366 Mark all articles in the group as read---even the ticked and dormant
5367 articles (@code{gnus-summary-catchup-all}).
5368
5369 @item M H
5370 @kindex M H (Summary)
5371 @findex gnus-summary-catchup-to-here
5372 Catchup the current group to point (before the point)
5373 (@code{gnus-summary-catchup-to-here}).
5374
5375 @item M h
5376 @kindex M h (Summary)
5377 @findex gnus-summary-catchup-from-here
5378 Catchup the current group from point (after the point)
5379 (@code{gnus-summary-catchup-from-here}).
5380
5381 @item C-w
5382 @kindex C-w (Summary)
5383 @findex gnus-summary-mark-region-as-read
5384 Mark all articles between point and mark as read
5385 (@code{gnus-summary-mark-region-as-read}).
5386
5387 @item M V k
5388 @kindex M V k (Summary)
5389 @findex gnus-summary-kill-below
5390 Kill all articles with scores below the default score (or below the
5391 numeric prefix) (@code{gnus-summary-kill-below}).
5392
5393 @item M e
5394 @itemx E
5395 @kindex M e (Summary)
5396 @kindex E (Summary)
5397 @findex gnus-summary-mark-as-expirable
5398 Mark the current article as expirable
5399 (@code{gnus-summary-mark-as-expirable}).
5400
5401 @item M b
5402 @kindex M b (Summary)
5403 @findex gnus-summary-set-bookmark
5404 Set a bookmark in the current article
5405 (@code{gnus-summary-set-bookmark}).
5406
5407 @item M B
5408 @kindex M B (Summary)
5409 @findex gnus-summary-remove-bookmark
5410 Remove the bookmark from the current article
5411 (@code{gnus-summary-remove-bookmark}).
5412
5413 @item M V c
5414 @kindex M V c (Summary)
5415 @findex gnus-summary-clear-above
5416 Clear all marks from articles with scores over the default score (or
5417 over the numeric prefix) (@code{gnus-summary-clear-above}).
5418
5419 @item M V u
5420 @kindex M V u (Summary)
5421 @findex gnus-summary-tick-above
5422 Tick all articles with scores over the default score (or over the
5423 numeric prefix) (@code{gnus-summary-tick-above}).
5424
5425 @item M V m
5426 @kindex M V m (Summary)
5427 @findex gnus-summary-mark-above
5428 Prompt for a mark, and mark all articles with scores over the default
5429 score (or over the numeric prefix) with this mark
5430 (@code{gnus-summary-clear-above}).
5431 @end table
5432
5433 @vindex gnus-summary-goto-unread
5434 The @code{gnus-summary-goto-unread} variable controls what action should
5435 be taken after setting a mark.  If non-@code{nil}, point will move to
5436 the next/previous unread article.  If @code{nil}, point will just move
5437 one line up or down.  As a special case, if this variable is
5438 @code{never}, all the marking commands as well as other commands (like
5439 @kbd{SPACE}) will move to the next article, whether it is unread or not.
5440 The default is @code{t}.
5441
5442
5443 @node Generic Marking Commands
5444 @subsection Generic Marking Commands
5445
5446 Some people would like the command that ticks an article (@kbd{!}) go to
5447 the next article.  Others would like it to go to the next unread
5448 article.  Yet others would like it to stay on the current article.  And
5449 even though I haven't heard of anybody wanting it to go to the
5450 previous (unread) article, I'm sure there are people that want that as
5451 well.
5452
5453 Multiply these five behaviors with five different marking commands, and
5454 you get a potentially complex set of variable to control what each
5455 command should do.
5456
5457 To sidestep that mess, Gnus provides commands that do all these
5458 different things.  They can be found on the @kbd{M M} map in the summary
5459 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
5460 to list in this manual.
5461
5462 While you can use these commands directly, most users would prefer
5463 altering the summary mode keymap.  For instance, if you would like the
5464 @kbd{!} command to go to the next article instead of the next unread
5465 article, you could say something like:
5466
5467 @lisp
5468 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
5469 (defun my-alter-summary-map ()
5470   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
5471 @end lisp
5472
5473 or
5474
5475 @lisp
5476 (defun my-alter-summary-map ()
5477   (local-set-key "!" "MM!n"))
5478 @end lisp
5479
5480
5481 @node Setting Process Marks
5482 @subsection Setting Process Marks
5483 @cindex setting process marks
5484
5485 @table @kbd
5486
5487 @item M P p
5488 @itemx #
5489 @kindex # (Summary)
5490 @kindex M P p (Summary)
5491 @findex gnus-summary-mark-as-processable
5492 Mark the current article with the process mark
5493 (@code{gnus-summary-mark-as-processable}).
5494 @findex gnus-summary-unmark-as-processable
5495
5496 @item M P u
5497 @itemx M-#
5498 @kindex M P u (Summary)
5499 @kindex M-# (Summary)
5500 Remove the process mark, if any, from the current article
5501 (@code{gnus-summary-unmark-as-processable}).
5502
5503 @item M P U
5504 @kindex M P U (Summary)
5505 @findex gnus-summary-unmark-all-processable
5506 Remove the process mark from all articles
5507 (@code{gnus-summary-unmark-all-processable}).
5508
5509 @item M P i
5510 @kindex M P i (Summary)
5511 @findex gnus-uu-invert-processable
5512 Invert the list of process marked articles
5513 (@code{gnus-uu-invert-processable}).
5514
5515 @item M P R
5516 @kindex M P R (Summary)
5517 @findex gnus-uu-mark-by-regexp
5518 Mark articles that have a @code{Subject} header that matches a regular
5519 expression (@code{gnus-uu-mark-by-regexp}).
5520
5521 @item M P G
5522 @kindex M P G (Summary)
5523 @findex gnus-uu-unmark-by-regexp
5524 Unmark articles that have a @code{Subject} header that matches a regular
5525 expression (@code{gnus-uu-unmark-by-regexp}).
5526
5527 @item M P r
5528 @kindex M P r (Summary)
5529 @findex gnus-uu-mark-region
5530 Mark articles in region (@code{gnus-uu-mark-region}).
5531
5532 @item M P t
5533 @kindex M P t (Summary)
5534 @findex gnus-uu-mark-thread
5535 Mark all articles in the current (sub)thread
5536 (@code{gnus-uu-mark-thread}).
5537
5538 @item M P T
5539 @kindex M P T (Summary)
5540 @findex gnus-uu-unmark-thread
5541 Unmark all articles in the current (sub)thread
5542 (@code{gnus-uu-unmark-thread}).
5543
5544 @item M P v
5545 @kindex M P v (Summary)
5546 @findex gnus-uu-mark-over
5547 Mark all articles that have a score above the prefix argument
5548 (@code{gnus-uu-mark-over}).
5549
5550 @item M P s
5551 @kindex M P s (Summary)
5552 @findex gnus-uu-mark-series
5553 Mark all articles in the current series (@code{gnus-uu-mark-series}).
5554
5555 @item M P S
5556 @kindex M P S (Summary)
5557 @findex gnus-uu-mark-sparse
5558 Mark all series that have already had some articles marked
5559 (@code{gnus-uu-mark-sparse}).
5560
5561 @item M P a
5562 @kindex M P a (Summary)
5563 @findex gnus-uu-mark-all
5564 Mark all articles in series order (@code{gnus-uu-mark-series}).
5565
5566 @item M P b
5567 @kindex M P b (Summary)
5568 @findex gnus-uu-mark-buffer
5569 Mark all articles in the buffer in the order they appear
5570 (@code{gnus-uu-mark-buffer}).
5571
5572 @item M P k
5573 @kindex M P k (Summary)
5574 @findex gnus-summary-kill-process-mark
5575 Push the current process mark set onto the stack and unmark all articles
5576 (@code{gnus-summary-kill-process-mark}).
5577
5578 @item M P y
5579 @kindex M P y (Summary)
5580 @findex gnus-summary-yank-process-mark
5581 Pop the previous process mark set from the stack and restore it
5582 (@code{gnus-summary-yank-process-mark}).
5583
5584 @item M P w
5585 @kindex M P w (Summary)
5586 @findex gnus-summary-save-process-mark
5587 Push the current process mark set onto the stack
5588 (@code{gnus-summary-save-process-mark}).
5589
5590 @end table
5591
5592 Also see the @kbd{&} command in @pxref{Searching for Articles} for how to
5593 set process marks based on article body contents.
5594
5595
5596 @node Limiting
5597 @section Limiting
5598 @cindex limiting
5599
5600 It can be convenient to limit the summary buffer to just show some
5601 subset of the articles currently in the group.  The effect most limit
5602 commands have is to remove a few (or many) articles from the summary
5603 buffer.
5604
5605 All limiting commands work on subsets of the articles already fetched
5606 from the servers.  None of these commands query the server for
5607 additional articles.
5608
5609 @table @kbd
5610
5611 @item / /
5612 @itemx / s
5613 @kindex / / (Summary)
5614 @findex gnus-summary-limit-to-subject
5615 Limit the summary buffer to articles that match some subject
5616 (@code{gnus-summary-limit-to-subject}).
5617
5618 @item / a
5619 @kindex / a (Summary)
5620 @findex gnus-summary-limit-to-author
5621 Limit the summary buffer to articles that match some author
5622 (@code{gnus-summary-limit-to-author}).
5623
5624 @item / x
5625 @kindex / x (Summary)
5626 @findex gnus-summary-limit-to-extra
5627 Limit the summary buffer to articles that match one of the ``extra''
5628 headers (@pxref{To From Newsgroups})
5629 (@code{gnus-summary-limit-to-extra}).
5630
5631 @item / u
5632 @itemx x
5633 @kindex / u (Summary)
5634 @kindex x (Summary)
5635 @findex gnus-summary-limit-to-unread
5636 Limit the summary buffer to articles not marked as read
5637 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
5638 buffer to articles strictly unread.  This means that ticked and
5639 dormant articles will also be excluded.
5640
5641 @item / m
5642 @kindex / m (Summary)
5643 @findex gnus-summary-limit-to-marks
5644 Ask for a mark and then limit to all articles that have been marked
5645 with that mark (@code{gnus-summary-limit-to-marks}).
5646
5647 @item / t
5648 @kindex / t (Summary)
5649 @findex gnus-summary-limit-to-age
5650 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
5651 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
5652 articles younger than that number of days.
5653
5654 @item / n
5655 @kindex / n (Summary)
5656 @findex gnus-summary-limit-to-articles
5657 Limit the summary buffer to the current article
5658 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
5659 convention (@pxref{Process/Prefix}).
5660
5661 @item / w
5662 @kindex / w (Summary)
5663 @findex gnus-summary-pop-limit
5664 Pop the previous limit off the stack and restore it
5665 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
5666 the stack.
5667
5668 @item / v
5669 @kindex / v (Summary)
5670 @findex gnus-summary-limit-to-score
5671 Limit the summary buffer to articles that have a score at or above some
5672 score (@code{gnus-summary-limit-to-score}).
5673
5674 @item / E
5675 @itemx M S
5676 @kindex M S (Summary)
5677 @kindex / E (Summary)
5678 @findex gnus-summary-limit-include-expunged
5679 Include all expunged articles in the limit
5680 (@code{gnus-summary-limit-include-expunged}).
5681
5682 @item / D
5683 @kindex / D (Summary)
5684 @findex gnus-summary-limit-include-dormant
5685 Include all dormant articles in the limit
5686 (@code{gnus-summary-limit-include-dormant}).
5687
5688 @item / *
5689 @kindex / * (Summary)
5690 @findex gnus-summary-limit-include-cached
5691 Include all cached articles in the limit
5692 (@code{gnus-summary-limit-include-cached}).
5693
5694 @item / d
5695 @kindex / d (Summary)
5696 @findex gnus-summary-limit-exclude-dormant
5697 Exclude all dormant articles from the limit
5698 (@code{gnus-summary-limit-exclude-dormant}).
5699
5700 @item / M
5701 @kindex / M (Summary)
5702 @findex gnus-summary-limit-exclude-marks
5703 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
5704
5705 @item / T
5706 @kindex / T (Summary)
5707 @findex gnus-summary-limit-include-thread
5708 Include all the articles in the current thread in the limit.
5709
5710 @item / c
5711 @kindex / c (Summary)
5712 @findex gnus-summary-limit-exclude-childless-dormant
5713 Exclude all dormant articles that have no children from the limit
5714 (@code{gnus-summary-limit-exclude-childless-dormant}).
5715
5716 @item / C
5717 @kindex / C (Summary)
5718 @findex gnus-summary-limit-mark-excluded-as-read
5719 Mark all excluded unread articles as read
5720 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
5721 also mark excluded ticked and dormant articles as read.
5722
5723 @end table
5724
5725
5726 @node Threading
5727 @section Threading
5728 @cindex threading
5729 @cindex article threading
5730
5731 Gnus threads articles by default.  @dfn{To thread} is to put responses
5732 to articles directly after the articles they respond to---in a
5733 hierarchical fashion.
5734
5735 Threading is done by looking at the @code{References} headers of the
5736 articles.  In a perfect world, this would be enough to build pretty
5737 trees, but unfortunately, the @code{References} header is often broken
5738 or simply missing.  Weird news propagation exacerbates the problem,
5739 so one has to employ other heuristics to get pleasing results.  A
5740 plethora of approaches exists, as detailed in horrible detail in
5741 @pxref{Customizing Threading}.
5742
5743 First, a quick overview of the concepts:
5744
5745 @table @dfn
5746 @item root
5747 The top-most article in a thread; the first article in the thread.
5748
5749 @item thread
5750 A tree-like article structure.
5751
5752 @item sub-thread
5753 A small(er) section of this tree-like structure.
5754
5755 @item loose threads
5756 Threads often lose their roots due to article expiry, or due to the root
5757 already having been read in a previous session, and not displayed in the
5758 summary buffer.  We then typically have many sub-threads that really
5759 belong to one thread, but are without connecting roots.  These are
5760 called loose threads.
5761
5762 @item thread gathering
5763 An attempt to gather loose threads into bigger threads.
5764
5765 @item sparse threads
5766 A thread where the missing articles have been ``guessed'' at, and are
5767 displayed as empty lines in the summary buffer.
5768
5769 @end table
5770
5771
5772 @menu
5773 * Customizing Threading::       Variables you can change to affect the threading.
5774 * Thread Commands::             Thread based commands in the summary buffer.
5775 @end menu
5776
5777
5778 @node Customizing Threading
5779 @subsection Customizing Threading
5780 @cindex customizing threading
5781
5782 @menu
5783 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
5784 * Filling In Threads::          Making the threads displayed look fuller.
5785 * More Threading::              Even more variables for fiddling with threads.
5786 * Low-Level Threading::         You thought it was over... but you were wrong!
5787 @end menu
5788
5789
5790 @node Loose Threads
5791 @subsubsection Loose Threads
5792 @cindex <
5793 @cindex >
5794 @cindex loose threads
5795
5796 @table @code
5797 @item gnus-summary-make-false-root
5798 @vindex gnus-summary-make-false-root
5799 If non-@code{nil}, gnus will gather all loose subtrees into one big tree
5800 and create a dummy root at the top.  (Wait a minute.  Root at the top?
5801 Yup.)  Loose subtrees occur when the real root has expired, or you've
5802 read or killed the root in a previous session.
5803
5804 When there is no real root of a thread, gnus will have to fudge
5805 something.  This variable says what fudging method gnus should use.
5806 There are four possible values:
5807
5808 @iftex
5809 @iflatex
5810 \gnusfigure{The Summary Buffer}{390}{
5811 \put(0,0){\epsfig{figure=tmp/summary-adopt.ps,width=7.5cm}}
5812 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=tmp/summary-empty.ps,width=7.5cm}}}
5813 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=tmp/summary-none.ps,width=7.5cm}}}
5814 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=tmp/summary-dummy.ps,width=7.5cm}}}
5815 }
5816 @end iflatex
5817 @end iftex
5818
5819 @cindex adopting articles
5820
5821 @table @code
5822
5823 @item adopt
5824 Gnus will make the first of the orphaned articles the parent.  This
5825 parent will adopt all the other articles.  The adopted articles will be
5826 marked as such by pointy brackets (@samp{<>}) instead of the standard
5827 square brackets (@samp{[]}).  This is the default method.
5828
5829 @item dummy
5830 @vindex gnus-summary-dummy-line-format
5831 Gnus will create a dummy summary line that will pretend to be the
5832 parent.  This dummy line does not correspond to any real article, so
5833 selecting it will just select the first real article after the dummy
5834 article.  @code{gnus-summary-dummy-line-format} is used to specify the
5835 format of the dummy roots.  It accepts only one format spec:  @samp{S},
5836 which is the subject of the article.  @xref{Formatting Variables}.
5837
5838 @item empty
5839 Gnus won't actually make any article the parent, but simply leave the
5840 subject field of all orphans except the first empty.  (Actually, it will
5841 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
5842 Buffer Format}).)
5843
5844 @item none
5845 Don't make any article parent at all.  Just gather the threads and
5846 display them after one another.
5847
5848 @item nil
5849 Don't gather loose threads.
5850 @end table
5851
5852 @item gnus-summary-gather-subject-limit
5853 @vindex gnus-summary-gather-subject-limit
5854 Loose threads are gathered by comparing subjects of articles.  If this
5855 variable is @code{nil}, gnus requires an exact match between the
5856 subjects of the loose threads before gathering them into one big
5857 super-thread.  This might be too strict a requirement, what with the
5858 presence of stupid newsreaders that chop off long subject lines.  If
5859 you think so, set this variable to, say, 20 to require that only the
5860 first 20 characters of the subjects have to match.  If you set this
5861 variable to a really low number, you'll find that gnus will gather
5862 everything in sight into one thread, which isn't very helpful.
5863
5864 @cindex fuzzy article gathering
5865 If you set this variable to the special value @code{fuzzy}, gnus will
5866 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
5867 Matching}).
5868
5869 @item gnus-simplify-subject-fuzzy-regexp
5870 @vindex gnus-simplify-subject-fuzzy-regexp
5871 This can either be a regular expression or list of regular expressions
5872 that match strings that will be removed from subjects if fuzzy subject
5873 simplification is used.
5874
5875 @item gnus-simplify-ignored-prefixes
5876 @vindex gnus-simplify-ignored-prefixes
5877 If you set @code{gnus-summary-gather-subject-limit} to something as low
5878 as 10, you might consider setting this variable to something sensible:
5879
5880 @c Written by Michael Ernst <mernst@cs.rice.edu>
5881 @lisp
5882 (setq gnus-simplify-ignored-prefixes
5883       (concat
5884        "\\`\\[?\\("
5885        (mapconcat
5886         'identity
5887         '("looking"
5888           "wanted" "followup" "summary\\( of\\)?"
5889           "help" "query" "problem" "question"
5890           "answer" "reference" "announce"
5891           "How can I" "How to" "Comparison of"
5892           ;; ...
5893           )
5894         "\\|")
5895        "\\)\\s *\\("
5896        (mapconcat 'identity
5897                   '("for" "for reference" "with" "about")
5898                   "\\|")
5899        "\\)?\\]?:?[ \t]*"))
5900 @end lisp
5901
5902 All words that match this regexp will be removed before comparing two
5903 subjects.
5904
5905 @item gnus-simplify-subject-functions
5906 @vindex gnus-simplify-subject-functions
5907 If non-@code{nil}, this variable overrides
5908 @code{gnus-summary-gather-subject-limit}.  This variable should be a
5909 list of functions to apply to the @code{Subject} string iteratively to
5910 arrive at the simplified version of the string.
5911
5912 Useful functions to put in this list include:
5913
5914 @table @code
5915 @item gnus-simplify-subject-re
5916 @findex gnus-simplify-subject-re
5917 Strip the leading @samp{Re:}.
5918
5919 @item gnus-simplify-subject-fuzzy
5920 @findex gnus-simplify-subject-fuzzy
5921 Simplify fuzzily.
5922
5923 @item gnus-simplify-whitespace
5924 @findex gnus-simplify-whitespace
5925 Remove excessive whitespace.
5926 @end table
5927
5928 You may also write your own functions, of course.
5929
5930
5931 @item gnus-summary-gather-exclude-subject
5932 @vindex gnus-summary-gather-exclude-subject
5933 Since loose thread gathering is done on subjects only, that might lead
5934 to many false hits, especially with certain common subjects like
5935 @samp{} and @samp{(none)}.  To make the situation slightly better,
5936 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
5937 what subjects should be excluded from the gathering process.@*
5938 The default is @samp{^ *$\\|^(none)$}.
5939
5940 @item gnus-summary-thread-gathering-function
5941 @vindex gnus-summary-thread-gathering-function
5942 Gnus gathers threads by looking at @code{Subject} headers.  This means
5943 that totally unrelated articles may end up in the same ``thread'', which
5944 is confusing.  An alternate approach is to look at all the
5945 @code{Message-ID}s in all the @code{References} headers to find matches.
5946 This will ensure that no gathered threads ever include unrelated
5947 articles, but it also means that people who have posted with broken
5948 newsreaders won't be gathered properly.  The choice is yours---plague or
5949 cholera:
5950
5951 @table @code
5952 @item gnus-gather-threads-by-subject
5953 @findex gnus-gather-threads-by-subject
5954 This function is the default gathering function and looks at
5955 @code{Subject}s exclusively.
5956
5957 @item gnus-gather-threads-by-references
5958 @findex gnus-gather-threads-by-references
5959 This function looks at @code{References} headers exclusively.
5960 @end table
5961
5962 If you want to test gathering by @code{References}, you could say
5963 something like:
5964
5965 @lisp
5966 (setq gnus-summary-thread-gathering-function
5967       'gnus-gather-threads-by-references)
5968 @end lisp
5969
5970 @end table
5971
5972
5973 @node Filling In Threads
5974 @subsubsection Filling In Threads
5975
5976 @table @code
5977 @item gnus-fetch-old-headers
5978 @vindex gnus-fetch-old-headers
5979 If non-@code{nil}, gnus will attempt to build old threads by fetching
5980 more old headers---headers to articles marked as read.  If you
5981 would like to display as few summary lines as possible, but still
5982 connect as many loose threads as possible, you should set this variable
5983 to @code{some} or a number.  If you set it to a number, no more than
5984 that number of extra old headers will be fetched.  In either case,
5985 fetching old headers only works if the backend you are using carries
5986 overview files---this would normally be @code{nntp}, @code{nnspool} and
5987 @code{nnml}.  Also remember that if the root of the thread has been
5988 expired by the server, there's not much gnus can do about that.
5989
5990 This variable can also be set to @code{invisible}.  This won't have any
5991 visible effects, but is useful if you use the @kbd{A T} command a lot
5992 (@pxref{Finding the Parent}).
5993
5994 @item gnus-build-sparse-threads
5995 @vindex gnus-build-sparse-threads
5996 Fetching old headers can be slow.  A low-rent similar effect can be
5997 gotten by setting this variable to @code{some}.  Gnus will then look at
5998 the complete @code{References} headers of all articles and try to string
5999 together articles that belong in the same thread.  This will leave
6000 @dfn{gaps} in the threading display where gnus guesses that an article
6001 is missing from the thread.  (These gaps appear like normal summary
6002 lines.  If you select a gap, gnus will try to fetch the article in
6003 question.)  If this variable is @code{t}, gnus will display all these
6004 ``gaps'' without regard for whether they are useful for completing the
6005 thread or not.  Finally, if this variable is @code{more}, gnus won't cut
6006 off sparse leaf nodes that don't lead anywhere.  This variable is
6007 @code{nil} by default.
6008
6009 @item gnus-read-all-available-headers
6010 @vindex gnus-read-all-available-headers
6011 This is a rather obscure variable that few will find useful.  It's
6012 intended for those non-news newsgroups where the backend has to fetch
6013 quite a lot to present the summary buffer, and where it's impossible to
6014 go back to parents of articles.  This is mostly the case in the
6015 web-based groups, like the @code{nnultimate} groups.
6016
6017 If you don't use those, then it's safe to leave this as the default
6018 @code{nil}.  If you want to use this variable, it should be a regexp
6019 that matches the group name, or @code{t} for all groups.
6020
6021 @end table
6022
6023
6024 @node More Threading
6025 @subsubsection More Threading
6026
6027 @table @code
6028 @item gnus-show-threads
6029 @vindex gnus-show-threads
6030 If this variable is @code{nil}, no threading will be done, and all of
6031 the rest of the variables here will have no effect.  Turning threading
6032 off will speed group selection up a bit, but it is sure to make reading
6033 slower and more awkward.
6034
6035 @item gnus-thread-hide-subtree
6036 @vindex gnus-thread-hide-subtree
6037 If non-@code{nil}, all threads will be hidden when the summary buffer is
6038 generated.
6039
6040 @item gnus-thread-expunge-below
6041 @vindex gnus-thread-expunge-below
6042 All threads that have a total score (as defined by
6043 @code{gnus-thread-score-function}) less than this number will be
6044 expunged.  This variable is @code{nil} by default, which means that no
6045 threads are expunged.
6046
6047 @item gnus-thread-hide-killed
6048 @vindex gnus-thread-hide-killed
6049 if you kill a thread and this variable is non-@code{nil}, the subtree
6050 will be hidden.
6051
6052 @item gnus-thread-ignore-subject
6053 @vindex gnus-thread-ignore-subject
6054 Sometimes somebody changes the subject in the middle of a thread.  If
6055 this variable is non-@code{nil}, which is the default, the subject
6056 change is ignored.  If it is @code{nil}, a change in the subject will
6057 result in a new thread.
6058
6059 @item gnus-thread-indent-level
6060 @vindex gnus-thread-indent-level
6061 This is a number that says how much each sub-thread should be indented.
6062 The default is 4.
6063
6064 @item gnus-sort-gathered-threads-function
6065 @vindex gnus-sort-gathered-threads-function
6066 Sometimes, particularly with mailing lists, the order in which mails
6067 arrive locally is not necessarily the same as the order in which they
6068 arrived on the mailing list.  Consequently, when sorting sub-threads
6069 using the default @code{gnus-thread-sort-by-number}, responses can end
6070 up appearing before the article to which they are responding to.
6071 Setting this variable to an alternate value
6072 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6073 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6074 more logical sub-thread ordering in such instances.
6075
6076 @end table
6077
6078
6079 @node Low-Level Threading
6080 @subsubsection Low-Level Threading
6081
6082 @table @code
6083
6084 @item gnus-parse-headers-hook
6085 @vindex gnus-parse-headers-hook
6086 Hook run before parsing any headers.  The default value is
6087 @code{(gnus-set-summary-default-charset)}, which sets up local value of
6088 @code{default-mime-charset} in summary buffer based on variable
6089 @code{gnus-newsgroup-default-charset-alist}.
6090
6091 @item gnus-alter-header-function
6092 @vindex gnus-alter-header-function
6093 If non-@code{nil}, this function will be called to allow alteration of
6094 article header structures.  The function is called with one parameter,
6095 the article header vector, which it may alter in any way.  For instance,
6096 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6097 in systematic ways (by adding prefixes and such), you can use this
6098 variable to un-scramble the @code{Message-ID}s so that they are more
6099 meaningful.  Here's one example:
6100
6101 @lisp
6102 (setq gnus-alter-header-function 'my-alter-message-id)
6103
6104 (defun my-alter-message-id (header)
6105   (let ((id (mail-header-id header)))
6106     (when (string-match
6107            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6108       (mail-header-set-id
6109        (concat (match-string 1 id) "@@" (match-string 2 id))
6110        header))))
6111 @end lisp
6112
6113 @end table
6114
6115
6116 @node Thread Commands
6117 @subsection Thread Commands
6118 @cindex thread commands
6119
6120 @table @kbd
6121
6122 @item T k
6123 @itemx M-C-k
6124 @kindex T k (Summary)
6125 @kindex M-C-k (Summary)
6126 @findex gnus-summary-kill-thread
6127 Mark all articles in the current (sub-)thread as read
6128 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6129 remove all marks instead.  If the prefix argument is negative, tick
6130 articles instead.
6131
6132 @item T l
6133 @itemx M-C-l
6134 @kindex T l (Summary)
6135 @kindex M-C-l (Summary)
6136 @findex gnus-summary-lower-thread
6137 Lower the score of the current (sub-)thread
6138 (@code{gnus-summary-lower-thread}).
6139
6140 @item T i
6141 @kindex T i (Summary)
6142 @findex gnus-summary-raise-thread
6143 Increase the score of the current (sub-)thread
6144 (@code{gnus-summary-raise-thread}).
6145
6146 @item T #
6147 @kindex T # (Summary)
6148 @findex gnus-uu-mark-thread
6149 Set the process mark on the current (sub-)thread
6150 (@code{gnus-uu-mark-thread}).
6151
6152 @item T M-#
6153 @kindex T M-# (Summary)
6154 @findex gnus-uu-unmark-thread
6155 Remove the process mark from the current (sub-)thread
6156 (@code{gnus-uu-unmark-thread}).
6157
6158 @item T T
6159 @kindex T T (Summary)
6160 @findex gnus-summary-toggle-threads
6161 Toggle threading (@code{gnus-summary-toggle-threads}).
6162
6163 @item T s
6164 @kindex T s (Summary)
6165 @findex gnus-summary-show-thread
6166 Expose the (sub-)thread hidden under the current article, if any
6167 (@code{gnus-summary-show-thread}).
6168
6169 @item T h
6170 @kindex T h (Summary)
6171 @findex gnus-summary-hide-thread
6172 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6173
6174 @item T S
6175 @kindex T S (Summary)
6176 @findex gnus-summary-show-all-threads
6177 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6178
6179 @item T H
6180 @kindex T H (Summary)
6181 @findex gnus-summary-hide-all-threads
6182 Hide all threads (@code{gnus-summary-hide-all-threads}).
6183
6184 @item T t
6185 @kindex T t (Summary)
6186 @findex gnus-summary-rethread-current
6187 Re-thread the current article's thread
6188 (@code{gnus-summary-rethread-current}).  This works even when the
6189 summary buffer is otherwise unthreaded.
6190
6191 @item T ^
6192 @kindex T ^ (Summary)
6193 @findex gnus-summary-reparent-thread
6194 Make the current article the child of the marked (or previous) article
6195 (@code{gnus-summary-reparent-thread}).
6196
6197 @end table
6198
6199 The following commands are thread movement commands.  They all
6200 understand the numeric prefix.
6201
6202 @table @kbd
6203
6204 @item T n
6205 @kindex T n (Summary)
6206 @itemx M-C-n
6207 @kindex M-C-n (Summary)
6208 @itemx M-down
6209 @kindex M-down (Summary)
6210 @findex gnus-summary-next-thread
6211 Go to the next thread (@code{gnus-summary-next-thread}).
6212
6213 @item T p
6214 @kindex T p (Summary)
6215 @itemx M-C-p
6216 @kindex M-C-p (Summary)
6217 @itemx M-up
6218 @kindex M-up (Summary)
6219 @findex gnus-summary-prev-thread
6220 Go to the previous thread (@code{gnus-summary-prev-thread}).
6221
6222 @item T d
6223 @kindex T d (Summary)
6224 @findex gnus-summary-down-thread
6225 Descend the thread (@code{gnus-summary-down-thread}).
6226
6227 @item T u
6228 @kindex T u (Summary)
6229 @findex gnus-summary-up-thread
6230 Ascend the thread (@code{gnus-summary-up-thread}).
6231
6232 @item T o
6233 @kindex T o (Summary)
6234 @findex gnus-summary-top-thread
6235 Go to the top of the thread (@code{gnus-summary-top-thread}).
6236 @end table
6237
6238 @vindex gnus-thread-operation-ignore-subject
6239 If you ignore subject while threading, you'll naturally end up with
6240 threads that have several different subjects in them.  If you then issue
6241 a command like `T k' (@code{gnus-summary-kill-thread}) you might not
6242 wish to kill the entire thread, but just those parts of the thread that
6243 have the same subject as the current article.  If you like this idea,
6244 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6245 is non-@code{nil} (which it is by default), subjects will be ignored
6246 when doing thread commands.  If this variable is @code{nil}, articles in
6247 the same thread with different subjects will not be included in the
6248 operation in question.  If this variable is @code{fuzzy}, only articles
6249 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6250 Matching}).
6251
6252
6253 @node Sorting the Summary Buffer
6254 @section Sorting the Summary Buffer
6255
6256 @findex gnus-thread-sort-by-total-score
6257 @findex gnus-thread-sort-by-date
6258 @findex gnus-thread-sort-by-score
6259 @findex gnus-thread-sort-by-subject
6260 @findex gnus-thread-sort-by-author
6261 @findex gnus-thread-sort-by-number
6262 @vindex gnus-thread-sort-functions
6263 If you are using a threaded summary display, you can sort the threads by
6264 setting @code{gnus-thread-sort-functions}, which can be either a single
6265 function, a list of functions, or a list containing functions and
6266 @code{(not some-function)} elements.
6267
6268 By default, sorting is done on article numbers.  Ready-made sorting
6269 predicate functions include @code{gnus-thread-sort-by-number},
6270 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6271 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score}, and
6272 @code{gnus-thread-sort-by-total-score}.
6273
6274 Each function takes two threads and returns non-@code{nil} if the first
6275 thread should be sorted before the other.  Note that sorting really is
6276 normally done by looking only at the roots of each thread.
6277
6278 If you use more than one function, the primary sort key should be the
6279 last function in the list.  You should probably always include
6280 @code{gnus-thread-sort-by-number} in the list of sorting
6281 functions---preferably first.  This will ensure that threads that are
6282 equal with respect to the other sort criteria will be displayed in
6283 ascending article order.
6284
6285 If you would like to sort by reverse score, then by subject, and finally
6286 by number, you could do something like:
6287
6288 @lisp
6289 (setq gnus-thread-sort-functions
6290       '(gnus-thread-sort-by-number
6291         gnus-thread-sort-by-subject
6292         (not gnus-thread-sort-by-total-score)))
6293 @end lisp
6294
6295 The threads that have highest score will be displayed first in the
6296 summary buffer.  When threads have the same score, they will be sorted
6297 alphabetically.  The threads that have the same score and the same
6298 subject will be sorted by number, which is (normally) the sequence in
6299 which the articles arrived.
6300
6301 If you want to sort by score and then reverse arrival order, you could
6302 say something like:
6303
6304 @lisp
6305 (setq gnus-thread-sort-functions
6306       '((lambda (t1 t2)
6307           (not (gnus-thread-sort-by-number t1 t2)))
6308         gnus-thread-sort-by-score))
6309 @end lisp
6310
6311 @vindex gnus-thread-score-function
6312 The function in the @code{gnus-thread-score-function} variable (default
6313 @code{+}) is used for calculating the total score of a thread.  Useful
6314 functions might be @code{max}, @code{min}, or squared means, or whatever
6315 tickles your fancy.
6316
6317 @findex gnus-article-sort-functions
6318 @findex gnus-article-sort-by-date
6319 @findex gnus-article-sort-by-score
6320 @findex gnus-article-sort-by-subject
6321 @findex gnus-article-sort-by-author
6322 @findex gnus-article-sort-by-number
6323 If you are using an unthreaded display for some strange reason or other,
6324 you have to fiddle with the @code{gnus-article-sort-functions} variable.
6325 It is very similar to the @code{gnus-thread-sort-functions}, except that
6326 it uses slightly different functions for article comparison.  Available
6327 sorting predicate functions are @code{gnus-article-sort-by-number},
6328 @code{gnus-article-sort-by-author}, @code{gnus-article-sort-by-subject},
6329 @code{gnus-article-sort-by-date}, and @code{gnus-article-sort-by-score}.
6330
6331 If you want to sort an unthreaded summary display by subject, you could
6332 say something like:
6333
6334 @lisp
6335 (setq gnus-article-sort-functions
6336       '(gnus-article-sort-by-number
6337         gnus-article-sort-by-subject))
6338 @end lisp
6339
6340
6341
6342 @node Asynchronous Fetching
6343 @section Asynchronous Article Fetching
6344 @cindex asynchronous article fetching
6345 @cindex article pre-fetch
6346 @cindex pre-fetch
6347
6348 If you read your news from an @sc{nntp} server that's far away, the
6349 network latencies may make reading articles a chore.  You have to wait
6350 for a while after pressing @kbd{n} to go to the next article before the
6351 article appears.  Why can't gnus just go ahead and fetch the article
6352 while you are reading the previous one?  Why not, indeed.
6353
6354 First, some caveats.  There are some pitfalls to using asynchronous
6355 article fetching, especially the way gnus does it.
6356
6357 Let's say you are reading article 1, which is short, and article 2 is
6358 quite long, and you are not interested in reading that.  Gnus does not
6359 know this, so it goes ahead and fetches article 2.  You decide to read
6360 article 3, but since gnus is in the process of fetching article 2, the
6361 connection is blocked.
6362
6363 To avoid these situations, gnus will open two (count 'em two)
6364 connections to the server.  Some people may think this isn't a very nice
6365 thing to do, but I don't see any real alternatives.  Setting up that
6366 extra connection takes some time, so gnus startup will be slower.
6367
6368 Gnus will fetch more articles than you will read.  This will mean that
6369 the link between your machine and the @sc{nntp} server will become more
6370 loaded than if you didn't use article pre-fetch.  The server itself will
6371 also become more loaded---both with the extra article requests, and the
6372 extra connection.
6373
6374 Ok, so now you know that you shouldn't really use this thing...  unless
6375 you really want to.
6376
6377 @vindex gnus-asynchronous
6378 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
6379 happen automatically.
6380
6381 @vindex gnus-use-article-prefetch
6382 You can control how many articles are to be pre-fetched by setting
6383 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
6384 that when you read an article in the group, the backend will pre-fetch
6385 the next 30 articles.  If this variable is @code{t}, the backend will
6386 pre-fetch all the articles it can without bound.  If it is
6387 @code{nil}, no pre-fetching will be done.
6388
6389 @vindex gnus-async-prefetch-article-p
6390 @findex gnus-async-read-p
6391 There are probably some articles that you don't want to pre-fetch---read
6392 articles, for instance.  The @code{gnus-async-prefetch-article-p} variable controls whether an article is to be pre-fetched.  This function should
6393 return non-@code{nil} when the article in question is to be
6394 pre-fetched.  The default is @code{gnus-async-read-p}, which returns
6395 @code{nil} on read articles.  The function is called with an article
6396 data structure as the only parameter.
6397
6398 If, for instance, you wish to pre-fetch only unread articles shorter than 100 lines, you could say something like:
6399
6400 @lisp
6401 (defun my-async-short-unread-p (data)
6402   "Return non-nil for short, unread articles."
6403   (and (gnus-data-unread-p data)
6404        (< (mail-header-lines (gnus-data-header data))
6405           100)))
6406
6407 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
6408 @end lisp
6409
6410 These functions will be called many, many times, so they should
6411 preferably be short and sweet to avoid slowing down gnus too much.
6412 It's probably a good idea to byte-compile things like this.
6413
6414 @vindex gnus-prefetched-article-deletion-strategy
6415 Articles have to be removed from the asynch buffer sooner or later.  The
6416 @code{gnus-prefetched-article-deletion-strategy} says when to remove
6417 articles.  This is a list that may contain the following elements:
6418
6419 @table @code
6420 @item read
6421 Remove articles when they are read.
6422
6423 @item exit
6424 Remove articles when exiting the group.
6425 @end table
6426
6427 The default value is @code{(read exit)}.
6428
6429 @c @vindex gnus-use-header-prefetch
6430 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
6431 @c from the next group.
6432
6433
6434 @node Article Caching
6435 @section Article Caching
6436 @cindex article caching
6437 @cindex caching
6438
6439 If you have an @emph{extremely} slow @sc{nntp} connection, you may
6440 consider turning article caching on.  Each article will then be stored
6441 locally under your home directory.  As you may surmise, this could
6442 potentially use @emph{huge} amounts of disk space, as well as eat up all
6443 your inodes so fast it will make your head swim.  In vodka.
6444
6445 Used carefully, though, it could be just an easier way to save articles.
6446
6447 @vindex gnus-use-long-file-name
6448 @vindex gnus-cache-directory
6449 @vindex gnus-use-cache
6450 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
6451 all articles ticked or marked as dormant will then be copied
6452 over to your local cache (@code{gnus-cache-directory}).  Whether this
6453 cache is flat or hierarchical is controlled by the
6454 @code{gnus-use-long-file-name} variable, as usual.
6455
6456 When re-selecting a ticked or dormant article, it will be fetched from the
6457 cache instead of from the server.  As articles in your cache will never
6458 expire, this might serve as a method of saving articles while still
6459 keeping them where they belong.  Just mark all articles you want to save
6460 as dormant, and don't worry.
6461
6462 When an article is marked as read, is it removed from the cache.
6463
6464 @vindex gnus-cache-remove-articles
6465 @vindex gnus-cache-enter-articles
6466 The entering/removal of articles from the cache is controlled by the
6467 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
6468 variables.  Both are lists of symbols.  The first is @code{(ticked
6469 dormant)} by default, meaning that ticked and dormant articles will be
6470 put in the cache.  The latter is @code{(read)} by default, meaning that
6471 articles marked as read are removed from the cache.  Possibly
6472 symbols in these two lists are @code{ticked}, @code{dormant},
6473 @code{unread} and @code{read}.
6474
6475 @findex gnus-jog-cache
6476 So where does the massive article-fetching and storing come into the
6477 picture?  The @code{gnus-jog-cache} command will go through all
6478 subscribed newsgroups, request all unread articles, score them, and
6479 store them in the cache.  You should only ever, ever ever ever, use this
6480 command if 1) your connection to the @sc{nntp} server is really, really,
6481 really slow and 2) you have a really, really, really huge disk.
6482 Seriously.  One way to cut down on the number of articles downloaded is
6483 to score unwanted articles down and have them marked as read.  They will
6484 not then be downloaded by this command.
6485
6486 @vindex gnus-uncacheable-groups
6487 @vindex gnus-cacheable-groups
6488 It is likely that you do not want caching on all groups.  For instance,
6489 if your @code{nnml} mail is located under your home directory, it makes no
6490 sense to cache it somewhere else under your home directory.  Unless you
6491 feel that it's neat to use twice as much space.
6492
6493 To limit the caching, you could set @code{gnus-cacheable-groups} to a
6494 regexp of groups to cache, @samp{^nntp} for instance, or set the
6495 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
6496 Both variables are @code{nil} by default.  If a group matches both
6497 variables, the group is not cached.
6498
6499 @findex gnus-cache-generate-nov-databases
6500 @findex gnus-cache-generate-active
6501 @vindex gnus-cache-active-file
6502 The cache stores information on what articles it contains in its active
6503 file (@code{gnus-cache-active-file}).  If this file (or any other parts
6504 of the cache) becomes all messed up for some reason or other, gnus
6505 offers two functions that will try to set things right.  @kbd{M-x
6506 gnus-cache-generate-nov-databases} will (re)build all the @sc{nov}
6507 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
6508 file.
6509
6510
6511 @node Persistent Articles
6512 @section Persistent Articles
6513 @cindex persistent articles
6514
6515 Closely related to article caching, we have @dfn{persistent articles}.
6516 In fact, it's just a different way of looking at caching, and much more
6517 useful in my opinion.
6518
6519 Say you're reading a newsgroup, and you happen on to some valuable gem
6520 that you want to keep and treasure forever.  You'd normally just save it
6521 (using one of the many saving commands) in some file.  The problem with
6522 that is that it's just, well, yucky.  Ideally you'd prefer just having
6523 the article remain in the group where you found it forever; untouched by
6524 the expiry going on at the news server.
6525
6526 This is what a @dfn{persistent article} is---an article that just won't
6527 be deleted.  It's implemented using the normal cache functions, but
6528 you use two explicit commands for managing persistent articles:
6529
6530 @table @kbd
6531
6532 @item *
6533 @kindex * (Summary)
6534 @findex gnus-cache-enter-article
6535 Make the current article persistent (@code{gnus-cache-enter-article}).
6536
6537 @item M-*
6538 @kindex M-* (Summary)
6539 @findex gnus-cache-remove-article
6540 Remove the current article from the persistent articles
6541 (@code{gnus-cache-remove-article}).  This will normally delete the
6542 article.
6543 @end table
6544
6545 Both these commands understand the process/prefix convention.
6546
6547 To avoid having all ticked articles (and stuff) entered into the cache,
6548 you should set @code{gnus-use-cache} to @code{passive} if you're just
6549 interested in persistent articles:
6550
6551 @lisp
6552 (setq gnus-use-cache 'passive)
6553 @end lisp
6554
6555
6556 @node Article Backlog
6557 @section Article Backlog
6558 @cindex backlog
6559 @cindex article backlog
6560
6561 If you have a slow connection, but the idea of using caching seems
6562 unappealing to you (and it is, really), you can help the situation some
6563 by switching on the @dfn{backlog}.  This is where gnus will buffer
6564 already read articles so that it doesn't have to re-fetch articles
6565 you've already read.  This only helps if you are in the habit of
6566 re-selecting articles you've recently read, of course.  If you never do
6567 that, turning the backlog on will slow gnus down a little bit, and
6568 increase memory usage some.
6569
6570 @vindex gnus-keep-backlog
6571 If you set @code{gnus-keep-backlog} to a number @var{n}, gnus will store
6572 at most @var{n} old articles in a buffer for later re-fetching.  If this
6573 variable is non-@code{nil} and is not a number, gnus will store
6574 @emph{all} read articles, which means that your Emacs will grow without
6575 bound before exploding and taking your machine down with you.  I put
6576 that in there just to keep y'all on your toes.
6577
6578 This variable is @code{nil} by default.
6579
6580
6581 @node Saving Articles
6582 @section Saving Articles
6583 @cindex saving articles
6584
6585 Gnus can save articles in a number of ways.  Below is the documentation
6586 for saving articles in a fairly straight-forward fashion (i.e., little
6587 processing of the article is done before it is saved).  For a different
6588 approach (uudecoding, unsharing) you should use @code{gnus-uu}
6589 (@pxref{Decoding Articles}).
6590
6591 @vindex gnus-save-all-headers
6592 If @code{gnus-save-all-headers} is non-@code{nil}, gnus will not delete
6593 unwanted headers before saving the article.
6594
6595 @vindex gnus-saved-headers
6596 If the preceding variable is @code{nil}, all headers that match the
6597 @code{gnus-saved-headers} regexp will be kept, while the rest will be
6598 deleted before saving.
6599
6600 @table @kbd
6601
6602 @item O o
6603 @itemx o
6604 @kindex O o (Summary)
6605 @kindex o (Summary)
6606 @findex gnus-summary-save-article
6607 @c @icon{gnus-summary-save-article}
6608 Save the current article using the default article saver
6609 (@code{gnus-summary-save-article}).
6610
6611 @item O m
6612 @kindex O m (Summary)
6613 @findex gnus-summary-save-article-mail
6614 Save the current article in mail format
6615 (@code{gnus-summary-save-article-mail}).
6616
6617 @item O r
6618 @kindex O r (Summary)
6619 @findex gnus-summary-save-article-rmail
6620 Save the current article in rmail format
6621 (@code{gnus-summary-save-article-rmail}).
6622
6623 @item O f
6624 @kindex O f (Summary)
6625 @findex gnus-summary-save-article-file
6626 @c @icon{gnus-summary-save-article-file}
6627 Save the current article in plain file format
6628 (@code{gnus-summary-save-article-file}).
6629
6630 @item O F
6631 @kindex O F (Summary)
6632 @findex gnus-summary-write-article-file
6633 Write the current article in plain file format, overwriting any previous
6634 file contents (@code{gnus-summary-write-article-file}).
6635
6636 @item O b
6637 @kindex O b (Summary)
6638 @findex gnus-summary-save-article-body-file
6639 Save the current article body in plain file format
6640 (@code{gnus-summary-save-article-body-file}).
6641
6642 @item O h
6643 @kindex O h (Summary)
6644 @findex gnus-summary-save-article-folder
6645 Save the current article in mh folder format
6646 (@code{gnus-summary-save-article-folder}).
6647
6648 @item O v
6649 @kindex O v (Summary)
6650 @findex gnus-summary-save-article-vm
6651 Save the current article in a VM folder
6652 (@code{gnus-summary-save-article-vm}).
6653
6654 @item O p
6655 @itemx |
6656 @kindex O p (Summary)
6657 @kindex | (Summary)
6658 @findex gnus-summary-pipe-output
6659 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
6660 the current article to a process (@code{gnus-summary-pipe-output}).
6661 @end table
6662
6663 @vindex gnus-prompt-before-saving
6664 All these commands use the process/prefix convention
6665 (@pxref{Process/Prefix}).  If you save bunches of articles using these
6666 functions, you might get tired of being prompted for files to save each
6667 and every article in.  The prompting action is controlled by
6668 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
6669 default, giving you that excessive prompting action you know and
6670 loathe.  If you set this variable to @code{t} instead, you'll be prompted
6671 just once for each series of articles you save.  If you like to really
6672 have Gnus do all your thinking for you, you can even set this variable
6673 to @code{nil}, which means that you will never be prompted for files to
6674 save articles in.  Gnus will simply save all the articles in the default
6675 files.
6676
6677
6678 @vindex gnus-default-article-saver
6679 You can customize the @code{gnus-default-article-saver} variable to make
6680 gnus do what you want it to.  You can use any of the six ready-made
6681 functions below, or you can create your own.
6682
6683 @table @code
6684
6685 @item gnus-summary-save-in-rmail
6686 @findex gnus-summary-save-in-rmail
6687 @vindex gnus-rmail-save-name
6688 @findex gnus-plain-save-name
6689 This is the default format, @dfn{babyl}.  Uses the function in the
6690 @code{gnus-rmail-save-name} variable to get a file name to save the
6691 article in.  The default is @code{gnus-plain-save-name}.
6692
6693 @item gnus-summary-save-in-mail
6694 @findex gnus-summary-save-in-mail
6695 @vindex gnus-mail-save-name
6696 Save in a Unix mail (mbox) file.  Uses the function in the
6697 @code{gnus-mail-save-name} variable to get a file name to save the
6698 article in.  The default is @code{gnus-plain-save-name}.
6699
6700 @item gnus-summary-save-in-file
6701 @findex gnus-summary-save-in-file
6702 @vindex gnus-file-save-name
6703 @findex gnus-numeric-save-name
6704 Append the article straight to an ordinary file.  Uses the function in
6705 the @code{gnus-file-save-name} variable to get a file name to save the
6706 article in.  The default is @code{gnus-numeric-save-name}.
6707
6708 @item gnus-summary-save-body-in-file
6709 @findex gnus-summary-save-body-in-file
6710 Append the article body to an ordinary file.  Uses the function in the
6711 @code{gnus-file-save-name} variable to get a file name to save the
6712 article in.  The default is @code{gnus-numeric-save-name}.
6713
6714 @item gnus-summary-save-in-folder
6715 @findex gnus-summary-save-in-folder
6716 @findex gnus-folder-save-name
6717 @findex gnus-Folder-save-name
6718 @vindex gnus-folder-save-name
6719 @cindex rcvstore
6720 @cindex MH folders
6721 Save the article to an MH folder using @code{rcvstore} from the MH
6722 library.  Uses the function in the @code{gnus-folder-save-name} variable
6723 to get a file name to save the article in.  The default is
6724 @code{gnus-folder-save-name}, but you can also use
6725 @code{gnus-Folder-save-name}, which creates capitalized names.
6726
6727 @item gnus-summary-save-in-vm
6728 @findex gnus-summary-save-in-vm
6729 Save the article in a VM folder.  You have to have the VM mail
6730 reader to use this setting.
6731 @end table
6732
6733 @vindex gnus-article-save-directory
6734 All of these functions, except for the last one, will save the article
6735 in the @code{gnus-article-save-directory}, which is initialized from the
6736 @code{SAVEDIR} environment variable.  This is @file{~/News/} by
6737 default.
6738
6739 As you can see above, the functions use different functions to find a
6740 suitable name of a file to save the article in.  Below is a list of
6741 available functions that generate names:
6742
6743 @table @code
6744
6745 @item gnus-Numeric-save-name
6746 @findex gnus-Numeric-save-name
6747 File names like @file{~/News/Alt.andrea-dworkin/45}.
6748
6749 @item gnus-numeric-save-name
6750 @findex gnus-numeric-save-name
6751 File names like @file{~/News/alt.andrea-dworkin/45}.
6752
6753 @item gnus-Plain-save-name
6754 @findex gnus-Plain-save-name
6755 File names like @file{~/News/Alt.andrea-dworkin}.
6756
6757 @item gnus-plain-save-name
6758 @findex gnus-plain-save-name
6759 File names like @file{~/News/alt.andrea-dworkin}.
6760
6761 @item gnus-sender-save-name
6762 @findex gnus-sender-save-name
6763 File names like @file{~/News/larsi}.
6764 @end table
6765
6766 @vindex gnus-split-methods
6767 You can have gnus suggest where to save articles by plonking a regexp into
6768 the @code{gnus-split-methods} alist.  For instance, if you would like to
6769 save articles related to gnus in the file @file{gnus-stuff}, and articles
6770 related to VM in @code{vm-stuff}, you could set this variable to something
6771 like:
6772
6773 @lisp
6774 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
6775  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
6776  (my-choosing-function "../other-dir/my-stuff")
6777  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
6778 @end lisp
6779
6780 We see that this is a list where each element is a list that has two
6781 elements---the @dfn{match} and the @dfn{file}.  The match can either be
6782 a string (in which case it is used as a regexp to match on the article
6783 head); it can be a symbol (which will be called as a function with the
6784 group name as a parameter); or it can be a list (which will be
6785 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
6786 the @dfn{file} will be used as a default prompt.  In addition, the
6787 result of the operation itself will be used if the function or form
6788 called returns a string or a list of strings.
6789
6790 You basically end up with a list of file names that might be used when
6791 saving the current article.  (All ``matches'' will be used.)  You will
6792 then be prompted for what you really want to use as a name, with file
6793 name completion over the results from applying this variable.
6794
6795 This variable is @code{((gnus-article-archive-name))} by default, which
6796 means that gnus will look at the articles it saves for an
6797 @code{Archive-name} line and use that as a suggestion for the file
6798 name.
6799
6800 Here's an example function to clean up file names somewhat.  If you have
6801 lots of mail groups called things like
6802 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
6803 these group names before creating the file name to save to.  The
6804 following will do just that:
6805
6806 @lisp
6807 (defun my-save-name (group)
6808   (when (string-match "^nnml:mail." group)
6809     (substring group (match-end 0))))
6810
6811 (setq gnus-split-methods
6812       '((gnus-article-archive-name)
6813         (my-save-name)))
6814 @end lisp
6815
6816
6817 @vindex gnus-use-long-file-name
6818 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
6819 @code{nil}, all the preceding functions will replace all periods
6820 (@samp{.}) in the group names with slashes (@samp{/})---which means that
6821 the functions will generate hierarchies of directories instead of having
6822 all the files in the top level directory
6823 (@file{~/News/alt/andrea-dworkin} instead of
6824 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
6825 on most systems.  However, for historical reasons, this is @code{nil} on
6826 Xenix and usg-unix-v machines by default.
6827
6828 This function also affects kill and score file names.  If this variable
6829 is a list, and the list contains the element @code{not-score}, long file
6830 names will not be used for score files, if it contains the element
6831 @code{not-save}, long file names will not be used for saving, and if it
6832 contains the element @code{not-kill}, long file names will not be used
6833 for kill files.
6834
6835 If you'd like to save articles in a hierarchy that looks something like
6836 a spool, you could
6837
6838 @lisp
6839 (setq gnus-use-long-file-name '(not-save)) ; to get a hierarchy
6840 (setq gnus-default-article-saver
6841       'gnus-summary-save-in-file) ; no encoding
6842 @end lisp
6843
6844 Then just save with @kbd{o}.  You'd then read this hierarchy with
6845 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
6846 the top level directory as the argument (@file{~/News/}).  Then just walk
6847 around to the groups/directories with @code{nneething}.
6848
6849
6850 @node Decoding Articles
6851 @section Decoding Articles
6852 @cindex decoding articles
6853
6854 Sometime users post articles (or series of articles) that have been
6855 encoded in some way or other.  Gnus can decode them for you.
6856
6857 @menu
6858 * Uuencoded Articles::          Uudecode articles.
6859 * Shell Archives::              Unshar articles.
6860 * PostScript Files::            Split PostScript.
6861 * Other Files::                 Plain save and binhex.
6862 * Decoding Variables::          Variables for a happy decoding.
6863 * Viewing Files::               You want to look at the result of the decoding?
6864 @end menu
6865
6866 @cindex series
6867 @cindex article series
6868 All these functions use the process/prefix convention
6869 (@pxref{Process/Prefix}) for finding out what articles to work on, with
6870 the extension that a ``single article'' means ``a single series''.  Gnus
6871 can find out by itself what articles belong to a series, decode all the
6872 articles and unpack/view/save the resulting file(s).
6873
6874 Gnus guesses what articles are in the series according to the following
6875 simplish rule: The subjects must be (nearly) identical, except for the
6876 last two numbers of the line.  (Spaces are largely ignored, however.)
6877
6878 For example: If you choose a subject called @samp{cat.gif (2/3)}, gnus
6879 will find all the articles that match the regexp @samp{^cat.gif
6880 ([0-9]+/[0-9]+).*$}.
6881
6882 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
6883 series}, will not be properly recognized by any of the automatic viewing
6884 commands, and you have to mark the articles manually with @kbd{#}.
6885
6886
6887 @node Uuencoded Articles
6888 @subsection Uuencoded Articles
6889 @cindex uudecode
6890 @cindex uuencoded articles
6891
6892 @table @kbd
6893
6894 @item X u
6895 @kindex X u (Summary)
6896 @findex gnus-uu-decode-uu
6897 @c @icon{gnus-uu-decode-uu}
6898 Uudecodes the current series (@code{gnus-uu-decode-uu}).
6899
6900 @item X U
6901 @kindex X U (Summary)
6902 @findex gnus-uu-decode-uu-and-save
6903 Uudecodes and saves the current series
6904 (@code{gnus-uu-decode-uu-and-save}).
6905
6906 @item X v u
6907 @kindex X v u (Summary)
6908 @findex gnus-uu-decode-uu-view
6909 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
6910
6911 @item X v U
6912 @kindex X v U (Summary)
6913 @findex gnus-uu-decode-uu-and-save-view
6914 Uudecodes, views and saves the current series
6915 (@code{gnus-uu-decode-uu-and-save-view}).
6916
6917 @end table
6918
6919 Remember that these all react to the presence of articles marked with
6920 the process mark.  If, for instance, you'd like to decode and save an
6921 entire newsgroup, you'd typically do @kbd{M P a}
6922 (@code{gnus-uu-mark-all}) and then @kbd{X U}
6923 (@code{gnus-uu-decode-uu-and-save}).
6924
6925 All this is very much different from how @code{gnus-uu} worked with
6926 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
6927 the sun.  This version of @code{gnus-uu} generally assumes that you mark
6928 articles in some way (@pxref{Setting Process Marks}) and then press
6929 @kbd{X u}.
6930
6931 @vindex gnus-uu-notify-files
6932 Note: When trying to decode articles that have names matching
6933 @code{gnus-uu-notify-files}, which is hard-coded to
6934 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
6935 automatically post an article on @samp{comp.unix.wizards} saying that
6936 you have just viewed the file in question.  This feature can't be turned
6937 off.
6938
6939
6940 @node Shell Archives
6941 @subsection Shell Archives
6942 @cindex unshar
6943 @cindex shell archives
6944 @cindex shared articles
6945
6946 Shell archives (``shar files'') used to be a popular way to distribute
6947 sources, but it isn't used all that much today.  In any case, we have
6948 some commands to deal with these:
6949
6950 @table @kbd
6951
6952 @item X s
6953 @kindex X s (Summary)
6954 @findex gnus-uu-decode-unshar
6955 Unshars the current series (@code{gnus-uu-decode-unshar}).
6956
6957 @item X S
6958 @kindex X S (Summary)
6959 @findex gnus-uu-decode-unshar-and-save
6960 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
6961
6962 @item X v s
6963 @kindex X v s (Summary)
6964 @findex gnus-uu-decode-unshar-view
6965 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
6966
6967 @item X v S
6968 @kindex X v S (Summary)
6969 @findex gnus-uu-decode-unshar-and-save-view
6970 Unshars, views and saves the current series
6971 (@code{gnus-uu-decode-unshar-and-save-view}).
6972 @end table
6973
6974
6975 @node PostScript Files
6976 @subsection PostScript Files
6977 @cindex PostScript
6978
6979 @table @kbd
6980
6981 @item X p
6982 @kindex X p (Summary)
6983 @findex gnus-uu-decode-postscript
6984 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
6985
6986 @item X P
6987 @kindex X P (Summary)
6988 @findex gnus-uu-decode-postscript-and-save
6989 Unpack and save the current PostScript series
6990 (@code{gnus-uu-decode-postscript-and-save}).
6991
6992 @item X v p
6993 @kindex X v p (Summary)
6994 @findex gnus-uu-decode-postscript-view
6995 View the current PostScript series
6996 (@code{gnus-uu-decode-postscript-view}).
6997
6998 @item X v P
6999 @kindex X v P (Summary)
7000 @findex gnus-uu-decode-postscript-and-save-view
7001 View and save the current PostScript series
7002 (@code{gnus-uu-decode-postscript-and-save-view}).
7003 @end table
7004
7005
7006 @node Other Files
7007 @subsection Other Files
7008
7009 @table @kbd
7010 @item X o
7011 @kindex X o (Summary)
7012 @findex gnus-uu-decode-save
7013 Save the current series
7014 (@code{gnus-uu-decode-save}).
7015
7016 @item X b
7017 @kindex X b (Summary)
7018 @findex gnus-uu-decode-binhex
7019 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7020 doesn't really work yet.
7021 @end table
7022
7023
7024 @node Decoding Variables
7025 @subsection Decoding Variables
7026
7027 Adjective, not verb.
7028
7029 @menu
7030 * Rule Variables::              Variables that say how a file is to be viewed.
7031 * Other Decode Variables::      Other decode variables.
7032 * Uuencoding and Posting::      Variables for customizing uuencoding.
7033 @end menu
7034
7035
7036 @node Rule Variables
7037 @subsubsection Rule Variables
7038 @cindex rule variables
7039
7040 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7041 variables are of the form
7042
7043 @lisp
7044       (list '(regexp1 command2)
7045             '(regexp2 command2)
7046             ...)
7047 @end lisp
7048
7049 @table @code
7050
7051 @item gnus-uu-user-view-rules
7052 @vindex gnus-uu-user-view-rules
7053 @cindex sox
7054 This variable is consulted first when viewing files.  If you wish to use,
7055 for instance, @code{sox} to convert an @samp{.au} sound file, you could
7056 say something like:
7057 @lisp
7058 (setq gnus-uu-user-view-rules
7059       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7060 @end lisp
7061
7062 @item gnus-uu-user-view-rules-end
7063 @vindex gnus-uu-user-view-rules-end
7064 This variable is consulted if gnus couldn't make any matches from the
7065 user and default view rules.
7066
7067 @item gnus-uu-user-archive-rules
7068 @vindex gnus-uu-user-archive-rules
7069 This variable can be used to say what commands should be used to unpack
7070 archives.
7071 @end table
7072
7073
7074 @node Other Decode Variables
7075 @subsubsection Other Decode Variables
7076
7077 @table @code
7078 @vindex gnus-uu-grabbed-file-functions
7079
7080 @item gnus-uu-grabbed-file-functions
7081 All functions in this list will be called right after each file has been
7082 successfully decoded---so that you can move or view files right away,
7083 and don't have to wait for all files to be decoded before you can do
7084 anything.  Ready-made functions you can put in this list are:
7085
7086 @table @code
7087
7088 @item gnus-uu-grab-view
7089 @findex gnus-uu-grab-view
7090 View the file.
7091
7092 @item gnus-uu-grab-move
7093 @findex gnus-uu-grab-move
7094 Move the file (if you're using a saving function.)
7095 @end table
7096
7097 @item gnus-uu-be-dangerous
7098 @vindex gnus-uu-be-dangerous
7099 Specifies what to do if unusual situations arise during decoding.  If
7100 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7101 that didn't work, and overwrite existing files.  Otherwise, ask each
7102 time.
7103
7104 @item gnus-uu-ignore-files-by-name
7105 @vindex gnus-uu-ignore-files-by-name
7106 Files with name matching this regular expression won't be viewed.
7107
7108 @item gnus-uu-ignore-files-by-type
7109 @vindex gnus-uu-ignore-files-by-type
7110 Files with a @sc{mime} type matching this variable won't be viewed.
7111 Note that Gnus tries to guess what type the file is based on the name.
7112 @code{gnus-uu} is not a @sc{mime} package (yet), so this is slightly
7113 kludgey.
7114
7115 @item gnus-uu-tmp-dir
7116 @vindex gnus-uu-tmp-dir
7117 Where @code{gnus-uu} does its work.
7118
7119 @item gnus-uu-do-not-unpack-archives
7120 @vindex gnus-uu-do-not-unpack-archives
7121 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7122 looking for files to display.
7123
7124 @item gnus-uu-view-and-save
7125 @vindex gnus-uu-view-and-save
7126 Non-@code{nil} means that the user will always be asked to save a file
7127 after viewing it.
7128
7129 @item gnus-uu-ignore-default-view-rules
7130 @vindex gnus-uu-ignore-default-view-rules
7131 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7132 rules.
7133
7134 @item gnus-uu-ignore-default-archive-rules
7135 @vindex gnus-uu-ignore-default-archive-rules
7136 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7137 unpacking commands.
7138
7139 @item gnus-uu-kill-carriage-return
7140 @vindex gnus-uu-kill-carriage-return
7141 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7142 from articles.
7143
7144 @item gnus-uu-unmark-articles-not-decoded
7145 @vindex gnus-uu-unmark-articles-not-decoded
7146 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7147 decoded articles as unread.
7148
7149 @item gnus-uu-correct-stripped-uucode
7150 @vindex gnus-uu-correct-stripped-uucode
7151 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7152 uuencoded files that have had trailing spaces deleted.
7153
7154 @item gnus-uu-pre-uudecode-hook
7155 @vindex gnus-uu-pre-uudecode-hook
7156 Hook run before sending a message to @code{uudecode}.
7157
7158 @item gnus-uu-view-with-metamail
7159 @vindex gnus-uu-view-with-metamail
7160 @cindex metamail
7161 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7162 commands defined by the rule variables and just fudge a @sc{mime}
7163 content type based on the file name.  The result will be fed to
7164 @code{metamail} for viewing.
7165
7166 @item gnus-uu-save-in-digest
7167 @vindex gnus-uu-save-in-digest
7168 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7169 decoding, will save in digests.  If this variable is @code{nil},
7170 @code{gnus-uu} will just save everything in a file without any
7171 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7172 to specify any meaningful volume and issue numbers were found, so I
7173 simply dropped them.
7174
7175 @end table
7176
7177
7178 @node Uuencoding and Posting
7179 @subsubsection Uuencoding and Posting
7180
7181 @table @code
7182
7183 @item gnus-uu-post-include-before-composing
7184 @vindex gnus-uu-post-include-before-composing
7185 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7186 before you compose the article.  If this variable is @code{t}, you can
7187 either include an encoded file with @kbd{C-c C-i} or have one included
7188 for you when you post the article.
7189
7190 @item gnus-uu-post-length
7191 @vindex gnus-uu-post-length
7192 Maximum length of an article.  The encoded file will be split into how
7193 many articles it takes to post the entire file.
7194
7195 @item gnus-uu-post-threaded
7196 @vindex gnus-uu-post-threaded
7197 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7198 thread.  This may not be smart, as no other decoder I have seen is able
7199 to follow threads when collecting uuencoded articles.  (Well, I have
7200 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7201 think that counts...) Default is @code{nil}.
7202
7203 @item gnus-uu-post-separate-description
7204 @vindex gnus-uu-post-separate-description
7205 Non-@code{nil} means that the description will be posted in a separate
7206 article.  The first article will typically be numbered (0/x).  If this
7207 variable is @code{nil}, the description the user enters will be included
7208 at the beginning of the first article, which will be numbered (1/x).
7209 Default is @code{t}.
7210
7211 @end table
7212
7213
7214 @node Viewing Files
7215 @subsection Viewing Files
7216 @cindex viewing files
7217 @cindex pseudo-articles
7218
7219 After decoding, if the file is some sort of archive, gnus will attempt
7220 to unpack the archive and see if any of the files in the archive can be
7221 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7222 containing the files @file{pic1.jpg} and @file{pic2.gif}, gnus will
7223 uncompress and de-tar the main file, and then view the two pictures.
7224 This unpacking process is recursive, so if the archive contains archives
7225 of archives, it'll all be unpacked.
7226
7227 Finally, gnus will normally insert a @dfn{pseudo-article} for each
7228 extracted file into the summary buffer.  If you go to these
7229 ``articles'', you will be prompted for a command to run (usually Gnus
7230 will make a suggestion), and then the command will be run.
7231
7232 @vindex gnus-view-pseudo-asynchronously
7233 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7234 until the viewing is done before proceeding.
7235
7236 @vindex gnus-view-pseudos
7237 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7238 the pseudo-articles into the summary buffer, but view them
7239 immediately.  If this variable is @code{not-confirm}, the user won't even
7240 be asked for a confirmation before viewing is done.
7241
7242 @vindex gnus-view-pseudos-separately
7243 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7244 pseudo-article will be created for each file to be viewed.  If
7245 @code{nil}, all files that use the same viewing command will be given as
7246 a list of parameters to that command.
7247
7248 @vindex gnus-insert-pseudo-articles
7249 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7250 pseudo-articles when decoding.  It is @code{t} by default.
7251
7252 So; there you are, reading your @emph{pseudo-articles} in your
7253 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7254 Why isn't anything real anymore? How did we get here?
7255
7256
7257 @node Article Treatment
7258 @section Article Treatment
7259
7260 Reading through this huge manual, you may have quite forgotten that the
7261 object of newsreaders is to actually, like, read what people have
7262 written.  Reading articles.  Unfortunately, people are quite bad at
7263 writing, so there are tons of functions and variables to make reading
7264 these articles easier.
7265
7266 @menu
7267 * Article Highlighting::        You want to make the article look like fruit salad.
7268 * Article Fontisizing::         Making emphasized text look nice.
7269 * Article Hiding::              You also want to make certain info go away.
7270 * Article Washing::             Lots of way-neat functions to make life better.
7271 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7272 * Article Date::                Grumble, UT!
7273 * Article Signature::           What is a signature?
7274 * Article Miscellania::         Various other stuff.
7275 @end menu
7276
7277
7278 @node Article Highlighting
7279 @subsection Article Highlighting
7280 @cindex highlighting
7281
7282 Not only do you want your article buffer to look like fruit salad, but
7283 you want it to look like technicolor fruit salad.
7284
7285 @table @kbd
7286
7287 @item W H a
7288 @kindex W H a (Summary)
7289 @findex gnus-article-highlight
7290 @findex gnus-article-maybe-highlight
7291 Do much highlighting of the current article
7292 (@code{gnus-article-highlight}).  This function highlights header, cited
7293 text, the signature, and adds buttons to the body and the head.
7294
7295 @item W H h
7296 @kindex W H h (Summary)
7297 @findex gnus-article-highlight-headers
7298 @vindex gnus-header-face-alist
7299 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7300 highlighting will be done according to the @code{gnus-header-face-alist}
7301 variable, which is a list where each element has the form
7302 @code{(@var{regexp} @var{name} @var{content})}.
7303 @var{regexp} is a regular expression for matching the
7304 header, @var{name} is the face used for highlighting the header name
7305 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7306 the header value.  The first match made will be used.  Note that
7307 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7308
7309 @item W H c
7310 @kindex W H c (Summary)
7311 @findex gnus-article-highlight-citation
7312 Highlight cited text (@code{gnus-article-highlight-citation}).
7313
7314 Some variables to customize the citation highlights:
7315
7316 @table @code
7317 @vindex gnus-cite-parse-max-size
7318
7319 @item gnus-cite-parse-max-size
7320 If the article size if bigger than this variable (which is 25000 by
7321 default), no citation highlighting will be performed.
7322
7323 @item gnus-cite-max-prefix
7324 @vindex gnus-cite-max-prefix
7325 Maximum possible length for a citation prefix (default 20).
7326
7327 @item gnus-cite-face-list
7328 @vindex gnus-cite-face-list
7329 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
7330 When there are citations from multiple articles in the same message,
7331 gnus will try to give each citation from each article its own face.
7332 This should make it easier to see who wrote what.
7333
7334 @item gnus-supercite-regexp
7335 @vindex gnus-supercite-regexp
7336 Regexp matching normal Supercite attribution lines.
7337
7338 @item gnus-supercite-secondary-regexp
7339 @vindex gnus-supercite-secondary-regexp
7340 Regexp matching mangled Supercite attribution lines.
7341
7342 @item gnus-cite-minimum-match-count
7343 @vindex gnus-cite-minimum-match-count
7344 Minimum number of identical prefixes we have to see before we believe
7345 that it's a citation.
7346
7347 @item gnus-cite-attribution-prefix
7348 @vindex gnus-cite-attribution-prefix
7349 Regexp matching the beginning of an attribution line.
7350
7351 @item gnus-cite-attribution-suffix
7352 @vindex gnus-cite-attribution-suffix
7353 Regexp matching the end of an attribution line.
7354
7355 @item gnus-cite-attribution-face
7356 @vindex gnus-cite-attribution-face
7357 Face used for attribution lines.  It is merged with the face for the
7358 cited text belonging to the attribution.
7359
7360 @end table
7361
7362
7363 @item W H s
7364 @kindex W H s (Summary)
7365 @vindex gnus-signature-separator
7366 @vindex gnus-signature-face
7367 @findex gnus-article-highlight-signature
7368 Highlight the signature (@code{gnus-article-highlight-signature}).
7369 Everything after @code{gnus-signature-separator} (@pxref{Article
7370 Signature}) in an article will be considered a signature and will be
7371 highlighted with @code{gnus-signature-face}, which is @code{italic} by
7372 default.
7373
7374 @end table
7375
7376 @xref{Customizing Articles}, for how to highlight articles automatically.
7377
7378
7379 @node Article Fontisizing
7380 @subsection Article Fontisizing
7381 @cindex emphasis
7382 @cindex article emphasis
7383
7384 @findex gnus-article-emphasize
7385 @kindex W e (Summary)
7386 People commonly add emphasis to words in news articles by writing things
7387 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
7388 this look nicer by running the article through the @kbd{W e}
7389 (@code{gnus-article-emphasize}) command.
7390
7391 @vindex gnus-emphasis-alist
7392 How the emphasis is computed is controlled by the
7393 @code{gnus-emphasis-alist} variable.  This is an alist where the first
7394 element is a regular expression to be matched.  The second is a number
7395 that says what regular expression grouping is used to find the entire
7396 emphasized word.  The third is a number that says what regexp grouping
7397 should be displayed and highlighted.  (The text between these two
7398 groupings will be hidden.)  The fourth is the face used for
7399 highlighting.
7400
7401 @lisp
7402 (setq gnus-emphasis-alist
7403       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
7404         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
7405 @end lisp
7406
7407 @cindex slash
7408 @cindex asterisk
7409 @cindex underline
7410 @cindex /
7411 @cindex *
7412
7413 @vindex gnus-emphasis-underline
7414 @vindex gnus-emphasis-bold
7415 @vindex gnus-emphasis-italic
7416 @vindex gnus-emphasis-underline-bold
7417 @vindex gnus-emphasis-underline-italic
7418 @vindex gnus-emphasis-bold-italic
7419 @vindex gnus-emphasis-underline-bold-italic
7420 By default, there are seven rules, and they use the following faces:
7421 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
7422 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
7423 @code{gnus-emphasis-underline-italic},
7424 @code{gnus-emphasis-underline-bold}, and
7425 @code{gnus-emphasis-underline-bold-italic}.
7426
7427 If you want to change these faces, you can either use @kbd{M-x
7428 customize}, or you can use @code{copy-face}.  For instance, if you want
7429 to make @code{gnus-emphasis-italic} use a red face instead, you could
7430 say something like:
7431
7432 @lisp
7433 (copy-face 'red 'gnus-emphasis-italic)
7434 @end lisp
7435
7436 @vindex gnus-group-highlight-words-alist
7437
7438 If you want to highlight arbitrary words, you can use the
7439 @code{gnus-group-highlight-words-alist} variable, which uses the same
7440 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
7441 parameter (@pxref{Group Parameters}) can also be used.
7442
7443 @xref{Customizing Articles}, for how to fontize articles automatically.
7444
7445
7446 @node Article Hiding
7447 @subsection Article Hiding
7448 @cindex article hiding
7449
7450 Or rather, hiding certain things in each article.  There usually is much
7451 too much cruft in most articles.
7452
7453 @table @kbd
7454
7455 @item W W a
7456 @kindex W W a (Summary)
7457 @findex gnus-article-hide
7458 Do quite a lot of hiding on the article buffer
7459 (@kbd{gnus-article-hide}).  In particular, this function will hide
7460 headers, PGP, cited text and the signature.
7461
7462 @item W W h
7463 @kindex W W h (Summary)
7464 @findex gnus-article-toggle-headers
7465 Toggle hiding of headers (@code{gnus-article-toggle-headers}).  @xref{Hiding
7466 Headers}.
7467
7468 @item W W b
7469 @kindex W W b (Summary)
7470 @findex gnus-article-hide-boring-headers
7471 Hide headers that aren't particularly interesting
7472 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
7473
7474 @item W W s
7475 @kindex W W s (Summary)
7476 @findex gnus-article-hide-signature
7477 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
7478 Signature}.
7479
7480 @item W W l
7481 @kindex W W l (Summary)
7482 @findex gnus-article-hide-list-identifiers
7483 @vindex gnus-list-identifiers
7484 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
7485 are strings some mailing list servers add to the beginning of all
7486 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
7487 @samp{Re: } is skipped before stripping. @code{gnus-list-identifiers}
7488 may not contain @code{\\(..\\)}.
7489
7490 @table @code
7491
7492 @item gnus-list-identifiers
7493 @vindex gnus-list-identifiers
7494 A regular expression that matches list identifiers to be removed from
7495 subject.  This can also be a list of regular expressions.
7496
7497 @end table
7498
7499 @item W W p
7500 @kindex W W p (Summary)
7501 @findex gnus-article-hide-pgp
7502 @vindex gnus-article-hide-pgp-hook
7503 Hide @sc{pgp} signatures (@code{gnus-article-hide-pgp}).  The
7504 @code{gnus-article-hide-pgp-hook} hook will be run after a @sc{pgp}
7505 signature has been hidden.  For example, to automatically verify
7506 articles that have signatures in them do:
7507 @lisp
7508 ;;; Hide pgp cruft if any.
7509
7510 (setq gnus-treat-strip-pgp t)
7511
7512 ;;; After hiding pgp, verify the message;
7513 ;;; only happens if pgp signature is found.
7514
7515 (add-hook 'gnus-article-hide-pgp-hook
7516           (lambda ()
7517             (save-excursion
7518               (set-buffer gnus-original-article-buffer)
7519               (mc-verify))))
7520 @end lisp
7521
7522 @item W W P
7523 @kindex W W P (Summary)
7524 @findex gnus-article-hide-pem
7525 Hide @sc{pem} (privacy enhanced messages) cruft
7526 (@code{gnus-article-hide-pem}).
7527
7528 @item W W B
7529 @kindex W W B (Summary)
7530 @findex gnus-article-strip-banner
7531 @cindex banner
7532 @cindex OneList
7533 @cindex stripping advertisements
7534 @cindex advertisements
7535 Strip the banner specified by the @code{banner} group parameter
7536 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
7537 annoying banners and/or signatures that some mailing lists and moderated
7538 groups adds to all the messages.  The way to use this function is to add
7539 the @code{banner} group parameter (@pxref{Group Parameters}) to the
7540 group you want banners stripped from.  The parameter either be a string,
7541 which will be interpreted as a regular expression matching text to be
7542 removed, or the symbol @code{signature}, meaning that the (last)
7543 signature should be removed, or other symbol, meaning that the
7544 corresponding regular expression in @code{gnus-article-banner-alist} is
7545 used.
7546
7547 @item W W c
7548 @kindex W W c (Summary)
7549 @findex gnus-article-hide-citation
7550 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
7551 customizing the hiding:
7552
7553 @table @code
7554
7555 @item gnus-cited-opened-text-button-line-format
7556 @itemx gnus-cited-closed-text-button-line-format
7557 @vindex gnus-cited-closed-text-button-line-format
7558 @vindex gnus-cited-opened-text-button-line-format
7559 Gnus adds buttons to show where the cited text has been hidden, and to
7560 allow toggle hiding the text.  The format of the variable is specified
7561 by these format-like variable (@pxref{Formatting Variables}).  These
7562 specs are valid:
7563
7564 @table @samp
7565 @item b
7566 Starting point of the hidden text.
7567 @item e
7568 Ending point of the hidden text.
7569 @item l
7570 Number of characters in the hidden region.
7571 @item n
7572 Number of lines of hidden text.
7573 @end table
7574
7575 @item gnus-cited-lines-visible
7576 @vindex gnus-cited-lines-visible
7577 The number of lines at the beginning of the cited text to leave
7578 shown. This can also be a cons cell with the number of lines at the top
7579 and bottom of the text, respectively, to remain visible.
7580
7581 @end table
7582
7583 @item W W C-c
7584 @kindex W W C-c (Summary)
7585 @findex gnus-article-hide-citation-maybe
7586
7587 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
7588 following two variables:
7589
7590 @table @code
7591 @item gnus-cite-hide-percentage
7592 @vindex gnus-cite-hide-percentage
7593 If the cited text is of a bigger percentage than this variable (default
7594 50), hide the cited text.
7595
7596 @item gnus-cite-hide-absolute
7597 @vindex gnus-cite-hide-absolute
7598 The cited text must have at least this length (default 10) before it
7599 is hidden.
7600 @end table
7601
7602 @item W W C
7603 @kindex W W C (Summary)
7604 @findex gnus-article-hide-citation-in-followups
7605 Hide cited text in articles that aren't roots
7606 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
7607 useful as an interactive command, but might be a handy function to stick
7608 have happen automatically (@pxref{Customizing Articles}).
7609
7610 @end table
7611
7612 All these ``hiding'' commands are toggles, but if you give a negative
7613 prefix to these commands, they will show what they have previously
7614 hidden.  If you give a positive prefix, they will always hide.
7615
7616 Also @pxref{Article Highlighting} for further variables for
7617 citation customization.
7618
7619 @xref{Customizing Articles}, for how to hide article elements
7620 automatically.
7621
7622
7623 @node Article Washing
7624 @subsection Article Washing
7625 @cindex washing
7626 @cindex article washing
7627
7628 We call this ``article washing'' for a really good reason.  Namely, the
7629 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
7630
7631 @dfn{Washing} is defined by us as ``changing something from something to
7632 something else'', but normally results in something looking better.
7633 Cleaner, perhaps.
7634
7635 @xref{Customizing Articles}, if you want to change how Gnus displays
7636 articles by default.
7637
7638 @table @kbd
7639
7640 @item C-u g
7641 This is not really washing, it's sort of the opposite of washing.  If
7642 you type this, you see the article exactly as it exists on disk or on
7643 the server.
7644
7645 @item W l
7646 @kindex W l (Summary)
7647 @findex gnus-summary-stop-page-breaking
7648 Remove page breaks from the current article
7649 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
7650 delimiters.
7651
7652 @item W r
7653 @kindex W r (Summary)
7654 @findex gnus-summary-caesar-message
7655 @c @icon{gnus-summary-caesar-message}
7656 Do a Caesar rotate (rot13) on the article buffer
7657 (@code{gnus-summary-caesar-message}).
7658 Unreadable articles that tell you to read them with Caesar rotate or rot13.
7659 (Typically offensive jokes and such.)
7660
7661 It's commonly called ``rot13'' because each letter is rotated 13
7662 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
7663 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
7664 is rumored to have employed this form of, uh, somewhat weak encryption.
7665
7666 @item W t
7667 @item t
7668 @kindex W t (Summary)
7669 @kindex t (Summary)
7670 @findex gnus-article-toggle-headers
7671 Toggle whether to display all headers in the article buffer
7672 (@code{gnus-article-toggle-headers}).
7673
7674 @item W v
7675 @kindex W v (Summary)
7676 @findex gnus-summary-verbose-header
7677 Toggle whether to display all headers in the article buffer permanently
7678 (@code{gnus-summary-verbose-header}).
7679
7680 @item W m
7681 @kindex W m (Summary)
7682 @findex gnus-summary-toggle-mime
7683 Toggle whether to run the article through @sc{mime} before displaying
7684 (@code{gnus-summary-toggle-mime}).
7685
7686 @item W o
7687 @kindex W o (Summary)
7688 @findex gnus-article-treat-overstrike
7689 Treat overstrike (@code{gnus-article-treat-overstrike}).
7690
7691 @item W d
7692 @kindex W d (Summary)
7693 @findex gnus-article-treat-dumbquotes
7694 @vindex gnus-article-dumbquotes-map
7695 @cindex Smartquotes
7696 @cindex M****s*** sm*rtq**t*s
7697 @cindex Latin 1
7698 Treat M****s*** sm*rtq**t*s according to
7699 @code{gnus-article-dumbquotes-map}
7700 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
7701 whether a character is a sm*rtq**t* or not, so it should only be used
7702 interactively.
7703
7704 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
7705 an attempt to provide more quoting characters.  If you see something
7706 like @code{\222} or @code{\264} where you're expecting some kind of
7707 apostrophe or quotation mark, then try this wash.
7708
7709 @item W w
7710 @kindex W w (Summary)
7711 @findex gnus-article-fill-cited-article
7712 Do word wrap (@code{gnus-article-fill-cited-article}).
7713
7714 You can give the command a numerical prefix to specify the width to use
7715 when filling.
7716
7717 @item W Q
7718 @kindex W Q (Summary)
7719 @findex gnus-article-fill-long-lines
7720 Fill long lines (@code{gnus-article-fill-long-lines}).
7721
7722 @item W C
7723 @kindex W C (Summary)
7724 @findex gnus-article-capitalize-sentences
7725 Capitalize the first word in each sentence
7726 (@code{gnus-article-capitalize-sentences}).
7727
7728 @item W c
7729 @kindex W c (Summary)
7730 @findex gnus-article-remove-cr
7731 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
7732 (this takes care of DOS line endings), and then translate any remaining
7733 CRs into LF (this takes care of Mac line endings)
7734 (@code{gnus-article-remove-cr}).
7735
7736 @item W 6
7737 @kindex W 6 (Summary)
7738 @findex gnus-article-de-base64-unreadable
7739 Treat base64 (@code{gnus-article-de-base64-unreadable}).
7740 Base64 is one common @sc{mime} encoding employed when sending non-ASCII
7741 (i. e., 8-bit) articles.  Note that the this is usually done
7742 automatically by Gnus if the message in question has a
7743 @code{Content-Transfer-Encoding} header that says that this encoding has
7744 been done.
7745 If a prefix is given, a charset will be asked for.
7746
7747 @item W Z
7748 @kindex W Z (Summary)
7749 @findex gnus-article-decode-HZ
7750 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
7751 common encoding employed when sending Chinese articles.  It typically
7752 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
7753
7754 @item W h
7755 @kindex W h (Summary)
7756 @findex gnus-article-wash-html
7757 Treat HTML (@code{gnus-article-wash-html}).
7758 Note that the this is usually done automatically by Gnus if the message
7759 in question has a @code{Content-Type} header that says that this type
7760 has been done.
7761 If a prefix is given, a charset will be asked for.
7762
7763 @item W f
7764 @kindex W f (Summary)
7765 @cindex x-face
7766 @findex gnus-article-display-x-face
7767 @findex gnus-article-x-face-command
7768 @vindex gnus-article-x-face-command
7769 @vindex gnus-article-x-face-too-ugly
7770 @iftex
7771 @iflatex
7772 \include{xface}
7773 @end iflatex
7774 @end iftex
7775 @c @anchor{X-Face}
7776 Look for and display any X-Face headers
7777 (@code{gnus-article-display-x-face}).  The command executed by this
7778 function is given by the @code{gnus-article-x-face-command} variable.
7779 If this variable is a string, this string will be executed in a
7780 sub-shell.  If it is a function, this function will be called with the
7781 face as the argument.  If the @code{gnus-article-x-face-too-ugly} (which
7782 is a regexp) matches the @code{From} header, the face will not be shown.
7783 The default action under Emacs is to fork off the @code{display}
7784 program@footnote{@code{display} is from the ImageMagick package.  For the
7785 @code{uncompface} and @code{icontopbm} programs look for a package
7786 like `compface' or `faces-xface' on a GNU/Linux system.}
7787 to view the face.  Under XEmacs or Emacs 21+ with suitable image
7788 support, the default action is to display the face before the
7789 @code{From} header.  (It's nicer if XEmacs has been compiled with X-Face
7790 support---that will make display somewhat faster.  If there's no native
7791 X-Face support, Gnus will try to convert the @code{X-Face} header using
7792 external programs from the @code{pbmplus} package and
7793 friends.@footnote{On a GNU/Linux system look for packages with names
7794 like @code{netpbm} or @code{libgr-progs}.})  If you
7795 want to have this function in the display hook, it should probably come
7796 last.
7797
7798 @item W b
7799 @kindex W b (Summary)
7800 @findex gnus-article-add-buttons
7801 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
7802 @xref{Article Buttons}.
7803
7804 @item W B
7805 @kindex W B (Summary)
7806 @findex gnus-article-add-buttons-to-head
7807 Add clickable buttons to the article headers
7808 (@code{gnus-article-add-buttons-to-head}).
7809
7810 @item W p
7811 @kindex W p (Summary)
7812 @findex gnus-article-verify-x-pgp-sig
7813 Verify a signed control message (@code{gnus-article-verify-x-pgp-sig}).
7814 Control messages such as @code{newgroup} and @code{checkgroups} are
7815 usually signed by the hierarchy maintainer.  You need to add the PGP
7816 public key of the maintainer to your keyring to verify the
7817 message.@footnote{PGP keys for many hierarchies are available at
7818 @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
7819
7820 @item W W H
7821 @kindex W W H (Summary)
7822 @findex gnus-article-strip-headers-from-body
7823 Strip headers like the @code{X-No-Archive} header from the beginning of
7824 article bodies (@code{gnus-article-strip-headers-from-body}).
7825
7826 @item W E l
7827 @kindex W E l (Summary)
7828 @findex gnus-article-strip-leading-blank-lines
7829 Remove all blank lines from the beginning of the article
7830 (@code{gnus-article-strip-leading-blank-lines}).
7831
7832 @item W E m
7833 @kindex W E m (Summary)
7834 @findex gnus-article-strip-multiple-blank-lines
7835 Replace all blank lines with empty lines and then all multiple empty
7836 lines with a single empty line.
7837 (@code{gnus-article-strip-multiple-blank-lines}).
7838
7839 @item W E t
7840 @kindex W E t (Summary)
7841 @findex gnus-article-remove-trailing-blank-lines
7842 Remove all blank lines at the end of the article
7843 (@code{gnus-article-remove-trailing-blank-lines}).
7844
7845 @item W E a
7846 @kindex W E a (Summary)
7847 @findex gnus-article-strip-blank-lines
7848 Do all the three commands above
7849 (@code{gnus-article-strip-blank-lines}).
7850
7851 @item W E A
7852 @kindex W E A (Summary)
7853 @findex gnus-article-strip-all-blank-lines
7854 Remove all blank lines
7855 (@code{gnus-article-strip-all-blank-lines}).
7856
7857 @item W E s
7858 @kindex W E s (Summary)
7859 @findex gnus-article-strip-leading-space
7860 Remove all white space from the beginning of all lines of the article
7861 body (@code{gnus-article-strip-leading-space}).
7862
7863 @item W E e
7864 @kindex W E e (Summary)
7865 @findex gnus-article-strip-trailing-space
7866 Remove all white space from the end of all lines of the article
7867 body (@code{gnus-article-strip-trailing-space}).
7868
7869 @end table
7870
7871 @xref{Customizing Articles}, for how to wash articles automatically.
7872
7873
7874 @node Article Buttons
7875 @subsection Article Buttons
7876 @cindex buttons
7877
7878 People often include references to other stuff in articles, and it would
7879 be nice if Gnus could just fetch whatever it is that people talk about
7880 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
7881 button on these references.
7882
7883 Gnus adds @dfn{buttons} to certain standard references by default:
7884 Well-formed URLs, mail addresses and Message-IDs.  This is controlled by
7885 two variables, one that handles article bodies and one that handles
7886 article heads:
7887
7888 @table @code
7889
7890 @item gnus-button-alist
7891 @vindex gnus-button-alist
7892 This is an alist where each entry has this form:
7893
7894 @lisp
7895 (REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
7896 @end lisp
7897
7898 @table @var
7899
7900 @item regexp
7901 All text that match this regular expression will be considered an
7902 external reference.  Here's a typical regexp that matches embedded URLs:
7903 @samp{<URL:\\([^\n\r>]*\\)>}.
7904
7905 @item button-par
7906 Gnus has to know which parts of the matches is to be highlighted.  This
7907 is a number that says what sub-expression of the regexp is to be
7908 highlighted.  If you want it all highlighted, you use 0 here.
7909
7910 @item use-p
7911 This form will be @code{eval}ed, and if the result is non-@code{nil},
7912 this is considered a match.  This is useful if you want extra sifting to
7913 avoid false matches.
7914
7915 @item function
7916 This function will be called when you click on this button.
7917
7918 @item data-par
7919 As with @var{button-par}, this is a sub-expression number, but this one
7920 says which part of the match is to be sent as data to @var{function}.
7921
7922 @end table
7923
7924 So the full entry for buttonizing URLs is then
7925
7926 @lisp
7927 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
7928 @end lisp
7929
7930 @item gnus-header-button-alist
7931 @vindex gnus-header-button-alist
7932 This is just like the other alist, except that it is applied to the
7933 article head only, and that each entry has an additional element that is
7934 used to say what headers to apply the buttonize coding to:
7935
7936 @lisp
7937 (HEADER REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
7938 @end lisp
7939
7940 @var{header} is a regular expression.
7941
7942 @item gnus-button-url-regexp
7943 @vindex gnus-button-url-regexp
7944 A regular expression that matches embedded URLs.  It is used in the
7945 default values of the variables above.
7946
7947 @item gnus-article-button-face
7948 @vindex gnus-article-button-face
7949 Face used on buttons.
7950
7951 @item gnus-article-mouse-face
7952 @vindex gnus-article-mouse-face
7953 Face used when the mouse cursor is over a button.
7954
7955 @end table
7956
7957 @xref{Customizing Articles}, for how to buttonize articles automatically.
7958
7959
7960 @node Article Date
7961 @subsection Article Date
7962
7963 The date is most likely generated in some obscure timezone you've never
7964 heard of, so it's quite nice to be able to find out what the time was
7965 when the article was sent.
7966
7967 @table @kbd
7968
7969 @item W T u
7970 @kindex W T u (Summary)
7971 @findex gnus-article-date-ut
7972 Display the date in UT (aka. GMT, aka ZULU)
7973 (@code{gnus-article-date-ut}).
7974
7975 @item W T i
7976 @kindex W T i (Summary)
7977 @findex gnus-article-date-iso8601
7978 @cindex ISO 8601
7979 Display the date in international format, aka. ISO 8601
7980 (@code{gnus-article-date-iso8601}).
7981
7982 @item W T l
7983 @kindex W T l (Summary)
7984 @findex gnus-article-date-local
7985 Display the date in the local timezone (@code{gnus-article-date-local}).
7986
7987 @item W T p
7988 @kindex W T p (Summary)
7989 @findex gnus-article-date-english
7990 Display the date in a format that's easily pronounceable in English
7991 (@code{gnus-article-date-english}).
7992
7993 @item W T s
7994 @kindex W T s (Summary)
7995 @vindex gnus-article-time-format
7996 @findex gnus-article-date-user
7997 @findex format-time-string
7998 Display the date using a user-defined format
7999 (@code{gnus-article-date-user}).  The format is specified by the
8000 @code{gnus-article-time-format} variable, and is a string that's passed
8001 to @code{format-time-string}.  See the documentation of that variable
8002 for a list of possible format specs.
8003
8004 @item W T e
8005 @kindex W T e (Summary)
8006 @findex gnus-article-date-lapsed
8007 @findex gnus-start-date-timer
8008 @findex gnus-stop-date-timer
8009 Say how much time has elapsed between the article was posted and now
8010 (@code{gnus-article-date-lapsed}).  It looks something like:
8011
8012 @example
8013 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8014 @end example
8015
8016 The value of @code{gnus-article-date-lapsed-new-header} determines
8017 whether this header will just be added below the old Date one, or will
8018 replace it.
8019
8020 An advantage of using Gnus to read mail is that it converts simple bugs
8021 into wonderful absurdities.
8022
8023 If you want to have this line updated continually, you can put
8024
8025 @lisp
8026 (gnus-start-date-timer)
8027 @end lisp
8028
8029 in your @file{.gnus.el} file, or you can run it off of some hook.  If
8030 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8031 command.
8032
8033 @item W T o
8034 @kindex W T o (Summary)
8035 @findex gnus-article-date-original
8036 Display the original date (@code{gnus-article-date-original}).  This can
8037 be useful if you normally use some other conversion function and are
8038 worried that it might be doing something totally wrong.  Say, claiming
8039 that the article was posted in 1854.  Although something like that is
8040 @emph{totally} impossible.  Don't you trust me? *titter*
8041
8042 @end table
8043
8044 @xref{Customizing Articles}, for how to display the date in your
8045 preferred format automatically.
8046
8047
8048 @node Article Signature
8049 @subsection Article Signature
8050 @cindex signatures
8051 @cindex article signature
8052
8053 @vindex gnus-signature-separator
8054 Each article is divided into two parts---the head and the body.  The
8055 body can be divided into a signature part and a text part.  The variable
8056 that says what is to be considered a signature is
8057 @code{gnus-signature-separator}.  This is normally the standard
8058 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
8059 non-standard signature separators, so this variable can also be a list
8060 of regular expressions to be tested, one by one.  (Searches are done
8061 from the end of the body towards the beginning.)  One likely value is:
8062
8063 @lisp
8064 (setq gnus-signature-separator
8065       '("^-- $"         ; The standard
8066         "^-- *$"        ; A common mangling
8067         "^-------*$"    ; Many people just use a looong
8068                         ; line of dashes.  Shame!
8069         "^ *--------*$" ; Double-shame!
8070         "^________*$"   ; Underscores are also popular
8071         "^========*$")) ; Pervert!
8072 @end lisp
8073
8074 The more permissive you are, the more likely it is that you'll get false
8075 positives.
8076
8077 @vindex gnus-signature-limit
8078 @code{gnus-signature-limit} provides a limit to what is considered a
8079 signature when displaying articles.
8080
8081 @enumerate
8082 @item
8083 If it is an integer, no signature may be longer (in characters) than
8084 that integer.
8085 @item
8086 If it is a floating point number, no signature may be longer (in lines)
8087 than that number.
8088 @item
8089 If it is a function, the function will be called without any parameters,
8090 and if it returns @code{nil}, there is no signature in the buffer.
8091 @item
8092 If it is a string, it will be used as a regexp.  If it matches, the text
8093 in question is not a signature.
8094 @end enumerate
8095
8096 This variable can also be a list where the elements may be of the types
8097 listed above.  Here's an example:
8098
8099 @lisp
8100 (setq gnus-signature-limit
8101       '(200.0 "^---*Forwarded article"))
8102 @end lisp
8103
8104 This means that if there are more than 200 lines after the signature
8105 separator, or the text after the signature separator is matched by
8106 the regular expression @samp{^---*Forwarded article}, then it isn't a
8107 signature after all.
8108
8109
8110 @node Article Miscellania
8111 @subsection Article Miscellania
8112
8113 @table @kbd
8114 @item A t
8115 @kindex A t (Summary)
8116 @findex gnus-article-babel
8117 Translate the article from one language to another
8118 (@code{gnus-article-babel}).
8119
8120 @end table
8121
8122
8123 @node MIME Commands
8124 @section @sc{mime} Commands
8125 @cindex MIME decoding
8126 @cindex attachments
8127 @cindex viewing attachments
8128
8129 The following commands all understand the numerical prefix.  For
8130 instance, @kbd{3 b} means ``view the third @sc{mime} part''.
8131
8132 @table @kbd
8133 @item b
8134 @itemx K v
8135 @kindex b (Summary)
8136 @kindex K v (Summary)
8137 View the @sc{mime} part.
8138
8139 @item K o
8140 @kindex K o (Summary)
8141 Save the @sc{mime} part.
8142
8143 @item K c
8144 @kindex K c (Summary)
8145 Copy the @sc{mime} part.
8146
8147 @item K e
8148 @kindex K e (Summary)
8149 View the @sc{mime} part externally.
8150
8151 @item K i
8152 @kindex K i (Summary)
8153 View the @sc{mime} part internally.
8154
8155 @item K |
8156 @kindex K | (Summary)
8157 Pipe the @sc{mime} part to an external command.
8158 @end table
8159
8160 The rest of these @sc{mime} commands do not use the numerical prefix in
8161 the same manner:
8162
8163 @table @kbd
8164 @item K b
8165 @kindex K b (Summary)
8166 Make all the @sc{mime} parts have buttons in front of them.  This is
8167 mostly useful if you wish to save (or perform other actions) on inlined
8168 parts.
8169
8170 @item K m
8171 @kindex K m (Summary)
8172 @findex gnus-summary-repair-multipart
8173 Some multipart messages are transmitted with missing or faulty headers.
8174 This command will attempt to ``repair'' these messages so that they can
8175 be viewed in a more pleasant manner
8176 (@code{gnus-summary-repair-multipart}).
8177
8178 @item X m
8179 @kindex X m (Summary)
8180 @findex gnus-summary-save-parts
8181 Save all parts matching a @sc{mime} type to a directory
8182 (@code{gnus-summary-save-parts}).  Understands the process/prefix
8183 convention (@pxref{Process/Prefix}).
8184
8185 @item M-t
8186 @kindex M-t (Summary)
8187 @findex gnus-summary-display-buttonized
8188 Toggle the buttonized display of the article buffer
8189 (@code{gnus-summary-toggle-display-buttonized}).
8190
8191 @item W M w
8192 @kindex W M w (Summary)
8193 Decode RFC 2047-encoded words in the article headers
8194 (@code{gnus-article-decode-mime-words}).
8195
8196 @item W M c
8197 @kindex W M c (Summary)
8198 Decode encoded article bodies as well as charsets
8199 (@code{gnus-article-decode-charset}).
8200
8201 This command looks in the @code{Content-Type} header to determine the
8202 charset.  If there is no such header in the article, you can give it a
8203 prefix, which will prompt for the charset to decode as.  In regional
8204 groups where people post using some common encoding (but do not include
8205 MIME headers), you can set the @code{charset} group/topic parameter to
8206 the required charset (@pxref{Group Parameters}).
8207
8208 @item W M v
8209 @kindex W M v (Summary)
8210 View all the @sc{mime} parts in the current article
8211 (@code{gnus-mime-view-all-parts}).
8212
8213 @end table
8214
8215 Relevant variables:
8216
8217 @table @code
8218 @item gnus-ignored-mime-types
8219 @vindex gnus-ignored-mime-types
8220 This is a list of regexps.  @sc{mime} types that match a regexp from
8221 this list will be completely ignored by Gnus.  The default value is
8222 @code{nil}.
8223
8224 To have all Vcards be ignored, you'd say something like this:
8225
8226 @lisp
8227 (setq gnus-ignored-mime-types
8228       '("text/x-vcard"))
8229 @end lisp
8230
8231 @item gnus-unbuttonized-mime-types
8232 @vindex gnus-unbuttonized-mime-types
8233 This is a list of regexps.  @sc{mime} types that match a regexp from
8234 this list won't have @sc{mime} buttons inserted unless they aren't
8235 displayed.  The default value is @code{(".*/.*")}.
8236
8237 @item gnus-article-mime-part-function
8238 @vindex gnus-article-mime-part-function
8239 For each @sc{mime} part, this function will be called with the @sc{mime}
8240 handle as the parameter.  The function is meant to be used to allow
8241 users to gather information from the article (e. g., add Vcard info to
8242 the bbdb database) or to do actions based on parts (e. g., automatically
8243 save all jpegs into some directory).
8244
8245 Here's an example function the does the latter:
8246
8247 @lisp
8248 (defun my-save-all-jpeg-parts (handle)
8249   (when (equal (car (mm-handle-type handle)) "image/jpeg")
8250     (with-temp-buffer
8251       (insert (mm-get-part handle))
8252       (write-region (point-min) (point-max)
8253                     (read-file-name "Save jpeg to: ")))))
8254 (setq gnus-article-mime-part-function
8255       'my-save-all-jpeg-parts)
8256 @end lisp
8257
8258 @vindex gnus-mime-multipart-functions
8259 @item gnus-mime-multipart-functions
8260 Alist of @sc{mime} multipart types and functions to handle them.
8261
8262 @vindex mm-file-name-rewrite-functions
8263 @item mm-file-name-rewrite-functions
8264 List of functions used for rewriting file names of @sc{mime} parts.
8265 Each function takes a file name as input and returns a file name.
8266
8267 Ready-made functions include@*
8268 @code{mm-file-name-delete-whitespace},
8269 @code{mm-file-name-trim-whitespace},
8270 @code{mm-file-name-collapse-whitespace}, and
8271 @code{mm-file-name-replace-whitespace}.  The later uses the value of
8272 the variable @code{mm-file-name-replace-whitespace} to replace each
8273 whitespace character in a file name with that string; default value
8274 is @code{"_"} (a single underscore).
8275 @findex mm-file-name-delete-whitespace
8276 @findex mm-file-name-trim-whitespace
8277 @findex mm-file-name-collapse-whitespace
8278 @findex mm-file-name-replace-whitespace
8279 @vindex mm-file-name-replace-whitespace
8280
8281 The standard functions @code{capitalize}, @code{downcase},
8282 @code{upcase}, and @code{upcase-initials} may be useful, too.
8283
8284 Everybody knows that whitespace characters in file names are evil,
8285 except those who don't know.  If you receive lots of attachments from
8286 such unenlightened users, you can make live easier by adding
8287
8288 @lisp
8289 (setq mm-file-name-rewrite-functions
8290       '(mm-file-name-trim-whitespace
8291         mm-file-name-collapse-whitespace
8292         mm-file-name-replace-whitespace))
8293 @end lisp
8294
8295 @noindent
8296 to your @file{.gnus} file.
8297
8298 @end table
8299
8300
8301 @node Charsets
8302 @section Charsets
8303 @cindex charsets
8304
8305 People use different charsets, and we have @sc{mime} to let us know what
8306 charsets they use.  Or rather, we wish we had.  Many people use
8307 newsreaders and mailers that do not understand or use @sc{mime}, and
8308 just send out messages without saying what character sets they use.  To
8309 help a bit with this, some local news hierarchies have policies that say
8310 what character set is the default.  For instance, the @samp{fj}
8311 hierarchy uses @code{iso-2022-jp-2}.
8312
8313 @vindex gnus-group-charset-alist
8314 This knowledge is encoded in the @code{gnus-group-charset-alist}
8315 variable, which is an alist of regexps (use the first item to match full
8316 group names) and default charsets to be used when reading these groups.
8317
8318 In addition, some people do use soi-disant @sc{mime}-aware agents that
8319 aren't.  These blithely mark messages as being in @code{iso-8859-1} even
8320 if they really are in @code{koi-8}.  To help here, the
8321 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
8322 charsets that are listed here will be ignored.  The variable can be set
8323 on a group-by-group basis using the group parameters (@pxref{Group
8324 Parameters}).  The default value is @code{(unknown-8bit)}, which is
8325 something some agents insist on having in there.
8326
8327 @vindex gnus-group-posting-charset-alist
8328 When posting, @code{gnus-group-posting-charset-alist} is used to
8329 determine which charsets should not be encoded using the @sc{mime}
8330 encodings.  For instance, some hierarchies discourage using
8331 quoted-printable header encoding.
8332
8333 This variable is an alist of regexps and permitted unencoded charsets
8334 for posting.  Each element of the alist has the form @code{(}@var{test
8335 header body-list}@code{)}, where:
8336
8337 @table @var
8338 @item test
8339 is either a regular expression matching the newsgroup header or a
8340 variable to query,
8341 @item header
8342 is the charset which may be left unencoded in the header (@code{nil}
8343 means encode all charsets),
8344 @item body-list
8345 is a list of charsets which may be encoded using 8bit content-transfer
8346 encoding in the body, or one of the special values @code{nil} (always
8347 encode using quoted-printable) or @code{t} (always use 8bit).
8348 @end table
8349
8350 @cindex Russian
8351 @cindex koi8-r
8352 @cindex koi8-u
8353 @cindex iso-8859-5
8354 @cindex coding system aliases
8355 @cindex preferred charset
8356
8357 Other charset tricks that may be useful, although not Gnus-specific:
8358
8359 If there are several @sc{mime} charsets that encode the same Emacs
8360 charset, you can choose what charset to use by saying the following:
8361
8362 @lisp
8363 (put-charset-property 'cyrillic-iso8859-5
8364                       'preferred-coding-system 'koi8-r)
8365 @end lisp
8366
8367 This means that Russian will be encoded using @code{koi8-r} instead of
8368 the default @code{iso-8859-5} @sc{mime} charset.
8369
8370 If you want to read messages in @code{koi8-u}, you can cheat and say
8371
8372 @lisp
8373 (define-coding-system-alias 'koi8-u 'koi8-r)
8374 @end lisp
8375
8376 This will almost do the right thing.
8377
8378 And finally, to read charsets like @code{windows-1251}, you can say
8379 something like
8380
8381 @lisp
8382 (codepage-setup 1251)
8383 (define-coding-system-alias 'windows-1251 'cp1251)
8384 @end lisp
8385
8386
8387 @node Article Commands
8388 @section Article Commands
8389
8390 @table @kbd
8391
8392 @item A P
8393 @cindex PostScript
8394 @cindex printing
8395 @kindex A P (Summary)
8396 @vindex gnus-ps-print-hook
8397 @findex gnus-summary-print-article
8398 Generate and print a PostScript image of the article buffer
8399 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will be
8400 run just before printing the buffer.
8401
8402 @end table
8403
8404
8405 @node Summary Sorting
8406 @section Summary Sorting
8407 @cindex summary sorting
8408
8409 You can have the summary buffer sorted in various ways, even though I
8410 can't really see why you'd want that.
8411
8412 @table @kbd
8413
8414 @item C-c C-s C-n
8415 @kindex C-c C-s C-n (Summary)
8416 @findex gnus-summary-sort-by-number
8417 Sort by article number (@code{gnus-summary-sort-by-number}).
8418
8419 @item C-c C-s C-a
8420 @kindex C-c C-s C-a (Summary)
8421 @findex gnus-summary-sort-by-author
8422 Sort by author (@code{gnus-summary-sort-by-author}).
8423
8424 @item C-c C-s C-s
8425 @kindex C-c C-s C-s (Summary)
8426 @findex gnus-summary-sort-by-subject
8427 Sort by subject (@code{gnus-summary-sort-by-subject}).
8428
8429 @item C-c C-s C-d
8430 @kindex C-c C-s C-d (Summary)
8431 @findex gnus-summary-sort-by-date
8432 Sort by date (@code{gnus-summary-sort-by-date}).
8433
8434 @item C-c C-s C-l
8435 @kindex C-c C-s C-l (Summary)
8436 @findex gnus-summary-sort-by-lines
8437 Sort by lines (@code{gnus-summary-sort-by-lines}).
8438
8439 @item C-c C-s C-c
8440 @kindex C-c C-s C-c (Summary)
8441 @findex gnus-summary-sort-by-chars
8442 Sort by article length (@code{gnus-summary-sort-by-chars}).
8443
8444 @item C-c C-s C-i
8445 @kindex C-c C-s C-i (Summary)
8446 @findex gnus-summary-sort-by-score
8447 Sort by score (@code{gnus-summary-sort-by-score}).
8448
8449 @item C-c C-s C-o
8450 @kindex C-c C-s C-o (Summary)
8451 @findex gnus-summary-sort-by-original
8452 Sort using the default sorting method
8453 (@code{gnus-summary-sort-by-original}).
8454 @end table
8455
8456 These functions will work both when you use threading and when you don't
8457 use threading.  In the latter case, all summary lines will be sorted,
8458 line by line.  In the former case, sorting will be done on a
8459 root-by-root basis, which might not be what you were looking for.  To
8460 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
8461 Commands}).
8462
8463
8464 @node Finding the Parent
8465 @section Finding the Parent
8466 @cindex parent articles
8467 @cindex referring articles
8468
8469 @table @kbd
8470 @item ^
8471 @kindex ^ (Summary)
8472 @findex gnus-summary-refer-parent-article
8473 If you'd like to read the parent of the current article, and it is not
8474 displayed in the summary buffer, you might still be able to.  That is,
8475 if the current group is fetched by @sc{nntp}, the parent hasn't expired
8476 and the @code{References} in the current article are not mangled, you
8477 can just press @kbd{^} or @kbd{A r}
8478 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
8479 you'll get the parent.  If the parent is already displayed in the
8480 summary buffer, point will just move to this article.
8481
8482 If given a positive numerical prefix, fetch that many articles back into
8483 the ancestry.  If given a negative numerical prefix, fetch just that
8484 ancestor.  So if you say @kbd{3 ^}, gnus will fetch the parent, the
8485 grandparent and the grandgrandparent of the current article.  If you say
8486 @kbd{-3 ^}, gnus will only fetch the grandgrandparent of the current
8487 article.
8488
8489 @item A R (Summary)
8490 @findex gnus-summary-refer-references
8491 @kindex A R (Summary)
8492 Fetch all articles mentioned in the @code{References} header of the
8493 article (@code{gnus-summary-refer-references}).
8494
8495 @item A T (Summary)
8496 @findex gnus-summary-refer-thread
8497 @kindex A T (Summary)
8498 Display the full thread where the current article appears
8499 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
8500 headers in the current group to work, so it usually takes a while.  If
8501 you do it often, you may consider setting @code{gnus-fetch-old-headers}
8502 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
8503 visible effects normally, but it'll make this command work a whole lot
8504 faster.  Of course, it'll make group entry somewhat slow.
8505
8506 @vindex gnus-refer-thread-limit
8507 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
8508 articles before the first displayed in the current group) headers to
8509 fetch when doing this command.  The default is 200.  If @code{t}, all
8510 the available headers will be fetched.  This variable can be overridden
8511 by giving the @kbd{A T} command a numerical prefix.
8512
8513 @item M-^ (Summary)
8514 @findex gnus-summary-refer-article
8515 @kindex M-^ (Summary)
8516 @cindex Message-ID
8517 @cindex fetching by Message-ID
8518 You can also ask the @sc{nntp} server for an arbitrary article, no
8519 matter what group it belongs to.  @kbd{M-^}
8520 (@code{gnus-summary-refer-article}) will ask you for a
8521 @code{Message-ID}, which is one of those long, hard-to-read thingies
8522 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
8523 have to get it all exactly right.  No fuzzy searches, I'm afraid.
8524 @end table
8525
8526 The current select method will be used when fetching by
8527 @code{Message-ID} from non-news select method, but you can override this
8528 by giving this command a prefix.
8529
8530 @vindex gnus-refer-article-method
8531 If the group you are reading is located on a backend that does not
8532 support fetching by @code{Message-ID} very well (like @code{nnspool}),
8533 you can set @code{gnus-refer-article-method} to an @sc{nntp} method.  It
8534 would, perhaps, be best if the @sc{nntp} server you consult is the one
8535 updating the spool you are reading from, but that's not really
8536 necessary.
8537
8538 It can also be a list of select methods, as well as the special symbol
8539 @code{current}, which means to use the current select method.  If it
8540 is a list, Gnus will try all the methods in the list until it finds a
8541 match.
8542
8543 Here's an example setting that will first try the current method, and
8544 then ask Deja if that fails:
8545
8546 @lisp
8547 (setq gnus-refer-article-method
8548       '(current
8549         (nnweb "refer" (nnweb-type dejanews))))
8550 @end lisp
8551
8552 Most of the mail backends support fetching by @code{Message-ID}, but do
8553 not do a particularly excellent job at it.  That is, @code{nnmbox} and
8554 @code{nnbabyl} are able to locate articles from any groups, while
8555 @code{nnml} and @code{nnfolder} are only able to locate articles that
8556 have been posted to the current group.  (Anything else would be too time
8557 consuming.)  @code{nnmh} does not support this at all.
8558
8559
8560 @node Alternative Approaches
8561 @section Alternative Approaches
8562
8563 Different people like to read news using different methods.  This being
8564 gnus, we offer a small selection of minor modes for the summary buffers.
8565
8566 @menu
8567 * Pick and Read::               First mark articles and then read them.
8568 * Binary Groups::               Auto-decode all articles.
8569 @end menu
8570
8571
8572 @node Pick and Read
8573 @subsection Pick and Read
8574 @cindex pick and read
8575
8576 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
8577 a two-phased reading interface.  The user first marks in a summary
8578 buffer the articles she wants to read.  Then she starts reading the
8579 articles with just an article buffer displayed.
8580
8581 @findex gnus-pick-mode
8582 @kindex M-x gnus-pick-mode
8583 Gnus provides a summary buffer minor mode that allows
8584 this---@code{gnus-pick-mode}.  This basically means that a few process
8585 mark commands become one-keystroke commands to allow easy marking, and
8586 it provides one additional command for switching to the summary buffer.
8587
8588 Here are the available keystrokes when using pick mode:
8589
8590 @table @kbd
8591 @item .
8592 @kindex . (Pick)
8593 @findex gnus-pick-article-or-thread
8594 Pick the article or thread on the current line
8595 (@code{gnus-pick-article-or-thread}).  If the variable
8596 @code{gnus-thread-hide-subtree} is true, then this key selects the
8597 entire thread when used at the first article of the thread.  Otherwise,
8598 it selects just the article.  If given a numerical prefix, go to that
8599 thread or article and pick it.  (The line number is normally displayed
8600 at the beginning of the summary pick lines.)
8601
8602 @item SPACE
8603 @kindex SPACE (Pick)
8604 @findex gnus-pick-next-page
8605 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
8606 at the end of the buffer, start reading the picked articles.
8607
8608 @item u
8609 @kindex u (Pick)
8610 @findex gnus-pick-unmark-article-or-thread.
8611 Unpick the thread or article
8612 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
8613 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
8614 thread if used at the first article of the thread.  Otherwise it unpicks
8615 just the article.  You can give this key a numerical prefix to unpick
8616 the thread or article at that line.
8617
8618 @item RET
8619 @kindex RET (Pick)
8620 @findex gnus-pick-start-reading
8621 @vindex gnus-pick-display-summary
8622 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
8623 given a prefix, mark all unpicked articles as read first.  If
8624 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
8625 will still be visible when you are reading.
8626
8627 @end table
8628
8629 All the normal summary mode commands are still available in the
8630 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
8631 which is mapped to the same function
8632 @code{gnus-summary-tick-article-forward}.
8633
8634 If this sounds like a good idea to you, you could say:
8635
8636 @lisp
8637 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
8638 @end lisp
8639
8640 @vindex gnus-pick-mode-hook
8641 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
8642
8643 @vindex gnus-mark-unpicked-articles-as-read
8644 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
8645 all unpicked articles as read.  The default is @code{nil}.
8646
8647 @vindex gnus-summary-pick-line-format
8648 The summary line format in pick mode is slightly different from the
8649 standard format.  At the beginning of each line the line number is
8650 displayed.  The pick mode line format is controlled by the
8651 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
8652 Variables}).  It accepts the same format specs that
8653 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
8654
8655
8656 @node Binary Groups
8657 @subsection Binary Groups
8658 @cindex binary groups
8659
8660 @findex gnus-binary-mode
8661 @kindex M-x gnus-binary-mode
8662 If you spend much time in binary groups, you may grow tired of hitting
8663 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
8664 is a minor mode for summary buffers that makes all ordinary Gnus article
8665 selection functions uudecode series of articles and display the result
8666 instead of just displaying the articles the normal way.
8667
8668 @kindex g (Binary)
8669 @findex gnus-binary-show-article
8670 The only way, in fact, to see the actual articles is the @kbd{g}
8671 command, when you have turned on this mode
8672 (@code{gnus-binary-show-article}).
8673
8674 @vindex gnus-binary-mode-hook
8675 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
8676
8677
8678 @node Tree Display
8679 @section Tree Display
8680 @cindex trees
8681
8682 @vindex gnus-use-trees
8683 If you don't like the normal gnus summary display, you might try setting
8684 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
8685 additional @dfn{tree buffer}.  You can execute all summary mode commands
8686 in the tree buffer.
8687
8688 There are a few variables to customize the tree display, of course:
8689
8690 @table @code
8691 @item gnus-tree-mode-hook
8692 @vindex gnus-tree-mode-hook
8693 A hook called in all tree mode buffers.
8694
8695 @item gnus-tree-mode-line-format
8696 @vindex gnus-tree-mode-line-format
8697 A format string for the mode bar in the tree mode buffers (@pxref{Mode
8698 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
8699 of valid specs, @pxref{Summary Buffer Mode Line}.
8700
8701 @item gnus-selected-tree-face
8702 @vindex gnus-selected-tree-face
8703 Face used for highlighting the selected article in the tree buffer.  The
8704 default is @code{modeline}.
8705
8706 @item gnus-tree-line-format
8707 @vindex gnus-tree-line-format
8708 A format string for the tree nodes.  The name is a bit of a misnomer,
8709 though---it doesn't define a line, but just the node.  The default value
8710 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
8711 the name of the poster.  It is vital that all nodes are of the same
8712 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
8713
8714 Valid specs are:
8715
8716 @table @samp
8717 @item n
8718 The name of the poster.
8719 @item f
8720 The @code{From} header.
8721 @item N
8722 The number of the article.
8723 @item [
8724 The opening bracket.
8725 @item ]
8726 The closing bracket.
8727 @item s
8728 The subject.
8729 @end table
8730
8731 @xref{Formatting Variables}.
8732
8733 Variables related to the display are:
8734
8735 @table @code
8736 @item gnus-tree-brackets
8737 @vindex gnus-tree-brackets
8738 This is used for differentiating between ``real'' articles and
8739 ``sparse'' articles.  The format is @code{((@var{real-open} . @var{real-close})
8740 (@var{sparse-open} . @var{sparse-close}) (@var{dummy-open} . @var{dummy-close}))}, and the
8741 default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
8742
8743 @item gnus-tree-parent-child-edges
8744 @vindex gnus-tree-parent-child-edges
8745 This is a list that contains the characters used for connecting parent
8746 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
8747
8748 @end table
8749
8750 @item gnus-tree-minimize-window
8751 @vindex gnus-tree-minimize-window
8752 If this variable is non-@code{nil}, gnus will try to keep the tree
8753 buffer as small as possible to allow more room for the other gnus
8754 windows.  If this variable is a number, the tree buffer will never be
8755 higher than that number.  The default is @code{t}.  Note that if you
8756 have several windows displayed side-by-side in a frame and the tree
8757 buffer is one of these, minimizing the tree window will also resize all
8758 other windows displayed next to it.
8759
8760 @item gnus-generate-tree-function
8761 @vindex gnus-generate-tree-function
8762 @findex gnus-generate-horizontal-tree
8763 @findex gnus-generate-vertical-tree
8764 The function that actually generates the thread tree.  Two predefined
8765 functions are available: @code{gnus-generate-horizontal-tree} and
8766 @code{gnus-generate-vertical-tree} (which is the default).
8767
8768 @end table
8769
8770 Here's an example from a horizontal tree buffer:
8771
8772 @example
8773 @{***@}-(***)-[odd]-[Gun]
8774      |      \[Jan]
8775      |      \[odd]-[Eri]
8776      |      \(***)-[Eri]
8777      |            \[odd]-[Paa]
8778      \[Bjo]
8779      \[Gun]
8780      \[Gun]-[Jor]
8781 @end example
8782
8783 Here's the same thread displayed in a vertical tree buffer:
8784
8785 @example
8786 @{***@}
8787   |--------------------------\-----\-----\
8788 (***)                         [Bjo] [Gun] [Gun]
8789   |--\-----\-----\                          |
8790 [odd] [Jan] [odd] (***)                   [Jor]
8791   |           |     |--\
8792 [Gun]       [Eri] [Eri] [odd]
8793                           |
8794                         [Paa]
8795 @end example
8796
8797 If you're using horizontal trees, it might be nice to display the trees
8798 side-by-side with the summary buffer.  You could add something like the
8799 following to your @file{.gnus.el} file:
8800
8801 @lisp
8802 (setq gnus-use-trees t
8803       gnus-generate-tree-function 'gnus-generate-horizontal-tree
8804       gnus-tree-minimize-window nil)
8805 (gnus-add-configuration
8806  '(article
8807    (vertical 1.0
8808              (horizontal 0.25
8809                          (summary 0.75 point)
8810                          (tree 1.0))
8811              (article 1.0))))
8812 @end lisp
8813
8814 @xref{Window Layout}.
8815
8816
8817 @node Mail Group Commands
8818 @section Mail Group Commands
8819 @cindex mail group commands
8820
8821 Some commands only make sense in mail groups.  If these commands are
8822 invalid in the current group, they will raise a hell and let you know.
8823
8824 All these commands (except the expiry and edit commands) use the
8825 process/prefix convention (@pxref{Process/Prefix}).
8826
8827 @table @kbd
8828
8829 @item B e
8830 @kindex B e (Summary)
8831 @findex gnus-summary-expire-articles
8832 Run all expirable articles in the current group through the expiry
8833 process (@code{gnus-summary-expire-articles}).  That is, delete all
8834 expirable articles in the group that have been around for a while.
8835 (@pxref{Expiring Mail}).
8836
8837 @item B M-C-e
8838 @kindex B M-C-e (Summary)
8839 @findex gnus-summary-expire-articles-now
8840 Delete all the expirable articles in the group
8841 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
8842 articles eligible for expiry in the current group will
8843 disappear forever into that big @file{/dev/null} in the sky.
8844
8845 @item B DEL
8846 @kindex B DEL (Summary)
8847 @findex gnus-summary-delete-article
8848 @c @icon{gnus-summary-mail-delete}
8849 Delete the mail article.  This is ``delete'' as in ``delete it from your
8850 disk forever and ever, never to return again.'' Use with caution.
8851 (@code{gnus-summary-delete-article}).
8852
8853 @item B m
8854 @kindex B m (Summary)
8855 @cindex move mail
8856 @findex gnus-summary-move-article
8857 @vindex gnus-preserve-marks
8858 Move the article from one mail group to another
8859 (@code{gnus-summary-move-article}).  Marks will be preserved if
8860 @var{gnus-preserve-marks} is non-@code{nil} (which is the default).
8861
8862 @item B c
8863 @kindex B c (Summary)
8864 @cindex copy mail
8865 @findex gnus-summary-copy-article
8866 @c @icon{gnus-summary-mail-copy}
8867 Copy the article from one group (mail group or not) to a mail group
8868 (@code{gnus-summary-copy-article}).  Marks will be preserved if
8869 @var{gnus-preserve-marks} is non-@code{nil} (which is the default).
8870
8871 @item B B
8872 @kindex B B (Summary)
8873 @cindex crosspost mail
8874 @findex gnus-summary-crosspost-article
8875 Crosspost the current article to some other group
8876 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
8877 the article in the other group, and the Xref headers of the article will
8878 be properly updated.
8879
8880 @item B i
8881 @kindex B i (Summary)
8882 @findex gnus-summary-import-article
8883 Import an arbitrary file into the current mail newsgroup
8884 (@code{gnus-summary-import-article}).  You will be prompted for a file
8885 name, a @code{From} header and a @code{Subject} header.
8886
8887 @item B r
8888 @kindex B r (Summary)
8889 @findex gnus-summary-respool-article
8890 Respool the mail article (@code{gnus-summary-respool-article}).
8891 @code{gnus-summary-respool-default-method} will be used as the default
8892 select method when respooling.  This variable is @code{nil} by default,
8893 which means that the current group select method will be used instead.
8894 Marks will be preserved if @var{gnus-preserve-marks} is non-@code{nil}
8895 (which is the default).
8896
8897 @item B w
8898 @itemx e
8899 @kindex B w (Summary)
8900 @kindex e (Summary)
8901 @findex gnus-summary-edit-article
8902 @kindex C-c C-c (Article)
8903 Edit the current article (@code{gnus-summary-edit-article}).  To finish
8904 editing and make the changes permanent, type @kbd{C-c C-c}
8905 (@kbd{gnus-summary-edit-article-done}).  If you give a prefix to the
8906 @kbd{C-c C-c} command, gnus won't re-highlight the article.
8907
8908 @item B q
8909 @kindex B q (Summary)
8910 @findex gnus-summary-respool-query
8911 If you want to re-spool an article, you might be curious as to what group
8912 the article will end up in before you do the re-spooling.  This command
8913 will tell you (@code{gnus-summary-respool-query}).
8914
8915 @item B t
8916 @kindex B t (Summary)
8917 @findex gnus-summary-respool-trace
8918 Similarly, this command will display all fancy splitting patterns used
8919 when repooling, if any (@code{gnus-summary-respool-trace}).
8920
8921 @item B p
8922 @kindex B p (Summary)
8923 @findex gnus-summary-article-posted-p
8924 Some people have a tendency to send you "courtesy" copies when they
8925 follow up to articles you have posted.  These usually have a
8926 @code{Newsgroups} header in them, but not always.  This command
8927 (@code{gnus-summary-article-posted-p}) will try to fetch the current
8928 article from your news server (or rather, from
8929 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
8930 report back whether it found the article or not.  Even if it says that
8931 it didn't find the article, it may have been posted anyway---mail
8932 propagation is much faster than news propagation, and the news copy may
8933 just not have arrived yet.
8934
8935 @end table
8936
8937 @vindex gnus-move-split-methods
8938 @cindex moving articles
8939 If you move (or copy) articles regularly, you might wish to have gnus
8940 suggest where to put the articles.  @code{gnus-move-split-methods} is a
8941 variable that uses the same syntax as @code{gnus-split-methods}
8942 (@pxref{Saving Articles}).  You may customize that variable to create
8943 suggestions you find reasonable.  (Note that
8944 @code{gnus-move-split-methods} uses group names where
8945 @code{gnus-split-methods} uses file names.)
8946
8947 @lisp
8948 (setq gnus-move-split-methods
8949       '(("^From:.*Lars Magne" "nnml:junk")
8950         ("^Subject:.*gnus" "nnfolder:important")
8951         (".*" "nnml:misc")))
8952 @end lisp
8953
8954
8955 @node Various Summary Stuff
8956 @section Various Summary Stuff
8957
8958 @menu
8959 * Summary Group Information::   Information oriented commands.
8960 * Searching for Articles::      Multiple article commands.
8961 * Summary Generation Commands::  
8962 * Really Various Summary Commands::  Those pesky non-conformant commands.
8963 @end menu
8964
8965 @table @code
8966 @vindex gnus-summary-mode-hook
8967 @item gnus-summary-mode-hook
8968 This hook is called when creating a summary mode buffer.
8969
8970 @vindex gnus-summary-generate-hook
8971 @item gnus-summary-generate-hook
8972 This is called as the last thing before doing the threading and the
8973 generation of the summary buffer.  It's quite convenient for customizing
8974 the threading variables based on what data the newsgroup has.  This hook
8975 is called from the summary buffer after most summary buffer variables
8976 have been set.
8977
8978 @vindex gnus-summary-prepare-hook
8979 @item gnus-summary-prepare-hook
8980 It is called after the summary buffer has been generated.  You might use
8981 it to, for instance, highlight lines or modify the look of the buffer in
8982 some other ungodly manner.  I don't care.
8983
8984 @vindex gnus-summary-prepared-hook
8985 @item gnus-summary-prepared-hook
8986 A hook called as the very last thing after the summary buffer has been
8987 generated.
8988
8989 @vindex gnus-summary-ignore-duplicates
8990 @item gnus-summary-ignore-duplicates
8991 When gnus discovers two articles that have the same @code{Message-ID},
8992 it has to do something drastic.  No articles are allowed to have the
8993 same @code{Message-ID}, but this may happen when reading mail from some
8994 sources.  Gnus allows you to customize what happens with this variable.
8995 If it is @code{nil} (which is the default), gnus will rename the
8996 @code{Message-ID} (for display purposes only) and display the article as
8997 any other article.  If this variable is @code{t}, it won't display the
8998 article---it'll be as if it never existed.
8999
9000 @vindex gnus-alter-articles-to-read-function
9001 @item gnus-alter-articles-to-read-function
9002 This function, which takes two parameters (the group name and the list
9003 of articles to be selected), is called to allow the user to alter the
9004 list of articles to be selected.
9005
9006 For instance, the following function adds the list of cached articles to
9007 the list in one particular group:
9008
9009 @lisp
9010 (defun my-add-cached-articles (group articles)
9011   (if (string= group "some.group")
9012       (append gnus-newsgroup-cached articles)
9013     articles))
9014 @end lisp
9015
9016 @end table
9017
9018
9019 @node Summary Group Information
9020 @subsection Summary Group Information
9021
9022 @table @kbd
9023
9024 @item H f
9025 @kindex H f (Summary)
9026 @findex gnus-summary-fetch-faq
9027 @vindex gnus-group-faq-directory
9028 Try to fetch the FAQ (list of frequently asked questions) for the
9029 current group (@code{gnus-summary-fetch-faq}).  Gnus will try to get the
9030 FAQ from @code{gnus-group-faq-directory}, which is usually a directory
9031 on a remote machine.  This variable can also be a list of directories.
9032 In that case, giving a prefix to this command will allow you to choose
9033 between the various sites.  @code{ange-ftp} or @code{efs} will probably
9034 be used for fetching the file.
9035
9036 @item H d
9037 @kindex H d (Summary)
9038 @findex gnus-summary-describe-group
9039 Give a brief description of the current group
9040 (@code{gnus-summary-describe-group}).  If given a prefix, force
9041 rereading the description from the server.
9042
9043 @item H h
9044 @kindex H h (Summary)
9045 @findex gnus-summary-describe-briefly
9046 Give an extremely brief description of the most important summary
9047 keystrokes (@code{gnus-summary-describe-briefly}).
9048
9049 @item H i
9050 @kindex H i (Summary)
9051 @findex gnus-info-find-node
9052 Go to the gnus info node (@code{gnus-info-find-node}).
9053 @end table
9054
9055
9056 @node Searching for Articles
9057 @subsection Searching for Articles
9058
9059 @table @kbd
9060
9061 @item M-s
9062 @kindex M-s (Summary)
9063 @findex gnus-summary-search-article-forward
9064 Search through all subsequent (raw) articles for a regexp
9065 (@code{gnus-summary-search-article-forward}).
9066
9067 @item M-r
9068 @kindex M-r (Summary)
9069 @findex gnus-summary-search-article-backward
9070 Search through all previous (raw) articles for a regexp
9071 (@code{gnus-summary-search-article-backward}).
9072
9073 @item &
9074 @kindex & (Summary)
9075 @findex gnus-summary-execute-command
9076 This command will prompt you for a header, a regular expression to match
9077 on this field, and a command to be executed if the match is made
9078 (@code{gnus-summary-execute-command}).  If the header is an empty
9079 string, the match is done on the entire article.  If given a prefix,
9080 search backward instead.
9081
9082 For instance, @kbd{& RET some.*string #} will put the process mark on
9083 all articles that have heads or bodies that match @samp{some.*string}.
9084
9085 @item M-&
9086 @kindex M-& (Summary)
9087 @findex gnus-summary-universal-argument
9088 Perform any operation on all articles that have been marked with
9089 the process mark (@code{gnus-summary-universal-argument}).
9090 @end table
9091
9092 @node Summary Generation Commands
9093 @subsection Summary Generation Commands
9094
9095 @table @kbd
9096
9097 @item Y g
9098 @kindex Y g (Summary)
9099 @findex gnus-summary-prepare
9100 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
9101
9102 @item Y c
9103 @kindex Y c (Summary)
9104 @findex gnus-summary-insert-cached-articles
9105 Pull all cached articles (for the current group) into the summary buffer
9106 (@code{gnus-summary-insert-cached-articles}).
9107
9108 @end table
9109
9110
9111 @node Really Various Summary Commands
9112 @subsection Really Various Summary Commands
9113
9114 @table @kbd
9115
9116 @item A D
9117 @itemx C-d
9118 @kindex C-d (Summary)
9119 @kindex A D (Summary)
9120 @findex gnus-summary-enter-digest-group
9121 If the current article is a collection of other articles (for instance,
9122 a digest), you might use this command to enter a group based on the that
9123 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
9124 guess what article type is currently displayed unless you give a prefix
9125 to this command, which forces a ``digest'' interpretation.  Basically,
9126 whenever you see a message that is a collection of other messages of
9127 some format, you @kbd{C-d} and read these messages in a more convenient
9128 fashion.
9129
9130 @item M-C-d
9131 @kindex M-C-d (Summary)
9132 @findex gnus-summary-read-document
9133 This command is very similar to the one above, but lets you gather
9134 several documents into one biiig group
9135 (@code{gnus-summary-read-document}).  It does this by opening several
9136 @code{nndoc} groups for each document, and then opening an
9137 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
9138 command understands the process/prefix convention
9139 (@pxref{Process/Prefix}).
9140
9141 @item C-t
9142 @kindex C-t (Summary)
9143 @findex gnus-summary-toggle-truncation
9144 Toggle truncation of summary lines
9145 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
9146 line centering function in the summary buffer, so it's not a good idea
9147 to have truncation switched off while reading articles.
9148
9149 @item =
9150 @kindex = (Summary)
9151 @findex gnus-summary-expand-window
9152 Expand the summary buffer window (@code{gnus-summary-expand-window}).
9153 If given a prefix, force an @code{article} window configuration.
9154
9155 @item M-C-e
9156 @kindex M-C-e (Summary)
9157 @findex gnus-summary-edit-parameters
9158 Edit the group parameters (@pxref{Group Parameters}) of the current
9159 group (@code{gnus-summary-edit-parameters}).
9160
9161 @item M-C-a
9162 @kindex M-C-a (Summary)
9163 @findex gnus-summary-customize-parameters
9164 Customize the group parameters (@pxref{Group Parameters}) of the current
9165 group (@code{gnus-summary-customize-parameters}).
9166
9167 @end table
9168
9169
9170 @node Exiting the Summary Buffer
9171 @section Exiting the Summary Buffer
9172 @cindex summary exit
9173 @cindex exiting groups
9174
9175 Exiting from the summary buffer will normally update all info on the
9176 group and return you to the group buffer.
9177
9178 @table @kbd
9179
9180 @item Z Z
9181 @itemx q
9182 @kindex Z Z (Summary)
9183 @kindex q (Summary)
9184 @findex gnus-summary-exit
9185 @vindex gnus-summary-exit-hook
9186 @vindex gnus-summary-prepare-exit-hook
9187 @c @icon{gnus-summary-exit}
9188 Exit the current group and update all information on the group
9189 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
9190 called before doing much of the exiting, which calls
9191 @code{gnus-summary-expire-articles} by default.
9192 @code{gnus-summary-exit-hook} is called after finishing the exit
9193 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
9194 group mode having no more (unread) groups.
9195
9196 @item Z E
9197 @itemx Q
9198 @kindex Z E (Summary)
9199 @kindex Q (Summary)
9200 @findex gnus-summary-exit-no-update
9201 Exit the current group without updating any information on the group
9202 (@code{gnus-summary-exit-no-update}).
9203
9204 @item Z c
9205 @itemx c
9206 @kindex Z c (Summary)
9207 @kindex c (Summary)
9208 @findex gnus-summary-catchup-and-exit
9209 @c @icon{gnus-summary-catchup-and-exit}
9210 Mark all unticked articles in the group as read and then exit
9211 (@code{gnus-summary-catchup-and-exit}).
9212
9213 @item Z C
9214 @kindex Z C (Summary)
9215 @findex gnus-summary-catchup-all-and-exit
9216 Mark all articles, even the ticked ones, as read and then exit
9217 (@code{gnus-summary-catchup-all-and-exit}).
9218
9219 @item Z n
9220 @kindex Z n (Summary)
9221 @findex gnus-summary-catchup-and-goto-next-group
9222 Mark all articles as read and go to the next group
9223 (@code{gnus-summary-catchup-and-goto-next-group}).
9224
9225 @item Z R
9226 @kindex Z R (Summary)
9227 @findex gnus-summary-reselect-current-group
9228 Exit this group, and then enter it again
9229 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
9230 all articles, both read and unread.
9231
9232 @item Z G
9233 @itemx M-g
9234 @kindex Z G (Summary)
9235 @kindex M-g (Summary)
9236 @findex gnus-summary-rescan-group
9237 @c @icon{gnus-summary-mail-get}
9238 Exit the group, check for new articles in the group, and select the
9239 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
9240 articles, both read and unread.
9241
9242 @item Z N
9243 @kindex Z N (Summary)
9244 @findex gnus-summary-next-group
9245 Exit the group and go to the next group
9246 (@code{gnus-summary-next-group}).
9247
9248 @item Z P
9249 @kindex Z P (Summary)
9250 @findex gnus-summary-prev-group
9251 Exit the group and go to the previous group
9252 (@code{gnus-summary-prev-group}).
9253
9254 @item Z s
9255 @kindex Z s (Summary)
9256 @findex gnus-summary-save-newsrc
9257 Save the current number of read/marked articles in the dribble buffer
9258 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
9259 given a prefix, also save the @file{.newsrc} file(s).  Using this
9260 command will make exit without updating (the @kbd{Q} command) worthless.
9261 @end table
9262
9263 @vindex gnus-exit-group-hook
9264 @code{gnus-exit-group-hook} is called when you exit the current group
9265 with an ``updating'' exit.  For instance @kbd{Q}
9266 (@code{gnus-summary-exit-no-update}) does not call this hook.
9267
9268 @findex gnus-summary-wake-up-the-dead
9269 @findex gnus-dead-summary-mode
9270 @vindex gnus-kill-summary-on-exit
9271 If you're in the habit of exiting groups, and then changing your mind
9272 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
9273 If you do that, gnus won't kill the summary buffer when you exit it.
9274 (Quelle surprise!)  Instead it will change the name of the buffer to
9275 something like @samp{*Dead Summary ... *} and install a minor mode
9276 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
9277 buffer, you'll find that all keys are mapped to a function called
9278 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
9279 summary buffer will result in a live, normal summary buffer.
9280
9281 There will never be more than one dead summary buffer at any one time.
9282
9283 @vindex gnus-use-cross-reference
9284 The data on the current group will be updated (which articles you have
9285 read, which articles you have replied to, etc.) when you exit the
9286 summary buffer.  If the @code{gnus-use-cross-reference} variable is
9287 @code{t} (which is the default), articles that are cross-referenced to
9288 this group and are marked as read, will also be marked as read in the
9289 other subscribed groups they were cross-posted to.  If this variable is
9290 neither @code{nil} nor @code{t}, the article will be marked as read in
9291 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
9292
9293
9294 @node Crosspost Handling
9295 @section Crosspost Handling
9296
9297 @cindex velveeta
9298 @cindex spamming
9299 Marking cross-posted articles as read ensures that you'll never have to
9300 read the same article more than once.  Unless, of course, somebody has
9301 posted it to several groups separately.  Posting the same article to
9302 several groups (not cross-posting) is called @dfn{spamming}, and you are
9303 by law required to send nasty-grams to anyone who perpetrates such a
9304 heinous crime.  You may want to try NoCeM handling to filter out spam
9305 (@pxref{NoCeM}).
9306
9307 Remember: Cross-posting is kinda ok, but posting the same article
9308 separately to several groups is not.  Massive cross-posting (aka.
9309 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
9310 @code{gnus-summary-mail-crosspost-complaint} command to complain about
9311 excessive crossposting (@pxref{Summary Mail Commands}).
9312
9313 @cindex cross-posting
9314 @cindex Xref
9315 @cindex @sc{nov}
9316 One thing that may cause Gnus to not do the cross-posting thing
9317 correctly is if you use an @sc{nntp} server that supports @sc{xover}
9318 (which is very nice, because it speeds things up considerably) which
9319 does not include the @code{Xref} header in its @sc{nov} lines.  This is
9320 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
9321 even with @sc{xover} by registering the @code{Xref} lines of all
9322 articles you actually read, but if you kill the articles, or just mark
9323 them as read without reading them, Gnus will not get a chance to snoop
9324 the @code{Xref} lines out of these articles, and will be unable to use
9325 the cross reference mechanism.
9326
9327 @cindex LIST overview.fmt
9328 @cindex overview.fmt
9329 To check whether your @sc{nntp} server includes the @code{Xref} header
9330 in its overview files, try @samp{telnet your.nntp.server nntp},
9331 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
9332 overview.fmt}.  This may not work, but if it does, and the last line you
9333 get does not read @samp{Xref:full}, then you should shout and whine at
9334 your news admin until she includes the @code{Xref} header in the
9335 overview files.
9336
9337 @vindex gnus-nov-is-evil
9338 If you want Gnus to get the @code{Xref}s right all the time, you have to
9339 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
9340 considerably.
9341
9342 C'est la vie.
9343
9344 For an alternative approach, @pxref{Duplicate Suppression}.
9345
9346
9347 @node Duplicate Suppression
9348 @section Duplicate Suppression
9349
9350 By default, gnus tries to make sure that you don't have to read the same
9351 article more than once by utilizing the crossposting mechanism
9352 (@pxref{Crosspost Handling}).  However, that simple and efficient
9353 approach may not work satisfactory for some users for various
9354 reasons.
9355
9356 @enumerate
9357 @item
9358 The @sc{nntp} server may fail to generate the @code{Xref} header.  This
9359 is evil and not very common.
9360
9361 @item
9362 The @sc{nntp} server may fail to include the @code{Xref} header in the
9363 @file{.overview} data bases.  This is evil and all too common, alas.
9364
9365 @item
9366 You may be reading the same group (or several related groups) from
9367 different @sc{nntp} servers.
9368
9369 @item
9370 You may be getting mail that duplicates articles posted to groups.
9371 @end enumerate
9372
9373 I'm sure there are other situations where @code{Xref} handling fails as
9374 well, but these four are the most common situations.
9375
9376 If, and only if, @code{Xref} handling fails for you, then you may
9377 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
9378 will remember the @code{Message-ID}s of all articles you have read or
9379 otherwise marked as read, and then, as if by magic, mark them as read
9380 all subsequent times you see them---in @emph{all} groups.  Using this
9381 mechanism is quite likely to be somewhat inefficient, but not overly
9382 so.  It's certainly preferable to reading the same articles more than
9383 once.
9384
9385 Duplicate suppression is not a very subtle instrument.  It's more like a
9386 sledge hammer than anything else.  It works in a very simple
9387 fashion---if you have marked an article as read, it adds this Message-ID
9388 to a cache.  The next time it sees this Message-ID, it will mark the
9389 article as read with the @samp{M} mark.  It doesn't care what group it
9390 saw the article in.
9391
9392 @table @code
9393 @item gnus-suppress-duplicates
9394 @vindex gnus-suppress-duplicates
9395 If non-@code{nil}, suppress duplicates.
9396
9397 @item gnus-save-duplicate-list
9398 @vindex gnus-save-duplicate-list
9399 If non-@code{nil}, save the list of duplicates to a file.  This will
9400 make startup and shutdown take longer, so the default is @code{nil}.
9401 However, this means that only duplicate articles read in a single gnus
9402 session are suppressed.
9403
9404 @item gnus-duplicate-list-length
9405 @vindex gnus-duplicate-list-length
9406 This variable says how many @code{Message-ID}s to keep in the duplicate
9407 suppression list.  The default is 10000.
9408
9409 @item gnus-duplicate-file
9410 @vindex gnus-duplicate-file
9411 The name of the file to store the duplicate suppression list in.  The
9412 default is @file{~/News/suppression}.
9413 @end table
9414
9415 If you have a tendency to stop and start gnus often, setting
9416 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
9417 you leave gnus running for weeks on end, you may have it @code{nil}.  On
9418 the other hand, saving the list makes startup and shutdown much slower,
9419 so that means that if you stop and start gnus often, you should set
9420 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
9421 to you to figure out, I think.
9422
9423 @node Security
9424 @section Security
9425
9426 Gnus is able to verify PGP or S/MIME signed messages or decrypt PGP
9427 encrypted messages.
9428
9429 @enumerate
9430 @item
9431 To verify or decrypt PGP messages, you have to install mailcrypt or
9432 gpg.el.
9433
9434 @end enumerate
9435
9436 @table @code
9437 @item mm-verify-option
9438 @vindex mm-verify-option
9439 Option of verifying signed parts.  @code{never}, not verify;
9440 @code{always}, always verify; @code{known}, only verify known
9441 protocols. Otherwise, ask user.
9442
9443 @item mm-decrypt-option
9444 @vindex mm-decrypt-option
9445 Option of decrypting encrypted parts.  @code{never}, no decryption;
9446 @code{always}, always decrypt @code{known}, only decrypt known
9447 protocols. Otherwise, ask user.
9448
9449 @end table
9450
9451 @node Mailing List
9452 @section Mailing List
9453
9454 Gnus understands some mailing list fields of RFC 2369.
9455
9456 @table @kbd
9457
9458 @item C-c C-n h
9459 @kindex C-c C-n h (Summary)
9460 @findex gnus-mailing-list-help
9461 Send a message to fetch mailing list help, if List-Help field exists.
9462
9463 @item C-c C-n s
9464 @kindex C-c C-n s (Summary)
9465 @findex gnus-mailing-list-subscribe
9466 Send a message to subscribe the mailing list, if List-Subscribe field exists.
9467
9468 @item C-c C-n u
9469 @kindex C-c C-n u (Summary)
9470 @findex gnus-mailing-list-unsubscribe
9471 Send a message to unsubscribe the mailing list, if List-Unsubscribe
9472 field exists.
9473
9474 @item C-c C-n p
9475 @kindex C-c C-n p (Summary)
9476 @findex gnus-mailing-list-post
9477 Post to the mailing list, if List-Post field exists.
9478
9479 @item C-c C-n o
9480 @kindex C-c C-n o (Summary)
9481 @findex gnus-mailing-list-owner
9482 Send a message to the mailing list owner, if List-Owner field exists.
9483
9484 @item C-c C-n a
9485 @kindex C-c C-n a (Summary)
9486 @findex gnus-mailing-list-owner
9487 Browse the mailing list archive, if List-Archive field exists.
9488
9489 @end table
9490
9491 @node Article Buffer
9492 @chapter Article Buffer
9493 @cindex article buffer
9494
9495 The articles are displayed in the article buffer, of which there is only
9496 one.  All the summary buffers share the same article buffer unless you
9497 tell gnus otherwise.
9498
9499 @menu
9500 * Hiding Headers::              Deciding what headers should be displayed.
9501 * Using MIME::                  Pushing articles through @sc{mime} before reading them.
9502 * Customizing Articles::        Tailoring the look of the articles.
9503 * Article Keymap::              Keystrokes available in the article buffer.
9504 * Misc Article::                Other stuff.
9505 @end menu
9506
9507
9508 @node Hiding Headers
9509 @section Hiding Headers
9510 @cindex hiding headers
9511 @cindex deleting headers
9512
9513 The top section of each article is the @dfn{head}.  (The rest is the
9514 @dfn{body}, but you may have guessed that already.)
9515
9516 @vindex gnus-show-all-headers
9517 There is a lot of useful information in the head: the name of the person
9518 who wrote the article, the date it was written and the subject of the
9519 article.  That's well and nice, but there's also lots of information
9520 most people do not want to see---what systems the article has passed
9521 through before reaching you, the @code{Message-ID}, the
9522 @code{References}, etc. ad nauseum---and you'll probably want to get rid
9523 of some of those lines.  If you want to keep all those lines in the
9524 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
9525
9526 Gnus provides you with two variables for sifting headers:
9527
9528 @table @code
9529
9530 @item gnus-visible-headers
9531 @vindex gnus-visible-headers
9532 If this variable is non-@code{nil}, it should be a regular expression
9533 that says what headers you wish to keep in the article buffer.  All
9534 headers that do not match this variable will be hidden.
9535
9536 For instance, if you only want to see the name of the person who wrote
9537 the article and the subject, you'd say:
9538
9539 @lisp
9540 (setq gnus-visible-headers "^From:\\|^Subject:")
9541 @end lisp
9542
9543 This variable can also be a list of regexps to match headers to
9544 remain visible.
9545
9546 @item gnus-ignored-headers
9547 @vindex gnus-ignored-headers
9548 This variable is the reverse of @code{gnus-visible-headers}.  If this
9549 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
9550 should be a regular expression that matches all lines that you want to
9551 hide.  All lines that do not match this variable will remain visible.
9552
9553 For instance, if you just want to get rid of the @code{References} field
9554 and the @code{Xref} field, you might say:
9555
9556 @lisp
9557 (setq gnus-ignored-headers "^References:\\|^Xref:")
9558 @end lisp
9559
9560 This variable can also be a list of regexps to match headers to
9561 be removed.
9562
9563 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
9564 variable will have no effect.
9565
9566 @end table
9567
9568 @vindex gnus-sorted-header-list
9569 Gnus can also sort the headers for you.  (It does this by default.)  You
9570 can control the sorting by setting the @code{gnus-sorted-header-list}
9571 variable.  It is a list of regular expressions that says in what order
9572 the headers are to be displayed.
9573
9574 For instance, if you want the name of the author of the article first,
9575 and then the subject, you might say something like:
9576
9577 @lisp
9578 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
9579 @end lisp
9580
9581 Any headers that are to remain visible, but are not listed in this
9582 variable, will be displayed in random order after all the headers listed in this variable.
9583
9584 @findex gnus-article-hide-boring-headers
9585 @vindex gnus-boring-article-headers
9586 You can hide further boring headers by setting
9587 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
9588 does depends on the @code{gnus-boring-article-headers} variable.  It's a
9589 list, but this list doesn't actually contain header names.  Instead is
9590 lists various @dfn{boring conditions} that Gnus can check and remove
9591 from sight.
9592
9593 These conditions are:
9594 @table @code
9595 @item empty
9596 Remove all empty headers.
9597 @item followup-to
9598 Remove the @code{Followup-To} header if it is identical to the
9599 @code{Newsgroups} header.
9600 @item reply-to
9601 Remove the @code{Reply-To} header if it lists the same address as the
9602 @code{From} header.
9603 @item newsgroups
9604 Remove the @code{Newsgroups} header if it only contains the current group
9605 name.
9606 @item to-address
9607 Remove the @code{To} header if it only contains the address identical to
9608 the current groups's @code{to-address} parameter.
9609 @item date
9610 Remove the @code{Date} header if the article is less than three days
9611 old.
9612 @item long-to
9613 Remove the @code{To} header if it is very long.
9614 @item many-to
9615 Remove all @code{To} headers if there are more than one.
9616 @end table
9617
9618 To include these three elements, you could say something like;
9619
9620 @lisp
9621 (setq gnus-boring-article-headers
9622       '(empty followup-to reply-to))
9623 @end lisp
9624
9625 This is also the default value for this variable.
9626
9627
9628 @node Using MIME
9629 @section Using @sc{mime}
9630 @cindex @sc{mime}
9631
9632 Mime is a standard for waving your hands through the air, aimlessly,
9633 while people stand around yawning.
9634
9635 @sc{mime}, however, is a standard for encoding your articles, aimlessly,
9636 while all newsreaders die of fear.
9637
9638 @sc{mime} may specify what character set the article uses, the encoding
9639 of the characters, and it also makes it possible to embed pictures and
9640 other naughty stuff in innocent-looking articles.
9641
9642 @vindex gnus-show-mime
9643 @vindex gnus-article-display-method-for-mime
9644 @vindex gnus-strict-mime
9645 @findex gnus-article-display-mime-message
9646 Gnus handles @sc{mime} by pushing the articles through
9647 @code{gnus-article-display-method-for-mime}, which is
9648 @code{gnus-article-display-mime-message} by default.  This function
9649 calls the SEMI MIME-View program to actually do the work.  For more
9650 information on SEMI MIME-View, see its manual page (however it is not
9651 existed yet, sorry).
9652
9653 Set @code{gnus-show-mime} to @code{t} if you want to use
9654 @sc{mime} all the time.  However, if @code{gnus-strict-mime} is
9655 non-@code{nil}, the @sc{mime} method will only be used if there are
9656 @sc{mime} headers in the article.  If you have @code{gnus-show-mime}
9657 set, then you'll see some unfortunate display glitches in the article
9658 buffer.  These can't be avoided.
9659
9660 In GNUS or Gnus, it might be best to just use the toggling functions
9661 from the summary buffer to avoid getting nasty surprises. (For instance,
9662 you enter the group @samp{alt.sing-a-long} and, before you know it,
9663 @sc{mime} has decoded the sound file in the article and some horrible
9664 sing-a-long song comes screaming out your speakers, and you can't find
9665 the volume button, because there isn't one, and people are starting to
9666 look at you, and you try to stop the program, but you can't, and you
9667 can't find the program to control the volume, and everybody else in the
9668 room suddenly decides to look at you disdainfully, and you'll feel
9669 rather stupid.)
9670
9671 Any similarity to real events and people is purely coincidental.  Ahem.
9672
9673 To avoid such kind of situation, gnus stops to use
9674 @code{metamail-buffer}.  So now, you can set @code{gnus-show-mime} to
9675 non-@code{nil} every-time, then you can push button in the article
9676 buffer when there are nobody else.
9677
9678 Also see @pxref{MIME Commands}.
9679
9680
9681 @node Customizing Articles
9682 @section Customizing Articles
9683 @cindex article customization
9684
9685 A slew of functions for customizing how the articles are to look like
9686 exist.  You can call these functions interactively, or you can have them
9687 called automatically when you select the articles.
9688
9689 To have them called automatically, you should set the corresponding
9690 ``treatment'' variable.  For instance, to have headers hidden, you'd set
9691 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
9692 be set, but first we discuss the values these variables can have.
9693
9694 Note: Some values, while valid, make little sense.  Check the list below
9695 for sensible values.
9696
9697 @enumerate
9698 @item
9699 @code{nil}: Don't do this treatment.
9700
9701 @item
9702 @code{t}: Do this treatment on all body parts.
9703
9704 @item
9705 @code{head}: Do the treatment on the headers.
9706
9707 @item
9708 @code{last}: Do this treatment on the last part.
9709
9710 @item
9711 An integer: Do this treatment on all body parts that have a length less
9712 than this number.
9713
9714 @item
9715 A list of strings: Do this treatment on all body parts that are in
9716 articles that are read in groups that have names that match one of the
9717 regexps in the list.
9718
9719 @item
9720 A list where the first element is not a string:
9721
9722 The list is evaluated recursively.  The first element of the list is a
9723 predicate.  The following predicates are recognized: @code{or},
9724 @code{and}, @code{not} and @code{typep}.  Here's an example:
9725
9726 @lisp
9727 (or last
9728     (typep "text/x-vcard"))
9729 @end lisp
9730
9731 @item
9732 @code{mime}: Do this treatment if the value of @code{gnus-show-mime}' is
9733 non-nil.
9734
9735 @end enumerate
9736
9737 You may have noticed that the word @dfn{part} is used here.  This refers
9738 to the fact that some messages are @sc{mime} multipart articles that may
9739 be divided into several parts.  Articles that are not multiparts are
9740 considered to contain just a single part.
9741
9742 @vindex gnus-article-treat-types
9743 Are the treatments applied to all sorts of multipart parts?  Yes, if you
9744 want to, but by default, only @samp{text/plain} parts are given the
9745 treatment.  This is controlled by the @code{gnus-article-treat-types}
9746 variable, which is a list of regular expressions that are matched to the
9747 type of the part.  This variable is ignored if the value of the
9748 controlling variable is a predicate list, as described above.
9749
9750 The following treatment options are available.  The easiest way to
9751 customize this is to examine the @code{gnus-article-treat} customization
9752 group.  Values in parenthesis are suggested sensible values.  Others are
9753 possible but those listed are probably sufficient for most people.
9754
9755 @table @code
9756 @item gnus-treat-highlight-signature (t, last)
9757 @item gnus-treat-buttonize (t, integer)
9758 @item gnus-treat-buttonize-head (head)
9759 @item gnus-treat-emphasize (t, head, integer)
9760 @item gnus-treat-fill-article (t, integer)
9761 @item gnus-treat-strip-cr (t, integer)
9762 @item gnus-treat-hide-headers (head)
9763 @item gnus-treat-hide-boring-headers (head)
9764 @item gnus-treat-hide-signature (t, last)
9765 @item gnus-treat-hide-citation (t, integer)
9766 @item gnus-treat-hide-citation-maybe (t, integer)
9767 @item gnus-treat-strip-pgp (t, last, integer)
9768 @item gnus-treat-x-pgp-sig (head)
9769 @item gnus-treat-strip-pem (t, last, integer)
9770 @item gnus-treat-highlight-headers (head)
9771 @item gnus-treat-highlight-citation (t, integer)
9772 @item gnus-treat-highlight-signature (t, last, integer)
9773 @item gnus-treat-date-ut (head)
9774 @item gnus-treat-date-local (head)
9775 @item gnus-treat-date-english (head)
9776 @item gnus-treat-date-lapsed (head)
9777 @item gnus-treat-date-original (head)
9778 @item gnus-treat-date-iso8601 (head)
9779 @item gnus-treat-date-user-defined (head)
9780 @item gnus-treat-strip-headers-in-body (t, integer)
9781 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
9782 @item gnus-treat-strip-leading-blank-lines (t, integer)
9783 @item gnus-treat-strip-multiple-blank-lines (t, integer)
9784 @item gnus-treat-overstrike (t, integer)
9785 @item gnus-treat-display-xface (head)
9786 @item gnus-treat-display-smileys (t, integer)
9787 @item gnus-treat-display-picons (head)
9788 @item gnus-treat-capitalize-sentences (t, integer)
9789 @item gnus-treat-fill-long-lines (t, integer)
9790 @item gnus-treat-play-sounds
9791 @item gnus-treat-translate
9792 @item gnus-treat-decode-article-as-default-mime-charset
9793 @end table
9794
9795 @vindex gnus-part-display-hook
9796 You can, of course, write your own functions to be called from
9797 @code{gnus-part-display-hook}.  The functions are called narrowed to the
9798 part, and you can do anything you like, pretty much.  There is no
9799 information that you have to keep in the buffer---you can change
9800 everything.
9801
9802
9803 @node Article Keymap
9804 @section Article Keymap
9805
9806 Most of the keystrokes in the summary buffer can also be used in the
9807 article buffer.  They should behave as if you typed them in the summary
9808 buffer, which means that you don't actually have to have a summary
9809 buffer displayed while reading.  You can do it all from the article
9810 buffer.
9811
9812 A few additional keystrokes are available:
9813
9814 @table @kbd
9815
9816 @item SPACE
9817 @kindex SPACE (Article)
9818 @findex gnus-article-next-page
9819 Scroll forwards one page (@code{gnus-article-next-page}).
9820
9821 @item DEL
9822 @kindex DEL (Article)
9823 @findex gnus-article-prev-page
9824 Scroll backwards one page (@code{gnus-article-prev-page}).
9825
9826 @item C-c ^
9827 @kindex C-c ^ (Article)
9828 @findex gnus-article-refer-article
9829 If point is in the neighborhood of a @code{Message-ID} and you press
9830 @kbd{C-c ^}, Gnus will try to get that article from the server
9831 (@code{gnus-article-refer-article}).
9832
9833 @item C-c C-m
9834 @kindex C-c C-m (Article)
9835 @findex gnus-article-mail
9836 Send a reply to the address near point (@code{gnus-article-mail}).  If
9837 given a prefix, include the mail.
9838
9839 @item s
9840 @kindex s (Article)
9841 @findex gnus-article-show-summary
9842 Reconfigure the buffers so that the summary buffer becomes visible
9843 (@code{gnus-article-show-summary}).
9844
9845 @item ?
9846 @kindex ? (Article)
9847 @findex gnus-article-describe-briefly
9848 Give a very brief description of the available keystrokes
9849 (@code{gnus-article-describe-briefly}).
9850
9851 @item TAB
9852 @kindex TAB (Article)
9853 @findex gnus-article-next-button
9854 Go to the next button, if any (@code{gnus-article-next-button}).  This
9855 only makes sense if you have buttonizing turned on.
9856
9857 @item M-TAB
9858 @kindex M-TAB (Article)
9859 @findex gnus-article-prev-button
9860 Go to the previous button, if any (@code{gnus-article-prev-button}).
9861
9862 @end table
9863
9864
9865 @node Misc Article
9866 @section Misc Article
9867
9868 @table @code
9869
9870 @item gnus-single-article-buffer
9871 @vindex gnus-single-article-buffer
9872 If non-@code{nil}, use the same article buffer for all the groups.
9873 (This is the default.)  If @code{nil}, each group will have its own
9874 article buffer.
9875
9876 @vindex gnus-article-decode-hook
9877 @item gnus-article-decode-hook
9878 @cindex MIME
9879 Hook used to decode @sc{mime} articles.  The default value is
9880 @code{(article-decode-charset article-decode-encoded-words)}
9881
9882 @vindex gnus-article-prepare-hook
9883 @item gnus-article-prepare-hook
9884 This hook is called right after the article has been inserted into the
9885 article buffer.  It is mainly intended for functions that do something
9886 depending on the contents; it should probably not be used for changing
9887 the contents of the article buffer.
9888
9889 @item gnus-article-mode-hook
9890 @vindex gnus-article-mode-hook
9891 Hook called in article mode buffers.
9892
9893 @item gnus-article-mode-syntax-table
9894 @vindex gnus-article-mode-syntax-table
9895 Syntax table used in article buffers.  It is initialized from
9896 @code{text-mode-syntax-table}.
9897
9898 @vindex gnus-article-mode-line-format
9899 @item gnus-article-mode-line-format
9900 This variable is a format string along the same lines as
9901 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
9902 accepts the same format specifications as that variable, with two
9903 extensions:
9904
9905 @table @samp
9906 @item w
9907 The @dfn{wash status} of the article.  This is a short string with one
9908 character for each possible article wash operation that may have been
9909 performed.
9910 @item m
9911 The number of @sc{mime} parts in the article.
9912 @end table
9913
9914 @vindex gnus-break-pages
9915
9916 @item gnus-break-pages
9917 Controls whether @dfn{page breaking} is to take place.  If this variable
9918 is non-@code{nil}, the articles will be divided into pages whenever a
9919 page delimiter appears in the article.  If this variable is @code{nil},
9920 paging will not be done.
9921
9922 @item gnus-page-delimiter
9923 @vindex gnus-page-delimiter
9924 This is the delimiter mentioned above.  By default, it is @samp{^L}
9925 (formfeed).
9926 @end table
9927
9928
9929 @node Composing Messages
9930 @chapter Composing Messages
9931 @cindex composing messages
9932 @cindex messages
9933 @cindex mail
9934 @cindex sending mail
9935 @cindex reply
9936 @cindex followup
9937 @cindex post
9938 @cindex using gpg
9939
9940 @kindex C-c C-c (Post)
9941 All commands for posting and mailing will put you in a message buffer
9942 where you can edit the article all you like, before you send the
9943 article by pressing @kbd{C-c C-c}.  @xref{Top, , Top, message, The
9944 Message Manual}.  Where the message will be posted/mailed to depends
9945 on your setup (@pxref{Posting Server}).
9946
9947 @menu
9948 * Mail::                        Mailing and replying.
9949 * Posting Server::              What server should you post via?
9950 * Mail and Post::               Mailing and posting at the same time.
9951 * Archived Messages::           Where Gnus stores the messages you've sent.
9952 * Posting Styles::              An easier way to specify who you are.
9953 * Drafts::                      Postponing messages and rejected messages.
9954 * Rejected Articles::           What happens if the server doesn't like your article?
9955 * Using GPG::                   How to use GPG and MML to sign and encrypt messages
9956 @end menu
9957
9958 Also see @pxref{Canceling and Superseding} for information on how to
9959 remove articles you shouldn't have posted.
9960
9961
9962 @node Mail
9963 @section Mail
9964
9965 Variables for customizing outgoing mail:
9966
9967 @table @code
9968 @item gnus-uu-digest-headers
9969 @vindex gnus-uu-digest-headers
9970 List of regexps to match headers included in digested messages.  The
9971 headers will be included in the sequence they are matched.
9972
9973 @item gnus-add-to-list
9974 @vindex gnus-add-to-list
9975 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
9976 that have none when you do a @kbd{a}.
9977
9978 @end table
9979
9980
9981 @node Posting Server
9982 @section Posting Server
9983
9984 When you press those magical @kbd{C-c C-c} keys to ship off your latest
9985 (extremely intelligent, of course) article, where does it go?
9986
9987 Thank you for asking.  I hate you.
9988
9989 @vindex gnus-post-method
9990
9991 It can be quite complicated.  Normally, Gnus will post using the same
9992 select method as you're reading from (which might be convenient if
9993 you're reading lots of groups from different private servers).
9994 However.  If the server you're reading from doesn't allow posting,
9995 just reading, you probably want to use some other server to post your
9996 (extremely intelligent and fabulously interesting) articles.  You can
9997 then set the @code{gnus-post-method} to some other method:
9998
9999 @lisp
10000 (setq gnus-post-method '(nnspool ""))
10001 @end lisp
10002
10003 Now, if you've done this, and then this server rejects your article, or
10004 this server is down, what do you do then?  To override this variable you
10005 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
10006 the ``current'' server, to get back the default behavior, for posting.
10007
10008 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
10009 gnus will prompt you for what method to use for posting.
10010
10011 You can also set @code{gnus-post-method} to a list of select methods.
10012 If that's the case, gnus will always prompt you for what method to use
10013 for posting.
10014
10015 Finally, if you want to always post using the native select method,
10016 you can set this variable to @code{nil}.
10017
10018
10019 @node Mail and Post
10020 @section Mail and Post
10021
10022 Here's a list of variables relevant to both mailing and
10023 posting:
10024
10025 @table @code
10026 @item gnus-mailing-list-groups
10027 @findex gnus-mailing-list-groups
10028 @cindex mailing lists
10029
10030 If your news server offers groups that are really mailing lists
10031 gatewayed to the @sc{nntp} server, you can read those groups without
10032 problems, but you can't post/followup to them without some difficulty.
10033 One solution is to add a @code{to-address} to the group parameters
10034 (@pxref{Group Parameters}).  An easier thing to do is set the
10035 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
10036 really are mailing lists.  Then, at least, followups to the mailing
10037 lists will work most of the time.  Posting to these groups (@kbd{a}) is
10038 still a pain, though.
10039
10040 @end table
10041
10042 You may want to do spell-checking on messages that you send out.  Or, if
10043 you don't want to spell-check by hand, you could add automatic
10044 spell-checking via the @code{ispell} package:
10045
10046 @cindex ispell
10047 @findex ispell-message
10048 @lisp
10049 (add-hook 'message-send-hook 'ispell-message)
10050 @end lisp
10051
10052 If you want to change the @code{ispell} dictionary based on what group
10053 you're in, you could say something like the following:
10054
10055 @lisp
10056 (add-hook 'gnus-select-group-hook
10057           (lambda ()
10058             (cond
10059              ((string-match
10060                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
10061               (ispell-change-dictionary "deutsch"))
10062              (t
10063               (ispell-change-dictionary "english")))))
10064 @end lisp
10065
10066 Modify to suit your needs.
10067
10068
10069 @node Archived Messages
10070 @section Archived Messages
10071 @cindex archived messages
10072 @cindex sent messages
10073
10074 Gnus provides a few different methods for storing the mail and news you
10075 send.  The default method is to use the @dfn{archive virtual server} to
10076 store the messages.  If you want to disable this completely, the
10077 @code{gnus-message-archive-group} variable should be @code{nil}, which
10078 is the default.
10079
10080 @vindex gnus-message-archive-method
10081 @code{gnus-message-archive-method} says what virtual server gnus is to
10082 use to store sent messages.  The default is:
10083
10084 @lisp
10085 (nnfolder "archive"
10086           (nnfolder-directory   "~/Mail/archive")
10087           (nnfolder-active-file "~/Mail/archive/active")
10088           (nnfolder-get-new-mail nil)
10089           (nnfolder-inhibit-expiry t))
10090 @end lisp
10091
10092 You can, however, use any mail select method (@code{nnml},
10093 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
10094 for doing this sort of thing, though.  If you don't like the default
10095 directory chosen, you could say something like:
10096
10097 @lisp
10098 (setq gnus-message-archive-method
10099       '(nnfolder "archive"
10100                  (nnfolder-inhibit-expiry t)
10101                  (nnfolder-active-file "~/News/sent-mail/active")
10102                  (nnfolder-directory "~/News/sent-mail/")))
10103 @end lisp
10104
10105 @vindex gnus-message-archive-group
10106 @cindex Gcc
10107 Gnus will insert @code{Gcc} headers in all outgoing messages that point
10108 to one or more group(s) on that server.  Which group to use is
10109 determined by the @code{gnus-message-archive-group} variable.
10110
10111 This variable can be used to do the following:
10112
10113 @itemize @bullet
10114 @item a string
10115 Messages will be saved in that group.
10116
10117 Note that you can include a select method in the group name, then the
10118 message will not be stored in the select method given by
10119 @code{gnus-message-archive-method}, but in the select method specified
10120 by the group name, instead.  Suppose @code{gnus-message-archive-method}
10121 has the default value shown above.  Then setting
10122 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
10123 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
10124 value @code{"nnml:foo"}, then outgoing messages will be stored in
10125 @samp{nnml:foo}.
10126 @item a list of strings
10127 Messages will be saved in all those groups.
10128 @item an alist of regexps, functions and forms
10129 When a key ``matches'', the result is used.
10130 @item @code{nil}
10131 No message archiving will take place.  This is the default.
10132 @end itemize
10133
10134 Let's illustrate:
10135
10136 Just saving to a single group called @samp{MisK}:
10137 @lisp
10138 (setq gnus-message-archive-group "MisK")
10139 @end lisp
10140
10141 Saving to two groups, @samp{MisK} and @samp{safe}:
10142 @lisp
10143 (setq gnus-message-archive-group '("MisK" "safe"))
10144 @end lisp
10145
10146 Save to different groups based on what group you are in:
10147 @lisp
10148 (setq gnus-message-archive-group
10149       '(("^alt" "sent-to-alt")
10150         ("mail" "sent-to-mail")
10151         (".*" "sent-to-misc")))
10152 @end lisp
10153
10154 More complex stuff:
10155 @lisp
10156 (setq gnus-message-archive-group
10157       '((if (message-news-p)
10158             "misc-news"
10159           "misc-mail")))
10160 @end lisp
10161
10162 How about storing all news messages in one file, but storing all mail
10163 messages in one file per month:
10164
10165 @lisp
10166 (setq gnus-message-archive-group
10167       '((if (message-news-p)
10168             "misc-news"
10169           (concat "mail." (format-time-string "%Y-%m")))))
10170 @end lisp
10171
10172 (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
10173 use a different value for @code{gnus-message-archive-group} there.)
10174
10175 Now, when you send a message off, it will be stored in the appropriate
10176 group.  (If you want to disable storing for just one particular message,
10177 you can just remove the @code{Gcc} header that has been inserted.)  The
10178 archive group will appear in the group buffer the next time you start
10179 gnus, or the next time you press @kbd{F} in the group buffer.  You can
10180 enter it and read the articles in it just like you'd read any other
10181 group.  If the group gets really big and annoying, you can simply rename
10182 if (using @kbd{G r} in the group buffer) to something
10183 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
10184 continue to be stored in the old (now empty) group.
10185
10186 That's the default method of archiving sent messages.  Gnus offers a
10187 different way for the people who don't like the default method.  In that
10188 case you should set @code{gnus-message-archive-group} to @code{nil};
10189 this will disable archiving.
10190
10191 @table @code
10192 @item gnus-outgoing-message-group
10193 @vindex gnus-outgoing-message-group
10194 All outgoing messages will be put in this group.  If you want to store
10195 all your outgoing mail and articles in the group @samp{nnml:archive},
10196 you set this variable to that value.  This variable can also be a list of
10197 group names.
10198
10199 If you want to have greater control over what group to put each
10200 message in, you can set this variable to a function that checks the
10201 current newsgroup name and then returns a suitable group name (or list
10202 of names).
10203
10204 This variable can be used instead of @code{gnus-message-archive-group},
10205 but the latter is the preferred method.
10206
10207 @item gnus-inews-mark-gcc-as-read
10208 @vindex gnus-inews-mark-gcc-as-read
10209 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
10210
10211 @end table
10212
10213
10214 @node Posting Styles
10215 @section Posting Styles
10216 @cindex posting styles
10217 @cindex styles
10218
10219 All them variables, they make my head swim.
10220
10221 So what if you want a different @code{Organization} and signature based
10222 on what groups you post to?  And you post both from your home machine
10223 and your work machine, and you want different @code{From} lines, and so
10224 on?
10225
10226 @vindex gnus-posting-styles
10227 One way to do stuff like that is to write clever hooks that change the
10228 variables you need to have changed.  That's a bit boring, so somebody
10229 came up with the bright idea of letting the user specify these things in
10230 a handy alist.  Here's an example of a @code{gnus-posting-styles}
10231 variable:
10232
10233 @lisp
10234 ((".*"
10235   (signature "Peace and happiness")
10236   (organization "What me?"))
10237  ("^comp"
10238   (signature "Death to everybody"))
10239  ("comp.emacs.i-love-it"
10240   (organization "Emacs is it")))
10241 @end lisp
10242
10243 As you might surmise from this example, this alist consists of several
10244 @dfn{styles}.  Each style will be applicable if the first element
10245 ``matches'', in some form or other.  The entire alist will be iterated
10246 over, from the beginning towards the end, and each match will be
10247 applied, which means that attributes in later styles that match override
10248 the same attributes in earlier matching styles.  So
10249 @samp{comp.programming.literate} will have the @samp{Death to everybody}
10250 signature and the @samp{What me?} @code{Organization} header.
10251
10252 The first element in each style is called the @code{match}.  If it's a
10253 string, then Gnus will try to regexp match it against the group name.
10254 If it is the symbol @code{header}, then Gnus will look for header (the
10255 next element in the match) in the original article , and compare that to
10256 the last regexp in the match.  If it's a function symbol, that function
10257 will be called with no arguments.  If it's a variable symbol, then the
10258 variable will be referenced.  If it's a list, then that list will be
10259 @code{eval}ed.  In any case, if this returns a non-@code{nil} value,
10260 then the style is said to @dfn{match}.
10261
10262 Each style may contain a arbitrary amount of @dfn{attributes}.  Each
10263 attribute consists of a @code{(@var{name} @var{value})} pair.  The
10264 attribute name can be one of @code{signature}, @code{signature-file},
10265 @code{organization}, @code{address}, @code{name} or @code{body}.  The
10266 attribute name can also be a string.  In that case, this will be used as
10267 a header name, and the value will be inserted in the headers of the
10268 article; if the value is @code{nil}, the header name will be removed.
10269 If the attribute name is @code{eval}, the form is evaluated, and the
10270 result is thrown away.
10271
10272 The attribute value can be a string (used verbatim), a function with
10273 zero arguments (the return value will be used), a variable (its value
10274 will be used) or a list (it will be @code{eval}ed and the return value
10275 will be used).  The functions and sexps are called/@code{eval}ed in the
10276 message buffer that is being set up.  The headers of the current article
10277 are available through the @code{message-reply-headers} variable.
10278
10279 If you wish to check whether the message you are about to compose is
10280 meant to be a news article or a mail message, you can check the values
10281 of the @code{message-news-p} and @code{message-mail-p} functions.
10282
10283 @findex message-mail-p
10284 @findex message-news-p
10285
10286 So here's a new example:
10287
10288 @lisp
10289 (setq gnus-posting-styles
10290       '((".*"
10291          (signature-file "~/.signature")
10292          (name "User Name")
10293          ("X-Home-Page" (getenv "WWW_HOME"))
10294          (organization "People's Front Against MWM"))
10295         ("^rec.humor"
10296          (signature my-funny-signature-randomizer))
10297         ((equal (system-name) "gnarly")
10298          (signature my-quote-randomizer))
10299         ((message-news-p)
10300          (signature my-news-signature))
10301         (header "to" "larsi.*org"
10302                 (Organization "Somewhere, Inc."))
10303         ((posting-from-work-p)
10304          (signature-file "~/.work-signature")
10305          (address "user@@bar.foo")
10306          (body "You are fired.\n\nSincerely, your boss.")
10307          (organization "Important Work, Inc"))
10308         ("nnml:.*"
10309          (From (save-excursion
10310                  (set-buffer gnus-article-buffer)
10311                  (message-fetch-field "to"))))
10312         ("^nn.+:"
10313          (signature-file "~/.mail-signature"))))
10314 @end lisp
10315
10316 The @samp{nnml:.*} rule means that you use the @code{To} address as the
10317 @code{From} address in all your outgoing replies, which might be handy
10318 if you fill many roles.
10319
10320
10321 @node Drafts
10322 @section Drafts
10323 @cindex drafts
10324
10325 If you are writing a message (mail or news) and suddenly remember that
10326 you have a steak in the oven (or some pesto in the food processor, you
10327 craaazy vegetarians), you'll probably wish there was a method to save
10328 the message you are writing so that you can continue editing it some
10329 other day, and send it when you feel its finished.
10330
10331 Well, don't worry about it.  Whenever you start composing a message of
10332 some sort using the gnus mail and post commands, the buffer you get will
10333 automatically associate to an article in a special @dfn{draft} group.
10334 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
10335 article will be saved there.  (Auto-save files also go to the draft
10336 group.)
10337
10338 @cindex nndraft
10339 @vindex nndraft-directory
10340 The draft group is a special group (which is implemented as an
10341 @code{nndraft} group, if you absolutely have to know) called
10342 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
10343 @code{nndraft} is to store its files.  What makes this group special is
10344 that you can't tick any articles in it or mark any articles as
10345 read---all articles in the group are permanently unread.
10346
10347 If the group doesn't exist, it will be created and you'll be subscribed
10348 to it.  The only way to make it disappear from the Group buffer is to
10349 unsubscribe it.
10350
10351 @c @findex gnus-dissociate-buffer-from-draft
10352 @c @kindex C-c M-d (Mail)
10353 @c @kindex C-c M-d (Post)
10354 @c @findex gnus-associate-buffer-with-draft
10355 @c @kindex C-c C-d (Mail)
10356 @c @kindex C-c C-d (Post)
10357 @c If you're writing some super-secret message that you later want to
10358 @c encode with PGP before sending, you may wish to turn the auto-saving
10359 @c (and association with the draft group) off.  You never know who might be
10360 @c interested in reading all your extremely valuable and terribly horrible
10361 @c and interesting secrets.  The @kbd{C-c M-d}
10362 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
10363 @c If you change your mind and want to turn the auto-saving back on again,
10364 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
10365 @c
10366 @c @vindex gnus-use-draft
10367 @c To leave association with the draft group off by default, set
10368 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
10369
10370 @findex gnus-draft-edit-message
10371 @kindex D e (Draft)
10372 When you want to continue editing the article, you simply enter the
10373 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
10374 that.  You will be placed in a buffer where you left off.
10375
10376 Rejected articles will also be put in this draft group (@pxref{Rejected
10377 Articles}).
10378
10379 @findex gnus-draft-send-all-messages
10380 @findex gnus-draft-send-message
10381 If you have lots of rejected messages you want to post (or mail) without
10382 doing further editing, you can use the @kbd{D s} command
10383 (@code{gnus-draft-send-message}).  This command understands the
10384 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
10385 command (@code{gnus-draft-send-all-messages}) will ship off all messages
10386 in the buffer.
10387
10388 If you have some messages that you wish not to send, you can use the
10389 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
10390 as unsendable.  This is a toggling command.
10391
10392
10393 @node Rejected Articles
10394 @section Rejected Articles
10395 @cindex rejected articles
10396
10397 Sometimes a news server will reject an article.  Perhaps the server
10398 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
10399 @emph{there be demons}.  Perhaps you have included too much cited text.
10400 Perhaps the disk is full.  Perhaps the server is down.
10401
10402 These situations are, of course, totally beyond the control of gnus.
10403 (Gnus, of course, loves the way you look, always feels great, has angels
10404 fluttering around inside of it, doesn't care about how much cited text
10405 you include, never runs full and never goes down.)  So gnus saves these
10406 articles until some later time when the server feels better.
10407
10408 The rejected articles will automatically be put in a special draft group
10409 (@pxref{Drafts}).  When the server comes back up again, you'd then
10410 typically enter that group and send all the articles off.
10411
10412 @node Using GPG
10413 @section Using GPG
10414 @cindex using gpg
10415
10416 Gnus has an ALPHA support to GPG that's provided by @file{gpg.el}. See
10417 @code{mm-verify-option} and @code{mm-decrypt-option} to enable Gnus to
10418 verify or decrypt messages accordingly.
10419
10420 To use this correctly with GPG, you'll need the following lisp code in your
10421 @file{~/.emacs} or @file{~/.gnus}:
10422
10423 @lisp
10424 (require 'gpg)
10425 (setq mml2015-use 'gpg)
10426 (setq gpg-temp-directory (expand-file-name "~/.gnupg/tmp"))
10427 @end lisp
10428
10429 The @code{gpg-temp-directory} need to point to a directory with permissions set
10430 to 700, for your own safety.
10431
10432 If you want to benefit of PGP2.6 compatibility, you might create a script named
10433 @file{gpg-2comp} with these instructions:
10434
10435 @example
10436 #!/bin/sh
10437 exec gpg --rfc1991 "$@@"
10438 @end example
10439
10440 If you don't want to use such compatibility, you can add the following line to
10441 your @file{~/.emacs} or @file{~/.gnus}:
10442
10443 @lisp
10444 (setq gpg-command-default-alist (quote ((gpg . "gpg") (gpg-2comp . "gpg"))))
10445 @end lisp
10446
10447 To sign or encrypt your message you may choose to use the MML Security
10448 menu or @kbd{C-c C-m s p} to sign your message using PGP/MIME, @kbd{C-c
10449 C-m s s} to sign your message using S/MIME. There's also @kbd{C-c C-m c
10450 p} to encrypt your message with PGP/MIME and @kbd{C-c C-m c s} to
10451 encrypt using S/MIME.
10452
10453 Gnus will ask for your passphrase and then it will send your message, if
10454 you've typed it correctly.
10455
10456 @node Select Methods
10457 @chapter Select Methods
10458 @cindex foreign groups
10459 @cindex select methods
10460
10461 A @dfn{foreign group} is a group not read by the usual (or
10462 default) means.  It could be, for instance, a group from a different
10463 @sc{nntp} server, it could be a virtual group, or it could be your own
10464 personal mail group.
10465
10466 A foreign group (or any group, really) is specified by a @dfn{name} and
10467 a @dfn{select method}.  To take the latter first, a select method is a
10468 list where the first element says what backend to use (e.g. @code{nntp},
10469 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
10470 name}.  There may be additional elements in the select method, where the
10471 value may have special meaning for the backend in question.
10472
10473 One could say that a select method defines a @dfn{virtual server}---so
10474 we do just that (@pxref{Server Buffer}).
10475
10476 The @dfn{name} of the group is the name the backend will recognize the
10477 group as.
10478
10479 For instance, the group @samp{soc.motss} on the @sc{nntp} server
10480 @samp{some.where.edu} will have the name @samp{soc.motss} and select
10481 method @code{(nntp "some.where.edu")}.  Gnus will call this group
10482 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
10483 backend just knows this group as @samp{soc.motss}.
10484
10485 The different methods all have their peculiarities, of course.
10486
10487 @menu
10488 * Server Buffer::               Making and editing virtual servers.
10489 * Getting News::                Reading USENET news with Gnus.
10490 * Getting Mail::                Reading your personal mail with Gnus.
10491 * Browsing the Web::            Getting messages from a plethora of Web sources.
10492 * Other Sources::               Reading directories, files, SOUP packets.
10493 * Combined Groups::             Combining groups into one group.
10494 * Gnus Unplugged::              Reading news and mail offline.
10495 @end menu
10496
10497
10498 @node Server Buffer
10499 @section Server Buffer
10500
10501 Traditionally, a @dfn{server} is a machine or a piece of software that
10502 one connects to, and then requests information from.  Gnus does not
10503 connect directly to any real servers, but does all transactions through
10504 one backend or other.  But that's just putting one layer more between
10505 the actual media and Gnus, so we might just as well say that each
10506 backend represents a virtual server.
10507
10508 For instance, the @code{nntp} backend may be used to connect to several
10509 different actual @sc{nntp} servers, or, perhaps, to many different ports
10510 on the same actual @sc{nntp} server.  You tell Gnus which backend to
10511 use, and what parameters to set by specifying a @dfn{select method}.
10512
10513 These select method specifications can sometimes become quite
10514 complicated---say, for instance, that you want to read from the
10515 @sc{nntp} server @samp{news.funet.fi} on port number 13, which
10516 hangs if queried for @sc{nov} headers and has a buggy select.  Ahem.
10517 Anyway, if you had to specify that for each group that used this
10518 server, that would be too much work, so Gnus offers a way of naming
10519 select methods, which is what you do in the server buffer.
10520
10521 To enter the server buffer, use the @kbd{^}
10522 (@code{gnus-group-enter-server-mode}) command in the group buffer.
10523
10524 @menu
10525 * Server Buffer Format::        You can customize the look of this buffer.
10526 * Server Commands::             Commands to manipulate servers.
10527 * Example Methods::             Examples server specifications.
10528 * Creating a Virtual Server::   An example session.
10529 * Server Variables::            Which variables to set.
10530 * Servers and Methods::         You can use server names as select methods.
10531 * Unavailable Servers::         Some servers you try to contact may be down.
10532 @end menu
10533
10534 @vindex gnus-server-mode-hook
10535 @code{gnus-server-mode-hook} is run when creating the server buffer.
10536
10537
10538 @node Server Buffer Format
10539 @subsection Server Buffer Format
10540 @cindex server buffer format
10541
10542 @vindex gnus-server-line-format
10543 You can change the look of the server buffer lines by changing the
10544 @code{gnus-server-line-format} variable.  This is a @code{format}-like
10545 variable, with some simple extensions:
10546
10547 @table @samp
10548
10549 @item h
10550 How the news is fetched---the backend name.
10551
10552 @item n
10553 The name of this server.
10554
10555 @item w
10556 Where the news is to be fetched from---the address.
10557
10558 @item s
10559 The opened/closed/denied status of the server.
10560 @end table
10561
10562 @vindex gnus-server-mode-line-format
10563 The mode line can also be customized by using the
10564 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
10565 Formatting}).  The following specs are understood:
10566
10567 @table @samp
10568 @item S
10569 Server name.
10570
10571 @item M
10572 Server method.
10573 @end table
10574
10575 Also @pxref{Formatting Variables}.
10576
10577
10578 @node Server Commands
10579 @subsection Server Commands
10580 @cindex server commands
10581
10582 @table @kbd
10583
10584 @item a
10585 @kindex a (Server)
10586 @findex gnus-server-add-server
10587 Add a new server (@code{gnus-server-add-server}).
10588
10589 @item e
10590 @kindex e (Server)
10591 @findex gnus-server-edit-server
10592 Edit a server (@code{gnus-server-edit-server}).
10593
10594 @item SPACE
10595 @kindex SPACE (Server)
10596 @findex gnus-server-read-server
10597 Browse the current server (@code{gnus-server-read-server}).
10598
10599 @item q
10600 @kindex q (Server)
10601 @findex gnus-server-exit
10602 Return to the group buffer (@code{gnus-server-exit}).
10603
10604 @item k
10605 @kindex k (Server)
10606 @findex gnus-server-kill-server
10607 Kill the current server (@code{gnus-server-kill-server}).
10608
10609 @item y
10610 @kindex y (Server)
10611 @findex gnus-server-yank-server
10612 Yank the previously killed server (@code{gnus-server-yank-server}).
10613
10614 @item c
10615 @kindex c (Server)
10616 @findex gnus-server-copy-server
10617 Copy the current server (@code{gnus-server-copy-server}).
10618
10619 @item l
10620 @kindex l (Server)
10621 @findex gnus-server-list-servers
10622 List all servers (@code{gnus-server-list-servers}).
10623
10624 @item s
10625 @kindex s (Server)
10626 @findex gnus-server-scan-server
10627 Request that the server scan its sources for new articles
10628 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
10629 servers.
10630
10631 @item g
10632 @kindex g (Server)
10633 @findex gnus-server-regenerate-server
10634 Request that the server regenerate all its data structures
10635 (@code{gnus-server-regenerate-server}).  This can be useful if you have
10636 a mail backend that has gotten out of sync.
10637
10638 @end table
10639
10640
10641 @node Example Methods
10642 @subsection Example Methods
10643
10644 Most select methods are pretty simple and self-explanatory:
10645
10646 @lisp
10647 (nntp "news.funet.fi")
10648 @end lisp
10649
10650 Reading directly from the spool is even simpler:
10651
10652 @lisp
10653 (nnspool "")
10654 @end lisp
10655
10656 As you can see, the first element in a select method is the name of the
10657 backend, and the second is the @dfn{address}, or @dfn{name}, if you
10658 will.
10659
10660 After these two elements, there may be an arbitrary number of
10661 @code{(@var{variable} @var{form})} pairs.
10662
10663 To go back to the first example---imagine that you want to read from
10664 port 15 on that machine.  This is what the select method should
10665 look like then:
10666
10667 @lisp
10668 (nntp "news.funet.fi" (nntp-port-number 15))
10669 @end lisp
10670
10671 You should read the documentation to each backend to find out what
10672 variables are relevant, but here's an @code{nnmh} example:
10673
10674 @code{nnmh} is a mail backend that reads a spool-like structure.  Say
10675 you have two structures that you wish to access: One is your private
10676 mail spool, and the other is a public one.  Here's the possible spec for
10677 your private mail:
10678
10679 @lisp
10680 (nnmh "private" (nnmh-directory "~/private/mail/"))
10681 @end lisp
10682
10683 (This server is then called @samp{private}, but you may have guessed
10684 that.)
10685
10686 Here's the method for a public spool:
10687
10688 @lisp
10689 (nnmh "public"
10690       (nnmh-directory "/usr/information/spool/")
10691       (nnmh-get-new-mail nil))
10692 @end lisp
10693
10694 @cindex proxy
10695 @cindex firewall
10696
10697 If you are behind a firewall and only have access to the @sc{nntp}
10698 server from the firewall machine, you can instruct Gnus to @code{rlogin}
10699 on the firewall machine and telnet from there to the @sc{nntp} server.
10700 Doing this can be rather fiddly, but your virtual server definition
10701 should probably look something like this:
10702
10703 @lisp
10704 (nntp "firewall"
10705       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
10706       (nntp-via-address "the.firewall.machine")
10707       (nntp-address "the.real.nntp.host")
10708       (nntp-end-of-line "\n"))
10709 @end lisp
10710
10711 If you want to use the wonderful @code{ssh} program to provide a
10712 compressed connection over the modem line, you could add the following
10713 configuration to the example above:
10714
10715 @lisp
10716       (nntp-via-rlogin-command "ssh")
10717 @end lisp
10718
10719 If you're behind a firewall, but have direct access to the outside world
10720 through a wrapper command like "runsocks", you could open a socksified
10721 telnet connection to the news server as follows:
10722
10723 @lisp
10724 (nntp "outside"
10725       (nntp-pre-command "runsocks")
10726       (nntp-open-connection-function nntp-open-via-telnet)
10727       (nntp-address "the.news.server")
10728       (nntp-end-of-line "\n"))
10729 @end lisp
10730
10731 This means that you have to have set up @code{ssh-agent} correctly to
10732 provide automatic authorization, of course.  And to get a compressed
10733 connection, you have to have the @samp{Compression} option in the
10734 @code{ssh} @file{config} file.
10735
10736
10737 @node Creating a Virtual Server
10738 @subsection Creating a Virtual Server
10739
10740 If you're saving lots of articles in the cache by using persistent
10741 articles, you may want to create a virtual server to read the cache.
10742
10743 First you need to add a new server.  The @kbd{a} command does that.  It
10744 would probably be best to use @code{nnspool} to read the cache.  You
10745 could also use @code{nnml} or @code{nnmh}, though.
10746
10747 Type @kbd{a nnspool RET cache RET}.
10748
10749 You should now have a brand new @code{nnspool} virtual server called
10750 @samp{cache}.  You now need to edit it to have the right definitions.
10751 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
10752 will contain the following:
10753
10754 @lisp
10755 (nnspool "cache")
10756 @end lisp
10757
10758 Change that to:
10759
10760 @lisp
10761 (nnspool "cache"
10762          (nnspool-spool-directory "~/News/cache/")
10763          (nnspool-nov-directory "~/News/cache/")
10764          (nnspool-active-file "~/News/cache/active"))
10765 @end lisp
10766
10767 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
10768 @kbd{RET} over this virtual server, you should be entered into a browse
10769 buffer, and you should be able to enter any of the groups displayed.
10770
10771
10772 @node Server Variables
10773 @subsection Server Variables
10774
10775 One sticky point when defining variables (both on backends and in Emacs
10776 in general) is that some variables are typically initialized from other
10777 variables when the definition of the variables is being loaded.  If you
10778 change the "base" variable after the variables have been loaded, you
10779 won't change the "derived" variables.
10780
10781 This typically affects directory and file variables.  For instance,
10782 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
10783 directory variables are initialized from that variable, so
10784 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
10785 new virtual @code{nnml} server, it will @emph{not} suffice to set just
10786 @code{nnml-directory}---you have to explicitly set all the file
10787 variables to be what you want them to be.  For a complete list of
10788 variables for each backend, see each backend's section later in this
10789 manual, but here's an example @code{nnml} definition:
10790
10791 @lisp
10792 (nnml "public"
10793       (nnml-directory "~/my-mail/")
10794       (nnml-active-file "~/my-mail/active")
10795       (nnml-newsgroups-file "~/my-mail/newsgroups"))
10796 @end lisp
10797
10798
10799 @node Servers and Methods
10800 @subsection Servers and Methods
10801
10802 Wherever you would normally use a select method
10803 (e.g. @code{gnus-secondary-select-method}, in the group select method,
10804 when browsing a foreign server) you can use a virtual server name
10805 instead.  This could potentially save lots of typing.  And it's nice all
10806 over.
10807
10808
10809 @node Unavailable Servers
10810 @subsection Unavailable Servers
10811
10812 If a server seems to be unreachable, Gnus will mark that server as
10813 @code{denied}.  That means that any subsequent attempt to make contact
10814 with that server will just be ignored.  ``It can't be opened,'' Gnus
10815 will tell you, without making the least effort to see whether that is
10816 actually the case or not.
10817
10818 That might seem quite naughty, but it does make sense most of the time.
10819 Let's say you have 10 groups subscribed to on server
10820 @samp{nephelococcygia.com}.  This server is located somewhere quite far
10821 away from you and the machine is quite slow, so it takes 1 minute just
10822 to find out that it refuses connection to you today.  If Gnus were to
10823 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
10824 attempt to do that.  Once it has gotten a single ``connection refused'',
10825 it will regard that server as ``down''.
10826
10827 So, what happens if the machine was only feeling unwell temporarily?
10828 How do you test to see whether the machine has come up again?
10829
10830 You jump to the server buffer (@pxref{Server Buffer}) and poke it
10831 with the following commands:
10832
10833 @table @kbd
10834
10835 @item O
10836 @kindex O (Server)
10837 @findex gnus-server-open-server
10838 Try to establish connection to the server on the current line
10839 (@code{gnus-server-open-server}).
10840
10841 @item C
10842 @kindex C (Server)
10843 @findex gnus-server-close-server
10844 Close the connection (if any) to the server
10845 (@code{gnus-server-close-server}).
10846
10847 @item D
10848 @kindex D (Server)
10849 @findex gnus-server-deny-server
10850 Mark the current server as unreachable
10851 (@code{gnus-server-deny-server}).
10852
10853 @item M-o
10854 @kindex M-o (Server)
10855 @findex gnus-server-open-all-servers
10856 Open the connections to all servers in the buffer
10857 (@code{gnus-server-open-all-servers}).
10858
10859 @item M-c
10860 @kindex M-c (Server)
10861 @findex gnus-server-close-all-servers
10862 Close the connections to all servers in the buffer
10863 (@code{gnus-server-close-all-servers}).
10864
10865 @item R
10866 @kindex R (Server)
10867 @findex gnus-server-remove-denials
10868 Remove all marks to whether Gnus was denied connection from any servers
10869 (@code{gnus-server-remove-denials}).
10870
10871 @end table
10872
10873
10874 @node Getting News
10875 @section Getting News
10876 @cindex reading news
10877 @cindex news backends
10878
10879 A newsreader is normally used for reading news.  Gnus currently provides
10880 only two methods of getting news---it can read from an @sc{nntp} server,
10881 or it can read from a local spool.
10882
10883 @menu
10884 * NNTP::                        Reading news from an @sc{nntp} server.
10885 * News Spool::                  Reading news from the local spool.
10886 @end menu
10887
10888
10889 @node NNTP
10890 @subsection @sc{nntp}
10891 @cindex nntp
10892
10893 Subscribing to a foreign group from an @sc{nntp} server is rather easy.
10894 You just specify @code{nntp} as method and the address of the @sc{nntp}
10895 server as the, uhm, address.
10896
10897 If the @sc{nntp} server is located at a non-standard port, setting the
10898 third element of the select method to this port number should allow you
10899 to connect to the right port.  You'll have to edit the group info for
10900 that (@pxref{Foreign Groups}).
10901
10902 The name of the foreign group can be the same as a native group.  In
10903 fact, you can subscribe to the same group from as many different servers
10904 you feel like.  There will be no name collisions.
10905
10906 The following variables can be used to create a virtual @code{nntp}
10907 server:
10908
10909 @table @code
10910
10911 @item nntp-server-opened-hook
10912 @vindex nntp-server-opened-hook
10913 @cindex @sc{mode reader}
10914 @cindex authinfo
10915 @cindex authentification
10916 @cindex nntp authentification
10917 @findex nntp-send-authinfo
10918 @findex nntp-send-mode-reader
10919 is run after a connection has been made.  It can be used to send
10920 commands to the @sc{nntp} server after it has been contacted.  By
10921 default it sends the command @code{MODE READER} to the server with the
10922 @code{nntp-send-mode-reader} function.  This function should always be
10923 present in this hook.
10924
10925 @item nntp-authinfo-function
10926 @vindex nntp-authinfo-function
10927 @findex nntp-send-authinfo
10928 @vindex nntp-authinfo-file
10929 This function will be used to send @samp{AUTHINFO} to the @sc{nntp}
10930 server.  The default function is @code{nntp-send-authinfo}, which looks
10931 through your @file{~/.authinfo} (or whatever you've set the
10932 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
10933 are found, it will prompt you for a login name and a password.  The
10934 format of the @file{~/.authinfo} file is (almost) the same as the
10935 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
10936 manual page, but here are the salient facts:
10937
10938 @enumerate
10939 @item
10940 The file contains one or more line, each of which define one server.
10941
10942 @item
10943 Each line may contain an arbitrary number of token/value pairs.
10944
10945 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
10946 @samp{default}.  In addition Gnus introduces two new tokens, not present
10947 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
10948 @samp{force}.  (This is the only way the @file{.authinfo} file format
10949 deviates from the @file{.netrc} file format.)  @samp{port} is used to
10950 indicate what port on the server the credentials apply to and
10951 @samp{force} is explained below.
10952
10953 @end enumerate
10954
10955 Here's an example file:
10956
10957 @example
10958 machine news.uio.no login larsi password geheimnis
10959 machine nntp.ifi.uio.no login larsi force yes
10960 @end example
10961
10962 The token/value pairs may appear in any order; @samp{machine} doesn't
10963 have to be first, for instance.
10964
10965 In this example, both login name and password have been supplied for the
10966 former server, while the latter has only the login name listed, and the
10967 user will be prompted for the password.  The latter also has the
10968 @samp{force} tag, which means that the authinfo will be sent to the
10969 @var{nntp} server upon connection; the default (i.e., when there is not
10970 @samp{force} tag) is to not send authinfo to the @var{nntp} server
10971 until the @var{nntp} server asks for it.
10972
10973 You can also add @samp{default} lines that will apply to all servers
10974 that don't have matching @samp{machine} lines.
10975
10976 @example
10977 default force yes
10978 @end example
10979
10980 This will force sending @samp{AUTHINFO} commands to all servers not
10981 previously mentioned.
10982
10983 Remember to not leave the @file{~/.authinfo} file world-readable.
10984
10985 @item nntp-server-action-alist
10986 @vindex nntp-server-action-alist
10987 This is a list of regexps to match on server types and actions to be
10988 taken when matches are made.  For instance, if you want Gnus to beep
10989 every time you connect to innd, you could say something like:
10990
10991 @lisp
10992 (setq nntp-server-action-alist
10993       '(("innd" (ding))))
10994 @end lisp
10995
10996 You probably don't want to do that, though.
10997
10998 The default value is
10999
11000 @lisp
11001 '(("nntpd 1\\.5\\.11t"
11002    (remove-hook 'nntp-server-opened-hook
11003                 'nntp-send-mode-reader)))
11004 @end lisp
11005
11006 This ensures that Gnus doesn't send the @code{MODE READER} command to
11007 nntpd 1.5.11t, since that command chokes that server, I've been told.
11008
11009 @item nntp-maximum-request
11010 @vindex nntp-maximum-request
11011 If the @sc{nntp} server doesn't support @sc{nov} headers, this backend
11012 will collect headers by sending a series of @code{head} commands.  To
11013 speed things up, the backend sends lots of these commands without
11014 waiting for reply, and then reads all the replies.  This is controlled
11015 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
11016 your network is buggy, you should set this to 1.
11017
11018 @item nntp-connection-timeout
11019 @vindex nntp-connection-timeout
11020 If you have lots of foreign @code{nntp} groups that you connect to
11021 regularly, you're sure to have problems with @sc{nntp} servers not
11022 responding properly, or being too loaded to reply within reasonable
11023 time.  This is can lead to awkward problems, which can be helped
11024 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
11025 that says how many seconds the @code{nntp} backend should wait for a
11026 connection before giving up.  If it is @code{nil}, which is the default,
11027 no timeouts are done.
11028
11029 @c @item nntp-command-timeout
11030 @c @vindex nntp-command-timeout
11031 @c @cindex PPP connections
11032 @c @cindex dynamic IP addresses
11033 @c If you're running Gnus on a machine that has a dynamically assigned
11034 @c address, Gnus may become confused.  If the address of your machine
11035 @c changes after connecting to the @sc{nntp} server, Gnus will simply sit
11036 @c waiting forever for replies from the server.  To help with this
11037 @c unfortunate problem, you can set this command to a number.  Gnus will
11038 @c then, if it sits waiting for a reply from the server longer than that
11039 @c number of seconds, shut down the connection, start a new one, and resend
11040 @c the command.  This should hopefully be transparent to the user.  A
11041 @c likely number is 30 seconds.
11042 @c
11043 @c @item nntp-retry-on-break
11044 @c @vindex nntp-retry-on-break
11045 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
11046 @c hangs.  This will have much the same effect as the command timeout
11047 @c described above.
11048
11049 @item nntp-server-hook
11050 @vindex nntp-server-hook
11051 This hook is run as the last step when connecting to an @sc{nntp}
11052 server.
11053
11054 @item nntp-buggy-select
11055 @vindex nntp-buggy-select
11056 Set this to non-@code{nil} if your select routine is buggy.
11057
11058 @item nntp-nov-is-evil
11059 @vindex nntp-nov-is-evil
11060 If the @sc{nntp} server does not support @sc{nov}, you could set this
11061 variable to @code{t}, but @code{nntp} usually checks automatically whether @sc{nov}
11062 can be used.
11063
11064 @item nntp-xover-commands
11065 @vindex nntp-xover-commands
11066 @cindex nov
11067 @cindex XOVER
11068 List of strings used as commands to fetch @sc{nov} lines from a
11069 server.  The default value of this variable is @code{("XOVER"
11070 "XOVERVIEW")}.
11071
11072 @item nntp-nov-gap
11073 @vindex nntp-nov-gap
11074 @code{nntp} normally sends just one big request for @sc{nov} lines to
11075 the server.  The server responds with one huge list of lines.  However,
11076 if you have read articles 2-5000 in the group, and only want to read
11077 article 1 and 5001, that means that @code{nntp} will fetch 4999 @sc{nov}
11078 lines that you will not need.  This variable says how
11079 big a gap between two consecutive articles is allowed to be before the
11080 @code{XOVER} request is split into several request.  Note that if your
11081 network is fast, setting this variable to a really small number means
11082 that fetching will probably be slower.  If this variable is @code{nil},
11083 @code{nntp} will never split requests.  The default is 5.
11084
11085 @item nntp-prepare-server-hook
11086 @vindex nntp-prepare-server-hook
11087 A hook run before attempting to connect to an @sc{nntp} server.
11088
11089 @item nntp-warn-about-losing-connection
11090 @vindex nntp-warn-about-losing-connection
11091 If this variable is non-@code{nil}, some noise will be made when a
11092 server closes connection.
11093
11094 @item nntp-record-commands
11095 @vindex nntp-record-commands
11096 If non-@code{nil}, @code{nntp} will log all commands it sends to the
11097 @sc{nntp} server (along with a timestamp) in the @samp{*nntp-log*}
11098 buffer.  This is useful if you are debugging a Gnus/@sc{nntp} connection
11099 that doesn't seem to work.
11100
11101 @item nntp-open-connection-function
11102 @vindex nntp-open-connection-function
11103 It is possible to customize how the connection to the nntp server will
11104 be opened.  If you specify an @code{nntp-open-connection-function}
11105 parameter, Gnus will use that function to establish the connection.
11106 Five pre-made functions are supplied.  These functions can be grouped in
11107 two categories: direct connection functions (three pre-made), and
11108 indirect ones (two pre-made).
11109
11110 @item nntp-list-options
11111 @vindex nntp-list-options
11112 List of newsgroup name used for a option of the LIST command to restrict
11113 the listing output to only the specified newsgroups.  Each newsgroup name
11114 can be a shell-style wildcard, for instance, @dfn{fj.*}, @dfn{japan.*},
11115 etc.  Fortunately, if the server can accept such a option, it will
11116 probably make gnus run faster.  You may use it as a server variable as
11117 follows:
11118
11119 @lisp
11120 (setq gnus-select-method
11121       '(nntp "news.somewhere.edu"
11122              (nntp-list-options ("fj.*" "japan.*"))))
11123 @end lisp
11124
11125 @item nntp-options-subscribe
11126 @vindex nntp-options-subscribe
11127 Regexp matching the newsgroup names which will be subscribed
11128 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
11129 It may be effective as well as @code{nntp-list-options} even though the
11130 server could not accept a shell-style wildcard as a option of the LIST
11131 command.  You may use it as a server variable as follows:
11132
11133 @lisp
11134 (setq gnus-select-method
11135       '(nntp "news.somewhere.edu"
11136              (nntp-options-subscribe "^fj\\.\\|^japan\\.")))
11137 @end lisp
11138
11139 @item nntp-options-not-subscribe
11140 @vindex nntp-options-not-subscribe
11141 Regexp matching the newsgroup names which will not be subscribed
11142 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
11143 It may be effective as well as @code{nntp-list-options} even though the
11144 server could not accept a shell-style wildcard as a option of the LIST
11145 command.  You may use it as a server variable as follows:
11146
11147 @lisp
11148 (setq gnus-select-method
11149       '(nntp "news.somewhere.edu"
11150              (nntp-options-not-subscribe "\\.binaries\\.")))
11151 @end lisp
11152 @end table
11153
11154 @menu
11155 * Direct Functions::            Connecting directly to the server.
11156 * Indirect Functions::          Connecting indirectly to the server.
11157 * Common Variables::            Understood by several connection functions.
11158 @end menu
11159
11160
11161 @node Direct Functions
11162 @subsubsection Direct Functions
11163 @cindex direct connection functions
11164
11165 These functions are called direct because they open a direct connection
11166 between your machine and the @sc{nntp} server.  The behavior of these
11167 functions is also affected by commonly understood variables
11168 (@pxref{Common Variables}).
11169
11170 @table @code
11171 @findex nntp-open-network-stream
11172 @item nntp-open-network-stream
11173 This is the default, and simply connects to some port or other on the
11174 remote system.
11175
11176 @findex nntp-open-ssl-stream
11177 @item nntp-open-ssl-stream
11178 Opens a connection to a server over a @dfn{secure} channel.  To use this
11179 you must have SSLay installed
11180 (@uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL}, and you also need
11181 @file{ssl.el} (from the W3 distribution, for instance).  You then
11182 define a server as follows:
11183
11184 @lisp
11185 ;; Type `C-c C-c' after you've finished editing.
11186 ;;
11187 ;; "snews" is port 563 and is predefined in our /etc/services
11188 ;;
11189 (nntp "snews.bar.com"
11190       (nntp-open-connection-function nntp-open-ssl-stream)
11191       (nntp-port-number "snews")
11192       (nntp-address "snews.bar.com"))
11193 @end lisp
11194
11195 @findex nntp-open-telnet-stream
11196 @item nntp-open-telnet-stream
11197 Opens a connection to an @sc{nntp} server by simply @samp{telnet}'ing
11198 it.  You might wonder why this function exists, since we have the
11199 default @code{nntp-open-network-stream} which would do the job.  (One
11200 of) the reason(s) is that if you are behind a firewall but have direct
11201 connections to the outside world thanks to a command wrapper like
11202 @code{runsocks}, you can use it like this:
11203
11204 @lisp
11205 (nntp "socksified"
11206       (nntp-pre-command "runsocks")
11207       (nntp-open-connection-function nntp-open-telnet-stream)
11208       (nntp-address "the.news.server"))
11209 @end lisp
11210
11211 With the default method, you would need to wrap your whole Emacs
11212 session, which is not a good idea.
11213 @end table
11214
11215
11216 @node Indirect Functions
11217 @subsubsection Indirect Functions
11218 @cindex indirect connection functions
11219
11220 These functions are called indirect because they connect to an
11221 intermediate host before actually connecting to the @sc{nntp} server.
11222 All of these functions and related variables are also said to belong to
11223 the "via" family of connection: they're all prefixed with "via" to make
11224 things cleaner.  The behavior of these functions is also affected by
11225 commonly understood variables (@pxref{Common Variables}).
11226
11227 @table @code
11228 @item nntp-open-via-rlogin-and-telnet
11229 @findex nntp-open-via-rlogin-and-telnet
11230 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
11231 to the real @sc{nntp} server from there.  This is useful for instance if
11232 you need to connect to a firewall machine first.
11233
11234 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
11235
11236 @table @code
11237 @item nntp-via-rlogin-command
11238 @vindex nntp-via-rlogin-command
11239 Command used to log in on the intermediate host.  The default is
11240 @samp{rsh}, but @samp{ssh} is a popular alternative.
11241 @end table
11242
11243 @item nntp-open-via-telnet-and-telnet
11244 @findex nntp-open-via-telnet-and-telnet
11245 Does essentially the same, but uses @samp{telnet} instead of
11246 @samp{rlogin} to connect to the intermediate host.
11247
11248 @code{nntp-open-via-telnet-and-telnet}-specific variables:
11249
11250 @table @code
11251 @item nntp-via-telnet-command
11252 @vindex nntp-via-telnet-command
11253 Command used to @code{telnet} the intermediate host.  The default is
11254 @samp{telnet}.
11255
11256 @item nntp-via-telnet-switches
11257 @vindex nntp-via-telnet-switches
11258 List of strings to be used as the switches to the
11259 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
11260
11261 @item nntp-via-user-password
11262 @vindex nntp-via-user-password
11263 Password to use when logging in on the intermediate host.
11264
11265 @item nntp-via-envuser
11266 @vindex nntp-via-envuser
11267 If non-@code{nil}, the intermediate @code{telnet} session (client and
11268 server both) will support the @code{ENVIRON} option and not prompt for
11269 login name. This works for Solaris @code{telnet}, for instance.
11270
11271 @item nntp-via-shell-prompt
11272 @vindex nntp-via-shell-prompt
11273 Regexp matching the shell prompt on the intermediate host.  The default
11274 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
11275
11276 @end table
11277
11278 @end table
11279
11280
11281 Here are some additional variables that are understood by all the above
11282 functions:
11283
11284 @table @code
11285
11286 @item nntp-via-user-name
11287 @vindex nntp-via-user-name
11288 User name to use when connecting to the intermediate host.
11289
11290 @item nntp-via-address
11291 @vindex nntp-via-address
11292 Address of the intermediate host to connect to.
11293
11294 @end table
11295
11296
11297 @node Common Variables
11298 @subsubsection Common Variables
11299
11300 The following variables affect the behavior of all, or several of the
11301 pre-made connection functions. When not specified, all functions are
11302 affected.
11303
11304 @table @code
11305
11306 @item nntp-pre-command
11307 @vindex nntp-pre-command
11308 A command wrapper to use when connecting through a non native connection
11309 function (all except @code{nntp-open-network-stream} and
11310 @code{nntp-open-ssl-stream}.  This is where you would put a @samp{SOCKS}
11311 wrapper for instance.
11312
11313 @item nntp-address
11314 @vindex nntp-address
11315 The address of the @sc{nntp} server.
11316
11317 @item nntp-port-number
11318 @vindex nntp-port-number
11319 Port number to connect to the @sc{nntp} server.  The default is @samp{nntp}.
11320
11321 @item nntp-end-of-line
11322 @vindex nntp-end-of-line
11323 String to use as end-of-line marker when talking to the @sc{nntp}
11324 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
11325 using a non native connection function.
11326
11327 @item nntp-telnet-command
11328 @vindex nntp-telnet-command
11329 Command to use when connecting to the @sc{nntp} server through
11330 @samp{telnet}.  This is NOT for an intermediate host.  This is just for
11331 the real @sc{nntp} server.  The default is @samp{telnet}.
11332
11333 @item nntp-telnet-switches
11334 @vindex nntp-telnet-switches
11335 A list of switches to pass to @code{nntp-telnet-command}.  The default
11336 is @samp{("-8")}.
11337
11338 @end table
11339
11340
11341 @node News Spool
11342 @subsection News Spool
11343 @cindex nnspool
11344 @cindex news spool
11345
11346 Subscribing to a foreign group from the local spool is extremely easy,
11347 and might be useful, for instance, to speed up reading groups that
11348 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
11349 instance.
11350
11351 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
11352 anything else) as the address.
11353
11354 If you have access to a local spool, you should probably use that as the
11355 native select method (@pxref{Finding the News}).  It is normally faster
11356 than using an @code{nntp} select method, but might not be.  It depends.
11357 You just have to try to find out what's best at your site.
11358
11359 @table @code
11360
11361 @item nnspool-inews-program
11362 @vindex nnspool-inews-program
11363 Program used to post an article.
11364
11365 @item nnspool-inews-switches
11366 @vindex nnspool-inews-switches
11367 Parameters given to the inews program when posting an article.
11368
11369 @item nnspool-spool-directory
11370 @vindex nnspool-spool-directory
11371 Where @code{nnspool} looks for the articles.  This is normally
11372 @file{/usr/spool/news/}.
11373
11374 @item nnspool-nov-directory
11375 @vindex nnspool-nov-directory
11376 Where @code{nnspool} will look for @sc{nov} files.  This is normally
11377 @file{/usr/spool/news/over.view/}.
11378
11379 @item nnspool-lib-dir
11380 @vindex nnspool-lib-dir
11381 Where the news lib dir is (@file{/usr/lib/news/} by default).
11382
11383 @item nnspool-active-file
11384 @vindex nnspool-active-file
11385 The path to the active file.
11386
11387 @item nnspool-newsgroups-file
11388 @vindex nnspool-newsgroups-file
11389 The path to the group descriptions file.
11390
11391 @item nnspool-history-file
11392 @vindex nnspool-history-file
11393 The path to the news history file.
11394
11395 @item nnspool-active-times-file
11396 @vindex nnspool-active-times-file
11397 The path to the active date file.
11398
11399 @item nnspool-nov-is-evil
11400 @vindex nnspool-nov-is-evil
11401 If non-@code{nil}, @code{nnspool} won't try to use any @sc{nov} files
11402 that it finds.
11403
11404 @item nnspool-sift-nov-with-sed
11405 @vindex nnspool-sift-nov-with-sed
11406 @cindex sed
11407 If non-@code{nil}, which is the default, use @code{sed} to get the
11408 relevant portion from the overview file.  If nil, @code{nnspool} will
11409 load the entire file into a buffer and process it there.
11410
11411 @end table
11412
11413
11414 @node Getting Mail
11415 @section Getting Mail
11416 @cindex reading mail
11417 @cindex mail
11418
11419 Reading mail with a newsreader---isn't that just plain WeIrD? But of
11420 course.
11421
11422 @menu
11423 * Mail in a Newsreader::        Important introductory notes.
11424 * Getting Started Reading Mail::  A simple cookbook example.
11425 * Splitting Mail::              How to create mail groups.
11426 * Mail Sources::                How to tell Gnus where to get mail from.
11427 * Mail Backend Variables::      Variables for customizing mail handling.
11428 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
11429 * Group Mail Splitting::        Use group customize to drive mail splitting.
11430 * Incorporating Old Mail::      What about the old mail you have?
11431 * Expiring Mail::               Getting rid of unwanted mail.
11432 * Washing Mail::                Removing gruft from the mail you get.
11433 * Duplicates::                  Dealing with duplicated mail.
11434 * Not Reading Mail::            Using mail backends for reading other files.
11435 * Choosing a Mail Backend::     Gnus can read a variety of mail formats.
11436 @end menu
11437
11438
11439 @node Mail in a Newsreader
11440 @subsection Mail in a Newsreader
11441
11442 If you are used to traditional mail readers, but have decided to switch
11443 to reading mail with Gnus, you may find yourself experiencing something
11444 of a culture shock.
11445
11446 Gnus does not behave like traditional mail readers.  If you want to make
11447 it behave that way, you can, but it's an uphill battle.
11448
11449 Gnus, by default, handles all its groups using the same approach.  This
11450 approach is very newsreaderly---you enter a group, see the new/unread
11451 messages, and when you read the messages, they get marked as read, and
11452 you don't see them any more.  (Unless you explicitly ask for them.)
11453
11454 In particular, you do not do anything explicitly to delete messages.
11455
11456 Does this mean that all the messages that have been marked as read are
11457 deleted?  How awful!
11458
11459 But, no, it means that old messages are @dfn{expired} according to some
11460 scheme or other.  For news messages, the expire process is controlled by
11461 the news administrator; for mail, the expire process is controlled by
11462 you.  The expire process for mail is covered in depth in @pxref{Expiring
11463 Mail}.
11464
11465 What many Gnus users find, after using it a while for both news and
11466 mail, is that the transport mechanism has very little to do with how
11467 they want to treat a message.
11468
11469 Many people subscribe to several mailing lists.  These are transported
11470 via SMTP, and are therefore mail.  But we might go for weeks without
11471 answering, or even reading these messages very carefully.  We may not
11472 need to save them because if we should need to read one again, they are
11473 archived somewhere else.
11474
11475 Some people have local news groups which have only a handful of readers.
11476 These are transported via @sc{nntp}, and are therefore news.  But we may need
11477 to read and answer a large fraction of the messages very carefully in
11478 order to do our work.  And there may not be an archive, so we may need
11479 to save the interesting messages the same way we would personal mail.
11480
11481 The important distinction turns out to be not the transport mechanism,
11482 but other factors such as how interested we are in the subject matter,
11483 or how easy it is to retrieve the message if we need to read it again.
11484
11485 Gnus provides many options for sorting mail into ``groups'' which behave
11486 like newsgroups, and for treating each group (whether mail or news)
11487 differently.
11488
11489 Some users never get comfortable using the Gnus (ahem) paradigm and wish
11490 that Gnus should grow up and be a male, er, mail reader.  It is possible
11491 to whip Gnus into a more mailreaderly being, but, as said before, it's
11492 not easy.  People who prefer proper mail readers should try @sc{vm}
11493 instead, which is an excellent, and proper, mail reader.
11494
11495 I don't mean to scare anybody off, but I want to make it clear that you
11496 may be required to learn a new way of thinking about messages.  After
11497 you've been subjected to The Gnus Way, you will come to love it.  I can
11498 guarantee it.  (At least the guy who sold me the Emacs Subliminal
11499 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
11500 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
11501 You Do.)
11502
11503
11504 @node Getting Started Reading Mail
11505 @subsection Getting Started Reading Mail
11506
11507 It's quite easy to use Gnus to read your new mail.  You just plonk the
11508 mail backend of your choice into @code{gnus-secondary-select-methods},
11509 and things will happen automatically.
11510
11511 For instance, if you want to use @code{nnml} (which is a "one file per
11512 mail" backend), you could put the following in your @file{.gnus} file:
11513
11514 @lisp
11515 (setq gnus-secondary-select-methods '((nnml "")))
11516 @end lisp
11517
11518 Now, the next time you start Gnus, this backend will be queried for new
11519 articles, and it will move all the messages in your spool file to its
11520 directory, which is @code{~/Mail/} by default.  The new group that will
11521 be created (@samp{mail.misc}) will be subscribed, and you can read it
11522 like any other group.
11523
11524 You will probably want to split the mail into several groups, though:
11525
11526 @lisp
11527 (setq nnmail-split-methods
11528       '(("junk" "^From:.*Lars Ingebrigtsen")
11529         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
11530         ("other" "")))
11531 @end lisp
11532
11533 This will result in three new @code{nnml} mail groups being created:
11534 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
11535 mail that doesn't fit into the first two groups will be placed in the
11536 last group.
11537
11538 This should be sufficient for reading mail with Gnus.  You might want to
11539 give the other sections in this part of the manual a perusal, though.
11540 Especially @pxref{Choosing a Mail Backend} and @pxref{Expiring Mail}.
11541
11542
11543 @node Splitting Mail
11544 @subsection Splitting Mail
11545 @cindex splitting mail
11546 @cindex mail splitting
11547
11548 @vindex nnmail-split-methods
11549 The @code{nnmail-split-methods} variable says how the incoming mail is
11550 to be split into groups.
11551
11552 @lisp
11553 (setq nnmail-split-methods
11554   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
11555     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
11556     ("mail.other" "")))
11557 @end lisp
11558
11559 This variable is a list of lists, where the first element of each of
11560 these lists is the name of the mail group (they do not have to be called
11561 something beginning with @samp{mail}, by the way), and the second
11562 element is a regular expression used on the header of each mail to
11563 determine if it belongs in this mail group.  The first string may
11564 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
11565 insert sub-expressions from the matched text.  For instance:
11566
11567 @lisp
11568 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
11569 @end lisp
11570
11571 The second element can also be a function.  In that case, it will be
11572 called narrowed to the headers with the first element of the rule as the
11573 argument.  It should return a non-@code{nil} value if it thinks that the
11574 mail belongs in that group.
11575
11576 The last of these groups should always be a general one, and the regular
11577 expression should @emph{always} be @samp{} so that it matches any mails
11578 that haven't been matched by any of the other regexps.  (These rules are
11579 processed from the beginning of the alist toward the end.  The first
11580 rule to make a match will "win", unless you have crossposting enabled.
11581 In that case, all matching rules will "win".)
11582
11583 If you like to tinker with this yourself, you can set this variable to a
11584 function of your choice.  This function will be called without any
11585 arguments in a buffer narrowed to the headers of an incoming mail
11586 message.  The function should return a list of group names that it
11587 thinks should carry this mail message.
11588
11589 Note that the mail backends are free to maul the poor, innocent,
11590 incoming headers all they want to.  They all add @code{Lines} headers;
11591 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
11592 @code{From<SPACE>} line to something else.
11593
11594 @vindex nnmail-crosspost
11595 The mail backends all support cross-posting.  If several regexps match,
11596 the mail will be ``cross-posted'' to all those groups.
11597 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
11598 that no articles are crossposted to the general (@samp{}) group.
11599
11600 @vindex nnmail-crosspost-link-function
11601 @cindex crosspost
11602 @cindex links
11603 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
11604 the crossposted articles.  However, not all file systems support hard
11605 links.  If that's the case for you, set
11606 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
11607 variable is @code{add-name-to-file} by default.)
11608
11609 @kindex M-x nnmail-split-history
11610 @kindex nnmail-split-history
11611 If you wish to see where the previous mail split put the messages, you
11612 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
11613 where re-spooling messages would put the messages, you can use
11614 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
11615 Group Commands}).
11616
11617 Gnus gives you all the opportunity you could possibly want for shooting
11618 yourself in the foot.  Let's say you create a group that will contain
11619 all the mail you get from your boss.  And then you accidentally
11620 unsubscribe from the group.  Gnus will still put all the mail from your
11621 boss in the unsubscribed group, and so, when your boss mails you ``Have
11622 that report ready by Monday or you're fired!'', you'll never see it and,
11623 come Tuesday, you'll still believe that you're gainfully employed while
11624 you really should be out collecting empty bottles to save up for next
11625 month's rent money.
11626
11627
11628 @node Mail Sources
11629 @subsection Mail Sources
11630
11631 Mail can be gotten from many different sources---the mail spool, from a
11632 POP mail server, from a procmail directory, or from a maildir, for
11633 instance.
11634
11635 @menu
11636 * Mail Source Specifiers::      How to specify what a mail source is.
11637 * Mail Source Customization::   Some variables that influence things.
11638 * Fetching Mail::               Using the mail source specifiers.
11639 @end menu
11640
11641
11642 @node Mail Source Specifiers
11643 @subsubsection Mail Source Specifiers
11644 @cindex POP
11645 @cindex mail server
11646 @cindex procmail
11647 @cindex mail spool
11648 @cindex mail source
11649
11650 You tell Gnus how to fetch mail by setting @code{mail-sources}
11651 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
11652
11653 Here's an example:
11654
11655 @lisp
11656 (pop :server "pop3.mailserver.com" :user "myname")
11657 @end lisp
11658
11659 As can be observed, a mail source specifier is a list where the first
11660 element is a @dfn{mail source type}, followed by an arbitrary number of
11661 @dfn{keywords}.  Keywords that are not explicitly specified are given
11662 default values.
11663
11664 The following mail source types are available:
11665
11666 @table @code
11667 @item file
11668 Get mail from a single file; typically from the mail spool.
11669
11670 Keywords:
11671
11672 @table @code
11673 @item :path
11674 The path of the file.  Defaults to the value of the @code{MAIL}
11675 environment variable or @file{/usr/mail/spool/user-name}.
11676 @end table
11677
11678 An example file mail source:
11679
11680 @lisp
11681 (file :path "/usr/spool/mail/user-name")
11682 @end lisp
11683
11684 Or using the default path:
11685
11686 @lisp
11687 (file)
11688 @end lisp
11689
11690 If the mail spool file is not located on the local machine, it's best to
11691 use POP or @sc{imap} or the like to fetch the mail.  You can not use ange-ftp
11692 file names here---it has no way to lock the mail spool while moving the
11693 mail.
11694
11695 If it's impossible to set up a proper server, you can use ssh instead.
11696
11697 @lisp
11698 (setq mail-sources
11699       '((file :prescript "ssh host bin/getmail >%t")))
11700 @end lisp
11701
11702 The @samp{getmail} script would look something like the following:
11703
11704 @example
11705 #!/bin/sh
11706 #  getmail - move mail from spool to stdout
11707 #  flu@@iki.fi
11708
11709 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
11710 TMP=$HOME/Mail/tmp
11711 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
11712 @end example
11713
11714 Alter this script to fit find the @samp{movemail} you want to use.
11715
11716
11717 @item directory
11718 Get mail from several files in a directory.  This is typically used when
11719 you have procmail split the incoming mail into several files.  Setting
11720 @code{nnmail-scan-directory-mail-source-once} to non-nil forces Gnus to
11721 scan the mail source only once. This is particularly useful if you want
11722 to scan mail groups at a specified level.
11723
11724 Keywords:
11725
11726 @table @code
11727 @item :path
11728 The path of the directory where the files are.  There is no default
11729 value.
11730
11731 @item :suffix
11732 Only files ending with this suffix are used.  The default is
11733 @samp{.spool}.
11734
11735 @item :predicate
11736 Only files that have this predicate return non-@code{nil} are returned.
11737 The default is @code{identity}.  This is used as an additional
11738 filter---only files that have the right suffix @emph{and} satisfy this
11739 predicate are considered.
11740
11741 @item :prescript
11742 @itemx :postscript
11743 Script run before/after fetching mail.
11744
11745 @end table
11746
11747 An example directory mail source:
11748
11749 @lisp
11750 (directory :path "/home/user-name/procmail-dir/"
11751            :suffix ".prcml")
11752 @end lisp
11753
11754 @item pop
11755 Get mail from a POP server.
11756
11757 Keywords:
11758
11759 @table @code
11760 @item :server
11761 The name of the POP server.  The default is taken from the
11762 @code{MAILHOST} environment variable.
11763
11764 @item :port
11765 The port number of the POP server.  This can be a number (eg,
11766 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
11767 string, it should be a service name as listed in @file{/etc/services} on
11768 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
11769 need to specify it as @samp{"pop-3"} instead.
11770
11771 @item :user
11772 The user name to give to the POP server.  The default is the login
11773 name.
11774
11775 @item :password
11776 The password to give to the POP server.  If not specified, the user is
11777 prompted.
11778
11779 @item :program
11780 The program to use to fetch mail from the POP server.  This should be
11781 a @code{format}-like string.  Here's an example:
11782
11783 @example
11784 fetchmail %u@@%s -P %p %t
11785 @end example
11786
11787 The valid format specifier characters are:
11788
11789 @table @samp
11790 @item t
11791 The name of the file the mail is to be moved to.  This must always be
11792 included in this string.
11793
11794 @item s
11795 The name of the server.
11796
11797 @item P
11798 The port number of the server.
11799
11800 @item u
11801 The user name to use.
11802
11803 @item p
11804 The password to use.
11805 @end table
11806
11807 The values used for these specs are taken from the values you give the
11808 corresponding keywords.
11809
11810 @item :prescript
11811 A script to be run before fetching the mail.  The syntax is the same as
11812 the @code{:program} keyword.  This can also be a function to be run.
11813
11814 @item :postscript
11815 A script to be run after fetching the mail.  The syntax is the same as
11816 the @code{:program} keyword.  This can also be a function to be run.
11817
11818 @item :function
11819 The function to use to fetch mail from the POP server.  The function is
11820 called with one parameter---the name of the file where the mail should
11821 be moved to.
11822
11823 @item :authentication
11824 This can be either the symbol @code{password} or the symbol @code{apop}
11825 and says what authentication scheme to use.  The default is
11826 @code{password}.
11827
11828 @end table
11829
11830 If the @code{:program} and @code{:function} keywords aren't specified,
11831 @code{pop3-movemail} will be used.
11832
11833 Here are some examples.  Fetch from the default POP server, using the
11834 default user name, and default fetcher:
11835
11836 @lisp
11837 (pop)
11838 @end lisp
11839
11840 Fetch from a named server with a named user and password:
11841
11842 @lisp
11843 (pop :server "my.pop.server"
11844      :user "user-name" :password "secret")
11845 @end lisp
11846
11847 Use @samp{movemail} to move the mail:
11848
11849 @lisp
11850 (pop :program "movemail po:%u %t %p")
11851 @end lisp
11852
11853 @item maildir
11854 Get mail from a maildir.  This is a type of mailbox that is supported by
11855 at least qmail and postfix, where each file in a special directory
11856 contains exactly one mail.
11857
11858 Keywords:
11859
11860 @table @code
11861 @item :path
11862 The path of the directory where the mails are stored.  The default is
11863 taken from the @code{MAILDIR} environment variable or
11864 @samp{~/Maildir/}.
11865 @item :subdirs
11866 The subdirectories of the Maildir.  The default is
11867 @samp{("new" "cur")}.
11868
11869 @c If you sometimes look at your mail through a pop3 daemon before fetching
11870 @c them with Gnus, you may also have to fetch your mails from the
11871 @c @code{cur} directory inside the maildir, like in the first example
11872 @c below.
11873
11874 You can also get mails from remote hosts (because maildirs don't suffer
11875 from locking problems).
11876
11877 @end table
11878
11879 Two example maildir mail sources:
11880
11881 @lisp
11882 (maildir :path "/home/user-name/Maildir/"
11883          :subdirs ("cur" "new"))
11884 @end lisp
11885
11886 @lisp
11887 (maildir :path "/user@@remotehost.org:~/Maildir/"
11888          :subdirs ("new"))
11889 @end lisp
11890
11891 @item imap
11892 Get mail from a @sc{imap} server.  If you don't want to use @sc{imap}
11893 as intended, as a network mail reading protocol (ie with nnimap), for
11894 some reason or other, Gnus let you treat it similar to a POP server
11895 and fetches articles from a given @sc{imap} mailbox.  @xref{IMAP}, for
11896 more information.
11897
11898 Keywords:
11899
11900 @table @code
11901 @item :server
11902 The name of the @sc{imap} server.  The default is taken from the
11903 @code{MAILHOST} environment variable.
11904
11905 @item :port
11906 The port number of the @sc{imap} server.  The default is @samp{143}, or
11907 @samp{993} for SSL connections.
11908
11909 @item :user
11910 The user name to give to the @sc{imap} server.  The default is the login
11911 name.
11912
11913 @item :password
11914 The password to give to the @sc{imap} server.  If not specified, the user is
11915 prompted.
11916
11917 @item :stream
11918 What stream to use for connecting to the server, this is one of the
11919 symbols in @code{imap-stream-alist}.  Right now, this means
11920 @samp{kerberos4}, @samp{ssl} or the default @samp{network}.
11921
11922 @item :authentication
11923 Which authenticator to use for authenticating to the server, this is one
11924 of the symbols in @code{imap-authenticator-alist}.  Right now, this
11925 means @samp{kerberos4}, @samp{cram-md5}, @samp{anonymous} or the default
11926 @samp{login}.
11927
11928 @item :program
11929 When using the `shell' :stream, the contents of this variable is
11930 mapped into the `imap-shell-program' variable.  This should be a
11931 @code{format}-like string (or list of strings).  Here's an example:
11932
11933 @example
11934 ssh %s imapd
11935 @end example
11936
11937 The valid format specifier characters are:
11938
11939 @table @samp
11940 @item s
11941 The name of the server.
11942
11943 @item l
11944 User name from `imap-default-user'.
11945
11946 @item p
11947 The port number of the server.
11948 @end table
11949
11950 The values used for these specs are taken from the values you give the
11951 corresponding keywords.
11952
11953 @item :mailbox
11954 The name of the mailbox to get mail from.  The default is @samp{INBOX}
11955 which normally is the mailbox which receive incoming mail.
11956
11957 @item :predicate
11958 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
11959 UNDELETED}, is probably the best choice for most people, but if you
11960 sometimes peek in your mailbox with a @sc{imap} client and mark some
11961 articles as read (or; SEEN) you might want to set this to @samp{nil}.
11962 Then all articles in the mailbox is fetched, no matter what.  For a
11963 complete list of predicates, see RFC 2060 Â§6.4.4.
11964
11965 @item :fetchflag
11966 How to flag fetched articles on the server, the default @samp{\Deleted}
11967 will mark them as deleted, an alternative would be @samp{\Seen} which
11968 would simply mark them as read.  These are the two most likely choices,
11969 but more flags are defined in RFC 2060 Â§2.3.2.
11970
11971 @item :dontexpunge
11972 If non-nil, don't remove all articles marked as deleted in the mailbox
11973 after finishing the fetch.
11974
11975 @end table
11976
11977 An example @sc{imap} mail source:
11978
11979 @lisp
11980 (imap :server "mail.mycorp.com"
11981       :stream kerberos4
11982       :fetchflag "\\Seen")
11983 @end lisp
11984
11985 @item webmail
11986 Get mail from a webmail server, such as www.hotmail.com,
11987 webmail.netscape.com, www.netaddress.com, www.my-deja.com.
11988
11989 NOTE: Now mail.yahoo.com provides POP3 service, so @sc{pop} mail source
11990 is suggested.
11991
11992 NOTE: Webmail largely depends cookies. A "one-line-cookie" patch is
11993 required for url "4.0pre.46".
11994
11995 WARNING: Mails may lost.  NO WARRANTY.
11996
11997 Keywords:
11998
11999 @table @code
12000 @item :subtype
12001 The type of the webmail server.  The default is @code{hotmail}.  The
12002 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
12003
12004 @item :user
12005 The user name to give to the webmail server.  The default is the login
12006 name.
12007
12008 @item :password
12009 The password to give to the webmail server.  If not specified, the user is
12010 prompted.
12011
12012 @item :dontexpunge
12013 If non-nil, only fetch unread articles and don't move them to trash
12014 folder after finishing the fetch.
12015
12016 @end table
12017
12018 An example webmail source:
12019
12020 @lisp
12021 (webmail :subtype 'hotmail
12022          :user "user-name"
12023          :password "secret")
12024 @end lisp
12025 @end table
12026
12027 @table @dfn
12028 @item Common Keywords
12029 Common keywords can be used in any type of mail source.
12030
12031 Keywords:
12032
12033 @table @code
12034 @item :plugged
12035 If non-nil, fetch the mail even when Gnus is unplugged.  If you use
12036 directory source to get mail, you can specify it as in this example:
12037
12038 @lisp
12039 (setq mail-sources
12040       '((directory :path "/home/pavel/.Spool/"
12041                    :suffix ""
12042                    :plugged t)))
12043 @end lisp
12044
12045 Gnus will then fetch your mail even when you are unplugged.  This is
12046 useful when you use local mail and news.
12047
12048 @end table
12049 @end table
12050
12051 @subsubsection Function Interface
12052
12053 Some of the above keywords specify a Lisp function to be executed.
12054 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
12055 the value of the keyword while the function is executing.  For example,
12056 consider the following mail-source setting:
12057
12058 @lisp
12059 (setq mail-sources '((pop :user "jrl"
12060                           :server "pophost" :function fetchfunc)))
12061 @end lisp
12062
12063 While the function @code{fetchfunc} is executing, the symbol @code{user}
12064 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
12065 @code{"pophost"}.  The symbols @code{port}, @code{password},
12066 @code{program}, @code{prescript}, @code{postscript}, @code{function},
12067 and @code{authentication} are also bound (to their default values).
12068
12069 See above for a list of keywords for each type of mail source.
12070
12071
12072 @node Mail Source Customization
12073 @subsubsection Mail Source Customization
12074
12075 The following is a list of variables that influence how the mail is
12076 fetched.  You would normally not need to set or change any of these
12077 variables.
12078
12079 @table @code
12080 @item mail-source-crash-box
12081 @vindex mail-source-crash-box
12082 File where mail will be stored while processing it.  The default is
12083 @file{~/.emacs-mail-crash-box}.
12084
12085 @item mail-source-delete-incoming
12086 @vindex mail-source-delete-incoming
12087 If non-@code{nil}, delete incoming files after handling them.
12088
12089 @item mail-source-directory
12090 @vindex mail-source-directory
12091 Directory where files (if any) will be stored.  The default is
12092 @file{~/Mail/}.  At present, the only thing this is used for is to say
12093 where the incoming files will be stored if the previous variable is
12094 @code{nil}.
12095
12096 @item mail-source-incoming-file-prefix
12097 @vindex mail-source-incoming-file-prefix
12098 Prefix for file name for storing incoming mail.  The default is
12099 @file{Incoming}, in which case files will end up with names like
12100 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
12101 relevant if @code{mail-source-delete-incoming} is @code{nil}.
12102
12103 @item mail-source-default-file-modes
12104 @vindex mail-source-default-file-modes
12105 All new mail files will get this file mode.  The default is 384.
12106
12107 @end table
12108
12109
12110 @node Fetching Mail
12111 @subsubsection Fetching Mail
12112
12113 @vindex mail-sources
12114 @vindex nnmail-spool-file
12115 The way to actually tell Gnus where to get new mail from is to set
12116 @code{mail-sources} to a list of mail source specifiers
12117 (@pxref{Mail Source Specifiers}).
12118
12119 If this variable (and the obsolescent @code{nnmail-spool-file}) is
12120 @code{nil}, the mail backends will never attempt to fetch mail by
12121 themselves.
12122
12123 If you want to fetch mail both from your local spool as well as a POP
12124 mail server, you'd say something like:
12125
12126 @lisp
12127 (setq mail-sources
12128       '((file)
12129         (pop :server "pop3.mail.server"
12130              :password "secret")))
12131 @end lisp
12132
12133 Or, if you don't want to use any of the keyword defaults:
12134
12135 @lisp
12136 (setq mail-sources
12137       '((file :path "/var/spool/mail/user-name")
12138         (pop :server "pop3.mail.server"
12139              :user "user-name"
12140              :port "pop3"
12141              :password "secret")))
12142 @end lisp
12143
12144
12145 When you use a mail backend, Gnus will slurp all your mail from your
12146 inbox and plonk it down in your home directory.  Gnus doesn't move any
12147 mail if you're not using a mail backend---you have to do a lot of magic
12148 invocations first.  At the time when you have finished drawing the
12149 pentagram, lightened the candles, and sacrificed the goat, you really
12150 shouldn't be too surprised when Gnus moves your mail.
12151
12152
12153
12154 @node Mail Backend Variables
12155 @subsection Mail Backend Variables
12156
12157 These variables are (for the most part) pertinent to all the various
12158 mail backends.
12159
12160 @table @code
12161 @vindex nnmail-read-incoming-hook
12162 @item nnmail-read-incoming-hook
12163 The mail backends all call this hook after reading new mail.  You can
12164 use this hook to notify any mail watch programs, if you want to.
12165
12166 @vindex nnmail-split-hook
12167 @item nnmail-split-hook
12168 @findex article-decode-encoded-words
12169 @findex RFC 1522 decoding
12170 @findex RFC 2047 decoding
12171 Hook run in the buffer where the mail headers of each message is kept
12172 just before the splitting based on these headers is done.  The hook is
12173 free to modify the buffer contents in any way it sees fit---the buffer
12174 is discarded after the splitting has been done, and no changes performed
12175 in the buffer will show up in any files.
12176 @code{gnus-article-decode-encoded-words} is one likely function to add
12177 to this hook.
12178
12179 @vindex nnmail-pre-get-new-mail-hook
12180 @vindex nnmail-post-get-new-mail-hook
12181 @item nnmail-pre-get-new-mail-hook
12182 @itemx nnmail-post-get-new-mail-hook
12183 These are two useful hooks executed when treating new incoming
12184 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
12185 starting to handle the new mail) and
12186 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
12187 is done).  Here's and example of using these two hooks to change the
12188 default file modes the new mail files get:
12189
12190 @lisp
12191 (add-hook 'nnmail-pre-get-new-mail-hook
12192           (lambda () (set-default-file-modes 511)))
12193
12194 (add-hook 'nnmail-post-get-new-mail-hook
12195           (lambda () (set-default-file-modes 551)))
12196 @end lisp
12197
12198 @item nnmail-use-long-file-names
12199 @vindex nnmail-use-long-file-names
12200 If non-@code{nil}, the mail backends will use long file and directory
12201 names.  Groups like @samp{mail.misc} will end up in directories
12202 (assuming use of @code{nnml} backend) or files (assuming use of
12203 @code{nnfolder} backend) like @file{mail.misc}.  If it is @code{nil},
12204 the same group will end up in @file{mail/misc}.
12205
12206 @item nnmail-delete-file-function
12207 @vindex nnmail-delete-file-function
12208 @findex delete-file
12209 Function called to delete files.  It is @code{delete-file} by default.
12210
12211 @item nnmail-cache-accepted-message-ids
12212 @vindex nnmail-cache-accepted-message-ids
12213 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
12214 the backend (via @code{Gcc}, for instance) into the mail duplication
12215 discovery cache.  The default is @code{nil}.
12216
12217 @end table
12218
12219
12220 @node Fancy Mail Splitting
12221 @subsection Fancy Mail Splitting
12222 @cindex mail splitting
12223 @cindex fancy mail splitting
12224
12225 @vindex nnmail-split-fancy
12226 @findex nnmail-split-fancy
12227 If the rather simple, standard method for specifying how to split mail
12228 doesn't allow you to do what you want, you can set
12229 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
12230 play with the @code{nnmail-split-fancy} variable.
12231
12232 Let's look at an example value of this variable first:
12233
12234 @lisp
12235 ;; Messages from the mailer daemon are not crossposted to any of
12236 ;; the ordinary groups.  Warnings are put in a separate group
12237 ;; from real errors.
12238 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
12239                    "mail.misc"))
12240    ;; Non-error messages are crossposted to all relevant
12241    ;; groups, but we don't crosspost between the group for the
12242    ;; (ding) list and the group for other (ding) related mail.
12243    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
12244          ("subject" "ding" "ding.misc"))
12245       ;; Other mailing lists...
12246       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
12247       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
12248       ;; Both lists below have the same suffix, so prevent
12249       ;; cross-posting to mkpkg.list of messages posted only to
12250       ;; the bugs- list, but allow cross-posting when the
12251       ;; message was really cross-posted.
12252       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
12253       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
12254       ;; People...
12255       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
12256    ;; Unmatched mail goes to the catch all group.
12257    "misc.misc")
12258 @end lisp
12259
12260 This variable has the format of a @dfn{split}.  A split is a (possibly)
12261 recursive structure where each split may contain other splits.  Here are
12262 the five possible split syntaxes:
12263
12264 @enumerate
12265
12266 @item
12267 @samp{group}: If the split is a string, that will be taken as a group
12268 name.  Normal regexp match expansion will be done.  See below for
12269 examples.
12270
12271 @item
12272 @code{(@var{field} @var{value} @code{[-} @var{restrict}
12273 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
12274 first element of which is a string, then store the message as
12275 specified by @var{split}, if header @var{field} (a regexp) contains
12276 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
12277 matches some string after @var{field} and before the end of the
12278 matched @var{value}, the @var{split} is ignored.  If none of the
12279 @var{restrict} clauses match, @var{split} is processed.
12280
12281 @item
12282 @code{(| @var{split}@dots{})}: If the split is a list, and the first
12283 element is @code{|} (vertical bar), then process each @var{split} until
12284 one of them matches.  A @var{split} is said to match if it will cause
12285 the mail message to be stored in one or more groups.
12286
12287 @item
12288 @code{(& @var{split}@dots{})}: If the split is a list, and the first
12289 element is @code{&}, then process all @var{split}s in the list.
12290
12291 @item
12292 @code{junk}: If the split is the symbol @code{junk}, then don't save
12293 this message.  Use with extreme caution.
12294
12295 @item
12296 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
12297 a list, and the first element is @code{:}, then the second element will
12298 be called as a function with @var{args} given as arguments.  The
12299 function should return a @var{split}.
12300
12301 @cindex body split
12302 For instance, the following function could be used to split based on the
12303 body of the messages:
12304
12305 @lisp
12306 (defun split-on-body ()
12307   (save-excursion
12308     (set-buffer " *nnmail incoming*")
12309     (goto-char (point-min))
12310     (when (re-search-forward "Some.*string" nil t)
12311       "string.group")))
12312 @end lisp
12313
12314 The @samp{" *nnmail incoming*"} is narrowed to the message in question
12315 when the @code{:} function is run.
12316
12317 @item
12318 @code{(! @var{func} @var{split})}: If the split is a list, and the first
12319 element is @code{!}, then SPLIT will be processed, and FUNC will be
12320 called as a function with the result of SPLIT as argument.  FUNC should
12321 return a split.
12322
12323 @item
12324 @code{nil}: If the split is @code{nil}, it is ignored.
12325
12326 @end enumerate
12327
12328 In these splits, @var{field} must match a complete field name.
12329 @var{value} must match a complete word according to the fundamental mode
12330 syntax table.  You can use @code{.*} in the regexps to match partial
12331 field names or words.  In other words, all @var{value}'s are wrapped in
12332 @samp{\<} and @samp{\>} pairs.
12333
12334 @vindex nnmail-split-abbrev-alist
12335 @var{field} and @var{value} can also be lisp symbols, in that case they
12336 are expanded as specified by the variable
12337 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells, where
12338 the @code{car} of a cell contains the key, and the @code{cdr} contains the associated
12339 value.
12340
12341 @vindex nnmail-split-fancy-syntax-table
12342 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
12343 when all this splitting is performed.
12344
12345 If you want to have Gnus create groups dynamically based on some
12346 information in the headers (i.e., do @code{replace-match}-like
12347 substitutions in the group names), you can say things like:
12348
12349 @example
12350 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
12351 @end example
12352
12353 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
12354 will be filed in @samp{mail.debian.foo}.
12355
12356 If the string contains the element @samp{\&}, then the previously
12357 matched string will be substituted.  Similarly, the elements @samp{\\1}
12358 up to @samp{\\9} will be substituted with the text matched by the
12359 groupings 1 through 9.
12360
12361 @findex nnmail-split-fancy-with-parent
12362 @code{nnmail-split-fancy-with-parent} is a function which allows you to
12363 split followups into the same groups their parents are in.  Sometimes
12364 you can't make splitting rules for all your mail.  For example, your
12365 boss might send you personal mail regarding different projects you are
12366 working on, and as you can't tell your boss to put a distinguishing
12367 string into the subject line, you have to resort to manually moving the
12368 messages into the right group.  With this function, you only have to do
12369 it once per thread.
12370
12371 To use this feature, you have to set @code{nnmail-treat-duplicates} and
12372 @code{nnmail-cache-accepted-message-ids} to a non-nil value.  And then
12373 you can include @code{nnmail-split-fancy-with-parent} using the colon
12374 feature, like so:
12375 @lisp
12376 (setq nnmail-split-fancy
12377       '(| (: nnmail-split-fancy-with-parent)
12378           ;; other splits go here
12379         ))
12380 @end lisp
12381
12382 This feature works as follows: when @code{nnmail-treat-duplicates} is
12383 non-nil, Gnus records the message id of every message it sees in the
12384 file specified by the variable @code{nnmail-message-id-cache-file},
12385 together with the group it is in (the group is omitted for non-mail
12386 messages).  When mail splitting is invoked, the function
12387 @code{nnmail-split-fancy-with-parent} then looks at the References (and
12388 In-Reply-To) header of each message to split and searches the file
12389 specified by @code{nnmail-message-id-cache-file} for the message ids.
12390 When it has found a parent, it returns the corresponding group name
12391 unless the group name matches the regexp
12392 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is recommended
12393 that you set @code{nnmail-message-id-cache-length} to a somewhat higher
12394 number than the default so that the message ids are still in the cache.
12395 (A value of 5000 appears to create a file some 300 kBytes in size.)
12396 @vindex nnmail-cache-accepted-message-ids
12397 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
12398 also records the message ids of moved articles, so that the followup
12399 messages goes into the new group.
12400
12401
12402 @node Group Mail Splitting
12403 @subsection Group Mail Splitting
12404 @cindex mail splitting
12405 @cindex group mail splitting
12406
12407 @findex gnus-group-split
12408 If you subscribe to dozens of mailing lists but you don't want to
12409 maintain mail splitting rules manually, group mail splitting is for you.
12410 You just have to set @var{to-list} and/or @var{to-address} in group
12411 parameters or group customization and set @code{nnmail-split-methods} to
12412 @code{gnus-group-split}.  This splitting function will scan all groups
12413 for those parameters and split mail accordingly, i.e., messages posted
12414 from or to the addresses specified in the parameters @var{to-list} or
12415 @var{to-address} of a mail group will be stored in that group.
12416
12417 Sometimes, mailing lists have multiple addresses, and you may want mail
12418 splitting to recognize them all: just set the @var{extra-aliases} group
12419 parameter to the list of additional addresses and it's done.  If you'd
12420 rather use a regular expression, set @var{split-regexp}.
12421
12422 All these parameters in a group will be used to create an
12423 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
12424 the @var{value} is a single regular expression that matches
12425 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
12426 matches of @var{split-regexp}, and the @var{split} is the name of the
12427 group.  @var{restrict}s are also supported: just set the
12428 @var{split-exclude} parameter to a list of regular expressions.
12429
12430 If you can't get the right split to be generated using all these
12431 parameters, or you just need something fancier, you can set the
12432 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
12433 this case, all other aforementioned parameters will be ignored by
12434 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
12435 @code{nil}, in which case the group will be ignored by
12436 @code{gnus-group-split}.
12437
12438 @vindex gnus-group-split-default-catch-all-group
12439 @code{gnus-group-split} will do cross-posting on all groups that match,
12440 by defining a single @code{&} fancy split containing one split for each
12441 group.  If a message doesn't match any split, it will be stored in the
12442 group named in @code{gnus-group-split-default-catch-all-group}, unless
12443 some group has @var{split-spec} set to @code{catch-all}, in which case
12444 that group is used as the catch-all group.  Even though this variable is
12445 often used just to name a group, it may also be set to an arbitrarily
12446 complex fancy split (after all, a group name is a fancy split), and this
12447 may be useful to split mail that doesn't go to any mailing list to
12448 personal mail folders.  Note that this fancy split is added as the last
12449 element of a @code{|} split list that also contains a @code{&} split
12450 with the rules extracted from group parameters.
12451
12452 It's time for an example.  Assume the following group parameters have
12453 been defined:
12454
12455 @example
12456 nnml:mail.bar:
12457 ((to-address . "bar@@femail.com")
12458  (split-regexp . ".*@@femail\\.com"))
12459 nnml:mail.foo:
12460 ((to-list . "foo@@nowhere.gov")
12461  (extra-aliases "foo@@localhost" "foo-redist@@home")
12462  (split-exclude "bugs-foo" "rambling-foo")
12463  (admin-address . "foo-request@@nowhere.gov"))
12464 nnml:mail.others:
12465 ((split-spec . catch-all))
12466 @end example
12467
12468 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
12469 behave as if @code{nnmail-split-fancy} had been selected and variable
12470 @code{nnmail-split-fancy} had been set as follows:
12471
12472 @lisp
12473 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
12474       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
12475            - "bugs-foo" - "rambling-foo" "mail.foo"))
12476    "mail.others")
12477 @end lisp
12478
12479 @findex gnus-group-split-fancy
12480 If you'd rather not use group splitting for all your mail groups, you
12481 may use it for only some of them, by using @code{nnmail-split-fancy}
12482 splits like this:
12483
12484 @lisp
12485 (: gnus-mlsplt-fancy GROUPS NO-CROSSPOST CATCH-ALL)
12486 @end lisp
12487
12488 @var{groups} may be a regular expression or a list of group names whose
12489 parameters will be scanned to generate the output split.
12490 @var{no-crosspost} can be used to disable cross-posting; in this case, a
12491 single @code{|} split will be output.  @var{catch-all} is the fallback
12492 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
12493 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
12494 empty string in any selected group, no catch-all split will be issued.
12495 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
12496 this group will override the value of the @var{catch-all} argument.
12497
12498 @findex gnus-group-split-setup
12499 Unfortunately, scanning all groups and their parameters can be quite
12500 slow, especially considering that it has to be done for every message.
12501 But don't despair!  The function @code{gnus-group-split-setup} can be
12502 used to enable @code{gnus-group-split} in a much more efficient way.  It
12503 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
12504 @code{nnmail-split-fancy} to the split produced by
12505 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
12506 scanned once, no matter how many messages are split.
12507
12508 @findex gnus-group-split-update
12509 However, if you change group parameters, you'd have to update
12510 @code{nnmail-split-fancy} manually.  You can do it by running
12511 @code{gnus-group-split-update}.  If you'd rather have it updated
12512 automatically, just tell @code{gnus-group-split-setup} to do it for
12513 you.  For example, add to your @file{.gnus}:
12514
12515 @lisp
12516 (gnus-group-split-setup AUTO-UPDATE CATCH-ALL)
12517 @end lisp
12518
12519 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
12520 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
12521 have to worry about updating @code{nnmail-split-fancy} again.  If you
12522 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
12523 @code{gnus-group-split-default-catch-all-group} will be set to its
12524 value.
12525
12526 @vindex gnus-group-split-updated-hook
12527 Because you may want to change @code{nnmail-split-fancy} after it is set
12528 by @code{gnus-group-split-update}, this function will run
12529 @code{gnus-group-split-updated-hook} just before finishing.
12530
12531 @node Incorporating Old Mail
12532 @subsection Incorporating Old Mail
12533 @cindex incorporating old mail
12534 @cindex import old mail
12535
12536 Most people have lots of old mail stored in various file formats.  If
12537 you have set up Gnus to read mail using one of the spiffy Gnus mail
12538 backends, you'll probably wish to have that old mail incorporated into
12539 your mail groups.
12540
12541 Doing so can be quite easy.
12542
12543 To take an example: You're reading mail using @code{nnml}
12544 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
12545 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
12546 file filled with important, but old, mail.  You want to move it into
12547 your @code{nnml} groups.
12548
12549 Here's how:
12550
12551 @enumerate
12552 @item
12553 Go to the group buffer.
12554
12555 @item
12556 Type `G f' and give the path to the mbox file when prompted to create an
12557 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
12558
12559 @item
12560 Type `SPACE' to enter the newly created group.
12561
12562 @item
12563 Type `M P b' to process-mark all articles in this group's buffer
12564 (@pxref{Setting Process Marks}).
12565
12566 @item
12567 Type `B r' to respool all the process-marked articles, and answer
12568 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
12569 @end enumerate
12570
12571 All the mail messages in the mbox file will now also be spread out over
12572 all your @code{nnml} groups.  Try entering them and check whether things
12573 have gone without a glitch.  If things look ok, you may consider
12574 deleting the mbox file, but I wouldn't do that unless I was absolutely
12575 sure that all the mail has ended up where it should be.
12576
12577 Respooling is also a handy thing to do if you're switching from one mail
12578 backend to another.  Just respool all the mail in the old mail groups
12579 using the new mail backend.
12580
12581
12582 @node Expiring Mail
12583 @subsection Expiring Mail
12584 @cindex article expiry
12585
12586 Traditional mail readers have a tendency to remove mail articles when
12587 you mark them as read, in some way.  Gnus takes a fundamentally
12588 different approach to mail reading.
12589
12590 Gnus basically considers mail just to be news that has been received in
12591 a rather peculiar manner.  It does not think that it has the power to
12592 actually change the mail, or delete any mail messages.  If you enter a
12593 mail group, and mark articles as ``read'', or kill them in some other
12594 fashion, the mail articles will still exist on the system.  I repeat:
12595 Gnus will not delete your old, read mail.  Unless you ask it to, of
12596 course.
12597
12598 To make Gnus get rid of your unwanted mail, you have to mark the
12599 articles as @dfn{expirable}.  This does not mean that the articles will
12600 disappear right away, however.  In general, a mail article will be
12601 deleted from your system if, 1) it is marked as expirable, AND 2) it is
12602 more than one week old.  If you do not mark an article as expirable, it
12603 will remain on your system until hell freezes over.  This bears
12604 repeating one more time, with some spurious capitalizations: IF you do
12605 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
12606
12607 @vindex gnus-auto-expirable-newsgroups
12608 You do not have to mark articles as expirable by hand.  Groups that
12609 match the regular expression @code{gnus-auto-expirable-newsgroups} will
12610 have all articles that you read marked as expirable automatically.  All
12611 articles marked as expirable have an @samp{E} in the first
12612 column in the summary buffer.
12613
12614 By default, if you have auto expiry switched on, Gnus will mark all the
12615 articles you read as expirable, no matter if they were read or unread
12616 before.  To avoid having articles marked as read marked as expirable
12617 automatically, you can put something like the following in your
12618 @file{.gnus} file:
12619
12620 @vindex gnus-mark-article-hook
12621 @lisp
12622 (remove-hook 'gnus-mark-article-hook
12623              'gnus-summary-mark-read-and-unread-as-read)
12624 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
12625 @end lisp
12626
12627 Note that making a group auto-expirable doesn't mean that all read
12628 articles are expired---only the articles marked as expirable
12629 will be expired.  Also note that using the @kbd{d} command won't make
12630 articles expirable---only semi-automatic marking of articles as read will
12631 mark the articles as expirable in auto-expirable groups.
12632
12633 Let's say you subscribe to a couple of mailing lists, and you want the
12634 articles you have read to disappear after a while:
12635
12636 @lisp
12637 (setq gnus-auto-expirable-newsgroups
12638       "mail.nonsense-list\\|mail.nice-list")
12639 @end lisp
12640
12641 Another way to have auto-expiry happen is to have the element
12642 @code{auto-expire} in the group parameters of the group.
12643
12644 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
12645 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
12646 don't really mix very well.
12647
12648 @vindex nnmail-expiry-wait
12649 The @code{nnmail-expiry-wait} variable supplies the default time an
12650 expirable article has to live.  Gnus starts counting days from when the
12651 message @emph{arrived}, not from when it was sent.  The default is seven
12652 days.
12653
12654 Gnus also supplies a function that lets you fine-tune how long articles
12655 are to live, based on what group they are in.  Let's say you want to
12656 have one month expiry period in the @samp{mail.private} group, a one day
12657 expiry period in the @samp{mail.junk} group, and a six day expiry period
12658 everywhere else:
12659
12660 @vindex nnmail-expiry-wait-function
12661 @lisp
12662 (setq nnmail-expiry-wait-function
12663       (lambda (group)
12664        (cond ((string= group "mail.private")
12665                31)
12666              ((string= group "mail.junk")
12667                1)
12668              ((string= group "important")
12669                'never)
12670              (t
12671                6))))
12672 @end lisp
12673
12674 The group names this function is fed are ``unadorned'' group
12675 names---no @samp{nnml:} prefixes and the like.
12676
12677 The @code{nnmail-expiry-wait} variable and
12678 @code{nnmail-expiry-wait-function} function can either be a number (not
12679 necessarily an integer) or one of the symbols @code{immediate} or
12680 @code{never}.
12681
12682 You can also use the @code{expiry-wait} group parameter to selectively
12683 change the expiry period (@pxref{Group Parameters}).
12684
12685 @vindex nnmail-expiry-target
12686 The normal action taken when expiring articles is to delete them.
12687 However, in some circumstances it might make more sense to move them to
12688 other groups instead of deleting them.  The variable @code{nnmail-expiry-target}
12689 (and the @code{expiry-target} group parameter) controls this.  The
12690 variable supplies a default value for all groups, which can be
12691 overridden for specific groups by the group parameter.
12692 default value is @code{delete}, but this can also be a string (which
12693 should be the name of the group the message should be moved to), or a
12694 function (which will be called in a buffer narrowed to the message in
12695 question, and with the name of the group being moved from as its
12696 parameter) which should return a target -- either a group name or
12697 @code{delete}.
12698
12699 Here's an example for specifying a group name:
12700 @lisp
12701 (setq nnmail-expiry-target "nnml:expired")
12702 @end lisp
12703
12704
12705 @vindex nnmail-keep-last-article
12706 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
12707 expire the final article in a mail newsgroup.  This is to make life
12708 easier for procmail users.
12709
12710 @vindex gnus-total-expirable-newsgroups
12711 By the way: That line up there, about Gnus never expiring non-expirable
12712 articles, is a lie.  If you put @code{total-expire} in the group
12713 parameters, articles will not be marked as expirable, but all read
12714 articles will be put through the expiry process.  Use with extreme
12715 caution.  Even more dangerous is the
12716 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
12717 this regexp will have all read articles put through the expiry process,
12718 which means that @emph{all} old mail articles in the groups in question
12719 will be deleted after a while.  Use with extreme caution, and don't come
12720 crying to me when you discover that the regexp you used matched the
12721 wrong group and all your important mail has disappeared.  Be a
12722 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
12723 with!  So there!
12724
12725 Most people make most of their mail groups total-expirable, though.
12726
12727 @vindex gnus-inhibit-user-auto-expire
12728 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
12729 commands will not mark an article as expirable, even if the group has
12730 auto-expire turned on.
12731
12732
12733 @node Washing Mail
12734 @subsection Washing Mail
12735 @cindex mail washing
12736 @cindex list server brain damage
12737 @cindex incoming mail treatment
12738
12739 Mailers and list servers are notorious for doing all sorts of really,
12740 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
12741 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
12742 end of all lines passing through our server, so let's do that!!!!1!''
12743 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
12744 considered to be self-evident were not discussed.  So.  Here we are.
12745
12746 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
12747 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
12748 be shocked and dismayed by this, but I haven't got the energy.  It is to
12749 laugh.
12750
12751 Gnus provides a plethora of functions for washing articles while
12752 displaying them, but it might be nicer to do the filtering before
12753 storing the mail to disc.  For that purpose, we have three hooks and
12754 various functions that can be put in these hooks.
12755
12756 @table @code
12757 @item nnmail-prepare-incoming-hook
12758 @vindex nnmail-prepare-incoming-hook
12759 This hook is called before doing anything with the mail and is meant for
12760 grand, sweeping gestures.  It is called in a buffer that contains all
12761 the new, incoming mail.  Functions to be used include:
12762
12763 @table @code
12764 @item nnheader-ms-strip-cr
12765 @findex nnheader-ms-strip-cr
12766 Remove trailing carriage returns from each line.  This is default on
12767 Emacs running on MS machines.
12768
12769 @end table
12770
12771 @item nnmail-prepare-incoming-header-hook
12772 @vindex nnmail-prepare-incoming-header-hook
12773 This hook is called narrowed to each header.  It can be used when
12774 cleaning up the headers.  Functions that can be used include:
12775
12776 @table @code
12777 @item nnmail-remove-leading-whitespace
12778 @findex nnmail-remove-leading-whitespace
12779 Clear leading white space that ``helpful'' listservs have added to the
12780 headers to make them look nice.  Aaah.
12781
12782 @item nnmail-remove-list-identifiers
12783 @findex nnmail-remove-list-identifiers
12784 Some list servers add an identifier---for example, @samp{(idm)}---to the
12785 beginning of all @code{Subject} headers.  I'm sure that's nice for
12786 people who use stone age mail readers.  This function will remove
12787 strings that match the @code{nnmail-list-identifiers} regexp, which can
12788 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
12789 @code{\\(..\\)}.
12790
12791 For instance, if you want to remove the @samp{(idm)} and the
12792 @samp{nagnagnag} identifiers:
12793
12794 @lisp
12795 (setq nnmail-list-identifiers
12796       '("(idm)" "nagnagnag"))
12797 @end lisp
12798
12799 This can also be done non-destructively with
12800 @code{gnus-list-identifiers}, @xref{Article Hiding}.
12801
12802 @item nnmail-remove-tabs
12803 @findex nnmail-remove-tabs
12804 Translate all @samp{TAB} characters into @samp{SPACE} characters.
12805
12806 @item nnmail-fix-eudora-headers
12807 @findex nnmail-fix-eudora-headers
12808 @cindex Eudora
12809 Eudora produces broken @code{References} headers, but OK
12810 @code{In-Reply-To} headers.  This function will get rid of the
12811 @code{References} headers.
12812
12813 @end table
12814
12815 @item nnmail-prepare-incoming-message-hook
12816 @vindex nnmail-prepare-incoming-message-hook
12817 This hook is called narrowed to each message.  Functions to be used
12818 include:
12819
12820 @table @code
12821 @item article-de-quoted-unreadable
12822 @findex article-de-quoted-unreadable
12823 Decode Quoted Readable encoding.
12824
12825 @end table
12826 @end table
12827
12828
12829 @node Duplicates
12830 @subsection Duplicates
12831
12832 @vindex nnmail-treat-duplicates
12833 @vindex nnmail-message-id-cache-length
12834 @vindex nnmail-message-id-cache-file
12835 @cindex duplicate mails
12836 If you are a member of a couple of mailing lists, you will sometimes
12837 receive two copies of the same mail.  This can be quite annoying, so
12838 @code{nnmail} checks for and treats any duplicates it might find.  To do
12839 this, it keeps a cache of old @code{Message-ID}s---
12840 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
12841 default.  The approximate maximum number of @code{Message-ID}s stored
12842 there is controlled by the @code{nnmail-message-id-cache-length}
12843 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
12844 stored.) If all this sounds scary to you, you can set
12845 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
12846 default), and @code{nnmail} won't delete duplicate mails.  Instead it
12847 will insert a warning into the head of the mail saying that it thinks
12848 that this is a duplicate of a different message.
12849
12850 This variable can also be a function.  If that's the case, the function
12851 will be called from a buffer narrowed to the message in question with
12852 the @code{Message-ID} as a parameter.  The function must return either
12853 @code{nil}, @code{warn}, or @code{delete}.
12854
12855 You can turn this feature off completely by setting the variable to
12856 @code{nil}.
12857
12858 If you want all the duplicate mails to be put into a special
12859 @dfn{duplicates} group, you could do that using the normal mail split
12860 methods:
12861
12862 @lisp
12863 (setq nnmail-split-fancy
12864       '(| ;; Messages duplicates go to a separate group.
12865           ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
12866           ;; Message from daemons, postmaster, and the like to another.
12867           (any mail "mail.misc")
12868           ;; Other rules.
12869           [ ... ] ))
12870 @end lisp
12871
12872 Or something like:
12873 @lisp
12874 (setq nnmail-split-methods
12875       '(("duplicates" "^Gnus-Warning:.*duplicate")
12876         ;; Other rules.
12877         [...]))
12878 @end lisp
12879
12880 Here's a neat feature: If you know that the recipient reads her mail
12881 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
12882 @code{delete}, you can send her as many insults as you like, just by
12883 using a @code{Message-ID} of a mail that you know that she's already
12884 received.  Think of all the fun!  She'll never see any of it!  Whee!
12885
12886
12887 @node Not Reading Mail
12888 @subsection Not Reading Mail
12889
12890 If you start using any of the mail backends, they have the annoying
12891 habit of assuming that you want to read mail with them.  This might not
12892 be unreasonable, but it might not be what you want.
12893
12894 If you set @code{mail-sources} and @code{nnmail-spool-file} to
12895 @code{nil}, none of the backends will ever attempt to read incoming
12896 mail, which should help.
12897
12898 @vindex nnbabyl-get-new-mail
12899 @vindex nnmbox-get-new-mail
12900 @vindex nnml-get-new-mail
12901 @vindex nnmh-get-new-mail
12902 @vindex nnfolder-get-new-mail
12903 This might be too much, if, for instance, you are reading mail quite
12904 happily with @code{nnml} and just want to peek at some old @sc{rmail}
12905 file you have stashed away with @code{nnbabyl}.  All backends have
12906 variables called backend-@code{get-new-mail}.  If you want to disable
12907 the @code{nnbabyl} mail reading, you edit the virtual server for the
12908 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
12909
12910 All the mail backends will call @code{nn}*@code{-prepare-save-mail-hook}
12911 narrowed to the article to be saved before saving it when reading
12912 incoming mail.
12913
12914
12915 @node Choosing a Mail Backend
12916 @subsection Choosing a Mail Backend
12917
12918 Gnus will read the mail spool when you activate a mail group.  The mail
12919 file is first copied to your home directory.  What happens after that
12920 depends on what format you want to store your mail in.
12921
12922 There are five different mail backends in the standard Gnus, and more
12923 backends are available separately.  The mail backend most people use
12924 (because it is the fastest and most flexible) is @code{nnml}
12925 (@pxref{Mail Spool}).
12926
12927 @menu
12928 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
12929 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
12930 * Mail Spool::                  Store your mail in a private spool?
12931 * MH Spool::                    An mhspool-like backend.
12932 * Mail Folders::                Having one file for each group.
12933 * Comparing Mail Backends::     An in-depth looks at pros and cons.
12934 @end menu
12935
12936
12937 @node Unix Mail Box
12938 @subsubsection Unix Mail Box
12939 @cindex nnmbox
12940 @cindex unix mail box
12941
12942 @vindex nnmbox-active-file
12943 @vindex nnmbox-mbox-file
12944 The @dfn{nnmbox} backend will use the standard Un*x mbox file to store
12945 mail.  @code{nnmbox} will add extra headers to each mail article to say
12946 which group it belongs in.
12947
12948 Virtual server settings:
12949
12950 @table @code
12951 @item nnmbox-mbox-file
12952 @vindex nnmbox-mbox-file
12953 The name of the mail box in the user's home directory.  Default is
12954 @file{~/mbox}.
12955
12956 @item nnmbox-active-file
12957 @vindex nnmbox-active-file
12958 The name of the active file for the mail box.  Default is
12959 @file{~/.mbox-active}.
12960
12961 @item nnmbox-get-new-mail
12962 @vindex nnmbox-get-new-mail
12963 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
12964 into groups.  Default is @code{t}.
12965 @end table
12966
12967
12968 @node Rmail Babyl
12969 @subsubsection Rmail Babyl
12970 @cindex nnbabyl
12971 @cindex rmail mbox
12972
12973 @vindex nnbabyl-active-file
12974 @vindex nnbabyl-mbox-file
12975 The @dfn{nnbabyl} backend will use a babyl mail box (aka. @dfn{rmail
12976 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
12977 mail article to say which group it belongs in.
12978
12979 Virtual server settings:
12980
12981 @table @code
12982 @item nnbabyl-mbox-file
12983 @vindex nnbabyl-mbox-file
12984 The name of the rmail mbox file.  The default is @file{~/RMAIL}
12985
12986 @item nnbabyl-active-file
12987 @vindex nnbabyl-active-file
12988 The name of the active file for the rmail box.  The default is
12989 @file{~/.rmail-active}
12990
12991 @item nnbabyl-get-new-mail
12992 @vindex nnbabyl-get-new-mail
12993 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
12994 @code{t}
12995 @end table
12996
12997
12998 @node Mail Spool
12999 @subsubsection Mail Spool
13000 @cindex nnml
13001 @cindex mail @sc{nov} spool
13002
13003 The @dfn{nnml} spool mail format isn't compatible with any other known
13004 format.  It should be used with some caution.
13005
13006 @vindex nnml-directory
13007 If you use this backend, Gnus will split all incoming mail into files,
13008 one file for each mail, and put the articles into the corresponding
13009 directories under the directory specified by the @code{nnml-directory}
13010 variable.  The default value is @file{~/Mail/}.
13011
13012 You do not have to create any directories beforehand; Gnus will take
13013 care of all that.
13014
13015 If you have a strict limit as to how many files you are allowed to store
13016 in your account, you should not use this backend.  As each mail gets its
13017 own file, you might very well occupy thousands of inodes within a few
13018 weeks.  If this is no problem for you, and it isn't a problem for you
13019 having your friendly systems administrator walking around, madly,
13020 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
13021 know that this is probably the fastest format to use.  You do not have
13022 to trudge through a big mbox file just to read your new mail.
13023
13024 @code{nnml} is probably the slowest backend when it comes to article
13025 splitting.  It has to create lots of files, and it also generates
13026 @sc{nov} databases for the incoming mails.  This makes it the fastest
13027 backend when it comes to reading mail.
13028
13029 Virtual server settings:
13030
13031 @table @code
13032 @item nnml-directory
13033 @vindex nnml-directory
13034 All @code{nnml} directories will be placed under this directory.
13035 The default is the value of `message-directory' (whose default value is
13036 @file{~/Mail})
13037
13038 @item nnml-active-file
13039 @vindex nnml-active-file
13040 The active file for the @code{nnml} server.  The default is
13041 @file{~/Mail/active"}.
13042
13043 @item nnml-newsgroups-file
13044 @vindex nnml-newsgroups-file
13045 The @code{nnml} group descriptions file.  @xref{Newsgroups File
13046 Format}.  The default is @file{~/Mail/newsgroups"}.
13047
13048 @item nnml-get-new-mail
13049 @vindex nnml-get-new-mail
13050 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
13051 @code{t}
13052
13053 @item nnml-nov-is-evil
13054 @vindex nnml-nov-is-evil
13055 If non-@code{nil}, this backend will ignore any @sc{nov} files.  The
13056 default is @code{nil}
13057
13058 @item nnml-nov-file-name
13059 @vindex nnml-nov-file-name
13060 The name of the @sc{nov} files.  The default is @file{.overview}.
13061
13062 @item nnml-prepare-save-mail-hook
13063 @vindex nnml-prepare-save-mail-hook
13064 Hook run narrowed to an article before saving.
13065
13066 @end table
13067
13068 @findex nnml-generate-nov-databases
13069 If your @code{nnml} groups and @sc{nov} files get totally out of whack,
13070 you can do a complete update by typing @kbd{M-x
13071 nnml-generate-nov-databases}.  This command will trawl through the
13072 entire @code{nnml} hierarchy, looking at each and every article, so it
13073 might take a while to complete.  A better interface to this
13074 functionality can be found in the server buffer (@pxref{Server
13075 Commands}).
13076
13077
13078 @node MH Spool
13079 @subsubsection MH Spool
13080 @cindex nnmh
13081 @cindex mh-e mail spool
13082
13083 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
13084 @sc{nov} databases and it doesn't keep an active file.  This makes
13085 @code{nnmh} a @emph{much} slower backend than @code{nnml}, but it also
13086 makes it easier to write procmail scripts for.
13087
13088 Virtual server settings:
13089
13090 @table @code
13091 @item nnmh-directory
13092 @vindex nnmh-directory
13093 All @code{nnmh} directories will be located under this directory.  The
13094 default is the value of @code{message-directory} (whose default is
13095 @file{~/Mail})
13096
13097 @item nnmh-get-new-mail
13098 @vindex nnmh-get-new-mail
13099 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
13100 @code{t}.
13101
13102 @item nnmh-be-safe
13103 @vindex nnmh-be-safe
13104 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
13105 sure that the articles in the folder are actually what Gnus thinks they
13106 are.  It will check date stamps and stat everything in sight, so
13107 setting this to @code{t} will mean a serious slow-down.  If you never
13108 use anything but Gnus to read the @code{nnmh} articles, you do not have
13109 to set this variable to @code{t}.  The default is @code{nil}.
13110 @end table
13111
13112
13113 @node Mail Folders
13114 @subsubsection Mail Folders
13115 @cindex nnfolder
13116 @cindex mbox folders
13117 @cindex mail folders
13118
13119 @code{nnfolder} is a backend for storing each mail group in a separate
13120 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
13121 will add extra headers to keep track of article numbers and arrival
13122 dates.
13123
13124 Virtual server settings:
13125
13126 @table @code
13127 @item nnfolder-directory
13128 @vindex nnfolder-directory
13129 All the @code{nnfolder} mail boxes will be stored under this directory.
13130 The default is the value of @code{message-directory} (whose default is
13131 @file{~/Mail})
13132
13133 @item nnfolder-active-file
13134 @vindex nnfolder-active-file
13135 The name of the active file.  The default is @file{~/Mail/active}.
13136
13137 @item nnfolder-newsgroups-file
13138 @vindex nnfolder-newsgroups-file
13139 The name of the group descriptions file.  @xref{Newsgroups File
13140 Format}.  The default is @file{~/Mail/newsgroups"}
13141
13142 @item nnfolder-get-new-mail
13143 @vindex nnfolder-get-new-mail
13144 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
13145 is @code{t}
13146
13147 @item nnfolder-save-buffer-hook
13148 @vindex nnfolder-save-buffer-hook
13149 @cindex backup files
13150 Hook run before saving the folders.  Note that Emacs does the normal
13151 backup renaming of files even with the @code{nnfolder} buffers.  If you
13152 wish to switch this off, you could say something like the following in
13153 your @file{.emacs} file:
13154
13155 @lisp
13156 (defun turn-off-backup ()
13157   (set (make-local-variable 'backup-inhibited) t))
13158
13159 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
13160 @end lisp
13161
13162 @item nnfolder-delete-mail-hook
13163 @vindex nnfolder-delete-mail-hook
13164 Hook run in a buffer narrowed to the message that is to be deleted.
13165 This function can be used to copy the message to somewhere else, or to
13166 extract some information from it before removing it.
13167
13168 @item nnfolder-nov-is-evil
13169 @vindex nnfolder-nov-is-evil
13170 If non-@code{nil}, this backend will ignore any @sc{nov} files.  The
13171 default is @code{nil}.
13172
13173 @end table
13174
13175
13176 @findex nnfolder-generate-active-file
13177 @kindex M-x nnfolder-generate-active-file
13178 If you have lots of @code{nnfolder}-like files you'd like to read with
13179 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
13180 command to make @code{nnfolder} aware of all likely files in
13181 @code{nnfolder-directory}.  This only works if you use long file names,
13182 though.
13183
13184 @node Comparing Mail Backends
13185 @subsubsection Comparing Mail Backends
13186
13187 First, just for terminology, the @dfn{backend} is the common word for a
13188 low-level access method---a transport, if you will, by which something
13189 is acquired.  The sense is that one's mail has to come from somewhere,
13190 and so selection of a suitable backend is required in order to get that
13191 mail within spitting distance of Gnus.
13192
13193 The same concept exists for Usenet itself: Though access to articles is
13194 typically done by @sc{nntp} these days, once upon a midnight dreary, everyone
13195 in the world got at Usenet by running a reader on the machine where the
13196 articles lay (the machine which today we call an @sc{nntp} server), and
13197 access was by the reader stepping into the articles' directory spool
13198 area directly.  One can still select between either the @code{nntp} or
13199 @code{nnspool} backends, to select between these methods, if one happens
13200 actually to live on the server (or can see its spool directly, anyway,
13201 via NFS).
13202
13203 The goal in selecting a mail backend is to pick one which
13204 simultaneously represents a suitable way of dealing with the original
13205 format plus leaving mail in a form that is convenient to use in the
13206 future.  Here are some high and low points on each:
13207
13208 @table @code
13209 @item nnmbox
13210
13211 UNIX systems have historically had a single, very common, and well-
13212 defined format.  All messages arrive in a single @dfn{spool file}, and
13213 they are delineated by a line whose regular expression matches
13214 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
13215 to make it clear in this instance that this is not the RFC-specified
13216 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
13217 historically from the Unix environment, it is simplest if one does not
13218 mess a great deal with the original mailbox format, so if one chooses
13219 this backend, Gnus' primary activity in getting mail from the real spool
13220 area to Gnus' preferred directory is simply to copy it, with no
13221 (appreciable) format change in the process.  It is the ``dumbest'' way
13222 to move mail into availability in the Gnus environment.  This makes it
13223 fast to move into place, but slow to parse, when Gnus has to look at
13224 what's where.
13225
13226 @item nnbabyl
13227
13228 Once upon a time, there was the DEC-10 and DEC-20, running operating
13229 systems called TOPS and related things, and the usual (only?) mail
13230 reading environment was a thing called Babyl.  I don't know what format
13231 was used for mail landing on the system, but Babyl had its own internal
13232 format to which mail was converted, primarily involving creating a
13233 spool-file-like entity with a scheme for inserting Babyl-specific
13234 headers and status bits above the top of each message in the file.
13235 RMAIL was Emacs' first mail reader, it was written by Richard Stallman,
13236 and Stallman came out of that TOPS/Babyl environment, so he wrote RMAIL
13237 to understand the mail files folks already had in existence.  Gnus (and
13238 VM, for that matter) continue to support this format because it's
13239 perceived as having some good qualities in those mailer-specific
13240 headers/status bits stuff.  RMAIL itself still exists as well, of
13241 course, and is still maintained by Stallman.
13242
13243 Both of the above forms leave your mail in a single file on your
13244 filesystem, and they must parse that entire file each time you take a
13245 look at your mail.
13246
13247 @item nnml
13248
13249 @code{nnml} is the backend which smells the most as though you were
13250 actually operating with an @code{nnspool}-accessed Usenet system.  (In
13251 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
13252 lo these years ago.)  One's mail is taken from the original spool file,
13253 and is then cut up into individual message files, 1:1.  It maintains a
13254 Usenet-style active file (analogous to what one finds in an INN- or
13255 CNews-based news system in (for instance) @file{/var/lib/news/active},
13256 or what is returned via the @samp{NNTP LIST} verb) and also creates
13257 @dfn{overview} files for efficient group entry, as has been defined for
13258 @sc{nntp} servers for some years now.  It is slower in mail-splitting,
13259 due to the creation of lots of files, updates to the @code{nnml} active
13260 file, and additions to overview files on a per-message basis, but it is
13261 extremely fast on access because of what amounts to the indexing support
13262 provided by the active file and overviews.
13263
13264 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
13265 resource which defines available places in the filesystem to put new
13266 files.  Sysadmins take a dim view of heavy inode occupation within
13267 tight, shared filesystems.  But if you live on a personal machine where
13268 the filesystem is your own and space is not at a premium, @code{nnml}
13269 wins big.
13270
13271 It is also problematic using this backend if you are living in a
13272 FAT16-based Windows world, since much space will be wasted on all these
13273 tiny files.
13274
13275 @item nnmh
13276
13277 The Rand MH mail-reading system has been around UNIX systems for a very
13278 long time; it operates by splitting one's spool file of messages into
13279 individual files, but with little or no indexing support -- @code{nnmh}
13280 is considered to be semantically equivalent to ``@code{nnml} without
13281 active file or overviews''.  This is arguably the worst choice, because
13282 one gets the slowness of individual file creation married to the
13283 slowness of access parsing when learning what's new in one's groups.
13284
13285 @item nnfolder
13286
13287 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
13288 method described above) on a per-group basis.  That is, @code{nnmbox}
13289 itself puts *all* one's mail in one file; @code{nnfolder} provides a
13290 little bit of optimization to this so that each of one's mail groups has
13291 a Unix mail box file.  It's faster than @code{nnmbox} because each group
13292 can be parsed separately, and still provides the simple Unix mail box
13293 format requiring minimal effort in moving the mail around.  In addition,
13294 it maintains an ``active'' file making it much faster for Gnus to figure
13295 out how many messages there are in each separate group.
13296
13297 If you have groups that are expected to have a massive amount of
13298 messages, @code{nnfolder} is not the best choice, but if you receive
13299 only a moderate amount of mail, @code{nnfolder} is probably the most
13300 friendly mail backend all over.
13301
13302 @end table
13303
13304
13305 @node Browsing the Web
13306 @section Browsing the Web
13307 @cindex web
13308 @cindex browsing the web
13309 @cindex www
13310 @cindex http
13311
13312 Web-based discussion forums are getting more and more popular.  On many
13313 subjects, the web-based forums have become the most important forums,
13314 eclipsing the importance of mailing lists and news groups.  The reason
13315 is easy to understand---they are friendly to new users; you just point
13316 and click, and there's the discussion.  With mailing lists, you have to
13317 go through a cumbersome subscription procedure, and most people don't
13318 even know what a news group is.
13319
13320 The problem with this scenario is that web browsers are not very good at
13321 being newsreaders.  They do not keep track of what articles you've read;
13322 they do not allow you to score on subjects you're interested in; they do
13323 not allow off-line browsing; they require you to click around and drive
13324 you mad in the end.
13325
13326 So---if web browsers suck at reading discussion forums, why not use Gnus
13327 to do it instead?
13328
13329 Gnus has been getting a bit of a collection of backends for providing
13330 interfaces to these sources.
13331
13332 @menu
13333 * Web Searches::                Creating groups from articles that match a string.
13334 * Slashdot::                    Reading the Slashdot comments.
13335 * Ultimate::                    The Ultimate Bulletin Board systems.
13336 * Web Archive::                 Reading mailing list archived on web.
13337 * RSS::                         Reading RDF site summary.
13338 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
13339 @end menu
13340
13341 All the web sources require Emacs/w3 and the url library to work.
13342
13343 The main caveat with all these web sources is that they probably won't
13344 work for a very long time.  Gleaning information from the @sc{html} data
13345 is guesswork at best, and when the layout is altered, the Gnus backend
13346 will fail.  If you have reasonably new versions of these backends,
13347 though, you should be ok.
13348
13349 One thing all these Web methods have in common is that the Web sources
13350 are often down, unavailable or just plain too slow to be fun.  In those
13351 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
13352 Unplugged}) handle downloading articles, and then you can read them at
13353 leisure from your local disk.  No more World Wide Wait for you.
13354
13355
13356 @node Web Searches
13357 @subsection Web Searches
13358 @cindex nnweb
13359 @cindex DejaNews
13360 @cindex Alta Vista
13361 @cindex InReference
13362 @cindex Usenet searches
13363 @cindex searching the Usenet
13364
13365 It's, like, too neat to search the Usenet for articles that match a
13366 string, but it, like, totally @emph{sucks}, like, totally, to use one of
13367 those, like, Web browsers, and you, like, have to, rilly, like, look at
13368 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
13369 searches without having to use a browser.
13370
13371 The @code{nnweb} backend allows an easy interface to the mighty search
13372 engine.  You create an @code{nnweb} group, enter a search pattern, and
13373 then enter the group and read the articles like you would any normal
13374 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
13375 Groups}) will do this in an easy-to-use fashion.
13376
13377 @code{nnweb} groups don't really lend themselves to being solid
13378 groups---they have a very fleeting idea of article numbers.  In fact,
13379 each time you enter an @code{nnweb} group (not even changing the search
13380 pattern), you are likely to get the articles ordered in a different
13381 manner.  Not even using duplicate suppression (@pxref{Duplicate
13382 Suppression}) will help, since @code{nnweb} doesn't even know the
13383 @code{Message-ID} of the articles before reading them using some search
13384 engines (DejaNews, for instance).  The only possible way to keep track
13385 of which articles you've read is by scoring on the @code{Date}
13386 header---mark all articles posted before the last date you read the
13387 group as read.
13388
13389 If the search engine changes its output substantially, @code{nnweb}
13390 won't be able to parse it and will fail.  One could hardly fault the Web
13391 providers if they were to do this---their @emph{raison d'être} is to
13392 make money off of advertisements, not to provide services to the
13393 community.  Since @code{nnweb} washes the ads off all the articles, one
13394 might think that the providers might be somewhat miffed.  We'll see.
13395
13396 You must have the @code{url} and @code{w3} package installed to be able
13397 to use @code{nnweb}.
13398
13399 Virtual server variables:
13400
13401 @table @code
13402 @item nnweb-type
13403 @vindex nnweb-type
13404 What search engine type is being used.  The currently supported types
13405 are @code{dejanews}, @code{dejanewsold}, @code{altavista} and
13406 @code{reference}.
13407
13408 @item nnweb-search
13409 @vindex nnweb-search
13410 The search string to feed to the search engine.
13411
13412 @item nnweb-max-hits
13413 @vindex nnweb-max-hits
13414 Advisory maximum number of hits per search to display.  The default is
13415 100.
13416
13417 @item nnweb-type-definition
13418 @vindex nnweb-type-definition
13419 Type-to-definition alist.  This alist says what @code{nnweb} should do
13420 with the various search engine types.  The following elements must be
13421 present:
13422
13423 @table @code
13424 @item article
13425 Function to decode the article and provide something that Gnus
13426 understands.
13427
13428 @item map
13429 Function to create an article number to message header and URL alist.
13430
13431 @item search
13432 Function to send the search string to the search engine.
13433
13434 @item address
13435 The address the aforementioned function should send the search string
13436 to.
13437
13438 @item id
13439 Format string URL to fetch an article by @code{Message-ID}.
13440 @end table
13441
13442 @end table
13443
13444
13445 @node Slashdot
13446 @subsection Slashdot
13447 @cindex Slashdot
13448 @cindex nnslashdot
13449
13450 Slashdot (@uref{http://slashdot.org/}) is a popular news site, with
13451 lively discussion following the news articles.  @code{nnslashdot} will
13452 let you read this forum in a convenient manner.
13453
13454 The easiest way to read this source is to put something like the
13455 following in your @file{.gnus.el} file:
13456
13457 @lisp
13458 (setq gnus-secondary-select-methods
13459       '((nnslashdot "")))
13460 @end lisp
13461
13462 This will make Gnus query the @code{nnslashdot} backend for new comments
13463 and groups.  The @kbd{F} command will subscribe each new news article as
13464 a new Gnus group, and you can read the comments by entering these
13465 groups.  (Note that the default subscription method is to subscribe new
13466 groups as zombies.  Other methods are available (@pxref{Subscription
13467 Methods}).
13468
13469 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
13470 command is the most handy tool (@pxref{Foreign Groups}).
13471
13472 When following up to @code{nnslashdot} comments (or posting new
13473 comments), some light @sc{html}izations will be performed.  In
13474 particular, text quoted with @samp{> } will be quoted with
13475 @code{blockquote} instead, and signatures will have @code{br} added to
13476 the end of each line.  Other than that, you can just write @sc{html}
13477 directly into the message buffer.  Note that Slashdot filters out some
13478 @sc{html} forms.
13479
13480 The following variables can be altered to change its behavior:
13481
13482 @table @code
13483 @item nnslashdot-threaded
13484 Whether @code{nnslashdot} should display threaded groups or not.  The
13485 default is @code{t}.  To be able to display threads, @code{nnslashdot}
13486 has to retrieve absolutely all comments in a group upon entry.  If a
13487 threaded display is not required, @code{nnslashdot} will only retrieve
13488 the comments that are actually wanted by the user.  Threading is nicer,
13489 but much, much slower than untreaded.
13490
13491 @item nnslashdot-login-name
13492 @vindex nnslashdot-login-name
13493 The login name to use when posting.
13494
13495 @item nnslashdot-password
13496 @vindex nnslashdot-password
13497 The password to use when posting.
13498
13499 @item nnslashdot-directory
13500 @vindex nnslashdot-directory
13501 Where @code{nnslashdot} will store its files.  The default is
13502 @samp{~/News/slashdot/}.
13503
13504 @item nnslashdot-active-url
13505 @vindex nnslashdot-active-url
13506 The @sc{url} format string that will be used to fetch the information on
13507 news articles and comments.  The default is
13508 @samp{http://slashdot.org/search.pl?section=&min=%d}.
13509
13510 @item nnslashdot-comments-url
13511 @vindex nnslashdot-comments-url
13512 The @sc{url} format string that will be used to fetch comments.  The
13513 default is
13514 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
13515
13516 @item nnslashdot-article-url
13517 @vindex nnslashdot-article-url
13518 The @sc{url} format string that will be used to fetch the news article.  The
13519 default is
13520 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
13521
13522 @item nnslashdot-threshold
13523 @vindex nnslashdot-threshold
13524 The score threshold.  The default is -1.
13525
13526 @item nnslashdot-group-number
13527 @vindex nnslashdot-group-number
13528 The number of old groups, in addition to the ten latest, to keep
13529 updated.  The default is 0.
13530
13531 @end table
13532
13533
13534
13535 @node Ultimate
13536 @subsection Ultimate
13537 @cindex nnultimate
13538 @cindex Ultimate Bulletin Board
13539
13540 The Ultimate Bulletin Board (@uref{http://www.ultimatebb.com/}) is
13541 probably the most popular Web bulletin board system used.  It has a
13542 quite regular and nice interface, and it's possible to get the
13543 information Gnus needs to keep groups updated.
13544
13545 The easiest way to get started with @code{nnultimate} is to say
13546 something like the following in the group buffer:  @kbd{B nnultimate RET
13547 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
13548 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
13549 you're interested in; there's quite a list of them on the Ultimate web
13550 site.)  Then subscribe to the groups you're interested in from the
13551 server buffer, and read them from the group buffer.
13552
13553 The following @code{nnultimate} variables can be altered:
13554
13555 @table @code
13556 @item nnultimate-directory
13557 @vindex nnultimate-directory
13558 The directory where @code{nnultimate} stores its files.  The default is
13559 @samp{~/News/ultimate/}.
13560 @end table
13561
13562
13563 @node Web Archive
13564 @subsection Web Archive
13565 @cindex nnwarchive
13566 @cindex Web Archive
13567
13568 Some mailing lists only have archives on Web servers, such as
13569 @uref{http://www.egroups.com/} and
13570 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
13571 interface, and it's possible to get the information Gnus needs to keep
13572 groups updated.
13573
13574 The easiest way to get started with @code{nnwarchive} is to say
13575 something like the following in the group buffer: @kbd{M-x
13576 gnus-group-make-warchive-group RET an_egroup RET egroups RET
13577 www.egroups.com RET your@@email.address RET}.  (Substitute the
13578 @sc{an_egroup} with the mailing list you subscribed, the
13579 @sc{your@@email.address} with your email address.), or to browse the
13580 backend by @kbd{B nnwarchive RET mail-archive RET}.
13581
13582 The following @code{nnwarchive} variables can be altered:
13583
13584 @table @code
13585 @item nnwarchive-directory
13586 @vindex nnwarchive-directory
13587 The directory where @code{nnwarchive} stores its files.  The default is
13588 @samp{~/News/warchive/}.
13589
13590 @item nnwarchive-login
13591 @vindex nnwarchive-login
13592 The account name on the web server.
13593
13594 @item nnwarchive-passwd
13595 @vindex nnwarchive-passwd
13596 The password for your account on the web server.
13597 @end table
13598
13599 @node RSS
13600 @subsection RSS
13601 @cindex nnrss
13602 @cindex RSS
13603
13604 Some sites have RDF site summary (RSS)
13605 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
13606 interface, and it's possible to get the information Gnus needs to keep
13607 groups updated.
13608
13609 The easiest way to get started with @code{nnrss} is to say something
13610 like the following in the group buffer: @kbd{B nnrss RET RET}, then
13611 subscribe groups.
13612
13613 The following @code{nnrss} variables can be altered:
13614
13615 @table @code
13616 @item nnrss-directory
13617 @vindex nnrss-directory
13618 The directory where @code{nnrss} stores its files.  The default is
13619 @samp{~/News/rss/}.
13620
13621 @end table
13622
13623 The following code may be helpful, if you want to show the description in
13624 the summary buffer.
13625
13626 @lisp
13627 (add-to-list 'nnmail-extra-headers nnrss-description-field)
13628 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
13629
13630 (defun gnus-user-format-function-X (header)
13631   (let ((descr
13632          (assq nnrss-description-field (mail-header-extra header))))
13633     (if descr (concat "\n\t" (cdr descr)) "")))
13634 @end lisp
13635
13636 The following code may be useful to open an nnrss url directly from the
13637 summary buffer.
13638 @lisp
13639 (require 'browse-url)
13640
13641 (defun browse-nnrss-url( arg )
13642   (interactive "p")
13643   (let ((url (assq nnrss-url-field
13644                    (mail-header-extra
13645                     (gnus-data-header
13646                      (assq (gnus-summary-article-number)
13647                            gnus-newsgroup-data))))))
13648     (if url
13649         (browse-url (cdr url))
13650       (gnus-summary-scroll-up arg))))
13651
13652 (eval-after-load "gnus"
13653   #'(define-key gnus-summary-mode-map
13654       (kbd "<RET>") 'browse-nnrss-url))
13655 (add-to-list 'nnmail-extra-headers nnrss-url-field)
13656 @end lisp
13657
13658 @node Customizing w3
13659 @subsection Customizing w3
13660 @cindex w3
13661 @cindex html
13662 @cindex url
13663 @cindex Netscape
13664
13665 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
13666 pages.  Emacs/w3 is documented in its own manual, but there are some
13667 things that may be more relevant for Gnus users.
13668
13669 For instance, a common question is how to make Emacs/w3 follow links
13670 using the @code{browse-url} functions (which will call some external web
13671 browser like Netscape).  Here's one way:
13672
13673 @lisp
13674 (eval-after-load "w3"
13675   '(progn
13676     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
13677     (defun w3-fetch (&optional url target)
13678       (interactive (list (w3-read-url-with-default)))
13679       (if (eq major-mode 'gnus-article-mode)
13680           (browse-url url)
13681         (w3-fetch-orig url target)))))
13682 @end lisp
13683
13684 Put that in your @file{.emacs} file, and hitting links in w3-rendered
13685 @sc{html} in the Gnus article buffers will use @code{browse-url} to
13686 follow the link.
13687
13688
13689 @node Other Sources
13690 @section Other Sources
13691
13692 Gnus can do more than just read news or mail.  The methods described
13693 below allow Gnus to view directories and files as if they were
13694 newsgroups.
13695
13696 @menu
13697 * Directory Groups::            You can read a directory as if it was a newsgroup.
13698 * Anything Groups::             Dired?  Who needs dired?
13699 * Document Groups::             Single files can be the basis of a group.
13700 * SOUP::                        Reading @sc{soup} packets ``offline''.
13701 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
13702 * IMAP::                        Using Gnus as a @sc{imap} client.
13703 @end menu
13704
13705
13706 @node Directory Groups
13707 @subsection Directory Groups
13708 @cindex nndir
13709 @cindex directory groups
13710
13711 If you have a directory that has lots of articles in separate files in
13712 it, you might treat it as a newsgroup.  The files have to have numerical
13713 names, of course.
13714
13715 This might be an opportune moment to mention @code{ange-ftp} (and its
13716 successor @code{efs}), that most wonderful of all wonderful Emacs
13717 packages.  When I wrote @code{nndir}, I didn't think much about it---a
13718 backend to read directories.  Big deal.
13719
13720 @code{ange-ftp} changes that picture dramatically.  For instance, if you
13721 enter the @code{ange-ftp} file name
13722 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
13723 @code{ange-ftp} or @code{efs} will actually allow you to read this
13724 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
13725
13726 @code{nndir} will use @sc{nov} files if they are present.
13727
13728 @code{nndir} is a ``read-only'' backend---you can't delete or expire
13729 articles with this method.  You can use @code{nnmh} or @code{nnml} for
13730 whatever you use @code{nndir} for, so you could switch to any of those
13731 methods if you feel the need to have a non-read-only @code{nndir}.
13732
13733
13734 @node Anything Groups
13735 @subsection Anything Groups
13736 @cindex nneething
13737
13738 From the @code{nndir} backend (which reads a single spool-like
13739 directory), it's just a hop and a skip to @code{nneething}, which
13740 pretends that any arbitrary directory is a newsgroup.  Strange, but
13741 true.
13742
13743 When @code{nneething} is presented with a directory, it will scan this
13744 directory and assign article numbers to each file.  When you enter such
13745 a group, @code{nneething} must create ``headers'' that Gnus can use.
13746 After all, Gnus is a newsreader, in case you're forgetting.
13747 @code{nneething} does this in a two-step process.  First, it snoops each
13748 file in question.  If the file looks like an article (i.e., the first
13749 few lines look like headers), it will use this as the head.  If this is
13750 just some arbitrary file without a head (e.g. a C source file),
13751 @code{nneething} will cobble up a header out of thin air.  It will use
13752 file ownership, name and date and do whatever it can with these
13753 elements.
13754
13755 All this should happen automatically for you, and you will be presented
13756 with something that looks very much like a newsgroup.  Totally like a
13757 newsgroup, to be precise.  If you select an article, it will be displayed
13758 in the article buffer, just as usual.
13759
13760 If you select a line that represents a directory, Gnus will pop you into
13761 a new summary buffer for this @code{nneething} group.  And so on.  You can
13762 traverse the entire disk this way, if you feel like, but remember that
13763 Gnus is not dired, really, and does not intend to be, either.
13764
13765 There are two overall modes to this action---ephemeral or solid.  When
13766 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
13767 will not store information on what files you have read, and what files
13768 are new, and so on.  If you create a solid @code{nneething} group the
13769 normal way with @kbd{G m}, Gnus will store a mapping table between
13770 article numbers and file names, and you can treat this group like any
13771 other groups.  When you activate a solid @code{nneething} group, you will
13772 be told how many unread articles it contains, etc., etc.
13773
13774 Some variables:
13775
13776 @table @code
13777 @item nneething-map-file-directory
13778 @vindex nneething-map-file-directory
13779 All the mapping files for solid @code{nneething} groups will be stored
13780 in this directory, which defaults to @file{~/.nneething/}.
13781
13782 @item nneething-exclude-files
13783 @vindex nneething-exclude-files
13784 All files that match this regexp will be ignored.  Nice to use to exclude
13785 auto-save files and the like, which is what it does by default.
13786
13787 @item nneething-include-files
13788 @vindex nneething-include-files
13789 Regexp saying what files to include in the group.  If this variable is
13790 non-@code{nil}, only files matching this regexp will be included.
13791
13792 @item nneething-map-file
13793 @vindex nneething-map-file
13794 Name of the map files.
13795 @end table
13796
13797
13798 @node Document Groups
13799 @subsection Document Groups
13800 @cindex nndoc
13801 @cindex documentation group
13802 @cindex help group
13803
13804 @code{nndoc} is a cute little thing that will let you read a single file
13805 as a newsgroup.  Several files types are supported:
13806
13807 @table @code
13808 @cindex babyl
13809 @cindex rmail mbox
13810
13811 @item babyl
13812 The babyl (rmail) mail box.
13813 @cindex mbox
13814 @cindex Unix mbox
13815
13816 @item mbox
13817 The standard Unix mbox file.
13818
13819 @cindex MMDF mail box
13820 @item mmdf
13821 The MMDF mail box format.
13822
13823 @item news
13824 Several news articles appended into a file.
13825
13826 @item rnews
13827 @cindex rnews batch files
13828 The rnews batch transport format.
13829 @cindex forwarded messages
13830
13831 @item forward
13832 Forwarded articles.
13833
13834 @item nsmail
13835 Netscape mail boxes.
13836
13837 @item mime-parts
13838 MIME multipart messages.
13839
13840 @item standard-digest
13841 The standard (RFC 1153) digest format.
13842
13843 @item slack-digest
13844 Non-standard digest format---matches most things, but does it badly.
13845 @end table
13846
13847 You can also use the special ``file type'' @code{guess}, which means
13848 that @code{nndoc} will try to guess what file type it is looking at.
13849 @code{digest} means that @code{nndoc} should guess what digest type the
13850 file is.
13851
13852 @code{nndoc} will not try to change the file or insert any extra headers into
13853 it---it will simply, like, let you use the file as the basis for a
13854 group.  And that's it.
13855
13856 If you have some old archived articles that you want to insert into your
13857 new & spiffy Gnus mail backend, @code{nndoc} can probably help you with
13858 that.  Say you have an old @file{RMAIL} file with mail that you now want
13859 to split into your new @code{nnml} groups.  You look at that file using
13860 @code{nndoc} (using the @kbd{G f} command in the group buffer
13861 (@pxref{Foreign Groups})), set the process mark on all the articles in
13862 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
13863 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
13864 file is now also stored in lots of @code{nnml} directories, and you can
13865 delete that pesky @file{RMAIL} file.  If you have the guts!
13866
13867 Virtual server variables:
13868
13869 @table @code
13870 @item nndoc-article-type
13871 @vindex nndoc-article-type
13872 This should be one of @code{mbox}, @code{babyl}, @code{digest},
13873 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
13874 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
13875 @code{slack-digest}, @code{clari-briefs}, @code{nsmail} or @code{guess}.
13876
13877 @item nndoc-post-type
13878 @vindex nndoc-post-type
13879 This variable says whether Gnus is to consider the group a news group or
13880 a mail group.  There are two valid values:  @code{mail} (the default)
13881 and @code{news}.
13882 @end table
13883
13884 @menu
13885 * Document Server Internals::   How to add your own document types.
13886 @end menu
13887
13888
13889 @node Document Server Internals
13890 @subsubsection Document Server Internals
13891
13892 Adding new document types to be recognized by @code{nndoc} isn't
13893 difficult.  You just have to whip up a definition of what the document
13894 looks like, write a predicate function to recognize that document type,
13895 and then hook into @code{nndoc}.
13896
13897 First, here's an example document type definition:
13898
13899 @example
13900 (mmdf
13901  (article-begin .  "^\^A\^A\^A\^A\n")
13902  (body-end .  "^\^A\^A\^A\^A\n"))
13903 @end example
13904
13905 The definition is simply a unique @dfn{name} followed by a series of
13906 regexp pseudo-variable settings.  Below are the possible
13907 variables---don't be daunted by the number of variables; most document
13908 types can be defined with very few settings:
13909
13910 @table @code
13911 @item first-article
13912 If present, @code{nndoc} will skip past all text until it finds
13913 something that match this regexp.  All text before this will be
13914 totally ignored.
13915
13916 @item article-begin
13917 This setting has to be present in all document type definitions.  It
13918 says what the beginning of each article looks like.
13919
13920 @item head-begin-function
13921 If present, this should be a function that moves point to the head of
13922 the article.
13923
13924 @item nndoc-head-begin
13925 If present, this should be a regexp that matches the head of the
13926 article.
13927
13928 @item nndoc-head-end
13929 This should match the end of the head of the article.  It defaults to
13930 @samp{^$}---the empty line.
13931
13932 @item body-begin-function
13933 If present, this function should move point to the beginning of the body
13934 of the article.
13935
13936 @item body-begin
13937 This should match the beginning of the body of the article.  It defaults
13938 to @samp{^\n}.
13939
13940 @item body-end-function
13941 If present, this function should move point to the end of the body of
13942 the article.
13943
13944 @item body-end
13945 If present, this should match the end of the body of the article.
13946
13947 @item file-end
13948 If present, this should match the end of the file.  All text after this
13949 regexp will be totally ignored.
13950
13951 @end table
13952
13953 So, using these variables @code{nndoc} is able to dissect a document
13954 file into a series of articles, each with a head and a body.  However, a
13955 few more variables are needed since not all document types are all that
13956 news-like---variables needed to transform the head or the body into
13957 something that's palatable for Gnus:
13958
13959 @table @code
13960 @item prepare-body-function
13961 If present, this function will be called when requesting an article.  It
13962 will be called with point at the start of the body, and is useful if the
13963 document has encoded some parts of its contents.
13964
13965 @item article-transform-function
13966 If present, this function is called when requesting an article.  It's
13967 meant to be used for more wide-ranging transformation of both head and
13968 body of the article.
13969
13970 @item generate-head-function
13971 If present, this function is called to generate a head that Gnus can
13972 understand.  It is called with the article number as a parameter, and is
13973 expected to generate a nice head for the article in question.  It is
13974 called when requesting the headers of all articles.
13975
13976 @end table
13977
13978 Let's look at the most complicated example I can come up with---standard
13979 digests:
13980
13981 @example
13982 (standard-digest
13983  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
13984  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
13985  (prepare-body-function . nndoc-unquote-dashes)
13986  (body-end-function . nndoc-digest-body-end)
13987  (head-end . "^ ?$")
13988  (body-begin . "^ ?\n")
13989  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
13990  (subtype digest guess))
13991 @end example
13992
13993 We see that all text before a 70-width line of dashes is ignored; all
13994 text after a line that starts with that @samp{^End of} is also ignored;
13995 each article begins with a 30-width line of dashes; the line separating
13996 the head from the body may contain a single space; and that the body is
13997 run through @code{nndoc-unquote-dashes} before being delivered.
13998
13999 To hook your own document definition into @code{nndoc}, use the
14000 @code{nndoc-add-type} function.  It takes two parameters---the first is
14001 the definition itself and the second (optional) parameter says where in
14002 the document type definition alist to put this definition.  The alist is
14003 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
14004 is of @code{mmdf} type, and so on.  These type predicates should return
14005 @code{nil} if the document is not of the correct type; @code{t} if it is
14006 of the correct type; and a number if the document might be of the
14007 correct type.  A high number means high probability; a low number means
14008 low probability with @samp{0} being the lowest valid number.
14009
14010
14011 @node SOUP
14012 @subsection SOUP
14013 @cindex SOUP
14014 @cindex offline
14015
14016 In the PC world people often talk about ``offline'' newsreaders.  These
14017 are thingies that are combined reader/news transport monstrosities.
14018 With built-in modem programs.  Yecchh!
14019
14020 Of course, us Unix Weenie types of human beans use things like
14021 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
14022 transport things like Ghod intended.  And then we just use normal
14023 newsreaders.
14024
14025 However, it can sometimes be convenient to do something that's a bit
14026 easier on the brain if you have a very slow modem, and you're not really
14027 that interested in doing things properly.
14028
14029 A file format called @sc{soup} has been developed for transporting news
14030 and mail from servers to home machines and back again.  It can be a bit
14031 fiddly.
14032
14033 First some terminology:
14034
14035 @table @dfn
14036
14037 @item server
14038 This is the machine that is connected to the outside world and where you
14039 get news and/or mail from.
14040
14041 @item home machine
14042 This is the machine that you want to do the actual reading and responding
14043 on.  It is typically not connected to the rest of the world in any way.
14044
14045 @item packet
14046 Something that contains messages and/or commands.  There are two kinds
14047 of packets:
14048
14049 @table @dfn
14050 @item message packets
14051 These are packets made at the server, and typically contain lots of
14052 messages for you to read.  These are called @file{SoupoutX.tgz} by
14053 default, where @var{x} is a number.
14054
14055 @item response packets
14056 These are packets made at the home machine, and typically contains
14057 replies that you've written.  These are called @file{SoupinX.tgz} by
14058 default, where @var{x} is a number.
14059
14060 @end table
14061
14062 @end table
14063
14064
14065 @enumerate
14066
14067 @item
14068 You log in on the server and create a @sc{soup} packet.  You can either
14069 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
14070 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
14071 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
14072
14073 @item
14074 You transfer the packet home.  Rail, boat, car or modem will do fine.
14075
14076 @item
14077 You put the packet in your home directory.
14078
14079 @item
14080 You fire up Gnus on your home machine using the @code{nnsoup} backend as
14081 the native or secondary server.
14082
14083 @item
14084 You read articles and mail and answer and followup to the things you
14085 want (@pxref{SOUP Replies}).
14086
14087 @item
14088 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
14089 packet.
14090
14091 @item
14092 You transfer this packet to the server.
14093
14094 @item
14095 You use Gnus to mail this packet out with the @kbd{G s s} command.
14096
14097 @item
14098 You then repeat until you die.
14099
14100 @end enumerate
14101
14102 So you basically have a bipartite system---you use @code{nnsoup} for
14103 reading and Gnus for packing/sending these @sc{soup} packets.
14104
14105 @menu
14106 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
14107 * SOUP Groups::                 A backend for reading @sc{soup} packets.
14108 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
14109 @end menu
14110
14111
14112 @node SOUP Commands
14113 @subsubsection SOUP Commands
14114
14115 These are commands for creating and manipulating @sc{soup} packets.
14116
14117 @table @kbd
14118 @item G s b
14119 @kindex G s b (Group)
14120 @findex gnus-group-brew-soup
14121 Pack all unread articles in the current group
14122 (@code{gnus-group-brew-soup}).  This command understands the
14123 process/prefix convention.
14124
14125 @item G s w
14126 @kindex G s w (Group)
14127 @findex gnus-soup-save-areas
14128 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
14129
14130 @item G s s
14131 @kindex G s s (Group)
14132 @findex gnus-soup-send-replies
14133 Send all replies from the replies packet
14134 (@code{gnus-soup-send-replies}).
14135
14136 @item G s p
14137 @kindex G s p (Group)
14138 @findex gnus-soup-pack-packet
14139 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
14140
14141 @item G s r
14142 @kindex G s r (Group)
14143 @findex nnsoup-pack-replies
14144 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
14145
14146 @item O s
14147 @kindex O s (Summary)
14148 @findex gnus-soup-add-article
14149 This summary-mode command adds the current article to a @sc{soup} packet
14150 (@code{gnus-soup-add-article}).  It understands the process/prefix
14151 convention (@pxref{Process/Prefix}).
14152
14153 @end table
14154
14155
14156 There are a few variables to customize where Gnus will put all these
14157 thingies:
14158
14159 @table @code
14160
14161 @item gnus-soup-directory
14162 @vindex gnus-soup-directory
14163 Directory where Gnus will save intermediate files while composing
14164 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
14165
14166 @item gnus-soup-replies-directory
14167 @vindex gnus-soup-replies-directory
14168 This is what Gnus will use as a temporary directory while sending our
14169 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
14170
14171 @item gnus-soup-prefix-file
14172 @vindex gnus-soup-prefix-file
14173 Name of the file where Gnus stores the last used prefix.  The default is
14174 @samp{gnus-prefix}.
14175
14176 @item gnus-soup-packer
14177 @vindex gnus-soup-packer
14178 A format string command for packing a @sc{soup} packet.  The default is
14179 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
14180
14181 @item gnus-soup-unpacker
14182 @vindex gnus-soup-unpacker
14183 Format string command for unpacking a @sc{soup} packet.  The default is
14184 @samp{gunzip -c %s | tar xvf -}.
14185
14186 @item gnus-soup-packet-directory
14187 @vindex gnus-soup-packet-directory
14188 Where Gnus will look for reply packets.  The default is @file{~/}.
14189
14190 @item gnus-soup-packet-regexp
14191 @vindex gnus-soup-packet-regexp
14192 Regular expression matching @sc{soup} reply packets in
14193 @code{gnus-soup-packet-directory}.
14194
14195 @end table
14196
14197
14198 @node SOUP Groups
14199 @subsubsection @sc{soup} Groups
14200 @cindex nnsoup
14201
14202 @code{nnsoup} is the backend for reading @sc{soup} packets.  It will
14203 read incoming packets, unpack them, and put them in a directory where
14204 you can read them at leisure.
14205
14206 These are the variables you can use to customize its behavior:
14207
14208 @table @code
14209
14210 @item nnsoup-tmp-directory
14211 @vindex nnsoup-tmp-directory
14212 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
14213 directory.  (@file{/tmp/} by default.)
14214
14215 @item nnsoup-directory
14216 @vindex nnsoup-directory
14217 @code{nnsoup} then moves each message and index file to this directory.
14218 The default is @file{~/SOUP/}.
14219
14220 @item nnsoup-replies-directory
14221 @vindex nnsoup-replies-directory
14222 All replies will be stored in this directory before being packed into a
14223 reply packet.  The default is @file{~/SOUP/replies/"}.
14224
14225 @item nnsoup-replies-format-type
14226 @vindex nnsoup-replies-format-type
14227 The @sc{soup} format of the replies packets.  The default is @samp{?n}
14228 (rnews), and I don't think you should touch that variable.  I probably
14229 shouldn't even have documented it.  Drats!  Too late!
14230
14231 @item nnsoup-replies-index-type
14232 @vindex nnsoup-replies-index-type
14233 The index type of the replies packet.  The default is @samp{?n}, which
14234 means ``none''.  Don't fiddle with this one either!
14235
14236 @item nnsoup-active-file
14237 @vindex nnsoup-active-file
14238 Where @code{nnsoup} stores lots of information.  This is not an ``active
14239 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
14240 this file or mess it up in any way, you're dead.  The default is
14241 @file{~/SOUP/active}.
14242
14243 @item nnsoup-packer
14244 @vindex nnsoup-packer
14245 Format string command for packing a reply @sc{soup} packet.  The default
14246 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
14247
14248 @item nnsoup-unpacker
14249 @vindex nnsoup-unpacker
14250 Format string command for unpacking incoming @sc{soup} packets.  The
14251 default is @samp{gunzip -c %s | tar xvf -}.
14252
14253 @item nnsoup-packet-directory
14254 @vindex nnsoup-packet-directory
14255 Where @code{nnsoup} will look for incoming packets.  The default is
14256 @file{~/}.
14257
14258 @item nnsoup-packet-regexp
14259 @vindex nnsoup-packet-regexp
14260 Regular expression matching incoming @sc{soup} packets.  The default is
14261 @samp{Soupout}.
14262
14263 @item nnsoup-always-save
14264 @vindex nnsoup-always-save
14265 If non-@code{nil}, save the replies buffer after each posted message.
14266
14267 @end table
14268
14269
14270 @node SOUP Replies
14271 @subsubsection SOUP Replies
14272
14273 Just using @code{nnsoup} won't mean that your postings and mailings end
14274 up in @sc{soup} reply packets automagically.  You have to work a bit
14275 more for that to happen.
14276
14277 @findex nnsoup-set-variables
14278 The @code{nnsoup-set-variables} command will set the appropriate
14279 variables to ensure that all your followups and replies end up in the
14280 @sc{soup} system.
14281
14282 In specific, this is what it does:
14283
14284 @lisp
14285 (setq message-send-news-function 'nnsoup-request-post)
14286 (setq message-send-mail-function 'nnsoup-request-mail)
14287 @end lisp
14288
14289 And that's it, really.  If you only want news to go into the @sc{soup}
14290 system you just use the first line.  If you only want mail to be
14291 @sc{soup}ed you use the second.
14292
14293
14294 @node Mail-To-News Gateways
14295 @subsection Mail-To-News Gateways
14296 @cindex mail-to-news gateways
14297 @cindex gateways
14298
14299 If your local @code{nntp} server doesn't allow posting, for some reason
14300 or other, you can post using one of the numerous mail-to-news gateways.
14301 The @code{nngateway} backend provides the interface.
14302
14303 Note that you can't read anything from this backend---it can only be
14304 used to post with.
14305
14306 Server variables:
14307
14308 @table @code
14309 @item nngateway-address
14310 @vindex nngateway-address
14311 This is the address of the mail-to-news gateway.
14312
14313 @item nngateway-header-transformation
14314 @vindex nngateway-header-transformation
14315 News headers often have to be transformed in some odd way or other
14316 for the mail-to-news gateway to accept it.  This variable says what
14317 transformation should be called, and defaults to
14318 @code{nngateway-simple-header-transformation}.  The function is called
14319 narrowed to the headers to be transformed and with one parameter---the
14320 gateway address.
14321
14322 This default function just inserts a new @code{To} header based on the
14323 @code{Newsgroups} header and the gateway address.
14324 For instance, an article with this @code{Newsgroups} header:
14325
14326 @example
14327 Newsgroups: alt.religion.emacs
14328 @end example
14329
14330 will get this @code{From} header inserted:
14331
14332 @example
14333 To: alt-religion-emacs@@GATEWAY
14334 @end example
14335
14336 The following pre-defined functions exist:
14337
14338 @findex nngateway-simple-header-transformation
14339 @table @code
14340
14341 @item nngateway-simple-header-transformation
14342 Creates a @code{To} header that looks like
14343 @var{newsgroup}@@@code{nngateway-address}.
14344
14345 @findex nngateway-mail2news-header-transformation
14346
14347 @item nngateway-mail2news-header-transformation
14348 Creates a @code{To} header that looks like
14349 @code{nngateway-address}.
14350
14351 Here's an example:
14352
14353 @lisp
14354 (setq gnus-post-method
14355       '(nngateway
14356         "mail2news@@replay.com"
14357         (nngateway-header-transformation
14358          nngateway-mail2news-header-transformation)))
14359 @end lisp
14360
14361 @end table
14362
14363
14364 @end table
14365
14366 So, to use this, simply say something like:
14367
14368 @lisp
14369 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
14370 @end lisp
14371
14372
14373
14374 @node IMAP
14375 @subsection @sc{imap}
14376 @cindex nnimap
14377 @cindex @sc{imap}
14378
14379 @sc{imap} is a network protocol for reading mail (or news, or ...),
14380 think of it as a modernized @sc{nntp}.  Connecting to a @sc{imap}
14381 server is much similar to connecting to a news server, you just
14382 specify the network address of the server.
14383
14384 @sc{imap} has two properties.  First, @sc{imap} can do everything that
14385 POP can, it can hence be viewed as POP++.  Secondly, @sc{imap} is a
14386 mail storage protocol, similar to @sc{nntp} being a news storage
14387 protocol.  (@sc{imap} offers more features than @sc{nntp} because news
14388 is more or less read-only whereas mail is read-write.)
14389
14390 If you want to use @sc{imap} as POP++, use an imap entry in
14391 mail-sources.  With this, Gnus will fetch mails from the @sc{imap}
14392 server and store them on the local disk.  This is not the usage
14393 described in this section.  @xref{Mail Sources}.
14394
14395 If you want to use @sc{imap} as a mail storage protocol, use an nnimap
14396 entry in gnus-secondary-select-methods.  With this, Gnus will
14397 manipulate mails stored on the @sc{imap} server.  This is the kind of
14398 usage explained in this section.
14399
14400 A server configuration in @code{~/.gnus} with a few @sc{imap} servers
14401 might look something like this:
14402
14403 @lisp
14404 (setq gnus-secondary-select-methods
14405       '((nnimap "simpleserver") ; no special configuration
14406         ; perhaps a ssh port forwarded server:
14407         (nnimap "dolk"
14408                 (nnimap-address "localhost")
14409                 (nnimap-server-port 1430))
14410         ; a UW server running on localhost
14411         (nnimap "barbar"
14412                 (nnimap-server-port 143)
14413                 (nnimap-address "localhost")
14414                 (nnimap-list-pattern ("INBOX" "mail/*")))
14415         ; anonymous public cyrus server:
14416         (nnimap "cyrus.andrew.cmu.edu"
14417                 (nnimap-authenticator anonymous)
14418                 (nnimap-list-pattern "archive.*")
14419                 (nnimap-stream network))
14420         ; a ssl server on a non-standard port:
14421         (nnimap "vic20"
14422                 (nnimap-address "vic20.somewhere.com")
14423                 (nnimap-server-port 9930)
14424                 (nnimap-stream ssl))))
14425 @end lisp
14426
14427 The following variables can be used to create a virtual @code{nnimap}
14428 server:
14429
14430 @table @code
14431
14432 @item nnimap-address
14433 @vindex nnimap-address
14434
14435 The address of the remote @sc{imap} server.  Defaults to the virtual
14436 server name if not specified.
14437
14438 @item nnimap-server-port
14439 @vindex nnimap-server-port
14440 Port on server to contact.  Defaults to port 143, or 993 for SSL.
14441
14442 Note that this should be a integer, example server specification:
14443
14444 @lisp
14445 (nnimap "mail.server.com"
14446         (nnimap-server-port 4711))
14447 @end lisp
14448
14449 @item nnimap-list-pattern
14450 @vindex nnimap-list-pattern
14451 String or list of strings of mailboxes to limit available groups to.
14452 This is used when the server has very many mailboxes and you're only
14453 interested in a few -- some servers export your home directory via
14454 @sc{imap}, you'll probably want to limit the mailboxes to those in
14455 @file{~/Mail/*} then.
14456
14457 The string can also be a cons of REFERENCE and the string as above, what
14458 REFERENCE is used for is server specific, but on the University of
14459 Washington server it's a directory that will be concatenated with the
14460 mailbox.
14461
14462 Example server specification:
14463
14464 @lisp
14465 (nnimap "mail.server.com"
14466         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
14467                                ("~friend/Mail/" . "list/*"))))
14468 @end lisp
14469
14470 @item nnimap-stream
14471 @vindex nnimap-stream
14472 The type of stream used to connect to your server.  By default, nnimap
14473 will detect and automatically use all of the below, with the exception
14474 of SSL. (SSL is being replaced by STARTTLS, which can be automatically
14475 detected, but it's not widely deployed yet).
14476
14477 Example server specification:
14478
14479 @lisp
14480 (nnimap "mail.server.com"
14481         (nnimap-stream ssl))
14482 @end lisp
14483
14484 Please note that the value of @code{nnimap-stream} is a symbol!
14485
14486 @itemize @bullet
14487 @item
14488 @dfn{gssapi:} Connect with GSSAPI (usually kerberos 5). Requires the
14489 @samp{imtest} program.
14490 @item
14491 @dfn{kerberos4:} Connect with kerberos 4. Requires the @samp{imtest} program.
14492 @item
14493 @dfn{starttls:} Connect via the STARTTLS extension (similar to
14494 SSL). Requires the external library @samp{starttls.el} and program
14495 @samp{starttls}.
14496 @item
14497 @dfn{ssl:} Connect through SSL. Requires OpenSSL (the
14498 program @samp{openssl}) or SSLeay (@samp{s_client}).
14499 @item
14500 @dfn{shell:} Use a shell command to start @sc{imap} connection.
14501 @item
14502 @dfn{network:} Plain, TCP/IP network connection.
14503 @end itemize
14504
14505 @vindex imap-kerberos4-program
14506 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
14507 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
14508 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
14509 to make @code{imap.el} use a pty instead of a pipe when communicating
14510 with @samp{imtest}.  You will then suffer from a line length
14511 restrictions on IMAP commands, which might make Gnus seem to hang
14512 indefinitely if you have many articles in a mailbox.  The variable
14513 @code{imap-kerberos4-program} contain parameters to pass to the imtest
14514 program.
14515
14516 @vindex imap-ssl-program
14517 For SSL connections, the OpenSSL program is available from
14518 @uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay,
14519 and nnimap support it too - although the most recent versions of
14520 SSLeay, 0.9.x, are known to have serious bugs making it
14521 useless. Earlier versions, especially 0.8.x, of SSLeay are known to
14522 work. The variable @code{imap-ssl-program} contain parameters to pass
14523 to OpenSSL/SSLeay.
14524
14525 @vindex imap-shell-program
14526 @vindex imap-shell-host
14527 For @sc{imap} connections using the @code{shell} stream, the variable
14528 @code{imap-shell-program} specify what program to call.
14529
14530 @item nnimap-authenticator
14531 @vindex nnimap-authenticator
14532
14533 The authenticator used to connect to the server.  By default, nnimap
14534 will use the most secure authenticator your server is capable of.
14535
14536 Example server specification:
14537
14538 @lisp
14539 (nnimap "mail.server.com"
14540         (nnimap-authenticator anonymous))
14541 @end lisp
14542
14543 Please note that the value of @code{nnimap-authenticator} is a symbol!
14544
14545 @itemize @bullet
14546 @item
14547 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication. Require
14548 external program @code{imtest}.
14549 @item
14550 @dfn{kerberos4:} Kerberos authentication. Require external program
14551 @code{imtest}.
14552 @item
14553 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5. Require
14554 external library @code{digest-md5.el}.
14555 @item
14556 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
14557 @item
14558 @dfn{login:} Plain-text username/password via LOGIN.
14559 @item
14560 @dfn{anonymous:} Login as `anonymous', supplying your emailadress as password.
14561 @end itemize
14562
14563 @item nnimap-expunge-on-close
14564 @cindex Expunging
14565 @vindex nnimap-expunge-on-close
14566 Unlike Parmenides the @sc{imap} designers has decided that things that
14567 doesn't exist actually does exist.  More specifically, @sc{imap} has
14568 this concept of marking articles @code{Deleted} which doesn't actually
14569 delete them, and this (marking them @code{Deleted}, that is) is what
14570 nnimap does when you delete a article in Gnus (with @kbd{G DEL} or
14571 similar).
14572
14573 Since the articles aren't really removed when we mark them with the
14574 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
14575 running in circles yet?
14576
14577 Traditionally, nnimap has removed all articles marked as @code{Deleted}
14578 when closing a mailbox but this is now configurable by this server
14579 variable.
14580
14581 The possible options are:
14582
14583 @table @code
14584
14585 @item always
14586 The default behavior, delete all articles marked as "Deleted" when
14587 closing a mailbox.
14588 @item never
14589 Never actually delete articles.  Currently there is no way of showing
14590 the articles marked for deletion in nnimap, but other @sc{imap} clients
14591 may allow you to do this.  If you ever want to run the EXPUNGE command
14592 manually, @xref{Expunging mailboxes}.
14593 @item ask
14594 When closing mailboxes, nnimap will ask if you wish to expunge deleted
14595 articles or not.
14596
14597 @end table
14598
14599 @item nnimap-importantize-dormant
14600 @vindex nnimap-importantize-dormant
14601
14602 If non-nil, marks dormant articles as ticked (as well), for other IMAP
14603 clients. Within Gnus, dormant articles will naturally still (only) be
14604 marked as ticked.  This is to make dormant articles stand out, just
14605 like ticked articles, in other IMAP clients. (In other words, Gnus has
14606 two ``Tick'' marks and IMAP has only one.)
14607
14608 Probably the only reason for frobing this would be if you're trying
14609 enable per-user persistant dormant flags, using something like:
14610
14611 @lisp
14612 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
14613         (format "gnus-dormant-%s" (user-login-name)))
14614 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
14615         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
14616 @end lisp
14617
14618 In this case, you would not want the per-user dormant flag showing up
14619 as ticked for other users.
14620
14621 @item nnimap-expunge-search-string
14622 @cindex Expunging
14623 @vindex nnimap-expunge-search-string
14624
14625 This variable contain the IMAP search command sent to server when
14626 searching for articles eligible for expiring.  The default is
14627 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
14628 UID set and the second @code{%s} is replaced by a date.
14629
14630 Probably the only useful value to change this to is
14631 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
14632 messages instead of the internal article date. See section 6.4.4 of
14633 RFC 2060 for more information on valid strings.
14634
14635 @item nnimap-authinfo-file
14636 @vindex nnimap-authinfo-file
14637
14638 A file containing credentials used to log in on servers.  The format is
14639 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
14640 variable @code{nntp-authinfo-file} for exact syntax; also see
14641 @ref{NNTP}.
14642
14643 @end table
14644
14645 @menu
14646 * Splitting in IMAP::           Splitting mail with nnimap.
14647 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
14648 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
14649 @end menu
14650
14651
14652
14653 @node Splitting in IMAP
14654 @subsubsection Splitting in @sc{imap}
14655 @cindex splitting imap mail
14656
14657 Splitting is something Gnus users has loved and used for years, and now
14658 the rest of the world is catching up.  Yeah, dream on, not many
14659 @sc{imap} server has server side splitting and those that have splitting
14660 seem to use some non-standard protocol.  This means that @sc{imap}
14661 support for Gnus has to do it's own splitting.
14662
14663 And it does.
14664
14665 Here are the variables of interest:
14666
14667 @table @code
14668
14669 @item nnimap-split-crosspost
14670 @cindex splitting, crosspost
14671 @cindex crosspost
14672 @vindex nnimap-split-crosspost
14673
14674 If non-nil, do crossposting if several split methods match the mail.  If
14675 nil, the first match in @code{nnimap-split-rule} found will be used.
14676
14677 Nnmail equivalent: @code{nnmail-crosspost}.
14678
14679 @item nnimap-split-inbox
14680 @cindex splitting, inbox
14681 @cindex inbox
14682 @vindex nnimap-split-inbox
14683
14684 A string or a list of strings that gives the name(s) of @sc{imap}
14685 mailboxes to split from.  Defaults to nil, which means that splitting is
14686 disabled!
14687
14688 @lisp
14689 (setq nnimap-split-inbox
14690       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
14691 @end lisp
14692
14693 No nnmail equivalent.
14694
14695 @item nnimap-split-rule
14696 @cindex Splitting, rules
14697 @vindex nnimap-split-rule
14698
14699 New mail found in @code{nnimap-split-inbox} will be split according to
14700 this variable.
14701
14702 This variable contains a list of lists, where the first element in the
14703 sublist gives the name of the @sc{imap} mailbox to move articles
14704 matching the regexp in the second element in the sublist.  Got that?
14705 Neither did I, we need examples.
14706
14707 @lisp
14708 (setq nnimap-split-rule
14709       '(("INBOX.nnimap"
14710          "^Sender: owner-nnimap@@vic20.globalcom.se")
14711         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
14712         ("INBOX.private" "")))
14713 @end lisp
14714
14715 This will put all articles from the nnimap mailing list into mailbox
14716 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
14717 into INBOX.junk and everything else in INBOX.private.
14718
14719 The first string may contain `\\1' forms, like the ones used by
14720 replace-match to insert sub-expressions from the matched text.  For
14721 instance:
14722
14723 @lisp
14724 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
14725 @end lisp
14726
14727 The second element can also be a function.  In that case, it will be
14728 called with the first element of the rule as the argument, in a buffer
14729 containing the headers of the article.  It should return a non-nil value
14730 if it thinks that the mail belongs in that group.
14731
14732 Nnmail users might recollect that the last regexp had to be empty to
14733 match all articles (like in the example above).  This is not required in
14734 nnimap.  Articles not matching any of the regexps will not be moved out
14735 of your inbox.  (This might affect performance if you keep lots of
14736 unread articles in your inbox, since the splitting code would go over
14737 them every time you fetch new mail.)
14738
14739 These rules are processed from the beginning of the alist toward the
14740 end.  The first rule to make a match will "win", unless you have
14741 crossposting enabled.  In that case, all matching rules will "win".
14742
14743 This variable can also have a function as its value, the function will
14744 be called with the headers narrowed and should return a group where it
14745 thinks the article should be split to.  See @code{nnimap-split-fancy}.
14746
14747 The splitting code tries to create mailboxes if it need too.
14748
14749 To allow for different split rules on different virtual servers, and
14750 even different split rules in different inboxes on the same server,
14751 the syntax of this variable have been extended along the lines of:
14752
14753 @lisp
14754 (setq nnimap-split-rule
14755       '(("my1server"    (".*"    (("ding"    "ding@@gnus.org")
14756                                   ("junk"    "From:.*Simon")))
14757         ("my2server"    ("INBOX" nnimap-split-fancy))
14758         ("my[34]server" (".*"    (("private" "To:.*Simon")
14759                                   ("junk"    my-junk-func)))))
14760 @end lisp
14761
14762 The virtual server name is in fact a regexp, so that the same rules
14763 may apply to several servers.  In the example, the servers
14764 @code{my3server} and @code{my4server} both use the same rules.
14765 Similarly, the inbox string is also a regexp.  The actual splitting
14766 rules are as before, either a function, or a list with group/regexp or
14767 group/function elements.
14768
14769 Nnmail equivalent: @code{nnmail-split-methods}.
14770
14771 @item nnimap-split-predicate
14772 @cindex splitting
14773 @vindex nnimap-split-predicate
14774
14775 Mail matching this predicate in @code{nnimap-split-inbox} will be
14776 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
14777
14778 This might be useful if you use another @sc{imap} client to read mail in
14779 your inbox but would like Gnus to split all articles in the inbox
14780 regardless of readedness. Then you might change this to
14781 @samp{UNDELETED}.
14782
14783 @item nnimap-split-fancy
14784 @cindex splitting, fancy
14785 @findex nnimap-split-fancy
14786 @vindex nnimap-split-fancy
14787
14788 It's possible to set @code{nnimap-split-rule} to
14789 @code{nnmail-split-fancy} if you want to use fancy
14790 splitting. @xref{Fancy Mail Splitting}.
14791
14792 However, to be able to have different fancy split rules for nnmail and
14793 nnimap backends you can set @code{nnimap-split-rule} to
14794 @code{nnimap-split-fancy} and define the nnimap specific fancy split
14795 rule in @code{nnimap-split-fancy}.
14796
14797 Example:
14798
14799 @lisp
14800 (setq nnimap-split-rule 'nnimap-split-fancy
14801       nnimap-split-fancy ...)
14802 @end lisp
14803
14804 Nnmail equivalent: @code{nnmail-split-fancy}.
14805
14806 @end table
14807
14808 @node Editing IMAP ACLs
14809 @subsubsection Editing @sc{imap} ACLs
14810 @cindex editing imap acls
14811 @cindex Access Control Lists
14812 @cindex Editing @sc{imap} ACLs
14813 @kindex G l
14814 @findex gnus-group-nnimap-edit-acl
14815
14816 ACL stands for Access Control List.  ACLs are used in @sc{imap} for
14817 limiting (or enabling) other users access to your mail boxes.  Not all
14818 @sc{imap} servers support this, this function will give an error if it
14819 doesn't.
14820
14821 To edit a ACL for a mailbox, type @kbd{G l}
14822 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with a ACL
14823 editing window with detailed instructions.
14824
14825 Some possible uses:
14826
14827 @itemize @bullet
14828 @item
14829 Giving "anyone" the "lrs" rights (lookup, read, keep seen/unseen flags)
14830 on your mailing list mailboxes enables other users on the same server to
14831 follow the list without subscribing to it.
14832 @item
14833 At least with the Cyrus server, you are required to give the user
14834 "anyone" posting ("p") capabilities to have "plussing" work (that is,
14835 mail sent to user+mailbox@@domain ending up in the @sc{imap} mailbox
14836 INBOX.mailbox).
14837 @end itemize
14838
14839 @node Expunging mailboxes
14840 @subsubsection Expunging mailboxes
14841 @cindex expunging
14842
14843 @cindex Expunge
14844 @cindex Manual expunging
14845 @kindex G x
14846 @findex gnus-group-nnimap-expunge
14847
14848 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
14849 you may want the option of expunging all deleted articles in a mailbox
14850 manually.  This is exactly what @kbd{G x} does.
14851
14852 Currently there is no way of showing deleted articles, you can just
14853 delete them.
14854
14855
14856
14857 @node Combined Groups
14858 @section Combined Groups
14859
14860 Gnus allows combining a mixture of all the other group types into bigger
14861 groups.
14862
14863 @menu
14864 * Virtual Groups::              Combining articles from many groups.
14865 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
14866 @end menu
14867
14868
14869 @node Virtual Groups
14870 @subsection Virtual Groups
14871 @cindex nnvirtual
14872 @cindex virtual groups
14873 @cindex merging groups
14874
14875 An @dfn{nnvirtual group} is really nothing more than a collection of
14876 other groups.
14877
14878 For instance, if you are tired of reading many small groups, you can
14879 put them all in one big group, and then grow tired of reading one
14880 big, unwieldy group.  The joys of computing!
14881
14882 You specify @code{nnvirtual} as the method.  The address should be a
14883 regexp to match component groups.
14884
14885 All marks in the virtual group will stick to the articles in the
14886 component groups.  So if you tick an article in a virtual group, the
14887 article will also be ticked in the component group from whence it came.
14888 (And vice versa---marks from the component groups will also be shown in
14889 the virtual group.)
14890
14891 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
14892 newsgroups into one, big, happy newsgroup:
14893
14894 @lisp
14895 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
14896 @end lisp
14897
14898 The component groups can be native or foreign; everything should work
14899 smoothly, but if your computer explodes, it was probably my fault.
14900
14901 Collecting the same group from several servers might actually be a good
14902 idea if users have set the Distribution header to limit distribution.
14903 If you would like to read @samp{soc.motss} both from a server in Japan
14904 and a server in Norway, you could use the following as the group regexp:
14905
14906 @example
14907 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
14908 @end example
14909
14910 (Remember, though, that if you're creating the group with @kbd{G m}, you
14911 shouldn't double the backslashes, and you should leave off the quote
14912 characters at the beginning and the end of the string.)
14913
14914 This should work kinda smoothly---all articles from both groups should
14915 end up in this one, and there should be no duplicates.  Threading (and
14916 the rest) will still work as usual, but there might be problems with the
14917 sequence of articles.  Sorting on date might be an option here
14918 (@pxref{Selecting a Group}).
14919
14920 One limitation, however---all groups included in a virtual
14921 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
14922 zombie groups can't be component groups for @code{nnvirtual} groups.
14923
14924 @vindex nnvirtual-always-rescan
14925 If the @code{nnvirtual-always-rescan} is non-@code{nil},
14926 @code{nnvirtual} will always scan groups for unread articles when
14927 entering a virtual group.  If this variable is @code{nil} (which is the
14928 default) and you read articles in a component group after the virtual
14929 group has been activated, the read articles from the component group
14930 will show up when you enter the virtual group.  You'll also see this
14931 effect if you have two virtual groups that have a component group in
14932 common.  If that's the case, you should set this variable to @code{t}.
14933 Or you can just tap @code{M-g} on the virtual group every time before
14934 you enter it---it'll have much the same effect.
14935
14936 @code{nnvirtual} can have both mail and news groups as component groups.
14937 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
14938 has to ask the backend of the component group the article comes from
14939 whether it is a news or mail backend.  However, when you do a @kbd{^},
14940 there is typically no sure way for the component backend to know this,
14941 and in that case @code{nnvirtual} tells Gnus that the article came from a
14942 not-news backend.  (Just to be on the safe side.)
14943
14944 @kbd{C-c C-t} in the message buffer will insert the @code{Newsgroups}
14945 line from the article you respond to in these cases.
14946
14947
14948
14949 @node Kibozed Groups
14950 @subsection Kibozed Groups
14951 @cindex nnkiboze
14952 @cindex kibozing
14953
14954 @dfn{Kibozing} is defined by @sc{oed} as ``grepping through (parts of)
14955 the news feed''.  @code{nnkiboze} is a backend that will do this for
14956 you.  Oh joy!  Now you can grind any @sc{nntp} server down to a halt
14957 with useless requests!  Oh happiness!
14958
14959 @kindex G k (Group)
14960 To create a kibozed group, use the @kbd{G k} command in the group
14961 buffer.
14962
14963 The address field of the @code{nnkiboze} method is, as with
14964 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
14965 @code{nnkiboze} group.  That's where most similarities between @code{nnkiboze}
14966 and @code{nnvirtual} end.
14967
14968 In addition to this regexp detailing component groups, an @code{nnkiboze} group
14969 must have a score file to say what articles are to be included in
14970 the group (@pxref{Scoring}).
14971
14972 @kindex M-x nnkiboze-generate-groups
14973 @findex nnkiboze-generate-groups
14974 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
14975 @code{nnkiboze} groups you want to have.  This command will take time.  Lots of
14976 time.  Oodles and oodles of time.  Gnus has to fetch the headers from
14977 all the articles in all the component groups and run them through the
14978 scoring process to determine if there are any articles in the groups
14979 that are to be part of the @code{nnkiboze} groups.
14980
14981 Please limit the number of component groups by using restrictive
14982 regexps.  Otherwise your sysadmin may become annoyed with you, and the
14983 @sc{nntp} site may throw you off and never let you back in again.
14984 Stranger things have happened.
14985
14986 @code{nnkiboze} component groups do not have to be alive---they can be dead,
14987 and they can be foreign.  No restrictions.
14988
14989 @vindex nnkiboze-directory
14990 The generation of an @code{nnkiboze} group means writing two files in
14991 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
14992 contains the @sc{nov} header lines for all the articles in the group,
14993 and the other is an additional @file{.newsrc} file to store information
14994 on what groups have been searched through to find component articles.
14995
14996 Articles marked as read in the @code{nnkiboze} group will have
14997 their @sc{nov} lines removed from the @sc{nov} file.
14998
14999
15000 @node Gnus Unplugged
15001 @section Gnus Unplugged
15002 @cindex offline
15003 @cindex unplugged
15004 @cindex Agent
15005 @cindex Gnus Agent
15006 @cindex Gnus Unplugged
15007
15008 In olden times (ca. February '88), people used to run their newsreaders
15009 on big machines with permanent connections to the net.  News transport
15010 was dealt with by news servers, and all the newsreaders had to do was to
15011 read news.  Believe it or not.
15012
15013 Nowadays most people read news and mail at home, and use some sort of
15014 modem to connect to the net.  To avoid running up huge phone bills, it
15015 would be nice to have a way to slurp down all the news and mail, hang up
15016 the phone, read for several hours, and then upload any responses you
15017 have to make.  And then you repeat the procedure.
15018
15019 Of course, you can use news servers for doing this as well.  I've used
15020 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
15021 for some years, but doing that's a bore.  Moving the news server
15022 functionality up to the newsreader makes sense if you're the only person
15023 reading news on a machine.
15024
15025 Using Gnus as an ``offline'' newsreader is quite simple.
15026
15027 @itemize @bullet
15028 @item
15029 First, set up Gnus as you would do if you were running it on a machine
15030 that has full connection to the net.  Go ahead.  I'll still be waiting
15031 here.
15032
15033 @item
15034 Then, put the following magical incantation at the end of your
15035 @file{.gnus.el} file:
15036
15037 @lisp
15038 (gnus-agentize)
15039 @end lisp
15040 @end itemize
15041
15042 That's it.  Gnus is now an ``offline'' newsreader.
15043
15044 Of course, to use it as such, you have to learn a few new commands.
15045
15046 @menu
15047 * Agent Basics::                How it all is supposed to work.
15048 * Agent Categories::            How to tell the Gnus Agent what to download.
15049 * Agent Commands::              New commands for all the buffers.
15050 * Agent Expiry::                How to make old articles go away.
15051 * Agent and IMAP::              How to use the Agent with IMAP.
15052 * Outgoing Messages::           What happens when you post/mail something?
15053 * Agent Variables::             Customizing is fun.
15054 * Example Setup::               An example @file{.gnus.el} file for offline people.
15055 * Batching Agents::             How to fetch news from a @code{cron} job.
15056 * Agent Caveats::               What you think it'll do and what it does.
15057 @end menu
15058
15059
15060 @node Agent Basics
15061 @subsection Agent Basics
15062
15063 First, let's get some terminology out of the way.
15064
15065 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
15066 connection to the net (and notified the Agent that this is the case).
15067 When the connection to the net is up again (and Gnus knows this), the
15068 Agent is @dfn{plugged}.
15069
15070 The @dfn{local} machine is the one you're running on, and which isn't
15071 connected to the net continuously.
15072
15073 @dfn{Downloading} means fetching things from the net to your local
15074 machine.  @dfn{Uploading} is doing the opposite.
15075
15076 Let's take a typical Gnus session using the Agent.
15077
15078 @itemize @bullet
15079
15080 @item
15081 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
15082 Agent in a disconnected state.  You can read all the news that you have
15083 already fetched while in this mode.
15084
15085 @item
15086 You then decide to see whether any new news has arrived.  You connect
15087 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
15088 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
15089 as usual.  To check for new mail in unplugged mode, see (@pxref{Mail
15090 Source Specifiers}).
15091
15092 @item
15093 You can then read the new news immediately, or you can download the news
15094 onto your local machine.  If you want to do the latter, you press @kbd{g}
15095 to check if there are any new news and then @kbd{J
15096 s} to fetch all the eligible articles in all the groups.  (To let Gnus
15097 know which articles you want to download, @pxref{Agent Categories}.)
15098
15099 @item
15100 After fetching the articles, you press @kbd{J j} to make Gnus become
15101 unplugged again, and you shut down the PPP thing (or whatever).  And
15102 then you read the news offline.
15103
15104 @item
15105 And then you go to step 2.
15106 @end itemize
15107
15108 Here are some things you should do the first time (or so) that you use
15109 the Agent.
15110
15111 @itemize @bullet
15112
15113 @item
15114 Decide which servers should be covered by the Agent.  If you have a mail
15115 backend, it would probably be nonsensical to have it covered by the
15116 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
15117 @kbd{J a} the server (or servers) that you wish to have covered by the
15118 Agent (@pxref{Server Agent Commands}).  This will typically be only the
15119 primary select method, which is listed on the bottom in the buffer.
15120
15121 @item
15122 Decide on download policy.  @xref{Agent Categories}.
15123
15124 @item
15125 Uhm... that's it.
15126 @end itemize
15127
15128
15129 @node Agent Categories
15130 @subsection Agent Categories
15131
15132 One of the main reasons to integrate the news transport layer into the
15133 newsreader is to allow greater control over what articles to download.
15134 There's not much point in downloading huge amounts of articles, just to
15135 find out that you're not interested in reading any of them.  It's better
15136 to be somewhat more conservative in choosing what to download, and then
15137 mark the articles for downloading manually if it should turn out that
15138 you're interested in the articles anyway.
15139
15140 The main way to control what is to be downloaded is to create a
15141 @dfn{category} and then assign some (or all) groups to this category.
15142 Groups that do not belong in any other category belong to the
15143 @code{default} category.  Gnus has its own buffer for creating and
15144 managing categories.
15145
15146 @menu
15147 * Category Syntax::             What a category looks like.
15148 * Category Buffer::             A buffer for maintaining categories.
15149 * Category Variables::          Customize'r'Us.
15150 @end menu
15151
15152
15153 @node Category Syntax
15154 @subsubsection Category Syntax
15155
15156 A category consists of two things.
15157
15158 @enumerate
15159 @item
15160 A predicate which (generally) gives a rough outline of which articles
15161 are eligible for downloading; and
15162
15163 @item
15164 a score rule which (generally) gives you a finer granularity when
15165 deciding what articles to download.  (Note that this @dfn{download
15166 score} is not necessarily related to normal scores.)
15167 @end enumerate
15168
15169 A predicate in its simplest form can be a single predicate such as
15170 @code{true} or @code{false}.  These two will download every available
15171 article or nothing respectively.  In the case of these two special
15172 predicates an additional score rule is superfluous.
15173
15174 Predicates of @code{high} or @code{low} download articles in respect of
15175 their scores in relationship to @code{gnus-agent-high-score} and
15176 @code{gnus-agent-low-score} as described below.
15177
15178 To gain even finer control of what is to be regarded eligible for
15179 download a predicate can consist of a number of predicates with logical
15180 operators sprinkled in between.
15181
15182 Perhaps some examples are in order.
15183
15184 Here's a simple predicate.  (It's the default predicate, in fact, used
15185 for all groups that don't belong to any other category.)
15186
15187 @lisp
15188 short
15189 @end lisp
15190
15191 Quite simple, eh?  This predicate is true if and only if the article is
15192 short (for some value of ``short'').
15193
15194 Here's a more complex predicate:
15195
15196 @lisp
15197 (or high
15198     (and
15199      (not low)
15200      (not long)))
15201 @end lisp
15202
15203 This means that an article should be downloaded if it has a high score,
15204 or if the score is not low and the article is not long.  You get the
15205 drift.
15206
15207 The available logical operators are @code{or}, @code{and} and
15208 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
15209 @samp{|}, @code{&} and @code{!} instead.)
15210
15211 The following predicates are pre-defined, but if none of these fit what
15212 you want to do, you can write your own.
15213
15214 @table @code
15215 @item short
15216 True iff the article is shorter than @code{gnus-agent-short-article}
15217 lines; default 100.
15218
15219 @item long
15220 True iff the article is longer than @code{gnus-agent-long-article}
15221 lines; default 200.
15222
15223 @item low
15224 True iff the article has a download score less than
15225 @code{gnus-agent-low-score}; default 0.
15226
15227 @item high
15228 True iff the article has a download score greater than
15229 @code{gnus-agent-high-score}; default 0.
15230
15231 @item spam
15232 True iff the Gnus Agent guesses that the article is spam.  The
15233 heuristics may change over time, but at present it just computes a
15234 checksum and sees whether articles match.
15235
15236 @item true
15237 Always true.
15238
15239 @item false
15240 Always false.
15241 @end table
15242
15243 If you want to create your own predicate function, here's what you have
15244 to know:  The functions are called with no parameters, but the
15245 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
15246 useful values.
15247
15248 For example, you could decide that you don't want to download articles
15249 that were posted more than a certain number of days ago (e.g. posted
15250 more than @code{gnus-agent-expire-days} ago) you might write a function
15251 something along the lines of the following:
15252
15253 @lisp
15254 (defun my-article-old-p ()
15255   "Say whether an article is old."
15256   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
15257      (- (time-to-days (current-time)) gnus-agent-expire-days)))
15258 @end lisp
15259
15260 with the predicate then defined as:
15261
15262 @lisp
15263 (not my-article-old-p)
15264 @end lisp
15265
15266 or you could append your predicate to the predefined
15267 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
15268 wherever.  (Note: this would have to be at a point *after*
15269 @code{gnus-agent} has been loaded via @code{(gnus-agentize)})
15270
15271 @lisp
15272 (setq  gnus-category-predicate-alist
15273   (append gnus-category-predicate-alist
15274          '((old . my-article-old-p))))
15275 @end lisp
15276
15277 and simply specify your predicate as:
15278
15279 @lisp
15280 (not old)
15281 @end lisp
15282
15283 If/when using something like the above, be aware that there are many
15284 misconfigured systems/mailers out there and so an article's date is not
15285 always a reliable indication of when it was posted.  Hell, some people
15286 just don't give a damn.
15287
15288 The above predicates apply to *all* the groups which belong to the
15289 category.  However, if you wish to have a specific predicate for an
15290 individual group within a category, or you're just too lazy to set up a
15291 new category, you can enter a group's individual predicate in it's group
15292 parameters like so:
15293
15294 @lisp
15295 (agent-predicate . short)
15296 @end lisp
15297
15298 This is the group parameter equivalent of the agent category default.
15299 Note that when specifying a single word predicate like this, the
15300 @code{agent-predicate} specification must be in dotted pair notation.
15301
15302 The equivalent of the longer example from above would be:
15303
15304 @lisp
15305 (agent-predicate or high (and (not low) (not long)))
15306 @end lisp
15307
15308 The outer parenthesis required in the category specification are not
15309 entered here as, not being in dotted pair notation, the value of the
15310 predicate is assumed to be a list.
15311
15312
15313 Now, the syntax of the download score is the same as the syntax of
15314 normal score files, except that all elements that require actually
15315 seeing the article itself are verboten.  This means that only the
15316 following headers can be scored on: @code{Subject}, @code{From},
15317 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
15318 @code{Lines}, and @code{Xref}.
15319
15320 As with predicates, the specification of the @code{download score rule}
15321 to use in respect of a group can be in either the category definition if
15322 it's to be applicable to all groups in therein, or a group's parameters
15323 if it's to be specific to that group.
15324
15325 In both of these places the @code{download score rule} can take one of
15326 three forms:
15327
15328 @enumerate
15329 @item
15330 Score rule
15331
15332 This has the same syntax as a normal gnus score file except only a
15333 subset of scoring keywords are available as mentioned above.
15334
15335 example:
15336
15337 @itemize @bullet
15338 @item
15339 Category specification
15340
15341 @lisp
15342 (("from"
15343        ("Lars Ingebrigtsen" 1000000 nil s))
15344 ("lines"
15345        (500 -100 nil <)))
15346 @end lisp
15347
15348 @item
15349 Group Parameter specification
15350
15351 @lisp
15352 (agent-score ("from"
15353                    ("Lars Ingebrigtsen" 1000000 nil s))
15354              ("lines"
15355                    (500 -100 nil <)))
15356 @end lisp
15357
15358 Again, note the omission of the outermost parenthesis here.
15359 @end itemize
15360
15361 @item
15362 Agent score file
15363
15364 These score files must *only* contain the permitted scoring keywords
15365 stated above.
15366
15367 example:
15368
15369 @itemize @bullet
15370 @item
15371 Category specification
15372
15373 @lisp
15374 ("~/News/agent.SCORE")
15375 @end lisp
15376
15377 or perhaps
15378
15379 @lisp
15380 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
15381 @end lisp
15382
15383 @item
15384 Group Parameter specification
15385
15386 @lisp
15387 (agent-score "~/News/agent.SCORE")
15388 @end lisp
15389
15390 Additional score files can be specified as above.  Need I say anything
15391 about parenthesis?
15392 @end itemize
15393
15394 @item
15395 Use @code{normal} score files
15396
15397 If you don't want to maintain two sets of scoring rules for a group, and
15398 your desired @code{downloading} criteria for a group are the same as your
15399 @code{reading} criteria then you can tell the agent to refer to your
15400 @code{normal} score files when deciding what to download.
15401
15402 These directives in either the category definition or a group's
15403 parameters will cause the agent to read in all the applicable score
15404 files for a group, *filtering out* those sections that do not
15405 relate to one of the permitted subset of scoring keywords.
15406
15407 @itemize @bullet
15408 @item
15409 Category Specification
15410
15411 @lisp
15412 file
15413 @end lisp
15414
15415 @item
15416 Group Parameter specification
15417
15418 @lisp
15419 (agent-score . file)
15420 @end lisp
15421 @end itemize
15422 @end enumerate
15423
15424 @node Category Buffer
15425 @subsubsection Category Buffer
15426
15427 You'd normally do all category maintenance from the category buffer.
15428 When you enter it for the first time (with the @kbd{J c} command from
15429 the group buffer), you'll only see the @code{default} category.
15430
15431 The following commands are available in this buffer:
15432
15433 @table @kbd
15434 @item q
15435 @kindex q (Category)
15436 @findex gnus-category-exit
15437 Return to the group buffer (@code{gnus-category-exit}).
15438
15439 @item k
15440 @kindex k (Category)
15441 @findex gnus-category-kill
15442 Kill the current category (@code{gnus-category-kill}).
15443
15444 @item c
15445 @kindex c (Category)
15446 @findex gnus-category-copy
15447 Copy the current category (@code{gnus-category-copy}).
15448
15449 @item a
15450 @kindex a (Category)
15451 @findex gnus-category-add
15452 Add a new category (@code{gnus-category-add}).
15453
15454 @item p
15455 @kindex p (Category)
15456 @findex gnus-category-edit-predicate
15457 Edit the predicate of the current category
15458 (@code{gnus-category-edit-predicate}).
15459
15460 @item g
15461 @kindex g (Category)
15462 @findex gnus-category-edit-groups
15463 Edit the list of groups belonging to the current category
15464 (@code{gnus-category-edit-groups}).
15465
15466 @item s
15467 @kindex s (Category)
15468 @findex gnus-category-edit-score
15469 Edit the download score rule of the current category
15470 (@code{gnus-category-edit-score}).
15471
15472 @item l
15473 @kindex l (Category)
15474 @findex gnus-category-list
15475 List all the categories (@code{gnus-category-list}).
15476 @end table
15477
15478
15479 @node Category Variables
15480 @subsubsection Category Variables
15481
15482 @table @code
15483 @item gnus-category-mode-hook
15484 @vindex gnus-category-mode-hook
15485 Hook run in category buffers.
15486
15487 @item gnus-category-line-format
15488 @vindex gnus-category-line-format
15489 Format of the lines in the category buffer (@pxref{Formatting
15490 Variables}).  Valid elements are:
15491
15492 @table @samp
15493 @item c
15494 The name of the category.
15495
15496 @item g
15497 The number of groups in the category.
15498 @end table
15499
15500 @item gnus-category-mode-line-format
15501 @vindex gnus-category-mode-line-format
15502 Format of the category mode line (@pxref{Mode Line Formatting}).
15503
15504 @item gnus-agent-short-article
15505 @vindex gnus-agent-short-article
15506 Articles that have fewer lines than this are short.  Default 100.
15507
15508 @item gnus-agent-long-article
15509 @vindex gnus-agent-long-article
15510 Articles that have more lines than this are long.  Default 200.
15511
15512 @item gnus-agent-low-score
15513 @vindex gnus-agent-low-score
15514 Articles that have a score lower than this have a low score.  Default
15515 0.
15516
15517 @item gnus-agent-high-score
15518 @vindex gnus-agent-high-score
15519 Articles that have a score higher than this have a high score.  Default
15520 0.
15521
15522 @end table
15523
15524
15525 @node Agent Commands
15526 @subsection Agent Commands
15527
15528 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
15529 (@code{gnus-agent-toggle-plugged} command works in all modes, and
15530 toggles the plugged/unplugged state of the Gnus Agent.
15531
15532
15533 @menu
15534 * Group Agent Commands::        
15535 * Summary Agent Commands::      
15536 * Server Agent Commands::       
15537 @end menu
15538
15539 You can run a complete batch fetch from the command line with the
15540 following incantation:
15541
15542 @cindex gnus-agent-batch-fetch
15543 @example
15544 $ emacs -batch -l ~/.gnus.el -f gnus-agent-batch-fetch
15545 @end example
15546
15547
15548
15549 @node Group Agent Commands
15550 @subsubsection Group Agent Commands
15551
15552 @table @kbd
15553 @item J u
15554 @kindex J u (Agent Group)
15555 @findex gnus-agent-fetch-groups
15556 Fetch all eligible articles in the current group
15557 (@code{gnus-agent-fetch-groups}).
15558
15559 @item J c
15560 @kindex J c (Agent Group)
15561 @findex gnus-enter-category-buffer
15562 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
15563
15564 @item J s
15565 @kindex J s (Agent Group)
15566 @findex gnus-agent-fetch-session
15567 Fetch all eligible articles in all groups
15568 (@code{gnus-agent-fetch-session}).
15569
15570 @item J S
15571 @kindex J S (Agent Group)
15572 @findex gnus-group-send-drafts
15573 Send all sendable messages in the draft group
15574 (@code{gnus-group-send-drafts}).  @xref{Drafts}.
15575
15576 @item J a
15577 @kindex J a (Agent Group)
15578 @findex gnus-agent-add-group
15579 Add the current group to an Agent category
15580 (@code{gnus-agent-add-group}).  This command understands the
15581 process/prefix convention (@pxref{Process/Prefix}).
15582
15583 @item J r
15584 @kindex J r (Agent Group)
15585 @findex gnus-agent-remove-group
15586 Remove the current group from its category, if any
15587 (@code{gnus-agent-remove-group}).  This command understands the
15588 process/prefix convention (@pxref{Process/Prefix}).
15589
15590 @item J Y
15591 @kindex J Y (Agent Group)
15592 @findex gnus-agent-synchronize-flags
15593 Synchronize flags changed while unplugged with remote server, if any.
15594
15595
15596 @end table
15597
15598
15599 @node Summary Agent Commands
15600 @subsubsection Summary Agent Commands
15601
15602 @table @kbd
15603 @item J #
15604 @kindex J # (Agent Summary)
15605 @findex gnus-agent-mark-article
15606 Mark the article for downloading (@code{gnus-agent-mark-article}).
15607
15608 @item J M-#
15609 @kindex J M-# (Agent Summary)
15610 @findex gnus-agent-unmark-article
15611 Remove the downloading mark from the article
15612 (@code{gnus-agent-unmark-article}).
15613
15614 @item @@
15615 @kindex @@ (Agent Summary)
15616 @findex gnus-agent-toggle-mark
15617 Toggle whether to download the article (@code{gnus-agent-toggle-mark}).
15618
15619 @item J c
15620 @kindex J c (Agent Summary)
15621 @findex gnus-agent-catchup
15622 Mark all undownloaded articles as read (@code{gnus-agent-catchup}).
15623
15624 @item J u
15625 @kindex J u (Agent Summary)
15626 @findex gnus-agent-summary-fetch-group
15627 Download all downloadable articles in the current group
15628 (@code{gnus-agent-summary-fetch-group}). 
15629
15630 @end table
15631
15632
15633 @node Server Agent Commands
15634 @subsubsection Server Agent Commands
15635
15636 @table @kbd
15637 @item J a
15638 @kindex J a (Agent Server)
15639 @findex gnus-agent-add-server
15640 Add the current server to the list of servers covered by the Gnus Agent
15641 (@code{gnus-agent-add-server}).
15642
15643 @item J r
15644 @kindex J r (Agent Server)
15645 @findex gnus-agent-remove-server
15646 Remove the current server from the list of servers covered by the Gnus
15647 Agent (@code{gnus-agent-remove-server}).
15648
15649 @end table
15650
15651
15652 @node Agent Expiry
15653 @subsection Agent Expiry
15654
15655 @vindex gnus-agent-expire-days
15656 @findex gnus-agent-expire
15657 @kindex M-x gnus-agent-expire
15658 @cindex Agent expiry
15659 @cindex Gnus Agent expiry
15660 @cindex expiry
15661
15662 @code{nnagent} doesn't handle expiry.  Instead, there's a special
15663 @code{gnus-agent-expire} command that will expire all read articles that
15664 are older than @code{gnus-agent-expire-days} days.  It can be run
15665 whenever you feel that you're running out of space.  It's not
15666 particularly fast or efficient, and it's not a particularly good idea to
15667 interrupt it (with @kbd{C-g} or anything else) once you've started it.
15668
15669 @vindex gnus-agent-expire-all
15670 if @code{gnus-agent-expire-all} is non-@code{nil}, this command will
15671 expire all articles---unread, read, ticked and dormant.  If @code{nil}
15672 (which is the default), only read articles are eligible for expiry, and
15673 unread, ticked and dormant articles will be kept indefinitely.
15674
15675
15676 @node Agent and IMAP
15677 @subsection Agent and IMAP
15678
15679 The Agent work with any Gnus backend, including nnimap.  However,
15680 since there are some conceptual differences between @sc{nntp} and
15681 @sc{imap}, this section (should) provide you with some information to
15682 make Gnus Agent work smoother as a @sc{imap} Disconnected Mode client.
15683
15684 The first thing to keep in mind is that all flags (read, ticked, etc)
15685 are kept on the @sc{imap} server, rather than in @code{.newsrc} as is the
15686 case for nntp.  Thus Gnus need to remember flag changes when
15687 disconnected, and synchronize these flags when you plug back in.
15688
15689 Gnus keep track of flag changes when reading nnimap groups under the
15690 Agent by default.  When you plug back in, by default Gnus will check if
15691 you have any changed any flags and ask if you wish to synchronize these
15692 with the server.  This behavior is customizable with
15693 @code{gnus-agent-synchronize-flags}.
15694
15695 @vindex gnus-agent-synchronize-flags
15696 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
15697 never automatically synchronize flags.  If it is @code{ask}, the
15698 default, the Agent will check if you made any changes and if so ask if
15699 you wish to synchronize these when you re-connect.  If it has any other
15700 value, all flags will be synchronized automatically.
15701
15702 If you do not wish to automatically synchronize flags when you
15703 re-connect, this can be done manually with the
15704 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
15705 in the group buffer by default.
15706
15707 Some things are currently not implemented in the Agent that you'd might
15708 expect from a disconnected @sc{imap} client, including:
15709
15710 @itemize @bullet
15711
15712 @item
15713 Copying/moving articles into nnimap groups when unplugged.
15714
15715 @item
15716 Creating/deleting nnimap groups when unplugged.
15717
15718 @end itemize
15719
15720 Technical note: the synchronization algorithm does not work by "pushing"
15721 all local flags to the server, but rather incrementally update the
15722 server view of flags by changing only those flags that were changed by
15723 the user.  Thus, if you set one flag on a article, quit the group and
15724 re-select the group and remove the flag; the flag will be set and
15725 removed from the server when you "synchronize".  The queued flag
15726 operations can be found in the per-server @code{flags} file in the Agent
15727 directory.  It's emptied when you synchronize flags.
15728
15729
15730 @node Outgoing Messages
15731 @subsection Outgoing Messages
15732
15733 When Gnus is unplugged, all outgoing messages (both mail and news) are
15734 stored in the draft groups (@pxref{Drafts}).  You can view them there
15735 after posting, and edit them at will.
15736
15737 When Gnus is plugged again, you can send the messages either from the
15738 draft group with the special commands available there, or you can use
15739 the @kbd{J S} command in the group buffer to send all the sendable
15740 messages in the draft group.
15741
15742
15743
15744 @node Agent Variables
15745 @subsection Agent Variables
15746
15747 @table @code
15748 @item gnus-agent-directory
15749 @vindex gnus-agent-directory
15750 Where the Gnus Agent will store its files.  The default is
15751 @file{~/News/agent/}.
15752
15753 @item gnus-agent-handle-level
15754 @vindex gnus-agent-handle-level
15755 Groups on levels (@pxref{Group Levels}) higher than this variable will
15756 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
15757 which means that only subscribed group will be considered by the Agent
15758 by default.
15759
15760 @item gnus-agent-plugged-hook
15761 @vindex gnus-agent-plugged-hook
15762 Hook run when connecting to the network.
15763
15764 @item gnus-agent-unplugged-hook
15765 @vindex gnus-agent-unplugged-hook
15766 Hook run when disconnecting from the network.
15767
15768 @end table
15769
15770
15771 @node Example Setup
15772 @subsection Example Setup
15773
15774 If you don't want to read this manual, and you have a fairly standard
15775 setup, you may be able to use something like the following as your
15776 @file{.gnus.el} file to get started.
15777
15778 @lisp
15779 ;;; Define how Gnus is to fetch news.  We do this over @sc{nntp}
15780 ;;; from your ISP's server.
15781 (setq gnus-select-method '(nntp "news.your-isp.com"))
15782
15783 ;;; Define how Gnus is to read your mail.  We read mail from
15784 ;;; your ISP's POP server.
15785 (setq mail-sources '((pop :server "pop.your-isp.com")))
15786
15787 ;;; Say how Gnus is to store the mail.  We use nnml groups.
15788 (setq gnus-secondary-select-methods '((nnml "")))
15789
15790 ;;; Make Gnus into an offline newsreader.
15791 (gnus-agentize)
15792 @end lisp
15793
15794 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
15795 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
15796 gnus}.
15797
15798 If this is the first time you've run Gnus, you will be subscribed
15799 automatically to a few default newsgroups.  You'll probably want to
15800 subscribe to more groups, and to do that, you have to query the
15801 @sc{nntp} server for a complete list of groups with the @kbd{A A}
15802 command.  This usually takes quite a while, but you only have to do it
15803 once.
15804
15805 After reading and parsing a while, you'll be presented with a list of
15806 groups.  Subscribe to the ones you want to read with the @kbd{u}
15807 command.  @kbd{l} to make all the killed groups disappear after you've
15808 subscribe to all the groups you want to read.  (@kbd{A k} will bring
15809 back all the killed groups.)
15810
15811 You can now read the groups at once, or you can download the articles
15812 with the @kbd{J s} command.  And then read the rest of this manual to
15813 find out which of the other gazillion things you want to customize.
15814
15815
15816 @node Batching Agents
15817 @subsection Batching Agents
15818
15819 Having the Gnus Agent fetch articles (and post whatever messages you've
15820 written) is quite easy once you've gotten things set up properly.  The
15821 following shell script will do everything that is necessary:
15822
15823 @example
15824 #!/bin/sh
15825 emacs -batch -l ~/.emacs -f gnus-agent-batch >/dev/null
15826 @end example
15827
15828
15829 @node Agent Caveats
15830 @subsection Agent Caveats
15831
15832 The Gnus Agent doesn't seem to work like most other offline
15833 newsreaders.  Here are some common questions that some imaginary people
15834 may ask:
15835
15836 @table @dfn
15837 @item If I read an article while plugged, do they get entered into the
15838 Agent?
15839
15840 @strong{No.}
15841
15842 @item If I read an article while plugged, and the article already exists
15843 in the Agent, will it get downloaded once more?
15844
15845 @strong{Yes.}
15846
15847 @end table
15848
15849 In short, when Gnus is unplugged, it only looks into the locally stored
15850 articles; when it's plugged, it only talks to your ISP.
15851
15852
15853 @node Scoring
15854 @chapter Scoring
15855 @cindex scoring
15856
15857 Other people use @dfn{kill files}, but we here at Gnus Towers like
15858 scoring better than killing, so we'd rather switch than fight.  They do
15859 something completely different as well, so sit up straight and pay
15860 attention!
15861
15862 @vindex gnus-summary-mark-below
15863 All articles have a default score (@code{gnus-summary-default-score}),
15864 which is 0 by default.  This score may be raised or lowered either
15865 interactively or by score files.  Articles that have a score lower than
15866 @code{gnus-summary-mark-below} are marked as read.
15867
15868 Gnus will read any @dfn{score files} that apply to the current group
15869 before generating the summary buffer.
15870
15871 There are several commands in the summary buffer that insert score
15872 entries based on the current article.  You can, for instance, ask Gnus to
15873 lower or increase the score of all articles with a certain subject.
15874
15875 There are two sorts of scoring entries: Permanent and temporary.
15876 Temporary score entries are self-expiring entries.  Any entries that are
15877 temporary and have not been used for, say, a week, will be removed
15878 silently to help keep the sizes of the score files down.
15879
15880 @menu
15881 * Summary Score Commands::      Adding score entries for the current group.
15882 * Group Score Commands::        General score commands.
15883 * Score Variables::             Customize your scoring.  (My, what terminology).
15884 * Score File Format::           What a score file may contain.
15885 * Score File Editing::          You can edit score files by hand as well.
15886 * Adaptive Scoring::            Big Sister Gnus knows what you read.
15887 * Home Score File::             How to say where new score entries are to go.
15888 * Followups To Yourself::       Having Gnus notice when people answer you.
15889 * Scoring On Other Headers::    Scoring on non-standard headers.
15890 * Scoring Tips::                How to score effectively.
15891 * Reverse Scoring::             That problem child of old is not problem.
15892 * Global Score Files::          Earth-spanning, ear-splitting score files.
15893 * Kill Files::                  They are still here, but they can be ignored.
15894 * Converting Kill Files::       Translating kill files to score files.
15895 * GroupLens::                   Getting predictions on what you like to read.
15896 * Advanced Scoring::            Using logical expressions to build score rules.
15897 * Score Decays::                It can be useful to let scores wither away.
15898 @end menu
15899
15900
15901 @node Summary Score Commands
15902 @section Summary Score Commands
15903 @cindex score commands
15904
15905 The score commands that alter score entries do not actually modify real
15906 score files.  That would be too inefficient.  Gnus maintains a cache of
15907 previously loaded score files, one of which is considered the
15908 @dfn{current score file alist}.  The score commands simply insert
15909 entries into this list, and upon group exit, this list is saved.
15910
15911 The current score file is by default the group's local score file, even
15912 if no such score file actually exists.  To insert score commands into
15913 some other score file (e.g. @file{all.SCORE}), you must first make this
15914 score file the current one.
15915
15916 General score commands that don't actually change the score file:
15917
15918 @table @kbd
15919
15920 @item V s
15921 @kindex V s (Summary)
15922 @findex gnus-summary-set-score
15923 Set the score of the current article (@code{gnus-summary-set-score}).
15924
15925 @item V S
15926 @kindex V S (Summary)
15927 @findex gnus-summary-current-score
15928 Display the score of the current article
15929 (@code{gnus-summary-current-score}).
15930
15931 @item V t
15932 @kindex V t (Summary)
15933 @findex gnus-score-find-trace
15934 Display all score rules that have been used on the current article
15935 (@code{gnus-score-find-trace}).
15936
15937 @item V R
15938 @kindex V R (Summary)
15939 @findex gnus-summary-rescore
15940 Run the current summary through the scoring process
15941 (@code{gnus-summary-rescore}).  This might be useful if you're playing
15942 around with your score files behind Gnus' back and want to see the
15943 effect you're having.
15944
15945 @item V c
15946 @kindex V c (Summary)
15947 @findex gnus-score-change-score-file
15948 Make a different score file the current
15949 (@code{gnus-score-change-score-file}).
15950
15951 @item V e
15952 @kindex V e (Summary)
15953 @findex gnus-score-edit-current-scores
15954 Edit the current score file (@code{gnus-score-edit-current-scores}).
15955 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
15956 File Editing}).
15957
15958 @item V f
15959 @kindex V f (Summary)
15960 @findex gnus-score-edit-file
15961 Edit a score file and make this score file the current one
15962 (@code{gnus-score-edit-file}).
15963
15964 @item V F
15965 @kindex V F (Summary)
15966 @findex gnus-score-flush-cache
15967 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
15968 after editing score files.
15969
15970 @item V C
15971 @kindex V C (Summary)
15972 @findex gnus-score-customize
15973 Customize a score file in a visually pleasing manner
15974 (@code{gnus-score-customize}).
15975
15976 @end table
15977
15978 The rest of these commands modify the local score file.
15979
15980 @table @kbd
15981
15982 @item V m
15983 @kindex V m (Summary)
15984 @findex gnus-score-set-mark-below
15985 Prompt for a score, and mark all articles with a score below this as
15986 read (@code{gnus-score-set-mark-below}).
15987
15988 @item V x
15989 @kindex V x (Summary)
15990 @findex gnus-score-set-expunge-below
15991 Prompt for a score, and add a score rule to the current score file to
15992 expunge all articles below this score
15993 (@code{gnus-score-set-expunge-below}).
15994 @end table
15995
15996 The keystrokes for actually making score entries follow a very regular
15997 pattern, so there's no need to list all the commands.  (Hundreds of
15998 them.)
15999
16000 @findex gnus-summary-increase-score
16001 @findex gnus-summary-lower-score
16002
16003 @enumerate
16004 @item
16005 The first key is either @kbd{I} (upper case i) for increasing the score
16006 or @kbd{L} for lowering the score.
16007 @item
16008 The second key says what header you want to score on.  The following
16009 keys are available:
16010 @table @kbd
16011
16012 @item a
16013 Score on the author name.
16014
16015 @item s
16016 Score on the subject line.
16017
16018 @item x
16019 Score on the @code{Xref} line---i.e., the cross-posting line.
16020
16021 @item r
16022 Score on the @code{References} line.
16023
16024 @item d
16025 Score on the date.
16026
16027 @item l
16028 Score on the number of lines.
16029
16030 @item i
16031 Score on the @code{Message-ID} header.
16032
16033 @item f
16034 Score on followups---this matches the author name, and adds scores to
16035 the followups to this author.  (Using this key leads to the creation of
16036 @file{ADAPT} files.)
16037
16038 @item b
16039 Score on the body.
16040
16041 @item h
16042 Score on the head.
16043
16044 @item t
16045 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
16046 files.)
16047
16048 @end table
16049
16050 @item
16051 The third key is the match type.  Which match types are valid depends on
16052 what headers you are scoring on.
16053
16054 @table @code
16055
16056 @item strings
16057
16058 @table @kbd
16059
16060 @item e
16061 Exact matching.
16062
16063 @item s
16064 Substring matching.
16065
16066 @item f
16067 Fuzzy matching (@pxref{Fuzzy Matching}).
16068
16069 @item r
16070 Regexp matching
16071 @end table
16072
16073 @item date
16074 @table @kbd
16075
16076 @item b
16077 Before date.
16078
16079 @item a
16080 After date.
16081
16082 @item n
16083 This date.
16084 @end table
16085
16086 @item number
16087 @table @kbd
16088
16089 @item <
16090 Less than number.
16091
16092 @item =
16093 Equal to number.
16094
16095 @item >
16096 Greater than number.
16097 @end table
16098 @end table
16099
16100 @item
16101 The fourth and final key says whether this is a temporary (i.e., expiring)
16102 score entry, or a permanent (i.e., non-expiring) score entry, or whether
16103 it is to be done immediately, without adding to the score file.
16104 @table @kbd
16105
16106 @item t
16107 Temporary score entry.
16108
16109 @item p
16110 Permanent score entry.
16111
16112 @item i
16113 Immediately scoring.
16114 @end table
16115
16116 @end enumerate
16117
16118 So, let's say you want to increase the score on the current author with
16119 exact matching permanently: @kbd{I a e p}.  If you want to lower the
16120 score based on the subject line, using substring matching, and make a
16121 temporary score entry: @kbd{L s s t}.  Pretty easy.
16122
16123 To make things a bit more complicated, there are shortcuts.  If you use
16124 a capital letter on either the second or third keys, Gnus will use
16125 defaults for the remaining one or two keystrokes.  The defaults are
16126 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
16127 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
16128
16129 These functions take both the numerical prefix and the symbolic prefix
16130 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
16131 (or increase) the score of the article.  A symbolic prefix of @code{a}
16132 says to use the @file{all.SCORE} file for the command instead of the
16133 current score file.
16134
16135 @vindex gnus-score-mimic-keymap
16136 The @code{gnus-score-mimic-keymap} says whether these commands will
16137 pretend they are keymaps or not.
16138
16139
16140 @node Group Score Commands
16141 @section Group Score Commands
16142 @cindex group score commands
16143
16144 There aren't many of these as yet, I'm afraid.
16145
16146 @table @kbd
16147
16148 @item W f
16149 @kindex W f (Group)
16150 @findex gnus-score-flush-cache
16151 Gnus maintains a cache of score alists to avoid having to reload them
16152 all the time.  This command will flush the cache
16153 (@code{gnus-score-flush-cache}).
16154
16155 @end table
16156
16157 You can do scoring from the command line by saying something like:
16158
16159 @findex gnus-batch-score
16160 @cindex batch scoring
16161 @example
16162 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
16163 @end example
16164
16165
16166 @node Score Variables
16167 @section Score Variables
16168 @cindex score variables
16169
16170 @table @code
16171
16172 @item gnus-use-scoring
16173 @vindex gnus-use-scoring
16174 If @code{nil}, Gnus will not check for score files, and will not, in
16175 general, do any score-related work.  This is @code{t} by default.
16176
16177 @item gnus-kill-killed
16178 @vindex gnus-kill-killed
16179 If this variable is @code{nil}, Gnus will never apply score files to
16180 articles that have already been through the kill process.  While this
16181 may save you lots of time, it also means that if you apply a kill file
16182 to a group, and then change the kill file and want to run it over you
16183 group again to kill more articles, it won't work.  You have to set this
16184 variable to @code{t} to do that.  (It is @code{t} by default.)
16185
16186 @item gnus-kill-files-directory
16187 @vindex gnus-kill-files-directory
16188 All kill and score files will be stored in this directory, which is
16189 initialized from the @code{SAVEDIR} environment variable by default.
16190 This is @file{~/News/} by default.
16191
16192 @item gnus-score-file-suffix
16193 @vindex gnus-score-file-suffix
16194 Suffix to add to the group name to arrive at the score file name
16195 (@samp{SCORE} by default.)
16196
16197 @item gnus-score-uncacheable-files
16198 @vindex gnus-score-uncacheable-files
16199 @cindex score cache
16200 All score files are normally cached to avoid excessive re-loading of
16201 score files.  However, if this might make your Emacs grow big and
16202 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
16203 @file{all.SCORE}, while it might be a good idea to not cache
16204 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
16205 variable is @samp{ADAPT$} by default, so no adaptive score files will
16206 be cached.
16207
16208 @item gnus-save-score
16209 @vindex gnus-save-score
16210 If you have really complicated score files, and do lots of batch
16211 scoring, then you might set this variable to @code{t}.  This will make
16212 Gnus save the scores into the @file{.newsrc.eld} file.
16213
16214 If you do not set this to @code{t}, then manual scores (like those set
16215 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
16216 across group visits.
16217
16218 @item gnus-score-interactive-default-score
16219 @vindex gnus-score-interactive-default-score
16220 Score used by all the interactive raise/lower commands to raise/lower
16221 score with.  Default is 1000, which may seem excessive, but this is to
16222 ensure that the adaptive scoring scheme gets enough room to play with.
16223 We don't want the small changes from the adaptive scoring to overwrite
16224 manually entered data.
16225
16226 @item gnus-summary-default-score
16227 @vindex gnus-summary-default-score
16228 Default score of an article, which is 0 by default.
16229
16230 @item gnus-summary-expunge-below
16231 @vindex gnus-summary-expunge-below
16232 Don't display the summary lines of articles that have scores lower than
16233 this variable.  This is @code{nil} by default, which means that no
16234 articles will be hidden.  This variable is local to the summary buffers,
16235 and has to be set from @code{gnus-summary-mode-hook}.
16236
16237 @item gnus-score-over-mark
16238 @vindex gnus-score-over-mark
16239 Mark (in the third column) used for articles with a score over the
16240 default.  Default is @samp{+}.
16241
16242 @item gnus-score-below-mark
16243 @vindex gnus-score-below-mark
16244 Mark (in the third column) used for articles with a score below the
16245 default.  Default is @samp{-}.
16246
16247 @item gnus-score-find-score-files-function
16248 @vindex gnus-score-find-score-files-function
16249 Function used to find score files for the current group.  This function
16250 is called with the name of the group as the argument.
16251
16252 Predefined functions available are:
16253 @table @code
16254
16255 @item gnus-score-find-single
16256 @findex gnus-score-find-single
16257 Only apply the group's own score file.
16258
16259 @item gnus-score-find-bnews
16260 @findex gnus-score-find-bnews
16261 Apply all score files that match, using bnews syntax.  This is the
16262 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
16263 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
16264 @file{gnu.all.SCORE} would all apply.  In short, the instances of
16265 @samp{all} in the score file names are translated into @samp{.*}, and
16266 then a regexp match is done.
16267
16268 This means that if you have some score entries that you want to apply to
16269 all groups, then you put those entries in the @file{all.SCORE} file.
16270
16271 The score files are applied in a semi-random order, although Gnus will
16272 try to apply the more general score files before the more specific score
16273 files.  It does this by looking at the number of elements in the score
16274 file names---discarding the @samp{all} elements.
16275
16276 @item gnus-score-find-hierarchical
16277 @findex gnus-score-find-hierarchical
16278 Apply all score files from all the parent groups.  This means that you
16279 can't have score files like @file{all.SCORE}, but you can have
16280 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
16281 server.
16282
16283 @end table
16284 This variable can also be a list of functions.  In that case, all these
16285 functions will be called with the group name as argument, and all the
16286 returned lists of score files will be applied.  These functions can also
16287 return lists of score alists directly.  In that case, the functions that
16288 return these non-file score alists should probably be placed before the
16289 ``real'' score file functions, to ensure that the last score file
16290 returned is the local score file.  Phu.
16291
16292 For example, to do hierarchical scoring but use a non-server-specific
16293 overall score file, you could use the value
16294 @example
16295 (list (lambda (group) ("all.SCORE"))
16296       'gnus-score-find-hierarchical)
16297 @end example
16298
16299 @item gnus-score-expiry-days
16300 @vindex gnus-score-expiry-days
16301 This variable says how many days should pass before an unused score file
16302 entry is expired.  If this variable is @code{nil}, no score file entries
16303 are expired.  It's 7 by default.
16304
16305 @item gnus-update-score-entry-dates
16306 @vindex gnus-update-score-entry-dates
16307 If this variable is non-@code{nil}, matching score entries will have
16308 their dates updated.  (This is how Gnus controls expiry---all
16309 non-matching entries will become too old while matching entries will
16310 stay fresh and young.)  However, if you set this variable to @code{nil},
16311 even matching entries will grow old and will have to face that oh-so
16312 grim reaper.
16313
16314 @item gnus-score-after-write-file-function
16315 @vindex gnus-score-after-write-file-function
16316 Function called with the name of the score file just written.
16317
16318 @item gnus-score-thread-simplify
16319 @vindex gnus-score-thread-simplify
16320 If this variable is non-@code{nil}, article subjects will be simplified
16321 for subject scoring purposes in the same manner as with
16322 threading---according to the current value of
16323 gnus-simplify-subject-functions.  If the scoring entry uses
16324 @code{substring} or @code{exact} matching, the match will also be
16325 simplified in this manner.
16326
16327 @end table
16328
16329
16330 @node Score File Format
16331 @section Score File Format
16332 @cindex score file format
16333
16334 A score file is an @code{emacs-lisp} file that normally contains just a
16335 single form.  Casual users are not expected to edit these files;
16336 everything can be changed from the summary buffer.
16337
16338 Anyway, if you'd like to dig into it yourself, here's an example:
16339
16340 @lisp
16341 (("from"
16342   ("Lars Ingebrigtsen" -10000)
16343   ("Per Abrahamsen")
16344   ("larsi\\|lmi" -50000 nil R))
16345  ("subject"
16346   ("Ding is Badd" nil 728373))
16347  ("xref"
16348   ("alt.politics" -1000 728372 s))
16349  ("lines"
16350   (2 -100 nil <))
16351  (mark 0)
16352  (expunge -1000)
16353  (mark-and-expunge -10)
16354  (read-only nil)
16355  (orphan -10)
16356  (adapt t)
16357  (files "/hom/larsi/News/gnu.SCORE")
16358  (exclude-files "all.SCORE")
16359  (local (gnus-newsgroup-auto-expire t)
16360         (gnus-summary-make-false-root empty))
16361  (eval (ding)))
16362 @end lisp
16363
16364 This example demonstrates most score file elements.  For a different
16365 approach, see @pxref{Advanced Scoring}.
16366
16367 Even though this looks much like lisp code, nothing here is actually
16368 @code{eval}ed.  The lisp reader is used to read this form, though, so it
16369 has to be valid syntactically, if not semantically.
16370
16371 Six keys are supported by this alist:
16372
16373 @table @code
16374
16375 @item STRING
16376 If the key is a string, it is the name of the header to perform the
16377 match on.  Scoring can only be performed on these eight headers:
16378 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
16379 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
16380 these headers, there are three strings to tell Gnus to fetch the entire
16381 article and do the match on larger parts of the article: @code{Body}
16382 will perform the match on the body of the article, @code{Head} will
16383 perform the match on the head of the article, and @code{All} will
16384 perform the match on the entire article.  Note that using any of these
16385 last three keys will slow down group entry @emph{considerably}.  The
16386 final ``header'' you can score on is @code{Followup}.  These score
16387 entries will result in new score entries being added for all follow-ups
16388 to articles that matches these score entries.
16389
16390 Following this key is a arbitrary number of score entries, where each
16391 score entry has one to four elements.
16392 @enumerate
16393
16394 @item
16395 The first element is the @dfn{match element}.  On most headers this will
16396 be a string, but on the Lines and Chars headers, this must be an
16397 integer.
16398
16399 @item
16400 If the second element is present, it should be a number---the @dfn{score
16401 element}.  This number should be an integer in the neginf to posinf
16402 interval.  This number is added to the score of the article if the match
16403 is successful.  If this element is not present, the
16404 @code{gnus-score-interactive-default-score} number will be used
16405 instead.  This is 1000 by default.
16406
16407 @item
16408 If the third element is present, it should be a number---the @dfn{date
16409 element}.  This date says when the last time this score entry matched,
16410 which provides a mechanism for expiring the score entries.  It this
16411 element is not present, the score entry is permanent.  The date is
16412 represented by the number of days since December 31, 1 BCE.
16413
16414 @item
16415 If the fourth element is present, it should be a symbol---the @dfn{type
16416 element}.  This element specifies what function should be used to see
16417 whether this score entry matches the article.  What match types that can
16418 be used depends on what header you wish to perform the match on.
16419 @table @dfn
16420
16421 @item From, Subject, References, Xref, Message-ID
16422 For most header types, there are the @code{r} and @code{R} (regexp), as
16423 well as @code{s} and @code{S} (substring) types, and @code{e} and
16424 @code{E} (exact match), and @code{w} (word match) types.  If this
16425 element is not present, Gnus will assume that substring matching should
16426 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
16427 that the matches will be done in a case-sensitive manner.  All these
16428 one-letter types are really just abbreviations for the @code{regexp},
16429 @code{string}, @code{exact}, and @code{word} types, which you can use
16430 instead, if you feel like.
16431
16432 @item Lines, Chars
16433 These two headers use different match types: @code{<}, @code{>},
16434 @code{=}, @code{>=} and @code{<=}.
16435
16436 These predicates are true if
16437
16438 @example
16439 (PREDICATE HEADER MATCH)
16440 @end example
16441
16442 evaluates to non-@code{nil}.  For instance, the advanced match
16443 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
16444 following form:
16445
16446 @lisp
16447 (< header-value 4)
16448 @end lisp
16449
16450 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
16451 the match, we get the score added if the article has less than 4 lines.
16452 (It's easy to get confused and think it's the other way around.  But
16453 it's not.  I think.)
16454
16455 When matching on @code{Lines}, be careful because some backends (like
16456 @code{nndir}) do not generate @code{Lines} header, so every article ends
16457 up being marked as having 0 lines.  This can lead to strange results if
16458 you happen to lower score of the articles with few lines.
16459
16460 @item Date
16461 For the Date header we have three kinda silly match types:
16462 @code{before}, @code{at} and @code{after}.  I can't really imagine this
16463 ever being useful, but, like, it would feel kinda silly not to provide
16464 this function.  Just in case.  You never know.  Better safe than sorry.
16465 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
16466 sex on a first date.  (I have been told that at least one person, and I
16467 quote, ``found this function indispensable'', however.)
16468
16469 @cindex ISO8601
16470 @cindex date
16471 A more useful match type is @code{regexp}.  With it, you can match the
16472 date string using a regular expression.  The date is normalized to
16473 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
16474 you want to match all articles that have been posted on April 1st in
16475 every year, you could use @samp{....0401.........} as a match string,
16476 for instance.  (Note that the date is kept in its original time zone, so
16477 this will match articles that were posted when it was April 1st where
16478 the article was posted from.  Time zones are such wholesome fun for the
16479 whole family, eh?)
16480
16481 @item Head, Body, All
16482 These three match keys use the same match types as the @code{From} (etc)
16483 header uses.
16484
16485 @item Followup
16486 This match key is somewhat special, in that it will match the
16487 @code{From} header, and affect the score of not only the matching
16488 articles, but also all followups to the matching articles.  This allows
16489 you e.g. increase the score of followups to your own articles, or
16490 decrease the score of followups to the articles of some known
16491 trouble-maker.  Uses the same match types as the @code{From} header
16492 uses.  (Using this match key will lead to creation of @file{ADAPT}
16493 files.)
16494
16495 @item Thread
16496 This match key works along the same lines as the @code{Followup} match
16497 key.  If you say that you want to score on a (sub-)thread started by an
16498 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
16499 match.  This will add a new @samp{thread} match for each article that
16500 has @var{x} in its @code{References} header.  (These new @samp{thread}
16501 matches will use the @code{Message-ID}s of these matching articles.)
16502 This will ensure that you can raise/lower the score of an entire thread,
16503 even though some articles in the thread may not have complete
16504 @code{References} headers.  Note that using this may lead to
16505 undeterministic scores of the articles in the thread.  (Using this match
16506 key will lead to creation of @file{ADAPT} files.)
16507 @end table
16508 @end enumerate
16509
16510 @cindex Score File Atoms
16511 @item mark
16512 The value of this entry should be a number.  Any articles with a score
16513 lower than this number will be marked as read.
16514
16515 @item expunge
16516 The value of this entry should be a number.  Any articles with a score
16517 lower than this number will be removed from the summary buffer.
16518
16519 @item mark-and-expunge
16520 The value of this entry should be a number.  Any articles with a score
16521 lower than this number will be marked as read and removed from the
16522 summary buffer.
16523
16524 @item thread-mark-and-expunge
16525 The value of this entry should be a number.  All articles that belong to
16526 a thread that has a total score below this number will be marked as read
16527 and removed from the summary buffer.  @code{gnus-thread-score-function}
16528 says how to compute the total score for a thread.
16529
16530 @item files
16531 The value of this entry should be any number of file names.  These files
16532 are assumed to be score files as well, and will be loaded the same way
16533 this one was.
16534
16535 @item exclude-files
16536 The clue of this entry should be any number of files.  These files will
16537 not be loaded, even though they would normally be so, for some reason or
16538 other.
16539
16540 @item eval
16541 The value of this entry will be @code{eval}el.  This element will be
16542 ignored when handling global score files.
16543
16544 @item read-only
16545 Read-only score files will not be updated or saved.  Global score files
16546 should feature this atom (@pxref{Global Score Files}).  (Note:
16547 @dfn{Global} here really means @dfn{global}; not your personal
16548 apply-to-all-groups score files.)
16549
16550 @item orphan
16551 The value of this entry should be a number.  Articles that do not have
16552 parents will get this number added to their scores.  Imagine you follow
16553 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
16554 will only follow a few of the threads, also want to see any new threads.
16555
16556 You can do this with the following two score file entries:
16557
16558 @example
16559         (orphan -500)
16560         (mark-and-expunge -100)
16561 @end example
16562
16563 When you enter the group the first time, you will only see the new
16564 threads.  You then raise the score of the threads that you find
16565 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
16566 rest.  Next time you enter the group, you will see new articles in the
16567 interesting threads, plus any new threads.
16568
16569 I.e.---the orphan score atom is for high-volume groups where a few
16570 interesting threads which can't be found automatically by ordinary
16571 scoring rules exist.
16572
16573 @item adapt
16574 This entry controls the adaptive scoring.  If it is @code{t}, the
16575 default adaptive scoring rules will be used.  If it is @code{ignore}, no
16576 adaptive scoring will be performed on this group.  If it is a list, this
16577 list will be used as the adaptive scoring rules.  If it isn't present,
16578 or is something other than @code{t} or @code{ignore}, the default
16579 adaptive scoring rules will be used.  If you want to use adaptive
16580 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
16581 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
16582 not want adaptive scoring.  If you only want adaptive scoring in a few
16583 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
16584 insert @code{(adapt t)} in the score files of the groups where you want
16585 it.
16586
16587 @item adapt-file
16588 All adaptive score entries will go to the file named by this entry.  It
16589 will also be applied when entering the group.  This atom might be handy
16590 if you want to adapt on several groups at once, using the same adaptive
16591 file for a number of groups.
16592
16593 @item local
16594 @cindex local variables
16595 The value of this entry should be a list of @code{(VAR VALUE)} pairs.
16596 Each @var{var} will be made buffer-local to the current summary buffer,
16597 and set to the value specified.  This is a convenient, if somewhat
16598 strange, way of setting variables in some groups if you don't like hooks
16599 much.  Note that the @var{value} won't be evaluated.
16600 @end table
16601
16602
16603 @node Score File Editing
16604 @section Score File Editing
16605
16606 You normally enter all scoring commands from the summary buffer, but you
16607 might feel the urge to edit them by hand as well, so we've supplied you
16608 with a mode for that.
16609
16610 It's simply a slightly customized @code{emacs-lisp} mode, with these
16611 additional commands:
16612
16613 @table @kbd
16614
16615 @item C-c C-c
16616 @kindex C-c C-c (Score)
16617 @findex gnus-score-edit-done
16618 Save the changes you have made and return to the summary buffer
16619 (@code{gnus-score-edit-done}).
16620
16621 @item C-c C-d
16622 @kindex C-c C-d (Score)
16623 @findex gnus-score-edit-insert-date
16624 Insert the current date in numerical format
16625 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
16626 you were wondering.
16627
16628 @item C-c C-p
16629 @kindex C-c C-p (Score)
16630 @findex gnus-score-pretty-print
16631 The adaptive score files are saved in an unformatted fashion.  If you
16632 intend to read one of these files, you want to @dfn{pretty print} it
16633 first.  This command (@code{gnus-score-pretty-print}) does that for
16634 you.
16635
16636 @end table
16637
16638 Type @kbd{M-x gnus-score-mode} to use this mode.
16639
16640 @vindex gnus-score-mode-hook
16641 @code{gnus-score-menu-hook} is run in score mode buffers.
16642
16643 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
16644 e} to begin editing score files.
16645
16646
16647 @node Adaptive Scoring
16648 @section Adaptive Scoring
16649 @cindex adaptive scoring
16650
16651 If all this scoring is getting you down, Gnus has a way of making it all
16652 happen automatically---as if by magic.  Or rather, as if by artificial
16653 stupidity, to be precise.
16654
16655 @vindex gnus-use-adaptive-scoring
16656 When you read an article, or mark an article as read, or kill an
16657 article, you leave marks behind.  On exit from the group, Gnus can sniff
16658 these marks and add score elements depending on what marks it finds.
16659 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
16660 @code{t} or @code{(line)}.  If you want score adaptively on separate
16661 words appearing in the subjects, you should set this variable to
16662 @code{(word)}.  If you want to use both adaptive methods, set this
16663 variable to @code{(word line)}.
16664
16665 @vindex gnus-default-adaptive-score-alist
16666 To give you complete control over the scoring process, you can customize
16667 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
16668 might look something like this:
16669
16670 @lisp
16671 (setq gnus-default-adaptive-score-alist
16672   '((gnus-unread-mark)
16673     (gnus-ticked-mark (from 4))
16674     (gnus-dormant-mark (from 5))
16675     (gnus-del-mark (from -4) (subject -1))
16676     (gnus-read-mark (from 4) (subject 2))
16677     (gnus-expirable-mark (from -1) (subject -1))
16678     (gnus-killed-mark (from -1) (subject -3))
16679     (gnus-kill-file-mark)
16680     (gnus-ancient-mark)
16681     (gnus-low-score-mark)
16682     (gnus-catchup-mark (from -1) (subject -1))))
16683 @end lisp
16684
16685 As you see, each element in this alist has a mark as a key (either a
16686 variable name or a ``real'' mark---a character).  Following this key is
16687 a arbitrary number of header/score pairs.  If there are no header/score
16688 pairs following the key, no adaptive scoring will be done on articles
16689 that have that key as the article mark.  For instance, articles with
16690 @code{gnus-unread-mark} in the example above will not get adaptive score
16691 entries.
16692
16693 Each article can have only one mark, so just a single of these rules
16694 will be applied to each article.
16695
16696 To take @code{gnus-del-mark} as an example---this alist says that all
16697 articles that have that mark (i.e., are marked with @samp{D}) will have a
16698 score entry added to lower based on the @code{From} header by -4, and
16699 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
16700
16701 If you have marked 10 articles with the same subject with
16702 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
16703 That means that that subject will get a score of ten times -1, which
16704 should be, unless I'm much mistaken, -10.
16705
16706 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
16707 the read articles will be marked with the @samp{E} mark.  This'll
16708 probably make adaptive scoring slightly impossible, so auto-expiring and
16709 adaptive scoring doesn't really mix very well.
16710
16711 The headers you can score on are @code{from}, @code{subject},
16712 @code{message-id}, @code{references}, @code{xref}, @code{lines},
16713 @code{chars} and @code{date}.  In addition, you can score on
16714 @code{followup}, which will create an adaptive score entry that matches
16715 on the @code{References} header using the @code{Message-ID} of the
16716 current article, thereby matching the following thread.
16717
16718 You can also score on @code{thread}, which will try to score all
16719 articles that appear in a thread.  @code{thread} matches uses a
16720 @code{Message-ID} to match on the @code{References} header of the
16721 article.  If the match is made, the @code{Message-ID} of the article is
16722 added to the @code{thread} rule.  (Think about it.  I'd recommend two
16723 aspirins afterwards.)
16724
16725 If you use this scheme, you should set the score file atom @code{mark}
16726 to something small---like -300, perhaps, to avoid having small random
16727 changes result in articles getting marked as read.
16728
16729 After using adaptive scoring for a week or so, Gnus should start to
16730 become properly trained and enhance the authors you like best, and kill
16731 the authors you like least, without you having to say so explicitly.
16732
16733 You can control what groups the adaptive scoring is to be performed on
16734 by using the score files (@pxref{Score File Format}).  This will also
16735 let you use different rules in different groups.
16736
16737 @vindex gnus-adaptive-file-suffix
16738 The adaptive score entries will be put into a file where the name is the
16739 group name with @code{gnus-adaptive-file-suffix} appended.  The default
16740 is @samp{ADAPT}.
16741
16742 @vindex gnus-score-exact-adapt-limit
16743 When doing adaptive scoring, substring or fuzzy matching would probably
16744 give you the best results in most cases.  However, if the header one
16745 matches is short, the possibility for false positives is great, so if
16746 the length of the match is less than
16747 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
16748 this variable is @code{nil}, exact matching will always be used to avoid
16749 this problem.
16750
16751 @vindex gnus-default-adaptive-word-score-alist
16752 As mentioned above, you can adapt either on individual words or entire
16753 headers.  If you adapt on words, the
16754 @code{gnus-default-adaptive-word-score-alist} variable says what score
16755 each instance of a word should add given a mark.
16756
16757 @lisp
16758 (setq gnus-default-adaptive-word-score-alist
16759       `((,gnus-read-mark . 30)
16760         (,gnus-catchup-mark . -10)
16761         (,gnus-killed-mark . -20)
16762         (,gnus-del-mark . -15)))
16763 @end lisp
16764
16765 This is the default value.  If you have adaption on words enabled, every
16766 word that appears in subjects of articles marked with
16767 @code{gnus-read-mark} will result in a score rule that increase the
16768 score with 30 points.
16769
16770 @vindex gnus-default-ignored-adaptive-words
16771 @vindex gnus-ignored-adaptive-words
16772 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
16773 will be ignored.  If you wish to add more words to be ignored, use the
16774 @code{gnus-ignored-adaptive-words} list instead.
16775
16776 @vindex gnus-adaptive-word-length-limit
16777 Some may feel that short words shouldn't count when doing adaptive
16778 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
16779 an integer.  Words shorter than this number will be ignored.  This
16780 variable defaults til @code{nil}.
16781
16782 @vindex gnus-adaptive-word-syntax-table
16783 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
16784 syntax table in effect.  It is similar to the standard syntax table, but
16785 it considers numbers to be non-word-constituent characters.
16786
16787 @vindex gnus-adaptive-word-minimum
16788 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
16789 word scoring process will never bring down the score of an article to
16790 below this number.  The default is @code{nil}.
16791
16792 @vindex gnus-adaptive-word-no-group-words
16793 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
16794 won't adaptively word score any of the words in the group name.  Useful
16795 for groups like @samp{comp.editors.emacs}, where most of the subject
16796 lines contain the word @samp{emacs}.
16797
16798 After using this scheme for a while, it might be nice to write a
16799 @code{gnus-psychoanalyze-user} command to go through the rules and see
16800 what words you like and what words you don't like.  Or perhaps not.
16801
16802 Note that the adaptive word scoring thing is highly experimental and is
16803 likely to change in the future.  Initial impressions seem to indicate
16804 that it's totally useless as it stands.  Some more work (involving more
16805 rigorous statistical methods) will have to be done to make this useful.
16806
16807
16808 @node Home Score File
16809 @section Home Score File
16810
16811 The score file where new score file entries will go is called the
16812 @dfn{home score file}.  This is normally (and by default) the score file
16813 for the group itself.  For instance, the home score file for
16814 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
16815
16816 However, this may not be what you want.  It is often convenient to share
16817 a common home score file among many groups---all @samp{emacs} groups
16818 could perhaps use the same home score file.
16819
16820 @vindex gnus-home-score-file
16821 The variable that controls this is @code{gnus-home-score-file}.  It can
16822 be:
16823
16824 @enumerate
16825 @item
16826 A string.  Then this file will be used as the home score file for all
16827 groups.
16828
16829 @item
16830 A function.  The result of this function will be used as the home score
16831 file.  The function will be called with the name of the group as the
16832 parameter.
16833
16834 @item
16835 A list.  The elements in this list can be:
16836
16837 @enumerate
16838 @item
16839 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
16840 group name, the @var{file-name} will be used as the home score file.
16841
16842 @item
16843 A function.  If the function returns non-nil, the result will be used as
16844 the home score file.
16845
16846 @item
16847 A string.  Use the string as the home score file.
16848 @end enumerate
16849
16850 The list will be traversed from the beginning towards the end looking
16851 for matches.
16852
16853 @end enumerate
16854
16855 So, if you want to use just a single score file, you could say:
16856
16857 @lisp
16858 (setq gnus-home-score-file
16859       "my-total-score-file.SCORE")
16860 @end lisp
16861
16862 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
16863 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
16864
16865 @findex gnus-hierarchial-home-score-file
16866 @lisp
16867 (setq gnus-home-score-file
16868       'gnus-hierarchial-home-score-file)
16869 @end lisp
16870
16871 This is a ready-made function provided for your convenience.
16872 Other functions include
16873
16874 @table @code
16875 @item gnus-current-home-score-file
16876 @findex gnus-current-home-score-file
16877 Return the ``current'' regular score file.  This will make scoring
16878 commands add entry to the ``innermost'' matching score file.
16879
16880 @end table
16881
16882 If you want to have one score file for the @samp{emacs} groups and
16883 another for the @samp{comp} groups, while letting all other groups use
16884 their own home score files:
16885
16886 @lisp
16887 (setq gnus-home-score-file
16888       ;; All groups that match the regexp "\\.emacs"
16889       '(("\\.emacs" "emacs.SCORE")
16890         ;; All the comp groups in one score file
16891         ("^comp" "comp.SCORE")))
16892 @end lisp
16893
16894 @vindex gnus-home-adapt-file
16895 @code{gnus-home-adapt-file} works exactly the same way as
16896 @code{gnus-home-score-file}, but says what the home adaptive score file
16897 is instead.  All new adaptive file entries will go into the file
16898 specified by this variable, and the same syntax is allowed.
16899
16900 In addition to using @code{gnus-home-score-file} and
16901 @code{gnus-home-adapt-file}, you can also use group parameters
16902 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
16903 Parameters}) to achieve much the same.  Group and topic parameters take
16904 precedence over this variable.
16905
16906
16907 @node Followups To Yourself
16908 @section Followups To Yourself
16909
16910 Gnus offers two commands for picking out the @code{Message-ID} header in
16911 the current buffer.  Gnus will then add a score rule that scores using
16912 this @code{Message-ID} on the @code{References} header of other
16913 articles.  This will, in effect, increase the score of all articles that
16914 respond to the article in the current buffer.  Quite useful if you want
16915 to easily note when people answer what you've said.
16916
16917 @table @code
16918
16919 @item gnus-score-followup-article
16920 @findex gnus-score-followup-article
16921 This will add a score to articles that directly follow up your own
16922 article.
16923
16924 @item gnus-score-followup-thread
16925 @findex gnus-score-followup-thread
16926 This will add a score to all articles that appear in a thread ``below''
16927 your own article.
16928 @end table
16929
16930 @vindex message-sent-hook
16931 These two functions are both primarily meant to be used in hooks like
16932 @code{message-sent-hook}, like this:
16933 @lisp
16934 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
16935 @end lisp
16936
16937
16938 If you look closely at your own @code{Message-ID}, you'll notice that
16939 the first two or three characters are always the same.  Here's two of
16940 mine:
16941
16942 @example
16943 <x6u3u47icf.fsf@@eyesore.no>
16944 <x6sp9o7ibw.fsf@@eyesore.no>
16945 @end example
16946
16947 So ``my'' ident on this machine is @samp{x6}.  This can be
16948 exploited---the following rule will raise the score on all followups to
16949 myself:
16950
16951 @lisp
16952 ("references"
16953  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
16954   1000 nil r))
16955 @end lisp
16956
16957 Whether it's the first two or first three characters that are ``yours''
16958 is system-dependent.
16959
16960
16961 @node Scoring On Other Headers
16962 @section Scoring On Other Headers
16963 @cindex scoring on other headers
16964
16965 Gnus is quite fast when scoring the ``traditional''
16966 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
16967 other headers requires writing a @code{head} scoring rule, which means
16968 that Gnus has to request every single article from the backend to find
16969 matches.  This takes a long time in big groups.
16970
16971 Now, there's not much you can do about this for news groups, but for
16972 mail groups, you have greater control.  In the @pxref{To From
16973 Newsgroups} section of the manual, it's explained in greater detail what
16974 this mechanism does, but here's a cookbook example for @code{nnml} on
16975 how to allow scoring on the @samp{To} and @samp{Cc} headers.
16976
16977 Put the following in your @file{.gnus.el} file. 
16978
16979 @lisp
16980 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
16981       nnmail-extra-headers gnus-extra-headers)
16982 @end lisp
16983
16984 Restart Gnus and rebuild your @code{nnml} overview files with the
16985 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
16986 time if you have much mail.
16987
16988 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
16989 so: @kbd{I e s p To RET <your name> RET}.
16990
16991 See?  Simple.
16992
16993
16994 @node Scoring Tips
16995 @section Scoring Tips
16996 @cindex scoring tips
16997
16998 @table @dfn
16999
17000 @item Crossposts
17001 @cindex crossposts
17002 @cindex scoring crossposts
17003 If you want to lower the score of crossposts, the line to match on is
17004 the @code{Xref} header.
17005 @lisp
17006 ("xref" (" talk.politics.misc:" -1000))
17007 @end lisp
17008
17009 @item Multiple crossposts
17010 If you want to lower the score of articles that have been crossposted to
17011 more than, say, 3 groups:
17012 @lisp
17013 ("xref"
17014   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
17015    -1000 nil r))
17016 @end lisp
17017
17018 @item Matching on the body
17019 This is generally not a very good idea---it takes a very long time.
17020 Gnus actually has to fetch each individual article from the server.  But
17021 you might want to anyway, I guess.  Even though there are three match
17022 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
17023 and stick with it in each score file.  If you use any two, each article
17024 will be fetched @emph{twice}.  If you want to match a bit on the
17025 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
17026 the matches.
17027
17028 @item Marking as read
17029 You will probably want to mark articles that have scores below a certain
17030 number as read.  This is most easily achieved by putting the following
17031 in your @file{all.SCORE} file:
17032 @lisp
17033 ((mark -100))
17034 @end lisp
17035 You may also consider doing something similar with @code{expunge}.
17036
17037 @item Negated character classes
17038 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
17039 That will match newlines, which might lead to, well, The Unknown.  Say
17040 @code{[^abcd\n]*} instead.
17041 @end table
17042
17043
17044 @node Reverse Scoring
17045 @section Reverse Scoring
17046 @cindex reverse scoring
17047
17048 If you want to keep just articles that have @samp{Sex with Emacs} in the
17049 subject header, and expunge all other articles, you could put something
17050 like this in your score file:
17051
17052 @lisp
17053 (("subject"
17054   ("Sex with Emacs" 2))
17055  (mark 1)
17056  (expunge 1))
17057 @end lisp
17058
17059 So, you raise all articles that match @samp{Sex with Emacs} and mark the
17060 rest as read, and expunge them to boot.
17061
17062
17063 @node Global Score Files
17064 @section Global Score Files
17065 @cindex global score files
17066
17067 Sure, other newsreaders have ``global kill files''.  These are usually
17068 nothing more than a single kill file that applies to all groups, stored
17069 in the user's home directory.  Bah!  Puny, weak newsreaders!
17070
17071 What I'm talking about here are Global Score Files.  Score files from
17072 all over the world, from users everywhere, uniting all nations in one
17073 big, happy score file union!  Ange-score!  New and untested!
17074
17075 @vindex gnus-global-score-files
17076 All you have to do to use other people's score files is to set the
17077 @code{gnus-global-score-files} variable.  One entry for each score file,
17078 or each score file directory.  Gnus will decide by itself what score
17079 files are applicable to which group.
17080
17081 To use the score file
17082 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
17083 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
17084 say this:
17085
17086 @lisp
17087 (setq gnus-global-score-files
17088       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
17089         "/ftp@@ftp.some-where:/pub/score/"))
17090 @end lisp
17091
17092 @findex gnus-score-search-global-directories
17093 @noindent
17094 Simple, eh?  Directory names must end with a @samp{/}.  These
17095 directories are typically scanned only once during each Gnus session.
17096 If you feel the need to manually re-scan the remote directories, you can
17097 use the @code{gnus-score-search-global-directories} command.
17098
17099 Note that, at present, using this option will slow down group entry
17100 somewhat.  (That is---a lot.)
17101
17102 If you want to start maintaining score files for other people to use,
17103 just put your score file up for anonymous ftp and announce it to the
17104 world.  Become a retro-moderator!  Participate in the retro-moderator
17105 wars sure to ensue, where retro-moderators battle it out for the
17106 sympathy of the people, luring them to use their score files on false
17107 premises!  Yay!  The net is saved!
17108
17109 Here are some tips for the would-be retro-moderator, off the top of my
17110 head:
17111
17112 @itemize @bullet
17113
17114 @item
17115 Articles heavily crossposted are probably junk.
17116 @item
17117 To lower a single inappropriate article, lower by @code{Message-ID}.
17118 @item
17119 Particularly brilliant authors can be raised on a permanent basis.
17120 @item
17121 Authors that repeatedly post off-charter for the group can safely be
17122 lowered out of existence.
17123 @item
17124 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
17125 articles completely.
17126
17127 @item
17128 Use expiring score entries to keep the size of the file down.  You
17129 should probably have a long expiry period, though, as some sites keep
17130 old articles for a long time.
17131 @end itemize
17132
17133 ... I wonder whether other newsreaders will support global score files
17134 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
17135 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
17136 holding our breath yet?
17137
17138
17139 @node Kill Files
17140 @section Kill Files
17141 @cindex kill files
17142
17143 Gnus still supports those pesky old kill files.  In fact, the kill file
17144 entries can now be expiring, which is something I wrote before Daniel
17145 Quinlan thought of doing score files, so I've left the code in there.
17146
17147 In short, kill processing is a lot slower (and I do mean @emph{a lot})
17148 than score processing, so it might be a good idea to rewrite your kill
17149 files into score files.
17150
17151 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
17152 forms into this file, which means that you can use kill files as some
17153 sort of primitive hook function to be run on group entry, even though
17154 that isn't a very good idea.
17155
17156 Normal kill files look like this:
17157
17158 @lisp
17159 (gnus-kill "From" "Lars Ingebrigtsen")
17160 (gnus-kill "Subject" "ding")
17161 (gnus-expunge "X")
17162 @end lisp
17163
17164 This will mark every article written by me as read, and remove the
17165 marked articles from the summary buffer.  Very useful, you'll agree.
17166
17167 Other programs use a totally different kill file syntax.  If Gnus
17168 encounters what looks like a @code{rn} kill file, it will take a stab at
17169 interpreting it.
17170
17171 Two summary functions for editing a GNUS kill file:
17172
17173 @table @kbd
17174
17175 @item M-k
17176 @kindex M-k (Summary)
17177 @findex gnus-summary-edit-local-kill
17178 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
17179
17180 @item M-K
17181 @kindex M-K (Summary)
17182 @findex gnus-summary-edit-global-kill
17183 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
17184 @end table
17185
17186 Two group mode functions for editing the kill files:
17187
17188 @table @kbd
17189
17190 @item M-k
17191 @kindex M-k (Group)
17192 @findex gnus-group-edit-local-kill
17193 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
17194
17195 @item M-K
17196 @kindex M-K (Group)
17197 @findex gnus-group-edit-global-kill
17198 Edit the general kill file (@code{gnus-group-edit-global-kill}).
17199 @end table
17200
17201 Kill file variables:
17202
17203 @table @code
17204 @item gnus-kill-file-name
17205 @vindex gnus-kill-file-name
17206 A kill file for the group @samp{soc.motss} is normally called
17207 @file{soc.motss.KILL}.  The suffix appended to the group name to get
17208 this file name is detailed by the @code{gnus-kill-file-name} variable.
17209 The ``global'' kill file (not in the score file sense of ``global'', of
17210 course) is just called @file{KILL}.
17211
17212 @vindex gnus-kill-save-kill-file
17213 @item gnus-kill-save-kill-file
17214 If this variable is non-@code{nil}, Gnus will save the
17215 kill file after processing, which is necessary if you use expiring
17216 kills.
17217
17218 @item gnus-apply-kill-hook
17219 @vindex gnus-apply-kill-hook
17220 @findex gnus-apply-kill-file-unless-scored
17221 @findex gnus-apply-kill-file
17222 A hook called to apply kill files to a group.  It is
17223 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
17224 kill file if you have a score file for the same group, you can set this
17225 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
17226 kill files to be processed, you should set this variable to @code{nil}.
17227
17228 @item gnus-kill-file-mode-hook
17229 @vindex gnus-kill-file-mode-hook
17230 A hook called in kill-file mode buffers.
17231
17232 @end table
17233
17234
17235 @node Converting Kill Files
17236 @section Converting Kill Files
17237 @cindex kill files
17238 @cindex converting kill files
17239
17240 If you have loads of old kill files, you may want to convert them into
17241 score files.  If they are ``regular'', you can use
17242 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
17243 by hand.
17244
17245 The kill to score conversion package isn't included in Gnus by default.
17246 You can fetch it from
17247 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
17248
17249 If your old kill files are very complex---if they contain more
17250 non-@code{gnus-kill} forms than not, you'll have to convert them by
17251 hand.  Or just let them be as they are.  Gnus will still use them as
17252 before.
17253
17254
17255 @node GroupLens
17256 @section GroupLens
17257 @cindex GroupLens
17258
17259 GroupLens is a collaborative filtering system that helps you work
17260 together with other people to find the quality news articles out of the
17261 huge volume of news articles generated every day.
17262
17263 To accomplish this the GroupLens system combines your opinions about
17264 articles you have already read with the opinions of others who have done
17265 likewise and gives you a personalized prediction for each unread news
17266 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
17267 rate articles, and finds other people that rate articles the same way.
17268 Once it has found some people you agree with it tells you, in the form
17269 of a prediction, what they thought of the article.  You can use this
17270 prediction to help you decide whether or not you want to read the
17271 article.
17272
17273 @menu
17274 * Using GroupLens::             How to make Gnus use GroupLens.
17275 * Rating Articles::             Letting GroupLens know how you rate articles.
17276 * Displaying Predictions::      Displaying predictions given by GroupLens.
17277 * GroupLens Variables::         Customizing GroupLens.
17278 @end menu
17279
17280
17281 @node Using GroupLens
17282 @subsection Using GroupLens
17283
17284 To use GroupLens you must register a pseudonym with your local Better
17285 Bit Bureau (BBB).
17286 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html} is the only
17287 better bit in town at the moment.
17288
17289 Once you have registered you'll need to set a couple of variables.
17290
17291 @table @code
17292
17293 @item gnus-use-grouplens
17294 @vindex gnus-use-grouplens
17295 Setting this variable to a non-@code{nil} value will make Gnus hook into
17296 all the relevant GroupLens functions.
17297
17298 @item grouplens-pseudonym
17299 @vindex grouplens-pseudonym
17300 This variable should be set to the pseudonym you got when registering
17301 with the Better Bit Bureau.
17302
17303 @item grouplens-newsgroups
17304 @vindex grouplens-newsgroups
17305 A list of groups that you want to get GroupLens predictions for.
17306
17307 @end table
17308
17309 That's the minimum of what you need to get up and running with GroupLens.
17310 Once you've registered, GroupLens will start giving you scores for
17311 articles based on the average of what other people think.  But, to get
17312 the real benefit of GroupLens you need to start rating articles
17313 yourself.  Then the scores GroupLens gives you will be personalized for
17314 you, based on how the people you usually agree with have already rated.
17315
17316
17317 @node Rating Articles
17318 @subsection Rating Articles
17319
17320 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
17321 Where 1 means something like this article is a waste of bandwidth and 5
17322 means that the article was really good.  The basic question to ask
17323 yourself is, "on a scale from 1 to 5 would I like to see more articles
17324 like this one?"
17325
17326 There are four ways to enter a rating for an article in GroupLens.
17327
17328 @table @kbd
17329
17330 @item r
17331 @kindex r (GroupLens)
17332 @findex bbb-summary-rate-article
17333 This function will prompt you for a rating on a scale of one to five.
17334
17335 @item k
17336 @kindex k (GroupLens)
17337 @findex grouplens-score-thread
17338 This function will prompt you for a rating, and rate all the articles in
17339 the thread.  This is really useful for some of those long running giant
17340 threads in rec.humor.
17341
17342 @end table
17343
17344 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
17345 the score of the article you're reading.
17346
17347 @table @kbd
17348
17349 @item 1-5 n
17350 @kindex n (GroupLens)
17351 @findex grouplens-next-unread-article
17352 Rate the article and go to the next unread article.
17353
17354 @item 1-5 ,
17355 @kindex , (GroupLens)
17356 @findex grouplens-best-unread-article
17357 Rate the article and go to the next unread article with the highest score.
17358
17359 @end table
17360
17361 If you want to give the current article a score of 4 and then go to the
17362 next article, just type @kbd{4 n}.
17363
17364
17365 @node Displaying Predictions
17366 @subsection Displaying Predictions
17367
17368 GroupLens makes a prediction for you about how much you will like a
17369 news article.  The predictions from GroupLens are on a scale from 1 to
17370 5, where 1 is the worst and 5 is the best.  You can use the predictions
17371 from GroupLens in one of three ways controlled by the variable
17372 @code{gnus-grouplens-override-scoring}.
17373
17374 @vindex gnus-grouplens-override-scoring
17375 There are three ways to display predictions in grouplens.  You may
17376 choose to have the GroupLens scores contribute to, or override the
17377 regular gnus scoring mechanism.  override is the default; however, some
17378 people prefer to see the Gnus scores plus the grouplens scores.  To get
17379 the separate scoring behavior you need to set
17380 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
17381 GroupLens predictions combined with the grouplens scores set it to
17382 @code{'override} and to combine the scores set
17383 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
17384 the combine option you will also want to set the values for
17385 @code{grouplens-prediction-offset} and
17386 @code{grouplens-score-scale-factor}.
17387
17388 @vindex grouplens-prediction-display
17389 In either case, GroupLens gives you a few choices for how you would like
17390 to see your predictions displayed.  The display of predictions is
17391 controlled by the @code{grouplens-prediction-display} variable.
17392
17393 The following are valid values for that variable.
17394
17395 @table @code
17396 @item prediction-spot
17397 The higher the prediction, the further to the right an @samp{*} is
17398 displayed.
17399
17400 @item confidence-interval
17401 A numeric confidence interval.
17402
17403 @item prediction-bar
17404 The higher the prediction, the longer the bar.
17405
17406 @item confidence-bar
17407 Numerical confidence.
17408
17409 @item confidence-spot
17410 The spot gets bigger with more confidence.
17411
17412 @item prediction-num
17413 Plain-old numeric value.
17414
17415 @item confidence-plus-minus
17416 Prediction +/- confidence.
17417
17418 @end table
17419
17420
17421 @node GroupLens Variables
17422 @subsection GroupLens Variables
17423
17424 @table @code
17425
17426 @item gnus-summary-grouplens-line-format
17427 The summary line format used in GroupLens-enhanced summary buffers.  It
17428 accepts the same specs as the normal summary line format (@pxref{Summary
17429 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
17430 %s\n}.
17431
17432 @item grouplens-bbb-host
17433 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
17434 default.
17435
17436 @item grouplens-bbb-port
17437 Port of the host running the bbbd server.  The default is 9000.
17438
17439 @item grouplens-score-offset
17440 Offset the prediction by this value.  In other words, subtract the
17441 prediction value by this number to arrive at the effective score.  The
17442 default is 0.
17443
17444 @item grouplens-score-scale-factor
17445 This variable allows the user to magnify the effect of GroupLens scores.
17446 The scale factor is applied after the offset.  The default is 1.
17447
17448 @end table
17449
17450
17451 @node Advanced Scoring
17452 @section Advanced Scoring
17453
17454 Scoring on Subjects and From headers is nice enough, but what if you're
17455 really interested in what a person has to say only when she's talking
17456 about a particular subject?  Or what if you really don't want to
17457 read what person A has to say when she's following up to person B, but
17458 want to read what she says when she's following up to person C?
17459
17460 By using advanced scoring rules you may create arbitrarily complex
17461 scoring patterns.
17462
17463 @menu
17464 * Advanced Scoring Syntax::     A definition.
17465 * Advanced Scoring Examples::   What they look like.
17466 * Advanced Scoring Tips::       Getting the most out of it.
17467 @end menu
17468
17469
17470 @node Advanced Scoring Syntax
17471 @subsection Advanced Scoring Syntax
17472
17473 Ordinary scoring rules have a string as the first element in the rule.
17474 Advanced scoring rules have a list as the first element.  The second
17475 element is the score to be applied if the first element evaluated to a
17476 non-@code{nil} value.
17477
17478 These lists may consist of three logical operators, one redirection
17479 operator, and various match operators.
17480
17481 Logical operators:
17482
17483 @table @code
17484 @item &
17485 @itemx and
17486 This logical operator will evaluate each of its arguments until it finds
17487 one that evaluates to @code{false}, and then it'll stop.  If all arguments
17488 evaluate to @code{true} values, then this operator will return
17489 @code{true}.
17490
17491 @item |
17492 @itemx or
17493 This logical operator will evaluate each of its arguments until it finds
17494 one that evaluates to @code{true}.  If no arguments are @code{true},
17495 then this operator will return @code{false}.
17496
17497 @item !
17498 @itemx not
17499 @itemx Â¬
17500 This logical operator only takes a single argument.  It returns the
17501 logical negation of the value of its argument.
17502
17503 @end table
17504
17505 There is an @dfn{indirection operator} that will make its arguments
17506 apply to the ancestors of the current article being scored.  For
17507 instance, @code{1-} will make score rules apply to the parent of the
17508 current article.  @code{2-} will make score rules apply to the
17509 grandparent of the current article.  Alternatively, you can write
17510 @code{^^}, where the number of @code{^}s (carets) says how far back into
17511 the ancestry you want to go.
17512
17513 Finally, we have the match operators.  These are the ones that do the
17514 real work.  Match operators are header name strings followed by a match
17515 and a match type.  A typical match operator looks like @samp{("from"
17516 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
17517 simple scoring, and the match types are also the same.
17518
17519
17520 @node Advanced Scoring Examples
17521 @subsection Advanced Scoring Examples
17522
17523 Let's say you want to increase the score of articles written by Lars
17524 when he's talking about Gnus:
17525
17526 @example
17527 ((&
17528   ("from" "Lars Ingebrigtsen")
17529   ("subject" "Gnus"))
17530  1000)
17531 @end example
17532
17533 Quite simple, huh?
17534
17535 When he writes long articles, he sometimes has something nice to say:
17536
17537 @example
17538 ((&
17539   ("from" "Lars Ingebrigtsen")
17540   (|
17541    ("subject" "Gnus")
17542    ("lines" 100 >)))
17543  1000)
17544 @end example
17545
17546 However, when he responds to things written by Reig Eigil Logge, you
17547 really don't want to read what he's written:
17548
17549 @example
17550 ((&
17551   ("from" "Lars Ingebrigtsen")
17552   (1- ("from" "Reig Eigir Logge")))
17553  -100000)
17554 @end example
17555
17556 Everybody that follows up Redmondo when he writes about disappearing
17557 socks should have their scores raised, but only when they talk about
17558 white socks.  However, when Lars talks about socks, it's usually not
17559 very interesting:
17560
17561 @example
17562 ((&
17563   (1-
17564    (&
17565     ("from" "redmondo@@.*no" r)
17566     ("body" "disappearing.*socks" t)))
17567   (! ("from" "Lars Ingebrigtsen"))
17568   ("body" "white.*socks"))
17569  1000)
17570 @end example
17571
17572 The possibilities are endless.
17573
17574
17575 @node Advanced Scoring Tips
17576 @subsection Advanced Scoring Tips
17577
17578 The @code{&} and @code{|} logical operators do short-circuit logic.
17579 That is, they stop processing their arguments when it's clear what the
17580 result of the operation will be.  For instance, if one of the arguments
17581 of an @code{&} evaluates to @code{false}, there's no point in evaluating
17582 the rest of the arguments.  This means that you should put slow matches
17583 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
17584 @samp{subject}) first.
17585
17586 The indirection arguments (@code{1-} and so on) will make their
17587 arguments work on previous generations of the thread.  If you say
17588 something like:
17589
17590 @example
17591 ...
17592 (1-
17593  (1-
17594   ("from" "lars")))
17595 ...
17596 @end example
17597
17598 Then that means "score on the from header of the grandparent of the
17599 current article".  An indirection is quite fast, but it's better to say:
17600
17601 @example
17602 (1-
17603  (&
17604   ("from" "Lars")
17605   ("subject" "Gnus")))
17606 @end example
17607
17608 than it is to say:
17609
17610 @example
17611 (&
17612  (1- ("from" "Lars"))
17613  (1- ("subject" "Gnus")))
17614 @end example
17615
17616
17617 @node Score Decays
17618 @section Score Decays
17619 @cindex score decays
17620 @cindex decays
17621
17622 You may find that your scores have a tendency to grow without
17623 bounds, especially if you're using adaptive scoring.  If scores get too
17624 big, they lose all meaning---they simply max out and it's difficult to
17625 use them in any sensible way.
17626
17627 @vindex gnus-decay-scores
17628 @findex gnus-decay-score
17629 @vindex gnus-decay-score-function
17630 Gnus provides a mechanism for decaying scores to help with this problem.
17631 When score files are loaded and @code{gnus-decay-scores} is
17632 non-@code{nil}, Gnus will run the score files through the decaying
17633 mechanism thereby lowering the scores of all non-permanent score rules.
17634 The decay itself if performed by the @code{gnus-decay-score-function}
17635 function, which is @code{gnus-decay-score} by default.  Here's the
17636 definition of that function:
17637
17638 @lisp
17639 (defun gnus-decay-score (score)
17640   "Decay SCORE.
17641 This is done according to `gnus-score-decay-constant'
17642 and `gnus-score-decay-scale'."
17643   (floor
17644    (- score
17645       (* (if (< score 0) 1 -1)
17646          (min (abs score)
17647               (max gnus-score-decay-constant
17648                    (* (abs score)
17649                       gnus-score-decay-scale)))))))
17650 @end lisp
17651
17652 @vindex gnus-score-decay-scale
17653 @vindex gnus-score-decay-constant
17654 @code{gnus-score-decay-constant} is 3 by default and
17655 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
17656
17657 @enumerate
17658 @item
17659 Scores between -3 and 3 will be set to 0 when this function is called.
17660
17661 @item
17662 Scores with magnitudes between 3 and 60 will be shrunk by 3.
17663
17664 @item
17665 Scores with magnitudes greater than 60 will be shrunk by 5% of the
17666 score.
17667 @end enumerate
17668
17669 If you don't like this decay function, write your own.  It is called
17670 with the score to be decayed as its only parameter, and it should return
17671 the new score, which should be an integer.
17672
17673 Gnus will try to decay scores once a day.  If you haven't run Gnus for
17674 four days, Gnus will decay the scores four times, for instance.
17675
17676
17677 @node Various
17678 @chapter Various
17679
17680 @menu
17681 * Process/Prefix::              A convention used by many treatment commands.
17682 * Interactive::                 Making Gnus ask you many questions.
17683 * Symbolic Prefixes::           How to supply some Gnus functions with options.
17684 * Formatting Variables::        You can specify what buffers should look like.
17685 * Window Layout::               Configuring the Gnus buffer windows.
17686 * Faces and Fonts::             How to change how faces look.
17687 * Compilation::                 How to speed Gnus up.
17688 * Mode Lines::                  Displaying information in the mode lines.
17689 * Highlighting and Menus::      Making buffers look all nice and cozy.
17690 * Buttons::                     Get tendinitis in ten easy steps!
17691 * Daemons::                     Gnus can do things behind your back.
17692 * NoCeM::                       How to avoid spam and other fatty foods.
17693 * Undo::                        Some actions can be undone.
17694 * Moderation::                  What to do if you're a moderator.
17695 * XEmacs Enhancements::         There are more pictures and stuff under XEmacs.
17696 * Fuzzy Matching::              What's the big fuzz?
17697 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
17698 * Various Various::             Things that are really various.
17699 @end menu
17700
17701
17702 @node Process/Prefix
17703 @section Process/Prefix
17704 @cindex process/prefix convention
17705
17706 Many functions, among them functions for moving, decoding and saving
17707 articles, use what is known as the @dfn{Process/Prefix convention}.
17708
17709 This is a method for figuring out what articles the user wants the
17710 command to be performed on.
17711
17712 It goes like this:
17713
17714 If the numeric prefix is N, perform the operation on the next N
17715 articles, starting with the current one.  If the numeric prefix is
17716 negative, perform the operation on the previous N articles, starting
17717 with the current one.
17718
17719 @vindex transient-mark-mode
17720 If @code{transient-mark-mode} in non-@code{nil} and the region is
17721 active, all articles in the region will be worked upon.
17722
17723 If there is no numeric prefix, but some articles are marked with the
17724 process mark, perform the operation on the articles marked with
17725 the process mark.
17726
17727 If there is neither a numeric prefix nor any articles marked with the
17728 process mark, just perform the operation on the current article.
17729
17730 Quite simple, really, but it needs to be made clear so that surprises
17731 are avoided.
17732
17733 Commands that react to the process mark will push the current list of
17734 process marked articles onto a stack and will then clear all process
17735 marked articles.  You can restore the previous configuration with the
17736 @kbd{M P y} command (@pxref{Setting Process Marks}).
17737
17738 @vindex gnus-summary-goto-unread
17739 One thing that seems to shock & horrify lots of people is that, for
17740 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
17741 Since each @kbd{d} (which marks the current article as read) by default
17742 goes to the next unread article after marking, this means that @kbd{3 d}
17743 will mark the next three unread articles as read, no matter what the
17744 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
17745 @code{nil} for a more straightforward action.
17746
17747 Many commands do not use the process/prefix convention.  All commands
17748 that do explicitly say so in this manual.  To apply the process/prefix
17749 convention to commands that do not use it, you can use the @kbd{M-&}
17750 command.  For instance, to mark all the articles in the group as
17751 expirable, you could say `M P b M-& E'.
17752
17753
17754 @node Interactive
17755 @section Interactive
17756 @cindex interaction
17757
17758 @table @code
17759
17760 @item gnus-novice-user
17761 @vindex gnus-novice-user
17762 If this variable is non-@code{nil}, you are either a newcomer to the
17763 World of Usenet, or you are very cautious, which is a nice thing to be,
17764 really.  You will be given questions of the type ``Are you sure you want
17765 to do this?'' before doing anything dangerous.  This is @code{t} by
17766 default.
17767
17768 @item gnus-expert-user
17769 @vindex gnus-expert-user
17770 If this variable is non-@code{nil}, you will seldom be asked any
17771 questions by Gnus.  It will simply assume you know what you're doing, no
17772 matter how strange.
17773
17774 @item gnus-interactive-catchup
17775 @vindex gnus-interactive-catchup
17776 Require confirmation before catching up a group if non-@code{nil}.  It
17777 is @code{t} by default.
17778
17779 @item gnus-interactive-exit
17780 @vindex gnus-interactive-exit
17781 Require confirmation before exiting Gnus.  This variable is @code{t} by
17782 default.
17783 @end table
17784
17785
17786 @node Symbolic Prefixes
17787 @section Symbolic Prefixes
17788 @cindex symbolic prefixes
17789
17790 Quite a lot of Emacs commands react to the (numeric) prefix.  For
17791 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
17792 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
17793 rule of 900 to the current article.
17794
17795 This is all nice and well, but what if you want to give a command some
17796 additional information?  Well, what most commands do is interpret the
17797 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
17798 doesn't want a backup file to be created when saving the current buffer,
17799 for instance.  But what if you want to save without making a backup
17800 file, and you want Emacs to flash lights and play a nice tune at the
17801 same time?  You can't, and you're probably perfectly happy that way.
17802
17803 @kindex M-i (Summary)
17804 @findex gnus-symbolic-argument
17805 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
17806 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
17807 character typed in is the value.  You can stack as many @kbd{M-i}
17808 prefixes as you want.  @kbd{M-i a M-C-u} means ``feed the @kbd{M-C-u}
17809 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b M-C-u} means
17810 ``feed the @kbd{M-C-u} command the symbolic prefixes @code{a} and
17811 @code{b}''.  You get the drift.
17812
17813 Typing in symbolic prefixes to commands that don't accept them doesn't
17814 hurt, but it doesn't do any good either.  Currently not many Gnus
17815 functions make use of the symbolic prefix.
17816
17817 If you're interested in how Gnus implements this, @pxref{Extended
17818 Interactive}.
17819
17820
17821 @node Formatting Variables
17822 @section Formatting Variables
17823 @cindex formatting variables
17824
17825 Throughout this manual you've probably noticed lots of variables called
17826 things like @code{gnus-group-line-format} and
17827 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
17828 output lines in the various buffers.  There's quite a lot of them.
17829 Fortunately, they all use the same syntax, so there's not that much to
17830 be annoyed by.
17831
17832 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
17833 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
17834 lots of percentages everywhere.
17835
17836 @menu
17837 * Formatting Basics::           A formatting variable is basically a format string.
17838 * Mode Line Formatting::        Some rules about mode line formatting variables.
17839 * Advanced Formatting::         Modifying output in various ways.
17840 * User-Defined Specs::          Having Gnus call your own functions.
17841 * Formatting Fonts::            Making the formatting look colorful and nice.
17842 * Positioning Point::           Moving point to a position after an operation.
17843 * Tabulation::                  Tabulating your output.
17844 * Wide Characters::             Dealing with wide characters.
17845 @end menu
17846
17847 Currently Gnus uses the following formatting variables:
17848 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
17849 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
17850 @code{gnus-group-mode-line-format},
17851 @code{gnus-summary-mode-line-format},
17852 @code{gnus-article-mode-line-format},
17853 @code{gnus-server-mode-line-format}, and
17854 @code{gnus-summary-pick-line-format}.
17855
17856 All these format variables can also be arbitrary elisp forms.  In that
17857 case, they will be @code{eval}ed to insert the required lines.
17858
17859 @kindex M-x gnus-update-format
17860 @findex gnus-update-format
17861 Gnus includes a command to help you while creating your own format
17862 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
17863 update the spec in question and pop you to a buffer where you can
17864 examine the resulting lisp code to be run to generate the line.
17865
17866
17867
17868 @node Formatting Basics
17869 @subsection Formatting Basics
17870
17871 Each @samp{%} element will be replaced by some string or other when the
17872 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
17873 spec, and pad with spaces to get a 5-character field''.
17874
17875 As with normal C and Emacs Lisp formatting strings, the numerical
17876 modifier between the @samp{%} and the formatting type character will
17877 @dfn{pad} the output so that it is always at least that long.
17878 @samp{%5y} will make the field always (at least) five characters wide by
17879 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
17880 the right instead.
17881
17882 You may also wish to limit the length of the field to protect against
17883 particularly wide values.  For that you can say @samp{%4,6y}, which
17884 means that the field will never be more than 6 characters wide and never
17885 less than 4 characters wide.
17886
17887
17888 @node Mode Line Formatting
17889 @subsection Mode Line Formatting
17890
17891 Mode line formatting variables (e.g.,
17892 @code{gnus-summary-mode-line-format}) follow the same rules as other,
17893 buffer line oriented formatting variables (@pxref{Formatting Basics})
17894 with the following two differences:
17895
17896 @enumerate
17897
17898 @item
17899 There must be no newline (@samp{\n}) at the end.
17900
17901 @item
17902 The special @samp{%%b} spec can be used to display the buffer name.
17903 Well, it's no spec at all, really---@samp{%%} is just a way to quote
17904 @samp{%} to allow it to pass through the formatting machinery unmangled,
17905 so that Emacs receives @samp{%b}, which is something the Emacs mode line
17906 display interprets to mean ``show the buffer name''.  For a full list of
17907 mode line specs Emacs understands, see the documentation of the
17908 @code{mode-line-format} variable.
17909
17910 @end enumerate
17911
17912
17913 @node Advanced Formatting
17914 @subsection Advanced Formatting
17915
17916 It is frequently useful to post-process the fields in some way.
17917 Padding, limiting, cutting off parts and suppressing certain values can
17918 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
17919 look like @samp{%~(cut 3)~(ignore "0")y}.
17920
17921 These are the valid modifiers:
17922
17923 @table @code
17924 @item pad
17925 @itemx pad-left
17926 Pad the field to the left with spaces until it reaches the required
17927 length.
17928
17929 @item pad-right
17930 Pad the field to the right with spaces until it reaches the required
17931 length.
17932
17933 @item max
17934 @itemx max-left
17935 Cut off characters from the left until it reaches the specified length.
17936
17937 @item max-right
17938 Cut off characters from the right until it reaches the specified
17939 length.
17940
17941 @item cut
17942 @itemx cut-left
17943 Cut off the specified number of characters from the left.
17944
17945 @item cut-right
17946 Cut off the specified number of characters from the right.
17947
17948 @item ignore
17949 Return an empty string if the field is equal to the specified value.
17950
17951 @item form
17952 Use the specified form as the field value when the @samp{@@} spec is
17953 used.
17954 @end table
17955
17956 Let's take an example.  The @samp{%o} spec in the summary mode lines
17957 will return a date in compact ISO8601 format---@samp{19960809T230410}.
17958 This is quite a mouthful, so we want to shave off the century number and
17959 the time, leaving us with a six-character date.  That would be
17960 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
17961 maxing, and we need the padding to ensure that the date is never less
17962 than 6 characters to make it look nice in columns.)
17963
17964 Ignoring is done first; then cutting; then maxing; and then as the very
17965 last operation, padding.
17966
17967 @vindex gnus-compile-user-specs
17968 If @code{gnus-compile-user-specs} is set to @code{nil} (@code{t} by
17969 default) with your strong personality, and use a lots of these advanced
17970 thingies, you'll find that Gnus gets quite slow.  This can be helped
17971 enormously by running @kbd{M-x gnus-compile} when you are satisfied with
17972 the look of your lines.
17973 @xref{Compilation}.
17974
17975
17976 @node User-Defined Specs
17977 @subsection User-Defined Specs
17978
17979 All the specs allow for inserting user defined specifiers---@samp{u}.
17980 The next character in the format string should be a letter.  Gnus
17981 will call the function @code{gnus-user-format-function-}@samp{X}, where
17982 @samp{X} is the letter following @samp{%u}.  The function will be passed
17983 a single parameter---what the parameter means depends on what buffer
17984 it's being called from.  The function should return a string, which will
17985 be inserted into the buffer just like information from any other
17986 specifier.  This function may also be called with dummy values, so it
17987 should protect against that.
17988
17989 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
17990 much the same without defining new functions.  Here's an example:
17991 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
17992 given here will be evaluated to yield the current line number, and then
17993 inserted.
17994
17995
17996 @node Formatting Fonts
17997 @subsection Formatting Fonts
17998
17999 There are specs for highlighting, and these are shared by all the format
18000 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
18001 the special @code{mouse-face} property set, which means that it will be
18002 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
18003 over it.
18004
18005 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
18006 normal faces set using @code{gnus-face-0}, which is @code{bold} by
18007 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
18008 and so on.  Create as many faces as you wish.  The same goes for the
18009 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
18010 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
18011
18012 Text inside the @samp{%<} and @samp{%>} specifiers will get the special
18013 @code{balloon-help} property set to @code{gnus-balloon-face-0}.  If you
18014 say @samp{%1<}, you'll get @code{gnus-balloon-face-1} and so on.  The
18015 @code{gnus-balloon-face-*} variables should be either strings or symbols
18016 naming functions that return a string.  Under @code{balloon-help-mode},
18017 when the mouse passes over text with this property set, a balloon window
18018 will appear and display the string.  Please refer to the doc string of
18019 @code{balloon-help-mode} for more information on this.
18020
18021 Here's an alternative recipe for the group buffer:
18022
18023 @lisp
18024 ;; Create three face types.
18025 (setq gnus-face-1 'bold)
18026 (setq gnus-face-3 'italic)
18027
18028 ;; We want the article count to be in
18029 ;; a bold and green face.  So we create
18030 ;; a new face called `my-green-bold'.
18031 (copy-face 'bold 'my-green-bold)
18032 ;; Set the color.
18033 (set-face-foreground 'my-green-bold "ForestGreen")
18034 (setq gnus-face-2 'my-green-bold)
18035
18036 ;; Set the new & fancy format.
18037 (setq gnus-group-line-format
18038       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
18039 @end lisp
18040
18041 I'm sure you'll be able to use this scheme to create totally unreadable
18042 and extremely vulgar displays.  Have fun!
18043
18044 Note that the @samp{%(} specs (and friends) do not make any sense on the
18045 mode-line variables.
18046
18047 @node Positioning Point
18048 @subsection Positioning Point
18049
18050 Gnus usually moves point to a pre-defined place on each line in most
18051 buffers.  By default, point move to the first colon character on the
18052 line.  You can customize this behaviour in three different ways.
18053
18054 You can move the colon character to somewhere else on the line.
18055
18056 @findex gnus-goto-colon
18057 You can redefine the function that moves the point to the colon.  The
18058 function is called @code{gnus-goto-colon}.
18059
18060 But perhaps the most convenient way to deal with this, if you don't want
18061 to have a colon in your line, is to use the @samp{%C} specifier.  If you
18062 put a @samp{%C} somewhere in your format line definition, Gnus will
18063 place point there.
18064
18065
18066 @node Tabulation
18067 @subsection Tabulation
18068
18069 You can usually line up your displays by padding and cutting your
18070 strings.  However, when combining various strings of different size, it
18071 can often be more convenient to just output the strings, and then worry
18072 about lining up the following text afterwards.
18073
18074 To do that, Gnus supplies tabulator specs--@samp{%=}.  There are two
18075 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
18076
18077 @samp{%50=} will insert space characters to pad the line up to column
18078 50.  If the text is already past column 50, nothing will be inserted.
18079 This is the soft tabulator.
18080
18081 @samp{%-50=} will insert space characters to pad the line up to column
18082 50.  If the text is already past column 50, the excess text past column
18083 50 will be removed.  This is the hard tabulator.
18084
18085
18086 @node Wide Characters
18087 @subsection Wide Characters
18088
18089 Proportional fonts in most countries have characters of the same width.
18090 Some countries, however, use Latin characters mixed with wider
18091 characters---most notable East Asian countries.
18092
18093 The problem is that when formatting, Gnus assumes that if a string is 10
18094 characters wide, it'll be 10 Latin characters wide on the screen.  In
18095 these coutries, that's not true.
18096
18097 @vindex gnus-use-correct-string-widths
18098 To help fix this, you can set @code{gnus-use-correct-string-widths} to
18099 @code{t}.  This makes buffer generation slower, but the results will be
18100 prettieer.  The default value is @code{nil}.
18101
18102
18103
18104 @node Window Layout
18105 @section Window Layout
18106 @cindex window layout
18107
18108 No, there's nothing here about X, so be quiet.
18109
18110 @vindex gnus-use-full-window
18111 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
18112 other windows and occupy the entire Emacs screen by itself.  It is
18113 @code{t} by default.
18114
18115 Setting this variable to @code{nil} kinda works, but there are
18116 glitches.  Use at your own peril.
18117
18118 @vindex gnus-buffer-configuration
18119 @code{gnus-buffer-configuration} describes how much space each Gnus
18120 buffer should be given.  Here's an excerpt of this variable:
18121
18122 @lisp
18123 ((group (vertical 1.0 (group 1.0 point)
18124                       (if gnus-carpal (group-carpal 4))))
18125  (article (vertical 1.0 (summary 0.25 point)
18126                         (article 1.0))))
18127 @end lisp
18128
18129 This is an alist.  The @dfn{key} is a symbol that names some action or
18130 other.  For instance, when displaying the group buffer, the window
18131 configuration function will use @code{group} as the key.  A full list of
18132 possible names is listed below.
18133
18134 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
18135 should occupy.  To take the @code{article} split as an example -
18136
18137 @lisp
18138 (article (vertical 1.0 (summary 0.25 point)
18139                        (article 1.0)))
18140 @end lisp
18141
18142 This @dfn{split} says that the summary buffer should occupy 25% of upper
18143 half of the screen, and that it is placed over the article buffer.  As
18144 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
18145 reaching for that calculator there).  However, the special number
18146 @code{1.0} is used to signal that this buffer should soak up all the
18147 rest of the space available after the rest of the buffers have taken
18148 whatever they need.  There should be only one buffer with the @code{1.0}
18149 size spec per split.
18150
18151 Point will be put in the buffer that has the optional third element
18152 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
18153 split where the tag @code{frame-focus} is a member (i.e. is the third or
18154 fourth element in the list, depending on whether the @code{point} tag is
18155 present) gets focus.
18156
18157 Here's a more complicated example:
18158
18159 @lisp
18160 (article (vertical 1.0 (group 4)
18161                        (summary 0.25 point)
18162                        (if gnus-carpal (summary-carpal 4))
18163                        (article 1.0)))
18164 @end lisp
18165
18166 If the size spec is an integer instead of a floating point number,
18167 then that number will be used to say how many lines a buffer should
18168 occupy, not a percentage.
18169
18170 If the @dfn{split} looks like something that can be @code{eval}ed (to be
18171 precise---if the @code{car} of the split is a function or a subr), this
18172 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
18173 be used as a split.  This means that there will be three buffers if
18174 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
18175 is non-@code{nil}.
18176
18177 Not complicated enough for you?  Well, try this on for size:
18178
18179 @lisp
18180 (article (horizontal 1.0
18181              (vertical 0.5
18182                  (group 1.0)
18183                  (gnus-carpal 4))
18184              (vertical 1.0
18185                  (summary 0.25 point)
18186                  (summary-carpal 4)
18187                  (article 1.0))))
18188 @end lisp
18189
18190 Whoops.  Two buffers with the mystery 100% tag.  And what's that
18191 @code{horizontal} thingie?
18192
18193 If the first element in one of the split is @code{horizontal}, Gnus will
18194 split the window horizontally, giving you two windows side-by-side.
18195 Inside each of these strips you may carry on all you like in the normal
18196 fashion.  The number following @code{horizontal} says what percentage of
18197 the screen is to be given to this strip.
18198
18199 For each split, there @emph{must} be one element that has the 100% tag.
18200 The splitting is never accurate, and this buffer will eat any leftover
18201 lines from the splits.
18202
18203 To be slightly more formal, here's a definition of what a valid split
18204 may look like:
18205
18206 @example
18207 split      = frame | horizontal | vertical | buffer | form
18208 frame      = "(frame " size *split ")"
18209 horizontal = "(horizontal " size *split ")"
18210 vertical   = "(vertical " size *split ")"
18211 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
18212 size       = number | frame-params
18213 buf-name   = group | article | summary ...
18214 @end example
18215
18216 The limitations are that the @code{frame} split can only appear as the
18217 top-level split.  @var{form} should be an Emacs Lisp form that should
18218 return a valid split.  We see that each split is fully recursive, and
18219 may contain any number of @code{vertical} and @code{horizontal} splits.
18220
18221 @vindex gnus-window-min-width
18222 @vindex gnus-window-min-height
18223 @cindex window height
18224 @cindex window width
18225 Finding the right sizes can be a bit complicated.  No window may be less
18226 than @code{gnus-window-min-height} (default 1) characters high, and all
18227 windows must be at least @code{gnus-window-min-width} (default 1)
18228 characters wide.  Gnus will try to enforce this before applying the
18229 splits.  If you want to use the normal Emacs window width/height limit,
18230 you can just set these two variables to @code{nil}.
18231
18232 If you're not familiar with Emacs terminology, @code{horizontal} and
18233 @code{vertical} splits may work the opposite way of what you'd expect.
18234 Windows inside a @code{horizontal} split are shown side-by-side, and
18235 windows within a @code{vertical} split are shown above each other.
18236
18237 @findex gnus-configure-frame
18238 If you want to experiment with window placement, a good tip is to call
18239 @code{gnus-configure-frame} directly with a split.  This is the function
18240 that does all the real work when splitting buffers.  Below is a pretty
18241 nonsensical configuration with 5 windows; two for the group buffer and
18242 three for the article buffer.  (I said it was nonsensical.)  If you
18243 @code{eval} the statement below, you can get an idea of how that would
18244 look straight away, without going through the normal Gnus channels.
18245 Play with it until you're satisfied, and then use
18246 @code{gnus-add-configuration} to add your new creation to the buffer
18247 configuration list.
18248
18249 @lisp
18250 (gnus-configure-frame
18251  '(horizontal 1.0
18252     (vertical 10
18253       (group 1.0)
18254       (article 0.3 point))
18255     (vertical 1.0
18256       (article 1.0)
18257       (horizontal 4
18258         (group 1.0)
18259         (article 10)))))
18260 @end lisp
18261
18262 You might want to have several frames as well.  No prob---just use the
18263 @code{frame} split:
18264
18265 @lisp
18266 (gnus-configure-frame
18267  '(frame 1.0
18268          (vertical 1.0
18269                    (summary 0.25 point frame-focus)
18270                    (article 1.0))
18271          (vertical ((height . 5) (width . 15)
18272                     (user-position . t)
18273                     (left . -1) (top . 1))
18274                    (picon 1.0))))
18275
18276 @end lisp
18277
18278 This split will result in the familiar summary/article window
18279 configuration in the first (or ``main'') frame, while a small additional
18280 frame will be created where picons will be shown.  As you can see,
18281 instead of the normal @code{1.0} top-level spec, each additional split
18282 should have a frame parameter alist as the size spec.
18283 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
18284 Reference Manual}.  Under XEmacs, a frame property list will be
18285 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
18286 is such a plist.
18287 The list of all possible keys for @code{gnus-buffer-configuration} can
18288 be found in its default value.
18289
18290 Note that the @code{message} key is used for both
18291 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
18292 it is desirable to distinguish between the two, something like this
18293 might be used:
18294
18295 @lisp
18296 (message (horizontal 1.0
18297                      (vertical 1.0 (message 1.0 point))
18298                      (vertical 0.24
18299                                (if (buffer-live-p gnus-summary-buffer)
18300                                    '(summary 0.5))
18301                                (group 1.0)))))
18302 @end lisp
18303
18304 One common desire for a multiple frame split is to have a separate frame
18305 for composing mail and news while leaving the original frame intact.  To
18306 accomplish that, something like the following can be done:
18307
18308 @lisp
18309 (message
18310   (frame 1.0
18311          (if (not (buffer-live-p gnus-summary-buffer))
18312              (car (cdr (assoc 'group gnus-buffer-configuration)))
18313            (car (cdr (assoc 'summary gnus-buffer-configuration))))
18314          (vertical ((user-position . t) (top . 1) (left . 1)
18315                     (name . "Message"))
18316                    (message 1.0 point))))
18317 @end lisp
18318
18319 @findex gnus-add-configuration
18320 Since the @code{gnus-buffer-configuration} variable is so long and
18321 complicated, there's a function you can use to ease changing the config
18322 of a single setting: @code{gnus-add-configuration}.  If, for instance,
18323 you want to change the @code{article} setting, you could say:
18324
18325 @lisp
18326 (gnus-add-configuration
18327  '(article (vertical 1.0
18328                (group 4)
18329                (summary .25 point)
18330                (article 1.0))))
18331 @end lisp
18332
18333 You'd typically stick these @code{gnus-add-configuration} calls in your
18334 @file{.gnus.el} file or in some startup hook---they should be run after
18335 Gnus has been loaded.
18336
18337 @vindex gnus-always-force-window-configuration
18338 If all windows mentioned in the configuration are already visible, Gnus
18339 won't change the window configuration.  If you always want to force the
18340 ``right'' window configuration, you can set
18341 @code{gnus-always-force-window-configuration} to non-@code{nil}.
18342
18343 If you're using tree displays (@pxref{Tree Display}), and the tree
18344 window is displayed vertically next to another window, you may also want
18345 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
18346 windows resized.
18347
18348 @subsection Example Window Configurations
18349
18350 @itemize @bullet
18351 @item
18352 Narrow left hand side occupied by group buffer.  Right hand side split
18353 between summary buffer (top one-sixth) and article buffer (bottom).
18354
18355 @ifinfo
18356 @example
18357 +---+---------+
18358 | G | Summary |
18359 | r +---------+
18360 | o |         |
18361 | u | Article |
18362 | p |         |
18363 +---+---------+
18364 @end example
18365 @end ifinfo
18366
18367 @lisp
18368 (gnus-add-configuration
18369  '(article
18370    (horizontal 1.0
18371                (vertical 25 (group 1.0))
18372                (vertical 1.0
18373                          (summary 0.16 point)
18374                          (article 1.0)))))
18375
18376 (gnus-add-configuration
18377  '(summary
18378    (horizontal 1.0
18379                (vertical 25 (group 1.0))
18380                (vertical 1.0 (summary 1.0 point)))))
18381 @end lisp
18382
18383 @end itemize
18384
18385
18386 @node Faces and Fonts
18387 @section Faces and Fonts
18388 @cindex faces
18389 @cindex fonts
18390 @cindex colors
18391
18392 Fiddling with fonts and faces used to be very difficult, but these days
18393 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
18394 the face you want to alter, and alter it via the standard Customize
18395 interface.
18396
18397
18398 @node Compilation
18399 @section Compilation
18400 @cindex compilation
18401 @cindex byte-compilation
18402
18403 @findex gnus-compile
18404
18405 Remember all those line format specification variables?
18406 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
18407 on.  By default, T-gnus will use the byte-compiled codes of these
18408 variables and we can keep a slow-down to a minimum.  However, if you set
18409 @code{gnus-compile-user-specs} to @code{nil} (@code{t} by default),
18410 unfortunately, changing them will mean a quite significant slow-down.
18411 (The default values of these variables have byte-compiled functions
18412 associated with them, while the user-generated versions do not, of
18413 course.)
18414
18415 To help with this, you can run @kbd{M-x gnus-compile} after you've
18416 fiddled around with the variables and feel that you're (kind of)
18417 satisfied.  This will result in the new specs being byte-compiled, and
18418 you'll get top speed again.  Note that T-gnus will not save these
18419 compiled specs in the @file{.newsrc.eld} file.
18420
18421 @table @code
18422 @item gnus-compile-user-specs
18423 @vindex gnus-compile-user-specs
18424 If it is non-nil, the user-defined format specs will be byte-compiled
18425 automatically.  The default value of this variable is @code{t}.  It has
18426 an effect on the values of @code{gnus-*-line-format-spec}.
18427 @end table
18428
18429
18430 @node Mode Lines
18431 @section Mode Lines
18432 @cindex mode lines
18433
18434 @vindex gnus-updated-mode-lines
18435 @code{gnus-updated-mode-lines} says what buffers should keep their mode
18436 lines updated.  It is a list of symbols.  Supported symbols include
18437 @code{group}, @code{article}, @code{summary}, @code{server},
18438 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
18439 Gnus will keep that mode line updated with information that may be
18440 pertinent.  If this variable is @code{nil}, screen refresh may be
18441 quicker.
18442
18443 @cindex display-time
18444
18445 @vindex gnus-mode-non-string-length
18446 By default, Gnus displays information on the current article in the mode
18447 lines of the summary and article buffers.  The information Gnus wishes
18448 to display (e.g. the subject of the article) is often longer than the
18449 mode lines, and therefore have to be cut off at some point.  The
18450 @code{gnus-mode-non-string-length} variable says how long the other
18451 elements on the line is (i.e., the non-info part).  If you put
18452 additional elements on the mode line (e.g. a clock), you should modify
18453 this variable:
18454
18455 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
18456 @lisp
18457 (add-hook 'display-time-hook
18458           (lambda () (setq gnus-mode-non-string-length
18459                            (+ 21
18460                               (if line-number-mode 5 0)
18461                               (if column-number-mode 4 0)
18462                               (length display-time-string)))))
18463 @end lisp
18464
18465 If this variable is @code{nil} (which is the default), the mode line
18466 strings won't be chopped off, and they won't be padded either.  Note
18467 that the default is unlikely to be desirable, as even the percentage
18468 complete in the buffer may be crowded off the mode line; the user should
18469 configure this variable appropriately for her configuration.
18470
18471
18472 @node Highlighting and Menus
18473 @section Highlighting and Menus
18474 @cindex visual
18475 @cindex highlighting
18476 @cindex menus
18477
18478 @vindex gnus-visual
18479 The @code{gnus-visual} variable controls most of the Gnus-prettifying
18480 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
18481 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
18482 file.
18483
18484 This variable can be a list of visual properties that are enabled.  The
18485 following elements are valid, and are all included by default:
18486
18487 @table @code
18488 @item group-highlight
18489 Do highlights in the group buffer.
18490 @item summary-highlight
18491 Do highlights in the summary buffer.
18492 @item article-highlight
18493 Do highlights in the article buffer.
18494 @item highlight
18495 Turn on highlighting in all buffers.
18496 @item group-menu
18497 Create menus in the group buffer.
18498 @item summary-menu
18499 Create menus in the summary buffers.
18500 @item article-menu
18501 Create menus in the article buffer.
18502 @item browse-menu
18503 Create menus in the browse buffer.
18504 @item server-menu
18505 Create menus in the server buffer.
18506 @item score-menu
18507 Create menus in the score buffers.
18508 @item menu
18509 Create menus in all buffers.
18510 @end table
18511
18512 So if you only want highlighting in the article buffer and menus in all
18513 buffers, you could say something like:
18514
18515 @lisp
18516 (setq gnus-visual '(article-highlight menu))
18517 @end lisp
18518
18519 If you want highlighting only and no menus whatsoever, you'd say:
18520
18521 @lisp
18522 (setq gnus-visual '(highlight))
18523 @end lisp
18524
18525 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
18526 in all Gnus buffers.
18527
18528 Other general variables that influence the look of all buffers include:
18529
18530 @table @code
18531 @item gnus-mouse-face
18532 @vindex gnus-mouse-face
18533 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
18534 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
18535
18536 @end table
18537
18538 There are hooks associated with the creation of all the different menus:
18539
18540 @table @code
18541
18542 @item gnus-article-menu-hook
18543 @vindex gnus-article-menu-hook
18544 Hook called after creating the article mode menu.
18545
18546 @item gnus-group-menu-hook
18547 @vindex gnus-group-menu-hook
18548 Hook called after creating the group mode menu.
18549
18550 @item gnus-summary-menu-hook
18551 @vindex gnus-summary-menu-hook
18552 Hook called after creating the summary mode menu.
18553
18554 @item gnus-server-menu-hook
18555 @vindex gnus-server-menu-hook
18556 Hook called after creating the server mode menu.
18557
18558 @item gnus-browse-menu-hook
18559 @vindex gnus-browse-menu-hook
18560 Hook called after creating the browse mode menu.
18561
18562 @item gnus-score-menu-hook
18563 @vindex gnus-score-menu-hook
18564 Hook called after creating the score mode menu.
18565
18566 @end table
18567
18568
18569 @node Buttons
18570 @section Buttons
18571 @cindex buttons
18572 @cindex mouse
18573 @cindex click
18574
18575 Those new-fangled @dfn{mouse} contraptions is very popular with the
18576 young, hep kids who don't want to learn the proper way to do things
18577 these days.  Why, I remember way back in the summer of '89, when I was
18578 using Emacs on a Tops 20 system.  Three hundred users on one single
18579 machine, and every user was running Simula compilers.  Bah!
18580
18581 Right.
18582
18583 @vindex gnus-carpal
18584 Well, you can make Gnus display bufferfuls of buttons you can click to
18585 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
18586 really.  Tell the chiropractor I sent you.
18587
18588
18589 @table @code
18590
18591 @item gnus-carpal-mode-hook
18592 @vindex gnus-carpal-mode-hook
18593 Hook run in all carpal mode buffers.
18594
18595 @item gnus-carpal-button-face
18596 @vindex gnus-carpal-button-face
18597 Face used on buttons.
18598
18599 @item gnus-carpal-header-face
18600 @vindex gnus-carpal-header-face
18601 Face used on carpal buffer headers.
18602
18603 @item gnus-carpal-group-buffer-buttons
18604 @vindex gnus-carpal-group-buffer-buttons
18605 Buttons in the group buffer.
18606
18607 @item gnus-carpal-summary-buffer-buttons
18608 @vindex gnus-carpal-summary-buffer-buttons
18609 Buttons in the summary buffer.
18610
18611 @item gnus-carpal-server-buffer-buttons
18612 @vindex gnus-carpal-server-buffer-buttons
18613 Buttons in the server buffer.
18614
18615 @item gnus-carpal-browse-buffer-buttons
18616 @vindex gnus-carpal-browse-buffer-buttons
18617 Buttons in the browse buffer.
18618 @end table
18619
18620 All the @code{buttons} variables are lists.  The elements in these list
18621 are either cons cells where the @code{car} contains a text to be displayed and
18622 the @code{cdr} contains a function symbol, or a simple string.
18623
18624
18625 @node Daemons
18626 @section Daemons
18627 @cindex demons
18628 @cindex daemons
18629
18630 Gnus, being larger than any program ever written (allegedly), does lots
18631 of strange stuff that you may wish to have done while you're not
18632 present.  For instance, you may want it to check for new mail once in a
18633 while.  Or you may want it to close down all connections to all servers
18634 when you leave Emacs idle.  And stuff like that.
18635
18636 Gnus will let you do stuff like that by defining various
18637 @dfn{handlers}.  Each handler consists of three elements:  A
18638 @var{function}, a @var{time}, and an @var{idle} parameter.
18639
18640 Here's an example of a handler that closes connections when Emacs has
18641 been idle for thirty minutes:
18642
18643 @lisp
18644 (gnus-demon-close-connections nil 30)
18645 @end lisp
18646
18647 Here's a handler that scans for PGP headers every hour when Emacs is
18648 idle:
18649
18650 @lisp
18651 (gnus-demon-scan-pgp 60 t)
18652 @end lisp
18653
18654 This @var{time} parameter and than @var{idle} parameter work together
18655 in a strange, but wonderful fashion.  Basically, if @var{idle} is
18656 @code{nil}, then the function will be called every @var{time} minutes.
18657
18658 If @var{idle} is @code{t}, then the function will be called after
18659 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
18660 the function will never be called.  But once Emacs goes idle, the
18661 function will be called every @var{time} minutes.
18662
18663 If @var{idle} is a number and @var{time} is a number, the function will
18664 be called every @var{time} minutes only when Emacs has been idle for
18665 @var{idle} minutes.
18666
18667 If @var{idle} is a number and @var{time} is @code{nil}, the function
18668 will be called once every time Emacs has been idle for @var{idle}
18669 minutes.
18670
18671 And if @var{time} is a string, it should look like @samp{07:31}, and
18672 the function will then be called once every day somewhere near that
18673 time.  Modified by the @var{idle} parameter, of course.
18674
18675 @vindex gnus-demon-timestep
18676 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
18677 seconds.  This is 60 by default.  If you change that variable,
18678 all the timings in the handlers will be affected.)
18679
18680 So, if you want to add a handler, you could put something like this in
18681 your @file{.gnus} file:
18682
18683 @findex gnus-demon-add-handler
18684 @lisp
18685 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
18686 @end lisp
18687
18688 @findex gnus-demon-add-nocem
18689 @findex gnus-demon-add-scanmail
18690 @findex gnus-demon-add-rescan
18691 @findex gnus-demon-add-scan-timestamps
18692 @findex gnus-demon-add-disconnection
18693 Some ready-made functions to do this have been created:
18694 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
18695 @code{gnus-demon-add-nntp-close-connection},
18696 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
18697 @code{gnus-demon-add-scanmail}.  Just put those functions in your
18698 @file{.gnus} if you want those abilities.
18699
18700 @findex gnus-demon-init
18701 @findex gnus-demon-cancel
18702 @vindex gnus-demon-handlers
18703 If you add handlers to @code{gnus-demon-handlers} directly, you should
18704 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
18705 daemons, you can use the @code{gnus-demon-cancel} function.
18706
18707 Note that adding daemons can be pretty naughty if you over do it.  Adding
18708 functions that scan all news and mail from all servers every two seconds
18709 is a sure-fire way of getting booted off any respectable system.  So
18710 behave.
18711
18712
18713 @node NoCeM
18714 @section NoCeM
18715 @cindex nocem
18716 @cindex spam
18717
18718 @dfn{Spamming} is posting the same article lots and lots of times.
18719 Spamming is bad.  Spamming is evil.
18720
18721 Spamming is usually canceled within a day or so by various anti-spamming
18722 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
18723 NoCeM is pronounced ``no see-'em'', and means what the name
18724 implies---these are messages that make the offending articles, like, go
18725 away.
18726
18727 What use are these NoCeM messages if the articles are canceled anyway?
18728 Some sites do not honor cancel messages and some sites just honor cancels
18729 from a select few people.  Then you may wish to make use of the NoCeM
18730 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
18731
18732 Gnus can read and parse the messages in this group automatically, and
18733 this will make spam disappear.
18734
18735 There are some variables to customize, of course:
18736
18737 @table @code
18738 @item gnus-use-nocem
18739 @vindex gnus-use-nocem
18740 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
18741 by default.
18742
18743 @item gnus-nocem-groups
18744 @vindex gnus-nocem-groups
18745 Gnus will look for NoCeM messages in the groups in this list.  The
18746 default is @code{("news.lists.filters" "news.admin.net-abuse.bulletins"
18747 "alt.nocem.misc" "news.admin.net-abuse.announce")}.
18748
18749 @item gnus-nocem-issuers
18750 @vindex gnus-nocem-issuers
18751 There are many people issuing NoCeM messages.  This list says what
18752 people you want to listen to.  The default is @code{("Automoose-1"
18753 "clewis@@ferret.ocunix.on.ca" "cosmo.roadkill" "SpamHippo"
18754 "hweede@@snafu.de")}; fine, upstanding citizens all of them.
18755
18756 Known despammers that you can put in this list are listed at
18757 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
18758
18759 You do not have to heed NoCeM messages from all these people---just the
18760 ones you want to listen to.  You also don't have to accept all NoCeM
18761 messages from the people you like.  Each NoCeM message has a @dfn{type}
18762 header that gives the message a (more or less, usually less) rigorous
18763 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
18764 @samp{binary}, and @samp{troll}.  To specify this, you have to use
18765 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
18766 Each condition is either a string (which is a regexp that matches types
18767 you want to use) or a list on the form @code{(not @var{string})}, where
18768 @var{string} is a regexp that matches types you don't want to use.
18769
18770 For instance, if you want all NoCeM messages from Chris Lewis except his
18771 @samp{troll} messages, you'd say:
18772
18773 @lisp
18774 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
18775 @end lisp
18776
18777 On the other hand, if you just want nothing but his @samp{spam} and
18778 @samp{spew} messages, you'd say:
18779
18780 @lisp
18781 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
18782 @end lisp
18783
18784 The specs are applied left-to-right.
18785
18786
18787 @item gnus-nocem-verifyer
18788 @vindex gnus-nocem-verifyer
18789 @findex mc-verify
18790 This should be a function for verifying that the NoCeM issuer is who she
18791 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
18792 function.  If this is too slow and you don't care for verification
18793 (which may be dangerous), you can set this variable to @code{nil}.
18794
18795 If you want signed NoCeM messages to be verified and unsigned messages
18796 not to be verified (but used anyway), you could do something like:
18797
18798 @lisp
18799 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
18800
18801 (defun my-gnus-mc-verify ()
18802   (not (eq 'forged
18803            (ignore-errors
18804              (if (mc-verify)
18805                  t
18806                'forged)))))
18807 @end lisp
18808
18809 This might be dangerous, though.
18810
18811 @item gnus-nocem-directory
18812 @vindex gnus-nocem-directory
18813 This is where Gnus will store its NoCeM cache files.  The default is
18814 @file{~/News/NoCeM/}.
18815
18816 @item gnus-nocem-expiry-wait
18817 @vindex gnus-nocem-expiry-wait
18818 The number of days before removing old NoCeM entries from the cache.
18819 The default is 15.  If you make it shorter Gnus will be faster, but you
18820 might then see old spam.
18821
18822 @item gnus-nocem-check-from
18823 @vindex gnus-nocem-check-from
18824 Non-@code{nil} means check for valid issuers in message bodies.
18825 Otherwise don't bother fetching articles unless their author matches a
18826 valid issuer; that is much faster if you are selective about the
18827 issuers.
18828
18829 @item gnus-nocem-check-article-limit
18830 @vindex gnus-nocem-check-article-limit
18831 If non-@code{nil}, the maximum number of articles to check in any NoCeM
18832 group.  NoCeM groups can be huge and very slow to process.
18833
18834 @end table
18835
18836 Using NoCeM could potentially be a memory hog.  If you have many living
18837 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
18838 big.  If this is a problem, you should kill off all (or most) of your
18839 unsubscribed groups (@pxref{Subscription Commands}).
18840
18841
18842 @node Undo
18843 @section Undo
18844 @cindex undo
18845
18846 It is very useful to be able to undo actions one has done.  In normal
18847 Emacs buffers, it's easy enough---you just push the @code{undo} button.
18848 In Gnus buffers, however, it isn't that simple.
18849
18850 The things Gnus displays in its buffer is of no value whatsoever to
18851 Gnus---it's all just data designed to look nice to the user.
18852 Killing a group in the group buffer with @kbd{C-k} makes the line
18853 disappear, but that's just a side-effect of the real action---the
18854 removal of the group in question from the internal Gnus structures.
18855 Undoing something like that can't be done by the normal Emacs
18856 @code{undo} function.
18857
18858 Gnus tries to remedy this somewhat by keeping track of what the user
18859 does and coming up with actions that would reverse the actions the user
18860 takes.  When the user then presses the @code{undo} key, Gnus will run
18861 the code to reverse the previous action, or the previous actions.
18862 However, not all actions are easily reversible, so Gnus currently offers
18863 a few key functions to be undoable.  These include killing groups,
18864 yanking groups, and changing the list of read articles of groups.
18865 That's it, really.  More functions may be added in the future, but each
18866 added function means an increase in data to be stored, so Gnus will
18867 never be totally undoable.
18868
18869 @findex gnus-undo-mode
18870 @vindex gnus-use-undo
18871 @findex gnus-undo
18872 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
18873 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
18874 default.  The @kbd{M-C-_} key performs the @code{gnus-undo}
18875 command, which should feel kinda like the normal Emacs @code{undo}
18876 command.
18877
18878
18879 @node Moderation
18880 @section Moderation
18881 @cindex moderation
18882
18883 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
18884 It is not included in the standard Gnus package.  Write a mail to
18885 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
18886 get a copy.
18887
18888 The moderation package is implemented as a minor mode for summary
18889 buffers.  Put
18890
18891 @lisp
18892 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
18893 @end lisp
18894
18895 in your @file{.gnus.el} file.
18896
18897 If you are the moderator of @samp{rec.zoofle}, this is how it's
18898 supposed to work:
18899
18900 @enumerate
18901 @item
18902 You split your incoming mail by matching on
18903 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
18904 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
18905
18906 @item
18907 You enter that group once in a while and post articles using the @kbd{e}
18908 (edit-and-post) or @kbd{s} (just send unedited) commands.
18909
18910 @item
18911 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
18912 articles that weren't approved by you, you can cancel them with the
18913 @kbd{c} command.
18914 @end enumerate
18915
18916 To use moderation mode in these two groups, say:
18917
18918 @lisp
18919 (setq gnus-moderated-list
18920       "^nnml:rec.zoofle$\\|^rec.zoofle$")
18921 @end lisp
18922
18923
18924 @node XEmacs Enhancements
18925 @section XEmacs Enhancements
18926 @cindex XEmacs
18927
18928 XEmacs is able to display pictures and stuff, so Gnus has taken
18929 advantage of that.
18930
18931 @menu
18932 * Picons::                      How to display pictures of what your reading.
18933 * Smileys::                     Show all those happy faces the way they were meant to be shown.
18934 * Toolbar::                     Click'n'drool.
18935 * XVarious::                    Other XEmacsy Gnusey variables.
18936 @end menu
18937
18938
18939 @node Picons
18940 @subsection Picons
18941
18942 @iftex
18943 @iflatex
18944 \include{picons}
18945 @end iflatex
18946 @end iftex
18947
18948 So@dots{}  You want to slow down your news reader even more!  This is a
18949 good way to do so.  Its also a great way to impress people staring
18950 over your shoulder as you read news.
18951
18952 @menu
18953 * Picon Basics::                What are picons and How do I get them.
18954 * Picon Requirements::          Don't go further if you aren't using XEmacs.
18955 * Easy Picons::                 Displaying Picons---the easy way.
18956 * Hard Picons::                 The way you should do it.  You'll learn something.
18957 * Picon Useless Configuration::  Other variables you can trash/tweak/munge/play with.
18958 @end menu
18959
18960
18961 @node Picon Basics
18962 @subsubsection Picon Basics
18963
18964 What are Picons?  To quote directly from the Picons Web site:
18965
18966 @iftex
18967 @iflatex
18968 \margindex{}
18969 @end iflatex
18970 @end iftex
18971
18972 @quotation
18973 @dfn{Picons} is short for ``personal icons''.  They're small,
18974 constrained images used to represent users and domains on the net,
18975 organized into databases so that the appropriate image for a given
18976 e-mail address can be found.  Besides users and domains, there are picon
18977 databases for Usenet newsgroups and weather forecasts.  The picons are
18978 in either monochrome @code{XBM} format or color @code{XPM} and
18979 @code{GIF} formats.
18980 @end quotation
18981
18982 @vindex gnus-picons-piconsearch-url
18983 If you have a permanent connection to the Internet you can use Steve
18984 Kinzler's Picons Search engine by setting
18985 @code{gnus-picons-piconsearch-url} to the string @*
18986 @uref{http://www.cs.indiana.edu/picons/search.html}.
18987
18988 @vindex gnus-picons-database
18989 Otherwise you need a local copy of his database.  For instructions on
18990 obtaining and installing the picons databases, point your Web browser at @*
18991 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.  Gnus expects
18992 picons to be installed into a location pointed to by
18993 @code{gnus-picons-database}.
18994
18995
18996 @node Picon Requirements
18997 @subsubsection Picon Requirements
18998
18999 To have Gnus display Picons for you, you must be running XEmacs
19000 19.13 or greater since all other versions of Emacs aren't yet able to
19001 display images.
19002
19003 Additionally, you must have @code{x} support compiled into XEmacs.  To
19004 display color picons which are much nicer than the black & white one,
19005 you also need one of @code{xpm} or @code{gif} compiled into XEmacs.
19006
19007 @vindex gnus-picons-convert-x-face
19008 If you want to display faces from @code{X-Face} headers, you should have
19009 the @code{xface} support compiled into XEmacs.  Otherwise you must have
19010 the @code{netpbm} utilities installed, or munge the
19011 @code{gnus-picons-convert-x-face} variable to use something else.
19012
19013
19014 @node Easy Picons
19015 @subsubsection Easy Picons
19016
19017 To enable displaying picons, simply put the following line in your
19018 @file{~/.gnus} file and start Gnus.
19019
19020 @lisp
19021 (setq gnus-use-picons t)
19022 (setq gnus-treat-display-picons t)
19023 @end lisp
19024
19025 and make sure @code{gnus-picons-database} points to the directory
19026 containing the Picons databases.
19027
19028 Alternatively if you want to use the web piconsearch engine add this:
19029
19030 @lisp
19031 (setq gnus-picons-piconsearch-url
19032       "http://www.cs.indiana.edu:800/piconsearch")
19033 @end lisp
19034
19035
19036 @node Hard Picons
19037 @subsubsection Hard Picons
19038
19039 @iftex
19040 @iflatex
19041 \margindex{}
19042 @end iflatex
19043 @end iftex
19044
19045 Gnus can display picons for you as you enter and leave groups and
19046 articles.  It knows how to interact with three sections of the picons
19047 database.  Namely, it can display the picons newsgroup pictures,
19048 author's face picture(s), and the authors domain.  To enable this
19049 feature, you need to select where to get the picons from, and where to
19050 display them.
19051
19052 @table @code
19053
19054 @item gnus-picons-database
19055 @vindex gnus-picons-database
19056 The location of the picons database.  Should point to a directory
19057 containing the @file{news}, @file{domains}, @file{users} (and so on)
19058 subdirectories.  This is only useful if
19059 @code{gnus-picons-piconsearch-url} is @code{nil}.  Defaults to
19060 @file{/usr/local/faces/}.
19061
19062 @item gnus-picons-piconsearch-url
19063 @vindex gnus-picons-piconsearch-url
19064 The URL for the web picons search engine.  The only currently known
19065 engine is @uref{http://www.cs.indiana.edu:800/piconsearch}.  To
19066 workaround network delays, icons will be fetched in the background.  If
19067 this is @code{nil} 'the default), then picons are fetched from local
19068 database indicated by @code{gnus-picons-database}.
19069
19070 @item gnus-picons-display-where
19071 @vindex gnus-picons-display-where
19072 Where the picon images should be displayed.  It is @code{picons} by
19073 default (which by default maps to the buffer @samp{*Picons*}).  Other
19074 valid places could be @code{article}, @code{summary}, or
19075 @samp{*scratch*} for all I care.  Just make sure that you've made the
19076 buffer visible using the standard Gnus window configuration
19077 routines---@pxref{Window Layout}.
19078
19079 @item gnus-picons-group-excluded-groups
19080 @vindex gnus-picons-group-excluded-groups
19081 Groups that are matched by this regexp won't have their group icons
19082 displayed.
19083
19084 @end table
19085
19086 Note: If you set @code{gnus-use-picons} to @code{t}, it will set up your
19087 window configuration for you to include the @code{picons} buffer.
19088
19089 Now that you've made those decision, you need to add the following
19090 functions to the appropriate hooks so these pictures will get displayed
19091 at the right time.
19092
19093 @vindex gnus-picons-display-where
19094 @table @code
19095 @item gnus-article-display-picons
19096 @findex gnus-article-display-picons
19097 Looks up and displays the picons for the author and the author's domain
19098 in the @code{gnus-picons-display-where} buffer.
19099
19100 @item gnus-picons-article-display-x-face
19101 @findex gnus-article-display-picons
19102 Decodes and displays the X-Face header if present.
19103
19104 @end table
19105
19106
19107
19108 @node Picon Useless Configuration
19109 @subsubsection Picon Useless Configuration
19110
19111 @iftex
19112 @iflatex
19113 \margindex{}
19114 @end iflatex
19115 @end iftex
19116
19117 The following variables offer further control over how things are
19118 done, where things are located, and other useless stuff you really
19119 don't need to worry about.
19120
19121 @table @code
19122
19123 @item gnus-picons-news-directories
19124 @vindex gnus-picons-news-directories
19125 List of subdirectories to search in @code{gnus-picons-database} for
19126 newsgroups faces.  @code{("news")} is the default.
19127
19128 @item gnus-picons-user-directories
19129 @vindex gnus-picons-user-directories
19130 List of subdirectories to search in @code{gnus-picons-database} for user
19131 faces.  @code{("local" "users" "usenix" "misc")} is the default.
19132
19133 @item gnus-picons-domain-directories
19134 @vindex gnus-picons-domain-directories
19135 List of subdirectories to search in @code{gnus-picons-database} for
19136 domain name faces.  Defaults to @code{("domains")}.  Some people may
19137 want to add @samp{"unknown"} to this list.
19138
19139 @item gnus-picons-convert-x-face
19140 @vindex gnus-picons-convert-x-face
19141 If you don't have @code{xface} support builtin XEmacs, this is the
19142 command to use to convert the @code{X-Face} header to an X bitmap
19143 (@code{xbm}).  Defaults to @code{(format "@{ echo '/* Width=48,
19144 Height=48 */'; uncompface; @} | icontopbm | pbmtoxbm > %s"
19145 gnus-picons-x-face-file-name)}
19146
19147 @item gnus-picons-x-face-file-name
19148 @vindex gnus-picons-x-face-file-name
19149 Names a temporary file to store the @code{X-Face} bitmap in.  Defaults
19150 to @code{(format "/tmp/picon-xface.%s.xbm" (user-login-name))}.
19151
19152 @item gnus-picons-has-modeline-p
19153 @vindex gnus-picons-has-modeline-p
19154 If you have set @code{gnus-picons-display-where} to @code{picons}, your
19155 XEmacs frame will become really cluttered.  To alleviate this a bit you
19156 can set @code{gnus-picons-has-modeline-p} to @code{nil}; this will
19157 remove the mode line from the Picons buffer.  This is only useful if
19158 @code{gnus-picons-display-where} is @code{picons}.
19159
19160 @item gnus-picons-refresh-before-display
19161 @vindex gnus-picons-refresh-before-display
19162 If non-nil, display the article buffer before computing the picons.
19163 Defaults to @code{nil}.
19164
19165 @item gnus-picons-display-as-address
19166 @vindex gnus-picons-display-as-address
19167 If @code{t} display textual email addresses along with pictures.
19168 Defaults to @code{t}.
19169
19170 @item gnus-picons-file-suffixes
19171 @vindex gnus-picons-file-suffixes
19172 Ordered list of suffixes on picon file names to try.  Defaults to
19173 @code{("xpm" "gif" "xbm")} minus those not builtin your XEmacs.
19174
19175 @item gnus-picons-setup-hook
19176 @vindex gnus-picons-setup-hook
19177 Hook run in the picon buffer, if that is displayed.
19178
19179 @item gnus-picons-display-article-move-p
19180 @vindex gnus-picons-display-article-move-p
19181 Whether to move point to first empty line when displaying picons.  This
19182 has only an effect if `gnus-picons-display-where' has value `article'.
19183
19184 If @code{nil}, display the picons in the @code{From} and
19185 @code{Newsgroups} lines.  This is the default.
19186
19187 @item gnus-picons-clear-cache-on-shutdown
19188 @vindex gnus-picons-clear-cache-on-shutdown
19189 Whether to clear the picons cache when exiting gnus.  Gnus caches every
19190 picons it finds while it is running.  This saves some time in the search
19191 process but eats some memory.  If this variable is set to @code{nil},
19192 Gnus will never clear the cache itself; you will have to manually call
19193 @code{gnus-picons-clear-cache} to clear it.  Otherwise the cache will be
19194 cleared every time you exit Gnus.  Defaults to @code{t}.
19195
19196 @iftex
19197 @iflatex
19198 \margindex{}
19199 @end iflatex
19200 @end iftex
19201
19202 @end table
19203
19204 @node Smileys
19205 @subsection Smileys
19206 @cindex smileys
19207
19208 @iftex
19209 @iflatex
19210 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=tmp/BigFace.ps,height=20cm}}
19211 \input{smiley}
19212 @end iflatex
19213 @end iftex
19214
19215 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
19216 currently the only package that uses Smiley, it is documented here.
19217
19218 In short---to use Smiley in Gnus, put the following in your
19219 @file{.gnus.el} file:
19220
19221 @lisp
19222 (setq gnus-treat-display-smileys t)
19223 @end lisp
19224
19225 Smiley maps text smiley faces---@samp{:-)}, @samp{:-=}, @samp{:-(} and
19226 the like---to pictures and displays those instead of the text smiley
19227 faces.  The conversion is controlled by a list of regexps that matches
19228 text and maps that to file names.
19229
19230 @vindex smiley-nosey-regexp-alist
19231 @vindex smiley-deformed-regexp-alist
19232 Smiley supplies two example conversion alists by default:
19233 @code{smiley-deformed-regexp-alist} (which matches @samp{:)}, @samp{:(}
19234 and so on), and @code{smiley-nosey-regexp-alist} (which matches
19235 @samp{:-)}, @samp{:-(} and so on).
19236
19237 The alist used is specified by the @code{smiley-regexp-alist} variable,
19238 which defaults to the value of @code{smiley-deformed-regexp-alist}.
19239
19240 The first item in each element is the regexp to be matched; the second
19241 element is the regexp match group that is to be replaced by the picture;
19242 and the third element is the name of the file to be displayed.
19243
19244 The following variables customize where Smiley will look for these
19245 files, as well as the color to be used and stuff:
19246
19247 @table @code
19248
19249 @item smiley-data-directory
19250 @vindex smiley-data-directory
19251 Where Smiley will look for smiley faces files.
19252
19253 @item smiley-flesh-color
19254 @vindex smiley-flesh-color
19255 Skin color.  The default is @samp{yellow}, which is really racist.
19256
19257 @item smiley-features-color
19258 @vindex smiley-features-color
19259 Color of the features of the face.  The default is @samp{black}.
19260
19261 @item smiley-tongue-color
19262 @vindex smiley-tongue-color
19263 Color of the tongue.  The default is @samp{red}.
19264
19265 @item smiley-circle-color
19266 @vindex smiley-circle-color
19267 Color of the circle around the face.  The default is @samp{black}.
19268
19269 @item smiley-mouse-face
19270 @vindex smiley-mouse-face
19271 Face used for mouse highlighting over the smiley face.
19272
19273 @end table
19274
19275
19276 @node Toolbar
19277 @subsection Toolbar
19278
19279 @table @code
19280
19281 @iftex
19282 @iflatex
19283 \margindex{}
19284 @end iflatex
19285 @end iftex
19286
19287 @item gnus-use-toolbar
19288 @vindex gnus-use-toolbar
19289 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
19290 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
19291 @code{right-toolbar}, or @code{left-toolbar}.
19292
19293 @item gnus-group-toolbar
19294 @vindex gnus-group-toolbar
19295 The toolbar in the group buffer.
19296
19297 @item gnus-summary-toolbar
19298 @vindex gnus-summary-toolbar
19299 The toolbar in the summary buffer.
19300
19301 @item gnus-summary-mail-toolbar
19302 @vindex gnus-summary-mail-toolbar
19303 The toolbar in the summary buffer of mail groups.
19304
19305 @end table
19306
19307
19308 @node XVarious
19309 @subsection Various XEmacs Variables
19310
19311 @table @code
19312 @item gnus-xmas-glyph-directory
19313 @vindex gnus-xmas-glyph-directory
19314 This is where Gnus will look for pictures.  Gnus will normally
19315 auto-detect this directory, but you may set it manually if you have an
19316 unusual directory structure.
19317
19318 @item gnus-xmas-logo-color-alist
19319 @vindex gnus-xmas-logo-color-alist
19320 This is an alist where the key is a type symbol and the values are the
19321 foreground and background color of the splash page glyph.
19322
19323 @item gnus-xmas-logo-color-style
19324 @vindex gnus-xmas-logo-color-style
19325 This is the key used to look up the color in the alist described above.
19326 Valid values include @code{flame}, @code{pine}, @code{moss},
19327 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
19328 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
19329
19330 @item gnus-xmas-modeline-glyph
19331 @vindex gnus-xmas-modeline-glyph
19332 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
19333 default.
19334
19335 @iftex
19336 @iflatex
19337 \margindex{}
19338 @end iflatex
19339 @end iftex
19340
19341 @end table
19342
19343
19344
19345
19346 @node Fuzzy Matching
19347 @section Fuzzy Matching
19348 @cindex fuzzy matching
19349
19350 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
19351 things like scoring, thread gathering and thread comparison.
19352
19353 As opposed to regular expression matching, fuzzy matching is very fuzzy.
19354 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
19355 means, and the implementation has changed over time.
19356
19357 Basically, it tries to remove all noise from lines before comparing.
19358 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
19359 out of the strings before comparing the results.  This often leads to
19360 adequate results---even when faced with strings generated by text
19361 manglers masquerading as newsreaders.
19362
19363
19364 @node Thwarting Email Spam
19365 @section Thwarting Email Spam
19366 @cindex email spam
19367 @cindex spam
19368 @cindex UCE
19369 @cindex unsolicited commercial email
19370
19371 In these last days of the Usenet, commercial vultures are hanging about
19372 and grepping through news like crazy to find email addresses they can
19373 foist off their scams and products to.  As a reaction to this, many
19374 people have started putting nonsense addresses into their @code{From}
19375 lines.  I think this is counterproductive---it makes it difficult for
19376 people to send you legitimate mail in response to things you write, as
19377 well as making it difficult to see who wrote what.  This rewriting may
19378 perhaps be a bigger menace than the unsolicited commercial email itself
19379 in the end.
19380
19381 The biggest problem I have with email spam is that it comes in under
19382 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
19383 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
19384 mail group, only to find two pyramid schemes, seven advertisements
19385 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
19386 and one mail asking me to repent and find some god.
19387
19388 This is annoying.
19389
19390 The way to deal with this is having Gnus split out all spam into a
19391 @samp{spam} mail group (@pxref{Splitting Mail}).
19392
19393 First, pick one (1) valid mail address that you can be reached at, and
19394 put it in your @code{From} header of all your news articles.  (I've
19395 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
19396 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
19397 sysadmin whether your sendmail installation accepts keywords in the local
19398 part of the mail address.)
19399
19400 @lisp
19401 (setq message-default-news-headers
19402       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
19403 @end lisp
19404
19405 Then put the following split rule in @code{nnmail-split-fancy}
19406 (@pxref{Fancy Mail Splitting}):
19407
19408 @lisp
19409 (
19410  ...
19411  (to "larsi@@trym.ifi.uio.no"
19412       (| ("subject" "re:.*" "misc")
19413          ("references" ".*@@.*" "misc")
19414          "spam"))
19415  ...
19416 )
19417 @end lisp
19418
19419 This says that all mail to this address is suspect, but if it has a
19420 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
19421 header, it's probably ok.  All the rest goes to the @samp{spam} group.
19422 (This idea probably comes from Tim Pierce.)
19423
19424 In addition, many mail spammers talk directly to your @code{smtp} server
19425 and do not include your email address explicitly in the @code{To}
19426 header.  Why they do this is unknown---perhaps it's to thwart this
19427 thwarting scheme?  In any case, this is trivial to deal with---you just
19428 put anything not addressed to you in the @samp{spam} group by ending
19429 your fancy split rule in this way:
19430
19431 @lisp
19432 (
19433  ...
19434  (to "larsi" "misc")
19435  "spam")
19436 @end lisp
19437
19438 In my experience, this will sort virtually everything into the right
19439 group.  You still have to check the @samp{spam} group from time to time to
19440 check for legitimate mail, though.  If you feel like being a good net
19441 citizen, you can even send off complaints to the proper authorities on
19442 each unsolicited commercial email---at your leisure.
19443
19444 If you are also a lazy net citizen, you will probably prefer complaining
19445 automatically with the @file{gnus-junk.el} package, available FOR FREE
19446 at @* @uref{http://stud2.tuwien.ac.at/~e9426626/gnus-junk.html}.
19447 Since most e-mail spam is sent automatically, this may reconcile the
19448 cosmic balance somewhat.
19449
19450 This works for me.  It allows people an easy way to contact me (they can
19451 just press @kbd{r} in the usual way), and I'm not bothered at all with
19452 spam.  It's a win-win situation.  Forging @code{From} headers to point
19453 to non-existent domains is yucky, in my opinion.
19454
19455
19456 @node Various Various
19457 @section Various Various
19458 @cindex mode lines
19459 @cindex highlights
19460
19461 @table @code
19462
19463 @item gnus-home-directory
19464 All Gnus path variables will be initialized from this variable, which
19465 defaults to @file{~/}.
19466
19467 @item gnus-directory
19468 @vindex gnus-directory
19469 Most Gnus storage path variables will be initialized from this variable,
19470 which defaults to the @samp{SAVEDIR} environment variable, or
19471 @file{~/News/} if that variable isn't set.
19472
19473 Note that gnus is mostly loaded when the @file{.gnus.el} file is read.
19474 This means that other directory variables that are initialized from this
19475 variable won't be set properly if you set this variable in
19476 @file{.gnus.el}.  Set this variable in @file{.emacs} instead.
19477
19478 @item gnus-default-directory
19479 @vindex gnus-default-directory
19480 Not related to the above variable at all---this variable says what the
19481 default directory of all Gnus buffers should be.  If you issue commands
19482 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
19483 default directory.  If this variable is @code{nil} (which is the
19484 default), the default directory will be the default directory of the
19485 buffer you were in when you started Gnus.
19486
19487 @item gnus-verbose
19488 @vindex gnus-verbose
19489 This variable is an integer between zero and ten.  The higher the value,
19490 the more messages will be displayed.  If this variable is zero, Gnus
19491 will never flash any messages, if it is seven (which is the default),
19492 most important messages will be shown, and if it is ten, Gnus won't ever
19493 shut up, but will flash so many messages it will make your head swim.
19494
19495 @item gnus-verbose-backends
19496 @vindex gnus-verbose-backends
19497 This variable works the same way as @code{gnus-verbose}, but it applies
19498 to the Gnus backends instead of Gnus proper.
19499
19500 @item nnheader-max-head-length
19501 @vindex nnheader-max-head-length
19502 When the backends read straight heads of articles, they all try to read
19503 as little as possible.  This variable (default 4096) specifies
19504 the absolute max length the backends will try to read before giving up
19505 on finding a separator line between the head and the body.  If this
19506 variable is @code{nil}, there is no upper read bound.  If it is
19507 @code{t}, the backends won't try to read the articles piece by piece,
19508 but read the entire articles.  This makes sense with some versions of
19509 @code{ange-ftp} or @code{efs}.
19510
19511 @item nnheader-head-chop-length
19512 @vindex nnheader-head-chop-length
19513 This variable (default 2048) says how big a piece of each article to
19514 read when doing the operation described above.
19515
19516 @item nnheader-file-name-translation-alist
19517 @vindex nnheader-file-name-translation-alist
19518 @cindex file names
19519 @cindex invalid characters in file names
19520 @cindex characters in file names
19521 This is an alist that says how to translate characters in file names.
19522 For instance, if @samp{:} is invalid as a file character in file names
19523 on your system (you OS/2 user you), you could say something like:
19524
19525 @lisp
19526 (setq nnheader-file-name-translation-alist
19527       '((?: . ?_)))
19528 @end lisp
19529
19530 In fact, this is the default value for this variable on OS/2 and MS
19531 Windows (phooey) systems.
19532
19533 @item gnus-hidden-properties
19534 @vindex gnus-hidden-properties
19535 This is a list of properties to use to hide ``invisible'' text.  It is
19536 @code{(invisible t intangible t)} by default on most systems, which
19537 makes invisible text invisible and intangible.
19538
19539 @item gnus-parse-headers-hook
19540 @vindex gnus-parse-headers-hook
19541 A hook called before parsing headers.  It can be used, for instance, to
19542 gather statistics on the headers fetched, or perhaps you'd like to prune
19543 some headers.  I don't see why you'd want that, though.
19544
19545 @item gnus-shell-command-separator
19546 @vindex gnus-shell-command-separator
19547 String used to separate two shell commands.  The default is @samp{;}.
19548
19549 @item gnus-invalid-group-regexp
19550 @vindex gnus-invalid-group-regexp
19551
19552 Regexp to match ``invalid'' group names when querying user for a group
19553 name.  The default value catches some @strong{really} invalid group
19554 names who could possibly mess up Gnus internally (like allowing
19555 @samp{:} in a group name, which is normally used to delimit method and
19556 group).
19557
19558 @sc{imap} users might want to allow @samp{/} in group names though.
19559
19560
19561 @end table
19562
19563
19564 @node The End
19565 @chapter The End
19566
19567 Well, that's the manual---you can get on with your life now.  Keep in
19568 touch.  Say hello to your cats from me.
19569
19570 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
19571
19572 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
19573
19574 @quotation
19575 @strong{Te Deum}
19576
19577 @sp 1
19578 Not because of victories @*
19579 I sing,@*
19580 having none,@*
19581 but for the common sunshine,@*
19582 the breeze,@*
19583 the largess of the spring.
19584
19585 @sp 1
19586 Not for victory@*
19587 but for the day's work done@*
19588 as well as I was able;@*
19589 not for a seat upon the dais@*
19590 but at the common table.@*
19591 @end quotation
19592
19593
19594 @node Appendices
19595 @chapter Appendices
19596
19597 @menu
19598 * History::                     How Gnus got where it is today.
19599 * On Writing Manuals::          Why this is not a beginner's guide.
19600 * Terminology::                 We use really difficult, like, words here.
19601 * Customization::               Tailoring Gnus to your needs.
19602 * Troubleshooting::             What you might try if things do not work.
19603 * Gnus Reference Guide::        Rilly, rilly technical stuff.
19604 * Emacs for Heathens::          A short introduction to Emacsian terms.
19605 * Frequently Asked Questions::
19606 @end menu
19607
19608
19609 @node History
19610 @section History
19611
19612 @cindex history
19613 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
19614 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
19615
19616 If you want to investigate the person responsible for this outrage,
19617 you can point your (feh!) web browser to
19618 @uref{http://quimby.gnus.org/}.  This is also the primary
19619 distribution point for the new and spiffy versions of Gnus, and is
19620 known as The Site That Destroys Newsrcs And Drives People Mad.
19621
19622 During the first extended alpha period of development, the new Gnus was
19623 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
19624 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
19625 (Besides, the ``Gnus'' in this abbreviation should probably be
19626 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
19627 appropriate name, don't you think?)
19628
19629 In any case, after spending all that energy on coming up with a new and
19630 spunky name, we decided that the name was @emph{too} spunky, so we
19631 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
19632 ``@sc{gnus}''.  New vs. old.
19633
19634 @menu
19635 * Gnus Versions::               What Gnus versions have been released.
19636 * Other Gnus Versions::         Other Gnus versions that also have been released.
19637 * Why?::                        What's the point of Gnus?
19638 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
19639 * Conformity::                  Gnus tries to conform to all standards.
19640 * Emacsen::                     Gnus can be run on a few modern Emacsen.
19641 * Gnus Development::            How Gnus is developed.
19642 * Contributors::                Oodles of people.
19643 * New Features::                Pointers to some of the new stuff in Gnus.
19644 @end menu
19645
19646
19647 @node Gnus Versions
19648 @subsection Gnus Versions
19649 @cindex Pterodactyl Gnus
19650 @cindex ding Gnus
19651 @cindex September Gnus
19652 @cindex Quassia Gnus
19653
19654 The first ``proper'' release of Gnus 5 was done in November 1995 when it
19655 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
19656 plus 15 Gnus 5.0 releases).
19657
19658 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
19659 releases)) was released under the name ``Gnus 5.2'' (40 releases).
19660
19661 On July 28th 1996 work on Red Gnus was begun, and it was released on
19662 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
19663
19664 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
19665 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
19666
19667 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
19668 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
19669 1999.
19670
19671 On the 26th of October 2000, Oort Gnus was begun.
19672
19673 If you happen upon a version of Gnus that has a prefixed name --
19674 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
19675 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
19676 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
19677 run.  Walk away, calmly, until you're out of its reach.  Find a proper
19678 released version of Gnus and snuggle up to that instead.
19679
19680
19681 @node Other Gnus Versions
19682 @subsection Other Gnus Versions
19683 @cindex Semi-gnus
19684
19685 In addition to the versions of Gnus which have had their releases
19686 coordinated by Lars, one major development has been Semi-gnus from
19687 Japan.  It's based on a library called @sc{semi}, which provides
19688 @sc{mime} capabilities.
19689
19690 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
19691 Collectively, they are called ``Semi-gnus'', and different strains are
19692 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
19693 @sc{mime} and multilingualization things, especially important for
19694 Japanese users.
19695
19696
19697 @node Why?
19698 @subsection Why?
19699
19700 What's the point of Gnus?
19701
19702 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
19703 newsreader, that lets you do anything you can think of.  That was my
19704 original motivation, but while working on Gnus, it has become clear to
19705 me that this generation of newsreaders really belong in the stone age.
19706 Newsreaders haven't developed much since the infancy of the net.  If the
19707 volume continues to rise with the current rate of increase, all current
19708 newsreaders will be pretty much useless.  How do you deal with
19709 newsgroups that have thousands of new articles each day?  How do you
19710 keep track of millions of people who post?
19711
19712 Gnus offers no real solutions to these questions, but I would very much
19713 like to see Gnus being used as a testing ground for new methods of
19714 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
19715 to separate the newsreader from the backends, Gnus now offers a simple
19716 interface for anybody who wants to write new backends for fetching mail
19717 and news from different sources.  I have added hooks for customizations
19718 everywhere I could imagine it being useful.  By doing so, I'm inviting
19719 every one of you to explore and invent.
19720
19721 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
19722 @kbd{C-u 100 M-x all-hail-xemacs}.
19723
19724
19725 @node Compatibility
19726 @subsection Compatibility
19727
19728 @cindex compatibility
19729 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
19730 bindings have been kept.  More key bindings have been added, of course,
19731 but only in one or two obscure cases have old bindings been changed.
19732
19733 Our motto is:
19734 @quotation
19735 @cartouche
19736 @center In a cloud bones of steel.
19737 @end cartouche
19738 @end quotation
19739
19740 All commands have kept their names.  Some internal functions have changed
19741 their names.
19742
19743 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
19744 Articles}.
19745
19746 One major compatibility question is the presence of several summary
19747 buffers.  All variables relevant while reading a group are
19748 buffer-local to the summary buffer they belong in.  Although many
19749 important variables have their values copied into their global
19750 counterparts whenever a command is executed in the summary buffer, this
19751 change might lead to incorrect values being used unless you are careful.
19752
19753 All code that relies on knowledge of @sc{gnus} internals will probably
19754 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
19755 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
19756 maintains a hash table that points to the entries in this alist (which
19757 speeds up many functions), and changing the alist directly will lead to
19758 peculiar results.
19759
19760 @cindex hilit19
19761 @cindex highlighting
19762 Old hilit19 code does not work at all.  In fact, you should probably
19763 remove all hilit code from all Gnus hooks
19764 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
19765 Gnus provides various integrated functions for highlighting.  These are
19766 faster and more accurate.  To make life easier for everybody, Gnus will
19767 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
19768 Away!
19769
19770 Packages like @code{expire-kill} will no longer work.  As a matter of
19771 fact, you should probably remove all old @sc{gnus} packages (and other
19772 code) when you start using Gnus.  More likely than not, Gnus already
19773 does what you have written code to make @sc{gnus} do.  (Snicker.)
19774
19775 Even though old methods of doing things are still supported, only the
19776 new methods are documented in this manual.  If you detect a new method of
19777 doing something while reading this manual, that does not mean you have
19778 to stop doing it the old way.
19779
19780 Gnus understands all @sc{gnus} startup files.
19781
19782 @kindex M-x gnus-bug
19783 @findex gnus-bug
19784 @cindex reporting bugs
19785 @cindex bugs
19786 Overall, a casual user who hasn't written much code that depends on
19787 @sc{gnus} internals should suffer no problems.  If problems occur,
19788 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
19789
19790 @vindex gnus-bug-create-help-buffer
19791 If you are in the habit of sending bug reports @emph{very} often, you
19792 may find the helpful help buffer annoying after a while.  If so, set
19793 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
19794 up at you.
19795
19796
19797 @node Conformity
19798 @subsection Conformity
19799
19800 No rebels without a clue here, ma'am.  We conform to all standards known
19801 to (wo)man.  Except for those standards and/or conventions we disagree
19802 with, of course.
19803
19804 @table @strong
19805
19806 @item RFC 822
19807 @cindex RFC 822
19808 There are no known breaches of this standard.
19809
19810 @item RFC 1036
19811 @cindex RFC 1036
19812 There are no known breaches of this standard, either.
19813
19814 @item Son-of-RFC 1036
19815 @cindex Son-of-RFC 1036
19816 We do have some breaches to this one.
19817
19818 @table @emph
19819
19820 @item X-Newsreader
19821 @itemx User-Agent
19822 These are considered to be ``vanity headers'', while I consider them
19823 to be consumer information.  After seeing so many badly formatted
19824 articles coming from @code{tin} and @code{Netscape} I know not to use
19825 either of those for posting articles.  I would not have known that if
19826 it wasn't for the @code{X-Newsreader} header.
19827 @end table
19828
19829 @item USEFOR
19830 @cindex USEFOR
19831 USEFOR is an IETF working group writing a successor to RFC 1036, based
19832 on Son-of-RFC 1036.  They have produced a number of drafts proposing
19833 various changes to the format of news articles.  The Gnus towers will
19834 look into implementing the changes when the draft is accepted as an RFC.
19835
19836 @end table
19837
19838 If you ever notice Gnus acting non-compliant with regards to the texts
19839 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
19840 know.
19841
19842
19843 @node Emacsen
19844 @subsection Emacsen
19845 @cindex Emacsen
19846 @cindex XEmacs
19847 @cindex Mule
19848 @cindex Emacs
19849
19850 Gnus should work on :
19851
19852 @itemize @bullet
19853
19854 @item
19855 Emacs 20.3 and up.
19856
19857 @item
19858 XEmacs 21.1.1 and up.
19859
19860 @end itemize
19861
19862 This Gnus version will absolutely not work on any Emacsen older than
19863 that.  Not reliably, at least.  Older versions of Gnus may work on older
19864 Emacs versions.  However, T-gnus does support ``Mule 2.3 based on Emacs
19865 19.34'' and possibly the versions of XEmacs prior to 21.1.1, e.g. 20.4.
19866 See the file ``README'' in the T-gnus distribution for more details.
19867
19868 There are some vague differences between Gnus on the various
19869 platforms---XEmacs features more graphics (a logo and a toolbar)---but
19870 other than that, things should look pretty much the same under all
19871 Emacsen.
19872
19873
19874 @node Gnus Development
19875 @subsection Gnus Development
19876
19877 Gnus is developed in a two-phased cycle.  The first phase involves much
19878 discussion on the @samp{ding@@gnus.org} mailing list, where people
19879 propose changes and new features, post patches and new backends.  This
19880 phase is called the @dfn{alpha} phase, since the Gnusae released in this
19881 phase are @dfn{alpha releases}, or (perhaps more commonly in other
19882 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
19883 unstable and should not be used by casual users.  Gnus alpha releases
19884 have names like ``Red Gnus'' and ``Quassia Gnus''.
19885
19886 After futzing around for 50-100 alpha releases, Gnus is declared
19887 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
19888 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
19889 supposed to be able to use these, and these are mostly discussed on the
19890 @samp{gnu.emacs.gnus} newsgroup.
19891
19892 @cindex Incoming*
19893 @vindex mail-source-delete-incoming
19894 Some variable defaults differ between alpha Gnusae and released Gnusae.
19895 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
19896 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
19897 lossage of mail if an alpha release hiccups while handling the mail.
19898
19899 The division of discussion between the ding mailing list and the Gnus
19900 newsgroup is not purely based on publicity concerns.  It's true that
19901 having people write about the horrible things that an alpha Gnus release
19902 can do (sometimes) in a public forum may scare people off, but more
19903 importantly, talking about new experimental features that have been
19904 introduced may confuse casual users.  New features are frequently
19905 introduced, fiddled with, and judged to be found wanting, and then
19906 either discarded or totally rewritten.  People reading the mailing list
19907 usually keep up with these rapid changes, while people on the newsgroup
19908 can't be assumed to do so.
19909
19910
19911
19912 @node Contributors
19913 @subsection Contributors
19914 @cindex contributors
19915
19916 The new Gnus version couldn't have been done without the help of all the
19917 people on the (ding) mailing list.  Every day for over a year I have
19918 gotten billions of nice bug reports from them, filling me with joy,
19919 every single one of them.  Smooches.  The people on the list have been
19920 tried beyond endurance, what with my ``oh, that's a neat idea <type
19921 type>, yup, I'll release it right away <ship off> no wait, that doesn't
19922 work at all <type type>, yup, I'll ship that one off right away <ship
19923 off> no, wait, that absolutely does not work'' policy for releases.
19924 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
19925 ``worser''? ``much worser''?  ``worsest''?)
19926
19927 I would like to take this opportunity to thank the Academy for...  oops,
19928 wrong show.
19929
19930 @itemize @bullet
19931
19932 @item
19933 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
19934
19935 @item
19936 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
19937 nnwarchive and many, many other things connected with @sc{mime} and
19938 other types of en/decoding, as well as general bug fixing, new
19939 functionality and stuff.
19940
19941 @item
19942 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
19943 well as numerous other things).
19944
19945 @item
19946 Luis Fernandes---design and graphics.
19947
19948 @item
19949 Justin Sheehy--the FAQ maintainer.
19950
19951 @item
19952 Erik Naggum---help, ideas, support, code and stuff.
19953
19954 @item
19955 Wes Hardaker---@file{gnus-picon.el} and the manual section on
19956 @dfn{picons} (@pxref{Picons}).
19957
19958 @item
19959 Kim-Minh Kaplan---further work on the picon code.
19960
19961 @item
19962 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
19963 (@pxref{GroupLens}).
19964
19965 @item
19966 Sudish Joseph---innumerable bug fixes.
19967
19968 @item
19969 Ilja Weis---@file{gnus-topic.el}.
19970
19971 @item
19972 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
19973
19974 @item
19975 Vladimir Alexiev---the refcard and reference booklets.
19976
19977 @item
19978 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
19979 distribution by Felix Lee and JWZ.
19980
19981 @item
19982 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
19983
19984 @item
19985 Peter Mutsaers---orphan article scoring code.
19986
19987 @item
19988 Ken Raeburn---POP mail support.
19989
19990 @item
19991 Hallvard B Furuseth---various bits and pieces, especially dealing with
19992 .newsrc files.
19993
19994 @item
19995 Brian Edmonds---@file{gnus-bbdb.el}.
19996
19997 @item
19998 David Moore---rewrite of @file{nnvirtual.el} and many other things.
19999
20000 @item
20001 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
20002
20003 @item
20004 François Pinard---many, many interesting and thorough bug reports, as
20005 well as autoconf support.
20006
20007 @end itemize
20008
20009 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
20010 Borges, and Jost Krieger proof-reading parts of the manual.
20011
20012 The following people have contributed many patches and suggestions:
20013
20014 Christopher Davis,
20015 Andrew Eskilsson,
20016 Kai Grossjohann,
20017 David KÃ¥gedal,
20018 Richard Pieri,
20019 Fabrice Popineau,
20020 Daniel Quinlan,
20021 Jason L. Tibbitts, III,
20022 and
20023 Jack Vinson.
20024
20025 Also thanks to the following for patches and stuff:
20026
20027 Jari Aalto,
20028 Adrian Aichner,
20029 Vladimir Alexiev,
20030 Russ Allbery,
20031 Peter Arius,
20032 Matt Armstrong,
20033 Marc Auslander,
20034 Miles Bader,
20035 Alexei V. Barantsev,
20036 Frank Bennett,
20037 Robert Bihlmeyer,
20038 Chris Bone,
20039 Mark Borges,
20040 Mark Boyns,
20041 Lance A. Brown,
20042 Rob Browning,
20043 Kees de Bruin,
20044 Martin Buchholz,
20045 Joe Buehler,
20046 Kevin Buhr,
20047 Alastair Burt,
20048 Joao Cachopo,
20049 Zlatko Calusic,
20050 Massimo Campostrini,
20051 Castor,
20052 David Charlap,
20053 Dan Christensen,
20054 Kevin Christian,
20055 Jae-you Chung, @c ?
20056 James H. Cloos, Jr.,
20057 Laura Conrad,
20058 Michael R. Cook,
20059 Glenn Coombs,
20060 Andrew J. Cosgriff,
20061 Neil Crellin,
20062 Frank D. Cringle,
20063 Geoffrey T. Dairiki,
20064 Andre Deparade,
20065 Ulrik Dickow,
20066 Dave Disser,
20067 Rui-Tao Dong, @c ?
20068 Joev Dubach,
20069 Michael Welsh Duggan,
20070 Dave Edmondson,
20071 Paul Eggert,
20072 Mark W. Eichin,
20073 Karl Eichwalder,
20074 Enami Tsugutomo, @c Enami
20075 Michael Ernst,
20076 Luc Van Eycken,
20077 Sam Falkner,
20078 Nelson Jose dos Santos Ferreira,
20079 Sigbjorn Finne,
20080 Sven Fischer,
20081 Paul Fisher,
20082 Decklin Foster,
20083 Gary D. Foster,
20084 Paul Franklin,
20085 Guy Geens,
20086 Arne Georg Gleditsch,
20087 David S. Goldberg,
20088 Michelangelo Grigni,
20089 Dale Hagglund,
20090 D. Hall,
20091 Magnus Hammerin,
20092 Kenichi Handa, @c Handa
20093 Raja R. Harinath,
20094 Yoshiki Hayashi, @c ?
20095 P. E. Jareth Hein,
20096 Hisashige Kenji, @c Hisashige
20097 Scott Hofmann,
20098 Marc Horowitz,
20099 Gunnar Horrigmo,
20100 Richard Hoskins,
20101 Brad Howes,
20102 Miguel de Icaza,
20103 François Felix Ingrand,
20104 Tatsuya Ichikawa, @c ?
20105 Ishikawa Ichiro, @c Ishikawa
20106 Lee Iverson,
20107 Iwamuro Motonori, @c Iwamuro
20108 Rajappa Iyer,
20109 Andreas Jaeger,
20110 Adam P. Jenkins,
20111 Randell Jesup,
20112 Fred Johansen,
20113 Gareth Jones,
20114 Simon Josefsson,
20115 Greg Klanderman,
20116 Karl Kleinpaste,
20117 Michael Klingbeil,
20118 Peter Skov Knudsen,
20119 Shuhei Kobayashi, @c Kobayashi
20120 Petr Konecny,
20121 Koseki Yoshinori, @c Koseki
20122 Thor Kristoffersen,
20123 Jens Lautenbacher,
20124 Martin Larose,
20125 Seokchan Lee, @c Lee
20126 Joerg Lenneis,
20127 Carsten Leonhardt,
20128 James LewisMoss,
20129 Christian Limpach,
20130 Markus Linnala,
20131 Dave Love,
20132 Mike McEwan,
20133 Tonny Madsen,
20134 Shlomo Mahlab,
20135 Nat Makarevitch,
20136 Istvan Marko,
20137 David Martin,
20138 Jason R. Mastaler,
20139 Gordon Matzigkeit,
20140 Timo Metzemakers,
20141 Richard Mlynarik,
20142 Lantz Moore,
20143 Morioka Tomohiko, @c Morioka
20144 Erik Toubro Nielsen,
20145 Hrvoje Niksic,
20146 Andy Norman,
20147 Fred Oberhauser,
20148 C. R. Oldham,
20149 Alexandre Oliva,
20150 Ken Olstad,
20151 Masaharu Onishi, @c Onishi
20152 Hideki Ono, @c Ono
20153 Ettore Perazzoli,
20154 William Perry,
20155 Stephen Peters,
20156 Jens-Ulrik Holger Petersen,
20157 Ulrich Pfeifer,
20158 Matt Pharr,
20159 Andy Piper,
20160 John McClary Prevost,
20161 Bill Pringlemeir,
20162 Mike Pullen,
20163 Jim Radford,
20164 Colin Rafferty,
20165 Lasse Rasinen,
20166 Lars Balker Rasmussen,
20167 Joe Reiss,
20168 Renaud Rioboo,
20169 Roland B. Roberts,
20170 Bart Robinson,
20171 Christian von Roques,
20172 Markus Rost,
20173 Jason Rumney,
20174 Wolfgang Rupprecht,
20175 Jay Sachs,
20176 Dewey M. Sasser,
20177 Conrad Sauerwald,
20178 Loren Schall,
20179 Dan Schmidt,
20180 Ralph Schleicher,
20181 Philippe Schnoebelen,
20182 Andreas Schwab,
20183 Randal L. Schwartz,
20184 Danny Siu,
20185 Matt Simmons,
20186 Paul D. Smith,
20187 Jeff Sparkes,
20188 Toby Speight,
20189 Michael Sperber,
20190 Darren Stalder,
20191 Richard Stallman,
20192 Greg Stark,
20193 Sam Steingold,
20194 Paul Stevenson,
20195 Jonas Steverud,
20196 Paul Stodghill,
20197 Kiyokazu Suto, @c Suto
20198 Kurt Swanson,
20199 Samuel Tardieu,
20200 Teddy,
20201 Chuck Thompson,
20202 Tozawa Akihiko, @c Tozawa
20203 Philippe Troin,
20204 James Troup,
20205 Trung Tran-Duc,
20206 Jack Twilley,
20207 Aaron M. Ucko,
20208 Aki Vehtari,
20209 Didier Verna,
20210 Vladimir Volovich,
20211 Jan Vroonhof,
20212 Stefan Waldherr,
20213 Pete Ware,
20214 Barry A. Warsaw,
20215 Christoph Wedler,
20216 Joe Wells,
20217 Lee Willis,
20218 Katsumi Yamaoka @c Yamaoka
20219 and
20220 Lloyd Zusman.
20221
20222
20223 For a full overview of what each person has done, the ChangeLogs
20224 included in the Gnus alpha distributions should give ample reading
20225 (550kB and counting).
20226
20227 Apologies to everybody that I've forgotten, of which there are many, I'm
20228 sure.
20229
20230 Gee, that's quite a list of people.  I guess that must mean that there
20231 actually are people who are using Gnus.  Who'd'a thunk it!
20232
20233
20234 @node New Features
20235 @subsection New Features
20236 @cindex new features
20237
20238 @menu
20239 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
20240 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
20241 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
20242 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
20243 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
20244 @end menu
20245
20246 These lists are, of course, just @emph{short} overviews of the
20247 @emph{most} important new features.  No, really.  There are tons more.
20248 Yes, we have feeping creaturism in full effect.
20249
20250 @node ding Gnus
20251 @subsubsection (ding) Gnus
20252
20253 New features in Gnus 5.0/5.1:
20254
20255 @itemize @bullet
20256
20257 @item
20258 The look of all buffers can be changed by setting format-like variables
20259 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
20260
20261 @item
20262 Local spool and several @sc{nntp} servers can be used at once
20263 (@pxref{Select Methods}).
20264
20265 @item
20266 You can combine groups into virtual groups (@pxref{Virtual Groups}).
20267
20268 @item
20269 You can read a number of different mail formats (@pxref{Getting Mail}).
20270 All the mail backends implement a convenient mail expiry scheme
20271 (@pxref{Expiring Mail}).
20272
20273 @item
20274 Gnus can use various strategies for gathering threads that have lost
20275 their roots (thereby gathering loose sub-threads into one thread) or it
20276 can go back and retrieve enough headers to build a complete thread
20277 (@pxref{Customizing Threading}).
20278
20279 @item
20280 Killed groups can be displayed in the group buffer, and you can read
20281 them as well (@pxref{Listing Groups}).
20282
20283 @item
20284 Gnus can do partial group updates---you do not have to retrieve the
20285 entire active file just to check for new articles in a few groups
20286 (@pxref{The Active File}).
20287
20288 @item
20289 Gnus implements a sliding scale of subscribedness to groups
20290 (@pxref{Group Levels}).
20291
20292 @item
20293 You can score articles according to any number of criteria
20294 (@pxref{Scoring}).  You can even get Gnus to find out how to score
20295 articles for you (@pxref{Adaptive Scoring}).
20296
20297 @item
20298 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
20299 manner, so it should be difficult to lose much data on what you have
20300 read if your machine should go down (@pxref{Auto Save}).
20301
20302 @item
20303 Gnus now has its own startup file (@file{.gnus}) to avoid cluttering up
20304 the @file{.emacs} file.
20305
20306 @item
20307 You can set the process mark on both groups and articles and perform
20308 operations on all the marked items (@pxref{Process/Prefix}).
20309
20310 @item
20311 You can grep through a subset of groups and create a group from the
20312 results (@pxref{Kibozed Groups}).
20313
20314 @item
20315 You can list subsets of groups according to, well, anything
20316 (@pxref{Listing Groups}).
20317
20318 @item
20319 You can browse foreign servers and subscribe to groups from those
20320 servers (@pxref{Browse Foreign Server}).
20321
20322 @item
20323 Gnus can fetch articles, asynchronously, on a second connection to the
20324 server (@pxref{Asynchronous Fetching}).
20325
20326 @item
20327 You can cache articles locally (@pxref{Article Caching}).
20328
20329 @item
20330 The uudecode functions have been expanded and generalized
20331 (@pxref{Decoding Articles}).
20332
20333 @item
20334 You can still post uuencoded articles, which was a little-known feature
20335 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
20336
20337 @item
20338 Fetching parents (and other articles) now actually works without
20339 glitches (@pxref{Finding the Parent}).
20340
20341 @item
20342 Gnus can fetch FAQs and group descriptions (@pxref{Group Information}).
20343
20344 @item
20345 Digests (and other files) can be used as the basis for groups
20346 (@pxref{Document Groups}).
20347
20348 @item
20349 Articles can be highlighted and customized (@pxref{Customizing
20350 Articles}).
20351
20352 @item
20353 URLs and other external references can be buttonized (@pxref{Article
20354 Buttons}).
20355
20356 @item
20357 You can do lots of strange stuff with the Gnus window & frame
20358 configuration (@pxref{Window Layout}).
20359
20360 @item
20361 You can click on buttons instead of using the keyboard
20362 (@pxref{Buttons}).
20363
20364 @end itemize
20365
20366
20367 @node September Gnus
20368 @subsubsection September Gnus
20369
20370 @iftex
20371 @iflatex
20372 \gnusfig{-28cm}{0cm}{\epsfig{figure=tmp/september.ps,height=20cm}}
20373 @end iflatex
20374 @end iftex
20375
20376 New features in Gnus 5.2/5.3:
20377
20378 @itemize @bullet
20379
20380 @item
20381 A new message composition mode is used.  All old customization variables
20382 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
20383 now obsolete.
20384
20385 @item
20386 Gnus is now able to generate @dfn{sparse} threads---threads where
20387 missing articles are represented by empty nodes (@pxref{Customizing
20388 Threading}).
20389
20390 @lisp
20391 (setq gnus-build-sparse-threads 'some)
20392 @end lisp
20393
20394 @item
20395 Outgoing articles are stored on a special archive server
20396 (@pxref{Archived Messages}).
20397
20398 @item
20399 Partial thread regeneration now happens when articles are
20400 referred.
20401
20402 @item
20403 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
20404
20405 @item
20406 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
20407
20408 @item
20409 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
20410
20411 @lisp
20412 (setq gnus-use-trees t)
20413 @end lisp
20414
20415 @item
20416 An @code{nn}-like pick-and-read minor mode is available for the summary
20417 buffers (@pxref{Pick and Read}).
20418
20419 @lisp
20420 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
20421 @end lisp
20422
20423 @item
20424 In binary groups you can use a special binary minor mode (@pxref{Binary
20425 Groups}).
20426
20427 @item
20428 Groups can be grouped in a folding topic hierarchy (@pxref{Group
20429 Topics}).
20430
20431 @lisp
20432 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
20433 @end lisp
20434
20435 @item
20436 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
20437
20438 @item
20439 Groups can now have a score, and bubbling based on entry frequency
20440 is possible (@pxref{Group Score}).
20441
20442 @lisp
20443 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
20444 @end lisp
20445
20446 @item
20447 Groups can be process-marked, and commands can be performed on
20448 groups of groups (@pxref{Marking Groups}).
20449
20450 @item
20451 Caching is possible in virtual groups.
20452
20453 @item
20454 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
20455 news batches, ClariNet briefs collections, and just about everything
20456 else (@pxref{Document Groups}).
20457
20458 @item
20459 Gnus has a new backend (@code{nnsoup}) to create/read SOUP packets
20460 (@pxref{SOUP}).
20461
20462 @item
20463 The Gnus cache is much faster.
20464
20465 @item
20466 Groups can be sorted according to many criteria (@pxref{Sorting
20467 Groups}).
20468
20469 @item
20470 New group parameters have been introduced to set list-addresses and
20471 expiry times (@pxref{Group Parameters}).
20472
20473 @item
20474 All formatting specs allow specifying faces to be used
20475 (@pxref{Formatting Fonts}).
20476
20477 @item
20478 There are several more commands for setting/removing/acting on process
20479 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
20480
20481 @item
20482 The summary buffer can be limited to show parts of the available
20483 articles based on a wide range of criteria.  These commands have been
20484 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
20485
20486 @item
20487 Articles can be made persistent with the @kbd{*} command
20488 (@pxref{Persistent Articles}).
20489
20490 @item
20491 All functions for hiding article elements are now toggles.
20492
20493 @item
20494 Article headers can be buttonized (@pxref{Article Washing}).
20495
20496 @item
20497 All mail backends support fetching articles by @code{Message-ID}.
20498
20499 @item
20500 Duplicate mail can now be treated properly (@pxref{Duplicates}).
20501
20502 @item
20503 All summary mode commands are available directly from the article
20504 buffer (@pxref{Article Keymap}).
20505
20506 @item
20507 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
20508 Layout}).
20509
20510 @item
20511 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
20512 @iftex
20513 @iflatex
20514 \marginpar[\mbox{}\hfill\epsfig{figure=tmp/fseptember.ps,height=5cm}]{\epsfig{figure=tmp/fseptember.ps,height=5cm}}
20515 @end iflatex
20516 @end iftex
20517
20518 @item
20519 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
20520
20521 @lisp
20522 (setq gnus-use-nocem t)
20523 @end lisp
20524
20525 @item
20526 Groups can be made permanently visible (@pxref{Listing Groups}).
20527
20528 @lisp
20529 (setq gnus-permanently-visible-groups "^nnml:")
20530 @end lisp
20531
20532 @item
20533 Many new hooks have been introduced to make customizing easier.
20534
20535 @item
20536 Gnus respects the @code{Mail-Copies-To} header.
20537
20538 @item
20539 Threads can be gathered by looking at the @code{References} header
20540 (@pxref{Customizing Threading}).
20541
20542 @lisp
20543 (setq gnus-summary-thread-gathering-function
20544       'gnus-gather-threads-by-references)
20545 @end lisp
20546
20547 @item
20548 Read articles can be stored in a special backlog buffer to avoid
20549 refetching (@pxref{Article Backlog}).
20550
20551 @lisp
20552 (setq gnus-keep-backlog 50)
20553 @end lisp
20554
20555 @item
20556 A clean copy of the current article is always stored in a separate
20557 buffer to allow easier treatment.
20558
20559 @item
20560 Gnus can suggest where to save articles (@pxref{Saving Articles}).
20561
20562 @item
20563 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
20564 Articles}).
20565
20566 @lisp
20567 (setq gnus-prompt-before-saving t)
20568 @end lisp
20569
20570 @item
20571 @code{gnus-uu} can view decoded files asynchronously while fetching
20572 articles (@pxref{Other Decode Variables}).
20573
20574 @lisp
20575 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
20576 @end lisp
20577
20578 @item
20579 Filling in the article buffer now works properly on cited text
20580 (@pxref{Article Washing}).
20581
20582 @item
20583 Hiding cited text adds buttons to toggle hiding, and how much
20584 cited text to hide is now customizable (@pxref{Article Hiding}).
20585
20586 @lisp
20587 (setq gnus-cited-lines-visible 2)
20588 @end lisp
20589
20590 @item
20591 Boring headers can be hidden (@pxref{Article Hiding}).
20592
20593 @item
20594 Default scoring values can now be set from the menu bar.
20595
20596 @item
20597 Further syntax checking of outgoing articles have been added.
20598
20599 @end itemize
20600
20601
20602 @node Red Gnus
20603 @subsubsection Red Gnus
20604
20605 New features in Gnus 5.4/5.5:
20606
20607 @iftex
20608 @iflatex
20609 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=tmp/red.ps,height=20cm}}
20610 @end iflatex
20611 @end iftex
20612
20613 @itemize @bullet
20614
20615 @item
20616 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
20617
20618 @item
20619 Article prefetching functionality has been moved up into
20620 Gnus (@pxref{Asynchronous Fetching}).
20621
20622 @item
20623 Scoring can now be performed with logical operators like @code{and},
20624 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
20625 Scoring}).
20626
20627 @item
20628 Article washing status can be displayed in the
20629 article mode line (@pxref{Misc Article}).
20630
20631 @item
20632 @file{gnus.el} has been split into many smaller files.
20633
20634 @item
20635 Suppression of duplicate articles based on Message-ID can be done
20636 (@pxref{Duplicate Suppression}).
20637
20638 @lisp
20639 (setq gnus-suppress-duplicates t)
20640 @end lisp
20641
20642 @item
20643 New variables for specifying what score and adapt files are to be
20644 considered home score and adapt files (@pxref{Home Score File}) have
20645 been added.
20646
20647 @item
20648 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
20649 Server Internals}).
20650
20651 @item
20652 Groups can inherit group parameters from parent topics (@pxref{Topic
20653 Parameters}).
20654
20655 @item
20656 Article editing has been revamped and is now actually usable.
20657
20658 @item
20659 Signatures can be recognized in more intelligent fashions
20660 (@pxref{Article Signature}).
20661
20662 @item
20663 Summary pick mode has been made to look more @code{nn}-like.  Line
20664 numbers are displayed and the @kbd{.} command can be used to pick
20665 articles (@code{Pick and Read}).
20666
20667 @item
20668 Commands for moving the @file{.newsrc.eld} from one server to
20669 another have been added (@pxref{Changing Servers}).
20670
20671 @item
20672 There's a way now to specify that ``uninteresting'' fields be suppressed
20673 when generating lines in buffers (@pxref{Advanced Formatting}).
20674
20675 @item
20676 Several commands in the group buffer can be undone with @kbd{M-C-_}
20677 (@pxref{Undo}).
20678
20679 @item
20680 Scoring can be done on words using the new score type @code{w}
20681 (@pxref{Score File Format}).
20682
20683 @item
20684 Adaptive scoring can be done on a Subject word-by-word basis
20685 (@pxref{Adaptive Scoring}).
20686
20687 @lisp
20688 (setq gnus-use-adaptive-scoring '(word))
20689 @end lisp
20690
20691 @item
20692 Scores can be decayed (@pxref{Score Decays}).
20693
20694 @lisp
20695 (setq gnus-decay-scores t)
20696 @end lisp
20697
20698 @item
20699 Scoring can be performed using a regexp on the Date header.  The Date is
20700 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
20701
20702 @item
20703 A new command has been added to remove all data on articles from
20704 the native server (@pxref{Changing Servers}).
20705
20706 @item
20707 A new command for reading collections of documents
20708 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{M-C-d}
20709 (@pxref{Really Various Summary Commands}).
20710
20711 @item
20712 Process mark sets can be pushed and popped (@pxref{Setting Process
20713 Marks}).
20714
20715 @item
20716 A new mail-to-news backend makes it possible to post even when the @sc{nntp}
20717 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
20718
20719 @item
20720 A new backend for reading searches from Web search engines
20721 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
20722 (@pxref{Web Searches}).
20723
20724 @item
20725 Groups inside topics can now be sorted using the standard sorting
20726 functions, and each topic can be sorted independently (@pxref{Topic
20727 Sorting}).
20728
20729 @item
20730 Subsets of the groups can be sorted independently (@code{Sorting
20731 Groups}).
20732
20733 @item
20734 Cached articles can be pulled into the groups (@pxref{Summary Generation
20735 Commands}).
20736 @iftex
20737 @iflatex
20738 \marginpar[\mbox{}\hfill\epsfig{figure=tmp/fred.ps,width=3cm}]{\epsfig{figure=tmp/fred.ps,width=3cm}}
20739 @end iflatex
20740 @end iftex
20741
20742 @item
20743 Score files are now applied in a more reliable order (@pxref{Score
20744 Variables}).
20745
20746 @item
20747 Reports on where mail messages end up can be generated (@pxref{Splitting
20748 Mail}).
20749
20750 @item
20751 More hooks and functions have been added to remove junk from incoming
20752 mail before saving the mail (@pxref{Washing Mail}).
20753
20754 @item
20755 Emphasized text can be properly fontisized:
20756
20757 @end itemize
20758
20759
20760 @node Quassia Gnus
20761 @subsubsection Quassia Gnus
20762
20763 New features in Gnus 5.6:
20764
20765 @itemize @bullet
20766
20767 @item
20768 New functionality for using Gnus as an offline newsreader has been
20769 added.  A plethora of new commands and modes have been added.  See
20770 @pxref{Gnus Unplugged} for the full story.
20771
20772 @item
20773  The @code{nndraft} backend has returned, but works differently than
20774 before.  All Message buffers are now also articles in the @code{nndraft}
20775 group, which is created automatically.
20776
20777 @item
20778 @code{gnus-alter-header-function} can now be used to alter header
20779 values.
20780
20781 @item
20782  @code{gnus-summary-goto-article} now accept Message-ID's.
20783
20784 @item
20785  A new Message command for deleting text in the body of a message
20786 outside the region: @kbd{C-c C-v}.
20787
20788 @item
20789  You can now post to component group in @code{nnvirtual} groups with
20790 @kbd{C-u C-c C-c}.
20791
20792 @item
20793  @code{nntp-rlogin-program}---new variable to ease customization.
20794
20795 @item
20796  @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
20797 re-highlighting of the article buffer.
20798
20799 @item
20800  New element in @code{gnus-boring-article-headers}---@code{long-to}.
20801
20802 @item
20803  @kbd{M-i} symbolic prefix command.  See the section "Symbolic
20804 Prefixes" in the Gnus manual for details.
20805
20806 @item
20807  @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
20808 @kbd{a} to add the score rule to the "all.SCORE" file.
20809
20810 @item
20811  @code{gnus-simplify-subject-functions} variable to allow greater
20812 control over simplification.
20813
20814 @item
20815  @kbd{A T}---new command for fetching the current thread.
20816
20817 @item
20818  @kbd{/ T}---new command for including the current thread in the
20819 limit.
20820
20821 @item
20822  @kbd{M-RET} is a new Message command for breaking cited text.
20823
20824 @item
20825  @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
20826
20827 @item
20828  The @code{custom-face-lookup} function has been removed.
20829 If you used this function in your initialization files, you must
20830 rewrite them to use @code{face-spec-set} instead.
20831
20832 @item
20833  Canceling now uses the current select method.  Symbolic prefix
20834 @kbd{a} forces normal posting method.
20835
20836 @item
20837  New command to translate M******** sm*rtq**t*s into proper
20838 text---@kbd{W d}.
20839
20840 @item
20841  For easier debugging of @code{nntp}, you can set
20842 @code{nntp-record-commands} to a non-@code{nil} value.
20843
20844 @item
20845  @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
20846 controlling where and how to send @sc{authinfo} to @sc{nntp} servers.
20847
20848 @item
20849  A command for editing group parameters from the summary buffer
20850 has been added.
20851
20852 @item
20853  A history of where mails have been split is available.
20854
20855 @item
20856  A new article date command has been added---@code{article-date-iso8601}.
20857
20858 @item
20859  Subjects can be simplified when threading by setting
20860 @code{gnus-score-thread-simplify}.
20861
20862 @item
20863  A new function for citing in Message has been
20864 added---@code{message-cite-original-without-signature}.
20865
20866 @item
20867  @code{article-strip-all-blank-lines}---new article command.
20868
20869 @item
20870  A new Message command to kill to the end of the article has
20871 been added.
20872
20873 @item
20874  A minimum adaptive score can be specified by using the
20875 @code{gnus-adaptive-word-minimum} variable.
20876
20877 @item
20878  The "lapsed date" article header can be kept continually
20879 updated by the @code{gnus-start-date-timer} command.
20880
20881 @item
20882  Web listserv archives can be read with the @code{nnlistserv} backend.
20883
20884 @item
20885  Old dejanews archives can now be read by @code{nnweb}.
20886
20887 @end itemize
20888
20889 @node Pterodactyl Gnus
20890 @subsubsection Pterodactyl Gnus
20891
20892 New features in Gnus 5.8:
20893
20894 @itemize @bullet
20895
20896 @item The mail-fetching functions have changed.  See the manual for the
20897 many details.  In particular, all procmail fetching variables are gone.
20898
20899 If you used procmail like in
20900
20901 @lisp
20902 (setq nnmail-use-procmail t)
20903 (setq nnmail-spool-file 'procmail)
20904 (setq nnmail-procmail-directory "~/mail/incoming/")
20905 (setq nnmail-procmail-suffix "\\.in")
20906 @end lisp
20907
20908 this now has changed to
20909
20910 @lisp
20911 (setq mail-sources
20912       '((directory :path "~/mail/incoming/"
20913                    :suffix ".in")))
20914 @end lisp
20915
20916 More information is available in the info doc at Select Methods ->
20917 Getting Mail -> Mail Sources
20918
20919 @item Gnus is now a MIME-capable reader.  This affects many parts of
20920 Gnus, and adds a slew of new commands.  See the manual for details.
20921
20922 @item Gnus has also been multilingualized.  This also affects too
20923 many parts of Gnus to summarize here, and adds many new variables.
20924
20925 @item @code{gnus-auto-select-first} can now be a function to be
20926 called to position point.
20927
20928 @item The user can now decide which extra headers should be included in
20929 summary buffers and NOV files.
20930
20931 @item @code{gnus-article-display-hook} has been removed.  Instead, a number
20932 of variables starting with @code{gnus-treat-} have been added.
20933
20934 @item The Gnus posting styles have been redone again and now works in a
20935 subtly different manner.
20936
20937 @item New web-based backends have been added: @code{nnslashdot},
20938 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
20939 again, to keep up with ever-changing layouts.
20940
20941 @item Gnus can now read IMAP mail via @code{nnimap}.
20942
20943 @end itemize
20944
20945 @iftex
20946
20947 @page
20948 @node History
20949 @section The Manual
20950 @cindex colophon
20951 @cindex manual
20952
20953 This manual was generated from a TeXinfo file and then run through
20954 either @code{texi2dvi}
20955 @iflatex
20956 or my own home-brewed TeXinfo to \LaTeX\ transformer,
20957 and then run through @code{latex} and @code{dvips}
20958 @end iflatex
20959 to get what you hold in your hands now.
20960
20961 The following conventions have been used:
20962
20963 @enumerate
20964
20965 @item
20966 This is a @samp{string}
20967
20968 @item
20969 This is a @kbd{keystroke}
20970
20971 @item
20972 This is a @file{file}
20973
20974 @item
20975 This is a @code{symbol}
20976
20977 @end enumerate
20978
20979 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
20980 mean:
20981
20982 @lisp
20983 (setq flargnoze "yes")
20984 @end lisp
20985
20986 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
20987
20988 @lisp
20989 (setq flumphel 'yes)
20990 @end lisp
20991
20992 @samp{yes} and @code{yes} are two @emph{very} different things---don't
20993 ever get them confused.
20994
20995 @iflatex
20996 @c @head
20997 Of course, everything in this manual is of vital interest, so you should
20998 read it all.  Several times.  However, if you feel like skimming the
20999 manual, look for that gnu head you should see in the margin over
21000 there---it means that what's being discussed is of more importance than
21001 the rest of the stuff.  (On the other hand, if everything is infinitely
21002 important, how can anything be more important than that?  Just one more
21003 of the mysteries of this world, I guess.)
21004 @end iflatex
21005
21006 @end iftex
21007
21008
21009 @node On Writing Manuals
21010 @section On Writing Manuals
21011
21012 I guess most manuals are written after-the-fact; documenting a program
21013 that's already there.  This is not how this manual is written.  When
21014 implementing something, I write the manual entry for that something
21015 straight away.  I then see that it's difficult to explain the
21016 functionality, so I write how it's supposed to be, and then I change the
21017 implementation.  Writing the documentation and writing the code goes
21018 hand in hand.
21019
21020 This, of course, means that this manual has no, or little, flow.  It
21021 documents absolutely everything in Gnus, but often not where you're
21022 looking for it.  It is a reference manual, and not a guide to how to get
21023 started with Gnus.
21024
21025 That would be a totally different book, that should be written using the
21026 reference manual as source material.  It would look quite differently.
21027
21028
21029 @page
21030 @node Terminology
21031 @section Terminology
21032
21033 @cindex terminology
21034 @table @dfn
21035
21036 @item news
21037 @cindex news
21038 This is what you are supposed to use this thing for---reading news.
21039 News is generally fetched from a nearby @sc{nntp} server, and is
21040 generally publicly available to everybody.  If you post news, the entire
21041 world is likely to read just what you have written, and they'll all
21042 snigger mischievously.  Behind your back.
21043
21044 @item mail
21045 @cindex mail
21046 Everything that's delivered to you personally is mail.  Some news/mail
21047 readers (like Gnus) blur the distinction between mail and news, but
21048 there is a difference.  Mail is private.  News is public.  Mailing is
21049 not posting, and replying is not following up.
21050
21051 @item reply
21052 @cindex reply
21053 Send a mail to the person who has written what you are reading.
21054
21055 @item follow up
21056 @cindex follow up
21057 Post an article to the current newsgroup responding to the article you
21058 are reading.
21059
21060 @item backend
21061 @cindex backend
21062 Gnus gets fed articles from a number of backends, both news and mail
21063 backends.  Gnus does not handle the underlying media, so to speak---this
21064 is all done by the backends.
21065
21066 @item native
21067 @cindex native
21068 Gnus will always use one method (and backend) as the @dfn{native}, or
21069 default, way of getting news.
21070
21071 @item foreign
21072 @cindex foreign
21073 You can also have any number of foreign groups active at the same time.
21074 These are groups that use non-native non-secondary backends for getting
21075 news.
21076
21077 @item secondary
21078 @cindex secondary
21079 Secondary backends are somewhere half-way between being native and being
21080 foreign, but they mostly act like they are native.
21081
21082 @item article
21083 @cindex article
21084 A message that has been posted as news.
21085
21086 @item mail message
21087 @cindex mail message
21088 A message that has been mailed.
21089
21090 @item message
21091 @cindex message
21092 A mail message or news article
21093
21094 @item head
21095 @cindex head
21096 The top part of a message, where administrative information (etc.) is
21097 put.
21098
21099 @item body
21100 @cindex body
21101 The rest of an article.  Everything not in the head is in the
21102 body.
21103
21104 @item header
21105 @cindex header
21106 A line from the head of an article.
21107
21108 @item headers
21109 @cindex headers
21110 A collection of such lines, or a collection of heads.  Or even a
21111 collection of @sc{nov} lines.
21112
21113 @item @sc{nov}
21114 @cindex nov
21115 When Gnus enters a group, it asks the backend for the headers of all
21116 unread articles in the group.  Most servers support the News OverView
21117 format, which is more compact and much faster to read and parse than the
21118 normal @sc{head} format.
21119
21120 @item level
21121 @cindex levels
21122 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
21123 that have a lower level are ``more'' subscribed than the groups with a
21124 higher level.  In fact, groups on levels 1-5 are considered
21125 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
21126 are @dfn{killed}.  Commands for listing groups and scanning for new
21127 articles will all use the numeric prefix as @dfn{working level}.
21128
21129 @item killed groups
21130 @cindex killed groups
21131 No information on killed groups is stored or updated, which makes killed
21132 groups much easier to handle than subscribed groups.
21133
21134 @item zombie groups
21135 @cindex zombie groups
21136 Just like killed groups, only slightly less dead.
21137
21138 @item active file
21139 @cindex active file
21140 The news server has to keep track of what articles it carries, and what
21141 groups exist.  All this information in stored in the active file, which
21142 is rather large, as you might surmise.
21143
21144 @item bogus groups
21145 @cindex bogus groups
21146 A group that exists in the @file{.newsrc} file, but isn't known to the
21147 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
21148 This means that the group probably doesn't exist (any more).
21149
21150 @item activating
21151 @cindex activating groups
21152 The act of asking the server for info on a group and computing the
21153 number of unread articles is called @dfn{activating the group}.
21154 Un-activated groups are listed with @samp{*} in the group buffer.
21155
21156 @item server
21157 @cindex server
21158 A machine one can connect to and get news (or mail) from.
21159
21160 @item select method
21161 @cindex select method
21162 A structure that specifies the backend, the server and the virtual
21163 server settings.
21164
21165 @item virtual server
21166 @cindex virtual server
21167 A named select method.  Since a select method defines all there is to
21168 know about connecting to a (physical) server, taking the thing as a
21169 whole is a virtual server.
21170
21171 @item washing
21172 @cindex washing
21173 Taking a buffer and running it through a filter of some sort.  The
21174 result will (more often than not) be cleaner and more pleasing than the
21175 original.
21176
21177 @item ephemeral groups
21178 @cindex ephemeral groups
21179 Most groups store data on what articles you have read.  @dfn{Ephemeral}
21180 groups are groups that will have no data stored---when you exit the
21181 group, it'll disappear into the aether.
21182
21183 @item solid groups
21184 @cindex solid groups
21185 This is the opposite of ephemeral groups.  All groups listed in the
21186 group buffer are solid groups.
21187
21188 @item sparse articles
21189 @cindex sparse articles
21190 These are article placeholders shown in the summary buffer when
21191 @code{gnus-build-sparse-threads} has been switched on.
21192
21193 @item threading
21194 @cindex threading
21195 To put responses to articles directly after the articles they respond
21196 to---in a hierarchical fashion.
21197
21198 @item root
21199 @cindex root
21200 @cindex thread root
21201 The first article in a thread is the root.  It is the ancestor of all
21202 articles in the thread.
21203
21204 @item parent
21205 @cindex parent
21206 An article that has responses.
21207
21208 @item child
21209 @cindex child
21210 An article that responds to a different article---its parent.
21211
21212 @item digest
21213 @cindex digest
21214 A collection of messages in one file.  The most common digest format is
21215 specified by RFC 1153.
21216
21217 @end table
21218
21219
21220 @page
21221 @node Customization
21222 @section Customization
21223 @cindex general customization
21224
21225 All variables are properly documented elsewhere in this manual.  This
21226 section is designed to give general pointers on how to customize Gnus
21227 for some quite common situations.
21228
21229 @menu
21230 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
21231 * Slow Terminal Connection::    You run a remote Emacs.
21232 * Little Disk Space::           You feel that having large setup files is icky.
21233 * Slow Machine::                You feel like buying a faster machine.
21234 @end menu
21235
21236
21237 @node Slow/Expensive Connection
21238 @subsection Slow/Expensive @sc{nntp} Connection
21239
21240 If you run Emacs on a machine locally, and get your news from a machine
21241 over some very thin strings, you want to cut down on the amount of data
21242 Gnus has to get from the @sc{nntp} server.
21243
21244 @table @code
21245
21246 @item gnus-read-active-file
21247 Set this to @code{nil}, which will inhibit Gnus from requesting the
21248 entire active file from the server.  This file is often v.  large.  You
21249 also have to set @code{gnus-check-new-newsgroups} and
21250 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
21251 doesn't suddenly decide to fetch the active file anyway.
21252
21253 @item gnus-nov-is-evil
21254 This one has to be @code{nil}.  If not, grabbing article headers from
21255 the @sc{nntp} server will not be very fast.  Not all @sc{nntp} servers
21256 support @sc{xover}; Gnus will detect this by itself.
21257 @end table
21258
21259
21260 @node Slow Terminal Connection
21261 @subsection Slow Terminal Connection
21262
21263 Let's say you use your home computer for dialing up the system that runs
21264 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
21265 possible) the amount of data sent over the wires.
21266
21267 @table @code
21268
21269 @item gnus-auto-center-summary
21270 Set this to @code{nil} to inhibit Gnus from re-centering the summary
21271 buffer all the time.  If it is @code{vertical}, do only vertical
21272 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
21273 horizontal and vertical recentering.
21274
21275 @item gnus-visible-headers
21276 Cut down on the headers included in the articles to the
21277 minimum.  You can, in fact, make do without them altogether---most of the
21278 useful data is in the summary buffer, anyway.  Set this variable to
21279 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
21280
21281 Set this hook to all the available hiding commands:
21282 @lisp
21283 (setq gnus-treat-hide-headers 'head
21284       gnus-treat-hide-signature t
21285       gnus-treat-hide-citation t)
21286 @end lisp
21287
21288 @item gnus-use-full-window
21289 By setting this to @code{nil}, you can make all the windows smaller.
21290 While this doesn't really cut down much generally, it means that you
21291 have to see smaller portions of articles before deciding that you didn't
21292 want to read them anyway.
21293
21294 @item gnus-thread-hide-subtree
21295 If this is non-@code{nil}, all threads in the summary buffer will be
21296 hidden initially.
21297
21298 @item gnus-updated-mode-lines
21299 If this is @code{nil}, Gnus will not put information in the buffer mode
21300 lines, which might save some time.
21301 @end table
21302
21303
21304 @node Little Disk Space
21305 @subsection Little Disk Space
21306 @cindex disk space
21307
21308 The startup files can get rather large, so you may want to cut their
21309 sizes a bit if you are running out of space.
21310
21311 @table @code
21312
21313 @item gnus-save-newsrc-file
21314 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
21315 only save @file{.newsrc.eld}.  This means that you will not be able to
21316 use any other newsreaders than Gnus.  This variable is @code{t} by
21317 default.
21318
21319 @item gnus-read-newsrc-file
21320 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
21321 only read @file{.newsrc.eld}.  This means that you will not be able to
21322 use any other newsreaders than Gnus.  This variable is @code{t} by
21323 default.
21324
21325 @item gnus-save-killed-list
21326 If this is @code{nil}, Gnus will not save the list of dead groups.  You
21327 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
21328 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
21329 variable to @code{nil}.  This variable is @code{t} by default.
21330
21331 @end table
21332
21333
21334 @node Slow Machine
21335 @subsection Slow Machine
21336 @cindex slow machine
21337
21338 If you have a slow machine, or are just really impatient, there are a
21339 few things you can do to make Gnus run faster.
21340
21341 Set @code{gnus-check-new-newsgroups} and
21342 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
21343
21344 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
21345 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
21346 summary buffer faster.
21347
21348
21349 @page
21350 @node Troubleshooting
21351 @section Troubleshooting
21352 @cindex troubleshooting
21353
21354 Gnus works @emph{so} well straight out of the box---I can't imagine any
21355 problems, really.
21356
21357 Ahem.
21358
21359 @enumerate
21360
21361 @item
21362 Make sure your computer is switched on.
21363
21364 @item
21365 Make sure that you really load the current Gnus version.  If you have
21366 been running @sc{gnus}, you need to exit Emacs and start it up again before
21367 Gnus will work.
21368
21369 @item
21370 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
21371 like @samp{T-gnus 6.15.* (based on Oort Gnus v0.*; for SEMI 1.1*, FLIM
21372 1.1*)} you have the right files loaded.  If, on the other hand, you get
21373 something like @samp{NNTP 3.x} or @samp{nntp flee}, you have some old
21374 @file{.el} files lying around.  Delete these.
21375
21376 @item
21377 Read the help group (@kbd{G h} in the group buffer) for a FAQ and a
21378 how-to.
21379
21380 @item
21381 @vindex max-lisp-eval-depth
21382 Gnus works on many recursive structures, and in some extreme (and very
21383 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
21384 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
21385 something like that.
21386 @end enumerate
21387
21388 If all else fails, report the problem as a bug.
21389
21390 @cindex bugs
21391 @cindex reporting bugs
21392
21393 @kindex M-x gnus-bug
21394 @findex gnus-bug
21395 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
21396 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
21397 me the backtrace.  I will fix bugs, but I can only fix them if you send
21398 me a precise description as to how to reproduce the bug.
21399
21400 You really can never be too detailed in a bug report.  Always use the
21401 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
21402 a 10Kb mail each time you use it, and even if you have sent me your
21403 environment 500 times before.  I don't care.  I want the full info each
21404 time.
21405
21406 It is also important to remember that I have no memory whatsoever.  If
21407 you send a bug report, and I send you a reply, and then you just send
21408 back ``No, it's not! Moron!'', I will have no idea what you are
21409 insulting me about.  Always over-explain everything.  It's much easier
21410 for all of us---if I don't have all the information I need, I will just
21411 mail you and ask for more info, and everything takes more time.
21412
21413 If the problem you're seeing is very visual, and you can't quite explain
21414 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
21415 it somewhere it can be reached, and include the URL of the picture in
21416 the bug report.
21417
21418 @cindex patches
21419 If you would like to contribute a patch to fix bugs or make
21420 improvements, please produce the patch using @samp{diff -u}.
21421
21422 If you just need help, you are better off asking on
21423 @samp{gnu.emacs.gnus}.  I'm not very helpful.
21424
21425 @cindex gnu.emacs.gnus
21426 @cindex ding mailing list
21427 You can also ask on the ding mailing list---@samp{ding@@gnus.org}.
21428 Write to @samp{ding-request@@gnus.org} to subscribe.
21429
21430
21431 @page
21432 @node Gnus Reference Guide
21433 @section Gnus Reference Guide
21434
21435 It is my hope that other people will figure out smart stuff that Gnus
21436 can do, and that other people will write those smart things as well.  To
21437 facilitate that I thought it would be a good idea to describe the inner
21438 workings of Gnus.  And some of the not-so-inner workings, while I'm at
21439 it.
21440
21441 You can never expect the internals of a program not to change, but I
21442 will be defining (in some details) the interface between Gnus and its
21443 backends (this is written in stone), the format of the score files
21444 (ditto), data structures (some are less likely to change than others)
21445 and general methods of operation.
21446
21447 @menu
21448 * Gnus Utility Functions::      Common functions and variable to use.
21449 * Backend Interface::           How Gnus communicates with the servers.
21450 * Score File Syntax::           A BNF definition of the score file standard.
21451 * Headers::                     How Gnus stores headers internally.
21452 * Ranges::                      A handy format for storing mucho numbers.
21453 * Group Info::                  The group info format.
21454 * Extended Interactive::        Symbolic prefixes and stuff.
21455 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
21456 * Various File Formats::        Formats of files that Gnus use.
21457 @end menu
21458
21459
21460 @node Gnus Utility Functions
21461 @subsection Gnus Utility Functions
21462 @cindex Gnus utility functions
21463 @cindex utility functions
21464 @cindex functions
21465 @cindex internal variables
21466
21467 When writing small functions to be run from hooks (and stuff), it's
21468 vital to have access to the Gnus internal functions and variables.
21469 Below is a list of the most common ones.
21470
21471 @table @code
21472
21473 @item gnus-newsgroup-name
21474 @vindex gnus-newsgroup-name
21475 This variable holds the name of the current newsgroup.
21476
21477 @item gnus-find-method-for-group
21478 @findex gnus-find-method-for-group
21479 A function that returns the select method for @var{group}.
21480
21481 @item gnus-group-real-name
21482 @findex gnus-group-real-name
21483 Takes a full (prefixed) Gnus group name, and returns the unprefixed
21484 name.
21485
21486 @item gnus-group-prefixed-name
21487 @findex gnus-group-prefixed-name
21488 Takes an unprefixed group name and a select method, and returns the full
21489 (prefixed) Gnus group name.
21490
21491 @item gnus-get-info
21492 @findex gnus-get-info
21493 Returns the group info list for @var{group}.
21494
21495 @item gnus-group-unread
21496 @findex gnus-group-unread
21497 The number of unread articles in @var{group}, or @code{t} if that is
21498 unknown.
21499
21500 @item gnus-active
21501 @findex gnus-active
21502 The active entry for @var{group}.
21503
21504 @item gnus-set-active
21505 @findex gnus-set-active
21506 Set the active entry for @var{group}.
21507
21508 @item gnus-add-current-to-buffer-list
21509 @findex gnus-add-current-to-buffer-list
21510 Adds the current buffer to the list of buffers to be killed on Gnus
21511 exit.
21512
21513 @item gnus-continuum-version
21514 @findex gnus-continuum-version
21515 Takes a Gnus version string as a parameter and returns a floating point
21516 number.  Earlier versions will always get a lower number than later
21517 versions.
21518
21519 @item gnus-group-read-only-p
21520 @findex gnus-group-read-only-p
21521 Says whether @var{group} is read-only or not.
21522
21523 @item gnus-news-group-p
21524 @findex gnus-news-group-p
21525 Says whether @var{group} came from a news backend.
21526
21527 @item gnus-ephemeral-group-p
21528 @findex gnus-ephemeral-group-p
21529 Says whether @var{group} is ephemeral or not.
21530
21531 @item gnus-server-to-method
21532 @findex gnus-server-to-method
21533 Returns the select method corresponding to @var{server}.
21534
21535 @item gnus-server-equal
21536 @findex gnus-server-equal
21537 Says whether two virtual servers are equal.
21538
21539 @item gnus-group-native-p
21540 @findex gnus-group-native-p
21541 Says whether @var{group} is native or not.
21542
21543 @item gnus-group-secondary-p
21544 @findex gnus-group-secondary-p
21545 Says whether @var{group} is secondary or not.
21546
21547 @item gnus-group-foreign-p
21548 @findex gnus-group-foreign-p
21549 Says whether @var{group} is foreign or not.
21550
21551 @item group-group-find-parameter
21552 @findex group-group-find-parameter
21553 Returns the parameter list of @var{group}.  If given a second parameter,
21554 returns the value of that parameter for @var{group}.
21555
21556 @item gnus-group-set-parameter
21557 @findex gnus-group-set-parameter
21558 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
21559
21560 @item gnus-narrow-to-body
21561 @findex gnus-narrow-to-body
21562 Narrows the current buffer to the body of the article.
21563
21564 @item gnus-check-backend-function
21565 @findex gnus-check-backend-function
21566 Takes two parameters, @var{function} and @var{group}.  If the backend
21567 @var{group} comes from supports @var{function}, return non-@code{nil}.
21568
21569 @lisp
21570 (gnus-check-backend-function "request-scan" "nnml:misc")
21571 @result{} t
21572 @end lisp
21573
21574 @item gnus-read-method
21575 @findex gnus-read-method
21576 Prompts the user for a select method.
21577
21578 @end table
21579
21580
21581 @node Backend Interface
21582 @subsection Backend Interface
21583
21584 Gnus doesn't know anything about @sc{nntp}, spools, mail or virtual
21585 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
21586 server is a @dfn{backend} and some @dfn{backend variables}.  As examples
21587 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
21588 examples of the latter we have @code{nntp-port-number} and
21589 @code{nnmbox-directory}.
21590
21591 When Gnus asks for information from a backend---say @code{nntp}---on
21592 something, it will normally include a virtual server name in the
21593 function parameters.  (If not, the backend should use the ``current''
21594 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
21595 server as its only (optional) parameter.  If this virtual server hasn't
21596 been opened, the function should fail.
21597
21598 Note that a virtual server name has no relation to some physical server
21599 name.  Take this example:
21600
21601 @lisp
21602 (nntp "odd-one"
21603       (nntp-address "ifi.uio.no")
21604       (nntp-port-number 4324))
21605 @end lisp
21606
21607 Here the virtual server name is @samp{odd-one} while the name of
21608 the physical server is @samp{ifi.uio.no}.
21609
21610 The backends should be able to switch between several virtual servers.
21611 The standard backends implement this by keeping an alist of virtual
21612 server environments that they pull down/push up when needed.
21613
21614 There are two groups of interface functions: @dfn{required functions},
21615 which must be present, and @dfn{optional functions}, which Gnus will
21616 always check for presence before attempting to call 'em.
21617
21618 All these functions are expected to return data in the buffer
21619 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
21620 unfortunately named, but we'll have to live with it.  When I talk about
21621 @dfn{resulting data}, I always refer to the data in that buffer.  When I
21622 talk about @dfn{return value}, I talk about the function value returned by
21623 the function call.  Functions that fail should return @code{nil} as the
21624 return value.
21625
21626 Some backends could be said to be @dfn{server-forming} backends, and
21627 some might be said not to be.  The latter are backends that generally
21628 only operate on one group at a time, and have no concept of ``server''
21629 -- they have a group, and they deliver info on that group and nothing
21630 more.
21631
21632 Gnus identifies each message by way of group name and article number.  A
21633 few remarks about these article numbers might be useful.  First of all,
21634 the numbers are positive integers.  Secondly, it is normally not
21635 possible for later articles to `re-use' older article numbers without
21636 confusing Gnus.  That is, if a group has ever contained a message
21637 numbered 42, then no other message may get that number, or Gnus will get
21638 mightily confused.@footnote{See the function
21639 @code{nnchoke-request-update-info}, @ref{Optional Backend Functions}.}
21640 Third, article numbers must be assigned in order of arrival in the
21641 group; this is not necessarily the same as the date of the message.
21642
21643 The previous paragraph already mentions all the `hard' restrictions that
21644 article numbers must fulfill.  But it seems that it might be useful to
21645 assign @emph{consecutive} article numbers, for Gnus gets quite confused
21646 if there are holes in the article numbering sequence.  However, due to
21647 the `no-reuse' restriction, holes cannot be avoided altogether.  It's
21648 also useful for the article numbers to start at 1 to avoid running out
21649 of numbers as long as possible.
21650
21651 In the examples and definitions I will refer to the imaginary backend
21652 @code{nnchoke}.
21653
21654 @cindex @code{nnchoke}
21655
21656 @menu
21657 * Required Backend Functions::  Functions that must be implemented.
21658 * Optional Backend Functions::  Functions that need not be implemented.
21659 * Error Messaging::             How to get messages and report errors.
21660 * Writing New Backends::        Extending old backends.
21661 * Hooking New Backends Into Gnus::  What has to be done on the Gnus end.
21662 * Mail-like Backends::          Some tips on mail backends.
21663 @end menu
21664
21665
21666 @node Required Backend Functions
21667 @subsubsection Required Backend Functions
21668
21669 @table @code
21670
21671 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
21672
21673 @var{articles} is either a range of article numbers or a list of
21674 @code{Message-ID}s.  Current backends do not fully support either---only
21675 sequences (lists) of article numbers, and most backends do not support
21676 retrieval of @code{Message-ID}s.  But they should try for both.
21677
21678 The result data should either be HEADs or NOV lines, and the result
21679 value should either be @code{headers} or @code{nov} to reflect this.
21680 This might later be expanded to @code{various}, which will be a mixture
21681 of HEADs and NOV lines, but this is currently not supported by Gnus.
21682
21683 If @var{fetch-old} is non-@code{nil} it says to try fetching "extra
21684 headers", in some meaning of the word.  This is generally done by
21685 fetching (at most) @var{fetch-old} extra headers less than the smallest
21686 article number in @code{articles}, and filling the gaps as well.  The
21687 presence of this parameter can be ignored if the backend finds it
21688 cumbersome to follow the request.  If this is non-@code{nil} and not a
21689 number, do maximum fetches.
21690
21691 Here's an example HEAD:
21692
21693 @example
21694 221 1056 Article retrieved.
21695 Path: ifi.uio.no!sturles
21696 From: sturles@@ifi.uio.no (Sturle Sunde)
21697 Newsgroups: ifi.discussion
21698 Subject: Re: Something very droll
21699 Date: 27 Oct 1994 14:02:57 +0100
21700 Organization: Dept. of Informatics, University of Oslo, Norway
21701 Lines: 26
21702 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
21703 References: <38jdmq$4qu@@visbur.ifi.uio.no>
21704 NNTP-Posting-Host: holmenkollen.ifi.uio.no
21705 .
21706 @end example
21707
21708 So a @code{headers} return value would imply that there's a number of
21709 these in the data buffer.
21710
21711 Here's a BNF definition of such a buffer:
21712
21713 @example
21714 headers        = *head
21715 head           = error / valid-head
21716 error-message  = [ "4" / "5" ] 2number " " <error message> eol
21717 valid-head     = valid-message *header "." eol
21718 valid-message  = "221 " <number> " Article retrieved." eol
21719 header         = <text> eol
21720 @end example
21721
21722 If the return value is @code{nov}, the data buffer should contain
21723 @dfn{network overview database} lines.  These are basically fields
21724 separated by tabs.
21725
21726 @example
21727 nov-buffer = *nov-line
21728 nov-line   = 8*9 [ field <TAB> ] eol
21729 field      = <text except TAB>
21730 @end example
21731
21732 For a closer look at what should be in those fields,
21733 @pxref{Headers}.
21734
21735
21736 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
21737
21738 @var{server} is here the virtual server name.  @var{definitions} is a
21739 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
21740
21741 If the server can't be opened, no error should be signaled.  The backend
21742 may then choose to refuse further attempts at connecting to this
21743 server.  In fact, it should do so.
21744
21745 If the server is opened already, this function should return a
21746 non-@code{nil} value.  There should be no data returned.
21747
21748
21749 @item (nnchoke-close-server &optional SERVER)
21750
21751 Close connection to @var{server} and free all resources connected
21752 to it.  Return @code{nil} if the server couldn't be closed for some
21753 reason.
21754
21755 There should be no data returned.
21756
21757
21758 @item (nnchoke-request-close)
21759
21760 Close connection to all servers and free all resources that the backend
21761 have reserved.  All buffers that have been created by that backend
21762 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
21763 function is generally only called when Gnus is shutting down.
21764
21765 There should be no data returned.
21766
21767
21768 @item (nnchoke-server-opened &optional SERVER)
21769
21770 If @var{server} is the current virtual server, and the connection to the
21771 physical server is alive, then this function should return a
21772 non-@code{nil} vlue.  This function should under no circumstances
21773 attempt to reconnect to a server we have lost connection to.
21774
21775 There should be no data returned.
21776
21777
21778 @item (nnchoke-status-message &optional SERVER)
21779
21780 This function should return the last error message from @var{server}.
21781
21782 There should be no data returned.
21783
21784
21785 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
21786
21787 The result data from this function should be the article specified by
21788 @var{article}.  This might either be a @code{Message-ID} or a number.
21789 It is optional whether to implement retrieval by @code{Message-ID}, but
21790 it would be nice if that were possible.
21791
21792 If @var{to-buffer} is non-@code{nil}, the result data should be returned
21793 in this buffer instead of the normal data buffer.  This is to make it
21794 possible to avoid copying large amounts of data from one buffer to
21795 another, while Gnus mainly requests articles to be inserted directly
21796 into its article buffer.
21797
21798 If it is at all possible, this function should return a cons cell where
21799 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
21800 the article number.  This will enable Gnus to find out what the real
21801 group and article numbers are when fetching articles by
21802 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
21803 on successful article retrieval.
21804
21805
21806 @item (nnchoke-request-group GROUP &optional SERVER FAST)
21807
21808 Get data on @var{group}.  This function also has the side effect of
21809 making @var{group} the current group.
21810
21811 If @var{fast}, don't bother to return useful data, just make @var{group}
21812 the current group.
21813
21814 Here's an example of some result data and a definition of the same:
21815
21816 @example
21817 211 56 1000 1059 ifi.discussion
21818 @end example
21819
21820 The first number is the status, which should be 211.  Next is the
21821 total number of articles in the group, the lowest article number, the
21822 highest article number, and finally the group name.  Note that the total
21823 number of articles may be less than one might think while just
21824 considering the highest and lowest article numbers, but some articles
21825 may have been canceled.  Gnus just discards the total-number, so
21826 whether one should take the bother to generate it properly (if that is a
21827 problem) is left as an exercise to the reader.
21828
21829 @example
21830 group-status = [ error / info ] eol
21831 error        = [ "4" / "5" ] 2<number> " " <Error message>
21832 info         = "211 " 3* [ <number> " " ] <string>
21833 @end example
21834
21835
21836 @item (nnchoke-close-group GROUP &optional SERVER)
21837
21838 Close @var{group} and free any resources connected to it.  This will be
21839 a no-op on most backends.
21840
21841 There should be no data returned.
21842
21843
21844 @item (nnchoke-request-list &optional SERVER)
21845
21846 Return a list of all groups available on @var{server}.  And that means
21847 @emph{all}.
21848
21849 Here's an example from a server that only carries two groups:
21850
21851 @example
21852 ifi.test 0000002200 0000002000 y
21853 ifi.discussion 3324 3300 n
21854 @end example
21855
21856 On each line we have a group name, then the highest article number in
21857 that group, the lowest article number, and finally a flag.
21858
21859 @example
21860 active-file = *active-line
21861 active-line = name " " <number> " " <number> " " flags eol
21862 name        = <string>
21863 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
21864 @end example
21865
21866 The flag says whether the group is read-only (@samp{n}), is moderated
21867 (@samp{m}), is dead (@samp{x}), is aliased to some other group
21868 (@samp{=other-group}) or none of the above (@samp{y}).
21869
21870
21871 @item (nnchoke-request-post &optional SERVER)
21872
21873 This function should post the current buffer.  It might return whether
21874 the posting was successful or not, but that's not required.  If, for
21875 instance, the posting is done asynchronously, it has generally not been
21876 completed by the time this function concludes.  In that case, this
21877 function should set up some kind of sentinel to beep the user loud and
21878 clear if the posting could not be completed.
21879
21880 There should be no result data from this function.
21881
21882 @end table
21883
21884
21885 @node Optional Backend Functions
21886 @subsubsection Optional Backend Functions
21887
21888 @table @code
21889
21890 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
21891
21892 @var{groups} is a list of groups, and this function should request data
21893 on all those groups.  How it does it is of no concern to Gnus, but it
21894 should attempt to do this in a speedy fashion.
21895
21896 The return value of this function can be either @code{active} or
21897 @code{group}, which says what the format of the result data is.  The
21898 former is in the same format as the data from
21899 @code{nnchoke-request-list}, while the latter is a buffer full of lines
21900 in the same format as @code{nnchoke-request-group} gives.
21901
21902 @example
21903 group-buffer = *active-line / *group-status
21904 @end example
21905
21906
21907 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
21908
21909 A Gnus group info (@pxref{Group Info}) is handed to the backend for
21910 alterations.  This comes in handy if the backend really carries all the
21911 information (as is the case with virtual and imap groups).  This
21912 function should destructively alter the info to suit its needs, and
21913 should return the (altered) group info.
21914
21915 There should be no result data from this function.
21916
21917
21918 @item (nnchoke-request-type GROUP &optional ARTICLE)
21919
21920 When the user issues commands for ``sending news'' (@kbd{F} in the
21921 summary buffer, for instance), Gnus has to know whether the article the
21922 user is following up on is news or mail.  This function should return
21923 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
21924 is mail and @code{unknown} if the type can't be decided.  (The
21925 @var{article} parameter is necessary in @code{nnvirtual} groups which
21926 might very well combine mail groups and news groups.)  Both @var{group}
21927 and @var{article} may be @code{nil}.
21928
21929 There should be no result data from this function.
21930
21931
21932 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
21933
21934 Set/remove/add marks on articles.  Normally Gnus handles the article
21935 marks (such as read, ticked, expired etc) internally, and store them in
21936 @code{~/.newsrc.eld}.  Some backends (such as @sc{imap}) however carry
21937 all information about the articles on the server, so Gnus need to
21938 propagate the mark information to the server.
21939
21940 ACTION is a list of mark setting requests, having this format:
21941
21942 @example
21943 (RANGE ACTION MARK)
21944 @end example
21945
21946 RANGE is a range of articles you wish to update marks on.  ACTION is
21947 @code{add} or @code{del}, used to add marks or remove marks
21948 (preserving all marks not mentioned).  MARK is a list of marks; where
21949 each mark is a symbol.  Currently used marks are @code{read},
21950 @code{tick}, @code{reply}, @code{expire}, @code{killed},
21951 @code{dormant}, @code{save}, @code{download}, @code{unsend},
21952 @code{forward} and @code{recent}, but your backend should, if
21953 possible, not limit itself to these.
21954
21955 Given contradictory actions, the last action in the list should be the
21956 effective one.  That is, if your action contains a request to add the
21957 @code{tick} mark on article 1 and, later in the list, a request to
21958 remove the mark on the same article, the mark should in fact be removed.
21959
21960 An example action list:
21961
21962 @example
21963 (((5 12 30) 'del '(tick))
21964  ((10 . 90) 'add '(read expire))
21965  ((92 94) 'del '(read)))
21966 @end example
21967
21968 The function should return a range of articles it wasn't able to set the
21969 mark on (currently not used for anything).
21970
21971 There should be no result data from this function.
21972
21973 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
21974
21975 If the user tries to set a mark that the backend doesn't like, this
21976 function may change the mark.  Gnus will use whatever this function
21977 returns as the mark for @var{article} instead of the original
21978 @var{mark}.  If the backend doesn't care, it must return the original
21979 @var{mark}, and not @code{nil} or any other type of garbage.
21980
21981 The only use for this I can see is what @code{nnvirtual} does with
21982 it---if a component group is auto-expirable, marking an article as read
21983 in the virtual group should result in the article being marked as
21984 expirable.
21985
21986 There should be no result data from this function.
21987
21988
21989 @item (nnchoke-request-scan &optional GROUP SERVER)
21990
21991 This function may be called at any time (by Gnus or anything else) to
21992 request that the backend check for incoming articles, in one way or
21993 another.  A mail backend will typically read the spool file or query the
21994 POP server when this function is invoked.  The @var{group} doesn't have
21995 to be heeded---if the backend decides that it is too much work just
21996 scanning for a single group, it may do a total scan of all groups.  It
21997 would be nice, however, to keep things local if that's practical.
21998
21999 There should be no result data from this function.
22000
22001
22002 @item (nnchoke-request-group-description GROUP &optional SERVER)
22003
22004 The result data from this function should be a description of
22005 @var{group}.
22006
22007 @example
22008 description-line = name <TAB> description eol
22009 name             = <string>
22010 description      = <text>
22011 @end example
22012
22013 @item (nnchoke-request-list-newsgroups &optional SERVER)
22014
22015 The result data from this function should be the description of all
22016 groups available on the server.
22017
22018 @example
22019 description-buffer = *description-line
22020 @end example
22021
22022
22023 @item (nnchoke-request-newgroups DATE &optional SERVER)
22024
22025 The result data from this function should be all groups that were
22026 created after @samp{date}, which is in normal human-readable date
22027 format.  The data should be in the active buffer format.
22028
22029
22030 @item (nnchoke-request-create-group GROUP &optional SERVER)
22031
22032 This function should create an empty group with name @var{group}.
22033
22034 There should be no return data.
22035
22036
22037 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
22038
22039 This function should run the expiry process on all articles in the
22040 @var{articles} range (which is currently a simple list of article
22041 numbers.)  It is left up to the backend to decide how old articles
22042 should be before they are removed by this function.  If @var{force} is
22043 non-@code{nil}, all @var{articles} should be deleted, no matter how new
22044 they are.
22045
22046 This function should return a list of articles that it did not/was not
22047 able to delete.
22048
22049 There should be no result data returned.
22050
22051
22052 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM
22053 &optional LAST)
22054
22055 This function should move @var{article} (which is a number) from
22056 @var{group} by calling @var{accept-form}.
22057
22058 This function should ready the article in question for moving by
22059 removing any header lines it has added to the article, and generally
22060 should ``tidy up'' the article.  Then it should @code{eval}
22061 @var{accept-form} in the buffer where the ``tidy'' article is.  This
22062 will do the actual copying.  If this @code{eval} returns a
22063 non-@code{nil} value, the article should be removed.
22064
22065 If @var{last} is @code{nil}, that means that there is a high likelihood
22066 that there will be more requests issued shortly, so that allows some
22067 optimizations.
22068
22069 The function should return a cons where the @code{car} is the group name and
22070 the @code{cdr} is the article number that the article was entered as.
22071
22072 There should be no data returned.
22073
22074
22075 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
22076
22077 This function takes the current buffer and inserts it into @var{group}.
22078 If @var{last} in @code{nil}, that means that there will be more calls to
22079 this function in short order.
22080
22081 The function should return a cons where the @code{car} is the group name and
22082 the @code{cdr} is the article number that the article was entered as.
22083
22084 There should be no data returned.
22085
22086
22087 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
22088
22089 This function should remove @var{article} (which is a number) from
22090 @var{group} and insert @var{buffer} there instead.
22091
22092 There should be no data returned.
22093
22094
22095 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
22096
22097 This function should delete @var{group}.  If @var{force}, it should
22098 really delete all the articles in the group, and then delete the group
22099 itself.  (If there is such a thing as ``the group itself''.)
22100
22101 There should be no data returned.
22102
22103
22104 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
22105
22106 This function should rename @var{group} into @var{new-name}.  All
22107 articles in @var{group} should move to @var{new-name}.
22108
22109 There should be no data returned.
22110
22111 @end table
22112
22113
22114 @node Error Messaging
22115 @subsubsection Error Messaging
22116
22117 @findex nnheader-report
22118 @findex nnheader-get-report
22119 The backends should use the function @code{nnheader-report} to report
22120 error conditions---they should not raise errors when they aren't able to
22121 perform a request.  The first argument to this function is the backend
22122 symbol, and the rest are interpreted as arguments to @code{format} if
22123 there are multiple of them, or just a string if there is one of them.
22124 This function must always returns @code{nil}.
22125
22126 @lisp
22127 (nnheader-report 'nnchoke "You did something totally bogus")
22128
22129 (nnheader-report 'nnchoke "Could not request group %s" group)
22130 @end lisp
22131
22132 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
22133 @code{nil} back from a server, and this function returns the most
22134 recently reported message for the backend in question.  This function
22135 takes one argument---the server symbol.
22136
22137 Internally, these functions access @var{backend}@code{-status-string},
22138 so the @code{nnchoke} backend will have its error message stored in
22139 @code{nnchoke-status-string}.
22140
22141
22142 @node Writing New Backends
22143 @subsubsection Writing New Backends
22144
22145 Many backends are quite similar.  @code{nnml} is just like
22146 @code{nnspool}, but it allows you to edit the articles on the server.
22147 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
22148 and it doesn't maintain overview databases.  @code{nndir} is just like
22149 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
22150 editing articles.
22151
22152 It would make sense if it were possible to ``inherit'' functions from
22153 backends when writing new backends.  And, indeed, you can do that if you
22154 want to.  (You don't have to if you don't want to, of course.)
22155
22156 All the backends declare their public variables and functions by using a
22157 package called @code{nnoo}.
22158
22159 To inherit functions from other backends (and allow other backends to
22160 inherit functions from the current backend), you should use the
22161 following macros:
22162
22163 @table @code
22164
22165 @item nnoo-declare
22166 This macro declares the first parameter to be a child of the subsequent
22167 parameters.  For instance:
22168
22169 @lisp
22170 (nnoo-declare nndir
22171   nnml nnmh)
22172 @end lisp
22173
22174 @code{nndir} has declared here that it intends to inherit functions from
22175 both @code{nnml} and @code{nnmh}.
22176
22177 @item defvoo
22178 This macro is equivalent to @code{defvar}, but registers the variable as
22179 a public server variable.  Most state-oriented variables should be
22180 declared with @code{defvoo} instead of @code{defvar}.
22181
22182 In addition to the normal @code{defvar} parameters, it takes a list of
22183 variables in the parent backends to map the variable to when executing
22184 a function in those backends.
22185
22186 @lisp
22187 (defvoo nndir-directory nil
22188   "Where nndir will look for groups."
22189   nnml-current-directory nnmh-current-directory)
22190 @end lisp
22191
22192 This means that @code{nnml-current-directory} will be set to
22193 @code{nndir-directory} when an @code{nnml} function is called on behalf
22194 of @code{nndir}.  (The same with @code{nnmh}.)
22195
22196 @item nnoo-define-basics
22197 This macro defines some common functions that almost all backends should
22198 have.
22199
22200 @example
22201 (nnoo-define-basics nndir)
22202 @end example
22203
22204 @item deffoo
22205 This macro is just like @code{defun} and takes the same parameters.  In
22206 addition to doing the normal @code{defun} things, it registers the
22207 function as being public so that other backends can inherit it.
22208
22209 @item nnoo-map-functions
22210 This macro allows mapping of functions from the current backend to
22211 functions from the parent backends.
22212
22213 @example
22214 (nnoo-map-functions nndir
22215   (nnml-retrieve-headers 0 nndir-current-group 0 0)
22216   (nnmh-request-article 0 nndir-current-group 0 0))
22217 @end example
22218
22219 This means that when @code{nndir-retrieve-headers} is called, the first,
22220 third, and fourth parameters will be passed on to
22221 @code{nnml-retrieve-headers}, while the second parameter is set to the
22222 value of @code{nndir-current-group}.
22223
22224 @item nnoo-import
22225 This macro allows importing functions from backends.  It should be the
22226 last thing in the source file, since it will only define functions that
22227 haven't already been defined.
22228
22229 @example
22230 (nnoo-import nndir
22231   (nnmh
22232    nnmh-request-list
22233    nnmh-request-newgroups)
22234   (nnml))
22235 @end example
22236
22237 This means that calls to @code{nndir-request-list} should just be passed
22238 on to @code{nnmh-request-list}, while all public functions from
22239 @code{nnml} that haven't been defined in @code{nndir} yet should be
22240 defined now.
22241
22242 @end table
22243
22244 Below is a slightly shortened version of the @code{nndir} backend.
22245
22246 @lisp
22247 ;;; nndir.el --- single directory newsgroup access for Gnus
22248 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
22249
22250 ;;; Code:
22251
22252 (require 'nnheader)
22253 (require 'nnmh)
22254 (require 'nnml)
22255 (require 'nnoo)
22256 (eval-when-compile (require 'cl))
22257
22258 (nnoo-declare nndir
22259   nnml nnmh)
22260
22261 (defvoo nndir-directory nil
22262   "Where nndir will look for groups."
22263   nnml-current-directory nnmh-current-directory)
22264
22265 (defvoo nndir-nov-is-evil nil
22266   "*Non-nil means that nndir will never retrieve NOV headers."
22267   nnml-nov-is-evil)
22268
22269 (defvoo nndir-current-group ""
22270   nil
22271   nnml-current-group nnmh-current-group)
22272 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
22273 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
22274
22275 (defvoo nndir-status-string "" nil nnmh-status-string)
22276 (defconst nndir-version "nndir 1.0")
22277
22278 ;;; Interface functions.
22279
22280 (nnoo-define-basics nndir)
22281
22282 (deffoo nndir-open-server (server &optional defs)
22283   (setq nndir-directory
22284         (or (cadr (assq 'nndir-directory defs))
22285             server))
22286   (unless (assq 'nndir-directory defs)
22287     (push `(nndir-directory ,server) defs))
22288   (push `(nndir-current-group
22289           ,(file-name-nondirectory
22290             (directory-file-name nndir-directory)))
22291         defs)
22292   (push `(nndir-top-directory
22293           ,(file-name-directory (directory-file-name nndir-directory)))
22294         defs)
22295   (nnoo-change-server 'nndir server defs))
22296
22297 (nnoo-map-functions nndir
22298   (nnml-retrieve-headers 0 nndir-current-group 0 0)
22299   (nnmh-request-article 0 nndir-current-group 0 0)
22300   (nnmh-request-group nndir-current-group 0 0)
22301   (nnmh-close-group nndir-current-group 0))
22302
22303 (nnoo-import nndir
22304   (nnmh
22305    nnmh-status-message
22306    nnmh-request-list
22307    nnmh-request-newgroups))
22308
22309 (provide 'nndir)
22310 @end lisp
22311
22312
22313 @node Hooking New Backends Into Gnus
22314 @subsubsection Hooking New Backends Into Gnus
22315
22316 @vindex gnus-valid-select-methods
22317 Having Gnus start using your new backend is rather easy---you just
22318 declare it with the @code{gnus-declare-backend} functions.  This will
22319 enter the backend into the @code{gnus-valid-select-methods} variable.
22320
22321 @code{gnus-declare-backend} takes two parameters---the backend name and
22322 an arbitrary number of @dfn{abilities}.
22323
22324 Here's an example:
22325
22326 @lisp
22327 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
22328 @end lisp
22329
22330 The abilities can be:
22331
22332 @table @code
22333 @item mail
22334 This is a mailish backend---followups should (probably) go via mail.
22335 @item post
22336 This is a newsish backend---followups should (probably) go via news.
22337 @item post-mail
22338 This backend supports both mail and news.
22339 @item none
22340 This is neither a post nor mail backend---it's something completely
22341 different.
22342 @item respool
22343 It supports respooling---or rather, it is able to modify its source
22344 articles and groups.
22345 @item address
22346 The name of the server should be in the virtual server name.  This is
22347 true for almost all backends.
22348 @item prompt-address
22349 The user should be prompted for an address when doing commands like
22350 @kbd{B} in the group buffer.  This is true for backends like
22351 @code{nntp}, but not @code{nnmbox}, for instance.
22352 @end table
22353
22354
22355 @node Mail-like Backends
22356 @subsubsection Mail-like Backends
22357
22358 One of the things that separate the mail backends from the rest of the
22359 backends is the heavy dependence by the mail backends on common
22360 functions in @file{nnmail.el}.  For instance, here's the definition of
22361 @code{nnml-request-scan}:
22362
22363 @lisp
22364 (deffoo nnml-request-scan (&optional group server)
22365   (setq nnml-article-file-alist nil)
22366   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
22367 @end lisp
22368
22369 It simply calls @code{nnmail-get-new-mail} with a few parameters,
22370 and @code{nnmail} takes care of all the moving and splitting of the
22371 mail.
22372
22373 This function takes four parameters.
22374
22375 @table @var
22376 @item method
22377 This should be a symbol to designate which backend is responsible for
22378 the call.
22379
22380 @item exit-function
22381 This function should be called after the splitting has been performed.
22382
22383 @item temp-directory
22384 Where the temporary files should be stored.
22385
22386 @item group
22387 This optional argument should be a group name if the splitting is to be
22388 performed for one group only.
22389 @end table
22390
22391 @code{nnmail-get-new-mail} will call @var{backend}@code{-save-mail} to
22392 save each article.  @var{backend}@code{-active-number} will be called to
22393 find the article number assigned to this article.
22394
22395 The function also uses the following variables:
22396 @var{backend}@code{-get-new-mail} (to see whether to get new mail for
22397 this backend); and @var{backend}@code{-group-alist} and
22398 @var{backend}@code{-active-file} to generate the new active file.
22399 @var{backend}@code{-group-alist} should be a group-active alist, like
22400 this:
22401
22402 @example
22403 (("a-group" (1 . 10))
22404  ("some-group" (34 . 39)))
22405 @end example
22406
22407
22408 @node Score File Syntax
22409 @subsection Score File Syntax
22410
22411 Score files are meant to be easily parseable, but yet extremely
22412 mallable.   It was decided that something that had the same read syntax
22413 as an Emacs Lisp list would fit that spec.
22414
22415 Here's a typical score file:
22416
22417 @lisp
22418 (("summary"
22419   ("win95" -10000 nil s)
22420   ("Gnus"))
22421  ("from"
22422   ("Lars" -1000))
22423  (mark -100))
22424 @end lisp
22425
22426 BNF definition of a score file:
22427
22428 @example
22429 score-file      = "" / "(" *element ")"
22430 element         = rule / atom
22431 rule            = string-rule / number-rule / date-rule
22432 string-rule     = "(" quote string-header quote space *string-match ")"
22433 number-rule     = "(" quote number-header quote space *number-match ")"
22434 date-rule       = "(" quote date-header quote space *date-match ")"
22435 quote           = <ascii 34>
22436 string-header   = "subject" / "from" / "references" / "message-id" /
22437                   "xref" / "body" / "head" / "all" / "followup"
22438 number-header   = "lines" / "chars"
22439 date-header     = "date"
22440 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
22441                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
22442 score           = "nil" / <integer>
22443 date            = "nil" / <natural number>
22444 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
22445                   "r" / "regex" / "R" / "Regex" /
22446                   "e" / "exact" / "E" / "Exact" /
22447                   "f" / "fuzzy" / "F" / "Fuzzy"
22448 number-match    = "(" <integer> [ "" / [ space score [ "" /
22449                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
22450 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
22451 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
22452                   space date [ "" / [ space date-match-t ] ] ] ] ")"
22453 date-match-t    = "nil" / "at" / "before" / "after"
22454 atom            = "(" [ required-atom / optional-atom ] ")"
22455 required-atom   = mark / expunge / mark-and-expunge / files /
22456                   exclude-files / read-only / touched
22457 optional-atom   = adapt / local / eval
22458 mark            = "mark" space nil-or-number
22459 nil-or-number   = "nil" / <integer>
22460 expunge         = "expunge" space nil-or-number
22461 mark-and-expunge = "mark-and-expunge" space nil-or-number
22462 files           = "files" *[ space <string> ]
22463 exclude-files   = "exclude-files" *[ space <string> ]
22464 read-only       = "read-only" [ space "nil" / space "t" ]
22465 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
22466 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
22467 local           = "local" *[ space "(" <string> space <form> ")" ]
22468 eval            = "eval" space <form>
22469 space           = *[ " " / <TAB> / <NEWLINE> ]
22470 @end example
22471
22472 Any unrecognized elements in a score file should be ignored, but not
22473 discarded.
22474
22475 As you can see, white space is needed, but the type and amount of white
22476 space is irrelevant.  This means that formatting of the score file is
22477 left up to the programmer---if it's simpler to just spew it all out on
22478 one looong line, then that's ok.
22479
22480 The meaning of the various atoms are explained elsewhere in this
22481 manual (@pxref{Score File Format}).
22482
22483
22484 @node Headers
22485 @subsection Headers
22486
22487 Internally Gnus uses a format for storing article headers that
22488 corresponds to the @sc{nov} format in a mysterious fashion.  One could
22489 almost suspect that the author looked at the @sc{nov} specification and
22490 just shamelessly @emph{stole} the entire thing, and one would be right.
22491
22492 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
22493 RFC 1036 to talk about lines in the head of an article (e.g.,
22494 @code{From}).  It is used by many people as a synonym for
22495 ``head''---``the header and the body''.  (That should be avoided, in my
22496 opinion.)  And Gnus uses a format internally that it calls ``header'',
22497 which is what I'm talking about here.  This is a 9-element vector,
22498 basically, with each header (ouch) having one slot.
22499
22500 These slots are, in order: @code{number}, @code{subject}, @code{from},
22501 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
22502 @code{xref}, and @code{extra}.  There are macros for accessing and
22503 setting these slots---they all have predictable names beginning with
22504 @code{mail-header-} and @code{mail-header-set-}, respectively.
22505
22506 All these slots contain strings, except the @code{extra} slot, which
22507 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
22508
22509
22510 @node Ranges
22511 @subsection Ranges
22512
22513 @sc{gnus} introduced a concept that I found so useful that I've started
22514 using it a lot and have elaborated on it greatly.
22515
22516 The question is simple: If you have a large amount of objects that are
22517 identified by numbers (say, articles, to take a @emph{wild} example)
22518 that you want to qualify as being ``included'', a normal sequence isn't
22519 very useful.  (A 200,000 length sequence is a bit long-winded.)
22520
22521 The solution is as simple as the question: You just collapse the
22522 sequence.
22523
22524 @example
22525 (1 2 3 4 5 6 10 11 12)
22526 @end example
22527
22528 is transformed into
22529
22530 @example
22531 ((1 . 6) (10 . 12))
22532 @end example
22533
22534 To avoid having those nasty @samp{(13 . 13)} elements to denote a
22535 lonesome object, a @samp{13} is a valid element:
22536
22537 @example
22538 ((1 . 6) 7 (10 . 12))
22539 @end example
22540
22541 This means that comparing two ranges to find out whether they are equal
22542 is slightly tricky:
22543
22544 @example
22545 ((1 . 5) 7 8 (10 . 12))
22546 @end example
22547
22548 and
22549
22550 @example
22551 ((1 . 5) (7 . 8) (10 . 12))
22552 @end example
22553
22554 are equal.  In fact, any non-descending list is a range:
22555
22556 @example
22557 (1 2 3 4 5)
22558 @end example
22559
22560 is a perfectly valid range, although a pretty long-winded one.  This is
22561 also valid:
22562
22563 @example
22564 (1 . 5)
22565 @end example
22566
22567 and is equal to the previous range.
22568
22569 Here's a BNF definition of ranges.  Of course, one must remember the
22570 semantic requirement that the numbers are non-descending.  (Any number
22571 of repetition of the same number is allowed, but apt to disappear in
22572 range handling.)
22573
22574 @example
22575 range           = simple-range / normal-range
22576 simple-range    = "(" number " . " number ")"
22577 normal-range    = "(" start-contents ")"
22578 contents        = "" / simple-range *[ " " contents ] /
22579                   number *[ " " contents ]
22580 @end example
22581
22582 Gnus currently uses ranges to keep track of read articles and article
22583 marks.  I plan on implementing a number of range operators in C if The
22584 Powers That Be are willing to let me.  (I haven't asked yet, because I
22585 need to do some more thinking on what operators I need to make life
22586 totally range-based without ever having to convert back to normal
22587 sequences.)
22588
22589
22590 @node Group Info
22591 @subsection Group Info
22592
22593 Gnus stores all permanent info on groups in a @dfn{group info} list.
22594 This list is from three to six elements (or more) long and exhaustively
22595 describes the group.
22596
22597 Here are two example group infos; one is a very simple group while the
22598 second is a more complex one:
22599
22600 @example
22601 ("no.group" 5 ((1 . 54324)))
22602
22603 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
22604                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
22605                 (nnml "")
22606                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
22607 @end example
22608
22609 The first element is the @dfn{group name}---as Gnus knows the group,
22610 anyway.  The second element is the @dfn{subscription level}, which
22611 normally is a small integer.  (It can also be the @dfn{rank}, which is a
22612 cons cell where the @code{car} is the level and the @code{cdr} is the
22613 score.)  The third element is a list of ranges of read articles.  The
22614 fourth element is a list of lists of article marks of various kinds.
22615 The fifth element is the select method (or virtual server, if you like).
22616 The sixth element is a list of @dfn{group parameters}, which is what
22617 this section is about.
22618
22619 Any of the last three elements may be missing if they are not required.
22620 In fact, the vast majority of groups will normally only have the first
22621 three elements, which saves quite a lot of cons cells.
22622
22623 Here's a BNF definition of the group info format:
22624
22625 @example
22626 info          = "(" group space ralevel space read
22627                 [ "" / [ space marks-list [ "" / [ space method [ "" /
22628                 space parameters ] ] ] ] ] ")"
22629 group         = quote <string> quote
22630 ralevel       = rank / level
22631 level         = <integer in the range of 1 to inf>
22632 rank          = "(" level "." score ")"
22633 score         = <integer in the range of 1 to inf>
22634 read          = range
22635 marks-lists   = nil / "(" *marks ")"
22636 marks         = "(" <string> range ")"
22637 method        = "(" <string> *elisp-forms ")"
22638 parameters    = "(" *elisp-forms ")"
22639 @end example
22640
22641 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
22642 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
22643 in pseudo-BNF.
22644
22645 If you have a Gnus info and want to access the elements, Gnus offers a
22646 series of macros for getting/setting these elements.
22647
22648 @table @code
22649 @item gnus-info-group
22650 @itemx gnus-info-set-group
22651 @findex gnus-info-group
22652 @findex gnus-info-set-group
22653 Get/set the group name.
22654
22655 @item gnus-info-rank
22656 @itemx gnus-info-set-rank
22657 @findex gnus-info-rank
22658 @findex gnus-info-set-rank
22659 Get/set the group rank (@pxref{Group Score}).
22660
22661 @item gnus-info-level
22662 @itemx gnus-info-set-level
22663 @findex gnus-info-level
22664 @findex gnus-info-set-level
22665 Get/set the group level.
22666
22667 @item gnus-info-score
22668 @itemx gnus-info-set-score
22669 @findex gnus-info-score
22670 @findex gnus-info-set-score
22671 Get/set the group score (@pxref{Group Score}).
22672
22673 @item gnus-info-read
22674 @itemx gnus-info-set-read
22675 @findex gnus-info-read
22676 @findex gnus-info-set-read
22677 Get/set the ranges of read articles.
22678
22679 @item gnus-info-marks
22680 @itemx gnus-info-set-marks
22681 @findex gnus-info-marks
22682 @findex gnus-info-set-marks
22683 Get/set the lists of ranges of marked articles.
22684
22685 @item gnus-info-method
22686 @itemx gnus-info-set-method
22687 @findex gnus-info-method
22688 @findex gnus-info-set-method
22689 Get/set the group select method.
22690
22691 @item gnus-info-params
22692 @itemx gnus-info-set-params
22693 @findex gnus-info-params
22694 @findex gnus-info-set-params
22695 Get/set the group parameters.
22696 @end table
22697
22698 All the getter functions take one parameter---the info list.  The setter
22699 functions take two parameters---the info list and the new value.
22700
22701 The last three elements in the group info aren't mandatory, so it may be
22702 necessary to extend the group info before setting the element.  If this
22703 is necessary, you can just pass on a non-@code{nil} third parameter to
22704 the three final setter functions to have this happen automatically.
22705
22706
22707 @node Extended Interactive
22708 @subsection Extended Interactive
22709 @cindex interactive
22710 @findex gnus-interactive
22711
22712 Gnus extends the standard Emacs @code{interactive} specification
22713 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
22714 Prefixes}).  Here's an example of how this is used:
22715
22716 @lisp
22717 (defun gnus-summary-increase-score (&optional score symp)
22718   (interactive (gnus-interactive "P\ny"))
22719   ...
22720   )
22721 @end lisp
22722
22723 The best thing to do would have been to implement
22724 @code{gnus-interactive} as a macro which would have returned an
22725 @code{interactive} form, but this isn't possible since Emacs checks
22726 whether a function is interactive or not by simply doing an @code{assq}
22727 on the lambda form.  So, instead we have @code{gnus-interactive}
22728 function that takes a string and returns values that are usable to
22729 @code{interactive}.
22730
22731 This function accepts (almost) all normal @code{interactive} specs, but
22732 adds a few more.
22733
22734 @table @samp
22735 @item y
22736 @vindex gnus-current-prefix-symbol
22737 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
22738 variable.
22739
22740 @item Y
22741 @vindex gnus-current-prefix-symbols
22742 A list of the current symbolic prefixes---the
22743 @code{gnus-current-prefix-symbol} variable.
22744
22745 @item A
22746 The current article number---the @code{gnus-summary-article-number}
22747 function.
22748
22749 @item H
22750 The current article header---the @code{gnus-summary-article-header}
22751 function.
22752
22753 @item g
22754 The current group name---the @code{gnus-group-group-name}
22755 function.
22756
22757 @end table
22758
22759
22760 @node Emacs/XEmacs Code
22761 @subsection Emacs/XEmacs Code
22762 @cindex XEmacs
22763 @cindex Emacsen
22764
22765 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
22766 platforms must be the primary one.  I chose Emacs.  Not because I don't
22767 like XEmacs or Mule, but because it comes first alphabetically.
22768
22769 This means that Gnus will byte-compile under Emacs with nary a warning,
22770 while XEmacs will pump out gigabytes of warnings while byte-compiling.
22771 As I use byte-compilation warnings to help me root out trivial errors in
22772 Gnus, that's very useful.
22773
22774 I've also consistently used Emacs function interfaces, but have used
22775 Gnusey aliases for the functions.  To take an example:  Emacs defines a
22776 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
22777 function.  I then define a function called @code{gnus-run-at-time} that
22778 takes the same parameters as the Emacs @code{run-at-time}.  When running
22779 Gnus under Emacs, the former function is just an alias for the latter.
22780 However, when running under XEmacs, the former is an alias for the
22781 following function:
22782
22783 @lisp
22784 (defun gnus-xmas-run-at-time (time repeat function &rest args)
22785   (start-itimer
22786    "gnus-run-at-time"
22787    `(lambda ()
22788       (,function ,@@args))
22789    time repeat))
22790 @end lisp
22791
22792 This sort of thing has been done for bunches of functions.  Gnus does
22793 not redefine any native Emacs functions while running under XEmacs---it
22794 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
22795 all over.
22796
22797 In the cases where the XEmacs function interface was obviously cleaner,
22798 I used it instead.  For example @code{gnus-region-active-p} is an alias
22799 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
22800
22801 Of course, I could have chosen XEmacs as my native platform and done
22802 mapping functions the other way around.  But I didn't.  The performance
22803 hit these indirections impose on Gnus under XEmacs should be slight.
22804
22805
22806 @node Various File Formats
22807 @subsection Various File Formats
22808
22809 @menu
22810 * Active File Format::          Information on articles and groups available.
22811 * Newsgroups File Format::      Group descriptions.
22812 @end menu
22813
22814
22815 @node Active File Format
22816 @subsubsection Active File Format
22817
22818 The active file lists all groups available on the server in
22819 question.  It also lists the highest and lowest current article numbers
22820 in each group.
22821
22822 Here's an excerpt from a typical active file:
22823
22824 @example
22825 soc.motss 296030 293865 y
22826 alt.binaries.pictures.fractals 3922 3913 n
22827 comp.sources.unix 1605 1593 m
22828 comp.binaries.ibm.pc 5097 5089 y
22829 no.general 1000 900 y
22830 @end example
22831
22832 Here's a pseudo-BNF definition of this file:
22833
22834 @example
22835 active      = *group-line
22836 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
22837 group       = <non-white-space string>
22838 spc         = " "
22839 high-number = <non-negative integer>
22840 low-number  = <positive integer>
22841 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
22842 @end example
22843
22844 For a full description of this file, see the manual pages for
22845 @samp{innd}, in particular @samp{active(5)}.
22846
22847
22848 @node Newsgroups File Format
22849 @subsubsection Newsgroups File Format
22850
22851 The newsgroups file lists groups along with their descriptions.  Not all
22852 groups on the server have to be listed,  and not all groups in the file
22853 have to exist on the server.  The file is meant purely as information to
22854 the user.
22855
22856 The format is quite simple; a group name, a tab, and the description.
22857 Here's the definition:
22858
22859 @example
22860 newsgroups    = *line
22861 line          = group tab description <NEWLINE>
22862 group         = <non-white-space string>
22863 tab           = <TAB>
22864 description   = <string>
22865 @end example
22866
22867
22868 @page
22869 @node Emacs for Heathens
22870 @section Emacs for Heathens
22871
22872 Believe it or not, but some people who use Gnus haven't really used
22873 Emacs much before they embarked on their journey on the Gnus Love Boat.
22874 If you are one of those unfortunates whom ``@kbd{M-C-a}'', ``kill the
22875 region'', and ``set @code{gnus-flargblossen} to an alist where the key
22876 is a regexp that is used for matching on the group name'' are magical
22877 phrases with little or no meaning, then this appendix is for you.  If
22878 you are already familiar with Emacs, just ignore this and go fondle your
22879 cat instead.
22880
22881 @menu
22882 * Keystrokes::                  Entering text and executing commands.
22883 * Emacs Lisp::                  The built-in Emacs programming language.
22884 @end menu
22885
22886
22887 @node Keystrokes
22888 @subsection Keystrokes
22889
22890 @itemize @bullet
22891 @item
22892 Q: What is an experienced Emacs user?
22893
22894 @item
22895 A: A person who wishes that the terminal had pedals.
22896 @end itemize
22897
22898 Yes, when you use Emacs, you are apt to use the control key, the shift
22899 key and the meta key a lot.  This is very annoying to some people
22900 (notably @code{vi}le users), and the rest of us just love the hell out
22901 of it.  Just give up and submit.  Emacs really does stand for
22902 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
22903 may have heard from other disreputable sources (like the Emacs author).
22904
22905 The shift keys are normally located near your pinky fingers, and are
22906 normally used to get capital letters and stuff.  You probably use it all
22907 the time.  The control key is normally marked ``CTRL'' or something like
22908 that.  The meta key is, funnily enough, never marked as such on any
22909 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
22910 which is the meta key on this keyboard.  It's usually located somewhere
22911 to the left hand side of the keyboard, usually on the bottom row.
22912
22913 Now, us Emacs people don't say ``press the meta-control-m key'',
22914 because that's just too inconvenient.  We say ``press the @kbd{M-C-m}
22915 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
22916 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
22917 down the control key, and hold it down while you press @kbd{k}''.
22918 ``Press @kbd{M-C-k}'' means ``press down and hold down the meta key and
22919 the control key and then press @kbd{k}''.  Simple, ay?
22920
22921 This is somewhat complicated by the fact that not all keyboards have a
22922 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
22923 means ``press escape, release escape, press @kbd{k}''.  That's much more
22924 work than if you have a meta key, so if that's the case, I respectfully
22925 suggest you get a real keyboard with a meta key.  You can't live without
22926 it.
22927
22928
22929
22930 @node Emacs Lisp
22931 @subsection Emacs Lisp
22932
22933 Emacs is the King of Editors because it's really a Lisp interpreter.
22934 Each and every key you tap runs some Emacs Lisp code snippet, and since
22935 Emacs Lisp is an interpreted language, that means that you can configure
22936 any key to run any arbitrary code.  You just, like, do it.
22937
22938 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
22939 functions.  (These are byte-compiled for speed, but it's still
22940 interpreted.)  If you decide that you don't like the way Gnus does
22941 certain things, it's trivial to have it do something a different way.
22942 (Well, at least if you know how to write Lisp code.)  However, that's
22943 beyond the scope of this manual, so we are simply going to talk about
22944 some common constructs that you normally use in your @file{.emacs} file
22945 to customize Gnus.
22946
22947 If you want to set the variable @code{gnus-florgbnize} to four (4), you
22948 write the following:
22949
22950 @lisp
22951 (setq gnus-florgbnize 4)
22952 @end lisp
22953
22954 This function (really ``special form'') @code{setq} is the one that can
22955 set a variable to some value.  This is really all you need to know.  Now
22956 you can go and fill your @code{.emacs} file with lots of these to change
22957 how Gnus works.
22958
22959 If you have put that thing in your @code{.emacs} file, it will be read
22960 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
22961 start Emacs.  If you want to change the variable right away, simply say
22962 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
22963 previous ``form'', which is a simple @code{setq} statement here.
22964
22965 Go ahead---just try it, if you're located at your Emacs.  After you
22966 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
22967 is the return value of the form you @code{eval}ed.
22968
22969 Some pitfalls:
22970
22971 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
22972 that means:
22973
22974 @lisp
22975 (setq gnus-read-active-file 'some)
22976 @end lisp
22977
22978 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
22979 @samp{nntp.ifi.uio.no}'', that means:
22980
22981 @lisp
22982 (setq gnus-nntp-server "nntp.ifi.uio.no")
22983 @end lisp
22984
22985 So be careful not to mix up strings (the latter) with symbols (the
22986 former).  The manual is unambiguous, but it can be confusing.
22987
22988 @page
22989 @include gnus-faq.texi
22990
22991 @node Index
22992 @chapter Index
22993 @printindex cp
22994
22995 @node Key Index
22996 @chapter Key Index
22997 @printindex ky
22998
22999 @summarycontents
23000 @contents
23001 @bye
23002
23003 @iftex
23004 @iflatex
23005 \end{document}
23006 @end iflatex
23007 @end iftex
23008
23009 @c End:
23010 % LocalWords:  Backend BNF mucho Backends backends detailmenu cindex kindex kbd
23011 % LocalWords:  findex Gnusae vindex dfn dfn samp nntp setq nnspool nntpserver
23012 % LocalWords:  nnmbox backend newusers Blllrph NEWGROUPS dingnusdingnusdingnus
23013 % LocalWords:  pre fab rec comp nnslashdot regex ga ga sci nnml nnbabyl nnmh
23014 % LocalWords:  nnfolder emph looong eld newsreaders defun init elc pxref