(Filtering Spam Using The Spam ELisp Package): added
[gnus] / texi / gnus.texi
1 \input texinfo
2
3 @setfilename gnus
4 @settitle Gnus Manual
5 @syncodeindex fn cp
6 @syncodeindex vr cp
7 @syncodeindex pg cp
8 @dircategory Emacs
9 @direntry
10 * Gnus: (gnus).         The newsreader Gnus.
11 @end direntry
12 @iftex
13 @finalout
14 @end iftex
15 @setchapternewpage odd
16
17 @iftex
18 @iflatex
19 \documentclass[twoside,a4paper,openright,11pt]{book}
20 \usepackage[latin1]{inputenc}
21 \usepackage{pagestyle}
22 \usepackage{epsfig}
23 \usepackage{pixidx}
24 \input{gnusconfig.tex}
25
26 \ifx\pdfoutput\undefined
27 \else
28 \usepackage[pdftex,bookmarks,colorlinks=true]{hyperref}
29 \usepackage{thumbpdf}
30 \pdfcompresslevel=9
31 \fi
32
33 \makeindex
34 \begin{document}
35
36 \newcommand{\gnusversionname}{Gnus v5.10.2}
37 \newcommand{\gnuschaptername}{}
38 \newcommand{\gnussectionname}{}
39
40 \newcommand{\gnusbackslash}{/}
41
42 \newcommand{\gnusref}[1]{``#1'' on page \pageref{#1}}
43 \ifx\pdfoutput\undefined
44 \newcommand{\gnusuref}[1]{\gnustt{#1}}
45 \else
46 \newcommand{\gnusuref}[1]{\href{#1}{\gnustt{#1}}}
47 \fi
48 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
49 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
50
51 \newcommand{\gnuskindex}[1]{\index{#1}}
52 \newcommand{\gnusindex}[1]{\index{#1}}
53
54 \newcommand{\gnustt}[1]{{\gnusselectttfont{}#1}}
55 \newcommand{\gnuscode}[1]{\gnustt{#1}}
56 \newcommand{\gnusasis}[1]{\gnustt{#1}}
57 \newcommand{\gnusurl}[1]{\gnustt{#1}}
58 \newcommand{\gnuscommand}[1]{\gnustt{#1}}
59 \newcommand{\gnusenv}[1]{\gnustt{#1}}
60 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
61 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
62 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
63 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
64 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
65 \newcommand{\gnusdfn}[1]{\textit{#1}}
66 \newcommand{\gnusi}[1]{\textit{#1}}
67 \newcommand{\gnusr}[1]{\textrm{#1}}
68 \newcommand{\gnusstrong}[1]{\textbf{#1}}
69 \newcommand{\gnusemph}[1]{\textit{#1}}
70 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
71 \newcommand{\gnussc}[1]{\textsc{#1}}
72 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
73 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
74 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
75 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
76 \newcommand{\gnusacronym}[1]{\textsc{#1}}
77 \newcommand{\gnusemail}[1]{\textit{#1}}
78
79 \newcommand{\gnusbullet}{{${\bullet}$}}
80 \newcommand{\gnusdollar}{\$}
81 \newcommand{\gnusampersand}{\&}
82 \newcommand{\gnuspercent}{\%}
83 \newcommand{\gnushash}{\#}
84 \newcommand{\gnushat}{\symbol{"5E}}
85 \newcommand{\gnusunderline}{\symbol{"5F}}
86 \newcommand{\gnusnot}{$\neg$}
87 \newcommand{\gnustilde}{\symbol{"7E}}
88 \newcommand{\gnusless}{{$<$}}
89 \newcommand{\gnusgreater}{{$>$}}
90 \newcommand{\gnusbraceleft}{{$>$}}
91 \newcommand{\gnusbraceright}{{$>$}}
92
93 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
94 \newcommand{\gnusinteresting}{
95 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
96 }
97
98 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
99
100 \newcommand{\gnuspagechapter}[1]{
101 {\mbox{}}
102 }
103
104 \newdimen{\gnusdimen}
105 \gnusdimen 0pt
106
107 \newcommand{\gnuschapter}[2]{
108 \gnuscleardoublepage
109 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
110 \chapter{#2}
111 \renewcommand{\gnussectionname}{}
112 \renewcommand{\gnuschaptername}{#2}
113 \thispagestyle{empty}
114 \hspace*{-2cm}
115 \begin{picture}(500,500)(0,0)
116 \put(480,350){\makebox(0,0)[tr]{#1}}
117 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
118 \end{picture}
119 \clearpage
120 }
121
122 \newcommand{\gnusfigure}[3]{
123 \begin{figure}
124 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
125 #3
126 \end{picture}
127 \caption{#1}
128 \end{figure}
129 }
130
131 \newcommand{\gnusicon}[1]{
132 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
133 }
134
135 \newcommand{\gnuspicon}[1]{
136 \margindex{\epsfig{figure=#1,width=2cm}}
137 }
138
139 \newcommand{\gnusxface}[2]{
140 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
141 }
142
143 \newcommand{\gnussmiley}[2]{
144 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
145 }
146
147 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
148
149 \newcommand{\gnussection}[1]{
150 \renewcommand{\gnussectionname}{#1}
151 \section{#1}
152 }
153
154 \newenvironment{codelist}%
155 {\begin{list}{}{
156 }
157 }{\end{list}}
158
159 \newenvironment{asislist}%
160 {\begin{list}{}{
161 }
162 }{\end{list}}
163
164 \newenvironment{kbdlist}%
165 {\begin{list}{}{
166 \labelwidth=0cm
167 }
168 }{\end{list}}
169
170 \newenvironment{dfnlist}%
171 {\begin{list}{}{
172 }
173 }{\end{list}}
174
175 \newenvironment{stronglist}%
176 {\begin{list}{}{
177 }
178 }{\end{list}}
179
180 \newenvironment{samplist}%
181 {\begin{list}{}{
182 }
183 }{\end{list}}
184
185 \newenvironment{varlist}%
186 {\begin{list}{}{
187 }
188 }{\end{list}}
189
190 \newenvironment{emphlist}%
191 {\begin{list}{}{
192 }
193 }{\end{list}}
194
195 \newlength\gnusheadtextwidth
196 \setlength{\gnusheadtextwidth}{\headtextwidth}
197 \addtolength{\gnusheadtextwidth}{1cm}
198
199 \newpagestyle{gnuspreamble}%
200 {
201 {
202 \ifodd\count0
203 {
204 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
205 }
206 \else
207 {
208 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
209 }
210 }
211 \fi
212 }
213 }
214 {
215 \ifodd\count0
216 \mbox{} \hfill
217 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
218 \else
219 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
220 \hfill \mbox{}
221 \fi
222 }
223
224 \newpagestyle{gnusindex}%
225 {
226 {
227 \ifodd\count0
228 {
229 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
230 }
231 \else
232 {
233 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
234 }
235 \fi
236 }
237 }
238 {
239 \ifodd\count0
240 \mbox{} \hfill
241 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
242 \else
243 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
244 \hfill \mbox{}
245 \fi
246 }
247
248 \newpagestyle{gnus}%
249 {
250 {
251 \ifodd\count0
252 {
253 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
254 }
255 \else
256 {
257 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
258 }
259 \fi
260 }
261 }
262 {
263 \ifodd\count0
264 \mbox{} \hfill
265 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
266 \else
267 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
268 \hfill \mbox{}
269 \fi
270 }
271
272 \pagenumbering{roman}
273 \pagestyle{gnuspreamble}
274
275 @end iflatex
276 @end iftex
277
278 @iftex
279 @iflatex
280 \begin{titlepage}
281 {
282
283 %\addtolength{\oddsidemargin}{-5cm}
284 %\addtolength{\evensidemargin}{-5cm}
285 \parindent=0cm
286 \addtolength{\textheight}{2cm}
287
288 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
289 \rule{15cm}{1mm}\\
290 \vfill
291 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
292 \vfill
293 \rule{15cm}{1mm}\\
294 \gnusauthor{by Lars Magne Ingebrigtsen}
295 \newpage
296 }
297
298 \mbox{}
299 \vfill
300
301 \thispagestyle{empty}
302
303 Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
304 2002, 2003
305 Free Software Foundation, Inc.
306
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 no
311 Invariant Sections, 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 \newpage
325 \end{titlepage}
326 @end iflatex
327 @end iftex
328
329 @ifnottex
330
331 This file documents Gnus, the GNU Emacs newsreader.
332
333 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
334         Free Software Foundation, Inc.
335
336 Permission is granted to copy, distribute and/or modify this document
337 under the terms of the GNU Free Documentation License, Version 1.1 or
338 any later version published by the Free Software Foundation; with the
339 Invariant Sections being none, with the Front-Cover texts being ``A GNU
340 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
341 license is included in the section entitled ``GNU Free Documentation
342 License'' in the Emacs manual.
343
344 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
345 this GNU Manual, like GNU software.  Copies published by the Free
346 Software Foundation raise funds for GNU development.''
347
348 This document is part of a collection distributed under the GNU Free
349 Documentation License.  If you want to distribute this document
350 separately from the collection, you can do so by adding a copy of the
351 license to the document, as described in section 6 of the license.
352 @end ifnottex
353
354 @tex
355
356 @titlepage
357 @title Gnus Manual
358
359 @author by Lars Magne Ingebrigtsen
360 @page
361
362 @vskip 0pt plus 1filll
363 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
364 2002, 2003
365         Free Software Foundation, Inc.
366
367 Permission is granted to copy, distribute and/or modify this document
368 under the terms of the GNU Free Documentation License, Version 1.1 or
369 any later version published by the Free Software Foundation; with no
370 Invariant Sections, with the Front-Cover texts being ``A GNU
371 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
372 license is included in the section entitled ``GNU Free Documentation
373 License'' in the Emacs manual.
374
375 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
376 this GNU Manual, like GNU software.  Copies published by the Free
377 Software Foundation raise funds for GNU development.''
378
379 This document is part of a collection distributed under the GNU Free
380 Documentation License.  If you want to distribute this document
381 separately from the collection, you can do so by adding a copy of the
382 license to the document, as described in section 6 of the license.
383
384 @end titlepage
385 @page
386
387 @end tex
388
389
390 @node Top
391 @top The Gnus Newsreader
392
393 @ifinfo
394
395 You can read news (and mail) from within Emacs by using Gnus.  The news
396 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
397 spool or your mbox file.  All at the same time, if you want to push your
398 luck.
399
400 This manual corresponds to Gnus v5.10.2.
401
402 @end ifinfo
403
404 @iftex
405
406 @iflatex
407 \tableofcontents
408 \gnuscleardoublepage
409 @end iflatex
410
411 Gnus is the advanced, self-documenting, customizable, extensible
412 unreal-time newsreader for GNU Emacs.
413
414 Oops.  That sounds oddly familiar, so let's start over again to avoid
415 being accused of plagiarism:
416
417 Gnus is a message-reading laboratory.  It will let you look at just
418 about anything as if it were a newsgroup.  You can read mail with it,
419 you can browse directories with it, you can @code{ftp} with it---you
420 can even read news with it!
421
422 Gnus tries to empower people who read news the same way Emacs empowers
423 people who edit text.  Gnus sets no limits to what the user should be
424 allowed to do.  Users are encouraged to extend Gnus to make it behave
425 like they want it to behave.  A program should not control people;
426 people should be empowered to do what they want by using (or abusing)
427 the program.
428
429 @end iftex
430
431 @menu
432 * Starting Up::                 Finding news can be a pain.
433 * Group Buffer::                Selecting, subscribing and killing groups.
434 * Summary Buffer::              Reading, saving and posting articles.
435 * Article Buffer::              Displaying and handling articles.
436 * Composing Messages::          Information on sending mail and news.
437 * Select Methods::              Gnus reads all messages from various select methods.
438 * Scoring::                     Assigning values to articles.
439 * Various::                     General purpose settings.
440 * The End::                     Farewell and goodbye.
441 * Appendices::                  Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
442 * Index::                       Variable, function and concept index.
443 * Key Index::                   Key Index.
444
445 Other related manuals
446
447 * Message:(message).            Composing messages.
448 * Emacs-MIME:(emacs-mime).      Composing messages; @acronym{MIME}-specific parts.
449 * Sieve:(sieve).                Managing Sieve scripts in Emacs.
450 * PGG:(pgg).                    @acronym{PGP/MIME} with Gnus.
451
452 @detailmenu
453  --- The Detailed Node Listing ---
454
455 Starting Gnus
456
457 * Finding the News::            Choosing a method for getting news.
458 * The First Time::              What does Gnus do the first time you start it?
459 * The Server is Down::          How can I read my mail then?
460 * Slave Gnusae::                You can have more than one Gnus active at a time.
461 * Fetching a Group::            Starting Gnus just to read a group.
462 * New Groups::                  What is Gnus supposed to do with new groups?
463 * Changing Servers::            You may want to move from one server to another.
464 * Startup Files::               Those pesky startup files---@file{.newsrc}.
465 * Auto Save::                   Recovering from a crash.
466 * The Active File::             Reading the active file over a slow line Takes Time.
467 * Startup Variables::           Other variables you might change.
468
469 New Groups
470
471 * Checking New Groups::         Determining what groups are new.
472 * Subscription Methods::        What Gnus should do with new groups.
473 * Filtering New Groups::        Making Gnus ignore certain new groups.
474
475 Group Buffer
476
477 * Group Buffer Format::         Information listed and how you can change it.
478 * Group Maneuvering::           Commands for moving in the group buffer.
479 * Selecting a Group::           Actually reading news.
480 * Subscription Commands::       Unsubscribing, killing, subscribing.
481 * Group Data::                  Changing the info for a group.
482 * Group Levels::                Levels? What are those, then?
483 * Group Score::                 A mechanism for finding out what groups you like.
484 * Marking Groups::              You can mark groups for later processing.
485 * Foreign Groups::              Creating and editing groups.
486 * Group Parameters::            Each group may have different parameters set.
487 * Listing Groups::              Gnus can list various subsets of the groups.
488 * Sorting Groups::              Re-arrange the group order.
489 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
490 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
491 * Exiting Gnus::                Stop reading news and get some work done.
492 * Group Topics::                A folding group mode divided into topics.
493 * Misc Group Stuff::            Other stuff that you can to do.
494
495 Group Buffer Format
496
497 * Group Line Specification::    Deciding how the group buffer is to look.
498 * Group Mode Line Specification::  The group buffer mode line.
499 * Group Highlighting::          Having nice colors in the group buffer.
500
501 Group Topics
502
503 * Topic Commands::              Interactive E-Z commands.
504 * Topic Variables::             How to customize the topics the Lisp Way.
505 * Topic Sorting::               Sorting each topic individually.
506 * Topic Topology::              A map of the world.
507 * Topic Parameters::            Parameters that apply to all groups in a topic.
508
509 Misc Group Stuff
510
511 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
512 * Group Information::           Information and help on groups and Gnus.
513 * Group Timestamp::             Making Gnus keep track of when you last read a group.
514 * File Commands::               Reading and writing the Gnus files.
515 * Sieve Commands::              Managing Sieve scripts.
516
517 Summary Buffer
518
519 * Summary Buffer Format::       Deciding how the summary buffer is to look.
520 * Summary Maneuvering::         Moving around the summary buffer.
521 * Choosing Articles::           Reading articles.
522 * Paging the Article::          Scrolling the current article.
523 * Reply Followup and Post::     Posting articles.
524 * Delayed Articles::            Send articles at a later time.
525 * Marking Articles::            Marking articles as read, expirable, etc.
526 * Limiting::                    You can limit the summary buffer.
527 * Threading::                   How threads are made.
528 * Sorting the Summary Buffer::  How articles and threads are sorted.
529 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
530 * Article Caching::             You may store articles in a cache.
531 * Persistent Articles::         Making articles expiry-resistant.
532 * Article Backlog::             Having already read articles hang around.
533 * Saving Articles::             Ways of customizing article saving.
534 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
535 * Article Treatment::           The article buffer can be mangled at will.
536 * MIME Commands::               Doing MIMEy things with the articles.
537 * Charsets::                    Character set issues.
538 * Article Commands::            Doing various things with the article buffer.
539 * Summary Sorting::             Sorting the summary buffer in various ways.
540 * Finding the Parent::          No child support? Get the parent.
541 * Alternative Approaches::      Reading using non-default summaries.
542 * Tree Display::                A more visual display of threads.
543 * Mail Group Commands::         Some commands can only be used in mail groups.
544 * Various Summary Stuff::       What didn't fit anywhere else.
545 * Exiting the Summary Buffer::  Returning to the Group buffer,
546                                 or reselecting the current group.
547 * Crosspost Handling::          How crossposted articles are dealt with.
548 * Duplicate Suppression::       An alternative when crosspost handling fails.
549 * Security::                    Decrypt and Verify.
550 * Mailing List::                Mailing list minor mode.
551
552 Summary Buffer Format
553
554 * Summary Buffer Lines::        You can specify how summary lines should look.
555 * To From Newsgroups::          How to not display your own name.
556 * Summary Buffer Mode Line::    You can say how the mode line should look.
557 * Summary Highlighting::        Making the summary buffer all pretty and nice.
558
559 Choosing Articles
560
561 * Choosing Commands::           Commands for choosing articles.
562 * Choosing Variables::          Variables that influence these commands.
563
564 Reply, Followup and Post
565
566 * Summary Mail Commands::       Sending mail.
567 * Summary Post Commands::       Sending news.
568 * Summary Message Commands::    Other Message-related commands.
569 * Canceling and Superseding::
570
571 Marking Articles
572
573 * Unread Articles::             Marks for unread articles.
574 * Read Articles::               Marks for read articles.
575 * Other Marks::                 Marks that do not affect readedness.
576 * Setting Marks::               How to set and remove marks.
577 * Generic Marking Commands::    How to customize the marking.
578 * Setting Process Marks::       How to mark articles for later processing.
579
580 Threading
581
582 * Customizing Threading::       Variables you can change to affect the threading.
583 * Thread Commands::             Thread based commands in the summary buffer.
584
585 Customizing Threading
586
587 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
588 * Filling In Threads::          Making the threads displayed look fuller.
589 * More Threading::              Even more variables for fiddling with threads.
590 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
591
592 Decoding Articles
593
594 * Uuencoded Articles::          Uudecode articles.
595 * Shell Archives::              Unshar articles.
596 * PostScript Files::            Split PostScript.
597 * Other Files::                 Plain save and binhex.
598 * Decoding Variables::          Variables for a happy decoding.
599 * Viewing Files::               You want to look at the result of the decoding?
600
601 Decoding Variables
602
603 * Rule Variables::              Variables that say how a file is to be viewed.
604 * Other Decode Variables::      Other decode variables.
605 * Uuencoding and Posting::      Variables for customizing uuencoding.
606
607 Article Treatment
608
609 * Article Highlighting::        You want to make the article look like fruit salad.
610 * Article Fontisizing::         Making emphasized text look nice.
611 * Article Hiding::              You also want to make certain info go away.
612 * Article Washing::             Lots of way-neat functions to make life better.
613 * Article Header::              Doing various header transformations.
614 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
615 * Article Button Levels::       Controlling appearance of buttons.
616 * Article Date::                Grumble, UT!
617 * Article Display::             Display various stuff---X-Face, Picons, Smileys
618 * Article Signature::           What is a signature?
619 * Article Miscellanea::         Various other stuff.
620
621 Alternative Approaches
622
623 * Pick and Read::               First mark articles and then read them.
624 * Binary Groups::               Auto-decode all articles.
625
626 Various Summary Stuff
627
628 * Summary Group Information::   Information oriented commands.
629 * Searching for Articles::      Multiple article commands.
630 * Summary Generation Commands::
631 * Really Various Summary Commands::  Those pesky non-conformant commands.
632
633 Article Buffer
634
635 * Hiding Headers::              Deciding what headers should be displayed.
636 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
637 * Customizing Articles::        Tailoring the look of the articles.
638 * Article Keymap::              Keystrokes available in the article buffer.
639 * Misc Article::                Other stuff.
640
641 Composing Messages
642
643 * Mail::                        Mailing and replying.
644 * Posting Server::              What server should you post and mail via?
645 * Mail and Post::               Mailing and posting at the same time.
646 * Archived Messages::           Where Gnus stores the messages you've sent.
647 * Posting Styles::              An easier way to specify who you are.
648 * Drafts::                      Postponing messages and rejected messages.
649 * Rejected Articles::           What happens if the server doesn't like your article?
650 * Signing and encrypting::      How to compose secure messages.
651
652 Select Methods
653
654 * Server Buffer::               Making and editing virtual servers.
655 * Getting News::                Reading USENET news with Gnus.
656 * Getting Mail::                Reading your personal mail with Gnus.
657 * Browsing the Web::            Getting messages from a plethora of Web sources.
658 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
659 * Other Sources::               Reading directories, files, SOUP packets.
660 * Combined Groups::             Combining groups into one group.
661 * Gnus Unplugged::              Reading news and mail offline.
662
663 Server Buffer
664
665 * Server Buffer Format::        You can customize the look of this buffer.
666 * Server Commands::             Commands to manipulate servers.
667 * Example Methods::             Examples server specifications.
668 * Creating a Virtual Server::   An example session.
669 * Server Variables::            Which variables to set.
670 * Servers and Methods::         You can use server names as select methods.
671 * Unavailable Servers::         Some servers you try to contact may be down.
672
673 Getting News
674
675 * NNTP::                        Reading news from an @acronym{NNTP} server.
676 * News Spool::                  Reading news from the local spool.
677
678 @acronym{NNTP}
679
680 * Direct Functions::            Connecting directly to the server.
681 * Indirect Functions::          Connecting indirectly to the server.
682 * Common Variables::            Understood by several connection functions.
683
684 Getting Mail
685
686 * Mail in a Newsreader::        Important introductory notes.
687 * Getting Started Reading Mail::  A simple cookbook example.
688 * Splitting Mail::              How to create mail groups.
689 * Mail Sources::                How to tell Gnus where to get mail from.
690 * Mail Back End Variables::     Variables for customizing mail handling.
691 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
692 * Group Mail Splitting::        Use group customize to drive mail splitting.
693 * Incorporating Old Mail::      What about the old mail you have?
694 * Expiring Mail::               Getting rid of unwanted mail.
695 * Washing Mail::                Removing cruft from the mail you get.
696 * Duplicates::                  Dealing with duplicated mail.
697 * Not Reading Mail::            Using mail back ends for reading other files.
698 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
699
700 Mail Sources
701
702 * Mail Source Specifiers::      How to specify what a mail source is.
703 * Mail Source Customization::   Some variables that influence things.
704 * Fetching Mail::               Using the mail source specifiers.
705
706 Choosing a Mail Back End
707
708 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
709 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
710 * Mail Spool::                  Store your mail in a private spool?
711 * MH Spool::                    An mhspool-like back end.
712 * Maildir::                     Another one-file-per-message format.
713 * Mail Folders::                Having one file for each group.
714 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
715
716 Browsing the Web
717
718 * Archiving Mail::
719 * Web Searches::                Creating groups from articles that match a string.
720 * Slashdot::                    Reading the Slashdot comments.
721 * Ultimate::                    The Ultimate Bulletin Board systems.
722 * Web Archive::                 Reading mailing list archived on web.
723 * RSS::                         Reading RDF site summary.
724 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
725
726 @acronym{IMAP}
727
728 * Splitting in IMAP::           Splitting mail with nnimap.
729 * Expiring in IMAP::            Expiring mail with nnimap.
730 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
731 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
732 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
733
734 Other Sources
735
736 * Directory Groups::            You can read a directory as if it was a newsgroup.
737 * Anything Groups::             Dired?  Who needs dired?
738 * Document Groups::             Single files can be the basis of a group.
739 * SOUP::                        Reading @sc{soup} packets ``offline''.
740 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
741
742 Document Groups
743
744 * Document Server Internals::   How to add your own document types.
745
746 SOUP
747
748 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
749 * SOUP Groups::                 A back end for reading @sc{soup} packets.
750 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
751
752 Combined Groups
753
754 * Virtual Groups::              Combining articles from many groups.
755 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
756
757 Gnus Unplugged
758
759 * Agent Basics::                How it all is supposed to work.
760 * Agent Categories::            How to tell the Gnus Agent what to download.
761 * Agent Commands::              New commands for all the buffers.
762 * Agent Visuals::               Ways that the agent may effect your summary buffer.
763 * Agent as Cache::              The Agent is a big cache too.
764 * Agent Expiry::                How to make old articles go away.
765 * Agent Regeneration::          How to recover from lost connections and other accidents.
766 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
767 * Outgoing Messages::           What happens when you post/mail something?
768 * Agent Variables::             Customizing is fun.
769 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
770 * Batching Agents::             How to fetch news from a @code{cron} job.
771 * Agent Caveats::               What you think it'll do and what it does.
772
773 Agent Categories
774
775 * Category Syntax::             What a category looks like.
776 * Category Buffer::             A buffer for maintaining categories.
777 * Category Variables::          Customize'r'Us.
778
779 Agent Commands
780
781 * Group Agent Commands::        Configure groups and fetch their contents.
782 * Summary Agent Commands::      Manually select then fetch specific articles.
783 * Server Agent Commands::       Select the servers that are supported by the agent.
784
785 Scoring
786
787 * Summary Score Commands::      Adding score entries for the current group.
788 * Group Score Commands::        General score commands.
789 * Score Variables::             Customize your scoring.  (My, what terminology).
790 * Score File Format::           What a score file may contain.
791 * Score File Editing::          You can edit score files by hand as well.
792 * Adaptive Scoring::            Big Sister Gnus knows what you read.
793 * Home Score File::             How to say where new score entries are to go.
794 * Followups To Yourself::       Having Gnus notice when people answer you.
795 * Scoring On Other Headers::    Scoring on non-standard headers.
796 * Scoring Tips::                How to score effectively.
797 * Reverse Scoring::             That problem child of old is not problem.
798 * Global Score Files::          Earth-spanning, ear-splitting score files.
799 * Kill Files::                  They are still here, but they can be ignored.
800 * Converting Kill Files::       Translating kill files to score files.
801 * GroupLens::                   Getting predictions on what you like to read.
802 * Advanced Scoring::            Using logical expressions to build score rules.
803 * Score Decays::                It can be useful to let scores wither away.
804
805 GroupLens
806
807 * Using GroupLens::             How to make Gnus use GroupLens.
808 * Rating Articles::             Letting GroupLens know how you rate articles.
809 * Displaying Predictions::      Displaying predictions given by GroupLens.
810 * GroupLens Variables::         Customizing GroupLens.
811
812 Advanced Scoring
813
814 * Advanced Scoring Syntax::     A definition.
815 * Advanced Scoring Examples::   What they look like.
816 * Advanced Scoring Tips::       Getting the most out of it.
817
818 Various
819
820 * Process/Prefix::              A convention used by many treatment commands.
821 * Interactive::                 Making Gnus ask you many questions.
822 * Symbolic Prefixes::           How to supply some Gnus functions with options.
823 * Formatting Variables::        You can specify what buffers should look like.
824 * Window Layout::               Configuring the Gnus buffer windows.
825 * Faces and Fonts::             How to change how faces look.
826 * Compilation::                 How to speed Gnus up.
827 * Mode Lines::                  Displaying information in the mode lines.
828 * Highlighting and Menus::      Making buffers look all nice and cozy.
829 * Buttons::                     Get tendinitis in ten easy steps!
830 * Daemons::                     Gnus can do things behind your back.
831 * NoCeM::                       How to avoid spam and other fatty foods.
832 * Undo::                        Some actions can be undone.
833 * Predicate Specifiers::        Specifying predicates.
834 * Moderation::                  What to do if you're a moderator.
835 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
836 * Fuzzy Matching::              What's the big fuzz?
837 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
838 * Various Various::             Things that are really various.
839
840 Formatting Variables
841
842 * Formatting Basics::           A formatting variable is basically a format string.
843 * Mode Line Formatting::        Some rules about mode line formatting variables.
844 * Advanced Formatting::         Modifying output in various ways.
845 * User-Defined Specs::          Having Gnus call your own functions.
846 * Formatting Fonts::            Making the formatting look colorful and nice.
847 * Positioning Point::           Moving point to a position after an operation.
848 * Tabulation::                  Tabulating your output.
849 * Wide Characters::             Dealing with wide characters.
850
851 Image Enhancements
852
853 * X-Face::                      Display a funky, teensy black-and-white image.
854 * Face::                        Display a funkier, teensier colored image.
855 * Smileys::                     Show all those happy faces the way they were meant to be shown.
856 * Picons::                      How to display pictures of what you're reading.
857 * XVarious::                    Other XEmacsy Gnusey variables.
858
859 Thwarting Email Spam
860
861 * The problem of spam::         Some background, and some solutions
862 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
863 * SpamAssassin::                How to use external anti-spam tools.
864 * Hashcash::                    Reduce spam by burning CPU time.
865 * Filtering Spam Using The Spam ELisp Package::
866 * Filtering Spam Using Statistics with spam-stat::
867
868 Filtering Spam Using The Spam ELisp Package
869
870 * Blacklists and Whitelists::
871 * BBDB Whitelists::
872 * Gmane Spam Reporting::
873 * Anti-spam Hashcash Payments::
874 * Blackholes::
875 * Regular Expressions Header Matching::
876 * Bogofilter::
877 * ifile spam filtering::
878 * spam-stat spam filtering::
879 * SpamOracle::
880 * Extending the spam elisp package::
881
882 Filtering Spam Using Statistics with spam-stat
883
884 * Creating a spam-stat dictionary::
885 * Splitting mail using spam-stat::
886 * Low-level interface to the spam-stat dictionary::
887
888 Appendices
889
890 * XEmacs::                      Requirements for installing under XEmacs.
891 * History::                     How Gnus got where it is today.
892 * On Writing Manuals::          Why this is not a beginner's guide.
893 * Terminology::                 We use really difficult, like, words here.
894 * Customization::               Tailoring Gnus to your needs.
895 * Troubleshooting::             What you might try if things do not work.
896 * Gnus Reference Guide::        Rilly, rilly technical stuff.
897 * Emacs for Heathens::          A short introduction to Emacsian terms.
898 * Frequently Asked Questions::  The Gnus FAQ.
899
900 History
901
902 * Gnus Versions::               What Gnus versions have been released.
903 * Other Gnus Versions::         Other Gnus versions that also have been released.
904 * Why?::                        What's the point of Gnus?
905 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
906 * Conformity::                  Gnus tries to conform to all standards.
907 * Emacsen::                     Gnus can be run on a few modern Emacsen.
908 * Gnus Development::            How Gnus is developed.
909 * Contributors::                Oodles of people.
910 * New Features::                Pointers to some of the new stuff in Gnus.
911
912 New Features
913
914 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
915 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
916 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
917 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
918 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
919 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
920
921 Customization
922
923 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
924 * Slow Terminal Connection::    You run a remote Emacs.
925 * Little Disk Space::           You feel that having large setup files is icky.
926 * Slow Machine::                You feel like buying a faster machine.
927
928 Gnus Reference Guide
929
930 * Gnus Utility Functions::      Common functions and variable to use.
931 * Back End Interface::          How Gnus communicates with the servers.
932 * Score File Syntax::           A BNF definition of the score file standard.
933 * Headers::                     How Gnus stores headers internally.
934 * Ranges::                      A handy format for storing mucho numbers.
935 * Group Info::                  The group info format.
936 * Extended Interactive::        Symbolic prefixes and stuff.
937 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
938 * Various File Formats::        Formats of files that Gnus use.
939
940 Back End Interface
941
942 * Required Back End Functions::  Functions that must be implemented.
943 * Optional Back End Functions::  Functions that need not be implemented.
944 * Error Messaging::             How to get messages and report errors.
945 * Writing New Back Ends::       Extending old back ends.
946 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
947 * Mail-like Back Ends::         Some tips on mail back ends.
948
949 Various File Formats
950
951 * Active File Format::          Information on articles and groups available.
952 * Newsgroups File Format::      Group descriptions.
953
954 Emacs for Heathens
955
956 * Keystrokes::                  Entering text and executing commands.
957 * Emacs Lisp::                  The built-in Emacs programming language.
958
959 @end detailmenu
960 @end menu
961
962 @node Starting Up
963 @chapter Starting Gnus
964 @cindex starting up
965
966 @kindex M-x gnus
967 @findex gnus
968 If your system administrator has set things up properly, starting Gnus
969 and reading news is extremely easy---you just type @kbd{M-x gnus} in
970 your Emacs.
971
972 @findex gnus-other-frame
973 @kindex M-x gnus-other-frame
974 If you want to start Gnus in a different frame, you can use the command
975 @kbd{M-x gnus-other-frame} instead.
976
977 If things do not go smoothly at startup, you have to twiddle some
978 variables in your @file{~/.gnus.el} file.  This file is similar to
979 @file{~/.emacs}, but is read when Gnus starts.
980
981 If you puzzle at any terms used in this manual, please refer to the
982 terminology section (@pxref{Terminology}).
983
984 @menu
985 * Finding the News::            Choosing a method for getting news.
986 * The First Time::              What does Gnus do the first time you start it?
987 * The Server is Down::          How can I read my mail then?
988 * Slave Gnusae::                You can have more than one Gnus active at a time.
989 * Fetching a Group::            Starting Gnus just to read a group.
990 * New Groups::                  What is Gnus supposed to do with new groups?
991 * Changing Servers::            You may want to move from one server to another.
992 * Startup Files::               Those pesky startup files---@file{.newsrc}.
993 * Auto Save::                   Recovering from a crash.
994 * The Active File::             Reading the active file over a slow line Takes Time.
995 * Startup Variables::           Other variables you might change.
996 @end menu
997
998
999 @node Finding the News
1000 @section Finding the News
1001 @cindex finding news
1002
1003 @vindex gnus-select-method
1004 @c @head
1005 The @code{gnus-select-method} variable says where Gnus should look for
1006 news.  This variable should be a list where the first element says
1007 @dfn{how} and the second element says @dfn{where}.  This method is your
1008 native method.  All groups not fetched with this method are
1009 foreign groups.
1010
1011 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
1012 you want to get your daily dosage of news from, you'd say:
1013
1014 @lisp
1015 (setq gnus-select-method '(nntp "news.somewhere.edu"))
1016 @end lisp
1017
1018 If you want to read directly from the local spool, say:
1019
1020 @lisp
1021 (setq gnus-select-method '(nnspool ""))
1022 @end lisp
1023
1024 If you can use a local spool, you probably should, as it will almost
1025 certainly be much faster.  But do not use the local spool if your
1026 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1027
1028 @vindex gnus-nntpserver-file
1029 @cindex NNTPSERVER
1030 @cindex @acronym{NNTP} server
1031 If this variable is not set, Gnus will take a look at the
1032 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1033 Gnus will see whether @code{gnus-nntpserver-file}
1034 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1035 If that fails as well, Gnus will try to use the machine running Emacs
1036 as an @acronym{NNTP} server.  That's a long shot, though.
1037
1038 @vindex gnus-nntp-server
1039 If @code{gnus-nntp-server} is set, this variable will override
1040 @code{gnus-select-method}.  You should therefore set
1041 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1042
1043 @vindex gnus-secondary-servers
1044 @vindex gnus-nntp-server
1045 You can also make Gnus prompt you interactively for the name of an
1046 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1047 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1048 in the @code{gnus-secondary-servers} list (if any).  You can also just
1049 type in the name of any server you feel like visiting.  (Note that this
1050 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1051 gnus} later in the same Emacs session, Gnus will contact the same
1052 server.)
1053
1054 @findex gnus-group-browse-foreign-server
1055 @kindex B (Group)
1056 However, if you use one @acronym{NNTP} server regularly and are just
1057 interested in a couple of groups from a different server, you would be
1058 better served by using the @kbd{B} command in the group buffer.  It will
1059 let you have a look at what groups are available, and you can subscribe
1060 to any of the groups you want to.  This also makes @file{.newsrc}
1061 maintenance much tidier.  @xref{Foreign Groups}.
1062
1063 @vindex gnus-secondary-select-methods
1064 @c @head
1065 A slightly different approach to foreign groups is to set the
1066 @code{gnus-secondary-select-methods} variable.  The select methods
1067 listed in this variable are in many ways just as native as the
1068 @code{gnus-select-method} server.  They will also be queried for active
1069 files during startup (if that's required), and new newsgroups that
1070 appear on these servers will be subscribed (or not) just as native
1071 groups are.
1072
1073 For instance, if you use the @code{nnmbox} back end to read your mail,
1074 you would typically set this variable to
1075
1076 @lisp
1077 (setq gnus-secondary-select-methods '((nnmbox "")))
1078 @end lisp
1079
1080
1081 @node The First Time
1082 @section The First Time
1083 @cindex first time usage
1084
1085 If no startup files exist, Gnus will try to determine what groups should
1086 be subscribed by default.
1087
1088 @vindex gnus-default-subscribed-newsgroups
1089 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1090 will subscribe you to just those groups in that list, leaving the rest
1091 killed.  Your system administrator should have set this variable to
1092 something useful.
1093
1094 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1095 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1096 here as @dfn{whatever Lars thinks you should read}.)
1097
1098 You'll also be subscribed to the Gnus documentation group, which should
1099 help you with most common problems.
1100
1101 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1102 use the normal functions for handling new groups, and not do anything
1103 special.
1104
1105
1106 @node The Server is Down
1107 @section The Server is Down
1108 @cindex server errors
1109
1110 If the default server is down, Gnus will understandably have some
1111 problems starting.  However, if you have some mail groups in addition to
1112 the news groups, you may want to start Gnus anyway.
1113
1114 Gnus, being the trusting sort of program, will ask whether to proceed
1115 without a native select method if that server can't be contacted.  This
1116 will happen whether the server doesn't actually exist (i.e., you have
1117 given the wrong address) or the server has just momentarily taken ill
1118 for some reason or other.  If you decide to continue and have no foreign
1119 groups, you'll find it difficult to actually do anything in the group
1120 buffer.  But, hey, that's your problem.  Blllrph!
1121
1122 @findex gnus-no-server
1123 @kindex M-x gnus-no-server
1124 @c @head
1125 If you know that the server is definitely down, or you just want to read
1126 your mail without bothering with the server at all, you can use the
1127 @code{gnus-no-server} command to start Gnus.  That might come in handy
1128 if you're in a hurry as well.  This command will not attempt to contact
1129 your primary server---instead, it will just activate all groups on level
1130 1 and 2.  (You should preferably keep no native groups on those two
1131 levels.) Also @pxref{Group Levels}.
1132
1133
1134 @node Slave Gnusae
1135 @section Slave Gnusae
1136 @cindex slave
1137
1138 You might want to run more than one Emacs with more than one Gnus at the
1139 same time.  If you are using different @file{.newsrc} files (e.g., if you
1140 are using the two different Gnusae to read from two different servers),
1141 that is no problem whatsoever.  You just do it.
1142
1143 The problem appears when you want to run two Gnusae that use the same
1144 @file{.newsrc} file.
1145
1146 To work around that problem some, we here at the Think-Tank at the Gnus
1147 Towers have come up with a new concept: @dfn{Masters} and
1148 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1149 taken out a copyright on those words.  If you wish to use those words in
1150 conjunction with each other, you have to send $1 per usage instance to
1151 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1152 Applications}) will be much more expensive, of course.)
1153
1154 @findex gnus-slave
1155 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1156 however you do it).  Each subsequent slave Gnusae should be started with
1157 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1158 files, but instead save @dfn{slave files} that contain information only
1159 on what groups have been read in the slave session.  When a master Gnus
1160 starts, it will read (and delete) these slave files, incorporating all
1161 information from them.  (The slave files will be read in the sequence
1162 they were created, so the latest changes will have precedence.)
1163
1164 Information from the slave files has, of course, precedence over the
1165 information in the normal (i.e., master) @file{.newsrc} file.
1166
1167 If the @file{.newsrc*} files have not been saved in the master when the
1168 slave starts, you may be prompted as to whether to read an auto-save
1169 file.  If you answer ``yes'', the unsaved changes to the master will be
1170 incorporated into the slave.  If you answer ``no'', the slave may see some
1171 messages as unread that have been read in the master.
1172
1173 @node Fetching a Group
1174 @section Fetching a Group
1175 @cindex fetching a group
1176
1177 @findex gnus-fetch-group
1178 It is sometimes convenient to be able to just say ``I want to read this
1179 group and I don't care whether Gnus has been started or not''.  This is
1180 perhaps more useful for people who write code than for users, but the
1181 command @code{gnus-fetch-group} provides this functionality in any case.
1182 It takes the group name as a parameter.
1183
1184
1185 @node New Groups
1186 @section New Groups
1187 @cindex new groups
1188 @cindex subscription
1189
1190 @vindex gnus-check-new-newsgroups
1191 If you are satisfied that you really never want to see any new groups,
1192 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1193 also save you some time at startup.  Even if this variable is
1194 @code{nil}, you can always subscribe to the new groups just by pressing
1195 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1196 is @code{ask-server} by default.  If you set this variable to
1197 @code{always}, then Gnus will query the back ends for new groups even
1198 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1199
1200 @menu
1201 * Checking New Groups::         Determining what groups are new.
1202 * Subscription Methods::        What Gnus should do with new groups.
1203 * Filtering New Groups::        Making Gnus ignore certain new groups.
1204 @end menu
1205
1206
1207 @node Checking New Groups
1208 @subsection Checking New Groups
1209
1210 Gnus normally determines whether a group is new or not by comparing the
1211 list of groups from the active file(s) with the lists of subscribed and
1212 dead groups.  This isn't a particularly fast method.  If
1213 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1214 server for new groups since the last time.  This is both faster and
1215 cheaper.  This also means that you can get rid of the list of killed
1216 groups altogether, so you may set @code{gnus-save-killed-list} to
1217 @code{nil}, which will save time both at startup, at exit, and all over.
1218 Saves disk space, too.  Why isn't this the default, then?
1219 Unfortunately, not all servers support this command.
1220
1221 I bet I know what you're thinking now: How do I find out whether my
1222 server supports @code{ask-server}?  No?  Good, because I don't have a
1223 fail-safe answer.  I would suggest just setting this variable to
1224 @code{ask-server} and see whether any new groups appear within the next
1225 few days.  If any do, then it works.  If none do, then it doesn't
1226 work.  I could write a function to make Gnus guess whether the server
1227 supports @code{ask-server}, but it would just be a guess.  So I won't.
1228 You could @code{telnet} to the server and say @code{HELP} and see
1229 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1230 it does, then it might work.  (But there are servers that lists
1231 @samp{NEWGROUPS} without supporting the function properly.)
1232
1233 This variable can also be a list of select methods.  If so, Gnus will
1234 issue an @code{ask-server} command to each of the select methods, and
1235 subscribe them (or not) using the normal methods.  This might be handy
1236 if you are monitoring a few servers for new groups.  A side effect is
1237 that startup will take much longer, so you can meditate while waiting.
1238 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1239
1240
1241 @node Subscription Methods
1242 @subsection Subscription Methods
1243
1244 @vindex gnus-subscribe-newsgroup-method
1245 What Gnus does when it encounters a new group is determined by the
1246 @code{gnus-subscribe-newsgroup-method} variable.
1247
1248 This variable should contain a function.  This function will be called
1249 with the name of the new group as the only parameter.
1250
1251 Some handy pre-fab functions are:
1252
1253 @table @code
1254
1255 @item gnus-subscribe-zombies
1256 @vindex gnus-subscribe-zombies
1257 Make all new groups zombies.  This is the default.  You can browse the
1258 zombies later (with @kbd{A z}) and either kill them all off properly
1259 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1260
1261 @item gnus-subscribe-randomly
1262 @vindex gnus-subscribe-randomly
1263 Subscribe all new groups in arbitrary order.  This really means that all
1264 new groups will be added at ``the top'' of the group buffer.
1265
1266 @item gnus-subscribe-alphabetically
1267 @vindex gnus-subscribe-alphabetically
1268 Subscribe all new groups in alphabetical order.
1269
1270 @item gnus-subscribe-hierarchically
1271 @vindex gnus-subscribe-hierarchically
1272 Subscribe all new groups hierarchically.  The difference between this
1273 function and @code{gnus-subscribe-alphabetically} is slight.
1274 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1275 alphabetical fashion, while this function will enter groups into its
1276 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1277 @samp{comp} hierarchy, this function will not mess that configuration
1278 up.  Or something like that.
1279
1280 @item gnus-subscribe-interactively
1281 @vindex gnus-subscribe-interactively
1282 Subscribe new groups interactively.  This means that Gnus will ask
1283 you about @strong{all} new groups.  The groups you choose to subscribe
1284 to will be subscribed hierarchically.
1285
1286 @item gnus-subscribe-killed
1287 @vindex gnus-subscribe-killed
1288 Kill all new groups.
1289
1290 @item gnus-subscribe-topics
1291 @vindex gnus-subscribe-topics
1292 Put the groups into the topic that has a matching @code{subscribe} topic
1293 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1294 topic parameter that looks like
1295
1296 @example
1297 "nnslashdot"
1298 @end example
1299
1300 will mean that all groups that match that regex will be subscribed under
1301 that topic.
1302
1303 If no topics match the groups, the groups will be subscribed in the
1304 top-level topic.
1305
1306 @end table
1307
1308 @vindex gnus-subscribe-hierarchical-interactive
1309 A closely related variable is
1310 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1311 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1312 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1313 will ask you for each sub-hierarchy whether you want to descend the
1314 hierarchy or not.
1315
1316 One common mistake is to set the variable a few paragraphs above
1317 (@code{gnus-subscribe-newsgroup-method}) to
1318 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1319 will not work.  This is ga-ga.  So don't do it.
1320
1321
1322 @node Filtering New Groups
1323 @subsection Filtering New Groups
1324
1325 A nice and portable way to control which new newsgroups should be
1326 subscribed (or ignored) is to put an @dfn{options} line at the start of
1327 the @file{.newsrc} file.  Here's an example:
1328
1329 @example
1330 options -n !alt.all !rec.all sci.all
1331 @end example
1332
1333 @vindex gnus-subscribe-options-newsgroup-method
1334 This line obviously belongs to a serious-minded intellectual scientific
1335 person (or she may just be plain old boring), because it says that all
1336 groups that have names beginning with @samp{alt} and @samp{rec} should
1337 be ignored, and all groups with names beginning with @samp{sci} should
1338 be subscribed.  Gnus will not use the normal subscription method for
1339 subscribing these groups.
1340 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1341 variable defaults to @code{gnus-subscribe-alphabetically}.
1342
1343 @vindex gnus-options-not-subscribe
1344 @vindex gnus-options-subscribe
1345 If you don't want to mess with your @file{.newsrc} file, you can just
1346 set the two variables @code{gnus-options-subscribe} and
1347 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1348 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1349 and if the new group matches the former, it will be unconditionally
1350 subscribed, and if it matches the latter, it will be ignored.
1351
1352 @vindex gnus-auto-subscribed-groups
1353 Yet another variable that meddles here is
1354 @code{gnus-auto-subscribed-groups}.  It works exactly like
1355 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1356 thought it would be nice to have two of these.  This variable is more
1357 meant for setting some ground rules, while the other variable is used
1358 more for user fiddling.  By default this variable makes all new groups
1359 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1360 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1361 subscribed.  If you don't like that, just set this variable to
1362 @code{nil}.
1363
1364 New groups that match this regexp are subscribed using
1365 @code{gnus-subscribe-options-newsgroup-method}.
1366
1367
1368 @node Changing Servers
1369 @section Changing Servers
1370 @cindex changing servers
1371
1372 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1373 This happens very rarely, but perhaps you change jobs, or one server is
1374 very flaky and you want to use another.
1375
1376 Changing the server is pretty easy, right?  You just change
1377 @code{gnus-select-method} to point to the new server?
1378
1379 @emph{Wrong!}
1380
1381 Article numbers are not (in any way) kept synchronized between different
1382 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1383 you have read is by keeping track of article numbers.  So when you
1384 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1385 worthless.
1386
1387 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1388 file from one server to another.  They all have one thing in
1389 common---they take a looong time to run.  You don't want to use these
1390 functions more than absolutely necessary.
1391
1392 @kindex M-x gnus-change-server
1393 @findex gnus-change-server
1394 If you have access to both servers, Gnus can request the headers for all
1395 the articles you have read and compare @code{Message-ID}s and map the
1396 article numbers of the read articles and article marks.  The @kbd{M-x
1397 gnus-change-server} command will do this for all your native groups.  It
1398 will prompt for the method you want to move to.
1399
1400 @kindex M-x gnus-group-move-group-to-server
1401 @findex gnus-group-move-group-to-server
1402 You can also move individual groups with the @kbd{M-x
1403 gnus-group-move-group-to-server} command.  This is useful if you want to
1404 move a (foreign) group from one server to another.
1405
1406 @kindex M-x gnus-group-clear-data-on-native-groups
1407 @findex gnus-group-clear-data-on-native-groups
1408 If you don't have access to both the old and new server, all your marks
1409 and read ranges have become worthless.  You can use the @kbd{M-x
1410 gnus-group-clear-data-on-native-groups} command to clear out all data
1411 that you have on your native groups.  Use with caution.
1412
1413 @kindex M-x gnus-group-clear-data
1414 @findex gnus-group-clear-data
1415 Clear the data from the current group only---nix out marks and the
1416 list of read articles (@code{gnus-group-clear-data}).
1417
1418 After changing servers, you @strong{must} move the cache hierarchy away,
1419 since the cached articles will have wrong article numbers, which will
1420 affect which articles Gnus thinks are read.
1421 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1422 to have it done automatically; for @code{gnus-group-clear-data}, you
1423 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1424 cache for all groups).
1425
1426
1427 @node Startup Files
1428 @section Startup Files
1429 @cindex startup files
1430 @cindex .newsrc
1431 @cindex .newsrc.el
1432 @cindex .newsrc.eld
1433
1434 Now, you all know about the @file{.newsrc} file.  All subscription
1435 information is traditionally stored in this file.
1436
1437 Things got a bit more complicated with @sc{gnus}.  In addition to
1438 keeping the @file{.newsrc} file updated, it also used a file called
1439 @file{.newsrc.el} for storing all the information that didn't fit into
1440 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1441 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1442 files was the most recently saved, which enabled people to swap between
1443 @sc{gnus} and other newsreaders.
1444
1445 That was kinda silly, so Gnus went one better: In addition to the
1446 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1447 @file{.newsrc.eld}.  It will read whichever of these files that are most
1448 recent, but it will never write a @file{.newsrc.el} file.  You should
1449 never delete the @file{.newsrc.eld} file---it contains much information
1450 not stored in the @file{.newsrc} file.
1451
1452 @vindex gnus-save-newsrc-file
1453 @vindex gnus-read-newsrc-file
1454 You can turn off writing the @file{.newsrc} file by setting
1455 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1456 the file and save some space, as well as exiting from Gnus faster.
1457 However, this will make it impossible to use other newsreaders than
1458 Gnus.  But hey, who would want to, right?  Similarly, setting
1459 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1460 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1461 convenient if you have a tendency to use Netscape once in a while.
1462
1463 @vindex gnus-save-killed-list
1464 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1465 will not save the list of killed groups to the startup file.  This will
1466 save both time (when starting and quitting) and space (on disk).  It
1467 will also mean that Gnus has no record of what groups are new or old,
1468 so the automatic new groups subscription methods become meaningless.
1469 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1470 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1471 Groups}).  This variable can also be a regular expression.  If that's
1472 the case, remove all groups that do not match this regexp before
1473 saving.  This can be useful in certain obscure situations that involve
1474 several servers where not all servers support @code{ask-server}.
1475
1476 @vindex gnus-startup-file
1477 @vindex gnus-backup-startup-file
1478 @vindex version-control
1479 The @code{gnus-startup-file} variable says where the startup files are.
1480 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1481 file being whatever that one is, with a @samp{.eld} appended.
1482 If you want version control for this file, set
1483 @code{gnus-backup-startup-file}.  It respects the same values as the
1484 @code{version-control} variable.
1485
1486 @vindex gnus-save-newsrc-hook
1487 @vindex gnus-save-quick-newsrc-hook
1488 @vindex gnus-save-standard-newsrc-hook
1489 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1490 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1491 saving the @file{.newsrc.eld} file, and
1492 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1493 @file{.newsrc} file.  The latter two are commonly used to turn version
1494 control on or off.  Version control is on by default when saving the
1495 startup files.  If you want to turn backup creation off, say something like:
1496
1497 @lisp
1498 (defun turn-off-backup ()
1499   (set (make-local-variable 'backup-inhibited) t))
1500
1501 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1502 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1503 @end lisp
1504
1505 @vindex gnus-init-file
1506 @vindex gnus-site-init-file
1507 When Gnus starts, it will read the @code{gnus-site-init-file}
1508 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1509 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1510 and can be used to avoid cluttering your @file{~/.emacs} and
1511 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1512 with the same names as these, but with @file{.elc} and @file{.el}
1513 suffixes.  In other words, if you have set @code{gnus-init-file} to
1514 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1515 and finally @file{~/.gnus} (in this order).
1516
1517
1518
1519 @node Auto Save
1520 @section Auto Save
1521 @cindex dribble file
1522 @cindex auto-save
1523
1524 Whenever you do something that changes the Gnus data (reading articles,
1525 catching up, killing/subscribing groups), the change is added to a
1526 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1527 Emacs way.  If your Emacs should crash before you have saved the
1528 @file{.newsrc} files, all changes you have made can be recovered from
1529 this file.
1530
1531 If Gnus detects this file at startup, it will ask the user whether to
1532 read it.  The auto save file is deleted whenever the real startup file is
1533 saved.
1534
1535 @vindex gnus-use-dribble-file
1536 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1537 maintain a dribble buffer.  The default is @code{t}.
1538
1539 @vindex gnus-dribble-directory
1540 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1541 this variable is @code{nil}, which it is by default, Gnus will dribble
1542 into the directory where the @file{.newsrc} file is located.  (This is
1543 normally the user's home directory.)  The dribble file will get the same
1544 file permissions as the @file{.newsrc} file.
1545
1546 @vindex gnus-always-read-dribble-file
1547 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1548 read the dribble file on startup without querying the user.
1549
1550
1551 @node The Active File
1552 @section The Active File
1553 @cindex active file
1554 @cindex ignored groups
1555
1556 When Gnus starts, or indeed whenever it tries to determine whether new
1557 articles have arrived, it reads the active file.  This is a very large
1558 file that lists all the active groups and articles on the server.
1559
1560 @vindex gnus-ignored-newsgroups
1561 Before examining the active file, Gnus deletes all lines that match the
1562 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1563 any groups with bogus names, but you can use this variable to make Gnus
1564 ignore hierarchies you aren't ever interested in.  However, this is not
1565 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1566 Groups} for an overview of other variables that can be used instead.
1567
1568 @c This variable is
1569 @c @code{nil} by default, and will slow down active file handling somewhat
1570 @c if you set it to anything else.
1571
1572 @vindex gnus-read-active-file
1573 @c @head
1574 The active file can be rather Huge, so if you have a slow network, you
1575 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1576 reading the active file.  This variable is @code{some} by default.
1577
1578 Gnus will try to make do by getting information just on the groups that
1579 you actually subscribe to.
1580
1581 Note that if you subscribe to lots and lots of groups, setting this
1582 variable to @code{nil} will probably make Gnus slower, not faster.  At
1583 present, having this variable @code{nil} will slow Gnus down
1584 considerably, unless you read news over a 2400 baud modem.
1585
1586 This variable can also have the value @code{some}.  Gnus will then
1587 attempt to read active info only on the subscribed groups.  On some
1588 servers this is quite fast (on sparkling, brand new INN servers that
1589 support the @code{LIST ACTIVE group} command), on others this isn't fast
1590 at all.  In any case, @code{some} should be faster than @code{nil}, and
1591 is certainly faster than @code{t} over slow lines.
1592
1593 Some news servers (old versions of Leafnode and old versions of INN, for
1594 instance) do not support the @code{LIST ACTIVE group}.  For these
1595 servers, @code{nil} is probably the most efficient value for this
1596 variable.
1597
1598 If this variable is @code{nil}, Gnus will ask for group info in total
1599 lock-step, which isn't very fast.  If it is @code{some} and you use an
1600 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1601 read all the replies in one swoop.  This will normally result in better
1602 performance, but if the server does not support the aforementioned
1603 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1604
1605 If you think that starting up Gnus takes too long, try all the three
1606 different values for this variable and see what works best for you.
1607
1608 In any case, if you use @code{some} or @code{nil}, you should definitely
1609 kill all groups that you aren't interested in to speed things up.
1610
1611 Note that this variable also affects active file retrieval from
1612 secondary select methods.
1613
1614
1615 @node Startup Variables
1616 @section Startup Variables
1617
1618 @table @code
1619
1620 @item gnus-load-hook
1621 @vindex gnus-load-hook
1622 A hook run while Gnus is being loaded.  Note that this hook will
1623 normally be run just once in each Emacs session, no matter how many
1624 times you start Gnus.
1625
1626 @item gnus-before-startup-hook
1627 @vindex gnus-before-startup-hook
1628 A hook run after starting up Gnus successfully.
1629
1630 @item gnus-startup-hook
1631 @vindex gnus-startup-hook
1632 A hook run as the very last thing after starting up Gnus
1633
1634 @item gnus-started-hook
1635 @vindex gnus-started-hook
1636 A hook that is run as the very last thing after starting up Gnus
1637 successfully.
1638
1639 @item gnus-setup-news-hook
1640 @vindex gnus-setup-news-hook
1641 A hook that is run after reading the @file{.newsrc} file(s), but before
1642 generating the group buffer.
1643
1644 @item gnus-check-bogus-newsgroups
1645 @vindex gnus-check-bogus-newsgroups
1646 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1647 startup.  A @dfn{bogus group} is a group that you have in your
1648 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1649 bogus groups can take quite a while, so to save time and resources it's
1650 best to leave this option off, and do the checking for bogus groups once
1651 in a while from the group buffer instead (@pxref{Group Maintenance}).
1652
1653 @item gnus-inhibit-startup-message
1654 @vindex gnus-inhibit-startup-message
1655 If non-@code{nil}, the startup message won't be displayed.  That way,
1656 your boss might not notice as easily that you are reading news instead
1657 of doing your job.  Note that this variable is used before
1658 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1659
1660 @item gnus-no-groups-message
1661 @vindex gnus-no-groups-message
1662 Message displayed by Gnus when no groups are available.
1663
1664 @item gnus-play-startup-jingle
1665 @vindex gnus-play-startup-jingle
1666 If non-@code{nil}, play the Gnus jingle at startup.
1667
1668 @item gnus-startup-jingle
1669 @vindex gnus-startup-jingle
1670 Jingle to be played if the above variable is non-@code{nil}.  The
1671 default is @samp{Tuxedomoon.Jingle4.au}.
1672
1673 @end table
1674
1675
1676 @node Group Buffer
1677 @chapter Group Buffer
1678 @cindex group buffer
1679
1680 @c Alex Schroeder suggests to rearrange this as follows:
1681 @c
1682 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1683 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1684 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1685 @c   7. Group Score, 8. Group Buffer Format
1686 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1687 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1688 @c <kensanata> First, "Gnus considers groups... (default 9)."
1689 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1690 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1691 @c <kensanata> Then expand the next paragraph or add some more to it.
1692 @c    This short one sentence explains levels 1 and 2, therefore I understand
1693 @c    that I should keep important news at 3 and boring news at 4.
1694 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1695 @c    Maybe keep those that you don't want to read temporarily at 6,
1696 @c    those that you never want to read at 8, those that offend your
1697 @c    human rights at 9...
1698
1699
1700 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1701 is the first buffer shown when Gnus starts, and will never be killed as
1702 long as Gnus is active.
1703
1704 @iftex
1705 @iflatex
1706 \gnusfigure{The Group Buffer}{320}{
1707 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1708 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1709 \put(120,38){\vector(1,2){10}}
1710 \put(40,60){\makebox(0,0)[r]{Mode line}}
1711 \put(40,58){\vector(1,0){30}}
1712 \put(200,28){\makebox(0,0)[t]{Native select method}}
1713 \put(200,26){\vector(-1,2){15}}
1714 }
1715 @end iflatex
1716 @end iftex
1717
1718 @menu
1719 * Group Buffer Format::         Information listed and how you can change it.
1720 * Group Maneuvering::           Commands for moving in the group buffer.
1721 * Selecting a Group::           Actually reading news.
1722 * Subscription Commands::       Unsubscribing, killing, subscribing.
1723 * Group Data::                  Changing the info for a group.
1724 * Group Levels::                Levels? What are those, then?
1725 * Group Score::                 A mechanism for finding out what groups you like.
1726 * Marking Groups::              You can mark groups for later processing.
1727 * Foreign Groups::              Creating and editing groups.
1728 * Group Parameters::            Each group may have different parameters set.
1729 * Listing Groups::              Gnus can list various subsets of the groups.
1730 * Sorting Groups::              Re-arrange the group order.
1731 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1732 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1733 * Exiting Gnus::                Stop reading news and get some work done.
1734 * Group Topics::                A folding group mode divided into topics.
1735 * Misc Group Stuff::            Other stuff that you can to do.
1736 @end menu
1737
1738
1739 @node Group Buffer Format
1740 @section Group Buffer Format
1741
1742 @menu
1743 * Group Line Specification::    Deciding how the group buffer is to look.
1744 * Group Mode Line Specification::  The group buffer mode line.
1745 * Group Highlighting::          Having nice colors in the group buffer.
1746 @end menu
1747
1748
1749 @node Group Line Specification
1750 @subsection Group Line Specification
1751 @cindex group buffer format
1752
1753 The default format of the group buffer is nice and dull, but you can
1754 make it as exciting and ugly as you feel like.
1755
1756 Here's a couple of example group lines:
1757
1758 @example
1759      25: news.announce.newusers
1760  *    0: alt.fan.andrea-dworkin
1761 @end example
1762
1763 Quite simple, huh?
1764
1765 You can see that there are 25 unread articles in
1766 @samp{news.announce.newusers}.  There are no unread articles, but some
1767 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1768 asterisk at the beginning of the line?).
1769
1770 @vindex gnus-group-line-format
1771 You can change that format to whatever you want by fiddling with the
1772 @code{gnus-group-line-format} variable.  This variable works along the
1773 lines of a @code{format} specification, which is pretty much the same as
1774 a @code{printf} specifications, for those of you who use (feh!) C.
1775 @xref{Formatting Variables}.
1776
1777 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1778
1779 There should always be a colon on the line; the cursor always moves to
1780 the colon after performing an operation.  @xref{Positioning
1781 Point}.  Nothing else is required---not even the group name.  All
1782 displayed text is just window dressing, and is never examined by Gnus.
1783 Gnus stores all real information it needs using text properties.
1784
1785 (Note that if you make a really strange, wonderful, spreadsheet-like
1786 layout, everybody will believe you are hard at work with the accounting
1787 instead of wasting time reading news.)
1788
1789 Here's a list of all available format characters:
1790
1791 @table @samp
1792
1793 @item M
1794 An asterisk if the group only has marked articles.
1795
1796 @item S
1797 Whether the group is subscribed.
1798
1799 @item L
1800 Level of subscribedness.
1801
1802 @item N
1803 Number of unread articles.
1804
1805 @item I
1806 Number of dormant articles.
1807
1808 @item T
1809 Number of ticked articles.
1810
1811 @item R
1812 Number of read articles.
1813
1814 @item U
1815 Number of unseen articles.
1816
1817 @item t
1818 Estimated total number of articles.  (This is really @var{max-number}
1819 minus @var{min-number} plus 1.)
1820
1821 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1822 efficient access to @var{max-number} and @var{min-number} but getting
1823 the true unread message count is not possible efficiently.  For
1824 hysterical raisins, even the mail back ends, where the true number of
1825 unread messages might be available efficiently, use the same limited
1826 interface.  To remove this restriction from Gnus means that the back
1827 end interface has to be changed, which is not an easy job.  If you
1828 want to work on this, please contact the Gnus mailing list.
1829
1830 @item y
1831 Number of unread, unticked, non-dormant articles.
1832
1833 @item i
1834 Number of ticked and dormant articles.
1835
1836 @item g
1837 Full group name.
1838
1839 @item G
1840 Group name.
1841
1842 @item C
1843 Group comment (@pxref{Group Parameters}) or group name if there is no
1844 comment element in the group parameters.
1845
1846 @item D
1847 Newsgroup description.  You need to read the group descriptions
1848 before these will appear, and to do that, you either have to set
1849 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1850 command.
1851
1852 @item o
1853 @samp{m} if moderated.
1854
1855 @item O
1856 @samp{(m)} if moderated.
1857
1858 @item s
1859 Select method.
1860
1861 @item B
1862 If the summary buffer for the group is open or not.
1863
1864 @item n
1865 Select from where.
1866
1867 @item z
1868 A string that looks like @samp{<%s:%n>} if a foreign select method is
1869 used.
1870
1871 @item P
1872 Indentation based on the level of the topic (@pxref{Group Topics}).
1873
1874 @item c
1875 @vindex gnus-group-uncollapsed-levels
1876 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1877 variable says how many levels to leave at the end of the group name.
1878 The default is 1---this will mean that group names like
1879 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1880
1881 @item m
1882 @vindex gnus-new-mail-mark
1883 @cindex %
1884 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1885 the group lately.
1886
1887 @item p
1888 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1889
1890 @item d
1891 A string that says when you last read the group (@pxref{Group
1892 Timestamp}).
1893
1894 @item u
1895 User defined specifier.  The next character in the format string should
1896 be a letter.  Gnus will call the function
1897 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1898 following @samp{%u}.  The function will be passed a single dummy
1899 parameter as argument.  The function should return a string, which will
1900 be inserted into the buffer just like information from any other
1901 specifier.
1902 @end table
1903
1904 @cindex *
1905 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1906 if no info is available---for instance, if it is a non-activated foreign
1907 group, or a bogus native group.
1908
1909
1910 @node Group Mode Line Specification
1911 @subsection Group Mode Line Specification
1912 @cindex group mode line
1913
1914 @vindex gnus-group-mode-line-format
1915 The mode line can be changed by setting
1916 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1917 doesn't understand that many format specifiers:
1918
1919 @table @samp
1920 @item S
1921 The native news server.
1922 @item M
1923 The native select method.
1924 @end table
1925
1926
1927 @node Group Highlighting
1928 @subsection Group Highlighting
1929 @cindex highlighting
1930 @cindex group highlighting
1931
1932 @vindex gnus-group-highlight
1933 Highlighting in the group buffer is controlled by the
1934 @code{gnus-group-highlight} variable.  This is an alist with elements
1935 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1936 something non-@code{nil}, the @var{face} will be used on the line.
1937
1938 Here's an example value for this variable that might look nice if the
1939 background is dark:
1940
1941 @lisp
1942 (cond (window-system
1943        (setq custom-background-mode 'light)
1944        (defface my-group-face-1
1945          '((t (:foreground "Red" :bold t))) "First group face")
1946        (defface my-group-face-2
1947          '((t (:foreground "DarkSeaGreen4" :bold t)))
1948          "Second group face")
1949        (defface my-group-face-3
1950          '((t (:foreground "Green4" :bold t))) "Third group face")
1951        (defface my-group-face-4
1952          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1953        (defface my-group-face-5
1954          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1955
1956 (setq gnus-group-highlight
1957       '(((> unread 200) . my-group-face-1)
1958         ((and (< level 3) (zerop unread)) . my-group-face-2)
1959         ((< level 3) . my-group-face-3)
1960         ((zerop unread) . my-group-face-4)
1961         (t . my-group-face-5)))
1962 @end lisp
1963
1964 Also @pxref{Faces and Fonts}.
1965
1966 Variables that are dynamically bound when the forms are evaluated
1967 include:
1968
1969 @table @code
1970 @item group
1971 The group name.
1972 @item unread
1973 The number of unread articles in the group.
1974 @item method
1975 The select method.
1976 @item mailp
1977 Whether the group is a mail group.
1978 @item level
1979 The level of the group.
1980 @item score
1981 The score of the group.
1982 @item ticked
1983 The number of ticked articles in the group.
1984 @item total
1985 The total number of articles in the group.  Or rather,
1986 @var{max-number} minus @var{min-number} plus one.
1987 @item topic
1988 When using the topic minor mode, this variable is bound to the current
1989 topic being inserted.
1990 @end table
1991
1992 When the forms are @code{eval}ed, point is at the beginning of the line
1993 of the group in question, so you can use many of the normal Gnus
1994 functions for snarfing info on the group.
1995
1996 @vindex gnus-group-update-hook
1997 @findex gnus-group-highlight-line
1998 @code{gnus-group-update-hook} is called when a group line is changed.
1999 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
2000 calls @code{gnus-group-highlight-line} by default.
2001
2002
2003 @node Group Maneuvering
2004 @section Group Maneuvering
2005 @cindex group movement
2006
2007 All movement commands understand the numeric prefix and will behave as
2008 expected, hopefully.
2009
2010 @table @kbd
2011
2012 @item n
2013 @kindex n (Group)
2014 @findex gnus-group-next-unread-group
2015 Go to the next group that has unread articles
2016 (@code{gnus-group-next-unread-group}).
2017
2018 @item p
2019 @itemx DEL
2020 @kindex DEL (Group)
2021 @kindex p (Group)
2022 @findex gnus-group-prev-unread-group
2023 Go to the previous group that has unread articles
2024 (@code{gnus-group-prev-unread-group}).
2025
2026 @item N
2027 @kindex N (Group)
2028 @findex gnus-group-next-group
2029 Go to the next group (@code{gnus-group-next-group}).
2030
2031 @item P
2032 @kindex P (Group)
2033 @findex gnus-group-prev-group
2034 Go to the previous group (@code{gnus-group-prev-group}).
2035
2036 @item M-n
2037 @kindex M-n (Group)
2038 @findex gnus-group-next-unread-group-same-level
2039 Go to the next unread group on the same (or lower) level
2040 (@code{gnus-group-next-unread-group-same-level}).
2041
2042 @item M-p
2043 @kindex M-p (Group)
2044 @findex gnus-group-prev-unread-group-same-level
2045 Go to the previous unread group on the same (or lower) level
2046 (@code{gnus-group-prev-unread-group-same-level}).
2047 @end table
2048
2049 Three commands for jumping to groups:
2050
2051 @table @kbd
2052
2053 @item j
2054 @kindex j (Group)
2055 @findex gnus-group-jump-to-group
2056 Jump to a group (and make it visible if it isn't already)
2057 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2058 like living groups.
2059
2060 @item ,
2061 @kindex , (Group)
2062 @findex gnus-group-best-unread-group
2063 Jump to the unread group with the lowest level
2064 (@code{gnus-group-best-unread-group}).
2065
2066 @item .
2067 @kindex . (Group)
2068 @findex gnus-group-first-unread-group
2069 Jump to the first group with unread articles
2070 (@code{gnus-group-first-unread-group}).
2071 @end table
2072
2073 @vindex gnus-group-goto-unread
2074 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2075 commands will move to the next group, not the next unread group.  Even
2076 the commands that say they move to the next unread group.  The default
2077 is @code{t}.
2078
2079
2080 @node Selecting a Group
2081 @section Selecting a Group
2082 @cindex group selection
2083
2084 @table @kbd
2085
2086 @item SPACE
2087 @kindex SPACE (Group)
2088 @findex gnus-group-read-group
2089 Select the current group, switch to the summary buffer and display the
2090 first unread article (@code{gnus-group-read-group}).  If there are no
2091 unread articles in the group, or if you give a non-numerical prefix to
2092 this command, Gnus will offer to fetch all the old articles in this
2093 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2094 determines the number of articles Gnus will fetch.  If @var{n} is
2095 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2096 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2097
2098 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2099 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2100 - 4 2 SPC} fetches the 42 oldest ones.
2101
2102 When you are in the group (in the Summary buffer), you can type
2103 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2104 ones.
2105
2106 @item RET
2107 @kindex RET (Group)
2108 @findex gnus-group-select-group
2109 Select the current group and switch to the summary buffer
2110 (@code{gnus-group-select-group}).  Takes the same arguments as
2111 @code{gnus-group-read-group}---the only difference is that this command
2112 does not display the first unread article automatically upon group
2113 entry.
2114
2115 @item M-RET
2116 @kindex M-RET (Group)
2117 @findex gnus-group-quick-select-group
2118 This does the same as the command above, but tries to do it with the
2119 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2120 scoring/killing will be performed, there will be no highlights and no
2121 expunging.  This might be useful if you're in a real hurry and have to
2122 enter some humongous group.  If you give a 0 prefix to this command
2123 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2124 which is useful if you want to toggle threading before generating the
2125 summary buffer (@pxref{Summary Generation Commands}).
2126
2127 @item M-SPACE
2128 @kindex M-SPACE (Group)
2129 @findex gnus-group-visible-select-group
2130 This is yet one more command that does the same as the @kbd{RET}
2131 command, but this one does it without expunging and hiding dormants
2132 (@code{gnus-group-visible-select-group}).
2133
2134 @item C-M-RET
2135 @kindex C-M-RET (Group)
2136 @findex gnus-group-select-group-ephemerally
2137 Finally, this command selects the current group ephemerally without
2138 doing any processing of its contents
2139 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2140 turned off.  Everything you do in the group after selecting it in this
2141 manner will have no permanent effects.
2142
2143 @end table
2144
2145 @vindex gnus-large-newsgroup
2146 The @code{gnus-large-newsgroup} variable says what Gnus should
2147 consider to be a big group.  If it is @code{nil}, no groups are
2148 considered big.  The default value is 200.  If the group has more
2149 (unread and/or ticked) articles than this, Gnus will query the user
2150 before entering the group.  The user can then specify how many
2151 articles should be fetched from the server.  If the user specifies a
2152 negative number (@var{-n}), the @var{n} oldest articles will be
2153 fetched.  If it is positive, the @var{n} articles that have arrived
2154 most recently will be fetched.
2155
2156 @vindex gnus-large-ephemeral-newsgroup
2157 @code{gnus-large-ephemeral-newsgroup} is the same as
2158 @code{gnus-large-newsgroup}, but is only used for ephemeral
2159 newsgroups.
2160
2161 @vindex gnus-select-group-hook
2162 @vindex gnus-auto-select-first
2163 @vindex gnus-auto-select-subject
2164 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2165 automatically when entering a group with the @kbd{SPACE} command.
2166 Which article this is is controlled by the
2167 @code{gnus-auto-select-subject} variable.  Valid values for this
2168 variable is:
2169
2170 @table @code
2171
2172 @item unread
2173 Place point on the subject line of the first unread article.
2174
2175 @item first
2176 Place point on the subject line of the first article.
2177
2178 @item unseen
2179 Place point on the subject line of the first unseen article.
2180
2181 @item unseen-or-unread
2182 Place point on the subject line of the first unseen article, and if
2183 there is no such article, place point on the subject line of the first
2184 unread article.
2185
2186 @item best
2187 Place point on the subject line of the highest-scored unread article.
2188
2189 @end table
2190
2191 This variable can also be a function.  In that case, that function
2192 will be called to place point on a subject line.
2193
2194 If you want to prevent automatic selection in some group (say, in a
2195 binary group with Huge articles) you can set the
2196 @code{gnus-auto-select-first} variable to @code{nil} in
2197 @code{gnus-select-group-hook}, which is called when a group is
2198 selected.
2199
2200
2201 @node Subscription Commands
2202 @section Subscription Commands
2203 @cindex subscription
2204
2205 @table @kbd
2206
2207 @item S t
2208 @itemx u
2209 @kindex S t (Group)
2210 @kindex u (Group)
2211 @findex gnus-group-unsubscribe-current-group
2212 @c @icon{gnus-group-unsubscribe}
2213 Toggle subscription to the current group
2214 (@code{gnus-group-unsubscribe-current-group}).
2215
2216 @item S s
2217 @itemx U
2218 @kindex S s (Group)
2219 @kindex U (Group)
2220 @findex gnus-group-unsubscribe-group
2221 Prompt for a group to subscribe, and then subscribe it.  If it was
2222 subscribed already, unsubscribe it instead
2223 (@code{gnus-group-unsubscribe-group}).
2224
2225 @item S k
2226 @itemx C-k
2227 @kindex S k (Group)
2228 @kindex C-k (Group)
2229 @findex gnus-group-kill-group
2230 @c @icon{gnus-group-kill-group}
2231 Kill the current group (@code{gnus-group-kill-group}).
2232
2233 @item S y
2234 @itemx C-y
2235 @kindex S y (Group)
2236 @kindex C-y (Group)
2237 @findex gnus-group-yank-group
2238 Yank the last killed group (@code{gnus-group-yank-group}).
2239
2240 @item C-x C-t
2241 @kindex C-x C-t (Group)
2242 @findex gnus-group-transpose-groups
2243 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2244 really a subscription command, but you can use it instead of a
2245 kill-and-yank sequence sometimes.
2246
2247 @item S w
2248 @itemx C-w
2249 @kindex S w (Group)
2250 @kindex C-w (Group)
2251 @findex gnus-group-kill-region
2252 Kill all groups in the region (@code{gnus-group-kill-region}).
2253
2254 @item S z
2255 @kindex S z (Group)
2256 @findex gnus-group-kill-all-zombies
2257 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2258
2259 @item S C-k
2260 @kindex S C-k (Group)
2261 @findex gnus-group-kill-level
2262 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2263 These groups can't be yanked back after killing, so this command should
2264 be used with some caution.  The only time where this command comes in
2265 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2266 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2267 kill off all unsubscribed groups that do not have message numbers in the
2268 @file{.newsrc} file.
2269
2270 @end table
2271
2272 Also @pxref{Group Levels}.
2273
2274
2275 @node Group Data
2276 @section Group Data
2277
2278 @table @kbd
2279
2280 @item c
2281 @kindex c (Group)
2282 @findex gnus-group-catchup-current
2283 @vindex gnus-group-catchup-group-hook
2284 @c @icon{gnus-group-catchup-current}
2285 Mark all unticked articles in this group as read
2286 (@code{gnus-group-catchup-current}).
2287 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2288 the group buffer.
2289
2290 @item C
2291 @kindex C (Group)
2292 @findex gnus-group-catchup-current-all
2293 Mark all articles in this group, even the ticked ones, as read
2294 (@code{gnus-group-catchup-current-all}).
2295
2296 @item M-c
2297 @kindex M-c (Group)
2298 @findex gnus-group-clear-data
2299 Clear the data from the current group---nix out marks and the list of
2300 read articles (@code{gnus-group-clear-data}).
2301
2302 @item M-x gnus-group-clear-data-on-native-groups
2303 @kindex M-x gnus-group-clear-data-on-native-groups
2304 @findex gnus-group-clear-data-on-native-groups
2305 If you have switched from one @acronym{NNTP} server to another, all your marks
2306 and read ranges have become worthless.  You can use this command to
2307 clear out all data that you have on your native groups.  Use with
2308 caution.
2309
2310 @end table
2311
2312
2313 @node Group Levels
2314 @section Group Levels
2315 @cindex group level
2316 @cindex level
2317
2318 All groups have a level of @dfn{subscribedness}.  For instance, if a
2319 group is on level 2, it is more subscribed than a group on level 5.  You
2320 can ask Gnus to just list groups on a given level or lower
2321 (@pxref{Listing Groups}), or to just check for new articles in groups on
2322 a given level or lower (@pxref{Scanning New Messages}).
2323
2324 Remember:  The higher the level of the group, the less important it is.
2325
2326 @table @kbd
2327
2328 @item S l
2329 @kindex S l (Group)
2330 @findex gnus-group-set-current-level
2331 Set the level of the current group.  If a numeric prefix is given, the
2332 next @var{n} groups will have their levels set.  The user will be
2333 prompted for a level.
2334 @end table
2335
2336 @vindex gnus-level-killed
2337 @vindex gnus-level-zombie
2338 @vindex gnus-level-unsubscribed
2339 @vindex gnus-level-subscribed
2340 Gnus considers groups from levels 1 to
2341 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2342 @code{gnus-level-subscribed} (exclusive) and
2343 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2344 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2345 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2346 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2347 same, but zombie and killed groups have no information on what articles
2348 you have read, etc, stored.  This distinction between dead and living
2349 groups isn't done because it is nice or clever, it is done purely for
2350 reasons of efficiency.
2351
2352 It is recommended that you keep all your mail groups (if any) on quite
2353 low levels (e.g. 1 or 2).
2354
2355 Maybe the following description of the default behavior of Gnus helps to
2356 understand what these levels are all about.  By default, Gnus shows you
2357 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2358 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2359 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2360 groups are hidden, in a way.
2361
2362 Zombie and killed groups are similar to unsubscribed groups in that they
2363 are hidden by default.  But they are different from subscribed and
2364 unsubscribed groups in that Gnus doesn't ask the news server for
2365 information (number of messages, number of unread messages) on zombie
2366 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2367 aren't interested in.  If most groups are killed, Gnus is faster.
2368
2369 Why does Gnus distinguish between zombie and killed groups?  Well, when
2370 a new group arrives on the server, Gnus by default makes it a zombie
2371 group.  This means that you are normally not bothered with new groups,
2372 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2373 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2374 list of killed groups.)
2375
2376 If you want to play with the level variables, you should show some care.
2377 Set them once, and don't touch them ever again.  Better yet, don't touch
2378 them at all unless you know exactly what you're doing.
2379
2380 @vindex gnus-level-default-unsubscribed
2381 @vindex gnus-level-default-subscribed
2382 Two closely related variables are @code{gnus-level-default-subscribed}
2383 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2384 which are the levels that new groups will be put on if they are
2385 (un)subscribed.  These two variables should, of course, be inside the
2386 relevant valid ranges.
2387
2388 @vindex gnus-keep-same-level
2389 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2390 will only move to groups of the same level (or lower).  In
2391 particular, going from the last article in one group to the next group
2392 will go to the next group of the same level (or lower).  This might be
2393 handy if you want to read the most important groups before you read the
2394 rest.
2395
2396 If this variable is @code{best}, Gnus will make the next newsgroup the
2397 one with the best level.
2398
2399 @vindex gnus-group-default-list-level
2400 All groups with a level less than or equal to
2401 @code{gnus-group-default-list-level} will be listed in the group buffer
2402 by default.
2403
2404 @vindex gnus-group-list-inactive-groups
2405 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2406 groups will be listed along with the unread groups.  This variable is
2407 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2408 listed.
2409
2410 @vindex gnus-group-use-permanent-levels
2411 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2412 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2413 use this level as the ``work'' level.
2414
2415 @vindex gnus-activate-level
2416 Gnus will normally just activate (i. e., query the server about) groups
2417 on level @code{gnus-activate-level} or less.  If you don't want to
2418 activate unsubscribed groups, for instance, you might set this variable
2419 to 5.  The default is 6.
2420
2421
2422 @node Group Score
2423 @section Group Score
2424 @cindex group score
2425 @cindex group rank
2426 @cindex rank
2427
2428 You would normally keep important groups on high levels, but that scheme
2429 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2430 group buffer according to how often you read groups, perhaps?  Within
2431 reason?
2432
2433 This is what @dfn{group score} is for.  You can have Gnus assign a score
2434 to each group through the mechanism described below.  You can then sort
2435 the group buffer based on this score.  Alternatively, you can sort on
2436 score and then level.  (Taken together, the level and the score is
2437 called the @dfn{rank} of the group.  A group that is on level 4 and has
2438 a score of 1 has a higher rank than a group on level 5 that has a score
2439 of 300.  (The level is the most significant part and the score is the
2440 least significant part.))
2441
2442 @findex gnus-summary-bubble-group
2443 If you want groups you read often to get higher scores than groups you
2444 read seldom you can add the @code{gnus-summary-bubble-group} function to
2445 the @code{gnus-summary-exit-hook} hook.  This will result (after
2446 sorting) in a bubbling sort of action.  If you want to see that in
2447 action after each summary exit, you can add
2448 @code{gnus-group-sort-groups-by-rank} or
2449 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2450 slow things down somewhat.
2451
2452
2453 @node Marking Groups
2454 @section Marking Groups
2455 @cindex marking groups
2456
2457 If you want to perform some command on several groups, and they appear
2458 subsequently in the group buffer, you would normally just give a
2459 numerical prefix to the command.  Most group commands will then do your
2460 bidding on those groups.
2461
2462 However, if the groups are not in sequential order, you can still
2463 perform a command on several groups.  You simply mark the groups first
2464 with the process mark and then execute the command.
2465
2466 @table @kbd
2467
2468 @item #
2469 @kindex # (Group)
2470 @itemx M m
2471 @kindex M m (Group)
2472 @findex gnus-group-mark-group
2473 Set the mark on the current group (@code{gnus-group-mark-group}).
2474
2475 @item M-#
2476 @kindex M-# (Group)
2477 @itemx M u
2478 @kindex M u (Group)
2479 @findex gnus-group-unmark-group
2480 Remove the mark from the current group
2481 (@code{gnus-group-unmark-group}).
2482
2483 @item M U
2484 @kindex M U (Group)
2485 @findex gnus-group-unmark-all-groups
2486 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2487
2488 @item M w
2489 @kindex M w (Group)
2490 @findex gnus-group-mark-region
2491 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2492
2493 @item M b
2494 @kindex M b (Group)
2495 @findex gnus-group-mark-buffer
2496 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2497
2498 @item M r
2499 @kindex M r (Group)
2500 @findex gnus-group-mark-regexp
2501 Mark all groups that match some regular expression
2502 (@code{gnus-group-mark-regexp}).
2503 @end table
2504
2505 Also @pxref{Process/Prefix}.
2506
2507 @findex gnus-group-universal-argument
2508 If you want to execute some command on all groups that have been marked
2509 with the process mark, you can use the @kbd{M-&}
2510 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2511 the command to be executed.
2512
2513
2514 @node Foreign Groups
2515 @section Foreign Groups
2516 @cindex foreign groups
2517
2518 Below are some group mode commands for making and editing general foreign
2519 groups, as well as commands to ease the creation of a few
2520 special-purpose groups.  All these commands insert the newly created
2521 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2522 consulted.
2523
2524 @table @kbd
2525
2526 @item G m
2527 @kindex G m (Group)
2528 @findex gnus-group-make-group
2529 @cindex making groups
2530 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2531 for a name, a method and possibly an @dfn{address}.  For an easier way
2532 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2533
2534 @item G r
2535 @kindex G r (Group)
2536 @findex gnus-group-rename-group
2537 @cindex renaming groups
2538 Rename the current group to something else
2539 (@code{gnus-group-rename-group}).  This is valid only on some
2540 groups---mail groups mostly.  This command might very well be quite slow
2541 on some back ends.
2542
2543 @item G c
2544 @kindex G c (Group)
2545 @cindex customizing
2546 @findex gnus-group-customize
2547 Customize the group parameters (@code{gnus-group-customize}).
2548
2549 @item G e
2550 @kindex G e (Group)
2551 @findex gnus-group-edit-group-method
2552 @cindex renaming groups
2553 Enter a buffer where you can edit the select method of the current
2554 group (@code{gnus-group-edit-group-method}).
2555
2556 @item G p
2557 @kindex G p (Group)
2558 @findex gnus-group-edit-group-parameters
2559 Enter a buffer where you can edit the group parameters
2560 (@code{gnus-group-edit-group-parameters}).
2561
2562 @item G E
2563 @kindex G E (Group)
2564 @findex gnus-group-edit-group
2565 Enter a buffer where you can edit the group info
2566 (@code{gnus-group-edit-group}).
2567
2568 @item G d
2569 @kindex G d (Group)
2570 @findex gnus-group-make-directory-group
2571 @cindex nndir
2572 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2573 for a directory name (@code{gnus-group-make-directory-group}).
2574
2575 @item G h
2576 @kindex G h (Group)
2577 @cindex help group
2578 @findex gnus-group-make-help-group
2579 Make the Gnus help group (@code{gnus-group-make-help-group}).
2580
2581 @item G a
2582 @kindex G a (Group)
2583 @cindex (ding) archive
2584 @cindex archive group
2585 @findex gnus-group-make-archive-group
2586 @vindex gnus-group-archive-directory
2587 @vindex gnus-group-recent-archive-directory
2588 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2589 default a group pointing to the most recent articles will be created
2590 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2591 group will be created from @code{gnus-group-archive-directory}.
2592
2593 @item G k
2594 @kindex G k (Group)
2595 @findex gnus-group-make-kiboze-group
2596 @cindex nnkiboze
2597 Make a kiboze group.  You will be prompted for a name, for a regexp to
2598 match groups to be ``included'' in the kiboze group, and a series of
2599 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2600 @xref{Kibozed Groups}.
2601
2602 @item G D
2603 @kindex G D (Group)
2604 @findex gnus-group-enter-directory
2605 @cindex nneething
2606 Read an arbitrary directory as if it were a newsgroup with the
2607 @code{nneething} back end (@code{gnus-group-enter-directory}).
2608 @xref{Anything Groups}.
2609
2610 @item G f
2611 @kindex G f (Group)
2612 @findex gnus-group-make-doc-group
2613 @cindex ClariNet Briefs
2614 @cindex nndoc
2615 Make a group based on some file or other
2616 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2617 command, you will be prompted for a file name and a file type.
2618 Currently supported types are @code{mbox}, @code{babyl},
2619 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2620 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2621 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2622 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2623 you run this command without a prefix, Gnus will guess at the file
2624 type.  @xref{Document Groups}.
2625
2626 @item G u
2627 @kindex G u (Group)
2628 @vindex gnus-useful-groups
2629 @findex gnus-group-make-useful-group
2630 Create one of the groups mentioned in @code{gnus-useful-groups}
2631 (@code{gnus-group-make-useful-group}).
2632
2633 @item G w
2634 @kindex G w (Group)
2635 @findex gnus-group-make-web-group
2636 @cindex Google
2637 @cindex nnweb
2638 @cindex gmane
2639 Make an ephemeral group based on a web search
2640 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2641 command, make a solid group instead.  You will be prompted for the
2642 search engine type and the search string.  Valid search engine types
2643 include @code{google}, @code{dejanews}, and @code{gmane}.
2644 @xref{Web Searches}.
2645
2646 If you use the @code{google} search engine, you can limit the search
2647 to a particular group by using a match string like
2648 @samp{shaving group:alt.sysadmin.recovery}.
2649
2650 @item G DEL
2651 @kindex G DEL (Group)
2652 @findex gnus-group-delete-group
2653 This function will delete the current group
2654 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2655 actually delete all the articles in the group, and forcibly remove the
2656 group itself from the face of the Earth.  Use a prefix only if you are
2657 absolutely sure of what you are doing.  This command can't be used on
2658 read-only groups (like @code{nntp} group), though.
2659
2660 @item G V
2661 @kindex G V (Group)
2662 @findex gnus-group-make-empty-virtual
2663 Make a new, fresh, empty @code{nnvirtual} group
2664 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2665
2666 @item G v
2667 @kindex G v (Group)
2668 @findex gnus-group-add-to-virtual
2669 Add the current group to an @code{nnvirtual} group
2670 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2671 @end table
2672
2673 @xref{Select Methods}, for more information on the various select
2674 methods.
2675
2676 @vindex gnus-activate-foreign-newsgroups
2677 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2678 Gnus will check all foreign groups with this level or lower at startup.
2679 This might take quite a while, especially if you subscribe to lots of
2680 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2681 @code{gnus-activate-level} also affects activation of foreign
2682 newsgroups.
2683
2684
2685 @node Group Parameters
2686 @section Group Parameters
2687 @cindex group parameters
2688
2689 The group parameters store information local to a particular group.
2690 Here's an example group parameter list:
2691
2692 @example
2693 ((to-address . "ding@@gnus.org")
2694  (auto-expire . t))
2695 @end example
2696
2697 We see that each element consists of a ``dotted pair''---the thing before
2698 the dot is the key, while the thing after the dot is the value.  All the
2699 parameters have this form @emph{except} local variable specs, which are
2700 not dotted pairs, but proper lists.
2701
2702 Some parameters have correspondent customizable variables, each of which
2703 is an alist of regexps and values.
2704
2705 The following group parameters can be used:
2706
2707 @table @code
2708 @item to-address
2709 @cindex to-address
2710 Address used by when doing followups and new posts.
2711
2712 @example
2713 (to-address . "some@@where.com")
2714 @end example
2715
2716 This is primarily useful in mail groups that represent closed mailing
2717 lists---mailing lists where it's expected that everybody that writes to
2718 the mailing list is subscribed to it.  Since using this parameter
2719 ensures that the mail only goes to the mailing list itself, it means
2720 that members won't receive two copies of your followups.
2721
2722 Using @code{to-address} will actually work whether the group is foreign
2723 or not.  Let's say there's a group on the server that is called
2724 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2725 the articles from a mail-to-news gateway.  Posting directly to this
2726 group is therefore impossible---you have to send mail to the mailing
2727 list address instead.
2728
2729 See also @code{gnus-parameter-to-address-alist}.
2730
2731 @item to-list
2732 @cindex to-list
2733 Address used when doing @kbd{a} in that group.
2734
2735 @example
2736 (to-list . "some@@where.com")
2737 @end example
2738
2739 It is totally ignored
2740 when doing a followup---except that if it is present in a news group,
2741 you'll get mail group semantics when doing @kbd{f}.
2742
2743 If you do an @kbd{a} command in a mail group and you have neither a
2744 @code{to-list} group parameter nor a @code{to-address} group parameter,
2745 then a @code{to-list} group parameter will be added automatically upon
2746 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2747 @vindex gnus-add-to-list
2748
2749 If you do an @kbd{a} command in a mail group and you don't have a
2750 @code{to-list} group parameter, one will be added automatically upon
2751 sending the message.
2752
2753 @findex gnus-mailing-list-mode
2754 @cindex mail list groups
2755 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2756 entering summary buffer.
2757
2758 See also @code{gnus-parameter-to-list-alist}.
2759
2760 @anchor{subscribed}
2761 @item subscribed
2762 @cindex subscribed
2763 @cindex Mail-Followup-To
2764 If this parameter is set to @code{t}, Gnus will consider the
2765 to-address and to-list parameters for this group as addresses of
2766 mailing lists you are subscribed to.  Giving Gnus this information is
2767 (only) a first step in getting it to generate correct Mail-Followup-To
2768 headers for your posts to these lists.  @xref{Mailing Lists, ,Mailing
2769 Lists, message, The Message Manual}, for a complete treatment of
2770 available MFT support.
2771
2772 See also @code{gnus-find-subscribed-addresses}, the function that
2773 directly uses this group parameter.
2774
2775 @item visible
2776 @cindex visible
2777 If the group parameter list has the element @code{(visible . t)},
2778 that group will always be visible in the Group buffer, regardless
2779 of whether it has any unread articles.
2780
2781 @item broken-reply-to
2782 @cindex broken-reply-to
2783 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2784 headers in this group are to be ignored, and for the header to be hidden
2785 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2786 can be useful if you're reading a mailing list group where the listserv
2787 has inserted @code{Reply-To} headers that point back to the listserv
2788 itself.  That is broken behavior.  So there!
2789
2790 @item to-group
2791 @cindex to-group
2792 Elements like @code{(to-group . "some.group.name")} means that all
2793 posts in that group will be sent to @code{some.group.name}.
2794
2795 @item newsgroup
2796 @cindex newsgroup
2797 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2798 will treat all responses as if they were responses to news articles.
2799 This can be useful if you have a mail group that's really a mirror of a
2800 news group.
2801
2802 @item gcc-self
2803 @cindex gcc-self
2804 If @code{(gcc-self . t)} is present in the group parameter list, newly
2805 composed messages will be @code{Gcc}'d to the current group.  If
2806 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2807 generated, if @code{(gcc-self . "string")} is present, this string will
2808 be inserted literally as a @code{gcc} header.  This parameter takes
2809 precedence over any default @code{Gcc} rules as described later
2810 (@pxref{Archived Messages}).
2811
2812 @strong{Caveat}: It yields an error putting @code{(gcc-self . t)} in
2813 groups of an @code{nntp} server or so, because an @code{nntp} server
2814 doesn't accept articles.
2815
2816 @item auto-expire
2817 @cindex auto-expire
2818 If the group parameter has an element that looks like @code{(auto-expire
2819 . t)}, all articles read will be marked as expirable.  For an
2820 alternative approach, @pxref{Expiring Mail}.
2821
2822 See also @code{gnus-auto-expirable-newsgroups}.
2823
2824 @item total-expire
2825 @cindex total-expire
2826 If the group parameter has an element that looks like
2827 @code{(total-expire . t)}, all read articles will be put through the
2828 expiry process, even if they are not marked as expirable.  Use with
2829 caution.  Unread, ticked and dormant articles are not eligible for
2830 expiry.
2831
2832 See also @code{gnus-total-expirable-newsgroups}.
2833
2834 @item expiry-wait
2835 @cindex expiry-wait
2836 @vindex nnmail-expiry-wait-function
2837 If the group parameter has an element that looks like
2838 @code{(expiry-wait . 10)}, this value will override any
2839 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2840 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2841 can either be a number of days (not necessarily an integer) or the
2842 symbols @code{never} or @code{immediate}.
2843
2844 @item expiry-target
2845 @cindex expiry-target
2846 Where expired messages end up.  This parameter overrides
2847 @code{nnmail-expiry-target}.
2848
2849 @item score-file
2850 @cindex score file group parameter
2851 Elements that look like @code{(score-file . "file")} will make
2852 @file{file} into the current score file for the group in question.  All
2853 interactive score entries will be put into this file.
2854
2855 @item adapt-file
2856 @cindex adapt file group parameter
2857 Elements that look like @code{(adapt-file . "file")} will make
2858 @file{file} into the current adaptive file for the group in question.
2859 All adaptive score entries will be put into this file.
2860
2861 @item admin-address
2862 @cindex admin-address
2863 When unsubscribing from a mailing list you should never send the
2864 unsubscription notice to the mailing list itself.  Instead, you'd send
2865 messages to the administrative address.  This parameter allows you to
2866 put the admin address somewhere convenient.
2867
2868 @item display
2869 @cindex display
2870 Elements that look like @code{(display . MODE)} say which articles to
2871 display on entering the group.  Valid values are:
2872
2873 @table @code
2874 @item all
2875 Display all articles, both read and unread.
2876
2877 @item an integer
2878 Display the last @var{integer} articles in the group.  This is the same as
2879 entering the group with @kbd{C-u @var{integer}}.
2880
2881 @item default
2882 Display the default visible articles, which normally includes unread and
2883 ticked articles.
2884
2885 @item an array
2886 Display articles that satisfy a predicate.
2887
2888 Here are some examples:
2889
2890 @table @code
2891 @item [unread]
2892 Display only unread articles.
2893
2894 @item [not expire]
2895 Display everything except expirable articles.
2896
2897 @item [and (not reply) (not expire)]
2898 Display everything except expirable and articles you've already
2899 responded to.
2900 @end table
2901
2902 The available operators are @code{not}, @code{and} and @code{or}.
2903 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2904 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2905 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2906 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2907
2908 @end table
2909
2910 The @code{display} parameter works by limiting the summary buffer to
2911 the subset specified.  You can pop the limit by using the @kbd{/ w}
2912 command (@pxref{Limiting}).
2913
2914 @item comment
2915 @cindex comment
2916 Elements that look like @code{(comment . "This is a comment")} are
2917 arbitrary comments on the group.  You can display comments in the
2918 group line (@pxref{Group Line Specification}).
2919
2920 @item charset
2921 @cindex charset
2922 Elements that look like @code{(charset . iso-8859-1)} will make
2923 @code{iso-8859-1} the default charset; that is, the charset that will be
2924 used for all articles that do not specify a charset.
2925
2926 See also @code{gnus-group-charset-alist}.
2927
2928 @item ignored-charsets
2929 @cindex ignored-charset
2930 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2931 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2932 default charset will be used for decoding articles.
2933
2934 See also @code{gnus-group-ignored-charsets-alist}.
2935
2936 @item posting-style
2937 @cindex posting-style
2938 You can store additional posting style information for this group
2939 here (@pxref{Posting Styles}).  The format is that of an entry in the
2940 @code{gnus-posting-styles} alist, except that there's no regexp matching
2941 the group name (of course).  Style elements in this group parameter will
2942 take precedence over the ones found in @code{gnus-posting-styles}.
2943
2944 For instance, if you want a funky name and signature in this group only,
2945 instead of hacking @code{gnus-posting-styles}, you could put something
2946 like this in the group parameters:
2947
2948 @example
2949 (posting-style
2950   (name "Funky Name")
2951   ("X-My-Header" "Funky Value")
2952   (signature "Funky Signature"))
2953 @end example
2954
2955 @item post-method
2956 @cindex post-method
2957 If it is set, the value is used as the method for posting message
2958 instead of @code{gnus-post-method}.
2959
2960 @item banner
2961 @cindex banner
2962 An item like @code{(banner . @var{regexp})} causes any part of an article
2963 that matches the regular expression @var{regexp} to be stripped.  Instead of
2964 @var{regexp}, you can also use the symbol @code{signature} which strips the
2965 last signature or any of the elements of the alist
2966 @code{gnus-article-banner-alist}.
2967
2968 @item sieve
2969 @cindex sieve
2970 This parameter contains a Sieve test that should match incoming mail
2971 that should be placed in this group.  From this group parameter, a
2972 Sieve @samp{IF} control structure is generated, having the test as the
2973 condition and @samp{fileinto "group.name";} as the body.
2974
2975 For example, if the @samp{INBOX.list.sieve} group has the @code{(sieve
2976 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2977 translating the group parameter into a Sieve script (@pxref{Sieve
2978 Commands}) the following Sieve code is generated:
2979
2980 @example
2981 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2982         fileinto \"INBOX.list.sieve\";
2983 @}
2984 @end example
2985
2986 The Sieve language is described in RFC 3028.  @xref{Top, Emacs Sieve,
2987 Top, sieve, Emacs Sieve}.
2988
2989 @item (@var{variable} @var{form})
2990 You can use the group parameters to set variables local to the group you
2991 are entering.  If you want to turn threading off in @samp{news.answers},
2992 you could put @code{(gnus-show-threads nil)} in the group parameters of
2993 that group.  @code{gnus-show-threads} will be made into a local variable
2994 in the summary buffer you enter, and the form @code{nil} will be
2995 @code{eval}ed there.
2996
2997 Note that this feature sets the variable locally to the summary buffer.
2998 But some variables are evaluated in the article buffer, or in the
2999 message buffer (of a reply or followup or otherwise newly created
3000 message).  As a workaround, it might help to add the variable in
3001 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
3002 Stuff}.  So if you want to set @code{message-from-style} via the group
3003 parameters, then you may need the following statement elsewhere in your
3004 @file{~/.gnus} file:
3005
3006 @lisp
3007 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
3008 @end lisp
3009
3010 @vindex gnus-list-identifiers
3011 A use for this feature is to remove a mailing list identifier tag in
3012 the subject fields of articles.  E.g. if the news group
3013
3014 @example
3015 nntp+news.gnus.org:gmane.text.docbook.apps
3016 @end example
3017
3018 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
3019 tag can be removed from the article subjects in the summary buffer for
3020 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
3021 into the group parameters for the group.
3022
3023 This can also be used as a group-specific hook function, if you'd like.
3024 If you want to hear a beep when you enter a group, you could put
3025 something like @code{(dummy-variable (ding))} in the parameters of that
3026 group.  @code{dummy-variable} will be set to the result of the
3027 @code{(ding)} form, but who cares?
3028
3029 @end table
3030
3031 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
3032 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
3033 presents you with a Customize-like interface.  The latter helps avoid
3034 silly Lisp errors.)  You might also be interested in reading about topic
3035 parameters (@pxref{Topic Parameters}).
3036
3037 @vindex gnus-parameters
3038 Group parameters can be set via the @code{gnus-parameters} variable too.
3039 But some variables, such as @code{visible}, have no effect.  For
3040 example:
3041
3042 @lisp
3043 (setq gnus-parameters
3044       '(("mail\\..*"
3045          (gnus-show-threads nil)
3046          (gnus-use-scoring nil)
3047          (gnus-summary-line-format
3048           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3049          (gcc-self . t)
3050          (display . all))
3051
3052         ("^nnimap:\\(foo.bar\\)$"
3053          (to-group . "\\1"))
3054
3055         ("mail\\.me"
3056          (gnus-use-scoring  t))
3057
3058         ("list\\..*"
3059          (total-expire . t)
3060          (broken-reply-to . t))))
3061 @end lisp
3062
3063 String value of parameters will be subjected to regexp substitution, as
3064 the @code{to-group} example shows.
3065
3066
3067 @node Listing Groups
3068 @section Listing Groups
3069 @cindex group listing
3070
3071 These commands all list various slices of the groups available.
3072
3073 @table @kbd
3074
3075 @item l
3076 @itemx A s
3077 @kindex A s (Group)
3078 @kindex l (Group)
3079 @findex gnus-group-list-groups
3080 List all groups that have unread articles
3081 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3082 command will list only groups of level ARG and lower.  By default, it
3083 only lists groups of level five (i.e.,
3084 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3085 groups).
3086
3087 @item L
3088 @itemx A u
3089 @kindex A u (Group)
3090 @kindex L (Group)
3091 @findex gnus-group-list-all-groups
3092 List all groups, whether they have unread articles or not
3093 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3094 this command will list only groups of level ARG and lower.  By default,
3095 it lists groups of level seven or lower (i.e., just subscribed and
3096 unsubscribed groups).
3097
3098 @item A l
3099 @kindex A l (Group)
3100 @findex gnus-group-list-level
3101 List all unread groups on a specific level
3102 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3103 with no unread articles.
3104
3105 @item A k
3106 @kindex A k (Group)
3107 @findex gnus-group-list-killed
3108 List all killed groups (@code{gnus-group-list-killed}).  If given a
3109 prefix argument, really list all groups that are available, but aren't
3110 currently (un)subscribed.  This could entail reading the active file
3111 from the server.
3112
3113 @item A z
3114 @kindex A z (Group)
3115 @findex gnus-group-list-zombies
3116 List all zombie groups (@code{gnus-group-list-zombies}).
3117
3118 @item A m
3119 @kindex A m (Group)
3120 @findex gnus-group-list-matching
3121 List all unread, subscribed groups with names that match a regexp
3122 (@code{gnus-group-list-matching}).
3123
3124 @item A M
3125 @kindex A M (Group)
3126 @findex gnus-group-list-all-matching
3127 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3128
3129 @item A A
3130 @kindex A A (Group)
3131 @findex gnus-group-list-active
3132 List absolutely all groups in the active file(s) of the
3133 server(s) you are connected to (@code{gnus-group-list-active}).  This
3134 might very well take quite a while.  It might actually be a better idea
3135 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3136 thing to match on.  Also note that this command may list groups that
3137 don't exist (yet)---these will be listed as if they were killed groups.
3138 Take the output with some grains of salt.
3139
3140 @item A a
3141 @kindex A a (Group)
3142 @findex gnus-group-apropos
3143 List all groups that have names that match a regexp
3144 (@code{gnus-group-apropos}).
3145
3146 @item A d
3147 @kindex A d (Group)
3148 @findex gnus-group-description-apropos
3149 List all groups that have names or descriptions that match a regexp
3150 (@code{gnus-group-description-apropos}).
3151
3152 @item A c
3153 @kindex A c (Group)
3154 @findex gnus-group-list-cached
3155 List all groups with cached articles (@code{gnus-group-list-cached}).
3156
3157 @item A ?
3158 @kindex A ? (Group)
3159 @findex gnus-group-list-dormant
3160 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3161
3162 @item A /
3163 @kindex A / (Group)
3164 @findex gnus-group-list-limit
3165 List groups limited within the current selection
3166 (@code{gnus-group-list-limit}).
3167
3168 @item A f
3169 @kindex A f (Group)
3170 @findex gnus-group-list-flush
3171 Flush groups from the current selection (@code{gnus-group-list-flush}).
3172
3173 @item A p
3174 @kindex A p (Group)
3175 @findex gnus-group-list-plus
3176 List groups plus the current selection (@code{gnus-group-list-plus}).
3177
3178 @end table
3179
3180 @vindex gnus-permanently-visible-groups
3181 @cindex visible group parameter
3182 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3183 always be shown, whether they have unread articles or not.  You can also
3184 add the @code{visible} element to the group parameters in question to
3185 get the same effect.
3186
3187 @vindex gnus-list-groups-with-ticked-articles
3188 Groups that have just ticked articles in it are normally listed in the
3189 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3190 @code{nil}, these groups will be treated just like totally empty
3191 groups.  It is @code{t} by default.
3192
3193
3194 @node Sorting Groups
3195 @section Sorting Groups
3196 @cindex sorting groups
3197
3198 @kindex C-c C-s (Group)
3199 @findex gnus-group-sort-groups
3200 @vindex gnus-group-sort-function
3201 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3202 group buffer according to the function(s) given by the
3203 @code{gnus-group-sort-function} variable.  Available sorting functions
3204 include:
3205
3206 @table @code
3207
3208 @item gnus-group-sort-by-alphabet
3209 @findex gnus-group-sort-by-alphabet
3210 Sort the group names alphabetically.  This is the default.
3211
3212 @item gnus-group-sort-by-real-name
3213 @findex gnus-group-sort-by-real-name
3214 Sort the group alphabetically on the real (unprefixed) group names.
3215
3216 @item gnus-group-sort-by-level
3217 @findex gnus-group-sort-by-level
3218 Sort by group level.
3219
3220 @item gnus-group-sort-by-score
3221 @findex gnus-group-sort-by-score
3222 Sort by group score.  @xref{Group Score}.
3223
3224 @item gnus-group-sort-by-rank
3225 @findex gnus-group-sort-by-rank
3226 Sort by group score and then the group level.  The level and the score
3227 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3228
3229 @item gnus-group-sort-by-unread
3230 @findex gnus-group-sort-by-unread
3231 Sort by number of unread articles.
3232
3233 @item gnus-group-sort-by-method
3234 @findex gnus-group-sort-by-method
3235 Sort alphabetically on the select method.
3236
3237 @item gnus-group-sort-by-server
3238 @findex gnus-group-sort-by-server
3239 Sort alphabetically on the Gnus server name.
3240
3241
3242 @end table
3243
3244 @code{gnus-group-sort-function} can also be a list of sorting
3245 functions.  In that case, the most significant sort key function must be
3246 the last one.
3247
3248
3249 There are also a number of commands for sorting directly according to
3250 some sorting criteria:
3251
3252 @table @kbd
3253 @item G S a
3254 @kindex G S a (Group)
3255 @findex gnus-group-sort-groups-by-alphabet
3256 Sort the group buffer alphabetically by group name
3257 (@code{gnus-group-sort-groups-by-alphabet}).
3258
3259 @item G S u
3260 @kindex G S u (Group)
3261 @findex gnus-group-sort-groups-by-unread
3262 Sort the group buffer by the number of unread articles
3263 (@code{gnus-group-sort-groups-by-unread}).
3264
3265 @item G S l
3266 @kindex G S l (Group)
3267 @findex gnus-group-sort-groups-by-level
3268 Sort the group buffer by group level
3269 (@code{gnus-group-sort-groups-by-level}).
3270
3271 @item G S v
3272 @kindex G S v (Group)
3273 @findex gnus-group-sort-groups-by-score
3274 Sort the group buffer by group score
3275 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3276
3277 @item G S r
3278 @kindex G S r (Group)
3279 @findex gnus-group-sort-groups-by-rank
3280 Sort the group buffer by group rank
3281 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3282
3283 @item G S m
3284 @kindex G S m (Group)
3285 @findex gnus-group-sort-groups-by-method
3286 Sort the group buffer alphabetically by back end name@*
3287 (@code{gnus-group-sort-groups-by-method}).
3288
3289 @item G S n
3290 @kindex G S n (Group)
3291 @findex gnus-group-sort-groups-by-real-name
3292 Sort the group buffer alphabetically by real (unprefixed) group name
3293 (@code{gnus-group-sort-groups-by-real-name}).
3294
3295 @end table
3296
3297 All the commands below obey the process/prefix convention
3298 (@pxref{Process/Prefix}).
3299
3300 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3301 commands will sort in reverse order.
3302
3303 You can also sort a subset of the groups:
3304
3305 @table @kbd
3306 @item G P a
3307 @kindex G P a (Group)
3308 @findex gnus-group-sort-selected-groups-by-alphabet
3309 Sort the groups alphabetically by group name
3310 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3311
3312 @item G P u
3313 @kindex G P u (Group)
3314 @findex gnus-group-sort-selected-groups-by-unread
3315 Sort the groups by the number of unread articles
3316 (@code{gnus-group-sort-selected-groups-by-unread}).
3317
3318 @item G P l
3319 @kindex G P l (Group)
3320 @findex gnus-group-sort-selected-groups-by-level
3321 Sort the groups by group level
3322 (@code{gnus-group-sort-selected-groups-by-level}).
3323
3324 @item G P v
3325 @kindex G P v (Group)
3326 @findex gnus-group-sort-selected-groups-by-score
3327 Sort the groups by group score
3328 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3329
3330 @item G P r
3331 @kindex G P r (Group)
3332 @findex gnus-group-sort-selected-groups-by-rank
3333 Sort the groups by group rank
3334 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3335
3336 @item G P m
3337 @kindex G P m (Group)
3338 @findex gnus-group-sort-selected-groups-by-method
3339 Sort the groups alphabetically by back end name@*
3340 (@code{gnus-group-sort-selected-groups-by-method}).
3341
3342 @item G P n
3343 @kindex G P n (Group)
3344 @findex gnus-group-sort-selected-groups-by-real-name
3345 Sort the groups alphabetically by real (unprefixed) group name
3346 (@code{gnus-group-sort-selected-groups-by-real-name}).
3347
3348 @item G P s
3349 @kindex G P s (Group)
3350 @findex gnus-group-sort-selected-groups
3351 Sort the groups according to @code{gnus-group-sort-function}.
3352
3353 @end table
3354
3355 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3356 move groups around.
3357
3358
3359 @node Group Maintenance
3360 @section Group Maintenance
3361 @cindex bogus groups
3362
3363 @table @kbd
3364 @item b
3365 @kindex b (Group)
3366 @findex gnus-group-check-bogus-groups
3367 Find bogus groups and delete them
3368 (@code{gnus-group-check-bogus-groups}).
3369
3370 @item F
3371 @kindex F (Group)
3372 @findex gnus-group-find-new-groups
3373 Find new groups and process them (@code{gnus-group-find-new-groups}).
3374 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3375 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3376 to query the server for new groups, and subscribe the new groups as
3377 zombies.
3378
3379 @item C-c C-x
3380 @kindex C-c C-x (Group)
3381 @findex gnus-group-expire-articles
3382 Run all expirable articles in the current group through the expiry
3383 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3384 all expirable articles in the group that have been around for a while.
3385 (@pxref{Expiring Mail}).
3386
3387 @item C-c C-M-x
3388 @kindex C-c C-M-x (Group)
3389 @findex gnus-group-expire-all-groups
3390 Run all expirable articles in all groups through the expiry process
3391 (@code{gnus-group-expire-all-groups}).
3392
3393 @end table
3394
3395
3396 @node Browse Foreign Server
3397 @section Browse Foreign Server
3398 @cindex foreign servers
3399 @cindex browsing servers
3400
3401 @table @kbd
3402 @item B
3403 @kindex B (Group)
3404 @findex gnus-group-browse-foreign-server
3405 You will be queried for a select method and a server name.  Gnus will
3406 then attempt to contact this server and let you browse the groups there
3407 (@code{gnus-group-browse-foreign-server}).
3408 @end table
3409
3410 @findex gnus-browse-mode
3411 A new buffer with a list of available groups will appear.  This buffer
3412 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3413 a lot) like a normal group buffer.
3414
3415 Here's a list of keystrokes available in the browse mode:
3416
3417 @table @kbd
3418 @item n
3419 @kindex n (Browse)
3420 @findex gnus-group-next-group
3421 Go to the next group (@code{gnus-group-next-group}).
3422
3423 @item p
3424 @kindex p (Browse)
3425 @findex gnus-group-prev-group
3426 Go to the previous group (@code{gnus-group-prev-group}).
3427
3428 @item SPACE
3429 @kindex SPACE (Browse)
3430 @findex gnus-browse-read-group
3431 Enter the current group and display the first article
3432 (@code{gnus-browse-read-group}).
3433
3434 @item RET
3435 @kindex RET (Browse)
3436 @findex gnus-browse-select-group
3437 Enter the current group (@code{gnus-browse-select-group}).
3438
3439 @item u
3440 @kindex u (Browse)
3441 @findex gnus-browse-unsubscribe-current-group
3442 Unsubscribe to the current group, or, as will be the case here,
3443 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3444
3445 @item l
3446 @itemx q
3447 @kindex q (Browse)
3448 @kindex l (Browse)
3449 @findex gnus-browse-exit
3450 Exit browse mode (@code{gnus-browse-exit}).
3451
3452 @item d
3453 @kindex d (Browse)
3454 @findex gnus-browse-describe-group
3455 Describe the current group (@code{gnus-browse-describe-group}).
3456
3457 @item ?
3458 @kindex ? (Browse)
3459 @findex gnus-browse-describe-briefly
3460 Describe browse mode briefly (well, there's not much to describe, is
3461 there) (@code{gnus-browse-describe-briefly}).
3462 @end table
3463
3464
3465 @node Exiting Gnus
3466 @section Exiting Gnus
3467 @cindex exiting Gnus
3468
3469 Yes, Gnus is ex(c)iting.
3470
3471 @table @kbd
3472 @item z
3473 @kindex z (Group)
3474 @findex gnus-group-suspend
3475 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3476 but it kills all buffers except the Group buffer.  I'm not sure why this
3477 is a gain, but then who am I to judge?
3478
3479 @item q
3480 @kindex q (Group)
3481 @findex gnus-group-exit
3482 @c @icon{gnus-group-exit}
3483 Quit Gnus (@code{gnus-group-exit}).
3484
3485 @item Q
3486 @kindex Q (Group)
3487 @findex gnus-group-quit
3488 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3489 The dribble file will be saved, though (@pxref{Auto Save}).
3490 @end table
3491
3492 @vindex gnus-exit-gnus-hook
3493 @vindex gnus-suspend-gnus-hook
3494 @vindex gnus-after-exiting-gnus-hook
3495 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3496 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3497 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3498 exiting Gnus.
3499
3500 Note:
3501
3502 @quotation
3503 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3504 numbly heavy and herself fall into a hazy trance as the boy sitting
3505 behind her drew repeated lines with his pencil across the back of her
3506 plastic chair.
3507 @end quotation
3508
3509
3510 @node Group Topics
3511 @section Group Topics
3512 @cindex topics
3513
3514 If you read lots and lots of groups, it might be convenient to group
3515 them hierarchically according to topics.  You put your Emacs groups over
3516 here, your sex groups over there, and the rest (what, two groups or so?)
3517 you put in some misc section that you never bother with anyway.  You can
3518 even group the Emacs sex groups as a sub-topic to either the Emacs
3519 groups or the sex groups---or both!  Go wild!
3520
3521 @iftex
3522 @iflatex
3523 \gnusfigure{Group Topics}{400}{
3524 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3525 }
3526 @end iflatex
3527 @end iftex
3528
3529 Here's an example:
3530
3531 @example
3532 Gnus
3533   Emacs -- I wuw it!
3534      3: comp.emacs
3535      2: alt.religion.emacs
3536     Naughty Emacs
3537      452: alt.sex.emacs
3538        0: comp.talk.emacs.recovery
3539   Misc
3540      8: comp.binaries.fractals
3541     13: comp.sources.unix
3542 @end example
3543
3544 @findex gnus-topic-mode
3545 @kindex t (Group)
3546 To get this @emph{fab} functionality you simply turn on (ooh!) the
3547 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3548 is a toggling command.)
3549
3550 Go ahead, just try it.  I'll still be here when you get back.  La de
3551 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3552 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3553 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3554 Hot and bothered?
3555
3556 If you want this permanently enabled, you should add that minor mode to
3557 the hook for the group mode.  Put the following line in your
3558 @file{~/.gnus.el} file:
3559
3560 @lisp
3561 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3562 @end lisp
3563
3564 @menu
3565 * Topic Commands::              Interactive E-Z commands.
3566 * Topic Variables::             How to customize the topics the Lisp Way.
3567 * Topic Sorting::               Sorting each topic individually.
3568 * Topic Topology::              A map of the world.
3569 * Topic Parameters::            Parameters that apply to all groups in a topic.
3570 @end menu
3571
3572
3573 @node Topic Commands
3574 @subsection Topic Commands
3575 @cindex topic commands
3576
3577 When the topic minor mode is turned on, a new @kbd{T} submap will be
3578 available.  In addition, a few of the standard keys change their
3579 definitions slightly.
3580
3581 In general, the following kinds of operations are possible on topics.
3582 First of all, you want to create topics.  Secondly, you want to put
3583 groups in topics and to move them around until you have an order you
3584 like.  The third kind of operation is to show/hide parts of the whole
3585 shebang.  You might want to hide a topic including its subtopics and
3586 groups, to get a better overview of the other groups.
3587
3588 Here is a list of the basic keys that you might need to set up topics
3589 the way you like.
3590
3591 @table @kbd
3592
3593 @item T n
3594 @kindex T n (Topic)
3595 @findex gnus-topic-create-topic
3596 Prompt for a new topic name and create it
3597 (@code{gnus-topic-create-topic}).
3598
3599 @item T TAB
3600 @itemx TAB
3601 @kindex T TAB (Topic)
3602 @kindex TAB (Topic)
3603 @findex gnus-topic-indent
3604 ``Indent'' the current topic so that it becomes a sub-topic of the
3605 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3606 ``un-indent'' the topic instead.
3607
3608 @item M-TAB
3609 @kindex M-TAB (Topic)
3610 @findex gnus-topic-unindent
3611 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3612 parent of its current parent (@code{gnus-topic-unindent}).
3613
3614 @end table
3615
3616 The following two keys can be used to move groups and topics around.
3617 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3618 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3619 kill and yank rather than cut and paste.
3620
3621 @table @kbd
3622
3623 @item C-k
3624 @kindex C-k (Topic)
3625 @findex gnus-topic-kill-group
3626 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3627 topic will be removed along with the topic.
3628
3629 @item C-y
3630 @kindex C-y (Topic)
3631 @findex gnus-topic-yank-group
3632 Yank the previously killed group or topic
3633 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3634 before all groups.
3635
3636 So, to move a topic to the beginning of the list of topics, just hit
3637 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3638 move the cursor to the beginning of the buffer (just below the ``Gnus''
3639 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3640 paste.  Like I said -- E-Z.
3641
3642 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3643 you can move topics around as well as groups.
3644
3645 @end table
3646
3647 After setting up the topics the way you like them, you might wish to
3648 hide a topic, or to show it again.  That's why we have the following
3649 key.
3650
3651 @table @kbd
3652
3653 @item RET
3654 @kindex RET (Topic)
3655 @findex gnus-topic-select-group
3656 @itemx SPACE
3657 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3658 When you perform this command on a group, you'll enter the group, as
3659 usual.  When done on a topic line, the topic will be folded (if it was
3660 visible) or unfolded (if it was folded already).  So it's basically a
3661 toggling command on topics.  In addition, if you give a numerical
3662 prefix, group on that level (and lower) will be displayed.
3663
3664 @end table
3665
3666 Now for a list of other commands, in no particular order.
3667
3668 @table @kbd
3669
3670 @item T m
3671 @kindex T m (Topic)
3672 @findex gnus-topic-move-group
3673 Move the current group to some other topic
3674 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3675 convention (@pxref{Process/Prefix}).
3676
3677 @item T j
3678 @kindex T j (Topic)
3679 @findex gnus-topic-jump-to-topic
3680 Go to a topic (@code{gnus-topic-jump-to-topic}).
3681
3682 @item T c
3683 @kindex T c (Topic)
3684 @findex gnus-topic-copy-group
3685 Copy the current group to some other topic
3686 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3687 convention (@pxref{Process/Prefix}).
3688
3689 @item T h
3690 @kindex T h (Topic)
3691 @findex gnus-topic-hide-topic
3692 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3693 a prefix, hide the topic permanently.
3694
3695 @item T s
3696 @kindex T s (Topic)
3697 @findex gnus-topic-show-topic
3698 Show the current topic (@code{gnus-topic-show-topic}).  If given
3699 a prefix, show the topic permanently.
3700
3701 @item T D
3702 @kindex T D (Topic)
3703 @findex gnus-topic-remove-group
3704 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3705 This command is mainly useful if you have the same group in several
3706 topics and wish to remove it from one of the topics.  You may also
3707 remove a group from all topics, but in that case, Gnus will add it to
3708 the root topic the next time you start Gnus.  In fact, all new groups
3709 (which, naturally, don't belong to any topic) will show up in the root
3710 topic.
3711
3712 This command uses the process/prefix convention
3713 (@pxref{Process/Prefix}).
3714
3715 @item T M
3716 @kindex T M (Topic)
3717 @findex gnus-topic-move-matching
3718 Move all groups that match some regular expression to a topic
3719 (@code{gnus-topic-move-matching}).
3720
3721 @item T C
3722 @kindex T C (Topic)
3723 @findex gnus-topic-copy-matching
3724 Copy all groups that match some regular expression to a topic
3725 (@code{gnus-topic-copy-matching}).
3726
3727 @item T H
3728 @kindex T H (Topic)
3729 @findex gnus-topic-toggle-display-empty-topics
3730 Toggle hiding empty topics
3731 (@code{gnus-topic-toggle-display-empty-topics}).
3732
3733 @item T #
3734 @kindex T # (Topic)
3735 @findex gnus-topic-mark-topic
3736 Mark all groups in the current topic with the process mark
3737 (@code{gnus-topic-mark-topic}).  This command works recursively on
3738 sub-topics unless given a prefix.
3739
3740 @item T M-#
3741 @kindex T M-# (Topic)
3742 @findex gnus-topic-unmark-topic
3743 Remove the process mark from all groups in the current topic
3744 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3745 sub-topics unless given a prefix.
3746
3747 @item C-c C-x
3748 @kindex C-c C-x (Topic)
3749 @findex gnus-topic-expire-articles
3750 Run all expirable articles in the current group or topic through the
3751 expiry process (if any)
3752 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3753
3754 @item T r
3755 @kindex T r (Topic)
3756 @findex gnus-topic-rename
3757 Rename a topic (@code{gnus-topic-rename}).
3758
3759 @item T DEL
3760 @kindex T DEL (Topic)
3761 @findex gnus-topic-delete
3762 Delete an empty topic (@code{gnus-topic-delete}).
3763
3764 @item A T
3765 @kindex A T (Topic)
3766 @findex gnus-topic-list-active
3767 List all groups that Gnus knows about in a topics-ified way
3768 (@code{gnus-topic-list-active}).
3769
3770 @item T M-n
3771 @kindex T M-n (Topic)
3772 @findex gnus-topic-goto-next-topic
3773 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3774
3775 @item T M-p
3776 @kindex T M-p (Topic)
3777 @findex gnus-topic-goto-previous-topic
3778 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3779
3780 @item G p
3781 @kindex G p (Topic)
3782 @findex gnus-topic-edit-parameters
3783 @cindex group parameters
3784 @cindex topic parameters
3785 @cindex parameters
3786 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3787 @xref{Topic Parameters}.
3788
3789 @end table
3790
3791
3792 @node Topic Variables
3793 @subsection Topic Variables
3794 @cindex topic variables
3795
3796 The previous section told you how to tell Gnus which topics to display.
3797 This section explains how to tell Gnus what to display about each topic.
3798
3799 @vindex gnus-topic-line-format
3800 The topic lines themselves are created according to the
3801 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3802 Valid elements are:
3803
3804 @table @samp
3805 @item i
3806 Indentation.
3807 @item n
3808 Topic name.
3809 @item v
3810 Visibility.
3811 @item l
3812 Level.
3813 @item g
3814 Number of groups in the topic.
3815 @item a
3816 Number of unread articles in the topic.
3817 @item A
3818 Number of unread articles in the topic and all its subtopics.
3819 @end table
3820
3821 @vindex gnus-topic-indent-level
3822 Each sub-topic (and the groups in the sub-topics) will be indented with
3823 @code{gnus-topic-indent-level} times the topic level number of spaces.
3824 The default is 2.
3825
3826 @vindex gnus-topic-mode-hook
3827 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3828
3829 @vindex gnus-topic-display-empty-topics
3830 The @code{gnus-topic-display-empty-topics} says whether to display even
3831 topics that have no unread articles in them.  The default is @code{t}.
3832
3833
3834 @node Topic Sorting
3835 @subsection Topic Sorting
3836 @cindex topic sorting
3837
3838 You can sort the groups in each topic individually with the following
3839 commands:
3840
3841
3842 @table @kbd
3843 @item T S a
3844 @kindex T S a (Topic)
3845 @findex gnus-topic-sort-groups-by-alphabet
3846 Sort the current topic alphabetically by group name
3847 (@code{gnus-topic-sort-groups-by-alphabet}).
3848
3849 @item T S u
3850 @kindex T S u (Topic)
3851 @findex gnus-topic-sort-groups-by-unread
3852 Sort the current topic by the number of unread articles
3853 (@code{gnus-topic-sort-groups-by-unread}).
3854
3855 @item T S l
3856 @kindex T S l (Topic)
3857 @findex gnus-topic-sort-groups-by-level
3858 Sort the current topic by group level
3859 (@code{gnus-topic-sort-groups-by-level}).
3860
3861 @item T S v
3862 @kindex T S v (Topic)
3863 @findex gnus-topic-sort-groups-by-score
3864 Sort the current topic by group score
3865 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3866
3867 @item T S r
3868 @kindex T S r (Topic)
3869 @findex gnus-topic-sort-groups-by-rank
3870 Sort the current topic by group rank
3871 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3872
3873 @item T S m
3874 @kindex T S m (Topic)
3875 @findex gnus-topic-sort-groups-by-method
3876 Sort the current topic alphabetically by back end name
3877 (@code{gnus-topic-sort-groups-by-method}).
3878
3879 @item T S e
3880 @kindex T S e (Topic)
3881 @findex gnus-topic-sort-groups-by-server
3882 Sort the current topic alphabetically by server name
3883 (@code{gnus-topic-sort-groups-by-server}).
3884
3885 @item T S s
3886 @kindex T S s
3887 @findex gnus-topic-sort-groups
3888 Sort the current topic according to the function(s) given by the
3889 @code{gnus-group-sort-function} variable
3890 (@code{gnus-topic-sort-groups}).
3891
3892 @end table
3893
3894 When given a prefix argument, all these commands will sort in reverse
3895 order.  @xref{Sorting Groups}, for more information about group
3896 sorting.
3897
3898
3899 @node Topic Topology
3900 @subsection Topic Topology
3901 @cindex topic topology
3902 @cindex topology
3903
3904 So, let's have a look at an example group buffer:
3905
3906 @example
3907 @group
3908 Gnus
3909   Emacs -- I wuw it!
3910      3: comp.emacs
3911      2: alt.religion.emacs
3912     Naughty Emacs
3913      452: alt.sex.emacs
3914        0: comp.talk.emacs.recovery
3915   Misc
3916      8: comp.binaries.fractals
3917     13: comp.sources.unix
3918 @end group
3919 @end example
3920
3921 So, here we have one top-level topic (@samp{Gnus}), two topics under
3922 that, and one sub-topic under one of the sub-topics.  (There is always
3923 just one (1) top-level topic).  This topology can be expressed as
3924 follows:
3925
3926 @lisp
3927 (("Gnus" visible)
3928  (("Emacs -- I wuw it!" visible)
3929   (("Naughty Emacs" visible)))
3930  (("Misc" visible)))
3931 @end lisp
3932
3933 @vindex gnus-topic-topology
3934 This is in fact how the variable @code{gnus-topic-topology} would look
3935 for the display above.  That variable is saved in the @file{.newsrc.eld}
3936 file, and shouldn't be messed with manually---unless you really want
3937 to.  Since this variable is read from the @file{.newsrc.eld} file,
3938 setting it in any other startup files will have no effect.
3939
3940 This topology shows what topics are sub-topics of what topics (right),
3941 and which topics are visible.  Two settings are currently
3942 allowed---@code{visible} and @code{invisible}.
3943
3944
3945 @node Topic Parameters
3946 @subsection Topic Parameters
3947 @cindex topic parameters
3948
3949 All groups in a topic will inherit group parameters from the parent (and
3950 ancestor) topic parameters.  All valid group parameters are valid topic
3951 parameters (@pxref{Group Parameters}).
3952
3953 In addition, the following parameters are only valid as topic
3954 parameters:
3955
3956 @table @code
3957 @item subscribe
3958 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3959 @code{subscribe} topic parameter says what groups go in what topic.  Its
3960 value should be a regexp to match the groups that should go in that
3961 topic.
3962
3963 @item subscribe-level
3964 When subscribing new groups by topic (see the @code{subscribe} parameter),
3965 the group will be subscribed with the level specified in the
3966 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3967
3968 @end table
3969
3970 Group parameters (of course) override topic parameters, and topic
3971 parameters in sub-topics override topic parameters in super-topics.  You
3972 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3973 verb, although you may feel free to disagree with me here.)
3974
3975 @example
3976 @group
3977 Gnus
3978   Emacs
3979      3: comp.emacs
3980      2: alt.religion.emacs
3981    452: alt.sex.emacs
3982     Relief
3983      452: alt.sex.emacs
3984        0: comp.talk.emacs.recovery
3985   Misc
3986      8: comp.binaries.fractals
3987     13: comp.sources.unix
3988    452: alt.sex.emacs
3989 @end group   
3990 @end example
3991
3992 The @samp{Emacs} topic has the topic parameter @code{(score-file
3993 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3994 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3995 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3996 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3997 . "religion.SCORE")}.
3998
3999 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
4000 will get the @file{relief.SCORE} home score file.  If you enter the same
4001 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
4002 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
4003 get the @file{religion.SCORE} home score file.
4004
4005 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
4006 there are some problems, especially with the @code{total-expiry}
4007 parameter.  Say you have a mail group in two topics; one with
4008 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
4009 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
4010 of these topics you mean to expire articles from, so anything may
4011 happen.  In fact, I hereby declare that it is @dfn{undefined} what
4012 happens.  You just have to be careful if you do stuff like that.
4013
4014
4015 @node Misc Group Stuff
4016 @section Misc Group Stuff
4017
4018 @menu
4019 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
4020 * Group Information::           Information and help on groups and Gnus.
4021 * Group Timestamp::             Making Gnus keep track of when you last read a group.
4022 * File Commands::               Reading and writing the Gnus files.
4023 * Sieve Commands::              Managing Sieve scripts.
4024 @end menu
4025
4026 @table @kbd
4027
4028 @item ^
4029 @kindex ^ (Group)
4030 @findex gnus-group-enter-server-mode
4031 Enter the server buffer (@code{gnus-group-enter-server-mode}).
4032 @xref{Server Buffer}.
4033
4034 @item a
4035 @kindex a (Group)
4036 @findex gnus-group-post-news
4037 Start composing a message (a news by default)
4038 (@code{gnus-group-post-news}).  If given a prefix, post to the group
4039 under the point.  If the prefix is 1, prompt for a group to post to.
4040 Contrary to what the name of this function suggests, the prepared
4041 article might be a mail instead of a news, if a mail group is specified
4042 with the prefix argument.  @xref{Composing Messages}.
4043
4044 @item m
4045 @kindex m (Group)
4046 @findex gnus-group-mail
4047 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
4048 use the posting style of the group under the point.  If the prefix is 1,
4049 prompt for a group name to find the posting style.
4050 @xref{Composing Messages}.
4051
4052 @item i
4053 @kindex i (Group)
4054 @findex gnus-group-news
4055 Start composing a news (@code{gnus-group-news}).  If given a prefix,
4056 post to the group under the point.  If the prefix is 1, prompt
4057 for group to post to.  @xref{Composing Messages}.
4058
4059 This function actually prepares a news even when using mail groups.
4060 This is useful for ``posting'' messages to mail groups without actually
4061 sending them over the network: they're just saved directly to the group
4062 in question.  The corresponding back end must have a request-post method
4063 for this to work though.
4064
4065 @end table
4066
4067 Variables for the group buffer:
4068
4069 @table @code
4070
4071 @item gnus-group-mode-hook
4072 @vindex gnus-group-mode-hook
4073 is called after the group buffer has been
4074 created.
4075
4076 @item gnus-group-prepare-hook
4077 @vindex gnus-group-prepare-hook
4078 is called after the group buffer is
4079 generated.  It may be used to modify the buffer in some strange,
4080 unnatural way.
4081
4082 @item gnus-group-prepared-hook
4083 @vindex gnus-group-prepare-hook
4084 is called as the very last thing after the group buffer has been
4085 generated.  It may be used to move point around, for instance.
4086
4087 @item gnus-permanently-visible-groups
4088 @vindex gnus-permanently-visible-groups
4089 Groups matching this regexp will always be listed in the group buffer,
4090 whether they are empty or not.
4091
4092 @item gnus-group-name-charset-method-alist
4093 @vindex gnus-group-name-charset-method-alist
4094 An alist of method and the charset for group names.  It is used to show
4095 non-@acronym{ASCII} group names.
4096
4097 For example:
4098 @lisp
4099 (setq gnus-group-name-charset-method-alist
4100     '(((nntp "news.com.cn") . cn-gb-2312)))
4101 @end lisp
4102
4103 @item gnus-group-name-charset-group-alist
4104 @cindex UTF-8 group names
4105 @vindex gnus-group-name-charset-group-alist
4106 An alist of regexp of group name and the charset for group names.  It
4107 is used to show non-@acronym{ASCII} group names.  @code{((".*"
4108 utf-8))} is the default value if UTF-8 is supported, otherwise the
4109 default is @code{nil}.
4110
4111 For example:
4112 @lisp
4113 (setq gnus-group-name-charset-group-alist
4114     '(("\\.com\\.cn:" . cn-gb-2312)))
4115 @end lisp
4116
4117 @end table
4118
4119 @node Scanning New Messages
4120 @subsection Scanning New Messages
4121 @cindex new messages
4122 @cindex scanning new news
4123
4124 @table @kbd
4125
4126 @item g
4127 @kindex g (Group)
4128 @findex gnus-group-get-new-news
4129 @c @icon{gnus-group-get-new-news}
4130 Check the server(s) for new articles.  If the numerical prefix is used,
4131 this command will check only groups of level @var{arg} and lower
4132 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4133 command will force a total re-reading of the active file(s) from the
4134 back end(s).
4135
4136 @item M-g
4137 @kindex M-g (Group)
4138 @findex gnus-group-get-new-news-this-group
4139 @vindex gnus-goto-next-group-when-activating
4140 @c @icon{gnus-group-get-new-news-this-group}
4141 Check whether new articles have arrived in the current group
4142 (@code{gnus-group-get-new-news-this-group}).
4143 @code{gnus-goto-next-group-when-activating} says whether this command is
4144 to move point to the next group or not.  It is @code{t} by default.
4145
4146 @findex gnus-activate-all-groups
4147 @cindex activating groups
4148 @item C-c M-g
4149 @kindex C-c M-g (Group)
4150 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4151
4152 @item R
4153 @kindex R (Group)
4154 @cindex restarting
4155 @findex gnus-group-restart
4156 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4157 file(s), closes the connection to all servers, clears up all run-time
4158 Gnus variables, and then starts Gnus all over again.
4159
4160 @end table
4161
4162 @vindex gnus-get-new-news-hook
4163 @code{gnus-get-new-news-hook} is run just before checking for new news.
4164
4165 @vindex gnus-after-getting-new-news-hook
4166 @code{gnus-after-getting-new-news-hook} is run after checking for new
4167 news.
4168
4169
4170 @node Group Information
4171 @subsection Group Information
4172 @cindex group information
4173 @cindex information on groups
4174
4175 @table @kbd
4176
4177
4178 @item H f
4179 @kindex H f (Group)
4180 @findex gnus-group-fetch-faq
4181 @vindex gnus-group-faq-directory
4182 @cindex FAQ
4183 @cindex ange-ftp
4184 Try to fetch the @acronym{FAQ} for the current group
4185 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
4186 from @code{gnus-group-faq-directory}, which is usually a directory on
4187 a remote machine.  This variable can also be a list of directories.
4188 In that case, giving a prefix to this command will allow you to choose
4189 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
4190 used for fetching the file.
4191
4192 If fetching from the first site is unsuccessful, Gnus will attempt to go
4193 through @code{gnus-group-faq-directory} and try to open them one by one.
4194
4195 @item H c
4196 @kindex H c (Group)
4197 @findex gnus-group-fetch-charter
4198 @vindex gnus-group-charter-alist
4199 @cindex charter
4200 Try to open the charter for the current group in a web browser
4201 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4202 prefix argument.
4203
4204 Gnus will use @code{gnus-group-charter-alist} to find the location of
4205 the charter.  If no location is known, Gnus will fetch the control
4206 messages for the group, which in some cases includes the charter.
4207
4208 @item H C
4209 @kindex H C (Group)
4210 @findex gnus-group-fetch-control
4211 @vindex gnus-group-fetch-control-use-browse-url
4212 @cindex control message
4213 Fetch the control messages for the group from the archive at
4214 @code{ftp.isc.org} (@code{gnus-group-fetch-control}).  Query for a
4215 group if given a prefix argument.
4216
4217 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4218 Gnus will open the control messages in a browser using
4219 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4220 and displayed in an ephemeral group.
4221
4222 Note that the control messages are compressed.  To use this command
4223 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
4224 Files, ,Compressed Files, emacs, The Emacs Manual}).
4225
4226 @item H d
4227 @itemx C-c C-d
4228 @c @icon{gnus-group-describe-group}
4229 @kindex H d (Group)
4230 @kindex C-c C-d (Group)
4231 @cindex describing groups
4232 @cindex group description
4233 @findex gnus-group-describe-group
4234 Describe the current group (@code{gnus-group-describe-group}).  If given
4235 a prefix, force Gnus to re-read the description from the server.
4236
4237 @item M-d
4238 @kindex M-d (Group)
4239 @findex gnus-group-describe-all-groups
4240 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4241 prefix, force Gnus to re-read the description file from the server.
4242
4243 @item H v
4244 @itemx V
4245 @kindex V (Group)
4246 @kindex H v (Group)
4247 @cindex version
4248 @findex gnus-version
4249 Display current Gnus version numbers (@code{gnus-version}).
4250
4251 @item ?
4252 @kindex ? (Group)
4253 @findex gnus-group-describe-briefly
4254 Give a very short help message (@code{gnus-group-describe-briefly}).
4255
4256 @item C-c C-i
4257 @kindex C-c C-i (Group)
4258 @cindex info
4259 @cindex manual
4260 @findex gnus-info-find-node
4261 Go to the Gnus info node (@code{gnus-info-find-node}).
4262 @end table
4263
4264
4265 @node Group Timestamp
4266 @subsection Group Timestamp
4267 @cindex timestamps
4268 @cindex group timestamps
4269
4270 It can be convenient to let Gnus keep track of when you last read a
4271 group.  To set the ball rolling, you should add
4272 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4273
4274 @lisp
4275 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4276 @end lisp
4277
4278 After doing this, each time you enter a group, it'll be recorded.
4279
4280 This information can be displayed in various ways---the easiest is to
4281 use the @samp{%d} spec in the group line format:
4282
4283 @lisp
4284 (setq gnus-group-line-format
4285       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4286 @end lisp
4287
4288 This will result in lines looking like:
4289
4290 @example
4291 *        0: mail.ding                                19961002T012943
4292          0: custom                                   19961002T012713
4293 @end example
4294
4295 As you can see, the date is displayed in compact ISO 8601 format.  This
4296 may be a bit too much, so to just display the date, you could say
4297 something like:
4298
4299 @lisp
4300 (setq gnus-group-line-format
4301       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4302 @end lisp
4303
4304 If you would like greater control of the time format, you can use a
4305 user-defined format spec.  Something like the following should do the
4306 trick:
4307
4308 @lisp
4309 (setq gnus-group-line-format
4310       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4311 (defun gnus-user-format-function-d (headers)
4312   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4313     (if time
4314         (format-time-string "%b %d  %H:%M" time)
4315       "")))
4316 @end lisp
4317
4318
4319 @node File Commands
4320 @subsection File Commands
4321 @cindex file commands
4322
4323 @table @kbd
4324
4325 @item r
4326 @kindex r (Group)
4327 @findex gnus-group-read-init-file
4328 @vindex gnus-init-file
4329 @cindex reading init file
4330 Re-read the init file (@code{gnus-init-file}, which defaults to
4331 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4332
4333 @item s
4334 @kindex s (Group)
4335 @findex gnus-group-save-newsrc
4336 @cindex saving .newsrc
4337 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4338 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4339 file(s) whether Gnus thinks it is necessary or not.
4340
4341 @c @item Z
4342 @c @kindex Z (Group)
4343 @c @findex gnus-group-clear-dribble
4344 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4345
4346 @end table
4347
4348
4349 @node Sieve Commands
4350 @subsection Sieve Commands
4351 @cindex group sieve commands
4352
4353 Sieve is a server-side mail filtering language.  In Gnus you can use
4354 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4355 sieve rules that should apply to each group.  Gnus provides two
4356 commands to translate all these group parameters into a proper Sieve
4357 script that can be transfered to the server somehow.
4358
4359 @vindex gnus-sieve-file
4360 @vindex gnus-sieve-region-start
4361 @vindex gnus-sieve-region-end
4362 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4363 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4364 between two delimiters, @code{gnus-sieve-region-start} and
4365 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4366 outside these delimiters that will not be removed the next time you
4367 regenerate the Sieve script.
4368
4369 @vindex gnus-sieve-crosspost
4370 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4371 is generated.  If it is non-@code{nil} (the default) articles is
4372 placed in all groups that have matching rules, otherwise the article
4373 is only placed in the group with the first matching rule.  For
4374 example, the group parameter @samp{(sieve address "sender"
4375 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4376 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
4377 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4378 except that the line containing the call to @code{stop} is removed.)
4379
4380 @example
4381 if address "sender" "owner-ding@@hpc.uh.edu" @{
4382         fileinto "INBOX.ding";
4383         stop;
4384 @}
4385 @end example
4386
4387 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
4388
4389 @table @kbd
4390
4391 @item D g
4392 @kindex D g (Group)
4393 @findex gnus-sieve-generate
4394 @vindex gnus-sieve-file
4395 @cindex generating sieve script
4396 Regenerate a Sieve script from the @code{sieve} group parameters and
4397 put you into the @code{gnus-sieve-file} without saving it.
4398
4399 @item D u
4400 @kindex D u (Group)
4401 @findex gnus-sieve-update
4402 @vindex gnus-sieve-file
4403 @cindex updating sieve script
4404 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4405 @code{sieve} group parameters, save the file and upload it to the
4406 server using the @code{sieveshell} program.
4407
4408 @end table
4409
4410
4411 @node Summary Buffer
4412 @chapter Summary Buffer
4413 @cindex summary buffer
4414
4415 A line for each article is displayed in the summary buffer.  You can
4416 move around, read articles, post articles and reply to articles.
4417
4418 The most common way to a summary buffer is to select a group from the
4419 group buffer (@pxref{Selecting a Group}).
4420
4421 You can have as many summary buffers open as you wish.
4422
4423 @menu
4424 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4425 * Summary Maneuvering::         Moving around the summary buffer.
4426 * Choosing Articles::           Reading articles.
4427 * Paging the Article::          Scrolling the current article.
4428 * Reply Followup and Post::     Posting articles.
4429 * Delayed Articles::            Send articles at a later time.
4430 * Marking Articles::            Marking articles as read, expirable, etc.
4431 * Limiting::                    You can limit the summary buffer.
4432 * Threading::                   How threads are made.
4433 * Sorting the Summary Buffer::  How articles and threads are sorted.
4434 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4435 * Article Caching::             You may store articles in a cache.
4436 * Persistent Articles::         Making articles expiry-resistant.
4437 * Article Backlog::             Having already read articles hang around.
4438 * Saving Articles::             Ways of customizing article saving.
4439 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4440 * Article Treatment::           The article buffer can be mangled at will.
4441 * MIME Commands::               Doing MIMEy things with the articles.
4442 * Charsets::                    Character set issues.
4443 * Article Commands::            Doing various things with the article buffer.
4444 * Summary Sorting::             Sorting the summary buffer in various ways.
4445 * Finding the Parent::          No child support? Get the parent.
4446 * Alternative Approaches::      Reading using non-default summaries.
4447 * Tree Display::                A more visual display of threads.
4448 * Mail Group Commands::         Some commands can only be used in mail groups.
4449 * Various Summary Stuff::       What didn't fit anywhere else.
4450 * Exiting the Summary Buffer::  Returning to the Group buffer,
4451                                 or reselecting the current group.
4452 * Crosspost Handling::          How crossposted articles are dealt with.
4453 * Duplicate Suppression::       An alternative when crosspost handling fails.
4454 * Security::                    Decrypt and Verify.
4455 * Mailing List::                Mailing list minor mode.
4456 @end menu
4457
4458
4459 @node Summary Buffer Format
4460 @section Summary Buffer Format
4461 @cindex summary buffer format
4462
4463 @iftex
4464 @iflatex
4465 \gnusfigure{The Summary Buffer}{180}{
4466 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4467 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4468 }
4469 @end iflatex
4470 @end iftex
4471
4472 @menu
4473 * Summary Buffer Lines::        You can specify how summary lines should look.
4474 * To From Newsgroups::          How to not display your own name.
4475 * Summary Buffer Mode Line::    You can say how the mode line should look.
4476 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4477 @end menu
4478
4479 @findex mail-extract-address-components
4480 @findex gnus-extract-address-components
4481 @vindex gnus-extract-address-components
4482 Gnus will use the value of the @code{gnus-extract-address-components}
4483 variable as a function for getting the name and address parts of a
4484 @code{From} header.  Two pre-defined functions exist:
4485 @code{gnus-extract-address-components}, which is the default, quite
4486 fast, and too simplistic solution; and
4487 @code{mail-extract-address-components}, which works very nicely, but is
4488 slower.  The default function will return the wrong answer in 5% of the
4489 cases.  If this is unacceptable to you, use the other function instead:
4490
4491 @lisp
4492 (setq gnus-extract-address-components
4493       'mail-extract-address-components)
4494 @end lisp
4495
4496 @vindex gnus-summary-same-subject
4497 @code{gnus-summary-same-subject} is a string indicating that the current
4498 article has the same subject as the previous.  This string will be used
4499 with those specs that require it.  The default is @code{""}.
4500
4501
4502 @node Summary Buffer Lines
4503 @subsection Summary Buffer Lines
4504
4505 @vindex gnus-summary-line-format
4506 You can change the format of the lines in the summary buffer by changing
4507 the @code{gnus-summary-line-format} variable.  It works along the same
4508 lines as a normal @code{format} string, with some extensions
4509 (@pxref{Formatting Variables}).
4510
4511 There should always be a colon or a point position marker on the line;
4512 the cursor always moves to the point position marker or the colon after
4513 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4514 possible to change this.  Just write a new function
4515 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4516 @xref{Positioning Point}.
4517
4518 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4519
4520 The following format specification characters and extended format
4521 specification(s) are understood:
4522
4523 @table @samp
4524 @item N
4525 Article number.
4526 @item S
4527 Subject string.  List identifiers stripped,
4528 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4529 @item s
4530 Subject if the article is the root of the thread or the previous article
4531 had a different subject, @code{gnus-summary-same-subject} otherwise.
4532 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4533 @item F
4534 Full @code{From} header.
4535 @item n
4536 The name (from the @code{From} header).
4537 @item f
4538 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4539 From Newsgroups}).
4540 @item a
4541 The name (from the @code{From} header).  This differs from the @code{n}
4542 spec in that it uses the function designated by the
4543 @code{gnus-extract-address-components} variable, which is slower, but
4544 may be more thorough.
4545 @item A
4546 The address (from the @code{From} header).  This works the same way as
4547 the @code{a} spec.
4548 @item L
4549 Number of lines in the article.
4550 @item c
4551 Number of characters in the article.  This specifier is not supported
4552 in some methods (like nnfolder).
4553 @item k
4554 Pretty-printed version of the number of characters in the article;
4555 for example, @samp{1.2k} or @samp{0.4M}.
4556 @item I
4557 Indentation based on thread level (@pxref{Customizing Threading}).
4558 @item B
4559 A complex trn-style thread tree, showing response-connecting trace
4560 lines.  A thread could be drawn like this:
4561
4562 @example
4563 >
4564 +->
4565 | +->
4566 | | \->
4567 | |   \->
4568 | \->
4569 +->
4570 \->
4571 @end example
4572
4573 You can customize the appearance with the following options.  Note
4574 that it is possible to make the thread display look really neat by
4575 replacing the default @acronym{ASCII} characters with graphic
4576 line-drawing glyphs.
4577 @table @code
4578 @item gnus-sum-thread-tree-root
4579 @vindex gnus-sum-thread-tree-root
4580 Used for the root of a thread.  If @code{nil}, use subject
4581 instead.  The default is @samp{> }.
4582
4583 @item gnus-sum-thread-tree-false-root
4584 @vindex gnus-sum-thread-tree-false-root
4585 Used for the false root of a thread (@pxref{Loose Threads}).  If
4586 @code{nil}, use subject instead.  The default is @samp{> }.
4587
4588 @item gnus-sum-thread-tree-single-indent
4589 @vindex gnus-sum-thread-tree-single-indent
4590 Used for a thread with just one message.  If @code{nil}, use subject
4591 instead.  The default is @samp{}.
4592
4593 @item gnus-sum-thread-tree-vertical
4594 @vindex gnus-sum-thread-tree-vertical
4595 Used for drawing a vertical line.  The default is @samp{| }.
4596
4597 @item gnus-sum-thread-tree-indent
4598 @vindex gnus-sum-thread-tree-indent
4599 Used for indenting.  The default is @samp{  }.
4600
4601 @item gnus-sum-thread-tree-leaf-with-other
4602 @vindex gnus-sum-thread-tree-leaf-with-other
4603 Used for a leaf with brothers.  The default is @samp{+-> }.
4604
4605 @item gnus-sum-thread-tree-single-leaf
4606 @vindex gnus-sum-thread-tree-single-leaf
4607 Used for a leaf without brothers.  The default is @samp{\-> }
4608
4609 @end table
4610
4611 @item T
4612 Nothing if the article is a root and lots of spaces if it isn't (it
4613 pushes everything after it off the screen).
4614 @item [
4615 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4616 for adopted articles (@pxref{Customizing Threading}).
4617 @item ]
4618 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4619 for adopted articles.
4620 @item >
4621 One space for each thread level.
4622 @item <
4623 Twenty minus thread level spaces.
4624 @item U
4625 Unread.  @xref{Read Articles}.
4626
4627 @item R
4628 This misleadingly named specifier is the @dfn{secondary mark}.  This
4629 mark will say whether the article has been replied to, has been cached,
4630 or has been saved.  @xref{Other Marks}.
4631
4632 @item i
4633 Score as a number (@pxref{Scoring}).
4634 @item z
4635 @vindex gnus-summary-zcore-fuzz
4636 Zcore, @samp{+} if above the default level and @samp{-} if below the
4637 default level.  If the difference between
4638 @code{gnus-summary-default-score} and the score is less than
4639 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4640 @item V
4641 Total thread score.
4642 @item x
4643 @code{Xref}.
4644 @item D
4645 @code{Date}.
4646 @item d
4647 The @code{Date} in @code{DD-MMM} format.
4648 @item o
4649 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4650 @item M
4651 @code{Message-ID}.
4652 @item r
4653 @code{References}.
4654 @item t
4655 Number of articles in the current sub-thread.  Using this spec will slow
4656 down summary buffer generation somewhat.
4657 @item e
4658 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4659 article has any children.
4660 @item P
4661 The line number.
4662 @item O
4663 Download mark.
4664 @item &user-date;
4665 Age sensitive date format.  Various date format is defined in
4666 @code{gnus-user-date-format-alist}.
4667 @item u
4668 User defined specifier.  The next character in the format string should
4669 be a letter.  Gnus will call the function
4670 @code{gnus-user-format-function-@var{x}}, where @var{x} is the letter
4671 following @samp{%u}.  The function will be passed the current header as
4672 argument.  The function should return a string, which will be inserted
4673 into the summary just like information from any other summary specifier.
4674 @end table
4675
4676 Text between @samp{%(} and @samp{%)} will be highlighted with
4677 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4678 There can only be one such area.
4679
4680 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4681 have to be handled with care.  For reasons of efficiency, Gnus will
4682 compute what column these characters will end up in, and ``hard-code''
4683 that.  This means that it is invalid to have these specs after a
4684 variable-length spec.  Well, you might not be arrested, but your summary
4685 buffer will look strange, which is bad enough.
4686
4687 The smart choice is to have these specs as far to the left as possible.
4688 (Isn't that the case with everything, though?  But I digress.)
4689
4690 This restriction may disappear in later versions of Gnus.
4691
4692
4693 @node To From Newsgroups
4694 @subsection To From Newsgroups
4695 @cindex To
4696 @cindex Newsgroups
4697
4698 In some groups (particularly in archive groups), the @code{From} header
4699 isn't very interesting, since all the articles there are written by
4700 you.  To display the information in the @code{To} or @code{Newsgroups}
4701 headers instead, you need to decide three things: What information to
4702 gather; where to display it; and when to display it.
4703
4704 @enumerate
4705 @item
4706 @vindex gnus-extra-headers
4707 The reading of extra header information is controlled by the
4708 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4709 instance:
4710
4711 @lisp
4712 (setq gnus-extra-headers
4713       '(To Newsgroups X-Newsreader))
4714 @end lisp
4715
4716 This will result in Gnus trying to obtain these three headers, and
4717 storing it in header structures for later easy retrieval.
4718
4719 @item
4720 @findex gnus-extra-header
4721 The value of these extra headers can be accessed via the
4722 @code{gnus-extra-header} function.  Here's a format line spec that will
4723 access the @code{X-Newsreader} header:
4724
4725 @example
4726 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4727 @end example
4728
4729 @item
4730 @vindex gnus-ignored-from-addresses
4731 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4732 summary line spec returns the @code{To}, @code{Newsreader} or
4733 @code{From} header.  If this regexp matches the contents of the
4734 @code{From} header, the value of the @code{To} or @code{Newsreader}
4735 headers are used instead.
4736
4737 @end enumerate
4738
4739 @vindex nnmail-extra-headers
4740 A related variable is @code{nnmail-extra-headers}, which controls when
4741 to include extra headers when generating overview (@acronym{NOV}) files.
4742 If you have old overview files, you should regenerate them after
4743 changing this variable, by entering the server buffer using @kbd{^},
4744 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
4745 regeneration.
4746
4747 @vindex gnus-summary-line-format
4748 You also have to instruct Gnus to display the data by changing the
4749 @code{%n} spec to the @code{%f} spec in the
4750 @code{gnus-summary-line-format} variable.
4751
4752 In summary, you'd typically put something like the following in
4753 @file{~/.gnus.el}:
4754
4755 @lisp
4756 (setq gnus-extra-headers
4757       '(To Newsgroups))
4758 (setq nnmail-extra-headers gnus-extra-headers)
4759 (setq gnus-summary-line-format
4760       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4761 (setq gnus-ignored-from-addresses
4762       "Your Name Here")
4763 @end lisp
4764
4765 (The values listed above are the default values in Gnus.  Alter them
4766 to fit your needs.)
4767
4768 A note for news server administrators, or for users who wish to try to
4769 convince their news server administrator to provide some additional
4770 support:
4771
4772 The above is mostly useful for mail groups, where you have control over
4773 the @acronym{NOV} files that are created.  However, if you can persuade your
4774 nntp admin to add (in the usual implementation, notably INN):
4775
4776 @example
4777 Newsgroups:full
4778 @end example
4779
4780 to the end of her @file{overview.fmt} file, then you can use that just
4781 as you would the extra headers from the mail groups.
4782
4783
4784 @node Summary Buffer Mode Line
4785 @subsection Summary Buffer Mode Line
4786
4787 @vindex gnus-summary-mode-line-format
4788 You can also change the format of the summary mode bar (@pxref{Mode Line
4789 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4790 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4791
4792 Here are the elements you can play with:
4793
4794 @table @samp
4795 @item G
4796 Group name.
4797 @item p
4798 Unprefixed group name.
4799 @item A
4800 Current article number.
4801 @item z
4802 Current article score.
4803 @item V
4804 Gnus version.
4805 @item U
4806 Number of unread articles in this group.
4807 @item e
4808 Number of unread articles in this group that aren't displayed in the
4809 summary buffer.
4810 @item Z
4811 A string with the number of unread and unselected articles represented
4812 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4813 articles, and just as @samp{<%U more>} if there are just unread articles
4814 and no unselected ones.
4815 @item g
4816 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4817 shortened to @samp{r.a.anime}.
4818 @item S
4819 Subject of the current article.
4820 @item u
4821 User-defined spec (@pxref{User-Defined Specs}).
4822 @item s
4823 Name of the current score file (@pxref{Scoring}).
4824 @item d
4825 Number of dormant articles (@pxref{Unread Articles}).
4826 @item t
4827 Number of ticked articles (@pxref{Unread Articles}).
4828 @item r
4829 Number of articles that have been marked as read in this session.
4830 @item E
4831 Number of articles expunged by the score files.
4832 @end table
4833
4834
4835 @node Summary Highlighting
4836 @subsection Summary Highlighting
4837
4838 @table @code
4839
4840 @item gnus-visual-mark-article-hook
4841 @vindex gnus-visual-mark-article-hook
4842 This hook is run after selecting an article.  It is meant to be used for
4843 highlighting the article in some way.  It is not run if
4844 @code{gnus-visual} is @code{nil}.
4845
4846 @item gnus-summary-update-hook
4847 @vindex gnus-summary-update-hook
4848 This hook is called when a summary line is changed.  It is not run if
4849 @code{gnus-visual} is @code{nil}.
4850
4851 @item gnus-summary-selected-face
4852 @vindex gnus-summary-selected-face
4853 This is the face (or @dfn{font} as some people call it) used to
4854 highlight the current article in the summary buffer.
4855
4856 @item gnus-summary-highlight
4857 @vindex gnus-summary-highlight
4858 Summary lines are highlighted according to this variable, which is a
4859 list where the elements are of the format @code{(@var{form}
4860 . @var{face})}.  If you would, for instance, like ticked articles to be
4861 italic and high-scored articles to be bold, you could set this variable
4862 to something like
4863 @lisp
4864 (((eq mark gnus-ticked-mark) . italic)
4865  ((> score default) . bold))
4866 @end lisp
4867 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4868 @var{face} will be applied to the line.
4869 @end table
4870
4871
4872 @node Summary Maneuvering
4873 @section Summary Maneuvering
4874 @cindex summary movement
4875
4876 All the straight movement commands understand the numeric prefix and
4877 behave pretty much as you'd expect.
4878
4879 None of these commands select articles.
4880
4881 @table @kbd
4882 @item G M-n
4883 @itemx M-n
4884 @kindex M-n (Summary)
4885 @kindex G M-n (Summary)
4886 @findex gnus-summary-next-unread-subject
4887 Go to the next summary line of an unread article
4888 (@code{gnus-summary-next-unread-subject}).
4889
4890 @item G M-p
4891 @itemx M-p
4892 @kindex M-p (Summary)
4893 @kindex G M-p (Summary)
4894 @findex gnus-summary-prev-unread-subject
4895 Go to the previous summary line of an unread article
4896 (@code{gnus-summary-prev-unread-subject}).
4897
4898 @item G g
4899 @kindex G g (Summary)
4900 @findex gnus-summary-goto-subject
4901 Ask for an article number and then go to the summary line of that article
4902 without displaying the article (@code{gnus-summary-goto-subject}).
4903 @end table
4904
4905 If Gnus asks you to press a key to confirm going to the next group, you
4906 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4907 buffer, searching for the next group to read without actually returning
4908 to the group buffer.
4909
4910 Variables related to summary movement:
4911
4912 @table @code
4913
4914 @vindex gnus-auto-select-next
4915 @item gnus-auto-select-next
4916 If you issue one of the movement commands (like @kbd{n}) and there are
4917 no more unread articles after the current one, Gnus will offer to go to
4918 the next group.  If this variable is @code{t} and the next group is
4919 empty, Gnus will exit summary mode and return to the group buffer.  If
4920 this variable is neither @code{t} nor @code{nil}, Gnus will select the
4921 next group with unread articles.  As a special case, if this variable
4922 is @code{quietly}, Gnus will select the next group without asking for
4923 confirmation.  If this variable is @code{almost-quietly}, the same
4924 will happen only if you are located on the last article in the group.
4925 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4926 command will go to the next group without confirmation.  Also
4927 @pxref{Group Levels}.
4928
4929 @item gnus-auto-select-same
4930 @vindex gnus-auto-select-same
4931 If non-@code{nil}, all the movement commands will try to go to the next
4932 article with the same subject as the current.  (@dfn{Same} here might
4933 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4934 for details (@pxref{Customizing Threading}).)  If there are no more
4935 articles with the same subject, go to the first unread article.
4936
4937 This variable is not particularly useful if you use a threaded display.
4938
4939 @item gnus-summary-check-current
4940 @vindex gnus-summary-check-current
4941 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4942 to the next (or previous) article if the current article is unread.
4943 Instead, they will choose the current article.
4944
4945 @item gnus-auto-center-summary
4946 @vindex gnus-auto-center-summary
4947 If non-@code{nil}, Gnus will keep the point in the summary buffer
4948 centered at all times.  This makes things quite tidy, but if you have a
4949 slow network connection, or simply do not like this un-Emacsism, you can
4950 set this variable to @code{nil} to get the normal Emacs scrolling
4951 action.  This will also inhibit horizontal re-centering of the summary
4952 buffer, which might make it more inconvenient to read extremely long
4953 threads.
4954
4955 This variable can also be a number.  In that case, center the window at
4956 the given number of lines from the top.
4957
4958 @end table
4959
4960
4961 @node Choosing Articles
4962 @section Choosing Articles
4963 @cindex selecting articles
4964
4965 @menu
4966 * Choosing Commands::           Commands for choosing articles.
4967 * Choosing Variables::          Variables that influence these commands.
4968 @end menu
4969
4970
4971 @node Choosing Commands
4972 @subsection Choosing Commands
4973
4974 None of the following movement commands understand the numeric prefix,
4975 and they all select and display an article.
4976
4977 If you want to fetch new articles or redisplay the group, see
4978 @ref{Exiting the Summary Buffer}.
4979
4980 @table @kbd
4981 @item SPACE
4982 @kindex SPACE (Summary)
4983 @findex gnus-summary-next-page
4984 Select the current article, or, if that one's read already, the next
4985 unread article (@code{gnus-summary-next-page}).
4986
4987 If you have an article window open already and you press @kbd{SPACE}
4988 again, the article will be scrolled.  This lets you conveniently
4989 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
4990
4991 @item G n
4992 @itemx n
4993 @kindex n (Summary)
4994 @kindex G n (Summary)
4995 @findex gnus-summary-next-unread-article
4996 @c @icon{gnus-summary-next-unread}
4997 Go to next unread article (@code{gnus-summary-next-unread-article}).
4998
4999 @item G p
5000 @itemx p
5001 @kindex p (Summary)
5002 @findex gnus-summary-prev-unread-article
5003 @c @icon{gnus-summary-prev-unread}
5004 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
5005
5006 @item G N
5007 @itemx N
5008 @kindex N (Summary)
5009 @kindex G N (Summary)
5010 @findex gnus-summary-next-article
5011 Go to the next article (@code{gnus-summary-next-article}).
5012
5013 @item G P
5014 @itemx P
5015 @kindex P (Summary)
5016 @kindex G P (Summary)
5017 @findex gnus-summary-prev-article
5018 Go to the previous article (@code{gnus-summary-prev-article}).
5019
5020 @item G C-n
5021 @kindex G C-n (Summary)
5022 @findex gnus-summary-next-same-subject
5023 Go to the next article with the same subject
5024 (@code{gnus-summary-next-same-subject}).
5025
5026 @item G C-p
5027 @kindex G C-p (Summary)
5028 @findex gnus-summary-prev-same-subject
5029 Go to the previous article with the same subject
5030 (@code{gnus-summary-prev-same-subject}).
5031
5032 @item G f
5033 @itemx .
5034 @kindex G f  (Summary)
5035 @kindex .  (Summary)
5036 @findex gnus-summary-first-unread-article
5037 Go to the first unread article
5038 (@code{gnus-summary-first-unread-article}).
5039
5040 @item G b
5041 @itemx ,
5042 @kindex G b (Summary)
5043 @kindex , (Summary)
5044 @findex gnus-summary-best-unread-article
5045 Go to the unread article with the highest score
5046 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
5047 go to the first unread article that has a score over the default score.
5048
5049 @item G l
5050 @itemx l
5051 @kindex l (Summary)
5052 @kindex G l (Summary)
5053 @findex gnus-summary-goto-last-article
5054 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5055
5056 @item G o
5057 @kindex G o (Summary)
5058 @findex gnus-summary-pop-article
5059 @cindex history
5060 @cindex article history
5061 Pop an article off the summary history and go to this article
5062 (@code{gnus-summary-pop-article}).  This command differs from the
5063 command above in that you can pop as many previous articles off the
5064 history as you like, while @kbd{l} toggles the two last read articles.
5065 For a somewhat related issue (if you use these commands a lot),
5066 @pxref{Article Backlog}.
5067
5068 @item G j
5069 @itemx j
5070 @kindex j (Summary)
5071 @kindex G j (Summary)
5072 @findex gnus-summary-goto-article
5073 Ask for an article number or @code{Message-ID}, and then go to that
5074 article (@code{gnus-summary-goto-article}).
5075
5076 @end table
5077
5078
5079 @node Choosing Variables
5080 @subsection Choosing Variables
5081
5082 Some variables relevant for moving and selecting articles:
5083
5084 @table @code
5085 @item gnus-auto-extend-newsgroup
5086 @vindex gnus-auto-extend-newsgroup
5087 All the movement commands will try to go to the previous (or next)
5088 article, even if that article isn't displayed in the Summary buffer if
5089 this variable is non-@code{nil}.  Gnus will then fetch the article from
5090 the server and display it in the article buffer.
5091
5092 @item gnus-select-article-hook
5093 @vindex gnus-select-article-hook
5094 This hook is called whenever an article is selected.  By default it
5095 exposes any threads hidden under the selected article.  If you would
5096 like each article to be saved in the Agent as you read it, putting
5097 @code{gnus-agent-fetch-selected-article} on this hook will do so.
5098
5099 @item gnus-mark-article-hook
5100 @vindex gnus-mark-article-hook
5101 @findex gnus-summary-mark-unread-as-read
5102 @findex gnus-summary-mark-read-and-unread-as-read
5103 @findex gnus-unread-mark
5104 This hook is called whenever an article is selected.  It is intended to
5105 be used for marking articles as read.  The default value is
5106 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5107 mark of almost any article you read to @code{gnus-unread-mark}.  The
5108 only articles not affected by this function are ticked, dormant, and
5109 expirable articles.  If you'd instead like to just have unread articles
5110 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5111 instead.  It will leave marks like @code{gnus-low-score-mark},
5112 @code{gnus-del-mark} (and so on) alone.
5113
5114 @end table
5115
5116
5117 @node Paging the Article
5118 @section Scrolling the Article
5119 @cindex article scrolling
5120
5121 @table @kbd
5122
5123 @item SPACE
5124 @kindex SPACE (Summary)
5125 @findex gnus-summary-next-page
5126 Pressing @kbd{SPACE} will scroll the current article forward one page,
5127 or, if you have come to the end of the current article, will choose the
5128 next article (@code{gnus-summary-next-page}).
5129
5130 @vindex gnus-article-boring-faces
5131 @vindex gnus-article-skip-boring
5132 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5133 the article consists only of citations and signature, then it will be
5134 skipped; the next article will be shown instead.  You can customize
5135 what is considered uninteresting with
5136 @code{gnus-article-boring-faces}.  You can manually view the article's
5137 pages, no matter how boring, using @kbd{C-M-v}.
5138
5139 @item DEL
5140 @kindex DEL (Summary)
5141 @findex gnus-summary-prev-page
5142 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5143
5144 @item RET
5145 @kindex RET (Summary)
5146 @findex gnus-summary-scroll-up
5147 Scroll the current article one line forward
5148 (@code{gnus-summary-scroll-up}).
5149
5150 @item M-RET
5151 @kindex M-RET (Summary)
5152 @findex gnus-summary-scroll-down
5153 Scroll the current article one line backward
5154 (@code{gnus-summary-scroll-down}).
5155
5156 @item A g
5157 @itemx g
5158 @kindex A g (Summary)
5159 @kindex g (Summary)
5160 @findex gnus-summary-show-article
5161 @vindex gnus-summary-show-article-charset-alist
5162 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5163 given a prefix, fetch the current article, but don't run any of the
5164 article treatment functions.  This will give you a ``raw'' article, just
5165 the way it came from the server.
5166
5167 If given a numerical prefix, you can do semi-manual charset stuff.
5168 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5169 encoded in the @code{cn-gb-2312} charset.  If you have
5170
5171 @lisp
5172 (setq gnus-summary-show-article-charset-alist
5173       '((1 . cn-gb-2312)
5174         (2 . big5)))
5175 @end lisp
5176
5177 then you can say @kbd{C-u 1 g} to get the same effect.
5178
5179 @item A <
5180 @itemx <
5181 @kindex < (Summary)
5182 @kindex A < (Summary)
5183 @findex gnus-summary-beginning-of-article
5184 Scroll to the beginning of the article
5185 (@code{gnus-summary-beginning-of-article}).
5186
5187 @item A >
5188 @itemx >
5189 @kindex > (Summary)
5190 @kindex A > (Summary)
5191 @findex gnus-summary-end-of-article
5192 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5193
5194 @item A s
5195 @itemx s
5196 @kindex A s (Summary)
5197 @kindex s (Summary)
5198 @findex gnus-summary-isearch-article
5199 Perform an isearch in the article buffer
5200 (@code{gnus-summary-isearch-article}).
5201
5202 @item h
5203 @kindex h (Summary)
5204 @findex gnus-summary-select-article-buffer
5205 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5206
5207 @end table
5208
5209
5210 @node Reply Followup and Post
5211 @section Reply, Followup and Post
5212
5213 @menu
5214 * Summary Mail Commands::       Sending mail.
5215 * Summary Post Commands::       Sending news.
5216 * Summary Message Commands::    Other Message-related commands.
5217 * Canceling and Superseding::
5218 @end menu
5219
5220
5221 @node Summary Mail Commands
5222 @subsection Summary Mail Commands
5223 @cindex mail
5224 @cindex composing mail
5225
5226 Commands for composing a mail message:
5227
5228 @table @kbd
5229
5230 @item S r
5231 @itemx r
5232 @kindex S r (Summary)
5233 @kindex r (Summary)
5234 @findex gnus-summary-reply
5235 @c @icon{gnus-summary-mail-reply}
5236 @c @icon{gnus-summary-reply}
5237 Mail a reply to the author of the current article
5238 (@code{gnus-summary-reply}).
5239
5240 @item S R
5241 @itemx R
5242 @kindex R (Summary)
5243 @kindex S R (Summary)
5244 @findex gnus-summary-reply-with-original
5245 @c @icon{gnus-summary-reply-with-original}
5246 Mail a reply to the author of the current article and include the
5247 original message (@code{gnus-summary-reply-with-original}).  This
5248 command uses the process/prefix convention.
5249
5250 @item S w
5251 @kindex S w (Summary)
5252 @findex gnus-summary-wide-reply
5253 Mail a wide reply to the author of the current article
5254 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5255 goes out to all people listed in the @code{To}, @code{From} (or
5256 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
5257 present, that's used instead.
5258
5259 @item S W
5260 @kindex S W (Summary)
5261 @findex gnus-summary-wide-reply-with-original
5262 Mail a wide reply to the current article and include the original
5263 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5264 the process/prefix convention.
5265
5266 @item S v
5267 @kindex S v (Summary)
5268 @findex gnus-summary-very-wide-reply
5269 Mail a very wide reply to the author of the current article
5270 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5271 that goes out to all people listed in the @code{To}, @code{From} (or
5272 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5273 articles.  This command uses the process/prefix convention.
5274
5275 @item S V
5276 @kindex S V (Summary)
5277 @findex gnus-summary-very-wide-reply-with-original
5278 Mail a very wide reply to the author of the current article and include the
5279 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5280 command uses the process/prefix convention.
5281
5282 @item S B r
5283 @kindex S B r (Summary)
5284 @findex gnus-summary-reply-broken-reply-to
5285 Mail a reply to the author of the current article but ignore the
5286 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5287 If you need this because a mailing list incorrectly sets a
5288 @code{Reply-To} header pointing to the list, you probably want to set
5289 the @code{broken-reply-to} group parameter instead, so things will work
5290 correctly.  @xref{Group Parameters}.
5291
5292 @item S B R
5293 @kindex S B R (Summary)
5294 @findex gnus-summary-reply-broken-reply-to-with-original
5295 Mail a reply to the author of the current article and include the
5296 original message but ignore the @code{Reply-To} field
5297 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5298
5299 @item S o m
5300 @itemx C-c C-f
5301 @kindex S o m (Summary)
5302 @kindex C-c C-f (Summary)
5303 @findex gnus-summary-mail-forward
5304 @c @icon{gnus-summary-mail-forward}
5305 Forward the current article to some other person
5306 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
5307 is forwarded according to the value of (@code{message-forward-as-mime})
5308 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
5309 message and forward directly inline; if the prefix is 2, forward message
5310 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5311 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5312 directly inline; otherwise, the message is forwarded as no prefix given
5313 but use the flipped value of (@code{message-forward-as-mime}).  By
5314 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
5315 section.
5316
5317 @item S m
5318 @itemx m
5319 @kindex m (Summary)
5320 @kindex S m (Summary)
5321 @findex gnus-summary-mail-other-window
5322 @c @icon{gnus-summary-mail-originate}
5323 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5324 the posting style of the current group.  If given a prefix, disable that.
5325 If the prefix is 1, prompt for a group name to find the posting style.
5326
5327 @item S i
5328 @itemx i
5329 @kindex i (Summary)
5330 @kindex S i (Summary)
5331 @findex gnus-summary-news-other-window
5332 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5333 post to the current group.  If given a prefix, disable that.  If the
5334 prefix is 1, prompt for a group to post to.
5335
5336 This function actually prepares a news even when using mail groups.
5337 This is useful for ``posting'' messages to mail groups without actually
5338 sending them over the network: they're just saved directly to the group
5339 in question.  The corresponding back end must have a request-post method
5340 for this to work though.
5341
5342 @item S D b
5343 @kindex S D b (Summary)
5344 @findex gnus-summary-resend-bounced-mail
5345 @cindex bouncing mail
5346 If you have sent a mail, but the mail was bounced back to you for some
5347 reason (wrong address, transient failure), you can use this command to
5348 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5349 will be popped into a mail buffer where you can edit the headers before
5350 sending the mail off again.  If you give a prefix to this command, and
5351 the bounced mail is a reply to some other mail, Gnus will try to fetch
5352 that mail and display it for easy perusal of its headers.  This might
5353 very well fail, though.
5354
5355 @item S D r
5356 @kindex S D r (Summary)
5357 @findex gnus-summary-resend-message
5358 Not to be confused with the previous command,
5359 @code{gnus-summary-resend-message} will prompt you for an address to
5360 send the current message off to, and then send it to that place.  The
5361 headers of the message won't be altered---but lots of headers that say
5362 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5363 means that you actually send a mail to someone that has a @code{To}
5364 header that (probably) points to yourself.  This will confuse people.
5365 So, natcherly you'll only do that if you're really eVIl.
5366
5367 This command is mainly used if you have several accounts and want to
5368 ship a mail to a different account of yours.  (If you're both
5369 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5370 to the @code{root} account, you may want to resend it to
5371 @code{postmaster}.  Ordnung muss sein!
5372
5373 This command understands the process/prefix convention
5374 (@pxref{Process/Prefix}).
5375
5376 @item S O m
5377 @kindex S O m (Summary)
5378 @findex gnus-uu-digest-mail-forward
5379 Digest the current series (@pxref{Decoding Articles}) and forward the
5380 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
5381 uses the process/prefix convention (@pxref{Process/Prefix}).
5382
5383 @item S M-c
5384 @kindex S M-c (Summary)
5385 @findex gnus-summary-mail-crosspost-complaint
5386 @cindex crossposting
5387 @cindex excessive crossposting
5388 Send a complaint about excessive crossposting to the author of the
5389 current article (@code{gnus-summary-mail-crosspost-complaint}).
5390
5391 @findex gnus-crosspost-complaint
5392 This command is provided as a way to fight back against the current
5393 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5394 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5395 command understands the process/prefix convention
5396 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5397
5398 @end table
5399
5400 Also @xref{Header Commands, ,Header Commands, message, The Message
5401 Manual}, for more information.
5402
5403
5404 @node Summary Post Commands
5405 @subsection Summary Post Commands
5406 @cindex post
5407 @cindex composing news
5408
5409 Commands for posting a news article:
5410
5411 @table @kbd
5412 @item S p
5413 @itemx a
5414 @kindex a (Summary)
5415 @kindex S p (Summary)
5416 @findex gnus-summary-post-news
5417 @c @icon{gnus-summary-post-news}
5418 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5419 default, post to the current group.  If given a prefix, disable that.
5420 If the prefix is 1, prompt for another group instead.
5421
5422 @item S f
5423 @itemx f
5424 @kindex f (Summary)
5425 @kindex S f (Summary)
5426 @findex gnus-summary-followup
5427 @c @icon{gnus-summary-followup}
5428 Post a followup to the current article (@code{gnus-summary-followup}).
5429
5430 @item S F
5431 @itemx F
5432 @kindex S F (Summary)
5433 @kindex F (Summary)
5434 @c @icon{gnus-summary-followup-with-original}
5435 @findex gnus-summary-followup-with-original
5436 Post a followup to the current article and include the original message
5437 (@code{gnus-summary-followup-with-original}).  This command uses the
5438 process/prefix convention.
5439
5440 @item S n
5441 @kindex S n (Summary)
5442 @findex gnus-summary-followup-to-mail
5443 Post a followup to the current article via news, even if you got the
5444 message through mail (@code{gnus-summary-followup-to-mail}).
5445
5446 @item S N
5447 @kindex S N (Summary)
5448 @findex gnus-summary-followup-to-mail-with-original
5449 Post a followup to the current article via news, even if you got the
5450 message through mail and include the original message
5451 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5452 the process/prefix convention.
5453
5454 @item S o p
5455 @kindex S o p (Summary)
5456 @findex gnus-summary-post-forward
5457 Forward the current article to a newsgroup
5458 (@code{gnus-summary-post-forward}).
5459  If no prefix is given, the message is forwarded according to the value
5460 of (@code{message-forward-as-mime}) and
5461 (@code{message-forward-show-mml}); if the prefix is 1, decode the
5462 message and forward directly inline; if the prefix is 2, forward message
5463 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5464 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5465 directly inline; otherwise, the message is forwarded as no prefix given
5466 but use the flipped value of (@code{message-forward-as-mime}).  By
5467 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
5468
5469 @item S O p
5470 @kindex S O p (Summary)
5471 @findex gnus-uu-digest-post-forward
5472 @cindex digests
5473 @cindex making digests
5474 Digest the current series and forward the result to a newsgroup
5475 (@code{gnus-uu-digest-mail-forward}).  This command uses the
5476 process/prefix convention.
5477
5478 @item S u
5479 @kindex S u (Summary)
5480 @findex gnus-uu-post-news
5481 @c @icon{gnus-uu-post-news}
5482 Uuencode a file, split it into parts, and post it as a series
5483 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5484 @end table
5485
5486 Also @xref{Header Commands, ,Header Commands, message, The Message
5487 Manual}, for more information.
5488
5489
5490 @node Summary Message Commands
5491 @subsection Summary Message Commands
5492
5493 @table @kbd
5494 @item S y
5495 @kindex S y (Summary)
5496 @findex gnus-summary-yank-message
5497 Yank the current article into an already existing Message composition
5498 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5499 what message buffer you want to yank into, and understands the
5500 process/prefix convention (@pxref{Process/Prefix}).
5501
5502 @end table
5503
5504
5505 @node Canceling and Superseding
5506 @subsection Canceling Articles
5507 @cindex canceling articles
5508 @cindex superseding articles
5509
5510 Have you ever written something, and then decided that you really,
5511 really, really wish you hadn't posted that?
5512
5513 Well, you can't cancel mail, but you can cancel posts.
5514
5515 @findex gnus-summary-cancel-article
5516 @kindex C (Summary)
5517 @c @icon{gnus-summary-cancel-article}
5518 Find the article you wish to cancel (you can only cancel your own
5519 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5520 c} (@code{gnus-summary-cancel-article}).  Your article will be
5521 canceled---machines all over the world will be deleting your article.
5522 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5523
5524 Be aware, however, that not all sites honor cancels, so your article may
5525 live on here and there, while most sites will delete the article in
5526 question.
5527
5528 Gnus will use the ``current'' select method when canceling.  If you
5529 want to use the standard posting method, use the @samp{a} symbolic
5530 prefix (@pxref{Symbolic Prefixes}).
5531
5532 If you discover that you have made some mistakes and want to do some
5533 corrections, you can post a @dfn{superseding} article that will replace
5534 your original article.
5535
5536 @findex gnus-summary-supersede-article
5537 @kindex S (Summary)
5538 Go to the original article and press @kbd{S s}
5539 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5540 where you can edit the article all you want before sending it off the
5541 usual way.
5542
5543 The same goes for superseding as for canceling, only more so: Some
5544 sites do not honor superseding.  On those sites, it will appear that you
5545 have posted almost the same article twice.
5546
5547 If you have just posted the article, and change your mind right away,
5548 there is a trick you can use to cancel/supersede the article without
5549 waiting for the article to appear on your site first.  You simply return
5550 to the post buffer (which is called @code{*sent ...*}).  There you will
5551 find the article you just posted, with all the headers intact.  Change
5552 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5553 header by substituting one of those words for the word
5554 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5555 you would do normally.  The previous article will be
5556 canceled/superseded.
5557
5558 Just remember, kids: There is no 'c' in 'supersede'.
5559
5560 @node Delayed Articles
5561 @section Delayed Articles
5562 @cindex delayed sending
5563 @cindex send delayed
5564
5565 Sometimes, you might wish to delay the sending of a message.  For
5566 example, you might wish to arrange for a message to turn up just in time
5567 to remind your about the birthday of your Significant Other.  For this,
5568 there is the @code{gnus-delay} package.  Setup is simple:
5569
5570 @lisp
5571 (gnus-delay-initialize)
5572 @end lisp
5573
5574 @findex gnus-delay-article
5575 Normally, to send a message you use the @kbd{C-c C-c} command from
5576 Message mode.  To delay a message, use @kbd{C-c C-j}
5577 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5578 message should be delayed.  Possible answers are:
5579
5580 @itemize @bullet
5581 @item
5582 A time span.  Consists of an integer and a letter.  For example,
5583 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5584 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5585 (months) and @code{Y} (years).
5586
5587 @item
5588 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
5589 delayed until that day, at a specific time (eight o'clock by default).
5590 See also @code{gnus-delay-default-hour}.
5591
5592 @item
5593 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5594 stuff.  The deadline will be at that time today, except if that time has
5595 already passed, then it's at the given time tomorrow.  So if it's ten
5596 o'clock in the morning and you specify @code{11:15}, then the deadline
5597 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5598 that means a time tomorrow.
5599 @end itemize
5600
5601 The action of the @code{gnus-delay-article} command is influenced by a
5602 couple of variables:
5603
5604 @table @code
5605 @item gnus-delay-default-hour
5606 @vindex gnus-delay-default-hour
5607 When you specify a specific date, the message will be due on that hour
5608 on the given date.  Possible values are integers 0 through 23.
5609
5610 @item gnus-delay-default-delay
5611 @vindex gnus-delay-default-delay
5612 This is a string and gives the default delay.  It can be of any of the
5613 formats described above.
5614
5615 @item gnus-delay-group
5616 @vindex gnus-delay-group
5617 Delayed articles will be kept in this group on the drafts server until
5618 they are due.  You probably don't need to change this.  The default
5619 value is @code{"delayed"}.
5620
5621 @item gnus-delay-header
5622 @vindex gnus-delay-header
5623 The deadline for each article will be stored in a header.  This variable
5624 is a string and gives the header name.  You probably don't need to
5625 change this.  The default value is @code{"X-Gnus-Delayed"}.
5626 @end table
5627
5628 The way delaying works is like this: when you use the
5629 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5630 calculates the deadline of the message and stores it in the
5631 @code{X-Gnus-Delayed} header and puts the message in the
5632 @code{nndraft:delayed} group.
5633
5634 @findex gnus-delay-send-queue
5635 And whenever you get new news, Gnus looks through the group for articles
5636 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5637 function for this.  By default, this function is added to the hook
5638 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5639 Maybe you want to use the demon to send drafts?  Just tell the demon to
5640 execute the @code{gnus-delay-send-queue} function.
5641
5642 @table @code
5643 @item gnus-delay-initialize
5644 @findex gnus-delay-initialize
5645 By default, this function installs @code{gnus-delay-send-queue} in
5646 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5647 argument @code{no-check}.  If it is non-@code{nil},
5648 @code{gnus-get-new-news-hook} is not changed.  The optional first
5649 argument is ignored.
5650
5651 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5652 Presumably, you want to use the demon for sending due delayed articles.
5653 Just don't forget to set that up :-)
5654 @end table
5655
5656
5657 @node Marking Articles
5658 @section Marking Articles
5659 @cindex article marking
5660 @cindex article ticking
5661 @cindex marks
5662
5663 There are several marks you can set on an article.
5664
5665 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5666 neologism ohoy!) of the article.  Alphabetic marks generally mean
5667 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5668
5669 In addition, you also have marks that do not affect readedness.
5670
5671 @menu
5672 * Unread Articles::             Marks for unread articles.
5673 * Read Articles::               Marks for read articles.
5674 * Other Marks::                 Marks that do not affect readedness.
5675 @end menu
5676
5677 @ifinfo
5678 There's a plethora of commands for manipulating these marks:
5679 @end ifinfo
5680
5681 @menu
5682 * Setting Marks::             How to set and remove marks.
5683 * Generic Marking Commands::  How to customize the marking.
5684 * Setting Process Marks::     How to mark articles for later processing.
5685 @end menu
5686
5687
5688 @node Unread Articles
5689 @subsection Unread Articles
5690
5691 The following marks mark articles as (kinda) unread, in one form or
5692 other.
5693
5694 @table @samp
5695 @item !
5696 @vindex gnus-ticked-mark
5697 Marked as ticked (@code{gnus-ticked-mark}).
5698
5699 @dfn{Ticked articles} are articles that will remain visible always.  If
5700 you see an article that you find interesting, or you want to put off
5701 reading it, or replying to it, until sometime later, you'd typically
5702 tick it.  However, articles can be expired (from news servers by the
5703 news server software, Gnus itself never expires ticked messages), so if
5704 you want to keep an article forever, you'll have to make it persistent
5705 (@pxref{Persistent Articles}).
5706
5707 @item ?
5708 @vindex gnus-dormant-mark
5709 Marked as dormant (@code{gnus-dormant-mark}).
5710
5711 @dfn{Dormant articles} will only appear in the summary buffer if there
5712 are followups to it.  If you want to see them even if they don't have
5713 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5714 Otherwise (except for the visibility issue), they are just like ticked
5715 messages.
5716
5717 @item SPACE
5718 @vindex gnus-unread-mark
5719 Marked as unread (@code{gnus-unread-mark}).
5720
5721 @dfn{Unread articles} are articles that haven't been read at all yet.
5722 @end table
5723
5724
5725 @node Read Articles
5726 @subsection Read Articles
5727 @cindex expirable mark
5728
5729 All the following marks mark articles as read.
5730
5731 @table @samp
5732
5733 @item r
5734 @vindex gnus-del-mark
5735 These are articles that the user has marked as read with the @kbd{d}
5736 command manually, more or less (@code{gnus-del-mark}).
5737
5738 @item R
5739 @vindex gnus-read-mark
5740 Articles that have actually been read (@code{gnus-read-mark}).
5741
5742 @item O
5743 @vindex gnus-ancient-mark
5744 Articles that were marked as read in previous sessions and are now
5745 @dfn{old} (@code{gnus-ancient-mark}).
5746
5747 @item K
5748 @vindex gnus-killed-mark
5749 Marked as killed (@code{gnus-killed-mark}).
5750
5751 @item X
5752 @vindex gnus-kill-file-mark
5753 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5754
5755 @item Y
5756 @vindex gnus-low-score-mark
5757 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5758
5759 @item C
5760 @vindex gnus-catchup-mark
5761 Marked as read by a catchup (@code{gnus-catchup-mark}).
5762
5763 @item G
5764 @vindex gnus-canceled-mark
5765 Canceled article (@code{gnus-canceled-mark})
5766
5767 @item F
5768 @vindex gnus-souped-mark
5769 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5770
5771 @item Q
5772 @vindex gnus-sparse-mark
5773 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5774 Threading}.
5775
5776 @item M
5777 @vindex gnus-duplicate-mark
5778 Article marked as read by duplicate suppression
5779 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5780
5781 @end table
5782
5783 All these marks just mean that the article is marked as read, really.
5784 They are interpreted differently when doing adaptive scoring, though.
5785
5786 One more special mark, though:
5787
5788 @table @samp
5789 @item E
5790 @vindex gnus-expirable-mark
5791 Marked as expirable (@code{gnus-expirable-mark}).
5792
5793 Marking articles as @dfn{expirable} (or have them marked as such
5794 automatically) doesn't make much sense in normal groups---a user doesn't
5795 control expiring of news articles, but in mail groups, for instance,
5796 articles marked as @dfn{expirable} can be deleted by Gnus at
5797 any time.
5798 @end table
5799
5800
5801 @node Other Marks
5802 @subsection Other Marks
5803 @cindex process mark
5804 @cindex bookmarks
5805
5806 There are some marks that have nothing to do with whether the article is
5807 read or not.
5808
5809 @itemize @bullet
5810
5811 @item
5812 You can set a bookmark in the current article.  Say you are reading a
5813 long thesis on cats' urinary tracts, and have to go home for dinner
5814 before you've finished reading the thesis.  You can then set a bookmark
5815 in the article, and Gnus will jump to this bookmark the next time it
5816 encounters the article.  @xref{Setting Marks}.
5817
5818 @item
5819 @vindex gnus-replied-mark
5820 All articles that you have replied to or made a followup to (i.e., have
5821 answered) will be marked with an @samp{A} in the second column
5822 (@code{gnus-replied-mark}).
5823
5824 @item
5825 @vindex gnus-forwarded-mark
5826 All articles that you have forwarded will be marked with an @samp{F} in
5827 the second column (@code{gnus-forwarded-mark}).
5828
5829 @item
5830 @vindex gnus-cached-mark
5831 Articles stored in the article cache will be marked with an @samp{*} in
5832 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5833
5834 @item
5835 @vindex gnus-saved-mark
5836 Articles ``saved'' (in some manner or other; not necessarily
5837 religiously) are marked with an @samp{S} in the second column
5838 (@code{gnus-saved-mark}).
5839
5840 @item
5841 @vindex gnus-recent-mark
5842 Articles that according to the server haven't been shown to the user
5843 before are marked with a @samp{N} in the second column
5844 (@code{gnus-recent-mark}).  Note that not all servers support this
5845 mark, in which case it simply never appears.  Compare with
5846 @code{gnus-unseen-mark}.
5847
5848 @item
5849 @vindex gnus-unseen-mark
5850 Articles that haven't been seen before in Gnus by the user are marked
5851 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5852 Compare with @code{gnus-recent-mark}.
5853
5854 @item
5855 @vindex gnus-downloaded-mark
5856 When using the Gnus agent (@pxref{Agent Basics}), articles may be
5857 downloaded for unplugged (offline) viewing.  If you are using the
5858 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5859 (The variable @code{gnus-downloaded-mark} controls which character to
5860 use.)
5861
5862 @item
5863 @vindex gnus-undownloaded-mark
5864 When using the Gnus agent (@pxref{Agent Basics}), some articles might
5865 not have been downloaded.  Such articles cannot be viewed while you
5866 are unplugged (offline).  If you are using the @samp{%O} spec, these
5867 articles get the @samp{-} mark in that spec.  (The variable
5868 @code{gnus-undownloaded-mark} controls which character to use.)
5869
5870 @item
5871 @vindex gnus-downloadable-mark
5872 The Gnus agent (@pxref{Agent Basics}) downloads some articles
5873 automatically, but it is also possible to explicitly mark articles for
5874 download, even if they would not be downloaded automatically.  Such
5875 explicitly-marked articles get the @samp{%} mark in the first column.
5876 (The variable @code{gnus-downloadable-mark} controls which character to
5877 use.)
5878
5879 @item
5880 @vindex gnus-not-empty-thread-mark
5881 @vindex gnus-empty-thread-mark
5882 If the @samp{%e} spec is used, the presence of threads or not will be
5883 marked with @code{gnus-not-empty-thread-mark} and
5884 @code{gnus-empty-thread-mark} in the third column, respectively.
5885
5886 @item
5887 @vindex gnus-process-mark
5888 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5889 variety of commands react to the presence of the process mark.  For
5890 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5891 all articles that have been marked with the process mark.  Articles
5892 marked with the process mark have a @samp{#} in the second column.
5893
5894 @end itemize
5895
5896 You might have noticed that most of these ``non-readedness'' marks
5897 appear in the second column by default.  So if you have a cached, saved,
5898 replied article that you have process-marked, what will that look like?
5899
5900 Nothing much.  The precedence rules go as follows: process -> cache ->
5901 replied -> saved.  So if the article is in the cache and is replied,
5902 you'll only see the cache mark and not the replied mark.
5903
5904
5905 @node Setting Marks
5906 @subsection Setting Marks
5907 @cindex setting marks
5908
5909 All the marking commands understand the numeric prefix.
5910
5911 @table @kbd
5912 @item M c
5913 @itemx M-u
5914 @kindex M c (Summary)
5915 @kindex M-u (Summary)
5916 @findex gnus-summary-clear-mark-forward
5917 @cindex mark as unread
5918 Clear all readedness-marks from the current article
5919 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5920 article as unread.
5921
5922 @item M t
5923 @itemx !
5924 @kindex ! (Summary)
5925 @kindex M t (Summary)
5926 @findex gnus-summary-tick-article-forward
5927 Tick the current article (@code{gnus-summary-tick-article-forward}).
5928 @xref{Article Caching}.
5929
5930 @item M ?
5931 @itemx ?
5932 @kindex ? (Summary)
5933 @kindex M ? (Summary)
5934 @findex gnus-summary-mark-as-dormant
5935 Mark the current article as dormant
5936 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5937
5938 @item M d
5939 @itemx d
5940 @kindex M d (Summary)
5941 @kindex d (Summary)
5942 @findex gnus-summary-mark-as-read-forward
5943 Mark the current article as read
5944 (@code{gnus-summary-mark-as-read-forward}).
5945
5946 @item D
5947 @kindex D (Summary)
5948 @findex gnus-summary-mark-as-read-backward
5949 Mark the current article as read and move point to the previous line
5950 (@code{gnus-summary-mark-as-read-backward}).
5951
5952 @item M k
5953 @itemx k
5954 @kindex k (Summary)
5955 @kindex M k (Summary)
5956 @findex gnus-summary-kill-same-subject-and-select
5957 Mark all articles that have the same subject as the current one as read,
5958 and then select the next unread article
5959 (@code{gnus-summary-kill-same-subject-and-select}).
5960
5961 @item M K
5962 @itemx C-k
5963 @kindex M K (Summary)
5964 @kindex C-k (Summary)
5965 @findex gnus-summary-kill-same-subject
5966 Mark all articles that have the same subject as the current one as read
5967 (@code{gnus-summary-kill-same-subject}).
5968
5969 @item M C
5970 @kindex M C (Summary)
5971 @findex gnus-summary-catchup
5972 @c @icon{gnus-summary-catchup}
5973 Mark all unread articles as read (@code{gnus-summary-catchup}).
5974
5975 @item M C-c
5976 @kindex M C-c (Summary)
5977 @findex gnus-summary-catchup-all
5978 Mark all articles in the group as read---even the ticked and dormant
5979 articles (@code{gnus-summary-catchup-all}).
5980
5981 @item M H
5982 @kindex M H (Summary)
5983 @findex gnus-summary-catchup-to-here
5984 Catchup the current group to point (before the point)
5985 (@code{gnus-summary-catchup-to-here}).
5986
5987 @item M h
5988 @kindex M h (Summary)
5989 @findex gnus-summary-catchup-from-here
5990 Catchup the current group from point (after the point)
5991 (@code{gnus-summary-catchup-from-here}).
5992
5993 @item C-w
5994 @kindex C-w (Summary)
5995 @findex gnus-summary-mark-region-as-read
5996 Mark all articles between point and mark as read
5997 (@code{gnus-summary-mark-region-as-read}).
5998
5999 @item M V k
6000 @kindex M V k (Summary)
6001 @findex gnus-summary-kill-below
6002 Kill all articles with scores below the default score (or below the
6003 numeric prefix) (@code{gnus-summary-kill-below}).
6004
6005 @item M e
6006 @itemx E
6007 @kindex M e (Summary)
6008 @kindex E (Summary)
6009 @findex gnus-summary-mark-as-expirable
6010 Mark the current article as expirable
6011 (@code{gnus-summary-mark-as-expirable}).
6012
6013 @item M b
6014 @kindex M b (Summary)
6015 @findex gnus-summary-set-bookmark
6016 Set a bookmark in the current article
6017 (@code{gnus-summary-set-bookmark}).
6018
6019 @item M B
6020 @kindex M B (Summary)
6021 @findex gnus-summary-remove-bookmark
6022 Remove the bookmark from the current article
6023 (@code{gnus-summary-remove-bookmark}).
6024
6025 @item M V c
6026 @kindex M V c (Summary)
6027 @findex gnus-summary-clear-above
6028 Clear all marks from articles with scores over the default score (or
6029 over the numeric prefix) (@code{gnus-summary-clear-above}).
6030
6031 @item M V u
6032 @kindex M V u (Summary)
6033 @findex gnus-summary-tick-above
6034 Tick all articles with scores over the default score (or over the
6035 numeric prefix) (@code{gnus-summary-tick-above}).
6036
6037 @item M V m
6038 @kindex M V m (Summary)
6039 @findex gnus-summary-mark-above
6040 Prompt for a mark, and mark all articles with scores over the default
6041 score (or over the numeric prefix) with this mark
6042 (@code{gnus-summary-clear-above}).
6043 @end table
6044
6045 @vindex gnus-summary-goto-unread
6046 The @code{gnus-summary-goto-unread} variable controls what action should
6047 be taken after setting a mark.  If non-@code{nil}, point will move to
6048 the next/previous unread article.  If @code{nil}, point will just move
6049 one line up or down.  As a special case, if this variable is
6050 @code{never}, all the marking commands as well as other commands (like
6051 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6052 The default is @code{t}.
6053
6054
6055 @node Generic Marking Commands
6056 @subsection Generic Marking Commands
6057
6058 Some people would like the command that ticks an article (@kbd{!}) go to
6059 the next article.  Others would like it to go to the next unread
6060 article.  Yet others would like it to stay on the current article.  And
6061 even though I haven't heard of anybody wanting it to go to the
6062 previous (unread) article, I'm sure there are people that want that as
6063 well.
6064
6065 Multiply these five behaviors with five different marking commands, and
6066 you get a potentially complex set of variable to control what each
6067 command should do.
6068
6069 To sidestep that mess, Gnus provides commands that do all these
6070 different things.  They can be found on the @kbd{M M} map in the summary
6071 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6072 to list in this manual.
6073
6074 While you can use these commands directly, most users would prefer
6075 altering the summary mode keymap.  For instance, if you would like the
6076 @kbd{!} command to go to the next article instead of the next unread
6077 article, you could say something like:
6078
6079 @lisp
6080 @group
6081 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6082 (defun my-alter-summary-map ()
6083   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6084 @end group
6085 @end lisp
6086
6087 @noindent
6088 or
6089
6090 @lisp
6091 (defun my-alter-summary-map ()
6092   (local-set-key "!" "MM!n"))
6093 @end lisp
6094
6095
6096 @node Setting Process Marks
6097 @subsection Setting Process Marks
6098 @cindex setting process marks
6099
6100 Process marks are displayed as @code{#} in the summary buffer, and are
6101 used for marking articles in such a way that other commands will
6102 process these articles.  For instance, if you process mark four
6103 articles and then use the @kbd{*} command, Gnus will enter these four
6104 commands into the cache.  For more information,
6105 @pxref{Process/Prefix}.
6106
6107 @table @kbd
6108
6109 @item M P p
6110 @itemx #
6111 @kindex # (Summary)
6112 @kindex M P p (Summary)
6113 @findex gnus-summary-mark-as-processable
6114 Mark the current article with the process mark
6115 (@code{gnus-summary-mark-as-processable}).
6116 @findex gnus-summary-unmark-as-processable
6117
6118 @item M P u
6119 @itemx M-#
6120 @kindex M P u (Summary)
6121 @kindex M-# (Summary)
6122 Remove the process mark, if any, from the current article
6123 (@code{gnus-summary-unmark-as-processable}).
6124
6125 @item M P U
6126 @kindex M P U (Summary)
6127 @findex gnus-summary-unmark-all-processable
6128 Remove the process mark from all articles
6129 (@code{gnus-summary-unmark-all-processable}).
6130
6131 @item M P i
6132 @kindex M P i (Summary)
6133 @findex gnus-uu-invert-processable
6134 Invert the list of process marked articles
6135 (@code{gnus-uu-invert-processable}).
6136
6137 @item M P R
6138 @kindex M P R (Summary)
6139 @findex gnus-uu-mark-by-regexp
6140 Mark articles that have a @code{Subject} header that matches a regular
6141 expression (@code{gnus-uu-mark-by-regexp}).
6142
6143 @item M P G
6144 @kindex M P G (Summary)
6145 @findex gnus-uu-unmark-by-regexp
6146 Unmark articles that have a @code{Subject} header that matches a regular
6147 expression (@code{gnus-uu-unmark-by-regexp}).
6148
6149 @item M P r
6150 @kindex M P r (Summary)
6151 @findex gnus-uu-mark-region
6152 Mark articles in region (@code{gnus-uu-mark-region}).
6153
6154 @item M P g
6155 @kindex M P g
6156 @findex gnus-uu-unmark-region
6157 Unmark articles in region (@code{gnus-uu-unmark-region}).
6158
6159 @item M P t
6160 @kindex M P t (Summary)
6161 @findex gnus-uu-mark-thread
6162 Mark all articles in the current (sub)thread
6163 (@code{gnus-uu-mark-thread}).
6164
6165 @item M P T
6166 @kindex M P T (Summary)
6167 @findex gnus-uu-unmark-thread
6168 Unmark all articles in the current (sub)thread
6169 (@code{gnus-uu-unmark-thread}).
6170
6171 @item M P v
6172 @kindex M P v (Summary)
6173 @findex gnus-uu-mark-over
6174 Mark all articles that have a score above the prefix argument
6175 (@code{gnus-uu-mark-over}).
6176
6177 @item M P s
6178 @kindex M P s (Summary)
6179 @findex gnus-uu-mark-series
6180 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6181
6182 @item M P S
6183 @kindex M P S (Summary)
6184 @findex gnus-uu-mark-sparse
6185 Mark all series that have already had some articles marked
6186 (@code{gnus-uu-mark-sparse}).
6187
6188 @item M P a
6189 @kindex M P a (Summary)
6190 @findex gnus-uu-mark-all
6191 Mark all articles in series order (@code{gnus-uu-mark-series}).
6192
6193 @item M P b
6194 @kindex M P b (Summary)
6195 @findex gnus-uu-mark-buffer
6196 Mark all articles in the buffer in the order they appear
6197 (@code{gnus-uu-mark-buffer}).
6198
6199 @item M P k
6200 @kindex M P k (Summary)
6201 @findex gnus-summary-kill-process-mark
6202 Push the current process mark set onto the stack and unmark all articles
6203 (@code{gnus-summary-kill-process-mark}).
6204
6205 @item M P y
6206 @kindex M P y (Summary)
6207 @findex gnus-summary-yank-process-mark
6208 Pop the previous process mark set from the stack and restore it
6209 (@code{gnus-summary-yank-process-mark}).
6210
6211 @item M P w
6212 @kindex M P w (Summary)
6213 @findex gnus-summary-save-process-mark
6214 Push the current process mark set onto the stack
6215 (@code{gnus-summary-save-process-mark}).
6216
6217 @end table
6218
6219 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
6220 set process marks based on article body contents.
6221
6222
6223 @node Limiting
6224 @section Limiting
6225 @cindex limiting
6226
6227 It can be convenient to limit the summary buffer to just show some
6228 subset of the articles currently in the group.  The effect most limit
6229 commands have is to remove a few (or many) articles from the summary
6230 buffer.
6231
6232 All limiting commands work on subsets of the articles already fetched
6233 from the servers.  None of these commands query the server for
6234 additional articles.
6235
6236 @table @kbd
6237
6238 @item / /
6239 @itemx / s
6240 @kindex / / (Summary)
6241 @findex gnus-summary-limit-to-subject
6242 Limit the summary buffer to articles that match some subject
6243 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
6244 matching articles.
6245
6246 @item / a
6247 @kindex / a (Summary)
6248 @findex gnus-summary-limit-to-author
6249 Limit the summary buffer to articles that match some author
6250 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
6251 matching articles.
6252
6253 @item / x
6254 @kindex / x (Summary)
6255 @findex gnus-summary-limit-to-extra
6256 Limit the summary buffer to articles that match one of the ``extra''
6257 headers (@pxref{To From Newsgroups})
6258 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
6259 matching articles.
6260
6261 @item / u
6262 @itemx x
6263 @kindex / u (Summary)
6264 @kindex x (Summary)
6265 @findex gnus-summary-limit-to-unread
6266 Limit the summary buffer to articles not marked as read
6267 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6268 buffer to articles strictly unread.  This means that ticked and
6269 dormant articles will also be excluded.
6270
6271 @item / m
6272 @kindex / m (Summary)
6273 @findex gnus-summary-limit-to-marks
6274 Ask for a mark and then limit to all articles that have been marked
6275 with that mark (@code{gnus-summary-limit-to-marks}).
6276
6277 @item / t
6278 @kindex / t (Summary)
6279 @findex gnus-summary-limit-to-age
6280 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6281 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6282 articles younger than that number of days.
6283
6284 @item / n
6285 @kindex / n (Summary)
6286 @findex gnus-summary-limit-to-articles
6287 Limit the summary buffer to the current article
6288 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6289 convention (@pxref{Process/Prefix}).
6290
6291 @item / w
6292 @kindex / w (Summary)
6293 @findex gnus-summary-pop-limit
6294 Pop the previous limit off the stack and restore it
6295 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6296 the stack.
6297
6298 @item / .
6299 @kindex / . (Summary)
6300 @findex gnus-summary-limit-to-unseen
6301 Limit the summary buffer to the unseen articles
6302 (@code{gnus-summary-limit-to-unseen}).
6303
6304 @item / v
6305 @kindex / v (Summary)
6306 @findex gnus-summary-limit-to-score
6307 Limit the summary buffer to articles that have a score at or above some
6308 score (@code{gnus-summary-limit-to-score}).
6309
6310 @item / p
6311 @kindex / p (Summary)
6312 @findex gnus-summary-limit-to-display-predicate
6313 Limit the summary buffer to articles that satisfy the @code{display}
6314 group parameter predicate
6315 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
6316 Parameters}, for more on this predicate.
6317
6318 @item / E
6319 @itemx M S
6320 @kindex M S (Summary)
6321 @kindex / E (Summary)
6322 @findex gnus-summary-limit-include-expunged
6323 Include all expunged articles in the limit
6324 (@code{gnus-summary-limit-include-expunged}).
6325
6326 @item / D
6327 @kindex / D (Summary)
6328 @findex gnus-summary-limit-include-dormant
6329 Include all dormant articles in the limit
6330 (@code{gnus-summary-limit-include-dormant}).
6331
6332 @item / *
6333 @kindex / * (Summary)
6334 @findex gnus-summary-limit-include-cached
6335 Include all cached articles in the limit
6336 (@code{gnus-summary-limit-include-cached}).
6337
6338 @item / d
6339 @kindex / d (Summary)
6340 @findex gnus-summary-limit-exclude-dormant
6341 Exclude all dormant articles from the limit
6342 (@code{gnus-summary-limit-exclude-dormant}).
6343
6344 @item / M
6345 @kindex / M (Summary)
6346 @findex gnus-summary-limit-exclude-marks
6347 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6348
6349 @item / T
6350 @kindex / T (Summary)
6351 @findex gnus-summary-limit-include-thread
6352 Include all the articles in the current thread in the limit.
6353
6354 @item / c
6355 @kindex / c (Summary)
6356 @findex gnus-summary-limit-exclude-childless-dormant
6357 Exclude all dormant articles that have no children from the limit@*
6358 (@code{gnus-summary-limit-exclude-childless-dormant}).
6359
6360 @item / C
6361 @kindex / C (Summary)
6362 @findex gnus-summary-limit-mark-excluded-as-read
6363 Mark all excluded unread articles as read
6364 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
6365 also mark excluded ticked and dormant articles as read.
6366
6367 @item / N
6368 @kindex / N (Summary)
6369 @findex gnus-summary-insert-new-articles
6370 Insert all new articles in the summary buffer.  It scans for new emails
6371 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6372
6373 @item / o
6374 @kindex / o (Summary)
6375 @findex gnus-summary-insert-old-articles
6376 Insert all old articles in the summary buffer.  If given a numbered
6377 prefix, fetch this number of articles.
6378
6379 @end table
6380
6381
6382 @node Threading
6383 @section Threading
6384 @cindex threading
6385 @cindex article threading
6386
6387 Gnus threads articles by default.  @dfn{To thread} is to put responses
6388 to articles directly after the articles they respond to---in a
6389 hierarchical fashion.
6390
6391 Threading is done by looking at the @code{References} headers of the
6392 articles.  In a perfect world, this would be enough to build pretty
6393 trees, but unfortunately, the @code{References} header is often broken
6394 or simply missing.  Weird news propagation exacerbates the problem,
6395 so one has to employ other heuristics to get pleasing results.  A
6396 plethora of approaches exists, as detailed in horrible detail in
6397 @ref{Customizing Threading}.
6398
6399 First, a quick overview of the concepts:
6400
6401 @table @dfn
6402 @item root
6403 The top-most article in a thread; the first article in the thread.
6404
6405 @item thread
6406 A tree-like article structure.
6407
6408 @item sub-thread
6409 A small(er) section of this tree-like structure.
6410
6411 @item loose threads
6412 Threads often lose their roots due to article expiry, or due to the root
6413 already having been read in a previous session, and not displayed in the
6414 summary buffer.  We then typically have many sub-threads that really
6415 belong to one thread, but are without connecting roots.  These are
6416 called loose threads.
6417
6418 @item thread gathering
6419 An attempt to gather loose threads into bigger threads.
6420
6421 @item sparse threads
6422 A thread where the missing articles have been ``guessed'' at, and are
6423 displayed as empty lines in the summary buffer.
6424
6425 @end table
6426
6427
6428 @menu
6429 * Customizing Threading::       Variables you can change to affect the threading.
6430 * Thread Commands::             Thread based commands in the summary buffer.
6431 @end menu
6432
6433
6434 @node Customizing Threading
6435 @subsection Customizing Threading
6436 @cindex customizing threading
6437
6438 @menu
6439 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6440 * Filling In Threads::          Making the threads displayed look fuller.
6441 * More Threading::              Even more variables for fiddling with threads.
6442 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6443 @end menu
6444
6445
6446 @node Loose Threads
6447 @subsubsection Loose Threads
6448 @cindex <
6449 @cindex >
6450 @cindex loose threads
6451
6452 @table @code
6453 @item gnus-summary-make-false-root
6454 @vindex gnus-summary-make-false-root
6455 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
6456 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6457 Yup.)  Loose subtrees occur when the real root has expired, or you've
6458 read or killed the root in a previous session.
6459
6460 When there is no real root of a thread, Gnus will have to fudge
6461 something.  This variable says what fudging method Gnus should use.
6462 There are four possible values:
6463
6464 @iftex
6465 @iflatex
6466 \gnusfigure{The Summary Buffer}{390}{
6467 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6468 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6469 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6470 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6471 }
6472 @end iflatex
6473 @end iftex
6474
6475 @cindex adopting articles
6476
6477 @table @code
6478
6479 @item adopt
6480 Gnus will make the first of the orphaned articles the parent.  This
6481 parent will adopt all the other articles.  The adopted articles will be
6482 marked as such by pointy brackets (@samp{<>}) instead of the standard
6483 square brackets (@samp{[]}).  This is the default method.
6484
6485 @item dummy
6486 @vindex gnus-summary-dummy-line-format
6487 @vindex gnus-summary-make-false-root-always
6488 Gnus will create a dummy summary line that will pretend to be the
6489 parent.  This dummy line does not correspond to any real article, so
6490 selecting it will just select the first real article after the dummy
6491 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6492 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6493 which is the subject of the article.  @xref{Formatting Variables}.
6494 If you want all threads to have a dummy root, even the non-gathered
6495 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6496
6497 @item empty
6498 Gnus won't actually make any article the parent, but simply leave the
6499 subject field of all orphans except the first empty.  (Actually, it will
6500 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6501 Buffer Format}).)
6502
6503 @item none
6504 Don't make any article parent at all.  Just gather the threads and
6505 display them after one another.
6506
6507 @item nil
6508 Don't gather loose threads.
6509 @end table
6510
6511 @item gnus-summary-gather-subject-limit
6512 @vindex gnus-summary-gather-subject-limit
6513 Loose threads are gathered by comparing subjects of articles.  If this
6514 variable is @code{nil}, Gnus requires an exact match between the
6515 subjects of the loose threads before gathering them into one big
6516 super-thread.  This might be too strict a requirement, what with the
6517 presence of stupid newsreaders that chop off long subject lines.  If
6518 you think so, set this variable to, say, 20 to require that only the
6519 first 20 characters of the subjects have to match.  If you set this
6520 variable to a really low number, you'll find that Gnus will gather
6521 everything in sight into one thread, which isn't very helpful.
6522
6523 @cindex fuzzy article gathering
6524 If you set this variable to the special value @code{fuzzy}, Gnus will
6525 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6526 Matching}).
6527
6528 @item gnus-simplify-subject-fuzzy-regexp
6529 @vindex gnus-simplify-subject-fuzzy-regexp
6530 This can either be a regular expression or list of regular expressions
6531 that match strings that will be removed from subjects if fuzzy subject
6532 simplification is used.
6533
6534 @item gnus-simplify-ignored-prefixes
6535 @vindex gnus-simplify-ignored-prefixes
6536 If you set @code{gnus-summary-gather-subject-limit} to something as low
6537 as 10, you might consider setting this variable to something sensible:
6538
6539 @c Written by Michael Ernst <mernst@cs.rice.edu>
6540 @lisp
6541 (setq gnus-simplify-ignored-prefixes
6542       (concat
6543        "\\`\\[?\\("
6544        (mapconcat
6545         'identity
6546         '("looking"
6547           "wanted" "followup" "summary\\( of\\)?"
6548           "help" "query" "problem" "question"
6549           "answer" "reference" "announce"
6550           "How can I" "How to" "Comparison of"
6551           ;; ...
6552           )
6553         "\\|")
6554        "\\)\\s *\\("
6555        (mapconcat 'identity
6556                   '("for" "for reference" "with" "about")
6557                   "\\|")
6558        "\\)?\\]?:?[ \t]*"))
6559 @end lisp
6560
6561 All words that match this regexp will be removed before comparing two
6562 subjects.
6563
6564 @item gnus-simplify-subject-functions
6565 @vindex gnus-simplify-subject-functions
6566 If non-@code{nil}, this variable overrides
6567 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6568 list of functions to apply to the @code{Subject} string iteratively to
6569 arrive at the simplified version of the string.
6570
6571 Useful functions to put in this list include:
6572
6573 @table @code
6574 @item gnus-simplify-subject-re
6575 @findex gnus-simplify-subject-re
6576 Strip the leading @samp{Re:}.
6577
6578 @item gnus-simplify-subject-fuzzy
6579 @findex gnus-simplify-subject-fuzzy
6580 Simplify fuzzily.
6581
6582 @item gnus-simplify-whitespace
6583 @findex gnus-simplify-whitespace
6584 Remove excessive whitespace.
6585
6586 @item gnus-simplify-all-whitespace
6587 @findex gnus-simplify-all-whitespace
6588 Remove all whitespace.
6589 @end table
6590
6591 You may also write your own functions, of course.
6592
6593
6594 @item gnus-summary-gather-exclude-subject
6595 @vindex gnus-summary-gather-exclude-subject
6596 Since loose thread gathering is done on subjects only, that might lead
6597 to many false hits, especially with certain common subjects like
6598 @samp{} and @samp{(none)}.  To make the situation slightly better,
6599 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6600 what subjects should be excluded from the gathering process.@*
6601 The default is @samp{^ *$\\|^(none)$}.
6602
6603 @item gnus-summary-thread-gathering-function
6604 @vindex gnus-summary-thread-gathering-function
6605 Gnus gathers threads by looking at @code{Subject} headers.  This means
6606 that totally unrelated articles may end up in the same ``thread'', which
6607 is confusing.  An alternate approach is to look at all the
6608 @code{Message-ID}s in all the @code{References} headers to find matches.
6609 This will ensure that no gathered threads ever include unrelated
6610 articles, but it also means that people who have posted with broken
6611 newsreaders won't be gathered properly.  The choice is yours---plague or
6612 cholera:
6613
6614 @table @code
6615 @item gnus-gather-threads-by-subject
6616 @findex gnus-gather-threads-by-subject
6617 This function is the default gathering function and looks at
6618 @code{Subject}s exclusively.
6619
6620 @item gnus-gather-threads-by-references
6621 @findex gnus-gather-threads-by-references
6622 This function looks at @code{References} headers exclusively.
6623 @end table
6624
6625 If you want to test gathering by @code{References}, you could say
6626 something like:
6627
6628 @lisp
6629 (setq gnus-summary-thread-gathering-function
6630       'gnus-gather-threads-by-references)
6631 @end lisp
6632
6633 @end table
6634
6635
6636 @node Filling In Threads
6637 @subsubsection Filling In Threads
6638
6639 @table @code
6640 @item gnus-fetch-old-headers
6641 @vindex gnus-fetch-old-headers
6642 If non-@code{nil}, Gnus will attempt to build old threads by fetching
6643 more old headers---headers to articles marked as read.  If you
6644 would like to display as few summary lines as possible, but still
6645 connect as many loose threads as possible, you should set this variable
6646 to @code{some} or a number.  If you set it to a number, no more than
6647 that number of extra old headers will be fetched.  In either case,
6648 fetching old headers only works if the back end you are using carries
6649 overview files---this would normally be @code{nntp}, @code{nnspool},
6650 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6651 the thread has been expired by the server, there's not much Gnus can do
6652 about that.
6653
6654 This variable can also be set to @code{invisible}.  This won't have any
6655 visible effects, but is useful if you use the @kbd{A T} command a lot
6656 (@pxref{Finding the Parent}).
6657
6658 @item gnus-fetch-old-ephemeral-headers
6659 @vindex gnus-fetch-old-ephemeral-headers
6660 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
6661 newsgroups.
6662
6663 @item gnus-build-sparse-threads
6664 @vindex gnus-build-sparse-threads
6665 Fetching old headers can be slow.  A low-rent similar effect can be
6666 gotten by setting this variable to @code{some}.  Gnus will then look at
6667 the complete @code{References} headers of all articles and try to string
6668 together articles that belong in the same thread.  This will leave
6669 @dfn{gaps} in the threading display where Gnus guesses that an article
6670 is missing from the thread.  (These gaps appear like normal summary
6671 lines.  If you select a gap, Gnus will try to fetch the article in
6672 question.)  If this variable is @code{t}, Gnus will display all these
6673 ``gaps'' without regard for whether they are useful for completing the
6674 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
6675 off sparse leaf nodes that don't lead anywhere.  This variable is
6676 @code{nil} by default.
6677
6678 @item gnus-read-all-available-headers
6679 @vindex gnus-read-all-available-headers
6680 This is a rather obscure variable that few will find useful.  It's
6681 intended for those non-news newsgroups where the back end has to fetch
6682 quite a lot to present the summary buffer, and where it's impossible to
6683 go back to parents of articles.  This is mostly the case in the
6684 web-based groups, like the @code{nnultimate} groups.
6685
6686 If you don't use those, then it's safe to leave this as the default
6687 @code{nil}.  If you want to use this variable, it should be a regexp
6688 that matches the group name, or @code{t} for all groups.
6689
6690 @end table
6691
6692
6693 @node More Threading
6694 @subsubsection More Threading
6695
6696 @table @code
6697 @item gnus-show-threads
6698 @vindex gnus-show-threads
6699 If this variable is @code{nil}, no threading will be done, and all of
6700 the rest of the variables here will have no effect.  Turning threading
6701 off will speed group selection up a bit, but it is sure to make reading
6702 slower and more awkward.
6703
6704 @item gnus-thread-hide-subtree
6705 @vindex gnus-thread-hide-subtree
6706 If non-@code{nil}, all threads will be hidden when the summary buffer is
6707 generated.
6708
6709 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6710 Available predicates are @code{gnus-article-unread-p} and
6711 @code{gnus-article-unseen-p}.
6712
6713 Here's an example:
6714
6715 @lisp
6716 (setq gnus-thread-hide-subtree
6717       '(or gnus-article-unread-p
6718            gnus-article-unseen-p))
6719 @end lisp
6720
6721 (It's a pretty nonsensical example, since all unseen articles are also
6722 unread, but you get my drift.)
6723
6724
6725 @item gnus-thread-expunge-below
6726 @vindex gnus-thread-expunge-below
6727 All threads that have a total score (as defined by
6728 @code{gnus-thread-score-function}) less than this number will be
6729 expunged.  This variable is @code{nil} by default, which means that no
6730 threads are expunged.
6731
6732 @item gnus-thread-hide-killed
6733 @vindex gnus-thread-hide-killed
6734 if you kill a thread and this variable is non-@code{nil}, the subtree
6735 will be hidden.
6736
6737 @item gnus-thread-ignore-subject
6738 @vindex gnus-thread-ignore-subject
6739 Sometimes somebody changes the subject in the middle of a thread.  If
6740 this variable is non-@code{nil}, which is the default, the subject
6741 change is ignored.  If it is @code{nil}, a change in the subject will
6742 result in a new thread.
6743
6744 @item gnus-thread-indent-level
6745 @vindex gnus-thread-indent-level
6746 This is a number that says how much each sub-thread should be indented.
6747 The default is 4.
6748
6749 @item gnus-sort-gathered-threads-function
6750 @vindex gnus-sort-gathered-threads-function
6751 Sometimes, particularly with mailing lists, the order in which mails
6752 arrive locally is not necessarily the same as the order in which they
6753 arrived on the mailing list.  Consequently, when sorting sub-threads
6754 using the default @code{gnus-thread-sort-by-number}, responses can end
6755 up appearing before the article to which they are responding to.
6756 Setting this variable to an alternate value
6757 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6758 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6759 more logical sub-thread ordering in such instances.
6760
6761 @end table
6762
6763
6764 @node Low-Level Threading
6765 @subsubsection Low-Level Threading
6766
6767 @table @code
6768
6769 @item gnus-parse-headers-hook
6770 @vindex gnus-parse-headers-hook
6771 Hook run before parsing any headers.
6772
6773 @item gnus-alter-header-function
6774 @vindex gnus-alter-header-function
6775 If non-@code{nil}, this function will be called to allow alteration of
6776 article header structures.  The function is called with one parameter,
6777 the article header vector, which it may alter in any way.  For instance,
6778 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6779 in systematic ways (by adding prefixes and such), you can use this
6780 variable to un-scramble the @code{Message-ID}s so that they are more
6781 meaningful.  Here's one example:
6782
6783 @lisp
6784 (setq gnus-alter-header-function 'my-alter-message-id)
6785
6786 (defun my-alter-message-id (header)
6787   (let ((id (mail-header-id header)))
6788     (when (string-match
6789            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6790       (mail-header-set-id
6791        (concat (match-string 1 id) "@@" (match-string 2 id))
6792        header))))
6793 @end lisp
6794
6795 @end table
6796
6797
6798 @node Thread Commands
6799 @subsection Thread Commands
6800 @cindex thread commands
6801
6802 @table @kbd
6803
6804 @item T k
6805 @itemx C-M-k
6806 @kindex T k (Summary)
6807 @kindex C-M-k (Summary)
6808 @findex gnus-summary-kill-thread
6809 Mark all articles in the current (sub-)thread as read
6810 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6811 remove all marks instead.  If the prefix argument is negative, tick
6812 articles instead.
6813
6814 @item T l
6815 @itemx C-M-l
6816 @kindex T l (Summary)
6817 @kindex C-M-l (Summary)
6818 @findex gnus-summary-lower-thread
6819 Lower the score of the current (sub-)thread
6820 (@code{gnus-summary-lower-thread}).
6821
6822 @item T i
6823 @kindex T i (Summary)
6824 @findex gnus-summary-raise-thread
6825 Increase the score of the current (sub-)thread
6826 (@code{gnus-summary-raise-thread}).
6827
6828 @item T #
6829 @kindex T # (Summary)
6830 @findex gnus-uu-mark-thread
6831 Set the process mark on the current (sub-)thread
6832 (@code{gnus-uu-mark-thread}).
6833
6834 @item T M-#
6835 @kindex T M-# (Summary)
6836 @findex gnus-uu-unmark-thread
6837 Remove the process mark from the current (sub-)thread
6838 (@code{gnus-uu-unmark-thread}).
6839
6840 @item T T
6841 @kindex T T (Summary)
6842 @findex gnus-summary-toggle-threads
6843 Toggle threading (@code{gnus-summary-toggle-threads}).
6844
6845 @item T s
6846 @kindex T s (Summary)
6847 @findex gnus-summary-show-thread
6848 Expose the (sub-)thread hidden under the current article, if any@*
6849 (@code{gnus-summary-show-thread}).
6850
6851 @item T h
6852 @kindex T h (Summary)
6853 @findex gnus-summary-hide-thread
6854 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6855
6856 @item T S
6857 @kindex T S (Summary)
6858 @findex gnus-summary-show-all-threads
6859 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6860
6861 @item T H
6862 @kindex T H (Summary)
6863 @findex gnus-summary-hide-all-threads
6864 Hide all threads (@code{gnus-summary-hide-all-threads}).
6865
6866 @item T t
6867 @kindex T t (Summary)
6868 @findex gnus-summary-rethread-current
6869 Re-thread the current article's thread
6870 (@code{gnus-summary-rethread-current}).  This works even when the
6871 summary buffer is otherwise unthreaded.
6872
6873 @item T ^
6874 @kindex T ^ (Summary)
6875 @findex gnus-summary-reparent-thread
6876 Make the current article the child of the marked (or previous) article
6877 (@code{gnus-summary-reparent-thread}).
6878
6879 @end table
6880
6881 The following commands are thread movement commands.  They all
6882 understand the numeric prefix.
6883
6884 @table @kbd
6885
6886 @item T n
6887 @kindex T n (Summary)
6888 @itemx C-M-f
6889 @kindex C-M-n (Summary)
6890 @itemx M-down
6891 @kindex M-down (Summary)
6892 @findex gnus-summary-next-thread
6893 Go to the next thread (@code{gnus-summary-next-thread}).
6894
6895 @item T p
6896 @kindex T p (Summary)
6897 @itemx C-M-b
6898 @kindex C-M-p (Summary)
6899 @itemx M-up
6900 @kindex M-up (Summary)
6901 @findex gnus-summary-prev-thread
6902 Go to the previous thread (@code{gnus-summary-prev-thread}).
6903
6904 @item T d
6905 @kindex T d (Summary)
6906 @findex gnus-summary-down-thread
6907 Descend the thread (@code{gnus-summary-down-thread}).
6908
6909 @item T u
6910 @kindex T u (Summary)
6911 @findex gnus-summary-up-thread
6912 Ascend the thread (@code{gnus-summary-up-thread}).
6913
6914 @item T o
6915 @kindex T o (Summary)
6916 @findex gnus-summary-top-thread
6917 Go to the top of the thread (@code{gnus-summary-top-thread}).
6918 @end table
6919
6920 @vindex gnus-thread-operation-ignore-subject
6921 If you ignore subject while threading, you'll naturally end up with
6922 threads that have several different subjects in them.  If you then issue
6923 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
6924 wish to kill the entire thread, but just those parts of the thread that
6925 have the same subject as the current article.  If you like this idea,
6926 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6927 is non-@code{nil} (which it is by default), subjects will be ignored
6928 when doing thread commands.  If this variable is @code{nil}, articles in
6929 the same thread with different subjects will not be included in the
6930 operation in question.  If this variable is @code{fuzzy}, only articles
6931 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6932 Matching}).
6933
6934
6935 @node Sorting the Summary Buffer
6936 @section Sorting the Summary Buffer
6937
6938 @findex gnus-thread-sort-by-total-score
6939 @findex gnus-thread-sort-by-date
6940 @findex gnus-thread-sort-by-score
6941 @findex gnus-thread-sort-by-subject
6942 @findex gnus-thread-sort-by-author
6943 @findex gnus-thread-sort-by-number
6944 @findex gnus-thread-sort-by-random
6945 @vindex gnus-thread-sort-functions
6946 @findex gnus-thread-sort-by-most-recent-number
6947 @findex gnus-thread-sort-by-most-recent-date
6948 If you are using a threaded summary display, you can sort the threads by
6949 setting @code{gnus-thread-sort-functions}, which can be either a single
6950 function, a list of functions, or a list containing functions and
6951 @code{(not some-function)} elements.
6952
6953 By default, sorting is done on article numbers.  Ready-made sorting
6954 predicate functions include @code{gnus-thread-sort-by-number},
6955 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6956 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6957 @code{gnus-thread-sort-by-most-recent-number},
6958 @code{gnus-thread-sort-by-most-recent-date},
6959 @code{gnus-thread-sort-by-random} and
6960 @code{gnus-thread-sort-by-total-score}.
6961
6962 Each function takes two threads and returns non-@code{nil} if the first
6963 thread should be sorted before the other.  Note that sorting really is
6964 normally done by looking only at the roots of each thread.
6965
6966 If you use more than one function, the primary sort key should be the
6967 last function in the list.  You should probably always include
6968 @code{gnus-thread-sort-by-number} in the list of sorting
6969 functions---preferably first.  This will ensure that threads that are
6970 equal with respect to the other sort criteria will be displayed in
6971 ascending article order.
6972
6973 If you would like to sort by reverse score, then by subject, and finally
6974 by number, you could do something like:
6975
6976 @lisp
6977 (setq gnus-thread-sort-functions
6978       '(gnus-thread-sort-by-number
6979         gnus-thread-sort-by-subject
6980         (not gnus-thread-sort-by-total-score)))
6981 @end lisp
6982
6983 The threads that have highest score will be displayed first in the
6984 summary buffer.  When threads have the same score, they will be sorted
6985 alphabetically.  The threads that have the same score and the same
6986 subject will be sorted by number, which is (normally) the sequence in
6987 which the articles arrived.
6988
6989 If you want to sort by score and then reverse arrival order, you could
6990 say something like:
6991
6992 @lisp
6993 (setq gnus-thread-sort-functions
6994       '((lambda (t1 t2)
6995           (not (gnus-thread-sort-by-number t1 t2)))
6996         gnus-thread-sort-by-score))
6997 @end lisp
6998
6999 @vindex gnus-thread-score-function
7000 The function in the @code{gnus-thread-score-function} variable (default
7001 @code{+}) is used for calculating the total score of a thread.  Useful
7002 functions might be @code{max}, @code{min}, or squared means, or whatever
7003 tickles your fancy.
7004
7005 @findex gnus-article-sort-functions
7006 @findex gnus-article-sort-by-date
7007 @findex gnus-article-sort-by-score
7008 @findex gnus-article-sort-by-subject
7009 @findex gnus-article-sort-by-author
7010 @findex gnus-article-sort-by-random
7011 @findex gnus-article-sort-by-number
7012 If you are using an unthreaded display for some strange reason or
7013 other, you have to fiddle with the @code{gnus-article-sort-functions}
7014 variable.  It is very similar to the
7015 @code{gnus-thread-sort-functions}, except that it uses slightly
7016 different functions for article comparison.  Available sorting
7017 predicate functions are @code{gnus-article-sort-by-number},
7018 @code{gnus-article-sort-by-author},
7019 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
7020 @code{gnus-article-sort-by-random}, and
7021 @code{gnus-article-sort-by-score}.
7022
7023 If you want to sort an unthreaded summary display by subject, you could
7024 say something like:
7025
7026 @lisp
7027 (setq gnus-article-sort-functions
7028       '(gnus-article-sort-by-number
7029         gnus-article-sort-by-subject))
7030 @end lisp
7031
7032
7033
7034 @node Asynchronous Fetching
7035 @section Asynchronous Article Fetching
7036 @cindex asynchronous article fetching
7037 @cindex article pre-fetch
7038 @cindex pre-fetch
7039
7040 If you read your news from an @acronym{NNTP} server that's far away, the
7041 network latencies may make reading articles a chore.  You have to wait
7042 for a while after pressing @kbd{n} to go to the next article before the
7043 article appears.  Why can't Gnus just go ahead and fetch the article
7044 while you are reading the previous one?  Why not, indeed.
7045
7046 First, some caveats.  There are some pitfalls to using asynchronous
7047 article fetching, especially the way Gnus does it.
7048
7049 Let's say you are reading article 1, which is short, and article 2 is
7050 quite long, and you are not interested in reading that.  Gnus does not
7051 know this, so it goes ahead and fetches article 2.  You decide to read
7052 article 3, but since Gnus is in the process of fetching article 2, the
7053 connection is blocked.
7054
7055 To avoid these situations, Gnus will open two (count 'em two)
7056 connections to the server.  Some people may think this isn't a very nice
7057 thing to do, but I don't see any real alternatives.  Setting up that
7058 extra connection takes some time, so Gnus startup will be slower.
7059
7060 Gnus will fetch more articles than you will read.  This will mean that
7061 the link between your machine and the @acronym{NNTP} server will become more
7062 loaded than if you didn't use article pre-fetch.  The server itself will
7063 also become more loaded---both with the extra article requests, and the
7064 extra connection.
7065
7066 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7067 you really want to.
7068
7069 @vindex gnus-asynchronous
7070 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7071 happen automatically.
7072
7073 @vindex gnus-use-article-prefetch
7074 You can control how many articles are to be pre-fetched by setting
7075 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7076 that when you read an article in the group, the back end will pre-fetch
7077 the next 30 articles.  If this variable is @code{t}, the back end will
7078 pre-fetch all the articles it can without bound.  If it is
7079 @code{nil}, no pre-fetching will be done.
7080
7081 @vindex gnus-async-prefetch-article-p
7082 @findex gnus-async-read-p
7083 There are probably some articles that you don't want to pre-fetch---read
7084 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7085 variable controls whether an article is to be pre-fetched.  This
7086 function should return non-@code{nil} when the article in question is
7087 to be pre-fetched.  The default is @code{gnus-async-read-p}, which
7088 returns @code{nil} on read articles.  The function is called with an
7089 article data structure as the only parameter.
7090
7091 If, for instance, you wish to pre-fetch only unread articles shorter
7092 than 100 lines, you could say something like:
7093
7094 @lisp
7095 (defun my-async-short-unread-p (data)
7096   "Return non-nil for short, unread articles."
7097   (and (gnus-data-unread-p data)
7098        (< (mail-header-lines (gnus-data-header data))
7099           100)))
7100
7101 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7102 @end lisp
7103
7104 These functions will be called many, many times, so they should
7105 preferably be short and sweet to avoid slowing down Gnus too much.
7106 It's probably a good idea to byte-compile things like this.
7107
7108 @vindex gnus-prefetched-article-deletion-strategy
7109 Articles have to be removed from the asynch buffer sooner or later.  The
7110 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7111 articles.  This is a list that may contain the following elements:
7112
7113 @table @code
7114 @item read
7115 Remove articles when they are read.
7116
7117 @item exit
7118 Remove articles when exiting the group.
7119 @end table
7120
7121 The default value is @code{(read exit)}.
7122
7123 @c @vindex gnus-use-header-prefetch
7124 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7125 @c from the next group.
7126
7127
7128 @node Article Caching
7129 @section Article Caching
7130 @cindex article caching
7131 @cindex caching
7132
7133 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7134 consider turning article caching on.  Each article will then be stored
7135 locally under your home directory.  As you may surmise, this could
7136 potentially use @emph{huge} amounts of disk space, as well as eat up all
7137 your inodes so fast it will make your head swim.  In vodka.
7138
7139 Used carefully, though, it could be just an easier way to save articles.
7140
7141 @vindex gnus-use-long-file-name
7142 @vindex gnus-cache-directory
7143 @vindex gnus-use-cache
7144 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7145 all articles ticked or marked as dormant will then be copied
7146 over to your local cache (@code{gnus-cache-directory}).  Whether this
7147 cache is flat or hierarchical is controlled by the
7148 @code{gnus-use-long-file-name} variable, as usual.
7149
7150 When re-selecting a ticked or dormant article, it will be fetched from the
7151 cache instead of from the server.  As articles in your cache will never
7152 expire, this might serve as a method of saving articles while still
7153 keeping them where they belong.  Just mark all articles you want to save
7154 as dormant, and don't worry.
7155
7156 When an article is marked as read, is it removed from the cache.
7157
7158 @vindex gnus-cache-remove-articles
7159 @vindex gnus-cache-enter-articles
7160 The entering/removal of articles from the cache is controlled by the
7161 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7162 variables.  Both are lists of symbols.  The first is @code{(ticked
7163 dormant)} by default, meaning that ticked and dormant articles will be
7164 put in the cache.  The latter is @code{(read)} by default, meaning that
7165 articles marked as read are removed from the cache.  Possibly
7166 symbols in these two lists are @code{ticked}, @code{dormant},
7167 @code{unread} and @code{read}.
7168
7169 @findex gnus-jog-cache
7170 So where does the massive article-fetching and storing come into the
7171 picture?  The @code{gnus-jog-cache} command will go through all
7172 subscribed newsgroups, request all unread articles, score them, and
7173 store them in the cache.  You should only ever, ever ever ever, use this
7174 command if 1) your connection to the @acronym{NNTP} server is really, really,
7175 really slow and 2) you have a really, really, really huge disk.
7176 Seriously.  One way to cut down on the number of articles downloaded is
7177 to score unwanted articles down and have them marked as read.  They will
7178 not then be downloaded by this command.
7179
7180 @vindex gnus-uncacheable-groups
7181 @vindex gnus-cacheable-groups
7182 It is likely that you do not want caching on all groups.  For instance,
7183 if your @code{nnml} mail is located under your home directory, it makes no
7184 sense to cache it somewhere else under your home directory.  Unless you
7185 feel that it's neat to use twice as much space.
7186
7187 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7188 regexp of groups to cache, @samp{^nntp} for instance, or set the
7189 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7190 Both variables are @code{nil} by default.  If a group matches both
7191 variables, the group is not cached.
7192
7193 @findex gnus-cache-generate-nov-databases
7194 @findex gnus-cache-generate-active
7195 @vindex gnus-cache-active-file
7196 The cache stores information on what articles it contains in its active
7197 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7198 of the cache) becomes all messed up for some reason or other, Gnus
7199 offers two functions that will try to set things right.  @kbd{M-x
7200 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7201 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7202 file.
7203
7204 @findex gnus-cache-move-cache
7205 @code{gnus-cache-move-cache} will move your whole
7206 @code{gnus-cache-directory} to some other location.  You get asked to
7207 where, isn't that cool?
7208
7209 @node Persistent Articles
7210 @section Persistent Articles
7211 @cindex persistent articles
7212
7213 Closely related to article caching, we have @dfn{persistent articles}.
7214 In fact, it's just a different way of looking at caching, and much more
7215 useful in my opinion.
7216
7217 Say you're reading a newsgroup, and you happen on to some valuable gem
7218 that you want to keep and treasure forever.  You'd normally just save it
7219 (using one of the many saving commands) in some file.  The problem with
7220 that is that it's just, well, yucky.  Ideally you'd prefer just having
7221 the article remain in the group where you found it forever; untouched by
7222 the expiry going on at the news server.
7223
7224 This is what a @dfn{persistent article} is---an article that just won't
7225 be deleted.  It's implemented using the normal cache functions, but
7226 you use two explicit commands for managing persistent articles:
7227
7228 @table @kbd
7229
7230 @item *
7231 @kindex * (Summary)
7232 @findex gnus-cache-enter-article
7233 Make the current article persistent (@code{gnus-cache-enter-article}).
7234
7235 @item M-*
7236 @kindex M-* (Summary)
7237 @findex gnus-cache-remove-article
7238 Remove the current article from the persistent articles
7239 (@code{gnus-cache-remove-article}).  This will normally delete the
7240 article.
7241 @end table
7242
7243 Both these commands understand the process/prefix convention.
7244
7245 To avoid having all ticked articles (and stuff) entered into the cache,
7246 you should set @code{gnus-use-cache} to @code{passive} if you're just
7247 interested in persistent articles:
7248
7249 @lisp
7250 (setq gnus-use-cache 'passive)
7251 @end lisp
7252
7253
7254 @node Article Backlog
7255 @section Article Backlog
7256 @cindex backlog
7257 @cindex article backlog
7258
7259 If you have a slow connection, but the idea of using caching seems
7260 unappealing to you (and it is, really), you can help the situation some
7261 by switching on the @dfn{backlog}.  This is where Gnus will buffer
7262 already read articles so that it doesn't have to re-fetch articles
7263 you've already read.  This only helps if you are in the habit of
7264 re-selecting articles you've recently read, of course.  If you never do
7265 that, turning the backlog on will slow Gnus down a little bit, and
7266 increase memory usage some.
7267
7268 @vindex gnus-keep-backlog
7269 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
7270 at most @var{n} old articles in a buffer for later re-fetching.  If this
7271 variable is non-@code{nil} and is not a number, Gnus will store
7272 @emph{all} read articles, which means that your Emacs will grow without
7273 bound before exploding and taking your machine down with you.  I put
7274 that in there just to keep y'all on your toes.
7275
7276 The default value is 20.
7277
7278
7279 @node Saving Articles
7280 @section Saving Articles
7281 @cindex saving articles
7282
7283 Gnus can save articles in a number of ways.  Below is the documentation
7284 for saving articles in a fairly straight-forward fashion (i.e., little
7285 processing of the article is done before it is saved).  For a different
7286 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7287 (@pxref{Decoding Articles}).
7288
7289 For the commands listed here, the target is a file.  If you want to
7290 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7291 command (@pxref{Mail Group Commands}).
7292
7293 @vindex gnus-save-all-headers
7294 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
7295 unwanted headers before saving the article.
7296
7297 @vindex gnus-saved-headers
7298 If the preceding variable is @code{nil}, all headers that match the
7299 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7300 deleted before saving.
7301
7302 @table @kbd
7303
7304 @item O o
7305 @itemx o
7306 @kindex O o (Summary)
7307 @kindex o (Summary)
7308 @findex gnus-summary-save-article
7309 @c @icon{gnus-summary-save-article}
7310 Save the current article using the default article saver
7311 (@code{gnus-summary-save-article}).
7312
7313 @item O m
7314 @kindex O m (Summary)
7315 @findex gnus-summary-save-article-mail
7316 Save the current article in mail format
7317 (@code{gnus-summary-save-article-mail}).
7318
7319 @item O r
7320 @kindex O r (Summary)
7321 @findex gnus-summary-save-article-rmail
7322 Save the current article in Rmail format
7323 (@code{gnus-summary-save-article-rmail}).
7324
7325 @item O f
7326 @kindex O f (Summary)
7327 @findex gnus-summary-save-article-file
7328 @c @icon{gnus-summary-save-article-file}
7329 Save the current article in plain file format
7330 (@code{gnus-summary-save-article-file}).
7331
7332 @item O F
7333 @kindex O F (Summary)
7334 @findex gnus-summary-write-article-file
7335 Write the current article in plain file format, overwriting any previous
7336 file contents (@code{gnus-summary-write-article-file}).
7337
7338 @item O b
7339 @kindex O b (Summary)
7340 @findex gnus-summary-save-article-body-file
7341 Save the current article body in plain file format
7342 (@code{gnus-summary-save-article-body-file}).
7343
7344 @item O h
7345 @kindex O h (Summary)
7346 @findex gnus-summary-save-article-folder
7347 Save the current article in mh folder format
7348 (@code{gnus-summary-save-article-folder}).
7349
7350 @item O v
7351 @kindex O v (Summary)
7352 @findex gnus-summary-save-article-vm
7353 Save the current article in a VM folder
7354 (@code{gnus-summary-save-article-vm}).
7355
7356 @item O p
7357 @itemx |
7358 @kindex O p (Summary)
7359 @kindex | (Summary)
7360 @findex gnus-summary-pipe-output
7361 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7362 the current article to a process (@code{gnus-summary-pipe-output}).
7363 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7364 complete headers in the piped output.
7365
7366 @item O P
7367 @kindex O P (Summary)
7368 @findex gnus-summary-muttprint
7369 @vindex gnus-summary-muttprint-program
7370 Save the current article into muttprint.  That is, print it using the
7371 external program @uref{http://muttprint.sourceforge.net/,
7372 Muttprint}.  The program name and options to use is controlled by the
7373 variable @code{gnus-summary-muttprint-program}.
7374 (@code{gnus-summary-muttprint}).
7375
7376 @end table
7377
7378 @vindex gnus-prompt-before-saving
7379 All these commands use the process/prefix convention
7380 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7381 functions, you might get tired of being prompted for files to save each
7382 and every article in.  The prompting action is controlled by
7383 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7384 default, giving you that excessive prompting action you know and
7385 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7386 just once for each series of articles you save.  If you like to really
7387 have Gnus do all your thinking for you, you can even set this variable
7388 to @code{nil}, which means that you will never be prompted for files to
7389 save articles in.  Gnus will simply save all the articles in the default
7390 files.
7391
7392
7393 @vindex gnus-default-article-saver
7394 You can customize the @code{gnus-default-article-saver} variable to make
7395 Gnus do what you want it to.  You can use any of the six ready-made
7396 functions below, or you can create your own.
7397
7398 @table @code
7399
7400 @item gnus-summary-save-in-rmail
7401 @findex gnus-summary-save-in-rmail
7402 @vindex gnus-rmail-save-name
7403 @findex gnus-plain-save-name
7404 This is the default format, @dfn{Babyl}.  Uses the function in the
7405 @code{gnus-rmail-save-name} variable to get a file name to save the
7406 article in.  The default is @code{gnus-plain-save-name}.
7407
7408 @item gnus-summary-save-in-mail
7409 @findex gnus-summary-save-in-mail
7410 @vindex gnus-mail-save-name
7411 Save in a Unix mail (mbox) file.  Uses the function in the
7412 @code{gnus-mail-save-name} variable to get a file name to save the
7413 article in.  The default is @code{gnus-plain-save-name}.
7414
7415 @item gnus-summary-save-in-file
7416 @findex gnus-summary-save-in-file
7417 @vindex gnus-file-save-name
7418 @findex gnus-numeric-save-name
7419 Append the article straight to an ordinary file.  Uses the function in
7420 the @code{gnus-file-save-name} variable to get a file name to save the
7421 article in.  The default is @code{gnus-numeric-save-name}.
7422
7423 @item gnus-summary-write-to-file
7424 @findex gnus-summary-write-to-file
7425 Write the article straight to an ordinary file.  The file is
7426 overwritten if it exists.  Uses the function in the
7427 @code{gnus-file-save-name} variable to get a file name to save the
7428 article in.  The default is @code{gnus-numeric-save-name}.
7429
7430 @item gnus-summary-save-body-in-file
7431 @findex gnus-summary-save-body-in-file
7432 Append the article body to an ordinary file.  Uses the function in the
7433 @code{gnus-file-save-name} variable to get a file name to save the
7434 article in.  The default is @code{gnus-numeric-save-name}.
7435
7436 @item gnus-summary-save-in-folder
7437 @findex gnus-summary-save-in-folder
7438 @findex gnus-folder-save-name
7439 @findex gnus-Folder-save-name
7440 @vindex gnus-folder-save-name
7441 @cindex rcvstore
7442 @cindex MH folders
7443 Save the article to an MH folder using @code{rcvstore} from the MH
7444 library.  Uses the function in the @code{gnus-folder-save-name} variable
7445 to get a file name to save the article in.  The default is
7446 @code{gnus-folder-save-name}, but you can also use
7447 @code{gnus-Folder-save-name}, which creates capitalized names.
7448
7449 @item gnus-summary-save-in-vm
7450 @findex gnus-summary-save-in-vm
7451 Save the article in a VM folder.  You have to have the VM mail
7452 reader to use this setting.
7453 @end table
7454
7455 @vindex gnus-article-save-directory
7456 All of these functions, except for the last one, will save the article
7457 in the @code{gnus-article-save-directory}, which is initialized from the
7458 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
7459 default.
7460
7461 As you can see above, the functions use different functions to find a
7462 suitable name of a file to save the article in.  Below is a list of
7463 available functions that generate names:
7464
7465 @table @code
7466
7467 @item gnus-Numeric-save-name
7468 @findex gnus-Numeric-save-name
7469 File names like @file{~/News/Alt.andrea-dworkin/45}.
7470
7471 @item gnus-numeric-save-name
7472 @findex gnus-numeric-save-name
7473 File names like @file{~/News/alt.andrea-dworkin/45}.
7474
7475 @item gnus-Plain-save-name
7476 @findex gnus-Plain-save-name
7477 File names like @file{~/News/Alt.andrea-dworkin}.
7478
7479 @item gnus-plain-save-name
7480 @findex gnus-plain-save-name
7481 File names like @file{~/News/alt.andrea-dworkin}.
7482
7483 @item gnus-sender-save-name
7484 @findex gnus-sender-save-name
7485 File names like @file{~/News/larsi}.
7486 @end table
7487
7488 @vindex gnus-split-methods
7489 You can have Gnus suggest where to save articles by plonking a regexp into
7490 the @code{gnus-split-methods} alist.  For instance, if you would like to
7491 save articles related to Gnus in the file @file{gnus-stuff}, and articles
7492 related to VM in @file{vm-stuff}, you could set this variable to something
7493 like:
7494
7495 @lisp
7496 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7497  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7498  (my-choosing-function "../other-dir/my-stuff")
7499  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7500 @end lisp
7501
7502 We see that this is a list where each element is a list that has two
7503 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7504 a string (in which case it is used as a regexp to match on the article
7505 head); it can be a symbol (which will be called as a function with the
7506 group name as a parameter); or it can be a list (which will be
7507 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7508 the @dfn{file} will be used as a default prompt.  In addition, the
7509 result of the operation itself will be used if the function or form
7510 called returns a string or a list of strings.
7511
7512 You basically end up with a list of file names that might be used when
7513 saving the current article.  (All ``matches'' will be used.)  You will
7514 then be prompted for what you really want to use as a name, with file
7515 name completion over the results from applying this variable.
7516
7517 This variable is @code{((gnus-article-archive-name))} by default, which
7518 means that Gnus will look at the articles it saves for an
7519 @code{Archive-name} line and use that as a suggestion for the file
7520 name.
7521
7522 Here's an example function to clean up file names somewhat.  If you have
7523 lots of mail groups called things like
7524 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7525 these group names before creating the file name to save to.  The
7526 following will do just that:
7527
7528 @lisp
7529 (defun my-save-name (group)
7530   (when (string-match "^nnml:mail." group)
7531     (substring group (match-end 0))))
7532
7533 (setq gnus-split-methods
7534       '((gnus-article-archive-name)
7535         (my-save-name)))
7536 @end lisp
7537
7538
7539 @vindex gnus-use-long-file-name
7540 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7541 @code{nil}, all the preceding functions will replace all periods
7542 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7543 the functions will generate hierarchies of directories instead of having
7544 all the files in the top level directory
7545 (@file{~/News/alt/andrea-dworkin} instead of
7546 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7547 on most systems.  However, for historical reasons, this is @code{nil} on
7548 Xenix and usg-unix-v machines by default.
7549
7550 This function also affects kill and score file names.  If this variable
7551 is a list, and the list contains the element @code{not-score}, long file
7552 names will not be used for score files, if it contains the element
7553 @code{not-save}, long file names will not be used for saving, and if it
7554 contains the element @code{not-kill}, long file names will not be used
7555 for kill files.
7556
7557 If you'd like to save articles in a hierarchy that looks something like
7558 a spool, you could
7559
7560 @lisp
7561 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
7562 (setq gnus-default-article-saver
7563       'gnus-summary-save-in-file)          ; @r{no encoding}
7564 @end lisp
7565
7566 Then just save with @kbd{o}.  You'd then read this hierarchy with
7567 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7568 the top level directory as the argument (@file{~/News/}).  Then just walk
7569 around to the groups/directories with @code{nneething}.
7570
7571
7572 @node Decoding Articles
7573 @section Decoding Articles
7574 @cindex decoding articles
7575
7576 Sometime users post articles (or series of articles) that have been
7577 encoded in some way or other.  Gnus can decode them for you.
7578
7579 @menu
7580 * Uuencoded Articles::          Uudecode articles.
7581 * Shell Archives::              Unshar articles.
7582 * PostScript Files::            Split PostScript.
7583 * Other Files::                 Plain save and binhex.
7584 * Decoding Variables::          Variables for a happy decoding.
7585 * Viewing Files::               You want to look at the result of the decoding?
7586 @end menu
7587
7588 @cindex series
7589 @cindex article series
7590 All these functions use the process/prefix convention
7591 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7592 the extension that a ``single article'' means ``a single series''.  Gnus
7593 can find out by itself what articles belong to a series, decode all the
7594 articles and unpack/view/save the resulting file(s).
7595
7596 Gnus guesses what articles are in the series according to the following
7597 simplish rule: The subjects must be (nearly) identical, except for the
7598 last two numbers of the line.  (Spaces are largely ignored, however.)
7599
7600 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
7601 will find all the articles that match the regexp @samp{^cat.gif
7602 ([0-9]+/[0-9]+).*$}.
7603
7604 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7605 series}, will not be properly recognized by any of the automatic viewing
7606 commands, and you have to mark the articles manually with @kbd{#}.
7607
7608
7609 @node Uuencoded Articles
7610 @subsection Uuencoded Articles
7611 @cindex uudecode
7612 @cindex uuencoded articles
7613
7614 @table @kbd
7615
7616 @item X u
7617 @kindex X u (Summary)
7618 @findex gnus-uu-decode-uu
7619 @c @icon{gnus-uu-decode-uu}
7620 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7621
7622 @item X U
7623 @kindex X U (Summary)
7624 @findex gnus-uu-decode-uu-and-save
7625 Uudecodes and saves the current series
7626 (@code{gnus-uu-decode-uu-and-save}).
7627
7628 @item X v u
7629 @kindex X v u (Summary)
7630 @findex gnus-uu-decode-uu-view
7631 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7632
7633 @item X v U
7634 @kindex X v U (Summary)
7635 @findex gnus-uu-decode-uu-and-save-view
7636 Uudecodes, views and saves the current series
7637 (@code{gnus-uu-decode-uu-and-save-view}).
7638
7639 @end table
7640
7641 Remember that these all react to the presence of articles marked with
7642 the process mark.  If, for instance, you'd like to decode and save an
7643 entire newsgroup, you'd typically do @kbd{M P a}
7644 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7645 (@code{gnus-uu-decode-uu-and-save}).
7646
7647 All this is very much different from how @code{gnus-uu} worked with
7648 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7649 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7650 articles in some way (@pxref{Setting Process Marks}) and then press
7651 @kbd{X u}.
7652
7653 @vindex gnus-uu-notify-files
7654 Note: When trying to decode articles that have names matching
7655 @code{gnus-uu-notify-files}, which is hard-coded to
7656 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7657 automatically post an article on @samp{comp.unix.wizards} saying that
7658 you have just viewed the file in question.  This feature can't be turned
7659 off.
7660
7661
7662 @node Shell Archives
7663 @subsection Shell Archives
7664 @cindex unshar
7665 @cindex shell archives
7666 @cindex shared articles
7667
7668 Shell archives (``shar files'') used to be a popular way to distribute
7669 sources, but it isn't used all that much today.  In any case, we have
7670 some commands to deal with these:
7671
7672 @table @kbd
7673
7674 @item X s
7675 @kindex X s (Summary)
7676 @findex gnus-uu-decode-unshar
7677 Unshars the current series (@code{gnus-uu-decode-unshar}).
7678
7679 @item X S
7680 @kindex X S (Summary)
7681 @findex gnus-uu-decode-unshar-and-save
7682 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7683
7684 @item X v s
7685 @kindex X v s (Summary)
7686 @findex gnus-uu-decode-unshar-view
7687 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7688
7689 @item X v S
7690 @kindex X v S (Summary)
7691 @findex gnus-uu-decode-unshar-and-save-view
7692 Unshars, views and saves the current series
7693 (@code{gnus-uu-decode-unshar-and-save-view}).
7694 @end table
7695
7696
7697 @node PostScript Files
7698 @subsection PostScript Files
7699 @cindex PostScript
7700
7701 @table @kbd
7702
7703 @item X p
7704 @kindex X p (Summary)
7705 @findex gnus-uu-decode-postscript
7706 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7707
7708 @item X P
7709 @kindex X P (Summary)
7710 @findex gnus-uu-decode-postscript-and-save
7711 Unpack and save the current PostScript series
7712 (@code{gnus-uu-decode-postscript-and-save}).
7713
7714 @item X v p
7715 @kindex X v p (Summary)
7716 @findex gnus-uu-decode-postscript-view
7717 View the current PostScript series
7718 (@code{gnus-uu-decode-postscript-view}).
7719
7720 @item X v P
7721 @kindex X v P (Summary)
7722 @findex gnus-uu-decode-postscript-and-save-view
7723 View and save the current PostScript series
7724 (@code{gnus-uu-decode-postscript-and-save-view}).
7725 @end table
7726
7727
7728 @node Other Files
7729 @subsection Other Files
7730
7731 @table @kbd
7732 @item X o
7733 @kindex X o (Summary)
7734 @findex gnus-uu-decode-save
7735 Save the current series
7736 (@code{gnus-uu-decode-save}).
7737
7738 @item X b
7739 @kindex X b (Summary)
7740 @findex gnus-uu-decode-binhex
7741 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7742 doesn't really work yet.
7743 @end table
7744
7745
7746 @node Decoding Variables
7747 @subsection Decoding Variables
7748
7749 Adjective, not verb.
7750
7751 @menu
7752 * Rule Variables::              Variables that say how a file is to be viewed.
7753 * Other Decode Variables::      Other decode variables.
7754 * Uuencoding and Posting::      Variables for customizing uuencoding.
7755 @end menu
7756
7757
7758 @node Rule Variables
7759 @subsubsection Rule Variables
7760 @cindex rule variables
7761
7762 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7763 variables are of the form
7764
7765 @lisp
7766       (list '(regexp1 command2)
7767             '(regexp2 command2)
7768             ...)
7769 @end lisp
7770
7771 @table @code
7772
7773 @item gnus-uu-user-view-rules
7774 @vindex gnus-uu-user-view-rules
7775 @cindex sox
7776 This variable is consulted first when viewing files.  If you wish to use,
7777 for instance, @code{sox} to convert an @file{.au} sound file, you could
7778 say something like:
7779 @lisp
7780 (setq gnus-uu-user-view-rules
7781       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7782 @end lisp
7783
7784 @item gnus-uu-user-view-rules-end
7785 @vindex gnus-uu-user-view-rules-end
7786 This variable is consulted if Gnus couldn't make any matches from the
7787 user and default view rules.
7788
7789 @item gnus-uu-user-archive-rules
7790 @vindex gnus-uu-user-archive-rules
7791 This variable can be used to say what commands should be used to unpack
7792 archives.
7793 @end table
7794
7795
7796 @node Other Decode Variables
7797 @subsubsection Other Decode Variables
7798
7799 @table @code
7800 @vindex gnus-uu-grabbed-file-functions
7801
7802 @item gnus-uu-grabbed-file-functions
7803 All functions in this list will be called right after each file has been
7804 successfully decoded---so that you can move or view files right away,
7805 and don't have to wait for all files to be decoded before you can do
7806 anything.  Ready-made functions you can put in this list are:
7807
7808 @table @code
7809
7810 @item gnus-uu-grab-view
7811 @findex gnus-uu-grab-view
7812 View the file.
7813
7814 @item gnus-uu-grab-move
7815 @findex gnus-uu-grab-move
7816 Move the file (if you're using a saving function.)
7817 @end table
7818
7819 @item gnus-uu-be-dangerous
7820 @vindex gnus-uu-be-dangerous
7821 Specifies what to do if unusual situations arise during decoding.  If
7822 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7823 that didn't work, and overwrite existing files.  Otherwise, ask each
7824 time.
7825
7826 @item gnus-uu-ignore-files-by-name
7827 @vindex gnus-uu-ignore-files-by-name
7828 Files with name matching this regular expression won't be viewed.
7829
7830 @item gnus-uu-ignore-files-by-type
7831 @vindex gnus-uu-ignore-files-by-type
7832 Files with a @acronym{MIME} type matching this variable won't be viewed.
7833 Note that Gnus tries to guess what type the file is based on the name.
7834 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
7835 kludgey.
7836
7837 @item gnus-uu-tmp-dir
7838 @vindex gnus-uu-tmp-dir
7839 Where @code{gnus-uu} does its work.
7840
7841 @item gnus-uu-do-not-unpack-archives
7842 @vindex gnus-uu-do-not-unpack-archives
7843 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7844 looking for files to display.
7845
7846 @item gnus-uu-view-and-save
7847 @vindex gnus-uu-view-and-save
7848 Non-@code{nil} means that the user will always be asked to save a file
7849 after viewing it.
7850
7851 @item gnus-uu-ignore-default-view-rules
7852 @vindex gnus-uu-ignore-default-view-rules
7853 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7854 rules.
7855
7856 @item gnus-uu-ignore-default-archive-rules
7857 @vindex gnus-uu-ignore-default-archive-rules
7858 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7859 unpacking commands.
7860
7861 @item gnus-uu-kill-carriage-return
7862 @vindex gnus-uu-kill-carriage-return
7863 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7864 from articles.
7865
7866 @item gnus-uu-unmark-articles-not-decoded
7867 @vindex gnus-uu-unmark-articles-not-decoded
7868 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7869 decoded articles as unread.
7870
7871 @item gnus-uu-correct-stripped-uucode
7872 @vindex gnus-uu-correct-stripped-uucode
7873 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7874 uuencoded files that have had trailing spaces deleted.
7875
7876 @item gnus-uu-pre-uudecode-hook
7877 @vindex gnus-uu-pre-uudecode-hook
7878 Hook run before sending a message to @code{uudecode}.
7879
7880 @item gnus-uu-view-with-metamail
7881 @vindex gnus-uu-view-with-metamail
7882 @cindex metamail
7883 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7884 commands defined by the rule variables and just fudge a @acronym{MIME}
7885 content type based on the file name.  The result will be fed to
7886 @code{metamail} for viewing.
7887
7888 @item gnus-uu-save-in-digest
7889 @vindex gnus-uu-save-in-digest
7890 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7891 decoding, will save in digests.  If this variable is @code{nil},
7892 @code{gnus-uu} will just save everything in a file without any
7893 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7894 to specify any meaningful volume and issue numbers were found, so I
7895 simply dropped them.
7896
7897 @end table
7898
7899
7900 @node Uuencoding and Posting
7901 @subsubsection Uuencoding and Posting
7902
7903 @table @code
7904
7905 @item gnus-uu-post-include-before-composing
7906 @vindex gnus-uu-post-include-before-composing
7907 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7908 before you compose the article.  If this variable is @code{t}, you can
7909 either include an encoded file with @kbd{C-c C-i} or have one included
7910 for you when you post the article.
7911
7912 @item gnus-uu-post-length
7913 @vindex gnus-uu-post-length
7914 Maximum length of an article.  The encoded file will be split into how
7915 many articles it takes to post the entire file.
7916
7917 @item gnus-uu-post-threaded
7918 @vindex gnus-uu-post-threaded
7919 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7920 thread.  This may not be smart, as no other decoder I have seen is able
7921 to follow threads when collecting uuencoded articles.  (Well, I have
7922 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7923 think that counts@dots{}) Default is @code{nil}.
7924
7925 @item gnus-uu-post-separate-description
7926 @vindex gnus-uu-post-separate-description
7927 Non-@code{nil} means that the description will be posted in a separate
7928 article.  The first article will typically be numbered (0/x).  If this
7929 variable is @code{nil}, the description the user enters will be included
7930 at the beginning of the first article, which will be numbered (1/x).
7931 Default is @code{t}.
7932
7933 @end table
7934
7935
7936 @node Viewing Files
7937 @subsection Viewing Files
7938 @cindex viewing files
7939 @cindex pseudo-articles
7940
7941 After decoding, if the file is some sort of archive, Gnus will attempt
7942 to unpack the archive and see if any of the files in the archive can be
7943 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7944 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
7945 uncompress and de-tar the main file, and then view the two pictures.
7946 This unpacking process is recursive, so if the archive contains archives
7947 of archives, it'll all be unpacked.
7948
7949 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
7950 extracted file into the summary buffer.  If you go to these
7951 ``articles'', you will be prompted for a command to run (usually Gnus
7952 will make a suggestion), and then the command will be run.
7953
7954 @vindex gnus-view-pseudo-asynchronously
7955 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7956 until the viewing is done before proceeding.
7957
7958 @vindex gnus-view-pseudos
7959 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7960 the pseudo-articles into the summary buffer, but view them
7961 immediately.  If this variable is @code{not-confirm}, the user won't even
7962 be asked for a confirmation before viewing is done.
7963
7964 @vindex gnus-view-pseudos-separately
7965 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7966 pseudo-article will be created for each file to be viewed.  If
7967 @code{nil}, all files that use the same viewing command will be given as
7968 a list of parameters to that command.
7969
7970 @vindex gnus-insert-pseudo-articles
7971 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7972 pseudo-articles when decoding.  It is @code{t} by default.
7973
7974 So; there you are, reading your @emph{pseudo-articles} in your
7975 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7976 Why isn't anything real anymore? How did we get here?
7977
7978
7979 @node Article Treatment
7980 @section Article Treatment
7981
7982 Reading through this huge manual, you may have quite forgotten that the
7983 object of newsreaders is to actually, like, read what people have
7984 written.  Reading articles.  Unfortunately, people are quite bad at
7985 writing, so there are tons of functions and variables to make reading
7986 these articles easier.
7987
7988 @menu
7989 * Article Highlighting::        You want to make the article look like fruit salad.
7990 * Article Fontisizing::         Making emphasized text look nice.
7991 * Article Hiding::              You also want to make certain info go away.
7992 * Article Washing::             Lots of way-neat functions to make life better.
7993 * Article Header::              Doing various header transformations.
7994 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7995 * Article Button Levels::       Controlling appearance of buttons.
7996 * Article Date::                Grumble, UT!
7997 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7998 * Article Signature::           What is a signature?
7999 * Article Miscellanea::         Various other stuff.
8000 @end menu
8001
8002
8003 @node Article Highlighting
8004 @subsection Article Highlighting
8005 @cindex highlighting
8006
8007 Not only do you want your article buffer to look like fruit salad, but
8008 you want it to look like technicolor fruit salad.
8009
8010 @table @kbd
8011
8012 @item W H a
8013 @kindex W H a (Summary)
8014 @findex gnus-article-highlight
8015 @findex gnus-article-maybe-highlight
8016 Do much highlighting of the current article
8017 (@code{gnus-article-highlight}).  This function highlights header, cited
8018 text, the signature, and adds buttons to the body and the head.
8019
8020 @item W H h
8021 @kindex W H h (Summary)
8022 @findex gnus-article-highlight-headers
8023 @vindex gnus-header-face-alist
8024 Highlight the headers (@code{gnus-article-highlight-headers}).  The
8025 highlighting will be done according to the @code{gnus-header-face-alist}
8026 variable, which is a list where each element has the form
8027 @code{(@var{regexp} @var{name} @var{content})}.
8028 @var{regexp} is a regular expression for matching the
8029 header, @var{name} is the face used for highlighting the header name
8030 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
8031 the header value.  The first match made will be used.  Note that
8032 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
8033
8034 @item W H c
8035 @kindex W H c (Summary)
8036 @findex gnus-article-highlight-citation
8037 Highlight cited text (@code{gnus-article-highlight-citation}).
8038
8039 Some variables to customize the citation highlights:
8040
8041 @table @code
8042 @vindex gnus-cite-parse-max-size
8043
8044 @item gnus-cite-parse-max-size
8045 If the article size if bigger than this variable (which is 25000 by
8046 default), no citation highlighting will be performed.
8047
8048 @item gnus-cite-max-prefix
8049 @vindex gnus-cite-max-prefix
8050 Maximum possible length for a citation prefix (default 20).
8051
8052 @item gnus-cite-face-list
8053 @vindex gnus-cite-face-list
8054 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8055 When there are citations from multiple articles in the same message,
8056 Gnus will try to give each citation from each article its own face.
8057 This should make it easier to see who wrote what.
8058
8059 @item gnus-supercite-regexp
8060 @vindex gnus-supercite-regexp
8061 Regexp matching normal Supercite attribution lines.
8062
8063 @item gnus-supercite-secondary-regexp
8064 @vindex gnus-supercite-secondary-regexp
8065 Regexp matching mangled Supercite attribution lines.
8066
8067 @item gnus-cite-minimum-match-count
8068 @vindex gnus-cite-minimum-match-count
8069 Minimum number of identical prefixes we have to see before we believe
8070 that it's a citation.
8071
8072 @item gnus-cite-attribution-prefix
8073 @vindex gnus-cite-attribution-prefix
8074 Regexp matching the beginning of an attribution line.
8075
8076 @item gnus-cite-attribution-suffix
8077 @vindex gnus-cite-attribution-suffix
8078 Regexp matching the end of an attribution line.
8079
8080 @item gnus-cite-attribution-face
8081 @vindex gnus-cite-attribution-face
8082 Face used for attribution lines.  It is merged with the face for the
8083 cited text belonging to the attribution.
8084
8085 @end table
8086
8087
8088 @item W H s
8089 @kindex W H s (Summary)
8090 @vindex gnus-signature-separator
8091 @vindex gnus-signature-face
8092 @findex gnus-article-highlight-signature
8093 Highlight the signature (@code{gnus-article-highlight-signature}).
8094 Everything after @code{gnus-signature-separator} (@pxref{Article
8095 Signature}) in an article will be considered a signature and will be
8096 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8097 default.
8098
8099 @end table
8100
8101 @xref{Customizing Articles}, for how to highlight articles automatically.
8102
8103
8104 @node Article Fontisizing
8105 @subsection Article Fontisizing
8106 @cindex emphasis
8107 @cindex article emphasis
8108
8109 @findex gnus-article-emphasize
8110 @kindex W e (Summary)
8111 People commonly add emphasis to words in news articles by writing things
8112 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8113 this look nicer by running the article through the @kbd{W e}
8114 (@code{gnus-article-emphasize}) command.
8115
8116 @vindex gnus-emphasis-alist
8117 How the emphasis is computed is controlled by the
8118 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8119 element is a regular expression to be matched.  The second is a number
8120 that says what regular expression grouping is used to find the entire
8121 emphasized word.  The third is a number that says what regexp grouping
8122 should be displayed and highlighted.  (The text between these two
8123 groupings will be hidden.)  The fourth is the face used for
8124 highlighting.
8125
8126 @lisp
8127 (setq gnus-emphasis-alist
8128       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8129         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8130 @end lisp
8131
8132 @cindex slash
8133 @cindex asterisk
8134 @cindex underline
8135 @cindex /
8136 @cindex *
8137
8138 @vindex gnus-emphasis-underline
8139 @vindex gnus-emphasis-bold
8140 @vindex gnus-emphasis-italic
8141 @vindex gnus-emphasis-underline-bold
8142 @vindex gnus-emphasis-underline-italic
8143 @vindex gnus-emphasis-bold-italic
8144 @vindex gnus-emphasis-underline-bold-italic
8145 By default, there are seven rules, and they use the following faces:
8146 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8147 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8148 @code{gnus-emphasis-underline-italic},
8149 @code{gnus-emphasis-underline-bold}, and
8150 @code{gnus-emphasis-underline-bold-italic}.
8151
8152 If you want to change these faces, you can either use @kbd{M-x
8153 customize}, or you can use @code{copy-face}.  For instance, if you want
8154 to make @code{gnus-emphasis-italic} use a red face instead, you could
8155 say something like:
8156
8157 @lisp
8158 (copy-face 'red 'gnus-emphasis-italic)
8159 @end lisp
8160
8161 @vindex gnus-group-highlight-words-alist
8162
8163 If you want to highlight arbitrary words, you can use the
8164 @code{gnus-group-highlight-words-alist} variable, which uses the same
8165 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8166 parameter (@pxref{Group Parameters}) can also be used.
8167
8168 @xref{Customizing Articles}, for how to fontize articles automatically.
8169
8170
8171 @node Article Hiding
8172 @subsection Article Hiding
8173 @cindex article hiding
8174
8175 Or rather, hiding certain things in each article.  There usually is much
8176 too much cruft in most articles.
8177
8178 @table @kbd
8179
8180 @item W W a
8181 @kindex W W a (Summary)
8182 @findex gnus-article-hide
8183 Do quite a lot of hiding on the article buffer
8184 (@kbd{gnus-article-hide}).  In particular, this function will hide
8185 headers, @acronym{PGP}, cited text and the signature.
8186
8187 @item W W h
8188 @kindex W W h (Summary)
8189 @findex gnus-article-hide-headers
8190 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8191 Headers}.
8192
8193 @item W W b
8194 @kindex W W b (Summary)
8195 @findex gnus-article-hide-boring-headers
8196 Hide headers that aren't particularly interesting
8197 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8198
8199 @item W W s
8200 @kindex W W s (Summary)
8201 @findex gnus-article-hide-signature
8202 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8203 Signature}.
8204
8205 @item W W l
8206 @kindex W W l (Summary)
8207 @findex gnus-article-hide-list-identifiers
8208 @vindex gnus-list-identifiers
8209 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8210 are strings some mailing list servers add to the beginning of all
8211 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8212 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
8213 may not contain @code{\\(..\\)}.
8214
8215 @table @code
8216
8217 @item gnus-list-identifiers
8218 @vindex gnus-list-identifiers
8219 A regular expression that matches list identifiers to be removed from
8220 subject.  This can also be a list of regular expressions.
8221
8222 @end table
8223
8224 @item W W P
8225 @kindex W W P (Summary)
8226 @findex gnus-article-hide-pem
8227 Hide @acronym{PEM} (privacy enhanced messages) cruft
8228 (@code{gnus-article-hide-pem}).
8229
8230 @item W W B
8231 @kindex W W B (Summary)
8232 @findex gnus-article-strip-banner
8233 @vindex gnus-article-banner-alist
8234 @vindex gnus-article-address-banner-alist
8235 @cindex banner
8236 @cindex OneList
8237 @cindex stripping advertisements
8238 @cindex advertisements
8239 Strip the banner specified by the @code{banner} group parameter
8240 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8241 annoying banners and/or signatures that some mailing lists and moderated
8242 groups adds to all the messages.  The way to use this function is to add
8243 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8244 group you want banners stripped from.  The parameter either be a string,
8245 which will be interpreted as a regular expression matching text to be
8246 removed, or the symbol @code{signature}, meaning that the (last)
8247 signature should be removed, or other symbol, meaning that the
8248 corresponding regular expression in @code{gnus-article-banner-alist} is
8249 used.
8250
8251 Regardless of a group, you can hide things like advertisements only when
8252 the sender of an article has a certain mail address specified in
8253 @code{gnus-article-address-banner-alist}.
8254
8255 @table @code
8256
8257 @item gnus-article-address-banner-alist
8258 @vindex gnus-article-address-banner-alist
8259 Alist of mail addresses and banners.  Each element has the form
8260 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8261 matching a mail address in the From header, @var{banner} is one of a
8262 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8263 a regexp and @code{nil}.  If @var{address} matches author's mail
8264 address, it will remove things like advertisements.  For example, if a
8265 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8266 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8267 sends, you can use the following element to remove them:
8268
8269 @lisp
8270 ("@@yoo-hoo\\.co\\.jp\\'" .
8271  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8272 @end lisp
8273
8274 @end table
8275
8276 @item W W c
8277 @kindex W W c (Summary)
8278 @findex gnus-article-hide-citation
8279 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8280 customizing the hiding:
8281
8282 @table @code
8283
8284 @item gnus-cited-opened-text-button-line-format
8285 @itemx gnus-cited-closed-text-button-line-format
8286 @vindex gnus-cited-closed-text-button-line-format
8287 @vindex gnus-cited-opened-text-button-line-format
8288 Gnus adds buttons to show where the cited text has been hidden, and to
8289 allow toggle hiding the text.  The format of the variable is specified
8290 by these format-like variable (@pxref{Formatting Variables}).  These
8291 specs are valid:
8292
8293 @table @samp
8294 @item b
8295 Starting point of the hidden text.
8296 @item e
8297 Ending point of the hidden text.
8298 @item l
8299 Number of characters in the hidden region.
8300 @item n
8301 Number of lines of hidden text.
8302 @end table
8303
8304 @item gnus-cited-lines-visible
8305 @vindex gnus-cited-lines-visible
8306 The number of lines at the beginning of the cited text to leave
8307 shown.  This can also be a cons cell with the number of lines at the top
8308 and bottom of the text, respectively, to remain visible.
8309
8310 @end table
8311
8312 @item W W C-c
8313 @kindex W W C-c (Summary)
8314 @findex gnus-article-hide-citation-maybe
8315
8316 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8317 following two variables:
8318
8319 @table @code
8320 @item gnus-cite-hide-percentage
8321 @vindex gnus-cite-hide-percentage
8322 If the cited text is of a bigger percentage than this variable (default
8323 50), hide the cited text.
8324
8325 @item gnus-cite-hide-absolute
8326 @vindex gnus-cite-hide-absolute
8327 The cited text must have at least this length (default 10) before it
8328 is hidden.
8329 @end table
8330
8331 @item W W C
8332 @kindex W W C (Summary)
8333 @findex gnus-article-hide-citation-in-followups
8334 Hide cited text in articles that aren't roots
8335 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8336 useful as an interactive command, but might be a handy function to stick
8337 have happen automatically (@pxref{Customizing Articles}).
8338
8339 @end table
8340
8341 All these ``hiding'' commands are toggles, but if you give a negative
8342 prefix to these commands, they will show what they have previously
8343 hidden.  If you give a positive prefix, they will always hide.
8344
8345 Also @pxref{Article Highlighting} for further variables for
8346 citation customization.
8347
8348 @xref{Customizing Articles}, for how to hide article elements
8349 automatically.
8350
8351
8352 @node Article Washing
8353 @subsection Article Washing
8354 @cindex washing
8355 @cindex article washing
8356
8357 We call this ``article washing'' for a really good reason.  Namely, the
8358 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8359
8360 @dfn{Washing} is defined by us as ``changing something from something to
8361 something else'', but normally results in something looking better.
8362 Cleaner, perhaps.
8363
8364 @xref{Customizing Articles}, if you want to change how Gnus displays
8365 articles by default.
8366
8367 @table @kbd
8368
8369 @item C-u g
8370 This is not really washing, it's sort of the opposite of washing.  If
8371 you type this, you see the article exactly as it exists on disk or on
8372 the server.
8373
8374 @item g
8375 Force redisplaying of the current article
8376 (@code{gnus-summary-show-article}).  This is also not really washing.
8377 If you type this, you see the article without any previously applied
8378 interactive Washing functions but with all default treatments
8379 (@pxref{Customizing Articles}).
8380
8381 @item W l
8382 @kindex W l (Summary)
8383 @findex gnus-summary-stop-page-breaking
8384 Remove page breaks from the current article
8385 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8386 delimiters.
8387
8388 @item W r
8389 @kindex W r (Summary)
8390 @findex gnus-summary-caesar-message
8391 @c @icon{gnus-summary-caesar-message}
8392 Do a Caesar rotate (rot13) on the article buffer
8393 (@code{gnus-summary-caesar-message}).
8394 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8395 (Typically offensive jokes and such.)
8396
8397 It's commonly called ``rot13'' because each letter is rotated 13
8398 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8399 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8400 is rumored to have employed this form of, uh, somewhat weak encryption.
8401
8402 @item W m
8403 @kindex W m (Summary)
8404 @findex gnus-summary-morse-message
8405 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8406
8407 @item W t
8408 @item t
8409 @kindex W t (Summary)
8410 @kindex t (Summary)
8411 @findex gnus-summary-toggle-header
8412 Toggle whether to display all headers in the article buffer
8413 (@code{gnus-summary-toggle-header}).
8414
8415 @item W v
8416 @kindex W v (Summary)
8417 @findex gnus-summary-verbose-headers
8418 Toggle whether to display all headers in the article buffer permanently
8419 (@code{gnus-summary-verbose-headers}).
8420
8421 @item W o
8422 @kindex W o (Summary)
8423 @findex gnus-article-treat-overstrike
8424 Treat overstrike (@code{gnus-article-treat-overstrike}).
8425
8426 @item W d
8427 @kindex W d (Summary)
8428 @findex gnus-article-treat-dumbquotes
8429 @vindex gnus-article-dumbquotes-map
8430 @cindex Smartquotes
8431 @cindex M****s*** sm*rtq**t*s
8432 @cindex Latin 1
8433 Treat M****s*** sm*rtq**t*s according to
8434 @code{gnus-article-dumbquotes-map}
8435 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8436 whether a character is a sm*rtq**t* or not, so it should only be used
8437 interactively.
8438
8439 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8440 an attempt to provide more quoting characters.  If you see something
8441 like @code{\222} or @code{\264} where you're expecting some kind of
8442 apostrophe or quotation mark, then try this wash.
8443
8444 @item W Y f
8445 @kindex W Y f (Summary)
8446 @findex gnus-article-outlook-deuglify-article
8447 @cindex Outlook Express
8448 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8449 unwrap lines, repair attribution and rearrange citation.
8450 (@code{gnus-article-outlook-deuglify-article}).
8451
8452 @item W Y u
8453 @kindex W Y u (Summary)
8454 @findex gnus-article-outlook-unwrap-lines
8455 @vindex gnus-outlook-deuglify-unwrap-min
8456 @vindex gnus-outlook-deuglify-unwrap-max
8457 Unwrap lines that appear to be wrapped citation lines.  You can control
8458 what lines will be unwrapped by frobbing
8459 @code{gnus-outlook-deuglify-unwrap-min} and
8460 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
8461 maximum length of an unwrapped citation line.
8462 (@code{gnus-article-outlook-unwrap-lines}).
8463
8464 @item W Y a
8465 @kindex W Y a (Summary)
8466 @findex gnus-article-outlook-repair-attribution
8467 Repair a broken attribution line.@*
8468 (@code{gnus-article-outlook-repair-attribution}).
8469
8470 @item W Y c
8471 @kindex W Y c (Summary)
8472 @findex gnus-article-outlook-rearrange-citation
8473 Repair broken citations by rearranging the text.
8474 (@code{gnus-article-outlook-rearrange-citation}).
8475
8476 @item W w
8477 @kindex W w (Summary)
8478 @findex gnus-article-fill-cited-article
8479 Do word wrap (@code{gnus-article-fill-cited-article}).
8480
8481 You can give the command a numerical prefix to specify the width to use
8482 when filling.
8483
8484 @item W Q
8485 @kindex W Q (Summary)
8486 @findex gnus-article-fill-long-lines
8487 Fill long lines (@code{gnus-article-fill-long-lines}).
8488
8489 @item W C
8490 @kindex W C (Summary)
8491 @findex gnus-article-capitalize-sentences
8492 Capitalize the first word in each sentence
8493 (@code{gnus-article-capitalize-sentences}).
8494
8495 @item W c
8496 @kindex W c (Summary)
8497 @findex gnus-article-remove-cr
8498 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8499 (this takes care of DOS line endings), and then translate any remaining
8500 CRs into LF (this takes care of Mac line endings)
8501 (@code{gnus-article-remove-cr}).
8502
8503 @item W q
8504 @kindex W q (Summary)
8505 @findex gnus-article-de-quoted-unreadable
8506 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8507 Quoted-Printable is one common @acronym{MIME} encoding employed when
8508 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
8509 makes strings like @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which
8510 doesn't look very readable to me.  Note that this is usually done
8511 automatically by Gnus if the message in question has a
8512 @code{Content-Transfer-Encoding} header that says that this encoding
8513 has been done.  If a prefix is given, a charset will be asked for.
8514
8515 @item W 6
8516 @kindex W 6 (Summary)
8517 @findex gnus-article-de-base64-unreadable
8518 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
8519 one common @acronym{MIME} encoding employed when sending
8520 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
8521 usually done automatically by Gnus if the message in question has a
8522 @code{Content-Transfer-Encoding} header that says that this encoding
8523 has been done.  If a prefix is given, a charset will be asked for.
8524
8525 @item W Z
8526 @kindex W Z (Summary)
8527 @findex gnus-article-decode-HZ
8528 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8529 common encoding employed when sending Chinese articles.  It typically
8530 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8531
8532 @item W u
8533 @kindex W u (Summary)
8534 @findex gnus-article-unsplit-urls
8535 Remove newlines from within URLs.  Some mailers insert newlines into
8536 outgoing email messages to keep lines short.  This reformatting can
8537 split long URLs onto multiple lines.  Repair those URLs by removing
8538 the newlines (@code{gnus-article-unsplit-urls}).
8539
8540 @item W h
8541 @kindex W h (Summary)
8542 @findex gnus-article-wash-html
8543 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
8544 usually done automatically by Gnus if the message in question has a
8545 @code{Content-Type} header that says that the message is @acronym{HTML}.
8546
8547 If a prefix is given, a charset will be asked for.
8548
8549 @vindex gnus-article-wash-function
8550 The default is to use the function specified by
8551 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
8552 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
8553 @acronym{HTML}, but this is controlled by the
8554 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8555 can use include:
8556
8557 @table @code
8558 @item w3
8559 Use Emacs/w3.
8560
8561 @item w3m
8562 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
8563
8564 @item links
8565 Use @uref{http://links.sf.net/, Links}.
8566
8567 @item lynx
8568 Use @uref{http://lynx.isc.org/, Lynx}.
8569
8570 @item html2text
8571 Use html2text---a simple @acronym{HTML} converter included with Gnus.
8572
8573 @end table
8574
8575 @item W b
8576 @kindex W b (Summary)
8577 @findex gnus-article-add-buttons
8578 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8579 @xref{Article Buttons}.
8580
8581 @item W B
8582 @kindex W B (Summary)
8583 @findex gnus-article-add-buttons-to-head
8584 Add clickable buttons to the article headers
8585 (@code{gnus-article-add-buttons-to-head}).
8586
8587 @item W p
8588 @kindex W p (Summary)
8589 @findex gnus-article-verify-x-pgp-sig
8590 Verify a signed control message
8591 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
8592 @code{newgroup} and @code{checkgroups} are usually signed by the
8593 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
8594 the maintainer to your keyring to verify the
8595 message.@footnote{@acronym{PGP} keys for many hierarchies are
8596 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8597
8598 @item W s
8599 @kindex W s (Summary)
8600 @findex gnus-summary-force-verify-and-decrypt
8601 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
8602 @acronym{S/MIME}) message
8603 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8604
8605 @item W a
8606 @kindex W a (Summary)
8607 @findex gnus-article-strip-headers-in-body
8608 Strip headers like the @code{X-No-Archive} header from the beginning of
8609 article bodies (@code{gnus-article-strip-headers-in-body}).
8610
8611 @item W E l
8612 @kindex W E l (Summary)
8613 @findex gnus-article-strip-leading-blank-lines
8614 Remove all blank lines from the beginning of the article
8615 (@code{gnus-article-strip-leading-blank-lines}).
8616
8617 @item W E m
8618 @kindex W E m (Summary)
8619 @findex gnus-article-strip-multiple-blank-lines
8620 Replace all blank lines with empty lines and then all multiple empty
8621 lines with a single empty line.
8622 (@code{gnus-article-strip-multiple-blank-lines}).
8623
8624 @item W E t
8625 @kindex W E t (Summary)
8626 @findex gnus-article-remove-trailing-blank-lines
8627 Remove all blank lines at the end of the article
8628 (@code{gnus-article-remove-trailing-blank-lines}).
8629
8630 @item W E a
8631 @kindex W E a (Summary)
8632 @findex gnus-article-strip-blank-lines
8633 Do all the three commands above
8634 (@code{gnus-article-strip-blank-lines}).
8635
8636 @item W E A
8637 @kindex W E A (Summary)
8638 @findex gnus-article-strip-all-blank-lines
8639 Remove all blank lines
8640 (@code{gnus-article-strip-all-blank-lines}).
8641
8642 @item W E s
8643 @kindex W E s (Summary)
8644 @findex gnus-article-strip-leading-space
8645 Remove all white space from the beginning of all lines of the article
8646 body (@code{gnus-article-strip-leading-space}).
8647
8648 @item W E e
8649 @kindex W E e (Summary)
8650 @findex gnus-article-strip-trailing-space
8651 Remove all white space from the end of all lines of the article
8652 body (@code{gnus-article-strip-trailing-space}).
8653
8654 @end table
8655
8656 @xref{Customizing Articles}, for how to wash articles automatically.
8657
8658
8659 @node Article Header
8660 @subsection Article Header
8661
8662 These commands perform various transformations of article header.
8663
8664 @table @kbd
8665
8666 @item W G u
8667 @kindex W G u (Summary)
8668 @findex gnus-article-treat-unfold-headers
8669 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8670
8671 @item W G n
8672 @kindex W G n (Summary)
8673 @findex gnus-article-treat-fold-newsgroups
8674 Fold the @code{Newsgroups} and @code{Followup-To} headers
8675 (@code{gnus-article-treat-fold-newsgroups}).
8676
8677 @item W G f
8678 @kindex W G f (Summary)
8679 @findex gnus-article-treat-fold-headers
8680 Fold all the message headers
8681 (@code{gnus-article-treat-fold-headers}).
8682
8683 @item W E w
8684 @kindex W E w
8685 @findex gnus-article-remove-leading-whitespace
8686 Remove excessive whitespace from all headers
8687 (@code{gnus-article-remove-leading-whitespace}).
8688
8689 @end table
8690
8691
8692 @node Article Buttons
8693 @subsection Article Buttons
8694 @cindex buttons
8695
8696 People often include references to other stuff in articles, and it would
8697 be nice if Gnus could just fetch whatever it is that people talk about
8698 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8699 button on these references.
8700
8701 @vindex gnus-button-man-handler
8702 Gnus adds @dfn{buttons} to certain standard references by default:
8703 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
8704 Emacs or Gnus related references.  This is controlled by two variables,
8705 one that handles article bodies and one that handles article heads:
8706
8707 @table @code
8708
8709 @item gnus-button-alist
8710 @vindex gnus-button-alist
8711 This is an alist where each entry has this form:
8712
8713 @lisp
8714 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8715 @end lisp
8716
8717 @table @var
8718
8719 @item regexp
8720 All text that match this regular expression (case insensitive) will be
8721 considered an external reference.  Here's a typical regexp that matches
8722 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8723 variable containing a regexp, useful variables to use include
8724 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
8725
8726 @item button-par
8727 Gnus has to know which parts of the matches is to be highlighted.  This
8728 is a number that says what sub-expression of the regexp is to be
8729 highlighted.  If you want it all highlighted, you use 0 here.
8730
8731 @item use-p
8732 This form will be @code{eval}ed, and if the result is non-@code{nil},
8733 this is considered a match.  This is useful if you want extra sifting to
8734 avoid false matches.  Often variables named
8735 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
8736 Levels}, but any other form may be used too.
8737
8738 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
8739
8740 @item function
8741 This function will be called when you click on this button.
8742
8743 @item data-par
8744 As with @var{button-par}, this is a sub-expression number, but this one
8745 says which part of the match is to be sent as data to @var{function}.
8746
8747 @end table
8748
8749 So the full entry for buttonizing URLs is then
8750
8751 @lisp
8752 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8753 @end lisp
8754
8755 @item gnus-header-button-alist
8756 @vindex gnus-header-button-alist
8757 This is just like the other alist, except that it is applied to the
8758 article head only, and that each entry has an additional element that is
8759 used to say what headers to apply the buttonize coding to:
8760
8761 @lisp
8762 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8763 @end lisp
8764
8765 @var{header} is a regular expression.
8766 @end table
8767
8768 @subsubsection Related variables and functions
8769
8770 @table @code
8771 @item gnus-button-@var{*}-level
8772 @xref{Article Button Levels}.
8773
8774 @c Stuff related to gnus-button-browse-level
8775
8776 @item gnus-button-url-regexp
8777 @vindex gnus-button-url-regexp
8778 A regular expression that matches embedded URLs.  It is used in the
8779 default values of the variables above.
8780
8781 @c Stuff related to gnus-button-man-level
8782
8783 @item gnus-button-man-handler
8784 @vindex gnus-button-man-handler
8785 The function to use for displaying man pages.  It must take at least one
8786 argument with a string naming the man page.
8787
8788 @c Stuff related to gnus-button-message-level
8789
8790 @item gnus-button-mid-or-mail-regexp
8791 @vindex gnus-button-mid-or-mail-regexp
8792 Regular expression that matches a message ID or a mail address.
8793
8794 @item gnus-button-prefer-mid-or-mail
8795 @vindex gnus-button-prefer-mid-or-mail
8796 This variable determines what to do when the button on a string as
8797 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
8798 message ID or a mail address.  If it is one of the symbols @code{mid} or
8799 @code{mail}, Gnus will always assume that the string is a message ID or
8800 a mail address, respectively.  If this variable is set to the symbol
8801 @code{ask}, always query the user what do do.  If it is a function, this
8802 function will be called with the string as its only argument.  The
8803 function must return @code{mid}, @code{mail}, @code{invalid} or
8804 @code{ask}.  The default value is the function
8805 @code{gnus-button-mid-or-mail-heuristic}.
8806
8807 @item gnus-button-mid-or-mail-heuristic
8808 @findex gnus-button-mid-or-mail-heuristic
8809 Function that guesses whether its argument is a message ID or a mail
8810 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
8811 it's a mail address, @code{ask} if unsure and @code{invalid} if the
8812 string is invalid.
8813
8814 @item gnus-button-mid-or-mail-heuristic-alist
8815 @vindex gnus-button-mid-or-mail-heuristic-alist
8816 An alist of @code{(RATE . REGEXP)} pairs used by the function
8817 @code{gnus-button-mid-or-mail-heuristic}.
8818
8819 @c Stuff related to gnus-button-tex-level
8820
8821 @item gnus-button-ctan-handler
8822 @findex gnus-button-ctan-handler
8823 The function to use for displaying CTAN links.  It must take one
8824 argument, the string naming the URL.
8825
8826 @item gnus-ctan-url
8827 @vindex gnus-ctan-url
8828 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
8829 by @code{gnus-button-ctan-handler}.
8830
8831 @c Misc stuff
8832
8833 @item gnus-article-button-face
8834 @vindex gnus-article-button-face
8835 Face used on buttons.
8836
8837 @item gnus-article-mouse-face
8838 @vindex gnus-article-mouse-face
8839 Face used when the mouse cursor is over a button.
8840
8841 @end table
8842
8843 @xref{Customizing Articles}, for how to buttonize articles automatically.
8844
8845
8846 @node Article Button Levels
8847 @subsection Article button levels
8848 @cindex button levels
8849 The higher the value of the variables @code{gnus-button-@var{*}-level},
8850 the more buttons will appear.  If the level is zero, no corresponding
8851 buttons are displayed.  With the default value (which is 5) you should
8852 already see quite a lot of buttons.  With higher levels, you will see
8853 more buttons, but you may also get more false positives.  To avoid them,
8854 you can set the variables @code{gnus-button-@var{*}-level} local to
8855 specific groups (@pxref{Group Parameters}).  Here's an example for the
8856 variable @code{gnus-parameters}:
8857
8858 @lisp
8859 ;; @r{increase @code{gnus-button-*-level} in some groups:}
8860 (setq gnus-parameters
8861       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
8862         ("\\<unix\\>"               (gnus-button-man-level 10))
8863         ("\\<tex\\>"                (gnus-button-tex-level 10))))
8864 @end lisp
8865
8866 @table @code
8867
8868 @item gnus-button-browse-level
8869 @vindex gnus-button-browse-level
8870 Controls the display of references to message IDs, mail addresses and
8871 news URLs.  Related variables and functions include
8872 @code{gnus-button-url-regexp}, @code{browse-url}, and
8873 @code{browse-url-browser-function}.
8874
8875 @item gnus-button-emacs-level
8876 @vindex gnus-button-emacs-level
8877 Controls the display of Emacs or Gnus references.  Related functions are
8878 @code{gnus-button-handle-custom},
8879 @code{gnus-button-handle-describe-function},
8880 @code{gnus-button-handle-describe-variable},
8881 @code{gnus-button-handle-symbol},
8882 @code{gnus-button-handle-describe-key},
8883 @code{gnus-button-handle-apropos},
8884 @code{gnus-button-handle-apropos-command},
8885 @code{gnus-button-handle-apropos-variable},
8886 @code{gnus-button-handle-apropos-documentation}, and
8887 @code{gnus-button-handle-library}.
8888
8889 @item gnus-button-man-level
8890 @vindex gnus-button-man-level
8891 Controls the display of references to (Unix) man pages.
8892 See @code{gnus-button-man-handler}.
8893
8894 @item gnus-button-message-level
8895 @vindex gnus-button-message-level
8896 Controls the display of message IDs, mail addresses and news URLs.
8897 Related variables and functions include
8898 @code{gnus-button-mid-or-mail-regexp},
8899 @code{gnus-button-prefer-mid-or-mail},
8900 @code{gnus-button-mid-or-mail-heuristic}, and
8901 @code{gnus-button-mid-or-mail-heuristic-alist}.
8902
8903 @item gnus-button-tex-level
8904 @vindex gnus-button-tex-level
8905 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
8906 URLs.  See the variables @code{gnus-ctan-url},
8907 @code{gnus-button-ctan-handler},
8908 @code{gnus-button-ctan-directory-regexp}, and
8909 @code{gnus-button-handle-ctan-bogus-regexp}.
8910
8911 @end table
8912
8913
8914 @node Article Date
8915 @subsection Article Date
8916
8917 The date is most likely generated in some obscure timezone you've never
8918 heard of, so it's quite nice to be able to find out what the time was
8919 when the article was sent.
8920
8921 @table @kbd
8922
8923 @item W T u
8924 @kindex W T u (Summary)
8925 @findex gnus-article-date-ut
8926 Display the date in UT (aka. GMT, aka ZULU)
8927 (@code{gnus-article-date-ut}).
8928
8929 @item W T i
8930 @kindex W T i (Summary)
8931 @findex gnus-article-date-iso8601
8932 @cindex ISO 8601
8933 Display the date in international format, aka. ISO 8601
8934 (@code{gnus-article-date-iso8601}).
8935
8936 @item W T l
8937 @kindex W T l (Summary)
8938 @findex gnus-article-date-local
8939 Display the date in the local timezone (@code{gnus-article-date-local}).
8940
8941 @item W T p
8942 @kindex W T p (Summary)
8943 @findex gnus-article-date-english
8944 Display the date in a format that's easily pronounceable in English
8945 (@code{gnus-article-date-english}).
8946
8947 @item W T s
8948 @kindex W T s (Summary)
8949 @vindex gnus-article-time-format
8950 @findex gnus-article-date-user
8951 @findex format-time-string
8952 Display the date using a user-defined format
8953 (@code{gnus-article-date-user}).  The format is specified by the
8954 @code{gnus-article-time-format} variable, and is a string that's passed
8955 to @code{format-time-string}.  See the documentation of that variable
8956 for a list of possible format specs.
8957
8958 @item W T e
8959 @kindex W T e (Summary)
8960 @findex gnus-article-date-lapsed
8961 @findex gnus-start-date-timer
8962 @findex gnus-stop-date-timer
8963 Say how much time has elapsed between the article was posted and now
8964 (@code{gnus-article-date-lapsed}).  It looks something like:
8965
8966 @example
8967 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8968 @end example
8969
8970 @vindex gnus-article-date-lapsed-new-header
8971 The value of @code{gnus-article-date-lapsed-new-header} determines
8972 whether this header will just be added below the old Date one, or will
8973 replace it.
8974
8975 An advantage of using Gnus to read mail is that it converts simple bugs
8976 into wonderful absurdities.
8977
8978 If you want to have this line updated continually, you can put
8979
8980 @lisp
8981 (gnus-start-date-timer)
8982 @end lisp
8983
8984 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
8985 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8986 command.
8987
8988 @item W T o
8989 @kindex W T o (Summary)
8990 @findex gnus-article-date-original
8991 Display the original date (@code{gnus-article-date-original}).  This can
8992 be useful if you normally use some other conversion function and are
8993 worried that it might be doing something totally wrong.  Say, claiming
8994 that the article was posted in 1854.  Although something like that is
8995 @emph{totally} impossible.  Don't you trust me? *titter*
8996
8997 @end table
8998
8999 @xref{Customizing Articles}, for how to display the date in your
9000 preferred format automatically.
9001
9002
9003 @node Article Display
9004 @subsection Article Display
9005 @cindex picons
9006 @cindex x-face
9007 @cindex smileys
9008
9009 These commands add various frivolous display gimmicks to the article
9010 buffer in Emacs versions that support them.
9011
9012 @code{X-Face} headers are small black-and-white images supplied by the
9013 message headers (@pxref{X-Face}).
9014
9015 @code{Face} headers are small colored images supplied by the message
9016 headers (@pxref{Face}).
9017
9018 Smileys are those little @samp{:-)} symbols that people like to litter
9019 their messages with (@pxref{Smileys}).
9020
9021 Picons, on the other hand, reside on your own system, and Gnus will
9022 try to match the headers to what you have (@pxref{Picons}).
9023
9024 All these functions are toggles---if the elements already exist,
9025 they'll be removed.
9026
9027 @table @kbd
9028 @item W D x
9029 @kindex W D x (Summary)
9030 @findex gnus-article-display-x-face
9031 Display an @code{X-Face} in the @code{From} header.
9032 (@code{gnus-article-display-x-face}).
9033
9034 @item W D d
9035 @kindex W D d (Summary)
9036 @findex gnus-article-display-face
9037 Display a @code{Face} in the @code{From} header.
9038 (@code{gnus-article-display-face}).
9039
9040 @item W D s
9041 @kindex W D s (Summary)
9042 @findex gnus-treat-smiley
9043 Display smileys (@code{gnus-treat-smiley}).
9044
9045 @item W D f
9046 @kindex W D f (Summary)
9047 @findex gnus-treat-from-picon
9048 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9049
9050 @item W D m
9051 @kindex W D m (Summary)
9052 @findex gnus-treat-mail-picon
9053 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9054 (@code{gnus-treat-mail-picon}).
9055
9056 @item W D n
9057 @kindex W D n (Summary)
9058 @findex gnus-treat-newsgroups-picon
9059 Piconify all news headers (i. e., @code{Newsgroups} and
9060 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9061
9062 @item W D D
9063 @kindex W D D (Summary)
9064 @findex gnus-article-remove-images
9065 Remove all images from the article buffer
9066 (@code{gnus-article-remove-images}).
9067
9068 @end table
9069
9070
9071
9072 @node Article Signature
9073 @subsection Article Signature
9074 @cindex signatures
9075 @cindex article signature
9076
9077 @vindex gnus-signature-separator
9078 Each article is divided into two parts---the head and the body.  The
9079 body can be divided into a signature part and a text part.  The variable
9080 that says what is to be considered a signature is
9081 @code{gnus-signature-separator}.  This is normally the standard
9082 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9083 non-standard signature separators, so this variable can also be a list
9084 of regular expressions to be tested, one by one.  (Searches are done
9085 from the end of the body towards the beginning.)  One likely value is:
9086
9087 @lisp
9088 (setq gnus-signature-separator
9089       '("^-- $"         ; @r{The standard}
9090         "^-- *$"        ; @r{A common mangling}
9091         "^-------*$"    ; @r{Many people just use a looong}
9092                         ; @r{line of dashes.  Shame!}
9093         "^ *--------*$" ; @r{Double-shame!}
9094         "^________*$"   ; @r{Underscores are also popular}
9095         "^========*$")) ; @r{Pervert!}
9096 @end lisp
9097
9098 The more permissive you are, the more likely it is that you'll get false
9099 positives.
9100
9101 @vindex gnus-signature-limit
9102 @code{gnus-signature-limit} provides a limit to what is considered a
9103 signature when displaying articles.
9104
9105 @enumerate
9106 @item
9107 If it is an integer, no signature may be longer (in characters) than
9108 that integer.
9109 @item
9110 If it is a floating point number, no signature may be longer (in lines)
9111 than that number.
9112 @item
9113 If it is a function, the function will be called without any parameters,
9114 and if it returns @code{nil}, there is no signature in the buffer.
9115 @item
9116 If it is a string, it will be used as a regexp.  If it matches, the text
9117 in question is not a signature.
9118 @end enumerate
9119
9120 This variable can also be a list where the elements may be of the types
9121 listed above.  Here's an example:
9122
9123 @lisp
9124 (setq gnus-signature-limit
9125       '(200.0 "^---*Forwarded article"))
9126 @end lisp
9127
9128 This means that if there are more than 200 lines after the signature
9129 separator, or the text after the signature separator is matched by
9130 the regular expression @samp{^---*Forwarded article}, then it isn't a
9131 signature after all.
9132
9133
9134 @node Article Miscellanea
9135 @subsection Article Miscellanea
9136
9137 @table @kbd
9138 @item A t
9139 @kindex A t (Summary)
9140 @findex gnus-article-babel
9141 Translate the article from one language to another
9142 (@code{gnus-article-babel}).
9143
9144 @end table
9145
9146
9147 @node MIME Commands
9148 @section MIME Commands
9149 @cindex MIME decoding
9150 @cindex attachments
9151 @cindex viewing attachments
9152
9153 The following commands all understand the numerical prefix.  For
9154 instance, @kbd{3 b} means ``view the third @acronym{MIME} part''.
9155
9156 @table @kbd
9157 @item b
9158 @itemx K v
9159 @kindex b (Summary)
9160 @kindex K v (Summary)
9161 View the @acronym{MIME} part.
9162
9163 @item K o
9164 @kindex K o (Summary)
9165 Save the @acronym{MIME} part.
9166
9167 @item K c
9168 @kindex K c (Summary)
9169 Copy the @acronym{MIME} part.
9170
9171 @item K e
9172 @kindex K e (Summary)
9173 View the @acronym{MIME} part externally.
9174
9175 @item K i
9176 @kindex K i (Summary)
9177 View the @acronym{MIME} part internally.
9178
9179 @item K |
9180 @kindex K | (Summary)
9181 Pipe the @acronym{MIME} part to an external command.
9182 @end table
9183
9184 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9185 the same manner:
9186
9187 @table @kbd
9188 @item K b
9189 @kindex K b (Summary)
9190 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9191 mostly useful if you wish to save (or perform other actions) on inlined
9192 parts.
9193
9194 @item K m
9195 @kindex K m (Summary)
9196 @findex gnus-summary-repair-multipart
9197 Some multipart messages are transmitted with missing or faulty headers.
9198 This command will attempt to ``repair'' these messages so that they can
9199 be viewed in a more pleasant manner
9200 (@code{gnus-summary-repair-multipart}).
9201
9202 @item X m
9203 @kindex X m (Summary)
9204 @findex gnus-summary-save-parts
9205 Save all parts matching a @acronym{MIME} type to a directory
9206 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9207 convention (@pxref{Process/Prefix}).
9208
9209 @item M-t
9210 @kindex M-t (Summary)
9211 @findex gnus-summary-toggle-display-buttonized
9212 Toggle the buttonized display of the article buffer
9213 (@code{gnus-summary-toggle-display-buttonized}).
9214
9215 @item W M w
9216 @kindex W M w (Summary)
9217 @findex gnus-article-decode-mime-words
9218 Decode RFC 2047-encoded words in the article headers
9219 (@code{gnus-article-decode-mime-words}).
9220
9221 @item W M c
9222 @kindex W M c (Summary)
9223 @findex gnus-article-decode-charset
9224 Decode encoded article bodies as well as charsets
9225 (@code{gnus-article-decode-charset}).
9226
9227 This command looks in the @code{Content-Type} header to determine the
9228 charset.  If there is no such header in the article, you can give it a
9229 prefix, which will prompt for the charset to decode as.  In regional
9230 groups where people post using some common encoding (but do not
9231 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9232 parameter to the required charset (@pxref{Group Parameters}).
9233
9234 @item W M v
9235 @kindex W M v (Summary)
9236 @findex gnus-mime-view-all-parts
9237 View all the @acronym{MIME} parts in the current article
9238 (@code{gnus-mime-view-all-parts}).
9239
9240 @end table
9241
9242 Relevant variables:
9243
9244 @table @code
9245 @item gnus-ignored-mime-types
9246 @vindex gnus-ignored-mime-types
9247 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9248 this list will be completely ignored by Gnus.  The default value is
9249 @code{nil}.
9250
9251 To have all Vcards be ignored, you'd say something like this:
9252
9253 @lisp
9254 (setq gnus-ignored-mime-types
9255       '("text/x-vcard"))
9256 @end lisp
9257
9258 @item gnus-article-loose-mime
9259 @vindex gnus-article-loose-mime
9260 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9261 before interpreting the message as a @acronym{MIME} message.  This helps
9262 when reading messages from certain broken mail user agents.  The
9263 default is @code{nil}.
9264
9265 @item gnus-article-emulate-mime
9266 @vindex gnus-article-emulate-mime
9267 There are other, non-@acronym{MIME} encoding methods used.  The most common
9268 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9269 this variable is non-@code{nil}, Gnus will look in message bodies to
9270 see if it finds these encodings, and if so, it'll run them through the
9271 Gnus @acronym{MIME} machinery.  The default is @code{t}.
9272
9273 @item gnus-unbuttonized-mime-types
9274 @vindex gnus-unbuttonized-mime-types
9275 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9276 this list won't have @acronym{MIME} buttons inserted unless they aren't
9277 displayed or this variable is overridden by
9278 @code{gnus-buttonized-mime-types}.  The default value is
9279 @code{(".*/.*")}.  This variable is only used when
9280 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9281
9282 @item gnus-buttonized-mime-types
9283 @vindex gnus-buttonized-mime-types
9284 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9285 this list will have @acronym{MIME} buttons inserted unless they aren't
9286 displayed.  This variable overrides
9287 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9288 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9289 is @code{nil}.
9290
9291 To see e.g. security buttons but no other buttons, you could set this
9292 variable to @code{("multipart/signed")} and leave
9293 @code{gnus-unbuttonized-mime-types} at the default value.
9294
9295 @item gnus-inhibit-mime-unbuttonizing
9296 @vindex gnus-inhibit-mime-unbuttonizing
9297 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9298 default value is @code{nil}.
9299
9300 @item gnus-article-mime-part-function
9301 @vindex gnus-article-mime-part-function
9302 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9303 handle as the parameter.  The function is meant to be used to allow
9304 users to gather information from the article (e. g., add Vcard info to
9305 the bbdb database) or to do actions based on parts (e. g., automatically
9306 save all jpegs into some directory).
9307
9308 Here's an example function the does the latter:
9309
9310 @lisp
9311 (defun my-save-all-jpeg-parts (handle)
9312   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9313     (with-temp-buffer
9314       (insert (mm-get-part handle))
9315       (write-region (point-min) (point-max)
9316                     (read-file-name "Save jpeg to: ")))))
9317 (setq gnus-article-mime-part-function
9318       'my-save-all-jpeg-parts)
9319 @end lisp
9320
9321 @vindex gnus-mime-multipart-functions
9322 @item gnus-mime-multipart-functions
9323 Alist of @acronym{MIME} multipart types and functions to handle them.
9324
9325 @vindex mm-file-name-rewrite-functions
9326 @item mm-file-name-rewrite-functions
9327 List of functions used for rewriting file names of @acronym{MIME} parts.
9328 Each function takes a file name as input and returns a file name.
9329
9330 Ready-made functions include@*
9331 @code{mm-file-name-delete-whitespace},
9332 @code{mm-file-name-trim-whitespace},
9333 @code{mm-file-name-collapse-whitespace}, and
9334 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9335 the variable @code{mm-file-name-replace-whitespace} to replace each
9336 whitespace character in a file name with that string; default value
9337 is @code{"_"} (a single underscore).
9338 @findex mm-file-name-delete-whitespace
9339 @findex mm-file-name-trim-whitespace
9340 @findex mm-file-name-collapse-whitespace
9341 @findex mm-file-name-replace-whitespace
9342 @vindex mm-file-name-replace-whitespace
9343
9344 The standard functions @code{capitalize}, @code{downcase},
9345 @code{upcase}, and @code{upcase-initials} may be useful, too.
9346
9347 Everybody knows that whitespace characters in file names are evil,
9348 except those who don't know.  If you receive lots of attachments from
9349 such unenlightened users, you can make live easier by adding
9350
9351 @lisp
9352 (setq mm-file-name-rewrite-functions
9353       '(mm-file-name-trim-whitespace
9354         mm-file-name-collapse-whitespace
9355         mm-file-name-replace-whitespace))
9356 @end lisp
9357
9358 @noindent
9359 to your @file{~/.gnus.el} file.
9360
9361 @end table
9362
9363
9364 @node Charsets
9365 @section Charsets
9366 @cindex charsets
9367
9368 People use different charsets, and we have @acronym{MIME} to let us know what
9369 charsets they use.  Or rather, we wish we had.  Many people use
9370 newsreaders and mailers that do not understand or use @acronym{MIME}, and
9371 just send out messages without saying what character sets they use.  To
9372 help a bit with this, some local news hierarchies have policies that say
9373 what character set is the default.  For instance, the @samp{fj}
9374 hierarchy uses @code{iso-2022-jp-2}.
9375
9376 @vindex gnus-group-charset-alist
9377 This knowledge is encoded in the @code{gnus-group-charset-alist}
9378 variable, which is an alist of regexps (use the first item to match full
9379 group names) and default charsets to be used when reading these groups.
9380
9381 @vindex gnus-newsgroup-ignored-charsets
9382 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
9383 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9384 even if they really are in @code{koi-8}.  To help here, the
9385 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9386 charsets that are listed here will be ignored.  The variable can be
9387 set on a group-by-group basis using the group parameters (@pxref{Group
9388 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9389 which includes values some agents insist on having in there.
9390
9391 @vindex gnus-group-posting-charset-alist
9392 When posting, @code{gnus-group-posting-charset-alist} is used to
9393 determine which charsets should not be encoded using the @acronym{MIME}
9394 encodings.  For instance, some hierarchies discourage using
9395 quoted-printable header encoding.
9396
9397 This variable is an alist of regexps and permitted unencoded charsets
9398 for posting.  Each element of the alist has the form @code{(}@var{test
9399 header body-list}@code{)}, where:
9400
9401 @table @var
9402 @item test
9403 is either a regular expression matching the newsgroup header or a
9404 variable to query,
9405 @item header
9406 is the charset which may be left unencoded in the header (@code{nil}
9407 means encode all charsets),
9408 @item body-list
9409 is a list of charsets which may be encoded using 8bit content-transfer
9410 encoding in the body, or one of the special values @code{nil} (always
9411 encode using quoted-printable) or @code{t} (always use 8bit).
9412 @end table
9413
9414 @cindex Russian
9415 @cindex koi8-r
9416 @cindex koi8-u
9417 @cindex iso-8859-5
9418 @cindex coding system aliases
9419 @cindex preferred charset
9420
9421 Other charset tricks that may be useful, although not Gnus-specific:
9422
9423 If there are several @acronym{MIME} charsets that encode the same Emacs
9424 charset, you can choose what charset to use by saying the following:
9425
9426 @lisp
9427 (put-charset-property 'cyrillic-iso8859-5
9428                       'preferred-coding-system 'koi8-r)
9429 @end lisp
9430
9431 This means that Russian will be encoded using @code{koi8-r} instead of
9432 the default @code{iso-8859-5} @acronym{MIME} charset.
9433
9434 If you want to read messages in @code{koi8-u}, you can cheat and say
9435
9436 @lisp
9437 (define-coding-system-alias 'koi8-u 'koi8-r)
9438 @end lisp
9439
9440 This will almost do the right thing.
9441
9442 And finally, to read charsets like @code{windows-1251}, you can say
9443 something like
9444
9445 @lisp
9446 (codepage-setup 1251)
9447 (define-coding-system-alias 'windows-1251 'cp1251)
9448 @end lisp
9449
9450
9451 @node Article Commands
9452 @section Article Commands
9453
9454 @table @kbd
9455
9456 @item A P
9457 @cindex PostScript
9458 @cindex printing
9459 @kindex A P (Summary)
9460 @vindex gnus-ps-print-hook
9461 @findex gnus-summary-print-article
9462 Generate and print a PostScript image of the article buffer
9463 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9464 be run just before printing the buffer.  An alternative way to print
9465 article is to use Muttprint (@pxref{Saving Articles}).
9466
9467 @end table
9468
9469
9470 @node Summary Sorting
9471 @section Summary Sorting
9472 @cindex summary sorting
9473
9474 You can have the summary buffer sorted in various ways, even though I
9475 can't really see why you'd want that.
9476
9477 @table @kbd
9478
9479 @item C-c C-s C-n
9480 @kindex C-c C-s C-n (Summary)
9481 @findex gnus-summary-sort-by-number
9482 Sort by article number (@code{gnus-summary-sort-by-number}).
9483
9484 @item C-c C-s C-a
9485 @kindex C-c C-s C-a (Summary)
9486 @findex gnus-summary-sort-by-author
9487 Sort by author (@code{gnus-summary-sort-by-author}).
9488
9489 @item C-c C-s C-s
9490 @kindex C-c C-s C-s (Summary)
9491 @findex gnus-summary-sort-by-subject
9492 Sort by subject (@code{gnus-summary-sort-by-subject}).
9493
9494 @item C-c C-s C-d
9495 @kindex C-c C-s C-d (Summary)
9496 @findex gnus-summary-sort-by-date
9497 Sort by date (@code{gnus-summary-sort-by-date}).
9498
9499 @item C-c C-s C-l
9500 @kindex C-c C-s C-l (Summary)
9501 @findex gnus-summary-sort-by-lines
9502 Sort by lines (@code{gnus-summary-sort-by-lines}).
9503
9504 @item C-c C-s C-c
9505 @kindex C-c C-s C-c (Summary)
9506 @findex gnus-summary-sort-by-chars
9507 Sort by article length (@code{gnus-summary-sort-by-chars}).
9508
9509 @item C-c C-s C-i
9510 @kindex C-c C-s C-i (Summary)
9511 @findex gnus-summary-sort-by-score
9512 Sort by score (@code{gnus-summary-sort-by-score}).
9513
9514 @item C-c C-s C-r
9515 @kindex C-c C-s C-r (Summary)
9516 @findex gnus-summary-sort-by-random
9517 Randomize (@code{gnus-summary-sort-by-random}).
9518
9519 @item C-c C-s C-o
9520 @kindex C-c C-s C-o (Summary)
9521 @findex gnus-summary-sort-by-original
9522 Sort using the default sorting method
9523 (@code{gnus-summary-sort-by-original}).
9524 @end table
9525
9526 These functions will work both when you use threading and when you don't
9527 use threading.  In the latter case, all summary lines will be sorted,
9528 line by line.  In the former case, sorting will be done on a
9529 root-by-root basis, which might not be what you were looking for.  To
9530 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9531 Commands}).
9532
9533
9534 @node Finding the Parent
9535 @section Finding the Parent
9536 @cindex parent articles
9537 @cindex referring articles
9538
9539 @table @kbd
9540 @item ^
9541 @kindex ^ (Summary)
9542 @findex gnus-summary-refer-parent-article
9543 If you'd like to read the parent of the current article, and it is not
9544 displayed in the summary buffer, you might still be able to.  That is,
9545 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
9546 and the @code{References} in the current article are not mangled, you
9547 can just press @kbd{^} or @kbd{A r}
9548 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9549 you'll get the parent.  If the parent is already displayed in the
9550 summary buffer, point will just move to this article.
9551
9552 If given a positive numerical prefix, fetch that many articles back into
9553 the ancestry.  If given a negative numerical prefix, fetch just that
9554 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
9555 grandparent and the grandgrandparent of the current article.  If you say
9556 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
9557 article.
9558
9559 @item A R (Summary)
9560 @findex gnus-summary-refer-references
9561 @kindex A R (Summary)
9562 Fetch all articles mentioned in the @code{References} header of the
9563 article (@code{gnus-summary-refer-references}).
9564
9565 @item A T (Summary)
9566 @findex gnus-summary-refer-thread
9567 @kindex A T (Summary)
9568 Display the full thread where the current article appears
9569 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9570 headers in the current group to work, so it usually takes a while.  If
9571 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9572 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9573 visible effects normally, but it'll make this command work a whole lot
9574 faster.  Of course, it'll make group entry somewhat slow.
9575
9576 @vindex gnus-refer-thread-limit
9577 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9578 articles before the first displayed in the current group) headers to
9579 fetch when doing this command.  The default is 200.  If @code{t}, all
9580 the available headers will be fetched.  This variable can be overridden
9581 by giving the @kbd{A T} command a numerical prefix.
9582
9583 @item M-^ (Summary)
9584 @findex gnus-summary-refer-article
9585 @kindex M-^ (Summary)
9586 @cindex Message-ID
9587 @cindex fetching by Message-ID
9588 You can also ask the @acronym{NNTP} server for an arbitrary article, no
9589 matter what group it belongs to.  @kbd{M-^}
9590 (@code{gnus-summary-refer-article}) will ask you for a
9591 @code{Message-ID}, which is one of those long, hard-to-read thingies
9592 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9593 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9594 @end table
9595
9596 The current select method will be used when fetching by
9597 @code{Message-ID} from non-news select method, but you can override this
9598 by giving this command a prefix.
9599
9600 @vindex gnus-refer-article-method
9601 If the group you are reading is located on a back end that does not
9602 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9603 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
9604 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
9605 updating the spool you are reading from, but that's not really
9606 necessary.
9607
9608 It can also be a list of select methods, as well as the special symbol
9609 @code{current}, which means to use the current select method.  If it
9610 is a list, Gnus will try all the methods in the list until it finds a
9611 match.
9612
9613 Here's an example setting that will first try the current method, and
9614 then ask Google if that fails:
9615
9616 @lisp
9617 (setq gnus-refer-article-method
9618       '(current
9619         (nnweb "google" (nnweb-type google))))
9620 @end lisp
9621
9622 Most of the mail back ends support fetching by @code{Message-ID}, but
9623 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9624 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9625 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9626 only able to locate articles that have been posted to the current group.
9627 (Anything else would be too time consuming.)  @code{nnmh} does not
9628 support this at all.
9629
9630
9631 @node Alternative Approaches
9632 @section Alternative Approaches
9633
9634 Different people like to read news using different methods.  This being
9635 Gnus, we offer a small selection of minor modes for the summary buffers.
9636
9637 @menu
9638 * Pick and Read::               First mark articles and then read them.
9639 * Binary Groups::               Auto-decode all articles.
9640 @end menu
9641
9642
9643 @node Pick and Read
9644 @subsection Pick and Read
9645 @cindex pick and read
9646
9647 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9648 a two-phased reading interface.  The user first marks in a summary
9649 buffer the articles she wants to read.  Then she starts reading the
9650 articles with just an article buffer displayed.
9651
9652 @findex gnus-pick-mode
9653 @kindex M-x gnus-pick-mode
9654 Gnus provides a summary buffer minor mode that allows
9655 this---@code{gnus-pick-mode}.  This basically means that a few process
9656 mark commands become one-keystroke commands to allow easy marking, and
9657 it provides one additional command for switching to the summary buffer.
9658
9659 Here are the available keystrokes when using pick mode:
9660
9661 @table @kbd
9662 @item .
9663 @kindex . (Pick)
9664 @findex gnus-pick-article-or-thread
9665 Pick the article or thread on the current line
9666 (@code{gnus-pick-article-or-thread}).  If the variable
9667 @code{gnus-thread-hide-subtree} is true, then this key selects the
9668 entire thread when used at the first article of the thread.  Otherwise,
9669 it selects just the article.  If given a numerical prefix, go to that
9670 thread or article and pick it.  (The line number is normally displayed
9671 at the beginning of the summary pick lines.)
9672
9673 @item SPACE
9674 @kindex SPACE (Pick)
9675 @findex gnus-pick-next-page
9676 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9677 at the end of the buffer, start reading the picked articles.
9678
9679 @item u
9680 @kindex u (Pick)
9681 @findex gnus-pick-unmark-article-or-thread.
9682 Unpick the thread or article
9683 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9684 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9685 thread if used at the first article of the thread.  Otherwise it unpicks
9686 just the article.  You can give this key a numerical prefix to unpick
9687 the thread or article at that line.
9688
9689 @item RET
9690 @kindex RET (Pick)
9691 @findex gnus-pick-start-reading
9692 @vindex gnus-pick-display-summary
9693 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9694 given a prefix, mark all unpicked articles as read first.  If
9695 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9696 will still be visible when you are reading.
9697
9698 @end table
9699
9700 All the normal summary mode commands are still available in the
9701 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9702 which is mapped to the same function
9703 @code{gnus-summary-tick-article-forward}.
9704
9705 If this sounds like a good idea to you, you could say:
9706
9707 @lisp
9708 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9709 @end lisp
9710
9711 @vindex gnus-pick-mode-hook
9712 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9713
9714 @vindex gnus-mark-unpicked-articles-as-read
9715 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9716 all unpicked articles as read.  The default is @code{nil}.
9717
9718 @vindex gnus-summary-pick-line-format
9719 The summary line format in pick mode is slightly different from the
9720 standard format.  At the beginning of each line the line number is
9721 displayed.  The pick mode line format is controlled by the
9722 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9723 Variables}).  It accepts the same format specs that
9724 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9725
9726
9727 @node Binary Groups
9728 @subsection Binary Groups
9729 @cindex binary groups
9730
9731 @findex gnus-binary-mode
9732 @kindex M-x gnus-binary-mode
9733 If you spend much time in binary groups, you may grow tired of hitting
9734 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9735 is a minor mode for summary buffers that makes all ordinary Gnus article
9736 selection functions uudecode series of articles and display the result
9737 instead of just displaying the articles the normal way.
9738
9739 @kindex g (Binary)
9740 @findex gnus-binary-show-article
9741 The only way, in fact, to see the actual articles is the @kbd{g}
9742 command, when you have turned on this mode
9743 (@code{gnus-binary-show-article}).
9744
9745 @vindex gnus-binary-mode-hook
9746 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9747
9748
9749 @node Tree Display
9750 @section Tree Display
9751 @cindex trees
9752
9753 @vindex gnus-use-trees
9754 If you don't like the normal Gnus summary display, you might try setting
9755 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9756 additional @dfn{tree buffer}.  You can execute all summary mode commands
9757 in the tree buffer.
9758
9759 There are a few variables to customize the tree display, of course:
9760
9761 @table @code
9762 @item gnus-tree-mode-hook
9763 @vindex gnus-tree-mode-hook
9764 A hook called in all tree mode buffers.
9765
9766 @item gnus-tree-mode-line-format
9767 @vindex gnus-tree-mode-line-format
9768 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9769 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9770 of valid specs, @pxref{Summary Buffer Mode Line}.
9771
9772 @item gnus-selected-tree-face
9773 @vindex gnus-selected-tree-face
9774 Face used for highlighting the selected article in the tree buffer.  The
9775 default is @code{modeline}.
9776
9777 @item gnus-tree-line-format
9778 @vindex gnus-tree-line-format
9779 A format string for the tree nodes.  The name is a bit of a misnomer,
9780 though---it doesn't define a line, but just the node.  The default value
9781 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9782 the name of the poster.  It is vital that all nodes are of the same
9783 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9784
9785 Valid specs are:
9786
9787 @table @samp
9788 @item n
9789 The name of the poster.
9790 @item f
9791 The @code{From} header.
9792 @item N
9793 The number of the article.
9794 @item [
9795 The opening bracket.
9796 @item ]
9797 The closing bracket.
9798 @item s
9799 The subject.
9800 @end table
9801
9802 @xref{Formatting Variables}.
9803
9804 Variables related to the display are:
9805
9806 @table @code
9807 @item gnus-tree-brackets
9808 @vindex gnus-tree-brackets
9809 This is used for differentiating between ``real'' articles and
9810 ``sparse'' articles.  The format is
9811 @example
9812 ((@var{real-open} . @var{real-close})
9813  (@var{sparse-open} . @var{sparse-close})
9814  (@var{dummy-open} . @var{dummy-close}))
9815 @end example
9816 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9817
9818 @item gnus-tree-parent-child-edges
9819 @vindex gnus-tree-parent-child-edges
9820 This is a list that contains the characters used for connecting parent
9821 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9822
9823 @end table
9824
9825 @item gnus-tree-minimize-window
9826 @vindex gnus-tree-minimize-window
9827 If this variable is non-@code{nil}, Gnus will try to keep the tree
9828 buffer as small as possible to allow more room for the other Gnus
9829 windows.  If this variable is a number, the tree buffer will never be
9830 higher than that number.  The default is @code{t}.  Note that if you
9831 have several windows displayed side-by-side in a frame and the tree
9832 buffer is one of these, minimizing the tree window will also resize all
9833 other windows displayed next to it.
9834
9835 You may also wish to add the following hook to keep the window minimized
9836 at all times:
9837
9838 @lisp
9839 (add-hook 'gnus-configure-windows-hook
9840           'gnus-tree-perhaps-minimize)
9841 @end lisp
9842
9843 @item gnus-generate-tree-function
9844 @vindex gnus-generate-tree-function
9845 @findex gnus-generate-horizontal-tree
9846 @findex gnus-generate-vertical-tree
9847 The function that actually generates the thread tree.  Two predefined
9848 functions are available: @code{gnus-generate-horizontal-tree} and
9849 @code{gnus-generate-vertical-tree} (which is the default).
9850
9851 @end table
9852
9853 Here's an example from a horizontal tree buffer:
9854
9855 @example
9856 @{***@}-(***)-[odd]-[Gun]
9857      |      \[Jan]
9858      |      \[odd]-[Eri]
9859      |      \(***)-[Eri]
9860      |            \[odd]-[Paa]
9861      \[Bjo]
9862      \[Gun]
9863      \[Gun]-[Jor]
9864 @end example
9865
9866 Here's the same thread displayed in a vertical tree buffer:
9867
9868 @example
9869 @group
9870 @{***@}
9871   |--------------------------\-----\-----\
9872 (***)                         [Bjo] [Gun] [Gun]
9873   |--\-----\-----\                          |
9874 [odd] [Jan] [odd] (***)                   [Jor]
9875   |           |     |--\
9876 [Gun]       [Eri] [Eri] [odd]
9877                           |
9878                         [Paa]
9879 @end group
9880 @end example
9881
9882 If you're using horizontal trees, it might be nice to display the trees
9883 side-by-side with the summary buffer.  You could add something like the
9884 following to your @file{~/.gnus.el} file:
9885
9886 @lisp
9887 (setq gnus-use-trees t
9888       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9889       gnus-tree-minimize-window nil)
9890 (gnus-add-configuration
9891  '(article
9892    (vertical 1.0
9893              (horizontal 0.25
9894                          (summary 0.75 point)
9895                          (tree 1.0))
9896              (article 1.0))))
9897 @end lisp
9898
9899 @xref{Window Layout}.
9900
9901
9902 @node Mail Group Commands
9903 @section Mail Group Commands
9904 @cindex mail group commands
9905
9906 Some commands only make sense in mail groups.  If these commands are
9907 invalid in the current group, they will raise a hell and let you know.
9908
9909 All these commands (except the expiry and edit commands) use the
9910 process/prefix convention (@pxref{Process/Prefix}).
9911
9912 @table @kbd
9913
9914 @item B e
9915 @kindex B e (Summary)
9916 @findex gnus-summary-expire-articles
9917 Run all expirable articles in the current group through the expiry
9918 process (@code{gnus-summary-expire-articles}).  That is, delete all
9919 expirable articles in the group that have been around for a while.
9920 (@pxref{Expiring Mail}).
9921
9922 @item B C-M-e
9923 @kindex B C-M-e (Summary)
9924 @findex gnus-summary-expire-articles-now
9925 Delete all the expirable articles in the group
9926 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9927 articles eligible for expiry in the current group will
9928 disappear forever into that big @file{/dev/null} in the sky.
9929
9930 @item B DEL
9931 @kindex B DEL (Summary)
9932 @findex gnus-summary-delete-article
9933 @c @icon{gnus-summary-mail-delete}
9934 Delete the mail article.  This is ``delete'' as in ``delete it from your
9935 disk forever and ever, never to return again.'' Use with caution.
9936 (@code{gnus-summary-delete-article}).
9937
9938 @item B m
9939 @kindex B m (Summary)
9940 @cindex move mail
9941 @findex gnus-summary-move-article
9942 @vindex gnus-preserve-marks
9943 Move the article from one mail group to another
9944 (@code{gnus-summary-move-article}).  Marks will be preserved if
9945 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9946
9947 @item B c
9948 @kindex B c (Summary)
9949 @cindex copy mail
9950 @findex gnus-summary-copy-article
9951 @c @icon{gnus-summary-mail-copy}
9952 Copy the article from one group (mail group or not) to a mail group
9953 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9954 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9955
9956 @item B B
9957 @kindex B B (Summary)
9958 @cindex crosspost mail
9959 @findex gnus-summary-crosspost-article
9960 Crosspost the current article to some other group
9961 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9962 the article in the other group, and the Xref headers of the article will
9963 be properly updated.
9964
9965 @item B i
9966 @kindex B i (Summary)
9967 @findex gnus-summary-import-article
9968 Import an arbitrary file into the current mail newsgroup
9969 (@code{gnus-summary-import-article}).  You will be prompted for a file
9970 name, a @code{From} header and a @code{Subject} header.
9971
9972 @item B I
9973 @kindex B I (Summary)
9974 @findex gnus-summary-create-article
9975 Create an empty article in the current mail newsgroups
9976 (@code{gnus-summary-create-article}).  You will be prompted for a
9977 @code{From} header and a @code{Subject} header.
9978
9979 @item B r
9980 @kindex B r (Summary)
9981 @findex gnus-summary-respool-article
9982 @vindex gnus-summary-respool-default-method
9983 Respool the mail article (@code{gnus-summary-respool-article}).
9984 @code{gnus-summary-respool-default-method} will be used as the default
9985 select method when respooling.  This variable is @code{nil} by default,
9986 which means that the current group select method will be used instead.
9987 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9988 (which is the default).
9989
9990 @item B w
9991 @itemx e
9992 @kindex B w (Summary)
9993 @kindex e (Summary)
9994 @findex gnus-summary-edit-article
9995 @kindex C-c C-c (Article)
9996 @findex gnus-summary-edit-article-done
9997 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9998 editing and make the changes permanent, type @kbd{C-c C-c}
9999 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
10000 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
10001
10002 @item B q
10003 @kindex B q (Summary)
10004 @findex gnus-summary-respool-query
10005 If you want to re-spool an article, you might be curious as to what group
10006 the article will end up in before you do the re-spooling.  This command
10007 will tell you (@code{gnus-summary-respool-query}).
10008
10009 @item B t
10010 @kindex B t (Summary)
10011 @findex gnus-summary-respool-trace
10012 Similarly, this command will display all fancy splitting patterns used
10013 when respooling, if any (@code{gnus-summary-respool-trace}).
10014
10015 @item B p
10016 @kindex B p (Summary)
10017 @findex gnus-summary-article-posted-p
10018 Some people have a tendency to send you ``courtesy'' copies when they
10019 follow up to articles you have posted.  These usually have a
10020 @code{Newsgroups} header in them, but not always.  This command
10021 (@code{gnus-summary-article-posted-p}) will try to fetch the current
10022 article from your news server (or rather, from
10023 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
10024 report back whether it found the article or not.  Even if it says that
10025 it didn't find the article, it may have been posted anyway---mail
10026 propagation is much faster than news propagation, and the news copy may
10027 just not have arrived yet.
10028
10029 @item K E
10030 @kindex K E (Summary)
10031 @findex gnus-article-encrypt-body
10032 @vindex gnus-article-encrypt-protocol
10033 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
10034 The body is encrypted with the encryption protocol specified by the
10035 variable @code{gnus-article-encrypt-protocol}.
10036
10037 @end table
10038
10039 @vindex gnus-move-split-methods
10040 @cindex moving articles
10041 If you move (or copy) articles regularly, you might wish to have Gnus
10042 suggest where to put the articles.  @code{gnus-move-split-methods} is a
10043 variable that uses the same syntax as @code{gnus-split-methods}
10044 (@pxref{Saving Articles}).  You may customize that variable to create
10045 suggestions you find reasonable.  (Note that
10046 @code{gnus-move-split-methods} uses group names where
10047 @code{gnus-split-methods} uses file names.)
10048
10049 @lisp
10050 (setq gnus-move-split-methods
10051       '(("^From:.*Lars Magne" "nnml:junk")
10052         ("^Subject:.*gnus" "nnfolder:important")
10053         (".*" "nnml:misc")))
10054 @end lisp
10055
10056
10057 @node Various Summary Stuff
10058 @section Various Summary Stuff
10059
10060 @menu
10061 * Summary Group Information::   Information oriented commands.
10062 * Searching for Articles::      Multiple article commands.
10063 * Summary Generation Commands::
10064 * Really Various Summary Commands::  Those pesky non-conformant commands.
10065 @end menu
10066
10067 @table @code
10068 @vindex gnus-summary-display-while-building
10069 @item gnus-summary-display-while-building
10070 If non-@code{nil}, show and update the summary buffer as it's being
10071 built.  If @code{t}, update the buffer after every line is inserted.
10072 If the value is an integer, @var{n}, update the display every @var{n}
10073 lines.  The default is @code{nil}.
10074
10075 @vindex gnus-summary-display-arrow
10076 @item gnus-summary-display-arrow
10077 If non-@code{nil}, display an arrow in the fringe to indicate the
10078 current article.
10079
10080 @vindex gnus-summary-mode-hook
10081 @item gnus-summary-mode-hook
10082 This hook is called when creating a summary mode buffer.
10083
10084 @vindex gnus-summary-generate-hook
10085 @item gnus-summary-generate-hook
10086 This is called as the last thing before doing the threading and the
10087 generation of the summary buffer.  It's quite convenient for customizing
10088 the threading variables based on what data the newsgroup has.  This hook
10089 is called from the summary buffer after most summary buffer variables
10090 have been set.
10091
10092 @vindex gnus-summary-prepare-hook
10093 @item gnus-summary-prepare-hook
10094 It is called after the summary buffer has been generated.  You might use
10095 it to, for instance, highlight lines or modify the look of the buffer in
10096 some other ungodly manner.  I don't care.
10097
10098 @vindex gnus-summary-prepared-hook
10099 @item gnus-summary-prepared-hook
10100 A hook called as the very last thing after the summary buffer has been
10101 generated.
10102
10103 @vindex gnus-summary-ignore-duplicates
10104 @item gnus-summary-ignore-duplicates
10105 When Gnus discovers two articles that have the same @code{Message-ID},
10106 it has to do something drastic.  No articles are allowed to have the
10107 same @code{Message-ID}, but this may happen when reading mail from some
10108 sources.  Gnus allows you to customize what happens with this variable.
10109 If it is @code{nil} (which is the default), Gnus will rename the
10110 @code{Message-ID} (for display purposes only) and display the article as
10111 any other article.  If this variable is @code{t}, it won't display the
10112 article---it'll be as if it never existed.
10113
10114 @vindex gnus-alter-articles-to-read-function
10115 @item gnus-alter-articles-to-read-function
10116 This function, which takes two parameters (the group name and the list
10117 of articles to be selected), is called to allow the user to alter the
10118 list of articles to be selected.
10119
10120 For instance, the following function adds the list of cached articles to
10121 the list in one particular group:
10122
10123 @lisp
10124 (defun my-add-cached-articles (group articles)
10125   (if (string= group "some.group")
10126       (append gnus-newsgroup-cached articles)
10127     articles))
10128 @end lisp
10129
10130 @vindex gnus-newsgroup-variables
10131 @item gnus-newsgroup-variables
10132 A list of newsgroup (summary buffer) local variables, or cons of
10133 variables and their default values (when the default values are not
10134 @code{nil}), that should be made global while the summary buffer is
10135 active.  These variables can be used to set variables in the group
10136 parameters while still allowing them to affect operations done in
10137 other buffers.  For example:
10138
10139 @lisp
10140 (setq gnus-newsgroup-variables
10141       '(message-use-followup-to
10142         (gnus-visible-headers .
10143  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10144 @end lisp
10145
10146 @end table
10147
10148
10149 @node Summary Group Information
10150 @subsection Summary Group Information
10151
10152 @table @kbd
10153
10154 @item H f
10155 @kindex H f (Summary)
10156 @findex gnus-summary-fetch-faq
10157 @vindex gnus-group-faq-directory
10158 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10159 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
10160 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10161 is usually a directory on a remote machine.  This variable can also be
10162 a list of directories.  In that case, giving a prefix to this command
10163 will allow you to choose between the various sites.  @code{ange-ftp}
10164 or @code{efs} will probably be used for fetching the file.
10165
10166 @item H d
10167 @kindex H d (Summary)
10168 @findex gnus-summary-describe-group
10169 Give a brief description of the current group
10170 (@code{gnus-summary-describe-group}).  If given a prefix, force
10171 rereading the description from the server.
10172
10173 @item H h
10174 @kindex H h (Summary)
10175 @findex gnus-summary-describe-briefly
10176 Give an extremely brief description of the most important summary
10177 keystrokes (@code{gnus-summary-describe-briefly}).
10178
10179 @item H i
10180 @kindex H i (Summary)
10181 @findex gnus-info-find-node
10182 Go to the Gnus info node (@code{gnus-info-find-node}).
10183 @end table
10184
10185
10186 @node Searching for Articles
10187 @subsection Searching for Articles
10188
10189 @table @kbd
10190
10191 @item M-s
10192 @kindex M-s (Summary)
10193 @findex gnus-summary-search-article-forward
10194 Search through all subsequent (raw) articles for a regexp
10195 (@code{gnus-summary-search-article-forward}).
10196
10197 @item M-r
10198 @kindex M-r (Summary)
10199 @findex gnus-summary-search-article-backward
10200 Search through all previous (raw) articles for a regexp
10201 (@code{gnus-summary-search-article-backward}).
10202
10203 @item &
10204 @kindex & (Summary)
10205 @findex gnus-summary-execute-command
10206 This command will prompt you for a header, a regular expression to match
10207 on this field, and a command to be executed if the match is made
10208 (@code{gnus-summary-execute-command}).  If the header is an empty
10209 string, the match is done on the entire article.  If given a prefix,
10210 search backward instead.
10211
10212 For instance, @kbd{& RET some.*string RET #} will put the process mark on
10213 all articles that have heads or bodies that match @samp{some.*string}.
10214
10215 @item M-&
10216 @kindex M-& (Summary)
10217 @findex gnus-summary-universal-argument
10218 Perform any operation on all articles that have been marked with
10219 the process mark (@code{gnus-summary-universal-argument}).
10220 @end table
10221
10222 @node Summary Generation Commands
10223 @subsection Summary Generation Commands
10224
10225 @table @kbd
10226
10227 @item Y g
10228 @kindex Y g (Summary)
10229 @findex gnus-summary-prepare
10230 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10231
10232 @item Y c
10233 @kindex Y c (Summary)
10234 @findex gnus-summary-insert-cached-articles
10235 Pull all cached articles (for the current group) into the summary buffer
10236 (@code{gnus-summary-insert-cached-articles}).
10237
10238 @item Y d
10239 @kindex Y d (Summary)
10240 @findex gnus-summary-insert-dormant-articles
10241 Pull all dormant articles (for the current group) into the summary buffer
10242 (@code{gnus-summary-insert-dormant-articles}).
10243
10244 @end table
10245
10246
10247 @node Really Various Summary Commands
10248 @subsection Really Various Summary Commands
10249
10250 @table @kbd
10251
10252 @item A D
10253 @itemx C-d
10254 @kindex C-d (Summary)
10255 @kindex A D (Summary)
10256 @findex gnus-summary-enter-digest-group
10257 If the current article is a collection of other articles (for instance,
10258 a digest), you might use this command to enter a group based on the that
10259 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10260 guess what article type is currently displayed unless you give a prefix
10261 to this command, which forces a ``digest'' interpretation.  Basically,
10262 whenever you see a message that is a collection of other messages of
10263 some format, you @kbd{C-d} and read these messages in a more convenient
10264 fashion.
10265
10266 @item C-M-d
10267 @kindex C-M-d (Summary)
10268 @findex gnus-summary-read-document
10269 This command is very similar to the one above, but lets you gather
10270 several documents into one biiig group
10271 (@code{gnus-summary-read-document}).  It does this by opening several
10272 @code{nndoc} groups for each document, and then opening an
10273 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10274 command understands the process/prefix convention
10275 (@pxref{Process/Prefix}).
10276
10277 @item C-t
10278 @kindex C-t (Summary)
10279 @findex gnus-summary-toggle-truncation
10280 Toggle truncation of summary lines
10281 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10282 line centering function in the summary buffer, so it's not a good idea
10283 to have truncation switched off while reading articles.
10284
10285 @item =
10286 @kindex = (Summary)
10287 @findex gnus-summary-expand-window
10288 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10289 If given a prefix, force an @code{article} window configuration.
10290
10291 @item C-M-e
10292 @kindex C-M-e (Summary)
10293 @findex gnus-summary-edit-parameters
10294 Edit the group parameters (@pxref{Group Parameters}) of the current
10295 group (@code{gnus-summary-edit-parameters}).
10296
10297 @item C-M-a
10298 @kindex C-M-a (Summary)
10299 @findex gnus-summary-customize-parameters
10300 Customize the group parameters (@pxref{Group Parameters}) of the current
10301 group (@code{gnus-summary-customize-parameters}).
10302
10303 @end table
10304
10305
10306 @node Exiting the Summary Buffer
10307 @section Exiting the Summary Buffer
10308 @cindex summary exit
10309 @cindex exiting groups
10310
10311 Exiting from the summary buffer will normally update all info on the
10312 group and return you to the group buffer.
10313
10314 @table @kbd
10315
10316 @item Z Z
10317 @itemx Z Q
10318 @itemx q
10319 @kindex Z Z (Summary)
10320 @kindex Z Q (Summary)
10321 @kindex q (Summary)
10322 @findex gnus-summary-exit
10323 @vindex gnus-summary-exit-hook
10324 @vindex gnus-summary-prepare-exit-hook
10325 @vindex gnus-group-no-more-groups-hook
10326 @c @icon{gnus-summary-exit}
10327 Exit the current group and update all information on the group
10328 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10329 called before doing much of the exiting, which calls
10330 @code{gnus-summary-expire-articles} by default.
10331 @code{gnus-summary-exit-hook} is called after finishing the exit
10332 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10333 group mode having no more (unread) groups.
10334
10335 @item Z E
10336 @itemx Q
10337 @kindex Z E (Summary)
10338 @kindex Q (Summary)
10339 @findex gnus-summary-exit-no-update
10340 Exit the current group without updating any information on the group
10341 (@code{gnus-summary-exit-no-update}).
10342
10343 @item Z c
10344 @itemx c
10345 @kindex Z c (Summary)
10346 @kindex c (Summary)
10347 @findex gnus-summary-catchup-and-exit
10348 @c @icon{gnus-summary-catchup-and-exit}
10349 Mark all unticked articles in the group as read and then exit
10350 (@code{gnus-summary-catchup-and-exit}).
10351
10352 @item Z C
10353 @kindex Z C (Summary)
10354 @findex gnus-summary-catchup-all-and-exit
10355 Mark all articles, even the ticked ones, as read and then exit
10356 (@code{gnus-summary-catchup-all-and-exit}).
10357
10358 @item Z n
10359 @kindex Z n (Summary)
10360 @findex gnus-summary-catchup-and-goto-next-group
10361 Mark all articles as read and go to the next group
10362 (@code{gnus-summary-catchup-and-goto-next-group}).
10363
10364 @item Z R
10365 @itemx C-x C-s
10366 @kindex Z R (Summary)
10367 @kindex C-x C-s (Summary)
10368 @findex gnus-summary-reselect-current-group
10369 Exit this group, and then enter it again
10370 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10371 all articles, both read and unread.
10372
10373 @item Z G
10374 @itemx M-g
10375 @kindex Z G (Summary)
10376 @kindex M-g (Summary)
10377 @findex gnus-summary-rescan-group
10378 @c @icon{gnus-summary-mail-get}
10379 Exit the group, check for new articles in the group, and select the
10380 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10381 articles, both read and unread.
10382
10383 @item Z N
10384 @kindex Z N (Summary)
10385 @findex gnus-summary-next-group
10386 Exit the group and go to the next group
10387 (@code{gnus-summary-next-group}).
10388
10389 @item Z P
10390 @kindex Z P (Summary)
10391 @findex gnus-summary-prev-group
10392 Exit the group and go to the previous group
10393 (@code{gnus-summary-prev-group}).
10394
10395 @item Z s
10396 @kindex Z s (Summary)
10397 @findex gnus-summary-save-newsrc
10398 Save the current number of read/marked articles in the dribble buffer
10399 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10400 given a prefix, also save the @file{.newsrc} file(s).  Using this
10401 command will make exit without updating (the @kbd{Q} command) worthless.
10402 @end table
10403
10404 @vindex gnus-exit-group-hook
10405 @code{gnus-exit-group-hook} is called when you exit the current group
10406 with an ``updating'' exit.  For instance @kbd{Q}
10407 (@code{gnus-summary-exit-no-update}) does not call this hook.
10408
10409 @findex gnus-summary-wake-up-the-dead
10410 @findex gnus-dead-summary-mode
10411 @vindex gnus-kill-summary-on-exit
10412 If you're in the habit of exiting groups, and then changing your mind
10413 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10414 If you do that, Gnus won't kill the summary buffer when you exit it.
10415 (Quelle surprise!)  Instead it will change the name of the buffer to
10416 something like @samp{*Dead Summary ... *} and install a minor mode
10417 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10418 buffer, you'll find that all keys are mapped to a function called
10419 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10420 summary buffer will result in a live, normal summary buffer.
10421
10422 There will never be more than one dead summary buffer at any one time.
10423
10424 @vindex gnus-use-cross-reference
10425 The data on the current group will be updated (which articles you have
10426 read, which articles you have replied to, etc.) when you exit the
10427 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10428 @code{t} (which is the default), articles that are cross-referenced to
10429 this group and are marked as read, will also be marked as read in the
10430 other subscribed groups they were cross-posted to.  If this variable is
10431 neither @code{nil} nor @code{t}, the article will be marked as read in
10432 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10433
10434
10435 @node Crosspost Handling
10436 @section Crosspost Handling
10437
10438 @cindex velveeta
10439 @cindex spamming
10440 Marking cross-posted articles as read ensures that you'll never have to
10441 read the same article more than once.  Unless, of course, somebody has
10442 posted it to several groups separately.  Posting the same article to
10443 several groups (not cross-posting) is called @dfn{spamming}, and you are
10444 by law required to send nasty-grams to anyone who perpetrates such a
10445 heinous crime.  You may want to try NoCeM handling to filter out spam
10446 (@pxref{NoCeM}).
10447
10448 Remember: Cross-posting is kinda ok, but posting the same article
10449 separately to several groups is not.  Massive cross-posting (aka.
10450 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10451 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10452 excessive crossposting (@pxref{Summary Mail Commands}).
10453
10454 @cindex cross-posting
10455 @cindex Xref
10456 @cindex @acronym{NOV}
10457 One thing that may cause Gnus to not do the cross-posting thing
10458 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
10459 (which is very nice, because it speeds things up considerably) which
10460 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
10461 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10462 even with @sc{xover} by registering the @code{Xref} lines of all
10463 articles you actually read, but if you kill the articles, or just mark
10464 them as read without reading them, Gnus will not get a chance to snoop
10465 the @code{Xref} lines out of these articles, and will be unable to use
10466 the cross reference mechanism.
10467
10468 @cindex LIST overview.fmt
10469 @cindex overview.fmt
10470 To check whether your @acronym{NNTP} server includes the @code{Xref} header
10471 in its overview files, try @samp{telnet your.nntp.server nntp},
10472 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10473 overview.fmt}.  This may not work, but if it does, and the last line you
10474 get does not read @samp{Xref:full}, then you should shout and whine at
10475 your news admin until she includes the @code{Xref} header in the
10476 overview files.
10477
10478 @vindex gnus-nov-is-evil
10479 If you want Gnus to get the @code{Xref}s right all the time, you have to
10480 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10481 considerably.
10482
10483 C'est la vie.
10484
10485 For an alternative approach, @pxref{Duplicate Suppression}.
10486
10487
10488 @node Duplicate Suppression
10489 @section Duplicate Suppression
10490
10491 By default, Gnus tries to make sure that you don't have to read the same
10492 article more than once by utilizing the crossposting mechanism
10493 (@pxref{Crosspost Handling}).  However, that simple and efficient
10494 approach may not work satisfactory for some users for various
10495 reasons.
10496
10497 @enumerate
10498 @item
10499 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
10500 is evil and not very common.
10501
10502 @item
10503 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
10504 @file{.overview} data bases.  This is evil and all too common, alas.
10505
10506 @item
10507 You may be reading the same group (or several related groups) from
10508 different @acronym{NNTP} servers.
10509
10510 @item
10511 You may be getting mail that duplicates articles posted to groups.
10512 @end enumerate
10513
10514 I'm sure there are other situations where @code{Xref} handling fails as
10515 well, but these four are the most common situations.
10516
10517 If, and only if, @code{Xref} handling fails for you, then you may
10518 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10519 will remember the @code{Message-ID}s of all articles you have read or
10520 otherwise marked as read, and then, as if by magic, mark them as read
10521 all subsequent times you see them---in @emph{all} groups.  Using this
10522 mechanism is quite likely to be somewhat inefficient, but not overly
10523 so.  It's certainly preferable to reading the same articles more than
10524 once.
10525
10526 Duplicate suppression is not a very subtle instrument.  It's more like a
10527 sledge hammer than anything else.  It works in a very simple
10528 fashion---if you have marked an article as read, it adds this Message-ID
10529 to a cache.  The next time it sees this Message-ID, it will mark the
10530 article as read with the @samp{M} mark.  It doesn't care what group it
10531 saw the article in.
10532
10533 @table @code
10534 @item gnus-suppress-duplicates
10535 @vindex gnus-suppress-duplicates
10536 If non-@code{nil}, suppress duplicates.
10537
10538 @item gnus-save-duplicate-list
10539 @vindex gnus-save-duplicate-list
10540 If non-@code{nil}, save the list of duplicates to a file.  This will
10541 make startup and shutdown take longer, so the default is @code{nil}.
10542 However, this means that only duplicate articles read in a single Gnus
10543 session are suppressed.
10544
10545 @item gnus-duplicate-list-length
10546 @vindex gnus-duplicate-list-length
10547 This variable says how many @code{Message-ID}s to keep in the duplicate
10548 suppression list.  The default is 10000.
10549
10550 @item gnus-duplicate-file
10551 @vindex gnus-duplicate-file
10552 The name of the file to store the duplicate suppression list in.  The
10553 default is @file{~/News/suppression}.
10554 @end table
10555
10556 If you have a tendency to stop and start Gnus often, setting
10557 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10558 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
10559 the other hand, saving the list makes startup and shutdown much slower,
10560 so that means that if you stop and start Gnus often, you should set
10561 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10562 to you to figure out, I think.
10563
10564 @node Security
10565 @section Security
10566
10567 Gnus is able to verify signed messages or decrypt encrypted messages.
10568 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
10569 and @acronym{S/MIME}, however you need some external programs to get
10570 things to work:
10571
10572 @enumerate
10573 @item
10574 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
10575 install an OpenPGP implementation such as GnuPG.  The Lisp interface
10576 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
10577 Manual}), but Mailcrypt and gpg.el are also supported.
10578
10579 @item
10580 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
10581 or newer is recommended.
10582
10583 @end enumerate
10584
10585 More information on how to set things up can be found in the message
10586 manual (@pxref{Security, ,Security, message, Message Manual}).
10587
10588 @table @code
10589 @item mm-verify-option
10590 @vindex mm-verify-option
10591 Option of verifying signed parts.  @code{never}, not verify;
10592 @code{always}, always verify; @code{known}, only verify known
10593 protocols.  Otherwise, ask user.
10594
10595 @item mm-decrypt-option
10596 @vindex mm-decrypt-option
10597 Option of decrypting encrypted parts.  @code{never}, no decryption;
10598 @code{always}, always decrypt; @code{known}, only decrypt known
10599 protocols.  Otherwise, ask user.
10600
10601 @item mml1991-use
10602 @vindex mml1991-use
10603 Symbol indicating elisp interface to OpenPGP implementation for
10604 @acronym{PGP} messages.  The default is @code{pgg}, but
10605 @code{mailcrypt} and @code{gpg} are also supported although
10606 deprecated.
10607
10608 @item mml2015-use
10609 @vindex mml2015-use
10610 Symbol indicating elisp interface to OpenPGP implementation for
10611 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
10612 @code{mailcrypt} and @code{gpg} are also supported although
10613 deprecated.
10614
10615 @end table
10616
10617 @cindex snarfing keys
10618 @cindex importing PGP keys
10619 @cindex PGP key ring import
10620 Snarfing OpenPGP keys (i.e., importing keys from articles into your
10621 key ring) is not supported explicitly through a menu item or command,
10622 rather Gnus do detect and label keys as @samp{application/pgp-keys},
10623 allowing you to specify whatever action you think is appropriate
10624 through the usual @acronym{MIME} infrastructure.  You can use a
10625 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
10626 Emacs MIME Manual}) such as the following to import keys using GNU
10627 Privacy Guard when you click on the @acronym{MIME} button
10628 (@pxref{Using MIME}).
10629
10630 @example
10631 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
10632 @end example
10633 @noindent
10634 This happens to also be the default action defined in
10635 @code{mailcap-mime-data}.
10636
10637 @node Mailing List
10638 @section Mailing List
10639 @cindex mailing list
10640 @cindex RFC 2396
10641
10642 @kindex A M (summary)
10643 @findex gnus-mailing-list-insinuate
10644 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10645 add a @code{to-list} group parameter (@pxref{Group Parameters}),
10646 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10647 summary buffer.
10648
10649 That enables the following commands to the summary buffer:
10650
10651 @table @kbd
10652
10653 @item C-c C-n h
10654 @kindex C-c C-n h (Summary)
10655 @findex gnus-mailing-list-help
10656 Send a message to fetch mailing list help, if List-Help field exists.
10657
10658 @item C-c C-n s
10659 @kindex C-c C-n s (Summary)
10660 @findex gnus-mailing-list-subscribe
10661 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10662
10663 @item C-c C-n u
10664 @kindex C-c C-n u (Summary)
10665 @findex gnus-mailing-list-unsubscribe
10666 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10667 field exists.
10668
10669 @item C-c C-n p
10670 @kindex C-c C-n p (Summary)
10671 @findex gnus-mailing-list-post
10672 Post to the mailing list, if List-Post field exists.
10673
10674 @item C-c C-n o
10675 @kindex C-c C-n o (Summary)
10676 @findex gnus-mailing-list-owner
10677 Send a message to the mailing list owner, if List-Owner field exists.
10678
10679 @item C-c C-n a
10680 @kindex C-c C-n a (Summary)
10681 @findex gnus-mailing-list-owner
10682 Browse the mailing list archive, if List-Archive field exists.
10683
10684 @end table
10685
10686
10687 @node Article Buffer
10688 @chapter Article Buffer
10689 @cindex article buffer
10690
10691 The articles are displayed in the article buffer, of which there is only
10692 one.  All the summary buffers share the same article buffer unless you
10693 tell Gnus otherwise.
10694
10695 @menu
10696 * Hiding Headers::              Deciding what headers should be displayed.
10697 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
10698 * Customizing Articles::        Tailoring the look of the articles.
10699 * Article Keymap::              Keystrokes available in the article buffer.
10700 * Misc Article::                Other stuff.
10701 @end menu
10702
10703
10704 @node Hiding Headers
10705 @section Hiding Headers
10706 @cindex hiding headers
10707 @cindex deleting headers
10708
10709 The top section of each article is the @dfn{head}.  (The rest is the
10710 @dfn{body}, but you may have guessed that already.)
10711
10712 @vindex gnus-show-all-headers
10713 There is a lot of useful information in the head: the name of the person
10714 who wrote the article, the date it was written and the subject of the
10715 article.  That's well and nice, but there's also lots of information
10716 most people do not want to see---what systems the article has passed
10717 through before reaching you, the @code{Message-ID}, the
10718 @code{References}, etc. ad nauseam---and you'll probably want to get rid
10719 of some of those lines.  If you want to keep all those lines in the
10720 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10721
10722 Gnus provides you with two variables for sifting headers:
10723
10724 @table @code
10725
10726 @item gnus-visible-headers
10727 @vindex gnus-visible-headers
10728 If this variable is non-@code{nil}, it should be a regular expression
10729 that says what headers you wish to keep in the article buffer.  All
10730 headers that do not match this variable will be hidden.
10731
10732 For instance, if you only want to see the name of the person who wrote
10733 the article and the subject, you'd say:
10734
10735 @lisp
10736 (setq gnus-visible-headers "^From:\\|^Subject:")
10737 @end lisp
10738
10739 This variable can also be a list of regexps to match headers to
10740 remain visible.
10741
10742 @item gnus-ignored-headers
10743 @vindex gnus-ignored-headers
10744 This variable is the reverse of @code{gnus-visible-headers}.  If this
10745 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10746 should be a regular expression that matches all lines that you want to
10747 hide.  All lines that do not match this variable will remain visible.
10748
10749 For instance, if you just want to get rid of the @code{References} line
10750 and the @code{Xref} line, you might say:
10751
10752 @lisp
10753 (setq gnus-ignored-headers "^References:\\|^Xref:")
10754 @end lisp
10755
10756 This variable can also be a list of regexps to match headers to
10757 be removed.
10758
10759 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10760 variable will have no effect.
10761
10762 @end table
10763
10764 @vindex gnus-sorted-header-list
10765 Gnus can also sort the headers for you.  (It does this by default.)  You
10766 can control the sorting by setting the @code{gnus-sorted-header-list}
10767 variable.  It is a list of regular expressions that says in what order
10768 the headers are to be displayed.
10769
10770 For instance, if you want the name of the author of the article first,
10771 and then the subject, you might say something like:
10772
10773 @lisp
10774 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10775 @end lisp
10776
10777 Any headers that are to remain visible, but are not listed in this
10778 variable, will be displayed in random order after all the headers listed in this variable.
10779
10780 @findex gnus-article-hide-boring-headers
10781 @vindex gnus-boring-article-headers
10782 You can hide further boring headers by setting
10783 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10784 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10785 list, but this list doesn't actually contain header names.  Instead is
10786 lists various @dfn{boring conditions} that Gnus can check and remove
10787 from sight.
10788
10789 These conditions are:
10790 @table @code
10791 @item empty
10792 Remove all empty headers.
10793 @item followup-to
10794 Remove the @code{Followup-To} header if it is identical to the
10795 @code{Newsgroups} header.
10796 @item reply-to
10797 Remove the @code{Reply-To} header if it lists the same address as the
10798 @code{From} header, or if the @code{broken-reply-to} group parameter is
10799 set.
10800 @item newsgroups
10801 Remove the @code{Newsgroups} header if it only contains the current group
10802 name.
10803 @item to-address
10804 Remove the @code{To} header if it only contains the address identical to
10805 the current group's @code{to-address} parameter.
10806 @item to-list
10807 Remove the @code{To} header if it only contains the address identical to
10808 the current group's @code{to-list} parameter.
10809 @item cc-list
10810 Remove the @code{CC} header if it only contains the address identical to
10811 the current group's @code{to-list} parameter.
10812 @item date
10813 Remove the @code{Date} header if the article is less than three days
10814 old.
10815 @item long-to
10816 Remove the @code{To} header if it is very long.
10817 @item many-to
10818 Remove all @code{To} headers if there are more than one.
10819 @end table
10820
10821 To include these three elements, you could say something like:
10822
10823 @lisp
10824 (setq gnus-boring-article-headers
10825       '(empty followup-to reply-to))
10826 @end lisp
10827
10828 This is also the default value for this variable.
10829
10830
10831 @node Using MIME
10832 @section Using MIME
10833 @cindex @acronym{MIME}
10834
10835 Mime is a standard for waving your hands through the air, aimlessly,
10836 while people stand around yawning.
10837
10838 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
10839 while all newsreaders die of fear.
10840
10841 @acronym{MIME} may specify what character set the article uses, the encoding
10842 of the characters, and it also makes it possible to embed pictures and
10843 other naughty stuff in innocent-looking articles.
10844
10845 @vindex gnus-display-mime-function
10846 @findex gnus-display-mime
10847 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
10848 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
10849 default, which creates a bundle of clickable buttons that can be used to
10850 display, save and manipulate the @acronym{MIME} objects.
10851
10852 The following commands are available when you have placed point over a
10853 @acronym{MIME} button:
10854
10855 @table @kbd
10856 @findex gnus-article-press-button
10857 @item RET (Article)
10858 @kindex RET (Article)
10859 @itemx BUTTON-2 (Article)
10860 Toggle displaying of the @acronym{MIME} object
10861 (@code{gnus-article-press-button}).  If built-in viewers can not display
10862 the object, Gnus resorts to external viewers in the @file{mailcap}
10863 files.  If a viewer has the @samp{copiousoutput} specification, the
10864 object is displayed inline.
10865
10866 @findex gnus-mime-view-part
10867 @item M-RET (Article)
10868 @kindex M-RET (Article)
10869 @itemx v (Article)
10870 Prompt for a method, and then view the @acronym{MIME} object using this
10871 method (@code{gnus-mime-view-part}).
10872
10873 @findex gnus-mime-view-part-as-type
10874 @item t (Article)
10875 @kindex t (Article)
10876 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
10877 (@code{gnus-mime-view-part-as-type}).
10878
10879 @findex gnus-mime-view-part-as-charset
10880 @item C (Article)
10881 @kindex C (Article)
10882 Prompt for a charset, and then view the @acronym{MIME} object using this
10883 charset (@code{gnus-mime-view-part-as-charset}).
10884
10885 @findex gnus-mime-save-part
10886 @item o (Article)
10887 @kindex o (Article)
10888 Prompt for a file name, and then save the @acronym{MIME} object
10889 (@code{gnus-mime-save-part}).
10890
10891 @findex gnus-mime-save-part-and-strip
10892 @item C-o (Article)
10893 @kindex C-o (Article)
10894 Prompt for a file name, then save the @acronym{MIME} object and strip it from
10895 the article.  Then proceed to article editing, where a reasonable
10896 suggestion is being made on how the altered article should look
10897 like.  The stripped @acronym{MIME} object will be referred via the
10898 message/external-body @acronym{MIME} type.
10899 (@code{gnus-mime-save-part-and-strip}).
10900
10901 @findex gnus-mime-delete-part
10902 @item d (Article)
10903 @kindex d (Article)
10904 Delete the @acronym{MIME} object from the article and replace it with some
10905 information about the removed @acronym{MIME} object
10906 (@code{gnus-mime-delete-part}).
10907
10908 @findex gnus-mime-copy-part
10909 @item c (Article)
10910 @kindex c (Article)
10911 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
10912 (@code{gnus-mime-copy-part}).  Compressed files like @file{.gz} and
10913 @file{.bz2} are automatically decompressed if
10914 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
10915 Accessing Compressed Files, emacs, The Emacs Editor}).
10916
10917 @findex gnus-mime-print-part
10918 @item p (Article)
10919 @kindex p (Article)
10920 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
10921 command respects the @samp{print=} specifications in the
10922 @file{.mailcap} file.
10923
10924 @findex gnus-mime-inline-part
10925 @item i (Article)
10926 @kindex i (Article)
10927 Insert the contents of the @acronym{MIME} object into the buffer
10928 (@code{gnus-mime-inline-part}) as text/plain.  If given a prefix, insert
10929 the raw contents without decoding.  If given a numerical prefix, you can
10930 do semi-manual charset stuff (see
10931 @code{gnus-summary-show-article-charset-alist} in @ref{Paging the
10932 Article}).
10933
10934 @findex gnus-mime-view-part-internally
10935 @item E (Article)
10936 @kindex E (Article)
10937 View the @acronym{MIME} object with an internal viewer.  If no internal
10938 viewer is available, use an external viewer
10939 (@code{gnus-mime-view-part-internally}).
10940
10941 @findex gnus-mime-view-part-externally
10942 @item e (Article)
10943 @kindex e (Article)
10944 View the @acronym{MIME} object with an external viewer.
10945 (@code{gnus-mime-view-part-externally}).
10946
10947 @findex gnus-mime-pipe-part
10948 @item | (Article)
10949 @kindex | (Article)
10950 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
10951
10952 @findex gnus-mime-action-on-part
10953 @item . (Article)
10954 @kindex . (Article)
10955 Interactively run an action on the @acronym{MIME} object
10956 (@code{gnus-mime-action-on-part}).
10957
10958 @end table
10959
10960 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
10961 determines which parts to do this with is described in the Emacs
10962 @acronym{MIME} manual.
10963
10964 It might be best to just use the toggling functions from the article
10965 buffer to avoid getting nasty surprises.  (For instance, you enter the
10966 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
10967 decoded the sound file in the article and some horrible sing-a-long song
10968 comes screaming out your speakers, and you can't find the volume button,
10969 because there isn't one, and people are starting to look at you, and you
10970 try to stop the program, but you can't, and you can't find the program
10971 to control the volume, and everybody else in the room suddenly decides
10972 to look at you disdainfully, and you'll feel rather stupid.)
10973
10974 Any similarity to real events and people is purely coincidental.  Ahem.
10975
10976 Also @pxref{MIME Commands}.
10977
10978
10979 @node Customizing Articles
10980 @section Customizing Articles
10981 @cindex article customization
10982
10983 A slew of functions for customizing how the articles are to look like
10984 exist.  You can call these functions interactively
10985 (@pxref{Article Washing}), or you can have them
10986 called automatically when you select the articles.
10987
10988 To have them called automatically, you should set the corresponding
10989 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10990 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10991 be set, but first we discuss the values these variables can have.
10992
10993 Note: Some values, while valid, make little sense.  Check the list below
10994 for sensible values.
10995
10996 @enumerate
10997 @item
10998 @code{nil}: Don't do this treatment.
10999
11000 @item
11001 @code{t}: Do this treatment on all body parts.
11002
11003 @item
11004 @code{head}: Do the treatment on the headers.
11005
11006 @item
11007 @code{last}: Do this treatment on the last part.
11008
11009 @item
11010 An integer: Do this treatment on all body parts that have a length less
11011 than this number.
11012
11013 @item
11014 A list of strings: Do this treatment on all body parts that are in
11015 articles that are read in groups that have names that match one of the
11016 regexps in the list.
11017
11018 @item
11019 A list where the first element is not a string:
11020
11021 The list is evaluated recursively.  The first element of the list is a
11022 predicate.  The following predicates are recognized: @code{or},
11023 @code{and}, @code{not} and @code{typep}.  Here's an example:
11024
11025 @lisp
11026 (or last
11027     (typep "text/x-vcard"))
11028 @end lisp
11029
11030 @end enumerate
11031
11032 You may have noticed that the word @dfn{part} is used here.  This refers
11033 to the fact that some messages are @acronym{MIME} multipart articles that may
11034 be divided into several parts.  Articles that are not multiparts are
11035 considered to contain just a single part.
11036
11037 @vindex gnus-article-treat-types
11038 Are the treatments applied to all sorts of multipart parts?  Yes, if you
11039 want to, but by default, only @samp{text/plain} parts are given the
11040 treatment.  This is controlled by the @code{gnus-article-treat-types}
11041 variable, which is a list of regular expressions that are matched to the
11042 type of the part.  This variable is ignored if the value of the
11043 controlling variable is a predicate list, as described above.
11044
11045 The following treatment options are available.  The easiest way to
11046 customize this is to examine the @code{gnus-article-treat} customization
11047 group.  Values in parenthesis are suggested sensible values.  Others are
11048 possible but those listed are probably sufficient for most people.
11049
11050 @table @code
11051 @item gnus-treat-buttonize (t, integer)
11052 @item gnus-treat-buttonize-head (head)
11053
11054 @xref{Article Buttons}.
11055
11056 @item gnus-treat-capitalize-sentences (t, integer)
11057 @item gnus-treat-overstrike (t, integer)
11058 @item gnus-treat-strip-cr (t, integer)
11059 @item gnus-treat-strip-headers-in-body (t, integer)
11060 @item gnus-treat-strip-leading-blank-lines (t, integer)
11061 @item gnus-treat-strip-multiple-blank-lines (t, integer)
11062 @item gnus-treat-strip-pem (t, last, integer)
11063 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
11064 @item gnus-treat-unsplit-urls (t, integer)
11065 @item gnus-treat-wash-html (t, integer)
11066
11067 @xref{Article Washing}.
11068
11069 @item gnus-treat-date-english (head)
11070 @item gnus-treat-date-iso8601 (head)
11071 @item gnus-treat-date-lapsed (head)
11072 @item gnus-treat-date-local (head)
11073 @item gnus-treat-date-original (head)
11074 @item gnus-treat-date-user-defined (head)
11075 @item gnus-treat-date-ut (head)
11076
11077 @xref{Article Date}.
11078
11079 @item gnus-treat-from-picon (head)
11080 @item gnus-treat-mail-picon (head)
11081 @item gnus-treat-newsgroups-picon (head)
11082
11083 @xref{Picons}.
11084
11085 @item gnus-treat-display-smileys (t, integer)
11086
11087 @item gnus-treat-body-boundary (head)
11088
11089 @vindex gnus-body-boundary-delimiter
11090 Adds a delimiter between header and body, the string used as delimiter
11091 is controlled by @code{gnus-body-boundary-delimiter}.
11092
11093 @xref{Smileys}.
11094
11095 @item gnus-treat-display-x-face (head)
11096
11097 @xref{X-Face}.
11098
11099 @item gnus-treat-display-face (head)
11100
11101 @xref{Face}.
11102
11103 @item gnus-treat-emphasize (t, head, integer)
11104 @item gnus-treat-fill-article (t, integer)
11105 @item gnus-treat-fill-long-lines (t, integer)
11106 @item gnus-treat-hide-boring-headers (head)
11107 @item gnus-treat-hide-citation (t, integer)
11108 @item gnus-treat-hide-citation-maybe (t, integer)
11109 @item gnus-treat-hide-headers (head)
11110 @item gnus-treat-hide-signature (t, last)
11111 @item gnus-treat-strip-banner (t, last)
11112 @item gnus-treat-strip-list-identifiers (head)
11113
11114 @xref{Article Hiding}.
11115
11116 @item gnus-treat-highlight-citation (t, integer)
11117 @item gnus-treat-highlight-headers (head)
11118 @item gnus-treat-highlight-signature (t, last, integer)
11119
11120 @xref{Article Highlighting}.
11121
11122 @item gnus-treat-play-sounds
11123 @item gnus-treat-translate
11124 @item gnus-treat-x-pgp-sig (head)
11125
11126 @item gnus-treat-unfold-headers (head)
11127 @item gnus-treat-fold-headers (head)
11128 @item gnus-treat-fold-newsgroups (head)
11129 @item gnus-treat-leading-whitespace (head)
11130
11131 @xref{Article Header}.
11132
11133
11134 @end table
11135
11136 @vindex gnus-part-display-hook
11137 You can, of course, write your own functions to be called from
11138 @code{gnus-part-display-hook}.  The functions are called narrowed to the
11139 part, and you can do anything you like, pretty much.  There is no
11140 information that you have to keep in the buffer---you can change
11141 everything.
11142
11143
11144 @node Article Keymap
11145 @section Article Keymap
11146
11147 Most of the keystrokes in the summary buffer can also be used in the
11148 article buffer.  They should behave as if you typed them in the summary
11149 buffer, which means that you don't actually have to have a summary
11150 buffer displayed while reading.  You can do it all from the article
11151 buffer.
11152
11153 A few additional keystrokes are available:
11154
11155 @table @kbd
11156
11157 @item SPACE
11158 @kindex SPACE (Article)
11159 @findex gnus-article-next-page
11160 Scroll forwards one page (@code{gnus-article-next-page}).
11161 This is exactly the same as @kbd{h SPACE h}.
11162
11163 @item DEL
11164 @kindex DEL (Article)
11165 @findex gnus-article-prev-page
11166 Scroll backwards one page (@code{gnus-article-prev-page}).
11167 This is exactly the same as @kbd{h DEL h}.
11168
11169 @item C-c ^
11170 @kindex C-c ^ (Article)
11171 @findex gnus-article-refer-article
11172 If point is in the neighborhood of a @code{Message-ID} and you press
11173 @kbd{C-c ^}, Gnus will try to get that article from the server
11174 (@code{gnus-article-refer-article}).
11175
11176 @item C-c C-m
11177 @kindex C-c C-m (Article)
11178 @findex gnus-article-mail
11179 Send a reply to the address near point (@code{gnus-article-mail}).  If
11180 given a prefix, include the mail.
11181
11182 @item s
11183 @kindex s (Article)
11184 @findex gnus-article-show-summary
11185 Reconfigure the buffers so that the summary buffer becomes visible
11186 (@code{gnus-article-show-summary}).
11187
11188 @item ?
11189 @kindex ? (Article)
11190 @findex gnus-article-describe-briefly
11191 Give a very brief description of the available keystrokes
11192 (@code{gnus-article-describe-briefly}).
11193
11194 @item TAB
11195 @kindex TAB (Article)
11196 @findex gnus-article-next-button
11197 Go to the next button, if any (@code{gnus-article-next-button}).  This
11198 only makes sense if you have buttonizing turned on.
11199
11200 @item M-TAB
11201 @kindex M-TAB (Article)
11202 @findex gnus-article-prev-button
11203 Go to the previous button, if any (@code{gnus-article-prev-button}).
11204
11205 @item R
11206 @kindex R (Article)
11207 @findex gnus-article-reply-with-original
11208 Send a reply to the current article and yank the current article
11209 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
11210 wide reply.  If the region is active, only yank the text in the
11211 region.
11212
11213 @item F
11214 @kindex F (Article)
11215 @findex gnus-article-followup-with-original
11216 Send a followup to the current article and yank the current article
11217 (@code{gnus-article-followup-with-original}).  If given a prefix, make
11218 a wide reply.  If the region is active, only yank the text in the
11219 region.
11220
11221
11222 @end table
11223
11224
11225 @node Misc Article
11226 @section Misc Article
11227
11228 @table @code
11229
11230 @item gnus-single-article-buffer
11231 @vindex gnus-single-article-buffer
11232 If non-@code{nil}, use the same article buffer for all the groups.
11233 (This is the default.)  If @code{nil}, each group will have its own
11234 article buffer.
11235
11236 @vindex gnus-article-decode-hook
11237 @item gnus-article-decode-hook
11238 @cindex @acronym{MIME}
11239 Hook used to decode @acronym{MIME} articles.  The default value is
11240 @code{(article-decode-charset article-decode-encoded-words)}
11241
11242 @vindex gnus-article-prepare-hook
11243 @item gnus-article-prepare-hook
11244 This hook is called right after the article has been inserted into the
11245 article buffer.  It is mainly intended for functions that do something
11246 depending on the contents; it should probably not be used for changing
11247 the contents of the article buffer.
11248
11249 @item gnus-article-mode-hook
11250 @vindex gnus-article-mode-hook
11251 Hook called in article mode buffers.
11252
11253 @item gnus-article-mode-syntax-table
11254 @vindex gnus-article-mode-syntax-table
11255 Syntax table used in article buffers.  It is initialized from
11256 @code{text-mode-syntax-table}.
11257
11258 @vindex gnus-article-over-scroll
11259 @item gnus-article-over-scroll
11260 If non-@code{nil}, allow scrolling the article buffer even when there
11261 no more new text to scroll in.  The default is @code{nil}.
11262
11263 @vindex gnus-article-mode-line-format
11264 @item gnus-article-mode-line-format
11265 This variable is a format string along the same lines as
11266 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
11267 accepts the same format specifications as that variable, with two
11268 extensions:
11269
11270 @table @samp
11271
11272 @item w
11273 The @dfn{wash status} of the article.  This is a short string with one
11274 character for each possible article wash operation that may have been
11275 performed.  The characters and their meaning:
11276
11277 @table @samp
11278
11279 @item c
11280 Displayed when cited text may be hidden in the article buffer.
11281
11282 @item h
11283 Displayed when headers are hidden in the article buffer.
11284
11285 @item p
11286 Displayed when article is digitally signed or encrypted, and Gnus has
11287 hidden the security headers.  (N.B. does not tell anything about
11288 security status, i.e. good or bad signature.)
11289
11290 @item s
11291 Displayed when the signature has been hidden in the Article buffer.
11292
11293 @item o
11294 Displayed when Gnus has treated overstrike characters in the article buffer.
11295
11296 @item e
11297 Displayed when Gnus has treated emphasised strings in the article buffer.
11298
11299 @end table
11300
11301 @item m
11302 The number of @acronym{MIME} parts in the article.
11303
11304 @end table
11305
11306 @vindex gnus-break-pages
11307
11308 @item gnus-break-pages
11309 Controls whether @dfn{page breaking} is to take place.  If this variable
11310 is non-@code{nil}, the articles will be divided into pages whenever a
11311 page delimiter appears in the article.  If this variable is @code{nil},
11312 paging will not be done.
11313
11314 @item gnus-page-delimiter
11315 @vindex gnus-page-delimiter
11316 This is the delimiter mentioned above.  By default, it is @samp{^L}
11317 (formfeed).
11318
11319 @cindex IDNA
11320 @cindex internationalized domain names
11321 @vindex gnus-use-idna
11322 @item gnus-use-idna
11323 This variable controls whether Gnus performs IDNA decoding of
11324 internationalized domain names inside @samp{From}, @samp{To} and
11325 @samp{Cc} headers.  This requires
11326 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
11327 variable is only enabled if you have installed it.
11328
11329 @end table
11330
11331
11332 @node Composing Messages
11333 @chapter Composing Messages
11334 @cindex composing messages
11335 @cindex messages
11336 @cindex mail
11337 @cindex sending mail
11338 @cindex reply
11339 @cindex followup
11340 @cindex post
11341 @cindex using gpg
11342 @cindex using s/mime
11343 @cindex using smime
11344
11345 @kindex C-c C-c (Post)
11346 All commands for posting and mailing will put you in a message buffer
11347 where you can edit the article all you like, before you send the
11348 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
11349 Message Manual}.  Where the message will be posted/mailed to depends
11350 on your setup (@pxref{Posting Server}).
11351
11352 @menu
11353 * Mail::                        Mailing and replying.
11354 * Posting Server::              What server should you post and mail via?
11355 * Mail and Post::               Mailing and posting at the same time.
11356 * Archived Messages::           Where Gnus stores the messages you've sent.
11357 * Posting Styles::              An easier way to specify who you are.
11358 * Drafts::                      Postponing messages and rejected messages.
11359 * Rejected Articles::           What happens if the server doesn't like your article?
11360 * Signing and encrypting::      How to compose secure messages.
11361 @end menu
11362
11363 Also @pxref{Canceling and Superseding} for information on how to
11364 remove articles you shouldn't have posted.
11365
11366
11367 @node Mail
11368 @section Mail
11369
11370 Variables for customizing outgoing mail:
11371
11372 @table @code
11373 @item gnus-uu-digest-headers
11374 @vindex gnus-uu-digest-headers
11375 List of regexps to match headers included in digested messages.  The
11376 headers will be included in the sequence they are matched.  If
11377 @code{nil} include all headers.
11378
11379 @item gnus-add-to-list
11380 @vindex gnus-add-to-list
11381 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11382 that have none when you do a @kbd{a}.
11383
11384 @item gnus-confirm-mail-reply-to-news
11385 @vindex gnus-confirm-mail-reply-to-news
11386 This can also be a function receiving the group name as the only
11387 parameter which should return non-@code{nil} if a confirmation is
11388 needed, or a regular expression matching group names, where
11389 confirmation is should be asked for.
11390
11391 If you find yourself never wanting to reply to mail, but occasionally
11392 press R anyway, this variable might be for you.
11393
11394 @item gnus-confirm-treat-mail-like-news
11395 @vindex gnus-confirm-treat-mail-like-news
11396 If non-@code{nil}, Gnus also requests confirmation according to
11397 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
11398 useful for treating mailing lists like newsgroups.
11399
11400 @end table
11401
11402
11403 @node Posting Server
11404 @section Posting Server
11405
11406 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11407 (extremely intelligent, of course) article, where does it go?
11408
11409 Thank you for asking.  I hate you.
11410
11411 It can be quite complicated.
11412
11413 @vindex gnus-post-method
11414 When posting news, Message usually invokes @code{message-send-news}
11415 (@pxref{News Variables, , News Variables, message, Message Manual}).
11416 Normally, Gnus will post using the same select method as you're
11417 reading from (which might be convenient if you're reading lots of
11418 groups from different private servers).  However.  If the server
11419 you're reading from doesn't allow posting, just reading, you probably
11420 want to use some other server to post your (extremely intelligent and
11421 fabulously interesting) articles.  You can then set the
11422 @code{gnus-post-method} to some other method:
11423
11424 @lisp
11425 (setq gnus-post-method '(nnspool ""))
11426 @end lisp
11427
11428 Now, if you've done this, and then this server rejects your article, or
11429 this server is down, what do you do then?  To override this variable you
11430 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11431 the ``current'' server, to get back the default behavior, for posting.
11432
11433 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11434 Gnus will prompt you for what method to use for posting.
11435
11436 You can also set @code{gnus-post-method} to a list of select methods.
11437 If that's the case, Gnus will always prompt you for what method to use
11438 for posting.
11439
11440 Finally, if you want to always post using the native select method,
11441 you can set this variable to @code{native}.
11442
11443 When sending mail, Message invokes @code{message-send-mail-function}.
11444 The default function, @code{message-send-mail-with-sendmail}, pipes
11445 your article to the @code{sendmail} binary for further queuing and
11446 sending.  When your local system is not configured for sending mail
11447 using @code{sendmail}, and you have access to a remote @acronym{SMTP}
11448 server, you can set @code{message-send-mail-function} to
11449 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11450 package correctly.  An example:
11451
11452 @lisp
11453 (setq message-send-mail-function 'smtpmail-send-it
11454       smtpmail-default-smtp-server "YOUR SMTP HOST")
11455 @end lisp
11456
11457 To the thing similar to this, there is
11458 @code{message-smtpmail-send-it}.  It is useful if your ISP requires
11459 the @acronym{POP}-before-@acronym{SMTP} authentication.  See the
11460 documentation for the function @code{mail-source-touch-pop}.
11461
11462 Other possible choices for @code{message-send-mail-function} includes
11463 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11464 and @code{feedmail-send-it}.
11465
11466 @node Mail and Post
11467 @section Mail and Post
11468
11469 Here's a list of variables relevant to both mailing and
11470 posting:
11471
11472 @table @code
11473 @item gnus-mailing-list-groups
11474 @findex gnus-mailing-list-groups
11475 @cindex mailing lists
11476
11477 If your news server offers groups that are really mailing lists
11478 gatewayed to the @acronym{NNTP} server, you can read those groups without
11479 problems, but you can't post/followup to them without some difficulty.
11480 One solution is to add a @code{to-address} to the group parameters
11481 (@pxref{Group Parameters}).  An easier thing to do is set the
11482 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11483 really are mailing lists.  Then, at least, followups to the mailing
11484 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11485 still a pain, though.
11486
11487 @item gnus-user-agent
11488 @vindex gnus-user-agent
11489 @cindex User-Agent
11490
11491 This variable controls which information should be exposed in the
11492 User-Agent header.  It can be one of the symbols @code{gnus} (show only
11493 Gnus version), @code{emacs-gnus} (show only Emacs and Gnus versions),
11494 @code{emacs-gnus-config} (same as @code{emacs-gnus} plus system
11495 configuration), @code{emacs-gnus-type} (same as @code{emacs-gnus} plus
11496 system type) or a custom string.  If you set it to a string, be sure to
11497 use a valid format, see RFC 2616.
11498
11499 @end table
11500
11501 You may want to do spell-checking on messages that you send out.  Or, if
11502 you don't want to spell-check by hand, you could add automatic
11503 spell-checking via the @code{ispell} package:
11504
11505 @cindex ispell
11506 @findex ispell-message
11507 @lisp
11508 (add-hook 'message-send-hook 'ispell-message)
11509 @end lisp
11510
11511 If you want to change the @code{ispell} dictionary based on what group
11512 you're in, you could say something like the following:
11513
11514 @lisp
11515 (add-hook 'gnus-select-group-hook
11516           (lambda ()
11517             (cond
11518              ((string-match
11519                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11520               (ispell-change-dictionary "deutsch"))
11521              (t
11522               (ispell-change-dictionary "english")))))
11523 @end lisp
11524
11525 Modify to suit your needs.
11526
11527
11528 @node Archived Messages
11529 @section Archived Messages
11530 @cindex archived messages
11531 @cindex sent messages
11532
11533 Gnus provides a few different methods for storing the mail and news you
11534 send.  The default method is to use the @dfn{archive virtual server} to
11535 store the messages.  If you want to disable this completely, the
11536 @code{gnus-message-archive-group} variable should be @code{nil}, which
11537 is the default.
11538
11539 For archiving interesting messages in a group you read, see the
11540 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11541 Group Commands}).
11542
11543 @vindex gnus-message-archive-method
11544 @code{gnus-message-archive-method} says what virtual server Gnus is to
11545 use to store sent messages.  The default is:
11546
11547 @lisp
11548 (nnfolder "archive"
11549           (nnfolder-directory   "~/Mail/archive")
11550           (nnfolder-active-file "~/Mail/archive/active")
11551           (nnfolder-get-new-mail nil)
11552           (nnfolder-inhibit-expiry t))
11553 @end lisp
11554
11555 You can, however, use any mail select method (@code{nnml},
11556 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11557 for doing this sort of thing, though.  If you don't like the default
11558 directory chosen, you could say something like:
11559
11560 @lisp
11561 (setq gnus-message-archive-method
11562       '(nnfolder "archive"
11563                  (nnfolder-inhibit-expiry t)
11564                  (nnfolder-active-file "~/News/sent-mail/active")
11565                  (nnfolder-directory "~/News/sent-mail/")))
11566 @end lisp
11567
11568 @vindex gnus-message-archive-group
11569 @cindex Gcc
11570 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11571 to one or more group(s) on that server.  Which group to use is
11572 determined by the @code{gnus-message-archive-group} variable.
11573
11574 This variable can be used to do the following:
11575
11576 @table @asis
11577 @item a string
11578 Messages will be saved in that group.
11579
11580 Note that you can include a select method in the group name, then the
11581 message will not be stored in the select method given by
11582 @code{gnus-message-archive-method}, but in the select method specified
11583 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11584 has the default value shown above.  Then setting
11585 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11586 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11587 value @code{"nnml:foo"}, then outgoing messages will be stored in
11588 @samp{nnml:foo}.
11589
11590 @item a list of strings
11591 Messages will be saved in all those groups.
11592
11593 @item an alist of regexps, functions and forms
11594 When a key ``matches'', the result is used.
11595
11596 @item @code{nil}
11597 No message archiving will take place.  This is the default.
11598 @end table
11599
11600 Let's illustrate:
11601
11602 Just saving to a single group called @samp{MisK}:
11603 @lisp
11604 (setq gnus-message-archive-group "MisK")
11605 @end lisp
11606
11607 Saving to two groups, @samp{MisK} and @samp{safe}:
11608 @lisp
11609 (setq gnus-message-archive-group '("MisK" "safe"))
11610 @end lisp
11611
11612 Save to different groups based on what group you are in:
11613 @lisp
11614 (setq gnus-message-archive-group
11615       '(("^alt" "sent-to-alt")
11616         ("mail" "sent-to-mail")
11617         (".*" "sent-to-misc")))
11618 @end lisp
11619
11620 More complex stuff:
11621 @lisp
11622 (setq gnus-message-archive-group
11623       '((if (message-news-p)
11624             "misc-news"
11625           "misc-mail")))
11626 @end lisp
11627
11628 How about storing all news messages in one file, but storing all mail
11629 messages in one file per month:
11630
11631 @lisp
11632 (setq gnus-message-archive-group
11633       '((if (message-news-p)
11634             "misc-news"
11635           (concat "mail." (format-time-string "%Y-%m")))))
11636 @end lisp
11637
11638 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11639 @c use a different value for @code{gnus-message-archive-group} there.)
11640
11641 Now, when you send a message off, it will be stored in the appropriate
11642 group.  (If you want to disable storing for just one particular message,
11643 you can just remove the @code{Gcc} header that has been inserted.)  The
11644 archive group will appear in the group buffer the next time you start
11645 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
11646 enter it and read the articles in it just like you'd read any other
11647 group.  If the group gets really big and annoying, you can simply rename
11648 if (using @kbd{G r} in the group buffer) to something
11649 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11650 continue to be stored in the old (now empty) group.
11651
11652 That's the default method of archiving sent messages.  Gnus offers a
11653 different way for the people who don't like the default method.  In that
11654 case you should set @code{gnus-message-archive-group} to @code{nil};
11655 this will disable archiving.
11656
11657 @table @code
11658 @item gnus-outgoing-message-group
11659 @vindex gnus-outgoing-message-group
11660 All outgoing messages will be put in this group.  If you want to store
11661 all your outgoing mail and articles in the group @samp{nnml:archive},
11662 you set this variable to that value.  This variable can also be a list of
11663 group names.
11664
11665 If you want to have greater control over what group to put each
11666 message in, you can set this variable to a function that checks the
11667 current newsgroup name and then returns a suitable group name (or list
11668 of names).
11669
11670 This variable can be used instead of @code{gnus-message-archive-group},
11671 but the latter is the preferred method.
11672
11673 @item gnus-gcc-mark-as-read
11674 @vindex gnus-gcc-mark-as-read
11675 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11676
11677 @item gnus-gcc-externalize-attachments
11678 @vindex gnus-gcc-externalize-attachments
11679 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11680 and matches the Gcc group name, attach files as external parts; if it is
11681 @code{all}, attach local files as external parts; if it is other
11682 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11683 changed in the future.
11684
11685 @end table
11686
11687
11688 @node Posting Styles
11689 @section Posting Styles
11690 @cindex posting styles
11691 @cindex styles
11692
11693 All them variables, they make my head swim.
11694
11695 So what if you want a different @code{Organization} and signature based
11696 on what groups you post to?  And you post both from your home machine
11697 and your work machine, and you want different @code{From} lines, and so
11698 on?
11699
11700 @vindex gnus-posting-styles
11701 One way to do stuff like that is to write clever hooks that change the
11702 variables you need to have changed.  That's a bit boring, so somebody
11703 came up with the bright idea of letting the user specify these things in
11704 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11705 variable:
11706
11707 @lisp
11708 ((".*"
11709   (signature "Peace and happiness")
11710   (organization "What me?"))
11711  ("^comp"
11712   (signature "Death to everybody"))
11713  ("comp.emacs.i-love-it"
11714   (organization "Emacs is it")))
11715 @end lisp
11716
11717 As you might surmise from this example, this alist consists of several
11718 @dfn{styles}.  Each style will be applicable if the first element
11719 ``matches'', in some form or other.  The entire alist will be iterated
11720 over, from the beginning towards the end, and each match will be
11721 applied, which means that attributes in later styles that match override
11722 the same attributes in earlier matching styles.  So
11723 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11724 signature and the @samp{What me?} @code{Organization} header.
11725
11726 The first element in each style is called the @code{match}.  If it's a
11727 string, then Gnus will try to regexp match it against the group name.
11728 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
11729 will look in the original article for a header whose name is
11730 @var{match} and compare that @var{regexp}.  @var{match} and
11731 @var{regexp} are strings.  (The original article is the one you are
11732 replying or following up to.  If you are not composing a reply or a
11733 followup, then there is nothing to match against.)  If the
11734 @code{match} is a function symbol, that function will be called with
11735 no arguments.  If it's a variable symbol, then the variable will be
11736 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11737 any case, if this returns a non-@code{nil} value, then the style is
11738 said to @dfn{match}.
11739
11740 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11741 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11742 attribute name can be one of:
11743
11744 @itemize @bullet
11745 @item @code{signature}
11746 @item @code{signature-file}
11747 @item @code{x-face-file}
11748 @item @code{address}, overriding @code{user-mail-address}
11749 @item @code{name}, overriding @code{(user-full-name)}
11750 @item @code{body}
11751 @end itemize
11752
11753 The attribute name can also be a string or a symbol.  In that case,
11754 this will be used as a header name, and the value will be inserted in
11755 the headers of the article; if the value is @code{nil}, the header
11756 name will be removed.  If the attribute name is @code{eval}, the form
11757 is evaluated, and the result is thrown away.
11758
11759 The attribute value can be a string (used verbatim), a function with
11760 zero arguments (the return value will be used), a variable (its value
11761 will be used) or a list (it will be @code{eval}ed and the return value
11762 will be used).  The functions and sexps are called/@code{eval}ed in the
11763 message buffer that is being set up.  The headers of the current article
11764 are available through the @code{message-reply-headers} variable, which
11765 is a vector of the following headers: number subject from date id
11766 references chars lines xref extra.
11767
11768 @vindex message-reply-headers
11769
11770 If you wish to check whether the message you are about to compose is
11771 meant to be a news article or a mail message, you can check the values
11772 of the @code{message-news-p} and @code{message-mail-p} functions.
11773
11774 @findex message-mail-p
11775 @findex message-news-p
11776
11777 So here's a new example:
11778
11779 @lisp
11780 (setq gnus-posting-styles
11781       '((".*"
11782          (signature-file "~/.signature")
11783          (name "User Name")
11784          ("X-Home-Page" (getenv "WWW_HOME"))
11785          (organization "People's Front Against MWM"))
11786         ("^rec.humor"
11787          (signature my-funny-signature-randomizer))
11788         ((equal (system-name) "gnarly")  ;; @r{A form}
11789          (signature my-quote-randomizer))
11790         (message-news-p        ;; @r{A function symbol}
11791          (signature my-news-signature))
11792         (window-system         ;; @r{A value symbol}
11793          ("X-Window-System" (format "%s" window-system)))
11794         ;; @r{If I'm replying to Larsi, set the Organization header.}
11795         ((header "from" "larsi.*org")
11796          (Organization "Somewhere, Inc."))
11797         ((posting-from-work-p) ;; @r{A user defined function}
11798          (signature-file "~/.work-signature")
11799          (address "user@@bar.foo")
11800          (body "You are fired.\n\nSincerely, your boss.")
11801          (organization "Important Work, Inc"))
11802         ("nnml:.*"
11803          (From (save-excursion
11804                  (set-buffer gnus-article-buffer)
11805                  (message-fetch-field "to"))))
11806         ("^nn.+:"
11807          (signature-file "~/.mail-signature"))))
11808 @end lisp
11809
11810 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11811 @code{From} address in all your outgoing replies, which might be handy
11812 if you fill many roles.
11813
11814
11815 @node Drafts
11816 @section Drafts
11817 @cindex drafts
11818
11819 If you are writing a message (mail or news) and suddenly remember that
11820 you have a steak in the oven (or some pesto in the food processor, you
11821 craaazy vegetarians), you'll probably wish there was a method to save
11822 the message you are writing so that you can continue editing it some
11823 other day, and send it when you feel its finished.
11824
11825 Well, don't worry about it.  Whenever you start composing a message of
11826 some sort using the Gnus mail and post commands, the buffer you get will
11827 automatically associate to an article in a special @dfn{draft} group.
11828 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11829 article will be saved there.  (Auto-save files also go to the draft
11830 group.)
11831
11832 @cindex nndraft
11833 @vindex nndraft-directory
11834 The draft group is a special group (which is implemented as an
11835 @code{nndraft} group, if you absolutely have to know) called
11836 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11837 @code{nndraft} is to store its files.  What makes this group special is
11838 that you can't tick any articles in it or mark any articles as
11839 read---all articles in the group are permanently unread.
11840
11841 If the group doesn't exist, it will be created and you'll be subscribed
11842 to it.  The only way to make it disappear from the Group buffer is to
11843 unsubscribe it.  The special properties of the draft group comes from
11844 a group property (@pxref{Group Parameters}), and if lost the group
11845 behaves like any other group.  This means the commands below will not
11846 be available.  To restore the special properties of the group, the
11847 simplest way is to kill the group, using @kbd{C-k}, and restart
11848 Gnus.  The group is automatically created again with the
11849 correct parameters.  The content of the group is not lost.
11850
11851 @c @findex gnus-dissociate-buffer-from-draft
11852 @c @kindex C-c M-d (Mail)
11853 @c @kindex C-c M-d (Post)
11854 @c @findex gnus-associate-buffer-with-draft
11855 @c @kindex C-c C-d (Mail)
11856 @c @kindex C-c C-d (Post)
11857 @c If you're writing some super-secret message that you later want to
11858 @c encode with PGP before sending, you may wish to turn the auto-saving
11859 @c (and association with the draft group) off.  You never know who might be
11860 @c interested in reading all your extremely valuable and terribly horrible
11861 @c and interesting secrets.  The @kbd{C-c M-d}
11862 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11863 @c If you change your mind and want to turn the auto-saving back on again,
11864 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11865 @c
11866 @c @vindex gnus-use-draft
11867 @c To leave association with the draft group off by default, set
11868 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11869
11870 @findex gnus-draft-edit-message
11871 @kindex D e (Draft)
11872 When you want to continue editing the article, you simply enter the
11873 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11874 that.  You will be placed in a buffer where you left off.
11875
11876 Rejected articles will also be put in this draft group (@pxref{Rejected
11877 Articles}).
11878
11879 @findex gnus-draft-send-all-messages
11880 @kindex D s (Draft)
11881 @findex gnus-draft-send-message
11882 @kindex D S (Draft)
11883 If you have lots of rejected messages you want to post (or mail) without
11884 doing further editing, you can use the @kbd{D s} command
11885 (@code{gnus-draft-send-message}).  This command understands the
11886 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11887 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11888 in the buffer.
11889
11890 @findex gnus-draft-toggle-sending
11891 @kindex D t (Draft)
11892 If you have some messages that you wish not to send, you can use the
11893 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11894 as unsendable.  This is a toggling command.
11895
11896
11897 @node Rejected Articles
11898 @section Rejected Articles
11899 @cindex rejected articles
11900
11901 Sometimes a news server will reject an article.  Perhaps the server
11902 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11903 @emph{there be demons}.  Perhaps you have included too much cited text.
11904 Perhaps the disk is full.  Perhaps the server is down.
11905
11906 These situations are, of course, totally beyond the control of Gnus.
11907 (Gnus, of course, loves the way you look, always feels great, has angels
11908 fluttering around inside of it, doesn't care about how much cited text
11909 you include, never runs full and never goes down.)  So Gnus saves these
11910 articles until some later time when the server feels better.
11911
11912 The rejected articles will automatically be put in a special draft group
11913 (@pxref{Drafts}).  When the server comes back up again, you'd then
11914 typically enter that group and send all the articles off.
11915
11916 @node Signing and encrypting
11917 @section Signing and encrypting
11918 @cindex using gpg
11919 @cindex using s/mime
11920 @cindex using smime
11921
11922 Gnus can digitally sign and encrypt your messages, using vanilla
11923 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
11924 decoding such messages, see the @code{mm-verify-option} and
11925 @code{mm-decrypt-option} options (@pxref{Security}).
11926
11927 @vindex gnus-message-replysign
11928 @vindex gnus-message-replyencrypt
11929 @vindex gnus-message-replysignencrypted
11930 Often, you would like to sign replies to people who send you signed
11931 messages.  Even more often, you might want to encrypt messages which
11932 are in reply to encrypted messages.  Gnus offers
11933 @code{gnus-message-replysign} to enable the former, and
11934 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11935 @code{gnus-message-replysignencrypted} (on by default) will sign
11936 automatically encrypted messages.
11937
11938 Instructing @acronym{MML} to perform security operations on a
11939 @acronym{MIME} part is done using the @kbd{C-c C-m s} key map for
11940 signing and the @kbd{C-c C-m c} key map for encryption, as follows.
11941
11942 @table @kbd
11943
11944 @item C-c C-m s s
11945 @kindex C-c C-m s s
11946 @findex mml-secure-message-sign-smime
11947
11948 Digitally sign current message using @acronym{S/MIME}.
11949
11950 @item C-c C-m s o
11951 @kindex C-c C-m s o
11952 @findex mml-secure-message-sign-pgp
11953
11954 Digitally sign current message using @acronym{PGP}.
11955
11956 @item C-c C-m s p
11957 @kindex C-c C-m s p
11958 @findex mml-secure-message-sign-pgp
11959
11960 Digitally sign current message using @acronym{PGP/MIME}.
11961
11962 @item C-c C-m c s
11963 @kindex C-c C-m c s
11964 @findex mml-secure-message-encrypt-smime
11965
11966 Digitally encrypt current message using @acronym{S/MIME}.
11967
11968 @item C-c C-m c o
11969 @kindex C-c C-m c o
11970 @findex mml-secure-message-encrypt-pgp
11971
11972 Digitally encrypt current message using @acronym{PGP}.
11973
11974 @item C-c C-m c p
11975 @kindex C-c C-m c p
11976 @findex mml-secure-message-encrypt-pgpmime
11977
11978 Digitally encrypt current message using @acronym{PGP/MIME}.
11979
11980 @item C-c C-m C-n
11981 @kindex C-c C-m C-n
11982 @findex mml-unsecure-message
11983 Remove security related @acronym{MML} tags from message.
11984
11985 @end table
11986
11987 @xref{Security, ,Security, message, Message Manual}, for more information.
11988
11989 @node Select Methods
11990 @chapter Select Methods
11991 @cindex foreign groups
11992 @cindex select methods
11993
11994 A @dfn{foreign group} is a group not read by the usual (or
11995 default) means.  It could be, for instance, a group from a different
11996 @acronym{NNTP} server, it could be a virtual group, or it could be your own
11997 personal mail group.
11998
11999 A foreign group (or any group, really) is specified by a @dfn{name} and
12000 a @dfn{select method}.  To take the latter first, a select method is a
12001 list where the first element says what back end to use (e.g. @code{nntp},
12002 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
12003 name}.  There may be additional elements in the select method, where the
12004 value may have special meaning for the back end in question.
12005
12006 One could say that a select method defines a @dfn{virtual server}---so
12007 we do just that (@pxref{Server Buffer}).
12008
12009 The @dfn{name} of the group is the name the back end will recognize the
12010 group as.
12011
12012 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
12013 @samp{some.where.edu} will have the name @samp{soc.motss} and select
12014 method @code{(nntp "some.where.edu")}.  Gnus will call this group
12015 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
12016 back end just knows this group as @samp{soc.motss}.
12017
12018 The different methods all have their peculiarities, of course.
12019
12020 @menu
12021 * Server Buffer::               Making and editing virtual servers.
12022 * Getting News::                Reading USENET news with Gnus.
12023 * Getting Mail::                Reading your personal mail with Gnus.
12024 * Browsing the Web::            Getting messages from a plethora of Web sources.
12025 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
12026 * Other Sources::               Reading directories, files, SOUP packets.
12027 * Combined Groups::             Combining groups into one group.
12028 * Gnus Unplugged::              Reading news and mail offline.
12029 @end menu
12030
12031
12032 @node Server Buffer
12033 @section Server Buffer
12034
12035 Traditionally, a @dfn{server} is a machine or a piece of software that
12036 one connects to, and then requests information from.  Gnus does not
12037 connect directly to any real servers, but does all transactions through
12038 one back end or other.  But that's just putting one layer more between
12039 the actual media and Gnus, so we might just as well say that each
12040 back end represents a virtual server.
12041
12042 For instance, the @code{nntp} back end may be used to connect to several
12043 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
12044 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
12045 use, and what parameters to set by specifying a @dfn{select method}.
12046
12047 These select method specifications can sometimes become quite
12048 complicated---say, for instance, that you want to read from the
12049 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
12050 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
12051 Anyway, if you had to specify that for each group that used this
12052 server, that would be too much work, so Gnus offers a way of naming
12053 select methods, which is what you do in the server buffer.
12054
12055 To enter the server buffer, use the @kbd{^}
12056 (@code{gnus-group-enter-server-mode}) command in the group buffer.
12057
12058 @menu
12059 * Server Buffer Format::        You can customize the look of this buffer.
12060 * Server Commands::             Commands to manipulate servers.
12061 * Example Methods::             Examples server specifications.
12062 * Creating a Virtual Server::   An example session.
12063 * Server Variables::            Which variables to set.
12064 * Servers and Methods::         You can use server names as select methods.
12065 * Unavailable Servers::         Some servers you try to contact may be down.
12066 @end menu
12067
12068 @vindex gnus-server-mode-hook
12069 @code{gnus-server-mode-hook} is run when creating the server buffer.
12070
12071
12072 @node Server Buffer Format
12073 @subsection Server Buffer Format
12074 @cindex server buffer format
12075
12076 @vindex gnus-server-line-format
12077 You can change the look of the server buffer lines by changing the
12078 @code{gnus-server-line-format} variable.  This is a @code{format}-like
12079 variable, with some simple extensions:
12080
12081 @table @samp
12082
12083 @item h
12084 How the news is fetched---the back end name.
12085
12086 @item n
12087 The name of this server.
12088
12089 @item w
12090 Where the news is to be fetched from---the address.
12091
12092 @item s
12093 The opened/closed/denied status of the server.
12094 @end table
12095
12096 @vindex gnus-server-mode-line-format
12097 The mode line can also be customized by using the
12098 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
12099 Formatting}).  The following specs are understood:
12100
12101 @table @samp
12102 @item S
12103 Server name.
12104
12105 @item M
12106 Server method.
12107 @end table
12108
12109 Also @pxref{Formatting Variables}.
12110
12111
12112 @node Server Commands
12113 @subsection Server Commands
12114 @cindex server commands
12115
12116 @table @kbd
12117
12118 @item a
12119 @kindex a (Server)
12120 @findex gnus-server-add-server
12121 Add a new server (@code{gnus-server-add-server}).
12122
12123 @item e
12124 @kindex e (Server)
12125 @findex gnus-server-edit-server
12126 Edit a server (@code{gnus-server-edit-server}).
12127
12128 @item SPACE
12129 @kindex SPACE (Server)
12130 @findex gnus-server-read-server
12131 Browse the current server (@code{gnus-server-read-server}).
12132
12133 @item q
12134 @kindex q (Server)
12135 @findex gnus-server-exit
12136 Return to the group buffer (@code{gnus-server-exit}).
12137
12138 @item k
12139 @kindex k (Server)
12140 @findex gnus-server-kill-server
12141 Kill the current server (@code{gnus-server-kill-server}).
12142
12143 @item y
12144 @kindex y (Server)
12145 @findex gnus-server-yank-server
12146 Yank the previously killed server (@code{gnus-server-yank-server}).
12147
12148 @item c
12149 @kindex c (Server)
12150 @findex gnus-server-copy-server
12151 Copy the current server (@code{gnus-server-copy-server}).
12152
12153 @item l
12154 @kindex l (Server)
12155 @findex gnus-server-list-servers
12156 List all servers (@code{gnus-server-list-servers}).
12157
12158 @item s
12159 @kindex s (Server)
12160 @findex gnus-server-scan-server
12161 Request that the server scan its sources for new articles
12162 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
12163 servers.
12164
12165 @item g
12166 @kindex g (Server)
12167 @findex gnus-server-regenerate-server
12168 Request that the server regenerate all its data structures
12169 (@code{gnus-server-regenerate-server}).  This can be useful if you have
12170 a mail back end that has gotten out of sync.
12171
12172 @end table
12173
12174
12175 @node Example Methods
12176 @subsection Example Methods
12177
12178 Most select methods are pretty simple and self-explanatory:
12179
12180 @lisp
12181 (nntp "news.funet.fi")
12182 @end lisp
12183
12184 Reading directly from the spool is even simpler:
12185
12186 @lisp
12187 (nnspool "")
12188 @end lisp
12189
12190 As you can see, the first element in a select method is the name of the
12191 back end, and the second is the @dfn{address}, or @dfn{name}, if you
12192 will.
12193
12194 After these two elements, there may be an arbitrary number of
12195 @code{(@var{variable} @var{form})} pairs.
12196
12197 To go back to the first example---imagine that you want to read from
12198 port 15 on that machine.  This is what the select method should
12199 look like then:
12200
12201 @lisp
12202 (nntp "news.funet.fi" (nntp-port-number 15))
12203 @end lisp
12204
12205 You should read the documentation to each back end to find out what
12206 variables are relevant, but here's an @code{nnmh} example:
12207
12208 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
12209 you have two structures that you wish to access: One is your private
12210 mail spool, and the other is a public one.  Here's the possible spec for
12211 your private mail:
12212
12213 @lisp
12214 (nnmh "private" (nnmh-directory "~/private/mail/"))
12215 @end lisp
12216
12217 (This server is then called @samp{private}, but you may have guessed
12218 that.)
12219
12220 Here's the method for a public spool:
12221
12222 @lisp
12223 (nnmh "public"
12224       (nnmh-directory "/usr/information/spool/")
12225       (nnmh-get-new-mail nil))
12226 @end lisp
12227
12228 @cindex proxy
12229 @cindex firewall
12230
12231 If you are behind a firewall and only have access to the @acronym{NNTP}
12232 server from the firewall machine, you can instruct Gnus to @code{rlogin}
12233 on the firewall machine and telnet from there to the @acronym{NNTP} server.
12234 Doing this can be rather fiddly, but your virtual server definition
12235 should probably look something like this:
12236
12237 @lisp
12238 (nntp "firewall"
12239       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
12240       (nntp-via-address "the.firewall.machine")
12241       (nntp-address "the.real.nntp.host")
12242       (nntp-end-of-line "\n"))
12243 @end lisp
12244
12245 If you want to use the wonderful @code{ssh} program to provide a
12246 compressed connection over the modem line, you could add the following
12247 configuration to the example above:
12248
12249 @lisp
12250       (nntp-via-rlogin-command "ssh")
12251 @end lisp
12252
12253 See also @code{nntp-via-rlogin-command-switches}.
12254
12255 If you're behind a firewall, but have direct access to the outside world
12256 through a wrapper command like "runsocks", you could open a socksified
12257 telnet connection to the news server as follows:
12258
12259 @lisp
12260 (nntp "outside"
12261       (nntp-pre-command "runsocks")
12262       (nntp-open-connection-function nntp-open-via-telnet)
12263       (nntp-address "the.news.server")
12264       (nntp-end-of-line "\n"))
12265 @end lisp
12266
12267 This means that you have to have set up @code{ssh-agent} correctly to
12268 provide automatic authorization, of course.  And to get a compressed
12269 connection, you have to have the @samp{Compression} option in the
12270 @code{ssh} @file{config} file.
12271
12272
12273 @node Creating a Virtual Server
12274 @subsection Creating a Virtual Server
12275
12276 If you're saving lots of articles in the cache by using persistent
12277 articles, you may want to create a virtual server to read the cache.
12278
12279 First you need to add a new server.  The @kbd{a} command does that.  It
12280 would probably be best to use @code{nnml} to read the cache.  You
12281 could also use @code{nnspool} or @code{nnmh}, though.
12282
12283 Type @kbd{a nnml RET cache RET}.
12284
12285 You should now have a brand new @code{nnml} virtual server called
12286 @samp{cache}.  You now need to edit it to have the right definitions.
12287 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
12288 will contain the following:
12289
12290 @lisp
12291 (nnml "cache")
12292 @end lisp
12293
12294 Change that to:
12295
12296 @lisp
12297 (nnml "cache"
12298          (nnml-directory "~/News/cache/")
12299          (nnml-active-file "~/News/cache/active"))
12300 @end lisp
12301
12302 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
12303 @kbd{RET} over this virtual server, you should be entered into a browse
12304 buffer, and you should be able to enter any of the groups displayed.
12305
12306
12307 @node Server Variables
12308 @subsection Server Variables
12309 @cindex server variables
12310 @cindex server parameters
12311
12312 One sticky point when defining variables (both on back ends and in Emacs
12313 in general) is that some variables are typically initialized from other
12314 variables when the definition of the variables is being loaded.  If you
12315 change the ``base'' variable after the variables have been loaded, you
12316 won't change the ``derived'' variables.
12317
12318 This typically affects directory and file variables.  For instance,
12319 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
12320 directory variables are initialized from that variable, so
12321 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
12322 new virtual @code{nnml} server, it will @emph{not} suffice to set just
12323 @code{nnml-directory}---you have to explicitly set all the file
12324 variables to be what you want them to be.  For a complete list of
12325 variables for each back end, see each back end's section later in this
12326 manual, but here's an example @code{nnml} definition:
12327
12328 @lisp
12329 (nnml "public"
12330       (nnml-directory "~/my-mail/")
12331       (nnml-active-file "~/my-mail/active")
12332       (nnml-newsgroups-file "~/my-mail/newsgroups"))
12333 @end lisp
12334
12335 Server variables are often called @dfn{server parameters}.
12336
12337 @node Servers and Methods
12338 @subsection Servers and Methods
12339
12340 Wherever you would normally use a select method
12341 (e.g. @code{gnus-secondary-select-method}, in the group select method,
12342 when browsing a foreign server) you can use a virtual server name
12343 instead.  This could potentially save lots of typing.  And it's nice all
12344 over.
12345
12346
12347 @node Unavailable Servers
12348 @subsection Unavailable Servers
12349
12350 If a server seems to be unreachable, Gnus will mark that server as
12351 @code{denied}.  That means that any subsequent attempt to make contact
12352 with that server will just be ignored.  ``It can't be opened,'' Gnus
12353 will tell you, without making the least effort to see whether that is
12354 actually the case or not.
12355
12356 That might seem quite naughty, but it does make sense most of the time.
12357 Let's say you have 10 groups subscribed to on server
12358 @samp{nephelococcygia.com}.  This server is located somewhere quite far
12359 away from you and the machine is quite slow, so it takes 1 minute just
12360 to find out that it refuses connection to you today.  If Gnus were to
12361 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
12362 attempt to do that.  Once it has gotten a single ``connection refused'',
12363 it will regard that server as ``down''.
12364
12365 So, what happens if the machine was only feeling unwell temporarily?
12366 How do you test to see whether the machine has come up again?
12367
12368 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12369 with the following commands:
12370
12371 @table @kbd
12372
12373 @item O
12374 @kindex O (Server)
12375 @findex gnus-server-open-server
12376 Try to establish connection to the server on the current line
12377 (@code{gnus-server-open-server}).
12378
12379 @item C
12380 @kindex C (Server)
12381 @findex gnus-server-close-server
12382 Close the connection (if any) to the server
12383 (@code{gnus-server-close-server}).
12384
12385 @item D
12386 @kindex D (Server)
12387 @findex gnus-server-deny-server
12388 Mark the current server as unreachable
12389 (@code{gnus-server-deny-server}).
12390
12391 @item M-o
12392 @kindex M-o (Server)
12393 @findex gnus-server-open-all-servers
12394 Open the connections to all servers in the buffer
12395 (@code{gnus-server-open-all-servers}).
12396
12397 @item M-c
12398 @kindex M-c (Server)
12399 @findex gnus-server-close-all-servers
12400 Close the connections to all servers in the buffer
12401 (@code{gnus-server-close-all-servers}).
12402
12403 @item R
12404 @kindex R (Server)
12405 @findex gnus-server-remove-denials
12406 Remove all marks to whether Gnus was denied connection from any servers
12407 (@code{gnus-server-remove-denials}).
12408
12409 @item L
12410 @kindex L (Server)
12411 @findex gnus-server-offline-server
12412 Set server status to offline (@code{gnus-server-offline-server}).
12413
12414 @end table
12415
12416
12417 @node Getting News
12418 @section Getting News
12419 @cindex reading news
12420 @cindex news back ends
12421
12422 A newsreader is normally used for reading news.  Gnus currently provides
12423 only two methods of getting news---it can read from an @acronym{NNTP} server,
12424 or it can read from a local spool.
12425
12426 @menu
12427 * NNTP::                        Reading news from an @acronym{NNTP} server.
12428 * News Spool::                  Reading news from the local spool.
12429 @end menu
12430
12431
12432 @node NNTP
12433 @subsection NNTP
12434 @cindex nntp
12435
12436 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
12437 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
12438 server as the, uhm, address.
12439
12440 If the @acronym{NNTP} server is located at a non-standard port, setting the
12441 third element of the select method to this port number should allow you
12442 to connect to the right port.  You'll have to edit the group info for
12443 that (@pxref{Foreign Groups}).
12444
12445 The name of the foreign group can be the same as a native group.  In
12446 fact, you can subscribe to the same group from as many different servers
12447 you feel like.  There will be no name collisions.
12448
12449 The following variables can be used to create a virtual @code{nntp}
12450 server:
12451
12452 @table @code
12453
12454 @item nntp-server-opened-hook
12455 @vindex nntp-server-opened-hook
12456 @cindex @sc{mode reader}
12457 @cindex authinfo
12458 @cindex authentification
12459 @cindex nntp authentification
12460 @findex nntp-send-authinfo
12461 @findex nntp-send-mode-reader
12462 is run after a connection has been made.  It can be used to send
12463 commands to the @acronym{NNTP} server after it has been contacted.  By
12464 default it sends the command @code{MODE READER} to the server with the
12465 @code{nntp-send-mode-reader} function.  This function should always be
12466 present in this hook.
12467
12468 @item nntp-authinfo-function
12469 @vindex nntp-authinfo-function
12470 @findex nntp-send-authinfo
12471 @vindex nntp-authinfo-file
12472 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
12473 server.  The default function is @code{nntp-send-authinfo}, which looks
12474 through your @file{~/.authinfo} (or whatever you've set the
12475 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12476 are found, it will prompt you for a login name and a password.  The
12477 format of the @file{~/.authinfo} file is (almost) the same as the
12478 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12479 manual page, but here are the salient facts:
12480
12481 @enumerate
12482 @item
12483 The file contains one or more line, each of which define one server.
12484
12485 @item
12486 Each line may contain an arbitrary number of token/value pairs.
12487
12488 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12489 @samp{default}.  In addition Gnus introduces two new tokens, not present
12490 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12491 @samp{force}.  (This is the only way the @file{.authinfo} file format
12492 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12493 indicate what port on the server the credentials apply to and
12494 @samp{force} is explained below.
12495
12496 @end enumerate
12497
12498 Here's an example file:
12499
12500 @example
12501 machine news.uio.no login larsi password geheimnis
12502 machine nntp.ifi.uio.no login larsi force yes
12503 @end example
12504
12505 The token/value pairs may appear in any order; @samp{machine} doesn't
12506 have to be first, for instance.
12507
12508 In this example, both login name and password have been supplied for the
12509 former server, while the latter has only the login name listed, and the
12510 user will be prompted for the password.  The latter also has the
12511 @samp{force} tag, which means that the authinfo will be sent to the
12512 @var{nntp} server upon connection; the default (i.e., when there is not
12513 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12514 until the @var{nntp} server asks for it.
12515
12516 You can also add @samp{default} lines that will apply to all servers
12517 that don't have matching @samp{machine} lines.
12518
12519 @example
12520 default force yes
12521 @end example
12522
12523 This will force sending @samp{AUTHINFO} commands to all servers not
12524 previously mentioned.
12525
12526 Remember to not leave the @file{~/.authinfo} file world-readable.
12527
12528 @item nntp-server-action-alist
12529 @vindex nntp-server-action-alist
12530 This is a list of regexps to match on server types and actions to be
12531 taken when matches are made.  For instance, if you want Gnus to beep
12532 every time you connect to innd, you could say something like:
12533
12534 @lisp
12535 (setq nntp-server-action-alist
12536       '(("innd" (ding))))
12537 @end lisp
12538
12539 You probably don't want to do that, though.
12540
12541 The default value is
12542
12543 @lisp
12544 '(("nntpd 1\\.5\\.11t"
12545    (remove-hook 'nntp-server-opened-hook
12546                 'nntp-send-mode-reader)))
12547 @end lisp
12548
12549 This ensures that Gnus doesn't send the @code{MODE READER} command to
12550 nntpd 1.5.11t, since that command chokes that server, I've been told.
12551
12552 @item nntp-maximum-request
12553 @vindex nntp-maximum-request
12554 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
12555 will collect headers by sending a series of @code{head} commands.  To
12556 speed things up, the back end sends lots of these commands without
12557 waiting for reply, and then reads all the replies.  This is controlled
12558 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12559 your network is buggy, you should set this to 1.
12560
12561 @item nntp-connection-timeout
12562 @vindex nntp-connection-timeout
12563 If you have lots of foreign @code{nntp} groups that you connect to
12564 regularly, you're sure to have problems with @acronym{NNTP} servers not
12565 responding properly, or being too loaded to reply within reasonable
12566 time.  This is can lead to awkward problems, which can be helped
12567 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12568 that says how many seconds the @code{nntp} back end should wait for a
12569 connection before giving up.  If it is @code{nil}, which is the default,
12570 no timeouts are done.
12571
12572 @c @item nntp-command-timeout
12573 @c @vindex nntp-command-timeout
12574 @c @cindex PPP connections
12575 @c @cindex dynamic IP addresses
12576 @c If you're running Gnus on a machine that has a dynamically assigned
12577 @c address, Gnus may become confused.  If the address of your machine
12578 @c changes after connecting to the @acronym{NNTP} server, Gnus will simply sit
12579 @c waiting forever for replies from the server.  To help with this
12580 @c unfortunate problem, you can set this command to a number.  Gnus will
12581 @c then, if it sits waiting for a reply from the server longer than that
12582 @c number of seconds, shut down the connection, start a new one, and resend
12583 @c the command.  This should hopefully be transparent to the user.  A
12584 @c likely number is 30 seconds.
12585 @c
12586 @c @item nntp-retry-on-break
12587 @c @vindex nntp-retry-on-break
12588 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12589 @c hangs.  This will have much the same effect as the command timeout
12590 @c described above.
12591
12592 @item nntp-server-hook
12593 @vindex nntp-server-hook
12594 This hook is run as the last step when connecting to an @acronym{NNTP}
12595 server.
12596
12597 @item nntp-buggy-select
12598 @vindex nntp-buggy-select
12599 Set this to non-@code{nil} if your select routine is buggy.
12600
12601 @item nntp-nov-is-evil
12602 @vindex nntp-nov-is-evil
12603 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
12604 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
12605 can be used.
12606
12607 @item nntp-xover-commands
12608 @vindex nntp-xover-commands
12609 @cindex @acronym{NOV}
12610 @cindex XOVER
12611 List of strings used as commands to fetch @acronym{NOV} lines from a
12612 server.  The default value of this variable is @code{("XOVER"
12613 "XOVERVIEW")}.
12614
12615 @item nntp-nov-gap
12616 @vindex nntp-nov-gap
12617 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
12618 the server.  The server responds with one huge list of lines.  However,
12619 if you have read articles 2-5000 in the group, and only want to read
12620 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
12621 lines that you will not need.  This variable says how
12622 big a gap between two consecutive articles is allowed to be before the
12623 @code{XOVER} request is split into several request.  Note that if your
12624 network is fast, setting this variable to a really small number means
12625 that fetching will probably be slower.  If this variable is @code{nil},
12626 @code{nntp} will never split requests.  The default is 5.
12627
12628 @item nntp-prepare-server-hook
12629 @vindex nntp-prepare-server-hook
12630 A hook run before attempting to connect to an @acronym{NNTP} server.
12631
12632 @item nntp-warn-about-losing-connection
12633 @vindex nntp-warn-about-losing-connection
12634 If this variable is non-@code{nil}, some noise will be made when a
12635 server closes connection.
12636
12637 @item nntp-record-commands
12638 @vindex nntp-record-commands
12639 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12640 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
12641 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
12642 that doesn't seem to work.
12643
12644 @item nntp-open-connection-function
12645 @vindex nntp-open-connection-function
12646 It is possible to customize how the connection to the nntp server will
12647 be opened.  If you specify an @code{nntp-open-connection-function}
12648 parameter, Gnus will use that function to establish the connection.
12649 Five pre-made functions are supplied.  These functions can be grouped in
12650 two categories: direct connection functions (three pre-made), and
12651 indirect ones (two pre-made).
12652
12653 @item nntp-prepare-post-hook
12654 @vindex nntp-prepare-post-hook
12655 A hook run just before posting an article.  If there is no
12656 @code{Message-ID} header in the article and the news server provides the
12657 recommended ID, it will be added to the article before running this
12658 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12659 inhibit Gnus to add a @code{Message-ID} header, you could say:
12660
12661 @lisp
12662 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12663 @end lisp
12664
12665 Note that not all servers support the recommended ID.  This works for
12666 INN versions 2.3.0 and later, for instance.
12667
12668 @item nntp-read-timeout
12669 @vindex nntp-read-timeout
12670 How long nntp should wait between checking for the end of output.
12671 Shorter values mean quicker response, but is more CPU intensive.  The
12672 default is 0.1 seconds.  If you have a slow line to the server (and
12673 don't like to see Emacs eat your available CPU power), you might set
12674 this to, say, 1.
12675
12676 @end table
12677
12678 @menu
12679 * Direct Functions::            Connecting directly to the server.
12680 * Indirect Functions::          Connecting indirectly to the server.
12681 * Common Variables::            Understood by several connection functions.
12682 @end menu
12683
12684
12685 @node Direct Functions
12686 @subsubsection Direct Functions
12687 @cindex direct connection functions
12688
12689 These functions are called direct because they open a direct connection
12690 between your machine and the @acronym{NNTP} server.  The behavior of these
12691 functions is also affected by commonly understood variables
12692 (@pxref{Common Variables}).
12693
12694 @table @code
12695 @findex nntp-open-network-stream
12696 @item nntp-open-network-stream
12697 This is the default, and simply connects to some port or other on the
12698 remote system.
12699
12700 @findex nntp-open-tls-stream
12701 @item nntp-open-tls-stream
12702 Opens a connection to a server over a @dfn{secure} channel.  To use
12703 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
12704 installed.  You then define a server as follows:
12705
12706 @lisp
12707 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
12708 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
12709 ;;
12710 (nntp "snews.bar.com"
12711       (nntp-open-connection-function nntp-open-tls-stream)
12712       (nntp-port-number )
12713       (nntp-address "snews.bar.com"))
12714 @end lisp
12715
12716 @findex nntp-open-ssl-stream
12717 @item nntp-open-ssl-stream
12718 Opens a connection to a server over a @dfn{secure} channel.  To use
12719 this you must have @uref{http://www.openssl.org, OpenSSL} or
12720 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
12721 then define a server as follows:
12722
12723 @lisp
12724 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
12725 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
12726 ;;
12727 (nntp "snews.bar.com"
12728       (nntp-open-connection-function nntp-open-ssl-stream)
12729       (nntp-port-number 563)
12730       (nntp-address "snews.bar.com"))
12731 @end lisp
12732
12733 @findex nntp-open-telnet-stream
12734 @item nntp-open-telnet-stream
12735 Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
12736 it.  You might wonder why this function exists, since we have the
12737 default @code{nntp-open-network-stream} which would do the job.  (One
12738 of) the reason(s) is that if you are behind a firewall but have direct
12739 connections to the outside world thanks to a command wrapper like
12740 @code{runsocks}, you can use it like this:
12741
12742 @lisp
12743 (nntp "socksified"
12744       (nntp-pre-command "runsocks")
12745       (nntp-open-connection-function nntp-open-telnet-stream)
12746       (nntp-address "the.news.server"))
12747 @end lisp
12748
12749 With the default method, you would need to wrap your whole Emacs
12750 session, which is not a good idea.
12751 @end table
12752
12753
12754 @node Indirect Functions
12755 @subsubsection Indirect Functions
12756 @cindex indirect connection functions
12757
12758 These functions are called indirect because they connect to an
12759 intermediate host before actually connecting to the @acronym{NNTP} server.
12760 All of these functions and related variables are also said to belong to
12761 the ``via'' family of connection: they're all prefixed with ``via'' to make
12762 things cleaner.  The behavior of these functions is also affected by
12763 commonly understood variables (@pxref{Common Variables}).
12764
12765 @table @code
12766 @item nntp-open-via-rlogin-and-telnet
12767 @findex nntp-open-via-rlogin-and-telnet
12768 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12769 to the real @acronym{NNTP} server from there.  This is useful for instance if
12770 you need to connect to a firewall machine first.
12771
12772 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12773
12774 @table @code
12775 @item nntp-via-rlogin-command
12776 @vindex nntp-via-rlogin-command
12777 Command used to log in on the intermediate host.  The default is
12778 @samp{rsh}, but @samp{ssh} is a popular alternative.
12779
12780 @item nntp-via-rlogin-command-switches
12781 @vindex nntp-via-rlogin-command-switches
12782 List of strings to be used as the switches to
12783 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12784 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
12785 @samp{("-C")} in order to compress all data connections, otherwise set
12786 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
12787 the telnet command requires a pseudo-tty allocation on an intermediate
12788 host.
12789 @end table
12790
12791 @item nntp-open-via-telnet-and-telnet
12792 @findex nntp-open-via-telnet-and-telnet
12793 Does essentially the same, but uses @samp{telnet} instead of
12794 @samp{rlogin} to connect to the intermediate host.
12795
12796 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12797
12798 @table @code
12799 @item nntp-via-telnet-command
12800 @vindex nntp-via-telnet-command
12801 Command used to @code{telnet} the intermediate host.  The default is
12802 @samp{telnet}.
12803
12804 @item nntp-via-telnet-switches
12805 @vindex nntp-via-telnet-switches
12806 List of strings to be used as the switches to the
12807 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12808
12809 @item nntp-via-user-password
12810 @vindex nntp-via-user-password
12811 Password to use when logging in on the intermediate host.
12812
12813 @item nntp-via-envuser
12814 @vindex nntp-via-envuser
12815 If non-@code{nil}, the intermediate @code{telnet} session (client and
12816 server both) will support the @code{ENVIRON} option and not prompt for
12817 login name.  This works for Solaris @code{telnet}, for instance.
12818
12819 @item nntp-via-shell-prompt
12820 @vindex nntp-via-shell-prompt
12821 Regexp matching the shell prompt on the intermediate host.  The default
12822 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12823
12824 @end table
12825
12826 @end table
12827
12828
12829 Here are some additional variables that are understood by all the above
12830 functions:
12831
12832 @table @code
12833
12834 @item nntp-via-user-name
12835 @vindex nntp-via-user-name
12836 User name to use when connecting to the intermediate host.
12837
12838 @item nntp-via-address
12839 @vindex nntp-via-address
12840 Address of the intermediate host to connect to.
12841
12842 @end table
12843
12844
12845 @node Common Variables
12846 @subsubsection Common Variables
12847
12848 The following variables affect the behavior of all, or several of the
12849 pre-made connection functions.  When not specified, all functions are
12850 affected.
12851
12852 @table @code
12853
12854 @item nntp-pre-command
12855 @vindex nntp-pre-command
12856 A command wrapper to use when connecting through a non native
12857 connection function (all except @code{nntp-open-network-stream},
12858 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}.  This is
12859 where you would put a @samp{SOCKS} wrapper for instance.
12860
12861 @item nntp-address
12862 @vindex nntp-address
12863 The address of the @acronym{NNTP} server.
12864
12865 @item nntp-port-number
12866 @vindex nntp-port-number
12867 Port number to connect to the @acronym{NNTP} server.  The default is
12868 @samp{nntp}.  If you use @acronym{NNTP} over
12869 @acronym{tls}/@acronym{ssl}, you may want to use integer ports rather
12870 than named ports (i.e, use @samp{563} instead of @samp{snews} or
12871 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
12872 not work with named ports.
12873
12874 @item nntp-end-of-line
12875 @vindex nntp-end-of-line
12876 String to use as end-of-line marker when talking to the @acronym{NNTP}
12877 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12878 using a non native connection function.
12879
12880 @item nntp-telnet-command
12881 @vindex nntp-telnet-command
12882 Command to use when connecting to the @acronym{NNTP} server through
12883 @samp{telnet}.  This is @emph{not} for an intermediate host.  This is
12884 just for the real @acronym{NNTP} server.  The default is
12885 @samp{telnet}.
12886
12887 @item nntp-telnet-switches
12888 @vindex nntp-telnet-switches
12889 A list of switches to pass to @code{nntp-telnet-command}.  The default
12890 is @samp{("-8")}.
12891
12892 @end table
12893
12894
12895 @node News Spool
12896 @subsection News Spool
12897 @cindex nnspool
12898 @cindex news spool
12899
12900 Subscribing to a foreign group from the local spool is extremely easy,
12901 and might be useful, for instance, to speed up reading groups that
12902 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12903 instance.
12904
12905 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12906 anything else) as the address.
12907
12908 If you have access to a local spool, you should probably use that as the
12909 native select method (@pxref{Finding the News}).  It is normally faster
12910 than using an @code{nntp} select method, but might not be.  It depends.
12911 You just have to try to find out what's best at your site.
12912
12913 @table @code
12914
12915 @item nnspool-inews-program
12916 @vindex nnspool-inews-program
12917 Program used to post an article.
12918
12919 @item nnspool-inews-switches
12920 @vindex nnspool-inews-switches
12921 Parameters given to the inews program when posting an article.
12922
12923 @item nnspool-spool-directory
12924 @vindex nnspool-spool-directory
12925 Where @code{nnspool} looks for the articles.  This is normally
12926 @file{/usr/spool/news/}.
12927
12928 @item nnspool-nov-directory
12929 @vindex nnspool-nov-directory
12930 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
12931 @file{/usr/spool/news/over.view/}.
12932
12933 @item nnspool-lib-dir
12934 @vindex nnspool-lib-dir
12935 Where the news lib dir is (@file{/usr/lib/news/} by default).
12936
12937 @item nnspool-active-file
12938 @vindex nnspool-active-file
12939 The name of the active file.
12940
12941 @item nnspool-newsgroups-file
12942 @vindex nnspool-newsgroups-file
12943 The name of the group descriptions file.
12944
12945 @item nnspool-history-file
12946 @vindex nnspool-history-file
12947 The name of the news history file.
12948
12949 @item nnspool-active-times-file
12950 @vindex nnspool-active-times-file
12951 The name of the active date file.
12952
12953 @item nnspool-nov-is-evil
12954 @vindex nnspool-nov-is-evil
12955 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
12956 that it finds.
12957
12958 @item nnspool-sift-nov-with-sed
12959 @vindex nnspool-sift-nov-with-sed
12960 @cindex sed
12961 If non-@code{nil}, which is the default, use @code{sed} to get the
12962 relevant portion from the overview file.  If @code{nil},
12963 @code{nnspool} will load the entire file into a buffer and process it
12964 there.
12965
12966 @end table
12967
12968
12969 @node Getting Mail
12970 @section Getting Mail
12971 @cindex reading mail
12972 @cindex mail
12973
12974 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12975 course.
12976
12977 @menu
12978 * Mail in a Newsreader::        Important introductory notes.
12979 * Getting Started Reading Mail::  A simple cookbook example.
12980 * Splitting Mail::              How to create mail groups.
12981 * Mail Sources::                How to tell Gnus where to get mail from.
12982 * Mail Back End Variables::     Variables for customizing mail handling.
12983 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12984 * Group Mail Splitting::        Use group customize to drive mail splitting.
12985 * Incorporating Old Mail::      What about the old mail you have?
12986 * Expiring Mail::               Getting rid of unwanted mail.
12987 * Washing Mail::                Removing cruft from the mail you get.
12988 * Duplicates::                  Dealing with duplicated mail.
12989 * Not Reading Mail::            Using mail back ends for reading other files.
12990 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12991 @end menu
12992
12993
12994 @node Mail in a Newsreader
12995 @subsection Mail in a Newsreader
12996
12997 If you are used to traditional mail readers, but have decided to switch
12998 to reading mail with Gnus, you may find yourself experiencing something
12999 of a culture shock.
13000
13001 Gnus does not behave like traditional mail readers.  If you want to make
13002 it behave that way, you can, but it's an uphill battle.
13003
13004 Gnus, by default, handles all its groups using the same approach.  This
13005 approach is very newsreaderly---you enter a group, see the new/unread
13006 messages, and when you read the messages, they get marked as read, and
13007 you don't see them any more.  (Unless you explicitly ask for them.)
13008
13009 In particular, you do not do anything explicitly to delete messages.
13010
13011 Does this mean that all the messages that have been marked as read are
13012 deleted?  How awful!
13013
13014 But, no, it means that old messages are @dfn{expired} according to some
13015 scheme or other.  For news messages, the expire process is controlled by
13016 the news administrator; for mail, the expire process is controlled by
13017 you.  The expire process for mail is covered in depth in @ref{Expiring
13018 Mail}.
13019
13020 What many Gnus users find, after using it a while for both news and
13021 mail, is that the transport mechanism has very little to do with how
13022 they want to treat a message.
13023
13024 Many people subscribe to several mailing lists.  These are transported
13025 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
13026 answering, or even reading these messages very carefully.  We may not
13027 need to save them because if we should need to read one again, they are
13028 archived somewhere else.
13029
13030 Some people have local news groups which have only a handful of readers.
13031 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
13032 to read and answer a large fraction of the messages very carefully in
13033 order to do our work.  And there may not be an archive, so we may need
13034 to save the interesting messages the same way we would personal mail.
13035
13036 The important distinction turns out to be not the transport mechanism,
13037 but other factors such as how interested we are in the subject matter,
13038 or how easy it is to retrieve the message if we need to read it again.
13039
13040 Gnus provides many options for sorting mail into ``groups'' which behave
13041 like newsgroups, and for treating each group (whether mail or news)
13042 differently.
13043
13044 Some users never get comfortable using the Gnus (ahem) paradigm and wish
13045 that Gnus should grow up and be a male, er, mail reader.  It is possible
13046 to whip Gnus into a more mailreaderly being, but, as said before, it's
13047 not easy.  People who prefer proper mail readers should try @sc{vm}
13048 instead, which is an excellent, and proper, mail reader.
13049
13050 I don't mean to scare anybody off, but I want to make it clear that you
13051 may be required to learn a new way of thinking about messages.  After
13052 you've been subjected to The Gnus Way, you will come to love it.  I can
13053 guarantee it.  (At least the guy who sold me the Emacs Subliminal
13054 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
13055 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
13056 You Do.)
13057
13058
13059 @node Getting Started Reading Mail
13060 @subsection Getting Started Reading Mail
13061
13062 It's quite easy to use Gnus to read your new mail.  You just plonk the
13063 mail back end of your choice into @code{gnus-secondary-select-methods},
13064 and things will happen automatically.
13065
13066 For instance, if you want to use @code{nnml} (which is a ``one file per
13067 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
13068
13069 @lisp
13070 (setq gnus-secondary-select-methods '((nnml "")))
13071 @end lisp
13072
13073 Now, the next time you start Gnus, this back end will be queried for new
13074 articles, and it will move all the messages in your spool file to its
13075 directory, which is @file{~/Mail/} by default.  The new group that will
13076 be created (@samp{mail.misc}) will be subscribed, and you can read it
13077 like any other group.
13078
13079 You will probably want to split the mail into several groups, though:
13080
13081 @lisp
13082 (setq nnmail-split-methods
13083       '(("junk" "^From:.*Lars Ingebrigtsen")
13084         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
13085         ("other" "")))
13086 @end lisp
13087
13088 This will result in three new @code{nnml} mail groups being created:
13089 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
13090 mail that doesn't fit into the first two groups will be placed in the
13091 last group.
13092
13093 This should be sufficient for reading mail with Gnus.  You might want to
13094 give the other sections in this part of the manual a perusal, though.
13095 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
13096
13097
13098 @node Splitting Mail
13099 @subsection Splitting Mail
13100 @cindex splitting mail
13101 @cindex mail splitting
13102 @cindex mail filtering (splitting)
13103
13104 @vindex nnmail-split-methods
13105 The @code{nnmail-split-methods} variable says how the incoming mail is
13106 to be split into groups.
13107
13108 @lisp
13109 (setq nnmail-split-methods
13110   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
13111     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
13112     ("mail.other" "")))
13113 @end lisp
13114
13115 This variable is a list of lists, where the first element of each of
13116 these lists is the name of the mail group (they do not have to be called
13117 something beginning with @samp{mail}, by the way), and the second
13118 element is a regular expression used on the header of each mail to
13119 determine if it belongs in this mail group.  The first string may
13120 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
13121 insert sub-expressions from the matched text.  For instance:
13122
13123 @lisp
13124 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
13125 @end lisp
13126
13127 The second element can also be a function.  In that case, it will be
13128 called narrowed to the headers with the first element of the rule as the
13129 argument.  It should return a non-@code{nil} value if it thinks that the
13130 mail belongs in that group.
13131
13132 The last of these groups should always be a general one, and the regular
13133 expression should @emph{always} be @samp{*} so that it matches any mails
13134 that haven't been matched by any of the other regexps.  (These rules are
13135 processed from the beginning of the alist toward the end.  The first
13136 rule to make a match will ``win'', unless you have crossposting enabled.
13137 In that case, all matching rules will ``win''.)
13138
13139 If you like to tinker with this yourself, you can set this variable to a
13140 function of your choice.  This function will be called without any
13141 arguments in a buffer narrowed to the headers of an incoming mail
13142 message.  The function should return a list of group names that it
13143 thinks should carry this mail message.
13144
13145 Note that the mail back ends are free to maul the poor, innocent,
13146 incoming headers all they want to.  They all add @code{Lines} headers;
13147 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
13148 @code{From<SPACE>} line to something else.
13149
13150 @vindex nnmail-crosspost
13151 The mail back ends all support cross-posting.  If several regexps match,
13152 the mail will be ``cross-posted'' to all those groups.
13153 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
13154 that no articles are crossposted to the general (@samp{*}) group.
13155
13156 @vindex nnmail-crosspost-link-function
13157 @cindex crosspost
13158 @cindex links
13159 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
13160 the crossposted articles.  However, not all file systems support hard
13161 links.  If that's the case for you, set
13162 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
13163 variable is @code{add-name-to-file} by default.)
13164
13165 @kindex M-x nnmail-split-history
13166 @findex nnmail-split-history
13167 If you wish to see where the previous mail split put the messages, you
13168 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
13169 where re-spooling messages would put the messages, you can use
13170 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
13171 Group Commands}).
13172
13173 @vindex nnmail-split-header-length-limit
13174 Header lines longer than the value of
13175 @code{nnmail-split-header-length-limit} are excluded from the split
13176 function.
13177
13178 @vindex nnmail-mail-splitting-charset
13179 @vindex nnmail-mail-splitting-decodes
13180 By default the splitting codes @acronym{MIME} decodes headers so you
13181 can match on non-@acronym{ASCII} strings.  The
13182 @code{nnmail-mail-splitting-charset} variable specifies the default
13183 charset for decoding.  The behaviour can be turned off completely by
13184 binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
13185 useful if you want to match articles based on the raw header data.
13186
13187 @vindex nnmail-resplit-incoming
13188 By default, splitting is performed on all incoming messages.  If you
13189 specify a @code{directory} entry for the variable @code{mail-sources}
13190 (@pxref{Mail Source Specifiers}), however, then splitting does
13191 @emph{not} happen by default.  You can set the variable
13192 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
13193 splitting happen even in this case.  (This variable has no effect on
13194 other kinds of entries.)
13195
13196 Gnus gives you all the opportunity you could possibly want for shooting
13197 yourself in the foot.  Let's say you create a group that will contain
13198 all the mail you get from your boss.  And then you accidentally
13199 unsubscribe from the group.  Gnus will still put all the mail from your
13200 boss in the unsubscribed group, and so, when your boss mails you ``Have
13201 that report ready by Monday or you're fired!'', you'll never see it and,
13202 come Tuesday, you'll still believe that you're gainfully employed while
13203 you really should be out collecting empty bottles to save up for next
13204 month's rent money.
13205
13206
13207 @node Mail Sources
13208 @subsection Mail Sources
13209
13210 Mail can be gotten from many different sources---the mail spool, from
13211 a @acronym{POP} mail server, from a procmail directory, or from a
13212 maildir, for instance.
13213
13214 @menu
13215 * Mail Source Specifiers::      How to specify what a mail source is.
13216 * Mail Source Customization::   Some variables that influence things.
13217 * Fetching Mail::               Using the mail source specifiers.
13218 @end menu
13219
13220
13221 @node Mail Source Specifiers
13222 @subsubsection Mail Source Specifiers
13223 @cindex POP
13224 @cindex mail server
13225 @cindex procmail
13226 @cindex mail spool
13227 @cindex mail source
13228
13229 You tell Gnus how to fetch mail by setting @code{mail-sources}
13230 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
13231
13232 Here's an example:
13233
13234 @lisp
13235 (pop :server "pop3.mailserver.com" :user "myname")
13236 @end lisp
13237
13238 As can be observed, a mail source specifier is a list where the first
13239 element is a @dfn{mail source type}, followed by an arbitrary number of
13240 @dfn{keywords}.  Keywords that are not explicitly specified are given
13241 default values.
13242
13243 The following mail source types are available:
13244
13245 @table @code
13246 @item file
13247 Get mail from a single file; typically from the mail spool.
13248
13249 Keywords:
13250
13251 @table @code
13252 @item :path
13253 The file name.  Defaults to the value of the @env{MAIL}
13254 environment variable or the value of @code{rmail-spool-directory}
13255 (usually something like @file{/usr/mail/spool/user-name}).
13256
13257 @item :prescript
13258 @itemx :postscript
13259 Script run before/after fetching mail.
13260 @end table
13261
13262 An example file mail source:
13263
13264 @lisp
13265 (file :path "/usr/spool/mail/user-name")
13266 @end lisp
13267
13268 Or using the default file name:
13269
13270 @lisp
13271 (file)
13272 @end lisp
13273
13274 If the mail spool file is not located on the local machine, it's best
13275 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
13276 You can not use ange-ftp file names here---it has no way to lock the
13277 mail spool while moving the mail.
13278
13279 If it's impossible to set up a proper server, you can use ssh instead.
13280
13281 @lisp
13282 (setq mail-sources
13283       '((file :prescript "ssh host bin/getmail >%t")))
13284 @end lisp
13285
13286 The @samp{getmail} script would look something like the following:
13287
13288 @example
13289 #!/bin/sh
13290 #  getmail - move mail from spool to stdout
13291 #  flu@@iki.fi
13292
13293 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
13294 TMP=$HOME/Mail/tmp
13295 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
13296 @end example
13297
13298 Alter this script to fit find the @samp{movemail} you want to use.
13299
13300
13301 @item directory
13302 @vindex nnmail-scan-directory-mail-source-once
13303 Get mail from several files in a directory.  This is typically used
13304 when you have procmail split the incoming mail into several files.
13305 That is, there is a one-to-one correspondence between files in that
13306 directory and groups, so that mail from the file @file{foo.bar.spool}
13307 will be put in the group @code{foo.bar}.  (You can change the suffix
13308 to be used instead of @code{.spool}.)  Setting
13309 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
13310 Gnus to scan the mail source only once.  This is particularly useful
13311 if you want to scan mail groups at a specified level.
13312
13313 @vindex nnmail-resplit-incoming
13314 There is also the variable @code{nnmail-resplit-incoming}, if you set
13315 that to a non-@code{nil} value, then the normal splitting process is
13316 applied to all the files from the directory, @ref{Splitting Mail}.
13317
13318 Keywords:
13319
13320 @table @code
13321 @item :path
13322 The name of the directory where the files are.  There is no default
13323 value.
13324
13325 @item :suffix
13326 Only files ending with this suffix are used.  The default is
13327 @samp{.spool}.
13328
13329 @item :predicate
13330 Only files that have this predicate return non-@code{nil} are returned.
13331 The default is @code{identity}.  This is used as an additional
13332 filter---only files that have the right suffix @emph{and} satisfy this
13333 predicate are considered.
13334
13335 @item :prescript
13336 @itemx :postscript
13337 Script run before/after fetching mail.
13338
13339 @end table
13340
13341 An example directory mail source:
13342
13343 @lisp
13344 (directory :path "/home/user-name/procmail-dir/"
13345            :suffix ".prcml")
13346 @end lisp
13347
13348 @item pop
13349 Get mail from a @acronym{POP} server.
13350
13351 Keywords:
13352
13353 @table @code
13354 @item :server
13355 The name of the @acronym{POP} server.  The default is taken from the
13356 @env{MAILHOST} environment variable.
13357
13358 @item :port
13359 The port number of the @acronym{POP} server.  This can be a number (eg,
13360 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
13361 string, it should be a service name as listed in @file{/etc/services} on
13362 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
13363 need to specify it as @samp{"pop-3"} instead.
13364
13365 @item :user
13366 The user name to give to the @acronym{POP} server.  The default is the login
13367 name.
13368
13369 @item :password
13370 The password to give to the @acronym{POP} server.  If not specified,
13371 the user is prompted.
13372
13373 @item :program
13374 The program to use to fetch mail from the @acronym{POP} server.  This
13375 should be a @code{format}-like string.  Here's an example:
13376
13377 @example
13378 fetchmail %u@@%s -P %p %t
13379 @end example
13380
13381 The valid format specifier characters are:
13382
13383 @table @samp
13384 @item t
13385 The name of the file the mail is to be moved to.  This must always be
13386 included in this string.
13387
13388 @item s
13389 The name of the server.
13390
13391 @item P
13392 The port number of the server.
13393
13394 @item u
13395 The user name to use.
13396
13397 @item p
13398 The password to use.
13399 @end table
13400
13401 The values used for these specs are taken from the values you give the
13402 corresponding keywords.
13403
13404 @item :prescript
13405 A script to be run before fetching the mail.  The syntax is the same as
13406 the @code{:program} keyword.  This can also be a function to be run.
13407
13408 @item :postscript
13409 A script to be run after fetching the mail.  The syntax is the same as
13410 the @code{:program} keyword.  This can also be a function to be run.
13411
13412 @item :function
13413 The function to use to fetch mail from the @acronym{POP} server.  The
13414 function is called with one parameter---the name of the file where the
13415 mail should be moved to.
13416
13417 @item :authentication
13418 This can be either the symbol @code{password} or the symbol @code{apop}
13419 and says what authentication scheme to use.  The default is
13420 @code{password}.
13421
13422 @end table
13423
13424 If the @code{:program} and @code{:function} keywords aren't specified,
13425 @code{pop3-movemail} will be used.
13426
13427 Here are some examples.  Fetch from the default @acronym{POP} server,
13428 using the default user name, and default fetcher:
13429
13430 @lisp
13431 (pop)
13432 @end lisp
13433
13434 Fetch from a named server with a named user and password:
13435
13436 @lisp
13437 (pop :server "my.pop.server"
13438      :user "user-name" :password "secret")
13439 @end lisp
13440
13441 Use @samp{movemail} to move the mail:
13442
13443 @lisp
13444 (pop :program "movemail po:%u %t %p")
13445 @end lisp
13446
13447 @item maildir
13448 Get mail from a maildir.  This is a type of mailbox that is supported by
13449 at least qmail and postfix, where each file in a special directory
13450 contains exactly one mail.
13451
13452 Keywords:
13453
13454 @table @code
13455 @item :path
13456 The name of the directory where the mails are stored.  The default is
13457 taken from the @env{MAILDIR} environment variable or
13458 @file{~/Maildir/}.
13459 @item :subdirs
13460 The subdirectories of the Maildir.  The default is
13461 @samp{("new" "cur")}.
13462
13463 @c If you sometimes look at your mail through a pop3 daemon before fetching
13464 @c them with Gnus, you may also have to fetch your mails from the
13465 @c @code{cur} directory inside the maildir, like in the first example
13466 @c below.
13467
13468 You can also get mails from remote hosts (because maildirs don't suffer
13469 from locking problems).
13470
13471 @end table
13472
13473 Two example maildir mail sources:
13474
13475 @lisp
13476 (maildir :path "/home/user-name/Maildir/"
13477          :subdirs ("cur" "new"))
13478 @end lisp
13479
13480 @lisp
13481 (maildir :path "/user@@remotehost.org:~/Maildir/"
13482          :subdirs ("new"))
13483 @end lisp
13484
13485 @item imap
13486 Get mail from a @acronym{IMAP} server.  If you don't want to use
13487 @acronym{IMAP} as intended, as a network mail reading protocol (ie
13488 with nnimap), for some reason or other, Gnus let you treat it similar
13489 to a @acronym{POP} server and fetches articles from a given
13490 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
13491
13492 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
13493 may need external programs and libraries, @xref{IMAP}.
13494
13495 Keywords:
13496
13497 @table @code
13498 @item :server
13499 The name of the @acronym{IMAP} server.  The default is taken from the
13500 @env{MAILHOST} environment variable.
13501
13502 @item :port
13503 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
13504 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
13505
13506 @item :user
13507 The user name to give to the @acronym{IMAP} server.  The default is the login
13508 name.
13509
13510 @item :password
13511 The password to give to the @acronym{IMAP} server.  If not specified, the user is
13512 prompted.
13513
13514 @item :stream
13515 What stream to use for connecting to the server, this is one of the
13516 symbols in @code{imap-stream-alist}.  Right now, this means
13517 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
13518 @samp{ssl}, @samp{shell} or the default @samp{network}.
13519
13520 @item :authentication
13521 Which authenticator to use for authenticating to the server, this is
13522 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13523 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13524 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13525
13526 @item :program
13527 When using the `shell' :stream, the contents of this variable is
13528 mapped into the @code{imap-shell-program} variable.  This should be a
13529 @code{format}-like string (or list of strings).  Here's an example:
13530
13531 @example
13532 ssh %s imapd
13533 @end example
13534
13535 The valid format specifier characters are:
13536
13537 @table @samp
13538 @item s
13539 The name of the server.
13540
13541 @item l
13542 User name from @code{imap-default-user}.
13543
13544 @item p
13545 The port number of the server.
13546 @end table
13547
13548 The values used for these specs are taken from the values you give the
13549 corresponding keywords.
13550
13551 @item :mailbox
13552 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13553 which normally is the mailbox which receive incoming mail.
13554
13555 @item :predicate
13556 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13557 UNDELETED}, is probably the best choice for most people, but if you
13558 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
13559 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13560 Then all articles in the mailbox is fetched, no matter what.  For a
13561 complete list of predicates, see RFC 2060 section 6.4.4.
13562
13563 @item :fetchflag
13564 How to flag fetched articles on the server, the default @samp{\Deleted}
13565 will mark them as deleted, an alternative would be @samp{\Seen} which
13566 would simply mark them as read.  These are the two most likely choices,
13567 but more flags are defined in RFC 2060 section 2.3.2.
13568
13569 @item :dontexpunge
13570 If non-@code{nil}, don't remove all articles marked as deleted in the
13571 mailbox after finishing the fetch.
13572
13573 @end table
13574
13575 An example @acronym{IMAP} mail source:
13576
13577 @lisp
13578 (imap :server "mail.mycorp.com"
13579       :stream kerberos4
13580       :fetchflag "\\Seen")
13581 @end lisp
13582
13583 @item webmail
13584 Get mail from a webmail server, such as @uref{http://www.hotmail.com/},
13585 @uref{http://webmail.netscape.com/}, @uref{http://www.netaddress.com/},
13586 @uref{http://mail.yahoo.com/}.
13587
13588 NOTE: Webmail largely depends on cookies.  A "one-line-cookie" patch is
13589 required for url "4.0pre.46".
13590
13591 WARNING: Mails may be lost.  NO WARRANTY.
13592
13593 Keywords:
13594
13595 @table @code
13596 @item :subtype
13597 The type of the webmail server.  The default is @code{hotmail}.  The
13598 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13599
13600 @item :user
13601 The user name to give to the webmail server.  The default is the login
13602 name.
13603
13604 @item :password
13605 The password to give to the webmail server.  If not specified, the user is
13606 prompted.
13607
13608 @item :dontexpunge
13609 If non-@code{nil}, only fetch unread articles and don't move them to
13610 trash folder after finishing the fetch.
13611
13612 @end table
13613
13614 An example webmail source:
13615
13616 @lisp
13617 (webmail :subtype 'hotmail
13618          :user "user-name"
13619          :password "secret")
13620 @end lisp
13621 @end table
13622
13623 @table @dfn
13624 @item Common Keywords
13625 Common keywords can be used in any type of mail source.
13626
13627 Keywords:
13628
13629 @table @code
13630 @item :plugged
13631 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
13632 use directory source to get mail, you can specify it as in this
13633 example:
13634
13635 @lisp
13636 (setq mail-sources
13637       '((directory :path "/home/pavel/.Spool/"
13638                    :suffix ""
13639                    :plugged t)))
13640 @end lisp
13641
13642 Gnus will then fetch your mail even when you are unplugged.  This is
13643 useful when you use local mail and news.
13644
13645 @end table
13646 @end table
13647
13648 @subsubsection Function Interface
13649
13650 Some of the above keywords specify a Lisp function to be executed.
13651 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13652 the value of the keyword while the function is executing.  For example,
13653 consider the following mail-source setting:
13654
13655 @lisp
13656 (setq mail-sources '((pop :user "jrl"
13657                           :server "pophost" :function fetchfunc)))
13658 @end lisp
13659
13660 While the function @code{fetchfunc} is executing, the symbol @code{user}
13661 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13662 @code{"pophost"}.  The symbols @code{port}, @code{password},
13663 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13664 and @code{authentication} are also bound (to their default values).
13665
13666 See above for a list of keywords for each type of mail source.
13667
13668
13669 @node Mail Source Customization
13670 @subsubsection Mail Source Customization
13671
13672 The following is a list of variables that influence how the mail is
13673 fetched.  You would normally not need to set or change any of these
13674 variables.
13675
13676 @table @code
13677 @item mail-source-crash-box
13678 @vindex mail-source-crash-box
13679 File where mail will be stored while processing it.  The default is@*
13680 @file{~/.emacs-mail-crash-box}.
13681
13682 @item mail-source-delete-incoming
13683 @vindex mail-source-delete-incoming
13684 If non-@code{nil}, delete incoming files after handling them.  If
13685 @code{t}, delete the files immediately, if @code{nil}, never delete any
13686 files.  If a positive number, delete files older than number of days
13687 (This will only happen, when receiving new mail).  You may also set
13688 @code{mail-source-delete-incoming} to @code{nil} and call
13689 @code{mail-source-delete-old-incoming} from a hook or interactively.
13690
13691 @item mail-source-delete-old-incoming-confirm
13692 @vindex mail-source-delete-old-incoming-confirm
13693 If non-@code{nil}, ask for for confirmation before deleting old incoming
13694 files.  This variable only applies when
13695 @code{mail-source-delete-incoming} is a positive number.
13696
13697 @item mail-source-ignore-errors
13698 @vindex mail-source-ignore-errors
13699 If non-@code{nil}, ignore errors when reading mail from a mail source.
13700
13701 @item mail-source-directory
13702 @vindex mail-source-directory
13703 Directory where files (if any) will be stored.  The default is
13704 @file{~/Mail/}.  At present, the only thing this is used for is to say
13705 where the incoming files will be stored if the previous variable is
13706 @code{nil}.
13707
13708 @item mail-source-incoming-file-prefix
13709 @vindex mail-source-incoming-file-prefix
13710 Prefix for file name for storing incoming mail.  The default is
13711 @file{Incoming}, in which case files will end up with names like
13712 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13713 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13714
13715 @item mail-source-default-file-modes
13716 @vindex mail-source-default-file-modes
13717 All new mail files will get this file mode.  The default is 384.
13718
13719 @item mail-source-movemail-program
13720 @vindex mail-source-movemail-program
13721 If non-@code{nil}, name of program for fetching new mail.  If
13722 @code{nil}, @code{movemail} in @var{exec-directory}.
13723
13724 @end table
13725
13726
13727 @node Fetching Mail
13728 @subsubsection Fetching Mail
13729
13730 @vindex mail-sources
13731 @vindex nnmail-spool-file
13732 The way to actually tell Gnus where to get new mail from is to set
13733 @code{mail-sources} to a list of mail source specifiers
13734 (@pxref{Mail Source Specifiers}).
13735
13736 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13737 @code{nil}, the mail back ends will never attempt to fetch mail by
13738 themselves.
13739
13740 If you want to fetch mail both from your local spool as well as a
13741 @acronym{POP} mail server, you'd say something like:
13742
13743 @lisp
13744 (setq mail-sources
13745       '((file)
13746         (pop :server "pop3.mail.server"
13747              :password "secret")))
13748 @end lisp
13749
13750 Or, if you don't want to use any of the keyword defaults:
13751
13752 @lisp
13753 (setq mail-sources
13754       '((file :path "/var/spool/mail/user-name")
13755         (pop :server "pop3.mail.server"
13756              :user "user-name"
13757              :port "pop3"
13758              :password "secret")))
13759 @end lisp
13760
13761
13762 When you use a mail back end, Gnus will slurp all your mail from your
13763 inbox and plonk it down in your home directory.  Gnus doesn't move any
13764 mail if you're not using a mail back end---you have to do a lot of magic
13765 invocations first.  At the time when you have finished drawing the
13766 pentagram, lightened the candles, and sacrificed the goat, you really
13767 shouldn't be too surprised when Gnus moves your mail.
13768
13769
13770
13771 @node Mail Back End Variables
13772 @subsection Mail Back End Variables
13773
13774 These variables are (for the most part) pertinent to all the various
13775 mail back ends.
13776
13777 @table @code
13778 @vindex nnmail-read-incoming-hook
13779 @item nnmail-read-incoming-hook
13780 The mail back ends all call this hook after reading new mail.  You can
13781 use this hook to notify any mail watch programs, if you want to.
13782
13783 @vindex nnmail-split-hook
13784 @item nnmail-split-hook
13785 @findex gnus-article-decode-encoded-words
13786 @cindex RFC 1522 decoding
13787 @cindex RFC 2047 decoding
13788 Hook run in the buffer where the mail headers of each message is kept
13789 just before the splitting based on these headers is done.  The hook is
13790 free to modify the buffer contents in any way it sees fit---the buffer
13791 is discarded after the splitting has been done, and no changes performed
13792 in the buffer will show up in any files.
13793 @code{gnus-article-decode-encoded-words} is one likely function to add
13794 to this hook.
13795
13796 @vindex nnmail-pre-get-new-mail-hook
13797 @vindex nnmail-post-get-new-mail-hook
13798 @item nnmail-pre-get-new-mail-hook
13799 @itemx nnmail-post-get-new-mail-hook
13800 These are two useful hooks executed when treating new incoming
13801 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13802 starting to handle the new mail) and
13803 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13804 is done).  Here's and example of using these two hooks to change the
13805 default file modes the new mail files get:
13806
13807 @lisp
13808 (add-hook 'nnmail-pre-get-new-mail-hook
13809           (lambda () (set-default-file-modes 511)))
13810
13811 (add-hook 'nnmail-post-get-new-mail-hook
13812           (lambda () (set-default-file-modes 551)))
13813 @end lisp
13814
13815 @item nnmail-use-long-file-names
13816 @vindex nnmail-use-long-file-names
13817 If non-@code{nil}, the mail back ends will use long file and directory
13818 names.  Groups like @samp{mail.misc} will end up in directories
13819 (assuming use of @code{nnml} back end) or files (assuming use of
13820 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13821 the same group will end up in @file{mail/misc}.
13822
13823 @item nnmail-delete-file-function
13824 @vindex nnmail-delete-file-function
13825 @findex delete-file
13826 Function called to delete files.  It is @code{delete-file} by default.
13827
13828 @item nnmail-cache-accepted-message-ids
13829 @vindex nnmail-cache-accepted-message-ids
13830 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13831 the back end (via @code{Gcc}, for instance) into the mail duplication
13832 discovery cache.  The default is @code{nil}.
13833
13834 @item nnmail-cache-ignore-groups
13835 @vindex nnmail-cache-ignore-groups
13836 This can be a regular expression or a list of regular expressions.
13837 Group names that match any of the regular expressions will never be
13838 recorded in the @code{Message-ID} cache.
13839
13840 This can be useful, for example, when using Fancy Splitting
13841 (@pxref{Fancy Mail Splitting}) together with the function
13842 @code{nnmail-split-fancy-with-parent}.
13843
13844 @end table
13845
13846
13847 @node Fancy Mail Splitting
13848 @subsection Fancy Mail Splitting
13849 @cindex mail splitting
13850 @cindex fancy mail splitting
13851
13852 @vindex nnmail-split-fancy
13853 @findex nnmail-split-fancy
13854 If the rather simple, standard method for specifying how to split mail
13855 doesn't allow you to do what you want, you can set
13856 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13857 play with the @code{nnmail-split-fancy} variable.
13858
13859 Let's look at an example value of this variable first:
13860
13861 @lisp
13862 ;; @r{Messages from the mailer daemon are not crossposted to any of}
13863 ;; @r{the ordinary groups.  Warnings are put in a separate group}
13864 ;; @r{from real errors.}
13865 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13866                    "mail.misc"))
13867    ;; @r{Non-error messages are crossposted to all relevant}
13868    ;; @r{groups, but we don't crosspost between the group for the}
13869    ;; @r{(ding) list and the group for other (ding) related mail.}
13870    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13871          ("subject" "ding" "ding.misc"))
13872       ;; @r{Other mailing lists@dots{}}
13873       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13874       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13875       ;; @r{Both lists below have the same suffix, so prevent}
13876       ;; @r{cross-posting to mkpkg.list of messages posted only to}
13877       ;; @r{the bugs- list, but allow cross-posting when the}
13878       ;; @r{message was really cross-posted.}
13879       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13880       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13881       ;; @r{People@dots{}}
13882       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13883    ;; @r{Unmatched mail goes to the catch all group.}
13884    "misc.misc")
13885 @end lisp
13886
13887 This variable has the format of a @dfn{split}.  A split is a
13888 (possibly) recursive structure where each split may contain other
13889 splits.  Here are the possible split syntaxes:
13890
13891 @table @code
13892
13893 @item group 
13894 If the split is a string, that will be taken as a group name.  Normal
13895 regexp match expansion will be done.  See below for examples.
13896
13897 @item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split})
13898 If the split is a list, the first element of which is a string, then
13899 store the message as specified by @var{split}, if header @var{field}
13900 (a regexp) contains @var{value} (also a regexp).  If @var{restrict}
13901 (yet another regexp) matches some string after @var{field} and before
13902 the end of the matched @var{value}, the @var{split} is ignored.  If
13903 none of the @var{restrict} clauses match, @var{split} is processed.
13904
13905 @item (| @var{split} @dots{})
13906 If the split is a list, and the first element is @code{|} (vertical
13907 bar), then process each @var{split} until one of them matches.  A
13908 @var{split} is said to match if it will cause the mail message to be
13909 stored in one or more groups.
13910
13911 @item (& @var{split} @dots{})
13912 If the split is a list, and the first element is @code{&}, then
13913 process all @var{split}s in the list.
13914
13915 @item junk
13916 If the split is the symbol @code{junk}, then don't save (i.e., delete)
13917 this message.  Use with extreme caution.
13918
13919 @item (: @var{function} @var{arg1} @var{arg2} @dots{})
13920 If the split is a list, and the first element is @samp{:}, then the
13921 second element will be called as a function with @var{args} given as
13922 arguments.  The function should return a @var{split}.
13923
13924 @cindex body split
13925 For instance, the following function could be used to split based on the
13926 body of the messages:
13927
13928 @lisp
13929 (defun split-on-body ()
13930   (save-excursion
13931     (widen)
13932     (goto-char (point-min))
13933     (when (re-search-forward "Some.*string" nil t)
13934       "string.group")))
13935 @end lisp
13936
13937 The buffer is narrowed to the message in question when @var{function}
13938 is run.  That's why @code{(widen)} needs to be called after
13939 @code{save-excursion} in the example above.  Also note that with the
13940 nnimap backend, message bodies will not be downloaded by default.  You
13941 need to set @code{nnimap-split-download-body} to t to do that
13942 (@pxref{Splitting in IMAP}).
13943
13944 @item (! @var{func} @var{split})
13945 If the split is a list, and the first element is @code{!}, then
13946 @var{split} will be processed, and @var{func} will be called as a
13947 function with the result of @var{split} as argument.  @var{func}
13948 should return a split.
13949
13950 @item nil
13951 If the split is @code{nil}, it is ignored.
13952
13953 @end table
13954
13955 In these splits, @var{field} must match a complete field name.
13956 @var{value} must match a complete word according to the fundamental mode
13957 syntax table.  You can use @code{.*} in the regexps to match partial
13958 field names or words.  In other words, all @var{value}'s are wrapped in
13959 @samp{\<} and @samp{\>} pairs.
13960
13961 @vindex nnmail-split-abbrev-alist
13962 @var{field} and @var{value} can also be Lisp symbols, in that case
13963 they are expanded as specified by the variable
13964 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
13965 where the @sc{car} of a cell contains the key, and the @sc{cdr}
13966 contains the associated value.  Predefined entries in
13967 @code{nnmail-split-abbrev-alist} include:
13968
13969 @table @code
13970 @item from
13971 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
13972 @item to
13973 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
13974 @samp{Resent-To} and @samp{Resent-Cc} fields.
13975 @item any
13976 Is the union of the @code{from} and @code{to} entries.
13977 @end table
13978
13979 @vindex nnmail-split-fancy-syntax-table
13980 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13981 when all this splitting is performed.
13982
13983 If you want to have Gnus create groups dynamically based on some
13984 information in the headers (i.e., do @code{replace-match}-like
13985 substitutions in the group names), you can say things like:
13986
13987 @example
13988 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13989 @end example
13990
13991 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13992 will be filed in @samp{mail.debian.foo}.
13993
13994 If the string contains the element @samp{\&}, then the previously
13995 matched string will be substituted.  Similarly, the elements @samp{\\1}
13996 up to @samp{\\9} will be substituted with the text matched by the
13997 groupings 1 through 9.
13998
13999 @vindex nnmail-split-fancy-match-partial-words
14000 @code{nnmail-split-fancy-match-partial-words} controls whether partial
14001 words are matched during fancy splitting.
14002
14003 Normally, regular expressions given in @code{nnmail-split-fancy} are
14004 implicitly surrounded by @code{\<...\>} markers, which are word
14005 delimiters.  If this variable is true, they are not implicitly
14006 surrounded by anything.
14007
14008 @example
14009 (any "joe" "joemail")
14010 @end example
14011
14012 In this example, messages sent from @samp{joedavis@@foo.org} will
14013 normally not be filed in @samp{joemail}.  With
14014 @code{nnmail-split-fancy-match-partial-words} set to t, however, the
14015 match will happen.  In effect, the requirement of a word boundary is
14016 removed and instead the match becomes more like a grep.
14017
14018 @findex nnmail-split-fancy-with-parent
14019 @code{nnmail-split-fancy-with-parent} is a function which allows you to
14020 split followups into the same groups their parents are in.  Sometimes
14021 you can't make splitting rules for all your mail.  For example, your
14022 boss might send you personal mail regarding different projects you are
14023 working on, and as you can't tell your boss to put a distinguishing
14024 string into the subject line, you have to resort to manually moving the
14025 messages into the right group.  With this function, you only have to do
14026 it once per thread.
14027
14028 To use this feature, you have to set @code{nnmail-treat-duplicates}
14029 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
14030 value.  And then you can include @code{nnmail-split-fancy-with-parent}
14031 using the colon feature, like so:
14032 @lisp
14033 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
14034       nnmail-cache-accepted-message-ids t
14035       nnmail-split-fancy
14036       '(| (: nnmail-split-fancy-with-parent)
14037           ;; @r{other splits go here}
14038         ))
14039 @end lisp
14040
14041 This feature works as follows: when @code{nnmail-treat-duplicates} is
14042 non-@code{nil}, Gnus records the message id of every message it sees
14043 in the file specified by the variable
14044 @code{nnmail-message-id-cache-file}, together with the group it is in
14045 (the group is omitted for non-mail messages).  When mail splitting is
14046 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
14047 at the References (and In-Reply-To) header of each message to split
14048 and searches the file specified by @code{nnmail-message-id-cache-file}
14049 for the message ids.  When it has found a parent, it returns the
14050 corresponding group name unless the group name matches the regexp
14051 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
14052 recommended that you set @code{nnmail-message-id-cache-length} to a
14053 somewhat higher number than the default so that the message ids are
14054 still in the cache.  (A value of 5000 appears to create a file some
14055 300 kBytes in size.)
14056 @vindex nnmail-cache-accepted-message-ids
14057 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
14058 also records the message ids of moved articles, so that the followup
14059 messages goes into the new group.
14060
14061 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
14062 want certain groups to be recorded in the cache.  For example, if all
14063 outgoing messages are written to an ``outgoing'' group, you could set
14064 @code{nnmail-cache-ignore-groups} to match that group name.
14065 Otherwise, answers to all your messages would end up in the
14066 ``outgoing'' group.
14067
14068
14069 @node Group Mail Splitting
14070 @subsection Group Mail Splitting
14071 @cindex mail splitting
14072 @cindex group mail splitting
14073
14074 @findex gnus-group-split
14075 If you subscribe to dozens of mailing lists but you don't want to
14076 maintain mail splitting rules manually, group mail splitting is for you.
14077 You just have to set @code{to-list} and/or @code{to-address} in group
14078 parameters or group customization and set @code{nnmail-split-methods} to
14079 @code{gnus-group-split}.  This splitting function will scan all groups
14080 for those parameters and split mail accordingly, i.e., messages posted
14081 from or to the addresses specified in the parameters @code{to-list} or
14082 @code{to-address} of a mail group will be stored in that group.
14083
14084 Sometimes, mailing lists have multiple addresses, and you may want mail
14085 splitting to recognize them all: just set the @code{extra-aliases} group
14086 parameter to the list of additional addresses and it's done.  If you'd
14087 rather use a regular expression, set @code{split-regexp}.
14088
14089 All these parameters in a group will be used to create an
14090 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
14091 the @var{value} is a single regular expression that matches
14092 @code{to-list}, @code{to-address}, all of @code{extra-aliases} and all
14093 matches of @code{split-regexp}, and the @var{split} is the name of the
14094 group.  @var{restrict}s are also supported: just set the
14095 @code{split-exclude} parameter to a list of regular expressions.
14096
14097 If you can't get the right split to be generated using all these
14098 parameters, or you just need something fancier, you can set the
14099 parameter @code{split-spec} to an @code{nnmail-split-fancy} split.  In
14100 this case, all other aforementioned parameters will be ignored by
14101 @code{gnus-group-split}.  In particular, @code{split-spec} may be set to
14102 @code{nil}, in which case the group will be ignored by
14103 @code{gnus-group-split}.
14104
14105 @vindex gnus-group-split-default-catch-all-group
14106 @code{gnus-group-split} will do cross-posting on all groups that match,
14107 by defining a single @code{&} fancy split containing one split for each
14108 group.  If a message doesn't match any split, it will be stored in the
14109 group named in @code{gnus-group-split-default-catch-all-group}, unless
14110 some group has @code{split-spec} set to @code{catch-all}, in which case
14111 that group is used as the catch-all group.  Even though this variable is
14112 often used just to name a group, it may also be set to an arbitrarily
14113 complex fancy split (after all, a group name is a fancy split), and this
14114 may be useful to split mail that doesn't go to any mailing list to
14115 personal mail folders.  Note that this fancy split is added as the last
14116 element of a @code{|} split list that also contains a @code{&} split
14117 with the rules extracted from group parameters.
14118
14119 It's time for an example.  Assume the following group parameters have
14120 been defined:
14121
14122 @example
14123 nnml:mail.bar:
14124 ((to-address . "bar@@femail.com")
14125  (split-regexp . ".*@@femail\\.com"))
14126 nnml:mail.foo:
14127 ((to-list . "foo@@nowhere.gov")
14128  (extra-aliases "foo@@localhost" "foo-redist@@home")
14129  (split-exclude "bugs-foo" "rambling-foo")
14130  (admin-address . "foo-request@@nowhere.gov"))
14131 nnml:mail.others:
14132 ((split-spec . catch-all))
14133 @end example
14134
14135 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
14136 behave as if @code{nnmail-split-fancy} had been selected and variable
14137 @code{nnmail-split-fancy} had been set as follows:
14138
14139 @lisp
14140 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
14141       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
14142            - "bugs-foo" - "rambling-foo" "mail.foo"))
14143    "mail.others")
14144 @end lisp
14145
14146 @findex gnus-group-split-fancy
14147 If you'd rather not use group splitting for all your mail groups, you
14148 may use it for only some of them, by using @code{nnmail-split-fancy}
14149 splits like this:
14150
14151 @lisp
14152 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
14153 @end lisp
14154
14155 @var{groups} may be a regular expression or a list of group names whose
14156 parameters will be scanned to generate the output split.
14157 @var{no-crosspost} can be used to disable cross-posting; in this case, a
14158 single @code{|} split will be output.  @var{catch-all} is the fall back
14159 fancy split, used like @code{gnus-group-split-default-catch-all-group}.
14160 If @var{catch-all} is @code{nil}, or if @code{split-regexp} matches the
14161 empty string in any selected group, no catch-all split will be issued.
14162 Otherwise, if some group has @code{split-spec} set to @code{catch-all},
14163 this group will override the value of the @var{catch-all} argument.
14164
14165 @findex gnus-group-split-setup
14166 Unfortunately, scanning all groups and their parameters can be quite
14167 slow, especially considering that it has to be done for every message.
14168 But don't despair!  The function @code{gnus-group-split-setup} can be
14169 used to enable @code{gnus-group-split} in a much more efficient way.  It
14170 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
14171 @code{nnmail-split-fancy} to the split produced by
14172 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
14173 scanned once, no matter how many messages are split.
14174
14175 @findex gnus-group-split-update
14176 However, if you change group parameters, you'd have to update
14177 @code{nnmail-split-fancy} manually.  You can do it by running
14178 @code{gnus-group-split-update}.  If you'd rather have it updated
14179 automatically, just tell @code{gnus-group-split-setup} to do it for
14180 you.  For example, add to your @file{~/.gnus.el}:
14181
14182 @lisp
14183 (gnus-group-split-setup @var{auto-update} @var{catch-all})
14184 @end lisp
14185
14186 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
14187 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
14188 have to worry about updating @code{nnmail-split-fancy} again.  If you
14189 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
14190 @code{gnus-group-split-default-catch-all-group} will be set to its
14191 value.
14192
14193 @vindex gnus-group-split-updated-hook
14194 Because you may want to change @code{nnmail-split-fancy} after it is set
14195 by @code{gnus-group-split-update}, this function will run
14196 @code{gnus-group-split-updated-hook} just before finishing.
14197
14198 @node Incorporating Old Mail
14199 @subsection Incorporating Old Mail
14200 @cindex incorporating old mail
14201 @cindex import old mail
14202
14203 Most people have lots of old mail stored in various file formats.  If
14204 you have set up Gnus to read mail using one of the spiffy Gnus mail
14205 back ends, you'll probably wish to have that old mail incorporated into
14206 your mail groups.
14207
14208 Doing so can be quite easy.
14209
14210 To take an example: You're reading mail using @code{nnml}
14211 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
14212 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
14213 file filled with important, but old, mail.  You want to move it into
14214 your @code{nnml} groups.
14215
14216 Here's how:
14217
14218 @enumerate
14219 @item
14220 Go to the group buffer.
14221
14222 @item
14223 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
14224 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
14225
14226 @item
14227 Type @kbd{SPACE} to enter the newly created group.
14228
14229 @item
14230 Type @kbd{M P b} to process-mark all articles in this group's buffer
14231 (@pxref{Setting Process Marks}).
14232
14233 @item
14234 Type @kbd{B r} to respool all the process-marked articles, and answer
14235 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
14236 @end enumerate
14237
14238 All the mail messages in the mbox file will now also be spread out over
14239 all your @code{nnml} groups.  Try entering them and check whether things
14240 have gone without a glitch.  If things look ok, you may consider
14241 deleting the mbox file, but I wouldn't do that unless I was absolutely
14242 sure that all the mail has ended up where it should be.
14243
14244 Respooling is also a handy thing to do if you're switching from one mail
14245 back end to another.  Just respool all the mail in the old mail groups
14246 using the new mail back end.
14247
14248
14249 @node Expiring Mail
14250 @subsection Expiring Mail
14251 @cindex article expiry
14252
14253 Traditional mail readers have a tendency to remove mail articles when
14254 you mark them as read, in some way.  Gnus takes a fundamentally
14255 different approach to mail reading.
14256
14257 Gnus basically considers mail just to be news that has been received in
14258 a rather peculiar manner.  It does not think that it has the power to
14259 actually change the mail, or delete any mail messages.  If you enter a
14260 mail group, and mark articles as ``read'', or kill them in some other
14261 fashion, the mail articles will still exist on the system.  I repeat:
14262 Gnus will not delete your old, read mail.  Unless you ask it to, of
14263 course.
14264
14265 To make Gnus get rid of your unwanted mail, you have to mark the
14266 articles as @dfn{expirable}.  (With the default key bindings, this means
14267 that you have to type @kbd{E}.)  This does not mean that the articles
14268 will disappear right away, however.  In general, a mail article will be
14269 deleted from your system if, 1) it is marked as expirable, AND 2) it is
14270 more than one week old.  If you do not mark an article as expirable, it
14271 will remain on your system until hell freezes over.  This bears
14272 repeating one more time, with some spurious capitalizations: IF you do
14273 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
14274
14275 You do not have to mark articles as expirable by hand.  Gnus provides
14276 two features, called ``auto-expire'' and ``total-expire'', that can help you
14277 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
14278 for you when you select an article.  And ``total-expire'' means that Gnus
14279 considers all articles as expirable that are read.  So, in addition to
14280 the articles marked @samp{E}, also the articles marked @samp{r},
14281 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
14282 expirable.
14283
14284 When should either auto-expire or total-expire be used?  Most people
14285 who are subscribed to mailing lists split each list into its own group
14286 and then turn on auto-expire or total-expire for those groups.
14287 (@xref{Splitting Mail}, for more information on splitting each list
14288 into its own group.)
14289
14290 Which one is better, auto-expire or total-expire?  It's not easy to
14291 answer.  Generally speaking, auto-expire is probably faster.  Another
14292 advantage of auto-expire is that you get more marks to work with: for
14293 the articles that are supposed to stick around, you can still choose
14294 between tick and dormant and read marks.  But with total-expire, you
14295 only have dormant and ticked to choose from.  The advantage of
14296 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
14297 Scoring}).  Auto-expire works with normal scoring but not with adaptive
14298 scoring.
14299
14300 @vindex gnus-auto-expirable-newsgroups
14301 Groups that match the regular expression
14302 @code{gnus-auto-expirable-newsgroups} will have all articles that you
14303 read marked as expirable automatically.  All articles marked as
14304 expirable have an @samp{E} in the first column in the summary buffer.
14305
14306 By default, if you have auto expiry switched on, Gnus will mark all the
14307 articles you read as expirable, no matter if they were read or unread
14308 before.  To avoid having articles marked as read marked as expirable
14309 automatically, you can put something like the following in your
14310 @file{~/.gnus.el} file:
14311
14312 @vindex gnus-mark-article-hook
14313 @lisp
14314 (remove-hook 'gnus-mark-article-hook
14315              'gnus-summary-mark-read-and-unread-as-read)
14316 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
14317 @end lisp
14318
14319 Note that making a group auto-expirable doesn't mean that all read
14320 articles are expired---only the articles marked as expirable
14321 will be expired.  Also note that using the @kbd{d} command won't make
14322 articles expirable---only semi-automatic marking of articles as read will
14323 mark the articles as expirable in auto-expirable groups.
14324
14325 Let's say you subscribe to a couple of mailing lists, and you want the
14326 articles you have read to disappear after a while:
14327
14328 @lisp
14329 (setq gnus-auto-expirable-newsgroups
14330       "mail.nonsense-list\\|mail.nice-list")
14331 @end lisp
14332
14333 Another way to have auto-expiry happen is to have the element
14334 @code{auto-expire} in the group parameters of the group.
14335
14336 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
14337 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
14338 don't really mix very well.
14339
14340 @vindex nnmail-expiry-wait
14341 The @code{nnmail-expiry-wait} variable supplies the default time an
14342 expirable article has to live.  Gnus starts counting days from when the
14343 message @emph{arrived}, not from when it was sent.  The default is seven
14344 days.
14345
14346 Gnus also supplies a function that lets you fine-tune how long articles
14347 are to live, based on what group they are in.  Let's say you want to
14348 have one month expiry period in the @samp{mail.private} group, a one day
14349 expiry period in the @samp{mail.junk} group, and a six day expiry period
14350 everywhere else:
14351
14352 @vindex nnmail-expiry-wait-function
14353 @lisp
14354 (setq nnmail-expiry-wait-function
14355       (lambda (group)
14356        (cond ((string= group "mail.private")
14357                31)
14358              ((string= group "mail.junk")
14359                1)
14360              ((string= group "important")
14361                'never)
14362              (t
14363                6))))
14364 @end lisp
14365
14366 The group names this function is fed are ``unadorned'' group
14367 names---no @samp{nnml:} prefixes and the like.
14368
14369 The @code{nnmail-expiry-wait} variable and
14370 @code{nnmail-expiry-wait-function} function can either be a number (not
14371 necessarily an integer) or one of the symbols @code{immediate} or
14372 @code{never}.
14373
14374 You can also use the @code{expiry-wait} group parameter to selectively
14375 change the expiry period (@pxref{Group Parameters}).
14376
14377 @vindex nnmail-expiry-target
14378 The normal action taken when expiring articles is to delete them.
14379 However, in some circumstances it might make more sense to move them
14380 to other groups instead of deleting them.  The variable
14381 @code{nnmail-expiry-target} (and the @code{expiry-target} group
14382 parameter) controls this.  The variable supplies a default value for
14383 all groups, which can be overridden for specific groups by the group
14384 parameter.  default value is @code{delete}, but this can also be a
14385 string (which should be the name of the group the message should be
14386 moved to), or a function (which will be called in a buffer narrowed to
14387 the message in question, and with the name of the group being moved
14388 from as its parameter) which should return a target---either a group
14389 name or @code{delete}.
14390
14391 Here's an example for specifying a group name:
14392 @lisp
14393 (setq nnmail-expiry-target "nnml:expired")
14394 @end lisp
14395
14396 @findex nnmail-fancy-expiry-target
14397 @vindex nnmail-fancy-expiry-targets
14398 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
14399 expire mail to groups according to the variable
14400 @code{nnmail-fancy-expiry-targets}.  Here's an example:
14401
14402 @lisp
14403  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
14404        nnmail-fancy-expiry-targets
14405        '((to-from "boss" "nnfolder:Work")
14406          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
14407          ("from" ".*" "nnfolder:Archive-%Y")))
14408 @end lisp
14409
14410 With this setup, any mail that has @code{IMPORTANT} in its Subject
14411 header and was sent in the year @code{YYYY} and month @code{MMM}, will
14412 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
14413 From or To header contains the string @code{boss}, it will get expired
14414 to @code{nnfolder:Work}.  All other mail will get expired to
14415 @code{nnfolder:Archive-YYYY}.
14416
14417 @vindex nnmail-keep-last-article
14418 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
14419 expire the final article in a mail newsgroup.  This is to make life
14420 easier for procmail users.
14421
14422 @vindex gnus-total-expirable-newsgroups
14423 By the way: That line up there, about Gnus never expiring non-expirable
14424 articles, is a lie.  If you put @code{total-expire} in the group
14425 parameters, articles will not be marked as expirable, but all read
14426 articles will be put through the expiry process.  Use with extreme
14427 caution.  Even more dangerous is the
14428 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
14429 this regexp will have all read articles put through the expiry process,
14430 which means that @emph{all} old mail articles in the groups in question
14431 will be deleted after a while.  Use with extreme caution, and don't come
14432 crying to me when you discover that the regexp you used matched the
14433 wrong group and all your important mail has disappeared.  Be a
14434 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
14435 with!  So there!
14436
14437 Most people make most of their mail groups total-expirable, though.
14438
14439 @vindex gnus-inhibit-user-auto-expire
14440 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
14441 commands will not mark an article as expirable, even if the group has
14442 auto-expire turned on.
14443
14444
14445 @node Washing Mail
14446 @subsection Washing Mail
14447 @cindex mail washing
14448 @cindex list server brain damage
14449 @cindex incoming mail treatment
14450
14451 Mailers and list servers are notorious for doing all sorts of really,
14452 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
14453 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14454 end of all lines passing through our server, so let's do that!!!!1!''
14455 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
14456 considered to be self-evident were not discussed.  So.  Here we are.
14457
14458 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
14459 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
14460 be shocked and dismayed by this, but I haven't got the energy.  It is to
14461 laugh.
14462
14463 Gnus provides a plethora of functions for washing articles while
14464 displaying them, but it might be nicer to do the filtering before
14465 storing the mail to disk.  For that purpose, we have three hooks and
14466 various functions that can be put in these hooks.
14467
14468 @table @code
14469 @item nnmail-prepare-incoming-hook
14470 @vindex nnmail-prepare-incoming-hook
14471 This hook is called before doing anything with the mail and is meant for
14472 grand, sweeping gestures.  It is called in a buffer that contains all
14473 the new, incoming mail.  Functions to be used include:
14474
14475 @table @code
14476 @item nnheader-ms-strip-cr
14477 @findex nnheader-ms-strip-cr
14478 Remove trailing carriage returns from each line.  This is default on
14479 Emacs running on MS machines.
14480
14481 @end table
14482
14483 @item nnmail-prepare-incoming-header-hook
14484 @vindex nnmail-prepare-incoming-header-hook
14485 This hook is called narrowed to each header.  It can be used when
14486 cleaning up the headers.  Functions that can be used include:
14487
14488 @table @code
14489 @item nnmail-remove-leading-whitespace
14490 @findex nnmail-remove-leading-whitespace
14491 Clear leading white space that ``helpful'' listservs have added to the
14492 headers to make them look nice.  Aaah.
14493
14494 (Note that this function works on both the header on the body of all
14495 messages, so it is a potentially dangerous function to use (if a body
14496 of a message contains something that looks like a header line).  So
14497 rather than fix the bug, it is of course the right solution to make it
14498 into a feature by documenting it.)
14499
14500 @item nnmail-remove-list-identifiers
14501 @findex nnmail-remove-list-identifiers
14502 Some list servers add an identifier---for example, @samp{(idm)}---to the
14503 beginning of all @code{Subject} headers.  I'm sure that's nice for
14504 people who use stone age mail readers.  This function will remove
14505 strings that match the @code{nnmail-list-identifiers} regexp, which can
14506 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
14507 @code{\\(..\\)}.
14508
14509 For instance, if you want to remove the @samp{(idm)} and the
14510 @samp{nagnagnag} identifiers:
14511
14512 @lisp
14513 (setq nnmail-list-identifiers
14514       '("(idm)" "nagnagnag"))
14515 @end lisp
14516
14517 This can also be done non-destructively with
14518 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14519
14520 @item nnmail-remove-tabs
14521 @findex nnmail-remove-tabs
14522 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14523
14524 @item nnmail-fix-eudora-headers
14525 @findex nnmail-fix-eudora-headers
14526 @cindex Eudora
14527 Eudora produces broken @code{References} headers, but OK
14528 @code{In-Reply-To} headers.  This function will get rid of the
14529 @code{References} headers.
14530
14531 @end table
14532
14533 @item nnmail-prepare-incoming-message-hook
14534 @vindex nnmail-prepare-incoming-message-hook
14535 This hook is called narrowed to each message.  Functions to be used
14536 include:
14537
14538 @table @code
14539 @item article-de-quoted-unreadable
14540 @findex article-de-quoted-unreadable
14541 Decode Quoted Readable encoding.
14542
14543 @end table
14544 @end table
14545
14546
14547 @node Duplicates
14548 @subsection Duplicates
14549
14550 @vindex nnmail-treat-duplicates
14551 @vindex nnmail-message-id-cache-length
14552 @vindex nnmail-message-id-cache-file
14553 @cindex duplicate mails
14554 If you are a member of a couple of mailing lists, you will sometimes
14555 receive two copies of the same mail.  This can be quite annoying, so
14556 @code{nnmail} checks for and treats any duplicates it might find.  To do
14557 this, it keeps a cache of old @code{Message-ID}s---
14558 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14559 default.  The approximate maximum number of @code{Message-ID}s stored
14560 there is controlled by the @code{nnmail-message-id-cache-length}
14561 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14562 stored.) If all this sounds scary to you, you can set
14563 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14564 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14565 will insert a warning into the head of the mail saying that it thinks
14566 that this is a duplicate of a different message.
14567
14568 This variable can also be a function.  If that's the case, the function
14569 will be called from a buffer narrowed to the message in question with
14570 the @code{Message-ID} as a parameter.  The function must return either
14571 @code{nil}, @code{warn}, or @code{delete}.
14572
14573 You can turn this feature off completely by setting the variable to
14574 @code{nil}.
14575
14576 If you want all the duplicate mails to be put into a special
14577 @dfn{duplicates} group, you could do that using the normal mail split
14578 methods:
14579
14580 @lisp
14581 (setq nnmail-split-fancy
14582       '(| ;; @r{Messages duplicates go to a separate group.}
14583         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14584         ;; @r{Message from daemons, postmaster, and the like to another.}
14585         (any mail "mail.misc")
14586         ;; @r{Other rules.}
14587         [...] ))
14588 @end lisp
14589 @noindent
14590 Or something like:
14591 @lisp
14592 (setq nnmail-split-methods
14593       '(("duplicates" "^Gnus-Warning:.*duplicate")
14594         ;; @r{Other rules.}
14595         [...]))
14596 @end lisp
14597
14598 Here's a neat feature: If you know that the recipient reads her mail
14599 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14600 @code{delete}, you can send her as many insults as you like, just by
14601 using a @code{Message-ID} of a mail that you know that she's already
14602 received.  Think of all the fun!  She'll never see any of it!  Whee!
14603
14604
14605 @node Not Reading Mail
14606 @subsection Not Reading Mail
14607
14608 If you start using any of the mail back ends, they have the annoying
14609 habit of assuming that you want to read mail with them.  This might not
14610 be unreasonable, but it might not be what you want.
14611
14612 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14613 @code{nil}, none of the back ends will ever attempt to read incoming
14614 mail, which should help.
14615
14616 @vindex nnbabyl-get-new-mail
14617 @vindex nnmbox-get-new-mail
14618 @vindex nnml-get-new-mail
14619 @vindex nnmh-get-new-mail
14620 @vindex nnfolder-get-new-mail
14621 This might be too much, if, for instance, you are reading mail quite
14622 happily with @code{nnml} and just want to peek at some old Rmail
14623 file you have stashed away with @code{nnbabyl}.  All back ends have
14624 variables called back-end-@code{get-new-mail}.  If you want to disable
14625 the @code{nnbabyl} mail reading, you edit the virtual server for the
14626 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14627
14628 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14629 narrowed to the article to be saved before saving it when reading
14630 incoming mail.
14631
14632
14633 @node Choosing a Mail Back End
14634 @subsection Choosing a Mail Back End
14635
14636 Gnus will read the mail spool when you activate a mail group.  The mail
14637 file is first copied to your home directory.  What happens after that
14638 depends on what format you want to store your mail in.
14639
14640 There are six different mail back ends in the standard Gnus, and more
14641 back ends are available separately.  The mail back end most people use
14642 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14643 Spool}).
14644
14645 @menu
14646 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14647 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
14648 * Mail Spool::                  Store your mail in a private spool?
14649 * MH Spool::                    An mhspool-like back end.
14650 * Maildir::                     Another one-file-per-message format.
14651 * Mail Folders::                Having one file for each group.
14652 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14653 @end menu
14654
14655
14656 @node Unix Mail Box
14657 @subsubsection Unix Mail Box
14658 @cindex nnmbox
14659 @cindex unix mail box
14660
14661 @vindex nnmbox-active-file
14662 @vindex nnmbox-mbox-file
14663 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14664 mail.  @code{nnmbox} will add extra headers to each mail article to say
14665 which group it belongs in.
14666
14667 Virtual server settings:
14668
14669 @table @code
14670 @item nnmbox-mbox-file
14671 @vindex nnmbox-mbox-file
14672 The name of the mail box in the user's home directory.  Default is
14673 @file{~/mbox}.
14674
14675 @item nnmbox-active-file
14676 @vindex nnmbox-active-file
14677 The name of the active file for the mail box.  Default is
14678 @file{~/.mbox-active}.
14679
14680 @item nnmbox-get-new-mail
14681 @vindex nnmbox-get-new-mail
14682 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14683 into groups.  Default is @code{t}.
14684 @end table
14685
14686
14687 @node Rmail Babyl
14688 @subsubsection Rmail Babyl
14689 @cindex nnbabyl
14690 @cindex Rmail mbox
14691
14692 @vindex nnbabyl-active-file
14693 @vindex nnbabyl-mbox-file
14694 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
14695 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14696 mail article to say which group it belongs in.
14697
14698 Virtual server settings:
14699
14700 @table @code
14701 @item nnbabyl-mbox-file
14702 @vindex nnbabyl-mbox-file
14703 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
14704
14705 @item nnbabyl-active-file
14706 @vindex nnbabyl-active-file
14707 The name of the active file for the rmail box.  The default is
14708 @file{~/.rmail-active}
14709
14710 @item nnbabyl-get-new-mail
14711 @vindex nnbabyl-get-new-mail
14712 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14713 @code{t}
14714 @end table
14715
14716
14717 @node Mail Spool
14718 @subsubsection Mail Spool
14719 @cindex nnml
14720 @cindex mail @acronym{NOV} spool
14721
14722 The @dfn{nnml} spool mail format isn't compatible with any other known
14723 format.  It should be used with some caution.
14724
14725 @vindex nnml-directory
14726 If you use this back end, Gnus will split all incoming mail into files,
14727 one file for each mail, and put the articles into the corresponding
14728 directories under the directory specified by the @code{nnml-directory}
14729 variable.  The default value is @file{~/Mail/}.
14730
14731 You do not have to create any directories beforehand; Gnus will take
14732 care of all that.
14733
14734 If you have a strict limit as to how many files you are allowed to store
14735 in your account, you should not use this back end.  As each mail gets its
14736 own file, you might very well occupy thousands of inodes within a few
14737 weeks.  If this is no problem for you, and it isn't a problem for you
14738 having your friendly systems administrator walking around, madly,
14739 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14740 know that this is probably the fastest format to use.  You do not have
14741 to trudge through a big mbox file just to read your new mail.
14742
14743 @code{nnml} is probably the slowest back end when it comes to article
14744 splitting.  It has to create lots of files, and it also generates
14745 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
14746 fastest back end when it comes to reading mail.
14747
14748 @cindex self contained nnml servers
14749 @cindex marks
14750 When the marks file is used (which it is by default), @code{nnml}
14751 servers have the property that you may backup them using @code{tar} or
14752 similar, and later be able to restore them into Gnus (by adding the
14753 proper @code{nnml} server) and have all your marks be preserved.  Marks
14754 for a group is usually stored in the @code{.marks} file (but see
14755 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14756 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14757 to restore the group (after restoring the backup into the nnml
14758 directory).
14759
14760 If for some reason you believe your @file{.marks} files are screwed
14761 up, you can just delete them all.  Gnus will then correctly regenerate
14762 them next time it starts.
14763
14764 Virtual server settings:
14765
14766 @table @code
14767 @item nnml-directory
14768 @vindex nnml-directory
14769 All @code{nnml} directories will be placed under this directory.  The
14770 default is the value of @code{message-directory} (whose default value
14771 is @file{~/Mail}).
14772
14773 @item nnml-active-file
14774 @vindex nnml-active-file
14775 The active file for the @code{nnml} server.  The default is
14776 @file{~/Mail/active}.
14777
14778 @item nnml-newsgroups-file
14779 @vindex nnml-newsgroups-file
14780 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14781 Format}.  The default is @file{~/Mail/newsgroups}.
14782
14783 @item nnml-get-new-mail
14784 @vindex nnml-get-new-mail
14785 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14786 @code{t}.
14787
14788 @item nnml-nov-is-evil
14789 @vindex nnml-nov-is-evil
14790 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
14791 default is @code{nil}.
14792
14793 @item nnml-nov-file-name
14794 @vindex nnml-nov-file-name
14795 The name of the @acronym{NOV} files.  The default is @file{.overview}.
14796
14797 @item nnml-prepare-save-mail-hook
14798 @vindex nnml-prepare-save-mail-hook
14799 Hook run narrowed to an article before saving.
14800
14801 @item nnml-marks-is-evil
14802 @vindex nnml-marks-is-evil
14803 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14804 default is @code{nil}.
14805
14806 @item nnml-marks-file-name
14807 @vindex nnml-marks-file-name
14808 The name of the @dfn{marks} files.  The default is @file{.marks}.
14809
14810 @item nnml-use-compressed-files
14811 @vindex nnml-use-compressed-files
14812 If non-@code{nil}, @code{nnml} will allow using compressed message
14813 files.
14814
14815 @end table
14816
14817 @findex nnml-generate-nov-databases
14818 If your @code{nnml} groups and @acronym{NOV} files get totally out of whack,
14819 you can do a complete update by typing @kbd{M-x
14820 nnml-generate-nov-databases}.  This command will trawl through the
14821 entire @code{nnml} hierarchy, looking at each and every article, so it
14822 might take a while to complete.  A better interface to this
14823 functionality can be found in the server buffer (@pxref{Server
14824 Commands}).
14825
14826
14827 @node MH Spool
14828 @subsubsection MH Spool
14829 @cindex nnmh
14830 @cindex mh-e mail spool
14831
14832 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14833 @acronym{NOV} databases and it doesn't keep an active file or marks file.
14834 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
14835 but it also makes it easier to write procmail scripts for.
14836
14837 Virtual server settings:
14838
14839 @table @code
14840 @item nnmh-directory
14841 @vindex nnmh-directory
14842 All @code{nnmh} directories will be located under this directory.  The
14843 default is the value of @code{message-directory} (whose default is
14844 @file{~/Mail})
14845
14846 @item nnmh-get-new-mail
14847 @vindex nnmh-get-new-mail
14848 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14849 @code{t}.
14850
14851 @item nnmh-be-safe
14852 @vindex nnmh-be-safe
14853 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14854 sure that the articles in the folder are actually what Gnus thinks they
14855 are.  It will check date stamps and stat everything in sight, so
14856 setting this to @code{t} will mean a serious slow-down.  If you never
14857 use anything but Gnus to read the @code{nnmh} articles, you do not have
14858 to set this variable to @code{t}.  The default is @code{nil}.
14859 @end table
14860
14861
14862 @node Maildir
14863 @subsubsection Maildir
14864 @cindex nnmaildir
14865 @cindex maildir
14866
14867 @code{nnmaildir} stores mail in the maildir format, with each maildir
14868 corresponding to a group in Gnus.  This format is documented here:
14869 @uref{http://cr.yp.to/proto/maildir.html} and here:
14870 @uref{http://www.qmail.org/man/man5/maildir.html}.  nnmaildir also
14871 stores extra information in the @file{.nnmaildir/} directory within a
14872 maildir.
14873
14874 Maildir format was designed to allow concurrent deliveries and
14875 reading, without needing locks.  With other back ends, you would have
14876 your mail delivered to a spool of some kind, and then you would
14877 configure Gnus to split mail from that spool into your groups.  You
14878 can still do that with nnmaildir, but the more common configuration is
14879 to have your mail delivered directly to the maildirs that appear as
14880 group in Gnus.
14881
14882 nnmaildir is designed to be perfectly reliable: @kbd{C-g} will never
14883 corrupt its data in memory, and @code{SIGKILL} will never corrupt its
14884 data in the filesystem.
14885
14886 nnmaildir stores article marks and @acronym{NOV} data in each maildir.  So you
14887 can copy a whole maildir from one Gnus setup to another, and you will
14888 keep your marks.
14889
14890 Virtual server settings:
14891
14892 @table @code
14893 @item directory
14894 For each of your nnmaildir servers (it's very unlikely that you'd need
14895 more than one), you need to create a directory and populate it with
14896 maildirs or symlinks to maildirs (and nothing else; do not choose a
14897 directory already used for other purposes).  Each maildir will be
14898 represented in Gnus as a newsgroup on that server; the filename of the
14899 symlink will be the name of the group.  Any filenames in the directory
14900 starting with @samp{.} are ignored.  The directory is scanned when you
14901 first start Gnus, and each time you type @kbd{g} in the group buffer;
14902 if any maildirs have been removed or added, nnmaildir notices at these
14903 times.
14904
14905 The value of the @code{directory} parameter should be a Lisp form
14906 which is processed by @code{eval} and @code{expand-file-name} to get
14907 the path of the directory for this server.  The form is @code{eval}ed
14908 only when the server is opened; the resulting string is used until the
14909 server is closed.  (If you don't know about forms and @code{eval},
14910 don't worry---a simple string will work.)  This parameter is not
14911 optional; you must specify it.  I don't recommend using
14912 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
14913 use that directory by default for various things, and may get confused
14914 if nnmaildir uses it too.  @code{"~/.nnmaildir"} is a typical value.
14915
14916 @item target-prefix
14917 This should be a Lisp form which is processed by @code{eval} and
14918 @code{expand-file-name}.  The form is @code{eval}ed only when the
14919 server is opened; the resulting string is used until the server is
14920 closed.
14921
14922 When you create a group on an nnmaildir server, the maildir is created
14923 with @code{target-prefix} prepended to its name, and a symlink
14924 pointing to that maildir is created, named with the plain group name.
14925 So if @code{directory} is @code{"~/.nnmaildir"} and
14926 @code{target-prefix} is @code{"../maildirs/"}, then when you create
14927 the group @code{foo}, nnmaildir will create
14928 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
14929 @file{~/.nnmaildir/foo} as a symlink pointing to
14930 @file{../maildirs/foo}.
14931
14932 You can set @code{target-prefix} to a string without any slashes to
14933 create both maildirs and symlinks in the same @code{directory}; in
14934 this case, any maildirs found in @code{directory} whose names start
14935 with @code{target-prefix} will not be listed as groups (but the
14936 symlinks pointing to them will be).
14937
14938 As a special case, if @code{target-prefix} is @code{""} (the default),
14939 then when you create a group, the maildir will be created in
14940 @code{directory} without a corresponding symlink.  Beware that you
14941 cannot use @code{gnus-group-delete-group} on such groups without the
14942 @code{force} argument.
14943
14944 @item directory-files
14945 This should be a function with the same interface as
14946 @code{directory-files} (such as @code{directory-files} itself).  It is
14947 used to scan the server's @code{directory} for maildirs.  This
14948 parameter is optional; the default is
14949 @code{nnheader-directory-files-safe} if
14950 @code{nnheader-directory-files-is-safe} is @code{nil}, and
14951 @code{directory-files} otherwise.
14952 (@code{nnheader-directory-files-is-safe} is checked only once when the
14953 server is opened; if you want to check it each time the directory is
14954 scanned, you'll have to provide your own function that does that.)
14955
14956 @item get-new-mail
14957 If non-@code{nil}, then after scanning for new mail in the group
14958 maildirs themselves as usual, this server will also incorporate mail
14959 the conventional Gnus way, from @code{mail-sources} according to
14960 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
14961 value is @code{nil}.
14962
14963 Do @emph{not} use the same maildir both in @code{mail-sources} and as
14964 an nnmaildir group.  The results might happen to be useful, but that
14965 would be by chance, not by design, and the results might be different
14966 in the future.  If your split rules create new groups, remember to
14967 supply a @code{create-directory} server parameter.
14968 @end table
14969
14970 @subsubsection Group parameters
14971
14972 nnmaildir uses several group parameters.  It's safe to ignore all
14973 this; the default behavior for nnmaildir is the same as the default
14974 behavior for other mail back ends: articles are deleted after one week,
14975 etc.  Except for the expiry parameters, all this functionality is
14976 unique to nnmaildir, so you can ignore it if you're just trying to
14977 duplicate the behavior you already have with another back end.
14978
14979 If the value of any of these parameters is a vector, the first element
14980 is evaluated as a Lisp form and the result is used, rather than the
14981 original value.  If the value is not a vector, the value itself is
14982 evaluated as a Lisp form.  (This is why these parameters use names
14983 different from those of other, similar parameters supported by other
14984 back ends: they have different, though similar, meanings.)  (For
14985 numbers, strings, @code{nil}, and @code{t}, you can ignore the
14986 @code{eval} business again; for other values, remember to use an extra
14987 quote and wrap the value in a vector when appropriate.)
14988
14989 @table @code
14990 @item expire-age
14991 An integer specifying the minimum age, in seconds, of an article before
14992 it will be expired, or the symbol @code{never} to specify that
14993 articles should never be expired.  If this parameter is not set,
14994 nnmaildir falls back to the usual
14995 @code{nnmail-expiry-wait}(@code{-function}) variables (overrideable by
14996 the @code{expiry-wait}(@code{-function}) group parameters.  If you
14997 wanted a value of 3 days, you could use something like @code{[(* 3 24
14998 60 60)]}; nnmaildir will evaluate the form and use the result.  An
14999 article's age is measured starting from the article file's
15000 modification time.  Normally, this is the same as the article's
15001 delivery time, but editing an article makes it younger.  Moving an
15002 article (other than via expiry) may also make an article younger.
15003
15004 @item expire-group
15005 If this is set to a string such as a full Gnus group name, like
15006 @example
15007 "backend+server.address.string:group.name"
15008 @end example
15009 and if it is not the name of the same group that the parameter belongs
15010 to, then articles will be moved to the specified group during expiry
15011 before being deleted.  @emph{If this is set to an nnmaildir group, the
15012 article will be just as old in the destination group as it was in the
15013 source group.}  So be careful with @code{expire-age} in the
15014 destination group.  If this is set to the name of the same group that
15015 the parameter belongs to, then the article is not expired at all.  If
15016 you use the vector form, the first element is evaluated once for each
15017 article.  So that form can refer to
15018 @code{nnmaildir-article-file-name}, etc., to decide where to put the
15019 article.  @emph{If this parameter is not set, nnmaildir does not fall
15020 back to the @code{expiry-target} group parameter or the
15021 @code{nnmail-expiry-target} variable.}
15022
15023 @item read-only
15024 If this is set to @code{t}, nnmaildir will treat the articles in this
15025 maildir as read-only.  This means: articles are not renamed from
15026 @file{new/} into @file{cur/}; articles are only found in @file{new/},
15027 not @file{cur/}; articles are never deleted; articles cannot be
15028 edited.  @file{new/} is expected to be a symlink to the @file{new/}
15029 directory of another maildir---e.g., a system-wide mailbox containing
15030 a mailing list of common interest.  Everything in the maildir outside
15031 @file{new/} is @emph{not} treated as read-only, so for a shared
15032 mailbox, you do still need to set up your own maildir (or have write
15033 permission to the shared mailbox); your maildir just won't contain
15034 extra copies of the articles.
15035
15036 @item directory-files
15037 A function with the same interface as @code{directory-files}.  It is
15038 used to scan the directories in the maildir corresponding to this
15039 group to find articles.  The default is the function specified by the
15040 server's @code{directory-files} parameter.
15041
15042 @item distrust-Lines:
15043 If non-@code{nil}, nnmaildir will always count the lines of an
15044 article, rather than use the @code{Lines:} header field.  If
15045 @code{nil}, the header field will be used if present.
15046
15047 @item always-marks
15048 A list of mark symbols, such as
15049 @code{['(read expire)]}.  Whenever Gnus asks nnmaildir for
15050 article marks, nnmaildir will say that all articles have these
15051 marks, regardless of whether the marks stored in the filesystem
15052 say so.  This is a proof-of-concept feature that will probably be
15053 removed eventually; it ought to be done in Gnus proper, or
15054 abandoned if it's not worthwhile.
15055
15056 @item never-marks
15057 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
15058 Gnus asks nnmaildir for article marks, nnmaildir will say that no
15059 articles have these marks, regardless of whether the marks stored in
15060 the filesystem say so.  @code{never-marks} overrides
15061 @code{always-marks}.  This is a proof-of-concept feature that will
15062 probably be removed eventually; it ought to be done in Gnus proper, or
15063 abandoned if it's not worthwhile.
15064
15065 @item nov-cache-size
15066 An integer specifying the size of the @acronym{NOV} memory cache.  To speed
15067 things up, nnmaildir keeps @acronym{NOV} data in memory for a limited number of
15068 articles in each group.  (This is probably not worthwhile, and will
15069 probably be removed in the future.)  This parameter's value is noticed
15070 only the first time a group is seen after the server is opened---i.e.,
15071 when you first start Gnus, typically.  The @acronym{NOV} cache is never resized
15072 until the server is closed and reopened.  The default is an estimate
15073 of the number of articles that would be displayed in the summary
15074 buffer: a count of articles that are either marked with @code{tick} or
15075 not marked with @code{read}, plus a little extra.
15076 @end table
15077
15078 @subsubsection Article identification
15079 Articles are stored in the @file{cur/} subdirectory of each maildir.
15080 Each article file is named like @code{uniq:info}, where @code{uniq}
15081 contains no colons.  nnmaildir ignores, but preserves, the
15082 @code{:info} part.  (Other maildir readers typically use this part of
15083 the filename to store marks.)  The @code{uniq} part uniquely
15084 identifies the article, and is used in various places in the
15085 @file{.nnmaildir/} subdirectory of the maildir to store information
15086 about the corresponding article.  The full pathname of an article is
15087 available in the variable @code{nnmaildir-article-file-name} after you
15088 request the article in the summary buffer.
15089
15090 @subsubsection NOV data
15091 An article identified by @code{uniq} has its @acronym{NOV} data (used to
15092 generate lines in the summary buffer) stored in
15093 @code{.nnmaildir/nov/uniq}.  There is no
15094 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
15095 need for it---an article's @acronym{NOV} data is updated automatically when the
15096 article or @code{nnmail-extra-headers} has changed.)  You can force
15097 nnmaildir to regenerate the @acronym{NOV} data for a single article simply by
15098 deleting the corresponding @acronym{NOV} file, but @emph{beware}: this will also
15099 cause nnmaildir to assign a new article number for this article, which
15100 may cause trouble with @code{seen} marks, the Agent, and the cache.
15101
15102 @subsubsection Article marks
15103 An article identified by @code{uniq} is considered to have the mark
15104 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
15105 When Gnus asks nnmaildir for a group's marks, nnmaildir looks for such
15106 files and reports the set of marks it finds.  When Gnus asks nnmaildir
15107 to store a new set of marks, nnmaildir creates and deletes the
15108 corresponding files as needed.  (Actually, rather than create a new
15109 file for each mark, it just creates hard links to
15110 @file{.nnmaildir/markfile}, to save inodes.)
15111
15112 You can invent new marks by creating a new directory in
15113 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
15114 your server, untar it later, and keep your marks.  You can add and
15115 remove marks yourself by creating and deleting mark files.  If you do
15116 this while Gnus is running and your nnmaildir server is open, it's
15117 best to exit all summary buffers for nnmaildir groups and type @kbd{s}
15118 in the group buffer first, and to type @kbd{g} or @kbd{M-g} in the
15119 group buffer afterwards.  Otherwise, Gnus might not pick up the
15120 changes, and might undo them.
15121
15122
15123 @node Mail Folders
15124 @subsubsection Mail Folders
15125 @cindex nnfolder
15126 @cindex mbox folders
15127 @cindex mail folders
15128
15129 @code{nnfolder} is a back end for storing each mail group in a separate
15130 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
15131 will add extra headers to keep track of article numbers and arrival
15132 dates.
15133
15134 @cindex self contained nnfolder servers
15135 @cindex marks
15136 When the marks file is used (which it is by default), @code{nnfolder}
15137 servers have the property that you may backup them using @code{tar} or
15138 similar, and later be able to restore them into Gnus (by adding the
15139 proper @code{nnfolder} server) and have all your marks be preserved.
15140 Marks for a group is usually stored in a file named as the mbox file
15141 with @code{.mrk} concatenated to it (but see
15142 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
15143 Individual @code{nnfolder} groups are also possible to backup, use
15144 @kbd{G m} to restore the group (after restoring the backup into the
15145 @code{nnfolder} directory).
15146
15147 Virtual server settings:
15148
15149 @table @code
15150 @item nnfolder-directory
15151 @vindex nnfolder-directory
15152 All the @code{nnfolder} mail boxes will be stored under this directory.
15153 The default is the value of @code{message-directory} (whose default is
15154 @file{~/Mail})
15155
15156 @item nnfolder-active-file
15157 @vindex nnfolder-active-file
15158 The name of the active file.  The default is @file{~/Mail/active}.
15159
15160 @item nnfolder-newsgroups-file
15161 @vindex nnfolder-newsgroups-file
15162 The name of the group descriptions file.  @xref{Newsgroups File
15163 Format}.  The default is @file{~/Mail/newsgroups}
15164
15165 @item nnfolder-get-new-mail
15166 @vindex nnfolder-get-new-mail
15167 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
15168 is @code{t}
15169
15170 @item nnfolder-save-buffer-hook
15171 @vindex nnfolder-save-buffer-hook
15172 @cindex backup files
15173 Hook run before saving the folders.  Note that Emacs does the normal
15174 backup renaming of files even with the @code{nnfolder} buffers.  If you
15175 wish to switch this off, you could say something like the following in
15176 your @file{.emacs} file:
15177
15178 @lisp
15179 (defun turn-off-backup ()
15180   (set (make-local-variable 'backup-inhibited) t))
15181
15182 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
15183 @end lisp
15184
15185 @item nnfolder-delete-mail-hook
15186 @vindex nnfolder-delete-mail-hook
15187 Hook run in a buffer narrowed to the message that is to be deleted.
15188 This function can be used to copy the message to somewhere else, or to
15189 extract some information from it before removing it.
15190
15191 @item nnfolder-nov-is-evil
15192 @vindex nnfolder-nov-is-evil
15193 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
15194 default is @code{nil}.
15195
15196 @item nnfolder-nov-file-suffix
15197 @vindex nnfolder-nov-file-suffix
15198 The extension for @acronym{NOV} files.  The default is @file{.nov}.
15199
15200 @item nnfolder-nov-directory
15201 @vindex nnfolder-nov-directory
15202 The directory where the @acronym{NOV} files should be stored.  If
15203 @code{nil}, @code{nnfolder-directory} is used.
15204
15205 @item nnfolder-marks-is-evil
15206 @vindex nnfolder-marks-is-evil
15207 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
15208 default is @code{nil}.
15209
15210 @item nnfolder-marks-file-suffix
15211 @vindex nnfolder-marks-file-suffix
15212 The extension for @sc{marks} files.  The default is @file{.mrk}.
15213
15214 @item nnfolder-marks-directory
15215 @vindex nnfolder-marks-directory
15216 The directory where the @sc{marks} files should be stored.  If
15217 @code{nil}, @code{nnfolder-directory} is used.
15218
15219 @end table
15220
15221
15222 @findex nnfolder-generate-active-file
15223 @kindex M-x nnfolder-generate-active-file
15224 If you have lots of @code{nnfolder}-like files you'd like to read with
15225 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
15226 command to make @code{nnfolder} aware of all likely files in
15227 @code{nnfolder-directory}.  This only works if you use long file names,
15228 though.
15229
15230 @node Comparing Mail Back Ends
15231 @subsubsection Comparing Mail Back Ends
15232
15233 First, just for terminology, the @dfn{back end} is the common word for a
15234 low-level access method---a transport, if you will, by which something
15235 is acquired.  The sense is that one's mail has to come from somewhere,
15236 and so selection of a suitable back end is required in order to get that
15237 mail within spitting distance of Gnus.
15238
15239 The same concept exists for Usenet itself: Though access to articles is
15240 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
15241 in the world got at Usenet by running a reader on the machine where the
15242 articles lay (the machine which today we call an @acronym{NNTP} server), and
15243 access was by the reader stepping into the articles' directory spool
15244 area directly.  One can still select between either the @code{nntp} or
15245 @code{nnspool} back ends, to select between these methods, if one happens
15246 actually to live on the server (or can see its spool directly, anyway,
15247 via NFS).
15248
15249 The goal in selecting a mail back end is to pick one which
15250 simultaneously represents a suitable way of dealing with the original
15251 format plus leaving mail in a form that is convenient to use in the
15252 future.  Here are some high and low points on each:
15253
15254 @table @code
15255 @item nnmbox
15256
15257 UNIX systems have historically had a single, very common, and well-
15258 defined format.  All messages arrive in a single @dfn{spool file}, and
15259 they are delineated by a line whose regular expression matches
15260 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
15261 to make it clear in this instance that this is not the RFC-specified
15262 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
15263 historically from the Unix environment, it is simplest if one does not
15264 mess a great deal with the original mailbox format, so if one chooses
15265 this back end, Gnus' primary activity in getting mail from the real spool
15266 area to Gnus' preferred directory is simply to copy it, with no
15267 (appreciable) format change in the process.  It is the ``dumbest'' way
15268 to move mail into availability in the Gnus environment.  This makes it
15269 fast to move into place, but slow to parse, when Gnus has to look at
15270 what's where.
15271
15272 @item nnbabyl
15273
15274 Once upon a time, there was the DEC-10 and DEC-20, running operating
15275 systems called TOPS and related things, and the usual (only?) mail
15276 reading environment was a thing called Babyl.  I don't know what format
15277 was used for mail landing on the system, but Babyl had its own internal
15278 format to which mail was converted, primarily involving creating a
15279 spool-file-like entity with a scheme for inserting Babyl-specific
15280 headers and status bits above the top of each message in the file.
15281 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
15282 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
15283 to understand the mail files folks already had in existence.  Gnus (and
15284 VM, for that matter) continue to support this format because it's
15285 perceived as having some good qualities in those mailer-specific
15286 headers/status bits stuff.  Rmail itself still exists as well, of
15287 course, and is still maintained by Stallman.
15288
15289 Both of the above forms leave your mail in a single file on your
15290 file system, and they must parse that entire file each time you take a
15291 look at your mail.
15292
15293 @item nnml
15294
15295 @code{nnml} is the back end which smells the most as though you were
15296 actually operating with an @code{nnspool}-accessed Usenet system.  (In
15297 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
15298 lo these years ago.)  One's mail is taken from the original spool file,
15299 and is then cut up into individual message files, 1:1.  It maintains a
15300 Usenet-style active file (analogous to what one finds in an INN- or
15301 CNews-based news system in (for instance) @file{/var/lib/news/active},
15302 or what is returned via the @samp{NNTP LIST} verb) and also creates
15303 @dfn{overview} files for efficient group entry, as has been defined for
15304 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
15305 due to the creation of lots of files, updates to the @code{nnml} active
15306 file, and additions to overview files on a per-message basis, but it is
15307 extremely fast on access because of what amounts to the indexing support
15308 provided by the active file and overviews.
15309
15310 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
15311 resource which defines available places in the file system to put new
15312 files.  Sysadmins take a dim view of heavy inode occupation within
15313 tight, shared file systems.  But if you live on a personal machine where
15314 the file system is your own and space is not at a premium, @code{nnml}
15315 wins big.
15316
15317 It is also problematic using this back end if you are living in a
15318 FAT16-based Windows world, since much space will be wasted on all these
15319 tiny files.
15320
15321 @item nnmh
15322
15323 The Rand MH mail-reading system has been around UNIX systems for a very
15324 long time; it operates by splitting one's spool file of messages into
15325 individual files, but with little or no indexing support---@code{nnmh}
15326 is considered to be semantically equivalent to ``@code{nnml} without
15327 active file or overviews''.  This is arguably the worst choice, because
15328 one gets the slowness of individual file creation married to the
15329 slowness of access parsing when learning what's new in one's groups.
15330
15331 @item nnfolder
15332
15333 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
15334 method described above) on a per-group basis.  That is, @code{nnmbox}
15335 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
15336 little bit of optimization to this so that each of one's mail groups has
15337 a Unix mail box file.  It's faster than @code{nnmbox} because each group
15338 can be parsed separately, and still provides the simple Unix mail box
15339 format requiring minimal effort in moving the mail around.  In addition,
15340 it maintains an ``active'' file making it much faster for Gnus to figure
15341 out how many messages there are in each separate group.
15342
15343 If you have groups that are expected to have a massive amount of
15344 messages, @code{nnfolder} is not the best choice, but if you receive
15345 only a moderate amount of mail, @code{nnfolder} is probably the most
15346 friendly mail back end all over.
15347
15348 @item nnmaildir
15349
15350 For configuring expiry and other things, @code{nnmaildir} uses
15351 incompatible group parameters, slightly different from those of other
15352 mail back ends.
15353
15354 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
15355 differences.  Each message is stored in a separate file, but the
15356 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
15357 also stores the equivalent of @code{nnml}'s overview files in one file
15358 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
15359 @code{df -i} to see how plentiful your inode supply is.)  If this slows
15360 you down or takes up very much space, consider switching to
15361 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
15362 file system.
15363
15364 Since maildirs don't require locking for delivery, the maildirs you use
15365 as groups can also be the maildirs your mail is directly delivered to.
15366 This means you can skip Gnus' mail splitting if your mail is already
15367 organized into different mailboxes during delivery.  A @code{directory}
15368 entry in @code{mail-sources} would have a similar effect, but would
15369 require one set of mailboxes for spooling deliveries (in mbox format,
15370 thus damaging message bodies), and another set to be used as groups (in
15371 whatever format you like).  A maildir has a built-in spool, in the
15372 @code{new/} subdirectory.  Beware that currently, mail moved from
15373 @code{new/} to @code{cur/} instead of via mail splitting will not
15374 undergo treatment such as duplicate checking.
15375
15376 @code{nnmaildir} stores article marks for a given group in the
15377 corresponding maildir, in a way designed so that it's easy to manipulate
15378 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
15379 else, and still have your marks.  @code{nnml} also stores marks, but
15380 it's not as easy to work with them from outside Gnus as with
15381 @code{nnmaildir}.
15382
15383 @code{nnmaildir} uses a significant amount of memory to speed things up.
15384 (It keeps in memory some of the things that @code{nnml} stores in files
15385 and that @code{nnmh} repeatedly parses out of message files.)  If this
15386 is a problem for you, you can set the @code{nov-cache-size} group
15387 parameter to something small (0 would probably not work, but 1 probably
15388 would) to make it use less memory.  This caching will probably be
15389 removed in the future.
15390
15391 Startup is likely to be slower with @code{nnmaildir} than with other
15392 back ends.  Everything else is likely to be faster, depending in part
15393 on your file system.
15394
15395 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
15396 to write an @code{nnmaildir}-derived back end.
15397
15398 @end table
15399
15400
15401 @node Browsing the Web
15402 @section Browsing the Web
15403 @cindex web
15404 @cindex browsing the web
15405 @cindex www
15406 @cindex http
15407
15408 Web-based discussion forums are getting more and more popular.  On many
15409 subjects, the web-based forums have become the most important forums,
15410 eclipsing the importance of mailing lists and news groups.  The reason
15411 is easy to understand---they are friendly to new users; you just point
15412 and click, and there's the discussion.  With mailing lists, you have to
15413 go through a cumbersome subscription procedure, and most people don't
15414 even know what a news group is.
15415
15416 The problem with this scenario is that web browsers are not very good at
15417 being newsreaders.  They do not keep track of what articles you've read;
15418 they do not allow you to score on subjects you're interested in; they do
15419 not allow off-line browsing; they require you to click around and drive
15420 you mad in the end.
15421
15422 So---if web browsers suck at reading discussion forums, why not use Gnus
15423 to do it instead?
15424
15425 Gnus has been getting a bit of a collection of back ends for providing
15426 interfaces to these sources.
15427
15428 @menu
15429 * Archiving Mail::
15430 * Web Searches::                Creating groups from articles that match a string.
15431 * Slashdot::                    Reading the Slashdot comments.
15432 * Ultimate::                    The Ultimate Bulletin Board systems.
15433 * Web Archive::                 Reading mailing list archived on web.
15434 * RSS::                         Reading RDF site summary.
15435 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
15436 @end menu
15437
15438 All the web sources require Emacs/w3 and the url library to work.
15439
15440 The main caveat with all these web sources is that they probably won't
15441 work for a very long time.  Gleaning information from the @acronym{HTML} data
15442 is guesswork at best, and when the layout is altered, the Gnus back end
15443 will fail.  If you have reasonably new versions of these back ends,
15444 though, you should be ok.
15445
15446 One thing all these Web methods have in common is that the Web sources
15447 are often down, unavailable or just plain too slow to be fun.  In those
15448 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
15449 Unplugged}) handle downloading articles, and then you can read them at
15450 leisure from your local disk.  No more World Wide Wait for you.
15451
15452 @node Archiving Mail
15453 @subsection Archiving Mail
15454 @cindex archiving mail
15455 @cindex backup of mail
15456
15457 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
15458 @code{nnmaildir}, now actually store the article marks with each group.
15459 For these servers, archiving and restoring a group while preserving
15460 marks is fairly simple.
15461
15462 (Preserving the group level and group parameters as well still
15463 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
15464 though.)
15465
15466 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
15467 server, take a recursive copy of the server directory.  There is no need
15468 to shut down Gnus, so archiving may be invoked by @code{cron} or
15469 similar.  You restore the data by restoring the directory tree, and
15470 adding a server definition pointing to that directory in Gnus.  The
15471 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
15472 might interfere with overwriting data, so you may want to shut down Gnus
15473 before you restore the data.
15474
15475 It is also possible to archive individual @code{nnml},
15476 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
15477 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
15478 directory.  For @code{nnfolder} you need to copy both the base folder
15479 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
15480 this example).  Restoring the group is done with @kbd{G m} from the Group
15481 buffer.  The last step makes Gnus notice the new directory.
15482 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
15483 is unnecessary in that case.
15484
15485 @node Web Searches
15486 @subsection Web Searches
15487 @cindex nnweb
15488 @cindex Google
15489 @cindex dejanews
15490 @cindex gmane
15491 @cindex Usenet searches
15492 @cindex searching the Usenet
15493
15494 It's, like, too neat to search the Usenet for articles that match a
15495 string, but it, like, totally @emph{sucks}, like, totally, to use one of
15496 those, like, Web browsers, and you, like, have to, rilly, like, look at
15497 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
15498 searches without having to use a browser.
15499
15500 The @code{nnweb} back end allows an easy interface to the mighty search
15501 engine.  You create an @code{nnweb} group, enter a search pattern, and
15502 then enter the group and read the articles like you would any normal
15503 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
15504 Groups}) will do this in an easy-to-use fashion.
15505
15506 @code{nnweb} groups don't really lend themselves to being solid
15507 groups---they have a very fleeting idea of article numbers.  In fact,
15508 each time you enter an @code{nnweb} group (not even changing the search
15509 pattern), you are likely to get the articles ordered in a different
15510 manner.  Not even using duplicate suppression (@pxref{Duplicate
15511 Suppression}) will help, since @code{nnweb} doesn't even know the
15512 @code{Message-ID} of the articles before reading them using some search
15513 engines (Google, for instance).  The only possible way to keep track
15514 of which articles you've read is by scoring on the @code{Date}
15515 header---mark all articles posted before the last date you read the
15516 group as read.
15517
15518 If the search engine changes its output substantially, @code{nnweb}
15519 won't be able to parse it and will fail.  One could hardly fault the Web
15520 providers if they were to do this---their @emph{raison d'être} is to
15521 make money off of advertisements, not to provide services to the
15522 community.  Since @code{nnweb} washes the ads off all the articles, one
15523 might think that the providers might be somewhat miffed.  We'll see.
15524
15525 You must have the @code{url} and @code{w3} package installed to be able
15526 to use @code{nnweb}.
15527
15528 Virtual server variables:
15529
15530 @table @code
15531 @item nnweb-type
15532 @vindex nnweb-type
15533 What search engine type is being used.  The currently supported types
15534 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
15535 @code{dejanews} is an alias to @code{google}.
15536
15537 @item nnweb-search
15538 @vindex nnweb-search
15539 The search string to feed to the search engine.
15540
15541 @item nnweb-max-hits
15542 @vindex nnweb-max-hits
15543 Advisory maximum number of hits per search to display.  The default is
15544 999.
15545
15546 @item nnweb-type-definition
15547 @vindex nnweb-type-definition
15548 Type-to-definition alist.  This alist says what @code{nnweb} should do
15549 with the various search engine types.  The following elements must be
15550 present:
15551
15552 @table @code
15553 @item article
15554 Function to decode the article and provide something that Gnus
15555 understands.
15556
15557 @item map
15558 Function to create an article number to message header and URL alist.
15559
15560 @item search
15561 Function to send the search string to the search engine.
15562
15563 @item address
15564 The address the aforementioned function should send the search string
15565 to.
15566
15567 @item id
15568 Format string URL to fetch an article by @code{Message-ID}.
15569 @end table
15570
15571 @end table
15572
15573
15574 @node Slashdot
15575 @subsection Slashdot
15576 @cindex Slashdot
15577 @cindex nnslashdot
15578
15579 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
15580 lively discussion following the news articles.  @code{nnslashdot} will
15581 let you read this forum in a convenient manner.
15582
15583 The easiest way to read this source is to put something like the
15584 following in your @file{~/.gnus.el} file:
15585
15586 @lisp
15587 (setq gnus-secondary-select-methods
15588       '((nnslashdot "")))
15589 @end lisp
15590
15591 This will make Gnus query the @code{nnslashdot} back end for new comments
15592 and groups.  The @kbd{F} command will subscribe each new news article as
15593 a new Gnus group, and you can read the comments by entering these
15594 groups.  (Note that the default subscription method is to subscribe new
15595 groups as zombies.  Other methods are available (@pxref{Subscription
15596 Methods}).
15597
15598 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
15599 command is the most handy tool (@pxref{Foreign Groups}).
15600
15601 When following up to @code{nnslashdot} comments (or posting new
15602 comments), some light @acronym{HTML}izations will be performed.  In
15603 particular, text quoted with @samp{> } will be quoted with
15604 @samp{blockquote} instead, and signatures will have @samp{br} added to
15605 the end of each line.  Other than that, you can just write @acronym{HTML}
15606 directly into the message buffer.  Note that Slashdot filters out some
15607 @acronym{HTML} forms.
15608
15609 The following variables can be altered to change its behavior:
15610
15611 @table @code
15612 @item nnslashdot-threaded
15613 Whether @code{nnslashdot} should display threaded groups or not.  The
15614 default is @code{t}.  To be able to display threads, @code{nnslashdot}
15615 has to retrieve absolutely all comments in a group upon entry.  If a
15616 threaded display is not required, @code{nnslashdot} will only retrieve
15617 the comments that are actually wanted by the user.  Threading is nicer,
15618 but much, much slower than unthreaded.
15619
15620 @item nnslashdot-login-name
15621 @vindex nnslashdot-login-name
15622 The login name to use when posting.
15623
15624 @item nnslashdot-password
15625 @vindex nnslashdot-password
15626 The password to use when posting.
15627
15628 @item nnslashdot-directory
15629 @vindex nnslashdot-directory
15630 Where @code{nnslashdot} will store its files.  The default is
15631 @file{~/News/slashdot/}.
15632
15633 @item nnslashdot-active-url
15634 @vindex nnslashdot-active-url
15635 The @sc{url} format string that will be used to fetch the information on
15636 news articles and comments.  The default is@*
15637 @samp{http://slashdot.org/search.pl?section=&min=%d}.
15638
15639 @item nnslashdot-comments-url
15640 @vindex nnslashdot-comments-url
15641 The @sc{url} format string that will be used to fetch comments.
15642
15643 @item nnslashdot-article-url
15644 @vindex nnslashdot-article-url
15645 The @sc{url} format string that will be used to fetch the news article.  The
15646 default is
15647 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
15648
15649 @item nnslashdot-threshold
15650 @vindex nnslashdot-threshold
15651 The score threshold.  The default is -1.
15652
15653 @item nnslashdot-group-number
15654 @vindex nnslashdot-group-number
15655 The number of old groups, in addition to the ten latest, to keep
15656 updated.  The default is 0.
15657
15658 @end table
15659
15660
15661
15662 @node Ultimate
15663 @subsection Ultimate
15664 @cindex nnultimate
15665 @cindex Ultimate Bulletin Board
15666
15667 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
15668 probably the most popular Web bulletin board system used.  It has a
15669 quite regular and nice interface, and it's possible to get the
15670 information Gnus needs to keep groups updated.
15671
15672 The easiest way to get started with @code{nnultimate} is to say
15673 something like the following in the group buffer:  @kbd{B nnultimate RET
15674 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
15675 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
15676 you're interested in; there's quite a list of them on the Ultimate web
15677 site.)  Then subscribe to the groups you're interested in from the
15678 server buffer, and read them from the group buffer.
15679
15680 The following @code{nnultimate} variables can be altered:
15681
15682 @table @code
15683 @item nnultimate-directory
15684 @vindex nnultimate-directory
15685 The directory where @code{nnultimate} stores its files.  The default is@*
15686 @file{~/News/ultimate/}.
15687 @end table
15688
15689
15690 @node Web Archive
15691 @subsection Web Archive
15692 @cindex nnwarchive
15693 @cindex Web Archive
15694
15695 Some mailing lists only have archives on Web servers, such as
15696 @uref{http://www.egroups.com/} and
15697 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
15698 interface, and it's possible to get the information Gnus needs to keep
15699 groups updated.
15700
15701 @findex gnus-group-make-warchive-group
15702 The easiest way to get started with @code{nnwarchive} is to say
15703 something like the following in the group buffer: @kbd{M-x
15704 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
15705 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
15706 @var{an_egroup} with the mailing list you subscribed, the
15707 @var{your@@email.address} with your email address.), or to browse the
15708 back end by @kbd{B nnwarchive RET mail-archive RET}.
15709
15710 The following @code{nnwarchive} variables can be altered:
15711
15712 @table @code
15713 @item nnwarchive-directory
15714 @vindex nnwarchive-directory
15715 The directory where @code{nnwarchive} stores its files.  The default is@*
15716 @file{~/News/warchive/}.
15717
15718 @item nnwarchive-login
15719 @vindex nnwarchive-login
15720 The account name on the web server.
15721
15722 @item nnwarchive-passwd
15723 @vindex nnwarchive-passwd
15724 The password for your account on the web server.
15725 @end table
15726
15727 @node RSS
15728 @subsection RSS
15729 @cindex nnrss
15730 @cindex RSS
15731
15732 Some sites have RDF site summary (RSS)
15733 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
15734 interface, and it's possible to get the information Gnus needs to keep
15735 groups updated.
15736
15737 The easiest way to get started with @code{nnrss} is to say something
15738 like the following in the group buffer: @kbd{B nnrss RET RET}, then
15739 subscribe groups.
15740
15741 The following @code{nnrss} variables can be altered:
15742
15743 @table @code
15744 @item nnrss-directory
15745 @vindex nnrss-directory
15746 The directory where @code{nnrss} stores its files.  The default is
15747 @file{~/News/rss/}.
15748
15749 @end table
15750
15751 The following code may be helpful, if you want to show the description in
15752 the summary buffer.
15753
15754 @lisp
15755 (add-to-list 'nnmail-extra-headers nnrss-description-field)
15756 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
15757
15758 (defun gnus-user-format-function-X (header)
15759   (let ((descr
15760          (assq nnrss-description-field (mail-header-extra header))))
15761     (if descr (concat "\n\t" (cdr descr)) "")))
15762 @end lisp
15763
15764 The following code may be useful to open an nnrss url directly from the
15765 summary buffer.
15766 @lisp
15767 (require 'browse-url)
15768
15769 (defun browse-nnrss-url( arg )
15770   (interactive "p")
15771   (let ((url (assq nnrss-url-field
15772                    (mail-header-extra
15773                     (gnus-data-header
15774                      (assq (gnus-summary-article-number)
15775                            gnus-newsgroup-data))))))
15776     (if url
15777         (progn
15778           (browse-url (cdr url))
15779           (gnus-summary-mark-as-read-forward 1))
15780       (gnus-summary-scroll-up arg))))
15781
15782 (eval-after-load "gnus"
15783   #'(define-key gnus-summary-mode-map
15784       (kbd "<RET>") 'browse-nnrss-url))
15785 (add-to-list 'nnmail-extra-headers nnrss-url-field)
15786 @end lisp
15787
15788 @node Customizing w3
15789 @subsection Customizing w3
15790 @cindex w3
15791 @cindex html
15792 @cindex url
15793 @cindex Netscape
15794
15795 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
15796 pages.  Emacs/w3 is documented in its own manual, but there are some
15797 things that may be more relevant for Gnus users.
15798
15799 For instance, a common question is how to make Emacs/w3 follow links
15800 using the @code{browse-url} functions (which will call some external web
15801 browser like Netscape).  Here's one way:
15802
15803 @lisp
15804 (eval-after-load "w3"
15805   '(progn
15806     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
15807     (defun w3-fetch (&optional url target)
15808       (interactive (list (w3-read-url-with-default)))
15809       (if (eq major-mode 'gnus-article-mode)
15810           (browse-url url)
15811         (w3-fetch-orig url target)))))
15812 @end lisp
15813
15814 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15815 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
15816 follow the link.
15817
15818
15819 @node IMAP
15820 @section IMAP
15821 @cindex nnimap
15822 @cindex @acronym{IMAP}
15823
15824 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
15825 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
15826 server is much similar to connecting to a news server, you just
15827 specify the network address of the server.
15828
15829 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
15830 everything that @acronym{POP} can, it can hence be viewed as a
15831 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
15832 similar to @acronym{NNTP} being a news storage protocol---however,
15833 @acronym{IMAP} offers more features than @acronym{NNTP} because news
15834 is more or less read-only whereas mail is read-write.
15835
15836 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
15837 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
15838 the @acronym{IMAP} server and store them on the local disk.  This is
15839 not the usage described in this section---@xref{Mail Sources}.
15840
15841 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
15842 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15843 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
15844 usage explained in this section.
15845
15846 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
15847 servers might look something like the following.  (Note that for
15848 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
15849 see below.)
15850
15851 @lisp
15852 (setq gnus-secondary-select-methods
15853       '((nnimap "simpleserver") ; @r{no special configuration}
15854         ; @r{perhaps a ssh port forwarded server:}
15855         (nnimap "dolk"
15856                 (nnimap-address "localhost")
15857                 (nnimap-server-port 1430))
15858         ; @r{a UW server running on localhost}
15859         (nnimap "barbar"
15860                 (nnimap-server-port 143)
15861                 (nnimap-address "localhost")
15862                 (nnimap-list-pattern ("INBOX" "mail/*")))
15863         ; @r{anonymous public cyrus server:}
15864         (nnimap "cyrus.andrew.cmu.edu"
15865                 (nnimap-authenticator anonymous)
15866                 (nnimap-list-pattern "archive.*")
15867                 (nnimap-stream network))
15868         ; @r{a ssl server on a non-standard port:}
15869         (nnimap "vic20"
15870                 (nnimap-address "vic20.somewhere.com")
15871                 (nnimap-server-port 9930)
15872                 (nnimap-stream ssl))))
15873 @end lisp
15874
15875 After defining the new server, you can subscribe to groups on the
15876 server using normal Gnus commands such as @kbd{U} in the Group Buffer
15877 (@pxref{Subscription Commands}) or via the Server Buffer
15878 (@pxref{Server Buffer}).
15879
15880 The following variables can be used to create a virtual @code{nnimap}
15881 server:
15882
15883 @table @code
15884
15885 @item nnimap-address
15886 @vindex nnimap-address
15887
15888 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
15889 server name if not specified.
15890
15891 @item nnimap-server-port
15892 @vindex nnimap-server-port
15893 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
15894
15895 Note that this should be an integer, example server specification:
15896
15897 @lisp
15898 (nnimap "mail.server.com"
15899         (nnimap-server-port 4711))
15900 @end lisp
15901
15902 @item nnimap-list-pattern
15903 @vindex nnimap-list-pattern
15904 String or list of strings of mailboxes to limit available groups to.
15905 This is used when the server has very many mailboxes and you're only
15906 interested in a few---some servers export your home directory via
15907 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
15908 @file{~/Mail/*} then.
15909
15910 The string can also be a cons of REFERENCE and the string as above, what
15911 REFERENCE is used for is server specific, but on the University of
15912 Washington server it's a directory that will be concatenated with the
15913 mailbox.
15914
15915 Example server specification:
15916
15917 @lisp
15918 (nnimap "mail.server.com"
15919         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15920                                ("~friend/Mail/" . "list/*"))))
15921 @end lisp
15922
15923 @item nnimap-stream
15924 @vindex nnimap-stream
15925 The type of stream used to connect to your server.  By default, nnimap
15926 will detect and automatically use all of the below, with the exception
15927 of @acronym{TLS}/@acronym{SSL}.  (@acronym{IMAP} over
15928 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
15929 be automatically detected, but it's not widely deployed yet.)
15930
15931 Example server specification:
15932
15933 @lisp
15934 (nnimap "mail.server.com"
15935         (nnimap-stream ssl))
15936 @end lisp
15937
15938 Please note that the value of @code{nnimap-stream} is a symbol!
15939
15940 @itemize @bullet
15941 @item
15942 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5).  Requires the
15943 @samp{gsasl} or @samp{imtest} program.
15944 @item
15945 @dfn{kerberos4:} Connect with Kerberos 4.  Requires the @samp{imtest} program.
15946 @item
15947 @dfn{starttls:} Connect via the STARTTLS extension (similar to
15948 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
15949 @samp{starttls}.
15950 @item
15951 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
15952 @samp{gnutls-cli}).
15953 @item
15954 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
15955 @samp{openssl}) or SSLeay (@samp{s_client}).
15956 @item
15957 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
15958 @item
15959 @dfn{network:} Plain, TCP/IP network connection.
15960 @end itemize
15961
15962 @vindex imap-kerberos4-program
15963 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
15964 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
15965 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
15966 to make @code{imap.el} use a pty instead of a pipe when communicating
15967 with @samp{imtest}.  You will then suffer from a line length
15968 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
15969 indefinitely if you have many articles in a mailbox.  The variable
15970 @code{imap-kerberos4-program} contain parameters to pass to the imtest
15971 program.
15972
15973 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
15974 needed.  It is available from
15975 @uref{http://www.gnu.org/software/gnutls/}.
15976
15977 @vindex imap-gssapi-program
15978 This parameter specifies a list of command lines that invoke a GSSAPI
15979 authenticated @acronym{IMAP} stream in a subshell.  They are tried
15980 sequentially until a connection is made, or the list has been
15981 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
15982 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
15983 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
15984 tried.
15985
15986 @vindex imap-ssl-program
15987 For @acronym{SSL} connections, the OpenSSL program is available from
15988 @uref{http://www.openssl.org/}.  OpenSSL was formerly known as SSLeay,
15989 and nnimap support it too---although the most recent versions of
15990 SSLeay, 0.9.x, are known to have serious bugs making it
15991 useless.  Earlier versions, especially 0.8.x, of SSLeay are known to
15992 work.  The variable @code{imap-ssl-program} contain parameters to pass
15993 to OpenSSL/SSLeay.
15994
15995 @vindex imap-shell-program
15996 @vindex imap-shell-host
15997 For @acronym{IMAP} connections using the @code{shell} stream, the variable
15998 @code{imap-shell-program} specify what program to call.
15999
16000 @item nnimap-authenticator
16001 @vindex nnimap-authenticator
16002
16003 The authenticator used to connect to the server.  By default, nnimap
16004 will use the most secure authenticator your server is capable of.
16005
16006 Example server specification:
16007
16008 @lisp
16009 (nnimap "mail.server.com"
16010         (nnimap-authenticator anonymous))
16011 @end lisp
16012
16013 Please note that the value of @code{nnimap-authenticator} is a symbol!
16014
16015 @itemize @bullet
16016 @item
16017 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication.  Requires
16018 external program @code{gsasl} or @code{imtest}.
16019 @item
16020 @dfn{kerberos4:} Kerberos 4 authentication.  Requires external program
16021 @code{imtest}.
16022 @item
16023 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5.  Requires
16024 external library @code{digest-md5.el}.
16025 @item
16026 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
16027 @item
16028 @dfn{login:} Plain-text username/password via LOGIN.
16029 @item
16030 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
16031 @end itemize
16032
16033 @item nnimap-expunge-on-close
16034 @cindex expunging
16035 @vindex nnimap-expunge-on-close
16036 Unlike Parmenides the @acronym{IMAP} designers have decided things that
16037 don't exist actually do exist.  More specifically, @acronym{IMAP} has
16038 this concept of marking articles @code{Deleted} which doesn't actually
16039 delete them, and this (marking them @code{Deleted}, that is) is what
16040 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
16041 similar).
16042
16043 Since the articles aren't really removed when we mark them with the
16044 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
16045 running in circles yet?
16046
16047 Traditionally, nnimap has removed all articles marked as @code{Deleted}
16048 when closing a mailbox but this is now configurable by this server
16049 variable.
16050
16051 The possible options are:
16052
16053 @table @code
16054
16055 @item always
16056 The default behavior, delete all articles marked as ``Deleted'' when
16057 closing a mailbox.
16058 @item never
16059 Never actually delete articles.  Currently there is no way of showing
16060 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
16061 may allow you to do this.  If you ever want to run the EXPUNGE command
16062 manually, @xref{Expunging mailboxes}.
16063 @item ask
16064 When closing mailboxes, nnimap will ask if you wish to expunge deleted
16065 articles or not.
16066
16067 @end table
16068
16069 @item nnimap-importantize-dormant
16070 @vindex nnimap-importantize-dormant
16071
16072 If non-@code{nil} (the default), marks dormant articles as ticked (as
16073 well), for other @acronym{IMAP} clients.  Within Gnus, dormant articles will
16074 naturally still (only) be marked as dormant.  This is to make dormant
16075 articles stand out, just like ticked articles, in other @acronym{IMAP}
16076 clients.  (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
16077 has only one.)
16078
16079 Probably the only reason for frobing this would be if you're trying
16080 enable per-user persistent dormant flags, using something like:
16081
16082 @lisp
16083 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
16084         (format "gnus-dormant-%s" (user-login-name)))
16085 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
16086         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
16087 @end lisp
16088
16089 In this case, you would not want the per-user dormant flag showing up
16090 as ticked for other users.
16091
16092 @item nnimap-expunge-search-string
16093 @cindex expunging
16094 @vindex nnimap-expunge-search-string
16095
16096 This variable contain the @acronym{IMAP} search command sent to server when
16097 searching for articles eligible for expiring.  The default is
16098 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
16099 UID set and the second @code{%s} is replaced by a date.
16100
16101 Probably the only useful value to change this to is
16102 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
16103 messages instead of the internal article date.  See section 6.4.4 of
16104 RFC 2060 for more information on valid strings.
16105
16106 @item nnimap-authinfo-file
16107 @vindex nnimap-authinfo-file
16108
16109 A file containing credentials used to log in on servers.  The format is
16110 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
16111 variable @code{nntp-authinfo-file} for exact syntax; also see
16112 @ref{NNTP}.
16113
16114 @item nnimap-need-unselect-to-notice-new-mail
16115 @vindex nnimap-need-unselect-to-notice-new-mail
16116
16117 Unselect mailboxes before looking for new mail in them.  Some servers
16118 seem to need this under some circumstances; it was reported that
16119 Courier 1.7.1 did.
16120
16121 @end table
16122
16123 @menu
16124 * Splitting in IMAP::           Splitting mail with nnimap.
16125 * Expiring in IMAP::            Expiring mail with nnimap.
16126 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
16127 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
16128 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
16129 @end menu
16130
16131
16132
16133 @node Splitting in IMAP
16134 @subsection Splitting in IMAP
16135 @cindex splitting imap mail
16136
16137 Splitting is something Gnus users have loved and used for years, and now
16138 the rest of the world is catching up.  Yeah, dream on, not many
16139 @acronym{IMAP} servers have server side splitting and those that have
16140 splitting seem to use some non-standard protocol.  This means that
16141 @acronym{IMAP} support for Gnus has to do its own splitting.
16142
16143 And it does.
16144
16145 (Incidentally, people seem to have been dreaming on, and Sieve has
16146 gaining a market share and is supported by several IMAP servers.
16147 Fortunately, Gnus support it too, @xref{Sieve Commands}.)
16148
16149 Here are the variables of interest:
16150
16151 @table @code
16152
16153 @item nnimap-split-crosspost
16154 @cindex splitting, crosspost
16155 @cindex crosspost
16156 @vindex nnimap-split-crosspost
16157
16158 If non-@code{nil}, do crossposting if several split methods match the
16159 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
16160 found will be used.
16161
16162 Nnmail equivalent: @code{nnmail-crosspost}.
16163
16164 @item nnimap-split-inbox
16165 @cindex splitting, inbox
16166 @cindex inbox
16167 @vindex nnimap-split-inbox
16168
16169 A string or a list of strings that gives the name(s) of @acronym{IMAP}
16170 mailboxes to split from.  Defaults to @code{nil}, which means that
16171 splitting is disabled!
16172
16173 @lisp
16174 (setq nnimap-split-inbox
16175       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
16176 @end lisp
16177
16178 No nnmail equivalent.
16179
16180 @item nnimap-split-rule
16181 @cindex splitting, rules
16182 @vindex nnimap-split-rule
16183
16184 New mail found in @code{nnimap-split-inbox} will be split according to
16185 this variable.
16186
16187 This variable contains a list of lists, where the first element in the
16188 sublist gives the name of the @acronym{IMAP} mailbox to move articles
16189 matching the regexp in the second element in the sublist.  Got that?
16190 Neither did I, we need examples.
16191
16192 @lisp
16193 (setq nnimap-split-rule
16194       '(("INBOX.nnimap"
16195          "^Sender: owner-nnimap@@vic20.globalcom.se")
16196         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
16197         ("INBOX.private" "")))
16198 @end lisp
16199
16200 This will put all articles from the nnimap mailing list into mailbox
16201 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
16202 into INBOX.junk and everything else in INBOX.private.
16203
16204 The first string may contain @samp{\\1} forms, like the ones used by
16205 replace-match to insert sub-expressions from the matched text.  For
16206 instance:
16207
16208 @lisp
16209 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
16210 @end lisp
16211
16212 The first element can also be the symbol @code{junk} to indicate that
16213 matching messages should simply be deleted.  Use with care.
16214
16215 The second element can also be a function.  In that case, it will be
16216 called with the first element of the rule as the argument, in a buffer
16217 containing the headers of the article.  It should return a
16218 non-@code{nil} value if it thinks that the mail belongs in that group.
16219
16220 Nnmail users might recollect that the last regexp had to be empty to
16221 match all articles (like in the example above).  This is not required in
16222 nnimap.  Articles not matching any of the regexps will not be moved out
16223 of your inbox.  (This might affect performance if you keep lots of
16224 unread articles in your inbox, since the splitting code would go over
16225 them every time you fetch new mail.)
16226
16227 These rules are processed from the beginning of the alist toward the
16228 end.  The first rule to make a match will ``win'', unless you have
16229 crossposting enabled.  In that case, all matching rules will ``win''.
16230
16231 This variable can also have a function as its value, the function will
16232 be called with the headers narrowed and should return a group where it
16233 thinks the article should be split to.  See @code{nnimap-split-fancy}.
16234
16235 The splitting code tries to create mailboxes if it needs to.
16236
16237 To allow for different split rules on different virtual servers, and
16238 even different split rules in different inboxes on the same server,
16239 the syntax of this variable have been extended along the lines of:
16240
16241 @lisp
16242 (setq nnimap-split-rule
16243       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
16244                                ("junk"    "From:.*Simon"))))
16245         ("my2server"    ("INBOX" nnimap-split-fancy))
16246         ("my[34]server" (".*" (("private" "To:.*Simon")
16247                                ("junk"    my-junk-func))))))
16248 @end lisp
16249
16250 The virtual server name is in fact a regexp, so that the same rules
16251 may apply to several servers.  In the example, the servers
16252 @code{my3server} and @code{my4server} both use the same rules.
16253 Similarly, the inbox string is also a regexp.  The actual splitting
16254 rules are as before, either a function, or a list with group/regexp or
16255 group/function elements.
16256
16257 Nnmail equivalent: @code{nnmail-split-methods}.
16258
16259 @item nnimap-split-predicate
16260 @cindex splitting
16261 @vindex nnimap-split-predicate
16262
16263 Mail matching this predicate in @code{nnimap-split-inbox} will be
16264 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
16265
16266 This might be useful if you use another @acronym{IMAP} client to read mail in
16267 your inbox but would like Gnus to split all articles in the inbox
16268 regardless of readedness.  Then you might change this to
16269 @samp{UNDELETED}.
16270
16271 @item nnimap-split-fancy
16272 @cindex splitting, fancy
16273 @findex nnimap-split-fancy
16274 @vindex nnimap-split-fancy
16275
16276 It's possible to set @code{nnimap-split-rule} to
16277 @code{nnmail-split-fancy} if you want to use fancy
16278 splitting.  @xref{Fancy Mail Splitting}.
16279
16280 However, to be able to have different fancy split rules for nnmail and
16281 nnimap back ends you can set @code{nnimap-split-rule} to
16282 @code{nnimap-split-fancy} and define the nnimap specific fancy split
16283 rule in @code{nnimap-split-fancy}.
16284
16285 Example:
16286
16287 @lisp
16288 (setq nnimap-split-rule 'nnimap-split-fancy
16289       nnimap-split-fancy ...)
16290 @end lisp
16291
16292 Nnmail equivalent: @code{nnmail-split-fancy}.
16293
16294 @item nnimap-split-download-body
16295 @findex nnimap-split-download-body
16296 @vindex nnimap-split-download-body
16297
16298 Set to non-@code{nil} to download entire articles during splitting.
16299 This is generally not required, and will slow things down
16300 considerably.  You may need it if you want to use an advanced
16301 splitting function that analyses the body to split the article.
16302
16303 @end table
16304
16305 @node Expiring in IMAP
16306 @subsection Expiring in IMAP
16307 @cindex expiring imap mail
16308
16309 Even though @code{nnimap} is not a proper @code{nnmail} derived back
16310 end, it supports most features in regular expiring (@pxref{Expiring
16311 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
16312 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
16313 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
16314 follows below are the variables used by the @code{nnimap} expiry
16315 process.
16316
16317 A note on how the expire mark is stored on the @acronym{IMAP} server is
16318 appropriate here as well.  The expire mark is translated into a
16319 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
16320 message.  This means that likely only Gnus will understand and treat
16321 the @code{gnus-expire} mark properly, although other clients may allow
16322 you to view client specific flags on the message.  It also means that
16323 your server must support permanent storage of client specific flags on
16324 messages.  Most do, fortunately.
16325
16326 @table @code
16327
16328 @item nnmail-expiry-wait
16329 @item nnmail-expiry-wait-function
16330
16331 These variables are fully supported.  The expire value can be a
16332 number, the symbol @code{immediate} or @code{never}.
16333
16334 @item nnmail-expiry-target
16335
16336 This variable is supported, and internally implemented by calling the
16337 @code{nnmail} functions that handle this.  It contains an optimization
16338 that if the destination is a @acronym{IMAP} group on the same server, the
16339 article is copied instead of appended (that is, uploaded again).
16340
16341 @end table
16342
16343 @node Editing IMAP ACLs
16344 @subsection Editing IMAP ACLs
16345 @cindex editing imap acls
16346 @cindex Access Control Lists
16347 @cindex Editing @acronym{IMAP} ACLs
16348 @kindex G l
16349 @findex gnus-group-nnimap-edit-acl
16350
16351 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
16352 limiting (or enabling) other users access to your mail boxes.  Not all
16353 @acronym{IMAP} servers support this, this function will give an error if it
16354 doesn't.
16355
16356 To edit an ACL for a mailbox, type @kbd{G l}
16357 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
16358 editing window with detailed instructions.
16359
16360 Some possible uses:
16361
16362 @itemize @bullet
16363 @item
16364 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
16365 on your mailing list mailboxes enables other users on the same server to
16366 follow the list without subscribing to it.
16367 @item
16368 At least with the Cyrus server, you are required to give the user
16369 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
16370 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
16371 INBOX.mailbox).
16372 @end itemize
16373
16374 @node Expunging mailboxes
16375 @subsection Expunging mailboxes
16376 @cindex expunging
16377
16378 @cindex expunge
16379 @cindex manual expunging
16380 @kindex G x
16381 @findex gnus-group-nnimap-expunge
16382
16383 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
16384 you may want the option of expunging all deleted articles in a mailbox
16385 manually.  This is exactly what @kbd{G x} does.
16386
16387 Currently there is no way of showing deleted articles, you can just
16388 delete them.
16389
16390 @node A note on namespaces
16391 @subsection A note on namespaces
16392 @cindex IMAP namespace
16393 @cindex namespaces
16394
16395 The @acronym{IMAP} protocol has a concept called namespaces, described
16396 by the following text in the RFC:
16397
16398 @display
16399 5.1.2.  Mailbox Namespace Naming Convention
16400
16401    By convention, the first hierarchical element of any mailbox name
16402    which begins with "#" identifies the "namespace" of the remainder of
16403    the name.  This makes it possible to disambiguate between different
16404    types of mailbox stores, each of which have their own namespaces.
16405
16406       For example, implementations which offer access to USENET
16407       newsgroups MAY use the "#news" namespace to partition the USENET
16408       newsgroup namespace from that of other mailboxes.  Thus, the
16409       comp.mail.misc newsgroup would have an mailbox name of
16410       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
16411       to a different object (e.g. a user's private mailbox).
16412 @end display
16413
16414 While there is nothing in this text that warrants concern for the
16415 @acronym{IMAP} implementation in Gnus, some servers use namespace
16416 prefixes in a way that does not work with how Gnus uses mailbox names.
16417
16418 Specifically, University of Washington's @acronym{IMAP} server uses
16419 mailbox names like @code{#driver.mbx/read-mail} which are valid only
16420 in the @sc{create} and @sc{append} commands.  After the mailbox is
16421 created (or a messages is appended to a mailbox), it must be accessed
16422 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
16423 not make it possible for the user to guarantee that user entered
16424 mailbox names will only be used with the CREATE and APPEND commands,
16425 you should simply not use the namespace prefixed mailbox names in
16426 Gnus.
16427
16428 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
16429 for more information on how to use the prefixes.  They are a power
16430 tool and should be used only if you are sure what the effects are.
16431
16432 @node Other Sources
16433 @section Other Sources
16434
16435 Gnus can do more than just read news or mail.  The methods described
16436 below allow Gnus to view directories and files as if they were
16437 newsgroups.
16438
16439 @menu
16440 * Directory Groups::            You can read a directory as if it was a newsgroup.
16441 * Anything Groups::             Dired?  Who needs dired?
16442 * Document Groups::             Single files can be the basis of a group.
16443 * SOUP::                        Reading @sc{soup} packets ``offline''.
16444 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
16445 @end menu
16446
16447
16448 @node Directory Groups
16449 @subsection Directory Groups
16450 @cindex nndir
16451 @cindex directory groups
16452
16453 If you have a directory that has lots of articles in separate files in
16454 it, you might treat it as a newsgroup.  The files have to have numerical
16455 names, of course.
16456
16457 This might be an opportune moment to mention @code{ange-ftp} (and its
16458 successor @code{efs}), that most wonderful of all wonderful Emacs
16459 packages.  When I wrote @code{nndir}, I didn't think much about it---a
16460 back end to read directories.  Big deal.
16461
16462 @code{ange-ftp} changes that picture dramatically.  For instance, if you
16463 enter the @code{ange-ftp} file name
16464 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16465 @code{ange-ftp} or @code{efs} will actually allow you to read this
16466 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
16467
16468 @code{nndir} will use @acronym{NOV} files if they are present.
16469
16470 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16471 articles with this method.  You can use @code{nnmh} or @code{nnml} for
16472 whatever you use @code{nndir} for, so you could switch to any of those
16473 methods if you feel the need to have a non-read-only @code{nndir}.
16474
16475
16476 @node Anything Groups
16477 @subsection Anything Groups
16478 @cindex nneething
16479
16480 From the @code{nndir} back end (which reads a single spool-like
16481 directory), it's just a hop and a skip to @code{nneething}, which
16482 pretends that any arbitrary directory is a newsgroup.  Strange, but
16483 true.
16484
16485 When @code{nneething} is presented with a directory, it will scan this
16486 directory and assign article numbers to each file.  When you enter such
16487 a group, @code{nneething} must create ``headers'' that Gnus can use.
16488 After all, Gnus is a newsreader, in case you're forgetting.
16489 @code{nneething} does this in a two-step process.  First, it snoops each
16490 file in question.  If the file looks like an article (i.e., the first
16491 few lines look like headers), it will use this as the head.  If this is
16492 just some arbitrary file without a head (e.g. a C source file),
16493 @code{nneething} will cobble up a header out of thin air.  It will use
16494 file ownership, name and date and do whatever it can with these
16495 elements.
16496
16497 All this should happen automatically for you, and you will be presented
16498 with something that looks very much like a newsgroup.  Totally like a
16499 newsgroup, to be precise.  If you select an article, it will be displayed
16500 in the article buffer, just as usual.
16501
16502 If you select a line that represents a directory, Gnus will pop you into
16503 a new summary buffer for this @code{nneething} group.  And so on.  You can
16504 traverse the entire disk this way, if you feel like, but remember that
16505 Gnus is not dired, really, and does not intend to be, either.
16506
16507 There are two overall modes to this action---ephemeral or solid.  When
16508 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16509 will not store information on what files you have read, and what files
16510 are new, and so on.  If you create a solid @code{nneething} group the
16511 normal way with @kbd{G m}, Gnus will store a mapping table between
16512 article numbers and file names, and you can treat this group like any
16513 other groups.  When you activate a solid @code{nneething} group, you will
16514 be told how many unread articles it contains, etc., etc.
16515
16516 Some variables:
16517
16518 @table @code
16519 @item nneething-map-file-directory
16520 @vindex nneething-map-file-directory
16521 All the mapping files for solid @code{nneething} groups will be stored
16522 in this directory, which defaults to @file{~/.nneething/}.
16523
16524 @item nneething-exclude-files
16525 @vindex nneething-exclude-files
16526 All files that match this regexp will be ignored.  Nice to use to exclude
16527 auto-save files and the like, which is what it does by default.
16528
16529 @item nneething-include-files
16530 @vindex nneething-include-files
16531 Regexp saying what files to include in the group.  If this variable is
16532 non-@code{nil}, only files matching this regexp will be included.
16533
16534 @item nneething-map-file
16535 @vindex nneething-map-file
16536 Name of the map files.
16537 @end table
16538
16539
16540 @node Document Groups
16541 @subsection Document Groups
16542 @cindex nndoc
16543 @cindex documentation group
16544 @cindex help group
16545
16546 @code{nndoc} is a cute little thing that will let you read a single file
16547 as a newsgroup.  Several files types are supported:
16548
16549 @table @code
16550 @cindex Babyl
16551 @cindex Rmail mbox
16552
16553 @item babyl
16554 The Babyl (Rmail) mail box.
16555 @cindex mbox
16556 @cindex Unix mbox
16557
16558 @item mbox
16559 The standard Unix mbox file.
16560
16561 @cindex MMDF mail box
16562 @item mmdf
16563 The MMDF mail box format.
16564
16565 @item news
16566 Several news articles appended into a file.
16567
16568 @item rnews
16569 @cindex rnews batch files
16570 The rnews batch transport format.
16571 @cindex forwarded messages
16572
16573 @item forward
16574 Forwarded articles.
16575
16576 @item nsmail
16577 Netscape mail boxes.
16578
16579 @item mime-parts
16580 @acronym{MIME} multipart messages.
16581
16582 @item standard-digest
16583 The standard (RFC 1153) digest format.
16584
16585 @item mime-digest
16586 A @acronym{MIME} digest of messages.
16587
16588 @item lanl-gov-announce
16589 Announcement messages from LANL Gov Announce.
16590
16591 @item rfc822-forward
16592 A message forwarded according to RFC822.
16593
16594 @item outlook
16595 The Outlook mail box.
16596
16597 @item oe-dbx
16598 The Outlook Express dbx mail box.
16599
16600 @item exim-bounce
16601 A bounce message from the Exim MTA.
16602
16603 @item forward
16604 A message forwarded according to informal rules.
16605
16606 @item rfc934
16607 An RFC934-forwarded message.
16608
16609 @item mailman
16610 A mailman digest.
16611
16612 @item clari-briefs
16613 A digest of Clarinet brief news items.
16614
16615 @item slack-digest
16616 Non-standard digest format---matches most things, but does it badly.
16617
16618 @item mail-in-mail
16619 The last resort.
16620 @end table
16621
16622 You can also use the special ``file type'' @code{guess}, which means
16623 that @code{nndoc} will try to guess what file type it is looking at.
16624 @code{digest} means that @code{nndoc} should guess what digest type the
16625 file is.
16626
16627 @code{nndoc} will not try to change the file or insert any extra headers into
16628 it---it will simply, like, let you use the file as the basis for a
16629 group.  And that's it.
16630
16631 If you have some old archived articles that you want to insert into your
16632 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16633 that.  Say you have an old @file{RMAIL} file with mail that you now want
16634 to split into your new @code{nnml} groups.  You look at that file using
16635 @code{nndoc} (using the @kbd{G f} command in the group buffer
16636 (@pxref{Foreign Groups})), set the process mark on all the articles in
16637 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16638 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
16639 file is now also stored in lots of @code{nnml} directories, and you can
16640 delete that pesky @file{RMAIL} file.  If you have the guts!
16641
16642 Virtual server variables:
16643
16644 @table @code
16645 @item nndoc-article-type
16646 @vindex nndoc-article-type
16647 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16648 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16649 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16650 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16651 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16652
16653 @item nndoc-post-type
16654 @vindex nndoc-post-type
16655 This variable says whether Gnus is to consider the group a news group or
16656 a mail group.  There are two valid values:  @code{mail} (the default)
16657 and @code{news}.
16658 @end table
16659
16660 @menu
16661 * Document Server Internals::   How to add your own document types.
16662 @end menu
16663
16664
16665 @node Document Server Internals
16666 @subsubsection Document Server Internals
16667
16668 Adding new document types to be recognized by @code{nndoc} isn't
16669 difficult.  You just have to whip up a definition of what the document
16670 looks like, write a predicate function to recognize that document type,
16671 and then hook into @code{nndoc}.
16672
16673 First, here's an example document type definition:
16674
16675 @example
16676 (mmdf
16677  (article-begin .  "^\^A\^A\^A\^A\n")
16678  (body-end .  "^\^A\^A\^A\^A\n"))
16679 @end example
16680
16681 The definition is simply a unique @dfn{name} followed by a series of
16682 regexp pseudo-variable settings.  Below are the possible
16683 variables---don't be daunted by the number of variables; most document
16684 types can be defined with very few settings:
16685
16686 @table @code
16687 @item first-article
16688 If present, @code{nndoc} will skip past all text until it finds
16689 something that match this regexp.  All text before this will be
16690 totally ignored.
16691
16692 @item article-begin
16693 This setting has to be present in all document type definitions.  It
16694 says what the beginning of each article looks like.
16695
16696 @item head-begin-function
16697 If present, this should be a function that moves point to the head of
16698 the article.
16699
16700 @item nndoc-head-begin
16701 If present, this should be a regexp that matches the head of the
16702 article.
16703
16704 @item nndoc-head-end
16705 This should match the end of the head of the article.  It defaults to
16706 @samp{^$}---the empty line.
16707
16708 @item body-begin-function
16709 If present, this function should move point to the beginning of the body
16710 of the article.
16711
16712 @item body-begin
16713 This should match the beginning of the body of the article.  It defaults
16714 to @samp{^\n}.
16715
16716 @item body-end-function
16717 If present, this function should move point to the end of the body of
16718 the article.
16719
16720 @item body-end
16721 If present, this should match the end of the body of the article.
16722
16723 @item file-end
16724 If present, this should match the end of the file.  All text after this
16725 regexp will be totally ignored.
16726
16727 @end table
16728
16729 So, using these variables @code{nndoc} is able to dissect a document
16730 file into a series of articles, each with a head and a body.  However, a
16731 few more variables are needed since not all document types are all that
16732 news-like---variables needed to transform the head or the body into
16733 something that's palatable for Gnus:
16734
16735 @table @code
16736 @item prepare-body-function
16737 If present, this function will be called when requesting an article.  It
16738 will be called with point at the start of the body, and is useful if the
16739 document has encoded some parts of its contents.
16740
16741 @item article-transform-function
16742 If present, this function is called when requesting an article.  It's
16743 meant to be used for more wide-ranging transformation of both head and
16744 body of the article.
16745
16746 @item generate-head-function
16747 If present, this function is called to generate a head that Gnus can
16748 understand.  It is called with the article number as a parameter, and is
16749 expected to generate a nice head for the article in question.  It is
16750 called when requesting the headers of all articles.
16751
16752 @end table
16753
16754 Let's look at the most complicated example I can come up with---standard
16755 digests:
16756
16757 @example
16758 (standard-digest
16759  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16760  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16761  (prepare-body-function . nndoc-unquote-dashes)
16762  (body-end-function . nndoc-digest-body-end)
16763  (head-end . "^ ?$")
16764  (body-begin . "^ ?\n")
16765  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16766  (subtype digest guess))
16767 @end example
16768
16769 We see that all text before a 70-width line of dashes is ignored; all
16770 text after a line that starts with that @samp{^End of} is also ignored;
16771 each article begins with a 30-width line of dashes; the line separating
16772 the head from the body may contain a single space; and that the body is
16773 run through @code{nndoc-unquote-dashes} before being delivered.
16774
16775 To hook your own document definition into @code{nndoc}, use the
16776 @code{nndoc-add-type} function.  It takes two parameters---the first
16777 is the definition itself and the second (optional) parameter says
16778 where in the document type definition alist to put this definition.
16779 The alist is traversed sequentially, and
16780 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
16781 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
16782 @code{mmdf} type, and so on.  These type predicates should return
16783 @code{nil} if the document is not of the correct type; @code{t} if it
16784 is of the correct type; and a number if the document might be of the
16785 correct type.  A high number means high probability; a low number
16786 means low probability with @samp{0} being the lowest valid number.
16787
16788
16789 @node SOUP
16790 @subsection SOUP
16791 @cindex SOUP
16792 @cindex offline
16793
16794 In the PC world people often talk about ``offline'' newsreaders.  These
16795 are thingies that are combined reader/news transport monstrosities.
16796 With built-in modem programs.  Yecchh!
16797
16798 Of course, us Unix Weenie types of human beans use things like
16799 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16800 transport things like Ghod intended.  And then we just use normal
16801 newsreaders.
16802
16803 However, it can sometimes be convenient to do something that's a bit
16804 easier on the brain if you have a very slow modem, and you're not really
16805 that interested in doing things properly.
16806
16807 A file format called @sc{soup} has been developed for transporting news
16808 and mail from servers to home machines and back again.  It can be a bit
16809 fiddly.
16810
16811 First some terminology:
16812
16813 @table @dfn
16814
16815 @item server
16816 This is the machine that is connected to the outside world and where you
16817 get news and/or mail from.
16818
16819 @item home machine
16820 This is the machine that you want to do the actual reading and responding
16821 on.  It is typically not connected to the rest of the world in any way.
16822
16823 @item packet
16824 Something that contains messages and/or commands.  There are two kinds
16825 of packets:
16826
16827 @table @dfn
16828 @item message packets
16829 These are packets made at the server, and typically contain lots of
16830 messages for you to read.  These are called @file{SoupoutX.tgz} by
16831 default, where @var{x} is a number.
16832
16833 @item response packets
16834 These are packets made at the home machine, and typically contains
16835 replies that you've written.  These are called @file{SoupinX.tgz} by
16836 default, where @var{x} is a number.
16837
16838 @end table
16839
16840 @end table
16841
16842
16843 @enumerate
16844
16845 @item
16846 You log in on the server and create a @sc{soup} packet.  You can either
16847 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16848 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16849 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16850
16851 @item
16852 You transfer the packet home.  Rail, boat, car or modem will do fine.
16853
16854 @item
16855 You put the packet in your home directory.
16856
16857 @item
16858 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16859 the native or secondary server.
16860
16861 @item
16862 You read articles and mail and answer and followup to the things you
16863 want (@pxref{SOUP Replies}).
16864
16865 @item
16866 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16867 packet.
16868
16869 @item
16870 You transfer this packet to the server.
16871
16872 @item
16873 You use Gnus to mail this packet out with the @kbd{G s s} command.
16874
16875 @item
16876 You then repeat until you die.
16877
16878 @end enumerate
16879
16880 So you basically have a bipartite system---you use @code{nnsoup} for
16881 reading and Gnus for packing/sending these @sc{soup} packets.
16882
16883 @menu
16884 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16885 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16886 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16887 @end menu
16888
16889
16890 @node SOUP Commands
16891 @subsubsection SOUP Commands
16892
16893 These are commands for creating and manipulating @sc{soup} packets.
16894
16895 @table @kbd
16896 @item G s b
16897 @kindex G s b (Group)
16898 @findex gnus-group-brew-soup
16899 Pack all unread articles in the current group
16900 (@code{gnus-group-brew-soup}).  This command understands the
16901 process/prefix convention.
16902
16903 @item G s w
16904 @kindex G s w (Group)
16905 @findex gnus-soup-save-areas
16906 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16907
16908 @item G s s
16909 @kindex G s s (Group)
16910 @findex gnus-soup-send-replies
16911 Send all replies from the replies packet
16912 (@code{gnus-soup-send-replies}).
16913
16914 @item G s p
16915 @kindex G s p (Group)
16916 @findex gnus-soup-pack-packet
16917 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16918
16919 @item G s r
16920 @kindex G s r (Group)
16921 @findex nnsoup-pack-replies
16922 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16923
16924 @item O s
16925 @kindex O s (Summary)
16926 @findex gnus-soup-add-article
16927 This summary-mode command adds the current article to a @sc{soup} packet
16928 (@code{gnus-soup-add-article}).  It understands the process/prefix
16929 convention (@pxref{Process/Prefix}).
16930
16931 @end table
16932
16933
16934 There are a few variables to customize where Gnus will put all these
16935 thingies:
16936
16937 @table @code
16938
16939 @item gnus-soup-directory
16940 @vindex gnus-soup-directory
16941 Directory where Gnus will save intermediate files while composing
16942 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16943
16944 @item gnus-soup-replies-directory
16945 @vindex gnus-soup-replies-directory
16946 This is what Gnus will use as a temporary directory while sending our
16947 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16948
16949 @item gnus-soup-prefix-file
16950 @vindex gnus-soup-prefix-file
16951 Name of the file where Gnus stores the last used prefix.  The default is
16952 @samp{gnus-prefix}.
16953
16954 @item gnus-soup-packer
16955 @vindex gnus-soup-packer
16956 A format string command for packing a @sc{soup} packet.  The default is
16957 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16958
16959 @item gnus-soup-unpacker
16960 @vindex gnus-soup-unpacker
16961 Format string command for unpacking a @sc{soup} packet.  The default is
16962 @samp{gunzip -c %s | tar xvf -}.
16963
16964 @item gnus-soup-packet-directory
16965 @vindex gnus-soup-packet-directory
16966 Where Gnus will look for reply packets.  The default is @file{~/}.
16967
16968 @item gnus-soup-packet-regexp
16969 @vindex gnus-soup-packet-regexp
16970 Regular expression matching @sc{soup} reply packets in
16971 @code{gnus-soup-packet-directory}.
16972
16973 @end table
16974
16975
16976 @node SOUP Groups
16977 @subsubsection SOUP Groups
16978 @cindex nnsoup
16979
16980 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
16981 read incoming packets, unpack them, and put them in a directory where
16982 you can read them at leisure.
16983
16984 These are the variables you can use to customize its behavior:
16985
16986 @table @code
16987
16988 @item nnsoup-tmp-directory
16989 @vindex nnsoup-tmp-directory
16990 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
16991 directory.  (@file{/tmp/} by default.)
16992
16993 @item nnsoup-directory
16994 @vindex nnsoup-directory
16995 @code{nnsoup} then moves each message and index file to this directory.
16996 The default is @file{~/SOUP/}.
16997
16998 @item nnsoup-replies-directory
16999 @vindex nnsoup-replies-directory
17000 All replies will be stored in this directory before being packed into a
17001 reply packet.  The default is @file{~/SOUP/replies/}.
17002
17003 @item nnsoup-replies-format-type
17004 @vindex nnsoup-replies-format-type
17005 The @sc{soup} format of the replies packets.  The default is @samp{?n}
17006 (rnews), and I don't think you should touch that variable.  I probably
17007 shouldn't even have documented it.  Drats!  Too late!
17008
17009 @item nnsoup-replies-index-type
17010 @vindex nnsoup-replies-index-type
17011 The index type of the replies packet.  The default is @samp{?n}, which
17012 means ``none''.  Don't fiddle with this one either!
17013
17014 @item nnsoup-active-file
17015 @vindex nnsoup-active-file
17016 Where @code{nnsoup} stores lots of information.  This is not an ``active
17017 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
17018 this file or mess it up in any way, you're dead.  The default is
17019 @file{~/SOUP/active}.
17020
17021 @item nnsoup-packer
17022 @vindex nnsoup-packer
17023 Format string command for packing a reply @sc{soup} packet.  The default
17024 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
17025
17026 @item nnsoup-unpacker
17027 @vindex nnsoup-unpacker
17028 Format string command for unpacking incoming @sc{soup} packets.  The
17029 default is @samp{gunzip -c %s | tar xvf -}.
17030
17031 @item nnsoup-packet-directory
17032 @vindex nnsoup-packet-directory
17033 Where @code{nnsoup} will look for incoming packets.  The default is
17034 @file{~/}.
17035
17036 @item nnsoup-packet-regexp
17037 @vindex nnsoup-packet-regexp
17038 Regular expression matching incoming @sc{soup} packets.  The default is
17039 @samp{Soupout}.
17040
17041 @item nnsoup-always-save
17042 @vindex nnsoup-always-save
17043 If non-@code{nil}, save the replies buffer after each posted message.
17044
17045 @end table
17046
17047
17048 @node SOUP Replies
17049 @subsubsection SOUP Replies
17050
17051 Just using @code{nnsoup} won't mean that your postings and mailings end
17052 up in @sc{soup} reply packets automagically.  You have to work a bit
17053 more for that to happen.
17054
17055 @findex nnsoup-set-variables
17056 The @code{nnsoup-set-variables} command will set the appropriate
17057 variables to ensure that all your followups and replies end up in the
17058 @sc{soup} system.
17059
17060 In specific, this is what it does:
17061
17062 @lisp
17063 (setq message-send-news-function 'nnsoup-request-post)
17064 (setq message-send-mail-function 'nnsoup-request-mail)
17065 @end lisp
17066
17067 And that's it, really.  If you only want news to go into the @sc{soup}
17068 system you just use the first line.  If you only want mail to be
17069 @sc{soup}ed you use the second.
17070
17071
17072 @node Mail-To-News Gateways
17073 @subsection Mail-To-News Gateways
17074 @cindex mail-to-news gateways
17075 @cindex gateways
17076
17077 If your local @code{nntp} server doesn't allow posting, for some reason
17078 or other, you can post using one of the numerous mail-to-news gateways.
17079 The @code{nngateway} back end provides the interface.
17080
17081 Note that you can't read anything from this back end---it can only be
17082 used to post with.
17083
17084 Server variables:
17085
17086 @table @code
17087 @item nngateway-address
17088 @vindex nngateway-address
17089 This is the address of the mail-to-news gateway.
17090
17091 @item nngateway-header-transformation
17092 @vindex nngateway-header-transformation
17093 News headers often have to be transformed in some odd way or other
17094 for the mail-to-news gateway to accept it.  This variable says what
17095 transformation should be called, and defaults to
17096 @code{nngateway-simple-header-transformation}.  The function is called
17097 narrowed to the headers to be transformed and with one parameter---the
17098 gateway address.
17099
17100 This default function just inserts a new @code{To} header based on the
17101 @code{Newsgroups} header and the gateway address.
17102 For instance, an article with this @code{Newsgroups} header:
17103
17104 @example
17105 Newsgroups: alt.religion.emacs
17106 @end example
17107
17108 will get this @code{To} header inserted:
17109
17110 @example
17111 To: alt-religion-emacs@@GATEWAY
17112 @end example
17113
17114 The following pre-defined functions exist:
17115
17116 @findex nngateway-simple-header-transformation
17117 @table @code
17118
17119 @item nngateway-simple-header-transformation
17120 Creates a @code{To} header that looks like
17121 @var{newsgroup}@@@code{nngateway-address}.
17122
17123 @findex nngateway-mail2news-header-transformation
17124
17125 @item nngateway-mail2news-header-transformation
17126 Creates a @code{To} header that looks like
17127 @code{nngateway-address}.
17128 @end table
17129
17130 @end table
17131
17132 Here's an example:
17133
17134 @lisp
17135 (setq gnus-post-method
17136       '(nngateway
17137         "mail2news@@replay.com"
17138         (nngateway-header-transformation
17139          nngateway-mail2news-header-transformation)))
17140 @end lisp
17141
17142 So, to use this, simply say something like:
17143
17144 @lisp
17145 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17146 @end lisp
17147
17148
17149
17150 @node Combined Groups
17151 @section Combined Groups
17152
17153 Gnus allows combining a mixture of all the other group types into bigger
17154 groups.
17155
17156 @menu
17157 * Virtual Groups::              Combining articles from many groups.
17158 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
17159 @end menu
17160
17161
17162 @node Virtual Groups
17163 @subsection Virtual Groups
17164 @cindex nnvirtual
17165 @cindex virtual groups
17166 @cindex merging groups
17167
17168 An @dfn{nnvirtual group} is really nothing more than a collection of
17169 other groups.
17170
17171 For instance, if you are tired of reading many small groups, you can
17172 put them all in one big group, and then grow tired of reading one
17173 big, unwieldy group.  The joys of computing!
17174
17175 You specify @code{nnvirtual} as the method.  The address should be a
17176 regexp to match component groups.
17177
17178 All marks in the virtual group will stick to the articles in the
17179 component groups.  So if you tick an article in a virtual group, the
17180 article will also be ticked in the component group from whence it
17181 came.  (And vice versa---marks from the component groups will also be
17182 shown in the virtual group.).  To create an empty virtual group, run
17183 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17184 and edit the method regexp with @kbd{M-e}
17185 (@code{gnus-group-edit-group-method})
17186
17187 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17188 newsgroups into one, big, happy newsgroup:
17189
17190 @lisp
17191 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17192 @end lisp
17193
17194 The component groups can be native or foreign; everything should work
17195 smoothly, but if your computer explodes, it was probably my fault.
17196
17197 Collecting the same group from several servers might actually be a good
17198 idea if users have set the Distribution header to limit distribution.
17199 If you would like to read @samp{soc.motss} both from a server in Japan
17200 and a server in Norway, you could use the following as the group regexp:
17201
17202 @example
17203 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17204 @end example
17205
17206 (Remember, though, that if you're creating the group with @kbd{G m}, you
17207 shouldn't double the backslashes, and you should leave off the quote
17208 characters at the beginning and the end of the string.)
17209
17210 This should work kinda smoothly---all articles from both groups should
17211 end up in this one, and there should be no duplicates.  Threading (and
17212 the rest) will still work as usual, but there might be problems with the
17213 sequence of articles.  Sorting on date might be an option here
17214 (@pxref{Selecting a Group}).
17215
17216 One limitation, however---all groups included in a virtual
17217 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17218 zombie groups can't be component groups for @code{nnvirtual} groups.
17219
17220 @vindex nnvirtual-always-rescan
17221 If the @code{nnvirtual-always-rescan} is non-@code{nil},
17222 @code{nnvirtual} will always scan groups for unread articles when
17223 entering a virtual group.  If this variable is @code{nil} (which is the
17224 default) and you read articles in a component group after the virtual
17225 group has been activated, the read articles from the component group
17226 will show up when you enter the virtual group.  You'll also see this
17227 effect if you have two virtual groups that have a component group in
17228 common.  If that's the case, you should set this variable to @code{t}.
17229 Or you can just tap @code{M-g} on the virtual group every time before
17230 you enter it---it'll have much the same effect.
17231
17232 @code{nnvirtual} can have both mail and news groups as component groups.
17233 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17234 has to ask the back end of the component group the article comes from
17235 whether it is a news or mail back end.  However, when you do a @kbd{^},
17236 there is typically no sure way for the component back end to know this,
17237 and in that case @code{nnvirtual} tells Gnus that the article came from a
17238 not-news back end.  (Just to be on the safe side.)
17239
17240 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17241 line from the article you respond to in these cases.
17242
17243 @code{nnvirtual} groups do not inherit anything but articles and marks
17244 from component groups---group parameters, for instance, are not
17245 inherited.
17246
17247
17248 @node Kibozed Groups
17249 @subsection Kibozed Groups
17250 @cindex nnkiboze
17251 @cindex kibozing
17252
17253 @dfn{Kibozing} is defined by the @acronym{OED} as ``grepping through
17254 (parts of) the news feed''.  @code{nnkiboze} is a back end that will
17255 do this for you.  Oh joy!  Now you can grind any @acronym{NNTP} server
17256 down to a halt with useless requests!  Oh happiness!
17257
17258 @kindex G k (Group)
17259 To create a kibozed group, use the @kbd{G k} command in the group
17260 buffer.
17261
17262 The address field of the @code{nnkiboze} method is, as with
17263 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17264 @code{nnkiboze} group.  That's where most similarities between
17265 @code{nnkiboze} and @code{nnvirtual} end.
17266
17267 In addition to this regexp detailing component groups, an
17268 @code{nnkiboze} group must have a score file to say what articles are
17269 to be included in the group (@pxref{Scoring}).
17270
17271 @kindex M-x nnkiboze-generate-groups
17272 @findex nnkiboze-generate-groups
17273 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17274 @code{nnkiboze} groups you want to have.  This command will take time.
17275 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
17276 headers from all the articles in all the component groups and run them
17277 through the scoring process to determine if there are any articles in
17278 the groups that are to be part of the @code{nnkiboze} groups.
17279
17280 Please limit the number of component groups by using restrictive
17281 regexps.  Otherwise your sysadmin may become annoyed with you, and the
17282 @acronym{NNTP} site may throw you off and never let you back in again.
17283 Stranger things have happened.
17284
17285 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17286 and they can be foreign.  No restrictions.
17287
17288 @vindex nnkiboze-directory
17289 The generation of an @code{nnkiboze} group means writing two files in
17290 @code{nnkiboze-directory}, which is @file{~/News/kiboze/} by default.
17291 One contains the @acronym{NOV} header lines for all the articles in
17292 the group, and the other is an additional @file{.newsrc} file to store
17293 information on what groups have been searched through to find
17294 component articles.
17295
17296 Articles marked as read in the @code{nnkiboze} group will have
17297 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17298
17299
17300 @node Gnus Unplugged
17301 @section Gnus Unplugged
17302 @cindex offline
17303 @cindex unplugged
17304 @cindex agent
17305 @cindex Gnus agent
17306 @cindex Gnus unplugged
17307
17308 In olden times (ca. February '88), people used to run their newsreaders
17309 on big machines with permanent connections to the net.  News transport
17310 was dealt with by news servers, and all the newsreaders had to do was to
17311 read news.  Believe it or not.
17312
17313 Nowadays most people read news and mail at home, and use some sort of
17314 modem to connect to the net.  To avoid running up huge phone bills, it
17315 would be nice to have a way to slurp down all the news and mail, hang up
17316 the phone, read for several hours, and then upload any responses you
17317 have to make.  And then you repeat the procedure.
17318
17319 Of course, you can use news servers for doing this as well.  I've used
17320 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17321 for some years, but doing that's a bore.  Moving the news server
17322 functionality up to the newsreader makes sense if you're the only person
17323 reading news on a machine.
17324
17325 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
17326 fact, you don't even have to configure anything.
17327
17328 Of course, to use it as such, you have to learn a few new commands.
17329
17330 @menu
17331 * Agent Basics::                How it all is supposed to work.
17332 * Agent Categories::            How to tell the Gnus Agent what to download.
17333 * Agent Commands::              New commands for all the buffers.
17334 * Agent Visuals::               Ways that the agent may effect your summary buffer.
17335 * Agent as Cache::              The Agent is a big cache too.
17336 * Agent Expiry::                How to make old articles go away.
17337 * Agent Regeneration::          How to recover from lost connections and other accidents.
17338 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
17339 * Outgoing Messages::           What happens when you post/mail something?
17340 * Agent Variables::             Customizing is fun.
17341 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
17342 * Batching Agents::             How to fetch news from a @code{cron} job.
17343 * Agent Caveats::               What you think it'll do and what it does.
17344 @end menu
17345
17346
17347 @node Agent Basics
17348 @subsection Agent Basics
17349
17350 First, let's get some terminology out of the way.
17351
17352 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17353 connection to the net (and notified the Agent that this is the case).
17354 When the connection to the net is up again (and Gnus knows this), the
17355 Agent is @dfn{plugged}.
17356
17357 The @dfn{local} machine is the one you're running on, and which isn't
17358 connected to the net continuously.
17359
17360 @dfn{Downloading} means fetching things from the net to your local
17361 machine.  @dfn{Uploading} is doing the opposite.
17362
17363 You know that Gnus gives you all the opportunity you'd ever want for
17364 shooting yourself in the foot.  Some people call it flexibility.  Gnus
17365 is also customizable to a great extent, which means that the user has a
17366 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
17367 you in your foot, but with Gnus, you have a choice!
17368
17369 Gnus is never really in plugged or unplugged state.  Rather, it applies
17370 that state to each server individually.  This means that some servers
17371 can be plugged while others can be unplugged.  Additionally, some
17372 servers can be ignored by the Agent altogether (which means that
17373 they're kinda like plugged always).
17374
17375 So when you unplug the Agent and then wonder why is Gnus opening a
17376 connection to the Net, the next step to do is to look whether all
17377 servers are agentized.  If there is an unagentized server, you found
17378 the culprit.
17379
17380 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
17381 reachable.  When Gnus notices this, it asks you whether you want the
17382 server to be switched to offline state.  If you say yes, then the
17383 server will behave somewhat as if it was unplugged, except that Gnus
17384 will ask you whether you want to switch it back online again.
17385
17386 Let's take a typical Gnus session using the Agent.
17387
17388 @itemize @bullet
17389
17390 @item
17391 @findex gnus-unplugged
17392 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
17393 Agent in a disconnected state.  You can read all the news that you have
17394 already fetched while in this mode.
17395
17396 @item
17397 You then decide to see whether any new news has arrived.  You connect
17398 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17399 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17400 as usual.  To check for new mail in unplugged mode (@pxref{Mail
17401 Source Specifiers}).
17402
17403 @item
17404 You can then read the new news immediately, or you can download the
17405 news onto your local machine.  If you want to do the latter, you press
17406 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
17407 all the eligible articles in all the groups.  (To let Gnus know which
17408 articles you want to download, @pxref{Agent Categories}).
17409
17410 @item
17411 After fetching the articles, you press @kbd{J j} to make Gnus become
17412 unplugged again, and you shut down the PPP thing (or whatever).  And
17413 then you read the news offline.
17414
17415 @item
17416 And then you go to step 2.
17417 @end itemize
17418
17419 Here are some things you should do the first time (or so) that you use
17420 the Agent.
17421
17422 @itemize @bullet
17423
17424 @item
17425 Decide which servers should be covered by the Agent.  If you have a mail
17426 back end, it would probably be nonsensical to have it covered by the
17427 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
17428 @kbd{J a} on the server (or servers) that you wish to have covered by the
17429 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17430 added servers you do not wish to have covered by the Agent.  By default,
17431 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
17432 @code{gnus-secondary-select-methods} are agentized.
17433
17434 @item
17435 Decide on download policy.  It's fairly simple once you decide whether
17436 you are going to use agent categories, topic parameters, and/or group
17437 parameters to implement your policy.  If you're new to gnus, it
17438 is probably best to start with a category, @xref{Agent Categories}.
17439
17440 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17441 (@pxref{Agent Categories}) provide for setting a policy that applies
17442 to multiple groups.  Which you use is entirely up to you.  Topic
17443 parameters do override categories so, if you mix the two, you'll have
17444 to take that into account.  If you have a few groups that deviate from
17445 your policy, you can use group parameters (@pxref{Group Parameters}) to
17446 configure them.
17447
17448 @item
17449 Uhm@dots{} that's it.
17450 @end itemize
17451
17452
17453 @node Agent Categories
17454 @subsection Agent Categories
17455
17456 One of the main reasons to integrate the news transport layer into the
17457 newsreader is to allow greater control over what articles to download.
17458 There's not much point in downloading huge amounts of articles, just to
17459 find out that you're not interested in reading any of them.  It's better
17460 to be somewhat more conservative in choosing what to download, and then
17461 mark the articles for downloading manually if it should turn out that
17462 you're interested in the articles anyway.
17463
17464 One of the more effective methods for controlling what is to be
17465 downloaded is to create a @dfn{category} and then assign some (or all)
17466 groups to this category.  Groups that do not belong in any other
17467 category belong to the @code{default} category.  Gnus has its own
17468 buffer for creating and managing categories.
17469
17470 If you prefer, you can also use group parameters (@pxref{Group
17471 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17472 alternative approach to controlling the agent.  The only real
17473 difference is that categories are specific to the agent (so there is
17474 less to learn) while group and topic parameters include the kitchen
17475 sink.
17476
17477 Since you can set agent parameters in several different places we have
17478 a rule to decide which source to believe.  This rule specifies that
17479 the parameter sources are checked in the following order: group
17480 parameters, topic parameters, agent category, and finally customizable
17481 variables.  So you can mix all of these sources to produce a wide range
17482 of behavior, just don't blame me if you don't remember where you put
17483 your settings.
17484
17485 @menu
17486 * Category Syntax::             What a category looks like.
17487 * Category Buffer::             A buffer for maintaining categories.
17488 * Category Variables::          Customize'r'Us.
17489 @end menu
17490
17491
17492 @node Category Syntax
17493 @subsubsection Category Syntax
17494
17495 A category consists of a name, the list of groups belonging to the
17496 category, and a number of optional parameters that override the
17497 customizable variables.  The complete list of agent parameters are
17498 listed below.
17499
17500 @table @code
17501 @item gnus-agent-cat-name
17502 The name of the category.
17503
17504 @item gnus-agent-cat-groups
17505 The list of groups that are in this category.
17506
17507 @item gnus-agent-cat-predicate
17508 A predicate which (generally) gives a rough outline of which articles
17509 are eligible for downloading; and
17510
17511 @item gnus-agent-cat-score-file
17512 a score rule which (generally) gives you a finer granularity when
17513 deciding what articles to download.  (Note that this @dfn{download
17514 score} is not necessarily related to normal scores.)
17515
17516 @item gnus-agent-cat-enable-expiration
17517 a boolean indicating whether the agent should expire old articles in
17518 this group.  Most groups should be expired to conserve disk space.  In
17519 fact, its probably safe to say that the gnus.* hierarchy contains the
17520 only groups that should not be expired.
17521
17522 @item gnus-agent-cat-days-until-old
17523 an integer indicating the number of days that the agent should wait
17524 before deciding that a read article is safe to expire.
17525
17526 @item gnus-agent-cat-low-score
17527 an integer that overrides the value of @code{gnus-agent-low-score}.
17528
17529 @item gnus-agent-cat-high-score
17530 an integer that overrides the value of @code{gnus-agent-high-score}.
17531
17532 @item gnus-agent-cat-length-when-short
17533 an integer that overrides the value of
17534 @code{gnus-agent-short-article}.
17535
17536 @item gnus-agent-cat-length-when-long
17537 an integer that overrides the value of @code{gnus-agent-long-article}.
17538 @end table
17539
17540 The name of a category can not be changed once the category has been
17541 created.
17542
17543 Each category maintains a list of groups that are exclusive members of
17544 that category.  The exclusivity rule is automatically enforced, add a
17545 group to a new category and it is automatically removed from its old
17546 category.
17547
17548 A predicate in its simplest form can be a single predicate such as
17549 @code{true} or @code{false}.  These two will download every available
17550 article or nothing respectively.  In the case of these two special
17551 predicates an additional score rule is superfluous.
17552
17553 Predicates of @code{high} or @code{low} download articles in respect of
17554 their scores in relationship to @code{gnus-agent-high-score} and
17555 @code{gnus-agent-low-score} as described below.
17556
17557 To gain even finer control of what is to be regarded eligible for
17558 download a predicate can consist of a number of predicates with logical
17559 operators sprinkled in between.
17560
17561 Perhaps some examples are in order.
17562
17563 Here's a simple predicate.  (It's the default predicate, in fact, used
17564 for all groups that don't belong to any other category.)
17565
17566 @lisp
17567 short
17568 @end lisp
17569
17570 Quite simple, eh?  This predicate is true if and only if the article is
17571 short (for some value of ``short'').
17572
17573 Here's a more complex predicate:
17574
17575 @lisp
17576 (or high
17577     (and
17578      (not low)
17579      (not long)))
17580 @end lisp
17581
17582 This means that an article should be downloaded if it has a high score,
17583 or if the score is not low and the article is not long.  You get the
17584 drift.
17585
17586 The available logical operators are @code{or}, @code{and} and
17587 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
17588 @samp{|}, @code{&} and @code{!} instead.)
17589
17590 The following predicates are pre-defined, but if none of these fit what
17591 you want to do, you can write your own.
17592
17593 When evaluating each of these predicates, the named constant will be
17594 bound to the value determined by calling
17595 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
17596 example, gnus-agent-short-article will be bound to
17597 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
17598 means that you can specify a predicate in your category then tune that
17599 predicate to individual groups.
17600
17601 @table @code
17602 @item short
17603 True iff the article is shorter than @code{gnus-agent-short-article}
17604 lines; default 100.
17605
17606 @item long
17607 True iff the article is longer than @code{gnus-agent-long-article}
17608 lines; default 200.
17609
17610 @item low
17611 True iff the article has a download score less than
17612 @code{gnus-agent-low-score}; default 0.
17613
17614 @item high
17615 True iff the article has a download score greater than
17616 @code{gnus-agent-high-score}; default 0.
17617
17618 @item spam
17619 True iff the Gnus Agent guesses that the article is spam.  The
17620 heuristics may change over time, but at present it just computes a
17621 checksum and sees whether articles match.
17622
17623 @item true
17624 Always true.
17625
17626 @item false
17627 Always false.
17628 @end table
17629
17630 If you want to create your own predicate function, here's what you have
17631 to know:  The functions are called with no parameters, but the
17632 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
17633 useful values.
17634
17635 For example, you could decide that you don't want to download articles
17636 that were posted more than a certain number of days ago (e.g. posted
17637 more than @code{gnus-agent-expire-days} ago) you might write a function
17638 something along the lines of the following:
17639
17640 @lisp
17641 (defun my-article-old-p ()
17642   "Say whether an article is old."
17643   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
17644      (- (time-to-days (current-time)) gnus-agent-expire-days)))
17645 @end lisp
17646
17647 with the predicate then defined as:
17648
17649 @lisp
17650 (not my-article-old-p)
17651 @end lisp
17652
17653 or you could append your predicate to the predefined
17654 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
17655 wherever.
17656
17657 @lisp
17658 (require 'gnus-agent)
17659 (setq  gnus-category-predicate-alist
17660   (append gnus-category-predicate-alist
17661          '((old . my-article-old-p))))
17662 @end lisp
17663
17664 and simply specify your predicate as:
17665
17666 @lisp
17667 (not old)
17668 @end lisp
17669
17670 If/when using something like the above, be aware that there are many
17671 misconfigured systems/mailers out there and so an article's date is not
17672 always a reliable indication of when it was posted.  Hell, some people
17673 just don't give a damn.
17674
17675 The above predicates apply to @emph{all} the groups which belong to the
17676 category.  However, if you wish to have a specific predicate for an
17677 individual group within a category, or you're just too lazy to set up a
17678 new category, you can enter a group's individual predicate in its group
17679 parameters like so:
17680
17681 @lisp
17682 (agent-predicate . short)
17683 @end lisp
17684
17685 This is the group/topic parameter equivalent of the agent category default.
17686 Note that when specifying a single word predicate like this, the
17687 @code{agent-predicate} specification must be in dotted pair notation.
17688
17689 The equivalent of the longer example from above would be:
17690
17691 @lisp
17692 (agent-predicate or high (and (not low) (not long)))
17693 @end lisp
17694
17695 The outer parenthesis required in the category specification are not
17696 entered here as, not being in dotted pair notation, the value of the
17697 predicate is assumed to be a list.
17698
17699
17700 Now, the syntax of the download score is the same as the syntax of
17701 normal score files, except that all elements that require actually
17702 seeing the article itself are verboten.  This means that only the
17703 following headers can be scored on: @code{Subject}, @code{From},
17704 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
17705 @code{Lines}, and @code{Xref}.
17706
17707 As with predicates, the specification of the @code{download score rule}
17708 to use in respect of a group can be in either the category definition if
17709 it's to be applicable to all groups in therein, or a group's parameters
17710 if it's to be specific to that group.
17711
17712 In both of these places the @code{download score rule} can take one of
17713 three forms:
17714
17715 @enumerate
17716 @item
17717 Score rule
17718
17719 This has the same syntax as a normal Gnus score file except only a
17720 subset of scoring keywords are available as mentioned above.
17721
17722 example:
17723
17724 @itemize @bullet
17725 @item
17726 Category specification
17727
17728 @lisp
17729 (("from"
17730        ("Lars Ingebrigtsen" 1000000 nil s))
17731 ("lines"
17732        (500 -100 nil <)))
17733 @end lisp
17734
17735 @item
17736 Group/Topic Parameter specification
17737
17738 @lisp
17739 (agent-score ("from"
17740                    ("Lars Ingebrigtsen" 1000000 nil s))
17741              ("lines"
17742                    (500 -100 nil <)))
17743 @end lisp
17744
17745 Again, note the omission of the outermost parenthesis here.
17746 @end itemize
17747
17748 @item
17749 Agent score file
17750
17751 These score files must @emph{only} contain the permitted scoring
17752 keywords stated above.
17753
17754 example:
17755
17756 @itemize @bullet
17757 @item
17758 Category specification
17759
17760 @lisp
17761 ("~/News/agent.SCORE")
17762 @end lisp
17763
17764 or perhaps
17765
17766 @lisp
17767 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
17768 @end lisp
17769
17770 @item
17771 Group Parameter specification
17772
17773 @lisp
17774 (agent-score "~/News/agent.SCORE")
17775 @end lisp
17776
17777 Additional score files can be specified as above.  Need I say anything
17778 about parenthesis?
17779 @end itemize
17780
17781 @item
17782 Use @code{normal} score files
17783
17784 If you don't want to maintain two sets of scoring rules for a group, and
17785 your desired @code{downloading} criteria for a group are the same as your
17786 @code{reading} criteria then you can tell the agent to refer to your
17787 @code{normal} score files when deciding what to download.
17788
17789 These directives in either the category definition or a group's
17790 parameters will cause the agent to read in all the applicable score
17791 files for a group, @emph{filtering out} those sections that do not
17792 relate to one of the permitted subset of scoring keywords.
17793
17794 @itemize @bullet
17795 @item
17796 Category Specification
17797
17798 @lisp
17799 file
17800 @end lisp
17801
17802 @item
17803 Group Parameter specification
17804
17805 @lisp
17806 (agent-score . file)
17807 @end lisp
17808 @end itemize
17809 @end enumerate
17810
17811 @node Category Buffer
17812 @subsubsection Category Buffer
17813
17814 You'd normally do all category maintenance from the category buffer.
17815 When you enter it for the first time (with the @kbd{J c} command from
17816 the group buffer), you'll only see the @code{default} category.
17817
17818 The following commands are available in this buffer:
17819
17820 @table @kbd
17821 @item q
17822 @kindex q (Category)
17823 @findex gnus-category-exit
17824 Return to the group buffer (@code{gnus-category-exit}).
17825
17826 @item e
17827 @kindex e (Category)
17828 @findex gnus-category-customize-category
17829 Use a customization buffer to set all of the selected category's
17830 parameters at one time (@code{gnus-category-customize-category}).
17831
17832 @item k
17833 @kindex k (Category)
17834 @findex gnus-category-kill
17835 Kill the current category (@code{gnus-category-kill}).
17836
17837 @item c
17838 @kindex c (Category)
17839 @findex gnus-category-copy
17840 Copy the current category (@code{gnus-category-copy}).
17841
17842 @item a
17843 @kindex a (Category)
17844 @findex gnus-category-add
17845 Add a new category (@code{gnus-category-add}).
17846
17847 @item p
17848 @kindex p (Category)
17849 @findex gnus-category-edit-predicate
17850 Edit the predicate of the current category
17851 (@code{gnus-category-edit-predicate}).
17852
17853 @item g
17854 @kindex g (Category)
17855 @findex gnus-category-edit-groups
17856 Edit the list of groups belonging to the current category
17857 (@code{gnus-category-edit-groups}).
17858
17859 @item s
17860 @kindex s (Category)
17861 @findex gnus-category-edit-score
17862 Edit the download score rule of the current category
17863 (@code{gnus-category-edit-score}).
17864
17865 @item l
17866 @kindex l (Category)
17867 @findex gnus-category-list
17868 List all the categories (@code{gnus-category-list}).
17869 @end table
17870
17871
17872 @node Category Variables
17873 @subsubsection Category Variables
17874
17875 @table @code
17876 @item gnus-category-mode-hook
17877 @vindex gnus-category-mode-hook
17878 Hook run in category buffers.
17879
17880 @item gnus-category-line-format
17881 @vindex gnus-category-line-format
17882 Format of the lines in the category buffer (@pxref{Formatting
17883 Variables}).  Valid elements are:
17884
17885 @table @samp
17886 @item c
17887 The name of the category.
17888
17889 @item g
17890 The number of groups in the category.
17891 @end table
17892
17893 @item gnus-category-mode-line-format
17894 @vindex gnus-category-mode-line-format
17895 Format of the category mode line (@pxref{Mode Line Formatting}).
17896
17897 @item gnus-agent-short-article
17898 @vindex gnus-agent-short-article
17899 Articles that have fewer lines than this are short.  Default 100.
17900
17901 @item gnus-agent-long-article
17902 @vindex gnus-agent-long-article
17903 Articles that have more lines than this are long.  Default 200.
17904
17905 @item gnus-agent-low-score
17906 @vindex gnus-agent-low-score
17907 Articles that have a score lower than this have a low score.  Default
17908 0.
17909
17910 @item gnus-agent-high-score
17911 @vindex gnus-agent-high-score
17912 Articles that have a score higher than this have a high score.  Default
17913 0.
17914
17915 @item gnus-agent-expire-days
17916 @vindex gnus-agent-expire-days
17917 The number of days that a @samp{read} article must stay in the agent's
17918 local disk before becoming eligible for expiration (While the name is
17919 the same, this doesn't mean expiring the article on the server.  It
17920 just means deleting the local copy of the article).  What is also
17921 important to understand is that the counter starts with the time the
17922 article was written to the local disk and not the time the article was
17923 read.
17924 Default 7.
17925
17926 @item gnus-agent-enable-expiration
17927 @vindex gnus-agent-enable-expiration
17928 Determines whether articles in a group are, by default, expired or
17929 retained indefinitely.  The default is @code{ENABLE} which means that
17930 you'll have to disable expiration when desired.  On the other hand,
17931 you could set this to @code{DISABLE}.  In that case, you would then
17932 have to enable expiration in selected groups.
17933
17934 @end table
17935
17936
17937 @node Agent Commands
17938 @subsection Agent Commands
17939 @findex gnus-agent-toggle-plugged
17940 @kindex J j (Agent)
17941
17942 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
17943 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
17944 toggles the plugged/unplugged state of the Gnus Agent.
17945
17946
17947 @menu
17948 * Group Agent Commands::        Configure groups and fetch their contents.
17949 * Summary Agent Commands::      Manually select then fetch specific articles.
17950 * Server Agent Commands::       Select the servers that are supported by the agent.
17951 @end menu
17952
17953
17954
17955
17956 @node Group Agent Commands
17957 @subsubsection Group Agent Commands
17958
17959 @table @kbd
17960 @item J u
17961 @kindex J u (Agent Group)
17962 @findex gnus-agent-fetch-groups
17963 Fetch all eligible articles in the current group
17964 (@code{gnus-agent-fetch-groups}).
17965
17966 @item J c
17967 @kindex J c (Agent Group)
17968 @findex gnus-enter-category-buffer
17969 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
17970
17971 @item J s
17972 @kindex J s (Agent Group)
17973 @findex gnus-agent-fetch-session
17974 Fetch all eligible articles in all groups
17975 (@code{gnus-agent-fetch-session}).
17976
17977 @item J S
17978 @kindex J S (Agent Group)
17979 @findex gnus-group-send-queue
17980 Send all sendable messages in the queue group
17981 (@code{gnus-group-send-queue}).  @xref{Drafts}.
17982
17983 @item J a
17984 @kindex J a (Agent Group)
17985 @findex gnus-agent-add-group
17986 Add the current group to an Agent category
17987 (@code{gnus-agent-add-group}).  This command understands the
17988 process/prefix convention (@pxref{Process/Prefix}).
17989
17990 @item J r
17991 @kindex J r (Agent Group)
17992 @findex gnus-agent-remove-group
17993 Remove the current group from its category, if any
17994 (@code{gnus-agent-remove-group}).  This command understands the
17995 process/prefix convention (@pxref{Process/Prefix}).
17996
17997 @item J Y
17998 @kindex J Y (Agent Group)
17999 @findex gnus-agent-synchronize-flags
18000 Synchronize flags changed while unplugged with remote server, if any.
18001
18002
18003 @end table
18004
18005
18006 @node Summary Agent Commands
18007 @subsubsection Summary Agent Commands
18008
18009 @table @kbd
18010 @item J #
18011 @kindex J # (Agent Summary)
18012 @findex gnus-agent-mark-article
18013 Mark the article for downloading (@code{gnus-agent-mark-article}).
18014
18015 @item J M-#
18016 @kindex J M-# (Agent Summary)
18017 @findex gnus-agent-unmark-article
18018 Remove the downloading mark from the article
18019 (@code{gnus-agent-unmark-article}).
18020
18021 @cindex %
18022 @item @@
18023 @kindex @@ (Agent Summary)
18024 @findex gnus-agent-toggle-mark
18025 Toggle whether to download the article
18026 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
18027 default.
18028
18029 @item J c
18030 @kindex J c (Agent Summary)
18031 @findex gnus-agent-catchup
18032 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
18033
18034 @item J S
18035 @kindex J S (Agent Summary)
18036 @findex gnus-agent-fetch-group
18037 Download all eligible (@pxref{Agent Categories}) articles in this group.
18038 (@code{gnus-agent-fetch-group}).
18039
18040 @item J s
18041 @kindex J s (Agent Summary)
18042 @findex gnus-agent-fetch-series
18043 Download all processable articles in this group.
18044 (@code{gnus-agent-fetch-series}).
18045
18046 @item J u
18047 @kindex J u (Agent Summary)
18048 @findex gnus-agent-summary-fetch-group
18049 Download all downloadable articles in the current group
18050 (@code{gnus-agent-summary-fetch-group}).
18051
18052 @end table
18053
18054
18055 @node Server Agent Commands
18056 @subsubsection Server Agent Commands
18057
18058 @table @kbd
18059 @item J a
18060 @kindex J a (Agent Server)
18061 @findex gnus-agent-add-server
18062 Add the current server to the list of servers covered by the Gnus Agent
18063 (@code{gnus-agent-add-server}).
18064
18065 @item J r
18066 @kindex J r (Agent Server)
18067 @findex gnus-agent-remove-server
18068 Remove the current server from the list of servers covered by the Gnus
18069 Agent (@code{gnus-agent-remove-server}).
18070
18071 @end table
18072
18073
18074 @node Agent Visuals
18075 @subsection Agent Visuals
18076
18077 If you open a summary while unplugged and, Gnus knows from the group's
18078 active range that there are more articles than the headers currently
18079 stored in the Agent, you may see some articles whose subject looks
18080 something like @samp{[Undownloaded article #####]}.  These are
18081 placeholders for the missing headers.  Aside from setting a mark,
18082 there is not much that can be done with one of these placeholders.
18083 When Gnus finally gets a chance to fetch the group's headers, the
18084 placeholders will automatically be replaced by the actual headers.
18085 You can configure the summary buffer's maneuvering to skip over the
18086 placeholders if you care (See @code{gnus-auto-goto-ignores}).
18087
18088 While it may be obvious to all, the only headers and articles
18089 available while unplugged are those headers and articles that were
18090 fetched into the Agent while previously plugged.  To put it another
18091 way, "If you forget to fetch something while plugged, you might have a
18092 less than satisfying unplugged session".  For this reason, the Agent
18093 adds two visual effects to your summary buffer.  These effects display
18094 the download status of each article so that you always know which
18095 articles will be available when unplugged.
18096
18097 The first visual effect is the @samp{%O} spec.  If you customize
18098 @code{gnus-summary-line-format} to include this specifier, you will add
18099 a single character field that indicates an article's download status.
18100 Articles that have been fetched into either the Agent or the Cache,
18101 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
18102 other articles will display @code{gnus-undownloaded-mark} (defaults to
18103 @samp{-}).  If you open a group that has not been agentized, a space
18104 (@samp{ }) will be displayed.
18105
18106 The second visual effect are the undownloaded faces.  The faces, there
18107 are three indicating the article's score (low, normal, high), seem to
18108 result in a love/hate response from many Gnus users.  The problem is
18109 that the face selection is controlled by a list of condition tests and
18110 face names (See @code{gnus-summary-highlight}).  Each condition is
18111 tested in the order in which it appears in the list so early
18112 conditions have precedence over later conditions.  All of this means
18113 that, if you tick an undownloaded article, the article will continue
18114 to be displayed in the undownloaded face rather than the ticked face.
18115
18116 If you use the Agent as a cache (to avoid downloading the same article
18117 each time you visit it or to minimize your connection time), the
18118 undownloaded face will probably seem like a good idea.  The reason
18119 being that you do all of our work (marking, reading, deleting) with
18120 downloaded articles so the normal faces always appear.
18121
18122 For occasional Agent users, the undownloaded faces may appear to be an
18123 absolutely horrible idea.  The issue being that, since most of their
18124 articles have not been fetched into the Agent, most of the normal
18125 faces will be obscured by the undownloaded faces.  If this is your
18126 situation, you have two choices available.  First, you can completely
18127 disable the undownload faces by customizing
18128 @code{gnus-summary-highlight} to delete the three cons-cells that
18129 refer to the @code{gnus-summary-*-undownloaded-face} faces.  Second, if
18130 you prefer to take a more fine-grained approach, you may set the
18131 @code{agent-disable-undownloaded-faces} group parameter to t.  This
18132 parameter, like all other agent parameters, may be set on an Agent
18133 Category (@pxref{Agent Categories}), a Group Topic (@pxref{Topic
18134 Parameters}), or an individual group (@pxref{Group Parameters}).
18135
18136 @node Agent as Cache
18137 @subsection Agent as Cache
18138
18139 When Gnus is plugged, it is not efficient to download headers or
18140 articles from the server again, if they are already stored in the
18141 Agent.  So, Gnus normally only downloads headers once, and stores them
18142 in the Agent.  These headers are later used when generating the summary
18143 buffer, regardless of whether you are plugged or unplugged.  Articles
18144 are not cached in the Agent by default though (that would potentially
18145 consume lots of disk space), but if you have already downloaded an
18146 article into the Agent, Gnus will not download the article from the
18147 server again but use the locally stored copy instead.
18148
18149 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
18150 @pxref{Agent Variables}) to always download headers and articles while
18151 plugged.  Gnus will almost certainly be slower, but it will be kept
18152 synchronized with the server.  That last point probably won't make any
18153 sense if you are using a nntp or nnimap back end.
18154
18155 @node Agent Expiry
18156 @subsection Agent Expiry
18157
18158 @vindex gnus-agent-expire-days
18159 @findex gnus-agent-expire
18160 @kindex M-x gnus-agent-expire
18161 @kindex M-x gnus-agent-expire-group
18162 @findex gnus-agent-expire-group
18163 @cindex agent expiry
18164 @cindex Gnus agent expiry
18165 @cindex expiry
18166
18167 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
18168 least it doesn't handle it like other back ends.  Instead, there are
18169 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
18170 commands that will expire all read articles that are older than
18171 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
18172 that you're running out of space.  Neither are particularly fast or
18173 efficient, and it's not a particularly good idea to interrupt them (with
18174 @kbd{C-g} or anything else) once you've started one of them.
18175
18176 Note that other functions, e.g. @code{gnus-request-expire-articles},
18177 might run @code{gnus-agent-expire} for you to keep the agent
18178 synchronized with the group.
18179
18180 The agent parameter @code{agent-enable-expiration} may be used to
18181 prevent expiration in selected groups.
18182
18183 @vindex gnus-agent-expire-all
18184 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
18185 expiration commands will expire all articles---unread, read, ticked
18186 and dormant.  If @code{nil} (which is the default), only read articles
18187 are eligible for expiry, and unread, ticked and dormant articles will
18188 be kept indefinitely.
18189
18190 If you find that some articles eligible for expiry are never expired,
18191 perhaps some Gnus Agent files are corrupted.  There's are special
18192 commands, @code{gnus-agent-regenerate} and
18193 @code{gnus-agent-regenerate-group}, to fix possible problems.
18194
18195 @node Agent Regeneration
18196 @subsection Agent Regeneration
18197
18198 @cindex agent regeneration
18199 @cindex Gnus agent regeneration
18200 @cindex regeneration
18201
18202 The local data structures used by @code{nnagent} may become corrupted
18203 due to certain exceptional conditions.  When this happens,
18204 @code{nnagent} functionality may degrade or even fail.  The solution
18205 to this problem is to repair the local data structures by removing all
18206 internal inconsistencies.
18207
18208 For example, if your connection to your server is lost while
18209 downloaded articles into the agent, the local data structures will not
18210 know about articles successfully downloaded prior to the connection
18211 failure.  Running @code{gnus-agent-regenerate} or
18212 @code{gnus-agent-regenerate-group} will update the data structures
18213 such that you don't need to download these articles a second time.
18214
18215 @findex gnus-agent-regenerate
18216 @kindex M-x gnus-agent-regenerate
18217 The command @code{gnus-agent-regenerate} will perform
18218 @code{gnus-agent-regenerate-group} on every agentized group.  While
18219 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18220 recommended that you first close all summary buffers.
18221
18222 @findex gnus-agent-regenerate-group
18223 @kindex M-x gnus-agent-regenerate-group
18224 The command @code{gnus-agent-regenerate-group} uses the local copies
18225 of individual articles to repair the local @acronym{NOV}(header) database.  It
18226 then updates the internal data structures that document which articles
18227 are stored locally.  An optional argument will mark articles in the
18228 agent as unread.
18229
18230 @node Agent and IMAP
18231 @subsection Agent and IMAP
18232
18233 The Agent works with any Gnus back end, including nnimap.  However,
18234 since there are some conceptual differences between @acronym{NNTP} and
18235 @acronym{IMAP}, this section (should) provide you with some information to
18236 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18237
18238 The first thing to keep in mind is that all flags (read, ticked, etc)
18239 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18240 case for nntp.  Thus Gnus need to remember flag changes when
18241 disconnected, and synchronize these flags when you plug back in.
18242
18243 Gnus keeps track of flag changes when reading nnimap groups under the
18244 Agent.  When you plug back in, Gnus will check if you have any changed
18245 any flags and ask if you wish to synchronize these with the server.
18246 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18247
18248 @vindex gnus-agent-synchronize-flags
18249 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18250 never automatically synchronize flags.  If it is @code{ask}, which is
18251 the default, the Agent will check if you made any changes and if so
18252 ask if you wish to synchronize these when you re-connect.  If it has
18253 any other value, all flags will be synchronized automatically.
18254
18255 If you do not wish to synchronize flags automatically when you
18256 re-connect, you can do it manually with the
18257 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18258 in the group buffer.
18259
18260 Some things are currently not implemented in the Agent that you'd might
18261 expect from a disconnected @acronym{IMAP} client, including:
18262
18263 @itemize @bullet
18264
18265 @item
18266 Copying/moving articles into nnimap groups when unplugged.
18267
18268 @item
18269 Creating/deleting nnimap groups when unplugged.
18270
18271 @end itemize
18272
18273 Technical note: the synchronization algorithm does not work by ``pushing''
18274 all local flags to the server, but rather incrementally update the
18275 server view of flags by changing only those flags that were changed by
18276 the user.  Thus, if you set one flag on an article, quit the group and
18277 re-select the group and remove the flag; the flag will be set and
18278 removed from the server when you ``synchronize''.  The queued flag
18279 operations can be found in the per-server @code{flags} file in the Agent
18280 directory.  It's emptied when you synchronize flags.
18281
18282
18283 @node Outgoing Messages
18284 @subsection Outgoing Messages
18285
18286 When Gnus is unplugged, all outgoing messages (both mail and news) are
18287 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
18288 them there after posting, and edit them at will.
18289
18290 When Gnus is plugged again, you can send the messages either from the
18291 draft group with the special commands available there, or you can use
18292 the @kbd{J S} command in the group buffer to send all the sendable
18293 messages in the draft group.
18294
18295
18296
18297 @node Agent Variables
18298 @subsection Agent Variables
18299
18300 @table @code
18301 @item gnus-agent-directory
18302 @vindex gnus-agent-directory
18303 Where the Gnus Agent will store its files.  The default is
18304 @file{~/News/agent/}.
18305
18306 @item gnus-agent-handle-level
18307 @vindex gnus-agent-handle-level
18308 Groups on levels (@pxref{Group Levels}) higher than this variable will
18309 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
18310 which means that only subscribed group will be considered by the Agent
18311 by default.
18312
18313 @item gnus-agent-plugged-hook
18314 @vindex gnus-agent-plugged-hook
18315 Hook run when connecting to the network.
18316
18317 @item gnus-agent-unplugged-hook
18318 @vindex gnus-agent-unplugged-hook
18319 Hook run when disconnecting from the network.
18320
18321 @item gnus-agent-fetched-hook
18322 @vindex gnus-agent-fetched-hook
18323 Hook run when finished fetching articles.
18324
18325 @item gnus-agent-cache
18326 @vindex gnus-agent-cache
18327 Variable to control whether use the locally stored @acronym{NOV} and
18328 articles when plugged, e.g. essentially using the Agent as a cache.
18329 The default is non-@code{nil}, which means to use the Agent as a cache.
18330
18331 @item gnus-agent-go-online
18332 @vindex gnus-agent-go-online
18333 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18334 automatically switch offline servers into online status.  If it is
18335 @code{ask}, the default, the Agent will ask if you wish to switch
18336 offline servers into online status when you re-connect.  If it has any
18337 other value, all offline servers will be automatically switched into
18338 online status.
18339
18340 @item gnus-agent-mark-unread-after-downloaded
18341 @vindex gnus-agent-mark-unread-after-downloaded
18342 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18343 mark articles as unread after downloading.  This is usually a safe
18344 thing to do as the newly downloaded article has obviously not been
18345 read.  The default is t.
18346
18347 @item gnus-agent-consider-all-articles
18348 @vindex gnus-agent-consider-all-articles
18349 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18350 agent will fetch all missing headers.  When @code{nil}, the agent will
18351 fetch only new headers.  The default is @code{nil}.
18352
18353 @item gnus-agent-max-fetch-size
18354 @vindex gnus-agent-max-fetch-size
18355 The agent fetches articles into a temporary buffer prior to parsing
18356 them into individual files.  To avoid exceeding the max. buffer size,
18357 the agent alternates between fetching and parsing until all articles
18358 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
18359 limit to control how often the cycling occurs.  A large value improves
18360 performance.  A small value minimizes the time lost should the
18361 connection be lost while fetching (You may need to run
18362 @code{gnus-agent-regenerate-group} to update the group's state.
18363 However, all articles parsed prior to loosing the connection will be
18364 available while unplugged).  The default is 10M so it is unusual to
18365 see any cycling.
18366
18367 @item gnus-server-unopen-status
18368 @vindex gnus-server-unopen-status
18369 Perhaps not an Agent variable, but closely related to the Agent, this
18370 variable says what will happen if Gnus cannot open a server.  If the
18371 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18372 whether to deny the server or whether to unplug the agent.  If the
18373 Agent is disabled, Gnus always simply deny the server.  Other choices
18374 for this variable include @code{denied} and @code{offline} the latter
18375 is only valid if the Agent is used.
18376
18377 @item gnus-auto-goto-ignores
18378 @vindex gnus-auto-goto-ignores
18379 Another variable that isn't an Agent variable, yet so closely related
18380 that most will look for it here, this variable tells the summary
18381 buffer how to maneuver around undownloaded (only headers stored in the
18382 agent) and unfetched (neither article nor headers stored) articles.
18383
18384 The legal values are @code{nil} (maneuver to any article),
18385 @code{undownloaded} (maneuvering while unplugged ignores articles that
18386 have not been fetched), @code{always-undownloaded} (maneuvering always
18387 ignores articles that have not been fetched), @code{unfetched}
18388 (maneuvering ignores articles whose headers have not been fetched).
18389
18390 @end table
18391
18392
18393 @node Example Setup
18394 @subsection Example Setup
18395
18396 If you don't want to read this manual, and you have a fairly standard
18397 setup, you may be able to use something like the following as your
18398 @file{~/.gnus.el} file to get started.
18399
18400 @lisp
18401 ;;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
18402 ;;; @r{from your ISP's server.}
18403 (setq gnus-select-method '(nntp "news.your-isp.com"))
18404
18405 ;;; @r{Define how Gnus is to read your mail.  We read mail from}
18406 ;;; @r{your ISP's @acronym{POP} server.}
18407 (setq mail-sources '((pop :server "pop.your-isp.com")))
18408
18409 ;;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
18410 (setq gnus-secondary-select-methods '((nnml "")))
18411
18412 ;;; @r{Make Gnus into an offline newsreader.}
18413 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18414 ;;; (setq gnus-agent t) ; @r{Now the default.}
18415 @end lisp
18416
18417 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
18418 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18419 gnus}.
18420
18421 If this is the first time you've run Gnus, you will be subscribed
18422 automatically to a few default newsgroups.  You'll probably want to
18423 subscribe to more groups, and to do that, you have to query the
18424 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18425 command.  This usually takes quite a while, but you only have to do it
18426 once.
18427
18428 After reading and parsing a while, you'll be presented with a list of
18429 groups.  Subscribe to the ones you want to read with the @kbd{u}
18430 command.  @kbd{l} to make all the killed groups disappear after you've
18431 subscribe to all the groups you want to read.  (@kbd{A k} will bring
18432 back all the killed groups.)
18433
18434 You can now read the groups at once, or you can download the articles
18435 with the @kbd{J s} command.  And then read the rest of this manual to
18436 find out which of the other gazillion things you want to customize.
18437
18438
18439 @node Batching Agents
18440 @subsection Batching Agents
18441 @findex gnus-agent-batch
18442
18443 Having the Gnus Agent fetch articles (and post whatever messages you've
18444 written) is quite easy once you've gotten things set up properly.  The
18445 following shell script will do everything that is necessary:
18446
18447 You can run a complete batch command from the command line with the
18448 following incantation:
18449
18450 @example
18451 #!/bin/sh
18452 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18453 @end example
18454
18455
18456 @node Agent Caveats
18457 @subsection Agent Caveats
18458
18459 The Gnus Agent doesn't seem to work like most other offline
18460 newsreaders.  Here are some common questions that some imaginary people
18461 may ask:
18462
18463 @table @dfn
18464 @item If I read an article while plugged, do they get entered into the Agent?
18465
18466 @strong{No}.  If you want this behaviour, add
18467 @code{gnus-agent-fetch-selected-article} to
18468 @code{gnus-select-article-hook}.
18469
18470 @item If I read an article while plugged, and the article already exists in
18471 the Agent, will it get downloaded once more?
18472
18473 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18474
18475 @end table
18476
18477 In short, when Gnus is unplugged, it only looks into the locally stored
18478 articles; when it's plugged, it talks to your ISP and may also use the
18479 locally stored articles.
18480
18481
18482 @node Scoring
18483 @chapter Scoring
18484 @cindex scoring
18485
18486 Other people use @dfn{kill files}, but we here at Gnus Towers like
18487 scoring better than killing, so we'd rather switch than fight.  They do
18488 something completely different as well, so sit up straight and pay
18489 attention!
18490
18491 @vindex gnus-summary-mark-below
18492 All articles have a default score (@code{gnus-summary-default-score}),
18493 which is 0 by default.  This score may be raised or lowered either
18494 interactively or by score files.  Articles that have a score lower than
18495 @code{gnus-summary-mark-below} are marked as read.
18496
18497 Gnus will read any @dfn{score files} that apply to the current group
18498 before generating the summary buffer.
18499
18500 There are several commands in the summary buffer that insert score
18501 entries based on the current article.  You can, for instance, ask Gnus to
18502 lower or increase the score of all articles with a certain subject.
18503
18504 There are two sorts of scoring entries: Permanent and temporary.
18505 Temporary score entries are self-expiring entries.  Any entries that are
18506 temporary and have not been used for, say, a week, will be removed
18507 silently to help keep the sizes of the score files down.
18508
18509 @menu
18510 * Summary Score Commands::      Adding score entries for the current group.
18511 * Group Score Commands::        General score commands.
18512 * Score Variables::             Customize your scoring.  (My, what terminology).
18513 * Score File Format::           What a score file may contain.
18514 * Score File Editing::          You can edit score files by hand as well.
18515 * Adaptive Scoring::            Big Sister Gnus knows what you read.
18516 * Home Score File::             How to say where new score entries are to go.
18517 * Followups To Yourself::       Having Gnus notice when people answer you.
18518 * Scoring On Other Headers::    Scoring on non-standard headers.
18519 * Scoring Tips::                How to score effectively.
18520 * Reverse Scoring::             That problem child of old is not problem.
18521 * Global Score Files::          Earth-spanning, ear-splitting score files.
18522 * Kill Files::                  They are still here, but they can be ignored.
18523 * Converting Kill Files::       Translating kill files to score files.
18524 * GroupLens::                   Getting predictions on what you like to read.
18525 * Advanced Scoring::            Using logical expressions to build score rules.
18526 * Score Decays::                It can be useful to let scores wither away.
18527 @end menu
18528
18529
18530 @node Summary Score Commands
18531 @section Summary Score Commands
18532 @cindex score commands
18533
18534 The score commands that alter score entries do not actually modify real
18535 score files.  That would be too inefficient.  Gnus maintains a cache of
18536 previously loaded score files, one of which is considered the
18537 @dfn{current score file alist}.  The score commands simply insert
18538 entries into this list, and upon group exit, this list is saved.
18539
18540 The current score file is by default the group's local score file, even
18541 if no such score file actually exists.  To insert score commands into
18542 some other score file (e.g. @file{all.SCORE}), you must first make this
18543 score file the current one.
18544
18545 General score commands that don't actually change the score file:
18546
18547 @table @kbd
18548
18549 @item V s
18550 @kindex V s (Summary)
18551 @findex gnus-summary-set-score
18552 Set the score of the current article (@code{gnus-summary-set-score}).
18553
18554 @item V S
18555 @kindex V S (Summary)
18556 @findex gnus-summary-current-score
18557 Display the score of the current article
18558 (@code{gnus-summary-current-score}).
18559
18560 @item V t
18561 @kindex V t (Summary)
18562 @findex gnus-score-find-trace
18563 Display all score rules that have been used on the current article
18564 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
18565 can use @kbd{q} to quit.  @kbd{e} edits the corresponding score file.
18566 When point is on a string within the match element, @kbd{e} will try to
18567 bring you to this string in the score file.
18568
18569 @item V w
18570 @kindex V w (Summary)
18571 @findex gnus-score-find-favourite-words
18572 List words used in scoring (@code{gnus-score-find-favourite-words}).
18573
18574 @item V R
18575 @kindex V R (Summary)
18576 @findex gnus-summary-rescore
18577 Run the current summary through the scoring process
18578 (@code{gnus-summary-rescore}).  This might be useful if you're playing
18579 around with your score files behind Gnus' back and want to see the
18580 effect you're having.
18581
18582 @item V c
18583 @kindex V c (Summary)
18584 @findex gnus-score-change-score-file
18585 Make a different score file the current
18586 (@code{gnus-score-change-score-file}).
18587
18588 @item V e
18589 @kindex V e (Summary)
18590 @findex gnus-score-edit-current-scores
18591 Edit the current score file (@code{gnus-score-edit-current-scores}).
18592 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18593 File Editing}).
18594
18595 @item V f
18596 @kindex V f (Summary)
18597 @findex gnus-score-edit-file
18598 Edit a score file and make this score file the current one
18599 (@code{gnus-score-edit-file}).
18600
18601 @item V F
18602 @kindex V F (Summary)
18603 @findex gnus-score-flush-cache
18604 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
18605 after editing score files.
18606
18607 @item V C
18608 @kindex V C (Summary)
18609 @findex gnus-score-customize
18610 Customize a score file in a visually pleasing manner
18611 (@code{gnus-score-customize}).
18612
18613 @end table
18614
18615 The rest of these commands modify the local score file.
18616
18617 @table @kbd
18618
18619 @item V m
18620 @kindex V m (Summary)
18621 @findex gnus-score-set-mark-below
18622 Prompt for a score, and mark all articles with a score below this as
18623 read (@code{gnus-score-set-mark-below}).
18624
18625 @item V x
18626 @kindex V x (Summary)
18627 @findex gnus-score-set-expunge-below
18628 Prompt for a score, and add a score rule to the current score file to
18629 expunge all articles below this score
18630 (@code{gnus-score-set-expunge-below}).
18631 @end table
18632
18633 The keystrokes for actually making score entries follow a very regular
18634 pattern, so there's no need to list all the commands.  (Hundreds of
18635 them.)
18636
18637 @findex gnus-summary-increase-score
18638 @findex gnus-summary-lower-score
18639
18640 @enumerate
18641 @item
18642 The first key is either @kbd{I} (upper case i) for increasing the score
18643 or @kbd{L} for lowering the score.
18644 @item
18645 The second key says what header you want to score on.  The following
18646 keys are available:
18647 @table @kbd
18648
18649 @item a
18650 Score on the author name.
18651
18652 @item s
18653 Score on the subject line.
18654
18655 @item x
18656 Score on the @code{Xref} line---i.e., the cross-posting line.
18657
18658 @item r
18659 Score on the @code{References} line.
18660
18661 @item d
18662 Score on the date.
18663
18664 @item l
18665 Score on the number of lines.
18666
18667 @item i
18668 Score on the @code{Message-ID} header.
18669
18670 @item e
18671 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
18672 if your @acronym{NNTP} server tracks additional header data in overviews.
18673
18674 @item f
18675 Score on followups---this matches the author name, and adds scores to
18676 the followups to this author.  (Using this key leads to the creation of
18677 @file{ADAPT} files.)
18678
18679 @item b
18680 Score on the body.
18681
18682 @item h
18683 Score on the head.
18684
18685 @item t
18686 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
18687 files.)
18688
18689 @end table
18690
18691 @item
18692 The third key is the match type.  Which match types are valid depends on
18693 what headers you are scoring on.
18694
18695 @table @code
18696
18697 @item strings
18698
18699 @table @kbd
18700
18701 @item e
18702 Exact matching.
18703
18704 @item s
18705 Substring matching.
18706
18707 @item f
18708 Fuzzy matching (@pxref{Fuzzy Matching}).
18709
18710 @item r
18711 Regexp matching
18712 @end table
18713
18714 @item date
18715 @table @kbd
18716
18717 @item b
18718 Before date.
18719
18720 @item a
18721 After date.
18722
18723 @item n
18724 This date.
18725 @end table
18726
18727 @item number
18728 @table @kbd
18729
18730 @item <
18731 Less than number.
18732
18733 @item =
18734 Equal to number.
18735
18736 @item >
18737 Greater than number.
18738 @end table
18739 @end table
18740
18741 @item
18742 The fourth and usually final key says whether this is a temporary (i.e.,
18743 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
18744 or whether it is to be done immediately, without adding to the score
18745 file.
18746 @table @kbd
18747
18748 @item t
18749 Temporary score entry.
18750
18751 @item p
18752 Permanent score entry.
18753
18754 @item i
18755 Immediately scoring.
18756 @end table
18757
18758 @item
18759 If you are scoring on `e' (extra) headers, you will then be prompted for
18760 the header name on which you wish to score.  This must be a header named
18761 in gnus-extra-headers, and @samp{TAB} completion is available.
18762
18763 @end enumerate
18764
18765 So, let's say you want to increase the score on the current author with
18766 exact matching permanently: @kbd{I a e p}.  If you want to lower the
18767 score based on the subject line, using substring matching, and make a
18768 temporary score entry: @kbd{L s s t}.  Pretty easy.
18769
18770 To make things a bit more complicated, there are shortcuts.  If you use
18771 a capital letter on either the second or third keys, Gnus will use
18772 defaults for the remaining one or two keystrokes.  The defaults are
18773 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
18774 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
18775
18776 These functions take both the numerical prefix and the symbolic prefix
18777 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
18778 (or increase) the score of the article.  A symbolic prefix of @code{a}
18779 says to use the @file{all.SCORE} file for the command instead of the
18780 current score file.
18781
18782 @vindex gnus-score-mimic-keymap
18783 The @code{gnus-score-mimic-keymap} says whether these commands will
18784 pretend they are keymaps or not.
18785
18786
18787 @node Group Score Commands
18788 @section Group Score Commands
18789 @cindex group score commands
18790
18791 There aren't many of these as yet, I'm afraid.
18792
18793 @table @kbd
18794
18795 @item W f
18796 @kindex W f (Group)
18797 @findex gnus-score-flush-cache
18798 Gnus maintains a cache of score alists to avoid having to reload them
18799 all the time.  This command will flush the cache
18800 (@code{gnus-score-flush-cache}).
18801
18802 @end table
18803
18804 You can do scoring from the command line by saying something like:
18805
18806 @findex gnus-batch-score
18807 @cindex batch scoring
18808 @example
18809 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
18810 @end example
18811
18812
18813 @node Score Variables
18814 @section Score Variables
18815 @cindex score variables
18816
18817 @table @code
18818
18819 @item gnus-use-scoring
18820 @vindex gnus-use-scoring
18821 If @code{nil}, Gnus will not check for score files, and will not, in
18822 general, do any score-related work.  This is @code{t} by default.
18823
18824 @item gnus-kill-killed
18825 @vindex gnus-kill-killed
18826 If this variable is @code{nil}, Gnus will never apply score files to
18827 articles that have already been through the kill process.  While this
18828 may save you lots of time, it also means that if you apply a kill file
18829 to a group, and then change the kill file and want to run it over you
18830 group again to kill more articles, it won't work.  You have to set this
18831 variable to @code{t} to do that.  (It is @code{t} by default.)
18832
18833 @item gnus-kill-files-directory
18834 @vindex gnus-kill-files-directory
18835 All kill and score files will be stored in this directory, which is
18836 initialized from the @env{SAVEDIR} environment variable by default.
18837 This is @file{~/News/} by default.
18838
18839 @item gnus-score-file-suffix
18840 @vindex gnus-score-file-suffix
18841 Suffix to add to the group name to arrive at the score file name
18842 (@file{SCORE} by default.)
18843
18844 @item gnus-score-uncacheable-files
18845 @vindex gnus-score-uncacheable-files
18846 @cindex score cache
18847 All score files are normally cached to avoid excessive re-loading of
18848 score files.  However, if this might make your Emacs grow big and
18849 bloated, so this regexp can be used to weed out score files unlikely
18850 to be needed again.  It would be a bad idea to deny caching of
18851 @file{all.SCORE}, while it might be a good idea to not cache
18852 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
18853 variable is @samp{ADAPT$} by default, so no adaptive score files will
18854 be cached.
18855
18856 @item gnus-save-score
18857 @vindex gnus-save-score
18858 If you have really complicated score files, and do lots of batch
18859 scoring, then you might set this variable to @code{t}.  This will make
18860 Gnus save the scores into the @file{.newsrc.eld} file.
18861
18862 If you do not set this to @code{t}, then manual scores (like those set
18863 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
18864 across group visits.
18865
18866 @item gnus-score-interactive-default-score
18867 @vindex gnus-score-interactive-default-score
18868 Score used by all the interactive raise/lower commands to raise/lower
18869 score with.  Default is 1000, which may seem excessive, but this is to
18870 ensure that the adaptive scoring scheme gets enough room to play with.
18871 We don't want the small changes from the adaptive scoring to overwrite
18872 manually entered data.
18873
18874 @item gnus-summary-default-score
18875 @vindex gnus-summary-default-score
18876 Default score of an article, which is 0 by default.
18877
18878 @item gnus-summary-expunge-below
18879 @vindex gnus-summary-expunge-below
18880 Don't display the summary lines of articles that have scores lower than
18881 this variable.  This is @code{nil} by default, which means that no
18882 articles will be hidden.  This variable is local to the summary buffers,
18883 and has to be set from @code{gnus-summary-mode-hook}.
18884
18885 @item gnus-score-over-mark
18886 @vindex gnus-score-over-mark
18887 Mark (in the third column) used for articles with a score over the
18888 default.  Default is @samp{+}.
18889
18890 @item gnus-score-below-mark
18891 @vindex gnus-score-below-mark
18892 Mark (in the third column) used for articles with a score below the
18893 default.  Default is @samp{-}.
18894
18895 @item gnus-score-find-score-files-function
18896 @vindex gnus-score-find-score-files-function
18897 Function used to find score files for the current group.  This function
18898 is called with the name of the group as the argument.
18899
18900 Predefined functions available are:
18901 @table @code
18902
18903 @item gnus-score-find-single
18904 @findex gnus-score-find-single
18905 Only apply the group's own score file.
18906
18907 @item gnus-score-find-bnews
18908 @findex gnus-score-find-bnews
18909 Apply all score files that match, using bnews syntax.  This is the
18910 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
18911 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
18912 @file{gnu.all.SCORE} would all apply.  In short, the instances of
18913 @samp{all} in the score file names are translated into @samp{.*}, and
18914 then a regexp match is done.
18915
18916 This means that if you have some score entries that you want to apply to
18917 all groups, then you put those entries in the @file{all.SCORE} file.
18918
18919 The score files are applied in a semi-random order, although Gnus will
18920 try to apply the more general score files before the more specific score
18921 files.  It does this by looking at the number of elements in the score
18922 file names---discarding the @samp{all} elements.
18923
18924 @item gnus-score-find-hierarchical
18925 @findex gnus-score-find-hierarchical
18926 Apply all score files from all the parent groups.  This means that you
18927 can't have score files like @file{all.SCORE}, but you can have
18928 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
18929 server.
18930
18931 @end table
18932 This variable can also be a list of functions.  In that case, all
18933 these functions will be called with the group name as argument, and
18934 all the returned lists of score files will be applied.  These
18935 functions can also return lists of lists of score alists directly.  In
18936 that case, the functions that return these non-file score alists
18937 should probably be placed before the ``real'' score file functions, to
18938 ensure that the last score file returned is the local score file.
18939 Phu.
18940
18941 For example, to do hierarchical scoring but use a non-server-specific
18942 overall score file, you could use the value
18943 @example
18944 (list (lambda (group) ("all.SCORE"))
18945       'gnus-score-find-hierarchical)
18946 @end example
18947
18948 @item gnus-score-expiry-days
18949 @vindex gnus-score-expiry-days
18950 This variable says how many days should pass before an unused score file
18951 entry is expired.  If this variable is @code{nil}, no score file entries
18952 are expired.  It's 7 by default.
18953
18954 @item gnus-update-score-entry-dates
18955 @vindex gnus-update-score-entry-dates
18956 If this variable is non-@code{nil}, temporary score entries that have
18957 been triggered (matched) will have their dates updated.  (This is how Gnus
18958 controls expiry---all non-matched-entries will become too old while
18959 matched entries will stay fresh and young.)  However, if you set this
18960 variable to @code{nil}, even matched entries will grow old and will
18961 have to face that oh-so grim reaper.
18962
18963 @item gnus-score-after-write-file-function
18964 @vindex gnus-score-after-write-file-function
18965 Function called with the name of the score file just written.
18966
18967 @item gnus-score-thread-simplify
18968 @vindex gnus-score-thread-simplify
18969 If this variable is non-@code{nil}, article subjects will be
18970 simplified for subject scoring purposes in the same manner as with
18971 threading---according to the current value of
18972 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
18973 @code{substring} or @code{exact} matching, the match will also be
18974 simplified in this manner.
18975
18976 @end table
18977
18978
18979 @node Score File Format
18980 @section Score File Format
18981 @cindex score file format
18982
18983 A score file is an @code{emacs-lisp} file that normally contains just a
18984 single form.  Casual users are not expected to edit these files;
18985 everything can be changed from the summary buffer.
18986
18987 Anyway, if you'd like to dig into it yourself, here's an example:
18988
18989 @lisp
18990 (("from"
18991   ("Lars Ingebrigtsen" -10000)
18992   ("Per Abrahamsen")
18993   ("larsi\\|lmi" -50000 nil R))
18994  ("subject"
18995   ("Ding is Badd" nil 728373))
18996  ("xref"
18997   ("alt.politics" -1000 728372 s))
18998  ("lines"
18999   (2 -100 nil <))
19000  (mark 0)
19001  (expunge -1000)
19002  (mark-and-expunge -10)
19003  (read-only nil)
19004  (orphan -10)
19005  (adapt t)
19006  (files "/hom/larsi/News/gnu.SCORE")
19007  (exclude-files "all.SCORE")
19008  (local (gnus-newsgroup-auto-expire t)
19009         (gnus-summary-make-false-root empty))
19010  (eval (ding)))
19011 @end lisp
19012
19013 This example demonstrates most score file elements.  @xref{Advanced
19014 Scoring}, for a different approach.
19015
19016 Even though this looks much like Lisp code, nothing here is actually
19017 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
19018 has to be valid syntactically, if not semantically.
19019
19020 Six keys are supported by this alist:
19021
19022 @table @code
19023
19024 @item STRING
19025 If the key is a string, it is the name of the header to perform the
19026 match on.  Scoring can only be performed on these eight headers:
19027 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
19028 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
19029 these headers, there are three strings to tell Gnus to fetch the entire
19030 article and do the match on larger parts of the article: @code{Body}
19031 will perform the match on the body of the article, @code{Head} will
19032 perform the match on the head of the article, and @code{All} will
19033 perform the match on the entire article.  Note that using any of these
19034 last three keys will slow down group entry @emph{considerably}.  The
19035 final ``header'' you can score on is @code{Followup}.  These score
19036 entries will result in new score entries being added for all follow-ups
19037 to articles that matches these score entries.
19038
19039 Following this key is an arbitrary number of score entries, where each
19040 score entry has one to four elements.
19041 @enumerate
19042
19043 @item
19044 The first element is the @dfn{match element}.  On most headers this will
19045 be a string, but on the Lines and Chars headers, this must be an
19046 integer.
19047
19048 @item
19049 If the second element is present, it should be a number---the @dfn{score
19050 element}.  This number should be an integer in the neginf to posinf
19051 interval.  This number is added to the score of the article if the match
19052 is successful.  If this element is not present, the
19053 @code{gnus-score-interactive-default-score} number will be used
19054 instead.  This is 1000 by default.
19055
19056 @item
19057 If the third element is present, it should be a number---the @dfn{date
19058 element}.  This date says when the last time this score entry matched,
19059 which provides a mechanism for expiring the score entries.  It this
19060 element is not present, the score entry is permanent.  The date is
19061 represented by the number of days since December 31, 1 BCE.
19062
19063 @item
19064 If the fourth element is present, it should be a symbol---the @dfn{type
19065 element}.  This element specifies what function should be used to see
19066 whether this score entry matches the article.  What match types that can
19067 be used depends on what header you wish to perform the match on.
19068 @table @dfn
19069
19070 @item From, Subject, References, Xref, Message-ID
19071 For most header types, there are the @code{r} and @code{R} (regexp), as
19072 well as @code{s} and @code{S} (substring) types, and @code{e} and
19073 @code{E} (exact match), and @code{w} (word match) types.  If this
19074 element is not present, Gnus will assume that substring matching should
19075 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
19076 that the matches will be done in a case-sensitive manner.  All these
19077 one-letter types are really just abbreviations for the @code{regexp},
19078 @code{string}, @code{exact}, and @code{word} types, which you can use
19079 instead, if you feel like.
19080
19081 @item Extra
19082 Just as for the standard string overview headers, if you are using
19083 gnus-extra-headers, you can score on these headers' values.  In this
19084 case, there is a 5th element in the score entry, being the name of the
19085 header to be scored.  The following entry is useful in your
19086 @file{all.SCORE} file in case of spam attacks from a single origin
19087 host, if your @acronym{NNTP} server tracks @samp{NNTP-Posting-Host} in
19088 overviews:
19089
19090 @lisp
19091 ("111.222.333.444" -1000 nil s
19092  "NNTP-Posting-Host")
19093 @end lisp
19094
19095 @item Lines, Chars
19096 These two headers use different match types: @code{<}, @code{>},
19097 @code{=}, @code{>=} and @code{<=}.
19098
19099 These predicates are true if
19100
19101 @example
19102 (PREDICATE HEADER MATCH)
19103 @end example
19104
19105 evaluates to non-@code{nil}.  For instance, the advanced match
19106 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
19107 following form:
19108
19109 @lisp
19110 (< header-value 4)
19111 @end lisp
19112
19113 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
19114 the match, we get the score added if the article has less than 4 lines.
19115 (It's easy to get confused and think it's the other way around.  But
19116 it's not.  I think.)
19117
19118 When matching on @code{Lines}, be careful because some back ends (like
19119 @code{nndir}) do not generate @code{Lines} header, so every article ends
19120 up being marked as having 0 lines.  This can lead to strange results if
19121 you happen to lower score of the articles with few lines.
19122
19123 @item Date
19124 For the Date header we have three kinda silly match types:
19125 @code{before}, @code{at} and @code{after}.  I can't really imagine this
19126 ever being useful, but, like, it would feel kinda silly not to provide
19127 this function.  Just in case.  You never know.  Better safe than sorry.
19128 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
19129 sex on a first date.  (I have been told that at least one person, and I
19130 quote, ``found this function indispensable'', however.)
19131
19132 @cindex ISO8601
19133 @cindex date
19134 A more useful match type is @code{regexp}.  With it, you can match the
19135 date string using a regular expression.  The date is normalized to
19136 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
19137 you want to match all articles that have been posted on April 1st in
19138 every year, you could use @samp{....0401.........} as a match string,
19139 for instance.  (Note that the date is kept in its original time zone, so
19140 this will match articles that were posted when it was April 1st where
19141 the article was posted from.  Time zones are such wholesome fun for the
19142 whole family, eh?)
19143
19144 @item Head, Body, All
19145 These three match keys use the same match types as the @code{From} (etc)
19146 header uses.
19147
19148 @item Followup
19149 This match key is somewhat special, in that it will match the
19150 @code{From} header, and affect the score of not only the matching
19151 articles, but also all followups to the matching articles.  This allows
19152 you e.g. increase the score of followups to your own articles, or
19153 decrease the score of followups to the articles of some known
19154 trouble-maker.  Uses the same match types as the @code{From} header
19155 uses.  (Using this match key will lead to creation of @file{ADAPT}
19156 files.)
19157
19158 @item Thread
19159 This match key works along the same lines as the @code{Followup} match
19160 key.  If you say that you want to score on a (sub-)thread started by an
19161 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
19162 match.  This will add a new @samp{thread} match for each article that
19163 has @var{x} in its @code{References} header.  (These new @samp{thread}
19164 matches will use the @code{Message-ID}s of these matching articles.)
19165 This will ensure that you can raise/lower the score of an entire thread,
19166 even though some articles in the thread may not have complete
19167 @code{References} headers.  Note that using this may lead to
19168 undeterministic scores of the articles in the thread.  (Using this match
19169 key will lead to creation of @file{ADAPT} files.)
19170 @end table
19171 @end enumerate
19172
19173 @cindex score file atoms
19174 @item mark
19175 The value of this entry should be a number.  Any articles with a score
19176 lower than this number will be marked as read.
19177
19178 @item expunge
19179 The value of this entry should be a number.  Any articles with a score
19180 lower than this number will be removed from the summary buffer.
19181
19182 @item mark-and-expunge
19183 The value of this entry should be a number.  Any articles with a score
19184 lower than this number will be marked as read and removed from the
19185 summary buffer.
19186
19187 @item thread-mark-and-expunge
19188 The value of this entry should be a number.  All articles that belong to
19189 a thread that has a total score below this number will be marked as read
19190 and removed from the summary buffer.  @code{gnus-thread-score-function}
19191 says how to compute the total score for a thread.
19192
19193 @item files
19194 The value of this entry should be any number of file names.  These files
19195 are assumed to be score files as well, and will be loaded the same way
19196 this one was.
19197
19198 @item exclude-files
19199 The clue of this entry should be any number of files.  These files will
19200 not be loaded, even though they would normally be so, for some reason or
19201 other.
19202
19203 @item eval
19204 The value of this entry will be @code{eval}el.  This element will be
19205 ignored when handling global score files.
19206
19207 @item read-only
19208 Read-only score files will not be updated or saved.  Global score files
19209 should feature this atom (@pxref{Global Score Files}).  (Note:
19210 @dfn{Global} here really means @dfn{global}; not your personal
19211 apply-to-all-groups score files.)
19212
19213 @item orphan
19214 The value of this entry should be a number.  Articles that do not have
19215 parents will get this number added to their scores.  Imagine you follow
19216 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
19217 will only follow a few of the threads, also want to see any new threads.
19218
19219 You can do this with the following two score file entries:
19220
19221 @example
19222         (orphan -500)
19223         (mark-and-expunge -100)
19224 @end example
19225
19226 When you enter the group the first time, you will only see the new
19227 threads.  You then raise the score of the threads that you find
19228 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19229 rest.  Next time you enter the group, you will see new articles in the
19230 interesting threads, plus any new threads.
19231
19232 I.e.---the orphan score atom is for high-volume groups where a few
19233 interesting threads which can't be found automatically by ordinary
19234 scoring rules exist.
19235
19236 @item adapt
19237 This entry controls the adaptive scoring.  If it is @code{t}, the
19238 default adaptive scoring rules will be used.  If it is @code{ignore}, no
19239 adaptive scoring will be performed on this group.  If it is a list, this
19240 list will be used as the adaptive scoring rules.  If it isn't present,
19241 or is something other than @code{t} or @code{ignore}, the default
19242 adaptive scoring rules will be used.  If you want to use adaptive
19243 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19244 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19245 not want adaptive scoring.  If you only want adaptive scoring in a few
19246 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19247 insert @code{(adapt t)} in the score files of the groups where you want
19248 it.
19249
19250 @item adapt-file
19251 All adaptive score entries will go to the file named by this entry.  It
19252 will also be applied when entering the group.  This atom might be handy
19253 if you want to adapt on several groups at once, using the same adaptive
19254 file for a number of groups.
19255
19256 @item local
19257 @cindex local variables
19258 The value of this entry should be a list of @code{(@var{var}
19259 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
19260 current summary buffer, and set to the value specified.  This is a
19261 convenient, if somewhat strange, way of setting variables in some
19262 groups if you don't like hooks much.  Note that the @var{value} won't
19263 be evaluated.
19264 @end table
19265
19266
19267 @node Score File Editing
19268 @section Score File Editing
19269
19270 You normally enter all scoring commands from the summary buffer, but you
19271 might feel the urge to edit them by hand as well, so we've supplied you
19272 with a mode for that.
19273
19274 It's simply a slightly customized @code{emacs-lisp} mode, with these
19275 additional commands:
19276
19277 @table @kbd
19278
19279 @item C-c C-c
19280 @kindex C-c C-c (Score)
19281 @findex gnus-score-edit-done
19282 Save the changes you have made and return to the summary buffer
19283 (@code{gnus-score-edit-done}).
19284
19285 @item C-c C-d
19286 @kindex C-c C-d (Score)
19287 @findex gnus-score-edit-insert-date
19288 Insert the current date in numerical format
19289 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
19290 you were wondering.
19291
19292 @item C-c C-p
19293 @kindex C-c C-p (Score)
19294 @findex gnus-score-pretty-print
19295 The adaptive score files are saved in an unformatted fashion.  If you
19296 intend to read one of these files, you want to @dfn{pretty print} it
19297 first.  This command (@code{gnus-score-pretty-print}) does that for
19298 you.
19299
19300 @end table
19301
19302 Type @kbd{M-x gnus-score-mode} to use this mode.
19303
19304 @vindex gnus-score-mode-hook
19305 @code{gnus-score-menu-hook} is run in score mode buffers.
19306
19307 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
19308 e} to begin editing score files.
19309
19310
19311 @node Adaptive Scoring
19312 @section Adaptive Scoring
19313 @cindex adaptive scoring
19314
19315 If all this scoring is getting you down, Gnus has a way of making it all
19316 happen automatically---as if by magic.  Or rather, as if by artificial
19317 stupidity, to be precise.
19318
19319 @vindex gnus-use-adaptive-scoring
19320 When you read an article, or mark an article as read, or kill an
19321 article, you leave marks behind.  On exit from the group, Gnus can sniff
19322 these marks and add score elements depending on what marks it finds.
19323 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19324 @code{t} or @code{(line)}.  If you want score adaptively on separate
19325 words appearing in the subjects, you should set this variable to
19326 @code{(word)}.  If you want to use both adaptive methods, set this
19327 variable to @code{(word line)}.
19328
19329 @vindex gnus-default-adaptive-score-alist
19330 To give you complete control over the scoring process, you can customize
19331 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
19332 might look something like this:
19333
19334 @lisp
19335 (setq gnus-default-adaptive-score-alist
19336   '((gnus-unread-mark)
19337     (gnus-ticked-mark (from 4))
19338     (gnus-dormant-mark (from 5))
19339     (gnus-del-mark (from -4) (subject -1))
19340     (gnus-read-mark (from 4) (subject 2))
19341     (gnus-expirable-mark (from -1) (subject -1))
19342     (gnus-killed-mark (from -1) (subject -3))
19343     (gnus-kill-file-mark)
19344     (gnus-ancient-mark)
19345     (gnus-low-score-mark)
19346     (gnus-catchup-mark (from -1) (subject -1))))
19347 @end lisp
19348
19349 As you see, each element in this alist has a mark as a key (either a
19350 variable name or a ``real'' mark---a character).  Following this key is
19351 a arbitrary number of header/score pairs.  If there are no header/score
19352 pairs following the key, no adaptive scoring will be done on articles
19353 that have that key as the article mark.  For instance, articles with
19354 @code{gnus-unread-mark} in the example above will not get adaptive score
19355 entries.
19356
19357 Each article can have only one mark, so just a single of these rules
19358 will be applied to each article.
19359
19360 To take @code{gnus-del-mark} as an example---this alist says that all
19361 articles that have that mark (i.e., are marked with @samp{e}) will have a
19362 score entry added to lower based on the @code{From} header by -4, and
19363 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
19364
19365 If you have marked 10 articles with the same subject with
19366 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19367 That means that that subject will get a score of ten times -1, which
19368 should be, unless I'm much mistaken, -10.
19369
19370 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19371 the read articles will be marked with the @samp{E} mark.  This'll
19372 probably make adaptive scoring slightly impossible, so auto-expiring and
19373 adaptive scoring doesn't really mix very well.
19374
19375 The headers you can score on are @code{from}, @code{subject},
19376 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19377 @code{chars} and @code{date}.  In addition, you can score on
19378 @code{followup}, which will create an adaptive score entry that matches
19379 on the @code{References} header using the @code{Message-ID} of the
19380 current article, thereby matching the following thread.
19381
19382 If you use this scheme, you should set the score file atom @code{mark}
19383 to something small---like -300, perhaps, to avoid having small random
19384 changes result in articles getting marked as read.
19385
19386 After using adaptive scoring for a week or so, Gnus should start to
19387 become properly trained and enhance the authors you like best, and kill
19388 the authors you like least, without you having to say so explicitly.
19389
19390 You can control what groups the adaptive scoring is to be performed on
19391 by using the score files (@pxref{Score File Format}).  This will also
19392 let you use different rules in different groups.
19393
19394 @vindex gnus-adaptive-file-suffix
19395 The adaptive score entries will be put into a file where the name is the
19396 group name with @code{gnus-adaptive-file-suffix} appended.  The default
19397 is @file{ADAPT}.
19398
19399 @vindex gnus-score-exact-adapt-limit
19400 When doing adaptive scoring, substring or fuzzy matching would probably
19401 give you the best results in most cases.  However, if the header one
19402 matches is short, the possibility for false positives is great, so if
19403 the length of the match is less than
19404 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
19405 this variable is @code{nil}, exact matching will always be used to avoid
19406 this problem.
19407
19408 @vindex gnus-default-adaptive-word-score-alist
19409 As mentioned above, you can adapt either on individual words or entire
19410 headers.  If you adapt on words, the
19411 @code{gnus-default-adaptive-word-score-alist} variable says what score
19412 each instance of a word should add given a mark.
19413
19414 @lisp
19415 (setq gnus-default-adaptive-word-score-alist
19416       `((,gnus-read-mark . 30)
19417         (,gnus-catchup-mark . -10)
19418         (,gnus-killed-mark . -20)
19419         (,gnus-del-mark . -15)))
19420 @end lisp
19421
19422 This is the default value.  If you have adaption on words enabled, every
19423 word that appears in subjects of articles marked with
19424 @code{gnus-read-mark} will result in a score rule that increase the
19425 score with 30 points.
19426
19427 @vindex gnus-default-ignored-adaptive-words
19428 @vindex gnus-ignored-adaptive-words
19429 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19430 will be ignored.  If you wish to add more words to be ignored, use the
19431 @code{gnus-ignored-adaptive-words} list instead.
19432
19433 @vindex gnus-adaptive-word-length-limit
19434 Some may feel that short words shouldn't count when doing adaptive
19435 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
19436 an integer.  Words shorter than this number will be ignored.  This
19437 variable defaults to @code{nil}.
19438
19439 @vindex gnus-adaptive-word-syntax-table
19440 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19441 syntax table in effect.  It is similar to the standard syntax table, but
19442 it considers numbers to be non-word-constituent characters.
19443
19444 @vindex gnus-adaptive-word-minimum
19445 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19446 word scoring process will never bring down the score of an article to
19447 below this number.  The default is @code{nil}.
19448
19449 @vindex gnus-adaptive-word-no-group-words
19450 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19451 won't adaptively word score any of the words in the group name.  Useful
19452 for groups like @samp{comp.editors.emacs}, where most of the subject
19453 lines contain the word @samp{emacs}.
19454
19455 After using this scheme for a while, it might be nice to write a
19456 @code{gnus-psychoanalyze-user} command to go through the rules and see
19457 what words you like and what words you don't like.  Or perhaps not.
19458
19459 Note that the adaptive word scoring thing is highly experimental and is
19460 likely to change in the future.  Initial impressions seem to indicate
19461 that it's totally useless as it stands.  Some more work (involving more
19462 rigorous statistical methods) will have to be done to make this useful.
19463
19464
19465 @node Home Score File
19466 @section Home Score File
19467
19468 The score file where new score file entries will go is called the
19469 @dfn{home score file}.  This is normally (and by default) the score file
19470 for the group itself.  For instance, the home score file for
19471 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19472
19473 However, this may not be what you want.  It is often convenient to share
19474 a common home score file among many groups---all @samp{emacs} groups
19475 could perhaps use the same home score file.
19476
19477 @vindex gnus-home-score-file
19478 The variable that controls this is @code{gnus-home-score-file}.  It can
19479 be:
19480
19481 @enumerate
19482 @item
19483 A string.  Then this file will be used as the home score file for all
19484 groups.
19485
19486 @item
19487 A function.  The result of this function will be used as the home score
19488 file.  The function will be called with the name of the group as the
19489 parameter.
19490
19491 @item
19492 A list.  The elements in this list can be:
19493
19494 @enumerate
19495 @item
19496 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
19497 group name, the @var{file-name} will be used as the home score file.
19498
19499 @item
19500 A function.  If the function returns non-@code{nil}, the result will
19501 be used as the home score file.
19502
19503 @item
19504 A string.  Use the string as the home score file.
19505 @end enumerate
19506
19507 The list will be traversed from the beginning towards the end looking
19508 for matches.
19509
19510 @end enumerate
19511
19512 So, if you want to use just a single score file, you could say:
19513
19514 @lisp
19515 (setq gnus-home-score-file
19516       "my-total-score-file.SCORE")
19517 @end lisp
19518
19519 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19520 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19521
19522 @findex gnus-hierarchial-home-score-file
19523 @lisp
19524 (setq gnus-home-score-file
19525       'gnus-hierarchial-home-score-file)
19526 @end lisp
19527
19528 This is a ready-made function provided for your convenience.
19529 Other functions include
19530
19531 @table @code
19532 @item gnus-current-home-score-file
19533 @findex gnus-current-home-score-file
19534 Return the ``current'' regular score file.  This will make scoring
19535 commands add entry to the ``innermost'' matching score file.
19536
19537 @end table
19538
19539 If you want to have one score file for the @samp{emacs} groups and
19540 another for the @samp{comp} groups, while letting all other groups use
19541 their own home score files:
19542
19543 @lisp
19544 (setq gnus-home-score-file
19545       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19546       '(("\\.emacs" "emacs.SCORE")
19547         ;; @r{All the comp groups in one score file}
19548         ("^comp" "comp.SCORE")))
19549 @end lisp
19550
19551 @vindex gnus-home-adapt-file
19552 @code{gnus-home-adapt-file} works exactly the same way as
19553 @code{gnus-home-score-file}, but says what the home adaptive score file
19554 is instead.  All new adaptive file entries will go into the file
19555 specified by this variable, and the same syntax is allowed.
19556
19557 In addition to using @code{gnus-home-score-file} and
19558 @code{gnus-home-adapt-file}, you can also use group parameters
19559 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19560 Parameters}) to achieve much the same.  Group and topic parameters take
19561 precedence over this variable.
19562
19563
19564 @node Followups To Yourself
19565 @section Followups To Yourself
19566
19567 Gnus offers two commands for picking out the @code{Message-ID} header in
19568 the current buffer.  Gnus will then add a score rule that scores using
19569 this @code{Message-ID} on the @code{References} header of other
19570 articles.  This will, in effect, increase the score of all articles that
19571 respond to the article in the current buffer.  Quite useful if you want
19572 to easily note when people answer what you've said.
19573
19574 @table @code
19575
19576 @item gnus-score-followup-article
19577 @findex gnus-score-followup-article
19578 This will add a score to articles that directly follow up your own
19579 article.
19580
19581 @item gnus-score-followup-thread
19582 @findex gnus-score-followup-thread
19583 This will add a score to all articles that appear in a thread ``below''
19584 your own article.
19585 @end table
19586
19587 @vindex message-sent-hook
19588 These two functions are both primarily meant to be used in hooks like
19589 @code{message-sent-hook}, like this:
19590 @lisp
19591 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19592 @end lisp
19593
19594
19595 If you look closely at your own @code{Message-ID}, you'll notice that
19596 the first two or three characters are always the same.  Here's two of
19597 mine:
19598
19599 @example
19600 <x6u3u47icf.fsf@@eyesore.no>
19601 <x6sp9o7ibw.fsf@@eyesore.no>
19602 @end example
19603
19604 So ``my'' ident on this machine is @samp{x6}.  This can be
19605 exploited---the following rule will raise the score on all followups to
19606 myself:
19607
19608 @lisp
19609 ("references"
19610  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
19611   1000 nil r))
19612 @end lisp
19613
19614 Whether it's the first two or first three characters that are ``yours''
19615 is system-dependent.
19616
19617
19618 @node Scoring On Other Headers
19619 @section Scoring On Other Headers
19620 @cindex scoring on other headers
19621
19622 Gnus is quite fast when scoring the ``traditional''
19623 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
19624 other headers requires writing a @code{head} scoring rule, which means
19625 that Gnus has to request every single article from the back end to find
19626 matches.  This takes a long time in big groups.
19627
19628 Now, there's not much you can do about this for news groups, but for
19629 mail groups, you have greater control.  In @ref{To From Newsgroups},
19630 it's explained in greater detail what this mechanism does, but here's
19631 a cookbook example for @code{nnml} on how to allow scoring on the
19632 @samp{To} and @samp{Cc} headers.
19633
19634 Put the following in your @file{~/.gnus.el} file.
19635
19636 @lisp
19637 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
19638       nnmail-extra-headers gnus-extra-headers)
19639 @end lisp
19640
19641 Restart Gnus and rebuild your @code{nnml} overview files with the
19642 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
19643 time if you have much mail.
19644
19645 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
19646 so: @kbd{I e s p To RET <your name> RET}.
19647
19648 See?  Simple.
19649
19650
19651 @node Scoring Tips
19652 @section Scoring Tips
19653 @cindex scoring tips
19654
19655 @table @dfn
19656
19657 @item Crossposts
19658 @cindex crossposts
19659 @cindex scoring crossposts
19660 If you want to lower the score of crossposts, the line to match on is
19661 the @code{Xref} header.
19662 @lisp
19663 ("xref" (" talk.politics.misc:" -1000))
19664 @end lisp
19665
19666 @item Multiple crossposts
19667 If you want to lower the score of articles that have been crossposted to
19668 more than, say, 3 groups:
19669 @lisp
19670 ("xref"
19671   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
19672    -1000 nil r))
19673 @end lisp
19674
19675 @item Matching on the body
19676 This is generally not a very good idea---it takes a very long time.
19677 Gnus actually has to fetch each individual article from the server.  But
19678 you might want to anyway, I guess.  Even though there are three match
19679 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
19680 and stick with it in each score file.  If you use any two, each article
19681 will be fetched @emph{twice}.  If you want to match a bit on the
19682 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
19683 the matches.
19684
19685 @item Marking as read
19686 You will probably want to mark articles that have scores below a certain
19687 number as read.  This is most easily achieved by putting the following
19688 in your @file{all.SCORE} file:
19689 @lisp
19690 ((mark -100))
19691 @end lisp
19692 You may also consider doing something similar with @code{expunge}.
19693
19694 @item Negated character classes
19695 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
19696 That will match newlines, which might lead to, well, The Unknown.  Say
19697 @code{[^abcd\n]*} instead.
19698 @end table
19699
19700
19701 @node Reverse Scoring
19702 @section Reverse Scoring
19703 @cindex reverse scoring
19704
19705 If you want to keep just articles that have @samp{Sex with Emacs} in the
19706 subject header, and expunge all other articles, you could put something
19707 like this in your score file:
19708
19709 @lisp
19710 (("subject"
19711   ("Sex with Emacs" 2))
19712  (mark 1)
19713  (expunge 1))
19714 @end lisp
19715
19716 So, you raise all articles that match @samp{Sex with Emacs} and mark the
19717 rest as read, and expunge them to boot.
19718
19719
19720 @node Global Score Files
19721 @section Global Score Files
19722 @cindex global score files
19723
19724 Sure, other newsreaders have ``global kill files''.  These are usually
19725 nothing more than a single kill file that applies to all groups, stored
19726 in the user's home directory.  Bah!  Puny, weak newsreaders!
19727
19728 What I'm talking about here are Global Score Files.  Score files from
19729 all over the world, from users everywhere, uniting all nations in one
19730 big, happy score file union!  Ange-score!  New and untested!
19731
19732 @vindex gnus-global-score-files
19733 All you have to do to use other people's score files is to set the
19734 @code{gnus-global-score-files} variable.  One entry for each score file,
19735 or each score file directory.  Gnus will decide by itself what score
19736 files are applicable to which group.
19737
19738 To use the score file
19739 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
19740 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
19741 say this:
19742
19743 @lisp
19744 (setq gnus-global-score-files
19745       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
19746         "/ftp@@ftp.some-where:/pub/score/"))
19747 @end lisp
19748
19749 @findex gnus-score-search-global-directories
19750 @noindent
19751 Simple, eh?  Directory names must end with a @samp{/}.  These
19752 directories are typically scanned only once during each Gnus session.
19753 If you feel the need to manually re-scan the remote directories, you can
19754 use the @code{gnus-score-search-global-directories} command.
19755
19756 Note that, at present, using this option will slow down group entry
19757 somewhat.  (That is---a lot.)
19758
19759 If you want to start maintaining score files for other people to use,
19760 just put your score file up for anonymous ftp and announce it to the
19761 world.  Become a retro-moderator!  Participate in the retro-moderator
19762 wars sure to ensue, where retro-moderators battle it out for the
19763 sympathy of the people, luring them to use their score files on false
19764 premises!  Yay!  The net is saved!
19765
19766 Here are some tips for the would-be retro-moderator, off the top of my
19767 head:
19768
19769 @itemize @bullet
19770
19771 @item
19772 Articles heavily crossposted are probably junk.
19773 @item
19774 To lower a single inappropriate article, lower by @code{Message-ID}.
19775 @item
19776 Particularly brilliant authors can be raised on a permanent basis.
19777 @item
19778 Authors that repeatedly post off-charter for the group can safely be
19779 lowered out of existence.
19780 @item
19781 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
19782 articles completely.
19783
19784 @item
19785 Use expiring score entries to keep the size of the file down.  You
19786 should probably have a long expiry period, though, as some sites keep
19787 old articles for a long time.
19788 @end itemize
19789
19790 @dots{} I wonder whether other newsreaders will support global score files
19791 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
19792 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
19793 holding our breath yet?
19794
19795
19796 @node Kill Files
19797 @section Kill Files
19798 @cindex kill files
19799
19800 Gnus still supports those pesky old kill files.  In fact, the kill file
19801 entries can now be expiring, which is something I wrote before Daniel
19802 Quinlan thought of doing score files, so I've left the code in there.
19803
19804 In short, kill processing is a lot slower (and I do mean @emph{a lot})
19805 than score processing, so it might be a good idea to rewrite your kill
19806 files into score files.
19807
19808 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
19809 forms into this file, which means that you can use kill files as some
19810 sort of primitive hook function to be run on group entry, even though
19811 that isn't a very good idea.
19812
19813 Normal kill files look like this:
19814
19815 @lisp
19816 (gnus-kill "From" "Lars Ingebrigtsen")
19817 (gnus-kill "Subject" "ding")
19818 (gnus-expunge "X")
19819 @end lisp
19820
19821 This will mark every article written by me as read, and remove the
19822 marked articles from the summary buffer.  Very useful, you'll agree.
19823
19824 Other programs use a totally different kill file syntax.  If Gnus
19825 encounters what looks like a @code{rn} kill file, it will take a stab at
19826 interpreting it.
19827
19828 Two summary functions for editing a @sc{gnus} kill file:
19829
19830 @table @kbd
19831
19832 @item M-k
19833 @kindex M-k (Summary)
19834 @findex gnus-summary-edit-local-kill
19835 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
19836
19837 @item M-K
19838 @kindex M-K (Summary)
19839 @findex gnus-summary-edit-global-kill
19840 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
19841 @end table
19842
19843 Two group mode functions for editing the kill files:
19844
19845 @table @kbd
19846
19847 @item M-k
19848 @kindex M-k (Group)
19849 @findex gnus-group-edit-local-kill
19850 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
19851
19852 @item M-K
19853 @kindex M-K (Group)
19854 @findex gnus-group-edit-global-kill
19855 Edit the general kill file (@code{gnus-group-edit-global-kill}).
19856 @end table
19857
19858 Kill file variables:
19859
19860 @table @code
19861 @item gnus-kill-file-name
19862 @vindex gnus-kill-file-name
19863 A kill file for the group @samp{soc.motss} is normally called
19864 @file{soc.motss.KILL}.  The suffix appended to the group name to get
19865 this file name is detailed by the @code{gnus-kill-file-name} variable.
19866 The ``global'' kill file (not in the score file sense of ``global'', of
19867 course) is just called @file{KILL}.
19868
19869 @vindex gnus-kill-save-kill-file
19870 @item gnus-kill-save-kill-file
19871 If this variable is non-@code{nil}, Gnus will save the
19872 kill file after processing, which is necessary if you use expiring
19873 kills.
19874
19875 @item gnus-apply-kill-hook
19876 @vindex gnus-apply-kill-hook
19877 @findex gnus-apply-kill-file-unless-scored
19878 @findex gnus-apply-kill-file
19879 A hook called to apply kill files to a group.  It is
19880 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
19881 kill file if you have a score file for the same group, you can set this
19882 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
19883 kill files to be processed, you should set this variable to @code{nil}.
19884
19885 @item gnus-kill-file-mode-hook
19886 @vindex gnus-kill-file-mode-hook
19887 A hook called in kill-file mode buffers.
19888
19889 @end table
19890
19891
19892 @node Converting Kill Files
19893 @section Converting Kill Files
19894 @cindex kill files
19895 @cindex converting kill files
19896
19897 If you have loads of old kill files, you may want to convert them into
19898 score files.  If they are ``regular'', you can use
19899 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
19900 by hand.
19901
19902 The kill to score conversion package isn't included in Gnus by default.
19903 You can fetch it from
19904 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
19905
19906 If your old kill files are very complex---if they contain more
19907 non-@code{gnus-kill} forms than not, you'll have to convert them by
19908 hand.  Or just let them be as they are.  Gnus will still use them as
19909 before.
19910
19911
19912 @node GroupLens
19913 @section GroupLens
19914 @cindex GroupLens
19915
19916 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
19917 so this section is mostly of historical interest.
19918
19919 @uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} is a
19920 collaborative filtering system that helps you work together with other
19921 people to find the quality news articles out of the huge volume of
19922 news articles generated every day.
19923
19924 To accomplish this the GroupLens system combines your opinions about
19925 articles you have already read with the opinions of others who have done
19926 likewise and gives you a personalized prediction for each unread news
19927 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
19928 rate articles, and finds other people that rate articles the same way.
19929 Once it has found some people you agree with it tells you, in the form
19930 of a prediction, what they thought of the article.  You can use this
19931 prediction to help you decide whether or not you want to read the
19932 article.
19933
19934 @menu
19935 * Using GroupLens::             How to make Gnus use GroupLens.
19936 * Rating Articles::             Letting GroupLens know how you rate articles.
19937 * Displaying Predictions::      Displaying predictions given by GroupLens.
19938 * GroupLens Variables::         Customizing GroupLens.
19939 @end menu
19940
19941
19942 @node Using GroupLens
19943 @subsection Using GroupLens
19944
19945 To use GroupLens you must register a pseudonym with your local
19946 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
19947 Bureau (BBB)} is the only better bit in town at the moment.
19948
19949 Once you have registered you'll need to set a couple of variables.
19950
19951 @table @code
19952
19953 @item gnus-use-grouplens
19954 @vindex gnus-use-grouplens
19955 Setting this variable to a non-@code{nil} value will make Gnus hook into
19956 all the relevant GroupLens functions.
19957
19958 @item grouplens-pseudonym
19959 @vindex grouplens-pseudonym
19960 This variable should be set to the pseudonym you got when registering
19961 with the Better Bit Bureau.
19962
19963 @item grouplens-newsgroups
19964 @vindex grouplens-newsgroups
19965 A list of groups that you want to get GroupLens predictions for.
19966
19967 @end table
19968
19969 That's the minimum of what you need to get up and running with GroupLens.
19970 Once you've registered, GroupLens will start giving you scores for
19971 articles based on the average of what other people think.  But, to get
19972 the real benefit of GroupLens you need to start rating articles
19973 yourself.  Then the scores GroupLens gives you will be personalized for
19974 you, based on how the people you usually agree with have already rated.
19975
19976
19977 @node Rating Articles
19978 @subsection Rating Articles
19979
19980 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
19981 Where 1 means something like this article is a waste of bandwidth and 5
19982 means that the article was really good.  The basic question to ask
19983 yourself is, ``on a scale from 1 to 5 would I like to see more articles
19984 like this one?''
19985
19986 There are four ways to enter a rating for an article in GroupLens.
19987
19988 @table @kbd
19989
19990 @item r
19991 @kindex r (GroupLens)
19992 @findex bbb-summary-rate-article
19993 This function will prompt you for a rating on a scale of one to five.
19994
19995 @item k
19996 @kindex k (GroupLens)
19997 @findex grouplens-score-thread
19998 This function will prompt you for a rating, and rate all the articles in
19999 the thread.  This is really useful for some of those long running giant
20000 threads in rec.humor.
20001
20002 @end table
20003
20004 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
20005 the score of the article you're reading.
20006
20007 @table @kbd
20008
20009 @item 1-5 n
20010 @kindex n (GroupLens)
20011 @findex grouplens-next-unread-article
20012 Rate the article and go to the next unread article.
20013
20014 @item 1-5 ,
20015 @kindex , (GroupLens)
20016 @findex grouplens-best-unread-article
20017 Rate the article and go to the next unread article with the highest score.
20018
20019 @end table
20020
20021 If you want to give the current article a score of 4 and then go to the
20022 next article, just type @kbd{4 n}.
20023
20024
20025 @node Displaying Predictions
20026 @subsection Displaying Predictions
20027
20028 GroupLens makes a prediction for you about how much you will like a
20029 news article.  The predictions from GroupLens are on a scale from 1 to
20030 5, where 1 is the worst and 5 is the best.  You can use the predictions
20031 from GroupLens in one of three ways controlled by the variable
20032 @code{gnus-grouplens-override-scoring}.
20033
20034 @vindex gnus-grouplens-override-scoring
20035 There are three ways to display predictions in grouplens.  You may
20036 choose to have the GroupLens scores contribute to, or override the
20037 regular Gnus scoring mechanism.  override is the default; however, some
20038 people prefer to see the Gnus scores plus the grouplens scores.  To get
20039 the separate scoring behavior you need to set
20040 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
20041 GroupLens predictions combined with the grouplens scores set it to
20042 @code{'override} and to combine the scores set
20043 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
20044 the combine option you will also want to set the values for
20045 @code{grouplens-prediction-offset} and
20046 @code{grouplens-score-scale-factor}.
20047
20048 @vindex grouplens-prediction-display
20049 In either case, GroupLens gives you a few choices for how you would like
20050 to see your predictions displayed.  The display of predictions is
20051 controlled by the @code{grouplens-prediction-display} variable.
20052
20053 The following are valid values for that variable.
20054
20055 @table @code
20056 @item prediction-spot
20057 The higher the prediction, the further to the right an @samp{*} is
20058 displayed.
20059
20060 @item confidence-interval
20061 A numeric confidence interval.
20062
20063 @item prediction-bar
20064 The higher the prediction, the longer the bar.
20065
20066 @item confidence-bar
20067 Numerical confidence.
20068
20069 @item confidence-spot
20070 The spot gets bigger with more confidence.
20071
20072 @item prediction-num
20073 Plain-old numeric value.
20074
20075 @item confidence-plus-minus
20076 Prediction +/- confidence.
20077
20078 @end table
20079
20080
20081 @node GroupLens Variables
20082 @subsection GroupLens Variables
20083
20084 @table @code
20085
20086 @item gnus-summary-grouplens-line-format
20087 The summary line format used in GroupLens-enhanced summary buffers.  It
20088 accepts the same specs as the normal summary line format (@pxref{Summary
20089 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
20090 %s\n}.
20091
20092 @item grouplens-bbb-host
20093 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
20094 default.
20095
20096 @item grouplens-bbb-port
20097 Port of the host running the bbbd server.  The default is 9000.
20098
20099 @item grouplens-score-offset
20100 Offset the prediction by this value.  In other words, subtract the
20101 prediction value by this number to arrive at the effective score.  The
20102 default is 0.
20103
20104 @item grouplens-score-scale-factor
20105 This variable allows the user to magnify the effect of GroupLens scores.
20106 The scale factor is applied after the offset.  The default is 1.
20107
20108 @end table
20109
20110
20111 @node Advanced Scoring
20112 @section Advanced Scoring
20113
20114 Scoring on Subjects and From headers is nice enough, but what if you're
20115 really interested in what a person has to say only when she's talking
20116 about a particular subject?  Or what if you really don't want to
20117 read what person A has to say when she's following up to person B, but
20118 want to read what she says when she's following up to person C?
20119
20120 By using advanced scoring rules you may create arbitrarily complex
20121 scoring patterns.
20122
20123 @menu
20124 * Advanced Scoring Syntax::     A definition.
20125 * Advanced Scoring Examples::   What they look like.
20126 * Advanced Scoring Tips::       Getting the most out of it.
20127 @end menu
20128
20129
20130 @node Advanced Scoring Syntax
20131 @subsection Advanced Scoring Syntax
20132
20133 Ordinary scoring rules have a string as the first element in the rule.
20134 Advanced scoring rules have a list as the first element.  The second
20135 element is the score to be applied if the first element evaluated to a
20136 non-@code{nil} value.
20137
20138 These lists may consist of three logical operators, one redirection
20139 operator, and various match operators.
20140
20141 Logical operators:
20142
20143 @table @code
20144 @item &
20145 @itemx and
20146 This logical operator will evaluate each of its arguments until it finds
20147 one that evaluates to @code{false}, and then it'll stop.  If all arguments
20148 evaluate to @code{true} values, then this operator will return
20149 @code{true}.
20150
20151 @item |
20152 @itemx or
20153 This logical operator will evaluate each of its arguments until it finds
20154 one that evaluates to @code{true}.  If no arguments are @code{true},
20155 then this operator will return @code{false}.
20156
20157 @item !
20158 @itemx not
20159 @itemx Â¬
20160 This logical operator only takes a single argument.  It returns the
20161 logical negation of the value of its argument.
20162
20163 @end table
20164
20165 There is an @dfn{indirection operator} that will make its arguments
20166 apply to the ancestors of the current article being scored.  For
20167 instance, @code{1-} will make score rules apply to the parent of the
20168 current article.  @code{2-} will make score rules apply to the
20169 grandparent of the current article.  Alternatively, you can write
20170 @code{^^}, where the number of @code{^}s (carets) says how far back into
20171 the ancestry you want to go.
20172
20173 Finally, we have the match operators.  These are the ones that do the
20174 real work.  Match operators are header name strings followed by a match
20175 and a match type.  A typical match operator looks like @samp{("from"
20176 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
20177 simple scoring, and the match types are also the same.
20178
20179
20180 @node Advanced Scoring Examples
20181 @subsection Advanced Scoring Examples
20182
20183 Please note that the following examples are score file rules.  To
20184 make a complete score file from them, surround them with another pair
20185 of parentheses.
20186
20187 Let's say you want to increase the score of articles written by Lars
20188 when he's talking about Gnus:
20189
20190 @example
20191 @group
20192 ((&
20193   ("from" "Lars Ingebrigtsen")
20194   ("subject" "Gnus"))
20195  1000)
20196 @end group
20197 @end example
20198
20199 Quite simple, huh?
20200
20201 When he writes long articles, he sometimes has something nice to say:
20202
20203 @example
20204 ((&
20205   ("from" "Lars Ingebrigtsen")
20206   (|
20207    ("subject" "Gnus")
20208    ("lines" 100 >)))
20209  1000)
20210 @end example
20211
20212 However, when he responds to things written by Reig Eigil Logge, you
20213 really don't want to read what he's written:
20214
20215 @example
20216 ((&
20217   ("from" "Lars Ingebrigtsen")
20218   (1- ("from" "Reig Eigir Logge")))
20219  -100000)
20220 @end example
20221
20222 Everybody that follows up Redmondo when he writes about disappearing
20223 socks should have their scores raised, but only when they talk about
20224 white socks.  However, when Lars talks about socks, it's usually not
20225 very interesting:
20226
20227 @example
20228 ((&
20229   (1-
20230    (&
20231     ("from" "redmondo@@.*no" r)
20232     ("body" "disappearing.*socks" t)))
20233   (! ("from" "Lars Ingebrigtsen"))
20234   ("body" "white.*socks"))
20235  1000)
20236 @end example
20237
20238 The possibilities are endless.
20239
20240
20241 @node Advanced Scoring Tips
20242 @subsection Advanced Scoring Tips
20243
20244 The @code{&} and @code{|} logical operators do short-circuit logic.
20245 That is, they stop processing their arguments when it's clear what the
20246 result of the operation will be.  For instance, if one of the arguments
20247 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20248 the rest of the arguments.  This means that you should put slow matches
20249 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20250 @samp{subject}) first.
20251
20252 The indirection arguments (@code{1-} and so on) will make their
20253 arguments work on previous generations of the thread.  If you say
20254 something like:
20255
20256 @example
20257 ...
20258 (1-
20259  (1-
20260   ("from" "lars")))
20261 ...
20262 @end example
20263
20264 Then that means "score on the from header of the grandparent of the
20265 current article".  An indirection is quite fast, but it's better to say:
20266
20267 @example
20268 (1-
20269  (&
20270   ("from" "Lars")
20271   ("subject" "Gnus")))
20272 @end example
20273
20274 than it is to say:
20275
20276 @example
20277 (&
20278  (1- ("from" "Lars"))
20279  (1- ("subject" "Gnus")))
20280 @end example
20281
20282
20283 @node Score Decays
20284 @section Score Decays
20285 @cindex score decays
20286 @cindex decays
20287
20288 You may find that your scores have a tendency to grow without
20289 bounds, especially if you're using adaptive scoring.  If scores get too
20290 big, they lose all meaning---they simply max out and it's difficult to
20291 use them in any sensible way.
20292
20293 @vindex gnus-decay-scores
20294 @findex gnus-decay-score
20295 @vindex gnus-decay-score-function
20296 Gnus provides a mechanism for decaying scores to help with this problem.
20297 When score files are loaded and @code{gnus-decay-scores} is
20298 non-@code{nil}, Gnus will run the score files through the decaying
20299 mechanism thereby lowering the scores of all non-permanent score rules.
20300 The decay itself if performed by the @code{gnus-decay-score-function}
20301 function, which is @code{gnus-decay-score} by default.  Here's the
20302 definition of that function:
20303
20304 @lisp
20305 (defun gnus-decay-score (score)
20306   "Decay SCORE.
20307 This is done according to `gnus-score-decay-constant'
20308 and `gnus-score-decay-scale'."
20309   (floor
20310    (- score
20311       (* (if (< score 0) 1 -1)
20312          (min (abs score)
20313               (max gnus-score-decay-constant
20314                    (* (abs score)
20315                       gnus-score-decay-scale)))))))
20316 @end lisp
20317
20318 @vindex gnus-score-decay-scale
20319 @vindex gnus-score-decay-constant
20320 @code{gnus-score-decay-constant} is 3 by default and
20321 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
20322
20323 @enumerate
20324 @item
20325 Scores between -3 and 3 will be set to 0 when this function is called.
20326
20327 @item
20328 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20329
20330 @item
20331 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20332 score.
20333 @end enumerate
20334
20335 If you don't like this decay function, write your own.  It is called
20336 with the score to be decayed as its only parameter, and it should return
20337 the new score, which should be an integer.
20338
20339 Gnus will try to decay scores once a day.  If you haven't run Gnus for
20340 four days, Gnus will decay the scores four times, for instance.
20341
20342 @iftex
20343 @iflatex
20344 @chapter Message
20345 @include message.texi
20346 @chapter Emacs MIME
20347 @include emacs-mime.texi
20348 @chapter Sieve
20349 @include sieve.texi
20350 @chapter PGG
20351 @include pgg.texi
20352 @end iflatex
20353 @end iftex
20354
20355 @node Various
20356 @chapter Various
20357
20358 @menu
20359 * Process/Prefix::              A convention used by many treatment commands.
20360 * Interactive::                 Making Gnus ask you many questions.
20361 * Symbolic Prefixes::           How to supply some Gnus functions with options.
20362 * Formatting Variables::        You can specify what buffers should look like.
20363 * Window Layout::               Configuring the Gnus buffer windows.
20364 * Faces and Fonts::             How to change how faces look.
20365 * Compilation::                 How to speed Gnus up.
20366 * Mode Lines::                  Displaying information in the mode lines.
20367 * Highlighting and Menus::      Making buffers look all nice and cozy.
20368 * Buttons::                     Get tendinitis in ten easy steps!
20369 * Daemons::                     Gnus can do things behind your back.
20370 * NoCeM::                       How to avoid spam and other fatty foods.
20371 * Undo::                        Some actions can be undone.
20372 * Predicate Specifiers::        Specifying predicates.
20373 * Moderation::                  What to do if you're a moderator.
20374 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
20375 * Fuzzy Matching::              What's the big fuzz?
20376 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
20377 * Various Various::             Things that are really various.
20378 @end menu
20379
20380
20381 @node Process/Prefix
20382 @section Process/Prefix
20383 @cindex process/prefix convention
20384
20385 Many functions, among them functions for moving, decoding and saving
20386 articles, use what is known as the @dfn{Process/Prefix convention}.
20387
20388 This is a method for figuring out what articles the user wants the
20389 command to be performed on.
20390
20391 It goes like this:
20392
20393 If the numeric prefix is N, perform the operation on the next N
20394 articles, starting with the current one.  If the numeric prefix is
20395 negative, perform the operation on the previous N articles, starting
20396 with the current one.
20397
20398 @vindex transient-mark-mode
20399 If @code{transient-mark-mode} in non-@code{nil} and the region is
20400 active, all articles in the region will be worked upon.
20401
20402 If there is no numeric prefix, but some articles are marked with the
20403 process mark, perform the operation on the articles marked with
20404 the process mark.
20405
20406 If there is neither a numeric prefix nor any articles marked with the
20407 process mark, just perform the operation on the current article.
20408
20409 Quite simple, really, but it needs to be made clear so that surprises
20410 are avoided.
20411
20412 Commands that react to the process mark will push the current list of
20413 process marked articles onto a stack and will then clear all process
20414 marked articles.  You can restore the previous configuration with the
20415 @kbd{M P y} command (@pxref{Setting Process Marks}).
20416
20417 @vindex gnus-summary-goto-unread
20418 One thing that seems to shock & horrify lots of people is that, for
20419 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20420 Since each @kbd{d} (which marks the current article as read) by default
20421 goes to the next unread article after marking, this means that @kbd{3 d}
20422 will mark the next three unread articles as read, no matter what the
20423 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
20424 @code{nil} for a more straightforward action.
20425
20426 Many commands do not use the process/prefix convention.  All commands
20427 that do explicitly say so in this manual.  To apply the process/prefix
20428 convention to commands that do not use it, you can use the @kbd{M-&}
20429 command.  For instance, to mark all the articles in the group as
20430 expirable, you could say @kbd{M P b M-& E}.
20431
20432
20433 @node Interactive
20434 @section Interactive
20435 @cindex interaction
20436
20437 @table @code
20438
20439 @item gnus-novice-user
20440 @vindex gnus-novice-user
20441 If this variable is non-@code{nil}, you are either a newcomer to the
20442 World of Usenet, or you are very cautious, which is a nice thing to be,
20443 really.  You will be given questions of the type ``Are you sure you want
20444 to do this?'' before doing anything dangerous.  This is @code{t} by
20445 default.
20446
20447 @item gnus-expert-user
20448 @vindex gnus-expert-user
20449 If this variable is non-@code{nil}, you will seldom be asked any
20450 questions by Gnus.  It will simply assume you know what you're doing, no
20451 matter how strange.
20452
20453 @item gnus-interactive-catchup
20454 @vindex gnus-interactive-catchup
20455 Require confirmation before catching up a group if non-@code{nil}.  It
20456 is @code{t} by default.
20457
20458 @item gnus-interactive-exit
20459 @vindex gnus-interactive-exit
20460 Require confirmation before exiting Gnus.  This variable is @code{t} by
20461 default.
20462 @end table
20463
20464
20465 @node Symbolic Prefixes
20466 @section Symbolic Prefixes
20467 @cindex symbolic prefixes
20468
20469 Quite a lot of Emacs commands react to the (numeric) prefix.  For
20470 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20471 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20472 rule of 900 to the current article.
20473
20474 This is all nice and well, but what if you want to give a command some
20475 additional information?  Well, what most commands do is interpret the
20476 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
20477 doesn't want a backup file to be created when saving the current buffer,
20478 for instance.  But what if you want to save without making a backup
20479 file, and you want Emacs to flash lights and play a nice tune at the
20480 same time?  You can't, and you're probably perfectly happy that way.
20481
20482 @kindex M-i (Summary)
20483 @findex gnus-symbolic-argument
20484 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
20485 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20486 character typed in is the value.  You can stack as many @kbd{M-i}
20487 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20488 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
20489 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20490 @code{b}''.  You get the drift.
20491
20492 Typing in symbolic prefixes to commands that don't accept them doesn't
20493 hurt, but it doesn't do any good either.  Currently not many Gnus
20494 functions make use of the symbolic prefix.
20495
20496 If you're interested in how Gnus implements this, @pxref{Extended
20497 Interactive}.
20498
20499
20500 @node Formatting Variables
20501 @section Formatting Variables
20502 @cindex formatting variables
20503
20504 Throughout this manual you've probably noticed lots of variables called
20505 things like @code{gnus-group-line-format} and
20506 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
20507 output lines in the various buffers.  There's quite a lot of them.
20508 Fortunately, they all use the same syntax, so there's not that much to
20509 be annoyed by.
20510
20511 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20512 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
20513 lots of percentages everywhere.
20514
20515 @menu
20516 * Formatting Basics::           A formatting variable is basically a format string.
20517 * Mode Line Formatting::        Some rules about mode line formatting variables.
20518 * Advanced Formatting::         Modifying output in various ways.
20519 * User-Defined Specs::          Having Gnus call your own functions.
20520 * Formatting Fonts::            Making the formatting look colorful and nice.
20521 * Positioning Point::           Moving point to a position after an operation.
20522 * Tabulation::                  Tabulating your output.
20523 * Wide Characters::             Dealing with wide characters.
20524 @end menu
20525
20526 Currently Gnus uses the following formatting variables:
20527 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20528 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20529 @code{gnus-group-mode-line-format},
20530 @code{gnus-summary-mode-line-format},
20531 @code{gnus-article-mode-line-format},
20532 @code{gnus-server-mode-line-format}, and
20533 @code{gnus-summary-pick-line-format}.
20534
20535 All these format variables can also be arbitrary elisp forms.  In that
20536 case, they will be @code{eval}ed to insert the required lines.
20537
20538 @kindex M-x gnus-update-format
20539 @findex gnus-update-format
20540 Gnus includes a command to help you while creating your own format
20541 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
20542 update the spec in question and pop you to a buffer where you can
20543 examine the resulting Lisp code to be run to generate the line.
20544
20545
20546
20547 @node Formatting Basics
20548 @subsection Formatting Basics
20549
20550 Each @samp{%} element will be replaced by some string or other when the
20551 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
20552 spec, and pad with spaces to get a 5-character field''.
20553
20554 As with normal C and Emacs Lisp formatting strings, the numerical
20555 modifier between the @samp{%} and the formatting type character will
20556 @dfn{pad} the output so that it is always at least that long.
20557 @samp{%5y} will make the field always (at least) five characters wide by
20558 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
20559 the right instead.
20560
20561 You may also wish to limit the length of the field to protect against
20562 particularly wide values.  For that you can say @samp{%4,6y}, which
20563 means that the field will never be more than 6 characters wide and never
20564 less than 4 characters wide.
20565
20566 Also Gnus supports some extended format specifications, such as
20567 @samp{%&user-date;}.
20568
20569
20570 @node Mode Line Formatting
20571 @subsection Mode Line Formatting
20572
20573 Mode line formatting variables (e.g.,
20574 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20575 buffer line oriented formatting variables (@pxref{Formatting Basics})
20576 with the following two differences:
20577
20578 @enumerate
20579
20580 @item
20581 There must be no newline (@samp{\n}) at the end.
20582
20583 @item
20584 The special @samp{%%b} spec can be used to display the buffer name.
20585 Well, it's no spec at all, really---@samp{%%} is just a way to quote
20586 @samp{%} to allow it to pass through the formatting machinery unmangled,
20587 so that Emacs receives @samp{%b}, which is something the Emacs mode line
20588 display interprets to mean ``show the buffer name''.  For a full list of
20589 mode line specs Emacs understands, see the documentation of the
20590 @code{mode-line-format} variable.
20591
20592 @end enumerate
20593
20594
20595 @node Advanced Formatting
20596 @subsection Advanced Formatting
20597
20598 It is frequently useful to post-process the fields in some way.
20599 Padding, limiting, cutting off parts and suppressing certain values can
20600 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
20601 look like @samp{%~(cut 3)~(ignore "0")y}.
20602
20603 These are the valid modifiers:
20604
20605 @table @code
20606 @item pad
20607 @itemx pad-left
20608 Pad the field to the left with spaces until it reaches the required
20609 length.
20610
20611 @item pad-right
20612 Pad the field to the right with spaces until it reaches the required
20613 length.
20614
20615 @item max
20616 @itemx max-left
20617 Cut off characters from the left until it reaches the specified length.
20618
20619 @item max-right
20620 Cut off characters from the right until it reaches the specified
20621 length.
20622
20623 @item cut
20624 @itemx cut-left
20625 Cut off the specified number of characters from the left.
20626
20627 @item cut-right
20628 Cut off the specified number of characters from the right.
20629
20630 @item ignore
20631 Return an empty string if the field is equal to the specified value.
20632
20633 @item form
20634 Use the specified form as the field value when the @samp{@@} spec is
20635 used.
20636
20637 Here's an example:
20638
20639 @lisp
20640 "~(form (current-time-string))@@"
20641 @end lisp
20642
20643 @end table
20644
20645 Let's take an example.  The @samp{%o} spec in the summary mode lines
20646 will return a date in compact ISO8601 format---@samp{19960809T230410}.
20647 This is quite a mouthful, so we want to shave off the century number and
20648 the time, leaving us with a six-character date.  That would be
20649 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
20650 maxing, and we need the padding to ensure that the date is never less
20651 than 6 characters to make it look nice in columns.)
20652
20653 Ignoring is done first; then cutting; then maxing; and then as the very
20654 last operation, padding.
20655
20656 If you use lots of these advanced thingies, you'll find that Gnus gets
20657 quite slow.  This can be helped enormously by running @kbd{M-x
20658 gnus-compile} when you are satisfied with the look of your lines.
20659 @xref{Compilation}.
20660
20661
20662 @node User-Defined Specs
20663 @subsection User-Defined Specs
20664
20665 All the specs allow for inserting user defined specifiers---@samp{u}.
20666 The next character in the format string should be a letter.  Gnus
20667 will call the function @code{gnus-user-format-function-}@samp{X}, where
20668 @samp{X} is the letter following @samp{%u}.  The function will be passed
20669 a single parameter---what the parameter means depends on what buffer
20670 it's being called from.  The function should return a string, which will
20671 be inserted into the buffer just like information from any other
20672 specifier.  This function may also be called with dummy values, so it
20673 should protect against that.
20674
20675 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
20676 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
20677
20678 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
20679 much the same without defining new functions.  Here's an example:
20680 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
20681 given here will be evaluated to yield the current line number, and then
20682 inserted.
20683
20684
20685 @node Formatting Fonts
20686 @subsection Formatting Fonts
20687
20688 There are specs for highlighting, and these are shared by all the format
20689 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
20690 the special @code{mouse-face} property set, which means that it will be
20691 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
20692 over it.
20693
20694 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
20695 normal faces set using @code{gnus-face-0}, which is @code{bold} by
20696 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
20697 and so on.  Create as many faces as you wish.  The same goes for the
20698 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
20699 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
20700
20701 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
20702 special @code{balloon-help} property set to
20703 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
20704 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
20705 variables should be either strings or symbols naming functions that
20706 return a string.  When the mouse passes over text with this property
20707 set, a balloon window will appear and display the string.  Please
20708 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
20709 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
20710 XEmacs) for more information on this.  (For technical reasons, the
20711 guillemets have been approximated as @samp{<<} and @samp{>>} in this
20712 paragraph.)
20713
20714 Here's an alternative recipe for the group buffer:
20715
20716 @lisp
20717 ;; @r{Create three face types.}
20718 (setq gnus-face-1 'bold)
20719 (setq gnus-face-3 'italic)
20720
20721 ;; @r{We want the article count to be in}
20722 ;; @r{a bold and green face.  So we create}
20723 ;; @r{a new face called @code{my-green-bold}.}
20724 (copy-face 'bold 'my-green-bold)
20725 ;; @r{Set the color.}
20726 (set-face-foreground 'my-green-bold "ForestGreen")
20727 (setq gnus-face-2 'my-green-bold)
20728
20729 ;; @r{Set the new & fancy format.}
20730 (setq gnus-group-line-format
20731       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
20732 @end lisp
20733
20734 I'm sure you'll be able to use this scheme to create totally unreadable
20735 and extremely vulgar displays.  Have fun!
20736
20737 Note that the @samp{%(} specs (and friends) do not make any sense on the
20738 mode-line variables.
20739
20740 @node Positioning Point
20741 @subsection Positioning Point
20742
20743 Gnus usually moves point to a pre-defined place on each line in most
20744 buffers.  By default, point move to the first colon character on the
20745 line.  You can customize this behaviour in three different ways.
20746
20747 You can move the colon character to somewhere else on the line.
20748
20749 @findex gnus-goto-colon
20750 You can redefine the function that moves the point to the colon.  The
20751 function is called @code{gnus-goto-colon}.
20752
20753 But perhaps the most convenient way to deal with this, if you don't want
20754 to have a colon in your line, is to use the @samp{%*} specifier.  If you
20755 put a @samp{%*} somewhere in your format line definition, Gnus will
20756 place point there.
20757
20758
20759 @node Tabulation
20760 @subsection Tabulation
20761
20762 You can usually line up your displays by padding and cutting your
20763 strings.  However, when combining various strings of different size, it
20764 can often be more convenient to just output the strings, and then worry
20765 about lining up the following text afterwards.
20766
20767 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
20768 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
20769
20770 @samp{%50=} will insert space characters to pad the line up to column
20771 50.  If the text is already past column 50, nothing will be inserted.
20772 This is the soft tabulator.
20773
20774 @samp{%-50=} will insert space characters to pad the line up to column
20775 50.  If the text is already past column 50, the excess text past column
20776 50 will be removed.  This is the hard tabulator.
20777
20778
20779 @node Wide Characters
20780 @subsection Wide Characters
20781
20782 Fixed width fonts in most countries have characters of the same width.
20783 Some countries, however, use Latin characters mixed with wider
20784 characters---most notable East Asian countries.
20785
20786 The problem is that when formatting, Gnus assumes that if a string is 10
20787 characters wide, it'll be 10 Latin characters wide on the screen.  In
20788 these countries, that's not true.
20789
20790 @vindex gnus-use-correct-string-widths
20791 To help fix this, you can set @code{gnus-use-correct-string-widths} to
20792 @code{t}.  This makes buffer generation slower, but the results will be
20793 prettier.  The default value under XEmacs is @code{t} but @code{nil}
20794 for Emacs.
20795
20796
20797 @node Window Layout
20798 @section Window Layout
20799 @cindex window layout
20800
20801 No, there's nothing here about X, so be quiet.
20802
20803 @vindex gnus-use-full-window
20804 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
20805 other windows and occupy the entire Emacs screen by itself.  It is
20806 @code{t} by default.
20807
20808 Setting this variable to @code{nil} kinda works, but there are
20809 glitches.  Use at your own peril.
20810
20811 @vindex gnus-buffer-configuration
20812 @code{gnus-buffer-configuration} describes how much space each Gnus
20813 buffer should be given.  Here's an excerpt of this variable:
20814
20815 @lisp
20816 ((group (vertical 1.0 (group 1.0 point)
20817                       (if gnus-carpal (group-carpal 4))))
20818  (article (vertical 1.0 (summary 0.25 point)
20819                         (article 1.0))))
20820 @end lisp
20821
20822 This is an alist.  The @dfn{key} is a symbol that names some action or
20823 other.  For instance, when displaying the group buffer, the window
20824 configuration function will use @code{group} as the key.  A full list of
20825 possible names is listed below.
20826
20827 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
20828 should occupy.  To take the @code{article} split as an example -
20829
20830 @lisp
20831 (article (vertical 1.0 (summary 0.25 point)
20832                        (article 1.0)))
20833 @end lisp
20834
20835 This @dfn{split} says that the summary buffer should occupy 25% of upper
20836 half of the screen, and that it is placed over the article buffer.  As
20837 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
20838 reaching for that calculator there).  However, the special number
20839 @code{1.0} is used to signal that this buffer should soak up all the
20840 rest of the space available after the rest of the buffers have taken
20841 whatever they need.  There should be only one buffer with the @code{1.0}
20842 size spec per split.
20843
20844 Point will be put in the buffer that has the optional third element
20845 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
20846 split where the tag @code{frame-focus} is a member (i.e. is the third or
20847 fourth element in the list, depending on whether the @code{point} tag is
20848 present) gets focus.
20849
20850 Here's a more complicated example:
20851
20852 @lisp
20853 (article (vertical 1.0 (group 4)
20854                        (summary 0.25 point)
20855                        (if gnus-carpal (summary-carpal 4))
20856                        (article 1.0)))
20857 @end lisp
20858
20859 If the size spec is an integer instead of a floating point number,
20860 then that number will be used to say how many lines a buffer should
20861 occupy, not a percentage.
20862
20863 If the @dfn{split} looks like something that can be @code{eval}ed (to be
20864 precise---if the @code{car} of the split is a function or a subr), this
20865 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
20866 be used as a split.  This means that there will be three buffers if
20867 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
20868 is non-@code{nil}.
20869
20870 Not complicated enough for you?  Well, try this on for size:
20871
20872 @lisp
20873 (article (horizontal 1.0
20874              (vertical 0.5
20875                  (group 1.0)
20876                  (gnus-carpal 4))
20877              (vertical 1.0
20878                  (summary 0.25 point)
20879                  (summary-carpal 4)
20880                  (article 1.0))))
20881 @end lisp
20882
20883 Whoops.  Two buffers with the mystery 100% tag.  And what's that
20884 @code{horizontal} thingie?
20885
20886 If the first element in one of the split is @code{horizontal}, Gnus will
20887 split the window horizontally, giving you two windows side-by-side.
20888 Inside each of these strips you may carry on all you like in the normal
20889 fashion.  The number following @code{horizontal} says what percentage of
20890 the screen is to be given to this strip.
20891
20892 For each split, there @emph{must} be one element that has the 100% tag.
20893 The splitting is never accurate, and this buffer will eat any leftover
20894 lines from the splits.
20895
20896 To be slightly more formal, here's a definition of what a valid split
20897 may look like:
20898
20899 @example
20900 @group
20901 split      = frame | horizontal | vertical | buffer | form
20902 frame      = "(frame " size *split ")"
20903 horizontal = "(horizontal " size *split ")"
20904 vertical   = "(vertical " size *split ")"
20905 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
20906 size       = number | frame-params
20907 buf-name   = group | article | summary ...
20908 @end group
20909 @end example
20910
20911 The limitations are that the @code{frame} split can only appear as the
20912 top-level split.  @var{form} should be an Emacs Lisp form that should
20913 return a valid split.  We see that each split is fully recursive, and
20914 may contain any number of @code{vertical} and @code{horizontal} splits.
20915
20916 @vindex gnus-window-min-width
20917 @vindex gnus-window-min-height
20918 @cindex window height
20919 @cindex window width
20920 Finding the right sizes can be a bit complicated.  No window may be less
20921 than @code{gnus-window-min-height} (default 1) characters high, and all
20922 windows must be at least @code{gnus-window-min-width} (default 1)
20923 characters wide.  Gnus will try to enforce this before applying the
20924 splits.  If you want to use the normal Emacs window width/height limit,
20925 you can just set these two variables to @code{nil}.
20926
20927 If you're not familiar with Emacs terminology, @code{horizontal} and
20928 @code{vertical} splits may work the opposite way of what you'd expect.
20929 Windows inside a @code{horizontal} split are shown side-by-side, and
20930 windows within a @code{vertical} split are shown above each other.
20931
20932 @findex gnus-configure-frame
20933 If you want to experiment with window placement, a good tip is to call
20934 @code{gnus-configure-frame} directly with a split.  This is the function
20935 that does all the real work when splitting buffers.  Below is a pretty
20936 nonsensical configuration with 5 windows; two for the group buffer and
20937 three for the article buffer.  (I said it was nonsensical.)  If you
20938 @code{eval} the statement below, you can get an idea of how that would
20939 look straight away, without going through the normal Gnus channels.
20940 Play with it until you're satisfied, and then use
20941 @code{gnus-add-configuration} to add your new creation to the buffer
20942 configuration list.
20943
20944 @lisp
20945 (gnus-configure-frame
20946  '(horizontal 1.0
20947     (vertical 10
20948       (group 1.0)
20949       (article 0.3 point))
20950     (vertical 1.0
20951       (article 1.0)
20952       (horizontal 4
20953         (group 1.0)
20954         (article 10)))))
20955 @end lisp
20956
20957 You might want to have several frames as well.  No prob---just use the
20958 @code{frame} split:
20959
20960 @lisp
20961 (gnus-configure-frame
20962  '(frame 1.0
20963          (vertical 1.0
20964                    (summary 0.25 point frame-focus)
20965                    (article 1.0))
20966          (vertical ((height . 5) (width . 15)
20967                     (user-position . t)
20968                     (left . -1) (top . 1))
20969                    (picon 1.0))))
20970
20971 @end lisp
20972
20973 This split will result in the familiar summary/article window
20974 configuration in the first (or ``main'') frame, while a small additional
20975 frame will be created where picons will be shown.  As you can see,
20976 instead of the normal @code{1.0} top-level spec, each additional split
20977 should have a frame parameter alist as the size spec.
20978 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
20979 Reference Manual}.  Under XEmacs, a frame property list will be
20980 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
20981 is such a plist.
20982 The list of all possible keys for @code{gnus-buffer-configuration} can
20983 be found in its default value.
20984
20985 Note that the @code{message} key is used for both
20986 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
20987 it is desirable to distinguish between the two, something like this
20988 might be used:
20989
20990 @lisp
20991 (message (horizontal 1.0
20992                      (vertical 1.0 (message 1.0 point))
20993                      (vertical 0.24
20994                                (if (buffer-live-p gnus-summary-buffer)
20995                                    '(summary 0.5))
20996                                (group 1.0))))
20997 @end lisp
20998
20999 One common desire for a multiple frame split is to have a separate frame
21000 for composing mail and news while leaving the original frame intact.  To
21001 accomplish that, something like the following can be done:
21002
21003 @lisp
21004 (message
21005   (frame 1.0
21006          (if (not (buffer-live-p gnus-summary-buffer))
21007              (car (cdr (assoc 'group gnus-buffer-configuration)))
21008            (car (cdr (assoc 'summary gnus-buffer-configuration))))
21009          (vertical ((user-position . t) (top . 1) (left . 1)
21010                     (name . "Message"))
21011                    (message 1.0 point))))
21012 @end lisp
21013
21014 @findex gnus-add-configuration
21015 Since the @code{gnus-buffer-configuration} variable is so long and
21016 complicated, there's a function you can use to ease changing the config
21017 of a single setting: @code{gnus-add-configuration}.  If, for instance,
21018 you want to change the @code{article} setting, you could say:
21019
21020 @lisp
21021 (gnus-add-configuration
21022  '(article (vertical 1.0
21023                (group 4)
21024                (summary .25 point)
21025                (article 1.0))))
21026 @end lisp
21027
21028 You'd typically stick these @code{gnus-add-configuration} calls in your
21029 @file{~/.gnus.el} file or in some startup hook---they should be run after
21030 Gnus has been loaded.
21031
21032 @vindex gnus-always-force-window-configuration
21033 If all windows mentioned in the configuration are already visible, Gnus
21034 won't change the window configuration.  If you always want to force the
21035 ``right'' window configuration, you can set
21036 @code{gnus-always-force-window-configuration} to non-@code{nil}.
21037
21038 If you're using tree displays (@pxref{Tree Display}), and the tree
21039 window is displayed vertically next to another window, you may also want
21040 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
21041 windows resized.
21042
21043 @subsection Example Window Configurations
21044
21045 @itemize @bullet
21046 @item
21047 Narrow left hand side occupied by group buffer.  Right hand side split
21048 between summary buffer (top one-sixth) and article buffer (bottom).
21049
21050 @ifinfo
21051 @example
21052 +---+---------+
21053 | G | Summary |
21054 | r +---------+
21055 | o |         |
21056 | u | Article |
21057 | p |         |
21058 +---+---------+
21059 @end example
21060 @end ifinfo
21061
21062 @lisp
21063 (gnus-add-configuration
21064  '(article
21065    (horizontal 1.0
21066                (vertical 25 (group 1.0))
21067                (vertical 1.0
21068                          (summary 0.16 point)
21069                          (article 1.0)))))
21070
21071 (gnus-add-configuration
21072  '(summary
21073    (horizontal 1.0
21074                (vertical 25 (group 1.0))
21075                (vertical 1.0 (summary 1.0 point)))))
21076 @end lisp
21077
21078 @end itemize
21079
21080
21081 @node Faces and Fonts
21082 @section Faces and Fonts
21083 @cindex faces
21084 @cindex fonts
21085 @cindex colors
21086
21087 Fiddling with fonts and faces used to be very difficult, but these days
21088 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
21089 the face you want to alter, and alter it via the standard Customize
21090 interface.
21091
21092
21093 @node Compilation
21094 @section Compilation
21095 @cindex compilation
21096 @cindex byte-compilation
21097
21098 @findex gnus-compile
21099
21100 Remember all those line format specification variables?
21101 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
21102 on.  Now, Gnus will of course heed whatever these variables are, but,
21103 unfortunately, changing them will mean a quite significant slow-down.
21104 (The default values of these variables have byte-compiled functions
21105 associated with them, while the user-generated versions do not, of
21106 course.)
21107
21108 To help with this, you can run @kbd{M-x gnus-compile} after you've
21109 fiddled around with the variables and feel that you're (kind of)
21110 satisfied.  This will result in the new specs being byte-compiled, and
21111 you'll get top speed again.  Gnus will save these compiled specs in the
21112 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
21113 this function, though---you should compile them yourself by sticking
21114 them into the @file{~/.gnus.el} file and byte-compiling that file.)
21115
21116
21117 @node Mode Lines
21118 @section Mode Lines
21119 @cindex mode lines
21120
21121 @vindex gnus-updated-mode-lines
21122 @code{gnus-updated-mode-lines} says what buffers should keep their mode
21123 lines updated.  It is a list of symbols.  Supported symbols include
21124 @code{group}, @code{article}, @code{summary}, @code{server},
21125 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
21126 Gnus will keep that mode line updated with information that may be
21127 pertinent.  If this variable is @code{nil}, screen refresh may be
21128 quicker.
21129
21130 @cindex display-time
21131
21132 @vindex gnus-mode-non-string-length
21133 By default, Gnus displays information on the current article in the mode
21134 lines of the summary and article buffers.  The information Gnus wishes
21135 to display (e.g. the subject of the article) is often longer than the
21136 mode lines, and therefore have to be cut off at some point.  The
21137 @code{gnus-mode-non-string-length} variable says how long the other
21138 elements on the line is (i.e., the non-info part).  If you put
21139 additional elements on the mode line (e.g. a clock), you should modify
21140 this variable:
21141
21142 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
21143 @lisp
21144 (add-hook 'display-time-hook
21145           (lambda () (setq gnus-mode-non-string-length
21146                            (+ 21
21147                               (if line-number-mode 5 0)
21148                               (if column-number-mode 4 0)
21149                               (length display-time-string)))))
21150 @end lisp
21151
21152 If this variable is @code{nil} (which is the default), the mode line
21153 strings won't be chopped off, and they won't be padded either.  Note
21154 that the default is unlikely to be desirable, as even the percentage
21155 complete in the buffer may be crowded off the mode line; the user should
21156 configure this variable appropriately for her configuration.
21157
21158
21159 @node Highlighting and Menus
21160 @section Highlighting and Menus
21161 @cindex visual
21162 @cindex highlighting
21163 @cindex menus
21164
21165 @vindex gnus-visual
21166 The @code{gnus-visual} variable controls most of the Gnus-prettifying
21167 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
21168 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
21169 file.
21170
21171 This variable can be a list of visual properties that are enabled.  The
21172 following elements are valid, and are all included by default:
21173
21174 @table @code
21175 @item group-highlight
21176 Do highlights in the group buffer.
21177 @item summary-highlight
21178 Do highlights in the summary buffer.
21179 @item article-highlight
21180 Do highlights in the article buffer.
21181 @item highlight
21182 Turn on highlighting in all buffers.
21183 @item group-menu
21184 Create menus in the group buffer.
21185 @item summary-menu
21186 Create menus in the summary buffers.
21187 @item article-menu
21188 Create menus in the article buffer.
21189 @item browse-menu
21190 Create menus in the browse buffer.
21191 @item server-menu
21192 Create menus in the server buffer.
21193 @item score-menu
21194 Create menus in the score buffers.
21195 @item menu
21196 Create menus in all buffers.
21197 @end table
21198
21199 So if you only want highlighting in the article buffer and menus in all
21200 buffers, you could say something like:
21201
21202 @lisp
21203 (setq gnus-visual '(article-highlight menu))
21204 @end lisp
21205
21206 If you want highlighting only and no menus whatsoever, you'd say:
21207
21208 @lisp
21209 (setq gnus-visual '(highlight))
21210 @end lisp
21211
21212 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21213 in all Gnus buffers.
21214
21215 Other general variables that influence the look of all buffers include:
21216
21217 @table @code
21218 @item gnus-mouse-face
21219 @vindex gnus-mouse-face
21220 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
21221 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21222
21223 @end table
21224
21225 There are hooks associated with the creation of all the different menus:
21226
21227 @table @code
21228
21229 @item gnus-article-menu-hook
21230 @vindex gnus-article-menu-hook
21231 Hook called after creating the article mode menu.
21232
21233 @item gnus-group-menu-hook
21234 @vindex gnus-group-menu-hook
21235 Hook called after creating the group mode menu.
21236
21237 @item gnus-summary-menu-hook
21238 @vindex gnus-summary-menu-hook
21239 Hook called after creating the summary mode menu.
21240
21241 @item gnus-server-menu-hook
21242 @vindex gnus-server-menu-hook
21243 Hook called after creating the server mode menu.
21244
21245 @item gnus-browse-menu-hook
21246 @vindex gnus-browse-menu-hook
21247 Hook called after creating the browse mode menu.
21248
21249 @item gnus-score-menu-hook
21250 @vindex gnus-score-menu-hook
21251 Hook called after creating the score mode menu.
21252
21253 @end table
21254
21255
21256 @node Buttons
21257 @section Buttons
21258 @cindex buttons
21259 @cindex mouse
21260 @cindex click
21261
21262 Those new-fangled @dfn{mouse} contraptions is very popular with the
21263 young, hep kids who don't want to learn the proper way to do things
21264 these days.  Why, I remember way back in the summer of '89, when I was
21265 using Emacs on a Tops 20 system.  Three hundred users on one single
21266 machine, and every user was running Simula compilers.  Bah!
21267
21268 Right.
21269
21270 @vindex gnus-carpal
21271 Well, you can make Gnus display bufferfuls of buttons you can click to
21272 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
21273 really.  Tell the chiropractor I sent you.
21274
21275
21276 @table @code
21277
21278 @item gnus-carpal-mode-hook
21279 @vindex gnus-carpal-mode-hook
21280 Hook run in all carpal mode buffers.
21281
21282 @item gnus-carpal-button-face
21283 @vindex gnus-carpal-button-face
21284 Face used on buttons.
21285
21286 @item gnus-carpal-header-face
21287 @vindex gnus-carpal-header-face
21288 Face used on carpal buffer headers.
21289
21290 @item gnus-carpal-group-buffer-buttons
21291 @vindex gnus-carpal-group-buffer-buttons
21292 Buttons in the group buffer.
21293
21294 @item gnus-carpal-summary-buffer-buttons
21295 @vindex gnus-carpal-summary-buffer-buttons
21296 Buttons in the summary buffer.
21297
21298 @item gnus-carpal-server-buffer-buttons
21299 @vindex gnus-carpal-server-buffer-buttons
21300 Buttons in the server buffer.
21301
21302 @item gnus-carpal-browse-buffer-buttons
21303 @vindex gnus-carpal-browse-buffer-buttons
21304 Buttons in the browse buffer.
21305 @end table
21306
21307 All the @code{buttons} variables are lists.  The elements in these list
21308 are either cons cells where the @code{car} contains a text to be displayed and
21309 the @code{cdr} contains a function symbol, or a simple string.
21310
21311
21312 @node Daemons
21313 @section Daemons
21314 @cindex demons
21315 @cindex daemons
21316
21317 Gnus, being larger than any program ever written (allegedly), does lots
21318 of strange stuff that you may wish to have done while you're not
21319 present.  For instance, you may want it to check for new mail once in a
21320 while.  Or you may want it to close down all connections to all servers
21321 when you leave Emacs idle.  And stuff like that.
21322
21323 Gnus will let you do stuff like that by defining various
21324 @dfn{handlers}.  Each handler consists of three elements:  A
21325 @var{function}, a @var{time}, and an @var{idle} parameter.
21326
21327 Here's an example of a handler that closes connections when Emacs has
21328 been idle for thirty minutes:
21329
21330 @lisp
21331 (gnus-demon-close-connections nil 30)
21332 @end lisp
21333
21334 Here's a handler that scans for @acronym{PGP} headers every hour when
21335 Emacs is idle:
21336
21337 @lisp
21338 (gnus-demon-scan-pgp 60 t)
21339 @end lisp
21340
21341 This @var{time} parameter and that @var{idle} parameter work together
21342 in a strange, but wonderful fashion.  Basically, if @var{idle} is
21343 @code{nil}, then the function will be called every @var{time} minutes.
21344
21345 If @var{idle} is @code{t}, then the function will be called after
21346 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
21347 the function will never be called.  But once Emacs goes idle, the
21348 function will be called every @var{time} minutes.
21349
21350 If @var{idle} is a number and @var{time} is a number, the function will
21351 be called every @var{time} minutes only when Emacs has been idle for
21352 @var{idle} minutes.
21353
21354 If @var{idle} is a number and @var{time} is @code{nil}, the function
21355 will be called once every time Emacs has been idle for @var{idle}
21356 minutes.
21357
21358 And if @var{time} is a string, it should look like @samp{07:31}, and
21359 the function will then be called once every day somewhere near that
21360 time.  Modified by the @var{idle} parameter, of course.
21361
21362 @vindex gnus-demon-timestep
21363 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21364 seconds.  This is 60 by default.  If you change that variable,
21365 all the timings in the handlers will be affected.)
21366
21367 So, if you want to add a handler, you could put something like this in
21368 your @file{~/.gnus.el} file:
21369
21370 @findex gnus-demon-add-handler
21371 @lisp
21372 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21373 @end lisp
21374
21375 @findex gnus-demon-add-nocem
21376 @findex gnus-demon-add-scanmail
21377 @findex gnus-demon-add-rescan
21378 @findex gnus-demon-add-scan-timestamps
21379 @findex gnus-demon-add-disconnection
21380 Some ready-made functions to do this have been created:
21381 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21382 @code{gnus-demon-add-nntp-close-connection},
21383 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21384 @code{gnus-demon-add-scanmail}.  Just put those functions in your
21385 @file{~/.gnus.el} if you want those abilities.
21386
21387 @findex gnus-demon-init
21388 @findex gnus-demon-cancel
21389 @vindex gnus-demon-handlers
21390 If you add handlers to @code{gnus-demon-handlers} directly, you should
21391 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
21392 daemons, you can use the @code{gnus-demon-cancel} function.
21393
21394 Note that adding daemons can be pretty naughty if you over do it.  Adding
21395 functions that scan all news and mail from all servers every two seconds
21396 is a sure-fire way of getting booted off any respectable system.  So
21397 behave.
21398
21399
21400 @node NoCeM
21401 @section NoCeM
21402 @cindex nocem
21403 @cindex spam
21404
21405 @dfn{Spamming} is posting the same article lots and lots of times.
21406 Spamming is bad.  Spamming is evil.
21407
21408 Spamming is usually canceled within a day or so by various anti-spamming
21409 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
21410 NoCeM is pronounced ``no see-'em'', and means what the name
21411 implies---these are messages that make the offending articles, like, go
21412 away.
21413
21414 What use are these NoCeM messages if the articles are canceled anyway?
21415 Some sites do not honor cancel messages and some sites just honor cancels
21416 from a select few people.  Then you may wish to make use of the NoCeM
21417 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21418
21419 Gnus can read and parse the messages in this group automatically, and
21420 this will make spam disappear.
21421
21422 There are some variables to customize, of course:
21423
21424 @table @code
21425 @item gnus-use-nocem
21426 @vindex gnus-use-nocem
21427 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
21428 by default.
21429
21430 @item gnus-nocem-groups
21431 @vindex gnus-nocem-groups
21432 Gnus will look for NoCeM messages in the groups in this list.  The
21433 default is
21434 @lisp
21435 ("news.lists.filters" "news.admin.net-abuse.bulletins"
21436  "alt.nocem.misc" "news.admin.net-abuse.announce")
21437 @end lisp
21438
21439 @item gnus-nocem-issuers
21440 @vindex gnus-nocem-issuers
21441 There are many people issuing NoCeM messages.  This list says what
21442 people you want to listen to.  The default is
21443 @lisp
21444 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
21445  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
21446 @end lisp
21447 fine, upstanding citizens all of them.
21448
21449 Known despammers that you can put in this list are listed at@*
21450 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21451
21452 You do not have to heed NoCeM messages from all these people---just the
21453 ones you want to listen to.  You also don't have to accept all NoCeM
21454 messages from the people you like.  Each NoCeM message has a @dfn{type}
21455 header that gives the message a (more or less, usually less) rigorous
21456 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21457 @samp{binary}, and @samp{troll}.  To specify this, you have to use
21458 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21459 Each condition is either a string (which is a regexp that matches types
21460 you want to use) or a list on the form @code{(not @var{string})}, where
21461 @var{string} is a regexp that matches types you don't want to use.
21462
21463 For instance, if you want all NoCeM messages from Chris Lewis except his
21464 @samp{troll} messages, you'd say:
21465
21466 @lisp
21467 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21468 @end lisp
21469
21470 On the other hand, if you just want nothing but his @samp{spam} and
21471 @samp{spew} messages, you'd say:
21472
21473 @lisp
21474 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21475 @end lisp
21476
21477 The specs are applied left-to-right.
21478
21479
21480 @item gnus-nocem-verifyer
21481 @vindex gnus-nocem-verifyer
21482 @findex mc-verify
21483 This should be a function for verifying that the NoCeM issuer is who she
21484 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
21485 function.  If this is too slow and you don't care for verification
21486 (which may be dangerous), you can set this variable to @code{nil}.
21487
21488 If you want signed NoCeM messages to be verified and unsigned messages
21489 not to be verified (but used anyway), you could do something like:
21490
21491 @lisp
21492 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
21493
21494 (defun my-gnus-mc-verify ()
21495   (not (eq 'forged
21496            (ignore-errors
21497              (if (mc-verify)
21498                  t
21499                'forged)))))
21500 @end lisp
21501
21502 This might be dangerous, though.
21503
21504 @item gnus-nocem-directory
21505 @vindex gnus-nocem-directory
21506 This is where Gnus will store its NoCeM cache files.  The default is@*
21507 @file{~/News/NoCeM/}.
21508
21509 @item gnus-nocem-expiry-wait
21510 @vindex gnus-nocem-expiry-wait
21511 The number of days before removing old NoCeM entries from the cache.
21512 The default is 15.  If you make it shorter Gnus will be faster, but you
21513 might then see old spam.
21514
21515 @item gnus-nocem-check-from
21516 @vindex gnus-nocem-check-from
21517 Non-@code{nil} means check for valid issuers in message bodies.
21518 Otherwise don't bother fetching articles unless their author matches a
21519 valid issuer; that is much faster if you are selective about the
21520 issuers.
21521
21522 @item gnus-nocem-check-article-limit
21523 @vindex gnus-nocem-check-article-limit
21524 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21525 group.  NoCeM groups can be huge and very slow to process.
21526
21527 @end table
21528
21529 Using NoCeM could potentially be a memory hog.  If you have many living
21530 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21531 big.  If this is a problem, you should kill off all (or most) of your
21532 unsubscribed groups (@pxref{Subscription Commands}).
21533
21534
21535 @node Undo
21536 @section Undo
21537 @cindex undo
21538
21539 It is very useful to be able to undo actions one has done.  In normal
21540 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21541 In Gnus buffers, however, it isn't that simple.
21542
21543 The things Gnus displays in its buffer is of no value whatsoever to
21544 Gnus---it's all just data designed to look nice to the user.
21545 Killing a group in the group buffer with @kbd{C-k} makes the line
21546 disappear, but that's just a side-effect of the real action---the
21547 removal of the group in question from the internal Gnus structures.
21548 Undoing something like that can't be done by the normal Emacs
21549 @code{undo} function.
21550
21551 Gnus tries to remedy this somewhat by keeping track of what the user
21552 does and coming up with actions that would reverse the actions the user
21553 takes.  When the user then presses the @code{undo} key, Gnus will run
21554 the code to reverse the previous action, or the previous actions.
21555 However, not all actions are easily reversible, so Gnus currently offers
21556 a few key functions to be undoable.  These include killing groups,
21557 yanking groups, and changing the list of read articles of groups.
21558 That's it, really.  More functions may be added in the future, but each
21559 added function means an increase in data to be stored, so Gnus will
21560 never be totally undoable.
21561
21562 @findex gnus-undo-mode
21563 @vindex gnus-use-undo
21564 @findex gnus-undo
21565 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
21566 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21567 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
21568 command, which should feel kinda like the normal Emacs @code{undo}
21569 command.
21570
21571
21572 @node Predicate Specifiers
21573 @section Predicate Specifiers
21574 @cindex predicate specifiers
21575
21576 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
21577 form that allows flexible specification of predicates without having
21578 to type all that much.
21579
21580 These specifiers are lists consisting of functions, symbols and lists.
21581
21582 Here's an example:
21583
21584 @lisp
21585 (or gnus-article-unseen-p
21586     gnus-article-unread-p)
21587 @end lisp
21588
21589 The available symbols are @code{or}, @code{and} and @code{not}.  The
21590 functions all take one parameter.
21591
21592 @findex gnus-make-predicate
21593 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
21594 to create a function that can be called.  This input parameter to this
21595 function will be passed along to all the functions in the predicate
21596 specifier.
21597
21598
21599 @node Moderation
21600 @section Moderation
21601 @cindex moderation
21602
21603 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
21604 It is not included in the standard Gnus package.  Write a mail to
21605 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
21606 get a copy.
21607
21608 The moderation package is implemented as a minor mode for summary
21609 buffers.  Put
21610
21611 @lisp
21612 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
21613 @end lisp
21614
21615 in your @file{~/.gnus.el} file.
21616
21617 If you are the moderator of @samp{rec.zoofle}, this is how it's
21618 supposed to work:
21619
21620 @enumerate
21621 @item
21622 You split your incoming mail by matching on
21623 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
21624 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
21625
21626 @item
21627 You enter that group once in a while and post articles using the @kbd{e}
21628 (edit-and-post) or @kbd{s} (just send unedited) commands.
21629
21630 @item
21631 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
21632 articles that weren't approved by you, you can cancel them with the
21633 @kbd{c} command.
21634 @end enumerate
21635
21636 To use moderation mode in these two groups, say:
21637
21638 @lisp
21639 (setq gnus-moderated-list
21640       "^nnml:rec.zoofle$\\|^rec.zoofle$")
21641 @end lisp
21642
21643
21644 @node Image Enhancements
21645 @section Image Enhancements
21646
21647 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
21648 support images yet.}, is able to display pictures and stuff, so Gnus has
21649 taken advantage of that.
21650
21651 @menu
21652 * X-Face::                      Display a funky, teensy black-and-white image.
21653 * Face::                        Display a funkier, teensier colored image.
21654 * Smileys::                     Show all those happy faces the way they were meant to be shown.
21655 * Picons::                      How to display pictures of what you're reading.
21656 * XVarious::                    Other XEmacsy Gnusey variables.
21657 @end menu
21658
21659
21660 @node X-Face
21661 @subsection X-Face
21662 @cindex x-face
21663
21664 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21665 depth) image that's supposed to represent the author of the message.
21666 It seems to be supported by an ever-growing number of mail and news
21667 readers.
21668
21669 @cindex x-face
21670 @findex gnus-article-display-x-face
21671 @vindex gnus-article-x-face-command
21672 @vindex gnus-article-x-face-too-ugly
21673 @iftex
21674 @iflatex
21675 \include{xface}
21676 @end iflatex
21677 @end iftex
21678 @c @anchor{X-Face}
21679
21680 Decoding an @code{X-Face} header either requires an Emacs that has
21681 @samp{compface} support (which most XEmacs versions has), or that you
21682 have @samp{compface} installed on your system.  If either is true,
21683 Gnus will default to displaying @code{X-Face} headers.
21684
21685 The variable that controls this is the
21686 @code{gnus-article-x-face-command} variable.  If this variable is a
21687 string, this string will be executed in a sub-shell.  If it is a
21688 function, this function will be called with the face as the argument.
21689 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21690 the @code{From} header, the face will not be shown.
21691
21692 The default action under Emacs 20 is to fork off the @code{display}
21693 program@footnote{@code{display} is from the ImageMagick package.  For
21694 the @code{uncompface} and @code{icontopbm} programs look for a package
21695 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21696 view the face.
21697
21698 Under XEmacs or Emacs 21+ with suitable image support, the default
21699 action is to display the face before the @code{From} header.  (It's
21700 nicer if XEmacs has been compiled with @code{X-Face} support---that
21701 will make display somewhat faster.  If there's no native @code{X-Face}
21702 support, Gnus will try to convert the @code{X-Face} header using
21703 external programs from the @code{pbmplus} package and
21704 friends.@footnote{On a GNU/Linux system look for packages with names
21705 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21706
21707 (Note: @code{x-face} is used in the variable/function names, not
21708 @code{xface}).
21709
21710 Gnus provides a few convenience functions and variables to allow
21711 easier insertion of X-Face headers in outgoing messages.
21712
21713 @findex gnus-random-x-face
21714 @vindex gnus-convert-pbm-to-x-face-command
21715 @vindex gnus-x-face-directory
21716 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21717 @code{gnus-x-face-directory} and picks one at random, and then
21718 converts it to the X-Face format by using the
21719 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21720 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21721 header data as a string.
21722
21723 @findex gnus-insert-random-x-face-header
21724 @code{gnus-insert-random-x-face-header} calls
21725 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21726 randomly generated data.
21727
21728 @findex gnus-x-face-from-file
21729 @vindex gnus-convert-image-to-x-face-command
21730 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21731 converts the file to X-Face format by using the
21732 @code{gnus-convert-image-to-x-face-command} shell command.
21733
21734 Here's how you would typically use the first function.  Put something
21735 like the following in your @file{~/.gnus.el} file:
21736
21737 @lisp
21738 (setq message-required-news-headers
21739       (nconc message-required-news-headers
21740              (list '(X-Face . gnus-random-x-face))))
21741 @end lisp
21742
21743 Using the last function would be something like this:
21744
21745 @lisp
21746 (setq message-required-news-headers
21747       (nconc message-required-news-headers
21748              (list '(X-Face . (lambda ()
21749                                 (gnus-x-face-from-file
21750                                  "~/My-face.gif"))))))
21751 @end lisp
21752
21753
21754 @node Face
21755 @subsection Face
21756 @cindex face
21757
21758 @c #### FIXME: faces and x-faces'implementations should really be harmonized.
21759
21760 @code{Face} headers are essentially a funkier version of @code{X-Face}
21761 ones. They describe a 48x48 pixel colored image that's supposed to
21762 represent the author of the message.
21763
21764 @cindex face
21765 @findex gnus-article-display-face
21766 The contents of a @code{Face} header must be a base64 encoded PNG image.
21767 See @uref{http://quimby.gnus.org/circus/face/} for the precise
21768 specifications.
21769
21770 Gnus provides a few convenience functions and variables to allow
21771 easier insertion of Face headers in outgoing messages.
21772
21773 @findex gnus-convert-png-to-face
21774 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
21775 726 bytes long, and converts it to a face.
21776
21777 @findex gnus-face-from-file
21778 @vindex gnus-convert-image-to-face-command
21779 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
21780 converts the file to Face format by using the
21781 @code{gnus-convert-image-to-face-command} shell command.
21782
21783 Here's how you would typically use this function. Put something like the
21784 following in your @file{~/.gnus.el} file:
21785
21786 @lisp
21787 (setq message-required-news-headers
21788       (nconc message-required-news-headers
21789              (list '(Face . (lambda ()
21790                               (gnus-face-from-file "~/face.jpg"))))))
21791 @end lisp
21792
21793
21794 @node Smileys
21795 @subsection Smileys
21796 @cindex smileys
21797
21798 @iftex
21799 @iflatex
21800 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
21801 \input{smiley}
21802 @end iflatex
21803 @end iftex
21804
21805 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
21806 currently the only package that uses Smiley, it is documented here.
21807
21808 In short---to use Smiley in Gnus, put the following in your
21809 @file{~/.gnus.el} file:
21810
21811 @lisp
21812 (setq gnus-treat-display-smileys t)
21813 @end lisp
21814
21815 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
21816 the like---to pictures and displays those instead of the text smiley
21817 faces.  The conversion is controlled by a list of regexps that matches
21818 text and maps that to file names.
21819
21820 @vindex smiley-regexp-alist
21821 The alist used is specified by the @code{smiley-regexp-alist}
21822 variable.  The first item in each element is the regexp to be matched;
21823 the second element is the regexp match group that is to be replaced by
21824 the picture; and the third element is the name of the file to be
21825 displayed.
21826
21827 The following variables customize where Smiley will look for these
21828 files:
21829
21830 @table @code
21831
21832 @item smiley-data-directory
21833 @vindex smiley-data-directory
21834 Where Smiley will look for smiley faces files.
21835
21836 @item gnus-smiley-file-types
21837 @vindex gnus-smiley-file-types
21838 List of suffixes on smiley file names to try.
21839
21840 @end table
21841
21842
21843 @node Picons
21844 @subsection Picons
21845
21846 @iftex
21847 @iflatex
21848 \include{picons}
21849 @end iflatex
21850 @end iftex
21851
21852 So@dots{}  You want to slow down your news reader even more!  This is a
21853 good way to do so.  It's also a great way to impress people staring
21854 over your shoulder as you read news.
21855
21856 What are Picons?  To quote directly from the Picons Web site:
21857
21858 @iftex
21859 @iflatex
21860 \margindex{}
21861 @end iflatex
21862 @end iftex
21863
21864 @quotation
21865 @dfn{Picons} is short for ``personal icons''.  They're small,
21866 constrained images used to represent users and domains on the net,
21867 organized into databases so that the appropriate image for a given
21868 e-mail address can be found.  Besides users and domains, there are picon
21869 databases for Usenet newsgroups and weather forecasts.  The picons are
21870 in either monochrome @code{XBM} format or color @code{XPM} and
21871 @code{GIF} formats.
21872 @end quotation
21873
21874 @vindex gnus-picon-databases
21875 For instructions on obtaining and installing the picons databases,
21876 point your Web browser at
21877 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
21878
21879 If you are using Debian GNU/Linux, saying @samp{apt-get install
21880 picons.*} will install the picons where Gnus can find them.
21881
21882 To enable displaying picons, simply make sure that
21883 @code{gnus-picon-databases} points to the directory containing the
21884 Picons databases.
21885
21886 The following variables offer control over where things are located.
21887
21888 @table @code
21889
21890 @item gnus-picon-databases
21891 @vindex gnus-picon-databases
21892 The location of the picons database.  This is a list of directories
21893 containing the @file{news}, @file{domains}, @file{users} (and so on)
21894 subdirectories.  Defaults to @code{("/usr/lib/picon"
21895 "/usr/local/faces")}.
21896
21897 @item gnus-picon-news-directories
21898 @vindex gnus-picon-news-directories
21899 List of subdirectories to search in @code{gnus-picon-databases} for
21900 newsgroups faces.  @code{("news")} is the default.
21901
21902 @item gnus-picon-user-directories
21903 @vindex gnus-picon-user-directories
21904 List of subdirectories to search in @code{gnus-picon-databases} for user
21905 faces.  @code{("users" "usenix" "local" "misc")} is the default.
21906
21907 @item gnus-picon-domain-directories
21908 @vindex gnus-picon-domain-directories
21909 List of subdirectories to search in @code{gnus-picon-databases} for
21910 domain name faces.  Defaults to @code{("domains")}.  Some people may
21911 want to add @samp{"unknown"} to this list.
21912
21913 @item gnus-picon-file-types
21914 @vindex gnus-picon-file-types
21915 Ordered list of suffixes on picon file names to try.  Defaults to
21916 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
21917
21918 @end table
21919
21920
21921 @node XVarious
21922 @subsection Various XEmacs Variables
21923
21924 @table @code
21925 @item gnus-xmas-glyph-directory
21926 @vindex gnus-xmas-glyph-directory
21927 This is where Gnus will look for pictures.  Gnus will normally
21928 auto-detect this directory, but you may set it manually if you have an
21929 unusual directory structure.
21930
21931 @item gnus-xmas-logo-color-alist
21932 @vindex gnus-xmas-logo-color-alist
21933 This is an alist where the key is a type symbol and the values are the
21934 foreground and background color of the splash page glyph.
21935
21936 @item gnus-xmas-logo-color-style
21937 @vindex gnus-xmas-logo-color-style
21938 This is the key used to look up the color in the alist described above.
21939 Valid values include @code{flame}, @code{pine}, @code{moss},
21940 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
21941 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
21942
21943 @item gnus-xmas-modeline-glyph
21944 @vindex gnus-xmas-modeline-glyph
21945 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21946 default.
21947
21948 @end table
21949
21950 @subsubsection Toolbar
21951
21952 @table @code
21953
21954 @item gnus-use-toolbar
21955 @vindex gnus-use-toolbar
21956 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
21957 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
21958 @code{right-toolbar}, or @code{left-toolbar}.
21959
21960 @item gnus-group-toolbar
21961 @vindex gnus-group-toolbar
21962 The toolbar in the group buffer.
21963
21964 @item gnus-summary-toolbar
21965 @vindex gnus-summary-toolbar
21966 The toolbar in the summary buffer.
21967
21968 @item gnus-summary-mail-toolbar
21969 @vindex gnus-summary-mail-toolbar
21970 The toolbar in the summary buffer of mail groups.
21971
21972 @end table
21973
21974 @iftex
21975 @iflatex
21976 \margindex{}
21977 @end iflatex
21978 @end iftex
21979
21980
21981 @node Fuzzy Matching
21982 @section Fuzzy Matching
21983 @cindex fuzzy matching
21984
21985 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
21986 things like scoring, thread gathering and thread comparison.
21987
21988 As opposed to regular expression matching, fuzzy matching is very fuzzy.
21989 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
21990 means, and the implementation has changed over time.
21991
21992 Basically, it tries to remove all noise from lines before comparing.
21993 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21994 out of the strings before comparing the results.  This often leads to
21995 adequate results---even when faced with strings generated by text
21996 manglers masquerading as newsreaders.
21997
21998
21999 @node Thwarting Email Spam
22000 @section Thwarting Email Spam
22001 @cindex email spam
22002 @cindex spam
22003 @cindex UCE
22004 @cindex unsolicited commercial email
22005
22006 In these last days of the Usenet, commercial vultures are hanging about
22007 and grepping through news like crazy to find email addresses they can
22008 foist off their scams and products to.  As a reaction to this, many
22009 people have started putting nonsense addresses into their @code{From}
22010 lines.  I think this is counterproductive---it makes it difficult for
22011 people to send you legitimate mail in response to things you write, as
22012 well as making it difficult to see who wrote what.  This rewriting may
22013 perhaps be a bigger menace than the unsolicited commercial email itself
22014 in the end.
22015
22016 The biggest problem I have with email spam is that it comes in under
22017 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
22018 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
22019 mail group, only to find two pyramid schemes, seven advertisements
22020 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
22021 and one mail asking me to repent and find some god.
22022
22023 This is annoying.  Here's what you can do about it.
22024
22025 @menu
22026 * The problem of spam::         Some background, and some solutions
22027 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
22028 * SpamAssassin::                How to use external anti-spam tools.
22029 * Hashcash::                    Reduce spam by burning CPU time.
22030 * Filtering Spam Using The Spam ELisp Package::
22031 * Filtering Spam Using Statistics with spam-stat::
22032 @end menu
22033
22034 @node The problem of spam
22035 @subsection The problem of spam
22036 @cindex email spam
22037 @cindex spam filtering approaches
22038 @cindex filtering approaches, spam
22039 @cindex UCE
22040 @cindex unsolicited commercial email
22041
22042 First, some background on spam.
22043
22044 If you have access to e-mail, you are familiar with spam (technically
22045 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
22046 because e-mail delivery is very cheap compared to paper mail, so only
22047 a very small percentage of people need to respond to an UCE to make it
22048 worthwhile to the advertiser.  Ironically, one of the most common
22049 spams is the one offering a database of e-mail addresses for further
22050 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
22051 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
22052
22053 Spam comes from a wide variety of sources.  It is simply impossible to
22054 dispose of all spam without discarding useful messages.  A good
22055 example is the TMDA system, which requires senders
22056 unknown to you to confirm themselves as legitimate senders before
22057 their e-mail can reach you.  Without getting into the technical side
22058 of TMDA, a downside is clearly that e-mail from legitimate sources may
22059 be discarded if those sources can't or won't confirm themselves
22060 through the TMDA system.  Another problem with TMDA is that it
22061 requires its users to have a basic understanding of e-mail delivery
22062 and processing.
22063
22064 The simplest approach to filtering spam is filtering.  If you get 200
22065 spam messages per day from @samp{random-address@@vmadmin.com}, you
22066 block @samp{vmadmin.com}.  If you get 200 messages about
22067 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
22068 message.  This, unfortunately, is a great way to discard legitimate
22069 e-mail.  For instance, the very informative and useful RISKS digest
22070 has been blocked by overzealous mail filters because it
22071 @strong{contained} words that were common in spam messages.
22072 Nevertheless, in isolated cases, with great care, direct filtering of
22073 mail can be useful.
22074
22075 Another approach to filtering e-mail is the distributed spam
22076 processing, for instance DCC implements such a system.  In essence,
22077 @var{N} systems around the world agree that a machine @var{X} in
22078 China, Ghana, or California is sending out spam e-mail, and these
22079 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into
22080 a database.  The criteria for spam detection vary---it may be the
22081 number of messages sent, the content of the messages, and so on.  When
22082 a user of the distributed processing system wants to find out if a
22083 message is spam, he consults one of those @var{N} systems.
22084
22085 Distributed spam processing works very well against spammers that send
22086 a large number of messages at once, but it requires the user to set up
22087 fairly complicated checks.  There are commercial and free distributed
22088 spam processing systems.  Distributed spam processing has its risks as
22089 well.  For instance legitimate e-mail senders have been accused of
22090 sending spam, and their web sites have been shut down for some time
22091 because of the incident.
22092
22093 The statistical approach to spam filtering is also popular.  It is
22094 based on a statistical analysis of previous spam messages.  Usually
22095 the analysis is a simple word frequency count, with perhaps pairs of
22096 words or 3-word combinations thrown into the mix.  Statistical
22097 analysis of spam works very well in most of the cases, but it can
22098 classify legitimate e-mail as spam in some cases.  It takes time to
22099 run the analysis, the full message must be analyzed, and the user has
22100 to store the database of spam analyses.
22101
22102 @node Anti-Spam Basics
22103 @subsection Anti-Spam Basics
22104 @cindex email spam
22105 @cindex spam
22106 @cindex UCE
22107 @cindex unsolicited commercial email
22108
22109 One way of dealing with spam is having Gnus split out all spam into a
22110 @samp{spam} mail group (@pxref{Splitting Mail}).
22111
22112 First, pick one (1) valid mail address that you can be reached at, and
22113 put it in your @code{From} header of all your news articles.  (I've
22114 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
22115 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
22116 sysadmin whether your sendmail installation accepts keywords in the local
22117 part of the mail address.)
22118
22119 @lisp
22120 (setq message-default-news-headers
22121       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
22122 @end lisp
22123
22124 Then put the following split rule in @code{nnmail-split-fancy}
22125 (@pxref{Fancy Mail Splitting}):
22126
22127 @lisp
22128 (...
22129  (to "larsi@@trym.ifi.uio.no"
22130      (| ("subject" "re:.*" "misc")
22131         ("references" ".*@@.*" "misc")
22132         "spam"))
22133  ...)
22134 @end lisp
22135
22136 This says that all mail to this address is suspect, but if it has a
22137 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
22138 header, it's probably ok.  All the rest goes to the @samp{spam} group.
22139 (This idea probably comes from Tim Pierce.)
22140
22141 In addition, many mail spammers talk directly to your @acronym{SMTP} server
22142 and do not include your email address explicitly in the @code{To}
22143 header.  Why they do this is unknown---perhaps it's to thwart this
22144 thwarting scheme?  In any case, this is trivial to deal with---you just
22145 put anything not addressed to you in the @samp{spam} group by ending
22146 your fancy split rule in this way:
22147
22148 @lisp
22149 (
22150  ...
22151  (to "larsi" "misc")
22152  "spam")
22153 @end lisp
22154
22155 In my experience, this will sort virtually everything into the right
22156 group.  You still have to check the @samp{spam} group from time to time to
22157 check for legitimate mail, though.  If you feel like being a good net
22158 citizen, you can even send off complaints to the proper authorities on
22159 each unsolicited commercial email---at your leisure.
22160
22161 This works for me.  It allows people an easy way to contact me (they can
22162 just press @kbd{r} in the usual way), and I'm not bothered at all with
22163 spam.  It's a win-win situation.  Forging @code{From} headers to point
22164 to non-existent domains is yucky, in my opinion.
22165
22166
22167
22168 @node SpamAssassin
22169 @subsection SpamAssassin, Vipul's Razor, DCC, etc
22170 @cindex SpamAssassin
22171 @cindex Vipul's Razor
22172 @cindex DCC
22173
22174 The days where the hints in the previous section was sufficient in
22175 avoiding spam are coming to an end.  There are many tools out there
22176 that claim to reduce the amount of spam you get.  This section could
22177 easily become outdated fast, as new products replace old, but
22178 fortunately most of these tools seem to have similar interfaces.  Even
22179 though this section will use SpamAssassin as an example, it should be
22180 easy to adapt it to most other tools.
22181
22182 If the tool you are using is not installed on the mail server, you
22183 need to invoke it yourself.  Ideas on how to use the
22184 @code{:postscript} mail source parameter (@pxref{Mail Source
22185 Specifiers}) follow.
22186
22187 @lisp
22188 (setq mail-sources
22189       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
22190         (pop :user "jrl"
22191              :server "pophost"
22192              :postscript
22193              "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
22194 @end lisp
22195
22196 Once you manage to process your incoming spool somehow, thus making
22197 the mail contain e.g.@: a header indicating it is spam, you are ready to
22198 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
22199
22200 @lisp
22201 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
22202                              ...))
22203 @end lisp
22204
22205 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
22206
22207 @lisp
22208 (setq nnmail-split-methods 'nnmail-split-fancy
22209       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
22210                              ...))
22211 @end lisp
22212
22213 Some people might not like the idea of piping the mail through various
22214 programs using a @code{:prescript} (if some program is buggy, you
22215 might lose all mail).  If you are one of them, another solution is to
22216 call the external tools during splitting.  Example fancy split method:
22217
22218 @lisp
22219 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
22220                              ...))
22221 (defun kevin-spamassassin ()
22222   (save-excursion
22223     (widen)
22224     (if (eq 1 (call-process-region (point-min) (point-max)
22225                                    "spamc" nil nil nil "-c"))
22226         "spam")))
22227 @end lisp
22228
22229 Note that with the nnimap backend, message bodies will not be
22230 downloaded by default.  You need to set
22231 @code{nnimap-split-download-body} to t to do that (@pxref{Splitting in
22232 IMAP}).
22233
22234 That is about it.  As some spam is likely to get through anyway, you
22235 might want to have a nifty function to call when you happen to read
22236 spam.  And here is the nifty function:
22237
22238 @lisp
22239  (defun my-gnus-raze-spam ()
22240   "Submit SPAM to Vipul's Razor, then mark it as expirable."
22241   (interactive)
22242   (gnus-summary-show-raw-article)
22243   (gnus-summary-save-in-pipe "razor-report -f -d")
22244   (gnus-summary-mark-as-expirable 1))
22245 @end lisp
22246
22247 @node Hashcash
22248 @subsection Hashcash
22249 @cindex hashcash
22250
22251 A novel technique to fight spam is to require senders to do something
22252 costly for each message they send.  This has the obvious drawback that
22253 you cannot rely on everyone in the world using this technique,
22254 since it is not part of the Internet standards, but it may be useful
22255 in smaller communities.
22256
22257 While the tools in the previous section work well in practice, they
22258 work only because the tools are constantly maintained and updated as
22259 new form of spam appears.  This means that a small percentage of spam
22260 will always get through.  It also means that somewhere, someone needs
22261 to read lots of spam to update these tools.  Hashcash avoids that, but
22262 instead requires that everyone you communicate with supports the
22263 scheme.  You can view the two approaches as pragmatic vs dogmatic.
22264 The approaches have their own advantages and disadvantages, but as
22265 often in the real world, a combination of them is stronger than either
22266 one of them separately.
22267
22268 @cindex X-Hashcash
22269 The ``something costly'' is to burn CPU time, more specifically to
22270 compute a hash collision up to a certain number of bits.  The
22271 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22272 header.  For more details, and for the external application
22273 @code{hashcash} you need to install to use this feature, see
22274 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
22275 information can be found at @uref{http://www.camram.org/}.
22276
22277 If you wish to call hashcash for each message you send, say something
22278 like:
22279
22280 @lisp
22281 (require 'hashcash)
22282 (add-hook 'message-send-hook 'mail-add-payment)
22283 @end lisp
22284
22285 The @file{hashcash.el} library can be found in the Gnus development
22286 contrib directory or at
22287 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}.
22288
22289 You will need to set up some additional variables as well:
22290
22291 @table @code
22292
22293 @item hashcash-default-payment
22294 @vindex hashcash-default-payment
22295 This variable indicates the default number of bits the hash collision
22296 should consist of.  By default this is 0, meaning nothing will be
22297 done.  Suggested useful values include 17 to 29.
22298
22299 @item hashcash-payment-alist
22300 @vindex hashcash-payment-alist
22301 Some receivers may require you to spend burn more CPU time than the
22302 default.  This variable contains a list of @samp{(@var{addr}
22303 @var{amount})} cells, where @var{addr} is the receiver (email address
22304 or newsgroup) and @var{amount} is the number of bits in the collision
22305 that is needed.  It can also contain @samp{(@var{addr} @var{string}
22306 @var{amount})} cells, where the @var{string} is the string to use
22307 (normally the email address or newsgroup name is used).
22308
22309 @item hashcash
22310 @vindex hashcash
22311 Where the @code{hashcash} binary is installed.
22312
22313 @end table
22314
22315 Currently there is no built in functionality in Gnus to verify
22316 hashcash cookies, it is expected that this is performed by your hand
22317 customized mail filtering scripts.  Improvements in this area would be
22318 a useful contribution, however.
22319
22320 @node Filtering Spam Using The Spam ELisp Package
22321 @subsection Filtering Spam Using The Spam ELisp Package
22322 @cindex spam filtering
22323 @cindex spam
22324
22325 The idea behind @file{spam.el} is to have a control center for spam detection
22326 and filtering in Gnus.  To that end, @file{spam.el} does two things: it
22327 filters incoming mail, and it analyzes mail known to be spam or ham.
22328 @dfn{Ham} is the name used throughout @file{spam.el} to indicate
22329 non-spam messages.
22330
22331 First of all, you @strong{must} run the function
22332 @code{spam-initialize} to autoload @code{spam.el} and to install the
22333 @code{spam.el} hooks.  There is one exception: if you use the
22334 @code{spam-use-stat} (@pxref{spam-stat spam filtering}) setting, you
22335 should turn it on before @code{spam-initialize}:
22336
22337 @example
22338 (setq spam-use-stat t) ;; if needed
22339 (spam-initialize)
22340 @end example
22341
22342 So, what happens when you load @file{spam.el}?
22343
22344 You get the following keyboard commands:
22345
22346 @table @kbd
22347
22348 @item M-d
22349 @itemx M s x
22350 @itemx S x
22351 @kindex M-d
22352 @kindex S x
22353 @kindex M s x
22354 @findex gnus-summary-mark-as-spam
22355 @code{gnus-summary-mark-as-spam}.
22356
22357 Mark current article as spam, showing it with the @samp{$} mark.
22358 Whenever you see a spam article, make sure to mark its summary line
22359 with @kbd{M-d} before leaving the group.  This is done automatically
22360 for unread articles in @emph{spam} groups.
22361
22362 @item M s t
22363 @itemx S t
22364 @kindex M s t
22365 @kindex S t
22366 @findex spam-bogofilter-score
22367 @code{spam-bogofilter-score}.
22368
22369 You must have Bogofilter installed for that command to work properly.
22370
22371 @xref{Bogofilter}.
22372
22373 @end table
22374
22375 Also, when you load @file{spam.el}, you will be able to customize its
22376 variables.  Try @code{customize-group} on the @samp{spam} variable
22377 group.
22378
22379 @vindex gnus-spam-process-newsgroups
22380 The concepts of ham processors and spam processors are very important.
22381 Ham processors and spam processors for a group can be set with the
22382 @code{spam-process} group parameter, or the
22383 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
22384 mail known to be non-spam (@emph{ham}) and process it in some way so
22385 that later similar mail will also be considered non-spam.  Spam
22386 processors take mail known to be spam and process it so similar spam
22387 will be detected later.
22388
22389 @vindex gnus-spam-newsgroup-contents
22390 Gnus learns from the spam you get.  You have to collect your spam in
22391 one or more spam groups, and set or customize the variable
22392 @code{spam-junk-mailgroups} as appropriate.  You can also declare
22393 groups to contain spam by setting their group parameter
22394 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
22395 by customizing the corresponding variable
22396 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
22397 parameter and the @code{gnus-spam-newsgroup-contents} variable can
22398 also be used to declare groups as @emph{ham} groups if you set their
22399 classification to @code{gnus-group-spam-classification-ham}.  If
22400 groups are not classified by means of @code{spam-junk-mailgroups},
22401 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
22402 considered @emph{unclassified}.  All groups are unclassified by
22403 default.
22404
22405 @vindex gnus-spam-mark
22406 @cindex $
22407 In spam groups, all messages are considered to be spam by default:
22408 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
22409 group.  If you have seen a message, had it marked as spam, then
22410 unmarked it, it won't be marked as spam when you enter the group
22411 thereafter.  You can disable that behavior, so all unread messages
22412 will get the @samp{$} mark, if you set the
22413 @code{spam-mark-only-unseen-as-spam} parameter to @code{nil}.  You
22414 should remove the @samp{$} mark when you are in the group summary
22415 buffer for every message that is not spam after all.  To remove the
22416 @samp{$} mark, you can use @kbd{M-u} to ``unread'' the article, or
22417 @kbd{d} for declaring it read the non-spam way.  When you leave a
22418 group, all spam-marked (@samp{$}) articles are sent to a spam
22419 processor which will study them as spam samples.
22420
22421 Messages may also be deleted in various other ways, and unless
22422 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
22423 and @samp{r} for default read or explicit delete, marks @samp{X} and
22424 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
22425 low scores, are all considered to be associated with articles which
22426 are not spam.  This assumption might be false, in particular if you
22427 use kill files or score files as means for detecting genuine spam, you
22428 should then adjust the @code{ham-marks} group parameter.
22429
22430 @defvar ham-marks
22431 You can customize this group or topic parameter to be the list of
22432 marks you want to consider ham.  By default, the list contains the
22433 deleted, read, killed, kill-filed, and low-score marks.
22434 @end defvar
22435
22436 @defvar spam-marks
22437 You can customize this group or topic parameter to be the list of
22438 marks you want to consider spam.  By default, the list contains only
22439 the spam mark.
22440 @end defvar
22441
22442 When you leave @emph{any} group, regardless of its
22443 @code{spam-contents} classification, all spam-marked articles are sent
22444 to a spam processor, which will study these as spam samples.  If you
22445 explicit kill a lot, you might sometimes end up with articles marked
22446 @samp{K} which you never saw, and which might accidentally contain
22447 spam.  Best is to make sure that real spam is marked with @samp{$},
22448 and nothing else.
22449
22450 @vindex gnus-ham-process-destinations
22451 When you leave a @emph{spam} group, all spam-marked articles are
22452 marked as expired after processing with the spam processor.  This is
22453 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
22454 @strong{ham} articles in a spam group will be moved to a location
22455 determined by either the @code{ham-process-destination} group
22456 parameter or a match in the @code{gnus-ham-process-destinations}
22457 variable, which is a list of regular expressions matched with group
22458 names (it's easiest to customize this variable with
22459 @code{customize-variable gnus-ham-process-destinations}).  Each
22460 newsgroup specification has the format (REGEXP PROCESSOR) in a
22461 standard Lisp list, if you prefer to customize the variable manually.
22462 The ultimate location is a group name.  If the
22463 @code{ham-process-destination} parameter is not set, ham articles are
22464 left in place.  If the
22465 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
22466 set, the ham articles are marked as unread before being moved.
22467
22468 When you leave a @emph{ham} group, all ham-marked articles are sent to
22469 a ham processor, which will study these as non-spam samples.
22470
22471 @vindex spam-process-ham-in-spam-groups
22472 By default the variable @code{spam-process-ham-in-spam-groups} is
22473 @code{nil}.  Set it to @code{t} if you want ham found in spam groups
22474 to be processed.  Normally this is not done, you are expected instead
22475 to send your ham to a ham group and process it there.
22476
22477 @vindex spam-process-ham-in-nonham-groups
22478 By default the variable @code{spam-process-ham-in-nonham-groups} is
22479 @code{nil}.  Set it to @code{t} if you want ham found in non-ham (spam
22480 or unclassified) groups to be processed.  Normally this is not done,
22481 you are expected instead to send your ham to a ham group and process
22482 it there.
22483
22484 @vindex gnus-spam-process-destinations
22485 When you leave a @emph{ham} or @emph{unclassified} group, all
22486 @strong{spam} articles are moved to a location determined by either
22487 the @code{spam-process-destination} group parameter or a match in the
22488 @code{gnus-spam-process-destinations} variable, which is a list of
22489 regular expressions matched with group names (it's easiest to
22490 customize this variable with @code{customize-variable
22491 gnus-spam-process-destinations}).  Each newsgroup specification has
22492 the repeated format (REGEXP PROCESSOR) and they are all in a standard
22493 Lisp list, if you prefer to customize the variable manually.  The
22494 ultimate location is a group name.  If the
22495 @code{spam-process-destination} parameter is not set, the spam
22496 articles are only expired.
22497
22498 To use the @file{spam.el} facilities for incoming mail filtering, you
22499 must add the following to your fancy split list
22500 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
22501
22502 @example
22503 (: spam-split)
22504 @end example
22505
22506 Note that the fancy split may be called @code{nnmail-split-fancy} or
22507 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
22508 nnimap back ends to retrieve your mail.
22509
22510 The @code{spam-split} function will process incoming mail and send the
22511 mail considered to be spam into the group name given by the variable
22512 @code{spam-split-group}.  By default that group name is @samp{spam},
22513 but you can customize @code{spam-split-group}.  Make sure the contents
22514 of @code{spam-split-group} are an @emph{unqualified} group name, for
22515 instance in an @code{nnimap} server @samp{your-server} the value
22516 @samp{spam} will turn out to be @samp{nnimap+your-server:spam}.  The
22517 value @samp{nnimap+server:spam}, therefore, is wrong and will
22518 actually give you the group
22519 @samp{nnimap+your-server:nnimap+server:spam} which may or may not
22520 work depending on your server's tolerance for strange group names.
22521
22522 You can also give @code{spam-split} a parameter,
22523 e.g. @samp{'spam-use-regex-headers} or @samp{"maybe-spam"}.  Why is
22524 this useful?
22525
22526 Take these split rules (with @code{spam-use-regex-headers} and
22527 @code{spam-use-blackholes} set):
22528
22529 @example
22530  nnimap-split-fancy '(|
22531                       (any "ding" "ding")
22532                       (: spam-split)
22533                       ;; default mailbox
22534                       "mail")
22535 @end example
22536
22537 Now, the problem is that you want all ding messages to make it to the
22538 ding folder.  But that will let obvious spam (for example, spam
22539 detected by SpamAssassin, and @code{spam-use-regex-headers}) through,
22540 when it's sent to the ding list.  On the other hand, some messages to
22541 the ding list are from a mail server in the blackhole list, so the
22542 invocation of @code{spam-split} can't be before the ding rule.
22543
22544 You can let SpamAssassin headers supersede ding rules, but all other
22545 @code{spam-split} rules (including a second invocation of the
22546 regex-headers check) will be after the ding rule:
22547
22548 @example
22549  nnimap-split-fancy '(|
22550 ;;; all spam detected by spam-use-regex-headers goes to "regex-spam"
22551                       (: spam-split "regex-spam" 'spam-use-regex-headers)
22552                       (any "ding" "ding")
22553 ;;; all other spam detected by spam-split goes to spam-split-group
22554                       (: spam-split)
22555                       ;; default mailbox
22556                       "mail")
22557 @end example
22558
22559 Basically, this lets you invoke specific @code{spam-split} checks
22560 depending on your particular needs, and to target the results of those
22561 checks to a particular spam group.  You don't have to throw all mail
22562 into all the spam tests.  Another reason why this is nice is that
22563 messages to mailing lists you have rules for don't have to have
22564 resource-intensive blackhole checks performed on them.  You could also
22565 specify different spam checks for your nnmail split vs. your nnimap
22566 split.  Go crazy.
22567
22568 You still have to have specific checks such as
22569 @code{spam-use-regex-headers} set to @code{t}, even if you specifically
22570 invoke @code{spam-split} with the check.  The reason is that when
22571 loading @file{spam.el}, some conditional loading is done depending on
22572 what @code{spam-use-xyz} variables you have set.
22573
22574 @emph{Note for IMAP users}
22575
22576 The boolean variable @code{nnimap-split-download-body} needs to be
22577 set, if you want to split based on the whole message instead of just
22578 the headers.  By default, the nnimap back end will only retrieve the
22579 message headers.  If you use @code{spam-check-bogofilter},
22580 @code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that
22581 can benefit from the full message body), you should set this variable.
22582 It is not set by default because it will slow @acronym{IMAP} down, and
22583 that is not an appropriate decision to make on behalf of the user.
22584
22585 @xref{Splitting in IMAP}.
22586
22587 @emph{TODO: Currently, spam.el only supports insertion of articles
22588 into a back end.  There is no way to tell spam.el that an article is no
22589 longer spam or ham.}
22590
22591 @emph{TODO: spam.el needs to provide a uniform way of training all the
22592 statistical databases.  Some have that functionality built-in, others
22593 don't.}
22594
22595 The following are the methods you can use to control the behavior of
22596 @code{spam-split} and their corresponding spam and ham processors:
22597
22598 @menu
22599 * Blacklists and Whitelists::
22600 * BBDB Whitelists::
22601 * Gmane Spam Reporting::
22602 * Anti-spam Hashcash Payments::
22603 * Blackholes::
22604 * Regular Expressions Header Matching::
22605 * Bogofilter::
22606 * ifile spam filtering::
22607 * spam-stat spam filtering::
22608 * SpamOracle::
22609 * Extending the spam elisp package::
22610 @end menu
22611
22612 @node Blacklists and Whitelists
22613 @subsubsection Blacklists and Whitelists
22614 @cindex spam filtering
22615 @cindex whitelists, spam filtering
22616 @cindex blacklists, spam filtering
22617 @cindex spam
22618
22619 @defvar spam-use-blacklist
22620
22621 Set this variable to @code{t} if you want to use blacklists when
22622 splitting incoming mail.  Messages whose senders are in the blacklist
22623 will be sent to the @code{spam-split-group}.  This is an explicit
22624 filter, meaning that it acts only on mail senders @emph{declared} to
22625 be spammers.
22626
22627 @end defvar
22628
22629 @defvar spam-use-whitelist
22630
22631 Set this variable to @code{t} if you want to use whitelists when
22632 splitting incoming mail.  Messages whose senders are not in the
22633 whitelist will be sent to the next spam-split rule.  This is an
22634 explicit filter, meaning that unless someone is in the whitelist, their
22635 messages are not assumed to be spam or ham.
22636
22637 @end defvar
22638
22639 @defvar spam-use-whitelist-exclusive
22640
22641 Set this variable to @code{t} if you want to use whitelists as an
22642 implicit filter, meaning that every message will be considered spam
22643 unless the sender is in the whitelist.  Use with care.
22644
22645 @end defvar
22646
22647 @defvar gnus-group-spam-exit-processor-blacklist
22648
22649 Add this symbol to a group's @code{spam-process} parameter by
22650 customizing the group parameters or the
22651 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22652 added to a group's @code{spam-process} parameter, the senders of
22653 spam-marked articles will be added to the blacklist.
22654
22655 @end defvar
22656
22657 @defvar gnus-group-ham-exit-processor-whitelist
22658
22659 Add this symbol to a group's @code{spam-process} parameter by
22660 customizing the group parameters or the
22661 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22662 added to a group's @code{spam-process} parameter, the senders of
22663 ham-marked articles in @emph{ham} groups will be added to the
22664 whitelist.  Note that this ham processor has no effect in @emph{spam}
22665 or @emph{unclassified} groups.
22666
22667 @end defvar
22668
22669 Blacklists are lists of regular expressions matching addresses you
22670 consider to be spam senders.  For instance, to block mail from any
22671 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
22672 blacklist.  You start out with an empty blacklist.  Blacklist entries
22673 use the Emacs regular expression syntax.
22674
22675 Conversely, whitelists tell Gnus what addresses are considered
22676 legitimate.  All messages from whitelisted addresses are considered
22677 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
22678 Emacs regular expression syntax.
22679
22680 The blacklist and whitelist file locations can be customized with the
22681 @code{spam-directory} variable (@file{~/News/spam} by default), or
22682 the @code{spam-whitelist} and @code{spam-blacklist} variables
22683 directly.  The whitelist and blacklist files will by default be in the
22684 @code{spam-directory} directory, named @file{whitelist} and
22685 @file{blacklist} respectively.
22686
22687 @node BBDB Whitelists
22688 @subsubsection BBDB Whitelists
22689 @cindex spam filtering
22690 @cindex BBDB whitelists, spam filtering
22691 @cindex BBDB, spam filtering
22692 @cindex spam
22693
22694 @defvar spam-use-BBDB
22695
22696 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
22697 Whitelists}), but uses the BBDB as the source of whitelisted
22698 addresses, without regular expressions.  You must have the BBDB loaded
22699 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
22700 not in the BBDB will be sent to the next spam-split rule.  This is an
22701 explicit filter, meaning that unless someone is in the BBDB, their
22702 messages are not assumed to be spam or ham.
22703
22704 @end defvar
22705
22706 @defvar spam-use-BBDB-exclusive
22707
22708 Set this variable to @code{t} if you want to use the BBDB as an
22709 implicit filter, meaning that every message will be considered spam
22710 unless the sender is in the BBDB.  Use with care.  Only sender
22711 addresses in the BBDB will be allowed through; all others will be
22712 classified as spammers.
22713
22714 @end defvar
22715
22716 @defvar gnus-group-ham-exit-processor-BBDB
22717
22718 Add this symbol to a group's @code{spam-process} parameter by
22719 customizing the group parameters or the
22720 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22721 added to a group's @code{spam-process} parameter, the senders of
22722 ham-marked articles in @emph{ham} groups will be added to the
22723 BBDB.  Note that this ham processor has no effect in @emph{spam}
22724 or @emph{unclassified} groups.
22725
22726 @end defvar
22727
22728 @node Gmane Spam Reporting
22729 @subsubsection Gmane Spam Reporting
22730 @cindex spam reporting
22731 @cindex Gmane, spam reporting
22732 @cindex Gmane, spam reporting
22733 @cindex spam
22734
22735 @defvar gnus-group-spam-exit-processor-report-gmane
22736
22737 Add this symbol to a group's @code{spam-process} parameter by
22738 customizing the group parameters or the
22739 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22740 added to a group's @code{spam-process} parameter, the spam-marked
22741 articles groups will be reported to the Gmane administrators via a
22742 HTTP request.
22743
22744 Gmane can be found at @uref{http://gmane.org}.
22745
22746 @end defvar
22747
22748 @defvar spam-report-gmane-use-article-number
22749
22750 This variable is @code{t} by default.  Set it to @code{nil} if you are
22751 running your own news server, for instance, and the local article
22752 numbers don't correspond to the Gmane article numbers.  When
22753 @code{spam-report-gmane-use-article-number} is @code{nil},
22754 @code{spam-report.el} will use the @code{X-Report-Spam} header that
22755 Gmane provides.
22756
22757 @end defvar
22758
22759 @node Anti-spam Hashcash Payments
22760 @subsubsection Anti-spam Hashcash Payments
22761 @cindex spam filtering
22762 @cindex hashcash, spam filtering
22763 @cindex spam
22764
22765 @defvar spam-use-hashcash
22766
22767 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
22768 Whitelists}), but uses hashcash tokens for whitelisting messages
22769 instead of the sender address.  You must have the @code{hashcash.el}
22770 package loaded for @code{spam-use-hashcash} to work properly.
22771 Messages without a hashcash payment token will be sent to the next
22772 spam-split rule.  This is an explicit filter, meaning that unless a
22773 hashcash token is found, the messages are not assumed to be spam or
22774 ham.
22775
22776 @end defvar
22777
22778 @node Blackholes
22779 @subsubsection Blackholes
22780 @cindex spam filtering
22781 @cindex blackholes, spam filtering
22782 @cindex spam
22783
22784 @defvar spam-use-blackholes
22785
22786 This option is disabled by default.  You can let Gnus consult the
22787 blackhole-type distributed spam processing systems (DCC, for instance)
22788 when you set this option.  The variable @code{spam-blackhole-servers}
22789 holds the list of blackhole servers Gnus will consult.  The current
22790 list is fairly comprehensive, but make sure to let us know if it
22791 contains outdated servers.
22792
22793 The blackhole check uses the @code{dig.el} package, but you can tell
22794 @file{spam.el} to use @code{dns.el} instead for better performance if
22795 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
22796 this time to set @code{spam-use-dig} to @code{nil} despite the
22797 possible performance improvements, because some users may be unable to
22798 use it, but you can try it and see if it works for you.
22799
22800 @end defvar
22801
22802 @defvar spam-blackhole-servers
22803
22804 The list of servers to consult for blackhole checks.
22805
22806 @end defvar
22807
22808 @defvar spam-blackhole-good-server-regex
22809
22810 A regular expression for IPs that should not be checked against the
22811 blackhole server list.  When set to @code{nil}, it has no effect.
22812
22813 @end defvar
22814
22815 @defvar spam-use-dig
22816
22817 Use the @code{dig.el} package instead of the @code{dns.el} package.
22818 The default setting of @code{t} is recommended.
22819
22820 @end defvar
22821
22822 Blackhole checks are done only on incoming mail.  There is no spam or
22823 ham processor for blackholes.
22824
22825 @node Regular Expressions Header Matching
22826 @subsubsection Regular Expressions Header Matching
22827 @cindex spam filtering
22828 @cindex regular expressions header matching, spam filtering
22829 @cindex spam
22830
22831 @defvar spam-use-regex-headers
22832
22833 This option is disabled by default.  You can let Gnus check the
22834 message headers against lists of regular expressions when you set this
22835 option.  The variables @code{spam-regex-headers-spam} and
22836 @code{spam-regex-headers-ham} hold the list of regular expressions.
22837 Gnus will check against the message headers to determine if the
22838 message is spam or ham, respectively.
22839
22840 @end defvar
22841
22842 @defvar spam-regex-headers-spam
22843
22844 The list of regular expressions that, when matched in the headers of
22845 the message, positively identify it as spam.
22846
22847 @end defvar
22848
22849 @defvar spam-regex-headers-ham
22850
22851 The list of regular expressions that, when matched in the headers of
22852 the message, positively identify it as ham.
22853
22854 @end defvar
22855
22856 Regular expression header checks are done only on incoming mail.
22857 There is no specific spam or ham processor for regular expressions.
22858
22859 @node Bogofilter
22860 @subsubsection Bogofilter
22861 @cindex spam filtering
22862 @cindex bogofilter, spam filtering
22863 @cindex spam
22864
22865 @defvar spam-use-bogofilter
22866
22867 Set this variable if you want @code{spam-split} to use Eric Raymond's
22868 speedy Bogofilter.
22869
22870 With a minimum of care for associating the @samp{$} mark for spam
22871 articles only, Bogofilter training all gets fairly automatic.  You
22872 should do this until you get a few hundreds of articles in each
22873 category, spam or not.  The command @kbd{S t} in summary mode, either
22874 for debugging or for curiosity, shows the @emph{spamicity} score of
22875 the current article (between 0.0 and 1.0).
22876
22877 Bogofilter determines if a message is spam based on a specific
22878 threshold.  That threshold can be customized, consult the Bogofilter
22879 documentation.
22880
22881 If the @code{bogofilter} executable is not in your path, Bogofilter
22882 processing will be turned off.
22883
22884 You should not enable this if you use @code{spam-use-bogofilter-headers}.
22885
22886 @end defvar
22887
22888 @defvar spam-use-bogofilter-headers
22889
22890 Set this variable if you want @code{spam-split} to use Eric Raymond's
22891 speedy Bogofilter, looking only at the message headers.  It works
22892 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
22893 must be in the message already.  Normally you would do this with a
22894 procmail recipe or something similar; consult the Bogofilter
22895 installation documents for details.
22896
22897 You should not enable this if you use @code{spam-use-bogofilter}.
22898
22899 @end defvar
22900
22901 @defvar gnus-group-spam-exit-processor-bogofilter
22902 Add this symbol to a group's @code{spam-process} parameter by
22903 customizing the group parameters or the
22904 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22905 added to a group's @code{spam-process} parameter, spam-marked articles
22906 will be added to the Bogofilter spam database.
22907 @end defvar
22908
22909 @defvar gnus-group-ham-exit-processor-bogofilter
22910 Add this symbol to a group's @code{spam-process} parameter by
22911 customizing the group parameters or the
22912 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22913 added to a group's @code{spam-process} parameter, the ham-marked
22914 articles in @emph{ham} groups will be added to the Bogofilter database
22915 of non-spam messages.  Note that this ham processor has no effect in
22916 @emph{spam} or @emph{unclassified} groups.
22917 @end defvar
22918
22919 @defvar spam-bogofilter-database-directory
22920
22921 This is the directory where Bogofilter will store its databases.  It
22922 is not specified by default, so Bogofilter will use its own default
22923 database directory.
22924
22925 @end defvar
22926
22927 The Bogofilter mail classifier is similar to @command{ifile} in intent and
22928 purpose.  A ham and a spam processor are provided, plus the
22929 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
22930 variables to indicate to spam-split that Bogofilter should either be
22931 used, or has already been used on the article.  The 0.9.2.1 version of
22932 Bogofilter was used to test this functionality.
22933
22934 @node ifile spam filtering
22935 @subsubsection ifile spam filtering
22936 @cindex spam filtering
22937 @cindex ifile, spam filtering
22938 @cindex spam
22939
22940 @defvar spam-use-ifile
22941
22942 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
22943 statistical analyzer similar to Bogofilter.
22944
22945 @end defvar
22946
22947 @defvar spam-ifile-all-categories
22948
22949 Enable this variable if you want @code{spam-use-ifile} to give you all
22950 the ifile categories, not just spam/non-spam.  If you use this, make
22951 sure you train ifile as described in its documentation.
22952
22953 @end defvar
22954
22955 @defvar spam-ifile-spam-category
22956
22957 This is the category of spam messages as far as ifile is concerned.
22958 The actual string used is irrelevant, but you probably want to leave
22959 the default value of @samp{spam}.
22960 @end defvar
22961
22962 @defvar spam-ifile-database-path
22963
22964 This is the filename for the ifile database.  It is not specified by
22965 default, so ifile will use its own default database name.
22966
22967 @end defvar
22968
22969 The ifile mail classifier is similar to Bogofilter in intent and
22970 purpose.  A ham and a spam processor are provided, plus the
22971 @code{spam-use-ifile} variable to indicate to spam-split that ifile
22972 should be used.  The 1.2.1 version of ifile was used to test this
22973 functionality.
22974
22975 @node spam-stat spam filtering
22976 @subsubsection spam-stat spam filtering
22977 @cindex spam filtering
22978 @cindex spam-stat, spam filtering
22979 @cindex spam-stat
22980 @cindex spam
22981
22982 @xref{Filtering Spam Using Statistics with spam-stat}.
22983
22984 @defvar spam-use-stat
22985
22986 Enable this variable if you want @code{spam-split} to use
22987 spam-stat.el, an Emacs Lisp statistical analyzer.
22988
22989 @end defvar
22990
22991 @defvar gnus-group-spam-exit-processor-stat
22992 Add this symbol to a group's @code{spam-process} parameter by
22993 customizing the group parameters or the
22994 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22995 added to a group's @code{spam-process} parameter, the spam-marked
22996 articles will be added to the spam-stat database of spam messages.
22997 @end defvar
22998
22999 @defvar gnus-group-ham-exit-processor-stat
23000 Add this symbol to a group's @code{spam-process} parameter by
23001 customizing the group parameters or the
23002 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23003 added to a group's @code{spam-process} parameter, the ham-marked
23004 articles in @emph{ham} groups will be added to the spam-stat database
23005 of non-spam messages.  Note that this ham processor has no effect in
23006 @emph{spam} or @emph{unclassified} groups.
23007 @end defvar
23008
23009 This enables @file{spam.el} to cooperate with @file{spam-stat.el}.
23010 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
23011 which unlike ifile or Bogofilter does not require external programs.
23012 A spam and a ham processor, and the @code{spam-use-stat} variable for
23013 @code{spam-split} are provided.
23014
23015 @node SpamOracle
23016 @subsubsection Using SpamOracle with Gnus
23017 @cindex spam filtering
23018 @cindex SpamOracle
23019 @cindex spam
23020
23021 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
23022 statistical mail filtering tool written by Xavier Leroy and needs to be
23023 installed separately.
23024
23025 There are several ways to use SpamOracle with Gnus.  In all cases, your
23026 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
23027 then enter an @samp{X-Spam} header indicating whether it regards the
23028 mail as a spam mail or not.
23029
23030 One possibility is to run SpamOracle as a @code{:prescript} from the
23031 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
23032 the advantage that the user can see the @emph{X-Spam} headers.
23033
23034 The easiest method is to make @file{spam.el} (@pxref{Filtering Spam
23035 Using The Spam ELisp Package}) call SpamOracle.
23036
23037 @vindex spam-use-spamoracle
23038 To enable SpamOracle usage by @file{spam.el}, set the variable
23039 @code{spam-use-spamoracle} to @code{t} and configure the
23040 @code{nnmail-split-fancy} or @code{nnimap-split-fancy} as described in
23041 the section @xref{Filtering Spam Using The Spam ELisp Package}.  In
23042 this example the @samp{INBOX} of an nnimap server is filtered using
23043 SpamOracle.  Mails recognized as spam mails will be moved to
23044 @code{spam-split-group}, @samp{Junk} in this case.  Ham messages stay
23045 in @samp{INBOX}:
23046
23047 @example
23048 (setq spam-use-spamoracle t
23049       spam-split-group "Junk"
23050       nnimap-split-inbox '("INBOX")
23051       nnimap-split-rule 'nnimap-split-fancy
23052       nnimap-split-fancy '(| (: spam-split) "INBOX"))
23053 @end example
23054
23055 @defvar spam-use-spamoracle
23056 Set to @code{t} if you want Gnus to enable spam filtering using
23057 SpamOracle.
23058 @end defvar
23059
23060 @defvar spam-spamoracle-binary
23061 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
23062 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
23063 can be customized.
23064 @end defvar
23065
23066 @defvar spam-spamoracle-database
23067 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
23068 store its analyses.  This is controlled by the variable
23069 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
23070 the default SpamOracle database will be used.  In case you want your
23071 database to live somewhere special, set
23072 @code{spam-spamoracle-database} to this path.
23073 @end defvar
23074
23075 SpamOracle employs a statistical algorithm to determine whether a
23076 message is spam or ham.  In order to get good results, meaning few
23077 false hits or misses, SpamOracle needs training.  SpamOracle learns the
23078 characteristics of your spam mails.  Using the @emph{add} mode
23079 (training mode) one has to feed good (ham) and spam mails to
23080 SpamOracle.  This can be done by pressing @kbd{|} in the Summary buffer
23081 and pipe the mail to a SpamOracle process or using @file{spam.el}'s
23082 spam- and ham-processors, which is much more convenient.  For a
23083 detailed description of spam- and ham-processors, @xref{Filtering Spam
23084 Using The Spam ELisp Package}.
23085
23086 @defvar gnus-group-spam-exit-processor-spamoracle
23087 Add this symbol to a group's @code{spam-process} parameter by
23088 customizing the group parameter or the
23089 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23090 to a group's @code{spam-process} parameter, spam-marked articles will be
23091 sent to SpamOracle as spam samples.
23092 @end defvar
23093
23094 @defvar gnus-group-ham-exit-processor-spamoracle
23095 Add this symbol to a group's @code{spam-process} parameter by
23096 customizing the group parameter or the
23097 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23098 to a grup's @code{spam-process} parameter, the ham-marked articles in
23099 @emph{ham} groups will be sent to the SpamOracle as samples of ham
23100 messages.  Note that this ham processor has no effect in @emph{spam} or
23101 @emph{unclassified} groups.
23102 @end defvar
23103
23104 @emph{Example:} These are the Group Parameters of an group that has been
23105 classified as a ham group, meaning that it should only contain ham
23106 messages.
23107 @example
23108  ((spam-contents gnus-group-spam-classification-ham)
23109   (spam-process
23110    (gnus-group-spam-exit-processor-spamoracle)))
23111 @end example
23112 For this group the @code{gnus-group-spam-exit-processor-spamoracle} is
23113 installed.  If the group contains spam message (e.g. because SpamOracle
23114 has not had enough sample messages yet) and the user marks some
23115 messages as spam messages, these messages will be processed by
23116 @code{gnus-group-spam-exit-processor-spamoracle}.  This processor sends
23117 the messages to SpamOracle as new samples for spam.
23118
23119 @node Extending the spam elisp package
23120 @subsubsection Extending the spam elisp package
23121 @cindex spam filtering
23122 @cindex spam elisp package, extending
23123 @cindex extending the spam elisp package
23124
23125 Say you want to add a new back end called blackbox.  For filtering
23126 incoming mail, provide the following:
23127
23128 @enumerate
23129
23130 @item
23131 code
23132
23133 @lisp
23134 (defvar spam-use-blackbox nil
23135   "True if blackbox should be used.")
23136 @end lisp
23137
23138 Add
23139 @example
23140     (spam-use-blackbox   . spam-check-blackbox)
23141 @end example
23142 to @code{spam-list-of-checks}.
23143
23144 @item
23145 functionality
23146
23147 Write the @code{spam-check-blackbox} function.  It should return
23148 @samp{nil} or @code{spam-split-group}.  See the existing
23149 @code{spam-check-*} functions for examples of what you can do.
23150
23151 Make sure to add @code{spam-use-blackbox} to
23152 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
23153 mail analyzer that needs the full message body to operate.
23154
23155 @end enumerate
23156
23157 For processing spam and ham messages, provide the following:
23158
23159 @enumerate
23160
23161 @item
23162 code
23163
23164 Note you don't have to provide a spam or a ham processor.  Only
23165 provide them if Blackbox supports spam or ham processing.
23166
23167 @lisp
23168 (defvar gnus-group-spam-exit-processor-blackbox "blackbox"
23169   "The Blackbox summary exit spam processor.
23170 Only applicable to spam groups.")
23171
23172 (defvar gnus-group-ham-exit-processor-blackbox "blackbox"
23173   "The whitelist summary exit ham processor.
23174 Only applicable to non-spam (unclassified and ham) groups.")
23175
23176 @end lisp
23177
23178 @item
23179 functionality
23180
23181 @lisp
23182 (defun spam-blackbox-register-spam-routine ()
23183   (spam-generic-register-routine
23184    ;; @r{the spam function}
23185    (lambda (article)
23186      (let ((from (spam-fetch-field-from-fast article)))
23187        (when (stringp from)
23188            (blackbox-do-something-with-this-spammer from))))
23189    ;; @r{the ham function}
23190    nil))
23191
23192 (defun spam-blackbox-register-ham-routine ()
23193   (spam-generic-register-routine
23194    ;; @r{the spam function}
23195    nil
23196    ;; @r{the ham function}
23197    (lambda (article)
23198      (let ((from (spam-fetch-field-from-fast article)))
23199        (when (stringp from)
23200            (blackbox-do-something-with-this-ham-sender from))))))
23201 @end lisp
23202
23203 Write the @code{blackbox-do-something-with-this-ham-sender} and
23204 @code{blackbox-do-something-with-this-spammer} functions.  You can add
23205 more complex code than fetching the message sender, but keep in mind
23206 that retrieving the whole message takes significantly longer than the
23207 sender through @code{spam-fetch-field-from-fast}, because the message
23208 senders are kept in memory by Gnus.
23209
23210 @end enumerate
23211
23212
23213 @node Filtering Spam Using Statistics with spam-stat
23214 @subsection Filtering Spam Using Statistics with spam-stat
23215 @cindex Paul Graham
23216 @cindex Graham, Paul
23217 @cindex naive Bayesian spam filtering
23218 @cindex Bayesian spam filtering, naive
23219 @cindex spam filtering, naive Bayesian
23220
23221 Paul Graham has written an excellent essay about spam filtering using
23222 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
23223 Spam}.  In it he describes the inherent deficiency of rule-based
23224 filtering as used by SpamAssassin, for example: Somebody has to write
23225 the rules, and everybody else has to install these rules.  You are
23226 always late.  It would be much better, he argues, to filter mail based
23227 on whether it somehow resembles spam or non-spam.  One way to measure
23228 this is word distribution.  He then goes on to describe a solution
23229 that checks whether a new mail resembles any of your other spam mails
23230 or not.
23231
23232 The basic idea is this:  Create a two collections of your mail, one
23233 with spam, one with non-spam.  Count how often each word appears in
23234 either collection, weight this by the total number of mails in the
23235 collections, and store this information in a dictionary.  For every
23236 word in a new mail, determine its probability to belong to a spam or a
23237 non-spam mail.  Use the 15 most conspicuous words, compute the total
23238 probability of the mail being spam.  If this probability is higher
23239 than a certain threshold, the mail is considered to be spam.
23240
23241 Gnus supports this kind of filtering.  But it needs some setting up.
23242 First, you need two collections of your mail, one with spam, one with
23243 non-spam.  Then you need to create a dictionary using these two
23244 collections, and save it.  And last but not least, you need to use
23245 this dictionary in your fancy mail splitting rules.
23246
23247 @menu
23248 * Creating a spam-stat dictionary::
23249 * Splitting mail using spam-stat::
23250 * Low-level interface to the spam-stat dictionary::
23251 @end menu
23252
23253 @node Creating a spam-stat dictionary
23254 @subsubsection Creating a spam-stat dictionary
23255
23256 Before you can begin to filter spam based on statistics, you must
23257 create these statistics based on two mail collections, one with spam,
23258 one with non-spam.  These statistics are then stored in a dictionary
23259 for later use.  In order for these statistics to be meaningful, you
23260 need several hundred emails in both collections.
23261
23262 Gnus currently supports only the nnml back end for automated dictionary
23263 creation.  The nnml back end stores all mails in a directory, one file
23264 per mail.  Use the following:
23265
23266 @defun spam-stat-process-spam-directory
23267 Create spam statistics for every file in this directory.  Every file
23268 is treated as one spam mail.
23269 @end defun
23270
23271 @defun spam-stat-process-non-spam-directory
23272 Create non-spam statistics for every file in this directory.  Every
23273 file is treated as one non-spam mail.
23274 @end defun
23275
23276 Usually you would call @code{spam-stat-process-spam-directory} on a
23277 directory such as @file{~/Mail/mail/spam} (this usually corresponds
23278 the the group @samp{nnml:mail.spam}), and you would call
23279 @code{spam-stat-process-non-spam-directory} on a directory such as
23280 @file{~/Mail/mail/misc} (this usually corresponds the the group
23281 @samp{nnml:mail.misc}).
23282
23283 When you are using @acronym{IMAP}, you won't have the mails available
23284 locally, so that will not work.  One solution is to use the Gnus Agent
23285 to cache the articles.  Then you can use directories such as
23286 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
23287 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
23288
23289 @defvar spam-stat
23290 This variable holds the hash-table with all the statistics---the
23291 dictionary we have been talking about.  For every word in either
23292 collection, this hash-table stores a vector describing how often the
23293 word appeared in spam and often it appeared in non-spam mails.
23294 @end defvar
23295
23296 If you want to regenerate the statistics from scratch, you need to
23297 reset the dictionary.
23298
23299 @defun spam-stat-reset
23300 Reset the @code{spam-stat} hash-table, deleting all the statistics.
23301 @end defun
23302
23303 When you are done, you must save the dictionary.  The dictionary may
23304 be rather large.  If you will not update the dictionary incrementally
23305 (instead, you will recreate it once a month, for example), then you
23306 can reduce the size of the dictionary by deleting all words that did
23307 not appear often enough or that do not clearly belong to only spam or
23308 only non-spam mails.
23309
23310 @defun spam-stat-reduce-size
23311 Reduce the size of the dictionary.  Use this only if you do not want
23312 to update the dictionary incrementally.
23313 @end defun
23314
23315 @defun spam-stat-save
23316 Save the dictionary.
23317 @end defun
23318
23319 @defvar spam-stat-file
23320 The filename used to store the dictionary.  This defaults to
23321 @file{~/.spam-stat.el}.
23322 @end defvar
23323
23324 @node Splitting mail using spam-stat
23325 @subsubsection Splitting mail using spam-stat
23326
23327 In order to use @code{spam-stat} to split your mail, you need to add the
23328 following to your @file{~/.gnus.el} file:
23329
23330 @lisp
23331 (require 'spam-stat)
23332 (spam-stat-load)
23333 @end lisp
23334
23335 This will load the necessary Gnus code, and the dictionary you
23336 created.
23337
23338 Next, you need to adapt your fancy splitting rules:  You need to
23339 determine how to use @code{spam-stat}.  The following examples are for
23340 the nnml back end.  Using the nnimap back end works just as well.  Just
23341 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
23342
23343 In the simplest case, you only have two groups, @samp{mail.misc} and
23344 @samp{mail.spam}.  The following expression says that mail is either
23345 spam or it should go into @samp{mail.misc}.  If it is spam, then
23346 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
23347
23348 @lisp
23349 (setq nnmail-split-fancy
23350       `(| (: spam-stat-split-fancy)
23351           "mail.misc"))
23352 @end lisp
23353
23354 @defvar spam-stat-split-fancy-spam-group
23355 The group to use for spam.  Default is @samp{mail.spam}.
23356 @end defvar
23357
23358 If you also filter mail with specific subjects into other groups, use
23359 the following expression.  Only mails not matching the regular
23360 expression are considered potential spam.
23361
23362 @lisp
23363 (setq nnmail-split-fancy
23364       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
23365           (: spam-stat-split-fancy)
23366           "mail.misc"))
23367 @end lisp
23368
23369 If you want to filter for spam first, then you must be careful when
23370 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
23371 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
23372 non-spam, therefore both should be in your collection of non-spam
23373 mails, when creating the dictionary!
23374
23375 @lisp
23376 (setq nnmail-split-fancy
23377       `(| (: spam-stat-split-fancy)
23378           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23379           "mail.misc"))
23380 @end lisp
23381
23382 You can combine this with traditional filtering.  Here, we move all
23383 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
23384 @code{spam-stat-split-fancy} will never see them, the mails in
23385 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
23386 nor in your collection of non-spam mails, when creating the
23387 dictionary!
23388
23389 @lisp
23390 (setq nnmail-split-fancy
23391       `(| ("Content-Type" "text/html" "mail.spam.filtered")
23392           (: spam-stat-split-fancy)
23393           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23394           "mail.misc"))
23395 @end lisp
23396
23397
23398 @node Low-level interface to the spam-stat dictionary
23399 @subsubsection Low-level interface to the spam-stat dictionary
23400
23401 The main interface to using @code{spam-stat}, are the following functions:
23402
23403 @defun spam-stat-buffer-is-spam
23404 Called in a buffer, that buffer is considered to be a new spam mail.
23405 Use this for new mail that has not been processed before.
23406 @end defun
23407
23408 @defun spam-stat-buffer-is-no-spam
23409 Called in a buffer, that buffer is considered to be a new non-spam
23410 mail.  Use this for new mail that has not been processed before.
23411 @end defun
23412
23413 @defun spam-stat-buffer-change-to-spam
23414 Called in a buffer, that buffer is no longer considered to be normal
23415 mail but spam.  Use this to change the status of a mail that has
23416 already been processed as non-spam.
23417 @end defun
23418
23419 @defun spam-stat-buffer-change-to-non-spam
23420 Called in a buffer, that buffer is no longer considered to be spam but
23421 normal mail.  Use this to change the status of a mail that has already
23422 been processed as spam.
23423 @end defun
23424
23425 @defun spam-stat-save
23426 Save the hash table to the file.  The filename used is stored in the
23427 variable @code{spam-stat-file}.
23428 @end defun
23429
23430 @defun spam-stat-load
23431 Load the hash table from a file.  The filename used is stored in the
23432 variable @code{spam-stat-file}.
23433 @end defun
23434
23435 @defun spam-stat-score-word
23436 Return the spam score for a word.
23437 @end defun
23438
23439 @defun spam-stat-score-buffer
23440 Return the spam score for a buffer.
23441 @end defun
23442
23443 @defun spam-stat-split-fancy
23444 Use this function for fancy mail splitting.  Add the rule @samp{(:
23445 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
23446 @end defun
23447
23448 Make sure you load the dictionary before using it.  This requires the
23449 following in your @file{~/.gnus.el} file:
23450
23451 @lisp
23452 (require 'spam-stat)
23453 (spam-stat-load)
23454 @end lisp
23455
23456 Typical test will involve calls to the following functions:
23457
23458 @smallexample
23459 Reset: (setq spam-stat (make-hash-table :test 'equal))
23460 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23461 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23462 Save table: (spam-stat-save)
23463 File size: (nth 7 (file-attributes spam-stat-file))
23464 Number of words: (hash-table-count spam-stat)
23465 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23466 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23467 Reduce table size: (spam-stat-reduce-size)
23468 Save table: (spam-stat-save)
23469 File size: (nth 7 (file-attributes spam-stat-file))
23470 Number of words: (hash-table-count spam-stat)
23471 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23472 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23473 @end smallexample
23474
23475 Here is how you would create your dictionary:
23476
23477 @smallexample
23478 Reset: (setq spam-stat (make-hash-table :test 'equal))
23479 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23480 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23481 Repeat for any other non-spam group you need...
23482 Reduce table size: (spam-stat-reduce-size)
23483 Save table: (spam-stat-save)
23484 @end smallexample
23485
23486 @node Various Various
23487 @section Various Various
23488 @cindex mode lines
23489 @cindex highlights
23490
23491 @table @code
23492
23493 @item gnus-home-directory
23494 @vindex gnus-home-directory
23495 All Gnus file and directory variables will be initialized from this
23496 variable, which defaults to @file{~/}.
23497
23498 @item gnus-directory
23499 @vindex gnus-directory
23500 Most Gnus storage file and directory variables will be initialized from
23501 this variable, which defaults to the @env{SAVEDIR} environment
23502 variable, or @file{~/News/} if that variable isn't set.
23503
23504 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
23505 This means that other directory variables that are initialized from this
23506 variable won't be set properly if you set this variable in
23507 @file{~/.gnus.el}.  Set this variable in @file{.emacs} instead.
23508
23509 @item gnus-default-directory
23510 @vindex gnus-default-directory
23511 Not related to the above variable at all---this variable says what the
23512 default directory of all Gnus buffers should be.  If you issue commands
23513 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
23514 default directory.  If this variable is @code{nil} (which is the
23515 default), the default directory will be the default directory of the
23516 buffer you were in when you started Gnus.
23517
23518 @item gnus-verbose
23519 @vindex gnus-verbose
23520 This variable is an integer between zero and ten.  The higher the value,
23521 the more messages will be displayed.  If this variable is zero, Gnus
23522 will never flash any messages, if it is seven (which is the default),
23523 most important messages will be shown, and if it is ten, Gnus won't ever
23524 shut up, but will flash so many messages it will make your head swim.
23525
23526 @item gnus-verbose-backends
23527 @vindex gnus-verbose-backends
23528 This variable works the same way as @code{gnus-verbose}, but it applies
23529 to the Gnus back ends instead of Gnus proper.
23530
23531 @item nnheader-max-head-length
23532 @vindex nnheader-max-head-length
23533 When the back ends read straight heads of articles, they all try to read
23534 as little as possible.  This variable (default 4096) specifies
23535 the absolute max length the back ends will try to read before giving up
23536 on finding a separator line between the head and the body.  If this
23537 variable is @code{nil}, there is no upper read bound.  If it is
23538 @code{t}, the back ends won't try to read the articles piece by piece,
23539 but read the entire articles.  This makes sense with some versions of
23540 @code{ange-ftp} or @code{efs}.
23541
23542 @item nnheader-head-chop-length
23543 @vindex nnheader-head-chop-length
23544 This variable (default 2048) says how big a piece of each article to
23545 read when doing the operation described above.
23546
23547 @item nnheader-file-name-translation-alist
23548 @vindex nnheader-file-name-translation-alist
23549 @cindex file names
23550 @cindex invalid characters in file names
23551 @cindex characters in file names
23552 This is an alist that says how to translate characters in file names.
23553 For instance, if @samp{:} is invalid as a file character in file names
23554 on your system (you OS/2 user you), you could say something like:
23555
23556 @lisp
23557 @group
23558 (setq nnheader-file-name-translation-alist
23559       '((?: . ?_)))
23560 @end group
23561 @end lisp
23562
23563 In fact, this is the default value for this variable on OS/2 and MS
23564 Windows (phooey) systems.
23565
23566 @item gnus-hidden-properties
23567 @vindex gnus-hidden-properties
23568 This is a list of properties to use to hide ``invisible'' text.  It is
23569 @code{(invisible t intangible t)} by default on most systems, which
23570 makes invisible text invisible and intangible.
23571
23572 @item gnus-parse-headers-hook
23573 @vindex gnus-parse-headers-hook
23574 A hook called before parsing headers.  It can be used, for instance, to
23575 gather statistics on the headers fetched, or perhaps you'd like to prune
23576 some headers.  I don't see why you'd want that, though.
23577
23578 @item gnus-shell-command-separator
23579 @vindex gnus-shell-command-separator
23580 String used to separate two shell commands.  The default is @samp{;}.
23581
23582 @item gnus-invalid-group-regexp
23583 @vindex gnus-invalid-group-regexp
23584
23585 Regexp to match ``invalid'' group names when querying user for a group
23586 name.  The default value catches some @strong{really} invalid group
23587 names who could possibly mess up Gnus internally (like allowing
23588 @samp{:} in a group name, which is normally used to delimit method and
23589 group).
23590
23591 @acronym{IMAP} users might want to allow @samp{/} in group names though.
23592
23593
23594 @end table
23595
23596 @node The End
23597 @chapter The End
23598
23599 Well, that's the manual---you can get on with your life now.  Keep in
23600 touch.  Say hello to your cats from me.
23601
23602 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
23603
23604 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
23605
23606 @quotation
23607 @strong{Te Deum}
23608
23609 @sp 1
23610 Not because of victories @*
23611 I sing,@*
23612 having none,@*
23613 but for the common sunshine,@*
23614 the breeze,@*
23615 the largess of the spring.
23616
23617 @sp 1
23618 Not for victory@*
23619 but for the day's work done@*
23620 as well as I was able;@*
23621 not for a seat upon the dais@*
23622 but at the common table.@*
23623 @end quotation
23624
23625
23626 @node Appendices
23627 @chapter Appendices
23628
23629 @menu
23630 * XEmacs::                      Requirements for installing under XEmacs.
23631 * History::                     How Gnus got where it is today.
23632 * On Writing Manuals::          Why this is not a beginner's guide.
23633 * Terminology::                 We use really difficult, like, words here.
23634 * Customization::               Tailoring Gnus to your needs.
23635 * Troubleshooting::             What you might try if things do not work.
23636 * Gnus Reference Guide::        Rilly, rilly technical stuff.
23637 * Emacs for Heathens::          A short introduction to Emacsian terms.
23638 * Frequently Asked Questions::  The Gnus FAQ
23639 @end menu
23640
23641
23642 @node XEmacs
23643 @section XEmacs
23644 @cindex XEmacs
23645 @cindex installing under XEmacs
23646
23647 XEmacs is distributed as a collection of packages.  You should install
23648 whatever packages the Gnus XEmacs package requires.  The current
23649 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
23650 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
23651 @samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
23652 @samp{misc-games} package is required for Morse decoding.
23653
23654
23655 @node History
23656 @section History
23657
23658 @cindex history
23659 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
23660 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
23661
23662 If you want to investigate the person responsible for this outrage,
23663 you can point your (feh!) web browser to
23664 @uref{http://quimby.gnus.org/}.  This is also the primary
23665 distribution point for the new and spiffy versions of Gnus, and is
23666 known as The Site That Destroys Newsrcs And Drives People Mad.
23667
23668 During the first extended alpha period of development, the new Gnus was
23669 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
23670 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
23671 (Besides, the ``Gnus'' in this abbreviation should probably be
23672 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
23673 appropriate name, don't you think?)
23674
23675 In any case, after spending all that energy on coming up with a new and
23676 spunky name, we decided that the name was @emph{too} spunky, so we
23677 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
23678 ``@sc{gnus}''.  New vs. old.
23679
23680 @menu
23681 * Gnus Versions::               What Gnus versions have been released.
23682 * Other Gnus Versions::         Other Gnus versions that also have been released.
23683 * Why?::                        What's the point of Gnus?
23684 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
23685 * Conformity::                  Gnus tries to conform to all standards.
23686 * Emacsen::                     Gnus can be run on a few modern Emacsen.
23687 * Gnus Development::            How Gnus is developed.
23688 * Contributors::                Oodles of people.
23689 * New Features::                Pointers to some of the new stuff in Gnus.
23690 @end menu
23691
23692
23693 @node Gnus Versions
23694 @subsection Gnus Versions
23695 @cindex ding Gnus
23696 @cindex September Gnus
23697 @cindex Red Gnus
23698 @cindex Quassia Gnus
23699 @cindex Pterodactyl Gnus
23700 @cindex Oort Gnus
23701 @cindex No Gnus
23702 @cindex Gnus versions
23703
23704 The first ``proper'' release of Gnus 5 was done in November 1995 when it
23705 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
23706 plus 15 Gnus 5.0 releases).
23707
23708 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
23709 releases)) was released under the name ``Gnus 5.2'' (40 releases).
23710
23711 On July 28th 1996 work on Red Gnus was begun, and it was released on
23712 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
23713
23714 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
23715 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
23716
23717 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
23718 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
23719 1999.
23720
23721 On the 26th of October 2000, Oort Gnus was begun.
23722
23723 If you happen upon a version of Gnus that has a prefixed name --
23724 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
23725 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
23726 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
23727 run.  Walk away, calmly, until you're out of its reach.  Find a proper
23728 released version of Gnus and snuggle up to that instead.
23729
23730
23731 @node Other Gnus Versions
23732 @subsection Other Gnus Versions
23733 @cindex Semi-gnus
23734
23735 In addition to the versions of Gnus which have had their releases
23736 coordinated by Lars, one major development has been Semi-gnus from
23737 Japan.  It's based on a library called @acronym{SEMI}, which provides
23738 @acronym{MIME} capabilities.
23739
23740 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
23741 Collectively, they are called ``Semi-gnus'', and different strains are
23742 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
23743 @acronym{MIME} and multilingualization things, especially important for
23744 Japanese users.
23745
23746
23747 @node Why?
23748 @subsection Why?
23749
23750 What's the point of Gnus?
23751
23752 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
23753 newsreader, that lets you do anything you can think of.  That was my
23754 original motivation, but while working on Gnus, it has become clear to
23755 me that this generation of newsreaders really belong in the stone age.
23756 Newsreaders haven't developed much since the infancy of the net.  If the
23757 volume continues to rise with the current rate of increase, all current
23758 newsreaders will be pretty much useless.  How do you deal with
23759 newsgroups that have thousands of new articles each day?  How do you
23760 keep track of millions of people who post?
23761
23762 Gnus offers no real solutions to these questions, but I would very much
23763 like to see Gnus being used as a testing ground for new methods of
23764 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
23765 to separate the newsreader from the back ends, Gnus now offers a simple
23766 interface for anybody who wants to write new back ends for fetching mail
23767 and news from different sources.  I have added hooks for customizations
23768 everywhere I could imagine it being useful.  By doing so, I'm inviting
23769 every one of you to explore and invent.
23770
23771 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
23772 @kbd{C-u 100 M-x all-hail-xemacs}.
23773
23774
23775 @node Compatibility
23776 @subsection Compatibility
23777
23778 @cindex compatibility
23779 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
23780 bindings have been kept.  More key bindings have been added, of course,
23781 but only in one or two obscure cases have old bindings been changed.
23782
23783 Our motto is:
23784 @quotation
23785 @cartouche
23786 @center In a cloud bones of steel.
23787 @end cartouche
23788 @end quotation
23789
23790 All commands have kept their names.  Some internal functions have changed
23791 their names.
23792
23793 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
23794 Articles}.
23795
23796 One major compatibility question is the presence of several summary
23797 buffers.  All variables relevant while reading a group are
23798 buffer-local to the summary buffer they belong in.  Although many
23799 important variables have their values copied into their global
23800 counterparts whenever a command is executed in the summary buffer, this
23801 change might lead to incorrect values being used unless you are careful.
23802
23803 All code that relies on knowledge of @sc{gnus} internals will probably
23804 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
23805 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
23806 maintains a hash table that points to the entries in this alist (which
23807 speeds up many functions), and changing the alist directly will lead to
23808 peculiar results.
23809
23810 @cindex hilit19
23811 @cindex highlighting
23812 Old hilit19 code does not work at all.  In fact, you should probably
23813 remove all hilit code from all Gnus hooks
23814 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
23815 Gnus provides various integrated functions for highlighting.  These are
23816 faster and more accurate.  To make life easier for everybody, Gnus will
23817 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
23818 Away!
23819
23820 Packages like @code{expire-kill} will no longer work.  As a matter of
23821 fact, you should probably remove all old @sc{gnus} packages (and other
23822 code) when you start using Gnus.  More likely than not, Gnus already
23823 does what you have written code to make @sc{gnus} do.  (Snicker.)
23824
23825 Even though old methods of doing things are still supported, only the
23826 new methods are documented in this manual.  If you detect a new method of
23827 doing something while reading this manual, that does not mean you have
23828 to stop doing it the old way.
23829
23830 Gnus understands all @sc{gnus} startup files.
23831
23832 @kindex M-x gnus-bug
23833 @findex gnus-bug
23834 @cindex reporting bugs
23835 @cindex bugs
23836 Overall, a casual user who hasn't written much code that depends on
23837 @sc{gnus} internals should suffer no problems.  If problems occur,
23838 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
23839
23840 @vindex gnus-bug-create-help-buffer
23841 If you are in the habit of sending bug reports @emph{very} often, you
23842 may find the helpful help buffer annoying after a while.  If so, set
23843 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
23844 up at you.
23845
23846
23847 @node Conformity
23848 @subsection Conformity
23849
23850 No rebels without a clue here, ma'am.  We conform to all standards known
23851 to (wo)man.  Except for those standards and/or conventions we disagree
23852 with, of course.
23853
23854 @table @strong
23855
23856 @item RFC (2)822
23857 @cindex RFC 822
23858 @cindex RFC 2822
23859 There are no known breaches of this standard.
23860
23861 @item RFC 1036
23862 @cindex RFC 1036
23863 There are no known breaches of this standard, either.
23864
23865 @item Son-of-RFC 1036
23866 @cindex Son-of-RFC 1036
23867 We do have some breaches to this one.
23868
23869 @table @emph
23870
23871 @item X-Newsreader
23872 @itemx User-Agent
23873 These are considered to be ``vanity headers'', while I consider them
23874 to be consumer information.  After seeing so many badly formatted
23875 articles coming from @code{tin} and @code{Netscape} I know not to use
23876 either of those for posting articles.  I would not have known that if
23877 it wasn't for the @code{X-Newsreader} header.
23878 @end table
23879
23880 @item USEFOR
23881 @cindex USEFOR
23882 USEFOR is an IETF working group writing a successor to RFC 1036, based
23883 on Son-of-RFC 1036.  They have produced a number of drafts proposing
23884 various changes to the format of news articles.  The Gnus towers will
23885 look into implementing the changes when the draft is accepted as an RFC.
23886
23887 @item MIME - RFC 2045-2049 etc
23888 @cindex @acronym{MIME}
23889 All the various @acronym{MIME} RFCs are supported.
23890
23891 @item Disposition Notifications - RFC 2298
23892 Message Mode is able to request notifications from the receiver.
23893
23894 @item PGP - RFC 1991 and RFC 2440
23895 @cindex RFC 1991
23896 @cindex RFC 2440
23897 RFC 1991 is the original @acronym{PGP} message specification,
23898 published as an informational RFC.  RFC 2440 was the follow-up, now
23899 called Open PGP, and put on the Standards Track.  Both document a
23900 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
23901 encoding (signing and encryption) and decoding (verification and
23902 decryption).
23903
23904 @item PGP/MIME - RFC 2015/3156
23905 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
23906 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
23907 Gnus supports both encoding and decoding.
23908
23909 @item S/MIME - RFC 2633
23910 RFC 2633 describes the @acronym{S/MIME} format.
23911
23912 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
23913 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
23914 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
23915 authentication for @acronym{IMAP}.  RFC 2086 describes access control
23916 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
23917 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
23918 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
23919 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
23920
23921 @end table
23922
23923 If you ever notice Gnus acting non-compliant with regards to the texts
23924 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
23925 know.
23926
23927
23928 @node Emacsen
23929 @subsection Emacsen
23930 @cindex Emacsen
23931 @cindex XEmacs
23932 @cindex Mule
23933 @cindex Emacs
23934
23935 Gnus should work on:
23936
23937 @itemize @bullet
23938
23939 @item
23940 Emacs 20.7 and up.
23941
23942 @item
23943 XEmacs 21.1 and up.
23944
23945 @end itemize
23946
23947 This Gnus version will absolutely not work on any Emacsen older than
23948 that.  Not reliably, at least.  Older versions of Gnus may work on older
23949 Emacs versions.
23950
23951 There are some vague differences between Gnus on the various
23952 platforms---XEmacs features more graphics (a logo and a toolbar)---but
23953 other than that, things should look pretty much the same under all
23954 Emacsen.
23955
23956
23957 @node Gnus Development
23958 @subsection Gnus Development
23959
23960 Gnus is developed in a two-phased cycle.  The first phase involves much
23961 discussion on the @samp{ding@@gnus.org} mailing list, where people
23962 propose changes and new features, post patches and new back ends.  This
23963 phase is called the @dfn{alpha} phase, since the Gnusae released in this
23964 phase are @dfn{alpha releases}, or (perhaps more commonly in other
23965 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
23966 unstable and should not be used by casual users.  Gnus alpha releases
23967 have names like ``Red Gnus'' and ``Quassia Gnus''.
23968
23969 After futzing around for 50-100 alpha releases, Gnus is declared
23970 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
23971 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
23972 supposed to be able to use these, and these are mostly discussed on the
23973 @samp{gnu.emacs.gnus} newsgroup.
23974
23975 @cindex Incoming*
23976 @vindex mail-source-delete-incoming
23977 Some variable defaults differ between alpha Gnusae and released Gnusae.
23978 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
23979 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
23980 lossage of mail if an alpha release hiccups while handling the mail.
23981
23982 The division of discussion between the ding mailing list and the Gnus
23983 newsgroup is not purely based on publicity concerns.  It's true that
23984 having people write about the horrible things that an alpha Gnus release
23985 can do (sometimes) in a public forum may scare people off, but more
23986 importantly, talking about new experimental features that have been
23987 introduced may confuse casual users.  New features are frequently
23988 introduced, fiddled with, and judged to be found wanting, and then
23989 either discarded or totally rewritten.  People reading the mailing list
23990 usually keep up with these rapid changes, while people on the newsgroup
23991 can't be assumed to do so.
23992
23993
23994
23995 @node Contributors
23996 @subsection Contributors
23997 @cindex contributors
23998
23999 The new Gnus version couldn't have been done without the help of all the
24000 people on the (ding) mailing list.  Every day for over a year I have
24001 gotten billions of nice bug reports from them, filling me with joy,
24002 every single one of them.  Smooches.  The people on the list have been
24003 tried beyond endurance, what with my ``oh, that's a neat idea <type
24004 type>, yup, I'll release it right away <ship off> no wait, that doesn't
24005 work at all <type type>, yup, I'll ship that one off right away <ship
24006 off> no, wait, that absolutely does not work'' policy for releases.
24007 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
24008 ``worser''? ``much worser''?  ``worsest''?)
24009
24010 I would like to take this opportunity to thank the Academy for@dots{}  oops,
24011 wrong show.
24012
24013 @itemize @bullet
24014
24015 @item
24016 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
24017
24018 @item
24019 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
24020 nnwarchive and many, many other things connected with @acronym{MIME} and
24021 other types of en/decoding, as well as general bug fixing, new
24022 functionality and stuff.
24023
24024 @item
24025 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
24026 well as numerous other things).
24027
24028 @item
24029 Luis Fernandes---design and graphics.
24030
24031 @item
24032 Joe Reiss---creator of the smiley faces.
24033
24034 @item
24035 Justin Sheehy---the @acronym{FAQ} maintainer.
24036
24037 @item
24038 Erik Naggum---help, ideas, support, code and stuff.
24039
24040 @item
24041 Wes Hardaker---@file{gnus-picon.el} and the manual section on
24042 @dfn{picons} (@pxref{Picons}).
24043
24044 @item
24045 Kim-Minh Kaplan---further work on the picon code.
24046
24047 @item
24048 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
24049 (@pxref{GroupLens}).
24050
24051 @item
24052 Sudish Joseph---innumerable bug fixes.
24053
24054 @item
24055 Ilja Weis---@file{gnus-topic.el}.
24056
24057 @item
24058 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
24059
24060 @item
24061 Vladimir Alexiev---the refcard and reference booklets.
24062
24063 @item
24064 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
24065 distribution by Felix Lee and JWZ.
24066
24067 @item
24068 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
24069
24070 @item
24071 Peter Mutsaers---orphan article scoring code.
24072
24073 @item
24074 Ken Raeburn---POP mail support.
24075
24076 @item
24077 Hallvard B Furuseth---various bits and pieces, especially dealing with
24078 .newsrc files.
24079
24080 @item
24081 Brian Edmonds---@file{gnus-bbdb.el}.
24082
24083 @item
24084 David Moore---rewrite of @file{nnvirtual.el} and many other things.
24085
24086 @item
24087 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
24088
24089 @item
24090 François Pinard---many, many interesting and thorough bug reports, as
24091 well as autoconf support.
24092
24093 @end itemize
24094
24095 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
24096 Borges, and Jost Krieger proof-reading parts of the manual.
24097
24098 The following people have contributed many patches and suggestions:
24099
24100 Christopher Davis,
24101 Andrew Eskilsson,
24102 Kai Grossjohann,
24103 Kevin Greiner,
24104 Jesper Harder,
24105 Paul Jarc,
24106 Simon Josefsson,
24107 David KÃ¥gedal,
24108 Richard Pieri,
24109 Fabrice Popineau,
24110 Daniel Quinlan,
24111 Michael Shields,
24112 Reiner Steib,
24113 Jason L. Tibbitts, III,
24114 Jack Vinson,
24115 Katsumi Yamaoka, @c Yamaoka
24116 and
24117 Teodor Zlatanov.
24118
24119 Also thanks to the following for patches and stuff:
24120
24121 Jari Aalto,
24122 Adrian Aichner,
24123 Vladimir Alexiev,
24124 Russ Allbery,
24125 Peter Arius,
24126 Matt Armstrong,
24127 Marc Auslander,
24128 Miles Bader,
24129 Alexei V. Barantsev,
24130 Frank Bennett,
24131 Robert Bihlmeyer,
24132 Chris Bone,
24133 Mark Borges,
24134 Mark Boyns,
24135 Lance A. Brown,
24136 Rob Browning,
24137 Kees de Bruin,
24138 Martin Buchholz,
24139 Joe Buehler,
24140 Kevin Buhr,
24141 Alastair Burt,
24142 Joao Cachopo,
24143 Zlatko Calusic,
24144 Massimo Campostrini,
24145 Castor,
24146 David Charlap,
24147 Dan Christensen,
24148 Kevin Christian,
24149 Jae-you Chung, @c ?
24150 James H. Cloos, Jr.,
24151 Laura Conrad,
24152 Michael R. Cook,
24153 Glenn Coombs,
24154 Andrew J. Cosgriff,
24155 Neil Crellin,
24156 Frank D. Cringle,
24157 Geoffrey T. Dairiki,
24158 Andre Deparade,
24159 Ulrik Dickow,
24160 Dave Disser,
24161 Rui-Tao Dong, @c ?
24162 Joev Dubach,
24163 Michael Welsh Duggan,
24164 Dave Edmondson,
24165 Paul Eggert,
24166 Mark W. Eichin,
24167 Karl Eichwalder,
24168 Enami Tsugutomo, @c Enami
24169 Michael Ernst,
24170 Luc Van Eycken,
24171 Sam Falkner,
24172 Nelson Jose dos Santos Ferreira,
24173 Sigbjorn Finne,
24174 Sven Fischer,
24175 Paul Fisher,
24176 Decklin Foster,
24177 Gary D. Foster,
24178 Paul Franklin,
24179 Guy Geens,
24180 Arne Georg Gleditsch,
24181 David S. Goldberg,
24182 Michelangelo Grigni,
24183 Dale Hagglund,
24184 D. Hall,
24185 Magnus Hammerin,
24186 Kenichi Handa, @c Handa
24187 Raja R. Harinath,
24188 Yoshiki Hayashi, @c Hayashi
24189 P. E. Jareth Hein,
24190 Hisashige Kenji, @c Hisashige
24191 Scott Hofmann,
24192 Marc Horowitz,
24193 Gunnar Horrigmo,
24194 Richard Hoskins,
24195 Brad Howes,
24196 Miguel de Icaza,
24197 François Felix Ingrand,
24198 Tatsuya Ichikawa, @c Ichikawa
24199 Ishikawa Ichiro, @c Ishikawa
24200 Lee Iverson,
24201 Iwamuro Motonori, @c Iwamuro
24202 Rajappa Iyer,
24203 Andreas Jaeger,
24204 Adam P. Jenkins,
24205 Randell Jesup,
24206 Fred Johansen,
24207 Gareth Jones,
24208 Greg Klanderman,
24209 Karl Kleinpaste,
24210 Michael Klingbeil,
24211 Peter Skov Knudsen,
24212 Shuhei Kobayashi, @c Kobayashi
24213 Petr Konecny,
24214 Koseki Yoshinori, @c Koseki
24215 Thor Kristoffersen,
24216 Jens Lautenbacher,
24217 Martin Larose,
24218 Seokchan Lee, @c Lee
24219 Joerg Lenneis,
24220 Carsten Leonhardt,
24221 James LewisMoss,
24222 Christian Limpach,
24223 Markus Linnala,
24224 Dave Love,
24225 Mike McEwan,
24226 Tonny Madsen,
24227 Shlomo Mahlab,
24228 Nat Makarevitch,
24229 Istvan Marko,
24230 David Martin,
24231 Jason R. Mastaler,
24232 Gordon Matzigkeit,
24233 Timo Metzemakers,
24234 Richard Mlynarik,
24235 Lantz Moore,
24236 Morioka Tomohiko, @c Morioka
24237 Erik Toubro Nielsen,
24238 Hrvoje Niksic,
24239 Andy Norman,
24240 Fred Oberhauser,
24241 C. R. Oldham,
24242 Alexandre Oliva,
24243 Ken Olstad,
24244 Masaharu Onishi, @c Onishi
24245 Hideki Ono, @c Ono
24246 Ettore Perazzoli,
24247 William Perry,
24248 Stephen Peters,
24249 Jens-Ulrik Holger Petersen,
24250 Ulrich Pfeifer,
24251 Matt Pharr,
24252 Andy Piper,
24253 John McClary Prevost,
24254 Bill Pringlemeir,
24255 Mike Pullen,
24256 Jim Radford,
24257 Colin Rafferty,
24258 Lasse Rasinen,
24259 Lars Balker Rasmussen,
24260 Joe Reiss,
24261 Renaud Rioboo,
24262 Roland B. Roberts,
24263 Bart Robinson,
24264 Christian von Roques,
24265 Markus Rost,
24266 Jason Rumney,
24267 Wolfgang Rupprecht,
24268 Jay Sachs,
24269 Dewey M. Sasser,
24270 Conrad Sauerwald,
24271 Loren Schall,
24272 Dan Schmidt,
24273 Ralph Schleicher,
24274 Philippe Schnoebelen,
24275 Andreas Schwab,
24276 Randal L. Schwartz,
24277 Danny Siu,
24278 Matt Simmons,
24279 Paul D. Smith,
24280 Jeff Sparkes,
24281 Toby Speight,
24282 Michael Sperber,
24283 Darren Stalder,
24284 Richard Stallman,
24285 Greg Stark,
24286 Sam Steingold,
24287 Paul Stevenson,
24288 Jonas Steverud,
24289 Paul Stodghill,
24290 Kiyokazu Suto, @c Suto
24291 Kurt Swanson,
24292 Samuel Tardieu,
24293 Teddy,
24294 Chuck Thompson,
24295 Tozawa Akihiko, @c Tozawa
24296 Philippe Troin,
24297 James Troup,
24298 Trung Tran-Duc,
24299 Jack Twilley,
24300 Aaron M. Ucko,
24301 Aki Vehtari,
24302 Didier Verna,
24303 Vladimir Volovich,
24304 Jan Vroonhof,
24305 Stefan Waldherr,
24306 Pete Ware,
24307 Barry A. Warsaw,
24308 Christoph Wedler,
24309 Joe Wells,
24310 Lee Willis,
24311 and
24312 Lloyd Zusman.
24313
24314
24315 For a full overview of what each person has done, the ChangeLogs
24316 included in the Gnus alpha distributions should give ample reading
24317 (550kB and counting).
24318
24319 Apologies to everybody that I've forgotten, of which there are many, I'm
24320 sure.
24321
24322 Gee, that's quite a list of people.  I guess that must mean that there
24323 actually are people who are using Gnus.  Who'd'a thunk it!
24324
24325
24326 @node New Features
24327 @subsection New Features
24328 @cindex new features
24329
24330 @menu
24331 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
24332 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
24333 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
24334 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
24335 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
24336 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
24337 @end menu
24338
24339 These lists are, of course, just @emph{short} overviews of the
24340 @emph{most} important new features.  No, really.  There are tons more.
24341 Yes, we have feeping creaturism in full effect.
24342
24343 @node ding Gnus
24344 @subsubsection (ding) Gnus
24345
24346 New features in Gnus 5.0/5.1:
24347
24348 @itemize @bullet
24349
24350 @item
24351 The look of all buffers can be changed by setting format-like variables
24352 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
24353
24354 @item
24355 Local spool and several @acronym{NNTP} servers can be used at once
24356 (@pxref{Select Methods}).
24357
24358 @item
24359 You can combine groups into virtual groups (@pxref{Virtual Groups}).
24360
24361 @item
24362 You can read a number of different mail formats (@pxref{Getting Mail}).
24363 All the mail back ends implement a convenient mail expiry scheme
24364 (@pxref{Expiring Mail}).
24365
24366 @item
24367 Gnus can use various strategies for gathering threads that have lost
24368 their roots (thereby gathering loose sub-threads into one thread) or it
24369 can go back and retrieve enough headers to build a complete thread
24370 (@pxref{Customizing Threading}).
24371
24372 @item
24373 Killed groups can be displayed in the group buffer, and you can read
24374 them as well (@pxref{Listing Groups}).
24375
24376 @item
24377 Gnus can do partial group updates---you do not have to retrieve the
24378 entire active file just to check for new articles in a few groups
24379 (@pxref{The Active File}).
24380
24381 @item
24382 Gnus implements a sliding scale of subscribedness to groups
24383 (@pxref{Group Levels}).
24384
24385 @item
24386 You can score articles according to any number of criteria
24387 (@pxref{Scoring}).  You can even get Gnus to find out how to score
24388 articles for you (@pxref{Adaptive Scoring}).
24389
24390 @item
24391 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
24392 manner, so it should be difficult to lose much data on what you have
24393 read if your machine should go down (@pxref{Auto Save}).
24394
24395 @item
24396 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
24397 cluttering up the @file{.emacs} file.
24398
24399 @item
24400 You can set the process mark on both groups and articles and perform
24401 operations on all the marked items (@pxref{Process/Prefix}).
24402
24403 @item
24404 You can grep through a subset of groups and create a group from the
24405 results (@pxref{Kibozed Groups}).
24406
24407 @item
24408 You can list subsets of groups according to, well, anything
24409 (@pxref{Listing Groups}).
24410
24411 @item
24412 You can browse foreign servers and subscribe to groups from those
24413 servers (@pxref{Browse Foreign Server}).
24414
24415 @item
24416 Gnus can fetch articles, asynchronously, on a second connection to the
24417 server (@pxref{Asynchronous Fetching}).
24418
24419 @item
24420 You can cache articles locally (@pxref{Article Caching}).
24421
24422 @item
24423 The uudecode functions have been expanded and generalized
24424 (@pxref{Decoding Articles}).
24425
24426 @item
24427 You can still post uuencoded articles, which was a little-known feature
24428 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
24429
24430 @item
24431 Fetching parents (and other articles) now actually works without
24432 glitches (@pxref{Finding the Parent}).
24433
24434 @item
24435 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
24436
24437 @item
24438 Digests (and other files) can be used as the basis for groups
24439 (@pxref{Document Groups}).
24440
24441 @item
24442 Articles can be highlighted and customized (@pxref{Customizing
24443 Articles}).
24444
24445 @item
24446 URLs and other external references can be buttonized (@pxref{Article
24447 Buttons}).
24448
24449 @item
24450 You can do lots of strange stuff with the Gnus window & frame
24451 configuration (@pxref{Window Layout}).
24452
24453 @item
24454 You can click on buttons instead of using the keyboard
24455 (@pxref{Buttons}).
24456
24457 @end itemize
24458
24459
24460 @node September Gnus
24461 @subsubsection September Gnus
24462
24463 @iftex
24464 @iflatex
24465 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
24466 @end iflatex
24467 @end iftex
24468
24469 New features in Gnus 5.2/5.3:
24470
24471 @itemize @bullet
24472
24473 @item
24474 A new message composition mode is used.  All old customization variables
24475 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
24476 now obsolete.
24477
24478 @item
24479 Gnus is now able to generate @dfn{sparse} threads---threads where
24480 missing articles are represented by empty nodes (@pxref{Customizing
24481 Threading}).
24482
24483 @lisp
24484 (setq gnus-build-sparse-threads 'some)
24485 @end lisp
24486
24487 @item
24488 Outgoing articles are stored on a special archive server
24489 (@pxref{Archived Messages}).
24490
24491 @item
24492 Partial thread regeneration now happens when articles are
24493 referred.
24494
24495 @item
24496 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
24497
24498 @item
24499 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
24500
24501 @item
24502 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
24503
24504 @lisp
24505 (setq gnus-use-trees t)
24506 @end lisp
24507
24508 @item
24509 An @code{nn}-like pick-and-read minor mode is available for the summary
24510 buffers (@pxref{Pick and Read}).
24511
24512 @lisp
24513 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
24514 @end lisp
24515
24516 @item
24517 In binary groups you can use a special binary minor mode (@pxref{Binary
24518 Groups}).
24519
24520 @item
24521 Groups can be grouped in a folding topic hierarchy (@pxref{Group
24522 Topics}).
24523
24524 @lisp
24525 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
24526 @end lisp
24527
24528 @item
24529 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
24530
24531 @item
24532 Groups can now have a score, and bubbling based on entry frequency
24533 is possible (@pxref{Group Score}).
24534
24535 @lisp
24536 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
24537 @end lisp
24538
24539 @item
24540 Groups can be process-marked, and commands can be performed on
24541 groups of groups (@pxref{Marking Groups}).
24542
24543 @item
24544 Caching is possible in virtual groups.
24545
24546 @item
24547 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
24548 news batches, ClariNet briefs collections, and just about everything
24549 else (@pxref{Document Groups}).
24550
24551 @item
24552 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
24553 (@pxref{SOUP}).
24554
24555 @item
24556 The Gnus cache is much faster.
24557
24558 @item
24559 Groups can be sorted according to many criteria (@pxref{Sorting
24560 Groups}).
24561
24562 @item
24563 New group parameters have been introduced to set list-addresses and
24564 expiry times (@pxref{Group Parameters}).
24565
24566 @item
24567 All formatting specs allow specifying faces to be used
24568 (@pxref{Formatting Fonts}).
24569
24570 @item
24571 There are several more commands for setting/removing/acting on process
24572 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
24573
24574 @item
24575 The summary buffer can be limited to show parts of the available
24576 articles based on a wide range of criteria.  These commands have been
24577 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
24578
24579 @item
24580 Articles can be made persistent with the @kbd{*} command
24581 (@pxref{Persistent Articles}).
24582
24583 @item
24584 All functions for hiding article elements are now toggles.
24585
24586 @item
24587 Article headers can be buttonized (@pxref{Article Washing}).
24588
24589 @item
24590 All mail back ends support fetching articles by @code{Message-ID}.
24591
24592 @item
24593 Duplicate mail can now be treated properly (@pxref{Duplicates}).
24594
24595 @item
24596 All summary mode commands are available directly from the article
24597 buffer (@pxref{Article Keymap}).
24598
24599 @item
24600 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
24601 Layout}).
24602
24603 @item
24604 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
24605 @iftex
24606 @iflatex
24607 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
24608 @end iflatex
24609 @end iftex
24610
24611 @item
24612 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
24613
24614 @lisp
24615 (setq gnus-use-nocem t)
24616 @end lisp
24617
24618 @item
24619 Groups can be made permanently visible (@pxref{Listing Groups}).
24620
24621 @lisp
24622 (setq gnus-permanently-visible-groups "^nnml:")
24623 @end lisp
24624
24625 @item
24626 Many new hooks have been introduced to make customizing easier.
24627
24628 @item
24629 Gnus respects the @code{Mail-Copies-To} header.
24630
24631 @item
24632 Threads can be gathered by looking at the @code{References} header
24633 (@pxref{Customizing Threading}).
24634
24635 @lisp
24636 (setq gnus-summary-thread-gathering-function
24637       'gnus-gather-threads-by-references)
24638 @end lisp
24639
24640 @item
24641 Read articles can be stored in a special backlog buffer to avoid
24642 refetching (@pxref{Article Backlog}).
24643
24644 @lisp
24645 (setq gnus-keep-backlog 50)
24646 @end lisp
24647
24648 @item
24649 A clean copy of the current article is always stored in a separate
24650 buffer to allow easier treatment.
24651
24652 @item
24653 Gnus can suggest where to save articles (@pxref{Saving Articles}).
24654
24655 @item
24656 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
24657 Articles}).
24658
24659 @lisp
24660 (setq gnus-prompt-before-saving t)
24661 @end lisp
24662
24663 @item
24664 @code{gnus-uu} can view decoded files asynchronously while fetching
24665 articles (@pxref{Other Decode Variables}).
24666
24667 @lisp
24668 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
24669 @end lisp
24670
24671 @item
24672 Filling in the article buffer now works properly on cited text
24673 (@pxref{Article Washing}).
24674
24675 @item
24676 Hiding cited text adds buttons to toggle hiding, and how much
24677 cited text to hide is now customizable (@pxref{Article Hiding}).
24678
24679 @lisp
24680 (setq gnus-cited-lines-visible 2)
24681 @end lisp
24682
24683 @item
24684 Boring headers can be hidden (@pxref{Article Hiding}).
24685
24686 @item
24687 Default scoring values can now be set from the menu bar.
24688
24689 @item
24690 Further syntax checking of outgoing articles have been added.
24691
24692 @end itemize
24693
24694
24695 @node Red Gnus
24696 @subsubsection Red Gnus
24697
24698 New features in Gnus 5.4/5.5:
24699
24700 @iftex
24701 @iflatex
24702 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
24703 @end iflatex
24704 @end iftex
24705
24706 @itemize @bullet
24707
24708 @item
24709 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
24710
24711 @item
24712 Article prefetching functionality has been moved up into
24713 Gnus (@pxref{Asynchronous Fetching}).
24714
24715 @item
24716 Scoring can now be performed with logical operators like @code{and},
24717 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
24718 Scoring}).
24719
24720 @item
24721 Article washing status can be displayed in the
24722 article mode line (@pxref{Misc Article}).
24723
24724 @item
24725 @file{gnus.el} has been split into many smaller files.
24726
24727 @item
24728 Suppression of duplicate articles based on Message-ID can be done
24729 (@pxref{Duplicate Suppression}).
24730
24731 @lisp
24732 (setq gnus-suppress-duplicates t)
24733 @end lisp
24734
24735 @item
24736 New variables for specifying what score and adapt files are to be
24737 considered home score and adapt files (@pxref{Home Score File}) have
24738 been added.
24739
24740 @item
24741 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
24742 Server Internals}).
24743
24744 @item
24745 Groups can inherit group parameters from parent topics (@pxref{Topic
24746 Parameters}).
24747
24748 @item
24749 Article editing has been revamped and is now actually usable.
24750
24751 @item
24752 Signatures can be recognized in more intelligent fashions
24753 (@pxref{Article Signature}).
24754
24755 @item
24756 Summary pick mode has been made to look more @code{nn}-like.  Line
24757 numbers are displayed and the @kbd{.} command can be used to pick
24758 articles (@code{Pick and Read}).
24759
24760 @item
24761 Commands for moving the @file{.newsrc.eld} from one server to
24762 another have been added (@pxref{Changing Servers}).
24763
24764 @item
24765 There's a way now to specify that ``uninteresting'' fields be suppressed
24766 when generating lines in buffers (@pxref{Advanced Formatting}).
24767
24768 @item
24769 Several commands in the group buffer can be undone with @kbd{C-M-_}
24770 (@pxref{Undo}).
24771
24772 @item
24773 Scoring can be done on words using the new score type @code{w}
24774 (@pxref{Score File Format}).
24775
24776 @item
24777 Adaptive scoring can be done on a Subject word-by-word basis
24778 (@pxref{Adaptive Scoring}).
24779
24780 @lisp
24781 (setq gnus-use-adaptive-scoring '(word))
24782 @end lisp
24783
24784 @item
24785 Scores can be decayed (@pxref{Score Decays}).
24786
24787 @lisp
24788 (setq gnus-decay-scores t)
24789 @end lisp
24790
24791 @item
24792 Scoring can be performed using a regexp on the Date header.  The Date is
24793 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
24794
24795 @item
24796 A new command has been added to remove all data on articles from
24797 the native server (@pxref{Changing Servers}).
24798
24799 @item
24800 A new command for reading collections of documents
24801 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
24802 (@pxref{Really Various Summary Commands}).
24803
24804 @item
24805 Process mark sets can be pushed and popped (@pxref{Setting Process
24806 Marks}).
24807
24808 @item
24809 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
24810 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
24811
24812 @item
24813 A new back end for reading searches from Web search engines
24814 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
24815 (@pxref{Web Searches}).
24816
24817 @item
24818 Groups inside topics can now be sorted using the standard sorting
24819 functions, and each topic can be sorted independently (@pxref{Topic
24820 Sorting}).
24821
24822 @item
24823 Subsets of the groups can be sorted independently (@code{Sorting
24824 Groups}).
24825
24826 @item
24827 Cached articles can be pulled into the groups (@pxref{Summary Generation
24828 Commands}).
24829 @iftex
24830 @iflatex
24831 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
24832 @end iflatex
24833 @end iftex
24834
24835 @item
24836 Score files are now applied in a more reliable order (@pxref{Score
24837 Variables}).
24838
24839 @item
24840 Reports on where mail messages end up can be generated (@pxref{Splitting
24841 Mail}).
24842
24843 @item
24844 More hooks and functions have been added to remove junk from incoming
24845 mail before saving the mail (@pxref{Washing Mail}).
24846
24847 @item
24848 Emphasized text can be properly fontisized:
24849
24850 @end itemize
24851
24852
24853 @node Quassia Gnus
24854 @subsubsection Quassia Gnus
24855
24856 New features in Gnus 5.6:
24857
24858 @itemize @bullet
24859
24860 @item
24861 New functionality for using Gnus as an offline newsreader has been
24862 added.  A plethora of new commands and modes have been added.
24863 @xref{Gnus Unplugged}, for the full story.
24864
24865 @item
24866 The @code{nndraft} back end has returned, but works differently than
24867 before.  All Message buffers are now also articles in the @code{nndraft}
24868 group, which is created automatically.
24869
24870 @item
24871 @code{gnus-alter-header-function} can now be used to alter header
24872 values.
24873
24874 @item
24875 @code{gnus-summary-goto-article} now accept Message-ID's.
24876
24877 @item
24878 A new Message command for deleting text in the body of a message
24879 outside the region: @kbd{C-c C-v}.
24880
24881 @item
24882 You can now post to component group in @code{nnvirtual} groups with
24883 @kbd{C-u C-c C-c}.
24884
24885 @item
24886  @code{nntp-rlogin-program}---new variable to ease customization.
24887
24888 @item
24889 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
24890 re-highlighting of the article buffer.
24891
24892 @item
24893 New element in @code{gnus-boring-article-headers}---@code{long-to}.
24894
24895 @item
24896 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
24897 details.
24898
24899 @item
24900 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
24901 @kbd{a} to add the score rule to the @file{all.SCORE} file.
24902
24903 @item
24904 @code{gnus-simplify-subject-functions} variable to allow greater
24905 control over simplification.
24906
24907 @item
24908 @kbd{A T}---new command for fetching the current thread.
24909
24910 @item
24911 @kbd{/ T}---new command for including the current thread in the
24912 limit.
24913
24914 @item
24915 @kbd{M-RET} is a new Message command for breaking cited text.
24916
24917 @item
24918 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
24919
24920 @item
24921 The @code{custom-face-lookup} function has been removed.
24922 If you used this function in your initialization files, you must
24923 rewrite them to use @code{face-spec-set} instead.
24924
24925 @item
24926 Canceling now uses the current select method.  Symbolic prefix
24927 @kbd{a} forces normal posting method.
24928
24929 @item
24930 New command to translate M******** sm*rtq**t*s into proper
24931 text---@kbd{W d}.
24932
24933 @item
24934 For easier debugging of @code{nntp}, you can set
24935 @code{nntp-record-commands} to a non-@code{nil} value.
24936
24937 @item
24938 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
24939 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
24940
24941 @item
24942 A command for editing group parameters from the summary buffer
24943 has been added.
24944
24945 @item
24946 A history of where mails have been split is available.
24947
24948 @item
24949 A new article date command has been added---@code{article-date-iso8601}.
24950
24951 @item
24952 Subjects can be simplified when threading by setting
24953 @code{gnus-score-thread-simplify}.
24954
24955 @item
24956 A new function for citing in Message has been
24957 added---@code{message-cite-original-without-signature}.
24958
24959 @item
24960 @code{article-strip-all-blank-lines}---new article command.
24961
24962 @item
24963 A new Message command to kill to the end of the article has
24964 been added.
24965
24966 @item
24967 A minimum adaptive score can be specified by using the
24968 @code{gnus-adaptive-word-minimum} variable.
24969
24970 @item
24971 The ``lapsed date'' article header can be kept continually
24972 updated by the @code{gnus-start-date-timer} command.
24973
24974 @item
24975 Web listserv archives can be read with the @code{nnlistserv} back end.
24976
24977 @item
24978 Old dejanews archives can now be read by @code{nnweb}.
24979
24980 @end itemize
24981
24982 @node Pterodactyl Gnus
24983 @subsubsection Pterodactyl Gnus
24984
24985 New features in Gnus 5.8:
24986
24987 @itemize @bullet
24988
24989 @item
24990 The mail-fetching functions have changed.  See the manual for the
24991 many details.  In particular, all procmail fetching variables are gone.
24992
24993 If you used procmail like in
24994
24995 @lisp
24996 (setq nnmail-use-procmail t)
24997 (setq nnmail-spool-file 'procmail)
24998 (setq nnmail-procmail-directory "~/mail/incoming/")
24999 (setq nnmail-procmail-suffix "\\.in")
25000 @end lisp
25001
25002 this now has changed to
25003
25004 @lisp
25005 (setq mail-sources
25006       '((directory :path "~/mail/incoming/"
25007                    :suffix ".in")))
25008 @end lisp
25009
25010 @xref{Mail Source Specifiers}.
25011
25012 @item
25013 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
25014 Gnus, and adds a slew of new commands.  See the manual for details.
25015
25016 @item
25017 Gnus has also been multilingualized.  This also affects too
25018 many parts of Gnus to summarize here, and adds many new variables.
25019
25020 @item
25021 @code{gnus-auto-select-first} can now be a function to be
25022 called to position point.
25023
25024 @item
25025 The user can now decide which extra headers should be included in
25026 summary buffers and @acronym{NOV} files.
25027
25028 @item
25029 @code{gnus-article-display-hook} has been removed.  Instead, a number
25030 of variables starting with @code{gnus-treat-} have been added.
25031
25032 @item
25033 The Gnus posting styles have been redone again and now works in a
25034 subtly different manner.
25035
25036 @item
25037 New web-based back ends have been added: @code{nnslashdot},
25038 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
25039 again, to keep up with ever-changing layouts.
25040
25041 @item
25042 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
25043
25044 @end itemize
25045
25046 @node Oort Gnus
25047 @subsubsection Oort Gnus
25048 @cindex Oort Gnus
25049
25050 New features in Gnus 5.10:
25051
25052 @itemize @bullet
25053
25054 @item
25055 The revised Gnus @acronym{FAQ} is included in the manual,
25056 @xref{Frequently Asked Questions}.
25057
25058 @item
25059 Upgrading from previous (stable) version if you have used Oort.
25060
25061 If you have tried Oort (the unstable Gnus branch leading to this
25062 release) but went back to a stable version, be careful when upgrading to
25063 this version.  In particular, you will probably want to remove all
25064 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
25065 read from your @file{.newsrc.eld} instead of from the
25066 @file{.marks}/@file{.mrk} file where this release store flags.  See a
25067 later entry for more information about marks.  Note that downgrading
25068 isn't save in general.
25069
25070 @item
25071 Article Buttons
25072
25073 More buttons for URLs, mail addresses, Message-IDs, Info links, man
25074 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
25075 variables @code{gnus-button-@var{*}-level} can be used to control the
25076 appearance of all article buttons.  @xref{Article Button Levels}.
25077
25078 @item
25079 Dired integration
25080
25081 @code{gnus-dired-minor-mode} installs key bindings in dired buffers to send
25082 a file as an attachment (@kbd{C-c C-a}), open a file using the appropriate
25083 mailcap entry (@kbd{C-c C-l}), and print a file using the mailcap entry
25084 (@kbd{C-c P}).  It is enabled with
25085 @lisp
25086 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
25087 @end lisp
25088
25089 @item
25090 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
25091
25092 @item
25093 Single-part yenc encoded attachments can be decoded.
25094
25095 @item
25096 Picons
25097
25098 The picons code has been reimplemented to work in GNU Emacs---some of
25099 the previous options have been removed or renamed.
25100
25101 Picons are small ``personal icons'' representing users, domain and
25102 newsgroups, which can be displayed in the Article buffer.
25103 @xref{Picons}.
25104
25105 @item
25106 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
25107 boundary line is drawn at the end of the headers.
25108
25109 @item
25110 Retrieval of charters and control messages
25111
25112 There are new commands for fetching newsgroup charters (@kbd{H c}) and
25113 control messages (@kbd{H C}).
25114
25115 @item
25116 Delayed articles
25117
25118 You can delay the sending of a message with @kbd{C-c C-j} in the Message
25119 buffer.  The messages are delivered at specified time.  This is useful
25120 for sending yourself reminders.  @xref{Delayed Articles}.
25121
25122 @item
25123 If @code{auto-compression-mode} is enabled, attachments are automatically
25124 decompressed when activated.
25125
25126 @item
25127 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
25128 the nnml back end allows compressed message files.
25129
25130 @item
25131 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
25132
25133 @item
25134 The Summary Buffer uses an arrow in the fringe to indicate the current
25135 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
25136
25137 @item
25138 Warn about email replies to news
25139
25140 Do you often find yourself replying to news by email by mistake?  Then
25141 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
25142 you.
25143
25144 @item
25145 If the new option @code{gnus-summary-display-while-building} is
25146 non-@code{nil}, the summary buffer is shown and updated as it's being
25147 built.
25148
25149 @item
25150 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
25151 opposed to old but unread messages).
25152
25153 @item
25154 The new option @code{gnus-gcc-mark-as-read} automatically marks
25155 Gcc articles as read.
25156
25157 @item
25158 The nndoc back end now supports mailman digests and exim bounces.
25159
25160 @item
25161 Gnus supports RFC 2369 mailing list headers, and adds a number of
25162 related commands in mailing list groups.  @xref{Mailing List}.
25163
25164 @item
25165 The Date header can be displayed in a format that can be read aloud
25166 in English.  @xref{Article Date}.
25167
25168 @item
25169 The envelope sender address can be customized when using Sendmail.
25170 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
25171
25172 @item
25173 diffs are automatically highlighted in groups matching
25174 @code{mm-uu-diff-groups-regexp}
25175
25176 @item
25177 @acronym{TLS} wrapper shipped with Gnus
25178
25179 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
25180 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
25181 @acronym{TLS}/@acronym{SSL} support via (external third party)
25182 @file{ssl.el} and OpenSSL still works.
25183
25184 @item
25185 New @file{make.bat} for compiling and installing Gnus under MS Windows
25186
25187 Use @file{make.bat} if you want to install Gnus under MS Windows, the
25188 first argument to the batch-program should be the directory where
25189 @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want
25190 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
25191 the second parameter.
25192
25193 @file{make.bat} has been rewritten from scratch, it now features
25194 automatic recognition of XEmacs and GNU Emacs, generates
25195 @file{gnus-load.el}, checks if errors occur while compilation and
25196 generation of info files and reports them at the end of the build
25197 process.  It now uses @code{makeinfo} if it is available and falls
25198 back to @file{infohack.el} otherwise.  @file{make.bat} should now
25199 install all files which are necessary to run Gnus and be generally a
25200 complete replacement for the @code{configure; make; make install}
25201 cycle used under Unix systems.
25202
25203 The new @file{make.bat} makes @file{make-x.bat} superfluous, so it has
25204 been removed.
25205
25206 @item
25207 Support for non-@acronym{ASCII} domain names
25208
25209 Message supports non-@acronym{ASCII} domain names in From:, To: and
25210 Cc: and will query you whether to perform encoding when you try to
25211 send a message.  The variable @code{message-use-idna} controls this.
25212 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
25213 and Cc: when you view a message.  The variable @code{gnus-use-idna}
25214 controls this.
25215
25216 @item
25217 Better handling of Microsoft citation styles
25218
25219 Gnus now tries to recognize the mangled header block that some Microsoft
25220 mailers use to indicate that the rest of the message is a citation, even
25221 though it is not quoted in any way.  The variable
25222 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
25223 citations.
25224
25225 @item
25226 @code{gnus-article-skip-boring}
25227
25228 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
25229 not scroll down to show you a page that contains only boring text,
25230 which by default means cited text and signature.  You can customize
25231 what is skippable using @code{gnus-article-boring-faces}.
25232
25233 This feature is especially useful if you read many articles that
25234 consist of a little new content at the top with a long, untrimmed
25235 message cited below.
25236
25237 @item
25238 The format spec @code{%C} for positioning point has changed to @code{%*}.
25239
25240 @item
25241 The new variable @code{gnus-parameters} can be used to set group parameters.
25242
25243 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
25244 the parameters in @file{~/.newsrc.eld}, but via this variable you can
25245 enjoy the powers of customize, and simplified backups since you set the
25246 variable in @file{~/.emacs} instead of @file{~/.newsrc.eld}.  The
25247 variable maps regular expressions matching group names to group
25248 parameters, a'la:
25249 @lisp
25250 (setq gnus-parameters
25251       '(("mail\\..*"
25252          (gnus-show-threads nil)
25253          (gnus-use-scoring nil))
25254         ("^nnimap:\\(foo.bar\\)$"
25255          (to-group . "\\1"))))
25256 @end lisp
25257
25258 @item
25259 Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
25260
25261 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.emacs} to
25262 disable it.
25263
25264 @item
25265 Gnus no longer generate the Sender: header automatically.
25266
25267 Earlier it was generated iff the user configurable email address was
25268 different from the Gnus guessed default user address.  As the guessing
25269 algorithm is rarely correct these days, and (more controversially) the
25270 only use of the Sender: header was to check if you are entitled to
25271 cancel/supersede news (which is now solved by Cancel Locks instead,
25272 see another entry), generation of the header has been disabled by
25273 default.  See the variables @code{message-required-headers},
25274 @code{message-required-news-headers}, and
25275 @code{message-required-mail-headers}.
25276
25277 @item
25278 Features from third party @file{message-utils.el} added to @file{message.el}.
25279
25280 Message now asks if you wish to remove @samp{(was: <old subject>)} from
25281 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
25282 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
25283 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
25284 appropriate headers and a note in the body for cross-postings and
25285 followups (see the variables @code{message-cross-post-@var{*}}).
25286
25287 @item
25288 References and X-Draft-Headers are no longer generated when you start
25289 composing messages and @code{message-generate-headers-first} is
25290 @code{nil}.
25291
25292 @item
25293 Improved anti-spam features.
25294
25295 Gnus is now able to take out spam from your mail and news streams
25296 using a wide variety of programs and filter rules.  Among the supported
25297 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
25298 for easy use of external packages such as SpamAssassin and Hashcash
25299 are also new.  @xref{Thwarting Email Spam}.
25300
25301 @item
25302 Easy inclusion of X-Faces headers.
25303
25304 @item
25305 Face headers handling.
25306
25307 @item
25308 In the summary buffer, the new command @kbd{/ N} inserts new messages
25309 and @kbd{/ o} inserts old messages.
25310
25311 @item
25312 Gnus decodes morse encoded messages if you press @kbd{W m}.
25313
25314 @item
25315 Unread count correct in nnimap groups.
25316
25317 The estimated number of unread articles in the group buffer should now
25318 be correct for nnimap groups.  This is achieved by calling
25319 @code{nnimap-fixup-unread-after-getting-new-news} from the
25320 @code{gnus-setup-news-hook} (called on startup) and
25321 @code{gnus-after-getting-new-news-hook}. (called after getting new
25322 mail).  If you have modified those variables from the default, you may
25323 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
25324 you were happy with the estimate and want to save some (minimal) time
25325 when getting new mail, remove the function.
25326
25327 @item
25328 Group Carbon Copy (GCC) quoting
25329
25330 To support groups that contains SPC and other weird characters, groups
25331 are quoted before they are placed in the Gcc: header.  This means
25332 variables such as @code{gnus-message-archive-group} should no longer
25333 contain quote characters to make groups containing SPC work.  Also, if
25334 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
25335 into two groups) you must change it to return the list
25336 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
25337 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
25338 was incorrect earlier, it just didn't generate any problems since it
25339 was inserted directly.
25340
25341 @item
25342 @file{~/News/overview/} not used.
25343
25344 As a result of the following change, the @file{~/News/overview/}
25345 directory is not used any more.  You can safely delete the entire
25346 hierarchy.
25347
25348 @item
25349 @code{gnus-agent}
25350
25351 The Gnus Agent has seen a major updated and is now enabled by default,
25352 and all nntp and nnimap servers from @code{gnus-select-method} and
25353 @code{gnus-secondary-select-method} are agentized by default.  Earlier
25354 only the server in @code{gnus-select-method} was agentized by the
25355 default, and the agent was disabled by default.  When the agent is
25356 enabled, headers are now also retrieved from the Agent cache instead
25357 of the back ends when possible.  Earlier this only happened in the
25358 unplugged state.  You can enroll or remove servers with @kbd{J a} and
25359 @kbd{J r} in the server buffer.  Gnus will not download articles into
25360 the Agent cache, unless you instruct it to do so, though, by using
25361 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
25362 behaviour of having the Agent disabled with @code{(setq gnus-agent
25363 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
25364 is not needed any more.
25365
25366 @item
25367 @code{gnus-summary-line-format}
25368
25369 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
25370 %s\n}.  Moreover @code{gnus-extra-headers},
25371 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
25372 changed their default so that the users name will be replaced by the
25373 recipient's name or the group name posting to for @acronym{NNTP}
25374 groups.
25375
25376 @item
25377 @file{deuglify.el} (@code{gnus-article-outlook-deuglify-article})
25378
25379 A new file from Raymond Scholz @email{rscholz@@zonix.de} for deuglifying
25380 broken Outlook (Express) articles.
25381
25382 @item
25383 @code{(require 'gnus-load)}
25384
25385 If you use a stand-alone Gnus distribution, you'd better add
25386 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
25387 lisp directory into load-path.
25388
25389 File @file{gnus-load.el} contains autoload commands, functions and variables,
25390 some of which may not be included in distributions of Emacsen.
25391
25392 @item
25393 @code{gnus-slave-unplugged}
25394
25395 A new command which starts Gnus offline in slave mode.
25396
25397 @item
25398 @code{message-insinuate-rmail}
25399
25400 Adding @code{(message-insinuate-rmail)} and @code{(setq
25401 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
25402 compose, reply and forward messages in message-mode, where you can
25403 enjoy the power of @acronym{MML}.
25404
25405 @item
25406 @code{message-minibuffer-local-map}
25407
25408 The line below enables BBDB in resending a message:
25409 @lisp
25410 (define-key message-minibuffer-local-map [(tab)]
25411   'bbdb-complete-name)
25412 @end lisp
25413
25414 @item
25415 Externalizing and deleting of attachments.
25416
25417 If @code{gnus-gcc-externalize-attachments} or
25418 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
25419 local files as external parts.
25420
25421 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
25422 on @acronym{MIME} buttons) saves a part and replaces the part with an
25423 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
25424 @acronym{MIME} buttons) removes a part.  It works only on back ends
25425 that support editing.
25426
25427 @item
25428 @code{gnus-default-charset}
25429
25430 The default value is determined from the
25431 @code{current-language-environment} variable, instead of
25432 @code{iso-8859-1}.  Also the @samp{.*} item in
25433 @code{gnus-group-charset-alist} is removed.
25434
25435 @item
25436 @code{gnus-posting-styles}
25437
25438 Add a new format of match like
25439 @lisp
25440 ((header "to" "larsi.*org")
25441  (Organization "Somewhere, Inc."))
25442 @end lisp
25443 The old format like the lines below is obsolete, but still accepted.
25444 @lisp
25445 (header "to" "larsi.*org"
25446         (Organization "Somewhere, Inc."))
25447 @end lisp
25448
25449 @item
25450 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
25451
25452 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
25453 added into these two variables.  If you customized those, perhaps you
25454 need add those two headers too.
25455
25456 @item
25457 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
25458
25459 If one reads an article while plugged, and the article already exists
25460 in the Agent, it won't get downloaded once more.  @code{(setq
25461 gnus-agent-cache nil)} reverts to the old behavior.
25462
25463 @item
25464 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
25465 composing messages, it is enabled by @code{use-hard-newlines}.
25466 Decoding format=flowed was present but not documented in earlier
25467 versions.
25468
25469 @item
25470 Gnus supports the generation of RFC 2298 Disposition Notification requests.
25471
25472 This is invoked with the @kbd{C-c M-n} key binding from message mode.
25473
25474 @item
25475 Gnus supports Maildir groups.
25476
25477 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
25478
25479 @item
25480 Printing capabilities are enhanced.
25481
25482 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
25483 Article buffers.  Also, each individual @acronym{MIME} part can be
25484 printed using @kbd{p} on the @acronym{MIME} button.
25485
25486 @item
25487 Message supports the Importance: (RFC 2156) header.
25488
25489 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
25490 the valid values.
25491
25492 @item
25493 Gnus supports Cancel Locks in News.
25494
25495 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
25496 used to determine if you wrote an article or not (for canceling and
25497 superseding).  Gnus generates a random password string the first time
25498 you post a message, and saves it in your @file{~/.emacs} using the Custom
25499 system.  While the variable is called @code{canlock-password}, it is not
25500 security sensitive data.  Publishing your canlock string on the web
25501 will not allow anyone to be able to anything she could not already do.
25502 The behaviour can be changed by customizing @code{message-insert-canlock}.
25503
25504 @item
25505 Gnus supports server-side mail filtering using Sieve.
25506
25507 Sieve rules can be added as Group Parameters for groups, and the
25508 complete Sieve script is generated using @kbd{D g} from the Group
25509 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
25510 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
25511 manual @ref{Top, , Top, sieve, Emacs Sieve}.
25512
25513 @item
25514 Extended format specs.
25515
25516 Format spec @samp{%&user-date;} is added into
25517 @code{gnus-summary-line-format-alist}.  Also, user defined extended
25518 format specs are supported.  The extended format specs look like
25519 @samp{%u&foo;}, which invokes function
25520 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
25521 escape character, old user defined format @samp{%u&} is no longer supported.
25522
25523 @item
25524 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
25525
25526 It was aliased to @kbd{Y c}
25527 (@code{gnus-summary-insert-cached-articles}).  The new function filters
25528 out other articles.
25529
25530 @item Some limiting commands accept a @kbd{C-u} prefix to negate the match.
25531
25532 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
25533 s}, @kbd{/ a}, and @kbd{/ x}
25534 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
25535 result will be to display all articles that do not match the expression.
25536
25537 @item
25538 Group names are treated as UTF-8 by default.
25539
25540 This is supposedly what USEFOR wanted to migrate to.  See
25541 @code{gnus-group-name-charset-group-alist} and
25542 @code{gnus-group-name-charset-method-alist} for customization.
25543
25544 @item
25545 The nnml and nnfolder back ends store marks for each groups.
25546
25547 This makes it possible to take backup of nnml/nnfolder servers/groups
25548 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
25549 makes it possible to share articles and marks between users (without
25550 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
25551 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
25552 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
25553 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
25554 another machine, Gnus will automatically use the @file{.marks} or
25555 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
25556 The new server variables @code{nnml-marks-is-evil} and
25557 @code{nnfolder-marks-is-evil} can be used to disable this feature.
25558
25559 @item
25560 The menu bar item (in Group and Summary buffer) named ``Misc'' has
25561 been renamed to ``Gnus''.
25562
25563 @item
25564 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
25565 renamed to ``Attachments''.  Note that this menu also contains security
25566 related stuff, like signing and encryption (@pxref{Security, Security,,
25567 message, Message Manual}).
25568
25569 @item
25570 @code{gnus-group-charset-alist} and
25571 @code{gnus-group-ignored-charsets-alist}.
25572
25573 The regexps in these variables are compared with full group names
25574 instead of real group names in 5.8.  Users who customize these
25575 variables should change those regexps accordingly.  For example:
25576 @lisp
25577 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
25578 @end lisp
25579
25580 @item
25581 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
25582 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
25583
25584 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
25585 additional Lisp libraries.  This add several menu items to the
25586 Attachments menu, and @kbd{C-c RET} key bindings, when composing
25587 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
25588
25589 @item
25590 Gnus inlines external parts (message/external).
25591
25592 @item
25593 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
25594 C-m}.
25595
25596 This change was made to avoid conflict with the standard binding of
25597 @code{back-to-indentation}, which is also useful in message mode.
25598
25599 @item
25600 The default for @code{message-forward-show-mml} changed to symbol @code{best}.
25601
25602 The behaviour for the @code{best} value is to show @acronym{MML} (i.e.,
25603 convert to @acronym{MIME}) when appropriate.  @acronym{MML} will not be
25604 used when forwarding signed or encrypted messages, as the conversion
25605 invalidate the digital signature.
25606 @end itemize
25607
25608 @iftex
25609
25610 @page
25611 @node The Manual
25612 @section The Manual
25613 @cindex colophon
25614 @cindex manual
25615
25616 This manual was generated from a TeXinfo file and then run through
25617 either @code{texi2dvi}
25618 @iflatex
25619 or my own home-brewed TeXinfo to \LaTeX\ transformer,
25620 and then run through @code{latex} and @code{dvips}
25621 @end iflatex
25622 to get what you hold in your hands now.
25623
25624 The following conventions have been used:
25625
25626 @enumerate
25627
25628 @item
25629 This is a @samp{string}
25630
25631 @item
25632 This is a @kbd{keystroke}
25633
25634 @item
25635 This is a @file{file}
25636
25637 @item
25638 This is a @code{symbol}
25639
25640 @end enumerate
25641
25642 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
25643 mean:
25644
25645 @lisp
25646 (setq flargnoze "yes")
25647 @end lisp
25648
25649 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
25650
25651 @lisp
25652 (setq flumphel 'yes)
25653 @end lisp
25654
25655 @samp{yes} and @code{yes} are two @emph{very} different things---don't
25656 ever get them confused.
25657
25658 @iflatex
25659 @c @head
25660 Of course, everything in this manual is of vital interest, so you should
25661 read it all.  Several times.  However, if you feel like skimming the
25662 manual, look for that gnu head you should see in the margin over
25663 there---it means that what's being discussed is of more importance than
25664 the rest of the stuff.  (On the other hand, if everything is infinitely
25665 important, how can anything be more important than that?  Just one more
25666 of the mysteries of this world, I guess.)
25667 @end iflatex
25668
25669 @end iftex
25670
25671
25672 @node On Writing Manuals
25673 @section On Writing Manuals
25674
25675 I guess most manuals are written after-the-fact; documenting a program
25676 that's already there.  This is not how this manual is written.  When
25677 implementing something, I write the manual entry for that something
25678 straight away.  I then see that it's difficult to explain the
25679 functionality, so I write how it's supposed to be, and then I change the
25680 implementation.  Writing the documentation and writing the code goes
25681 hand in hand.
25682
25683 This, of course, means that this manual has no, or little, flow.  It
25684 documents absolutely everything in Gnus, but often not where you're
25685 looking for it.  It is a reference manual, and not a guide to how to get
25686 started with Gnus.
25687
25688 That would be a totally different book, that should be written using the
25689 reference manual as source material.  It would look quite differently.
25690
25691
25692 @page
25693 @node Terminology
25694 @section Terminology
25695
25696 @cindex terminology
25697 @table @dfn
25698
25699 @item news
25700 @cindex news
25701 This is what you are supposed to use this thing for---reading news.
25702 News is generally fetched from a nearby @acronym{NNTP} server, and is
25703 generally publicly available to everybody.  If you post news, the entire
25704 world is likely to read just what you have written, and they'll all
25705 snigger mischievously.  Behind your back.
25706
25707 @item mail
25708 @cindex mail
25709 Everything that's delivered to you personally is mail.  Some news/mail
25710 readers (like Gnus) blur the distinction between mail and news, but
25711 there is a difference.  Mail is private.  News is public.  Mailing is
25712 not posting, and replying is not following up.
25713
25714 @item reply
25715 @cindex reply
25716 Send a mail to the person who has written what you are reading.
25717
25718 @item follow up
25719 @cindex follow up
25720 Post an article to the current newsgroup responding to the article you
25721 are reading.
25722
25723 @item back end
25724 @cindex back end
25725 Gnus considers mail and news to be mostly the same, really.  The only
25726 difference is how to access the actual articles.  News articles are
25727 commonly fetched via the protocol @acronym{NNTP}, whereas mail
25728 messages could be read from a file on the local disk.  The internal
25729 architecture of Gnus thus comprises a ``front end'' and a number of
25730 ``back ends''.  Internally, when you enter a group (by hitting
25731 @key{RET}, say), you thereby invoke a function in the front end in
25732 Gnus.  The front end then ``talks'' to a back end and says things like
25733 ``Give me the list of articles in the foo group'' or ``Show me article
25734 number 4711''.
25735
25736 So a back end mainly defines either a protocol (the @code{nntp} back
25737 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
25738 accesses mail via @acronym{IMAP}) or a file format and directory
25739 layout (the @code{nnspool} back end accesses news via the common
25740 ``spool directory'' format, the @code{nnml} back end access mail via a
25741 file format and directory layout that's quite similar).
25742
25743 Gnus does not handle the underlying media, so to speak---this is all
25744 done by the back ends.  A back end is a collection of functions to
25745 access the articles.
25746
25747 However, sometimes the term ``back end'' is also used where ``server''
25748 would have been more appropriate.  And then there is the term ``select
25749 method'' which can mean either.  The Gnus terminology can be quite
25750 confusing.
25751
25752 @item native
25753 @cindex native
25754 Gnus will always use one method (and back end) as the @dfn{native}, or
25755 default, way of getting news.
25756
25757 @item foreign
25758 @cindex foreign
25759 You can also have any number of foreign groups active at the same time.
25760 These are groups that use non-native non-secondary back ends for getting
25761 news.
25762
25763 @item secondary
25764 @cindex secondary
25765 Secondary back ends are somewhere half-way between being native and being
25766 foreign, but they mostly act like they are native.
25767
25768 @item article
25769 @cindex article
25770 A message that has been posted as news.
25771
25772 @item mail message
25773 @cindex mail message
25774 A message that has been mailed.
25775
25776 @item message
25777 @cindex message
25778 A mail message or news article
25779
25780 @item head
25781 @cindex head
25782 The top part of a message, where administrative information (etc.) is
25783 put.
25784
25785 @item body
25786 @cindex body
25787 The rest of an article.  Everything not in the head is in the
25788 body.
25789
25790 @item header
25791 @cindex header
25792 A line from the head of an article.
25793
25794 @item headers
25795 @cindex headers
25796 A collection of such lines, or a collection of heads.  Or even a
25797 collection of @acronym{NOV} lines.
25798
25799 @item @acronym{NOV}
25800 @cindex @acronym{NOV}
25801 When Gnus enters a group, it asks the back end for the headers of all
25802 unread articles in the group.  Most servers support the News OverView
25803 format, which is more compact and much faster to read and parse than the
25804 normal @sc{head} format.
25805
25806 @item level
25807 @cindex levels
25808 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
25809 that have a lower level are ``more'' subscribed than the groups with a
25810 higher level.  In fact, groups on levels 1-5 are considered
25811 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
25812 are @dfn{killed}.  Commands for listing groups and scanning for new
25813 articles will all use the numeric prefix as @dfn{working level}.
25814
25815 @item killed groups
25816 @cindex killed groups
25817 No information on killed groups is stored or updated, which makes killed
25818 groups much easier to handle than subscribed groups.
25819
25820 @item zombie groups
25821 @cindex zombie groups
25822 Just like killed groups, only slightly less dead.
25823
25824 @item active file
25825 @cindex active file
25826 The news server has to keep track of what articles it carries, and what
25827 groups exist.  All this information in stored in the active file, which
25828 is rather large, as you might surmise.
25829
25830 @item bogus groups
25831 @cindex bogus groups
25832 A group that exists in the @file{.newsrc} file, but isn't known to the
25833 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
25834 This means that the group probably doesn't exist (any more).
25835
25836 @item activating
25837 @cindex activating groups
25838 The act of asking the server for info on a group and computing the
25839 number of unread articles is called @dfn{activating the group}.
25840 Un-activated groups are listed with @samp{*} in the group buffer.
25841
25842 @item server
25843 @cindex server
25844 A machine one can connect to and get news (or mail) from.
25845
25846 @item select method
25847 @cindex select method
25848 A structure that specifies the back end, the server and the virtual
25849 server settings.
25850
25851 @item virtual server
25852 @cindex virtual server
25853 A named select method.  Since a select method defines all there is to
25854 know about connecting to a (physical) server, taking the thing as a
25855 whole is a virtual server.
25856
25857 @item washing
25858 @cindex washing
25859 Taking a buffer and running it through a filter of some sort.  The
25860 result will (more often than not) be cleaner and more pleasing than the
25861 original.
25862
25863 @item ephemeral groups
25864 @cindex ephemeral groups
25865 @cindex temporary groups
25866 Most groups store data on what articles you have read.  @dfn{Ephemeral}
25867 groups are groups that will have no data stored---when you exit the
25868 group, it'll disappear into the aether.
25869
25870 @item solid groups
25871 @cindex solid groups
25872 This is the opposite of ephemeral groups.  All groups listed in the
25873 group buffer are solid groups.
25874
25875 @item sparse articles
25876 @cindex sparse articles
25877 These are article placeholders shown in the summary buffer when
25878 @code{gnus-build-sparse-threads} has been switched on.
25879
25880 @item threading
25881 @cindex threading
25882 To put responses to articles directly after the articles they respond
25883 to---in a hierarchical fashion.
25884
25885 @item root
25886 @cindex root
25887 @cindex thread root
25888 The first article in a thread is the root.  It is the ancestor of all
25889 articles in the thread.
25890
25891 @item parent
25892 @cindex parent
25893 An article that has responses.
25894
25895 @item child
25896 @cindex child
25897 An article that responds to a different article---its parent.
25898
25899 @item digest
25900 @cindex digest
25901 A collection of messages in one file.  The most common digest format is
25902 specified by RFC 1153.
25903
25904 @item splitting
25905 @cindex splitting, terminolgy
25906 @cindex mail sorting
25907 @cindex mail filtering (splitting)
25908 The action of sorting your emails according to certain rules. Sometimes
25909 incorrectly called mail filtering.
25910
25911 @end table
25912
25913
25914 @page
25915 @node Customization
25916 @section Customization
25917 @cindex general customization
25918
25919 All variables are properly documented elsewhere in this manual.  This
25920 section is designed to give general pointers on how to customize Gnus
25921 for some quite common situations.
25922
25923 @menu
25924 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
25925 * Slow Terminal Connection::    You run a remote Emacs.
25926 * Little Disk Space::           You feel that having large setup files is icky.
25927 * Slow Machine::                You feel like buying a faster machine.
25928 @end menu
25929
25930
25931 @node Slow/Expensive Connection
25932 @subsection Slow/Expensive NNTP Connection
25933
25934 If you run Emacs on a machine locally, and get your news from a machine
25935 over some very thin strings, you want to cut down on the amount of data
25936 Gnus has to get from the @acronym{NNTP} server.
25937
25938 @table @code
25939
25940 @item gnus-read-active-file
25941 Set this to @code{nil}, which will inhibit Gnus from requesting the
25942 entire active file from the server.  This file is often v.  large.  You
25943 also have to set @code{gnus-check-new-newsgroups} and
25944 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
25945 doesn't suddenly decide to fetch the active file anyway.
25946
25947 @item gnus-nov-is-evil
25948 This one has to be @code{nil}.  If not, grabbing article headers from
25949 the @acronym{NNTP} server will not be very fast.  Not all @acronym{NNTP} servers
25950 support @sc{xover}; Gnus will detect this by itself.
25951 @end table
25952
25953
25954 @node Slow Terminal Connection
25955 @subsection Slow Terminal Connection
25956
25957 Let's say you use your home computer for dialing up the system that runs
25958 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
25959 possible) the amount of data sent over the wires.
25960
25961 @table @code
25962
25963 @item gnus-auto-center-summary
25964 Set this to @code{nil} to inhibit Gnus from re-centering the summary
25965 buffer all the time.  If it is @code{vertical}, do only vertical
25966 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
25967 horizontal and vertical recentering.
25968
25969 @item gnus-visible-headers
25970 Cut down on the headers included in the articles to the
25971 minimum.  You can, in fact, make do without them altogether---most of the
25972 useful data is in the summary buffer, anyway.  Set this variable to
25973 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
25974
25975 Set this hook to all the available hiding commands:
25976 @lisp
25977 (setq gnus-treat-hide-headers 'head
25978       gnus-treat-hide-signature t
25979       gnus-treat-hide-citation t)
25980 @end lisp
25981
25982 @item gnus-use-full-window
25983 By setting this to @code{nil}, you can make all the windows smaller.
25984 While this doesn't really cut down much generally, it means that you
25985 have to see smaller portions of articles before deciding that you didn't
25986 want to read them anyway.
25987
25988 @item gnus-thread-hide-subtree
25989 If this is non-@code{nil}, all threads in the summary buffer will be
25990 hidden initially.
25991
25992
25993 @item gnus-updated-mode-lines
25994 If this is @code{nil}, Gnus will not put information in the buffer mode
25995 lines, which might save some time.
25996 @end table
25997
25998
25999 @node Little Disk Space
26000 @subsection Little Disk Space
26001 @cindex disk space
26002
26003 The startup files can get rather large, so you may want to cut their
26004 sizes a bit if you are running out of space.
26005
26006 @table @code
26007
26008 @item gnus-save-newsrc-file
26009 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
26010 only save @file{.newsrc.eld}.  This means that you will not be able to
26011 use any other newsreaders than Gnus.  This variable is @code{t} by
26012 default.
26013
26014 @item gnus-read-newsrc-file
26015 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
26016 only read @file{.newsrc.eld}.  This means that you will not be able to
26017 use any other newsreaders than Gnus.  This variable is @code{t} by
26018 default.
26019
26020 @item gnus-save-killed-list
26021 If this is @code{nil}, Gnus will not save the list of dead groups.  You
26022 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
26023 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
26024 variable to @code{nil}.  This variable is @code{t} by default.
26025
26026 @end table
26027
26028
26029 @node Slow Machine
26030 @subsection Slow Machine
26031 @cindex slow machine
26032
26033 If you have a slow machine, or are just really impatient, there are a
26034 few things you can do to make Gnus run faster.
26035
26036 Set @code{gnus-check-new-newsgroups} and
26037 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
26038
26039 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
26040 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
26041 summary buffer faster.
26042
26043
26044 @page
26045 @node Troubleshooting
26046 @section Troubleshooting
26047 @cindex troubleshooting
26048
26049 Gnus works @emph{so} well straight out of the box---I can't imagine any
26050 problems, really.
26051
26052 Ahem.
26053
26054 @enumerate
26055
26056 @item
26057 Make sure your computer is switched on.
26058
26059 @item
26060 Make sure that you really load the current Gnus version.  If you have
26061 been running @sc{gnus}, you need to exit Emacs and start it up again before
26062 Gnus will work.
26063
26064 @item
26065 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
26066 like @samp{Gnus v5.46; nntp 4.0} you have the right files loaded.  If,
26067 on the other hand, you get something like @samp{NNTP 3.x} or @samp{nntp
26068 flee}, you have some old @file{.el} files lying around.  Delete these.
26069
26070 @item
26071 Read the help group (@kbd{G h} in the group buffer) for a
26072 @acronym{FAQ} and a how-to.
26073
26074 @item
26075 @vindex max-lisp-eval-depth
26076 Gnus works on many recursive structures, and in some extreme (and very
26077 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
26078 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
26079 something like that.
26080 @end enumerate
26081
26082 If all else fails, report the problem as a bug.
26083
26084 @cindex bugs
26085 @cindex reporting bugs
26086
26087 @kindex M-x gnus-bug
26088 @findex gnus-bug
26089 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
26090 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
26091 me the backtrace.  I will fix bugs, but I can only fix them if you send
26092 me a precise description as to how to reproduce the bug.
26093
26094 You really can never be too detailed in a bug report.  Always use the
26095 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
26096 a 10Kb mail each time you use it, and even if you have sent me your
26097 environment 500 times before.  I don't care.  I want the full info each
26098 time.
26099
26100 It is also important to remember that I have no memory whatsoever.  If
26101 you send a bug report, and I send you a reply, and then you just send
26102 back ``No, it's not! Moron!'', I will have no idea what you are
26103 insulting me about.  Always over-explain everything.  It's much easier
26104 for all of us---if I don't have all the information I need, I will just
26105 mail you and ask for more info, and everything takes more time.
26106
26107 If the problem you're seeing is very visual, and you can't quite explain
26108 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
26109 it somewhere it can be reached, and include the URL of the picture in
26110 the bug report.
26111
26112 @cindex patches
26113 If you would like to contribute a patch to fix bugs or make
26114 improvements, please produce the patch using @samp{diff -u}.
26115
26116 @cindex edebug
26117 If you want to debug your problem further before reporting, possibly
26118 in order to solve the problem yourself and send a patch, you can use
26119 edebug.  Debugging Lisp code is documented in the Elisp manual
26120 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
26121 Lisp Reference Manual}).  To get you started with edebug, consider if
26122 you discover some weird behaviour when pressing @kbd{c}, the first
26123 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
26124 the documentation buffer that leads you to the function definition,
26125 then press @kbd{M-x edebug-defun RET} with point inside that function,
26126 return to Gnus and press @kbd{c} to invoke the code.  You will be
26127 placed in the lisp buffer and can single step using @kbd{SPC} and
26128 evaluate expressions using @kbd{M-:} or inspect variables using
26129 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
26130 @kbd{c} or @kbd{g}.
26131
26132 @cindex elp
26133 @cindex profile
26134 @cindex slow
26135 Sometimes, a problem do not directly generate an elisp error but
26136 manifests itself by causing Gnus to be very slow.  In these cases, you
26137 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
26138 slow, and then try to analyze the backtrace (repeating the procedure
26139 helps isolating the real problem areas).
26140
26141 A fancier approach is to use the elisp profiler, ELP.  The profiler is
26142 (or should be) fully documented elsewhere, but to get you started
26143 there are a few steps that need to be followed.  First, instrument the
26144 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
26145 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
26146 RET message}.  Then perform the operation that is slow and press
26147 @kbd{M-x elp-results}.  You will then see which operations that takes
26148 time, and can debug them further.  If the entire operation takes much
26149 longer than the time spent in the slowest function in the profiler
26150 output, you probably profiled the wrong part of Gnus.  To reset
26151 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
26152 elp-restore-all} is supposed to remove profiling, but given the
26153 complexities and dynamic code generation in Gnus, it might not always
26154 work perfectly.
26155
26156 @cindex gnu.emacs.gnus
26157 @cindex ding mailing list
26158 If you just need help, you are better off asking on
26159 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
26160 @email{ding@@gnus.org, the ding mailing list}.  Write to
26161 @email{ding-request@@gnus.org} to subscribe.
26162
26163
26164 @page
26165 @node Gnus Reference Guide
26166 @section Gnus Reference Guide
26167
26168 It is my hope that other people will figure out smart stuff that Gnus
26169 can do, and that other people will write those smart things as well.  To
26170 facilitate that I thought it would be a good idea to describe the inner
26171 workings of Gnus.  And some of the not-so-inner workings, while I'm at
26172 it.
26173
26174 You can never expect the internals of a program not to change, but I
26175 will be defining (in some details) the interface between Gnus and its
26176 back ends (this is written in stone), the format of the score files
26177 (ditto), data structures (some are less likely to change than others)
26178 and general methods of operation.
26179
26180 @menu
26181 * Gnus Utility Functions::      Common functions and variable to use.
26182 * Back End Interface::          How Gnus communicates with the servers.
26183 * Score File Syntax::           A BNF definition of the score file standard.
26184 * Headers::                     How Gnus stores headers internally.
26185 * Ranges::                      A handy format for storing mucho numbers.
26186 * Group Info::                  The group info format.
26187 * Extended Interactive::        Symbolic prefixes and stuff.
26188 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
26189 * Various File Formats::        Formats of files that Gnus use.
26190 @end menu
26191
26192
26193 @node Gnus Utility Functions
26194 @subsection Gnus Utility Functions
26195 @cindex Gnus utility functions
26196 @cindex utility functions
26197 @cindex functions
26198 @cindex internal variables
26199
26200 When writing small functions to be run from hooks (and stuff), it's
26201 vital to have access to the Gnus internal functions and variables.
26202 Below is a list of the most common ones.
26203
26204 @table @code
26205
26206 @item gnus-newsgroup-name
26207 @vindex gnus-newsgroup-name
26208 This variable holds the name of the current newsgroup.
26209
26210 @item gnus-find-method-for-group
26211 @findex gnus-find-method-for-group
26212 A function that returns the select method for @var{group}.
26213
26214 @item gnus-group-real-name
26215 @findex gnus-group-real-name
26216 Takes a full (prefixed) Gnus group name, and returns the unprefixed
26217 name.
26218
26219 @item gnus-group-prefixed-name
26220 @findex gnus-group-prefixed-name
26221 Takes an unprefixed group name and a select method, and returns the full
26222 (prefixed) Gnus group name.
26223
26224 @item gnus-get-info
26225 @findex gnus-get-info
26226 Returns the group info list for @var{group}.
26227
26228 @item gnus-group-unread
26229 @findex gnus-group-unread
26230 The number of unread articles in @var{group}, or @code{t} if that is
26231 unknown.
26232
26233 @item gnus-active
26234 @findex gnus-active
26235 The active entry for @var{group}.
26236
26237 @item gnus-set-active
26238 @findex gnus-set-active
26239 Set the active entry for @var{group}.
26240
26241 @item gnus-add-current-to-buffer-list
26242 @findex gnus-add-current-to-buffer-list
26243 Adds the current buffer to the list of buffers to be killed on Gnus
26244 exit.
26245
26246 @item gnus-continuum-version
26247 @findex gnus-continuum-version
26248 Takes a Gnus version string as a parameter and returns a floating point
26249 number.  Earlier versions will always get a lower number than later
26250 versions.
26251
26252 @item gnus-group-read-only-p
26253 @findex gnus-group-read-only-p
26254 Says whether @var{group} is read-only or not.
26255
26256 @item gnus-news-group-p
26257 @findex gnus-news-group-p
26258 Says whether @var{group} came from a news back end.
26259
26260 @item gnus-ephemeral-group-p
26261 @findex gnus-ephemeral-group-p
26262 Says whether @var{group} is ephemeral or not.
26263
26264 @item gnus-server-to-method
26265 @findex gnus-server-to-method
26266 Returns the select method corresponding to @var{server}.
26267
26268 @item gnus-server-equal
26269 @findex gnus-server-equal
26270 Says whether two virtual servers are equal.
26271
26272 @item gnus-group-native-p
26273 @findex gnus-group-native-p
26274 Says whether @var{group} is native or not.
26275
26276 @item gnus-group-secondary-p
26277 @findex gnus-group-secondary-p
26278 Says whether @var{group} is secondary or not.
26279
26280 @item gnus-group-foreign-p
26281 @findex gnus-group-foreign-p
26282 Says whether @var{group} is foreign or not.
26283
26284 @item gnus-group-find-parameter
26285 @findex gnus-group-find-parameter
26286 Returns the parameter list of @var{group}.  If given a second parameter,
26287 returns the value of that parameter for @var{group}.
26288
26289 @item gnus-group-set-parameter
26290 @findex gnus-group-set-parameter
26291 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
26292
26293 @item gnus-narrow-to-body
26294 @findex gnus-narrow-to-body
26295 Narrows the current buffer to the body of the article.
26296
26297 @item gnus-check-backend-function
26298 @findex gnus-check-backend-function
26299 Takes two parameters, @var{function} and @var{group}.  If the back end
26300 @var{group} comes from supports @var{function}, return non-@code{nil}.
26301
26302 @lisp
26303 (gnus-check-backend-function "request-scan" "nnml:misc")
26304 @result{} t
26305 @end lisp
26306
26307 @item gnus-read-method
26308 @findex gnus-read-method
26309 Prompts the user for a select method.
26310
26311 @end table
26312
26313
26314 @node Back End Interface
26315 @subsection Back End Interface
26316
26317 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
26318 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
26319 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
26320 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
26321 examples of the latter we have @code{nntp-port-number} and
26322 @code{nnmbox-directory}.
26323
26324 When Gnus asks for information from a back end---say @code{nntp}---on
26325 something, it will normally include a virtual server name in the
26326 function parameters.  (If not, the back end should use the ``current''
26327 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
26328 server as its only (optional) parameter.  If this virtual server hasn't
26329 been opened, the function should fail.
26330
26331 Note that a virtual server name has no relation to some physical server
26332 name.  Take this example:
26333
26334 @lisp
26335 (nntp "odd-one"
26336       (nntp-address "ifi.uio.no")
26337       (nntp-port-number 4324))
26338 @end lisp
26339
26340 Here the virtual server name is @samp{odd-one} while the name of
26341 the physical server is @samp{ifi.uio.no}.
26342
26343 The back ends should be able to switch between several virtual servers.
26344 The standard back ends implement this by keeping an alist of virtual
26345 server environments that they pull down/push up when needed.
26346
26347 There are two groups of interface functions: @dfn{required functions},
26348 which must be present, and @dfn{optional functions}, which Gnus will
26349 always check for presence before attempting to call 'em.
26350
26351 All these functions are expected to return data in the buffer
26352 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
26353 unfortunately named, but we'll have to live with it.  When I talk about
26354 @dfn{resulting data}, I always refer to the data in that buffer.  When I
26355 talk about @dfn{return value}, I talk about the function value returned by
26356 the function call.  Functions that fail should return @code{nil} as the
26357 return value.
26358
26359 Some back ends could be said to be @dfn{server-forming} back ends, and
26360 some might be said not to be.  The latter are back ends that generally
26361 only operate on one group at a time, and have no concept of ``server''
26362 ---they have a group, and they deliver info on that group and nothing
26363 more.
26364
26365 Gnus identifies each message by way of group name and article number.  A
26366 few remarks about these article numbers might be useful.  First of all,
26367 the numbers are positive integers.  Secondly, it is normally not
26368 possible for later articles to ``re-use'' older article numbers without
26369 confusing Gnus.  That is, if a group has ever contained a message
26370 numbered 42, then no other message may get that number, or Gnus will get
26371 mightily confused.@footnote{See the function
26372 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
26373 Third, article numbers must be assigned in order of arrival in the
26374 group; this is not necessarily the same as the date of the message.
26375
26376 The previous paragraph already mentions all the ``hard'' restrictions that
26377 article numbers must fulfill.  But it seems that it might be useful to
26378 assign @emph{consecutive} article numbers, for Gnus gets quite confused
26379 if there are holes in the article numbering sequence.  However, due to
26380 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
26381 also useful for the article numbers to start at 1 to avoid running out
26382 of numbers as long as possible.
26383
26384 Note that by convention, back ends are named @code{nnsomething}, but
26385 Gnus also comes with some @code{nnnotbackends}, such as
26386 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
26387
26388 In the examples and definitions I will refer to the imaginary back end
26389 @code{nnchoke}.
26390
26391 @cindex @code{nnchoke}
26392
26393 @menu
26394 * Required Back End Functions::  Functions that must be implemented.
26395 * Optional Back End Functions::  Functions that need not be implemented.
26396 * Error Messaging::             How to get messages and report errors.
26397 * Writing New Back Ends::       Extending old back ends.
26398 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
26399 * Mail-like Back Ends::         Some tips on mail back ends.
26400 @end menu
26401
26402
26403 @node Required Back End Functions
26404 @subsubsection Required Back End Functions
26405
26406 @table @code
26407
26408 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
26409
26410 @var{articles} is either a range of article numbers or a list of
26411 @code{Message-ID}s.  Current back ends do not fully support either---only
26412 sequences (lists) of article numbers, and most back ends do not support
26413 retrieval of @code{Message-ID}s.  But they should try for both.
26414
26415 The result data should either be HEADs or @acronym{NOV} lines, and the result
26416 value should either be @code{headers} or @code{nov} to reflect this.
26417 This might later be expanded to @code{various}, which will be a mixture
26418 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
26419
26420 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
26421 headers'', in some meaning of the word.  This is generally done by
26422 fetching (at most) @var{fetch-old} extra headers less than the smallest
26423 article number in @code{articles}, and filling the gaps as well.  The
26424 presence of this parameter can be ignored if the back end finds it
26425 cumbersome to follow the request.  If this is non-@code{nil} and not a
26426 number, do maximum fetches.
26427
26428 Here's an example HEAD:
26429
26430 @example
26431 221 1056 Article retrieved.
26432 Path: ifi.uio.no!sturles
26433 From: sturles@@ifi.uio.no (Sturle Sunde)
26434 Newsgroups: ifi.discussion
26435 Subject: Re: Something very droll
26436 Date: 27 Oct 1994 14:02:57 +0100
26437 Organization: Dept. of Informatics, University of Oslo, Norway
26438 Lines: 26
26439 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
26440 References: <38jdmq$4qu@@visbur.ifi.uio.no>
26441 NNTP-Posting-Host: holmenkollen.ifi.uio.no
26442 .
26443 @end example
26444
26445 So a @code{headers} return value would imply that there's a number of
26446 these in the data buffer.
26447
26448 Here's a BNF definition of such a buffer:
26449
26450 @example
26451 headers        = *head
26452 head           = error / valid-head
26453 error-message  = [ "4" / "5" ] 2number " " <error message> eol
26454 valid-head     = valid-message *header "." eol
26455 valid-message  = "221 " <number> " Article retrieved." eol
26456 header         = <text> eol
26457 @end example
26458
26459 @cindex BNF
26460 (The version of BNF used here is the one used in RFC822.)
26461
26462 If the return value is @code{nov}, the data buffer should contain
26463 @dfn{network overview database} lines.  These are basically fields
26464 separated by tabs.
26465
26466 @example
26467 nov-buffer = *nov-line
26468 nov-line   = field 7*8[ <TAB> field ] eol
26469 field      = <text except TAB>
26470 @end example
26471
26472 For a closer look at what should be in those fields,
26473 @pxref{Headers}.
26474
26475
26476 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
26477
26478 @var{server} is here the virtual server name.  @var{definitions} is a
26479 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
26480
26481 If the server can't be opened, no error should be signaled.  The back end
26482 may then choose to refuse further attempts at connecting to this
26483 server.  In fact, it should do so.
26484
26485 If the server is opened already, this function should return a
26486 non-@code{nil} value.  There should be no data returned.
26487
26488
26489 @item (nnchoke-close-server &optional SERVER)
26490
26491 Close connection to @var{server} and free all resources connected
26492 to it.  Return @code{nil} if the server couldn't be closed for some
26493 reason.
26494
26495 There should be no data returned.
26496
26497
26498 @item (nnchoke-request-close)
26499
26500 Close connection to all servers and free all resources that the back end
26501 have reserved.  All buffers that have been created by that back end
26502 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
26503 function is generally only called when Gnus is shutting down.
26504
26505 There should be no data returned.
26506
26507
26508 @item (nnchoke-server-opened &optional SERVER)
26509
26510 If @var{server} is the current virtual server, and the connection to the
26511 physical server is alive, then this function should return a
26512 non-@code{nil} value.  This function should under no circumstances
26513 attempt to reconnect to a server we have lost connection to.
26514
26515 There should be no data returned.
26516
26517
26518 @item (nnchoke-status-message &optional SERVER)
26519
26520 This function should return the last error message from @var{server}.
26521
26522 There should be no data returned.
26523
26524
26525 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
26526
26527 The result data from this function should be the article specified by
26528 @var{article}.  This might either be a @code{Message-ID} or a number.
26529 It is optional whether to implement retrieval by @code{Message-ID}, but
26530 it would be nice if that were possible.
26531
26532 If @var{to-buffer} is non-@code{nil}, the result data should be returned
26533 in this buffer instead of the normal data buffer.  This is to make it
26534 possible to avoid copying large amounts of data from one buffer to
26535 another, while Gnus mainly requests articles to be inserted directly
26536 into its article buffer.
26537
26538 If it is at all possible, this function should return a cons cell where
26539 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
26540 the article number.  This will enable Gnus to find out what the real
26541 group and article numbers are when fetching articles by
26542 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
26543 on successful article retrieval.
26544
26545
26546 @item (nnchoke-request-group GROUP &optional SERVER FAST)
26547
26548 Get data on @var{group}.  This function also has the side effect of
26549 making @var{group} the current group.
26550
26551 If @var{fast}, don't bother to return useful data, just make @var{group}
26552 the current group.
26553
26554 Here's an example of some result data and a definition of the same:
26555
26556 @example
26557 211 56 1000 1059 ifi.discussion
26558 @end example
26559
26560 The first number is the status, which should be 211.  Next is the
26561 total number of articles in the group, the lowest article number, the
26562 highest article number, and finally the group name.  Note that the total
26563 number of articles may be less than one might think while just
26564 considering the highest and lowest article numbers, but some articles
26565 may have been canceled.  Gnus just discards the total-number, so
26566 whether one should take the bother to generate it properly (if that is a
26567 problem) is left as an exercise to the reader.  If the group contains no
26568 articles, the lowest article number should be reported as 1 and the
26569 highest as 0.
26570
26571 @example
26572 group-status = [ error / info ] eol
26573 error        = [ "4" / "5" ] 2<number> " " <Error message>
26574 info         = "211 " 3* [ <number> " " ] <string>
26575 @end example
26576
26577
26578 @item (nnchoke-close-group GROUP &optional SERVER)
26579
26580 Close @var{group} and free any resources connected to it.  This will be
26581 a no-op on most back ends.
26582
26583 There should be no data returned.
26584
26585
26586 @item (nnchoke-request-list &optional SERVER)
26587
26588 Return a list of all groups available on @var{server}.  And that means
26589 @emph{all}.
26590
26591 Here's an example from a server that only carries two groups:
26592
26593 @example
26594 ifi.test 0000002200 0000002000 y
26595 ifi.discussion 3324 3300 n
26596 @end example
26597
26598 On each line we have a group name, then the highest article number in
26599 that group, the lowest article number, and finally a flag.  If the group
26600 contains no articles, the lowest article number should be reported as 1
26601 and the highest as 0.
26602
26603 @example
26604 active-file = *active-line
26605 active-line = name " " <number> " " <number> " " flags eol
26606 name        = <string>
26607 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
26608 @end example
26609
26610 The flag says whether the group is read-only (@samp{n}), is moderated
26611 (@samp{m}), is dead (@samp{x}), is aliased to some other group
26612 (@samp{=other-group}) or none of the above (@samp{y}).
26613
26614
26615 @item (nnchoke-request-post &optional SERVER)
26616
26617 This function should post the current buffer.  It might return whether
26618 the posting was successful or not, but that's not required.  If, for
26619 instance, the posting is done asynchronously, it has generally not been
26620 completed by the time this function concludes.  In that case, this
26621 function should set up some kind of sentinel to beep the user loud and
26622 clear if the posting could not be completed.
26623
26624 There should be no result data from this function.
26625
26626 @end table
26627
26628
26629 @node Optional Back End Functions
26630 @subsubsection Optional Back End Functions
26631
26632 @table @code
26633
26634 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
26635
26636 @var{groups} is a list of groups, and this function should request data
26637 on all those groups.  How it does it is of no concern to Gnus, but it
26638 should attempt to do this in a speedy fashion.
26639
26640 The return value of this function can be either @code{active} or
26641 @code{group}, which says what the format of the result data is.  The
26642 former is in the same format as the data from
26643 @code{nnchoke-request-list}, while the latter is a buffer full of lines
26644 in the same format as @code{nnchoke-request-group} gives.
26645
26646 @example
26647 group-buffer = *active-line / *group-status
26648 @end example
26649
26650
26651 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
26652
26653 A Gnus group info (@pxref{Group Info}) is handed to the back end for
26654 alterations.  This comes in handy if the back end really carries all
26655 the information (as is the case with virtual and imap groups).  This
26656 function should destructively alter the info to suit its needs, and
26657 should return a non-@code{nil} value.
26658
26659 There should be no result data from this function.
26660
26661
26662 @item (nnchoke-request-type GROUP &optional ARTICLE)
26663
26664 When the user issues commands for ``sending news'' (@kbd{F} in the
26665 summary buffer, for instance), Gnus has to know whether the article the
26666 user is following up on is news or mail.  This function should return
26667 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
26668 is mail and @code{unknown} if the type can't be decided.  (The
26669 @var{article} parameter is necessary in @code{nnvirtual} groups which
26670 might very well combine mail groups and news groups.)  Both @var{group}
26671 and @var{article} may be @code{nil}.
26672
26673 There should be no result data from this function.
26674
26675
26676 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
26677
26678 Set/remove/add marks on articles.  Normally Gnus handles the article
26679 marks (such as read, ticked, expired etc) internally, and store them in
26680 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
26681 all information about the articles on the server, so Gnus need to
26682 propagate the mark information to the server.
26683
26684 @var{action} is a list of mark setting requests, having this format:
26685
26686 @example
26687 (RANGE ACTION MARK)
26688 @end example
26689
26690 @var{range} is a range of articles you wish to update marks on.
26691 @var{action} is @code{add} or @code{del}, used to add marks or remove
26692 marks (preserving all marks not mentioned).  @var{mark} is a list of
26693 marks; where each mark is a symbol.  Currently used marks are
26694 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
26695 @code{dormant}, @code{save}, @code{download}, @code{unsend},
26696 @code{forward} and @code{recent}, but your back end should, if
26697 possible, not limit itself to these.
26698
26699 Given contradictory actions, the last action in the list should be the
26700 effective one.  That is, if your action contains a request to add the
26701 @code{tick} mark on article 1 and, later in the list, a request to
26702 remove the mark on the same article, the mark should in fact be removed.
26703
26704 An example action list:
26705
26706 @example
26707 (((5 12 30) 'del '(tick))
26708  ((10 . 90) 'add '(read expire))
26709  ((92 94) 'del '(read)))
26710 @end example
26711
26712 The function should return a range of articles it wasn't able to set the
26713 mark on (currently not used for anything).
26714
26715 There should be no result data from this function.
26716
26717 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
26718
26719 If the user tries to set a mark that the back end doesn't like, this
26720 function may change the mark.  Gnus will use whatever this function
26721 returns as the mark for @var{article} instead of the original
26722 @var{mark}.  If the back end doesn't care, it must return the original
26723 @var{mark}, and not @code{nil} or any other type of garbage.
26724
26725 The only use for this I can see is what @code{nnvirtual} does with
26726 it---if a component group is auto-expirable, marking an article as read
26727 in the virtual group should result in the article being marked as
26728 expirable.
26729
26730 There should be no result data from this function.
26731
26732
26733 @item (nnchoke-request-scan &optional GROUP SERVER)
26734
26735 This function may be called at any time (by Gnus or anything else) to
26736 request that the back end check for incoming articles, in one way or
26737 another.  A mail back end will typically read the spool file or query
26738 the @acronym{POP} server when this function is invoked.  The
26739 @var{group} doesn't have to be heeded---if the back end decides that
26740 it is too much work just scanning for a single group, it may do a
26741 total scan of all groups.  It would be nice, however, to keep things
26742 local if that's practical.
26743
26744 There should be no result data from this function.
26745
26746
26747 @item (nnchoke-request-group-description GROUP &optional SERVER)
26748
26749 The result data from this function should be a description of
26750 @var{group}.
26751
26752 @example
26753 description-line = name <TAB> description eol
26754 name             = <string>
26755 description      = <text>
26756 @end example
26757
26758 @item (nnchoke-request-list-newsgroups &optional SERVER)
26759
26760 The result data from this function should be the description of all
26761 groups available on the server.
26762
26763 @example
26764 description-buffer = *description-line
26765 @end example
26766
26767
26768 @item (nnchoke-request-newgroups DATE &optional SERVER)
26769
26770 The result data from this function should be all groups that were
26771 created after @samp{date}, which is in normal human-readable date format
26772 (i.e., the date format used in mail and news headers, and returned by
26773 the function @code{message-make-date} by default).  The data should be
26774 in the active buffer format.
26775
26776 It is okay for this function to return ``too many'' groups; some back ends
26777 might find it cheaper to return the full list of groups, rather than
26778 just the new groups.  But don't do this for back ends with many groups.
26779 Normally, if the user creates the groups herself, there won't be too
26780 many groups, so @code{nnml} and the like are probably safe.  But for
26781 back ends like @code{nntp}, where the groups have been created by the
26782 server, it is quite likely that there can be many groups.
26783
26784
26785 @item (nnchoke-request-create-group GROUP &optional SERVER)
26786
26787 This function should create an empty group with name @var{group}.
26788
26789 There should be no return data.
26790
26791
26792 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
26793
26794 This function should run the expiry process on all articles in the
26795 @var{articles} range (which is currently a simple list of article
26796 numbers.)  It is left up to the back end to decide how old articles
26797 should be before they are removed by this function.  If @var{force} is
26798 non-@code{nil}, all @var{articles} should be deleted, no matter how new
26799 they are.
26800
26801 This function should return a list of articles that it did not/was not
26802 able to delete.
26803
26804 There should be no result data returned.
26805
26806
26807 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
26808
26809 This function should move @var{article} (which is a number) from
26810 @var{group} by calling @var{accept-form}.
26811
26812 This function should ready the article in question for moving by
26813 removing any header lines it has added to the article, and generally
26814 should ``tidy up'' the article.  Then it should @code{eval}
26815 @var{accept-form} in the buffer where the ``tidy'' article is.  This
26816 will do the actual copying.  If this @code{eval} returns a
26817 non-@code{nil} value, the article should be removed.
26818
26819 If @var{last} is @code{nil}, that means that there is a high likelihood
26820 that there will be more requests issued shortly, so that allows some
26821 optimizations.
26822
26823 The function should return a cons where the @code{car} is the group name and
26824 the @code{cdr} is the article number that the article was entered as.
26825
26826 There should be no data returned.
26827
26828
26829 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
26830
26831 This function takes the current buffer and inserts it into @var{group}.
26832 If @var{last} in @code{nil}, that means that there will be more calls to
26833 this function in short order.
26834
26835 The function should return a cons where the @code{car} is the group name and
26836 the @code{cdr} is the article number that the article was entered as.
26837
26838 The group should exist before the back end is asked to accept the
26839 article for that group.
26840
26841 There should be no data returned.
26842
26843
26844 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
26845
26846 This function should remove @var{article} (which is a number) from
26847 @var{group} and insert @var{buffer} there instead.
26848
26849 There should be no data returned.
26850
26851
26852 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
26853
26854 This function should delete @var{group}.  If @var{force}, it should
26855 really delete all the articles in the group, and then delete the group
26856 itself.  (If there is such a thing as ``the group itself''.)
26857
26858 There should be no data returned.
26859
26860
26861 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
26862
26863 This function should rename @var{group} into @var{new-name}.  All
26864 articles in @var{group} should move to @var{new-name}.
26865
26866 There should be no data returned.
26867
26868 @end table
26869
26870
26871 @node Error Messaging
26872 @subsubsection Error Messaging
26873
26874 @findex nnheader-report
26875 @findex nnheader-get-report
26876 The back ends should use the function @code{nnheader-report} to report
26877 error conditions---they should not raise errors when they aren't able to
26878 perform a request.  The first argument to this function is the back end
26879 symbol, and the rest are interpreted as arguments to @code{format} if
26880 there are multiple of them, or just a string if there is one of them.
26881 This function must always returns @code{nil}.
26882
26883 @lisp
26884 (nnheader-report 'nnchoke "You did something totally bogus")
26885
26886 (nnheader-report 'nnchoke "Could not request group %s" group)
26887 @end lisp
26888
26889 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
26890 @code{nil} back from a server, and this function returns the most
26891 recently reported message for the back end in question.  This function
26892 takes one argument---the server symbol.
26893
26894 Internally, these functions access @var{back-end}@code{-status-string},
26895 so the @code{nnchoke} back end will have its error message stored in
26896 @code{nnchoke-status-string}.
26897
26898
26899 @node Writing New Back Ends
26900 @subsubsection Writing New Back Ends
26901
26902 Many back ends are quite similar.  @code{nnml} is just like
26903 @code{nnspool}, but it allows you to edit the articles on the server.
26904 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
26905 and it doesn't maintain overview databases.  @code{nndir} is just like
26906 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
26907 editing articles.
26908
26909 It would make sense if it were possible to ``inherit'' functions from
26910 back ends when writing new back ends.  And, indeed, you can do that if you
26911 want to.  (You don't have to if you don't want to, of course.)
26912
26913 All the back ends declare their public variables and functions by using a
26914 package called @code{nnoo}.
26915
26916 To inherit functions from other back ends (and allow other back ends to
26917 inherit functions from the current back end), you should use the
26918 following macros:
26919
26920 @table @code
26921
26922 @item nnoo-declare
26923 This macro declares the first parameter to be a child of the subsequent
26924 parameters.  For instance:
26925
26926 @lisp
26927 (nnoo-declare nndir
26928   nnml nnmh)
26929 @end lisp
26930
26931 @code{nndir} has declared here that it intends to inherit functions from
26932 both @code{nnml} and @code{nnmh}.
26933
26934 @item defvoo
26935 This macro is equivalent to @code{defvar}, but registers the variable as
26936 a public server variable.  Most state-oriented variables should be
26937 declared with @code{defvoo} instead of @code{defvar}.
26938
26939 In addition to the normal @code{defvar} parameters, it takes a list of
26940 variables in the parent back ends to map the variable to when executing
26941 a function in those back ends.
26942
26943 @lisp
26944 (defvoo nndir-directory nil
26945   "Where nndir will look for groups."
26946   nnml-current-directory nnmh-current-directory)
26947 @end lisp
26948
26949 This means that @code{nnml-current-directory} will be set to
26950 @code{nndir-directory} when an @code{nnml} function is called on behalf
26951 of @code{nndir}.  (The same with @code{nnmh}.)
26952
26953 @item nnoo-define-basics
26954 This macro defines some common functions that almost all back ends should
26955 have.
26956
26957 @lisp
26958 (nnoo-define-basics nndir)
26959 @end lisp
26960
26961 @item deffoo
26962 This macro is just like @code{defun} and takes the same parameters.  In
26963 addition to doing the normal @code{defun} things, it registers the
26964 function as being public so that other back ends can inherit it.
26965
26966 @item nnoo-map-functions
26967 This macro allows mapping of functions from the current back end to
26968 functions from the parent back ends.
26969
26970 @lisp
26971 (nnoo-map-functions nndir
26972   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26973   (nnmh-request-article 0 nndir-current-group 0 0))
26974 @end lisp
26975
26976 This means that when @code{nndir-retrieve-headers} is called, the first,
26977 third, and fourth parameters will be passed on to
26978 @code{nnml-retrieve-headers}, while the second parameter is set to the
26979 value of @code{nndir-current-group}.
26980
26981 @item nnoo-import
26982 This macro allows importing functions from back ends.  It should be the
26983 last thing in the source file, since it will only define functions that
26984 haven't already been defined.
26985
26986 @lisp
26987 (nnoo-import nndir
26988   (nnmh
26989    nnmh-request-list
26990    nnmh-request-newgroups)
26991   (nnml))
26992 @end lisp
26993
26994 This means that calls to @code{nndir-request-list} should just be passed
26995 on to @code{nnmh-request-list}, while all public functions from
26996 @code{nnml} that haven't been defined in @code{nndir} yet should be
26997 defined now.
26998
26999 @end table
27000
27001 Below is a slightly shortened version of the @code{nndir} back end.
27002
27003 @lisp
27004 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
27005 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
27006
27007 ;;; @r{Code:}
27008
27009 (require 'nnheader)
27010 (require 'nnmh)
27011 (require 'nnml)
27012 (require 'nnoo)
27013 (eval-when-compile (require 'cl))
27014
27015 (nnoo-declare nndir
27016   nnml nnmh)
27017
27018 (defvoo nndir-directory nil
27019   "Where nndir will look for groups."
27020   nnml-current-directory nnmh-current-directory)
27021
27022 (defvoo nndir-nov-is-evil nil
27023   "*Non-nil means that nndir will never retrieve NOV headers."
27024   nnml-nov-is-evil)
27025
27026 (defvoo nndir-current-group ""
27027   nil
27028   nnml-current-group nnmh-current-group)
27029 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
27030 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
27031
27032 (defvoo nndir-status-string "" nil nnmh-status-string)
27033 (defconst nndir-version "nndir 1.0")
27034
27035 ;;; @r{Interface functions.}
27036
27037 (nnoo-define-basics nndir)
27038
27039 (deffoo nndir-open-server (server &optional defs)
27040   (setq nndir-directory
27041         (or (cadr (assq 'nndir-directory defs))
27042             server))
27043   (unless (assq 'nndir-directory defs)
27044     (push `(nndir-directory ,server) defs))
27045   (push `(nndir-current-group
27046           ,(file-name-nondirectory
27047             (directory-file-name nndir-directory)))
27048         defs)
27049   (push `(nndir-top-directory
27050           ,(file-name-directory (directory-file-name nndir-directory)))
27051         defs)
27052   (nnoo-change-server 'nndir server defs))
27053
27054 (nnoo-map-functions nndir
27055   (nnml-retrieve-headers 0 nndir-current-group 0 0)
27056   (nnmh-request-article 0 nndir-current-group 0 0)
27057   (nnmh-request-group nndir-current-group 0 0)
27058   (nnmh-close-group nndir-current-group 0))
27059
27060 (nnoo-import nndir
27061   (nnmh
27062    nnmh-status-message
27063    nnmh-request-list
27064    nnmh-request-newgroups))
27065
27066 (provide 'nndir)
27067 @end lisp
27068
27069
27070 @node Hooking New Back Ends Into Gnus
27071 @subsubsection Hooking New Back Ends Into Gnus
27072
27073 @vindex gnus-valid-select-methods
27074 @findex gnus-declare-backend
27075 Having Gnus start using your new back end is rather easy---you just
27076 declare it with the @code{gnus-declare-backend} functions.  This will
27077 enter the back end into the @code{gnus-valid-select-methods} variable.
27078
27079 @code{gnus-declare-backend} takes two parameters---the back end name and
27080 an arbitrary number of @dfn{abilities}.
27081
27082 Here's an example:
27083
27084 @lisp
27085 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
27086 @end lisp
27087
27088 The above line would then go in the @file{nnchoke.el} file.
27089
27090 The abilities can be:
27091
27092 @table @code
27093 @item mail
27094 This is a mailish back end---followups should (probably) go via mail.
27095 @item post
27096 This is a newsish back end---followups should (probably) go via news.
27097 @item post-mail
27098 This back end supports both mail and news.
27099 @item none
27100 This is neither a post nor mail back end---it's something completely
27101 different.
27102 @item respool
27103 It supports respooling---or rather, it is able to modify its source
27104 articles and groups.
27105 @item address
27106 The name of the server should be in the virtual server name.  This is
27107 true for almost all back ends.
27108 @item prompt-address
27109 The user should be prompted for an address when doing commands like
27110 @kbd{B} in the group buffer.  This is true for back ends like
27111 @code{nntp}, but not @code{nnmbox}, for instance.
27112 @end table
27113
27114
27115 @node Mail-like Back Ends
27116 @subsubsection Mail-like Back Ends
27117
27118 One of the things that separate the mail back ends from the rest of the
27119 back ends is the heavy dependence by most of the mail back ends on
27120 common functions in @file{nnmail.el}.  For instance, here's the
27121 definition of @code{nnml-request-scan}:
27122
27123 @lisp
27124 (deffoo nnml-request-scan (&optional group server)
27125   (setq nnml-article-file-alist nil)
27126   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
27127 @end lisp
27128
27129 It simply calls @code{nnmail-get-new-mail} with a few parameters,
27130 and @code{nnmail} takes care of all the moving and splitting of the
27131 mail.
27132
27133 This function takes four parameters.
27134
27135 @table @var
27136 @item method
27137 This should be a symbol to designate which back end is responsible for
27138 the call.
27139
27140 @item exit-function
27141 This function should be called after the splitting has been performed.
27142
27143 @item temp-directory
27144 Where the temporary files should be stored.
27145
27146 @item group
27147 This optional argument should be a group name if the splitting is to be
27148 performed for one group only.
27149 @end table
27150
27151 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
27152 save each article.  @var{back-end}@code{-active-number} will be called to
27153 find the article number assigned to this article.
27154
27155 The function also uses the following variables:
27156 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
27157 this back end); and @var{back-end}@code{-group-alist} and
27158 @var{back-end}@code{-active-file} to generate the new active file.
27159 @var{back-end}@code{-group-alist} should be a group-active alist, like
27160 this:
27161
27162 @example
27163 (("a-group" (1 . 10))
27164  ("some-group" (34 . 39)))
27165 @end example
27166
27167
27168 @node Score File Syntax
27169 @subsection Score File Syntax
27170
27171 Score files are meant to be easily parseable, but yet extremely
27172 mallable.  It was decided that something that had the same read syntax
27173 as an Emacs Lisp list would fit that spec.
27174
27175 Here's a typical score file:
27176
27177 @lisp
27178 (("summary"
27179   ("win95" -10000 nil s)
27180   ("Gnus"))
27181  ("from"
27182   ("Lars" -1000))
27183  (mark -100))
27184 @end lisp
27185
27186 BNF definition of a score file:
27187
27188 @example
27189 score-file      = "" / "(" *element ")"
27190 element         = rule / atom
27191 rule            = string-rule / number-rule / date-rule
27192 string-rule     = "(" quote string-header quote space *string-match ")"
27193 number-rule     = "(" quote number-header quote space *number-match ")"
27194 date-rule       = "(" quote date-header quote space *date-match ")"
27195 quote           = <ascii 34>
27196 string-header   = "subject" / "from" / "references" / "message-id" /
27197                   "xref" / "body" / "head" / "all" / "followup"
27198 number-header   = "lines" / "chars"
27199 date-header     = "date"
27200 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
27201                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
27202 score           = "nil" / <integer>
27203 date            = "nil" / <natural number>
27204 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
27205                   "r" / "regex" / "R" / "Regex" /
27206                   "e" / "exact" / "E" / "Exact" /
27207                   "f" / "fuzzy" / "F" / "Fuzzy"
27208 number-match    = "(" <integer> [ "" / [ space score [ "" /
27209                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
27210 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
27211 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
27212                   space date [ "" / [ space date-match-t ] ] ] ] ")"
27213 date-match-t    = "nil" / "at" / "before" / "after"
27214 atom            = "(" [ required-atom / optional-atom ] ")"
27215 required-atom   = mark / expunge / mark-and-expunge / files /
27216                   exclude-files / read-only / touched
27217 optional-atom   = adapt / local / eval
27218 mark            = "mark" space nil-or-number
27219 nil-or-number   = "nil" / <integer>
27220 expunge         = "expunge" space nil-or-number
27221 mark-and-expunge = "mark-and-expunge" space nil-or-number
27222 files           = "files" *[ space <string> ]
27223 exclude-files   = "exclude-files" *[ space <string> ]
27224 read-only       = "read-only" [ space "nil" / space "t" ]
27225 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
27226 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
27227 local           = "local" *[ space "(" <string> space <form> ")" ]
27228 eval            = "eval" space <form>
27229 space           = *[ " " / <TAB> / <NEWLINE> ]
27230 @end example
27231
27232 Any unrecognized elements in a score file should be ignored, but not
27233 discarded.
27234
27235 As you can see, white space is needed, but the type and amount of white
27236 space is irrelevant.  This means that formatting of the score file is
27237 left up to the programmer---if it's simpler to just spew it all out on
27238 one looong line, then that's ok.
27239
27240 The meaning of the various atoms are explained elsewhere in this
27241 manual (@pxref{Score File Format}).
27242
27243
27244 @node Headers
27245 @subsection Headers
27246
27247 Internally Gnus uses a format for storing article headers that
27248 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
27249 almost suspect that the author looked at the @acronym{NOV} specification and
27250 just shamelessly @emph{stole} the entire thing, and one would be right.
27251
27252 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
27253 RFC 1036 to talk about lines in the head of an article (e.g.,
27254 @code{From}).  It is used by many people as a synonym for
27255 ``head''---``the header and the body''.  (That should be avoided, in my
27256 opinion.)  And Gnus uses a format internally that it calls ``header'',
27257 which is what I'm talking about here.  This is a 9-element vector,
27258 basically, with each header (ouch) having one slot.
27259
27260 These slots are, in order: @code{number}, @code{subject}, @code{from},
27261 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
27262 @code{xref}, and @code{extra}.  There are macros for accessing and
27263 setting these slots---they all have predictable names beginning with
27264 @code{mail-header-} and @code{mail-header-set-}, respectively.
27265
27266 All these slots contain strings, except the @code{extra} slot, which
27267 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
27268
27269
27270 @node Ranges
27271 @subsection Ranges
27272
27273 @sc{gnus} introduced a concept that I found so useful that I've started
27274 using it a lot and have elaborated on it greatly.
27275
27276 The question is simple: If you have a large amount of objects that are
27277 identified by numbers (say, articles, to take a @emph{wild} example)
27278 that you want to qualify as being ``included'', a normal sequence isn't
27279 very useful.  (A 200,000 length sequence is a bit long-winded.)
27280
27281 The solution is as simple as the question: You just collapse the
27282 sequence.
27283
27284 @example
27285 (1 2 3 4 5 6 10 11 12)
27286 @end example
27287
27288 is transformed into
27289
27290 @example
27291 ((1 . 6) (10 . 12))
27292 @end example
27293
27294 To avoid having those nasty @samp{(13 . 13)} elements to denote a
27295 lonesome object, a @samp{13} is a valid element:
27296
27297 @example
27298 ((1 . 6) 7 (10 . 12))
27299 @end example
27300
27301 This means that comparing two ranges to find out whether they are equal
27302 is slightly tricky:
27303
27304 @example
27305 ((1 . 5) 7 8 (10 . 12))
27306 @end example
27307
27308 and
27309
27310 @example
27311 ((1 . 5) (7 . 8) (10 . 12))
27312 @end example
27313
27314 are equal.  In fact, any non-descending list is a range:
27315
27316 @example
27317 (1 2 3 4 5)
27318 @end example
27319
27320 is a perfectly valid range, although a pretty long-winded one.  This is
27321 also valid:
27322
27323 @example
27324 (1 . 5)
27325 @end example
27326
27327 and is equal to the previous range.
27328
27329 Here's a BNF definition of ranges.  Of course, one must remember the
27330 semantic requirement that the numbers are non-descending.  (Any number
27331 of repetition of the same number is allowed, but apt to disappear in
27332 range handling.)
27333
27334 @example
27335 range           = simple-range / normal-range
27336 simple-range    = "(" number " . " number ")"
27337 normal-range    = "(" start-contents ")"
27338 contents        = "" / simple-range *[ " " contents ] /
27339                   number *[ " " contents ]
27340 @end example
27341
27342 Gnus currently uses ranges to keep track of read articles and article
27343 marks.  I plan on implementing a number of range operators in C if The
27344 Powers That Be are willing to let me.  (I haven't asked yet, because I
27345 need to do some more thinking on what operators I need to make life
27346 totally range-based without ever having to convert back to normal
27347 sequences.)
27348
27349
27350 @node Group Info
27351 @subsection Group Info
27352
27353 Gnus stores all permanent info on groups in a @dfn{group info} list.
27354 This list is from three to six elements (or more) long and exhaustively
27355 describes the group.
27356
27357 Here are two example group infos; one is a very simple group while the
27358 second is a more complex one:
27359
27360 @example
27361 ("no.group" 5 ((1 . 54324)))
27362
27363 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
27364                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
27365                 (nnml "")
27366                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
27367 @end example
27368
27369 The first element is the @dfn{group name}---as Gnus knows the group,
27370 anyway.  The second element is the @dfn{subscription level}, which
27371 normally is a small integer.  (It can also be the @dfn{rank}, which is a
27372 cons cell where the @code{car} is the level and the @code{cdr} is the
27373 score.)  The third element is a list of ranges of read articles.  The
27374 fourth element is a list of lists of article marks of various kinds.
27375 The fifth element is the select method (or virtual server, if you like).
27376 The sixth element is a list of @dfn{group parameters}, which is what
27377 this section is about.
27378
27379 Any of the last three elements may be missing if they are not required.
27380 In fact, the vast majority of groups will normally only have the first
27381 three elements, which saves quite a lot of cons cells.
27382
27383 Here's a BNF definition of the group info format:
27384
27385 @example
27386 info          = "(" group space ralevel space read
27387                 [ "" / [ space marks-list [ "" / [ space method [ "" /
27388                 space parameters ] ] ] ] ] ")"
27389 group         = quote <string> quote
27390 ralevel       = rank / level
27391 level         = <integer in the range of 1 to inf>
27392 rank          = "(" level "." score ")"
27393 score         = <integer in the range of 1 to inf>
27394 read          = range
27395 marks-lists   = nil / "(" *marks ")"
27396 marks         = "(" <string> range ")"
27397 method        = "(" <string> *elisp-forms ")"
27398 parameters    = "(" *elisp-forms ")"
27399 @end example
27400
27401 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
27402 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
27403 in pseudo-BNF.
27404
27405 If you have a Gnus info and want to access the elements, Gnus offers a
27406 series of macros for getting/setting these elements.
27407
27408 @table @code
27409 @item gnus-info-group
27410 @itemx gnus-info-set-group
27411 @findex gnus-info-group
27412 @findex gnus-info-set-group
27413 Get/set the group name.
27414
27415 @item gnus-info-rank
27416 @itemx gnus-info-set-rank
27417 @findex gnus-info-rank
27418 @findex gnus-info-set-rank
27419 Get/set the group rank (@pxref{Group Score}).
27420
27421 @item gnus-info-level
27422 @itemx gnus-info-set-level
27423 @findex gnus-info-level
27424 @findex gnus-info-set-level
27425 Get/set the group level.
27426
27427 @item gnus-info-score
27428 @itemx gnus-info-set-score
27429 @findex gnus-info-score
27430 @findex gnus-info-set-score
27431 Get/set the group score (@pxref{Group Score}).
27432
27433 @item gnus-info-read
27434 @itemx gnus-info-set-read
27435 @findex gnus-info-read
27436 @findex gnus-info-set-read
27437 Get/set the ranges of read articles.
27438
27439 @item gnus-info-marks
27440 @itemx gnus-info-set-marks
27441 @findex gnus-info-marks
27442 @findex gnus-info-set-marks
27443 Get/set the lists of ranges of marked articles.
27444
27445 @item gnus-info-method
27446 @itemx gnus-info-set-method
27447 @findex gnus-info-method
27448 @findex gnus-info-set-method
27449 Get/set the group select method.
27450
27451 @item gnus-info-params
27452 @itemx gnus-info-set-params
27453 @findex gnus-info-params
27454 @findex gnus-info-set-params
27455 Get/set the group parameters.
27456 @end table
27457
27458 All the getter functions take one parameter---the info list.  The setter
27459 functions take two parameters---the info list and the new value.
27460
27461 The last three elements in the group info aren't mandatory, so it may be
27462 necessary to extend the group info before setting the element.  If this
27463 is necessary, you can just pass on a non-@code{nil} third parameter to
27464 the three final setter functions to have this happen automatically.
27465
27466
27467 @node Extended Interactive
27468 @subsection Extended Interactive
27469 @cindex interactive
27470 @findex gnus-interactive
27471
27472 Gnus extends the standard Emacs @code{interactive} specification
27473 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
27474 Prefixes}).  Here's an example of how this is used:
27475
27476 @lisp
27477 (defun gnus-summary-increase-score (&optional score symp)
27478   (interactive (gnus-interactive "P\ny"))
27479   ...
27480   )
27481 @end lisp
27482
27483 The best thing to do would have been to implement
27484 @code{gnus-interactive} as a macro which would have returned an
27485 @code{interactive} form, but this isn't possible since Emacs checks
27486 whether a function is interactive or not by simply doing an @code{assq}
27487 on the lambda form.  So, instead we have @code{gnus-interactive}
27488 function that takes a string and returns values that are usable to
27489 @code{interactive}.
27490
27491 This function accepts (almost) all normal @code{interactive} specs, but
27492 adds a few more.
27493
27494 @table @samp
27495 @item y
27496 @vindex gnus-current-prefix-symbol
27497 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
27498 variable.
27499
27500 @item Y
27501 @vindex gnus-current-prefix-symbols
27502 A list of the current symbolic prefixes---the
27503 @code{gnus-current-prefix-symbol} variable.
27504
27505 @item A
27506 The current article number---the @code{gnus-summary-article-number}
27507 function.
27508
27509 @item H
27510 The current article header---the @code{gnus-summary-article-header}
27511 function.
27512
27513 @item g
27514 The current group name---the @code{gnus-group-group-name}
27515 function.
27516
27517 @end table
27518
27519
27520 @node Emacs/XEmacs Code
27521 @subsection Emacs/XEmacs Code
27522 @cindex XEmacs
27523 @cindex Emacsen
27524
27525 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
27526 platforms must be the primary one.  I chose Emacs.  Not because I don't
27527 like XEmacs or Mule, but because it comes first alphabetically.
27528
27529 This means that Gnus will byte-compile under Emacs with nary a warning,
27530 while XEmacs will pump out gigabytes of warnings while byte-compiling.
27531 As I use byte-compilation warnings to help me root out trivial errors in
27532 Gnus, that's very useful.
27533
27534 I've also consistently used Emacs function interfaces, but have used
27535 Gnusey aliases for the functions.  To take an example:  Emacs defines a
27536 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
27537 function.  I then define a function called @code{gnus-run-at-time} that
27538 takes the same parameters as the Emacs @code{run-at-time}.  When running
27539 Gnus under Emacs, the former function is just an alias for the latter.
27540 However, when running under XEmacs, the former is an alias for the
27541 following function:
27542
27543 @lisp
27544 (defun gnus-xmas-run-at-time (time repeat function &rest args)
27545   (start-itimer
27546    "gnus-run-at-time"
27547    `(lambda ()
27548       (,function ,@@args))
27549    time repeat))
27550 @end lisp
27551
27552 This sort of thing has been done for bunches of functions.  Gnus does
27553 not redefine any native Emacs functions while running under XEmacs---it
27554 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
27555 all over.
27556
27557 In the cases where the XEmacs function interface was obviously cleaner,
27558 I used it instead.  For example @code{gnus-region-active-p} is an alias
27559 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
27560
27561 Of course, I could have chosen XEmacs as my native platform and done
27562 mapping functions the other way around.  But I didn't.  The performance
27563 hit these indirections impose on Gnus under XEmacs should be slight.
27564
27565
27566 @node Various File Formats
27567 @subsection Various File Formats
27568
27569 @menu
27570 * Active File Format::          Information on articles and groups available.
27571 * Newsgroups File Format::      Group descriptions.
27572 @end menu
27573
27574
27575 @node Active File Format
27576 @subsubsection Active File Format
27577
27578 The active file lists all groups available on the server in
27579 question.  It also lists the highest and lowest current article numbers
27580 in each group.
27581
27582 Here's an excerpt from a typical active file:
27583
27584 @example
27585 soc.motss 296030 293865 y
27586 alt.binaries.pictures.fractals 3922 3913 n
27587 comp.sources.unix 1605 1593 m
27588 comp.binaries.ibm.pc 5097 5089 y
27589 no.general 1000 900 y
27590 @end example
27591
27592 Here's a pseudo-BNF definition of this file:
27593
27594 @example
27595 active      = *group-line
27596 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
27597 group       = <non-white-space string>
27598 spc         = " "
27599 high-number = <non-negative integer>
27600 low-number  = <positive integer>
27601 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
27602 @end example
27603
27604 For a full description of this file, see the manual pages for
27605 @samp{innd}, in particular @samp{active(5)}.
27606
27607
27608 @node Newsgroups File Format
27609 @subsubsection Newsgroups File Format
27610
27611 The newsgroups file lists groups along with their descriptions.  Not all
27612 groups on the server have to be listed,  and not all groups in the file
27613 have to exist on the server.  The file is meant purely as information to
27614 the user.
27615
27616 The format is quite simple; a group name, a tab, and the description.
27617 Here's the definition:
27618
27619 @example
27620 newsgroups    = *line
27621 line          = group tab description <NEWLINE>
27622 group         = <non-white-space string>
27623 tab           = <TAB>
27624 description   = <string>
27625 @end example
27626
27627
27628 @page
27629 @node Emacs for Heathens
27630 @section Emacs for Heathens
27631
27632 Believe it or not, but some people who use Gnus haven't really used
27633 Emacs much before they embarked on their journey on the Gnus Love Boat.
27634 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
27635 region'', and ``set @code{gnus-flargblossen} to an alist where the key
27636 is a regexp that is used for matching on the group name'' are magical
27637 phrases with little or no meaning, then this appendix is for you.  If
27638 you are already familiar with Emacs, just ignore this and go fondle your
27639 cat instead.
27640
27641 @menu
27642 * Keystrokes::                  Entering text and executing commands.
27643 * Emacs Lisp::                  The built-in Emacs programming language.
27644 @end menu
27645
27646
27647 @node Keystrokes
27648 @subsection Keystrokes
27649
27650 @itemize @bullet
27651 @item
27652 Q: What is an experienced Emacs user?
27653
27654 @item
27655 A: A person who wishes that the terminal had pedals.
27656 @end itemize
27657
27658 Yes, when you use Emacs, you are apt to use the control key, the shift
27659 key and the meta key a lot.  This is very annoying to some people
27660 (notably @code{vi}le users), and the rest of us just love the hell out
27661 of it.  Just give up and submit.  Emacs really does stand for
27662 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
27663 may have heard from other disreputable sources (like the Emacs author).
27664
27665 The shift keys are normally located near your pinky fingers, and are
27666 normally used to get capital letters and stuff.  You probably use it all
27667 the time.  The control key is normally marked ``CTRL'' or something like
27668 that.  The meta key is, funnily enough, never marked as such on any
27669 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
27670 which is the meta key on this keyboard.  It's usually located somewhere
27671 to the left hand side of the keyboard, usually on the bottom row.
27672
27673 Now, us Emacs people don't say ``press the meta-control-m key'',
27674 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
27675 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
27676 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
27677 down the control key, and hold it down while you press @kbd{k}''.
27678 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
27679 the control key and then press @kbd{k}''.  Simple, ay?
27680
27681 This is somewhat complicated by the fact that not all keyboards have a
27682 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
27683 means ``press escape, release escape, press @kbd{k}''.  That's much more
27684 work than if you have a meta key, so if that's the case, I respectfully
27685 suggest you get a real keyboard with a meta key.  You can't live without
27686 it.
27687
27688
27689
27690 @node Emacs Lisp
27691 @subsection Emacs Lisp
27692
27693 Emacs is the King of Editors because it's really a Lisp interpreter.
27694 Each and every key you tap runs some Emacs Lisp code snippet, and since
27695 Emacs Lisp is an interpreted language, that means that you can configure
27696 any key to run any arbitrary code.  You just, like, do it.
27697
27698 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
27699 functions.  (These are byte-compiled for speed, but it's still
27700 interpreted.)  If you decide that you don't like the way Gnus does
27701 certain things, it's trivial to have it do something a different way.
27702 (Well, at least if you know how to write Lisp code.)  However, that's
27703 beyond the scope of this manual, so we are simply going to talk about
27704 some common constructs that you normally use in your @file{.emacs} file
27705 to customize Gnus.
27706
27707 If you want to set the variable @code{gnus-florgbnize} to four (4), you
27708 write the following:
27709
27710 @lisp
27711 (setq gnus-florgbnize 4)
27712 @end lisp
27713
27714 This function (really ``special form'') @code{setq} is the one that can
27715 set a variable to some value.  This is really all you need to know.  Now
27716 you can go and fill your @file{.emacs} file with lots of these to change
27717 how Gnus works.
27718
27719 If you have put that thing in your @file{.emacs} file, it will be read
27720 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
27721 start Emacs.  If you want to change the variable right away, simply say
27722 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
27723 previous ``form'', which is a simple @code{setq} statement here.
27724
27725 Go ahead---just try it, if you're located at your Emacs.  After you
27726 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
27727 is the return value of the form you @code{eval}ed.
27728
27729 Some pitfalls:
27730
27731 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
27732 that means:
27733
27734 @lisp
27735 (setq gnus-read-active-file 'some)
27736 @end lisp
27737
27738 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
27739 @samp{nntp.ifi.uio.no}'', that means:
27740
27741 @lisp
27742 (setq gnus-nntp-server "nntp.ifi.uio.no")
27743 @end lisp
27744
27745 So be careful not to mix up strings (the latter) with symbols (the
27746 former).  The manual is unambiguous, but it can be confusing.
27747
27748 @page
27749 @include gnus-faq.texi
27750
27751 @node Index
27752 @chapter Index
27753 @printindex cp
27754
27755 @node Key Index
27756 @chapter Key Index
27757 @printindex ky
27758
27759 @summarycontents
27760 @contents
27761 @bye
27762
27763 @iftex
27764 @iflatex
27765 \end{document}
27766 @end iflatex
27767 @end iftex
27768
27769 @c Local Variables:
27770 @c mode: texinfo
27771 @c coding: iso-8859-1
27772 @c End: